Quilt backend: watch the substrate run while you play (5-opcode kernel, chain cells, Q toggle, witness export) - #1
Merged
Merged
Conversation
added 3 commits
September 22, 2026 16:56
…n cells, backend toggle (Q), witness export Fork addition (upstream game modules byte-identical; bridge wraps from outside, index.html +8 marked lines): - app/quilt/kernel.mjs — vendored minimal quilt kernel: BIND/LINK/ EFFECT/VIEW/TICK/FORGET, prev_hash chain (FNV-1a-64 UTF-8 bytes, genesis 0x0000000000000000), fleet canary verified, honest FORGET on trim, witness() export in kev harness JSONL shape (this toy is a witness-log producer for kev-substrate-competition's replay.py). - app/quilt/bridge.mjs — wraps City/EffectsManager/AgentManager from outside: buildings/agents BIND, dependencies+walks LINK, fires/ sparkles/rockets/status EFFECT, scene VIEW, aggregate TICK every 30th frame. - app/quilt/pane.js — the 'see the backend in production' toggle (Q or ◈ button): phosphor pane, live cell tail, opcode counters, coherence, chain head, witness.jsonl export. - tests/quilt.test.mjs — 10 tests, node --test, zero deps: canary byte law, genesis chaining, tamper->coherence drop, honest FORGET, witness field-for-field harness interop + replay-verify, wrapper fidelity (originals still run, order intact), tick cadence, creator-credit regression guard. - CI made real: npm ci -> npm install (no lockfile existed, ci failed by construction), lint no-op -> npm test.
…onstruction); matrix to node 22 only (20 deprecated on runners)
…n bash — pre-existing upstream failure, now a harmless placeholder)
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.
Fleet fork addition for the Cocapn ecosystem. The city gets a live quilt substrate: every building/agent BINDs, every dependency and walk LINKs, every fire/sparkle/rocket/status is an EFFECT, the scene is a VIEW, frames TICK — all as prev_hash-chained cells with the fleet canary. Press Q (or ◈) and a phosphor pane streams the backend while you play; export the witness JSONL and it replays in kev-substrate-competition's harness/replay.py.
Respect for the original: city.js/effects.js/agents.js/controls.js byte-identical; the bridge wraps from outside; index.html +8 marked lines; creator credit guarded by a regression test. Upstream files otherwise untouched. 10/10 node --test green; CI fixed to actually run tests (npm ci had no lockfile; lint step was a no-op).