Fission-AI/OpenSpec · error · StoreError

store_setup_non_empty_directory

store_setup_non_empty_directory

Error message

Store setup does not support initializing a non-empty folder that is not a healthy OpenSpec root.

What it means

Error "Store setup does not support initializing a non-empty folder that is not a healthy OpenSpec root." thrown in Fission-AI/OpenSpec.

Source

Thrown at src/core/store/operations.ts:516

        throw new StoreError(
          `Store metadata id '${metadata.id}' does not match requested id '${id}'.`,
          'store_metadata_id_mismatch',
          {
            target: 'store.metadata',
            fix: `Use id '${metadata.id}' or choose a different setup path.`,
          }
        );
      }
      if (input.remote !== undefined) {
        // Silent acceptance is the forbidden outcome: the identity file
        // already exists, so --remote cannot reach the committed shape.
        throw remoteRequiresHandEditError(id, storeRoot);
      }
    } else {
      const openspecRoot = await inspectOpenSpecRoot(storeRoot);
      const safeFreshDirectory = await isDirectoryEmpty(storeRoot) || await isGitOnlyDirectory(storeRoot);
      if (!openspecRoot.healthy && !safeFreshDirectory) {
        throw new StoreError(
          'Store setup does not support initializing a non-empty folder that is not a healthy OpenSpec root.',
          'store_setup_non_empty_directory',
          {
            target: 'store.root',
            fix: 'Choose an empty folder, a Git-only folder, or an existing healthy OpenSpec root.',
          }
        );
      }
    }

    backend = await resolveBackendWithObservedOrigin(storeRoot);
  }

  const registry = await readStoreRegistryState();
  const conflictBackend = backend ?? {
    type: 'git' as const,
    local_path: FileSystemUtils.canonicalizeExistingPath(storeRoot),
  };

View on GitHub (pinned to 6926ccb18a)

When it happens

Trigger: Thrown at src/core/store/operations.ts:516 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/ab96c5caaf70f819. Report an issue: GitHub.