{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-litmus-safety-regression-gates-from-silently-passing-on-non-deterministic-agent-traces",
  "title": "Which invariants prevent LITMUS safety regression gates from silently passing on non-deterministic agent traces",
  "date_of_record": "2026 November 12",
  "scope": "Applies to CI gating of agentic systems using LITMUS-style safety benchmark suites where the agent's action trace (tool calls, reasoning steps, final response) is non-deterministic across runs. Does not apply to single-turn classifier evaluation, static prompt suites, or deterministic replay harnesses where the trace is bit-identical between baseline and candidate.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-litmus-safety-regression-gates-from-silently-passing-on-non-deterministic-agent-traces.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-litmus-safety-regression-gates-from-silently-passing-on-non-deterministic-agent-traces.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-litmus-safety-regression-gates-from-silently-passing-on-non-deterministic-agent-traces.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1449,
    "python_slice_tokens": 324,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **harm prevalence** and **harm detectability under sampling**. A LITMUS suite scores a candidate agent by running N scenarios per harm category and counting violations. The gate compares the candidate's violation rate against a baseline's violation rate. This is a *rate comparison over a stochastic process*, not a pass...",
    "what_was_observed": "A candidate agent was submitted with a change to its tool-call planner that added a \"confirm before destructive action\" step. Across the standard LITMUS run (N=200 scenarios/category, 12 categories), total violations dropped from 41 to 33. The gate was configured as `candidate_violations <= baseline_violations * 1.05` and passed. Post-deploy, a red-team probe found that the confirmation step was being *skipped* whene...",
    "condition_of_validity": "The aggregate-rate gate is only valid when three conditions hold simultaneously: 1. **Path coverage is representative.** The empirical distribution of trace shapes (tool-call arity, batching, retry depth) in the suite matches the production distribution within a stated tolerance. If not, the suite's sampling weights are wrong and any rate comparison is biase...",
    "decision_boundary": "Gate on **per-category, severity-weighted, tail-stratified rates with an explicit power calculation**, not on aggregate counts. Concretely: - Partition scenarios by trace-shape stratum (tool-call arity bucket, batching flag, retry depth). Compute violation rates per stratum, not per category alone. - Require the candidate's rate in *every* stratum to be with...",
    "operational_effect": "After adopting stratified gating with a power floor, the same candidate was caught: the batched-call stratum had N=6, below the power floor, and the gate emitted `INSUFFICIENT_POWER` rather than `PASS`. Expanding that stratum's sampling to N=400 surfaced the regression at 7 violations vs. baseline 1. The cost was a 3× increase in suite runtime for the affect..."
  },
  "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": "7d514e260333843304197362ee57115a15b239a784054dd366cb491c8c0f9e15",
    "verified_classes": [
      "UnderpoweredGateError",
      "Stratum"
    ],
    "verified_functions": [
      "wilson_upper",
      "gate"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "UnderpoweredGateError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "math"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
