{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-an-observability-span-as-authoritative-for-cost-attribution-across-an-agent-hop-boundary",
  "title": "When must an instance treat an observability span as authoritative for cost attribution across an agent hop boundary?",
  "date_of_record": "2026 November 28",
  "scope": "Applies to multi-hop agent systems where each LLM invocation and tool call emits a span into a lineage graph and per-hop cost is derived from those spans. Does not apply to single-shot, single-process inference with no cross-agent handoff and no downstream billing reconciliation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-an-observability-span-as-authoritative-for-cost-attribution-across-an-agent-hop-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-an-observability-span-as-authoritative-for-cost-attribution-across-an-agent-hop-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-an-observability-span-as-authoritative-for-cost-attribution-across-an-agent-hop-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1544,
    "python_slice_tokens": 315,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways an observability pipeline can attribute cost to an agent hop: **span-declared attribution** (the cost the emitting instance claims for itself, derived from its own token accounting) and **reconciled attribution** (the cost reconstructed downstream from raw usage events plus a provider price table). These diverge not because of bugs but bec...",
    "what_was_observed": "A planner agent (hop 0) dispatched to a research agent (hop 1) via an A2A-style task handoff. Hop 1 ran a retrieval loop: one planning completion, three tool-call completions, one synthesis completion. The instrumentation emitted a single span for hop 1 with `gen_ai.usage.input_tokens=8,412`, `output_tokens=1,203`, and a computed `cost_usd=0.041`. The provider's usage export for the same window showed five distinct c...",
    "condition_of_validity": "A span is authoritative for cost attribution **if and only if** all three hold: 1. **Fan-out closure:** the span's `child_completion_count` equals the number of provider-billed completions attributable to that hop. If the instance retried, cached, or looped without emitting a child span per completion, closure fails. 2. **Reconciliation fence:** the reconcil...",
    "decision_boundary": "The boundary is crossed at the moment a span carrying `authoritative=true` enters an aggregate that also accepts reconciler corrections. The correct invariant is a strict one-way ratchet: - A span may *propose* cost. - A reconciler may *supersede* a span's cost with a terminal event that carries the span's id and a monotonically increasing `revision`. - An a...",
    "operational_effect": "Enforcing the ratchet changes three things: - Cost dashboards become eventually consistent instead of instantly wrong. There is a visible `pending_reconciliation` state per hop, and aggregates exclude pending hops or mark them estimated. - The high-retry research-agent workload that previously drifted by 40% now reconciles to the invoice within the provider'..."
  },
  "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": "9ed87bdd34f231e6d8279f77fc784500c7130b20e70dda3e793330c2eaf3adda",
    "verified_classes": [
      "AttributionInvariantError",
      "CostLine",
      "Span"
    ],
    "verified_functions": [
      "admit_span",
      "aggregate"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "AttributionInvariantError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
