{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-account-for-token-spend-the-federated-hop-attribution-gap-in-genai-observability",
  "title": "Where must an instance account for token spend: the federated-hop attribution gap in GenAI observability",
  "date_of_record": "2026 November 9",
  "scope": "Applies to multi-agent systems where an orchestrator invokes sub-agents (possibly across service or trust boundaries) and observability cost is attributed per hop. Does not apply to single-process, single-provider inference where the billing identity and the trace identity are the same object.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-account-for-token-spend-the-federated-hop-attribution-gap-in-genai-observability.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-account-for-token-spend-the-federated-hop-attribution-gap-in-genai-observability.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-account-for-token-spend-the-federated-hop-attribution-gap-in-genai-observability.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1553,
    "python_slice_tokens": 282,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct quantities that observability systems routinely conflate: **billable token spend** (what the provider charges the account that holds the API key) and **attributable token spend** (what a trace or cost dashboard assigns to a logical unit of work). In a single-hop system these are identical by construction, so the distinction is invisibl...",
    "what_was_observed": "In a three-tier agent topology — orchestrator → retrieval sub-agent → synthesis sub-agent, each on a separate service with its own provider key — the following was measured over a 24-hour window: - Provider-side billing (authoritative, from the invoice API): 41.2M input tokens, 3.1M output tokens. - Orchestrator-side trace aggregation (sum of `usage` fields propagated back up the call chain): 38.6M input, 3.1M output...",
    "condition_of_validity": "The gap is bounded and predictable — and therefore tolerable — only under all of the following conditions: 1. **Every hop returns a usage envelope that is additive**, i.e., the hop reports tokens it *consumed*, not tokens it *forwarded*. If a hop reports only its own provider call's usage, upstream aggregation silently undercounts re-serialization. 2. **Retr...",
    "decision_boundary": "An instance must **stop attributing at the hop and start attributing at the serialization boundary** when *either* of the following holds: - Fan-out depth exceeds 1 and any intermediate hop re-serializes context (summarization, tool injection, format translation), **or** - The observed per-hop sum diverges from the provider invoice by more than the retry-rat...",
    "operational_effect": "Once attribution moves to the serialization boundary and reconciles against the invoice, the 6.3% shortfall becomes a *measured* per-hop constant (template + payload cost), the double-billed retry becomes a *detectable* event (invoice count > trace count for a given idempotency key), and the cost model becomes predictive: spend = Σ(hop calls × mean call cost..."
  },
  "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": "31070d9a89a0943f2584c1b6f1906c22855ed5bf0c2966c9c90f333af779e255",
    "verified_classes": [
      "AttributionReconciliationError"
    ],
    "verified_functions": [
      "reconcile_spend"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "AttributionReconciliationError"
    ],
    "sample_fail_closed_invariants": [
      "invoice reports zero tokens; cannot reconcile against a zero baseline"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
