{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-boundary-be-drawn-when-replaying-agentic-workflows-from-opentelemetry-genai-span-graphs",
  "title": "Where must an instance boundary be drawn when replaying agentic workflows from OpenTelemetry GenAI span graphs?",
  "date_of_record": "2026 November 12",
  "scope": "Applies to deterministic replay of LLM-agent workflows reconstructed from OpenTelemetry GenAI span graphs (spans carrying `gen_ai.*` attributes, `trace_id`/`span_id`/`parent_span_id` links, and tool-call child spans). Does not apply to single-shot synchronous inference calls with no tool or sub-agent fan-out, nor to replays driven from application-level event logs that already carry explicit causal sequence numbers.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-boundary-be-drawn-when-replaying-agentic-workflows-from-opentelemetry-genai-span-graphs.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-boundary-be-drawn-when-replaying-agentic-workflows-from-opentelemetry-genai-span-graphs.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-boundary-be-drawn-when-replaying-agentic-workflows-from-opentelemetry-genai-span-graphs.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1926,
    "python_slice_tokens": 378,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **trace causality** and **replay causality**. A span graph encodes *who called whom* — a parent-child tree plus explicit `SpanLink`s. It does not encode *who depended on whose output*. In agentic workflows these diverge precisely at fan-out/fan-in joints: a planner span may emit three parallel tool spans as children, a...",
    "what_was_observed": "In a production agent runtime exporting GenAI spans to an OTLP collector, replays of a 4-agent research workflow diverged from the recorded trajectory in roughly one run out of eleven. The divergence was not an error: the replay completed, emitted plausible spans, and produced a final answer. It was a *different* answer. Root cause, isolated by diffing the recorded trace against the replay trace: 1. The planner span ...",
    "condition_of_validity": "A replay from a GenAI span graph is deterministic **if and only if** all of the following hold at every node in the subgraph being replayed: - The node has at most one ancestor-or-link inbound edge that carries *content* (not merely a control-flow or timing edge). - Every input the node consumes is either (a) a constant recorded on the span, (b) a value prod...",
    "decision_boundary": "The operational decision is: *do I recompute this node, or do I inject its inputs from the record?* Recompute only when the node is on a single-inbound-edge path and all its inputs are ancestor-derived or constant. Inject when any of the following is true: - The node is a fan-in: it has two or more `SpanLink`s or parent-sibling dependencies carrying content....",
    "operational_effect": "Enforcing per-node replay boundaries changes three things in the harness: 1. **Replay cost drops** where boundaries are drawn early: fan-in nodes are not re-run against live systems, so replays are hermetic and fast. The cost is that the replay validates only the reasoning *downstream* of the injected inputs, not the retrieval itself — which is the correct s..."
  },
  "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": "0e2dc81dce3e73de51df11eb180625962f926c687a60157daa0dff7c07b8a3aa",
    "verified_classes": [
      "ReplayBoundaryError",
      "SpanNode"
    ],
    "verified_functions": [
      "classify_replay_boundary",
      "replay_node"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ReplayBoundaryError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
