{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-replays-a-trace-whose-span-timestamps-were-rewritten-by-a-clock-skewed-collector",
  "title": "What happens when an instance replays a trace whose span timestamps were rewritten by a clock-skewed collector",
  "date_of_record": "2026 November 26",
  "scope": "Applies to deterministic replay / time-travel debugging of LLM agent trajectories reconstructed from OpenTelemetry spans, where span start/end timestamps are used to order tool calls, memory reads, and handoffs. Does not apply to replay driven purely by monotonic sequence IDs or causal parent-child span linkage without timestamp ordering.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-replays-a-trace-whose-span-timestamps-were-rewritten-by-a-clock-skewed-collector.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-replays-a-trace-whose-span-timestamps-were-rewritten-by-a-clock-skewed-collector.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-replays-a-trace-whose-span-timestamps-were-rewritten-by-a-clock-skewed-collector.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1705,
    "python_slice_tokens": 336,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two orthogonal things a trace can tell you about an agent trajectory: **causal order** (which span is the parent of which, encoded in `parent_span_id`) and **wall-clock order** (which span started first, encoded in `start_time_unix_nano`). Deterministic replay engines routinely conflate them. The parent-child DAG is a partial order; timestamps are ...",
    "what_was_observed": "A three-tool agent (search → fetch → summarize) was traced with a standard OTel SDK. The `search` tool ran on a worker node whose NTP daemon had stepped backward by 340 ms mid-run. The resulting spans: - `search` span: `start=1000.000`, `end=1000.900` (recorded *before* the step, but its end timestamp was written after the step, so it landed at `1000.900` on the skewed clock—appearing to start and end 340 ms \"early\" ...",
    "condition_of_validity": "Timestamp-based replay is only valid under the invariant: > For every pair of events `e1, e2` in the trajectory, if `e1` is causally before `e2` (i.e., `e1` is an ancestor of `e2` in the span DAG, or `e1` is an event within a span that ends before `e2`'s span begins), then `timestamp(e1) < timestamp(e2)`. This is a *happens-before* consistency requirement (L...",
    "decision_boundary": "The boundary between \"replay is trustworthy\" and \"replay must be flagged\" is: - **Trust the timestamp order** when `max_clock_drift_across_spans < min_inter_span_gap`. If every span's duration and every inter-span gap exceeds the observed clock skew, timestamp sort and causal order coincide and replay is safe. - **Reject the timestamp order** when any span's...",
    "operational_effect": "Downstream, a reordered replay poisons three things: (1) divergence attribution—you blame the model for a bad summary when the real cause was a misordered tool result; (2) regression testing—a \"replay-verified\" fix may pass because the reordered trajectory happens to avoid the bug; (3) time-travel debugging—stepping backward to \"the state before the bad tool..."
  },
  "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": "a673a31605caf2b747ed6fe20fad473ae40ef3e62345f65e7a432c2d263078ae",
    "verified_classes": [
      "TraceTemporalInconsistency",
      "Span"
    ],
    "verified_functions": [
      "validate_replay_order",
      "replay_trajectory",
      "visit"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TraceTemporalInconsistency"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
