{"record":{"id":"21602d8a10dbcb34","repo":"deepseek-ai/deepseek-harness","slug":"credentials-local-is-disposed-cannot-verb-r","errorCode":null,"errorMessage":"credentials-local is disposed: cannot ${verb} \"${ref}\"","messagePattern":"credentials-local is disposed: cannot (.+?) \"(.+?)\"","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/credentials/credentials-local/src/index.ts","lineNumber":756,"sourceCode":"  }\n\n  /** Queue a reload; only an invariant violation escaping the fan-out can reject it. */\n  private queueRefresh(): void {\n    void this.enqueue(() => this.refresh()).catch((error: unknown) => {\n      // Only an invariant violation escaping the update fan-out can reject a\n      // refresh; keep the operation queue alive and surface it as an error so\n      // one poisoned commit cannot silently end hot reloading forever.\n      this.ctx.logger.error('credentials-local: reload commit failed at %s', this.spec.filename)\n      this.ctx.logger.error(error)\n    })\n  }\n  /* jscpd:ignore-end */\n\n  /** Queue one line edit; entry checks reject early, the queue re-judges them at run time. */\n  private async write(ref: CredentialRef, value: string | undefined): Promise<void> {\n    const verb = value === undefined ? 'unset' : 'set'\n    if (this.isClosed()) {\n      throw new Error(`credentials-local is disposed: cannot ${verb} \"${ref}\"`)\n    }\n    this.assertUnshadowed(ref, verb)\n    return this.enqueue(async () => {\n      if (this.isClosed()) {\n        throw new Error(`credentials-local was disposed before the queued \"${ref}\" ${verb} ran`)\n      }\n      // Re-judged at run time: the environment may have changed while queued.\n      this.assertUnshadowed(ref, verb)\n      // The writer lock's exclusive create needs the parent to exist; 0700\n      // because the harness home holds user-private data.\n      await mkdir(dirname(this.spec.filename), { recursive: true, mode: 0o700 })\n      await withFileLock(this.spec.filename, async () => {\n        // Read-modify-write: fold in any on-disk state this process has not\n        // observed yet — an external edit still inside the watcher debounce\n        // window, a change the watcher missed, or another process's write —\n        // so the line edit below can never resurrect a stale document.\n        await this.reconcileFromDisk()\n        const existing = this.values.get(ref)","sourceCodeStart":738,"sourceCodeEnd":774,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/credentials/credentials-local/src/index.ts#L738-L774","documentation":"Error \"credentials-local is disposed: cannot ${verb} \"${ref}\"\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/credentials/credentials-local/src/index.ts:756 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"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"}