{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-causal-trace-ordering-when-federated-agents-exchange-spans-across-skewed-clocks",
  "title": "How should an instance reconcile causal trace ordering when federated agents exchange spans across skewed clocks",
  "date_of_record": "2026 November 21",
  "scope": "Applies to multi-agent systems that propagate distributed trace context (trace/span IDs, parent links, timestamps) across agent-instance boundaries where each instance stamps spans with its own local clock and spans are later merged into a single causal trace. Does not apply to single-process agents, or to federated systems that use a single authoritative logical clock (e.g., one coordinator issuing monotonic sequence numbers to all spans).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-causal-trace-ordering-when-federated-agents-exchange-spans-across-skewed-clocks.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-causal-trace-ordering-when-federated-agents-exchange-spans-across-skewed-clocks.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-causal-trace-ordering-when-federated-agents-exchange-spans-across-skewed-clocks.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1729,
    "python_slice_tokens": 398,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not \"clocks are wrong.\" It is that **causal ordering and wall-clock ordering are independent invariants that get silently conflated at the merge point.** A trace is a partial order defined by parent-child span links (happens-before via context propagation). A timestamp is a total order defined by each agent's local clock. When federated a...",
    "what_was_observed": "Three federated agent instances—`planner`, `retriever`, `writer`—propagate W3C `traceparent` headers over MCP tool calls. Each runs on a separate host with independent NTP. Skew between `planner` and `writer` was measured at +840 ms (writer's clock ahead). A single user task produced this span set (timestamps in ms, local clocks): The causal chain is `A1 -> B1 -> C1 -> C2`, which is valid: planner invoked retriever a...",
    "condition_of_validity": "Timestamp-based reconstruction of a federated trace is valid **only** if, for every causally-linked span pair `(parent P, child C)`: i.e., the child's clock-corrected start is not earlier than the parent's start. This requires a per-agent skew estimate `skew(agent, reference)` with a *bounded* error `±ε`, and the guarantee that no true inter-span gap is smal...",
    "decision_boundary": "The instance must choose between two merge strategies at the boundary where spans from different agents are combined: - **Timestamp-primary sort** — valid only when measured skew bound `ε` is strictly less than half the minimum observed inter-span gap, and all agents share a calibrated clock source. This is the default in most tracing libraries and is the wr...",
    "operational_effect": "When the boundary is crossed undetected, three downstream effects compound: 1. **False causal violations.** The auditor rejects valid traces (as observed), triggering spurious rollbacks. Because the trace *graph* is correct, retries reproduce the same rejection deterministically—the system appears to have a persistent corruption that no retry clears. 2. **Re..."
  },
  "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": "c19536cd19ac3b32e17591d203886ea784877369bc8ded5f89b71e484801aab3",
    "verified_classes": [
      "CausalOrderViolation",
      "SkewUnmeasured"
    ],
    "verified_functions": [
      "merge_federated_trace",
      "_toposort",
      "_min_handoff_gap"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "CausalOrderViolation",
      "SkewUnmeasured"
    ],
    "sample_fail_closed_invariants": [
      "span-link graph contains a cycle; trace is genuinely corrupt"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
