pi-mono/packages/codemode/test
Mario Zechner 0fb1aee749 feat(codemode): deterministic runs that the host answers (sandbox.start)
For durable code mode: a host can rerun a script after a restart and get the
same calls with the same arguments. start() runs the script with a virtual
clock (startedAt, then each result's time, never backwards), randomness from a
seed, UTC, no WeakRef/FinalizationRegistry, and the run's own tools and
globals; every call goes to onCall with the VM's call id, and the host answers
with run.deliver(seq, now, id, outcome). The VM applies results strictly in
seq order whatever the transport does, reports its fingerprint (engine
versions, prelude hash, limits) before the script runs, the calls issued after
each result (onIdle), and the result it was processing when the script ended
(result.during). Rejections can carry properties for the script's Error.
execute() is unchanged.
2026-10-11 19:50:26 +00:00
..
fixtures fix(codemode): ignore Node --watch notifications from the worker 2026-10-10 19:13:19 +02:00
declarations.test.ts feat(coding-agent): codemode and MCP 2026-09-29 09:12:50 +02:00
deterministic.test.ts feat(codemode): deterministic runs that the host answers (sandbox.start) 2026-10-11 19:50:26 +00:00
portable.test.ts feat(codemode): run sandboxes on Cloudflare Workers via a remote Durable Object 2026-10-10 14:41:36 +02:00
sandbox.test.ts fix(codemode): ignore Node --watch notifications from the worker 2026-10-10 19:13:19 +02:00
source.test.ts feat(coding-agent): codemode and MCP 2026-09-29 09:12:50 +02:00