{"record":{"id":"f159fe55352f1407","repo":"deepseek-ai/deepseek-harness","slug":"settings-a-settings-updated-listener-for-s-fai","errorCode":null,"errorMessage":"settings: a settings/updated listener for \"%s\" failed","messagePattern":"settings: a settings/updated listener for \"(.+?)\" failed","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/settings/settings/src/index.ts","lineNumber":809,"sourceCode":"        if ((error as { code?: unknown } | null)?.code === 'INVARIANT') {\n          invariantFailure ??= error\n          continue\n        }\n        this.warnListenerFailure(registration.ns, error)\n      }\n    }\n    if (invariantFailure !== undefined) throw invariantFailure as Error\n  }\n\n  /** Contained-watcher diagnostic shared by the sync and async failure paths. */\n  private warnWatcherFailure(ns: SettingsNamespace, error: unknown): void {\n    this.ctx.logger.warn('settings: watcher for \"%s\" failed', ns)\n    this.ctx.logger.warn(error)\n  }\n\n  /** Contained-listener diagnostic shared by the sync and async failure paths. */\n  private warnListenerFailure(ns: SettingsNamespace, error: unknown): void {\n    this.ctx.logger.warn('settings: a settings/updated listener for \"%s\" failed', ns)\n    this.ctx.logger.warn(error)\n  }\n}\n\n/**\n * Value mirror of the `FiberState` members {@link isUnloading} compares\n * against: a const enum has no runtime object to import, and the value is\n * needed at runtime (same rationale as the CLI boot driver's mirror).\n */\nconst FIBER_DISPOSED = 4\nconst FIBER_UNLOADING = 5\n\n/** Whether the consumer's own fiber is tearing down (not just losing the settings service). */\nfunction isUnloading(ctx: Context): boolean {\n  const state: number = ctx.fiber.state\n  return state === FIBER_UNLOADING || state === FIBER_DISPOSED\n}\n","sourceCodeStart":791,"sourceCodeEnd":827,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/settings/settings/src/index.ts#L791-L827","documentation":"Error \"settings: a settings/updated listener for \"%s\" failed\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/settings/settings/src/index.ts:809 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the throwing settings/updated listener for the named key; its exception is caught and logged."],"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"}