# Practical live-world product demonstrations

The product target is eight understandable short clips from the real engine,
with readable framing and a shared daylight presentation. The suite uses a real
local Edge Worker, an authoritative native server, typed ABI2 Luau commands,
prepared immutable Packages and normal game clients. It does not replace the
server with an animation or recorded command mock.

| Scenario | Visible story | Executable acceptance |
| --- | --- | --- |
| Emergency camp | A connected modular camp appears from layout constraints | Native layout compiler; independent footprint clearance; eight layout nodes plus accessories; two client replicas |
| Bridge repair | A modular bridge repairs an excavated crossing | Authoritative brushes; native collider installations; a normally controlled physical vehicle crosses within the deck bounds and settles on the far side |
| Convoy supply | Two driving vehicles gain two new vehicle types | Same original instance IDs/definitions; four normal drivers travel more than 30 m; actual publication during driving |
| Rewilding | Twelve saplings grow into a planted grove | Server-owned tree growth reaches one; two replicas and native footage |
| Live expansion | A small base receives a new expansion and more housing | Stable core Package; two versions of a separate expansion; previous instances keep their transforms |
| Terrain training | Raised cover and excavated craters reshape the site | Authoritative brush stream; fresh ground collider acknowledgements; matching terrain on both native clients |
| Coauthor district | Two authors build different parts of one district | Same-generation candidates; one CAS conflict; a new immutable request rebases and both plans finish |
| Durable world | The server restarts and restores the built place | Hash-verified committed world checkpoint contains every entity; new epoch; exact IDs/transforms; fresh clients |

Recipes and recordings: `scripts/authoring/showcase/{kit,scenarios,run,video}.mjs`.
Original scene geometry: `tools/create_showcase_assets.py`.
The suite launcher now uses `recording-edge.mjs`, which bundles the repository's
actual Worker into local workerd/Miniflare with the configured D1, R2, Queues
and Durable Object bindings. It removes Wrangler's live-reload proxy, not the
Worker, lease, publication or storage implementation. The bundle/config hashes
are saved in `host/edge-runtime-identity.json`. Earlier recordings used the
ordinary Wrangler development launcher; their successful evidence is retained.

```powershell
$env:CARGO_TARGET_DIR='E:/PajamaBuilds/practical-scenarios-20260924'
cargo build -p pajama-server --bin pajama-package --bin pajama-server -p pajama-client --bin pajama-client --features pajama-client/catalog-v2-process-e2e,pajama-client/retained-presentation-wire-v1
node scripts/authoring/showcase/run.mjs --scenario emergency-camp --out target/new-camp-run --capture-root E:/PajamaCaptures/new-camp-run --bins E:/PajamaBuilds/practical-scenarios-20260924/debug
```

Each output directory must be new. `--headless` checks gameplay using protocol
clients without producing a video. A full recording has a main 60 Hz native
camera and a separate 15 Hz native witness. Windows open on the side monitors.
`proof.json` records authoritative instances, publication identities, ordinary
driver observations, terrain and source digests. `video-proof.json` records the
measured frame cadence. MP4s follow actual capture timestamps: missing frames
hold their previous image, and playback never accelerates to hide a gap.

Recovery is two independently validated native sequences, separated by an
explicit restart card. Waiting between them is omitted. Recording one temporal
analysis sequence across authority namespaces is deliberately rejected by the
client, so that boundary is preserved. The first sequence transfers all GPU
readbacks to its offline writer before the server is stopped; the recovered
epoch receives new native clients and a separate sequence. Both offline writers
must finish successfully before editing.

`record-suite.mjs` defaults to fully sequential runs. `--max-jobs 2` or `3`
may overlap older offline analysis, but never two live worlds; validate disk
contention before enabling it. `gallery.mjs` collects eight verified runs into a portable
video gallery; its optional third argument maps scenario IDs to successful
fresh reruns. Failed evidence is retained separately. Gallery admission checks
original instance preservation, at least 59 actual main-camera frames/second
and no captured main-camera gap above 100 ms. The MP4 cadence is 60 fps.

## Scope and architecture findings

The recipes are deterministic authored behaviors and scripted normal-input
drivers. They are applications of agent-facing engine infrastructure, not new
live Jev model-inference sessions. Authoring scripts do not receive an alternate
world-mutation path. Publication still traverses immutable preparation, content
admission, generation CAS, a composite checkpoint and tick activation.
The sequence helper preserves a completed-command count across append-only
plans. It is intentionally not a generic state migration facility for reordered
or deleted commands. The building assets have solid exterior colliders; this
suite does not claim walkable interiors or an interactive gate.
Vehicle stopping feedback uses signed longitudinal velocity. A visual review
found that speed magnitude made braking continue into reverse; the bridge
acceptance now also checks that the vehicle settles after crossing.

Layout uses the implemented finite grid constraint solver (adjacency,
connectivity, separation and exclusions). This is not a claim of a universal
constraint language or complete urban planning simulation. Tree growth is a
durable authored progression, not an ecological simulation.

An experiment publishing a third Package revision while old imported GLB
instances remained alive was rejected correctly: exact presentation sources
would leave the active/previous catalog union. Adding an unrelated Package
after that replacement has the same boundary. The suite preserves this guard.
Its expansion example separates an unchanged core from a versioned expansion;
terrain behavior updates are separate from long-lived decorative assets.
General live creation still needs lifetime-managed retained content closures,
explicit retention budgets and a tested garbage collection/recovery contract.
It must not be implemented by falling back to differently versioned materials.

Visible state can lead the periodic five-second checkpoint. The recovery
harness now reads the actual fenced checkpoint head, verifies immutable blob
hashes/lengths and confirms the scene's IDs and positions before stopping the
server. A durable-read barrier should become an explicit supported authoring
observation before agents can safely plan around crash persistence.

Local high-rate capture exposed two tooling issues: fixed accepted dimensions
silently fell back to a larger monitor resolution, and raw staging competed
with Edge storage. Explicit dimensions are now validated. Optional lossless
PNG-compressed PJFRAME2 staging keeps real pixels, timestamps, limits, sealing,
analysis and failure semantics; the original PJFRAME1 reader remains supported.
After GPU mappings are harvested, the recorder polls the offline writer without
continuing to render the world. These recording changes do not relax any world
authority or publication rule.

Follow-on architecture work should prioritize retained content lifetimes,
durable observation barriers, explicit agent session/capability contracts,
rebase-aware authoring transactions and constraint solver budgets/diagnostics.
Each should have failure/recovery evidence before being advertised as general
MMO-scale support.
