Fission-AI/OpenSpec · error · StoreError

store_remote_empty

store_remote_empty

Error message

Store remote must not be empty when provided.

What it means

Thrown by prepareSetupPlan when the remote option was provided as an empty string rather than omitted. An explicit but empty remote cannot be a clone URL, and treating it as 'no remote' would hide a flag typo.

Solutions

  1. Omit --remote entirely if no clone URL is intended
  2. Pass a real clone URL: --remote <url>
Defensive patterns

Strategy: validation

When it happens

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

Appendix: source

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

 */
async function resolveBackendWithObservedOrigin(
  storeRoot: string
): Promise<StoreGitBackendConfig> {
  const origin = (await isGitRepositoryAtRoot(storeRoot))
    ? await gitOriginUrl(storeRoot)
    : null;
  return resolveGitStoreBackendConfig({
    localPath: storeRoot,
    ...(origin ? { remote: origin } : {}),
  });
}

async function prepareSetupPlan(
  input: Pick<SetupStoreInput, 'id' | 'path' | 'allowInsideGitRepository' | 'remote'>
): Promise<StoreSetupPlan> {
  const id = validateStoreId(input.id ?? '');
  if (input.remote !== undefined && input.remote.length === 0) {
    throw new StoreError('Store remote must not be empty when provided.', 'store_remote_empty', {
      target: 'store.metadata',
      fix: 'Pass a clone URL: --remote <url>.',
    });
  }
  const storeRoot = resolveSetupRoot(id, input.path);
  const kind = await pathKind(storeRoot);

  if (kind === 'file' || kind === 'other') {
    throw new StoreError(
      `Store setup path is not a directory: ${storeRoot}`,
      'store_setup_path_not_directory',
      {
        target: 'store.root',
        fix: 'Choose an empty directory or an existing healthy OpenSpec root.',
      }
    );
  }

View on GitHub (pinned to 6926ccb18a)