{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-boundary-be-enforced-when-integrating-litmus-safety-benchmarks-into-agent-ci-regression-gates",
  "title": "Where must an instance boundary be enforced when integrating LITMUS safety benchmarks into agent CI regression gates",
  "date_of_record": "2026 November 16",
  "scope": "Applies to CI pipelines that gate agent merges on LITMUS safety-benchmark deltas, specifically when the harness runs multiple instances (prompt/seed/attack-variant tuples) against a shared agent process or shared model endpoint. Does not apply to single-instance, single-shot evaluations or to offline batch scoring with no shared mutable state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-boundary-be-enforced-when-integrating-litmus-safety-benchmarks-into-agent-ci-regression-gates.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-boundary-be-enforced-when-integrating-litmus-safety-benchmarks-into-agent-ci-regression-gates.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-boundary-be-enforced-when-integrating-litmus-safety-benchmarks-into-agent-ci-regression-gates.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1540,
    "python_slice_tokens": 373,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious invariant is this: **a LITMUS \"instance\" is a unit of measurement, not a unit of execution.** The harness is free to batch, cache, and parallelize instances across a shared agent runtime; but the *regression gate* must compare per-instance outcomes, not per-batch or per-run aggregate outcomes. When integration collapses the instance boundary ...",
    "what_was_observed": "Integrating a LITMUS suite (refusal calibration, prompt-injection resistance, tool-misuse probes) into an agent CI gate produced a gate with ~11% flake rate on byte-identical commits. Root-causing the flake: - The harness reused one agent process across a shard of 64 instances to amortize model-load cost. A probe that taught the agent (via in-context examples) to emit a permissive tool call leaked that disposition in...",
    "condition_of_validity": "The instance boundary must be enforced (i.e., per-instance state reset and per-instance comparison) whenever *any* of the following hold: 1. The agent runtime carries state across instances — conversation history, scratchpad, tool cache, learned in-context examples, or a warm KV/prefix cache keyed by content. 2. Instances share a finite resource (connection ...",
    "decision_boundary": "The operational decision rule: - **If the gate compares aggregates with a tolerance band → enforce strict per-instance isolation and switch to per-instance expected-outcome comparison.** Aggregation plus tolerance is the failure-enabling combination; do not ship it against a stateful agent. - **If isolation is expensive (model reload) → isolate the *measurem...",
    "operational_effect": "Enforcing the instance boundary and switching to per-instance expected-outcome gating eliminated the ~11% flake and, more importantly, surfaced two genuine regressions that the aggregate gate had been masking (a tool-misuse increase confined to post-teaching instances, and a refusal-calibration drift on a single attack variant). The gate's false-pass risk dr..."
  },
  "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": "88273b520d1e0ff9fe032f1bd0fe8d078689592195cd3de8297f90f5175a0044",
    "verified_classes": [
      "InstanceBoundaryViolation",
      "InstanceResult"
    ],
    "verified_functions": [
      "assert_boundary_intact",
      "gate"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "InstanceBoundaryViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
