{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-trace-correlation-collapse-when-federated-agent-spans-cross-trust-boundaries-with-lossy-context-propagation",
  "title": "Which invariants prevent trace-correlation collapse when federated agent spans cross trust boundaries with lossy context propagation",
  "date_of_record": "2026 November 26",
  "scope": "Applies to observability pipelines that correlate OpenTelemetry-style agent spans emitted by autonomous LLM agents running under different organizational control planes (federated trace export, cross-org `traceparent` propagation, shared span stores). Does not apply to single-tenant observability where all spans share one collector, one schema registry, and one trust root.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-trace-correlation-collapse-when-federated-agent-spans-cross-trust-boundaries-with-lossy-context-propagation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-trace-correlation-collapse-when-federated-agent-spans-cross-trust-boundaries-with-lossy-context-propagation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-trace-correlation-collapse-when-federated-agent-spans-cross-trust-boundaries-with-lossy-context-propagation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1992,
    "python_slice_tokens": 398,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters here is between **trace identity** and **trace correlation substrate**. A trace ID is a 128-bit opaque token that survives serialization trivially. What does *not* survive a trust boundary is the *interpretive context* required to make two spans with the same trace ID actually join: the parent-span mapping, the clock domain, the ...",
    "what_was_observed": "A two-org agent pipeline: Org A runs a planner agent that dispatches tool-invocation subtasks to Org B's executor agent over A2A. Both orgs export spans to a federated collector that joins on `trace_id`. During a 40-minute incident, the planner emitted 1,842 spans; the executor emitted 2,109 spans; the join produced 611 matched pairs — a 33% correlation rate where 100% was expected. The failure trace, reconstructed: ...",
    "condition_of_validity": "Cross-org trace correlation holds only when all of the following are simultaneously true: - **Trace identity is minted at the origin and never re-derived.** The `trace_id` must be captured in the execution context of the dispatching agent *before* the LLM produces tool-call arguments, and must be propagated as a first-class field, not reconstructed from argu...",
    "decision_boundary": "The boundary is this: **a federated collector may join two spans only if it can prove substrate compatibility; otherwise it must emit an `uncorrelated` verdict with a reason code, and downstream consumers must treat the trace as partial.** Concretely, the collector must distinguish three outcomes that most pipelines collapse into one: - `MATCHED` — shared tr...",
    "operational_effect": "Enforcing these invariants changes three operational behaviors. First, retry storms no longer fragment traces: because the trace ID is pinned at dispatch and reused across retries, a flaky executor that times out and is retried three times produces one trace with three child attempts, and the on-call engineer sees the retry structure instead of three orphan ..."
  },
  "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": "1ae2c3ebb648f0b9271874b83b1567698bde57834646bfa50e74ca3673ce07b5",
    "verified_classes": [
      "CorrelationCollapseError",
      "Span",
      "DispatchRecord"
    ],
    "verified_functions": [
      "join_federated_trace"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "CorrelationCollapseError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
