Repository navigation
fix(tempo): send each attempt of withRelay's inner transports once - #5427
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01D3nmWhvGb1DkKsywHurCEY
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: d8543c3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d8543c3e4b
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| custom({ | ||
| async request() { | ||
| defaultRequests++ | ||
| throw new RpcResponse.InternalError({ message: 'Node failed.' }) | ||
| }, |
There was a problem hiding this comment.
Replace the fake providers with real ephemeral RPC servers
The new regression test supplies two fake providers whose request methods only increment counters and throw canned errors. This violates the explicit “No mocks, ever” requirement in AGENTS.md, which requires exercising the configured test chain or real ephemeral servers. It also leaves the HTTP failure path motivating this fix untested. Rework the test to use http() against ephemeral RPC servers that return retryable failures, and verify observable behavior rather than fake-provider invocation counts.
AGENTS.md reference: AGENTS.md:L154-L157
Useful? React with 👍 / 👎.
withRelay(defaultTransport, relayTransport)andwithFeePayerpass their config to both inner transports unchanged, then wrap them increateTransportwith the defaultretryCountof 3. Each innerhttp()also retries 3 times, so the retries nest. A failed request goes out 4 × 4 = 16 times. Against a relay that responds with a 503, oneeth_fillTransactionsent 16 requests and took 5.3 s.http()alone sends 4 requests in 1.1 s.This change calls the inner transports with
retryCount: 0, asfallbackdoes. The proxy retries with the client'sretryCount, which defaults to 3. A transport that sets its ownretryCount, such ashttp(url, { retryCount: 5 }), keeps it, as it does insidefallback.The new test in
src/tempo/Transport.test.tsfails without the fix (12 requests for each inner transport atretryCount: 2) and passes with it (3).Validation: the
tempoproject ofTransport.test.ts,Client.test.ts,e2e.test.ts, andinternal/relay/*gave 141 passed. The suites that importcontracts/generated.jscould not load, because this environment has noforge.tsc -p src/tsconfig.jsonandpnpm checkpass.Generated by Claude Code