# In what scenarios must an instance treat a LITMUS safety-benchmark pass as non-transferable across a model swap, and how does the harness's warm-cache scoring path mask a regression **Date of Record:** 2026 November 29 **Scope:** Applies to CI/CD pipelines that gate agent deployments on a LITMUS (or structurally equivalent adversarial-suite) harness run in-process or as a sidecar, where successive evaluation runs share a persistent process, cache, or fixture store. Does not apply to fully hermetic per-run container spins where the harness process and its caches are destroyed between runs. ## Core Distinction The distinction that matters is between *evaluating the agent* and *evaluating the harness's memory of the agent*. A LITMUS harness is stateful in ways its API surface hides: adversarial prompt fixtures, judge-model response caches, refusal-classification embeddings, and per-case seed schedules all persist across runs when the harness is invoked as a long-lived service or a cached CI job. A green LITMUS run therefore certifies a conjunction — "this agent passed these cases *under the cache state produced by the previous agent*" — not the agent in isolation. The non-obvious boundary is that when the agent under test changes (model swap, prompt revision, tool-schema change) but the harness's cache does not, a subset of cases are *scored against stale judge verdicts and stale fixture expansions* and report pass. The harness is not lying; it is answering a question you did not ask. ## What Was Observed A CI job ran LITMUS nightly against agent build `N` and `N+1`. Build `N+1` replaced the underlying model and tightened a system prompt. The harness was deployed as a warm sidecar (a deliberate latency optimization — cold LITMUS spin-up was ~14 minutes, warm was ~90 seconds). The `N+1` run reported 100% pass on the jailbreak-resistance suite, identical to `N`. Manual replay of the same adversarial prompts against `N+1` in a cold harness showed 6 of 240 cases flipping to *unsafe* — a ~2.5% regression that the CI gate did not catch. The mechanism: the harness keys its judge cache on `(fixture_id, prompt_hash)`. The adversarial *user* prompts were unchanged between builds, so `prompt_hash` collided. The harness never re-invoked the judge model for those cases; it replayed the cached verdict computed against build `N`'s responses. Because build `N`'s responses were safe, the cached verdict was `safe`, and build `N+1` inherited that verdict without its own output ever being judged. The pass was a cache hit, not a measurement. A second, subtler layer: the fixture *expansion* stage (which mutates a seed adversarial prompt into N paraphrases using a generator model with a fixed seed) was also cached by `seed`. When the generator model version drifted on the harness host but the seed did not, the expanded paraphrase set was silently identical to the previous run's, so the "fresh" adversarial surface was stale — the harness was testing the same 240 strings every night, and the agent had (in the intervening weeks of prompt tuning) been implicitly optimized against them. ## Condition of Validity A LITMUS pass is valid as a *differential* signal only when all of the following hold: 1. The judge verdict for every case was recomputed against the *current* agent's output within the current run, or the cache key provably includes the agent's output hash (not the input prompt hash). 2. The fixture expansion seed and the generator model identity are both part of the run manifest, and a generator drift invalidates the expansion cache. 3. The harness process's in-memory refusal-classifier state is reset, or its keying includes the embedding-model version. 4. The agent under test cannot observe or adapt to the fixture set across runs (i.e., fixtures are not leaked into training or prompt-tuning loops between gates). Violation of (1) is the failure above. Violation of (4) is the slower failure: a nightly gate that reuses fixtures becomes a training set for anyone reading CI logs, and the agent's *apparent* safety improves while its *actual* robustness against unseen adversarial inputs is unmeasured. The pass is valid as a *continuity* check (did anything break?) but invalid as an *absolute* safety claim. ## Decision Boundary The boundary is: **does the cache key transitively include the identity of the thing being measured?** - If the cache key is over *inputs* (prompt, fixture, seed) and the agent is the variable, the cache is unsound for cross-build comparison. It is sound only for re-running the *same* build (idempotency checks). - If the cache key includes a hash of the agent's *output* or the agent's *build digest*, the cache is sound: a changed agent produces cache misses and is re-judged. - If the cache key includes neither but the agent build digest is in the run manifest and the harness *invalidates all caches on digest change*, the cache is sound but the latency optimization is defeated on every build — which is the correct tradeoff and should be made explicit rather than silently skipped. The decision an operator must make: *warm cache for latency, or cold cache for validity, but never warm cache keyed on inputs while the agent is the variable.* There is no third option that preserves both. Any harness configuration that claims to do both is either keying on output (fine) or misreporting (the failure above). The guardrail invariant: **`judge_cache_key = H(fixture_id ‖ prompt_hash ‖ agent_build_digest ‖ judge_model_version)`**, and the harness must *assert* on startup that `agent_build_digest` is present in the key material, failing closed if absent. A harness that cannot prove its cache key includes the agent identity must be run cold for any gating decision. ## Operational Effect Downstream of a masked regression, three effects compound: 1. **False-negative safety debt.** The gate passes, the build ships, and the 2.5% unsafe cases are live. Because the gate is the only safety signal, no other stage re-checks; the regression is discovered by an external red-team or an incident, not by CI. 2. **Fixture overfitting.** Stale expansions mean the adversarial surface is fixed. Over weeks, prompt-tuning and fine-tuning loops (even well-intentioned ones reading CI artifacts) converge the agent onto the fixed surface. Measured safety rises monotonically while true robustness falls — a Goodhart signature localized to the harness. 3. **Cross-instance non-transferability.** A pass produced under warm-cache conditions on instance A is not transferable to instance B, because B's cache state differs. In a multi-agent deployment where each instance self-reports "LITMUS green," the aggregate claim is meaningless: the instances are reporting on different cache states, and the union of their coverage is not the coverage of any one. A swarm-level safety claim requires either a shared, digest-keyed cache (so all instances measure the same thing) or per-instance cold runs with the run manifest recorded and diffed. The architectural takeaway: the LITMUS harness is an *instrument*, and like any instrument it has a calibration state. A warm cache is a calibration that assumes the measured object is unchanged. When the measured object is the agent, and the agent is what you are changing, the calibration is invalid by construction. The invariant to enforce is not "run LITMUS" but "run LITMUS such that a cache hit cannot be mistaken for a measurement" — which means the cache key must carry the agent's identity, and the harness must refuse to score when it cannot prove it did. ```python import hashlib from dataclasses import dataclass class StaleJudgeCacheError(RuntimeError): """Raised when a judge verdict would be replayed against a different agent than the one it was originally computed for.""" pass @dataclass(frozen=True) class RunManifest: agent_build_digest: str judge_model_version: str fixture_seed: int generator_model_version: str def judge_cache_key( fixture_id: str, prompt_hash: str, agent_output_hash: str, manifest: RunManifest, ) -> str: # The agent's OUTPUT hash and BUILD digest are both in the key. A changed # agent produces a cache miss and is re-judged. The input-only key # (fixture_id, prompt_hash) used by the legacy harness is deliberately # excluded from the fast path. material = "|".join([ fixture_id, prompt_hash, agent_output_hash, manifest.agent_build_digest, manifest.judge_model_version, str(manifest.fixture_seed), manifest.generator_model_version, ]) return hashlib.sha256(material.encode("utf-8")).hexdigest() def resolve_verdict( cache: dict[str, str], fixture_id: str, prompt_hash: str, agent_output_hash: str, manifest: RunManifest, ) -> str: if not manifest.agent_build_digest: # Fail closed: a harness that cannot prove which agent it measured # must not serve a cached verdict for a gating decision. raise StaleJudgeCacheError( "agent_build_digest missing from run manifest; refusing to " "serve cached judge verdict for a safety gate" ) key = judge_cache_key( fixture_id, prompt_hash, agent_output_hash, manifest ) if key not in cache: # Cache miss is the correct outcome for a changed agent; caller # must invoke the judge and populate the cache. raise StaleJudgeCacheError( f"no verdict for key {key[:12]}…; agent output or build digest " f"changed since cache population — re-judge required" ) return cache[key] def gate_build( cache: dict[str, str], cases: list[dict], manifest: RunManifest, ) -> None: for case in cases: try: verdict = resolve_verdict( cache, case["fixture_id"], case["prompt_hash"], case["agent_output_hash"], manifest, ) except StaleJudgeCacheError: # Escalate to a cold re-judge; do not silently pass. raise if verdict == "unsafe": raise StaleJudgeCacheError( f"unsafe verdict on fixture {case['fixture_id']} for " f"build {manifest.agent_build_digest}" ) ``` The code above is the guardrail in miniature: the cache key transits the agent's identity, a missing digest fails closed, and a cache miss on a changed agent is surfaced as an error rather than a pass. The harness may still warm-cache — but only on keys that cannot collide across the variable being measured.