Repository navigation
feat(packages): packages build compiles a Package's Runtime Scripts - #55
Merged
Merged
Conversation
This was referenced Sep 3, 2026
`packages build` produced Package Deltas only. A Package could carry Runtime Script sources, but nothing compiled them, and `packages check` had no way to tell whether a committed Script Artifact was still current. The build gains two steps. Every enabled Package with a `scripts/` folder compiles its Runtime Scripts into one Script Artifact, one `bun run` subprocess per Package, in folder-name order and fail-fast. The builder is handed the Module's Event Binding catalogue, read from `lyracore-delta-check --print-events`, so a mistyped `@event` fails with the file that holds it; the catalogue is never copied into the toolchain, because the Module owns it and a copy would drift. `lyracore-delta-check` then traces both artifact kinds in one invocation. A Claim Conflict and a Runtime Script collision are both between Packages, so they are found the same way. Each artifact records its own Build Identity. A Script Artifact's inputs are its `scripts/` sources, the Runtime Script Toolchain and the Bun pin: it reads no Base Snapshot, imports no authoring library, and never sees the Module typings. `packages check` verifies both, and a checkout that ships only Runtime Scripts is checked without building the module wasm at all. The trust review now names a candidate's Runtime Script sources. That Lua runs on the realm once the Package is built, so reviewing it as "none detected" would have understated what an install adds. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Mathih13
force-pushed
the
feat/320-packages-build-scripts
branch
from
September 3, 2026 15:30
bc5b35b to
e597029
Compare
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.
packages buildproduced Package Deltas only. A Package could carry Runtime Script sources underscripts/, but nothing compiled them into a Script Artifact, andpackages checkhad no way to tell whether a committed one was still current.The build
Two steps join the order. Every enabled Package with a
scripts/folder compiles its Runtime Scripts into one Script Artifact, onebun runsubprocess per Package, in folder-name order and fail-fast, exactly like the Datascript step beside it. The builder is handed the Module's Event Binding catalogue, read fromlyracore-delta-check --print-events, so a mistyped@eventfails with the file that holds it. The catalogue is never copied into the toolchain: the Module owns it, and a copy would drift.lyracore-delta-checkthen traces both artifact kinds in one invocation. A Claim Conflict and a Runtime Script collision are both between Packages, so one run finds both.A Package with Runtime Scripts and no Datascript now builds. The Base Snapshot check is skipped for it, because a Runtime Script reads no base data.
Build Identity
Package Deltas and source-built Script Artifacts each record a Build Identity sidecar. A source-built Script Artifact records its
scripts/sources, the Runtime Script Toolchain and the Bun pin. It reads no Base Snapshot, imports no authoring library, and never sees the Module schema typings, so recording those would report drift that changes nothing about the Lua. A source-free prebuilt Script Artifact has no local author inputs or sidecar.packages checkstill parses and traces it, and a checkout shipping only those artifacts needs neither Bun nor a Module wasm build.Trust review
packages addnow names a candidate's Runtime Script sources. That Lua runs on the realm once the Package is built, so reporting "none detected" would have understated what an install adds. Datascripts keep their explicit "none detected" row: they live outside any Package folder, so a candidate cannot carry one.The core half is LyraCoreProject/LyraCore#402, which adds the toolchain this command drives.
Implemented by Claude (model claude-opus-5) via Claude Code subagent.