{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-causal-ordering-of-trace-spans-when-a-federated-agent-hop-injects-its-own-local-clock-into-an-inherited-trace-context",
  "title": "Why does an instance lose causal ordering of trace spans when a federated agent hop injects its own local clock into an inherited trace context?",
  "date_of_record": "2026 November 26",
  "scope": "Applies to multi-hop agent federations (A2A, MCP-over-HTTP, custom RPC) where each agent propagates a W3C-style trace context (`traceparent`, `tracestate`) across a handoff and emits spans into a shared collector. Does not apply to single-process agents or to systems where all spans are stamped by one authoritative clock at the collector.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-causal-ordering-of-trace-spans-when-a-federated-agent-hop-injects-its-own-local-clock-into-an-inherited-trace-context.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-causal-ordering-of-trace-spans-when-a-federated-agent-hop-injects-its-own-local-clock-into-an-inherited-trace-context.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-causal-ordering-of-trace-spans-when-a-federated-agent-hop-injects-its-own-local-clock-into-an-inherited-trace-context.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1605,
    "python_slice_tokens": 245,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two different things an agent hop can preserve when it forwards a trace: **identity correlation** (the same `trace_id` flows end-to-end, so spans can be *grouped*) and **causal ordering** (the parent-child and happens-before relations between spans are recoverable, so spans can be *sequenced*). Most federated agent stacks guarantee the first and si...",
    "what_was_observed": "A three-agent chain: `orchestrator → retriever → synthesizer`. The orchestrator emitted span `S_orch` (start T0, end T0+400ms), handed off to the retriever over A2A with a valid `traceparent`. The retriever ran for 900ms, emitted `S_retr`, and handed to the synthesizer. The synthesizer was cold-started (container spin-up, 1.2s queue delay) and its SDK stamped `S_synth.start_time` from the *host* clock, which had drif...",
    "condition_of_validity": "The invariant that must hold for timestamp-based ordering to be sound across a federated hop is: > For any two spans A and B where A causally precedes B, `A.end_time ≤ B.start_time` **in a single shared clock domain**, OR the trace records an explicit **clock-domain transition** at the hop so that any consumer knows not to compare A and B on raw timestamps. ...",
    "decision_boundary": "The architectural guardrail is a hard rule at the handoff boundary, enforced by the receiving agent's trace middleware before it emits any span: 1. On receiving an inherited `tracestate`, the agent **must not** overwrite the upstream clock-domain key. If it cannot honor the upstream domain, it must append a `clk_break=<measured_offset_ms>` entry and set a sp...",
    "operational_effect": "Without the invariant, the system produces **confidently wrong causal reconstructions** — the worst failure class for an auditor agent, because the trace is complete and the trace_id matches, so nothing triggers a re-check. Downstream effects compound: a verifier that inverts a cause-effect edge will pass a replay that contradicts ground truth; a memory-dist..."
  },
  "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": "84e26461b7ce1793c6ee77e751c1f3af667ff57820faa0d9928d31c196ab1314",
    "verified_classes": [
      "CausalOrderViolation"
    ],
    "verified_functions": [
      "order_spans",
      "verify_handoff"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CausalOrderViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
