Repository navigation
fix(test): prevent Vitest preloads from breaking packaged workers - #160069
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 27, 2026, 11:41 PM ET / September 28, 2026, 03:41 UTC. ClawSweeper reviewWhat this changesThe plugin package-build test now supplies runtime-selected launch arguments when it starts a built JavaScript worker. Merge readiness✅ Ready for maintainer review Current main still has the reported fixture failure path. This collaborator-authored PR offers a focused repair using the existing worker-launch helper, with no blocking patch defect identified. Priority: P2 Review scores
Verification
How this fits togetherThe plugin package-build test creates a temporary plugin package, builds it, then starts its worker to check the packaged output. Vitest starts the test, and the worker’s reply determines whether the fixture passes. flowchart LR
A[Vitest runner] --> B[Plugin package fixture]
B --> C[Built plugin entry]
C --> D[Worker URL]
D --> E[Runtime launch arguments]
E --> F[Worker reply assertion]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests +3. Total +3 across 1 file. View PR surface stats
Review metrics
Technical reviewBest possible solution: Keep the packaged-worker fixture on the shared launch-argument resolver so built JavaScript workers avoid test-runner preloads while source workers retain their required loader. Do we have a high-confidence way to reproduce the issue? Yes. Current main leaves the worker launch arguments implicit, and the PR body records the missing-module failure in the original shard; this read-only review did not execute it. Is this the best way to solve the issue? Yes. The patch uses the existing runtime-owned helper at the failing worker launch, matching the documented direct-worker fixture pattern. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8e57f5447edd. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
What Problem This Solves
The packaged-plugin worker test fails with
MODULE_NOT_FOUND: vitest/runtimewhen its temporary worker inherits Vitest’s preload arguments.User Impact
This repairs a CI fixture. Application behavior is unchanged.
Why This Change Was Made
The fixture now uses the existing runtime worker-argument helper to launch its built JavaScript worker. The worker’s reply assertion and shutdown remain intact.
Evidence