{"record":{"id":"1230ea633306bfb9","repo":"deepseek-ai/deepseek-harness","slug":"workspace-domain-is-inconsistent-registry-order-r-1230ea","errorCode":null,"errorMessage":"workspace domain is inconsistent: registry order references missing workspace '${id}'","messagePattern":"workspace domain is inconsistent: registry order references missing workspace '(.+?)'","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/workspace/workspace/src/index.ts","lineNumber":518,"sourceCode":"          || String(leftId).localeCompare(String(rightId))\n      })\n      .map(([id]) => id)\n\n    if (!sameIds(state.workspaceIds, workspaceIds)) {\n      await this.setState({ initialized: false, workspaceIds, archivedSessionIds: state.archivedSessionIds })\n    }\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}'`,","sourceCodeStart":500,"sourceCodeEnd":536,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/workspace/workspace/src/index.ts#L500-L536","documentation":"Error \"workspace domain is inconsistent: registry order references missing workspace '${id}'\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/workspace/workspace/src/index.ts:518 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the dangling id from the registry order, or restore the missing workspace record."],"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"}