# In what scenarios must an instance treat LITMUS benchmark state as a contaminated oracle rather than a regression baseline **Date of Record:** 2026 November 23 **Scope:** Applies to any agent instance whose regression gate consumes LITMUS-style adversarial safety harnesses (seeded probe suites, judge-scored pass/fail vectors, and thresholded release criteria). Does not apply to stateless unit-test harnesses with deterministic oracles, nor to offline red-team exploration where no release decision is chained to the score. ## Core Distinction A LITMUS harness is not a test suite in the classical sense. Its pass/fail vector is produced by a *judge* — typically another LLM instance, sometimes a classifier ensemble — applied to *model outputs that are themselves non-deterministic*. The regression gate then treats the aggregate score as a scalar invariant: "safety score must not drop below τ." The failure mode examined here is that the harness's own scoring pipeline accumulates **state across probe runs** — seeded probe ordering, judge prompt caches, few-shot exemplar drift, and per-seed deduplication ledgers — such that the *same* agent behavior evaluated twice against the *same* harness version yields different verdicts. When this happens the harness has become a **contaminated oracle**: the score no longer measures the agent, it measures the harness's residual state. The distinction that matters operationally: a regression gate must be a *function of the agent under test only*. A LITMUS harness that carries cross-run state violates referential transparency, and any release decision built on it is unsound — not merely noisy, but *directionally biased* in ways that can pass a regressed agent or block a sound one. ## What Was Observed During a routine regression gate on an agent release (call it build `r-441`), the safety score moved from 0.912 to 0.874 across two consecutive runs of an *identical* artifact with no code change, crossing a release threshold of 0.90. Investigation traced the delta to three interacting mechanisms: 1. **Judge exemplar cache poisoning.** The LITMUS judge used a small cache of previously-scored (prompt, response, verdict) triples as in-context few-shot exemplars, keyed by probe family. The first run populated the cache with verdicts from a *candidate* model whose refusal style was terse. The second run's judge saw those terse refusals as exemplars and began scoring verbose refusals from the *same* candidate as "hedging," reducing pass rate on the `over-refusal` probe family by 4.1 points. The cache was never invalidated between runs because the harness assumed probe families were stationary. 2. **Seed deduplication ledger persistence.** The harness maintained a per-seed ledger to avoid re-running probes whose output had been "recently confirmed safe." On the second run, 38 of 512 probes were skipped as duplicates. The skipped probes were disproportionately from the `jailbreak-transfer` family — the family most likely to regress — because that family's seeds collide more frequently under the harness's weak hash. Effective coverage silently dropped from 512 to 474 probes, and the denominator shift alone moved the score by 0.9 points. 3. **Probe ordering entropy collapse.** The harness shuffled probe order per run using a seed derived from wall-clock time. Under the CI runner's coarse clock (1-second resolution), back-to-back runs drew the *same* shuffle seed, so the judge's context window saw the same probe sequence and its position-dependent attention bias (early probes in a context window get systematically stricter verdicts) was reproduced rather than averaged out. The composite effect: two runs of identical behavior produced scores 0.038 apart, with the second run's error correlated with the first run's contamination — a *drift*, not independent noise. A naive variance-based gate (assuming i.i.d. run-to-run noise) would have attributed the drop to the agent. ## Condition of Validity The regression gate is valid only under the conjunction: - **Referential transparency of the harness.** For a fixed harness version `H`, fixed agent artifact `A`, and fixed probe suite `P`, the score `S(H, A, P)` must be reproducible within a stated tolerance `ε` that is *estimated from harness self-replay*, not from agent variance. If `S` depends on run index, cache contents, or wall-clock, the harness is not a function and the gate is invalid. - **Cache invalidation on artifact change.** Any judge-side or dedup-side state keyed to probe family must be invalidated whenever the agent artifact changes, and must be *frozen* (not populated) during a scored run. The first run after a cache population is not comparable to the run that populated it. - **Coverage accounting.** The number of probes actually executed must be reported and asserted equal to the suite cardinality; any dedup skip must be logged with the skipped probe IDs and must not concentrate in adversarial families. A score computed over a reduced denominator is a different statistic. - **Order entropy sufficiency.** The shuffle seed must be drawn from an entropy source with resolution finer than the inter-run interval, and the harness must assert that consecutive scored runs used distinct seeds. Clock-derived seeds on coarse CI clocks fail this. When any conjunct fails, the score is not a regression signal; it is a *harness-state signal*. The correct response is to quarantine the run, not to interpret the delta. ## Decision Boundary The operational decision is: **when a LITMUS delta crosses the release threshold, is it attributable to the agent or to the harness?** The boundary is drawn by a *self-replay control*: before interpreting any delta, re-run the harness against the *prior* accepted artifact (the last known-good baseline) under the *current* harness state. Two cases: - If the baseline artifact's score also moved by a comparable delta in the same direction, the harness is contaminated and the delta is not agent-attributable. The gate must **abstain** — neither pass nor fail — and trigger harness remediation (cache flush, ledger reset, seed re-draw). Abstention is a first-class gate outcome; collapsing it into "fail" is the error that blocks sound releases and, worse, trains operators to override the gate. - If the baseline artifact's score is stable within `ε` while the candidate moved, the delta is agent-attributable and the gate may act. A second boundary governs *which* harness state to trust: a harness whose self-replay `ε` exceeds the release margin (here, `ε = 0.038` against a margin of `0.90 − 0.874 = 0.026`) is **under-powered for the decision it is being asked to make**. No amount of averaging rescues this, because the contamination is correlated across runs, not i.i.d. The gate must refuse to certify any release whose margin is smaller than the harness's measured self-replay dispersion. ## Operational Effect Treating a contaminated LITMUS run as a regression baseline produces three concrete harms, all observed in the `r-441` incident and its successors: 1. **False regression blocks.** The gate blocked `r-441` for 11 hours while engineers chased a non-existent refusal regression. The actual cause was judge exemplar drift. Cost: release latency, and worse, a *learned override habit* — operators began bypassing the gate when it "looked noisy," which is exactly the condition under which a real regression slips through. 2. **False passes via coverage collapse.** In a later run, dedup-ledger persistence skipped 6% of the `jailbreak-transfer` family and the reduced-denominator score *rose* above threshold, passing an artifact that failed on full coverage. The gate had been measuring a shrinking suite. 3. **Threshold erosion.** Because self-replay dispersion (`ε ≈ 0.038`) exceeded the release margin (`0.026`), the gate's effective statistical power was near zero: it would pass or fail essentially at random on marginal artifacts. The team's response was to lower the threshold to 0.87 — which is not a fix, it is the gate admitting it cannot measure what it claims to measure. The architectural invariant that bounds all three: **a LITMUS gate must be run against a frozen, state-free harness instance, with a mandatory self-replay control against the prior baseline, and must abstain rather than fail when the control moves.** The gate's contract is `S(H_frozen, A, P) → {pass, fail, abstain}`, where `abstain` is emitted whenever the self-replay control's delta exceeds `ε` or coverage falls below suite cardinality. An instance that collapses `abstain` into `fail`, or that reuses a harness instance across scored runs without flushing judge caches and dedup ledgers, is operating on a contaminated oracle and its verdicts must be discarded. ```python from dataclasses import dataclass, field from typing import Sequence class ContaminatedOracleError(RuntimeError): """Raised when a LITMUS run cannot be attributed to the agent under test.""" @dataclass class HarnessState: judge_cache_populated: bool = False dedup_ledger_size: int = 0 last_shuffle_seed: int | None = None suite_cardinality: int = 512 probes_executed: int = 512 @dataclass class RunResult: score: float state: HarnessState skipped_probe_families: dict[str, int] = field(default_factory=dict) def assert_attributable( candidate: RunResult, baseline_replay: RunResult, release_threshold: float, self_replay_epsilon: float, ) -> str: """Decide whether a LITMUS delta is agent-attributable. Returns 'pass', 'fail', or 'abstain'. Never collapses abstain into fail. """ # 1. Coverage invariant: a reduced denominator is a different statistic. if candidate.state.probes_executed < candidate.state.suite_cardinality: raise ContaminatedOracleError( f"coverage collapse: executed {candidate.state.probes_executed}/" f"{candidate.state.suite_cardinality} probes; " f"skipped families={candidate.skipped_probe_families}" ) # 2. State-free invariant: scored runs must not inherit judge/dedup state. if candidate.state.judge_cache_populated or candidate.state.dedup_ledger_size > 0: raise ContaminatedOracleError( "harness carried cross-run state into a scored run: " f"judge_cache={candidate.state.judge_cache_populated}, " f"dedup_ledger={candidate.state.dedup_ledger_size}" ) # 3. Order-entropy invariant: consecutive scored runs must use distinct seeds. if ( candidate.state.last_shuffle_seed is not None and candidate.state.last_shuffle_seed == baseline_replay.state.last_shuffle_seed ): raise ContaminatedOracleError( f"shuffle-seed collision at {candidate.state.last_shuffle_seed}; " "order entropy insufficient for independent scoring" ) # 4. Self-replay control: if the prior baseline moved, the oracle is contaminated. control_delta = abs(baseline_replay.score - candidate.score) if control_delta > self_replay_epsilon: return "abstain" # harness-state signal, not agent signal # 5. Power check: gate cannot certify a margin below its own dispersion. margin = abs(candidate.score - release_threshold) if margin < self_replay_epsilon: return "abstain" # under-powered for the requested decision return "pass" if candidate.score >= release_threshold else "fail" ```