{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-and-bound-causal-span-link-collapse-when-a-critic-agent-re-parents-planner-spans-during-retry-driven-trace-reconstructio",
  "title": "How should an instance detect and bound causal span-link collapse when a critic agent re-parents planner spans during retry-driven trace reconstruction",
  "date_of_record": "2026 November 24",
  "scope": "Applies to multi-agent traces where a planner emits spans, tool agents execute under those spans, and a critic agent emits verification spans that are causally linked back to the planner's decision span via explicit parent IDs propagated through an A2A/MCP handoff envelope. Does not apply to single-agent traces with linear span trees, nor to traces where span relationships are reconstructed purely from wall-clock timestamps.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-bound-causal-span-link-collapse-when-a-critic-agent-re-parents-planner-spans-during-retry-driven-trace-reconstructio.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-bound-causal-span-link-collapse-when-a-critic-agent-re-parents-planner-spans-during-retry-driven-trace-reconstructio.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-and-bound-causal-span-link-collapse-when-a-critic-agent-re-parents-planner-spans-during-retry-driven-trace-reconstructio.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1935,
    "python_slice_tokens": 460,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters here is between *causal linkage* (span B declares span A as its parent because A's decision causally produced B) and *temporal adjacency* (span B appears immediately after span A in a trace viewer). Observability backends routinely conflate the two because most span reconstruction is timestamp-driven. In agent systems this confla...",
    "what_was_observed": "A three-agent pipeline (planner → tool executor → critic) was instrumented with OpenTelemetry spans. The planner emitted `planner.decide` spans. On tool failure, the planner's retry loop emitted `planner.decide` again with a new span ID but the *same* logical decision ID (a UUID carried in the A2A envelope's `decision_id` field). The tool executor wrapped each call in `tool.invoke` with `parent_span_id = <current pla...",
    "condition_of_validity": "The invariant holds only when all three of the following are true: 1. **The decision ID is stable across retries.** If the planner generates a new `decision_id` on each retry (rather than reusing it), then the critic's `parent_span_id` overwrite is *correct* — the critic is genuinely auditing a new decision. The failure mode only exists when `decision_id` is...",
    "decision_boundary": "The boundary is between **treating `parent_span_id` as routing metadata** (mutable, overwritten on retry) and **treating it as a causal witness** (immutable, set once at decision emission and never rewritten). The correct architectural rule: `parent_span_id` in a handoff envelope MUST be write-once at the moment the decision span is created, and any retry MU...",
    "operational_effect": "Without the guardrail, the trace backend produces a *plausible but causally inverted* trace tree. The effect propagates: (a) per-decision critic rejection rates are misattributed to the wrong planner attempt, corrupting retry-policy tuning; (b) latency attribution between planner and critic is wrong because the critic's span is measured against the retry's t..."
  },
  "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": "003313361d017cf1ac1312a387b7c26b166d412ea4947457d986c48a49c2446f",
    "verified_classes": [
      "CausalSpanLinkError",
      "Span",
      "HandoffEnvelope"
    ],
    "verified_functions": [
      "emit_decision",
      "retry_decision",
      "emit_critic",
      "validate_causal_link"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "CausalSpanLinkError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
