Repository navigation
fix: safely resume failed claims and preserve recovery evidence - #8
Merged
Merged
Conversation
iamalwaysuncomfortable
approved these changes
Oct 15, 2026
iamalwaysuncomfortable
approved these changes
Oct 15, 2026
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.
A claim that failed during local preparation was previously marked
uncertain, even when nothing had been submitted. Reconciliation could not clear that state without finding a successful claim, so an ordinary preparation failure could block subsequent wallet operations indefinitely. This PR distinguishes proven pre-submission failures and confirmed rejections from unknown outcomes, allowing an explicit, safe resume of the original claim operation.What changed and why
preparingbefore calling the SDK andsubmittingbefore entering its proving/submission adapter. If checkpoint persistence fails, the adapter is not invoked. This provides evidence for safe recovery instead of inferring failure from an error message or missing transaction ID.pendingwithlastFailure.code: not_submitted; confirmed claim rejections returnpendingwithtransaction_rejected. An explicitresume_operationrechecks current permissions and claimability, retains the operation ID, and skips already completed batch items.Validation
git diff --checkpassed.a15b5aband Provable SDK85606f89.All transaction outcomes used for these checks were simulated. No live trades, funding, or production-provider authentication were performed. The recovery smoke requires Node 22.15+ for module hooks.
Scope and remaining limits
This PR implements recovery correctness only. Dependency pins remain at 0.12.0. Cumulative trading budgets, expanded market-data tools, spendable-record settlement receipts, operator diagnostics, agent evaluations, and executable CI integration remain separate workstreams.
A crash after possible broadcast but before the SDK returns a transaction ID can still leave an unresolved operation. Without conclusive evidence, it remains blocked rather than being retried. Confirmed rejections may have consumed fees; retained fee IDs support inspection but do not imply reimbursement.