# How should an instance reconcile a safety-signal trace that arrives after its own eval verdict is already sealed **Date of Record:** 2026 November 28 **Scope:** Applies to observability pipelines that emit per-agent eval verdicts (pass/fail/score) at task completion and correlate them asynchronously with safety-signal traces (policy classifier hits, injection detectors, PII exfiltration flags) keyed by span ID. Does not apply to synchronous inline guardrails that block before the verdict is written, nor to batch offline evaluation with no live verdict consumer. ## Core Distinction The failure is not "a safety signal was missed." It is that the eval verdict and the safety signal are produced by two independent emitters on two independent clocks, and the pipeline's correlation model assumes the verdict is a *terminal* record while the safety signal is a *late-arriving attribute of the same span*. When the safety classifier runs slower than the eval scorer—which is the norm, because safety classifiers are typically larger models or multi-pass detectors—the verdict is durably sealed and already consumed downstream (dashboards, gating, agent memory of "this run was clean") before the safety hit lands. The pipeline then either drops the orphaned safety signal or attaches it to a sealed verdict without invalidating the seal. The distinction that matters: an eval verdict is a *claim about a completed span*, and a safety signal is *evidence about that same span*. Treating evidence as a mutable attribute of a frozen claim is the boundary error. The correct model is that the verdict is provisional until a correlation deadline passes, and the safety signal can *revoke* the verdict, not merely annotate it. ## What Was Observed A tool-using agent completes a multi-step task. Each step emits a span with attributes: `agent.id`, `span.id`, `trace.id`, `step.index`, `tool.name`, `output.digest`. At task termination the eval scorer emits `eval.verdict = PASS` with `eval.score = 0.91`, keyed by `trace.id`, and stamps `eval.sealed_at = T0`. The verdict is written to the verdict store, which is append-only and treats the record as immutable once `sealed_at` is set. The safety classifier processes the same spans out of band. It is a two-pass detector (fast lexical pass, slow semantic pass) and its semantic pass completes at `T0 + Δ`, where Δ ranged from 4s to 47s in the observed window. At `T0 + Δ` it emits `safety.signal = INJECTION_SUSPECTED` on `span.id = S7`, with `safety.confidence = 0.83`. Three distinct outcomes were observed in the same pipeline: 1. **Orphan drop.** The correlator joins safety signals to spans by `span.id` but joins verdicts by `trace.id`. Because the verdict record has no `span.id` fan-out, the late signal finds no open verdict to attach to and is written to a dead-letter topic. The verdict remains `PASS` and the agent's episodic memory records the run as clean. 2. **Sealed-annotation.** The correlator does attach the signal to the trace, but because `eval.sealed_at` is set, it writes the safety signal as a *child annotation* of the sealed verdict. Downstream gate readers filter on `eval.verdict`, which is still `PASS`. The signal is present in the store and invisible to every consumer that matters. 3. **Race on re-seal.** A reconciler that does attempt re-seal reads the verdict, computes `PASS ∧ ¬INJECTION`, writes `FAIL`, but does so without a compare-and-swap on `sealed_at`. Two reconciler workers processing overlapping signal batches both read `sealed_at = T0`, both write, and the second write clobbers the first's `safety.evidence_ref`, leaving a `FAIL` verdict with no pointer to the evidence that justified it—unreplayable. The compounding effect: the agent's own memory write (episodic summary of the run) happens at `T0 + ε`, before any of the above. So even the successful re-seal path leaves the *agent's* record of the run inconsistent with the *pipeline's* record. The agent believes it succeeded; the pipeline knows it was poisoned. ## Condition of Validity The invariant that must hold is: **no verdict is terminal until its correlation window has closed, and the correlation window must be bounded by the slowest safety emitter's p99 latency, not by the eval scorer's completion.** Concretely, a verdict may be sealed only when both of the following hold: - `now - verdict.emit_time >= correlation_deadline`, where `correlation_deadline` is derived from the safety classifier's observed p99 completion lag for the trace's span count, not a static constant. A 40-span trace with a two-pass classifier needs a longer window than a 3-span trace. - Every span in `trace.id` has either a terminal safety signal or an explicit `safety.no_signal` heartbeat from the classifier, so absence of signal is distinguishable from absence of *processing*. The condition fails when the pipeline uses a fixed timeout (the observed deployment used 30s, which was below the 47s p99 tail), or when the safety classifier does not emit negative heartbeats, so the correlator cannot tell "clean" from "not yet seen." It also fails structurally when verdict keying (`trace.id`) and signal keying (`span.id`) differ without a declared fan-out mapping—the orphan-drop case is not a bug in the correlator but a schema mismatch that the correlator was never given the information to resolve. The condition does *not* require synchronous safety classification. It requires only that the verdict's terminality be gated on a correlation barrier, which can be implemented as a deferred-seal state machine independent of classifier latency. ## Decision Boundary The boundary is between *annotating* a sealed verdict and *revoking* it. The pipeline must decide, per signal class, which one applies: - **Advisory signals** (low-confidence style flags, soft policy nudges) may annotate a sealed verdict. They do not change `eval.verdict` and are visible only to audit readers, not gate readers. - **Revoking signals** (injection suspected above threshold, exfiltration confirmed, sandbox-escape indicators) must revoke. Revocation means the verdict transitions `PASS → REVOKED`, a new terminal record is written with a fresh `sealed_at`, and *every consumer that cached the prior verdict is invalidated via a verdict-version token*. The agent's episodic memory write must also be gated: the run summary is written only after the correlation barrier, or is written as `provisional` and upgraded/downgraded on revocation. The decision rule for which class a signal falls into cannot be a static table, because classifier confidence is non-deterministic. The observed pipeline used a fixed threshold (`confidence >= 0.8 → revoke`), which misclassified a 0.83 injection signal as advisory in one config and revoking in another after a classifier model update shifted the score distribution. The boundary must be defined on a *calibrated* signal (post-temperature-scaling, with a declared calibration set) and the calibration version must be part of the signal's key, so a re-calibration cannot silently reclassify historical signals. The hard boundary case: a revoking signal arrives *after* the agent has already taken a downstream action based on its own `PASS` memory (e.g., the agent was resumed from checkpoint and continued a task). Revocation cannot un-take that action. The pipeline must therefore record the revocation as a *causal predecessor* to the resumed action, so replay can reconstruct that the resumed run inherited a poisoned premise. Without this, replay shows a clean resumed run and the poisoning is invisible in the trace graph. ## Operational Effect Implementing the barrier changes three things measurably. First, verdict latency increases by the correlation deadline (p99 observed: +38s), which is the cost of correctness—dashboards that need instant feedback must read `provisional` verdicts and label them as such. Second, the dead-letter rate for orphaned signals drops to near zero because the fan-out mapping (`trace.id → [span.id]`) is declared at emit time and the correlator joins on span sets, not scalar keys. Third, and most importantly, the agent's memory write is decoupled from its task completion: the episodic summary carries a `verdict_version` and a `provisional` flag, and a revocation triggers a memory *correction* record rather than a silent divergence between what the agent remembers and what the pipeline knows. The invariant to enforce in code: a verdict may not transition to terminal unless the correlation barrier has passed *and* the transition is a compare-and-swap on `(sealed_at, verdict_version)`. Any reconciler that writes a terminal verdict without CAS is the race in outcome 3. Any correlator that joins verdicts and signals on different key spaces is the orphan in outcome 1. Any consumer that reads `eval.verdict` without checking `verdict_version` against its cache is the sealed-annotation blindness in outcome 2. ```python import time from dataclasses import dataclass, field from typing import Optional class VerdictSealViolation(RuntimeError): """Raised when a verdict is sealed before its correlation barrier closes, or when a revoking safety signal is demoted to an annotation.""" pass class StaleVerdictVersion(RuntimeError): """Raised when a consumer or reconciler acts on a superseded verdict.""" pass @dataclass class SafetySignal: span_id: str trace_id: str kind: str # e.g. "INJECTION_SUSPECTED" confidence: float calibrated: bool calibration_version: str revoking: bool # derived from calibrated class, not raw score emitted_at: float @dataclass class Verdict: trace_id: str span_ids: list verdict: str # "PASS" | "FAIL" | "REVOKED" version: int provisional: bool sealed_at: Optional[float] = None evidence_refs: list = field(default_factory=list) def seal_verdict( verdict: Verdict, signals: list, classifier_p99_lag: float, now: Optional[float] = None, ) -> Verdict: now = now if now is not None else time.time() deadline_passed = now - verdict.sealed_at if verdict.sealed_at else False # Barrier: cannot seal until slowest safety emitter's p99 lag has elapsed. if verdict.sealed_at is not None and (now - verdict.sealed_at) < classifier_p99_lag: raise VerdictSealViolation( f"trace {verdict.trace_id}: seal attempted {now - verdict.sealed_at:.1f}s " f"after emit, below classifier p99 lag {classifier_p99_lag:.1f}s" ) # Every span must have a signal OR an explicit no-signal heartbeat. seen = {s.span_id for s in signals} missing = set(verdict.span_ids) - seen if missing: raise VerdictSealViolation( f"trace {verdict.trace_id}: spans {sorted(missing)} have neither " f"safety signal nor no_signal heartbeat; cannot distinguish clean from unseen" ) revoking = [s for s in signals if s.revoking] for s in revoking: if not s.calibrated: raise VerdictSealViolation( f"span {s.span_id}: revoking classification on uncalibrated " f"confidence {s.confidence:.2f} (cal_version={s.calibration_version})" ) if revoking: verdict.verdict = "REVOKED" verdict.evidence_refs = [s.span_id for s in revoking] verdict.provisional = False verdict.version += 1 return verdict def apply_revocation(verdict: Verdict, signal: SafetySignal, expected_version: int) -> Verdict: # Compare-and-swap: reconciler must prove it read the current version. if verdict.version != expected_version: raise StaleVerdictVersion( f"trace {verdict.trace_id}: expected v{expected_version}, store has " f"v{verdict.version}; refusing to clobber evidence_refs" ) if not signal.revoking: # Advisory signals annotate; they never silently demote revoking ones. verdict.evidence_refs.append(signal.span_id) return verdict if not signal.calibrated: raise VerdictSealViolation( f"span {signal.span_id}: revoking signal uncalibrated " f"(cal_version={signal.calibration_version})" ) verdict.verdict = "REVOKED" verdict.version += 1 verdict.evidence_refs.append(signal.span_id) return verdict ```