Files
msd-core/tests/workflow-size-baseline.json
Tom Boucher d0bacc2517 fix(#2351): replace hardcoded timeout with portable run-with-timeout (#2426)
* fix(#2351): replace hardcoded gnu timeout with portable run-with-timeout

Stock macOS ships neither `timeout` nor `gtimeout` (GNU coreutils). The 10
hardcoded `timeout <n> <cmd>` calls across the workflow/agent/reference gates
exited 127 ("command not found") on such hosts, and the gates — which only
distinguish 0/124/other — misreported a passing build or test as a FAILURE.

Fix: a single Node-based `gsd_run run-with-timeout <secs> [--] <cmd…>` verb in
gsd-tools.cjs. Coreutils-independent (stock macOS AND Windows), keeps GNU
`timeout`'s exit-code contract (124 timeout, passthrough, 127/126 ENOENT/EACCES,
128+signum on signal), inherits stdio so pipes/redirects work, and reaps the
whole process group so a watch-mode runner cannot outlive its budget. Runs
before gsd-tools' flag parsing so the wrapped argv stays opaque.

Hardened per adversarial review:
- On timeout, SIGKILL the group SYNCHRONOUSLY before resolving — a descendant
  that traps SIGTERM was otherwise orphaned holding stdout, hanging captured
  gates (the exact watch-mode hang the feature prevents).
- Forward SIGINT/SIGTERM to the child tree instead of dying and orphaning it.
- Reject blank/whitespace <seconds> (was a silent unbounded run); clamp the
  timer to the 32-bit setTimeout ceiling (was a spurious immediate timeout).
- Lint detector: catch GNU long options / `-k5` / `$((...))`; anchor to command
  position so prose "timeout 30 seconds" no longer false-positives.

Resolution lives once in the CLI; all 10 sites call the shared verb. A parity
guard (scripts/lint-portable-timeout.cjs, wired into lint:ci) fails the build if
a bare `timeout`/`gtimeout` execution reappears (the portable `command -v
timeout` probe form is intentionally allowed). Also fixes the identical bug in
the zh-CN checkpoints translation, updates the tests that asserted the old
strings, trims a redundant phrase in gsd-verifier.md to keep it under its size
hard cap, and refreshes the size baselines + golden install-parity fixtures.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* chore(#2351): add changeset (#2426)

* chore: regenerate golden/size baseline after rebase onto next

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-19 14:37:15 -04:00

94 lines
2.4 KiB
JSON

{
"add-backlog.md": 7176,
"add-phase.md": 7578,
"add-tests.md": 16961,
"add-todo.md": 10734,
"ai-integration-phase.md": 15134,
"analyze-dependencies.md": 3887,
"audit-fix.md": 11743,
"audit-milestone.md": 18448,
"audit-uat.md": 7469,
"autonomous.md": 42474,
"check-todos.md": 9475,
"cleanup.md": 9941,
"code-review-fix.md": 24320,
"code-review.md": 32524,
"complete-milestone.md": 31071,
"debug.md": 19031,
"diagnose-issues.md": 12864,
"discovery-phase.md": 8651,
"discuss-phase-assumptions.md": 27302,
"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": 93395,
"execute-plan.md": 34262,
"explore.md": 10541,
"extract-learnings.md": 12893,
"fast.md": 7613,
"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": 37581,
"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": 94387,
"plan-review-convergence.md": 23713,
"plant-seed.md": 11785,
"pr-branch.md": 15963,
"profile-user.md": 21246,
"progress.md": 31789,
"quick.md": 50699,
"reapply-patches.md": 20312,
"remove-phase.md": 8513,
"remove-workspace.md": 7551,
"resume-project.md": 17270,
"review.md": 50497,
"scan.md": 7732,
"secure-phase.md": 13622,
"session-report.md": 4044,
"settings-advanced.md": 40019,
"settings-integrations.md": 15892,
"settings.md": 33467,
"ship.md": 25575,
"sketch-wrap-up.md": 14267,
"sketch.md": 20004,
"smart-entry.md": 11124,
"spec-phase.md": 31987,
"spike-wrap-up.md": 15136,
"spike.md": 24561,
"stats.md": 6762,
"sync-skills.md": 6125,
"thread.md": 12508,
"transition.md": 22070,
"ui-phase.md": 26054,
"ui-review.md": 11216,
"ultraplan-phase.md": 10512,
"undo.md": 10431,
"update.md": 20914,
"validate-phase.md": 10849,
"verify-phase.md": 40949,
"verify-work.md": 40247
}