Attempt counter in Postgres, surviving every re-publish #485
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
toasterson/Anima!485
Loading…
Reference in a new issue
No description provided.
Delete branch "claude/wi-019fa5a0-attempt-counter-in-postgres-surviving-ev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Anima work item
019fa5a0-1360-7f93-9463-3be3a86a88e5.What to build
The authoritative attempt counter for a dispatch, held in Postgres and incremented by the server at publish time. End to end: migration, increment on publish, read-back into the payload's
attemptfield, and a test proving the count survives a drain-and-re-publish cycle.Pushed context
docs/adr/0025-broker-arbitrates-execution-two-fabrics.md).x-deathheader resets when a drainer publishes a fresh message, so a clean-and-requeue loop would count to N forever and never trip. Stock EasyNetQ's error envelope carries no count either; the community pattern adds one to headers by hand. A count that lives only in a payload is not a count.(work_item_id, phase_id, base_revision);attemptsits deliberately outside it (ADR 0026), so this counter distinguishes a real retry from a redelivery.crates/anima-db/migrations/.Acceptance criteria
attemptalways reflects the Postgres valueBlocked by
WIP: Attempt counter in Postgres, surviving every re-publishto Attempt counter in Postgres, surviving every re-publish59800b5167toa0f8f5487fa0f8f5487ftoe24fb37f5ee24fb37f5etof0a7005daaf0a7005daato503cb1a58f