{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-of-the-litmus-safety-harness-be-treated-as-non-reusable-across-ci-stages",
  "title": "When must an instance of the LITMUS safety harness be treated as non-reusable across CI stages",
  "date_of_record": "2026 November 7",
  "scope": "Applies to LITMUS safety benchmark harness instances embedded in continuous agent red-teaming pipelines where a single harness process object is shared across multiple CI stages (build → eval → gate → report). Does not apply to stateless one-shot invocations where a fresh harness process is spawned per stage, nor to harness versions that expose an explicit `reset()` contract.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-of-the-litmus-safety-harness-be-treated-as-non-reusable-across-ci-stages.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-of-the-litmus-safety-harness-be-treated-as-non-reusable-across-ci-stages.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-of-the-litmus-safety-harness-be-treated-as-non-reusable-across-ci-stages.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1171,
    "python_slice_tokens": 222,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"harness crashed\" or \"harness returned a failing score.\" It is a subtler invariant violation: **a LITMUS harness instance that has executed at least one red-team batch carries mutable adversarial state — a seeded RNG stream, a partially drained probe queue, and a per-instance verdict cache — that makes its second invocation semantical...",
    "what_was_observed": "In a pipeline that constructed the harness once at job start and called `harness.run_batch()` at three stages (unit-level probes, integration probes, adversarial escalation), the third stage reported a 100% pass rate across 400 runs. Investigation showed the harness's probe scheduler had a fixed-capacity queue of 512 entries; stages 1 and 2 had consumed 509 of them, leaving 3 probes for the escalation stage. The harn...",
    "condition_of_validity": "The non-reusable classification holds when **all** of the following are true: 1. The harness exposes batch execution without an explicit, documented `reset()` or `fork()` that re-seeds the RNG and refills the probe queue. 2. The probe queue has finite capacity smaller than the sum of probes across all stages. 3. The verdict cache key omits at least one input...",
    "decision_boundary": "The operational rule: **treat the harness instance as a single-use resource scoped to one (agent_artifact, adversarial_profile) pair.** When the pipeline crosses a stage boundary where either the agent artifact or the adversarial profile changes, construct a new harness instance. Do not \"warm up\" a shared instance for performance; the cost of re-initializati...",
    "operational_effect": "Pipelines that enforce single-use instances show a measurable shift: escalation-stage probe counts return to their configured values, and the previously-hidden 3-probe green gate becomes a 400-probe gate that correctly fails on 11 adversarial probes. The practical effect is that red-teaming gates become *load-bearing* again — they can fail — which is the ent..."
  },
  "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": "5c46202b2b6861e428499a988a971eb65fe1d614b370fd4ce67b1a1bbefe7288",
    "verified_classes": [
      "HarnessReuseViolation",
      "HarnessInstance"
    ],
    "verified_functions": [
      "assert_reusable",
      "stage_gate",
      "probes_remaining_count"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "HarnessReuseViolation"
    ],
    "sample_fail_closed_invariants": [
      "denominator mismatch after reuse check"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
