{"record":{"id":"25b3bb98f0eb73a9","repo":"Fission-AI/OpenSpec","slug":"unhealthy-store-root","errorCode":"unhealthy_store_root","errorMessage":"Store '${id}' does not have a healthy OpenSpec root at ${storeRoot}: ${inspection.problems} ${doctorFix(id)}","messagePattern":"Store '(.+?)' does not have a healthy OpenSpec root at (.+?): (.+?) (.+?)","errorType":"exception","errorClass":"RootSelectionError","httpStatus":null,"severity":"error","filePath":"src/core/root-selection.ts","lineNumber":210,"sourceCode":"  switch (inspection.kind) {\n    case 'metadata_error':\n      return fromStoreError(inspection.error);\n    case 'metadata_missing':\n      // The doctor pointer lives in the message because human-mode command\n      // wrappers print only the message, not the fix field.\n      throw new RootSelectionError(\n        `Store '${id}' is missing identity metadata at ${inspection.metadataPath}. ${doctorFix(id)}`,\n        'store_identity_mismatch',\n        { target: 'store.metadata', fix: doctorFix(id) }\n      );\n    case 'metadata_id_mismatch':\n      throw new RootSelectionError(\n        `Store '${id}' metadata id '${inspection.actualId}' does not match its registered id. ${doctorFix(id)}`,\n        'store_identity_mismatch',\n        { target: 'store.metadata', fix: doctorFix(id) }\n      );\n    case 'unhealthy_root':\n      throw new RootSelectionError(\n        `Store '${id}' does not have a healthy OpenSpec root at ${storeRoot}: ${inspection.problems} ${doctorFix(id)}`,\n        'unhealthy_store_root',\n        { target: 'openspec.root', fix: doctorFix(id) }\n      );\n    case 'ok':\n      return makeRoot(inspection.canonicalRoot, source, id);\n    default: {\n      // Exhaustiveness guard: a new inspection kind must be handled\n      // here explicitly, not fall through to an undefined root.\n      const unhandled: never = inspection;\n      throw new Error(`Unhandled store inspection kind: ${JSON.stringify(unhandled)}`);\n    }\n  }\n}\n\n/**\n * The metadata-identity and root-health stages of registered-store\n * resolution, as a non-throwing result. `resolveStoreRoot` maps each","sourceCodeStart":192,"sourceCodeEnd":228,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/root-selection.ts#L192-L228","documentation":"Error \"Store '${id}' does not have a healthy OpenSpec root at ${storeRoot}: ${inspection.problems} ${doctorFix(id)}\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/root-selection.ts:210 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6926ccb18afa4ff621112813e9968334576ee11a","analyzedAt":"2026-08-25T12:29:45.729Z","schemaVersion":2},"datasetVersion":"2026-08-25T16:17:27.014Z"}