{"record":{"id":"745af6160df8c70d","repo":"deepseek-ai/deepseek-harness","slug":"workspace-id-was-deleted-but-its-pending-mark","errorCode":null,"errorMessage":"workspace '${id}' was deleted but its pending marker could not be cleared: ${String(error)}","messagePattern":"workspace '(.+?)' was deleted but its pending marker could not be cleared: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/workspace/workspace/src/index.ts","lineNumber":396,"sourceCode":"      } catch (rollbackError) {\n        // The durable marker still says to finish deletion, so the cache must\n        // agree with that recoverable direction rather than republish a row\n        // absent from the persisted order.\n        this.entities.delete(id)\n        throw new AggregateError(\n          [error, rollbackError],\n          `workspace '${id}' record deletion and registry-order rollback both failed`,\n        )\n      }\n      throw error\n    }\n    try {\n      await this.setState(nextState)\n    } catch (error) {\n      // The deletion committed at the table write and was already published\n      // to Host streams. Keep the durable marker for startup recovery rather\n      // 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 `","sourceCodeStart":378,"sourceCodeEnd":414,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/workspace/workspace/src/index.ts#L378-L414","documentation":"Error \"workspace '${id}' was deleted but its pending marker could not be cleared: ${String(error)}\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/workspace/workspace/src/index.ts:396 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Delete the stale pending marker manually, check storage permissions, and verify the workspace id no longer exists."],"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"}