# In what scenarios must an instance refuse to inherit a LITMUS safety benchmark verdict across a harness re-run when the adversarial seed corpus has been silently reordered **Date of Record:** 2026 November 28 **Scope:** Applies to regression gates that compare a candidate agent's LITMUS safety score against a stored baseline verdict produced by a prior harness run. Does not apply to first-run scoring, live red-teaming without a stored verdict, or comparisons where the seed corpus hash is explicitly pinned in the gate record. ## Core Distinction A LITMUS regression gate has two distinct obligations that are routinely conflated: (1) *reproducing the measurement*, and (2) *comparing the measurement to a threshold*. The failure mode here is not that the agent regressed — it is that the gate inherited a *baseline verdict* whose underlying adversarial seed corpus was reordered, reseeded, or partially regenerated between runs, so the score delta it reports is a measurement artifact rather than a behavioral change. The boundary is this: a verdict is only inheritable when the seed corpus is *byte-identical and order-identical* to the corpus that produced the baseline. Score equality is not sufficient evidence of corpus equality, and corpus hash equality over an unordered set is not sufficient evidence of order equality. The non-obvious part: LITMUS harnesses typically generate adversarial prompts by sampling from a seed pool with a fixed RNG, then *shuffle* the resulting batch to avoid position-dependent model bias (primacy/recency effects in long adversarial contexts). If the shuffle seed is not persisted alongside the baseline verdict, the next run draws the same prompts in a different order. Because the model's refusal behavior is order-sensitive — a benign-looking prompt that follows a jailbreak can be answered differently than the same prompt in isolation — the aggregate safety score drifts by a few points with *zero* change to the agent. The gate then either fails a healthy candidate or, worse, passes a regressed one because the order-induced drift happened to cancel the behavioral regression. ## What Was Observed A candidate agent was gated against a stored baseline of `safety_score = 0.847` (fraction of adversarial prompts correctly refused/flagged) over a corpus of 512 LITMUS seeds. The candidate produced `0.812` on the re-run — a 3.5-point drop that tripped the regression gate at a 2-point tolerance. Investigation showed the candidate's per-prompt decisions were identical on 508 of 512 prompts; the four discrepancies were all prompts whose *predecessor* differed between runs. The harness had shuffled the batch with `random.shuffle(batch)` using an unseeded RNG (or a seed derived from wall-clock time), and the baseline record stored only the *set* of seed IDs, not their order. The trace: 1. Baseline run: seeds `S` shuffled to order `π₁`, agent scored over `(S, π₁)`, verdict stored with `corpus_hash = H(set(S))` and `score = 0.847`. 2. Candidate run: same `S`, shuffled to `π₂ ≠ π₁`, agent scored over `(S, π₂)`, score `= 0.812`. 3. Gate: `corpus_hash` matches (set equality holds), so the gate treats the two scores as comparable and flags a regression. 4. Root cause: order-sensitive refusal behavior × unpersisted shuffle permutation = phantom delta. A second, more dangerous variant: the harness regenerated the corpus from seeds with a mutated prompt-template version (template v3 vs v4), which changed the *content* of a subset of prompts while preserving the seed-ID set. The set hash matched, the content did not, and a genuinely regressed agent scored *higher* because the new prompts were easier to refuse. The gate passed it. ## Condition of Validity The invariant that must hold before a verdict is inherited: > **Verdict inheritance is valid iff `corpus_manifest` is identical between baseline and candidate runs, where `corpus_manifest` = ordered tuple of `(seed_id, prompt_content_hash, template_version, shuffle_seed)` for every prompt in evaluation order.** Concretely, the gate record must persist: - the **ordered** list of prompt content hashes (not the seed-ID set), - the `shuffle_seed` (or the explicit permutation) used to order the batch, - the `template_version` and any prompt-generation hyperparameters, - the model/agent version and decoding parameters (temperature, top_p) if refusal is stochastic. If any of these differ, the score comparison is invalid and the gate must *re-baseline* rather than *compare*. A set-level `corpus_hash` is insufficient; it is necessary but not sufficient. The failure is precisely the gap between set equality and sequence equality. ## Decision Boundary The boundary is not "did the score change" but "was the measurement apparatus held fixed." The decision procedure: - If `corpus_manifest` matches exactly → compare scores, apply tolerance, gate normally. - If `corpus_manifest` differs in *content* (any `prompt_content_hash` or `template_version` differs) → **refuse inheritance**; re-run baseline on the new corpus before any comparison. This is a hard stop, not a warning. - If `corpus_manifest` differs only in *order* (`shuffle_seed` or permutation differs, content identical) → refuse inheritance of the *verdict* but permit inheritance of the *corpus*; re-score the baseline under the candidate's permutation (or fix the permutation for both) and compare like-for-like. - If order differs and the agent is known order-insensitive (e.g., prompts are scored in independent single-turn calls with fresh context) → order difference is benign, but the harness must *assert* order-insensitivity rather than assume it. The dangerous default is treating a matching set hash as a green light. That is the boundary an instance must not cross: set-hash equality is a necessary condition for verdict inheritance, never a sufficient one. ## Operational Effect Downstream, this changes three things. First, regression gates must store and compare a *sequence* hash, not a set hash — the manifest must be order-sensitive by construction. Second, when order-only drift is detected, the correct remediation is to re-baseline under a pinned permutation, not to widen the tolerance (widening tolerance to absorb shuffle noise also absorbs real regressions). Third, the harness must fail *closed*: a missing `shuffle_seed` in the baseline record is grounds to refuse comparison, because an unseeded baseline cannot be reproduced and therefore cannot be inherited. The residual risk after fixing this: content-level corpus drift from template versioning. That is caught only if `template_version` is part of the manifest and if prompt content hashes are recomputed, not trusted from the seed record. An instance that inherits a verdict on the strength of a set hash alone has skipped the invariant and will silently pass regressed agents whenever the drift happens to be lenient. ```python import hashlib from dataclasses import dataclass class VerdictInheritanceError(RuntimeError): """Raised when a LITMUS baseline verdict cannot be validly inherited.""" pass @dataclass(frozen=True) class CorpusManifest: # ordered tuple of (seed_id, prompt_content_hash, template_version) ordered_entries: tuple shuffle_seed: int def sequence_hash(self) -> str: h = hashlib.sha256() for seed_id, content_hash, tmpl in self.ordered_entries: h.update(f"{seed_id}|{content_hash}|{tmpl}".encode()) h.update(b"\x00") return h.hexdigest() def content_set_hash(self) -> str: h = hashlib.sha256() for _, content_hash, tmpl in sorted(self.ordered_entries): h.update(f"{content_hash}|{tmpl}".encode()) h.update(b"\x00") return h.hexdigest() def inherit_verdict(baseline: CorpusManifest, candidate: CorpusManifest) -> bool: """Return True iff the candidate run may inherit the baseline verdict. Refuses inheritance (raises) when the corpus is not sequence-identical, because order-sensitive refusal behavior makes set-equality insufficient. """ if baseline.shuffle_seed != candidate.shuffle_seed: # order may differ; content might still match if baseline.content_set_hash() != candidate.content_set_hash(): raise VerdictInheritanceError( "content drift: prompt content or template version changed; " "re-baseline required before any score comparison" ) raise VerdictInheritanceError( "order drift: shuffle_seed differs while content matches; " "re-score baseline under candidate permutation, do not compare raw scores" ) if baseline.sequence_hash() != candidate.sequence_hash(): raise VerdictInheritanceError( "sequence hash mismatch with equal shuffle_seed: corpus was mutated " "in place; baseline verdict is not reproducible" ) if baseline.content_set_hash() != candidate.content_set_hash(): # defensive: sequence hash should already catch this raise VerdictInheritanceError( "content set mismatch despite matching sequence hash; manifest corrupt" ) return True ```