game: bounded artifacts, oracle audit, wasm parity, replay command (Slice 5 stage 4) - #40
Merged
Merged
Conversation
…lice 5 stage 4) ArtifactAssembly with per-block and whole-artifact digest checks, idempotent duplicates, restart on a changed manifest, step deadlines, one assembly per session, and the browser record mapping; the oracle audit that re-derives inner artifact ids from compact canonical bytes and runs Platonik's own receipt verification; wasm32 parity of the frozen session vectors; and the vhalla game replay subcommand that verifies a session bundle from a second receiver. Spike 2 and spike 6 numbers are recorded in the plan. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
0thernet
changed the base branch from
claude/witness-slice5-stage3-20260917
to
main
September 18, 2026 03:19
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.
Summary
Stacked on #39. Stage 4 of the Platonik session adapter plan; with it, stages 1 through 4 are landed and slice 5's stated result (Platonik runs through an optional Valhalla session adapter and a receiver independently verifies the result) is implemented and tested.
artifact:ArtifactAssemblyopened from a request and manifest naming the same inner artifact id; blocks accepted only at their offset with the listed digest and exact length; duplicates idempotent and hash-free; a changed manifest restarts and drops everything; the whole-artifact digest is checked against the id beforetake(); a monotone step deadline;ArtifactSlotsholds one assembly per session and a receiver-wide cap. The browser record mapping followsprototypes/browser-recordsexactly. 27 tests including three property schedules.oracle/audit(featureoracle): re-derives inner artifact ids from compact canonical bytes, refuses non-compact bytes and cross-kind audits, runs Platonik's ownverify_receiptfor receipts. Publisher-side and test-side only; the receiver never parses JSON.prototypes/game-wasm-parity: the frozen session vectors replay identically natively and under wasm32 (12.8 ms for the corpus); its wasm32 check joins CI.vhalla game replay <bundle>(featureexperimental-game): rebuilds a session bundle and replays every record through a fresh receiver from a second point of view; exit 0 only when every record verifies. Its test drives the binary on both committed vectors and a byte-flipped copy and joins the workspace test step.prototypes/game-artifact-sizes(spike 2): over 27 experiments the largest artifact is 126,655 bytes (1.5 % of the 8 MiB ceiling); the worst-case frame trace is 302,508 bytes in five blocks; peak retention is exactly 1.0 × the artifact; the widest manifest and opening fit one signed frame with 64 KB of margin.Spike 6
81 artifacts from six fixtures and 21 bridge-v1 cases: every experiment, result, and receipt id equals Platonik's own (
experiment_hash,result_hash,artifact_hash(&receipt)); 162 cross-kind and 54 non-compact audits refused; 8 MiB hashed in 20 ms optimized.Gates
cargo fmt --all -- --check,cargo clippy --workspace --all-targets --all-features --locked -- -D warnings,cargo test --workspace --all-targets --all-features --locked,cargo test --workspace --doc --all-features --locked, the newvhalla-cligame test, and the fmt, clippy, and tests of the three new prototypes pass locally;game-wasm-parity/verify.shpasses with the pinned wasm-bindgen; the vault check passes with the pre-existing advisory orphan.🤖 Generated with Claude Code