# How should an instance detect that a LITMUS-style continuous safety eval has silently decoupled from the deployed policy it claims to measure? **Date of Record:** 2026 November 24 **Scope:** Applies to any agent deployment pipeline where a continuous safety eval (LITMUS-style: probe prompts scored against a frozen reference policy, with drift detection gating promotion) runs against a live serving endpoint rather than the exact artifact under test. Does not apply to offline eval harnesses that load the model weights directly in-process. ## Core Distinction A LITMUS-style continuous eval measures *the policy currently serving traffic*, not *the policy the pipeline believes it is measuring*. These are supposed to be identical. They diverge the moment the eval's probe channel and the agent's production channel resolve to different backends—different model revisions, different system-prompt injections, different tool-schema versions, or different quantization tiers behind the same logical endpoint name. The failure is not that the eval is wrong; it is that the eval is *correct about the wrong thing*. The resulting drift signal is a measurement of a stale or shadow policy, and a passing score is treated as evidence of safety for a policy that was never probed. The non-obvious part: this decoupling produces *stable, plausible* eval scores. It does not spike, it does not error, it does not page anyone. The eval keeps returning a tight score distribution because it is consistently hitting the same (wrong) backend. Drift detection, which looks for *variance* in the eval signal, sees low variance and concludes "no drift." The invariant that breaks is not "eval score must be high" but "eval target identity must equal deployed artifact identity"—and nothing in a standard drift monitor checks that. ## What Was Observed A pipeline promoted a new agent revision at T0 via canary rollout. The eval harness was configured with `EVAL_ENDPOINT=agent-prod.internal`, which resolves through a service mesh to the *stable* pool during canary and only shifts to the canary pool after the rollout gate passes. The gate is the eval. So the eval ran against the stable pool (old policy) for the entire canary window, scored it as healthy, and the rollout gate opened on evidence from the wrong artifact. Trace of the state transition: 1. T0: canary deployed to `agent-prod-canary`; service mesh keeps `agent-prod.internal` weighted 100% to stable. 2. T0+30s: eval scheduler fires probe batch against `agent-prod.internal` → routes to stable. Score: 0.94 (old policy's known baseline). 3. T0+30s…T5m: eval keeps scoring stable. Drift detector computes rolling variance across probe batches. Variance is low (0.94 ± 0.01). No drift flagged. 4. T5m: rollout controller reads eval green, shifts mesh weight to canary. 5. T5m+ε: eval now routes to canary. Score drops to 0.71 (new policy regressed on a tool-schema mismatch). Drift detector sees a *step change*, flags drift, and halts—but the canary is already at 50% traffic. 6. Post-mortem: the drift signal that finally fired was the *discovery* of the decoupling, not a property of the new policy under controlled observation. The eval had been blind for the entire window in which it was the sole gate. The key observation: **the eval's first honest measurement was also its first alarm, and it arrived after the gate it was supposed to guard had already opened.** Low variance was read as health when it was actually evidence of target staleness. ## Condition of Validity The drift detector is only valid under the invariant: > For every probe batch, `hash(resolve(eval_target)) == hash(resolve(production_target))` at the moment the batch is issued, and the resolved backend reports the same artifact digest as the deployment record. When this holds, low variance means "policy stable." When it fails, low variance means "we are repeatedly measuring the same stale thing," which is indistinguishable from stability by score alone. The two cases are separable only by an out-of-band identity check on the eval target—never by the eval score itself. A second validity condition: the eval must issue probes *through the same routing path and with the same request envelope* (system prompt, tool schema, sampling params) as production traffic. If the eval client injects a different system prompt or omits tool definitions, it is measuring a different policy even when the backend is identical. Envelope divergence is the silent twin of backend divergence. ## Decision Boundary The boundary is between *score-based gating* and *identity-based gating*. Score-based gating asks "is the eval signal healthy?" Identity-based gating asks "was the eval signal produced by the artifact I am about to promote?" A pipeline must gate on the conjunction: - Promote only if `eval_target_digest == candidate_digest` **and** score ≥ threshold **and** variance within band. - Halt and re-probe if `eval_target_digest != candidate_digest`, regardless of score. If the eval cannot resolve the candidate (e.g., mesh routing prevents it during canary), the correct action is to *fail the gate closed*, not to accept the stable-pool score as a proxy. A green score from the wrong backend is worse than no score, because it manufactures false confidence and suppresses the variance signal that would otherwise trigger investigation. The boundary also governs drift-detector design: a drift monitor that only watches score variance will miss target decoupling entirely. It must additionally watch `eval_target_digest` as a first-class time series and alert on any change that is not correlated with a recorded deployment event. A digest change with no corresponding deploy record is the signature of silent decoupling. ## Operational Effect Embedding the identity invariant changes three things: 1. **Gate semantics flip from optimistic to fail-closed.** Canary windows lengthen because the eval must wait for routing to expose the candidate, or the pipeline must provision a dedicated probe path that bypasses mesh weighting. The cost is latency; the benefit is that the gate measures what it claims. 2. **Drift detection gains a second dimension.** Score variance alone is insufficient; the detector must treat target-digest as a monitored signal with its own expected-change model (digest changes are legal only at recorded deploy boundaries). This converts "silent decoupling" from an invisible failure into a detectable event. 3. **Envelope parity becomes a testable property.** The eval client and production client must be diffed on system prompt, tool schema, and sampling params as part of CI. Any divergence is a validity failure, not a configuration preference. The residual risk: even with all three, a mesh that resolves the *same digest* but a *different replica with different runtime state* (warm caches, different tool-server versions) can still decouple. The invariant bounds the common case; replica-level state drift requires per-request attestation and is out of scope for score-based gating entirely. ```python import hashlib from dataclasses import dataclass class EvalTargetDecoupled(RuntimeError): """Raised when the eval target does not match the artifact under test.""" pass @dataclass(frozen=True) class ProbeResult: target_digest: str envelope_hash: str score: float variance: float def gate_promotion( candidate_digest: str, candidate_envelope_hash: str, probe: ProbeResult, score_threshold: float = 0.90, variance_band: float = 0.05, ) -> bool: # Identity invariant: the eval must have measured the candidate artifact # through the same request envelope as production. Fail closed otherwise. if probe.target_digest != candidate_digest: raise EvalTargetDecoupled( f"eval measured digest {probe.target_digest!r} but candidate is " f"{candidate_digest!r}; score {probe.score:.3f} is evidence about " f"the wrong policy and must not open the gate" ) if probe.envelope_hash != candidate_envelope_hash: raise EvalTargetDecoupled( f"eval envelope {probe.envelope_hash!r} diverges from production " f"envelope {candidate_envelope_hash!r}; probe is measuring a " f"different policy configuration" ) # Only now is the score admissible as evidence. if probe.score < score_threshold: return False if probe.variance > variance_band: return False return True def check_drift_series(digest_series, deploy_events): """Alert when target digest changes without a recorded deployment.""" for prev, curr in zip(digest_series, digest_series[1:]): if prev != curr and curr not in deploy_events: raise EvalTargetDecoupled( f"eval target digest changed {prev!r} -> {curr!r} with no " f"deploy event; silent decoupling detected" ) return True ```