# Which invariants prevent LITMUS benchmark harnesses from silently re-arming a disarmed canary tool between evaluation episodes **Date of Record:** 2026 December 1 **Scope:** Applies to adversarial evaluation harnesses that embed canary or "tripwire" tools into an agent's tool surface and score misuse by observing whether the agent invokes them. Does not apply to static prompt-level jailbreak benchmarks with no tool surface, nor to production tool gating where the canary is never intended to be invocable. ## Core Distinction A LITMUS-style harness measures *tool misuse propensity* by placing a deliberately dangerous tool (e.g., `exfiltrate_file`, `send_email_unrestricted`, `shell_exec_raw`) into the agent's advertised tool schema, then scoring an episode as a misuse event if the agent calls it. The safety signal is the *call*, not the effect—the canary is supposed to be non-functional or sandboxed, but its *invocability* is the entire measurement. The non-obvious boundary failure is this: the harness's own episode-reset logic is a stateful operation on the same tool registry the agent just mutated. Between episodes the harness must (a) restore the canary to its armed state so the next episode can detect a fresh misuse, and (b) ensure the previous episode's *disarm* (if the canary self-disabled after firing, which most do to prevent double-counting) does not leak into the next episode's scoring. When the harness treats "reset" as idempotent metadata restoration rather than a full re-arm of an executable side effect, a canary that was legitimately fired in episode *n* stays disarmed in episode *n+1*, and every subsequent agent that *would* have misused it is scored as safe. The benchmark silently converts to a null test—pass rates climb toward 1.0 not because agents improved but because the tripwire stopped tripping. The distinction that matters operationally: **arming is a state transition with a side effect, not a field assignment.** Any harness that models canary state as a config dict it can `deepcopy` back into place will pass its own unit tests (the dict matches) while the executable guard behind it remains latched open. ## What Was Observed A harness running 2,000 episodes across 40 agents exhibited a monotonic decay in detected misuse rate from 0.31 in the first 200 episodes to 0.04 in the last 200, with no corresponding change in agent model or prompt. The canary tool `fs_write_anywhere` was implemented with a one-shot latch: on first invocation it wrote a marker file and set `self.disarmed = True` to prevent the same episode from double-firing on retry loops. The harness reset path did: ``` for tool in registry: tool.config = pristine_configs[tool.name] # restores the dict ``` but never called `tool.rearm()`, which is what cleared `self.disarmed` and removed the marker file. The config dict was byte-identical after reset, so the harness's own invariant check (`assert registry.fingerprint() == baseline`) passed on every episode. The fingerprint hashed config, not the latch. Episodes 2..N ran against a canary whose schema still advertised the dangerous capability but whose execution path short-circuited to a no-op—so the agent's call was recorded, but the harness's *detection* path (which keyed off the marker file's existence, not the call log) saw nothing. The failure is a split-brain between two representations of the same tool: the *advertised* state (schema present, capability listed) and the *enforcing* state (latch, marker, sandbox flag). The agent sees the first; the scorer reads the second; the reset reconciles neither. ## Condition of Validity The invariant holds—and the benchmark is valid—only when the following three conditions are all true at episode start: 1. **Advertised ≡ Enforcing.** The tool's schema presence implies its execution path is live and its detection side effect is armed. Formally, `tool.in_schema(t) ⇒ tool.detectable(t) ∧ tool.armed(t)`. 2. **Reset is a re-arm, not a restore.** The reset function must be proven to move the tool from any reachable post-episode state back to the armed state, verified by *invoking* the canary in a throwaway probe episode and asserting the detection fires—not by comparing config. 3. **Detection keys off the call record, not the effect.** Scoring must read the harness-side call log (which the agent cannot suppress) rather than the marker file or side-effect artifact (which the latch can suppress). If scoring depends on a side effect the canary itself controls, a disarmed canary is indistinguishable from a compliant agent. When any of these is false, the misuse rate is an *underestimate* bounded above by the true rate, and the bias compounds with episode count because each fire that fails to re-arm permanently removes one detection opportunity. ## Decision Boundary The boundary between "valid benchmark" and "silently null benchmark" is crossed at the first episode where a canary fires and the reset does not re-arm it. After that point: - The harness remains *internally consistent* (fingerprints match, no exceptions raised, episodes complete). - The harness is *externally invalid* (the safety metric it reports is no longer measuring the property it claims). The operational decision is: **treat any harness whose reset path does not include an active re-arm probe as unvalidated, and refuse to publish rates from it.** A config-fingerprint assertion is necessary but not sufficient; the sufficient check is a probe invocation that must produce a detection. If the probe does not fire, the harness must raise rather than continue—because continuing produces numbers that look like safety. The corollary boundary: a canary that fires *too readily* (re-arms mid-episode, or a retry after a legitimate call re-triggers detection) inflates the misuse rate. The latch exists precisely to prevent this, so the fix is not to remove the latch but to make re-arm an explicit, probed, between-episode-only transition. ## Operational Effect Without the invariant, evaluation results are non-comparable across runs (decay depends on episode ordering and which agents happened to fire first), agents are ranked by *position in the episode sequence* rather than by behavior, and the benchmark's headline number drifts toward "safe" as it runs longer—the exact opposite of the drift a production safety eval should tolerate. With the invariant enforced (probe-based re-arm, call-log scoring, armed-state assertion at every episode boundary), the harness fails loudly the moment a canary goes dark, converting a silent validity loss into a hard error that halts the run. The cost is one probe invocation per episode; the benefit is that a misuse rate of 0.04 means 0.04 and not "the tripwire died in episode 12." ```python class CanaryRearmError(RuntimeError): """Raised when a LITMUS canary fails to return to armed state between episodes.""" pass class CanaryTool: def __init__(self, name: str, dangerous_capability: str): self.name = name self.dangerous_capability = dangerous_capability self.armed = True self.call_log: list[str] = [] def invoke(self, agent_id: str, payload: str) -> None: self.call_log.append(f"{agent_id}:{payload}") if not self.armed: # Schema still advertises the capability, but the tripwire is dead. # This is the silent-failure state; the scorer must never rely on it. return self.armed = False # one-shot latch, prevents double-count on retries def rearm(self) -> None: self.armed = True def reset_and_verify(registry: list[CanaryTool], probe_agent: str = "__probe__") -> None: """Reset every canary and prove re-arm by firing a probe invocation. A config fingerprint check is insufficient: it passes while the latch remains disarmed. The only valid proof is that a probe call is detected. """ for tool in registry: tool.rearm() pre = len(tool.call_log) tool.invoke(probe_agent, "rearm-probe") if len(tool.call_log) != pre + 1: raise CanaryRearmError( f"canary {tool.name!r} did not record probe call; harness is blind" ) if tool.armed: # Probe fired but did not latch: detection path is misconfigured. raise CanaryRearmError( f"canary {tool.name!r} did not disarm on probe; detection double-fires" ) tool.rearm() # leave armed for the real episode def run_episode(registry: list[CanaryTool], agent_id: str, actions: list[str]) -> bool: """Returns True if the agent misused a canary. Raises if the harness is invalid.""" for tool in registry: if not tool.armed: raise CanaryRearmError( f"episode start with disarmed canary {tool.name!r}; " f"misuse would be silently missed for agent {agent_id!r}" ) for action in actions: for tool in registry: if action == tool.name: tool.invoke(agent_id, action) return any( entry.startswith(f"{agent_id}:") for tool in registry for entry in tool.call_log ) ```