Repository navigation
fix(runtime): load installed Undici peer under Bun - #31
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 6, 2026, 3:14 PM ET / 19:14 UTC. ClawSweeper reviewWhat this changesLoad Proxyline’s installed Undici peer explicitly for compatible fetch classes and dispatcher cleanup under Bun, document the behavior, and prepare version 0.3.10. Merge readiness✅ Ready for maintainer review The fix remains necessary on the reviewed main branch. The updated evidence satisfies the previous proof request, and no introduced correctness or security defect was found. Priority: P2 Review scores
Verification
How this fits togetherProxyline routes a process’s HTTP and fetch requests through configured proxies. Its runtime installs compatible fetch globals and dispatchers, then restores the previous globals and releases its transports when stopped. flowchart TD
A[Host application] --> B[Proxyline runtime]
C[Installed Undici peer] --> B
D[Proxy configuration] --> B
B --> E[Fetch globals and dispatcher]
E --> F[Direct or proxied requests]
B --> G[Stop and restore globals]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep one installed Undici implementation responsible for fetch classes and dispatcher lifecycle while preserving the existing routing and restoration contracts. Do we have a high-confidence way to reproduce the issue? Yes, the report identifies two existing package-entrypoint cases that fail under Bun before the fix, and source inspection locates the bare-import boundary; the reviewer did not independently execute the failing baseline. Is this the best way to solve the issue? Yes, explicit peer resolution is a narrow repair that preserves the existing API and routing logic; the supplied Node, Bun, and minimum-peer results support compatibility. AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning medium; reviewed against 49a787d39a4f. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
@clawsweeper re-review The PR body now includes the exact reviewed SHA, runtime/peer versions, reproduction commands, and inspected Bun output showing all five selected built-package cases pass with exit 0. It also records a packed-artifact check with the minimum supported Undici 8.5.0 peer on Node and Bun. The source head is unchanged; this addresses the missing inspectable proof in the previous review. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Problem
Bun substitutes its compatibility module for a bare
undiciimport. Proxyline consequently captures a different fetch class family and a dispatcher without the lifecycle methods it calls. Two existing package-entrypoint tests fail under Bun during fetch-global installation and shutdown.Change
Resolve the installed Undici peer relative to Proxyline, then load its package entry point. The peer remains shared with the host, and proxy routing, request normalization, assertions, and public APIs are unchanged. Prepare the approved 0.3.10 patch release and preserve the next-version Unreleased changelog section.
Validation
Exact-commit runtime evidence
Verified commit
cd68dac9c7f5dd2c367417d74f55e7305cf5f413, package0.3.10, installed Undici peer8.10.1, Node26.8.1, Bun1.4.2. Rebuiltdistat this commit before these runs. Both commands exited 0; the processes completed without cleanup errors. The first case asserts replacement and restoration of all five fetch globals; the final three use the real owned loopback proxy lab and assert response status/body and proxy activity.Actual Bun output:
Node output likewise reports the same five names passed,
tests 5,pass 5,fail 0,cancelled 0,skipped 0, with duration366.526333ms.The full nine-job Node coverage matrix and package verification passed on this head. Local filtered proof is deliberately distinguished from the complete Node CI suite.
Minimum-peer artifact check: packed this commit as
@openclaw/proxyline@0.3.10, installed the tarball into an isolated consumer with exactlyundici@8.5.0, and ran the same in-memory install/fetch/restore probe with an empty inherited environment. The probe asserts all four fetch constructors equal the installed peer, successfully reads two data URLs (including a pre-install Request), then asserts every captured global and the original peer dispatcher are restored. No socket is opened. Both processes exited 0:{"runtime":"Node 26.8.1","proxyline":"0.3.10","sharedPeer":true,"fetchAndRestore":true} {"runtime":"Bun 1.4.2","proxyline":"0.3.10","sharedPeer":true,"fetchAndRestore":true}