Skip to content

bundle pull: test that SessionWalk::fill holds no permit while it reserves more #2215

Closed

Description

@thiras

Summary

Nothing tests that SessionWalk::fill (crates/cli/src/commands/bundle_pull.rs) holds no lane permit when it calls RangeSessions::permits. The bundle pull lane cap is deadlock-free only while that holds (#2208, #2212).

Why it matters

Today it holds because of how the loop is written:

  • the permits of a failed open are removed with retain;
  • a second reservation batch follows only a pass in which every open failed.

A future change that keeps a permit across a batch could deadlock two entries at --max-lane-streams 1, and no test would catch it. FakeSessions::Permit is a plain usize, so a test cannot see which permits are outstanding.

Proposed test

  • Make the fake permit a drop guard that increments and decrements a shared outstanding counter.
  • Assert outstanding == 0 on entry to permits().
  • Run it over these shapes:
    • fail_open = [0, 1] (expect reserved == [[0], [1]]);
    • a stripe with fail_open = [1];
    • the three-pass failover (session_walk_drops_a_faulted_lane_and_falls_back_to_the_reserve).

Activity

  1. added
    rust
    kind:test
    on Sep 28, 2026
  2. self-assigned this
    on Sep 28, 2026
  3. added
    area:cli
    prio:low
    on Sep 28, 2026
  4. removed their assignment
    on Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:clikind:testprio:lowrust

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions