Repository navigation
fix(api): expire a stale intent and book its failure in one transaction (#36) - #1082
Merged
DevTobis merged 2 commits intoOct 25, 2026
Conversation
|
@manchesternews98-jpg Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
The sweep claimed the intent as expired and then applied the failure outside a transaction, so a crash in between left it expired with its line or pledge still pending and no later sweep revisited it (same class as DevTobis#36). Do both in one transaction, as settle does, and count a rolled-back expiry as an error so the next sweep retries it. Drops the rest of this branch: the settle path is already atomic on main (DevTobis#1074) and expiry on NOT_FOUND only is covered by DevTobis#1107.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #36
Slimmed to the one part
mainstill lacked.sweepPendingIntentsclaimed the intent asexpiredand then calledapplyFailureoutside a transaction, so a crash between the two left the intent expired with its line or pledge still pending, and no later sweep revisited it. The claim and the book update now share a transaction, assettledoes since #1074. A rolled-back expiry counts as an error and is retried on the next sweep.The rest of the original branch (aging out errored intents, the settle path) is covered by #1074 and #1107, so it was dropped.
🤖 Generated with Claude Code