Skip to content

fix: use the bundle-compatible Proxyline runtime under Bun - #140411

Merged
steipete merged 3 commits into
mainfrom
codex/bun-proxyline-update
Sep 6, 2026
Merged

steipete merged 3 commits into
mainfrom
codex/bun-proxyline-update

Conversation

@steipete

@steipete steipete commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where Bun selects its built-in Undici compatibility module instead of OpenClaw's installed peer for Proxyline fetch classes and dispatcher cleanup. The update also preserves standalone worker bundling: the initial 0.3.10 candidate left a runtime package lookup in relocated worker output, and the upstream 0.3.11 repair removes that lookup.

Why This Change Was Made

Update @openclaw/proxyline from 0.3.7 to the reviewed and published 0.3.11 release, retaining Undici 8.10.2. Proxyline now statically imports the explicit undici/index.js entry, which selects the installed peer under Bun and lets the existing worker bundler include it. No OpenClaw bundler transform or runtime workaround is added. The existing relocated-worker fixture adds --no-install only to its Bun child so its no-installed-dependency assertion cannot auto-install a package.

Immediate adoption is explicitly approved. The only release-age exception is @openclaw/proxyline@0.3.11, with removal after 2026-09-13 20:51 UTC. The prior 0.3.10 exception is removed. The 10,080-minute cooldown, strict enforcement, and other exclusions are unchanged.

User Impact

OpenClaw retains a shared Undici runtime with Proxyline under Bun, including restoration of fetch globals and the original dispatcher. Standalone workers keep their bundled transport dependency. This does not establish full OpenClaw, Matrix, or every networking surface's compatibility with Bun.

Evidence

Upstream review and publication

  • Upstream PR #31 introduced installed-peer selection. PR #32 makes the entry statically bundleable and preserves caller-provided errors in both Node HTTP-forward and CONNECT request cleanup. The latter PR contains the regression proof and final review context.
  • Independent source review covered the complete production delta from 0.3.7 to 0.3.11, including src/env.ts, src/node-http.ts, and src/runtime.ts; see the published comparison and changelog. The normalization change uses a bounded linear scan while retaining matching semantics. Request ownership follows Node's selected pooled request, and temporary ownership tags are removed before retention. Pending sockets, timers, and temporary request hooks are cleaned by their owner; hook restoration checks continued ownership. Omitted timeouts retain the documented default and explicit zero remains unbounded. Observer exceptions cannot strand installed globals.
  • That review found a real regression in the intermediate cancellation hooks: a caller's supplied Error could be replaced. The 0.3.11 correction retains the supplied error through the existing single-settlement path, while preserving absent-error and timeout behavior. Two ordinary owned-loopback regression cases failed before that correction and passed on Node and Bun afterward; reinspection found no remaining issue.
  • Upstream's relocated-bundle regression passed on Node and Bun, covering initialization, data-URL fetch, global restoration, and clean exit. The complete Node platform/version matrix, package checks, CodeQL, and final-head hosted review passed.
  • 0.3.11 release and trusted OIDC publication run. Registry publication was 2026-09-06 20:50:12.378 UTC. The published tarball SHA512 was verified, and all three shipped production files matched merged commit a8dafd8d6a146763898e027b1473862fc37380b0. The lockfile records that verified integrity.

