{"record":{"id":"476b1bdb76c89292","repo":"Fission-AI/OpenSpec","slug":"global-defaultstore-id-error-message","errorCode":null,"errorMessage":"Global defaultStore '${id}': ${error.message}","messagePattern":"Global defaultStore '(.+?)': (.+?)","errorType":"exception","errorClass":"RootSelectionError","httpStatus":null,"severity":"error","filePath":"src/core/root-selection.ts","lineNumber":379,"sourceCode":" * machine-wide default from a repo's `store:` pointer. Mirrors the\n * declared-pointer catch — a stale or unregistered id degrades to the\n * underlying error, reshaped to point at clearing the global default\n * rather than passing --store.\n */\nasync function resolveDefaultStoreRoot(\n  id: string,\n  globalDataDir?: string\n): Promise<ResolvedOpenSpecRoot> {\n  try {\n    return await resolveStoreRoot(id, globalDataDir, 'global_default');\n  } catch (error) {\n    if (error instanceof RootSelectionError) {\n      const staleFix =\n        error.diagnostic.code === 'unknown_store' ||\n        error.diagnostic.code === 'no_registered_stores'\n          ? `Register the store (openspec store register <path> --id ${id}) or clear the stale global default (openspec config unset defaultStore).`\n          : error.diagnostic.fix;\n      throw new RootSelectionError(\n        `Global defaultStore '${id}': ${error.message}`,\n        error.diagnostic.code,\n        {\n          ...(error.diagnostic.target ? { target: error.diagnostic.target } : {}),\n          ...(staleFix ? { fix: staleFix } : {}),\n        }\n      );\n    }\n    throw error;\n  }\n}\n\nexport async function resolveOpenSpecRoot(\n  options: ResolveOpenSpecRootOptions = {}\n): Promise<ResolvedOpenSpecRoot> {\n  if (options.storePath !== undefined) {\n    throw new RootSelectionError(\n      '--store-path is not supported. Register the path with openspec store register <path>, then select it with --store <id>.',","sourceCodeStart":361,"sourceCodeEnd":397,"githubUrl":"https://github.com/Fission-AI/OpenSpec/blob/6926ccb18afa4ff621112813e9968334576ee11a/src/core/root-selection.ts#L361-L397","documentation":"Error \"Global defaultStore '${id}': ${error.message}\" thrown in Fission-AI/OpenSpec.","triggerScenarios":"Thrown at src/core/root-selection.ts:379 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"}