fix(image): poll the Solana job instead of losing a paid render (0.52.2) - #159
Merged
Merged
Conversation
blockrun_image on the Solana wallet rail sent one POST and never polled.
Past the gateway's ~30s inline window the route answers 202 { id,
poll_url } instead of the image, so the tool returned "No image URL in
response" — and the charge stood, because Solana settles at submit and
cannot settle after a long render (a signed transaction expires with its
blockhash). The user paid and got nothing.
Observed live: google/nano-banana-pro at 4096x4096 booked $0.1575 and
returned no image. The same defect was fixed on the account rail in #140;
the Solana wallet rail was never moved across. It now uses
solanaPaidAsyncPost, the helper video and music already use, which
handles the inline 200 and the 202 alike and re-signs each poll.
Also fixes a hazard that switch exposed: solanaPaidAsyncPost marked the
payment tracker answered as soon as the submit response arrived,
including a 502/503/504 from the edge. On this rail the submit IS the
paid request, so an origin that never answered may still have settled it
— and the tool said "temporary API issue, try again" on a charge that
already stood. An edge status is no longer the origin's verdict; the
tracker stays armed and the tool books it as a precaution. Video and
music get the same protection.
Two test doubles were letting this through and are repaired rather than
relaxed: quote-guard matched the old helper name, and the async helper's
stand-in never fired onPaidRequest, so the tracker it exists to exercise
was never armed.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Cherry-pick of 27807da from
codex/seedance-capability-parity(#155) so the money bug ships without waiting on the video work.Problem
blockrun_imageon the Solana wallet rail sent one POST and never polled. Past the gateway's ~30s inline window the route answers202 { id, poll_url }, so the tool returned "No image URL in response" while the charge stood (Solana settles at submit). Observed live:google/nano-banana-pro4096x4096 booked $0.1575, no image. The account rail was fixed in #140; the Solana rail never moved across.Fix
solanaPaidAsyncPost(same helper video/music use): handles inline 200 and 202, re-signs each poll.solanaPaidAsyncPostno longer treats an edge 502/503/504 on submit as the origin's verdict; the payment tracker stays armed and the charge is booked as a precaution (video + music benefit too).onPaidRequest.Bumps to 0.52.2 — merging triggers
publish.yml(npm + MCP registry + tag + release).Verification (on origin/main + this commit)
npm run typecheckclean,npm run buildcleannpm test: 1318 pass, 0 fail🤖 Generated with Claude Code