{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-refuse-to-join-a-trace-segment-whose-parent-span-was-emitted-by-a-different-agent-epoch-and-how-does-epoch-mismatch",
  "title": "In what scenarios must an instance refuse to join a trace segment whose parent span was emitted by a different agent epoch, and how does epoch-mismatched correlation silently corrupt safety verdict attribution",
  "date_of_record": "2026 November 20",
  "scope": "Applies to observability pipelines that correlate per-turn traces, eval scores, and safety verdicts by `trace_id`/`span_id` lineage across agent restarts, model swaps, or checkpoint resumptions. Does not apply to single-shot stateless inference where no turn lineage is persisted, nor to pipelines that key verdicts on immutable request hashes rather than span ancestry.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-to-join-a-trace-segment-whose-parent-span-was-emitted-by-a-different-agent-epoch-and-how-does-epoch-mismatch.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-to-join-a-trace-segment-whose-parent-span-was-emitted-by-a-different-agent-epoch-and-how-does-epoch-mismatch.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-to-join-a-trace-segment-whose-parent-span-was-emitted-by-a-different-agent-epoch-and-how-does-epoch-mismatch.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1760,
    "python_slice_tokens": 398,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **trace continuity** (a `trace_id` string propagating through a pipeline) and **execution continuity** (the actual agent instance, prompt scaffold, tool schema set, and safety policy bundle that produced each span). Observability pipelines almost universally conflate these. A `trace_id` is a correlation token; it survi...",
    "what_was_observed": "A support-triage agent was instrumented to emit one span per turn: `agent.turn` with attributes `{trace_id, span_id, parent_span_id, model, prompt_hash, tool_calls, safety_verdict}`. A safety classifier ran as a post-hoc eval job that re-scored each `agent.turn` span by joining on `trace_id` and reading the *latest* `prompt_hash` registered for that trace. Evals were aggregated per trace for a weekly quality report. ...",
    "condition_of_validity": "The correlation is only sound when **all three** hold: 1. **Epoch is span-local.** Every `agent.turn` span carries `epoch_id` (a hash of instance-identity + prompt_hash + tool_registry_version + safety_policy_version) as an *emitted attribute*, not a looked-up one. 2. **Join keys include epoch.** Any eval or safety verdict is joined on `(trace_id, epoch_id, ...",
    "decision_boundary": "An instance must **refuse to join** a trace segment (and emit an `EpochMismatchError` rather than a best-effort attribution) when: - The parent span's `epoch_id` differs from the child's, **and** no `trace.segment_boundary` span exists between them. This is a resume-without-declaration: the correlation is unsound. - A safety verdict's `epoch_id` is absent. D...",
    "operational_effect": "The observable effect of enforcing the boundary: trace-level quality dashboards split at every resume/model-swap/policy-change, which is *correct* but noisier. Per-epoch BLOCK rates become comparable; policy regressions surface as step discontinuities rather than being smoothed into a single curve. The cost is that \"trace count\" and \"turn count\" diverge — a ..."
  },
  "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": "62772515a6c193f2906b04295a053f1cdadbe455a00f1431bdb30b4bf7f5cfca",
    "verified_classes": [
      "EpochMismatchError",
      "Span"
    ],
    "verified_functions": [
      "compute_epoch",
      "correlate_verdict",
      "aggregate_per_trace"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 8,
    "raised_exceptions": [
      "EpochMismatchError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
