/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.

Where this fits in Agent-008

The verdict and authority-state_id reconstructed here are the governance decision that Agent-008 made: Agent-008 governs the AI-agent decision under attested authority, and this harness proves the replay of that governance state is deterministic across implementations. Reconstructing and re-checking a governance verdict is distinct from rendering an independent verdict on an artifact (that is Verification), from monitoring governance over time (HATS), from scoring maturity (HICS), and from producing the portable 74-byte primitive (H33-74). This page runs a real test against fixtures at load time — the pass/fail result above is computed live, not scripted.