Repository navigation
Conversation
The profiling runner supports only forks/threads pools, but the fork-shutdown fixture sent every scenario except plain/custom through it. vmForks and the custom-opt-in pool died during global setup, so the inner run never wrote its receipt and the fixture crashed with ENOENT instead of a usable failure. Route those scenarios through the plain runner and assert profiling artifacts only for runs the fixture actually profiled; worker-shutdown assertions are unchanged.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 29, 2026, 4:09 PM ET / 20:09 UTC. ClawSweeper reviewWhat this changesThe PR sends Vitest pools unsupported by the profiling runner through the ordinary runner and conditions profile-artifact assertions on whether profiling ran. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readinessKeep open for normal maintainer handling: current main retains the incompatible route, and the introduced test-only repair matches the profiling boundary without weakening shutdown assertions. Priority: P2 Review scores
Verification
How this fits togetherThe fork-shutdown fixture launches an inner Vitest run across pool configurations and reports its result to an outer lifecycle test. Profiling is optional instrumentation; the outer test verifies worker cleanup, exit behavior, and fixture isolation. flowchart LR
A[Shutdown lifecycle test] --> B[Fixture scenario]
B --> C{Pool supports profiling}
C -->|forks or threads| D[Profiling runner]
C -->|custom or vmForks| E[Plain runner]
D --> F[Inner test result]
E --> F
F --> G[Cleanup and shutdown assertions]
Before merge
Agent review detailsSecurityNone. PR surfaceTests +11. Total +11 across 2 files. View PR surface stats
Review metrics
Technical reviewBest possible solution: Land the focused fixture-boundary repair after exact-head CI completes, keeping profiler eligibility and profile-artifact assertions aligned. Do we have a high-confidence way to reproduce the issue? Yes. Current-main source configures vmForks and custom pools, invokes runner-mode profiling, and that setup rejects those pools before the fixture writes its receipt. Is this the best way to solve the issue? Yes. The fixture owns both pool construction and runner selection, so choosing the plain runner there avoids an incompatible wrapper while retaining the shutdown test’s behavioral assertions. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8cd61f02bf48. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Closing as a duplicate of #132820, which fixes the same breakage better. Both PRs diagnose the same root cause — the profiling runner accepts only #132820 is the better repair on three counts:
#132820 is green on its exact head with no failing checks. |
What Problem This Solves
test/scripts/vitest-fork-shutdown.test.tsfails deterministically onmainfor two scenarios —vmForks/rawandcustom-opt-in/raw— turning thechecks-node-compact-small-*shard and the CI gate red. It reproduces on a pristinemaincheckout with no other changes:Root cause:
scripts/lib/vitest-profiler.mtsrejects any pool other thanforks/threads("Runner profiling supports the forks and threads pools only"), but the fixture routed every scenario exceptplain/customthroughrun-vitest-profile.mts. ForvmForks(poolvmForks) andcustom-opt-in(a customcustom-forkpool), the inner Vitest run therefore died during global setup, never ran the fixture test, and never wrotereceipt.json— so the outer fixture crashed on an unconditionalreadFileSyncinstead of reporting a usable failure. On CI the same two scenarios surfaced with a misleading "Timeout waiting for worker to respond".Why This Change Was Made
Two small, matched changes:
plainandcustomkeep their existing routing, so no currently-passing scenario changes path.profiled), and the test asserts CPU/heap profile artifacts only for those runs — instead of duplicating pool knowledge in a second file. Unprofiled runs still assert the inner run passed.Worker-shutdown assertions — the point of the test — are untouched:
workerStopped, terminate/deadline events, home cleanup, and exit codes all still apply to every scenario.User Impact
None at runtime; test infrastructure only. Unblocks
mainand every PR whose merge ref includes this test.Evidence
main(cfa802d73e5):Tests 2 failed | 10 passed (12), both failures ENOENT onreceipt.json.Tests 12 passed (12).vmForksfixture directly reportscode: 0 workerStopped: true profiled: false, so the test's core invariant remains asserted.Error: Runner profiling supports the forks and threads pools onlyatscripts/lib/vitest-profiler.mts:46.Found while landing an unrelated PR (#132740) whose merge ref inherited this failure; filed separately so the CI repair lands on its own rather than riding along with an exec-policy change.