Skip to content

fix(cli): archive passes -y and configurable timeout#6

Open
aiyinluya wants to merge 1 commit into
RandyZ:mainfrom
aiyinluya:fix/cli-archive-noninteractive-timeout
Open

fix(cli): archive passes -y and configurable timeout#6
aiyinluya wants to merge 1 commit into
RandyZ:mainfrom
aiyinluya:fix/cli-archive-noninteractive-timeout

Conversation

@aiyinluya
Copy link
Copy Markdown

Root cause

  • \openspec archive\ without -y\ waits for stdin confirmation. In the extension webview there is no TTY, so the CLI hangs until the built-in timeout kills the process (\Command timed out after 30 seconds).
  • When main specs are already merged manually, full archive can fail on spec merge conflicts; the OpenSpec CLI supports --skip-specs\ for that case.

Changes

  • **\�rchiveChange**: invoke \openspec archive -y; if \openspec.archiveSkipSpecs\ is \ rue, append --skip-specs.
  • **\execOpenSpecOnce**: CLI timeout is read from \openspec.cliTimeoutMs\ (default 120000); error message includes the configured milliseconds.
  • **\package.json**: contribute \openspec.cliTimeoutMs\ (5000–600000, default 120000) and \openspec.archiveSkipSpecs\ (boolean, default false).
  • Tests: mock \�scode.workspace.getConfiguration; expect -y\ on archive; align timeout tests with 120s default and error text.

Verification

\\�ash
npx vitest run test/extension/services/openspecCli.test.ts
\\

All 24 tests passed locally.

Made with Cursor

Co-authored-by: Cursor <cursoragent@cursor.com>
@RandyZ
Copy link
Copy Markdown
Owner

RandyZ commented May 18, 2026

test case resolve conflict

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants