{"record":{"id":"1074d7c5a0f82d25","repo":"deepseek-ai/deepseek-harness","slug":"workspace-domain-is-inconsistent-workspace-orp","errorCode":null,"errorMessage":"workspace domain is inconsistent: workspace '${orphan as WorkspaceId}' is absent from registry order","messagePattern":"workspace domain is inconsistent: workspace '(.+?)' is absent from registry order","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/workspace/workspace/src/index.ts","lineNumber":524,"sourceCode":"    }\n    await this.setState({ initialized: true, workspaceIds, archivedSessionIds: state.archivedSessionIds })\n  }\n\n  private validateStoredState(state: WorkspaceDomainState): void {\n    const table = this.requireTable()\n    const order = new Set<WorkspaceId>()\n    for (const id of state.workspaceIds) {\n      if (order.has(id)) {\n        throw new Error(`workspace domain is inconsistent: registry order repeats workspace '${id}'`)\n      }\n      if (table.get(id) === undefined) {\n        throw new Error(`workspace domain is inconsistent: registry order references missing workspace '${id}'`)\n      }\n      order.add(id)\n    }\n    if (state.initialized && order.size !== table.size) {\n      const orphan = [...table.keys()].find(id => !order.has(id))\n      throw new Error(\n        `workspace domain is inconsistent: workspace '${orphan as WorkspaceId}' is absent from registry order`,\n      )\n    }\n\n    const paths = new Map<string, WorkspaceId>()\n    const accounted = new Map<SessionId, WorkspaceId>()\n    for (const [id, record] of table.entries()) {\n      const pathHolder = paths.get(record.path)\n      if (pathHolder !== undefined) {\n        throw new Error(\n          `workspace domain is inconsistent: path '${record.path}' is claimed `\n          + `by both workspace '${pathHolder}' and workspace '${id}'`,\n        )\n      }\n      paths.set(record.path, id)\n      for (const sessionId of record.sessionIds) {\n        const holder = accounted.get(sessionId)\n        if (holder !== undefined) {","sourceCodeStart":506,"sourceCodeEnd":542,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/workspace/workspace/src/index.ts#L506-L542","documentation":"Error \"workspace domain is inconsistent: workspace '${orphan as WorkspaceId}' is absent from registry order\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/workspace/workspace/src/index.ts:524 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add the orphan workspace back to the registry order, or delete its record if it should not exist."],"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"}