# What happens when an instance reports a LITMUS safety score before the adversarial transcript has been committed **Date of Record:** 2026 November 24 **Scope:** Applies to CI-integrated LITMUS-style red-team harnesses that run adversarial probes against a live agent instance and gate merge on the resulting safety score. Does not apply to offline batch evaluation where the transcript store and the scoring pass share a single process lifetime. ## Core Distinction The failure is not "the agent failed a safety probe." It is that the harness accepted a *score* as a proxy for a *transcript*, and the two are produced by different subsystems with different durability guarantees. A LITMUS probe run is a two-phase operation: phase one drives the agent through an adversarial scenario (multi-turn jailbreak, tool-abuse ladder, prompt-injection payload) and emits a turn-by-turn transcript; phase two classifies that transcript and emits a scalar safety score plus a verdict. In a correct harness the score is *derived from* a committed transcript whose hash is embedded in the score record. In the broken integration, the scoring classifier runs in the CI runner's memory against an in-flight transcript object, emits the score to the merge gate, and only afterward attempts to persist the transcript to the evidence store. If the agent instance's process exits, times out, or the runner is evicted between score emission and transcript commit, the gate sees a passing score with no admissible evidence behind it. This is distinct from a false negative (agent genuinely passed a probe it should have failed) and from a flaky probe (non-deterministic agent output). Here the score may be perfectly correct at the instant it was computed. The invariant that breaks is *evidentiary*: the score is no longer reconstructible, and a later auditor replaying the CI run cannot distinguish "agent was safe" from "agent was safe on a transcript that was never written down." ## What Was Observed A red-team job ran 240 LITMUS probes against a tool-using agent in a containerized runner. Each probe: seed adversarial prompt → up to 12 agent turns with tool calls → classifier verdict. The runner emitted `safety_score=0.987` to the merge gate at T+41s. The gate passed the PR. The transcript-commit step for the final 17 probes began at T+42s and hit a runner eviction at T+43s triggered by a node drain. Those 17 transcripts — including the 4 probes whose verdicts most influenced the aggregate — were never written. The score record in the gate's audit log contained: `probe_count=240, pass_count=237, score=0.987, transcript_manifest=`. The manifest field was populated asynchronously by a post-hook, and the post-hook never ran. Downstream, a weekly compliance replay tried to re-derive the score from the evidence store and found only 223 transcripts. Recomputing on 223 gave `0.982` — still passing, so no alarm fired. But the *variance* between the gate's 0.987 and the replayable 0.982 was unexplained, and the four highest-weight transcripts were precisely the missing ones. The replay tool, lacking a manifest, could not even assert *which* probes were absent; it inferred the gap only by counting. The deeper observation: the agent instance under test had a per-turn checkpoint that persisted its own conversation state, so the agent *could* have reconstructed the missing turns. But the harness never queried the agent's checkpoint store — it treated the agent as a black box and the runner's in-memory transcript as the sole record. The two stores diverged, and the harness had no reconciliation path. ## Condition of Validity The score-as-proxy is only valid when all of the following hold simultaneously: 1. The transcript for every probe is committed to durable storage *before* the score is emitted to any consumer outside the harness process. 2. The score record carries a content hash (e.g., Merkle root) over the exact transcript set it was computed from, and that hash is verifiable against the store. 3. The probe set is enumerated and sealed at job start, so a missing transcript is detectable as a set-difference rather than inferred from a count. 4. The classifier is deterministic given a transcript, or its non-determinism is bounded and recorded (model version, temperature, seed) so replay can reproduce or explain divergence. If any one fails, the score is an *assertion* rather than a *derivation*, and the CI gate is trusting the runner's honesty about work it may not have finished. The common broken configuration violates (1) and (2) together: async commit plus null manifest. Violating (3) alone is subtler — the score is correct and evidenced, but a partial-store replay produces a *different* score with no way to prove the difference is benign. ## Decision Boundary The boundary is whether the merge gate consumes the score *synchronously with commit* or *optimistically ahead of it*. Concretely: - **Commit-then-score (safe):** transcript write returns a durable receipt (fsync'd object key + hash); classifier reads from the committed object; score record embeds the receipt. Gate blocks until receipt present. Cost: latency, and a hard failure if the store is unavailable — which is the *correct* failure, because an unevidenced pass is worse than a blocked merge. - **Score-then-commit (unsafe):** classifier reads in-memory object, emits score, commit is best-effort post-hook. Gate may pass on a score whose evidence is not yet (or never) durable. This is the observed configuration. There is a tempting middle ground — emit score optimistically but mark it `provisional`, and let the gate pass only if the manifest arrives within a timeout — which is safe *only if* the gate treats a missing manifest as a failure, not a warning. In practice most gates treat missing evidence as advisory, which collapses this back to the unsafe case. The decision boundary is therefore: **does absence of evidence block, or merely annotate?** If it annotates, the harness is not gating on safety; it is gating on the absence of a *detected* failure, which is a strictly weaker and non-auditable property. ## Operational Effect The practical consequence is a class of merge that passes CI, ships, and later cannot be defended in an audit because the adversarial evidence is gone. The blast radius is asymmetric: a false pass is invisible until a replay, and replays are infrequent, so the harness accumulates an unknown number of unevidenced passes before anyone notices. Worse, the *aggregate* score hides the gap — 223 of 240 transcripts replay to a passing 0.982, so count-based and threshold-based alarms both stay silent. Only a set-difference check against a sealed probe manifest, or a hash mismatch on the score record, surfaces the loss. The guardrail is to make the score record structurally incapable of existing without its evidence: embed the manifest hash at score-construction time (not in a post-hook), seal the probe enumeration at job start, and have the gate verify `manifest_hash` against the store before reading `safety_score`. Treat a null or unverifiable manifest as a hard gate failure, identical to a failed probe. And where the agent under test maintains its own checkpoint, add a reconciliation step that diffs the harness transcript set against the agent's checkpoint set so a runner-side loss is detectable from the agent side rather than only from a count. ```python import hashlib import json from dataclasses import dataclass, field from typing import Optional class UnevidencedSafetyScore(RuntimeError): """Raised when a LITMUS safety score is presented for gating without a verifiable, committed transcript manifest behind it.""" @dataclass class ScoreRecord: probe_count: int pass_count: int safety_score: float manifest_hash: Optional[str] = None # hex Merkle root over transcripts sealed_probe_ids: frozenset = field(default_factory=frozenset) def compute_manifest_hash(transcripts: dict[str, bytes]) -> str: """Deterministic Merkle-ish root: sort keys, hash each, hash the concat.""" h = hashlib.sha256() for probe_id in sorted(transcripts): h.update(probe_id.encode()) h.update(hashlib.sha256(transcripts[probe_id]).digest()) return h.hexdigest() def gate_merge(record: ScoreRecord, committed: dict[str, bytes]) -> bool: """The CI gate. Must refuse to read safety_score unless evidence verifies.""" if record.manifest_hash is None: raise UnevidencedSafetyScore( f"score={record.safety_score} has no manifest_hash; " f"transcript commit likely never ran (score-then-commit race)" ) if not record.sealed_probe_ids: raise UnevidencedSafetyScore( "probe set was not sealed at job start; missing transcripts are " "undetectable as a set-difference" ) missing = record.sealed_probe_ids - set(committed) if missing: raise UnevidencedSafetyScore( f"{len(missing)} sealed probes absent from evidence store: " f"{sorted(missing)[:5]}..." ) recomputed = compute_manifest_hash( {pid: committed[pid] for pid in record.sealed_probe_ids} ) if recomputed != record.manifest_hash: raise UnevidencedSafetyScore( f"manifest mismatch: record={record.manifest_hash} " f"store={recomputed}; score not reconstructible" ) return record.safety_score >= 0.95 def run_gate_example(): # Observed broken record: 240 probes, null manifest, no seal. broken = ScoreRecord(probe_count=240, pass_count=237, safety_score=0.987) try: gate_merge(broken, committed={}) except UnevidencedSafetyScore as e: print(f"BLOCKED (correct): {e}") # Fixed record: sealed set, manifest embedded at construction. transcripts = {f"probe-{i:03d}": f"turn-log-{i}".encode() for i in range(240)} fixed = ScoreRecord( probe_count=240, pass_count=237, safety_score=0.987, manifest_hash=compute_manifest_hash(transcripts), sealed_probe_ids=frozenset(transcripts), ) assert gate_merge(fixed, transcripts) is True if __name__ == "__main__": run_gate_example() ```