{
  "schema_version": "1.3.0",
  "slug": "what-event-stream-offset-boundaries-must-be-recorded-for-temporal-consistency-across-handoffs",
  "title": "What event-stream offset boundaries must be recorded for temporal consistency across handoffs?",
  "date_of_record": "2026 October 20",
  "scope": "* **Applies when:** The consumer decouples reading from committing (async buffers or batches) and an interruption can occur between the two boundaries. * **Does not apply when:** The pipeline uses exactly-once transactional semantics (where",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-event-stream-offset-boundaries-must-be-recorded-for-temporal-consistency-across-handoffs.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-event-stream-offset-boundaries-must-be-recorded-for-temporal-consistency-across-handoffs.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-event-stream-offset-boundaries-must-be-recorded-for-temporal-consistency-across-handoffs.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 897,
    "python_slice_tokens": 226,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The separation between **source read offset** (the cursor position indicating the last message the consumer fetched) and the **durable sink commit watermark** (the exact sequence number persisted to the downstream system). Failing to bind these two boundaries creates the **Offset-Commit Divergence Fallacy**: a successor resumes from a read offset ahead of th...",
    "what_was_observed": "In event-driven architectures, failing to bind read and commit boundaries produces three primary failure modes: 1. **Gap Loss:** The instance reads messages 100-200, buffers them, logs offset `200`, and crashes before flushing. The successor starts at `200`, permanently losing messages 100-199. 2. **Duplicate Replay:** The instance flushes messages 100-200 successfully but crashes before updating the offset. The succ...",
    "condition_of_validity": "* **Applies when:** The consumer decouples reading from committing (async buffers or batches) and an interruption can occur between the two boundaries. * **Does not apply when:** The pipeline uses exactly-once transactional semantics (where read offsets and sink commits are atomically bound) or operates on stateless, fire-and-forget streams.",
    "decision_boundary": "1. **Was the stream halted mid-ingestion?** If no, record clean completion. If yes, proceed. 2. **Does `source_partition_cursor` exceed `sink_durable_commit_id`?** If yes, an uncommitted gap exists. The successor must resume from the sink commit, not the source cursor. 3. **Is the `uncommitted_buffer_hash` recorded?** If no, the gap cannot be cryptographical...",
    "operational_effect": "1. **Zero Data Loss:** Forces the successor to resume from the durable commit watermark, guaranteeing no records are skipped. 2. **Idempotent Recovery:** Uses the partition key to safely re-ingest the gap without creating duplicates. 3. **Deterministic State:** Ensures the successor's temporal view begins exactly where the predecessor's durable state ended."
  },
  "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": "111d914da0f8c9b62b4b0b8e5f7d9f040d7b0c8d2735856d8a176ecb291454ad",
    "verified_classes": [
      "ResumptionVerdict",
      "StreamCursorState",
      "CursorManifest",
      "StreamOffsetGuard"
    ],
    "verified_functions": [
      "_hash",
      "evaluate_halt",
      "verify_resume"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ValueError"
    ],
    "sample_fail_closed_invariants": [
      "Idempotency key required for gap replay.",
      "Uncommitted gap exists but no buffer hash provided."
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
