From an app directory to a reproducible guest release
Research snapshot of November 23, 2026. Code and issue observations refer to the cited revisions and collection times.
A developer can already scaffold a Roc world, compile it with a pinned platform, and replay a fixture against a candidate in a disposable local world. A release needs three further answers. Which immutable guest will a recipient run? Which state, effects and permissions can move into that guest? What can an old or disconnected host safely keep using? This chapter derives proposed release gates from the current implementation. The code baseline is 7310a957. The commands below are source-checked examples. No compiler, runtime, release or hardware execution was performed for this chapter.
A small app with an independent expected result
With the ID CLI’s sandbox feature, the pinned Roc toolchain and the built world platform available, work in the package directory of an authorized worktree. The scaffold writes source and a build script next to the shared platform. The separate checked-in counter gives a reference whose expected state is visible by direct inspection. Command definitions · Counter source · Platform build
id world doctor --json
id world new examples/hello --name hello
id world dev examples/roc-counter --seed 1 --input inc --input ' inc ' --input ignored
The counter starts at zero, trims each input, increments only on inc, and projects the final record object {"count":2}. Compare records in a replay fixture. The dev view report alone does not establish that projection. Use the same trace for the scaffold only after giving its model these semantics. A developer can pass --fixture and a bounded --fuzz declaration to the existing dev command. Cross-module fixture replay is intentional in developer mode and reports that the module changed. A mismatch blocks candidate launch. Ordinary provenance verification and historical replay retain their original module identity checks. Dev harness · Counter README
| Stage | Existing producer | Proposed promotion evidence and failure disposition |
|---|---|---|
| Inspect source | App discovery validates one app folder, isolates per-folder failures and requires either a source path or a module-hash spelling. A source discovery check can establish existence without opening or compiling the source. | Resolve the actual bytes under the compiler’s existing intake rules and store their complete digest. A discoverable folder or accepted short hash spelling is insufficient by itself for immutable publication. Record missing inputs as author diagnostics. Folder manifest · Compiler |
| Resolve imports | Libraries resolve registry, upload and URL inputs to manifest hashes. The resolver traverses transitive requirements and the import gate compares declared/discovered/world-requested authority. | Persist the resolved dependency digest closure and allowed capability set. A familiar library version resolving to different bytes is a new candidate. Recompute permissions before promotion. Preserve the reason and import path on denial. Resolution · Import gate |
| Compile and admit | Compiler records the source closure, compiler and platform hashes. The sandbox rejects imports and validates required/allowed exports, then applies execution limits. | Record the resulting module digest, dialect, adapter revision and runtime profile alongside existing provenance. A missing required export, incompatible mandatory version, extra import or incomplete optional projection pair produces a diagnostic before activation. Preserve the legacy path described below. Compiler · Sandbox · ABI |
| Exercise | Existing dev loop replays fixtures, fuzzes declared invariants from a seed and probes migration while hot-reloading. | Compare semantic records, deterministic wants/receipt correlation and agreed snapshot behavior independently. Cross-host rendering can vary while the same authoritative records and granted effects coincide. Dev harness · Upgrade helper |
| Activate | The CLI distinguishes installing a module, downloading a hash-verified current module, diffing a world manifest, and applying that manifest. | Resolve a signed release reference to exact content, stage it locally, show changed grants, then make a durable activation decision. Record a known-good predecessor and the oldest readable state format. An incomplete install may resume from immutable bytes without becoming active. World CLI |
| Recover | The upgrade helper probes state migration, round-trips its encoding and keeps the original running state in the helper on failure. The dev harness calls this helper. | Exercise process death across staging, activation, journal commit and acknowledgment in each actual install path. An old version can read the latest state only if a tested backward reader or reversible migration exists. Otherwise retain the last consistent checkpoint and replay a compatible journal explicitly, or postpone activation. Upgrade helper · Dev harness |
Version the right things
The current unpacked folder parser intentionally accepts any nonblank app version. It accepts a 1–64 hex digit module reference, and checks that program.source exists without executing through it. A semver-only change to this parser would reject legitimate existing folders. A release channel can require complete immutable references for publication while legacy folders continue to load. The human-readable name and version serve selection and display. Content identity is the resolved digest. The checked-in tic-tac-toe folder demonstrates a source-based app; its app.toml alone supplies neither a release signature nor proof of fixture results. Manifest dispositions · Tic-tac-toe manifest
| Independently versioned surface | Proposed rule |
|---|---|
| Registry name and display version | Accept pre-existing opaque versions. For a channel advertising semantic-version selection, parse and compare its normalized versions under a declared scheme. For offline install, store the selected full digest. Local policy decides whether that publisher can advance that channel. |
| Source and SDK | Pin compiler bytes, source dialect, generated host adapter, SDK/platform tree, build flags and source closure. A hosted function library upgrade can change required capabilities while keeping the caller’s notation intact. Store the resolved import closure and exercise a refusal before granting a change. |
| Guest ABI and optional behavior | Keep the v1 adapter’s calling conventions, shared output buffer and snapshot/restore pairing. Older modules may omit the version getter. Current sandbox admits the getter and has fixtures confirming checked-in Roc examples report one; the ABI documents that its return value is not used for negotiation. For a future semantic major, use explicit admission, a recorded legacy profile for absent getters, and an unsupported-version diagnosis before any guest state change. |
| Persistent model and records | Record the snapshot envelope format and guest schema independently of the ABI. Include old-format bytes, a known transition trace and newly admitted input in fixtures. Pure migrations must be repeatable. Retain both the old and candidate programs during preflight. |
| Metering and capability vocabulary | Give a charge schedule and deterministic runtime settings their own profile identifiers. Identical business records after a compiler upgrade do not imply identical instruction charges. An application using optional effects needs a named refusal or fallback path on every advertised host. |
The JVM’s class-file major/minor and constant-pool typing are historical precedents for rejecting unsupported object formats at load time. WebAssembly WIT models typed imports, exports, worlds and resource handles. WIT could generate host documentation and interface fixtures for an experimental bridge. ID’s v1 core Wasm surface has a no-import policy and explicit linear-memory ownership, while the Roc adapter mediates compiler-specific entry points. Substituting a Component Model runtime would require an adapter, cost accounting, compatibility fixtures and target support. The compiler pin can evolve independently through that seam. JVM class format · WIT · Roc platform and adapter · ABI
Determinism and numerical work
Replaying the same signed events should answer two separate questions. Did the same program derive the same content? Did it remain eligible under the same resource policy? Wasmtime’s determinism guide identifies imports, NaN payloads, relaxed SIMD, resource growth and interruption as independent sources of variation. The inspected ID constructor sets fuel, stack, memory64/multiple-memory restrictions and enforces zero imports. The inspected source pins Wasmtime 49.0.6 with selected features. These facts alone do not establish how every effective engine default, target build and execution path handles floating-point bits or resource exhaustion. Inspect the pinned Wasmtime release’s feature configuration before interpreting a newer upstream manual as the installed behavior. Deterministic execution · ID’s engine construction · Pinned dependency
| Output class | Proposed semantics | Conformance vector |
|---|---|---|
| Authoritative integer simulation | Specify width, overflow and division rounding for each shared domain. For fixed-step simulations record input order, timestep and seed in replayable state. | Counter and bounded motion with negative inputs, boundary arithmetic and one rejected input return the same record digest on designated runtimes. |
| Authoritative floating-point state | First inventory reachable Wasm operators and actual configuration. Declare canonicalization for observable NaN payloads, a signed-zero policy where relevant, SIMD admission and bounds on allocation; or constrain authoritative payloads to a canonical integer/fixed-point representation. Treat existing worlds under their recorded profile. | Use tiny benign numeric fixtures and compare canonical output bytes across x86-64 and ARM64. Distinguish comparison tolerance for a display from the byte equality required for hashing. Handle resource exhaustion as a classified result with a defined state transition. |
| Host-side decomposition, vector search or learned model | Keep heavy kernels in an explicitly requested capability. Specify model/algorithm revision, shape and accepted input bounds. When the result affects state, journal the accepted provider output with its provenance or a reference retained under policy. | Replay the logged output with the provider unavailable and assert identical records and zero live provider calls. A rebuilt advisory index can use a numeric tolerance, a model revision and retrieval-quality evaluation. |
| Resource and frame accounting | Fix the module bytes, engine/profile, input and cost schedule for a fuel regression. Hardware elapsed time and native worker watchdog evictions are independently observed. | A historical input can replay under its original pinned profile. A new budget and a newly compiled equivalent guest get separately reported charges. Preserve scale-chain holds. |
Lessons from Boswell’s available experiments
The author’s index contains eight linked posts at retrieval. The 2025 multi-entrypoint article isolates generated glue between an interpreter and a host expecting several entry symbols. The raylib Action-State and physics articles demonstrate distinct model/update/render paths, and the basic-cli editor exposes selection, editing, undo and save through terminal input. The three htmx installments cover initial integration, events and a data-table app with route protection and validation. The 2026 Android post describes adapting a browser-oriented signal engine using Zig JNI and Kotlin, and demonstrates Todos in the author’s emulator. That gives ID concrete adapter targets. None of those posts establishes equivalent ID attenuation, fuel, durable snapshots or hardware deployment. Direct access to the supplied Reddit short link in this pass returned DisabledError. The staged Roc chapter records a prior redirect to Roclet: reactive notebooks in Roc and separately identifies Boswell’s Android discussion. A live Roclet project offers a distinct fixture for dependency invalidation and reproducible cell evaluation. Post index · Multi-entrypoint · GUI · Physics · TUI · htmx I · II · III · Android
Keep the pure world and host interop boundary separate. Apply a single ordered semantic-input trace to Linux and Android adapters. Compare records, accepted effects and restored state. Independently verify IME composition/commit, background/resume and accessibility actions on the advertised platform. A reactive view can recompute repeatedly; it must never reinterpret an old wants projection as a new irreversible operation. The accepted capability result enters through the host event path, and a resumed activity agrees with the same correlated pending request. An emulator establishes an emulator outcome. A separate hardware receipt would establish a device result. Existing world semantics · Android experiment
Publisher trust and the failure path
Adopt the division in The Update Framework between trusted metadata for selecting versions and target verification for downloaded bytes. Its timestamp, snapshot, targets and root roles solve distinct problems. Define which role an ID publisher delegates, the scope of a channel, and which signed metadata was last accepted. An ID publisher could host those small records on any peer and deliver packages over the existing content-addressed channel. A bootstrap trust anchor or an explicit local pin is still required. A remote registry and a central time server are optional participants. With an uncertain clock or stale metadata, distinguish launching the installed verified release under its existing policy from learning that a new release is authorized. Keep update channels and pinned installs available locally. TUF specification · ID library identity
A deliberate rollback uses a newly authorized channel decision that names the older verified digest and the compatible checkpoint. An old signed channel announcement alone cannot supersede newer accepted metadata. Provenance ties output to declared inputs and builder, while permission and migration checks remain installation decisions. Signatures by a publisher do not certify that app behavior matches its description. TUF · SLSA provenance
Negative release walkthrough. Publisher v2 retains the pretty version string, adds a dependency that requests outbound network access, and changes snapshot semantics. Resolve the dependency closure and record the changed digest. Reject the candidate if its import closure violates the app declaration. If the declaration is updated to request networking, present the expansion to the local grant authority. Run the old-state migration on a copy. Refuse promotion on a failed round-trip or changed fixture record, even if the publisher and signature are valid. If every check passes, persist the state transition and activation decision before advertising the new module. Crash-recovery fixtures must allow either an old consistent program/state pair or the complete new pair. A previous permission denial and settled effect correlation cannot disappear on fallback. Library gate · Capability diff · Upgrade
Embedding ID without making every crate a permanent API
Current root id exposes historical modules and feature-gated reexports. For example, id::world_caps is under world, while id::sandbox is gated by sandbox. A Rust integration should demonstrate at least one real external-style consumer built against the documented root path, with only its advertised features, calling the same verifier the binary uses. An initial consumer could enumerate id::world_caps::default_ceiling_names() without starting a node. Independently, a minimal capability-aware execution embedding can import id::sandbox with sandbox, compile a benign fixture under explicit limits, and test expected refusal. Separate SemVer changes for an exported Rust API from protocol and guest ABI revisions. Retain feature combinations old callers use; cargo’s guidance identifies removed features, changed signatures and public type changes as possible breaking changes. Root facade · Feature wiring · Catalog API · Cargo compatibility
The currency registry has a direct root dependency and actual calls from reconciliation and the currency gateway. The semantic renderer has five implemented compiler stages, public entry points and its own fixtures. Across the Cargo manifests in the surveyed checkout, its crate name appears as a workspace entry and package definition, with no downstream dependency edge. A sensible first external consumer is a package preview/validation tool that calls parse/validate and one lowerer on known fixture input. Land that consumer only if the normal app workflow needs semantic markup. The current screen-v1 and world view protocols remain independently supported. Classify library consumers, test-only consumers, internal examples and public support commitments separately in the crate map. Currency consumer · Renderer · Architecture
Routed slices
| Sequence | Owning work and evidence required |
|---|---|
| 1. Developer provenance | Extend the existing #5541 dev contract and #5956 import design as warranted. Inspect existing build provenance and capture missing profile fields only. Golden hello, stale pin and refused import are independent oracles. |
| 2. ABI and runtime profile | Route via #5955 and concrete sandbox owner after the live claim check. Document exact effective engine settings for the pinned versions, legacy absent getter, future mandatory version and numeric output. Compare equivalent artifacts on Linux first. A suspected numeric divergence requires observation before filing a defect as established. |
| 3. Upgrade and distribution | Use #1066 migration semantics and #12921 capability change baseline. Trace named-world install, world apply and dev hot reload separately. Keep target-specific release metadata with #12819 and #6297. A proposed app release manifest is distinct from a native installer’s release tag. |
| 4. Portable author acceptance | Feed same-record and refusal vectors into #12657 and the existing Android work; use #7918 rendering semantics for a real semantic-markup consumer. Keep #1374 with its current claimant. |
| 5. Rust library integration | First inventory the root module/feature that each consumer actually requires. Demonstrate one isolated consumer, existing callers, expected public errors and MSRV in the architecture chapter. Only then propose additional facade exports or independent crate publication. Architecture · Root Cargo |