Skip to content

Claim each prepared-mail operation once across local workers - #430

Merged
aruintelligence merged 1 commit into
mainfrom
innovation/one-operation-mail-20261019
Oct 19, 2026
Merged

aruintelligence merged 1 commit into
mainfrom
innovation/one-operation-mail-20261019

Conversation

@aruintelligence

Copy link
Copy Markdown
Owner

Summary

  • Add an optional durable, tenant-and-issuer-scoped host operation ID to file authority issuance. The operation marker is synced under the existing lock before a grant is written; a retry cannot mint a second grant for the same intent.
  • Require operationIdFor(context) in the experimental revocable prepared-mail adapter. Repeated approvals for one intended send block; a distinct host operation ID allows a genuinely new send.
  • Validate the operation record at dispatch, and document retained markers, lost-send reconciliation, and store rollback limits.

Evidence

  • Two real Node workers race one host operation and record exactly one simulated send; a third attempt blocks.
  • Tests cover same-ID replay, changed payload mismatch, new-intent send, missing grant after marker, missing operation record, and uncertain callback retry.
  • npm test (979 passing); npm run check:links; git diff --check.

This is a one-machine reference with an in-memory sender. It does not establish live provider delivery, multi-machine coordination, or protection from a restored older store snapshot.

@aruintelligence
aruintelligence merged commit d8ed168 into main Oct 19, 2026
62 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant