{"record":{"id":"ad9643c766173822","repo":"Fission-AI/OpenSpec","slug":"store-remove-path-not-directory","errorCode":"store_remove_path_not_directory","errorMessage":"Store path is not a directory: ${storeRoot}","messagePattern":"Store path is not a directory: (.+?)","errorType":"error_code","errorClass":"StoreError","httpStatus":null,"severity":"error","filePath":"src/core/store/operations.ts","lineNumber":915,"sourceCode":"    files: {\n      deleted: false,\n      leftOnDisk: removed.storeRoot,\n    },\n    diagnostics: [],\n  };\n}\n\nasync function assertSafeToDeleteStoreRoot(storeRoot: string, id: string): Promise<{\n  exists: boolean;\n}> {\n  const kind = await pathKind(storeRoot);\n\n  if (kind === 'missing') {\n    return { exists: false };\n  }\n\n  if (kind !== 'directory') {\n    throw new StoreError(\n      `Store path is not a directory: ${storeRoot}`,\n      'store_remove_path_not_directory',\n      {\n        target: 'store.root',\n        fix: 'Run \"openspec store unregister <id>\" if you only want to forget this local registry entry.',\n      }\n    );\n  }\n\n  const metadata = await readStoreMetadataForOperation(storeRoot);\n  if (!metadata) {\n    throw new StoreError(\n      'Store remove refuses to delete a folder without store metadata.',\n      'store_remove_metadata_missing',\n      {\n        target: 'store.metadata',\n        fix: 'Run \"openspec store unregister <id>\" if you only want to forget this local registry entry.',\n      }","sourceCodeStart":897,"sourceCodeEnd":933,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/store/operations.ts#L897-L933","documentation":"Error \"Store path is not a directory: ${storeRoot}\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/store/operations.ts:915 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"}