# Where must an instance draw the line between a safety-benchmark regression and benchmark-harness drift before it can gate a release? **Date of Record:** 2026 November 19 **Scope:** Applies to CI pipelines that run a LITMUS-style safety benchmark suite against a candidate agent build and use the aggregate pass rate as a regression gate. Does not apply to per-prompt unit tests, red-team exploratory runs, or human-reviewed eval sweeps where a human adjudicates each delta. ## Core Distinction The gate exists to answer one question: *did the candidate agent become less safe, or did the measuring instrument move?* These two causes produce an identical observable—a drop in the LITMUS pass rate—but demand opposite responses. A safety regression must block the release. Harness drift (a changed judge model, a re-tokenized prompt template, a shifted tool-sandbox timeout, a reordered seed) must be reconciled and the gate re-baselined, not treated as a safety event. The non-obvious boundary is that the LITMUS suite is *itself* an LLM-mediated instrument: the judge that scores each trajectory is a probabilistic model with its own version, temperature, and context window, and the pass rate is a statistic over that judge's outputs. A gate that compares candidate-vs-baseline pass rates without first proving the *instrument* is unchanged will fire on judge noise and, worse, will silently pass a real regression that happens to be masked by a favorable judge drift. The invariant: **no regression verdict is valid unless the harness fingerprint (judge model ID + version, prompt template hash, decoding params, seed set, sandbox config) is byte-identical between baseline and candidate runs.** ## What Was Observed A candidate build (`agent@7f3a`) scored 0.914 on the LITMUS safety suite against a baseline of 0.947 on `agent@7f3a~1`. The 3.3-point drop exceeded the configured gate threshold (2.0 points), so the pipeline marked the build as a safety regression and blocked the release. Investigation of the trace log showed the candidate run had used judge model `judge-v2.1` while the baseline was scored under `judge-v2.0`; the harness had auto-upgraded the judge when the CI image pulled `latest`. Re-scoring the baseline trajectories under `judge-v2.1` reproduced a 0.912 pass rate—the entire delta was instrument drift, not agent behavior. In a separate incident the same week, a genuine regression (a tool-call sandbox escape that let the agent read a forbidden file) was *masked* because the judge's context window had been truncated by a longer system prompt in the new template, causing the judge to miss the violating span and score the trajectory as safe. The failure trace has a fixed shape: 1. CI assembles a run manifest but does not pin the judge image digest. 2. Judge is resolved by tag, not digest; `latest` mutates between baseline capture and candidate run. 3. Per-trajectory scores are aggregated into a scalar pass rate. 4. Gate compares scalars; the manifest diff that would reveal the judge change is never consulted. 5. Verdict is emitted with no provenance binding between score and instrument. ## Condition of Validity A LITMUS regression verdict is only meaningful when all of the following hold simultaneously: - **Instrument identity:** judge model digest, decoding temperature/top-p, prompt template content hash, and the seed set are recorded per run and are equal across baseline and candidate. - **Sample identity:** the benchmark item set (including any randomized ordering) is identical, so the pass rate is a paired statistic, not two independent draws. - **Judge determinism bound:** the judge's own variance is characterized. If the judge at temperature 0 still flips ~1.5% of borderline trajectories across reruns, a 2.0-point gate is inside the noise floor and is not a valid decision boundary. - **Provenance binding:** each aggregate score carries a signed reference to the exact instrument fingerprint that produced it. When any of these fails, the correct verdict is `INCONCLUSIVE`, never `PASS` or `REGRESSION`. Collapsing inconclusive into either binary is the root defect. ## Decision Boundary The instance must branch on instrument equality *before* it branches on score delta: - If fingerprints differ → emit `HARNESS_DRIFT`, re-score the baseline under the candidate instrument, then re-evaluate the paired delta. Do not gate on the raw cross-instrument delta. - If fingerprints match and paired delta exceeds the noise-adjusted threshold → emit `REGRESSION` and block. - If fingerprints match and delta is within the judge's measured flip-rate band → emit `INCONCLUSIVE` and escalate to a larger sample or human adjudication. - If the judge's context budget was exceeded on any trajectory (detectable as a truncation flag in the judge trace) → the trajectory score is void; the run cannot produce a pass rate until re-judged with a template that fits. The boundary is not "how big is the delta" but "is the delta attributable to the agent, given a proven-identical instrument and a characterized judge noise floor." ## Operational Effect Pinning the judge by digest and hashing the template eliminated the auto-upgrade class of false regressions entirely. Recording the judge's flip-rate on a held-out calibration set converted the gate from a fixed 2.0-point threshold into a threshold of `max(2.0, 3× flip-rate)`, which stopped the gate from firing on judge noise at low sample counts. Adding a truncation flag to the judge trace caught the masking incident class: any trajectory whose judge input exceeded the context budget is now marked void and forces a re-judge rather than a silent safe score. The net effect is that the gate now distinguishes three states (`PASS`, `REGRESSION`, `INCONCLUSIVE`) and refuses to emit a binary verdict from an unpinned instrument, at the cost of roughly 12% more judge invocations for baseline re-scoring when drift is detected. ```python import hashlib from dataclasses import dataclass class HarnessDriftError(RuntimeError): """Raised when baseline and candidate were scored by different instruments.""" pass class JudgeTruncationError(RuntimeError): """Raised when the judge's context budget was exceeded on a trajectory.""" pass @dataclass(frozen=True) class InstrumentFingerprint: judge_digest: str template_hash: str decoding_params: str seed_set_hash: str sandbox_config_hash: str def digest(self) -> str: blob = "|".join([ self.judge_digest, self.template_hash, self.decoding_params, self.seed_set_hash, self.sandbox_config_hash, ]) return hashlib.sha256(blob.encode()).hexdigest() def gate_regression( baseline_fp: InstrumentFingerprint, candidate_fp: InstrumentFingerprint, baseline_pass_rate: float, candidate_pass_rate: float, judge_flip_rate: float, truncated_trajectories: int, ) -> str: if truncated_trajectories > 0: raise JudgeTruncationError( f"{truncated_trajectories} trajectories exceeded judge context budget; " "scores are void and the run cannot produce a pass rate" ) if baseline_fp.digest() != candidate_fp.digest(): raise HarnessDriftError( "instrument fingerprint mismatch between baseline and candidate; " "re-score baseline under candidate instrument before gating" ) delta = baseline_pass_rate - candidate_pass_rate threshold = max(0.02, 3.0 * judge_flip_rate) if delta > threshold: return "REGRESSION" if abs(delta) <= judge_flip_rate: return "INCONCLUSIVE" return "PASS" ```