{"record":{"id":"08620d696861ba97","repo":"deepseek-ai/deepseek-harness","slug":"workspace-domain-is-inconsistent-pending-pendin","errorCode":null,"errorMessage":"workspace domain is inconsistent: pending ${pending.operation} workspace '${pending.workspaceId}' is still present in registry order","messagePattern":"workspace domain is inconsistent: pending (.+?) workspace '(.+?)' is still present in registry order","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/workspace/workspace/src/index.ts","lineNumber":413,"sourceCode":"      // than reporting failure after the requested state became true.\n      this.ctx.logger.warn(\n        `workspace '${id}' was deleted but its pending marker could not be cleared: ${String(error)}`,\n      )\n    }\n    return true\n  }\n\n  /**\n   * Complete the one mutation explicitly named by durable state. Unexplained\n   * order/table divergence still reaches {@link validateStoredState} and\n   * fails loud; this path never guesses which operation created a row from its shape alone.\n   */\n  private async recoverPendingMutation(): Promise<void> {\n    const state = this.requireState()\n    const pending = state.pendingMutation\n    if (pending === undefined) return\n    if (state.workspaceIds.includes(pending.workspaceId)) {\n      throw new Error(\n        `workspace domain is inconsistent: pending ${pending.operation} workspace `\n        + `'${pending.workspaceId}' is still present in registry order`,\n      )\n    }\n    await this.requireTable().delete(pending.workspaceId)\n    await this.setState({\n      initialized: state.initialized,\n      workspaceIds: state.workspaceIds,\n      archivedSessionIds: state.archivedSessionIds,\n    })\n  }\n\n  private async bootstrap(headers: readonly SessionHeader[]): Promise<void> {\n    const table = this.requireTable()\n    const state = this.requireState()\n    const groupsByPath = new Map<string, SessionHeader[]>()\n    for (const header of headers) {\n      const path = this.sessionPaths.get(header.id)","sourceCodeStart":395,"sourceCodeEnd":431,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/workspace/workspace/src/index.ts#L395-L431","documentation":"Error \"workspace domain is inconsistent: pending ${pending.operation} workspace '${pending.workspaceId}' is still present in registry order\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/workspace/workspace/src/index.ts:413 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the stale pending marker (or finish the pending operation) so the registry order and marker agree, then restart."],"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"}