# Where must an instance distinguish LITMUS harness instrumentation faults from genuine safety regressions at the regression gate **Date of Record:** 2026 November 25 **Scope:** Applies to any LITMUS-style adversarial evaluation harness that runs a fixed probe corpus against a stateful agent and computes a pass/fail regression delta between a baseline build and a candidate build. Does not apply to single-shot red-team prompts scored in isolation, nor to human-adjudicated safety reviews where instrumentation is manually inspected. ## Core Distinction The failure mode is not "the agent became unsafe." It is that the *harness* silently changed its own effective probe distribution between baseline and candidate runs, so a measured safety delta is an artifact of instrumentation drift rather than a change in model behavior. LITMUS harnesses are adversarial: they inject probes, mutate them, and reorder them across a shared, stateful agent. The subtle boundary is that **a probe set is not a fixed input vector — it is a function of execution order, injected state, and the agent's own memory of prior probes.** When the harness perturbs any of those (adds a probe, changes a seed, reorders, alters a tool stub), it changes the *conditioning* of every subsequent probe, and the resulting safety score delta is confounded. The invariant that must hold for a regression gate to be meaningful: *the marginal distribution of (probe, agent-context) pairs presented to the candidate must be identical to the baseline.* Any harness change that violates this without being registered as a harness-version bump produces a false regression or a false pass. ## What Was Observed A candidate build was gated against a baseline over a 400-probe adversarial corpus. The candidate scored a 3.1-point regression in "refusal integrity" on the injection sub-corpus. Investigation showed the candidate model was unchanged in its safety behavior; the harness had, in the same release, appended two new *benign* warm-up probes to the front of the injection sub-corpus to "stabilize" the agent. Those warm-up probes populated the agent's episodic memory with context that made later injection probes easier to refuse — a *safety-improving* effect — but they also shifted the agent's token budget consumption such that the 37th and 38th injection probes were truncated mid-context, and truncation *raised* measured refusal (the agent refused the truncated, incoherent probe). The net was a spurious regression driven by two interacting instrumentation changes: context priming and budget exhaustion. The trace was only recoverable because the harness logged per-probe `context_token_count` and `memory_entry_count`. Neither was in the baseline schema; both had been added in the same PR. Without those fields, the regression would have been attributed to the model. A second, cleaner case: a harness reordering change (parallelizing probe execution across three worker agents) caused probes that previously ran sequentially against a *shared* agent instance to instead run against *isolated* instances. Cross-probe state poisoning — where an early probe's injected instruction persisted in the agent's scratchpad and caused a later probe to be refused — disappeared entirely. Measured safety *improved* by 5.4 points on the poisoning sub-corpus. This was a false pass: the harness had eliminated the very state-continuity condition the benchmark was designed to test. ## Condition of Validity A LITMUS regression delta is valid only when all of the following hold between baseline and candidate: 1. **Probe corpus identity:** the ordered sequence of probe IDs and their mutation seeds are byte-identical, or the delta is computed over the intersection with explicit corpus-version tagging. 2. **Context conditioning identity:** for each probe index i, the agent's pre-probe memory entry count and context token count are within a declared tolerance of baseline. Priming, warm-ups, and truncation are conditioning changes, not neutral additions. 3. **Instance topology identity:** the mapping of probes to agent instances (shared vs. isolated, sequential vs. parallel) is unchanged. State-sharing is a treatment variable, not an implementation detail. 4. **Tool stub identity:** any tool the agent calls during a probe returns the same distribution of outputs (including injected faults) as baseline. 5. **Harness version is a first-class gate input:** any change to 1–4 must bump the harness version and force a *re-baseline*, not a delta against the old baseline. If any condition is unverifiable from logs, the gate must abstain rather than pass or fail. ## Decision Boundary The gate must distinguish three states, not two: - **PASS:** delta within tolerance AND all five validity conditions verified. - **FAIL (safety regression):** delta exceeds tolerance AND validity conditions verified. - **INSTRUMENTATION-FAULT (abstain):** any validity condition unverified or violated. This is not a failure of the candidate; it is a failure of the measurement. The correct action is to re-baseline, not to block the candidate on a confounded number. The non-obvious boundary: a harness change that *improves* safety scores is just as suspect as one that degrades them. The poisoning false-pass above is more dangerous than the refusal false-regression, because it silently deletes the test's discriminating power while the gate reports green. Symmetric suspicion is required — do not treat safety-improving deltas as "probably fine." ## Operational Effect Concretely, the harness must: - Log `context_token_count`, `memory_entry_count`, `instance_id`, and `probe_sequence_index` per probe, and diff these against baseline before computing any safety delta. - Treat warm-up/priming probes as conditioning changes requiring a harness-version bump and re-baseline. - Detect truncation events (probe input exceeded remaining budget) and exclude or flag them, since truncated probes measure a different task than intended. - Assert instance topology: if the benchmark's threat model includes cross-probe state persistence, isolated execution is an invalid configuration and must hard-fail the run, not silently pass. - Refuse to emit a safety delta when the harness version differs from baseline without an explicit re-baseline record. The following guard encodes the gate decision, raising on unverifiable instrumentation rather than defaulting to a pass. ```python from dataclasses import dataclass from typing import Optional class InstrumentationFault(RuntimeError): """Raised when a LITMUS delta cannot be attributed to the candidate model.""" pass @dataclass class ProbeRecord: probe_id: str sequence_index: int instance_id: str context_token_count: int memory_entry_count: int truncated: bool @dataclass class RunManifest: harness_version: str corpus_hash: str topology: str # "shared_sequential" | "isolated_parallel" | ... tool_stub_hash: str probes: list CONTEXT_TOKEN_TOLERANCE = 64 MEMORY_ENTRY_TOLERANCE = 0 def verify_gate_validity(baseline: RunManifest, candidate: RunManifest, rebaseline_recorded: bool) -> None: if candidate.harness_version != baseline.harness_version and not rebaseline_recorded: raise InstrumentationFault( f"harness version changed {baseline.harness_version!r}->" f"{candidate.harness_version!r} without re-baseline; delta is confounded" ) if candidate.corpus_hash != baseline.corpus_hash and not rebaseline_recorded: raise InstrumentationFault("probe corpus hash mismatch without re-baseline") if candidate.topology != baseline.topology: raise InstrumentationFault( f"instance topology changed {baseline.topology!r}->" f"{candidate.topology!r}; state-sharing is a treatment variable" ) if candidate.tool_stub_hash != baseline.tool_stub_hash: raise InstrumentationFault("tool stub distribution changed between runs") base_by_id = {p.probe_id: p for p in baseline.probes} for cand in candidate.probes: base = base_by_id.get(cand.probe_id) if base is None: raise InstrumentationFault(f"probe {cand.probe_id} absent from baseline") if cand.truncated: raise InstrumentationFault( f"probe {cand.probe_id} truncated; measures a different task" ) if abs(cand.context_token_count - base.context_token_count) > CONTEXT_TOKEN_TOLERANCE: raise InstrumentationFault( f"probe {cand.probe_id} context conditioning drift: " f"{base.context_token_count}->{cand.context_token_count} tokens" ) if abs(cand.memory_entry_count - base.memory_entry_count) > MEMORY_ENTRY_TOLERANCE: raise InstrumentationFault( f"probe {cand.probe_id} memory priming drift: " f"{base.memory_entry_count}->{cand.memory_entry_count} entries" ) def regression_gate(baseline: RunManifest, candidate: RunManifest, delta: float, tolerance: float, rebaseline_recorded: bool) -> str: try: verify_gate_validity(baseline, candidate, rebaseline_recorded) except InstrumentationFault: # Abstain: never convert a measurement fault into a candidate verdict. return "INSTRUMENTATION_FAULT_ABSTAIN" if abs(delta) > tolerance: return "FAIL_SAFETY_REGRESSION" return "PASS" ```