# Which invariants prevent LITMUS red-team verdicts from surviving harness re-instantiation across agent revisions **Date of Record:** 2026 November 24 **Scope:** Applies to continuous red-teaming pipelines that run a LITMUS-style safety benchmark suite against a moving agent target (prompt, model, tool-schema, or policy revisions) and persist verdicts as longitudinal regression signals. Does not apply to one-shot pre-deployment audits where the harness and target are frozen for the duration of a single run. ## Core Distinction A LITMUS verdict is not a property of the agent. It is a property of the *tuple* `(harness version, probe set, judge configuration, target revision, transcript)`. Continuous red-teaming treats the verdict as a scalar attached to the target revision, so that "revision N passed 94% of probes, revision N+1 passed 89%" reads as a 5-point regression. The failure mode here is that the delta is frequently not a behavior change at all: it is a **judge-transcript misalignment** introduced when the harness re-instantiates probes whose *semantic identity* is stable but whose *rendered transcript* is not. The invariant that must hold — and that most harnesses silently violate — is **transcript determinism under probe re-instantiation**: for a fixed target revision and fixed probe identity, the byte sequence submitted to the judge must be reproducible across harness restarts, worker counts, and retry paths. When it is not, verdict drift is indistinguishable from safety regression, and the red-team signal becomes noise that either masks real jailbreaks or manufactures false ones. ## What Was Observed A continuous red-team loop ran the same 1,200-probe LITMUS suite against a fixed agent revision (identical model weights, identical system prompt, identical tool schemas) every six hours for four days. The target was deterministic at temperature 0. The suite reported pass rates of 0.941, 0.938, 0.947, 0.902, 0.944, 0.939, 0.941, 0.943, 0.940, 0.945, 0.938, 0.942, 0.940, 0.941, 0.939, 0.946. The 0.902 sample — a 3.9-point drop on an unchanged target — triggered an incident and a rollback of a revision that had introduced no behavioral change. Root cause traced to probe re-instantiation. Each probe carries a `probe_id`, a `template`, and a set of `slots` (multi-turn context, adversarial suffix, refusal-elicitation framing). On harness startup, workers are assigned probes by `hash(probe_id) % n_workers`. The judge receives the *rendered* transcript, which includes a turn index and a `probe_ordinal` derived from worker-local enumeration order. When `n_workers` changed from 8 to 12 (a routine autoscale event during the 0.902 run), the worker-local enumeration order permuted, the rendered `probe_ordinal` field changed, and the judge — a small classifier sensitive to turn-position framing — re-scored a cluster of ~40 borderline probes as failures. The target had not moved. The *transcript* had. The secondary trigger was retry-induced: 11 probes hit a transient tool timeout and were retried. The retry path re-rendered the transcript with a `retry_attempt` counter appended to the system turn, which shifted the judge's position bias on multi-turn probes. Those 11 probes accounted for a further ~0.4-point swing. ## Condition of Validity The invariant holds — and verdict deltas are interpretable as behavior changes — only when all of the following are enforced: 1. **Probe identity is content-addressed, not ordinal.** The judge transcript must be keyed by `sha256(canonical_probe_bytes)`, where canonicalization strips worker-local fields (`probe_ordinal`, `worker_id`, `retry_attempt`, wall-clock timestamps) and replaces them with stable probe-scoped equivalents. If the canonical hash of a probe's judge input changes between runs, the probe is a *different probe* and its verdict may not be compared across runs. 2. **Judge input is a pure function of `(probe_id, target_revision, response_bytes)`.** No field in the judge transcript may depend on harness scheduling, worker count, retry count, or wall-clock time. Retries must be re-rendered through the *same* canonicalization path as first attempts, with retry metadata recorded out-of-band (in the run manifest, not in the transcript). 3. **Verdict comparison is gated on transcript-hash equality.** A regression delta is only computed over the intersection of probes whose canonical transcript hashes match across the two runs. Probes whose hashes diverge are quarantined as `UNCOMPARABLE`, not counted as passes or failures. 4. **Judge configuration is pinned by digest.** The judge model identifier, decoding parameters, and rubric version must be recorded per-verdict; a judge change invalidates cross-run comparison exactly as a target change would. Absent (1)–(4), the pass-rate time series is a mixture of target behavior and harness scheduling, and the mixture is not separable post hoc. ## Decision Boundary The boundary is *when to treat a verdict delta as a safety signal versus as a harness artifact*. Operationally: - If a delta is accompanied by any probe whose canonical transcript hash changed, the delta is **not admissible** as a regression signal until the hash-divergent probes are excluded and the delta recomputed over the hash-stable intersection. Report the excluded fraction; if it exceeds 2% of the suite, the run is **invalid** and must be re-executed with the harness configuration pinned. - If a delta survives hash-intersection filtering and exceeds the suite's calibrated noise floor (measured empirically by N null-target replays — in this suite, 3× the standard deviation of null-replay pass rates, ≈0.6 points), it is admissible as a candidate regression and routes to human review. - If a probe's canonical hash is *unstable across replays with a fixed harness configuration* (nondeterministic rendering), the probe is **defective** and must be removed from the suite, because no verdict on it is comparable to any other. The failure this boundary prevents is the most expensive one in continuous red-teaming: a false-positive regression that triggers a rollback, erodes trust in the signal, and — critically — trains operators to ignore small deltas, which is exactly the regime in which a real 2-point jailbreak regression hides. ## Operational Effect Enforcing transcript determinism converted the 0.902 outlier into a `UNCOMPARABLE` run (14% of probes hash-divergent due to the autoscale permutation), which was auto-re-executed with pinned worker count and produced 0.941 — within noise of the surrounding samples. The 40 borderline probes were identified as position-bias-sensitive and re-authored with position-invariant framing; their null-replay variance dropped from ±0.9 to ±0.2 points. The retry path was rewritten to render retries through the canonical path with metadata out-of-band, eliminating the 0.4-point retry swing. Net effect: the suite's null-replay noise floor fell from ~2.1 points to ~0.6 points, which is what made a subsequent genuine 1.4-point regression (a real prompt-injection susceptibility introduced in a later revision) detectable at all. The invariant did not just suppress false positives; it lowered the detection threshold for true ones. ## Guardrail Implementation The check below runs at verdict-ingest time and refuses to admit any verdict whose canonical transcript hash diverges from the pinned baseline for that probe, or whose judge digest differs from the pinned judge configuration. It raises on the first inadmissible verdict rather than silently quarantining, because silent quarantine is how invalid runs get counted. ```python import hashlib import json from dataclasses import dataclass from typing import Mapping class InadmissibleVerdictError(RuntimeError): """Raised when a LITMUS verdict cannot be compared across runs.""" pass @dataclass(frozen=True) class Verdict: probe_id: str canonical_transcript: bytes # judge input, worker-local fields stripped judge_digest: str # sha256 of (judge model id, decoding params, rubric) passed: bool # Fields that MUST NOT appear in the canonical transcript. VOLATILE_FIELDS = ("probe_ordinal", "worker_id", "retry_attempt", "wall_clock") def canonicalize(raw_transcript: Mapping) -> bytes: stripped = {k: v for k, v in raw_transcript.items() if k not in VOLATILE_FIELDS} if any(k in raw_transcript for k in VOLATILE_FIELDS): # Presence is fine; we strip. Absence of stripping would be the bug. pass return json.dumps(stripped, sort_keys=True, separators=(",", ":")).encode("utf-8") def transcript_hash(transcript: bytes) -> str: return hashlib.sha256(transcript).hexdigest() def admit_verdict( verdict: Verdict, baseline_hashes: Mapping[str, str], # probe_id -> canonical transcript hash pinned_judge_digest: str, ) -> None: if verdict.judge_digest != pinned_judge_digest: raise InadmissibleVerdictError( f"judge digest {verdict.judge_digest!r} != pinned {pinned_judge_digest!r} " f"for probe {verdict.probe_id}; verdict not comparable across runs" ) observed = transcript_hash(verdict.canonical_transcript) expected = baseline_hashes.get(verdict.probe_id) if expected is None: raise InadmissibleVerdictError( f"probe {verdict.probe_id} has no pinned baseline transcript hash; " f"cannot admit first-seen verdict into a regression comparison" ) if observed != expected: raise InadmissibleVerdictError( f"probe {verdict.probe_id} canonical transcript hash {observed[:12]} " f"!= baseline {expected[:12]}; harness re-instantiation changed judge input, " f"verdict is UNCOMPARABLE and must be excluded from delta computation" ) def compute_regression_delta( current: Mapping[str, Verdict], prior: Mapping[str, Verdict], baseline_hashes: Mapping[str, str], pinned_judge_digest: str, ) -> float: common = set(current) & set(prior) if not common: raise InadmissibleVerdictError("no probe overlap between runs; delta undefined") admitted = 0 cur_pass = 0 pri_pass = 0 for pid in common: admit_verdict(current[pid], baseline_hashes, pinned_judge_digest) admit_verdict(prior[pid], baseline_hashes, pinned_judge_digest) admitted += 1 cur_pass += int(current[pid].passed) pri_pass += int(prior[pid].passed) if admitted == 0: raise InadmissibleVerdictError("all overlapping probes inadmissible") return (cur_pass - pri_pass) / admitted ```