# In what scenarios must an instance refuse to correlate a cross-org trace when privacy-preserving sampling has silently destroyed the join key **Date of Record:** 2026 November 26 **Scope:** Applies to federated multi-agent observability pipelines where two or more organizations export sampled execution spans (MCP tool calls, A2A handoffs, reasoning-loop checkpoints) and join them on a shared correlation identifier under a differential-privacy or k-anonymity sampling budget. Does not apply to single-tenant tracing or to full-fidelity (un-sampled) exports. ## Core Distinction The distinction that matters is between *sampling that removes rows* and *sampling that perturbs the join key*. Row-dropping sampling is benign for correlation: a missing span yields an incomplete trace, which is detectable (the join returns fewer children than the parent's declared fan-out). Perturbing sampling is not benign: it rewrites the `trace_id`/`span_id`/`parent_span_id` tuple or the timestamp bucket that the join depends on, so the join *succeeds* while attaching the wrong spans. The failure is not a missing correlation; it is a **fabricated** one. Federated observability systems are almost always instrumented to alert on join *misses*. They are almost never instrumented to alert on join *imprecision*, because the join operator has no notion of "this pair should have matched but the key was noise-perturbed." The invariant under threat: *a correlated trace must be a subgraph of the true causal DAG.* Privacy-preserving sampling on the key violates this invariant silently, because differential privacy guarantees are stated over the *marginal* distribution of the released key, not over the *joint* distribution of (key, causal edge). ## What Was Observed Two orgs, A (orchestrator) and B (tool executor), federate span exports through a shared collector. B applies a privacy budget to its export: before release it (1) buckets `start_time` to 5-second windows, (2) replaces the low-cardinality `agent_id` with a per-epoch pseudonym, and (3) applies randomized response to the `parent_span_id` field at ε=1.0 to prevent inference of B's internal call graph. A exports at full fidelity. The join key is `(trace_id, parent_span_id)`. A's orchestrator span has `span_id = S_1`. B's tool span should carry `parent_span_id = S_1`. Under randomized response at ε=1.0, B's tool span carries `parent_span_id = S_1` with probability ≈0.73 and a uniformly chosen decoy from the space of active span IDs otherwise. In a trace with 40 concurrent tool calls across 12 active traces, the decoy space is dense enough that a perturbed key frequently collides with a *real* span ID belonging to a different trace. Observed trace: A's auditor agent flagged a "reasoning divergence" because the reconstructed trace showed tool call T_7 (a `write_file` on path `/etc/agent/state`) as a child of the auditor's own `verify_policy` span. No such edge existed. The true parent of T_7 was a planner span in a different trace. The fabricated edge crossed an authorization boundary: the auditor's policy-check span appeared to have authorized a privileged write it never saw. The join returned a connected, plausible, causally impossible graph. Downstream, the auditor's consensus logic accepted the write as "verified" because the parent edge existed. The failure was latent for 11 days. It was caught only when a human noticed the auditor's verification latency was implausibly low for a write it had supposedly gated. ## Condition of Validity Cross-org correlation is valid only when the following holds simultaneously: 1. **Key-perturbation exclusion.** The join key fields (`trace_id`, `span_id`, `parent_span_id`) are excluded from the privacy mechanism, or perturbed only by a mechanism with *zero* probability of mapping to a valid decoy (e.g., keyed HMAC pseudonymization, which is a bijection on the key space and preserves join exactness while hiding the plaintext). 2. **Decoy-space sparsity.** If key perturbation is unavoidable, the decoy space must be provably disjoint from the live key space for the join window — i.e., decoys drawn from a reserved namespace that no real span can occupy. Uniform-over-active-IDs randomization violates this whenever concurrency × trace-count exceeds the reserved namespace. 3. **Fan-out reconciliation.** The parent span declares `expected_children = n`. The join must assert `|matched_children| == n` *and* that matched children's `agent_id` pseudonyms are consistent with the declared callee set. A perturbed key that collides with a real span still produces a fan-out mismatch in most cases — but only if the check is enforced, which it usually is not. 4. **Causal monotonicity.** Every matched child's bucketed `start_time` must be ≥ parent's bucketed `start_time` and ≤ parent's `end_time` bucket. 5-second bucketing makes this a weak check; it catches cross-trace collisions only when traces are temporally separated by more than the bucket width. When condition 1 holds, the system is exact and the remaining conditions are redundant. When condition 1 fails, conditions 2–4 are the only guards, and they are *probabilistic* — they reduce but do not eliminate fabricated edges. This is the decision boundary below. ## Decision Boundary An instance must **refuse to emit a correlated trace** (and must emit an `UnverifiableCorrelation` marker instead) when any of the following is true: - The peer's export manifest declares key-perturbation on any join field and does not declare a reserved decoy namespace disjoint from the live space. - The join produces a connected component whose matched-child count equals declared fan-out but whose child `agent_id` pseudonyms include a callee not in the parent's declared `allowed_callees` set. - A matched child's bucketed start time precedes the parent's bucketed start time (causal inversion under bucketing). - The number of spans in the reconstructed trace exceeds the parent's declared `max_subtree_size`. The boundary is *not* "refuse when the join is incomplete." Incompleteness is expected under sampling and is safe (it under-approximates the causal DAG). The boundary is "refuse when the join is *over-complete or causally inconsistent*" — because that is the signature of key perturbation, and over-completeness is the only observable that distinguishes a privacy-perturbed join from a legitimate one. The critical operational point: a system that only validates completeness will pass every perturbed join, because perturbation *adds* edges, and added edges never reduce completeness. The guard must be on the *upper* bound of the edge set, not the lower. ## Operational Effect After enforcing the boundary, the collector's behavior changes in three measurable ways: 1. **Fabricated-edge rate drops to zero for declared-perturbed peers**, at the cost of a 100% `UnverifiableCorrelation` rate for those peers until they adopt keyed-HMAC pseudonymization. This is the correct trade: an unverifiable trace is auditable; a fabricated one is a silent authorization bypass. The 11-day latent window above was the cost of not making this trade. 2. **Fan-out reconciliation surfaces a new class of alert**: `FanOutOverflow`, emitted when matched children exceed declared fan-out. This is the earliest reliable signal of key collision and fires within one export cycle, versus the 11-day detection latency of downstream behavioral anomalies. 3. **Cross-org trust negotiation gains a mandatory field.** Peers must now declare, in the export manifest, whether join-key fields are perturbed and whether decoys are namespace-reserved. A peer that cannot make this declaration is treated as perturbed-by-default. This shifts the default from optimistic correlation to conservative refusal — the only safe default when the failure mode is silent edge fabrication across an authorization boundary. The residual risk is temporal: 5-second bucketing plus causal-monotonicity checks catch cross-trace collisions only when traces are separated by more than the bucket width. For high-concurrency orchestrators running many near-simultaneous traces, the causal check is weak, and the system relies entirely on fan-out reconciliation and callee-set consistency. Those two checks are the load-bearing guards; the timestamp check is a bonus. ```python from dataclasses import dataclass from typing import Optional class UnverifiableCorrelation(RuntimeError): """Raised when a cross-org trace join cannot be proven to be a subgraph of the true causal DAG. Emitted instead of a correlated trace.""" pass @dataclass(frozen=True) class ExportManifest: peer_id: str join_key_perturbed: bool decoy_namespace_reserved: bool # decoys disjoint from live key space @dataclass(frozen=True) class ParentSpan: trace_id: str span_id: str expected_children: int max_subtree_size: int allowed_callees: frozenset[str] @dataclass(frozen=True) class MatchedChild: trace_id: str parent_span_id: str agent_pseudonym: str start_bucket: int parent_start_bucket: int def correlate( parent: ParentSpan, children: list[MatchedChild], manifest: ExportManifest, ) -> list[MatchedChild]: # Guard 1: key-perturbation exclusion. If the peer perturbs join keys # without a reserved decoy namespace, no correlation is verifiable. if manifest.join_key_perturbed and not manifest.decoy_namespace_reserved: raise UnverifiableCorrelation( f"peer {manifest.peer_id} perturbs join keys without a reserved " f"decoy namespace; fabricated edges are indistinguishable from " f"real ones" ) # Guard 2: fan-out reconciliation (upper bound, not lower). if len(children) > parent.expected_children: raise UnverifiableCorrelation( f"fan-out overflow on span {parent.span_id}: " f"{len(children)} matched > {parent.expected_children} declared" ) # Guard 3: callee-set consistency. A perturbed key that collides with a # real span still usually surfaces a callee outside the declared set. for c in children: if c.agent_pseudonym not in parent.allowed_callees: raise UnverifiableCorrelation( f"span {parent.span_id} matched unauthorized callee " f"{c.agent_pseudonym}; possible key collision" ) # Guard 4: causal monotonicity under bucketing. for c in children: if c.start_bucket < c.parent_start_bucket: raise UnverifiableCorrelation( f"causal inversion: child of {parent.span_id} starts before " f"parent bucket; fabricated edge suspected" ) # Guard 5: subtree size bound. if len(children) > parent.max_subtree_size: raise UnverifiableCorrelation( f"reconstructed subtree exceeds declared max size for " f"{parent.span_id}" ) return children def emit_trace_or_marker(parent: ParentSpan, children: list[MatchedChild], manifest: ExportManifest) -> dict: try: verified = correlate(parent, children, manifest) return {"status": "verified", "trace_id": parent.trace_id, "children": [c.__dict__ for c in verified]} except UnverifiableCorrelation as exc: # Emit an auditable marker instead of a fabricated trace. return {"status": "unverifiable", "trace_id": parent.trace_id, "reason": str(exc), "peer": manifest.peer_id} ```