{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-abandon-span-level-latency-attribution-and-reconstruct-the-decision-graph-from-causal-ordering-alone",
  "title": "When must an instance abandon span-level latency attribution and reconstruct the decision graph from causal ordering alone?",
  "date_of_record": "2026 December 2",
  "scope": "Applies to observability pipelines that join distributed LLM/tool spans into an agent decision graph using parent-span IDs and wall-clock latency budgets. Does not apply to single-process synchronous agents whose entire trace fits in one span tree with monotonic clocks.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-abandon-span-level-latency-attribution-and-reconstruct-the-decision-graph-from-causal-ordering-alone.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abandon-span-level-latency-attribution-and-reconstruct-the-decision-graph-from-causal-ordering-alone.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abandon-span-level-latency-attribution-and-reconstruct-the-decision-graph-from-causal-ordering-alone.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1479,
    "python_slice_tokens": 328,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"missing spans\" or \"clock skew\" in the generic sense. It is the **latency-budget attribution inversion**: an observability pipeline that correlates agent decision nodes to tool spans by matching each tool call's measured duration against a pre-declared per-tool latency budget. When a tool's real latency crosses its budget and the retry/bac...",
    "what_was_observed": "A tool-calling agent issued `search_index` calls through a retry wrapper configured with a 2,000 ms budget and 2 retries. Under load, the first attempt timed out at 2,050 ms; the retry succeeded at 180 ms. The wrapper emitted two spans under the same `decision_node_id`, distinguished only by a `attempt` attribute the correlator did not read. The correlator's join rule was: *for each decision node, select the child to...",
    "condition_of_validity": "The budget-fit join is valid only when all three hold: 1. **Single-attempt invariant:** each `decision_node_id` has exactly one child tool span. Retries must be represented as sibling spans under a distinct `attempt_group_id`, never reusing the decision-node parent. 2. **Budget as ceiling, not selector:** the budget is a validation threshold applied *after* ...",
    "decision_boundary": "The pipeline must switch from budget-fit attribution to causal reconstruction at the moment a decision node presents **more than one candidate tool span**, or when **any candidate's duration exceeds its declared budget**. Concretely: - If `len(candidates) == 1` and `duration <= budget`: attribute directly. Emit conformance. - If `len(candidates) > 1`: do not...",
    "operational_effect": "After switching to monotonic-sequence attribution with explicit retry groups, the same workload showed: decision-node latency cost rose to match wall-clock (the 2,050 ms first attempt plus 180 ms retry became a single 2,230 ms decision cost), the plan-feasibility checker began rejecting the 14-step plan, and orphan-span rate dropped to zero because retries w..."
  },
  "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": "a1e0fce2e557fa19c60c09e159f734891d49955dcf566a9a93d5154a268f7053",
    "verified_classes": [
      "AttributionInversionError",
      "ToolSpan",
      "DecisionCost"
    ],
    "verified_functions": [
      "attribute_decision",
      "_wall_span",
      "plan_feasibility"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "AttributionInversionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
