Replay and compatibility
This page is derived from the canonical developer-reference; its content has one source of truth.
Replay and tamper/version compatibility
Source: src/game/replay.ts; tests: src/game/replay.test.ts.
Replay v3 is a strict object containing version: 3, current engineVersion, canonical answers, validated config, integer seed 0–4,294,967,295, setup_… request hash, ledger of at most eight entries, and a replay_… contract hash. createReplay canonicalizes and validates; encodeReplay serializes validated replay data; decodeReplay validates the decoded object; playReplay runs the recorded ledger through the deterministic engine and returns replay/state/snapshot without inference. The optional interpreter parameter is intentionally unused.
Any malformed, tampered, unsupported, or semantically unreachable input is rejected (Invalid, tampered, or unsupported LifePot replay v3 or Invalid or unsupported LifePot replay). The contract hash is a compact FNV-1a integrity checksum, not a cryptographic signature or proof against a determined attacker. A future engine behavior change requires an engine version change and compatibility review; do not claim cross-version support unless explicitly implemented and tested.