{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-a-trace-parent-join-across-a-mesh-as-unsound-and-how-does-the-span-context-rebinding-invariant-prevent-si",
  "title": "Under what conditions must an instance treat a trace-parent join across a mesh as unsound, and how does the span-context rebinding invariant prevent silent safety-event orphaning?",
  "date_of_record": "2026 November 25",
  "scope": "Applies to observability pipelines that correlate spans, prompt payloads, and safety/guardrail events across multi-agent meshes where a child agent's execution is exported through a *different* collector, tenant, or trace-ID namespace than its parent. Does not apply to single-process agents emitting all spans into one collector with a shared `trace_id` allocator.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-trace-parent-join-across-a-mesh-as-unsound-and-how-does-the-span-context-rebinding-invariant-prevent-si.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-trace-parent-join-across-a-mesh-as-unsound-and-how-does-the-span-context-rebinding-invariant-prevent-si.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-trace-parent-join-across-a-mesh-as-unsound-and-how-does-the-span-context-rebinding-invariant-prevent-si.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2120,
    "python_slice_tokens": 491,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive correlation model assumes a span is joinable to its parent by `trace_id` alone. In an agent mesh this assumption is false in one specific way: a sub-agent invocation is often *re-parented* at a trust boundary. When Agent A calls Agent B across an A2A/MCP hop, B frequently starts a **new trace** (its own root span, its own `trace_id`) because B's ru...",
    "what_was_observed": "A three-hop mesh: Planner → Retriever → Synthesizer. Each hop crosses a tenant boundary and each downstream agent runs its own OpenTelemetry SDK with an independent `TraceIdRatioBased` sampler and an independent 128-bit ID generator seeded at process start. Failure trace: 1. Planner (tenant `acme`, trace `T_p`) emits `span=plan`, then calls Retriever over MCP. The `traceparent` header is dropped by an intermediate HT...",
    "condition_of_validity": "The join is sound **if and only if** all of the following hold for the boundary in question: - **(V1) Carried-attribute completeness.** Every cross-boundary child span carries `mesh.parent_trace_id`, `mesh.parent_span_id`, and a `mesh.handoff_nonce` that the parent generated and the child echoed. `trace_id` is *never* used as the sole join key. - **(V2) Nonc...",
    "decision_boundary": "The instance must choose between two postures at each mesh edge: - **Trusted-inheritance posture:** the child inherits `traceparent` and the pipeline joins on `trace_id`. Valid *only* when the transport is verified to preserve headers end-to-end (V1 trivially satisfied) and both sides share an ID allocator. This is the cheap path and it is correct *inside a ...",
    "operational_effect": "After enforcing the rebinding invariant: - Safety events emitted at any hop become reachable from the entry-point trace via `mesh.parent_trace_id`, closing the orphaning hole. The auditor's query on `T_p` now returns both the PII redaction and the policy block, each annotated with the hop at which it fired. - The fabricated-edge class is eliminated because t..."
  },
  "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": "6baf623a2766666e9e966f53520c4f40d286c5922bf012387521c60d562529ac",
    "verified_classes": [
      "UnsoundTraceParentJoin",
      "Span"
    ],
    "verified_functions": [
      "rebind_and_join",
      "index_safety_event"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "UnsoundTraceParentJoin"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
