eventcore-fs: ADR-0046: read-time fsck + dangling-transaction handling #393

Closed
opened 2026-06-12 21:34:03 -07:00 by jwilger · 0 comments
Owner

Follow-up to PR #390 (eventcore-fs file backend). Covers the remaining git
robustness from ADR-0046.

Context

PR #390 wrote .gitignore and a defensive .gitattributes events/** merge=union.
Two robustness pieces remain: tamper/edit detection, and tolerating a partial or
aborted git merge.

Scope

  • Read-time fsck: reject any transaction file whose content does not match a
    recorded content-hash anchor in its header. merge=union protects the
    additive case but can mask an illegal edit of a JSONL file; the fsck catches
    that loudly. (May require adding the anchor to the header — note the format is
    immutable, so decide whether this is a v2 header field for new files.)
  • Dangling-transaction handling: a transaction whose parent_transaction_ids
    reference files not present (a half-merged/aborted git merge) must be
    reported as a DanglingTransaction via status(), never crash and never
    silently drop. Linearization must remain robust to missing parents.

Acceptance

  • A hand-edited transaction file is rejected at open/read with a clear error.
  • A store with a transaction referencing an absent parent opens, and status()
    reports the dangling transaction; reads do not panic.

References: ADR-0046, PR #390.

Follow-up to PR #390 (eventcore-fs file backend). Covers the remaining git robustness from **ADR-0046**. ## Context PR #390 wrote `.gitignore` and a defensive `.gitattributes events/** merge=union`. Two robustness pieces remain: tamper/edit detection, and tolerating a partial or aborted `git merge`. ## Scope - **Read-time fsck**: reject any transaction file whose content does not match a recorded content-hash anchor in its header. `merge=union` protects the additive case but can mask an illegal *edit* of a JSONL file; the fsck catches that loudly. (May require adding the anchor to the header — note the format is immutable, so decide whether this is a v2 header field for new files.) - **Dangling-transaction handling**: a transaction whose `parent_transaction_ids` reference files not present (a half-merged/aborted `git merge`) must be reported as a `DanglingTransaction` via `status()`, never crash and never silently drop. Linearization must remain robust to missing parents. ## Acceptance - A hand-edited transaction file is rejected at open/read with a clear error. - A store with a transaction referencing an absent parent opens, and `status()` reports the dangling transaction; reads do not panic. References: ADR-0046, PR #390.
jwilger added this to the 1.0.0 milestone 2026-06-13 05:44:58 -07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Slipstream/eventcore#393
No description provided.