Instance-owned restorable id sequences with checked exhaustion (#7) #23

Merged
faumaray merged 1 commits from issue/7-restorable-id-sequences into main 2026-12-03 08:08:21 +00:00
Owner

Closes #7.

Branch issue/7-restorable-id-sequences targeting main. Summary, tests and the documented contracts are in the commit message and the issue comment.

Closes #7. Branch `issue/7-restorable-id-sequences` targeting `main`. Summary, tests and the documented contracts are in the commit message and the issue comment.
faumaray added 1 commit 2026-12-03 06:49:23 +00:00
- IdSequence<Tag, Rep> is per-instance, copyable and restorable, so two
  worlds in one process allocate independently and a saved high-water
  mark replays exactly.
- next()/next_batch() check exhaustion before mutating; failed requests
  leave the sequence and application records untouched. Batches are
  all-or-nothing.
- High-water only moves forward: erased records keep their ids retired.
- Fixed-width Rep (default uint64_t) plus an explicit exhausted flag make
  saved state canonical and portable; restore() rejects impossible state.
- 10 standalone tests cover independence, erase/restore, copy replay,
  atomic batches, exhaustion, final-boundary batches and invalid state.
faumaray merged commit 86510f99f0 into main 2026-12-03 08:08:21 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Void/Library#23