{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-bound-causal-replay-sampling-when-high-cardinality-reasoning-traces-alias-across-retry-epochs",
  "title": "Where must an instance bound causal-replay sampling when high-cardinality reasoning traces alias across retry epochs",
  "date_of_record": "2026 November 22",
  "scope": "Applies to any agent runtime that records per-step reasoning traces (thought, tool call, observation) under a *sampled* observability pipeline and later reconstructs them for causal replay. Does not apply to fully-retained (100% capture) trace stores, nor to stateless single-shot inference where no replay is attempted.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-causal-replay-sampling-when-high-cardinality-reasoning-traces-alias-across-retry-epochs.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-causal-replay-sampling-when-high-cardinality-reasoning-traces-alias-across-retry-epochs.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-causal-replay-sampling-when-high-cardinality-reasoning-traces-alias-across-retry-epochs.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1580,
    "python_slice_tokens": 303,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"we dropped a trace.\" It is that **sampled replay reconstructs a causally valid but factually wrong history**. When an agent retries a step — due to a tool timeout, a schema-validation rejection, or a self-correction loop — the retry produces a *new* reasoning trace that is highly correlated with, but not identical to, the original. U...",
    "what_was_observed": "A tool-using agent (5-step plan, external HTTP tool at step 3) was instrumented with head-based sampling at `p=0.10`, keyed on `trace_id`, with a downstream cardinality cap of 50k series. During a tool-degradation window, step 3 began timing out and the orchestrator retried the whole plan three times (epochs `e0`, `e1`, `e2`), each epoch emitting fresh `step_seq` values but reusing the parent `trace_id` for lineage. ...",
    "condition_of_validity": "The invariant that must hold for sampled causal replay to be sound: > For every replayed trajectory, all retained steps must share an identical `(trace_id, epoch_id)` lineage tuple, and the sampler must either retain *all* epochs of a sampled trace or *none*, atomically. This is violated whenever: 1. Sampling is decided at a granularity coarser than the retr...",
    "decision_boundary": "The boundary an instance must decide at instrumentation time, before any trace is emitted: - **If replay is used for root-cause attribution or agent self-correction learning → sampling MUST be epoch-atomic.** The unit of sampling is the full retry chain, not the trace head. Cardinality budget is spent per chain. - **If replay is used only for aggregate laten...",
    "operational_effect": "Without the epoch-atomic guardrail, the observability system becomes an *active source of false causal evidence*. Agents trained or debugged against replayed traces learn to \"recover\" from failures they never recovered from, and post-incident analysis attributes outcomes to steps that were never co-executed. The failure is invisible to completeness metrics b..."
  },
  "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": "1bf428749a7578470f9bb5e09bbd2aaa586ffc3db08040e98bf54263478e4176",
    "verified_classes": [
      "ReplayLineageError",
      "Step"
    ],
    "verified_functions": [
      "assemble_causal_replay",
      "sample_chain_atomically"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ReplayLineageError"
    ],
    "sample_fail_closed_invariants": [
      "refusing to emit a partially sampled multi-epoch chain; evict the entire chain instead"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
