test(flows): size the push-guard git tests' timeout to their real work
Problem
npx vitest run (full suite, from web/) intermittently fails two tests in web/lib/test/flow-push-guard.test.ts with "Test timed out in 5000ms":
- "withholds refused workflow edits, pushes the rest, and puts the patch in the pull-request body"
- "handles an added and a deleted workflow file, and drops a commit that only touched workflows"
Run alone, the file passes.
Cause
Each FLOW_PUSH_COMMAND case spawns roughly 50–150 real git processes: repo setup, the push command, and the bare remote's pre-receive hook. Each Node spawn costs about 30ms locally. Alone, these two tests take about 3.3s and 2.2s. Under the full suite's parallel load they take 7.5–9.8s, past vitest's 5s default.
Fix
The FLOW_PUSH_COMMAND describe block now has { timeout: 30_000 }, about 3× the slowest time observed under load, with a comment explaining why. No assertions or test logic changed. The long-file-list case keeps its own 60s timeout. The pure-string generated flows block keeps the default.
Verification
I ran the full npx vitest run from web/ 5 times in a row. All 5 exited 0 (280 passed, 1 skipped). The two tests took 9.5–9.8s and 7.5–7.7s.
🤖 Generated with Claude Code
[!NOTE]
Low Risk
Test-only timeout and comment change; no production or assertion changes.
Overview
Raises the Vitest timeout for the FLOW_PUSH_COMMAND integration suite from the default 5s to 30s, with an inline comment that each case runs many real git subprocesses and can exceed 5s when the full suite runs in parallel.
No test logic or assertions change; the per-case 60s limit on the long PR-body test and the default timeout on generated flows are unchanged.
Reviewed by Cursor Bugbot for commit a36c5ed9a4cbcabebce6f6fa896cbce5f6c27cf3. Bugbot is set up for automated code reviews on this repo. Configure here.