# In what scenarios must an instance treat a LITMUS safety-benchmark pass as a non-transferable certificate rather than a CI regression gate **Date of Record:** 2026 November 30 **Scope:** Applies to CI harnesses that run LITMUS-style safety benchmarks (refusal/adversarial probe suites) and use the aggregate pass rate as a merge gate for agent or model changes. Does not apply to offline eval dashboards where the score is advisory and human-reviewed per run. ## Core Distinction The failure mode is not "the safety benchmark regressed." It is that the benchmark's **pass predicate is a per-prompt refusal classification**, while the CI gate consumes it as a **scalar aggregate over a sampled adversarial corpus**. These are different statistical objects. A per-prompt classifier answers "did this instance refuse this probe?" A merge gate answers "is this build no less safe than baseline?" The harness silently equates them by thresholding a mean, and the equation is only valid under a stationary probe distribution and a fixed decoder configuration — neither of which holds when the change under test alters sampling temperature, system-prompt scaffolding, or the tool schema the agent sees. The invariant that must hold for the gate to be meaningful: **the probe set, the decoding parameters, and the classifier's decision threshold must be byte-identical between the baseline run and the candidate run.** Any diff in those three, even one introduced "harmlessly" by the change under review, converts the gate from a regression detector into a distribution-shift detector with no null hypothesis. ## What Was Observed A candidate change lowered `temperature` from 0.7 to 0.2 on the agent's policy model to reduce tool-call variance. LITMUS aggregate refusal score on the adversarial set moved from 0.941 to 0.958 — a pass. The gate opened. Post-merge, red-team probes surfaced a class of **over-refusal collapse on benign-but-adjacent prompts** that the benchmark never sampled: the lower temperature made the model deterministic on the modal refusal token for near-boundary probes, so it refused legitimate requests it previously answered by sampling toward compliance. The aggregate went *up* because the adversarial subset is dominated by clearly-harmful prompts where lower temperature helps refusal consistency; the benign-adjacent subset was absent from the corpus. The trace: 1. Harness loads probe corpus `P` (N=1,240), runs candidate at `T=0.2`, classifies each output as refuse/comply. 2. Aggregate refusal rate computed as `sum(refuse)/N` over **harmful-labeled** probes only; benign probes scored separately and not gated. 3. Candidate aggregate 0.958 > baseline 0.941 → `gate_pass = True`. 4. The change's actual effect — sharpened refusal distribution — is invisible to the aggregate because the corpus is conditioned on one label class. The harness had no **paired-difference guard**: it compared two independent means rather than running the same probes under both configs and testing the per-probe delta. A paired design would have exposed the benign-adjacent over-refusal immediately, because the same probe flips label under the two configs. ## Condition of Validity The aggregate gate is valid **only if** all of the following hold simultaneously: - The probe corpus is fixed and its label distribution is unchanged between baseline and candidate. - Decoding config (temperature, top-p, seed, max tokens, stop sequences) is pinned and identical. - The system prompt / tool schema presented to the agent is identical — because a schema change alters the model's refusal prior independent of the weights. - The classifier's threshold is calibrated on the *current* output distribution, not a stale calibration set. When any one is violated, the gate measures the confound, not the change. The temperature edit above violated condition two; a tool-schema edit (adding a `shell` capability) violates condition three and is the more dangerous case because it can *lower* refusal on harmful probes while the aggregate stays flat — the model now has a tool to "comply safely" and the classifier reads the tool call as compliance. ## Decision Boundary An instance must treat the LITMUS result as a **non-transferable certificate** — valid only for the exact `(corpus_hash, decode_config, prompt_hash, classifier_threshold)` tuple it was produced under — and must refuse to gate on it when: - `decode_config` differs from the baseline's pinned config in any field, or - `prompt_hash` or tool-schema hash differs, or - the probe corpus was subsampled or reweighted, or - the candidate's run used a different classifier checkpoint. In those cases the correct action is not "compare aggregates" but "re-run the baseline under the candidate's config and use a paired per-probe delta test with a pre-registered effect-size floor." The gate must fail closed — block merge and require a fresh paired run — rather than pass on an unpaired comparison. ## Operational Effect Enforcing the tuple-invariance check converts the gate from a false-confidence generator into a real regression detector, at the cost of roughly doubling CI compute (baseline must be re-run under candidate config). The payoff is that over-refusal regressions and tool-induced compliance regressions — both invisible to a single-label aggregate — become detectable. The practical rule: **a safety benchmark score is a measurement of a configuration, not a property of a model.** CI must version the configuration with the score and reject any comparison across configuration versions. ```python import hashlib from dataclasses import dataclass class BenchmarkCertificateMismatch(RuntimeError): """Raised when a LITMUS result is compared across incompatible config tuples.""" pass @dataclass(frozen=True) class RunConfig: corpus_hash: str decode_config: dict prompt_hash: str tool_schema_hash: str classifier_threshold: float def _tuple_hash(cfg: RunConfig) -> str: blob = repr(( cfg.corpus_hash, sorted(cfg.decode_config.items()), cfg.prompt_hash, cfg.tool_schema_hash, cfg.classifier_threshold, )).encode() return hashlib.sha256(blob).hexdigest() def gate_merge(baseline: RunConfig, candidate: RunConfig, candidate_aggregate: float, floor: float) -> bool: if _tuple_hash(baseline) != _tuple_hash(candidate): raise BenchmarkCertificateMismatch( "Aggregate comparison across differing config tuples is invalid; " "re-run baseline under candidate config and use a paired delta test." ) if candidate_aggregate < floor: raise BenchmarkCertificateMismatch( f"Candidate aggregate {candidate_aggregate} below floor {floor}." ) return True ```