{"record":{"id":"3121494cade0a9fb","repo":"deepseek-ai/deepseek-harness","slug":"session-projection-cache-trigger-write-for","errorCode":null,"errorMessage":"session projection cache: ${trigger} write for \"${session.id}\" failed (cache stays stale): ${String(error)}","messagePattern":"session projection cache: (.+?) write for \"(.+?)\" failed \\(cache stays stale\\): (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/session/session-projection-cache/src/index.ts","lineNumber":249,"sourceCode":"    // Clear pending timers with the plugin (their sessions outlive the cache).\n    this.ctx.effect(() => () => {\n      for (const state of this.dirty.values()) {\n        if (state.timer !== undefined) clearTimeout(state.timer)\n      }\n      this.dirty.clear()\n    }, 'sessionProjectionCache.timers')\n  }\n\n  /**\n   * One fail-soft durable checkpoint. Every caller has work by construction:\n   * the throttle triggers only fire dirty (markClean clears the timer with\n   * the counter) and the two mandatory points write unconditionally.\n   */\n  private async flushSoft(session: Session, trigger: string): Promise<void> {\n    try {\n      await this.write(session)\n    } catch (error) {\n      this.ctx.logger.warn(`session projection cache: ${trigger} write for \"${session.id}\" failed (cache stays stale): ${String(error)}`)\n    }\n  }\n\n  /** Reset one session's dirty bookkeeping (its checkpoint is being written). */\n  private markClean(session: Session): void {\n    const state = this.dirty.get(session)\n    if (state === undefined) return\n    state.pending = 0\n    if (state.timer !== undefined) {\n      clearTimeout(state.timer)\n      state.timer = undefined\n    }\n  }\n\n  /** Replace one session's stored record with its log identity and a detached snapshot of `rows`. */\n  private async put(id: SessionId, identity: CheckpointIdentity, rows: ProjectionCheckpoint): Promise<void> {\n    const detached = snapshotJsonValue(rows)\n    if (detached === undefined) {","sourceCodeStart":231,"sourceCodeEnd":267,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/session/session-projection-cache/src/index.ts#L231-L267","documentation":"Error \"session projection cache: ${trigger} write for \"${session.id}\" failed (cache stays stale): ${String(error)}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/session/session-projection-cache/src/index.ts:249 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the projection cache storage (path, permissions, disk); the cache stays stale until a write succeeds."],"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"}