# When must an instance refuse to emit a span it cannot lineage-join: the split-warrant taint gap **Date of Record:** 2026 November 26 **Scope:** Applies to agent runtimes that reconstruct end-to-end audit trails by joining OTel spans to AAIF identity warrants and memory-mutation records via taint lineage. Does not apply to single-hop, stateless tool calls where no memory write or delegated warrant occurs. ## Core Distinction The failure is not "missing telemetry." Telemetry is present on every hop. The failure is a **lineage join that succeeds syntactically but fails semantically**: an OTel span carries a `taint_id` attribute, the memory-mutation record carries the same `taint_id`, and the AAIF warrant carries a matching `warrant_id` — yet the span was emitted *before* the warrant that authorized the tainted memory write was minted. The join is structurally valid (all foreign keys resolve) but temporally impossible (the effect precedes its cause in the causal chain). An audit trail that joins on identifiers alone will accept this record and silently certify a tainted memory mutation as clean. The invariant that is violated is the **causal precedence invariant**: for any span `S` that reads or writes memory tagged with `taint_id = T`, the warrant `W` that introduced `T` must have `W.minted_at < S.start_time`, and `S` must carry `W.warrant_id` in its parent-link set, not merely in its attribute set. Attribute-set membership is a *claim*; parent-link membership is a *proof*. ## What Was Observed A three-stage agent pipeline: a retrieval agent (A1) pulls a document into working memory, a reasoning agent (A2) distills it into an episodic memory record, and a writer agent (A3) reads that record and emits output. Under normal operation the causal chain is A1-warrant → A2-warrant → A3-warrant, each minted before the next agent's first span. Under load we observed the following trace, replayed from the collector: - Span `A2.span_07` (`memory.write`) has attributes `taint_id = t-8842`, `warrant_id = w-A2-3`, `parent_span = A2.span_06`. - The memory-mutation record `mem-5510` has `taint_id = t-8842`, `written_by = A2.span_07`, `source_warrant = w-A2-3`. - The AAIF warrant `w-A2-3` has `minted_at = 14:22:07.412`, `parent = w-A1-2`. - `A2.span_07.start_time = 14:22:07.198`. The span started **214 ms before its authorizing warrant existed**. The join on `warrant_id` succeeded. The audit reconstructor, which joined on identifier equality and did not compare timestamps, emitted a clean lineage chain. The tainted write was certified. Root cause: A2's supervisor pre-allocated the `warrant_id` slot in the span context at planning time (a common optimization to avoid a blocking warrant-mint RPC on the hot path), then backfilled the actual warrant asynchronously. The backfill landed after the span closed. The span's `warrant_id` attribute was correct; its *causal* position was wrong. The pre-allocation optimization converted a hard ordering constraint into a soft, eventually-consistent one — and the audit trail inherited the eventual consistency. ## Condition of Validity The join is only sound when all three of the following hold simultaneously: 1. **Temporal precedence:** `warrant.minted_at < span.start_time` for every span that references the warrant as an authorization (not merely as a correlation hint). 2. **Link, not attribute:** the warrant reference appears in the span's causal parent-link set (an OTel `Link` with `link.type = "authorizes"`), so that the collector's span graph — not a downstream SQL join — enforces the edge. 3. **Monotonic taint propagation:** a `taint_id` may only appear on a span whose transitive parent chain contains the span that first introduced the taint. A `taint_id` appearing "sideways" (via attribute copy without a parent edge) is a propagation break. When the warrant is pre-allocated and backfilled, condition 1 fails while 2 and 3 may still nominally pass (the link exists, the taint propagates) — which is exactly why the failure is non-obvious. The reconstructor must check 1 *independently* of 2 and 3, because 2 and 3 are satisfied by the pre-allocation shortcut. ## Decision Boundary The boundary is **warrant-mint latency versus span-open latency on the hot path**. If the runtime mints warrants synchronously before span-open, condition 1 holds by construction and the join is sound. If the runtime pre-allocates and backfills to avoid the mint RPC, condition 1 is only probabilistically satisfied, and the audit trail must be treated as *advisory* until a reconciliation pass re-orders the chain by timestamp. The operational rule: an instance must **refuse to emit a span marked `authorizes`-linked to a warrant whose `minted_at` is unset or later than the span's own `start_time`**. It should emit the span with a `lineage_unverified = true` flag and a `pending_warrant = ` attribute instead, and the reconciler must either promote it (backfill confirmed, timestamps reordered) or quarantine it. Emitting a span that *claims* authorization it cannot temporally prove is the exact defect. This is a refusal, not a retry. Retrying the mint does not fix the ordering — the span already started. The correct response is to degrade the span's claim from proof to hint. ## Operational Effect Without the refusal, the audit trail's soundness degrades silently under load: the very moments when warrant-mint RPCs are slowest are the moments when the pre-allocation shortcut is most tempting and when backfill most often lands late. The trail looks complete (every `warrant_id` resolves) while containing an unbounded fraction of temporally impossible edges. Downstream taint analysis then treats tainted memory as clean, and any compliance or safety gate keyed on "clean lineage" passes a poisoned record. With the refusal, the reconciler sees an explicit `lineage_unverified` population, can bound it, and can fail closed on any tainted write whose warrant ordering cannot be proved. ```python from dataclasses import dataclass from datetime import datetime class LineageOrderingViolation(RuntimeError): """Raised when a span claims authorization from a warrant that did not yet exist.""" @dataclass class Span: span_id: str start_time: datetime taint_id: str | None claimed_warrant_id: str | None authorizes_link: bool @dataclass class Warrant: warrant_id: str minted_at: datetime | None # None => pre-allocated, not yet backfilled def emit_span(span: Span, warrants: dict[str, Warrant], strict: bool = True) -> dict: """Decide whether a span may assert authorized lineage, or must degrade to a hint.""" attrs = { "span_id": span.span_id, "taint_id": span.taint_id, "claimed_warrant_id": span.claimed_warrant_id, } if span.claimed_warrant_id is None: attrs["lineage_unverified"] = False return attrs warrant = warrants.get(span.claimed_warrant_id) if warrant is None: raise LineageOrderingViolation( f"span {span.span_id} references unknown warrant {span.claimed_warrant_id}" ) # Causal precedence invariant: the warrant must predate the span it authorizes. if warrant.minted_at is None: attrs["lineage_unverified"] = True attrs["pending_warrant"] = warrant.warrant_id attrs["degraded_reason"] = "warrant_not_yet_minted" return attrs if warrant.minted_at >= span.start_time: if strict and span.authorizes_link: # The span asserts an 'authorizes' edge it cannot temporally prove. raise LineageOrderingViolation( f"span {span.span_id} start={span.start_time.isoformat()} " f"claims authorization from warrant {warrant.warrant_id} " f"minted_at={warrant.minted_at.isoformat()} (effect precedes cause)" ) attrs["lineage_unverified"] = True attrs["degraded_reason"] = "warrant_minted_after_span_open" return attrs attrs["lineage_unverified"] = False attrs["lineage_verified"] = True return attrs ```