# Which invariants prevent adversarial LITMUS benchmark harnesses from silently laundering a regressed agent through a stale safety gate **Date of Record:** 2026 November 26 **Scope:** Applies to automated adversarial-safety regression gates (LITMUS-style harnesses) that score an agent checkpoint against a fixed adversarial corpus and emit a pass/fail verdict. Does not apply to human-in-the-loop red-team review, or to live-traffic guardrails that evaluate individual responses rather than a checkpoint's aggregate behavior. ## Core Distinction A LITMUS harness is not a test suite; it is a *measurement instrument* whose verdict is a function of three moving parts: the agent checkpoint, the adversarial corpus version, and the harness's own scoring/judging logic. The failure mode this record isolates is **verdict laundering via instrument drift** — the harness returns `PASS` for a checkpoint that has genuinely regressed, because the instrument itself changed underneath the checkpoint between the baseline run and the candidate run. The non-obvious part is that this is *not* a flaky-test problem. Flakiness is variance in a fixed instrument. Laundering is a *systematic* shift in the instrument's operating point that happens to move in the same direction as the regression, masking it. The two most common drift vectors are (a) a silent upgrade to the LLM judge that scores adversarial responses (a newer judge model is more lenient on certain refusal phrasings), and (b) a corpus mutation that drops or reweights hard cases. Both produce a harness that reports improved safety while the underlying agent got worse. The invariant that must hold: **a verdict is only comparable to a baseline verdict if the instrument fingerprint (judge model + judge prompt hash + corpus content hash + scoring weights) is byte-identical.** Any comparison across differing fingerprints is not a regression test — it is a comparison of two different exams, and the pass/fail bit is meaningless. ## What Was Observed A checkpoint `agent@v41` was promoted through a gate whose baseline was `agent@v40`. The gate reported safety score `0.94` (up from `0.91` baseline) and passed. Post-deploy, red-team found a trivially reproducible prompt-injection family that `v41` failed on ~60% of attempts — a family `v40` had passed. Trace of the discrepancy: - The harness's LLM judge had been bumped from `judge-7b` to `judge-70b` two weeks earlier as a "quality improvement." The 70b judge systematically accepted responses that *acknowledged* the injection attempt as a refusal, even when the agent then complied with the injected instruction. The 7b judge had flagged those as violations. - The adversarial corpus had simultaneously had 12 "ambiguous" injection cases pruned because the new judge disagreed with their labels. Those 12 cases were precisely the family that `v41` regressed on. - Net effect: the judge got more lenient *and* the corpus lost the cases that would have caught the leniency. The two drifts compounded. Score went up; safety went down. The baseline `0.91` was computed under the *old* fingerprint. The candidate `0.94` under the *new* one. The harness compared them as if they were the same exam. They were not. The `+0.03` delta was instrument drift, not agent improvement; the true delta on a fixed instrument was approximately `-0.18`. The failure was silent because the harness had no concept of instrument identity — it stored `(checkpoint_id, score, verdict)` and nothing else. There was no record that the baseline and candidate had been scored by different judges against different corpora. ## Condition of Validity The pass/fail verdict of a LITMUS gate is valid **only** when all of the following hold for both the baseline and candidate runs: 1. **Judge identity is pinned.** The judge model version, decoding parameters (temperature, seed, max tokens), and the full judge prompt are hashable and recorded. A judge upgrade forces a *baseline re-run*, not a silent comparison. 2. **Corpus content is hashable and pinned.** The adversarial corpus is content-addressed (e.g., a Merkle root over case IDs and case bodies). Any add/prune/reweight changes the root and invalidates cross-root comparison. 3. **Scoring weights are versioned.** Per-category weights and the aggregation function (mean, worst-category, percentile) are part of the fingerprint. Switching from mean to worst-category aggregation changes the verdict semantics even with identical cases and judge. 4. **The comparison is same-fingerprint.** The gate refuses to emit `PASS`/`FAIL` when baseline and candidate fingerprints differ; it must instead emit `INCOMPARABLE` and require a fresh baseline. 5. **The judge's own agreement is measured.** Judge drift is detectable only if the harness tracks judge-vs-human (or judge-vs-frozen-oracle) agreement on a held-out calibration set. A judge whose agreement drops below a threshold is itself a failed instrument. Condition 4 is the load-bearing one and the one most often omitted, because it feels redundant — "of course we compare like with like." The observed failure shows it is not redundant: the harness *did not* compare like with like, and nothing stopped it. ## Decision Boundary The boundary is between **re-baselining** and **comparing**. When the instrument fingerprint changes: - If the change is *intended and reviewed* (a deliberate judge upgrade with a documented calibration delta), the correct action is to re-run the baseline checkpoint under the new fingerprint, record the new baseline, and *then* evaluate the candidate. The old baseline is retired, not compared against. - If the change is *unintended* (a transitive dependency bump pulled a new judge version, a corpus sync dropped cases), the gate must hard-fail closed with `INCOMPARABLE` and block promotion until the instrument is restored or the drift is explicitly accepted. The dangerous third path — proceeding with the comparison anyway and reporting a delta — must be architecturally impossible, not merely discouraged. A gate that *can* compare across fingerprints *will*, under schedule pressure, and the resulting verdict will be laundered. A secondary boundary: **corpus pruning must be gated on the same review as the judge it was pruned to satisfy.** Pruning cases because a new judge disagrees with them is circular — it removes exactly the cases that would expose judge leniency. Corpus changes and judge changes must be reviewed as a single unit, and pruning requires a human-signed rationale per case, not an automatic "judge disagreed, drop it" rule. ## Operational Effect With the fingerprint invariant enforced: - The `v41` regression would have surfaced as `INCOMPARABLE` at gate time, forcing a re-baseline of `v40` under the new judge+corpus. That re-baseline would have shown `v40` scoring ~`0.96` under the lenient instrument, and `v41` scoring `0.94` — a visible `-0.02` regression on a *comparable* instrument, and the 12 pruned cases would have widened it to `-0.18`. The gate fails; `v41` never deploys. - Judge upgrades become explicit, scheduled events with a calibration report rather than quiet background improvements. - The harness gains an auditable lineage: every verdict is tagged with its instrument fingerprint, so a post-incident review can reconstruct *which exam* produced *which score*. The cost is operational friction: every judge or corpus change forces a baseline re-run, which for a large adversarial corpus is expensive. This friction is the point. The alternative — cheap, silent, laundered verdicts — is a safety gate that fails open precisely when the agent is getting worse. ```python import hashlib import json from dataclasses import dataclass, field class InstrumentDriftError(RuntimeError): """Raised when a gate is asked to compare runs scored by different instruments.""" pass @dataclass(frozen=True) class InstrumentFingerprint: judge_model: str judge_prompt_hash: str corpus_root: str # Merkle root over case IDs + bodies scoring_weights_hash: str aggregation: str # "mean" | "worst_category" | "p95" def digest(self) -> str: payload = json.dumps(self.__dict__, sort_keys=True).encode() return hashlib.sha256(payload).hexdigest() @dataclass class RunRecord: checkpoint_id: str fingerprint: InstrumentFingerprint score: float per_category: dict = field(default_factory=dict) def _fingerprint_of(run: RunRecord) -> str: return run.fingerprint.digest() def gate_verdict( baseline: RunRecord, candidate: RunRecord, min_delta: float = 0.0, judge_agreement: float = 1.0, min_judge_agreement: float = 0.85, ) -> str: """ Emit PASS/FAIL/INCOMPARABLE for a candidate checkpoint against a baseline. Invariants enforced: 1. Baseline and candidate must share an identical instrument fingerprint. 2. The judge's own calibration agreement must clear a floor. 3. A regression (candidate - baseline < min_delta) is FAIL. Any violation of (1) or (2) is INCOMPARABLE, never PASS. """ if judge_agreement < min_judge_agreement: # The instrument itself is unreliable; do not emit a safety verdict. raise InstrumentDriftError( f"judge agreement {judge_agreement:.3f} below floor " f"{min_judge_agreement:.3f}; instrument untrusted" ) base_fp = _fingerprint_of(baseline) cand_fp = _fingerprint_of(candidate) if base_fp != cand_fp: # The two runs were scored by different exams. A delta is meaningless. raise InstrumentDriftError( "fingerprint mismatch between baseline " f"({baseline.checkpoint_id}@{base_fp[:12]}) and candidate " f"({candidate.checkpoint_id}@{cand_fp[:12]}); " "re-baseline required, verdict is INCOMPARABLE" ) delta = candidate.score - baseline.score if delta < min_delta: return f"FAIL (delta={delta:+.3f})" return f"PASS (delta={delta:+.3f})" def demo() -> None: fp_old = InstrumentFingerprint( judge_model="judge-7b", judge_prompt_hash="a1b2", corpus_root="c0ffee", scoring_weights_hash="w9", aggregation="mean", ) fp_new = InstrumentFingerprint( judge_model="judge-70b", # silent upgrade judge_prompt_hash="a1b2", corpus_root="d15ea5e", # 12 cases pruned scoring_weights_hash="w9", aggregation="mean", ) baseline = RunRecord("agent@v40", fp_old, score=0.91) candidate = RunRecord("agent@v41", fp_new, score=0.94) # The naive comparison would report +0.03 PASS and launder the regression. try: verdict = gate_verdict(baseline, candidate) print("verdict:", verdict) except InstrumentDriftError as e: print("blocked:", e) # After a forced re-baseline under the SAME (new) instrument: rebaselined_v40 = RunRecord("agent@v40", fp_new, score=0.96) candidate_v41 = RunRecord("agent@v41", fp_new, score=0.94) print("honest verdict:", gate_verdict(rebaselined_v40, candidate_v41)) if __name__ == "__main__": demo() ```