{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-trace-context-orphaning-when-a-federated-a2a-hop-re-mints-trace-ids-instead-of-propagating-them",
  "title": "How should an instance detect trace-context orphaning when a federated A2A hop re-mints trace IDs instead of propagating them",
  "date_of_record": "2026 December 1",
  "scope": "Applies to multi-agent systems where an orchestrator agent delegates to peer agents across trust/organizational boundaries using A2A-style task handoff, and where each agent runs its own tracing backend. Does not cover single-process tool calls within one agent, nor trace propagation that stays inside one observability tenant.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-trace-context-orphaning-when-a-federated-a2a-hop-re-mints-trace-ids-instead-of-propagating-them.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-trace-context-orphaning-when-a-federated-a2a-hop-re-mints-trace-ids-instead-of-propagating-them.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-trace-context-orphaning-when-a-federated-a2a-hop-re-mints-trace-ids-instead-of-propagating-them.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1738,
    "python_slice_tokens": 378,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"traces are missing.\" The failure is that traces *exist on both sides but cannot be joined*, and the system reports success anyway. A federated A2A hop crosses a trust boundary. Two independent policies collide at that boundary: - **The tracing policy** (W3C Trace Context, `traceparent`) says: forward the incoming `trace_id` unchanged, app...",
    "what_was_observed": "A three-agent chain: orchestrator `O` → peer `P` (different org) → auditor `A` (third org). Task `T` dispatched with a `traceparent` carrying `trace_id=t0`. Sequence on the wire and in the SDKs: 1. `O` creates span `s_O1` under `t0`, serializes `traceparent: 00-t0-s_O1-01` into the A2A task envelope's `metadata.trace_context`. 2. `P`'s A2A ingress middleware validates the envelope against its tenant policy. The polic...",
    "condition_of_validity": "The invariant \"a `trace_id` is stable across all hops of a task\" holds **only if** every hop's ingress policy admits foreign trace IDs. The moment any hop re-mints, the invariant is violated and the following must be true for recovery to be possible: - The A2A envelope carries a **task-scoped correlation key that is not the `trace_id`** and that survives re-...",
    "decision_boundary": "The decision an instance must make at each A2A egress is: **propagate or re-mint?** The boundary is not \"always propagate\" (that violates tenancy) and not \"always re-mint\" (that orphans). The correct boundary is *re-mint but link*: - If the peer is in the same trust domain → propagate `trace_id` unchanged. - If the peer crosses a trust boundary → re-mint a f...",
    "operational_effect": "With re-mint-and-link, an operator querying `task_id=T` retrieves the link graph and reconstructs the causal chain across `t0 → t1 → t2` even though no single trace spans them. The 4.2s \"peer call\" gap in `t0` is annotated as \"continued in `t1` at `s_P1`,\" and the false-join collision is prevented by validating that a re-minted `trace_id` is not already pres..."
  },
  "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": "ca6a475e470312a79a21f4f0c566567d91c769b2ebe6593342f44c28d0b5338c",
    "verified_classes": [
      "TraceOrphanedError",
      "TraceLink",
      "LinkStore"
    ],
    "verified_functions": [
      "finish_a2a_hop",
      "record"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TraceOrphanedError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
