Fission-AI/OpenSpec · error · StoreError

store_git_commit_failed

store_git_commit_failed

Error message

Failed to create the initial store commit: ${error instanceof Error ? error.message : String(error)}

What it means

Error "Failed to create the initial store commit: ${error instanceof Error ? error.message : String(error)}" thrown in Fission-AI/OpenSpec.

Source

Thrown at src/core/store/git.ts:117

  if (pathspecs.length === 0) {
    return false;
  }

  try {
    await execFileAsync('git', ['add', '--', ...pathspecs], { cwd: storeRoot });
    await execFileAsync(
      'git',
      ['commit', '-m', `Initialize OpenSpec store ${id}`, '--', ...pathspecs],
      { cwd: storeRoot }
    );
  } catch (error) {
    // Best-effort unstage so a failed commit (gpg signing, hooks) does not
    // leave setup's files in the user's index after rollback deletes them.
    await execFileAsync('git', ['rm', '--cached', '-r', '-f', '-q', '--', ...pathspecs], {
      cwd: storeRoot,
    }).catch(() => undefined);

    throw new StoreError(
      `Failed to create the initial store commit: ${error instanceof Error ? error.message : String(error)}`,
      'store_git_commit_failed',
      {
        target: 'store.git',
        fix: 'Commit the created files manually, or rerun setup with --no-init-git.',
      }
    );
  }

  return true;
}

async function gitProbe(storeRoot: string, args: string[]): Promise<string | null> {
  try {
    const { stdout } = await execFileAsync('git', ['-C', storeRoot, ...args]);
    return stdout;
  } catch {
    return null;

View on GitHub (pinned to 6926ccb18a)

When it happens

Trigger: Thrown at src/core/store/git.ts:117 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/c9782a59f0bc5ef0. Report an issue: GitHub.