Fission-AI/OpenSpec · error · StoreError
store_remove_metadata_missing
store_remove_metadata_missing
Error message
Store remove refuses to delete a folder without store metadata.
What it means
Safety guard in assertSafeToDeleteStoreRoot: the path is a directory but contains no store metadata (readStoreMetadataForOperation returned nothing), so it does not look like a store created by openspec. Removal is refused to avoid deleting an unrelated folder; the input at fault is the registered store root directory lacking store metadata.
Solutions
- If you only want to forget the store, run 'openspec store unregister <id>'
- If the folder is a genuine store with damaged metadata, restore its metadata file (e.g. from version control) and retry 'openspec store remove'
- If it is an unrelated directory, remove it manually with rm -rf and unregister the entry
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/core/store/operations.ts:927 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Fission-AI/OpenSpec@6926ccb18a (2026-08-25).
Data as JSON: /api/errors/bce3bc9e9bc9839c.
Report an issue: GitHub.
Appendix: source
Thrown at src/core/store/operations.ts:927
if (kind === 'missing') {
return { exists: false };
}
if (kind !== 'directory') {
throw new StoreError(
`Store path is not a directory: ${storeRoot}`,
'store_remove_path_not_directory',
{
target: 'store.root',
fix: 'Run "openspec store unregister <id>" if you only want to forget this local registry entry.',
}
);
}
const metadata = await readStoreMetadataForOperation(storeRoot);
if (!metadata) {
throw new StoreError(
'Store remove refuses to delete a folder without store metadata.',
'store_remove_metadata_missing',
{
target: 'store.metadata',
fix: 'Run "openspec store unregister <id>" if you only want to forget this local registry entry.',
}
);
}
if (metadata.id !== id) {
throw new StoreError(
`Store metadata id '${metadata.id}' does not match requested id '${id}'.`,
'store_metadata_id_mismatch',
{
target: 'store.metadata',
fix: 'Repair the registry or run store unregister instead of deleting this folder.',
}
);View on GitHub (pinned to 6926ccb18a)