Skip to content

fix(e2e): retry public Solana devnet 429s in swig setup - #29

Draft
PhilBot402 wants to merge 2 commits into
mainfrom
philbot-e2e-swig-rpc-429-923a
Draft

PhilBot402 wants to merge 2 commits into
mainfrom
philbot-e2e-swig-rpc-429-923a

Conversation

@PhilBot402

@PhilBot402 PhilBot402 commented Sep 27, 2026 •

Copy link
Copy Markdown
Owner

Description

Scheduled e2e dies in pnpm swig:setup after the Swig account and its USDC ATA are created. The job log shows RPC: https://api.devnet.solana.com and then HTTP error (429): Too Many Requests on the funding transfer.

SVM_TESTNET_RPC_URL is already copied to SVM_RPC_URL when the secret is non-empty (.github/workflows/e2e_tests.yml). This failure used the public devnet fallback, so the secret was empty. e2e/scripts/swig-setup.ts sent the create, ATA, and fund RPC burst with no retry. @solana/kit turns that HTTP 429 into HTTP error (429): Too Many Requests and the process exits 1, which fails the whole e2e job.

createRpc now retries HTTP 429 on the setup transport (exponential backoff, delta-seconds Retry-After when present, capped at 30s, 6 attempts). The same request payload is sent again.

The review target is the upstream PR: x402-foundation#3595

No changelog fragment: e2e script only, no SDK behavior change.

Tests

  • tsc --noEmit on e2e/scripts/swig-setup.ts.
  • pnpm swig:setup with CLIENT_SVM_PRIVATE_KEY unset still exits 1 with the existing required-key error, before any RPC call.
  • Full testnet e2e was not run. It needs wallet secrets this environment does not have.

Checklist

  • I have formatted and linted my code (this file typechecks with tsc --noEmit; e2e has no prettier/eslint project)
  • All new and existing tests pass (no new tests; behavior is the RPC retry inside the existing script)
  • My commits are signed (local EDDSA key 4F26A388131A63C19F2A8A4EF697020AB55A1144; GitHub shows verified only if that key is on the account)
  • Changelog fragment — not applicable (e2e script only)

AI assistance

Most of this change was written with Cursor Grok 4.7. The diff was reviewed against the CI log and the kit HTTP error (SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR, status 429).

Open in Web Open in Cursor 

Public devnet returns HTTP 429 during Swig funding when SVM_TESTNET_RPC_URL
is unset. swig-setup treated that as fatal, so the e2e job died after the
account was created.

Co-authored-by: phdargen <29732335+phdargen@users.noreply.github.com>
@github-actions github-actions Bot added the ci label Sep 27, 2026
Keep the HTTP 429 backoff in the setup script and drop the helper module and tests.

Co-authored-by: phdargen <29732335+phdargen@users.noreply.github.com>
@github-actions github-actions Bot removed the ci label Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant