Repository navigation
test(task): fail runners in the split property test as the loop does - #194
Draft
greenhat616 wants to merge 1 commit into
Draft
greenhat616 wants to merge 1 commit into
greenhat616 wants to merge 1 commit into
Conversation
This was referenced Nov 8, 2026
greenhat616
force-pushed
the
test/hardening-32-proptest-side-fail
branch
from
November 13, 2026 07:44
c761885 to
cc1b41b
Compare
greenhat616
marked this pull request as draft
November 13, 2026 08:55
The split property test failed a runner by calling the planner's mark_failed directly. Since the endgame hedge, that runner can be the first side of an undecided pair, which the loop never fails that way: every lifecycle path hands a side's failure to handle_side_failed, so the partner keeps the chunk. The test tripped the planner's debug assertion on a state the product handles correctly. Failures, starts, frames and completions in the property test now go through the loop's lifecycle and data paths, and the oracle tells a hedge taking over its chunk from a new connection, charges a pair once for both sides, and resolves each pair's own survivor. Deterministic tests cover the shrunk sequence, a pair's charge for every pair of failure classes, a hedge winning a retried range, two pairs failing with different classes, and the oracle's congestion check.
greenhat616
force-pushed
the
test/hardening-32-proptest-side-fail
branch
from
November 13, 2026 22:26
cc1b41b to
0a16582
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.
C30 (PR-9a) of the download strategy hardening stack. It is a test-only change, stacked on #193 (C18), and that branch is its base. The design note is §14.22.
Why
While checking #193, the property test
splits_stay_within_the_limit_and_cover_the_filetripped thedebug_assertinChunkPlanner::mark_failed("the last side of a pair fails, not the first"). The same seed also fails on #192, so #193 did not cause it.Replaying the shrunk sequence as a fixed test on each commit:
C14's
Growop opens many connecting runners in one step, which made the state likely enough for 256 cases to find it.Cause: a test driver bug, not a product bug
The endgame hedge can pair a connecting runner (§9.6). The test's
Op::Failthen calledmark_failedon that first side directly.In the real loop, every failure of a pair side goes through
has_other_sideand thenhandle_side_failed, and the partner keeps the chunk. That holds for:Stopped;The other production callers of
mark_failedeither run only after that check or never target a pair side:release_runner_fullexists only in test builds.Codex verified this independently: no release-build path fails a side of an undecided pair while both sides are live.
What (test code only)
#[cfg(test)]report_started,report_stoppedandfail_runnerrun real lifecycle events throughhandle_lifecycle.Failgoes throughfail_runnerandon_runner.StartandProgresscan pick hedges, andProgresscan also pick beaten losers.on_data_frame, withon_progressandnote_delivery; nothing is written.Finishdelivers the rest, then reportsFinished.!first.restart && !restart && (first.charged || charged). That expectation comes from a failure-class table derived from §8.2, not from the product's helpers.Coverage gap
Random sequences rarely reach an undecided pair. In 4096 cases, the Fail ops hit a hedge side once, a pair owner once and a last survivor once, and a takeover happened once.
Pair behaviour is therefore pinned by deterministic tests rather than by biasing the generator. That was the lead's decision; biasing is left for later.
the_first_side_of_a_pair_fails_as_a_side, the shrunk sequence, continued through the second failure.a_pair_is_charged_once_for_both_sides: each side failing first, with every pair of Retryable, Timeout and Congestion (18 cases).a_hedge_that_wins_keeps_the_counters_of_its_chunk: a retried range, its hedge wins, and the loser's late frame is dropped.each_pair_keeps_its_own_first_failure: two pairs fail with different classes.the_oracle_rejects_a_hedge_while_congested.Mutations, all caught
has_other_sidecheck;mark_failed;Review
Reviewed with
/ccg:review, using the codex backend only (a single-model review).Round 1 (80). One Major: the last survivor of a pair carries the pair's failure classification, so the plain-branch charge expectation was wrong. Fixed with the class table and the 18-case test.
Round 2 (82). Two oracle Majors, both exposed once hedges could deliver:
Both are fixed with deterministic tests. A sweep for owner-keyed state also added the congestion check for new hedges.
Round 3: PASS (96/100). Its Minor (comment wording) and its suggestion (a deterministic test for the congestion check) are applied.
Checks
All on
+nightly-2026-11-06. Clippy allowsunnecessary_lazy_evaluationsuntil #183 merges.cargo fmt --all -- --check.-D warnings.cargo test --workspace --all-features --lockedandcargo test --workspace --lockedpass, run after round 2. After the round-3 items, which only change lib tests: bolt-load lib 576 with all features, 545 with defaults.RUSTDOCFLAGS=-Dwarnings cargo doc --no-deps --all-features -p bolt-load: the same 18 errors as its base.