{"record":{"id":"087592a36f7d5a08","repo":"deepseek-ai/deepseek-harness","slug":"permission-settings-schema-does-not-advertise-its","errorCode":null,"errorMessage":"permission settings schema does not advertise its current preset","messagePattern":"permission settings schema does not advertise its current preset","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/client/ui-permission-presets/src/client/settings-store.ts","lineNumber":76,"sourceCode":"  if (typeof value !== 'string') throw new Error('permission settings has no defaultPreset value')\n  const node = schema.nodeAtPath(schema.rehydrate(view.schema), ['defaultPreset'])\n  if (node === undefined) throw new Error('permission settings schema has no defaultPreset field')\n  const rawChoices = node.type === 'union'\n    ? (node.list as SchemaNode[] | undefined) ?? []\n    : [node]\n  const options = rawChoices.flatMap((candidate) => {\n    const choice = candidate as unknown as ConstChoice\n    if (choice.type !== 'const' || typeof choice.value !== 'string') return []\n    const described = choice.meta?.description\n    return [{\n      id: choice.value,\n      label: typeof described === 'string' && described.length > 0\n        ? displayPermissionPreset(choice.value, described)\n        : displayPermissionPreset(choice.value, choice.value),\n    }]\n  })\n  if (options.length === 0 || !options.some(option => option.id === value)) {\n    throw new Error('permission settings schema does not advertise its current preset')\n  }\n  return { currentValue: value, options }\n}\n\n/** Controller deriving the row from the shared mirror and writing the default through it. */\nexport class PermissionPresetSettingsController {\n  /** Row snapshot consumed through a bound selector hook. */\n  readonly store: SnapshotStore<PermissionSettingsState> = createSnapshotStore({\n    status: 'idle',\n    error: null,\n    writable: false,\n    currentValue: '',\n    options: [],\n    revision: 0,\n  })\n\n  private following: (() => void) | undefined\n  private saving = false","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/client/ui-permission-presets/src/client/settings-store.ts#L58-L94","documentation":"Error \"permission settings schema does not advertise its current preset\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/client/ui-permission-presets/src/client/settings-store.ts:76 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Advertise the current preset in the permission settings schema."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}