{"record":{"id":"772fe139ba5317b2","repo":"deepseek-ai/deepseek-harness","slug":"settings-keeping-last-good-s-after-invalid-sto","errorCode":null,"errorMessage":"settings: keeping last good \"%s\" after invalid stored section","messagePattern":"settings: keeping last good \"(.+?)\" after invalid stored section","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/settings/settings/src/index.ts","lineNumber":677,"sourceCode":"    // bump below compares what was stored with what now is — an external edit\n    // moves the revision exactly like an in-process write.\n    const before = new Map<SettingsNamespace, unknown>()\n    for (const registration of this.registrations.values()) {\n      try {\n        before.set(registration.ns, this.section(registration.ns))\n      } catch {\n        // A malformed stored section is not a readable \"before\"; treating it\n        // as absent still bumps against any well-formed replacement.\n        before.set(registration.ns, undefined)\n      }\n    }\n    this.document = doc\n    for (const registration of this.registrations.values()) {\n      let next: unknown\n      try {\n        next = deepFreeze(this.resolve(registration.schema, registration.base, this.section(registration.ns), registration.validate))\n      } catch (error) {\n        this.ctx.logger.warn('settings: keeping last good \"%s\" after invalid stored section', registration.ns)\n        this.ctx.logger.warn(error)\n        continue\n      }\n      this.bumpRevision(registration, before.get(registration.ns), this.section(registration.ns))\n      this.commit(registration, next, source)\n    }\n  }\n\n  /** Read one namespace's raw user section, rejecting non-object sections. */\n  private section(ns: SettingsNamespace): Record<string, unknown> | undefined {\n    const section = this.document[ns]\n    if (section === undefined) return undefined\n    if (!isPlainObject(section)) {\n      throw new TypeError(`settings section \"${ns}\" must be an object of keys`)\n    }\n    return section\n  }\n","sourceCodeStart":659,"sourceCodeEnd":695,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/settings/settings/src/index.ts#L659-L695","documentation":"Error \"settings: keeping last good \"%s\" after invalid stored section\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/settings/settings/src/index.ts:677 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the invalid stored section in the named settings file; the last good value is kept meanwhile."],"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"}