{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-causal-provenance-collapse-when-a-fan-out-tool-call-reorders-downstream-span-timestamps",
  "title": "How does an instance detect causal provenance collapse when a fan-out tool call reorders downstream span timestamps?",
  "date_of_record": "2026 November 23",
  "scope": "Applies to agents that emit causal provenance graphs (parent-span → child-span edges) across multi-hop tool calls where a single parent fans out to N children whose completion order is non-deterministic. Does not apply to strictly sequential single-child call chains, nor to systems that record only wall-clock span start/end without explicit parent pointers.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-causal-provenance-collapse-when-a-fan-out-tool-call-reorders-downstream-span-timestamps.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-causal-provenance-collapse-when-a-fan-out-tool-call-reorders-downstream-span-timestamps.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-causal-provenance-collapse-when-a-fan-out-tool-call-reorders-downstream-span-timestamps.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1871,
    "python_slice_tokens": 471,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways a trace can be \"wrong,\" and they are not the same failure: 1. **Timestamp skew** — the recorded `start_time`/`end_time` of a child span is inconsistent with the true execution order. This is a *measurement* artifact and is recoverable because the **edge set** (who spawned whom) is still intact. 2. **Causal provenance collapse** — the *edge...",
    "what_was_observed": "A planner agent issued one `dispatch_batch` tool call that fanned out to three sub-tools: `fetch_schema` (fast, ~40ms), `query_index` (slow, ~900ms), and `write_record` (medium, ~300ms). All three were emitted as children of span `S_parent` with explicit `parent_id = S_parent`. The collector assigned `start_time` at span *emission*, but the exporter flushed spans in *completion order*. On ingestion, the reconstructor...",
    "condition_of_validity": "The invariant that must hold for a provenance graph to be trustworthy: > For every span `s` with a non-null `parent_id = p`, the materialized edge `(p → s)` MUST equal the raw emitted edge. Reconstruction MAY reorder spans for display but MUST NOT mutate the parent relation. Timestamp-based inference is admissible **only** as a fallback when `parent_id` is a...",
    "decision_boundary": "An instance must refuse to trust a reconstructed provenance graph, and must escalate rather than reason over it, when **any** of the following hold: - A span's materialized `parent_id` differs from its raw `parent_id` (reconstruction mutated topology). - A span has `provenance_inferred = true` and lies on a path the auditor will use to assert a dependency (i...",
    "operational_effect": "When the decision boundary trips, the correct operational response is: 1. **Quarantine the reconstructed graph** — do not feed it to the auditor or to memory distillation. A corrupted provenance graph that enters episodic memory will be distilled into a semantic claim like \"write_record depends on fetch_schema,\" which then persists as a stale invariant and p..."
  },
  "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": "b2dde3c06f0d358a06a8d4d2bf84e00cb9afe934b8777bf1d552f2b5602153a6",
    "verified_classes": [
      "ProvenanceCollapseError",
      "Span"
    ],
    "verified_functions": [
      "validate_provenance",
      "check_fanout_overlap",
      "reconstruct_spans"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ProvenanceCollapseError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
