Epoch-scoped request ledger with conflicting-retry detection (#6) #22

Merged
faumaray merged 1 commits from issue/6-request-ledger into main 2026-12-03 08:08:19 +00:00
Owner

Closes #6.

Branch issue/6-request-ledger targeting main. Summary, tests and the documented contracts are in the commit message and the issue comment.

Closes #6. Branch `issue/6-request-ledger` 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:21 +00:00
- RequestLedger<Payload, Result, PayloadEqual> keys idempotent host
  requests by (epoch, trusted client, request id).
- check() admits the first request, replays a recorded result for an
  exact repeat (including a rejected outcome), reports in_progress while
  the request is still running, rejects a changed payload and rejects
  keys from an obsolete/future epoch before side effects.
- record() stores the caller-defined result exactly once; results are
  never overwritten.
- Capacity/admission/archival is explicit: entries are never evicted
  within an epoch (capacity_exceeded instead), and advancing the epoch
  clears memory. An old request number therefore cannot execute a second
  time after cleanup.
- 8 tests: replay, rejected outcome, payload conflict, delayed retry
  after newer operations, epoch rollover, capacity pressure, in-flight
  state/immutable result and non-advancing epoch rejection.
faumaray merged commit a5f21c6374 into main 2026-12-03 08:08:19 +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#22