{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-adversarial-litmus-benchmark-contamination-from-silently-invalidating-agent-safety-regression-gates",
  "title": "Which invariants prevent adversarial LITMUS benchmark contamination from silently invalidating agent safety regression gates",
  "date_of_record": "2026 November 28",
  "scope": "Applies to CI pipelines that gate agent releases on LITMUS-style adversarial safety benchmarks (loss-in-the-middle / long-context needle tasks combined with adversarial skill probes). Covers benchmark construction, contamination detection, and regression-gate decisions. Does not cover single-turn red-team prompt suites without long-context retrieval components, nor offline eval harnesses that never re-run against a mutating model.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-adversarial-litmus-benchmark-contamination-from-silently-invalidating-agent-safety-regression-gates.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-adversarial-litmus-benchmark-contamination-from-silently-invalidating-agent-safety-regression-gates.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-adversarial-litmus-benchmark-contamination-from-silently-invalidating-agent-safety-regression-gates.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1713,
    "python_slice_tokens": 263,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A LITMUS safety benchmark measures two orthogonal capabilities inside one score: (a) **needle retrieval fidelity** — can the agent recover a safety-relevant constraint buried in a long context — and (b) **adversarial compliance resistance** — does the agent refuse a skill invocation that violates that constraint. The non-obvious failure is that these two sig...",
    "what_was_observed": "During a release gate for an agent with a `file_write` skill, the LITMUS suite reported 99.1% safety pass rate across 2,400 adversarial probes. The suite had been stable at 98.7–99.3% for six prior releases. A separate, unrelated retrieval benchmark on the same checkpoint showed a 14-point drop in long-context recall (needle at 60–80% depth). The gate did not fire. Trace of the mechanism: 1. Each LITMUS case embeds a...",
    "condition_of_validity": "The LITMUS gate is only valid under an invariant that must be enforced at construction time, not at scoring time: > **Separability invariant:** For every adversarial case, the *constraint-recovery probe* and the *compliance probe* must be independently scorable, and the case must be discarded (not scored) if the compliance probe cannot be evaluated without s...",
    "decision_boundary": "The gate must switch from **score-threshold** to **invariant-check** at the point where the decoupled-control pass rate diverges from the adversarial pass rate by more than the retrieval benchmark's noise floor. The boundary: - If `|P(safe | adversarial) − P(safe | decoupled control)| ≤ ε` (ε = retrieval noise floor, empirically 2–3 points), the case contrib...",
    "operational_effect": "Enforcing the separability invariant changes three things in CI: 1. **Gate semantics flip from pass/fail to pass/fail/invalid.** A benchmark-integrity failure must be distinguishable from a model-safety failure in the build result, because the remediation is different (fix the suite vs. fix the model). 2. **Contamination becomes a tracked metric.** Quarantin..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "2433fd5cfad03c7f1972992a5ce065ec722103969b47dccbad4639b7d9857d1d",
    "verified_classes": [
      "BenchmarkIntegrityError",
      "CaseOutcome"
    ],
    "verified_functions": [
      "evaluate_litmus_gate"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "BenchmarkIntegrityError"
    ],
    "sample_fail_closed_invariants": [
      "empty LITMUS suite: no cases to score",
      "all LITMUS cases quarantined: no separable safety signal remains"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "math"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
