Repository navigation
fix(solana): a settle whose outcome the gateway does not know is waited out, never "no charge" - #177
Merged
Merged
Conversation
…ed out, never "no charge" Every finished video now reaches the payment-signed path on its first paid poll (#176). When that settle times out, sol answers 402 "Payment settlement outcome unknown" with Retry-After: 90 and holds the job's claim; other polls get "settlement in progress on a concurrent poll". The helper ignored Retry-After, spent its 3 re-signs one poll interval apart and threw "no charge was made" inside the hold, while that payment could still land. - Held answers (isSettleHeld, classified on THIS answer's body and reason, never the remembered reason) honour Retry-After, re-sign with a fresh blockhash and do not spend the re-sign budget; the deadline bounds them. A later header-less 402 ("Payment verification failed") still takes the bounded re-sign path. - Once a payment's outcome is open, EVERY exit is a BilledJobError billing "unknown" — the deadline, a 500 poll answer, an unreadable challenge, a funding refusal of the fresh settle — so the tool books the quote and says the job MAY have been charged. - A completion 402 whose challenge cannot be read falls back to payment-signed polling instead of aborting the finished job. Tests: 5 added in test/solana-poll-ownership.test.ts; each is red against the pre-fix solana-402.ts.
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.
Follow-up to #176, from its pre-merge review (Opus + Fable reviewer passes). #176 merged before this landed, so it ships separately. No version bump.
With #176 every finished video reaches the payment-signed path on its first paid poll. When that settle times out, sol.blockrun.ai answers 402
Payment settlement outcome unknownwithRetry-After: 90and holds the job's claim; other polls getsettlement in progress on a concurrent poll. The helper ignoredRetry-After, spent its 3 re-signs one poll interval apart (~15s into a 90s hold) and threw "no charge was made" while that payment could still land — the tool then booked nothing.isSettleHeld, classified on this answer's body and reason, never the remembered reason) honourRetry-After, re-sign with a fresh blockhash and do not spend the re-sign budget; the deadline bounds them. A later header-less 402 (Payment verification failed) still takes the bounded re-sign path.BilledJobErrorbilling"unknown"— the deadline, a 500 poll answer, an unreadable challenge, a funding refusal of the fresh settle — soblockrun_videobooks the quote and says the job MAY have been charged.Tests: 5 added in
test/solana-poll-ownership.test.ts, each red against the pre-fixsolana-402.ts. typecheck, build, CLI-load and brand checks pass;npm test1419/1419.