Skip to content

fix(vm): allow Proxy objects in global prototype chains - #109

Merged
steipete merged 1 commit into
mainfrom
claude/w141-vm-proxy
Oct 4, 2026
Merged

steipete merged 1 commit into
mainfrom
claude/w141-vm-proxy

Conversation

@steipete

@steipete steipete commented Oct 4, 2026 •

Copy link
Copy Markdown

Allow Proxy objects in the prototype chain of Bun globals, including contextified sandboxes, DONT_CONTEXTIFY contexts and the main realm. JSC previously rejected program execution against that chain, which prevented jsdom Window scripts from running.

Opt into the new JSC capability when each mutable Bun global finishes creation. The engine keeps its restrictive default for embedders that do not opt in. Tests cover inherited reads, assignments, declarations, vm.Script, runInThisContext and CommonJS execution.

Ports oven-sh#42347; thanks @robobun. The upstream PR is still open. Requires OpenClaw WebKit, now pinned on main by #108; no duplicate upstream PR is needed.

Before: four added Bun cases fail; Node 24 passes the standalone contract. OpenClaw extensions/team-reports/src/render/theme.test.ts fails 6/6 on old-engine Bun and passes 6/6 on the Linux Node control. On the new engine with this adapter, all four added cases pass; the VM suites pass 357 tests with 3 skips, 60 todos and zero failures across seven files. The OpenClaw theme consumer passes 6/6, matching Node. The expanded plain fork selection remains 47/47 with zero regressions. Linux proof was built at f639b22c293604f1236378df951a64187ef06982; rebasing onto merged #108 produces head d43289606a024662829bcb44d761fbc23ada0ec6 with exactly the same Git tree (cf55af1ee96443b3fff2bccfcdac3c4f7369e561). Both fork CI lanes pass on the final head: Linux x64 and macOS arm64.

The final branch passes scoped Codex P2 review against its merge-base with fork main.

Requires OpenClaw WebKit. Ports oven-sh#42347 with coverage for contextified globals, declarations, inherited lookup, and the main realm.

Co-authored-by: robobun <117481402+robobun@users.noreply.github.com>
@steipete
steipete merged commit d2d2a26 into main Oct 4, 2026
8 of 9 checks passed
@steipete
steipete deleted the claude/w141-vm-proxy branch October 4, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant