You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Runtime Scripts: embed piccolo with fuel and staged effects #317
Category: enhancement Summary: Add the contained Lua execution host and its failure boundary.
Current behavior:
Core has hook registries but no Runtime Script interpreter. The completed piccolo spike proves the chosen engine can run in the Module target.
Desired behavior:
Embed a pinned piccolo version behind one Runtime Script host interface. Cache compiled code only. Every invocation gets a fresh environment and a hard fuel budget. Host operations accumulate as staged effects. A successful invocation commits them through core gameplay operations. A syntax, runtime, or fuel failure discards every staged effect, records a bounded diagnostic, and lets the core tick and other Runtime Scripts continue.
Key interfaces:
Runtime Script compiler cache
Fresh invocation environment
Fuel budget
Staged-effect result
Acceptance criteria:
Valid Lua compiles once and can run in multiple fresh invocations.
Globals written in one invocation are absent from the next.
An infinite loop exhausts fuel without stalling the tick.
Any failure discards all effects staged by that invocation.
A failed Runtime Script does not prevent later Runtime Scripts or core processing.
Diagnostics identify script identity, event, and failure kind without unbounded output.
Verifiably shipped by PR #324 (feat/317-runtime-script-host, merged 2026-08-24), module/src/runtime_script.rs on main. Acceptance criteria check out in code: compile cache keyed by BLAKE3 source hash, fresh per-invocation environment, FUEL_BUDGET_PER_INVOCATION = 200_000, staged effects committing only on success, run_event as the failure boundary (one bad script cannot stop the next or the core tick), re-entry refused rather than panicking (tested), and the fixed-stream getrandom backend keeping replicated Shards deterministic.
The deliberately deferred remainders are already recorded as handoff comments on their owning issues: production caller + cache lifecycle (#318), stdlib allowlist + guid representation (#319), TSTL-vs-piccolo generated-code shape (#320).
Activity
Mathih13 commentedon Aug 27, 2026
Verifiably shipped by PR #324 (
feat/317-runtime-script-host, merged 2026-08-24),module/src/runtime_script.rson main. Acceptance criteria check out in code: compile cache keyed by BLAKE3 source hash, fresh per-invocation environment,FUEL_BUDGET_PER_INVOCATION = 200_000, staged effects committing only on success,run_eventas the failure boundary (one bad script cannot stop the next or the core tick), re-entry refused rather than panicking (tested), and the fixed-stream getrandom backend keeping replicated Shards deterministic.The deliberately deferred remainders are already recorded as handoff comments on their owning issues: production caller + cache lifecycle (#318), stdlib allowlist + guid representation (#319), TSTL-vs-piccolo generated-code shape (#320).