test: make the provider-option E2E hermetic - #3301
Conversation
|
✅ Deterministic PR hygiene checks passed. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe E2E test now blocks public upstream WebSockets, preserves loopback WebSocket coverage, replaces Windows ACL and principal subprocesses with test seams, records seam calls, validates isolation, and restores all modified global and module state. ChangesProvider-option E2E isolation
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This test-only change prevents external WebSocket and host security-command access without changing production behavior; no actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Linked Issues checkExplanation The changes satisfy issue Full details: Out of Scope Changes checkExplanation The changes are limited to the provider-option E2E test and its migration child fixture. WebSocket blocking, loopback preservation, Windows ACL/principal seam injection, call tracking, and cleanup directly support issue
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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 |
리뷰 · 우선순위 63 / 80이 PR은 고치는 방법은 두 갈래입니다. (1) 부모 테스트에서 같은 버그( 라인 176~183 (openai-provider-option-e2e.test.ts) - 라인 399~401 (openai-provider-option-e2e.test.ts) - 루프백 WS를 경로 tests/fixtures/openai-provider-option-migration-child.ts - 자식은 별도 프로세스라 부모 시임이 안 먹습니다. 이 PR이 자식에도 시임을 심은 건 맞고, PR #3300 대비 - 동일 이슈·동일 두 파일을 고치는 중복입니다. Draft 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
Summary
tests/openai-provider-option-e2e.test.tswas not hermetic. It replacedfetchbut leftglobalThis.WebSocketpointing at the public network, so in an environment wherewss://chatgpt.comis unreachable the focused test hangs opening the upstream Responses WebSocket instead of failing. Blocking that socket then exposed a second reach: the test and its migration child ran real Windowsicaclsand principal subprocesses.WebSocketis now stubbed for the test and throws on any upstream construction, while the saved native constructor still serves the intentional loopback connection. A regression fails loudly instead of hanging.icaclsand principal runners, so the Windows assertions exercise the seams rather than the machine.No assertion was removed or skipped; this is a hygiene fix, not a scope reduction.
Verification
wss://chatgpt.com/backend-api/codex/responses.bun test --isolate --parallel=1 tests/openai-provider-option-e2e.test.tswith the proxy env stripped — 1 pass, 0 fail, 81expect()calls in 655 ms.bun run typecheck— passed.Checklist
Closes #3299
Summary by CodeRabbit