{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-attributes-a-failure-to-the-wrong-span-causal-credit-misassignment-in-trajectory-level-evaluation-loops",
  "title": "What happens when an instance attributes a failure to the wrong span: causal credit misassignment in trajectory-level evaluation loops",
  "date_of_record": "2026 November 25",
  "scope": "Applies to GenAI observability pipelines that compute per-span attribution over multi-step agent trajectories (tool calls, reasoning steps, retrievals) and feed those attributions back into an evaluation loop that gates model/prompt/policy changes. Does not apply to single-turn LLM calls with no intermediate spans, nor to pure latency/cost telemetry that carries no failure label.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-attributes-a-failure-to-the-wrong-span-causal-credit-misassignment-in-trajectory-level-evaluation-loops.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-attributes-a-failure-to-the-wrong-span-causal-credit-misassignment-in-trajectory-level-evaluation-loops.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-attributes-a-failure-to-the-wrong-span-causal-credit-misassignment-in-trajectory-level-evaluation-loops.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2133,
    "python_slice_tokens": 464,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different things an observability system can report about a failed agent trajectory, and conflating them is the root of this failure mode: 1. **The span where the failure became observable** — the terminal span whose output violated a check (e.g., the final answer that failed a grader, the tool call that returned an error, the last...",
    "what_was_observed": "A three-tool agent (retriever → calculator → formatter) produced a wrong final answer on a financial-reasoning task. The trajectory: - `span-1` retriever returns a document with an outdated exchange rate (the true cause). - `span-2` calculator correctly multiplies the stale rate by the amount — arithmetically valid, no error flag. - `span-3` formatter emits the answer; the end-to-end grader fails it and attaches the ...",
    "condition_of_validity": "Attribution is valid only when all of the following hold; if any fails, the loop must abstain rather than emit a credit: 1. **Causal ordering is enforced.** The credited span's end timestamp precedes the manifestation span's start, and the credited span is in the manifestation span's causal ancestry (via the trace's parent links, not via wall-clock guesswork...",
    "decision_boundary": "The operational choice is between two regimes, and the boundary between them is the *depth of the causal gap* between cause and manifestation: - **Shallow gap (cause ≈ manifestation, gap ≤ 1 step, cause is flagged):** lexical/error-proximity attribution is within tolerance. The credited span is usually the true cause, and the loop converges. Do not pay for r...",
    "operational_effect": "When the invariant is enforced, three things change measurably: 1. **Convergence rate of the eval loop** stops regressing on deep-gap task classes. The classic symptom of the unguarded loop is a task class that fails at a *constant* rate across cycles while the loop reports \"patch applied, no regression\" — because the patch targets a span that was never the ..."
  },
  "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": "261ba15781833ed96e897c37e5500ea5e9042c8f02c9b2ab7ee50c83720af7a6",
    "verified_classes": [
      "AttributionInvariantError",
      "Span",
      "Trajectory"
    ],
    "verified_functions": [
      "attribute_failure",
      "run_eval_loop",
      "ancestry"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "AttributionInvariantError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
