Skip to content

feat(packages): packages build compiles a Package's Runtime Scripts - #55

Merged
Mathih13 merged 6 commits into
mainfrom
feat/320-packages-build-scripts
Sep 3, 2026
Merged

Mathih13 merged 6 commits into
mainfrom
feat/320-packages-build-scripts

Conversation

@Mathih13

@Mathih13 Mathih13 commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

packages build produced Package Deltas only. A Package could carry Runtime Script sources under scripts/, but nothing compiled them into a Script Artifact, and packages check had 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, one bun run subprocess 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 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: 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 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 check still parses and traces it, and a checkout shipping only those artifacts needs neither Bun nor a Module wasm build.

Trust review

packages add now 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.

Mathih13 and others added 6 commits September 3, 2026 17:21
`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
Mathih13 force-pushed the feat/320-packages-build-scripts branch from bc5b35b to e597029 Compare September 3, 2026 15:30
@Mathih13
Mathih13 merged commit 61f198a into main Sep 3, 2026
@Mathih13
Mathih13 deleted the feat/320-packages-build-scripts branch September 3, 2026 15:30
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