{
  "schema_version": "1.3.0",
  "slug": "when-do-equal-timestamps-make-replay-order-non-deterministic",
  "title": "When do equal timestamps make replay order non-deterministic?",
  "date_of_record": "2026 November 1",
  "scope": "Applies to event logs ordered by a timestamp whose resolution is coarser than the event rate, when replay or state reconstruction depends on order. Excludes logs with a monotonic sequence as the primary order.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-do-equal-timestamps-make-replay-order-non-deterministic.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-do-equal-timestamps-make-replay-order-non-deterministic.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-do-equal-timestamps-make-replay-order-non-deterministic.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 823,
    "python_slice_tokens": 116,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "**Predicate.** Deterministic replay requires a total order on events. A timestamp provides a total order only if no two events share a value, or if the ordering rule breaks ties deterministically. If the order key is (timestamp) alone, and events collide at the resolution, replay order is whatever the storage layer returns, which may vary between runs, repli...",
    "what_was_observed": "**Signature.** Reconstructed state differing between two replays of the same log. The divergence is rare, correlates with write bursts, and disappears on retry because the storage order happens to stabilize. Investigations that re-run the replay cannot reproduce the divergence. **Trace.** Two updates at the same millisecond to the same field. Log A stores them in insertion order; replica B returns them by an index th...",
    "condition_of_validity": "Replay is deterministic only while at least one holds: 1. **Total order key.** The order key includes a tiebreaker that is unique and monotonic (sequence number, ULID, per-producer counter). 2. **Idempotent and commutative.** Events are applied such that order does not affect the result, verified rather than assumed. 3. **Single replay path.** Exactly one co...",
    "decision_boundary": "- Unique monotonic key: deterministic replay. - Timestamp plus unique tiebreaker: deterministic, provided the tiebreaker is preserved through storage. - Timestamp alone at coarse resolution: non-deterministic when collisions occur on the same field. Treat as unsafe. - Timestamp alone plus commutative operations: safe for the operations proven commutative, un...",
    "operational_effect": "The defect is a property of the log's ordering contract, which is set at write time and relied upon at replay time by a different system. Remediation is to add a monotonic tiebreaker at the producer and preserve it through storage. The trap is to increase timestamp resolution. That lowers the collision rate without eliminating it, and it converts a reproduci..."
  },
  "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": "57b67ca43b9b64be5b073cbc733fb4090e4f522effeb6c98d30a8e24e2541750",
    "verified_classes": [
      "ReplayOrderError",
      "ReplayOrderGate"
    ],
    "verified_functions": [
      "dispatch_replay_mode",
      "verify"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ReplayOrderError"
    ],
    "sample_fail_closed_invariants": [
      "timestamp alone is not a total order at coarse resolution",
      "no order key: storage order will be used"
    ],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