OpenClaw consumer proof

  • Pinned pnpm 12.3.4 resolution and the final frozen install passed with actual Proxyline 0.3.11 / Undici 8.10.2. During resolution, pnpm first rejected the existing 0.3.10 lock entry after its exception had been replaced. Retaining that previously approved exact exception solely while regenerating the lock, then removing it and passing the frozen install, completed the transition without changing global policy or hand-editing the lockfile.
  • Installed consumer probes passed on Node 26.8.1 and Bun 1.4.2: shared peer/global identity, data-URL fetch including a pre-install Request, and restoration of all globals and the original dispatcher.
  • The exact existing relocated-worker test passed under Node and Bun, clearing the prior MODULE_NOT_FOUND: undici/package.json failure. It bundles and relocates the real transport entry, then verifies ordinary loopback WebSocket echo, lazy transcription, headers, and cleanup. All original assertions and timeouts remain unchanged; nine other cases were unselected in each runtime.
  • The first Bun attempt stopped at the existing no-installed-ws negative control because require.resolve("ws/package.json") auto-installed/resolved ws from Bun’s cache. The earlier builtin attribution was incorrect. A Bun-only --no-install child argument preserves and enforces the original MODULE_NOT_FOUND assertion, including when Bun has a cached copy. Both runtime cases passed after that single fixture correction.
  • Full local pnpm build passed, including declarations and runtime packaging. Fresh independent P0–P2 review of the complete four-file candidate passed with no actionable findings. New-head hosted required type, lint, and test checks must pass before landing. Earlier local monolithic validation attempts stopped at an external memory cap; completed local types/guards and equivalent previous-head hosted full lint were recorded separately, never as a passing monolithic local gate.

@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Sep 6, 2026
@steipete
steipete marked this pull request as ready for review September 6, 2026 20:05
@steipete
steipete requested a review from a team as a code owner September 6, 2026 20:05
@github-actions github-actions Bot added the dependencies-changed PR changes dependency-related files label Sep 6, 2026
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Dependency Guard

This PR changes dependency-related files. Maintainers should confirm these changes are intentional.

Changed files:

  • package.json
  • pnpm-lock.yaml
  • pnpm-workspace.yaml

Maintainer follow-up:

  • Review whether the dependency changes are intentional.
  • Inspect resolved package deltas when lockfiles or workspace dependency policy changes are present.
  • Treat pnpm-lock.yaml and package-lock.json diffs as dependency security-review surfaces.
  • Run pnpm deps:changes:report -- --base-ref origin/main --markdown /tmp/dependency-changes.md --json /tmp/dependency-changes.json locally for detailed release-style evidence.

@github-actions

github-actions Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Dependency graph changes noted

This PR includes dependency graph changes. The dependency guard is informational because the PR author is a repository admin, a member of @openclaw/openclaw-secops, or an OpenClaw organization member with Maintain or Admin repository access.

  • Current SHA: ae8ffca8129c34e548d8b3414ad29143cc562c2d
  • Trusted actor: @steipete
  • Trusted role: pull request author; openclaw-secops

Security review is still recommended before merge when the dependency graph change is intentional.

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge. Reviewed September 6, 2026, 5:12 PM ET / 21:12 UTC.

ClawSweeper review

What this changes

Updates Proxyline to 0.3.11 for Bun-compatible, bundleable networking, adds a version-specific dependency cooldown exception, and disables Bun package auto-install in the relocated-worker test.

Merge readiness

⛔ Blocked before merge - 1 item remains

This remains a useful, maintainer-owned fix: inspected main still pins Proxyline 0.3.7, and no introduced defect was found. The updated evidence addresses the previous upstream-review request; upstream source and publication claims could not be independently rechecked here.

Priority: P2
Reviewed head: ae8ffca8129c34e548d8b3414ad29143cc562c2d

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused repair with relevant reported runtime observations and no actionable defect in the inspected patch.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (live_output): The captured body reports real installed-consumer probes on Node and Bun exercising Proxyline peer identity, fetch, and restoration, plus relocated production transport runs verifying WebSocket echo, transcription, headers, and cleanup. These observations cover the changed runtime and packaging boundary; they do not establish general Bun compatibility.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The captured body reports real installed-consumer probes on Node and Bun exercising Proxyline peer identity, fetch, and restoration, plus relocated production transport runs verifying WebSocket echo, transcription, headers, and cleanup. These observations cover the changed runtime and packaging boundary; they do not establish general Bun compatibility.
Evidence reviewed 9 items Verified introduced changes: The merge-base-to-head diff matches the supplied four-file introduction evidence: one dependency upgrade, matching lockfile resolution, an exact-version cooldown exception, and a Bun-only child-process flag. Endpoint drift was not treated as PR-owned changes.
Still needed on inspected main: Fetched main pins Proxyline 0.3.7. Latest-release package inspection could not complete because its blob was unavailable locally and the remote could not resolve; no release inclusion is claimed.
Dependency contract applies: The proxy lifecycle directly imports installGlobalProxy from Proxyline, and network-proxy documentation identifies Proxyline as the process-level routing owner. This establishes a Proxyline dependency boundary; it does not establish a Codex dependency boundary.
Findings None None.
Security None None.

