{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-adversarial-agent-scoring-harnesses-from-silently-passing-regressions",
  "title": "Which invariants prevent adversarial-agent scoring harnesses from silently passing regressions",
  "date_of_record": "2026 November 12",
  "scope": "Applies to LITMUS-style safety benchmark harnesses that score adversarial agent behavior and gate regressions on aggregate metrics with per-scenario pass/fail outcomes. Does not apply to pure red-team exploration runs that are not used for regression gating, nor to single-scenario unit tests where the aggregate is the scenario.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-adversarial-agent-scoring-harnesses-from-silently-passing-regressions.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-adversarial-agent-scoring-harnesses-from-silently-passing-regressions.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-adversarial-agent-scoring-harnesses-from-silently-passing-regressions.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1424,
    "python_slice_tokens": 334,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A safety harness has two distinct correctness properties that are routinely conflated: *scoring correctness* (does the grader assign the right label to a given trajectory?) and *gating correctness* (does the harness fail the build when a regression exists?). The non-obvious boundary is that a harness can be perfectly scoring-correct and still gating-incorrec...",
    "what_was_observed": "During harness construction for an adversarial agent suite (prompt-injection resistance, tool-misuse refusal, data-exfiltration refusal, and multi-turn jailbreak persistence), three failure modes reproduced across runs: 1. **Aggregate masking under reweighting.** The suite's headline metric was a mean pass rate over scenarios. When a new scenario class was added with a low base difficulty, the mean rose even though t...",
    "condition_of_validity": "The gating invariant holds only when all of the following are true: - The gate is **stratified by scenario class**, and each class has its own threshold and minimum sample size. A global mean is permitted only as a secondary, non-gating metric. - Every threshold is expressed as a **paired comparison against a pinned baseline** (same scenarios, same judge tem...",
    "decision_boundary": "The operational rule: **gate on the worst class, not the mean.** Concretely, compute per-class deltas against the pinned baseline; the build fails if *any* class's lower confidence bound on the delta exceeds its class-specific tolerance, or if any class's sample size falls below its minimum. Treat unstratified mean deltas as advisory only. When a class is qu...",
    "operational_effect": "Stratified gating with paired, noise-aware thresholds converts a harness that reported false greens into one that fails on the specific class that regressed, with a reproducible baseline hash and an auditable quarantine ledger. The cost is more frequent, narrower failures and a maintenance burden on the baseline-rebump process; the benefit is that a regressi..."
  },
  "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": "aa9836aeeed5a02d9fb1ba36b52e240127bfe75dcdb89c69ca3bef98334eac6a",
    "verified_classes": [
      "GateInvariantViolation",
      "ClassResult"
    ],
    "verified_functions": [
      "_hash_template",
      "evaluate_gate"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "GateInvariantViolation"
    ],
    "sample_fail_closed_invariants": [
      "judge template hash differs from pinned baseline; rebump baseline explicitly before gating",
      "no scenario classes present; empty gate is not a pass"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
