Skip to content

Build octoscript-core against the ported makepad VM - #22

Merged
ymote merged 3 commits into
mainfrom
vm-unify/core-on-ported
Sep 13, 2026
Merged

ymote merged 3 commits into
mainfrom
vm-unify/core-on-ported

Conversation

@ymote

@ymote ymote commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

Replaces PR #21, which GitHub closed when its base branch was deleted after #20 merged. Same content, rebased on nothing: the branch already sits on top of #20's tip.

Switches octoscript-core and octoscript-capabilities from the vendored vendor/makepad VM to makepad-script from OctoSense-org/makepad at octoscript 1fdce27 (fork PR #1 merged), which carries every vendor patch. Runtime holds a ScriptVmHost<H, S> (the fork's host shape); seven capability downcasts go through as_any_mut(); the three tool-output sites use new_bounded_string_with, since the ported VM refuses the raw new_string_with under a heap cap. Two test expectations flipped with the reasons in the commit. vendor/makepad stays for one more PR.

Verified: cargo test --workspace --no-fail-fast 988 passed, 2 failed — the two profile.rs catalog-drift tests that fail on main regardless of VM.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JgSir4cQyaakzPju4h6smw

ymote and others added 3 commits September 13, 2026 15:13
Point octoscript-core and octoscript-capabilities at the ported makepad
`work` VM (branch vm-port/integration, a4347332b) instead of the vendored
copy under vendor/makepad. The vendor tree stays in place; the path is a
local checkout for the G3 gate run.

Host shape: the ported ScriptVm takes `host: &mut dyn ScriptHost`, so
Runtime now owns a `ScriptVmHost<H, S>` and the capability bindings
downcast through `as_any()` / `as_any_mut()`.

Tool output strings: the ported heap refuses the unrestricted
`ScriptVm::new_string_with` whenever an allocation budget or retained cap
is armed (it cannot preflight a raw `&mut String`). The three tool-output
sites in `install_tool_module` now build through the accounted
`heap.new_bounded_string_with`, the same path octoscript-core's string
natives already use.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JgSir4cQyaakzPju4h6smw
…ighted heap caps

The ported makepad-script (upstream #1139) starts a new statement at a `(` on a
new line, so the compatibility preflight now accepts `use mod.std.a\n(42)`
just as canonical lowering does. And its heap preflights every charge, so a
refused over-limit string never lands on the heap: the runtime is not left
above its cap, and the next evaluation runs instead of being refused until GC.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JgSir4cQyaakzPju4h6smw
Same tree as a434733 (fork PR #1 merged fast-forward-equivalent); one pin for the org.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JgSir4cQyaakzPju4h6smw
@ymote
ymote merged commit c0ec7fd into main Sep 13, 2026
4 of 8 checks passed
@ymote
ymote deleted the vm-unify/core-on-ported branch September 13, 2026 22:24
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