How this fits together

Proxyline supplies OpenClaw’s process-level proxy transport and fetch runtime. Standalone workers bundle networking dependencies so their WebSocket and transcription connections work after relocation without installed packages.

flowchart LR
  A[Configured proxy] --> B[OpenClaw proxy lifecycle]
  B --> C[Proxyline runtime]
  C --> D[Installed Undici peer]
  E[Worker build] --> F[Bundled transport]
  D --> F
  F --> G[Relocated worker connections]
Loading

Before merge

  • Resolve review confidence - ClawSweeper must reach high confidence before merge readiness is known.
Agent review details

Security

None.

PR surface

Tests +1, Config +2, Other 0. Total +3 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 1 0 +1
Docs 0 0 0 0
Config 2 3 1 +2
Generated 0 0 0 0
Other 1 5 5 0
Total 4 9 6 +3

Review metrics

Metric Value Why it matters
Dependency admission exception 1 exact version; 10,080-minute global cooldown preserved Immediate adoption is narrowly scoped and has a documented removal date.

Technical review

Best possible solution:

Keep installed-peer selection and bundle compatibility in Proxyline, preserving OpenClaw’s existing transport lifecycle and worker packaging contracts.

Do we have a high-confidence way to reproduce the issue?

No independently established current-main reproduction was run in this read-only review; the body records concrete installed-peer and relocated-worker failures and successful Node/Bun results after the fix.

Is this the best way to solve the issue?

Yes, the dependency-owned repair matches OpenClaw’s existing installed-peer and bundling patterns, and the test adjustment preserves its negative control; upstream implementation details remain supported by supplied review evidence rather than direct inspection here.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 98adc95c79d4.

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The captured body reports real installed-consumer probes on Node and Bun exercising Proxyline peer identity, fetch, and restoration, plus relocated production transport runs verifying WebSocket echo, transcription, headers, and cleanup. These observations cover the changed runtime and packaging boundary; they do not establish general Bun compatibility.

Label justifications:

  • P2: This repairs bounded Bun networking and worker-packaging compatibility without evidence of a widespread urgent outage.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The captured body reports real installed-consumer probes on Node and Bun exercising Proxyline peer identity, fetch, and restoration, plus relocated production transport runs verifying WebSocket echo, transcription, headers, and cleanup. These observations cover the changed runtime and packaging boundary; they do not establish general Bun compatibility.
  • proof: sufficient: Contributor real behavior proof is sufficient. The captured body reports real installed-consumer probes on Node and Bun exercising Proxyline peer identity, fetch, and restoration, plus relocated production transport runs verifying WebSocket echo, transcription, headers, and cleanup. These observations cover the changed runtime and packaging boundary; they do not establish general Bun compatibility.

Evidence

