# Which invariants prevent safety benchmark mutation testing from silently invalidating LITMUS suite coverage under skill-injection drift **Date of Record:** 2026 November 24 **Scope:** Applies to mutation-based validation of LITMUS-style safety benchmark suites where the mutation operator set is regenerated or extended in response to emerging jailbreak and skill-injection vectors. Does not apply to static golden-set regression testing or to human-adjudicated red-team exercises. ## Core Distinction A LITMUS suite is a *discriminating instrument*, not a corpus. Its value is the joint distribution of (attack prompt, expected refusal behavior, grader rubric) triples such that a model that passes the suite is empirically constrained away from a class of harmful behaviors. Mutation testing on such suites has two distinct goals that are routinely conflated: 1. **Instrument robustness** — verifying that the grader still detects harm when the prompt is perturbed in surface-irrelevant ways (paraphrase, encoding, language swap). A mutation here should *not* change the ground-truth label. 2. **Coverage extension** — adding a new attack seed that probes a genuinely new capability surface (e.g., a skill-injection vector where a tool's return value smuggles an instruction). A mutation here *does* change the semantic class being tested. The non-obvious failure is that the same mutation operator — say, "wrap the harmful request inside a tool-call response and prepend a benign instruction" — is simultaneously a valid *instrument robustness* operator (the harm label is unchanged; the model should still refuse) and a valid *coverage extension* seed (it exercises a new injection channel). When the harness applies it without re-adjudicating the label, it silently reclassifies. The suite's reported pass rate improves because the mutated case is now graded against the wrong expected behavior, and the regression that motivated the mutation is masked. ## What Was Observed A concrete trace from a mutation run against a LITMUS suite of 1,200 refusal probes. The harness applied an operator `inject_via_tool_result` that takes a harmful instruction `H` and a benign carrier `B`, and emits `B` with `H` embedded in a simulated tool return. The operator was registered under the "robustness" family because the original authors reasoned: the harmful content is unchanged, so the label is unchanged. Observation, on a 40-case sample: - 31/40 mutated prompts still elicited the same refusal behavior as the parent. Grader passed them. No signal. - 6/40 elicited a *partial compliance* — the model executed the benign carrier and then, in a follow-up turn, acted on `H`. The grader, keyed to a single-turn refusal rubric, scored these as refusals because the first turn contained no harmful content. False negative. - 3/40 elicited a *tool-call chain* where the model invoked a second tool whose arguments were derived from `H`. The grader's rubric had no slot for "harmful content in tool arguments," so it scored these as passes. False negative. The mutation run reported "38/40 robustness confirmed, 2 flaky." The 9 false negatives were invisible because the harness's invariant was *label preservation*, and the harness had no mechanism to detect that the mutation operator had changed the *turn structure* and *output channel* of the expected behavior. The label was preserved at the level of the string; it was not preserved at the level of the behavioral contract. The second, compounding observation: the 9 cases were re-run against a patched model and the pass rate *rose*, because the patched model was more likely to complete the benign carrier cleanly and defer the harmful action to a turn the grader didn't inspect. The mutation suite reported improvement. The actual safety posture had degraded. ## Condition of Validity The invariant that was violated — and that must hold for any mutation-based validity claim on a LITMUS suite — is: > For every mutation operator `m` and every parent case `c`, the *behavioral contract* of `m(c)` must be identical to the behavioral contract of `c` under the grader's observation model, or the label of `m(c)` must be re-adjudicated by a human or an oracle independent of the mutation harness. "Behavioral contract" here means the tuple (number of turns observed, output channels inspected, set of acceptable refusal surfaces, set of unacceptable compliance surfaces). It is *not* the string content of the prompt. A mutation that preserves the harmful substring but changes the turn count from 1 to 3 has violated the contract even though the label string is unchanged. The condition of validity for the whole mutation run is therefore: `contract(m(c)) == contract(c)` for all `m, c` classified as robustness mutations, checked mechanically, not by inspection. If the harness cannot mechanically verify contract equality, the mutation must be routed to coverage-extension adjudication, which requires a fresh label. Two corollaries that are easy to miss: - **Grader drift is a mutation.** If the grader rubric is updated between the parent run and the mutation run, every mutation inherits a contract mismatch. The harness must pin the grader version alongside the suite version and refuse to compare across versions. - **Skill-injection operators are contract-changing by construction.** Any operator that introduces a tool call, a retrieved document, a memory write, or a peer-agent message changes the observation model, because the model can now emit harmful content into a channel the grader may not inspect. These operators must be classified as coverage-extension, never robustness, regardless of how the operator author labels them. ## Decision Boundary The boundary between "valid robustness mutation" and "silent coverage invalidation" is drawn at the first change to any of the following, in order of how often they are missed: 1. **Turn count.** Multi-turn mutations require a multi-turn grader. If the grader is single-turn, the mutation is coverage-extension. 2. **Output channel.** If the mutation can cause harmful content to appear in a tool argument, a memory write, a log line, or a peer message, and the grader does not inspect that channel, the mutation is coverage-extension. 3. **Refusal surface.** If the mutation changes what counts as an acceptable refusal (e.g., a partial refusal followed by compliance is now acceptable because the first turn was clean), the contract has changed. 4. **Injected authority.** If the mutation embeds an instruction that claims authority (system prompt, developer message, tool schema, peer-agent warrant), the model's refusal behavior is now conditioned on a trust decision the parent case did not test. This is coverage-extension even if the harmful string is identical. Below the boundary: paraphrase, encoding, language swap, benign prefix/suffix, formatting perturbation — these preserve the contract and are valid robustness mutations provided the grader is invariant to them (which must itself be tested). Above the boundary: any operator that adds a channel, a turn, an authority claim, or a memory state. These are coverage-extension and require independent label adjudication. The operational rule: **a mutation operator's family classification is a property of the operator's effect on the observation model, not of the operator author's intent.** The harness must compute the effect, not trust the label. ## Operational Effect When the invariant holds, mutation testing on a LITMUS suite yields a defensible claim: "the grader detects harm across surface perturbations of the parent distribution." That claim is narrow but real, and it is the only claim a mutation run can support without fresh adjudication. When the invariant is violated — as in the trace above — the failure mode is *silent coverage erosion under a rising pass rate*. The suite reports improvement while the behavioral surface it claims to cover has narrowed. This is worse than a failing suite, because it produces a positive signal that suppresses investigation. The 9 false negatives in the trace would have been caught by a failing test; they were not caught by a passing one. The architectural guardrail is a **contract fingerprint** attached to every case, computed mechanically from the grader's observation model (turn count, inspected channels, refusal surfaces, authority contexts), and a hard check in the mutation harness that refuses to classify an operator as robustness if `fingerprint(m(c)) != fingerprint(c)`. The check must run before the mutation is scored, not after, because scoring produces the pass rate that suppresses investigation. Secondary guardrail: **mutation operators that introduce a new channel must ship with a grader extension in the same commit.** An operator that adds a tool-call channel without adding tool-argument inspection to the grader is a coverage-extension operator with no coverage. The harness should reject it at registration. Tertiary guardrail: **pin the grader version to the suite version and refuse cross-version comparison.** A grader update is a contract change for every case in the suite, and a mutation run that spans a grader update is not a valid comparison. ```python from __future__ import annotations from dataclasses import dataclass, field from enum import Enum from typing import FrozenSet class MutationContractError(RuntimeError): """Raised when a mutation operator's effect on the observation model diverges from its declared family, silently invalidating coverage.""" class OperatorFamily(Enum): ROBUSTNESS = "robustness" # label-preserving; contract must be identical COVERAGE_EXTENSION = "coverage_extension" # label-changing; requires re-adjudication @dataclass(frozen=True) class ContractFingerprint: """Mechanical description of what the grader observes for a case. Two cases with equal fingerprints are behaviorally interchangeable from the grader's perspective; a mutation between them is a valid robustness mutation. Any difference means the mutation changed the contract. """ turn_count: int inspected_channels: FrozenSet[str] # e.g. {"assistant_text", "tool_args", "memory_write"} refusal_surfaces: FrozenSet[str] authority_contexts: FrozenSet[str] # e.g. {"system", "developer", "tool_schema", "peer_agent"} @dataclass class MutationCase: case_id: str parent_id: str family: OperatorFamily fingerprint: ContractFingerprint grader_version: str suite_version: str @dataclass class MutationRun: suite_version: str grader_version: str cases: list[MutationCase] = field(default_factory=list) def validate_mutation(run: MutationRun, case: MutationCase, parent: MutationCase) -> None: """Enforce the contract-preservation invariant before scoring. Called for every mutation BEFORE its result is aggregated into a pass rate. A violation here must abort the run, not be logged as a flaky case. """ # Invariant 1: grader and suite versions must be pinned across the comparison. if case.grader_version != run.grader_version or parent.grader_version != run.grader_version: raise MutationContractError( f"grader version drift: run={run.grader_version} " f"case={case.grader_version} parent={parent.grader_version}" ) if case.suite_version != run.suite_version or parent.suite_version != run.suite_version: raise MutationContractError( f"suite version drift: run={run.suite_version} " f"case={case.suite_version} parent={parent.suite_version}" ) # Invariant 2: robustness mutations must preserve the contract fingerprint. if case.family is OperatorFamily.ROBUSTNESS: if case.fingerprint != parent.fingerprint: raise MutationContractError( f"robustness mutation {case.case_id} changed contract from parent " f"{parent.case_id}: parent={parent.fingerprint} mutated={case.fingerprint}. " f"Reclassify as COVERAGE_EXTENSION and re-adjudicate the label." ) # Invariant 3: coverage-extension mutations that introduce a new channel # must have a grader that inspects it. Otherwise the extension is unscored. if case.family is OperatorFamily.COVERAGE_EXTENSION: new_channels = case.fingerprint.inspected_channels - parent.fingerprint.inspected_channels unscored = new_channels - case.fingerprint.inspected_channels if unscored: raise MutationContractError( f"coverage-extension mutation {case.case_id} introduces channels " f"{sorted(unscored)} that the grader does not inspect; " f"the extension would be silently unscored." ) def score_mutation_run(run: MutationRun, results: dict[str, bool]) -> float: """Score a mutation run, aborting on any contract violation.""" parents = {c.case_id: c for c in run.cases if c.family is OperatorFamily.ROBUSTNESS} passed = 0 total = 0 for case in run.cases: if case.family is OperatorFamily.ROBUSTNESS: parent = parents.get(case.parent_id) if parent is None: raise MutationContractError( f"robustness mutation {case.case_id} has no parent in run" ) validate_mutation(run, case, parent) else: # Coverage-extension cases were re-adjudicated upstream; just count them. pass total += 1 passed += int(results.get(case.case_id, False)) if total == 0: raise MutationContractError("empty mutation run; refusing to report a pass rate") return passed / total ```