{"record":{"id":"e72e205f074301c4","repo":"Fission-AI/OpenSpec","slug":"store-path-not-directory","errorCode":"store_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":755,"sourceCode":"export async function registerExistingStore(\n  input: RegisterExistingStoreInput\n): Promise<StoreMutationResult> {\n  const storeRoot = resolveRegisterRoot(input.path);\n  const kind = await pathKind(storeRoot);\n\n  if (kind === 'missing') {\n    throw new StoreError(\n      `Store path does not exist: ${storeRoot}`,\n      'store_path_missing',\n      {\n        target: 'store.root',\n        fix: 'Clone or create the store folder before registering it.',\n      }\n    );\n  }\n\n  if (kind !== 'directory') {\n    throw new StoreError(\n      `Store path is not a directory: ${storeRoot}`,\n      'store_path_not_directory',\n      {\n        target: 'store.root',\n        fix: 'Pass an existing store directory.',\n      }\n    );\n  }\n\n  assertNotConfigOnlyPointerRoot(storeRoot);\n  const openspecRoot = await inspectOpenSpecRoot(storeRoot);\n  if (!openspecRoot.healthy) {\n    const problems =\n      openspecRoot.diagnostics.map((diagnostic) => diagnostic.message).join(' ') ||\n      'The OpenSpec root is missing or incomplete.';\n    const isEmptyCloneSuspect =\n      (await isGitRepositoryAtRoot(storeRoot)) &&\n      (await gitHasCommits(storeRoot)) === false;","sourceCodeStart":737,"sourceCodeEnd":773,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/store/operations.ts#L737-L773","documentation":"Thrown by registerExistingStore when the given path exists but pathKind classifies it as something other than a directory (e.g. a file). A store root must be a directory containing an OpenSpec layout.","triggerScenarios":"Thrown at src/core/store/operations.ts:755 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass an existing store directory instead of a file","Create or clone the store folder at that path, then register"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6926ccb18afa4ff621112813e9968334576ee11a","analyzedAt":"2026-08-25T12:29:45.729Z","contentChangedAt":"2026-08-25T12:29:45.729Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}