You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(purchase): re-drive buys the pre-claim snapshot instead of the claimed row #1037
claimAndRedrive (internal/purchase/manager.go ~:578-593) claims an execution for re-drive, then calls executeAndFinalize with the exec value it read before the claim, updating only its status. The claim is also unpinned, so it doesn't require the row to be unchanged since that read.
If the row's recommendations, amount or account changed between the read and the claim (an edit or a concurrent writer), the re-drive buys the stale snapshot instead of the row it actually claimed. This is the same check-then-buy gap that #1036 closes for user-triggered paths, on the re-drive path.
Found during the independent review of #1036, which does not introduce it.
Expected
Re-drive executes the row as returned by the claim, or pins the claim to the version it read (for example updated_at or a version column in the conditional UPDATE), and refuses if the row changed.
Evidence
#1036 review: the entry-point table and the manager.go:578-593 read.
Activity
IAmJSD commentedon Oct 19, 2026
Claiming: working on this
fix(purchase): re-drive the claimed row, not the pre-claim snapshot (L…