What I checked:

  • Verified introduced changes: The merge-base-to-head diff matches the supplied four-file introduction evidence: one dependency upgrade, matching lockfile resolution, an exact-version cooldown exception, and a Bun-only child-process flag. Endpoint drift was not treated as PR-owned changes. (package.json:2140, ae8ffca8129c)
  • Still needed on inspected main: Fetched main pins Proxyline 0.3.7. Latest-release package inspection could not complete because its blob was unavailable locally and the remote could not resolve; no release inclusion is claimed. (package.json, 98adc95c79d4)
  • Dependency contract applies: The proxy lifecycle directly imports installGlobalProxy from Proxyline, and network-proxy documentation identifies Proxyline as the process-level routing owner. This establishes a Proxyline dependency boundary; it does not establish a Codex dependency boundary. (src/infra/net/proxy/proxy-lifecycle.ts:5, ae8ffca8129c)
  • Worker regression coverage preserves its contract: The complete test builds real transport exports with the worker configuration, relocates output, asserts ws is unavailable, and checks loopback WebSocket echo, transcription, headers, and closure. The added --no-install argument is conditional on Bun; existing assertions and timeouts remain intact. (test/scripts/worker-deploy-build-plugin.test.ts:113, ae8ffca8129c)
  • Existing bundling and installed-peer patterns: The worker build bundles non-builtin dependencies and already transforms OpenClaw’s Undici loader to a static undici/index.js import. The proposed dependency repair fits this existing packaging model without introducing another OpenClaw transform. (scripts/lib/worker-deploy-build-plugin.mts:28, ae8ffca8129c)
  • Captured proof and prior-review disposition: The supplied complete PR body, retained under context sourceRevision 31f0f02ffaaf1fc0e13da512d30328f5aa4d2598818b40556554e9bda3960b62, reports independent inspection of the complete 0.3.7–0.3.11 production delta, correction of an intermediate cancellation-error regression, installed consumer lifecycle probes on Node 26.8.1 and Bun 1.4.2, and successful relocated-worker runs on both. This addresses the previous review’s sole rank-up request. These are supplied observations, not executions performed by this reviewer. (ae8ffca8129c)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-06T20:11:19.480Z sha c74853f :: blocked before merge. :: none

@steipete steipete changed the title fix: use the installed Proxyline peer under Bun fix: use the bundle-compatible Proxyline runtime under Bun Sep 6, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Sep 6, 2026
@steipete
steipete merged commit 270762e into main Sep 6, 2026
163 of 165 checks passed
@steipete
steipete deleted the codex/bun-proxyline-update branch September 6, 2026 21:22
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 6, 2026
* commit '294df333c58f2da104eccffc623ccb3c4d43d4d8': (1802 commits)
  fix: clear stale diagnostics after Gateway changes (#140426)
  fix: keep plugin catalogs intact after discovery timeouts (#140441)
  perf(tui): prepare session picker rows once per overlay (#140462)
  refactor(config): reuse environment substitution for write-back (#140460)
  refactor(discord): remove retired auto-presence templates (#140463)
  fix(ui): finish roster refreshes during session activity (#140459)
  fix(setup): match prepared credentials to the model provider (#140461)
  fix: keep MiniMax discovery on the selected credential (#140438)
  refactor(tests): remove unused parent context cache reset (#140456)
  fix: avoid repeated xAI OAuth refresh during discovery (#140434)
  perf(routing): reuse prepared event session targets (#140454)
  fix(media): keep deferred audio and extraction providers discoverable (#139231)
  refactor(codex): remove redundant app-server forwarding (#140451)
  fix(test): avoid false native polling timeouts (#140119)
  test(gateway): retain saved source in reload fixtures (#140453)
  fix(gateway): reduce repeated model work when listing sessions (#140414)
  fix(feishu): fall back to post mode over table limit (#136382)
  fix: use the bundle-compatible Proxyline runtime under Bun (#140411)
  refactor(trace): reuse the canonical usage counter type (#140444)
  refactor(node-host): share execution policy result fields (#140446)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 7, 2026
…140411)

* fix: use the installed Proxyline peer under Bun

* fix: retain Proxyline peer loading in worker bundles

* test: disable package auto-install in relocated Bun workers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies-changed PR changes dependency-related files maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant