Repository navigation
fix(runtime): preserve bundled loading and cancellation errors - #32
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, 4:46 PM ET / 20:46 UTC. ClawSweeper reviewWhat this changesThe PR makes the installed Undici peer bundleable, preserves caller cancellation errors during pending proxy connections, adds regressions, and prepares version 0.3.11. Merge readiness✅ Ready for maintainer review Both repairs remain necessary on current main and v0.3.10. The final-head evidence supports the changed behavior, and review found no blocking defect or additional required action. Priority: P2 Review scores
Verification
How this fits togetherProxyline applies process-wide proxy routing to Node HTTP clients and Undici fetch. Its runtime installs and restores networking globals, while its request agents manage forward-proxy connections and CONNECT tunnels. flowchart TD
A[Application requests] --> B[Proxyline runtime]
C[Installed Undici peer] --> B
B --> D[Fetch dispatcher]
B --> E[Node proxy agents]
E --> F[Forward connection or CONNECT tunnel]
G[Caller cancellation error] --> E
E --> H[Request settles with original error]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Retain one installed Undici implementation across ordinary and bundled consumers, and preserve caller error identity through the existing request-cleanup path. Do we have a high-confidence way to reproduce the issue? Yes: main's dynamic metadata lookup and discarded destroy(error) argument establish concrete failure paths, supported by the contributor's failing-before/passing-after runs; this read-only review did not execute them. Is this the best way to solve the issue? Yes: a static import of the same installed peer and propagation through existing settlement guards address the defects without adding settings, parallel APIs, or migration requirements. AGENTS.md: not found in the target repository. Codex review notes: model internal, reasoning medium; reviewed against c6e79655ca1d. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
@clawsweeper re-review Please review final head 27fbaa9. The previous completed review covers f6f0958 only. The final head also preserves caller-supplied cancellation errors in both pending request paths, with two fresh failing-before/passing-after regressions on Node and Bun. The body contains the exact-head commands/output and the independent full-upgrade source assessment. Exact-head CI 34058623167 and package verification 34058623256 are green. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Problem
Two compatibility gaps were found while upgrading OpenClaw from Proxyline 0.3.7:
require.resolve('undici/package.json')after bundling. Relocated standalone output fails withMODULE_NOT_FOUND; OpenClaw's existing worker regression caught it in #140411.request.destroy(error)reason with a newCONNECT_FAILEDerror, losing caller identity and classification.Change
Use a static
undici/index.jsimport. It selects the installed peer under Bun and lets Node-targeted bundlers include it, removing the dynamic metadata lookup. Forward a supplied destruction error through the existing single-settlement path; no-error closure keeps its existing fallback, and timeout handling stays separate.Add owner-boundary regressions for relocated bundled execution and both cancellation paths. The bundle test checks in-memory fetch, restoration of all captured globals, empty stderr, natural child exit, and owned temporary cleanup. Cancellation tests assert exact error identity, one error, closed requests, zero proxy application traffic, and awaited fixture cleanup. Declare already-locked esbuild 0.28.2 as a direct test dependency. Prepare patch release 0.3.11 and retain 0.3.12 Unreleased.
Evidence
Exact final head:
27fbaa914f2e795223321785428479778cd50727.Fresh Node regressions failed before their repairs: relocated output could not find
undici/package.json, and both pending cancellations replacedSYNTHETIC_CANCELwithCONNECT_FAILED. All three new regressions pass on Node 26.8.1 and Bun 1.4.2. The bundle child uses the same runtime as its outer test.Actual final-head Bun output (exit 0):
The corresponding Node run reports the same three cases passed with exit 0. Additional evidence:
env.ts,node-http.ts, andruntime.ts. It identified the cancellation issue above; reinspection after correction found no remaining finding. Request ownership follows Node's pool selection, cleanup remains owner-bound, observer failures cannot strand globals, hostname normalization preserves matching, and explicit zero timeouts remain unbounded.The existing full Node CI matrix and package verification gate release. Other policy/TLS/adversarial cases were not run locally, and this does not claim complete Bun compatibility across every networking surface.