Repository navigation
fix(test): shut down HTTP fixtures consistently under Bun - #139595
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 5, 2026, 9:27 PM ET / September 6, 2026, 01:27 UTC. ClawSweeper reviewWhat this changesThe PR stops local HTTP test servers before destroying their sockets, preserves cleanup after errors, and adds coverage for closing an unfinished telemetry request. Merge readiness✅ Ready for maintainer review Keep open: this remains a useful fixture-lifecycle repair absent from inspected main. No blocking correctness findings were identified, and the maintainer-authored PR is protected from automatic closure. Priority: P2 Review scores
Verification
How this fits togetherThese local HTTP fixtures support browser transport, QA messaging, and telemetry tests. They receive test requests and must release their listeners and connections when each test finishes. flowchart LR
A[Test HTTP clients] --> B[Local fixture server]
B --> C[Tracked connections]
D[Test teardown] --> E[Stop accepting connections]
E --> F[Destroy tracked sockets]
C --> F
F --> G[Shutdown completes]
Before mergeNone. Agent review detailsSecurityNone. PR surfaceTests -1. Total -1 across 4 files. View PR surface stats
Review metricsNone. Technical reviewBest possible solution: Keep shutdown owned by each fixture: stop acceptance, destroy tracked sockets, and preserve assertions that verify client cleanup before teardown. Do we have a high-confidence way to reproduce the issue? Yes, source inspection establishes the shutdown failure mechanism: Bun's closeAllConnections stops the listener before the existing fixture calls close. The unfinished-request regression exercises that boundary; no tests were executed during this review. Is this the best way to solve the issue? Yes. The patch repairs fixture-owned lifecycle ordering without weakening transport assertions, changing production APIs, or adding runtime-specific branches. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against abd18df28d85. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
* commit 'a2886546df92c3a601db538b1b70125e3519a16f': test(reports): deduplicate native process census setup (#139596) fix(ui): avoid refetching unrelated catalog hosts (#139570) test(compaction): consolidate classification proof at its owner (#139564) fix(apple): harden native state file permissions (#139623) improve(skills): review retained conversation for durable learning (#139656) fix(docker): stage bundled plugin runtime dependencies under the packaged plugin root (#139117) test: close HTTP fixtures before destroying their sockets (#139595) refactor(agents): simplify attempt execution and recovery (#139597) test(gateway): share HTTP authority scenarios (#139611) test(gateway): distinguish final CLI results from draft text (#139605) fix(shell-env): preserve CLI terminal ownership during login imports (#139308)
What Problem This Solves
Fixes test-fixture shutdown failures and lingering HTTP connections under Bun when browser transport, QA bus, and OTLP receiver tests stop their local servers.
Why This Change Was Made
Each fixture stops accepting requests before destroying its tracked sockets. This avoids depending on runtime-specific closeAllConnections behavior and lets unfinished requests terminate. The OTLP receiver retains idempotent close behavior, and QA bus cleanup restores mocks even if shutdown fails.
User Impact
Developers can run the covered HTTP fixture tests under Node and Bun with deterministic cleanup. Production behavior is unchanged.
Evidence