Skip to content

fix: make reqresp batch retry test deterministic#21322

Merged
PhilWindle merged 1 commit intomerge-train/spartanfrom
claudebox/147f7fe7916437d0-2
Mar 11, 2026
Merged

fix: make reqresp batch retry test deterministic#21322
PhilWindle merged 1 commit intomerge-train/spartanfrom
claudebox/147f7fe7916437d0-2

Conversation

@AztecBot
Copy link
Collaborator

Summary

  • Fixed flaky test "should stop after max retry attempts" in reqresp.test.ts
  • The test was timing-dependent: with maxRetryAttempts=3 (default), rate-limited requests were retried on swapped peers after the GCRA rate limiter leaked tokens, causing all 12 requests to succeed instead of the expected 10
  • Fix: set maxRetryAttempts=1 so only one pass occurs, and filter the sparse response array to compare only successful entries

Test plan

  • All 15 tests in reqresp.test.ts pass
  • Test is now deterministic — no timing dependency on rate limiter token replenishment

Full analysis: https://gist.github.com/AztecBot/14459a6a0dea94a175c536f9ac3802b8

ClaudeBox log: https://claudebox.work/s/147f7fe7916437d0?run=2

@AztecBot AztecBot added the claudebox Owned by claudebox. it can push to this PR. label Mar 10, 2026
@AztecBot AztecBot changed the base branch from merge-train/spartan to next March 10, 2026 16:31
@AztecBot AztecBot force-pushed the claudebox/147f7fe7916437d0-2 branch from 3ebf4b0 to eb856ac Compare March 10, 2026 16:31
@ludamad ludamad marked this pull request as ready for review March 10, 2026 17:41
@ludamad ludamad self-requested a review March 10, 2026 17:41
@PhilWindle PhilWindle enabled auto-merge March 11, 2026 15:28
@PhilWindle PhilWindle changed the base branch from next to merge-train/spartan March 11, 2026 15:54
@AztecBot AztecBot force-pushed the claudebox/147f7fe7916437d0-2 branch from 42e7327 to 0dc1f3f Compare March 11, 2026 16:14
## Summary
- Fixed flaky test "should stop after max retry attempts" in `reqresp.test.ts`
- The test was timing-dependent: with `maxRetryAttempts=3` (default), rate-limited requests were retried on swapped peers after the GCRA rate limiter leaked tokens, causing all 12 requests to succeed instead of the expected 10
- Fix: set `maxRetryAttempts=1` so only one pass occurs, and filter the sparse response array to compare only successful entries

## Test plan
- [x] All 15 tests in `reqresp.test.ts` pass
- [x] Test is now deterministic — no timing dependency on rate limiter token replenishment

Full analysis: https://gist.github.com/AztecBot/14459a6a0dea94a175c536f9ac3802b8

ClaudeBox log: https://claudebox.work/s/147f7fe7916437d0?run=2
@AztecBot AztecBot force-pushed the claudebox/147f7fe7916437d0-2 branch from 0dc1f3f to c4ac986 Compare March 11, 2026 16:16
@PhilWindle PhilWindle merged commit 0575d79 into merge-train/spartan Mar 11, 2026
10 checks passed
@PhilWindle PhilWindle deleted the claudebox/147f7fe7916437d0-2 branch March 11, 2026 16:16
github-merge-queue bot pushed a commit that referenced this pull request Mar 11, 2026
BEGIN_COMMIT_OVERRIDE
fix: (A-623) increase committee timeout in scenario smoke test (#21193)
feat: orchestrator enqueues via serial queue (#21247)
feat: rollup mana limit gas validation (#21219)
fix: make e2e HA test more deterministic (#21199)
chore: fix chonk_browser lint warning (#21265)
chore: deploy SPONSORED_FPC in test networks (#21254)
fix: (A-635) e2e bot flake on nonce mismatch (#21288)
chore: deflake duplicate attestations and proposals slash tests (#21294)
fix(sequencer): fix log when not enough txs (#21297)
chore: send env var to pods (#21307)
fix: Simulate gas in n tps test. Set min txs per block to 1 (#21312)
fix: update dependabot dependencies (#21238)
test: run nightly bench of block capacity (#20726)
fix: update block_capacity test to use new send() result types (#21345)
fix(node): fix index misalignment in findLeavesIndexes (#21327)
fix(log): do not log validation error if unregistered handler (#21111)
fix: limit parallel blocks in prover to max AVM parallel simulations
(#21320)
fix: use native sha256 to speed up proving job id generation (#21292)
chore: remove v4-devnet-1 (#21044)
fix(validator): wait for l1 sync before processing block proposals
(#21336)
fix(txpool): cap priority fee with max fees when computing priority
(#21279)
chore: Properly compute finalized block (#21156)
fix: remove extra argument in KVArchiverDataStore constructor call
(#21361)
chore: revert l2 slot time 72 -> 36 on scenario network (#21291)
fix(archiver): do not error if proposed block matches checkpointed
(#21367)
fix(claude): rule to not append echo exit (#21368)
chore: reduce severity of errors due to HA node not acquiring signature
(#21311)
fix: make reqresp batch retry test deterministic (#21322)
fix: (A-643) add buffer to maxFeePerBlobGas for gas estimation and fix
bump loop truncation (#21323)
fix(e2e): use L2 priority fee in deploy_method same-block test (#21373)
fix: reqresp flake & add logging (#21334)
END_COMMIT_OVERRIDE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants