{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-replays-a-genai-span-log-whose-tool-call-results-were-truncated-by-the-exporter-s-attribute-size-cap",
  "title": "What happens when an instance replays a GenAI span log whose tool-call results were truncated by the exporter's attribute-size cap",
  "date_of_record": "2026 November 24",
  "scope": "Applies to postmortem deterministic replay of agentic sessions reconstructed from OpenTelemetry GenAI semantic-convention spans (`gen_ai.*` attributes, `execute_tool` child spans, `chat` spans) when the collector or SDK enforces a per-attribute value length cap. Does not apply to full-fidelity trace stores that preserve untruncated tool payloads, nor to replay of pure-reasoning sessions with no tool I/O.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-replays-a-genai-span-log-whose-tool-call-results-were-truncated-by-the-exporter-s-attribute-size-cap.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-replays-a-genai-span-log-whose-tool-call-results-were-truncated-by-the-exporter-s-attribute-size-cap.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-replays-a-genai-span-log-whose-tool-call-results-were-truncated-by-the-exporter-s-attribute-size-cap.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1993,
    "python_slice_tokens": 390,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A GenAI trace is not a recording of the agent's state; it is a recording of the agent's *observable effects*, sampled at the boundaries the instrumentation author chose to instrument. Deterministic replay assumes the trace is a lossless projection of the causal chain: prompt → model output → tool call → tool result → next prompt. The failure mode here is a *...",
    "what_was_observed": "A coding agent session (Claude-class model, 41 turns, two tools: `read_file` and `apply_patch`) was replayed from OTLP spans exported to a Jaeger backend with `OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT=4096`. The live session had succeeded. The replay diverged at turn 17. Trace of the divergence: 1. Turn 17 issued `execute_tool` span `read_file(path=\"src/parser.py\")`. Live result: 11,842 bytes. Exported `gen_ai.tool.call.res...",
    "condition_of_validity": "Deterministic replay is only sound under the **causal-input completeness invariant**: > For every `execute_tool` span in the session, the bytes available to the replay harness for the tool-result message part must be byte-identical to the bytes the live model received. This invariant is violated whenever any of the following holds, and the violation is *unde...",
    "decision_boundary": "The boundary is between **replay-as-explanation** and **replay-as-reconstruction**. They require different evidence and must not be conflated. - *Replay-as-reconstruction* asks \"what did the agent do?\" It tolerates truncation if the harness flags every reconstructed turn whose inputs were capped, and refuses to draw causal conclusions from flagged turns. Thi...",
    "operational_effect": "The practical consequence is that **trace completeness must be validated before replay, per session, against the observed payload distribution — not against exporter configuration.** The guardrail is a pre-replay audit pass that walks every `execute_tool` span, compares stored result length against the effective cap, and computes the truncation frontier. If ..."
  },
  "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": "645db69e93db318854e60f8b45165a772529abfdab469bfe3acadc262c0e1540",
    "verified_classes": [
      "TruncationFrontierError",
      "ToolSpan"
    ],
    "verified_functions": [
      "compute_truncation_frontier",
      "assert_replay_admissible"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "TruncationFrontierError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "json",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
