test(v2): read the feature transition, not the Windows launcher argv (Windows stack 1/3) - #3548
Conversation
Four-shard baseline on the pinned runtime (bun 1.4.0) on a self-hosted Windows box: 17783 pass, 25 fail, three test-harness defects. An earlier baseline used the 1.3.14 on PATH and reported 179+ failures across three shards with the fourth wedged; 001 records that mistake and the controlled A/B that exposed it. Research is 001-006, one decade doc per implementation phase (010/020/030) plus a dependent follow-up (040).
…be fired 22 of the 25 baseline failures were contamination, not a defect. Stubbing both icacls runners left them failing and logged zero runner invocations, so the mechanism 010 described never executed. The holder was a Windows handle kept by the wedged 1.3.14 shard-3 process after kill -9; with the leftover directory removed the fixture is 22 pass in 1.4s. Retracts 010 and 040 - a helper plus an 18-file migration for a defect that does not exist. The Windows suite has three real failures, not 25.
On Windows an npm-installed codex is a .cmd shim, and a shell-less .cmd spawn is rejected by post-CVE Node/Bun, so commandInvocation wraps the call as cmd.exe /d /s /c "<escaped line>". That makes args[1] equal /s, and these two tests asserted args[1] === 'disable' and a POSIX-joined argv string, so they were asserting the OS launcher's argument grammar rather than the state transition. featureActionOf() parses the two shapes commandInvocation actually emits and throws on anything else, so a bypassed or malformed invocation still fails. Its own test pins both shapes - including an escaped space in the target path and the node_modules/.bin double-escaped form - and five rejections. No product change: the tests still run through cmdV2 -> codexFeaturesInvocation -> commandInvocation, and the launcher contract stays pinned by codex-v2-gate.test.ts and win-exec.test.ts.
|
Warning Review limit reachedNext included review available in 3 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (13)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Deterministic PR hygiene checks passed. |
리뷰 · 우선순위 64 / 80설명 이 PR은 Windows 테스트 스위트를 초록으로 만드는 세 장짜리 스택의 첫 장이다. 제품 코드는 건드리지 않고, 실패의 핵심은 간단하다. Windows에서 npm으로 깔린 고치는 방식은 맞게 짜였다. 테스트 파일 안에 로컬 헬퍼 계획 문서 쪽도 가치가 있다. 처음에 PATH의 Bun 1.3.14로 재서 실패가 잔뜩 보였고, 핀된 1.4.0으로 다시 재니 실제 결함은 세 개뿐이었다. 그중 22개는 kill -9 잔여 핸들 오염이었고 라인 253 - 첫 keep-native-v1 테스트가 이제 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
Ingwannu
left a comment
There was a problem hiding this comment.
Reviewed at exact head d9e350de545c81de1df4239393815ab4b48fdba1.
This is a test-only correction, not a launcher bypass. The affected assertions still execute cmdV2 -> codexFeaturesInvocation -> commandInvocation; the local parser accepts only the two production argv shapes and validates the semantic features <enable|disable> <feature> transition. Executable resolution and Windows escaping remain covered by the dedicated codex-v2-gate and win-exec suites. No product/runtime path or CI coverage is removed.
Cross-platform CI run 33928123783 is fully green on this SHA, and the concurrency-cancelled target check was rerun successfully in 33928123884. Approved.
Non-blocking documentation note: 000_plan.md still names tests/multi-agent-keep-native-v1.test.ts instead of tests/codex-integration/multi-agent-keep-native-v1.test.ts. Correct that path in the next documentation touch; it does not affect this behavioral regression.
Summary
Windows suite stabilization, PR 1 of 3. Fixes the two
multi-agent-keep-native-v1failures on Windows by reading the feature transition instead of the OS launcher's positional argv.On Windows an npm-installed
codexis a.cmdshim, and a shell-less.cmdspawn is rejected by post-CVE Node/Bun, socommandInvocationwraps the call ascmd.exe /d /s /c "<escaped line>". That makesargs[1]equal/s; the two tests assertedargs[1] === "disable"and a POSIX-joined argv string, so they were asserting the launcher's grammar rather than the state transition.featureActionOf()parses the two shapescommandInvocationactually emits and throws on anything else. Its own test pins both shapes (including an escaped space in the target path and thenode_modules/.bindouble-escaped form) plus five rejections.No product change. The repaired tests still run through
cmdV2 → codexFeaturesInvocation → commandInvocation; executable identity stays pinned bycodex-v2-gate.test.tsandwin-exec.test.ts.Also carries the unit's planning devlog (
devlog/_plan/260905_windows_suite_stabilization/), including007which retracts a 22-failure diagnosis that turned out to be self-inflicted contamination from a killed run — measured, not assumed.Stack: this PR → #2 (
codex/win-2-unlinked-cwd) → #3 (codex/win-3-k-owner-budget).Verification
bun test tests/multi-agent-keep-native-v1.test.ts(macOS): 12 passworkflow_dispatchon the stack head (run 33926041666): windows 1/4 4462 pass 0 fail, 2/4 4628/0, 3/4 4305/0, 4/4 4413/0 — first all-green Windows runbun run typecheckcleanChecklist