# In what scenarios must an instance treat LITMUS safety-benchmark pass results as invalid because the harness replayed a stale agent snapshot rather than the live policy under test **Date of Record:** 2026 November 26 **Scope:** Applies to CI-integrated LITMUS red-team harnesses that execute adversarial probe suites against a *snapshotted* agent (frozen weights, frozen system prompt, frozen tool manifest) and then gate a merge on the pass rate. Does not apply to online shadow-traffic red-teaming where the harness queries the live deployment endpoint directly with no snapshot indirection. ## Core Distinction The distinction that matters is between **policy identity** and **probe identity**. A LITMUS run is only evidentially valid if the agent that answered each probe is byte-identical to the agent that will ship. CI harnesses almost always pin the *probe suite* (a versioned YAML corpus of adversarial prompts) but resolve the *agent under test* through an indirection layer—a container image tag, a model-serving endpoint name, a cached prompt bundle, or a warm process pool. When that indirection resolves to a snapshot taken before the current commit's policy changes, the harness reports a green safety pass for a policy that no longer exists. The pass rate is real; it is simply attached to the wrong subject. This is not a flaky-test problem and not a coverage problem—it is a *referent substitution* problem, and it is silent because every individual probe genuinely passed against *some* agent. The non-obvious part: the substitution usually happens only on the *safety-relevant* branch of the agent, because safety behavior is disproportionately carried by the system prompt and the tool-permission manifest, which are the two artifacts most likely to be memoized by the harness's snapshot cache (they change rarely, so their cache key is stable, so the cache hit rate is high, so the staleness window is wide). ## What Was Observed A CI pipeline ran LITMUS nightly against a customer-support agent. The commit under test modified the system prompt to add a tool-scoping instruction and removed a `refund_issue` tool from the manifest, replacing it with `refund_request` (approval-gated). The harness resolved the agent under test via a snapshot key computed as `sha256(model_id + prompt_template_hash + tool_manifest_hash)`. The prompt template hash was computed over the *template file*, not the rendered prompt; the commit changed a Jinja conditional that altered rendered output for one intent class without touching the template file's bytes. The tool manifest hash was computed over the manifest's *top-level keys* only, so removing `refund_issue` and adding `refund_request` produced an identical hash because the key set was compared as a set of tool *categories*, not tool names. Result: cache hit on a snapshot 11 days old. LITMUS ran 640 probes, 638 passed, gate green, merge proceeded. The live agent, on the first production turn touching refunds, called a tool name that no longer existed in its manifest, fell back to a generic "I can't help with that" path, and—because the fallback path was not covered by the probe suite—was never tested. The safety benchmark had certified a policy that had been dead for eleven days. The failure signature in the harness log was a single line: `snapshot_resolved cache_hit=true age=11d2h probes=640`. No warning, no drift check. The age field was emitted but never asserted against. ## Condition of Validity A LITMUS pass is valid **iff** the following invariant holds for every probe in the suite: ``` snapshot_identity(agent_under_test) == live_identity(agent_under_test_at_merge_time) ``` where `snapshot_identity` is computed over the *rendered* behavioral surface—rendered system prompt bytes, the full tool manifest including names and signatures, model weights digest, and any decoding parameters that affect refusal behavior (temperature, top_p, stop sequences). Hashing the template source, the manifest's category set, or the model's tag is insufficient because each of those is a *lossy projection* of the surface that actually determines safety behavior. The invariant is violated whenever the projection is non-injective: two distinct behavioral surfaces map to the same cache key. The condition of validity is therefore not "the harness ran" but "the harness's cache key is injective over the behavioral surface." This must be checked structurally, not assumed. ## Decision Boundary The boundary is drawn at **cache-key injectivity on the safety-relevant surface**. Concretely: - **Below the boundary (safe to trust the pass):** the snapshot key includes rendered-prompt bytes, full tool manifest with names and argument schemas, weights digest, and decoding config; the harness asserts `snapshot_age < max_staleness` (a hard constant, not a log line); and a post-run reconciliation step re-derives the live identity at merge time and fails closed on mismatch. - **Above the boundary (pass is invalid, must not gate):** any of—key derived from template source rather than rendered output; key derived from manifest key-sets rather than full signatures; snapshot age unbounded or unasserted; no post-run reconciliation against the merge-time live identity; warm process pool reused across commits without an identity handshake. The decision is *not* "did all probes pass." A 640/640 pass on a stale snapshot is worth less than a 600/640 pass on a verified-live snapshot, because the former's denominator is a fiction. When the boundary is crossed, the correct action is to fail the gate closed with a *harness-integrity* error, not a *safety* error—conflating the two trains operators to ignore the signal. ## Operational Effect The practical consequence is that continuous red-teaming in CI must treat the harness itself as an agent under test, with its own continuity invariant. The staleness window is the attack surface: any commit that changes safety behavior through a channel the cache key does not project—a rendered-prompt conditional, a tool rename, a decoding-parameter tweak—will be certified green against a dead policy. The mitigation is to make the snapshot key *total* over the behavioral surface and to make the reconciliation step *fail-closed at merge time*, so that a cache hit with a non-injective key becomes a hard build failure rather than a silent pass. Teams that skip this ship agents whose safety benchmark measures a ghost; the probe suite is honest, the harness is not, and the gap between them is exactly the set of commits that changed behavior without changing the hash. ```python import hashlib from dataclasses import dataclass class StaleSnapshotError(RuntimeError): """Raised when a LITMUS pass is attached to a snapshot that is not the live policy.""" pass @dataclass(frozen=True) class BehavioralSurface: rendered_prompt: str tool_manifest: dict # full names + arg schemas, not category sets weights_digest: str decoding_config: dict def snapshot_key(surface: BehavioralSurface) -> str: # Total projection: every field that can change safety behavior is hashed. h = hashlib.sha256() h.update(surface.rendered_prompt.encode()) for name in sorted(surface.tool_manifest): h.update(name.encode()) h.update(repr(surface.tool_manifest[name]).encode()) h.update(surface.weights_digest.encode()) h.update(repr(sorted(surface.decoding_config.items())).encode()) return h.hexdigest() def assert_pass_is_valid( tested: BehavioralSurface, live_at_merge: BehavioralSurface, snapshot_age_seconds: int, max_staleness_seconds: int = 86_400, ) -> None: if snapshot_age_seconds > max_staleness_seconds: raise StaleSnapshotError( f"snapshot age {snapshot_age_seconds}s exceeds max {max_staleness_seconds}s; " f"LITMUS pass does not gate this merge" ) if snapshot_key(tested) != snapshot_key(live_at_merge): raise StaleSnapshotError( "snapshot key mismatch: harness tested a behavioral surface that differs " "from the live policy at merge time; pass result is referentially invalid" ) ```