Repository navigation
fix(vm): allow Proxy objects in global prototype chains - #109
Merged
Merged
Conversation
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>
This was referenced Oct 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Allow Proxy objects in the prototype chain of Bun globals, including contextified sandboxes,
DONT_CONTEXTIFYcontexts 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,runInThisContextand 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.tsfails 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 atf639b22c293604f1236378df951a64187ef06982; rebasing onto merged #108 produces headd43289606a024662829bcb44d761fbc23ada0ec6with 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.