Repository navigation
Conversation
Move the script carrier from opencode-carrier (52337cb, psychoscript 0.1.3) to opencode-carrier-0.2 (aeba13aa): upstream dev e79e7ee, which is psychoscript 0.2.0 plus #202, with the carrier branches rebased onto it and no TypeScript mode. The dependency graph and the regress fork do not change. A Source has no typescript flag now, so a plugin's files go in through Source::new. A diagnostic no longer carries a separate stack: its message ends with the stack, as Node prints an uncaught error, so the report splits the headline from the frames. The heap cap no longer measures a run's heap at its first wait for the host; only Runtime::measure_heap measures at waits. It measures again once a run allocated a sixteenth of the last measurement, which for a plugin's small heap is nearly every call: turned on for every activation it cost G1 and G3 40 to 55% and G9's load 70%. So only idle_memory, the one reader of an idle activation's heap_bytes, turns it on.
There was a problem hiding this comment.
I found nothing that should block this. I couldn't run it here because this environment has no Rust toolchain, so I checked the client changes against psychoscript at aeba13aa by reading its source. Heap measurement at waits is now opt-in through measure_heap; idle_memory turns it on through the thread-local, which Activation::start reads on the same thread. Runs with a heap limit are still measured as memory grows and when the body returns, so a_plugin_runs_under_small_and_tight_caps should still pass without the flag. The engine ends its messages with a \n at … stack, which is what format_diagnostic now splits on. The lockfile changes only the psychoscript entry.
Public API: unchanged. The plugin contract stays the same; only the wording of plugin error messages changes, as described.
Issue for this PR
N/A (follow-up to #67374 and #67944: moves the script plugin carrier onto psychoscript 0.2)
Type of change
What does this PR do?
The native client's script plugins run on psychoscript, pinned by git to
anomalyco/psychoscript'sopencode-carrierbranch, an integration of our psychoscript changes on an older upstream. This moves the pin to the new integration branchopencode-carrier-0.2(aeba13aa): upstreamdevat psychoscript 0.2.0 plus #202, with our changes that aren't upstream yet rebased onto it (static linked JS modules, compile-time refusals, the generated globals.d.ts, budget-stop locations, the native-work, GC, crossing and regex bounds, and five speed fixes) and without the TypeScript mode, which #67944 stopped using.regressstill comes from the same fork.Client changes for the new engine: sources go in through
Source::new(no TypeScript field), the stack is read from the end of the message, the defaultlocalefeature replacesintl, and heap measurement at waits is turned on only foridle_memory(turning it on for every activation cost 46% more instructions). Plugin errors now read as the engine writes them, with file, line and a traceback. No new crates; nodeps-allow.txtordeny.tomlchange. No feature flag: the plugin contract is unchanged.How did you verify your code works?
check:plugin-types0 errors; the plugin, CLI and TUI script, loader, machine and twin tests; the dependency test.cargo fmt --check,clippy -D warnings,check:drift,cargo deny. The merge lane's gate and full suites (P-CLI, P-PTY, ACP, P-TUI, drift, machines, Windows check, cargo deny) passed on14c60591bf.Screenshots / recordings
N/A (dependency and carrier internals).
Checklist