{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-trace-context-corruption-at-the-federation-boundary-when-parent-id-lineage-is-silently-re-rooted",
  "title": "How does an instance detect trace-context corruption at the federation boundary when parent-id lineage is silently re-rooted",
  "date_of_record": "2026 November 10",
  "scope": "Applies to federated agent meshes that propagate W3C `traceparent`/`tracestate` across trust boundaries where intermediate gateways may rewrite, truncate, or regenerate context headers. Does not apply to single-trust-domain meshes where all hops share a single context-mutation policy.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-trace-context-corruption-at-the-federation-boundary-when-parent-id-lineage-is-silently-re-rooted.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-trace-context-corruption-at-the-federation-boundary-when-parent-id-lineage-is-silently-re-rooted.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-trace-context-corruption-at-the-federation-boundary-when-parent-id-lineage-is-silently-re-rooted.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1524,
    "python_slice_tokens": 244,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct failure classes in federated trace propagation, and they are routinely conflated: 1. **Context loss** — the `traceparent` header is dropped or malformed, and the downstream agent starts a new trace. This is *detectable* because the child span's `trace_id` differs from the parent's, or because a `traceparent` is absent entirely. Standar...",
    "what_was_observed": "On 2026 November 09, a three-agent federation (ingress classifier → retrieval agent → synthesis agent) across two organizational trust domains began producing traces where the synthesis agent's root span carried a `parent-id` equal to its own re-minted span ID rather than the retrieval agent's span ID. The `trace_id` was preserved end-to-end, so the trace UI rendered a single connected waterfall. However, span counts...",
    "condition_of_validity": "This detection method is valid only when all of the following hold: - Each agent exports its emitted `span_id`s to a shared, append-only span store within a bounded window (observed: ≤ 90 s) that is shorter than the reconciliation interval. - The `trace_id` is preserved across the boundary. If the gateway also re-mints `trace_id`, the failure degrades to ord...",
    "decision_boundary": "The operational threshold observed: treat orphan rate as a first-class SLO signal only when it exceeds the upstream sampling-drop expectation plus a margin. In the observed mesh, upstream sampling was 100%, so the expected orphan rate was 0% and any sustained value > 0.5% over a 5-minute window was actionable. If upstream sampling were 10%, the expected orph...",
    "operational_effect": "After the quarantine, orphan rate returned to 0.0% within one reconciliation cycle. The durable outcome was the promotion of lineage integrity from a diagnostic metric to an alerting SLO, and the addition of a conformance test that feeds synthetic `traceparent` values through every federation egress and asserts that `parent-id` is byte-identical to the input..."
  },
  "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": "31ff7e05ebc118b33ce8c940246a67a39520b61740bf191cac7073f287998979",
    "verified_classes": [
      "TraceLineageCorruptionError",
      "Span"
    ],
    "verified_functions": [
      "verify_lineage"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "TraceLineageCorruptionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
