A GSD verification gate resolves a project's test command and runs it. vitest defaults to WATCH mode in an interactive TTY — exactly where a user runs `gsd-execute-phase` — so a resolved `npm test`/`pnpm test` backed by vitest never exited and the orchestrator waited indefinitely. Recovery needed the user to manually prompt "something blocking?". Fix — one shared helper + a bounded, surfacing timeout on the test-command gates: - New pure module src/normalize-test-command.cts + `gsd-tools query normalize-test-command` verb: rewrites a resolved command to a best-effort one-shot form (direct vitest → `vitest run`; jest `--watch` → `--watchAll=false`; a package-manager `test` script whose package.json runner is watch-vitest → `CI=true` prefix; handles `--dir`; already-one-shot commands unchanged — never double-flagged). Named `normalize-test-command` (not `test-*`) so the file does not match node --test's default `test-*` discovery glob. - The three gates that HUNG or silently-continued route through that ONE helper and bound execution with `timeout $(config-get workflow.test_gate_timeout)` (new config key, default 600s): the regression gate (extracted to execute-phase/steps/regression-gate.md since execute-phase.md is size-frozen — it shrank 93528→93132; ABORTS on exit 124), the post-merge gate, and the audit-fix gate (previously an UNBOUNDED `eval`). All name watch/dev mode on 124. - verify-phase's gate was ALREADY bounded (a fixed `timeout 300`, not a hang), so it only gains the normalizer (so a watch runner exits fast) + a watch-mode hint on 124, staying under its frozen 40960-byte tier cap. Security hardening (review): the normalizer only rewrites a runner named as a standalone command TOKEN (so `run-vitest.js`/`make test-vitest`/paths are never mangled), is length-capped and uses only linear-time split-based scanning (no super-linear backtracking on an adversarial `workflow.test_command`), and reads package.json only when it is a regular file (never blocks on a FIFO via `--dir`). Config key `workflow.test_gate_timeout` (seconds, default 600) registered in the schema manifest + templates/config.json + docs/CONFIGURATION.md (mirrors workflow.cross_ai_timeout). New module registered in .gitignore, eslint ignores, inventory manifest/index. All 16 golden-install-parity fixtures + workflow size baseline regenerated for the changed shipped files; bin/lib is excluded from the parity manifest. Tests: tests/normalize-test-command.test.cjs (normalizer units incl. security hardening) and tests/test-gate-watch-mode.test.cjs (the three core gates route through the shared helper + configured timeout + exit-124 watch-mode hint; verify-phase asserted as normalize-only/already-bounded). tests/execute-phase-active-flags.test.cjs repointed at the extracted step; tests/planner-language-regression.test.cjs allowlist comment updated. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
94 lines
2.4 KiB
JSON
94 lines
2.4 KiB
JSON
{
|
|
"add-backlog.md": 7176,
|
|
"add-phase.md": 7247,
|
|
"add-tests.md": 16945,
|
|
"add-todo.md": 8996,
|
|
"ai-integration-phase.md": 14805,
|
|
"analyze-dependencies.md": 3887,
|
|
"audit-fix.md": 11717,
|
|
"audit-milestone.md": 17681,
|
|
"audit-uat.md": 7469,
|
|
"autonomous.md": 42474,
|
|
"check-todos.md": 9475,
|
|
"cleanup.md": 9941,
|
|
"code-review-fix.md": 23934,
|
|
"code-review.md": 31646,
|
|
"complete-milestone.md": 31071,
|
|
"debug.md": 13549,
|
|
"diagnose-issues.md": 12864,
|
|
"discovery-phase.md": 8651,
|
|
"discuss-phase-assumptions.md": 27028,
|
|
"discuss-phase-power.md": 11273,
|
|
"discuss-phase.md": 31986,
|
|
"do.md": 10353,
|
|
"docs-update.md": 55706,
|
|
"edit-phase.md": 12927,
|
|
"eval-review.md": 9967,
|
|
"execute-phase.md": 93132,
|
|
"execute-plan.md": 32655,
|
|
"explore.md": 10541,
|
|
"extract-learnings.md": 12893,
|
|
"fast.md": 4149,
|
|
"forensics.md": 12531,
|
|
"graduation.md": 11622,
|
|
"health.md": 11868,
|
|
"help.md": 1722,
|
|
"import.md": 14648,
|
|
"inbox.md": 14407,
|
|
"ingest-docs.md": 18380,
|
|
"insert-phase.md": 8987,
|
|
"list-phase-assumptions.md": 4305,
|
|
"list-seeds.md": 6987,
|
|
"list-workspaces.md": 5699,
|
|
"manager.md": 27302,
|
|
"map-codebase.md": 20833,
|
|
"milestone-summary.md": 11842,
|
|
"mvp-phase.md": 13626,
|
|
"new-milestone.md": 32888,
|
|
"new-project.md": 66182,
|
|
"new-workspace.md": 11298,
|
|
"next.md": 20138,
|
|
"node-repair.md": 4173,
|
|
"note.md": 6563,
|
|
"onboard.md": 8590,
|
|
"pause-work.md": 14441,
|
|
"plan-milestone-gaps.md": 11809,
|
|
"plan-phase.md": 92251,
|
|
"plan-review-convergence.md": 23512,
|
|
"plant-seed.md": 11785,
|
|
"pr-branch.md": 15963,
|
|
"profile-user.md": 21246,
|
|
"progress.md": 30599,
|
|
"quick.md": 50452,
|
|
"reapply-patches.md": 20312,
|
|
"remove-phase.md": 8513,
|
|
"remove-workspace.md": 7551,
|
|
"resume-project.md": 17270,
|
|
"review.md": 43356,
|
|
"scan.md": 7732,
|
|
"secure-phase.md": 13520,
|
|
"session-report.md": 4044,
|
|
"settings-advanced.md": 39718,
|
|
"settings-integrations.md": 15892,
|
|
"settings.md": 33457,
|
|
"ship.md": 24691,
|
|
"sketch-wrap-up.md": 14267,
|
|
"sketch.md": 20004,
|
|
"smart-entry.md": 11124,
|
|
"spec-phase.md": 31945,
|
|
"spike-wrap-up.md": 15136,
|
|
"spike.md": 24561,
|
|
"stats.md": 6762,
|
|
"sync-skills.md": 6125,
|
|
"thread.md": 12508,
|
|
"transition.md": 22060,
|
|
"ui-phase.md": 15521,
|
|
"ui-review.md": 11216,
|
|
"ultraplan-phase.md": 10512,
|
|
"undo.md": 10431,
|
|
"update.md": 20914,
|
|
"validate-phase.md": 10789,
|
|
"verify-phase.md": 40923,
|
|
"verify-work.md": 38267
|
|
}
|