# Verifier Conformance Status

Snapshot of where each implementation stands against the canonical corpus. Updated after every divergence is opened or closed.

## Current state (2026-06-01, post-DIV-001 close)

| Fixture | Verdict | Rust canonical | Browser JS | TypeScript ref impl |
|---|---|:-:|:-:|:-:|
| `00_single_grant` | Valid | ✓ | ✓ | expected ✓ |
| `01_grant_then_revoke` | Valid | ✓ | ✓ | expected ✓ |
| `02_two_tier_chain` | Valid | ✓ | ✓ | expected ✓ |
| `03_orphan_grant` | ProvenanceBroken | ✓ | ✓ | expected ✓ |
| `04_policy_missing` | PolicyMissing | ✓ | expected ✓ | expected ✓ |
| `05_authority_conflict` | AuthorityConflict | ✓ | expected ✓ | expected ✓ |
| `06_open_challenge` | Valid | ✓ | ✓ (conforming) | ✓ (post-DIV-001) |
| `07_revoked_chain` | RevokedChain | ✓ | expected ✓ | expected ✓ |
| `08_revoke_without_prior_grant` | Incomplete | ✓ | expected ✓ | expected ✓ |

**Coverage:** all six verdict classes have a canonical fixture.

**Divergences open:** 0

**Divergences closed:** 1 (DIV-001 — TypeScript impl, closed 2026-06-01)

## How "expected ✓" rolls to "✓"

Fixtures marked `expected ✓` for browser JS / TS are validated by tracing the engine code against the input. They become `✓` after either:

1. The browser determinism test page (`/agent-zero/replay-engine/determinism-test.html`) loads the corpus and reports PASS for the fixture, OR
2. The TypeScript conformance runner (`/agent-zero/verifier/reference-impl-ts/test/conformance.test.ts`) exits zero with all fixtures green

Until both of those are run end-to-end against the full corpus, the table reads `expected ✓`.

## Rust conformance

Rust is the canonical reference. `✓` means the fixture was generated by Rust via:

- `scif-backend/examples/dump_replay_fixtures.rs` (fixtures 00–03)
- `scif-backend/examples/dump_replay_fixtures_04_07.rs` (fixtures 04–07)
- `scif-backend/examples/dump_replay_fixture_08.rs` (fixture 08)

Re-running these binaries against the corpus inputs produces byte-identical canonical output, by construction.

## Browser JS conformance

Browser JS lives at `/agent-zero/replay-engine/replay.js`. Conformance test runs via:

```
# Serve the repo root over HTTP, then:
open /agent-zero/replay-engine/determinism-test.html
```

The test page now loads:
1. Legacy `./determinism-fixtures.json` (fixtures 00–03, pre-corpus format)
2. `/agent-zero/verifier/corpus/manifest.json` → each fixture file (00–08)

Per-fixture, it asserts that `replayUntil()` produces a byte-identical `state_id` and matching `verdict` against the canonical Rust output (`expected_rust_canonical`).

## TypeScript conformance

TypeScript impl lives at `/agent-zero/verifier/reference-impl-ts/`. Conformance test runs via:

```
cd agent-zero/verifier/reference-impl-ts
npm install
npm run conformance
```

The runner walks the corpus, runs every fixture through the TS engine, and asserts the verdict + structural fields match each fixture's `expected_intent` block. Future iteration extends this to byte-compare against `expected_rust_canonical` directly.

## The line being held

> No known replay divergence ships into a customer or verifier surface.
>
> — Eric, 2026-06-01

Status: **held.** Zero open divergences. DIV-001 closed in the same session it was found.

## Cross-links

- Divergence log: `divergence-log.md`
- Corpus manifest: `corpus/manifest.json`
- Browser determinism test: `/agent-zero/replay-engine/determinism-test.html`
- TypeScript conformance runner: `reference-impl-ts/test/conformance.test.ts`
- Canonical Rust engine: `scif-backend/src/agent_zero/astate_replay.rs`
