fix(mint): clean finalized swap sagas during recovery#2188
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cbeabf27c9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2188 +/- ##
==========================================
+ Coverage 72.98% 73.01% +0.02%
==========================================
Files 359 359
Lines 79325 79432 +107
==========================================
+ Hits 57897 57996 +99
- Misses 21428 21436 +8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
cbeabf2 to
002fa7a
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
002fa7a to
d383fef
Compare
|
@cdk-bot review |
cdk-bot
left a comment
There was a problem hiding this comment.
Verified findings approved for disclosure:
- delete_saga failure can abort swap saga recovery loop (medium) - A transient or persistent
delete_sagafailure for one already-finalized swap saga aborts startup swap-saga recovery, leaving subsequent incomplete sagas unrecovered on that startup; if the failure persists, sagas behind it can remain stuck indefinitely.
Additional locations included in summary:- crates/cdk/src/mint/start_up_check.rs:249
d383fef to
f61246c
Compare
f61246c to
48f736f
Compare
Detect swap sagas whose inputs are already spent and whose outputs are signed before running setup compensation. Recovery deletes only the orphaned saga record for those finalized swaps, avoiding repeated startup failures while preserving spent proofs and signed outputs. Add a regression test that reinserts a completed swap saga and verifies restart cleanup leaves the finalized swap state intact.
48f736f to
d84ef27
Compare
|
Successfully created backport PR for |
Detect swap sagas whose inputs are already spent and whose outputs are signed before running setup compensation. Recovery deletes only the orphaned saga record for those finalized swaps, avoiding repeated startup failures while preserving spent proofs and signed outputs.
Add a regression test that reinserts a completed swap saga and verifies restart cleanup leaves the finalized swap state intact.
Description
Notes to the reviewers
Suggested CHANGELOG Updates
CHANGED
ADDED
REMOVED
FIXED
Checklist
just quick-checkbefore committingcrates/cdk-ffi)