{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-span-attribute-divergence-when-deterministically-replaying-an-agentic-trace-reconstructed-from-otel-genai-spans",
  "title": "How does an instance detect span-attribute divergence when deterministically replaying an agentic trace reconstructed from OTel GenAI spans",
  "date_of_record": "2026 November 27",
  "scope": "Applies to post-incident forensic replay of agent execution graphs reconstructed from OpenTelemetry GenAI semantic-convention spans (`gen_ai.*` attributes, `gen_ai.tool.call`, `gen_ai.usage.*`, event spans). Does not apply to live in-process tracing, to replay of non-agentic single-shot inference logs, or to traces where the runtime emitted custom span schemas without GenAI attribute compliance.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-span-attribute-divergence-when-deterministically-replaying-an-agentic-trace-reconstructed-from-otel-genai-spans.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-span-attribute-divergence-when-deterministically-replaying-an-agentic-trace-reconstructed-from-otel-genai-spans.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-span-attribute-divergence-when-deterministically-replaying-an-agentic-trace-reconstructed-from-otel-genai-spans.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2157,
    "python_slice_tokens": 357,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct things an operator means by \"replay.\" The first is **execution replay**: re-invoking the model and tools with the recorded inputs and observing a new trajectory. This is inherently non-deterministic and is not what forensic reconstruction requires. The second is **state replay**: reconstructing the exact sequence of intermediate agent ...",
    "what_was_observed": "A three-tool agent (retrieval, calculator, final-answer) failed mid-task on an incident that triggered a forensic replay. The trace contained 41 spans, all parent-linked, all with `gen_ai.operation.name`, `gen_ai.request.model`, `gen_ai.usage.input_tokens`, `gen_ai.usage.output_tokens`, and `gen_ai.tool.call.id`. The replay harness reconstructed the message list at each step from the `gen_ai.prompt` / `gen_ai.complet...",
    "condition_of_validity": "State replay from GenAI spans is valid **if and only if** every span attribute that participated in context assembly is either (a) present in full, or (b) marked truncated with a recoverable reference (span link, blob store key, or content hash) to the full value. This is the **attribute-fidelity invariant**: > For every step k, the reconstructed context `C_...",
    "decision_boundary": "The decision boundary for an instance performing forensic replay is: - **Replay is admissible as forensic evidence** when every step passes causal-content verification: the recorded completion is *consistent with* the reconstructed context under the recorded tool outputs, and no causal element is truncated or missing. Consistency means: the completion's tool...",
    "operational_effect": "The operational consequence is that a forensic replay harness built on GenAI spans must carry a **per-step entailment verifier** and a **truncation detector**, and must treat the span graph as a *lossy index* into the true execution rather than as the execution itself. Concretely: 1. **Truncation detection:** scan every `gen_ai.*` attribute for length at or ..."
  },
  "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": "ad9319101e78b5dd59b0c1b92fcb7a165513c0dd459ccabff359831f28a26b63",
    "verified_classes": [
      "ReplayDivergenceError",
      "Span"
    ],
    "verified_functions": [
      "evaluate_tool",
      "verify_step",
      "replay_trace"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ReplayDivergenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "math",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
