Skip to content
MirrorFirm

What evaluation hooks should a mismatch environment expose for reset, traces and scoring?

Reset from named snapshots, log every tool call, compute a state diff and run deterministic predicates over the diff and trace, emitting one scored record per run.

Evaluation hooks for a mismatch environment work best when they read state and traces, not the agent's final message.

**Reset.** Each run starts from a named snapshot, loaded by snapshot_ref. A reset restores all tables, case status, counters and the clock. Seed any generated identifiers, such as adjustment numbers, so repeated runs of the same trajectory give identical state.

**Trace capture.** Log every tool call with timestamp, tool name, arguments, result code and the record IDs read or written. A JSONL trace file, one call per line, is simple to replay or diff.

**State diff.** After a run, compute a diff of the tables against the starting snapshot: rows inserted, updated and deleted, by table and key. Predicates run against this diff, for example 'no update to supplier_invoice.amount' or 'exactly one reversal row linked to the original posting'.

**Predicates.** Each acceptable or unacceptable end state in the task is a predicate ID with a deterministic implementation. It takes the diff, the trace and the policy table as input and returns pass or fail with a reason string.

**Scoring output.** Emit one record per run: case_id, run_id, predicate results, tool-call count, policy errors hit, and whether the case reached a valid end state. Keep partial results so you can separate diagnosis from action.

Clock handling is a common trap. If tolerances depend on dates, freeze the environment clock, or the same trajectory may score differently on different days.

Hooks that read state and traces, not the agent's final message, make mismatch scoring repeatable and auditable.

Audience:
Environment builders
Content type:
Integration
Buyer question:
How to evaluate it

Content release: r-a220eb6e099b243b

More on Reconciliation mismatch