Repository navigation
test: make three load-sensitive tests model the node and planner exactly - #2726
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
cli_bundle_pull_stripes_a_complement_across_two_holders seeded the donor `a` on both holders and claimed `a` stays below a multi-source floor. No such floor exists: split_evenly splits a run across every holder that covers it. When both lane builds land in one batch, `a` splits at group 63, and the second piece re-sends seven bao parent hashes (448 B), so the exact billing, the per-holder split and the open count all fail. Only holder_x now holds `a`, and the pull runs with proxy warming off, so `a` has one lane and pulls whole. `b`'s complement still stripes across both. over_cap_stream_is_reset_without_signing_a_response wrote stream 2's request with write_frame, which writes the prefix and the payload separately. The node sheds an over-cap stream before it reads anything, so its STOP_SENDING (RATE_LIMITED) can land between the two writes. The frame now goes out in one write, and a Stopped(RATE_LIMITED) write error counts as the expected signal. The sibling over_cap_stream_is_reset_before_its_request_is_read now settles the inbound-failure counters before it reads stream_cap_full. throwaway_open_torn_down_before_real_open_still_serves bounded every ranged GET at 2, which counts the serviceability probe. One probe plus the cancelled draw and its re-draw is 3. The test now counts the probe apart (at most 1, the range-confirmed latch) and the draws (at most 2). Closes #2663 Closes #2723 Co-Authored-By: Claude Opus 5.5 <[email protected]>
thiras
force-pushed
the
fix/2663-2723-test-model-flakes
branch
from
October 28, 2026 22:35
e43ff80 to
690346a
Compare
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.
What
Three tests failed under load because they modelled the product wrongly. The node and the planner are correct, so this PR changes tests only.
Closes #2663
Closes #2723
cli_bundle_pull_stripes_a_complement_across_two_holders(#2663)The fixture put the donor
aon both holders. Its comment saida"stays below the multi-source floor", but there is no such floor.split_evenly(crates/client/src/segment.rs) splits a run across every holder that covers it, and that is by design. When both lane builds land in one batch (spare = lanes − seeds = 1),ais split at group 63. The second piece sends its left-boundary proof path again: 7 parent hashes × 64 B = 448 B. The numbers in the issue match exactly. The lanes billed 1,036,288 + 1,010,200 fora's two pieces, which iswire_a(2,046,040) + 448. The rest is 209,112 + 226,788 =b's complement (435,900). In that case themore > wire_acheck and the opens check fail as well.The fix: only
holder_xholdsa, andholder_yholdsbonly. The pull also runs with--proxy-warming false, soholder_ycannot joinaas a warming proxy.anow has one lane and pulls whole.b's complement still stripes across both holders. The exact-billing and opens assertions are unchanged. The per-holder check now names its holders (billed_y > 0 && billed_x > wire_a), because the fixture makes it known which holder serveda. Thewire_complement < wire_aguard only existed to tell the max/min apart, so it is removed.over_cap_stream_is_reset_without_signing_a_response(#2723)write_framesends the length prefix and the payload as two separatewrite_allcalls. The node sheds an over-cap stream before it reads anything, with STOP_SENDINGAPP_ERR_RATE_LIMITED(0x10). That stop can arrive between the two writes. The test now builds prefix + payload withsupport::frame_len_prefixand sends them in onewrite_all, as the sibling tests do. It also acceptsWriteError::Stopped(0x10)as the expected signal and fails on any other write error. Therecv2reset and metrics assertions are unchanged.over_cap_stream_is_reset_before_its_request_is_readreadstream_cap_fullonce, right after the reset. The serve task records that counter only after the client has seen the reset. The test now callssupport::assert_inbound_failures_attributed(&metrics, 1)first, the settle pattern from #2716. (wait_for_metric_linewas removed in #2716 before it merged.)throwaway_open_torn_down_before_real_open_still_serves(#2723)The
<= 2bound counted every ranged GET, including the serviceability probe (bytes=0-16383). One probe plus the cancelled draw plus the re-draw is 3. The test now counts the probe separately (probe_range_val), as #2311 did for the sibling test. It assertsprobes <= 1, which holds because of the range-confirmed latch, anddraws <= 2. It does not require the re-draw to start at byte 0.Reviewer notes
cli_bundle_pull_self_heals_a_lying_recipient_hint, in the same e2e binary, failed in 2 of the 15 loop runs. That is the known client bug client: the self-heal re-drive of a bundle head leaves about 2 MiB delivered but unpaid #2722, and another PR is fixing it. This PR does not touch it.Verification
write second request: sending stopped by peer: error 16. The same split write with the delay passes once it goes through the newStopped(0x10)arm. The final form uses one write.a torn-down throwaway costs at most one duplicate draw, saw 3. An instrumented run of the new version countedprobes=1 draws=1in a normal pass, so a 3 is 1 probe + 2 draws.cargo nextest run -p decdn-node --test origin_range_pull, 15 times under the same CPU load: 15/15 passed, 25 tests each run.cargo nextest run -p decdn-node --test client_loopback -E 'test(over_cap)', 15 times under load: 15/15 passed, 2 tests each run.cargo nextest run -p decdn-e2e --features anvil-e2e --retries 0 -E 'binary(cli_bundle_pull_range_dedup)', 15 times, aftercargo build -p decdn-cli -p decdn-node: the striping test passed 15/15. Other failures were client: the self-heal re-drive of a bundle head leaves about 2 MiB delivered but unpaid #2722 (twice) and one metrics-port bind collision (Address already in use) in the untouchedcli_bundle_pull_pays_exactly_a_scattered_complement.cargo clippy --workspace --all-targets --all-features -- -D warnings: exit 0.cargo fmt -- --check: exit 0. The pre-commit hooks passed.🤖 Generated with Claude Code