fix(canvas): bump vitest testTimeout to 30s on CI for v8-coverage cold start (#96) #97
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/issue-96-canvas-vitest-cold-start-timeout"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Class A CI red sweep: 3 first-tests in heavyweight Canvas test files time out at vitest's 5000ms default on the self-hosted Gitea Actions Docker runner under
npx vitest run --coverage. Same 3 tests fail consistently across 4 unrelated PRs (#82, #81, #54, #53) whose canvas/ deltas don't intersect — clear environmental, not logical.Fix: CI-conditional
testTimeout: process.env.CI ? 30000 : 5000incanvas/vitest.config.ts. Local-dev keeps the 5000ms sensitivity for genuine waitFor races; CI gets ~5x headroom over the worst observed first-test (6453ms).Full root-cause analysis + 2 alternatives rejected + hostile self-review in the issue body: #96.
Empirically observed first-test durations (CI run 2321/jobs/2)
renders all 7 filter optionsopens the dialog ...PUTs the new provider ...renders with role='menu'(currently passing on margin)Subsequent tests in the same files: 100-1500ms each. The cold-start tax is per-file, paid by whoever happens to be first.
Why this is environmental, not a code bug
ActivityTab.FILTERShas 7 entries matching the test).--coverage): 1407 tests pass in 9-15s. CI runs the same suite at 200s. Gap is import/transform/environment overhead per vitest's own footer (environment 589.87s).Test plan
process.env.CI)CI=true30000ms (ternary takes effect)CI=true npx vitest run --coverage: 1407/1407 green, 13.97sHostile self-review (3 weakest spots)
--coverageon PRs, faster runner). The right trade today is unblocking 4 PRs from this single class.Closes #96.
Refs: #82, #81, #54, #53.
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
CI-conditional vitest testTimeout bump (5000→30000ms when CI=true). 1-file 26-line surgical change. Root cause from Phase 1: first-test cold-start (v8 coverage + JSDOM + heavy imports) on Gitea Actions Docker runner ~13x slower than local; 5-7s cold-start exceeds 5000ms default. Verified: run #2370 1407/1407 green in 102s, formerly-failing tests now 789ms/829ms/1316ms. By devops-engineer persona. 4 PRs (#82/#81/#54/#53) will unblock post-merge+rebase. Ready.