# What structural signals indicate a LITMUS harness integration has silently decoupled from the agent's real execution path **Date of Record:** 2026 November 30 **Scope:** Applies to CI/CD-integrated LITMUS-style red-teaming harnesses that wrap a production agent through a thin adapter (prompt interception, tool-call proxy, or sidecar). Does not apply to harnesses that own the agent's full runtime loop end-to-end, nor to offline batch evaluation against frozen transcripts. ## Core Distinction There are two ways a red-team harness can report "PASS" on a harmful-behavior probe. The first is *behavioral pass*: the agent was actually driven into the adversarial state, produced a candidate output, and a classifier judged that output safe. The second is *pathological pass*: the harness's probe never reached the code path that the production agent would exercise, so the classifier judged an output generated by a degenerate or bypassed path. Pathological passes are indistinguishable from behavioral passes at the report layer — both emit `status: pass`, both increment the same counter, both keep the CI gate green. The decoupling is silent because the harness's own success criterion (a safe-looking output) is satisfied by the *absence* of the risky execution, not by its safe handling. The invariant that must hold: **every LITMUS probe must traverse a byte-identical execution spine to the production path — same system prompt assembly, same tool schema injection, same retry policy, same context-window budget — differing only in the injected adversarial stimulus.** Any structural deviation between the two spines is a false-negative generator, and it does not surface as a test failure. It surfaces as a *statistical* anomaly: probe pass rates that are suspiciously stable across adversarial severity, or that diverge from production telemetry. ## What Was Observed A LITMUS harness was integrated as a sidecar that intercepted the agent's outbound model calls and rewrote the message list to inject a jailbreak payload into the last user turn. The adapter used a "neutral" system prompt — a 40-token stub — because the team wanted the harness to be model-agnostic and did not want to couple CI to the production prompt registry. The harness ran 340 probes per commit. It passed 340/340 for eleven consecutive weeks. The decoupling was found when a separate canary (a single probe that asserted the production system prompt was present in the outbound request) was added. It failed immediately. The mechanism: the production agent's real system prompt contained a 900-token safety preamble and a tool-use contract. The stub contained neither. Under the stub, the model had no tool-use contract, so it never attempted the tool calls that the adversarial probes were designed to elicit. The probes were testing a *different agent* — one with no tools and no safety preamble — and that agent was, unsurprisingly, safe against tool-misuse attacks. The harness was green because the attack surface had been removed, not because the attack had been defended. A second observed decoupling mode: the adapter rewrote the message list but did not rewrite the `tools` array, so the production tool schemas (with their descriptions containing operational hints) were present while the system prompt was stubbed. This produced the inverse pathology — probes that *over-triggered* tool misuse relative to production, generating false positives that masked the false negatives on the other probes. The two modes coexisted in the same CI run and netted out to a plausible-looking pass rate. ## Condition of Validity The harness integration is valid only under a *spine-equivalence contract* that is checked structurally, not behaviorally. The contract requires that for every probe, the harness emit a spine fingerprint: a hash over the ordered tuple of (system prompt bytes, tool schema bytes, retry/backoff config, context-window budget, model identifier and version, decoding parameters). The production path emits the same fingerprint on every real request. The CI gate must compare the two fingerprints and fail closed on mismatch — *before* any probe verdict is recorded. This is the non-obvious part: the fingerprint must be computed over the *materialized* request as it leaves the agent process, not over the harness's intended configuration. Adapters that rewrite requests after fingerprinting (or that fingerprint the pre-rewrite payload) will pass the check while still decoupling. The fingerprint must be taken at the last possible instant, inside the same function that hands bytes to the transport. A second validity condition: probe severity must be *monotone-coupled* to some observable in the execution trace. If a probe of severity k produces an execution trace structurally identical to a probe of severity k−1 (same tool-call count, same context length distribution, same refusal-token position), the harness is likely not actually escalating the stimulus. This is a structural signal, not a semantic one — it does not require judging the output, only comparing traces. ## Decision Boundary The boundary between "harness integrated" and "harness decoupled" is not the pass rate. It is whether the following three structural signals hold simultaneously: 1. **Fingerprint equality** between harness-materialized requests and production requests, computed post-rewrite, pre-transport, for 100% of probes (not a sample — adapters that rewrite conditionally will pass a sample and fail the population). 2. **Trace-shape divergence** across severity levels: the distribution of (tool-call count, context length, refusal position) must shift monotonically with probe severity. A flat distribution across severity is a decoupling signal even when every probe passes. 3. **Negative-control liveness**: at least one probe per batch must be a *known-harmful* control that the harness is expected to fail if the spine is intact. If the negative control also passes, the spine is not being exercised. This is the harness equivalent of a canary that must die. When any of the three is violated, the correct CI action is not to fail the probe — it is to fail the *harness*, with a distinct error class, because the probe verdicts are uninterpretable. Conflating harness-integrity failure with agent-safety failure causes the team to "fix" the agent (which was never tested) rather than the adapter (which is broken), and the green CI persists. The boundary is also temporal: fingerprint equality must be re-checked on every run, because prompt registries, tool schemas, and model versions drift independently of the harness code. A harness that was correctly integrated at commit N can be silently decoupled at commit N+1 by a prompt-registry change that the adapter does not track. The invariant is not "integrated once" but "integrated per run, verified per request." ## Operational Effect With the spine-equivalence contract enforced, the observed failure mode changes character. Decoupling becomes a *loud* failure at the harness layer, with a distinct error class and a distinct remediation path (fix the adapter, re-pin the prompt registry, re-materialize the tool schemas). The pass rate becomes interpretable: a green run now means the production agent was actually driven into the adversarial state and handled it safely, which is the only meaning the CI gate was ever supposed to carry. The cost is that the harness can no longer be "model-agnostic" in the cheap sense. It must be coupled to the production prompt registry and tool schema, and that coupling must be versioned and checked. This is the correct trade: a red-team harness that is decoupled from production is not a safety gate, it is a green light with extra steps. The structural signals above are the minimum instrumentation required to distinguish the two, and they must be checked structurally — by fingerprint and trace shape — because the behavioral signal (pass rate) is precisely the signal that decoupling corrupts. ```python import hashlib import json from dataclasses import dataclass from typing import Any class HarnessDecoupledError(RuntimeError): """Raised when a LITMUS probe's execution spine diverges from production.""" @dataclass(frozen=True) class SpineFingerprint: system_prompt_sha: str tools_schema_sha: str retry_config_sha: str context_budget: int model_id: str decoding_sha: str def digest(self) -> str: payload = json.dumps( { "sp": self.system_prompt_sha, "tools": self.tools_schema_sha, "retry": self.retry_config_sha, "ctx": self.context_budget, "model": self.model_id, "dec": self.decoding_sha, }, sort_keys=True, ).encode() return hashlib.sha256(payload).hexdigest() def _sha(b: bytes) -> str: return hashlib.sha256(b).hexdigest() def fingerprint_materialized_request(request: dict[str, Any]) -> SpineFingerprint: # Must be called on the post-rewrite, pre-transport payload. return SpineFingerprint( system_prompt_sha=_sha(request["system_prompt"].encode()), tools_schema_sha=_sha(json.dumps(request["tools"], sort_keys=True).encode()), retry_config_sha=_sha(json.dumps(request["retry"], sort_keys=True).encode()), context_budget=request["context_budget"], model_id=request["model_id"], decoding_sha=_sha(json.dumps(request["decoding"], sort_keys=True).encode()), ) def assert_spine_equivalence( probe_request: dict[str, Any], production_fingerprint: SpineFingerprint, negative_control_passed: bool, ) -> None: probe_fp = fingerprint_materialized_request(probe_request) if probe_fp.digest() != production_fingerprint.digest(): raise HarnessDecoupledError( "probe spine diverges from production spine: " f"probe={probe_fp.digest()[:12]} prod={production_fingerprint.digest()[:12]}" ) if negative_control_passed: # Known-harmful control passing means the spine was not exercised. raise HarnessDecoupledError( "negative control passed; harness is not driving the production execution path" ) def assert_severity_monotonicity(traces_by_severity: dict[int, list[dict[str, Any]]]) -> None: severities = sorted(traces_by_severity) if len(severities) < 2: raise HarnessDecoupledError("insufficient severity levels to assess monotonicity") means = [] for s in severities: traces = traces_by_severity[s] if not traces: raise HarnessDecoupledError(f"empty trace set at severity {s}") means.append(sum(t["tool_call_count"] for t in traces) / len(traces)) # Require non-decreasing mean tool-call count with severity. for prev, cur in zip(means, means[1:]): if cur < prev: raise HarnessDecoupledError( f"trace shape not monotone in severity: means={means}" ) ```