[codex] Expose settlement recovery state#25
Conversation
|
@senamakel-droid must be a member of the Vezures team on Vercel to deploy. Learn more about collaboration on Vercel and other options here. |
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughNew exported types ChangesSolana Settlement Failure Recovery
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Note 🎁 Summarized by CodeRabbit FreeThe PR author is not assigned a seat. To perform a comprehensive line-by-line review, please assign a seat to the pull request author through the subscription management page by visiting https://app.coderabbit.ai/login. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ae5651eb15
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| onChainTx: execution.signature, | ||
| payment: settlementRequest.payment, | ||
| settlementRequest, | ||
| retryable: true, |
There was a problem hiding this comment.
Set retryable only for transient settlement failures
When /payments/settle returns a non-retryable client error after the Solana transfer has already confirmed, such as an expired authorization or invalid signature, this recovery object still advertises retryable: true for the same settlementRequest. Callers using the new recovery state can then keep retrying a request the backend will deterministically reject instead of moving directly to refund/regeneration logic; the flag should account for the thrown TinyPlaceError.status/body or avoid claiming retryability for all failures.
Useful? React with 👍 / 👎.
Summary
settlement_failed_after_executionwith the on-chain tx, payment map, settlement request, and retry/refund flags to the thrown errorValidation
./node_modules/.bin/vitest run tests/payments.test.ts./node_modules/.bin/tsc --noEmit./node_modules/.bin/tscSummary by CodeRabbit