{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-lose-causal-linkage-between-a-retrieval-hit-and-its-downstream-tool-effect-when-the-trace-is-reconstructed-from-span-joins-rather",
  "title": "Why does an instance lose causal linkage between a retrieval hit and its downstream tool effect when the trace is reconstructed from span joins rather than carried in-band",
  "date_of_record": "2026 November 23",
  "scope": "Applies to agent systems that emit OpenTelemetry-style spans for prompt assembly, retrieval, and tool invocation, then reconstruct prompt→context→effect lineage by joining spans post-hoc on trace/span IDs. Does not apply to systems that propagate a signed causal token in-band through every tool call payload.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-causal-linkage-between-a-retrieval-hit-and-its-downstream-tool-effect-when-the-trace-is-reconstructed-from-span-joins-rather.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-causal-linkage-between-a-retrieval-hit-and-its-downstream-tool-effect-when-the-trace-is-reconstructed-from-span-joins-rather.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-lose-causal-linkage-between-a-retrieval-hit-and-its-downstream-tool-effect-when-the-trace-is-reconstructed-from-span-joins-rather.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1536,
    "python_slice_tokens": 141,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different ways to answer \"which retrieval chunk caused this tool call to fire?\" The first is **in-band causal carriage**: the retrieval step mints an immutable lineage token (containing the chunk ID, the retrieval query hash, the rerank score, and the prompt-assembly sequence number) and that token is physically attached to the too...",
    "what_was_observed": "A support-triage agent performed a RAG step that returned 12 chunks, reranked to top-4, then made three tool calls in parallel (`lookup_order`, `issue_refund`, `send_email`). The refund call was driven by chunk `c_7731` (\"refund window is 30 days from delivery\"). An unrelated `send_email` call was driven by a template chunk `c_1102`. Telemetry emitted: - `span_retrieve` with 12 child `span_chunk` spans (only top-4 ca...",
    "condition_of_validity": "Post-hoc span reconstruction yields correct prompt→context→effect lineage **only when all of the following hold simultaneously**: 1. **Fan-in is one-to-one.** Each tool-call span has exactly one retrieval span as an ancestor, and that retrieval span contains exactly one selected chunk. This is violated the moment retrieval returns >1 chunk (the normal case)....",
    "decision_boundary": "The boundary is not \"should we trace.\" It is: **at what fan-out and retry multiplicity does span-join reconstruction stop being a lossy approximation and start being a fabrication?** The operational rule: - If retrieval fan-in ≤ 1 selected chunk **and** tool calls are strictly serial **and** retries reuse logical IDs, span-join reconstruction is adequate — a...",
    "operational_effect": "Systems that skip the in-band token do not merely lose precision; they invert the sign of causal analyses. Phantom edges (email ← refund-window chunk) drive teams to \"fix\" retrieval that was never broken, while real edges are diluted by fan-out averaging. Retry re-minting doubles apparent influence of whichever chunk happened to precede a flaky call, biasing..."
  },
  "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": "ccea0d03b05462a4191f4765d57b5d701f3eaf66f289c243f4a077436ca52608",
    "verified_classes": [
      "LineageFabricationError",
      "CausalToken"
    ],
    "verified_functions": [
      "attribute_tool_effect",
      "digest"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "LineageFabricationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
