{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-span-attribute-truncation-poisoning-in-opentelemetry-genai-tool-call-accounting",
  "title": "What structural signals indicate span-attribute truncation poisoning in OpenTelemetry GenAI tool-call accounting",
  "date_of_record": "2026 November 19",
  "scope": "Applies to agents emitting OpenTelemetry spans under the GenAI semantic conventions (`gen_ai.*`) where tool-call arguments, results, or token usage are recorded as span attributes and later consumed by an auditor, billing reconciler, or replay verifier. Does not apply to trace-only observability pipelines that never re-ingest attribute values into a decision loop.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-span-attribute-truncation-poisoning-in-opentelemetry-genai-tool-call-accounting.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-span-attribute-truncation-poisoning-in-opentelemetry-genai-tool-call-accounting.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-span-attribute-truncation-poisoning-in-opentelemetry-genai-tool-call-accounting.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1702,
    "python_slice_tokens": 232,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"missing telemetry.\" It is **attribute-value truncation that preserves span validity while corrupting the token-accounting and tool-call invariants downstream consumers assume**. A span with `gen_ai.usage.input_tokens=4096`, `gen_ai.tool.name=\"search\"`, and a *clipped* `gen_ai.tool.call.arguments` string is structurally a valid span. It pa...",
    "what_was_observed": "A tool-calling agent loop emitted spans per the GenAI conventions. For a `search` tool call, the span carried: - `gen_ai.operation.name = \"execute_tool\"` - `gen_ai.tool.name = \"search\"` - `gen_ai.tool.call.id = \"call_8f3a...\"` - `gen_ai.tool.call.arguments = '{\"query\":\"...\", \"filters\":{\"date_range\":'` — a 1024-byte clip - `gen_ai.usage.input_tokens = 3187` - `gen_ai.usage.output_tokens = 412` The span exporter had a ...",
    "condition_of_validity": "The invariant only holds — and the failure only bites — under these conditions: - **The attribute is content-bearing and re-ingested.** If `gen_ai.tool.call.arguments` is write-only (never read back by an agent, auditor, or replay), truncation is harmless. The failure requires a *reader* that treats the attribute as ground truth. - **The truncation cap is ap...",
    "decision_boundary": "The boundary is between **truncation that is declared** and **truncation that is inferred**. The architectural guardrail is not \"never truncate\" — payloads are large and caps are necessary. The guardrail is that any truncation of a `gen_ai.*` content attribute MUST emit a co-located completeness marker, and any reader MUST treat a content attribute without a...",
    "operational_effect": "Without the guardrail, truncation poisoning produces three compounding effects: 1. **False attribution to the agent.** Replay failures caused by clipped telemetry are scored against the agent's determinism, inflating its nondeterminism rate and — if the agent is in a self-correcting loop — causing it to *change behavior* in response to a telemetry artifact. ..."
  },
  "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": "2ff0c772fb23787c26947af05686e07ace0025608cfdf7c8b8456e2ccd79266a",
    "verified_classes": [
      "TelemetryTruncationError",
      "GenAISpan"
    ],
    "verified_functions": [
      "estimated_tokens",
      "validate_replay_eligibility"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TelemetryTruncationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
