fix(test): use --experimental-strip-types in Worker execArgv#1164
Conversation
The snapshot concurrent-save tests passed `--strip-types` to Worker execArgv on Node ≥ 23. That flag is not in the Worker execArgv allowlist on Node 24, so both workers exited with ERR_WORKER_INVALID_EXEC_ARGV before posting a message, causing Promise.allSettled to return two rejected entries and the test assertions to fail. `--experimental-strip-types` is accepted as a Worker execArgv flag on all supported Node versions (≥ 22.6) and is a harmless no-op on Node ≥ 23.6 where type stripping is default-on. Closes #1117
|
Claude finished @carlos-alm's task —— View job PR Review CompleteReviewing PR #1164: fix(test): use --experimental-strip-types in Worker execArgv Todo List:
Phase 1: Root Cause Analysis ✅Problem Being Solved: Node.js 24 removed the short-lived Why This Approach: Switching to
Risk Assessment: LOW RISK - This is a legitimate bug fix addressing a Node.js API compatibility issue, not working around a deeper problem. Phase 2: Configuration Change Detection ✅NO HIGH-RISK CHANGES DETECTED:
The change is purely fixing a Node.js flag compatibility issue in test setup, not silencing any warnings or relaxing quality controls. Phase 3: Test Integrity Check ✅NO RED FLAGS DETECTED:
The test behavior is preserved - only the Worker execArgv setup was fixed to work across Node versions. The race condition tests at lines 182-241 maintain their full concurrency validation. Phase 4: Code Quality Review ✅TECHNICAL QUALITY: The changes are clean and well-implemented:
POTENTIAL IMPROVEMENTS: None identified - the implementation is appropriate and follows established patterns. Phase 5: Backlog Compliance Assessment ✅Root Cause AnalysisProblem Being Solved: Node.js 24 compatibility issue where Worker execArgv rejected Backlog Compliance
Critical ConcernsNone identified. This is a straightforward, well-documented platform compatibility fix. Final Recommendation
Minor observation: The fix addresses a recurring pattern in this codebase (Node.js type stripping flag compatibility) - this same issue was resolved in other areas (CI workflows, vitest config, scripts). The PR properly aligns the test infrastructure with the established solution. |
Greptile SummaryThis PR fixes two concurrent-save race tests that were failing on Node 24 because
Confidence Score: 5/5Safe to merge — the change is a minimal, well-scoped fix to a test-only flag that was breaking Worker startup on Node 24. The fix replaces a version-conditional execArgv flag with a single unconditional flag that is documented to be valid across all supported Node versions. No production code is touched, and the PR description notes the test suite passed 5 consecutive runs on Node 24.10. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Test: spawn race workers] --> B{Before this PR}
B --> C{nodeMajor >= 23?}
C -- Yes --> D["execArgv: --strip-types"]
C -- No --> E["execArgv: --experimental-strip-types"]
D -- Node 24 --> F["ERR_WORKER_INVALID_EXEC_ARGV"]
F --> G[Worker exits before posting message]
G --> H[Test FAIL]
A --> I{After this PR}
I --> J["execArgv: --experimental-strip-types"]
J --> K[Worker starts successfully]
K --> L[Test PASS]
Reviews (3): Last reviewed commit: "Merge branch 'main' into fix/1117-snapsh..." | Re-trigger Greptile |
Summary
--strip-typestoWorkerexecArgv on Node ≥ 23, but Node 24 removed it from the Worker allowlist — both workers exited withERR_WORKER_INVALID_EXEC_ARGVbefore posting a message, soPromise.allSettledreturned two rejections and the two race tests failed locally onmain.--experimental-strip-types, which is accepted by Worker execArgv on every supported Node version (≥ 22.6) and is a harmless no-op on Node ≥ 23.6 where type stripping is default-on.Test plan
npx vitest run tests/unit/snapshot.test.ts— 29/29 pass locally on Node 24.10npx biome check tests/unit/snapshot.test.ts— cleanCloses #1117