mirror of
https://github.com/Fission-AI/OpenSpec.git
synced 2026-09-14 20:16:53 +08:00
745845dd3e
- Add shared runCLI helper in test/helpers/run-cli.ts for spawn testing - Create test/cli-e2e/basic.test.ts covering help, version, validate flows - Migrate existing CLI exec tests to use runCLI helper - Extend CI matrix to bash (Linux/macOS) and pwsh (Windows) - Update Phase 1 tasks and proposal with implementation status
1.6 KiB
1.6 KiB
1. Phase 1 – Stabilize Local Spawn Coverage
- 1.1 Add
test/helpers/run-cli.tsthat ensures the build runs once and executesnode dist/cli/index.jswith non-TTY defaults; updatevitest.setup.tsto reuse the shared build step. - 1.2 Seed
test/cli-e2eusing the minimal fixture set (tmp-initor copy) to cover help/version, a happy-pathvalidate, and a representative error flow via the new helper. - 1.3 Migrate the highest-value existing CLI exec tests (e.g., validate) onto
runCLIand summarize Phase 1 coverage in this proposal for the next phase.
2. Phase 2 – Expand Cross-Shell Validation
- 2.1 Exercise both entry points (
node dist/cli/index.js,bin/openspec.js) in the spawn suite and add diagnostics for shell/OS context. - 2.2 Extend GitHub Actions to run the spawn suite on bash jobs for Linux/macOS and a
pwshjob on Windows; capture shell/OS diagnostics and note follow-ups for additional shells.
3. Phase 3 – Package Validation (Optional)
- 3.1 Add a simple CI job on runners with registry access that runs
pnpm pack, installs the tarball into a temp workspace (e.g.,pnpm add --no-save), and executespnpm exec openspec --version. - 3.2 If network-restricted environments can’t exercise installs, skip the job and note the limitation in this proposal’s rollout log.
- 3.3 Close out the enumerated hardening items: extend
.gitattributesto cover packaged assets, enforce executable bits for CLI shims during CI, and finish the outstanding SIGINT handling work; update this proposal once they land.