/agent-zero/replay-engine/determinism-test

Browser Replay Determinism Test

Constitutional invariant: Browser Replay Must Equal Server Replay.

Given the same event log and the same query timestamp, the browser implementation must produce a bit-identical state_id to the Rust implementation on scif-backend. If divergence ever occurs, the browser loses and the server is canonical. Schema.

Result

Running…

What is being tested

Four fixtures generated by the Rust replay engine on scif-backend (src/agent_zero/astate_replay.rs) are loaded from determinism-fixtures.json. Each fixture is a tuple (events, t, tenant_id, root_principal) → expected ReplayResult. The browser engine runs H33Replay.replayUntil() on each input; the resulting state_id and verdict must match byte-for-byte. Any divergence is a constitutional violation — the test must fail loudly, the change must be reverted, and the discrepancy must be investigated before any feature ships.