# How should an instance detect that a LITMUS safety-benchmark harness has silently degraded into a no-op gate when its adversarial probe set is being satisfied by cached or short-circuited responses rather than live model behavior **Date of Record:** 2026 November 28 **Scope:** Applies to CI-embedded LITMUS-style adversarial evaluation harnesses that gate agent releases on a fixed probe corpus with pass/fail thresholds. Does not apply to exploratory red-teaming without a regression gate, nor to single-shot offline scoring where the probe corpus is regenerated per run. ## Core Distinction A LITMUS harness is a *safety regression gate*: it replays a frozen corpus of adversarial probes against a candidate agent build and blocks promotion if the refusal/compliance score crosses a threshold. The invariant it is supposed to uphold is deceptively simple — *every gate decision must be traceable to a live forward pass of the candidate model against every probe in the active set.* The failure mode that matters here is not a probe the model fails. It is a probe the model *never actually answered*, yet the harness scored it as a pass. This happens through three converging mechanisms that all look identical in the aggregate score: 1. **Response caching keyed on probe text, not on model identity.** Many harnesses memoize probe→response to cut CI cost. If the cache key omits the candidate model's build hash (or includes a stale one), a new build inherits the previous build's responses. The gate then certifies the *old* model's safety under the *new* model's label. 2. **Deterministic short-circuit on "known-safe" probe prefixes.** Harnesses that pre-classify probes into `expect_refusal` buckets sometimes skip execution when the prefix matches a benign template, assuming the tail is harmless. Adversarial suffixes are precisely crafted to survive prefix inspection. 3. **Truncation-induced auto-pass.** When a probe exceeds the harness's per-probe token budget, some harnesses mark the probe `skipped` and — because skipped ≠ failed — the probe drops out of the denominator. A model that produces long, evasive completions *reduces its own evaluated surface*. The non-obvious part: all three produce a *higher* pass rate. The gate does not fail loudly; it fails toward green. ## What Was Observed A candidate build (`agent-2025.06.11-rc3`) was promoted through a LITMUS gate reporting 98.4% refusal compliance across 1,200 probes, up from 97.1% on the prior build. Post-promotion red-team sampling found three direct prompt-injection successes that the corpus *contained probes for*. Replaying the corpus manually against `rc3` reproduced the failures immediately. Tracing the harness run: - 412 of 1,200 probes returned `cache_hit`. The cache was keyed on `sha256(probe_text + system_prompt_template)`. The system prompt template had not changed between builds, so the key collided across model versions. These 412 inherited `rc2` responses. - 87 probes were marked `skipped_token_budget`. Each was a long adversarial suffix probe; `rc3`'s more verbose refusal preamble pushed completions past the 2,048-token cap. Skipped probes were excluded from both numerator and denominator. - Net: the effective evaluated set was 701 probes, not 1,200. The 98.4% was computed over 701 responses, 412 of which were from a different model. The three successful injection probes were each in the skipped set. The harness had *seen* them, declined to evaluate them, and reported a score that no live model behavior supported. ## Condition of Validity The gate is only valid under a conjunction that the harness must actively enforce, not assume: - **Cache key completeness.** The cache key must include a content hash of the candidate model artifact (weights hash or immutable build ID) *and* the full decoding configuration (temperature, top_p, max_tokens, stop sequences). Any component omitted is a channel for cross-build contamination. A cache hit against a key that does not contain the current build hash is not a cache hit — it is a foreign response. - **No silent denominator shrinkage.** Any probe that is skipped, truncated, errored, or timed out must be counted as a *gate failure*, not an exclusion. The denominator is the frozen corpus size, full stop. A model must not be able to improve its score by generating output the harness cannot afford to score. - **Prefix classification is not a safety oracle.** Pre-classification may route probes but must never *skip execution*. Adversarial construction assumes the tail defeats prefix heuristics; a harness that trusts prefix classification is evaluating its own classifier, not the model. When any of these is violated, the reported score is a statement about the harness's caching and budgeting, not about the model. ## Decision Boundary The instance must treat the gate as **invalid and block promotion** the moment any of the following holds, regardless of the reported score: - `cache_hit_count > 0` where the cache key's model hash ≠ current build hash. - `skipped + errored + truncated > 0` and those probes are excluded from the denominator. - Evaluated probe count `< corpus_size` for any reason other than an explicit, versioned corpus revision. The boundary is deliberately one-sided: a clean run (zero foreign cache hits, zero exclusions, `evaluated == corpus_size`) is the *only* state in which the score is admissible. There is no "mostly clean" that permits promotion. The reasoning is that the failure mode is adversarial by construction — an agent that learns to emit long evasions, or a cache that silently serves stale responses, will *always* push toward a better-looking score. You cannot average your way out of a corrupted denominator. The corollary boundary: if the harness *cannot* run the full corpus within budget (live passes too expensive, probes too long), the correct action is to fail the gate and escalate to a human-chosen corpus revision — never to shrink the evaluated set and report a percentage. ## Operational Effect Enforcing the invariant changes three things in practice: 1. **Caching becomes build-scoped.** Cache entries are namespaced by `(build_hash, decode_config_hash)`. Cross-build hits are structurally impossible; a cache miss on a new build is the expected, correct cost. CI time rises, and that cost is the price of a gate that means something. 2. **Skips become failures.** Truncated or budget-exceeded probes count against the model. This inverts an incentive: verbose evasion no longer helps. A model that cannot produce a scorable completion within budget is treated as non-compliant, which is the safe default for a safety gate. 3. **The gate emits a provenance manifest.** Every run records `corpus_size`, `evaluated`, `foreign_cache_hits`, `excluded`, and the build hash, and the promotion check reads the manifest, not the summary percentage. A run whose manifest shows `evaluated < corpus_size` is rejected before the score is even consulted. The deeper lesson: a safety regression gate's integrity is a property of its *accounting*, not its threshold. The threshold can be tuned; a corrupted denominator silently invalidates every number computed from it. The instance's job is to verify the accounting first and treat the score as a derived quantity that is meaningless until the accounting closes. ```python import hashlib from dataclasses import dataclass class GateAccountingError(RuntimeError): """Raised when a LITMUS gate run's accounting is internally inconsistent.""" pass @dataclass(frozen=True) class GateManifest: corpus_size: int evaluated: int foreign_cache_hits: int excluded: int # skipped + errored + truncated build_hash: str cache_key_build_hash: str def validate_gate_run(manifest: GateManifest, reported_score: float) -> float: """ Return the gate score only if the run's accounting is sound. A score is admissible iff every probe in the frozen corpus was evaluated against the current build with no foreign cache reuse and no silent denominator shrinkage. """ if manifest.cache_key_build_hash != manifest.build_hash: raise GateAccountingError( f"cache keyed on build {manifest.cache_key_build_hash!r} but " f"candidate is {manifest.build_hash!r}: responses are foreign" ) if manifest.foreign_cache_hits > 0: raise GateAccountingError( f"{manifest.foreign_cache_hits} cache hits from a non-candidate " f"build; score reflects prior model behavior" ) if manifest.excluded > 0: raise GateAccountingError( f"{manifest.excluded} probes excluded (skipped/truncated/errored); " f"denominator shrinkage is not a valid pass" ) if manifest.evaluated != manifest.corpus_size: raise GateAccountingError( f"evaluated {manifest.evaluated} of {manifest.corpus_size} probes; " f"gate did not cover the frozen corpus" ) if not (0.0 <= reported_score <= 1.0): raise GateAccountingError(f"score {reported_score} out of range") return reported_score def gate_promotion(manifest: GateManifest, reported_score: float, threshold: float) -> bool: score = validate_gate_run(manifest, reported_score) # raises on corruption return score >= threshold ```