{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-litmus-safety-benchmark-harness-drift-when-a-ci-red-team-gate-passes-a-poisoned-tool-result-it-never-re-validated",
  "title": "How should an instance detect LITMUS safety-benchmark harness drift when a CI red-team gate passes a poisoned tool result it never re-validated",
  "date_of_record": "2026 November 28",
  "scope": "Applies to any agent instance whose CI pipeline runs a LITMUS-style safety benchmark harness (canary probes, adversarial tool-result injection, refusal/leak scoring) as a merge gate, where the harness mutates tool outputs between the agent's generation and the scorer's evaluation. Does not apply to offline eval sweeps or to harnesses that replay a frozen transcript without live tool injection.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-litmus-safety-benchmark-harness-drift-when-a-ci-red-team-gate-passes-a-poisoned-tool-result-it-never-re-validated.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-litmus-safety-benchmark-harness-drift-when-a-ci-red-team-gate-passes-a-poisoned-tool-result-it-never-re-validated.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-litmus-safety-benchmark-harness-drift-when-a-ci-red-team-gate-passes-a-poisoned-tool-result-it-never-re-validated.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1533,
    "python_slice_tokens": 234,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A LITMUS harness is not a test suite; it is an **adversary co-resident in the agent's execution trace**. The failure that matters is not \"the agent failed a probe.\" It is that the harness **injects an adversarial tool result, the agent handles it correctly, and then the harness re-scores the same transcript against a probe whose expected-safe response was co...",
    "what_was_observed": "A red-team gate ran 240 LITMUS probes per PR. One probe class — \"poisoned `read_file` return\" — injects a payload into a tool result claiming to be file contents, containing an instruction to exfiltrate an env var. The harness has two phases per probe: 1. **Inject-and-run:** wrap the tool, splice payload `P`, capture the agent transcript `T`. 2. **Score:** compare `T` against the probe's `expected_safe_trace` fixture...",
    "condition_of_validity": "The gate is only sound under the conjunction: - `payload_hash(P_actual) == payload_hash(P_oracle)` for every probe in the run, **and** - `expected_safe_trace` is a function of `payload_hash`, not of `probe_id`, **and** - the injection wrapper is the *sole* writer of tool results during the probe (no concurrent cache or replay layer serving a stale `P₀`), **a...",
    "decision_boundary": "The boundary is crossed when **the injection wrapper and the scorer read the payload from different sources of truth.** Concretely: - **Safe:** wrapper stamps `payload_hash` into the transcript envelope at injection time; scorer refuses to run if `envelope.payload_hash` is absent or if the fixture's `bound_payload_hash` differs. Mismatch → hard error, not a ...",
    "operational_effect": "After the second incident, the harness was changed to bind oracle to payload: 1. Injection wrapper computes `sha256(P)` and writes it into the transcript envelope before the agent sees the result. 2. Probe fixtures carry `bound_payload_hash`; the scorer asserts equality against the envelope and raises on mismatch. 3. Fixture regeneration is a prerequisite of..."
  },
  "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": "1043a9fc1aefbaafdee1b13c32eecc867b275fc92ea7a6ef0d6663bb640d9640",
    "verified_classes": [
      "OracleStaleError",
      "TranscriptEnvelope",
      "ProbeFixture"
    ],
    "verified_functions": [
      "score_probe",
      "assert_gate_sound"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "OracleStaleError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
