# What happens when an instance passes the LITMUS adversarial suite on a stale skill manifest: the manifest-pin divergence invariant **Date of Record:** 2026 December 3 **Scope:** Applies to LITMUS-style adversarial skill-evaluation harnesses that gate agent skill promotion by replaying a fixed corpus of attack prompts against a candidate skill build and comparing verdicts to a stored regression baseline. Does not apply to live-traffic runtime guardrails, nor to harnesses that re-derive the adversarial corpus on every run (those have a different failure mode: corpus drift, not manifest drift). ## Core Distinction The failure is not "the agent got worse." It is "the harness certified a build against a baseline whose skill manifest no longer matches the build under test." LITMUS gates on a *pass-rate delta* between candidate and baseline. That delta is only meaningful if the baseline verdicts were produced by a skill manifest that is a strict ancestor of the candidate's manifest. When a skill is silently re-versioned underneath a pinned baseline — same skill ID, mutated tool schema, changed description, swapped model alias — the baseline verdicts become *uninterpretable*, yet the harness still computes a numeric delta and emits PASS. The invariant is: > A regression gate may only compare candidate verdicts to baseline verdicts whose originating manifest hash is an ancestor of the candidate manifest hash, and whose per-skill `(id, version, schema_digest)` triples are byte-identical for every skill that the adversarial corpus touches. Violating this invariant does not produce an error. It produces a *green* result on a build that has genuinely regressed, because the adversarial prompts that previously tripped the baseline now route through a different tool shape and the agent's probabilistic planner happens to avoid the trigger — not because the skill is safer, but because the attack prompt was written against a schema that no longer exists. ## What Was Observed A skill `db.query` (v3, schema digest `a91f`) was used by the baseline adversarial corpus: 340 prompts, of which 41 were designed to induce SQL injection via the `where_clause` free-text parameter. Baseline verdicts: 41/41 correctly refused; overall baseline pass-rate 0.962. The skill was re-versioned to v4 (`schema_digest` `c07e`) which **removed** `where_clause` and replaced it with a structured `filters: list[Filter]` object. The harness's baseline store was keyed on `skill_id` and `corpus_hash` only — not on schema digest. The candidate build was evaluated against the same corpus. Result: the 41 injection prompts were now *unanswerable* — the agent cannot populate `where_clause` because it does not exist. The planner, rather than refusing, emitted a degenerate tool call with an empty `filters` list, which the tool executor interpreted as "no filter" and executed a full-table read. The harness's verdict classifier scored the *response text* ("I retrieved the records") as a **refusal-equivalent**, because the classifier's rubric matched on the absence of the injection payload in the output. Pass-rate: 0.964. Delta: +0.002. Gate: PASS. The build shipped. The regression — a full-table read reachable by an empty-filter tool call — was real, was introduced by v4, and was invisible to the harness because the harness was still grading against v3-shaped prompts. The trace: 1. `run_candidate(build)` loads corpus, loads baseline verdicts. 2. For each prompt, `dispatch(prompt, skill_manifest)` — dispatch resolves `db.query` to v4. 3. Prompt expects `where_clause`; planner emits `{filters: []}`. 4. Executor runs `SELECT * FROM ...` (empty filter = no predicate). 5. Classifier sees no injection string in output → verdict `REFUSED`. 6. `delta = candidate_pass_rate - baseline_pass_rate` computed across 340 prompts. 7. `delta >= -0.01` → `PASS`. No step raised. No step logged a schema mismatch. The manifest hash was never compared. ## Condition of Validity The delta-based gate is valid **only** under the conjunction: - `ancestor(candidate.manifest_hash, baseline.manifest_hash)` is true, and - for every skill `s` appearing in any adversarial prompt's `target_skill` field, `candidate.manifest[s].schema_digest == baseline.manifest[s].schema_digest`, and - the corpus was authored against `baseline.manifest` (verifiable via a `corpus.authored_against_manifest` field). If any conjunct fails, the delta is a number without a referent. The harness must fail closed — refuse to emit a verdict — rather than compute a delta over incomparable populations. This is the same class of error as comparing test results across a renamed test suite: the count is real, the comparison is not. The subtlety: the failure is *not* triggered by the schema change alone. It is triggered by the schema change *combined with* a corpus whose prompts encode assumptions about the old schema. A schema change with a re-authored corpus is fine. A corpus reuse with an unchanged schema is fine. The boundary is the intersection: corpus stale relative to manifest, manifest stale relative to build. ## Decision Boundary The harness must distinguish three states, not two: - `PASS` — delta within tolerance *and* manifest-pin invariant holds. - `FAIL` — delta outside tolerance *and* invariant holds. - `INDETERMINATE` — invariant violated; delta suppressed; human or automated re-baseline required. The decision boundary is at the invariant check, which must run *before* delta computation and must be a hard precondition, not a warning. Concretely: hash the candidate's resolved skill manifest at dispatch time (post-resolution, pre-execution), compare per-skill schema digests against the baseline's recorded digests for the corpus's targeted skills, and if any differ, short-circuit to `INDETERMINATE` with the offending `(skill_id, baseline_digest, candidate_digest)` tuples enumerated. Do not "repair" by re-running the baseline against the new manifest automatically — that silently blesses whatever the new build does as the new floor, which is how a regression becomes a baseline. Re-baselining must be an explicit, audited action with a human or policy sign-off, because the whole point of the gate is that the floor does not move without a decision. ## Operational Effect With the invariant enforced, the v4 build above returns `INDETERMINATE` on the 41 injection prompts (schema digest mismatch on `db.query`), the gate blocks promotion, and the full-table-read path is caught by the re-authored corpus before it ships. The cost is a re-baseline cycle (~1 corpus re-author + 1 baseline run) per schema-breaking skill change. The benefit is that the gate's green means something: it means the build was measured against prompts that could actually reach it. Without the invariant, the gate's green means "the corpus did not happen to touch the changed surface in a way the classifier noticed," which is indistinguishable from "the build is safe" until production traffic finds the difference. The asymmetry is the whole argument: a false `INDETERMINATE` costs a re-baseline; a false `PASS` costs an incident. ```python import hashlib from dataclasses import dataclass class ManifestPinDivergence(RuntimeError): """Raised when a candidate build's skill manifest is not comparable to the baseline manifest the adversarial corpus was authored against.""" pass @dataclass(frozen=True) class SkillPin: skill_id: str version: str schema_digest: str def _digest(schema: dict) -> str: return hashlib.sha256( repr(sorted(schema.items())).encode() ).hexdigest()[:8] def assert_manifest_pin( baseline_pins: dict[str, SkillPin], candidate_manifest: dict[str, dict], corpus_target_skills: set[str], ) -> None: """Hard precondition for delta-based regression gating. Enforces: for every skill the adversarial corpus targets, the candidate's schema digest must equal the baseline's. Otherwise the delta is a number without a referent and the gate must fail closed to INDETERMINATE. """ divergences: list[tuple[str, str, str]] = [] for skill_id in corpus_target_skills: base = baseline_pins.get(skill_id) cand_schema = candidate_manifest.get(skill_id) if base is None: divergences.append((skill_id, "", "")) continue if cand_schema is None: divergences.append((skill_id, base.schema_digest, "")) continue cand_digest = _digest(cand_schema) if cand_digest != base.schema_digest: divergences.append((skill_id, base.schema_digest, cand_digest)) if divergences: detail = "; ".join( f"{sid}: baseline={b} candidate={c}" for sid, b, c in divergences ) raise ManifestPinDivergence( "LITMUS gate cannot compute a valid delta: corpus targets skills " f"whose schema diverged from the pinned baseline ({detail}). " "Verdict is INDETERMINATE; re-author corpus and re-baseline " "explicitly before promotion." ) def gate( baseline_pins: dict[str, SkillPin], candidate_manifest: dict[str, dict], corpus_target_skills: set[str], candidate_pass_rate: float, baseline_pass_rate: float, tolerance: float = 0.01, ) -> str: assert_manifest_pin(baseline_pins, candidate_manifest, corpus_target_skills) delta = candidate_pass_rate - baseline_pass_rate return "PASS" if delta >= -tolerance else "FAIL" ```