Skip to content

game: bounded artifacts, oracle audit, wasm parity, replay command (Slice 5 stage 4) - #40

Merged
0thernet merged 3 commits into
mainfrom
claude/witness-slice5-stage4-20260917
Sep 18, 2026
Merged

0thernet merged 3 commits into
mainfrom
claude/witness-slice5-stage4-20260917

Conversation

@0thernet

Copy link
Copy Markdown
Member

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: ArtifactAssembly opened 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 before take(); a monotone step deadline; ArtifactSlots holds one assembly per session and a receiver-wide cap. The browser record mapping follows prototypes/browser-records exactly. 27 tests including three property schedules.
  • oracle/audit (feature oracle): re-derives inner artifact ids from compact canonical bytes, refuses non-compact bytes and cross-kind audits, runs Platonik's own verify_receipt for 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> (feature experimental-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 new vhalla-cli game test, and the fmt, clippy, and tests of the three new prototypes pass locally; game-wasm-parity/verify.sh passes with the pinned wasm-bindgen; the vault check passes with the pre-existing advisory orphan.

🤖 Generated with Claude Code

…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
0thernet changed the base branch from claude/witness-slice5-stage3-20260917 to main September 18, 2026 03:19
@0thernet
0thernet merged commit 737e31b into main Sep 18, 2026
13 of 14 checks passed
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