Repository navigation
fix(net): a flight asks upstream with its rider's priority - #8818
Conversation
Quest-Claim: 3a2169ab830fd6c2
track::board hardcoded priority 0 and no budget for a flight's fill, so a late joiner's replay ranked below all live traffic upstream. The group's expiry, the subscriber's or fetch's per-reader policy, now reports what the reader asks fills with, and board asks with it (oldest first, since a flight holds one group). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 30 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
I reviewed how a flight's upstream fill now carries its rider's priority and budget, and the new path that lets a rider retry after an Old refusal.
- Rider's asking on flights:
track::boardbuilds the flight'sfill::Askingfromreader.asking()instead of hardcodingpriority: 0, max_delay: None. It still forcesOrder::Ascendingbecause a flight holds one group. Expiry::asking:GroupExpiryreads the live subscription.FetchExpirynow stores the fetch'spriorityand passes it throughfor_track. A consumer with no expiry falls back to the old defaults.- Retry for a looser rider:
Boardingnow keepsfillsandasking. If the flight it boarded was refusedOldunder a tighter budget, it asks again with its own budget, the same wayFetching::poll_answerdoes. That budget comparison now lives in a sharedlooser()helper. - Retry terminates:
flyskips any pending flight whose outcome already resolved the key, so a retry always joins or creates a flight that hasn't answered yet. The recursion goes at most one level deep, and each later retry needs a new refusal under a tighter budget. - No JS counterpart needed:
js/nethas no flight or board mechanism.
claude-opus-5-5 | 𝕏
|
quest land watch: the merge queue removed this pull request at af63265 because its The land fixer works on it in the background, and the watcher re-enqueues it at the back of the queue once it is fixed or judged flaky, or hands it back here with what it needs.
…rkspace/.git.path \/github\/runner_temp\/git\-credentials\-1dcafad2\-ab9d\-45a4\-b134\-2c9d8f2785a2\.config
[command]/nix/store/i2m3w4ly2w6grrmk1j59rb7zp09bssia-git-2.56.0/bin/git config --local --get-all includeif.gitdir:/github/workspace/.git/worktrees/*.path
/github/runner_temp/git-credentials-1dcafad2-ab9d-45a4-b134-2c9d8f2785a2.config
[command]/nix/store/i2m3w4ly2w6grrmk1j59rb7zp09bssia-git-2.56.0/bin/git config --local --unset includeif.gitdir:/github/workspace/.git/worktrees/*.path \/github\/runner_temp\/git\-credentials\-1dcafad2\-ab9d\-45a4\-b134\-2c9d8f2785a2\.config
[command]/nix/store/i2m3w4ly2w6grrmk1j59rb7zp09bssia-git-2.56.0/bin/git submodule foreach --recursive git config --local --show-origin --name-only --get-regexp remote.origin.url
Removing credentials config '/var/cache/github-runner-work/_temp/git-credentials-1dcafad2-ab9d-45a4-b134-2c9d8f2785a2.config'
##[endgroup]
Prepare all required actions
Getting action download info
Download action repository 'taiki-e/install-action@cfdb7ed4ccc7c7dce37759eae89dc5674b469b39' (SHA:cfdb7ed4ccc7c7dce37759eae89dc5674b469b39)
##[group]Run ./.github/actions/just
env:
BASE: cf23b5ae04c8301243d1a9d27745c54476b390cf
CHECK_FAIL_FAST: 1
NEXTEST_TEST_THREADS: 24
##[endgroup]
##[start-action display=Use the NixOS runner toolchain;id=__self.__run]
##[group]Run just --version
�[36;1mjust --version�[0m
shell: /nix/store/lfm00fnq66xfgbn099vqckabyl5jllz6-bash-interactive-5.3p20/bin/bash --noprofile --norc -e -o pipefail {0}
env:
BASE: cf23b5ae04c8301243d1a9d27745c54476b390cf
CHECK_FAIL_FAST: 1
NEXTEST_TEST_THREADS: 24
##[endgroup]
just 1.59.0
##[end-action id=__self.__run;outcome=success;conclusion=success;duration_ms=11]
##[start-action display=Run taiki-e/install-action@cfdb7ed4ccc7c7dce37759eae89dc5674b469b39;id=__self.__taiki-e_install-action]
##[end-action id=__self.__taiki-e_install-action;outcome=skipped;conclusion=skipped;duration_ms=0]
Prepare all required actions
Getting action download info
Download action repository 'jdx/mr-boxington-action@88acf2bb50552c7c508cbac13e5f8c576b95b1de' (SHA:88acf2bb50552c7c508cbac13e5f8c576b95b1de)
##[group]Run ./.github/actions/rust-cache
with:
write: true
env:
BASE: cf23b5ae04c8301243d1a9d27745c54476b390cf
CHECK_FAIL_FAST: 1
NEXTEST_TEST_THREADS: 24
##[endgroup]
##[start-action display=Require main's merge queue on self-hosted runners;id=__self_2.__run]
##[end-action id=__self_2.__run;outcome=skipped;conclusion=skipped;duration_ms=0]
##[start-action display=Cache credentials;id=__self_2.__run_2]
##[end-action id=__self_2.__run_2;outcome=skipped;conclusion=skipped;duration_ms=0]
##[start-action display=Run jdx/mr-boxington-action@88acf2bb50552c7c508cbac13e5f8c576b95b1de;id=__self_2.mbx]
##[group]Run jdx/mr-boxington-action@88acf2bb50552c7c508cbac13e5f8c576b95b1de
with:
version: 1.30.0
backend: local
remote-url: s3://mbx-moq-dev
namespace: Linux-X64
github-token: ***
cache-generation: v1
github-cache-mode: target
isolate-objects-cache: false
clean-target-before-export: false
save-on-workflow-dispatch: false
save-on-pull-request: false
save-on-protected-branch: false
working-directory: .
cache-links: auto
env:
BASE: cf23b5ae04c8301243d1a9d27745c54476b390cf
CHECK_FAIL_FAST: 1
NEXTEST_TEST_THREADS: 24
##[endgroup]
Set up mbx 1.30.0
##[end-action id=__self_2.mbx;outcome=success;conclusion=success;duration_ms=463]
##[start-action display=Drop another mbx version's private state;id=__self_2.__run_3]
##[group]Run : "${VERSION:?the mbx action reported no version}"
�[36;1m: "${VERSION:?the mbx action reported no version}"�[0m
�[36;1mstamp="$HOME/.cache/moq-mbx-versions$RUNNER_WORKSPACE"�[0m
�[36;1mif [ "$(cat "$stamp" 2>/dev/null)" != "$VERSION" ]; then�[0m
�[36;1m mbx clean --under "$RUNNER_WORKSPACE"�[0m
�[36;1m mkdir -p "${stamp%/*}"�[0m
�[36;1m printf '%s\n' "$VERSION" > "$stamp"�[0m
�[36;1mfi�[0m
shell: /nix/store/lfm00fnq66xfgbn099vqckabyl5jllz6-bash-interactive-5.3p20/bin/bash --noprofile --norc -e -o pipefail {0}
env:
BASE: cf23b5ae04c8301243d1a9d27745c54476b390cf
CHECK_FAIL_FAST: 1
NEXTEST_TEST_THREADS: 24
MBX_CACHE_LINKS: 1
MBX_REMOTE_URL:
VERSION: 1.30.0
##[endgroup]
##[end-action id=__self_2.__run_3;outcome=success;conclusion=success;duration_ms=8]
##[start-action display=Sweep the cache before building;id=__self_2.__run_4]
##[group]Run auto=$(env -i HOME="$HOME" PATH="$PATH" mbx settings get gc.auto)
�[36;1mauto=$(env -i HOME="$HOME" PATH="$PATH" mbx settings get gc.auto)�[0m
�[36;1mif [ "$auto" != "false" ]; then�[0m
�[36;1m echo "::error::the runner's global mbx config must set gc.auto = false, but it reads '$auto' without MBX_* variables"�[0m
�[36;1m exit 1�[0m
�[36;1mfi�[0m
�[36;1mmbx gc�[0m
shell: /nix/store/lfm00fnq66xfgbn099vqckabyl5jllz6-bash-interactive-5.3p20/bin/bash --noprofile --norc -e -o pipefail {0}
env:
BASE: cf23b5ae04c8301243d1a9d27745c54476b390cf
CHECK_FAIL_FAST: 1
NEXTEST_TEST_THREADS: 24
MBX_CACHE_LINKS: 1
MBX_REMOTE_URL:
##[endgroup]
evicted 0 objects and 0 action results (0 B logical); 50.0 GiB logical remain
##[end-action id=__self_2.__run_4;outcome=success;conclusion=success;duration_ms=873]
##[start-action display=Check the cache;id=__self_2.__run_5]
##[end-action id=__self_2.__run_5;outcome=skipped;conclusion=skipped;duration_ms=0]
##[start-action display=Cargo shim;id=__self_2.__run_6]
##[group]Run mbx setup --yes
�[36;1mmbx setup --yes�[0m
�[36;1mshim=$(mbx setup --status 2>/dev/null | sed -n '1s/.*: //p' || true)�[0m
�[36;1mif [ ! -e "$shim" ]; then�[0m
�[36;1m echo "::error::mbx setup installed no Cargo shim: $(mbx setup --status 2>&1)"�[0m
�[36;1m exit 1�[0m
�[36;1mfi�[0m
�[36;1mecho "${shim%[/\\]*}" >> "$GITHUB_PATH"�[0m
shell: /nix/store/lfm00fnq66xfgbn099vqckabyl5jllz6-bash-interactive-5.3p20/bin/bash --noprofile --norc -e -o pipefail {0}
env:
BASE: cf23b5ae04c8301243d1a9d27745c54476b390cf
CHECK_FAIL_FAST: 1
NEXTEST_TEST_THREADS: 24
MBX_CACHE_LINKS: 1
MBX_REMOTE_URL:
##[endgroup]
refreshed the Cargo shim at /var/cache/github-runner-home/.local/share/mbx/bin/cargo
##[end-action id=__self_2.__run_6;outcome=success;conclusion=success;duration_ms=197]
##[group]Run rm -rf target/cargo-timings
�[36;1mrm -rf target/cargo-timings�[0m
�[36;1mnix develop --command just ci "$BASE"�[0m
shell: /nix/store/lfm00fnq66xfgbn099vqckabyl5jllz6-bash-interactive-5.3p20/bin/bash -e {0}
env:
BASE: cf23b5ae04c8301243d1a9d27745c54476b390cf
CHECK_FAIL_FAST: 1
NEXTEST_TEST_THREADS: 24
MBX_CACHE_LINKS: 1
MBX_REMOTE_URL:
##[endgroup]
warning: ignoring untrusted flake configuration setting 'extra-substituters'.
Pass '--accept-flake-config' to trust it
warning: ignoring untrusted flake configuration setting 'extra-trusted-public-keys'.
Pass '--accept-flake-config' to trust it
warning: ignoring untrusted flake configuration setting 'fallback'.
Pass '--accept-flake-config' to trust it
CI_STRICT=1 NEXTEST_PROFILE=ci sh/dispatch.sh ci "$BASE"
changed: base cf23b5ae04c8301243d1a9d27745c54476b390cf
ci: check rs started
ci: check biome started
ci: check carla_bridge started
ci: check biome passed in 5s
ci: check markdown started
ci: check markdown passed in 14s
ci: check gh started
ci: check gh passed in 17s
##[group]check biome
uv run --no-project python sh/js/install.py frozen
[0.05ms] ".env"
bun install v1.4.4 (38afee6c8)
Resolving dependencies
Resolved, downloaded and extracted [1]
$ bun run --cwd js/libav build
$ bun build.ts
warning: ignoring untrusted flake configuration setting 'extra-substituters'.
Pass '--accept-flake-config' to trust it
warning: ignoring untrusted flake configuration setting 'extra-trusted-public-keys'.
Pass '--accept-flake-config' to trust it
warning: ignoring untrusted flake configuration setting 'fallback'.
Pass '--accept-flake-config' to trust it
+ @babel/parser@8.1.0
+ @biomejs/biome@2.6.6
+ concurrently@10.0.7
+ markdown-extensions@2.0.0
+ publint@0.3.25
+ remark-cli@12.0.1
+ remark-frontmatter@5.0.0
+ remark-lint-list-item-indent@4.0.1
+ remark-lint-maximum-line-length@4.1.1
+ remark-lint-no-duplicate-headings@4.0.1
+ remark-lint-no-undefined-references@5.0.2
+ remark-preset-lint-consistent@6.0.1
+ remark-preset-lint-recommended@7.0.1
+ remark-stringify@11.0.0
649 packages installed [2.79s]
bun biome check --error-on-warnings .
Checked 2243 files in 2s. No fixes applied.
##[endgroup]
##[group]check markdown
##[endgroup]
##[group]check gh
python3 sh/version.py
shared version: disabled until the release cut runs just version
actionlint
zizmor --offline --quiet .github
�[32mNo findings to report. Good job!�[39m (�[1m�[93m32�[39m ignored, �[93m128�[39m suppressed�[0m)
sh/gh/alert.sh check-coverage
alert.yml watches all 36 alertable workflows
bun test ./sh/gh/alert.test.ts
bun test v1.4.4 (38afee6c8)
##[group]sh/gh/alert.test.ts:
(pass) Discord alert policy for pull_request [0.12ms]
(pass) Discord alert policy for pull_request_target [0.08ms]
(pass) Discord alert policy for push [0.09ms]
(pass) Discord alert policy for schedule
(pass) Discord alert policy for workflow_dispatch [0.01ms]
(pass) Discord alert policy for workflow_run [0.03ms]
(pass) cron workflows only alert on scheduled failures [8.10ms]
(pass) ordinary CI never subscribes to Discord alerts [0.07ms]
(pass) alert coverage excludes CI-only workflows and retains release and nightly workflows [86.71ms]
##[endgroup]
9 pass
0 fail
247 expect() calls
Ran 9 tests across 1 file. [100.00ms]
bun sh/gh/check-runs.ts
python3 sh/gh/test-inventory.py
python3 bench/relay.test.py
.......
----------------------------------------------------------------------
Ran 7 tests in 1.513s
OK
python3 sh/gh/nightly.test.py NightlyTest.test_every_nightly_benchmark_test_exists
.
----------------------------------------------------------------------
Ran 1 test in 3.115s
OK
##[endgroup]
ci: check drill started
ci: check drill passed in 0s
##[group]check drill
./drill/sensitivity.sh "$@"
=== fetch-never-sent -> bursts_cross_a_cluster::loopback
=== ingress-burst-never-collected -> bursts_cross_a_cluster::impaired
=== peer-link-never-redialed -> bursts_cross_a_flapping_peer::loopback
=== quic-amplification-full-datagram -> tests::long_header_packets_fit_a_large_mtu
=== quic-client-initial-unpadded -> tests::sim::random_workloads
=== quic-coalesced-cid-mismatch -> tests::sim::random_workloads
=== quic-congestion-window-ignored -> tests::sim::random_workloads
=== quic-long-header-length-overrun -> tests::sim::random_workloads
=== reconnect-stops-after-session-loss -> relay_killed_mid_group_aborts_then_resumes::loopback
=== relay-withdraws-lost-publisher -> interrupted_publisher_republishes_new_content::loopback
=== subscriber-leaks-broadcasts -> cancel_under_backpressure_releases_the_reader::loopback
=== subscriber-max-age-ignored -> ietf_subscriber_max_age_skips_bufferbloat
12 of 12 mutations apply
##[endgroup]
ci: check quest started
ci: check quest passed in 2s
##[group]check quest
Dev-shell quest: /nix/store/lkmi7b4rfzq0j2vgndh45plzm9rlcdbd-quest-c1c2875/bin/quest
quest: 490 documents ok
##[endgroup]
ci: check shell started
ci: check shell passed in 15s
##[group]check shell
##[endgroup]
ci: check large_files started
ci: check large_files passed in 0s
##[group]check large_files
changed: base cf23b5ae04c8301243d1a9d27745c54476b390cf
ci: check text started
##[endgroup]
ci: check text passed in 0s
##[group]check text
##[endgroup]
ci: check coverage_tables started
ci: wall and CPU seconds per module
5 37 check biome
14 9 check markdown
17 22 check gh
0 0 check drill
2 2 check quest
15 15 check shell
0 0 check large_files
0 0 check text
55 87 whole run
error: recipe `ci` failed on line 120 with exit code 130
##[error]The runner has received a shutdown signal. This can happen when the runner service is stopped, or a manually started runner is canceled.
##[error]The operation was canceled.
Cleaning up orphan processes
(written by quest land watch) |
|
codex, gpt-6.1-sol, medium effort land fixer note:
(written by codex, gpt-6.1-sol, medium effort) |
|
quest land watch: re-enqueued this pull request at af63265, at the back of the merge queue, unchanged, since the land fixer traced the failure to the runner's environment: (written by quest land watch) |

Finishes quest/m1/flight-priority.md: a flight's upstream fill now asks with its rider's priority and budget, so a late joiner's replay isn't ranked below all live traffic on a congested upstream link.
Changes
group::Expiry, the per-reader policy a handed-out group already carries, gainsasking(), which returns what that reader asks fills with:GroupExpiry(a subscriber's group) reads the subscription's priority,delay.max, and order.FetchExpiry(a fetched group) now keeps the fetch's priority next to itsmax_delay.group::Consumer::asking()returns its expiry's asking. A group with no expiry, such as a rawconsume(), falls back to priority 0 and no budget, which was the old behavior.track::boardasks for the flight with the reader's asking. Order staysAscending, as in a one-group fetch fill, since a flight holds one group.Old. It flies again with its own budget, the same retryFetching::poll_answermakes. The budget comparison is now a sharedlooser()helper.fill::Askingis widened topub(in crate::model)and re-exported fromtrack.Choices made unattended
Expiry, not from a new field ongroup::Consumer. The expiry already carries the subscriber'sSubscriptionor the fetch's budget, and the consumer has a size assert. A front's logical reader gets its preferences through the copy track's subscription, which the front mirrors.Join::updatethroughBoarding::pollwould cost a lock on the subscription on every poll during boarding.Validation
a_flight_asks_with_its_riders_priority(inrs/moq-net/src/model/track.rs) uses the public track API. A subscriber with priority 5,delay.max10s, and descending order sees its flight fill with priority 5, max_delay 10s, and ascending order. A fetch with priority -3 sees priority -3 and its budget.a_looser_rider_asks_again_after_old: a 1s rider and a 10s rider share a flight, and the request is rejected withOldunder 1s. The tight rider fails. The loose rider asks a new flight at 10s and reads it.priority: 0, max_delay: Noneback makes the test fail (left: 0, right: 5).cargo test -p moq-net --features async --lib flight: all 15 flight tests pass, and so does the new retry test.just checkpassed (check rs, test rs, and the rest).Public API / Wire
Public API: none. Everything is crate-private. Wire: none, though a relay's upstream flight SUBSCRIBE/FETCH now carries the rider's priority and budget, not 0 and none.
Caused by
track::boardwith a hardcodedpriority: 0, max_delay: None(found by reviewer: the feature review quest)Follow-ups
None.
Models
Size: XS
Implementer: Claude Code, claude-opus-5-5, unknown effort (arm B)
🤖 Generated with Claude Code
(Written by Opus 5.5)
Review
Rewritten by
quest reviewafter each round.Head: af63265
Base: origin/main at 250a13a
Risk: high,
Bounded upstream FETCH requests change wire behavior relied on by downstream readers and relays; incorrect budget handling can interrupt delivery, though reverting restores prior behavior.Classified: medium by default
Reviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a1df38-f214-79a1-b7cd-1e3fc6c5dddc, round 2Score: 10/10,
The incremental change fixes the shared-flight budget refusal and adds a focused regression test, with no new issues found by code inspection.Raised the risk to high:
Bounded upstream FETCH requests change wire behavior relied on by downstream readers and relays; incorrect budget handling can interrupt delivery, though reverting restores prior behavior.Rounds: 2; first round 1 (medium 1); findings 1 (medium 1): fixed 1, refuted 0, open 0
Findings: none
The last round's findings, at 9073568:
rs/moq-net/src/model/track.rs:3864:Recover shared flights rejected under another rider's budget;Boarding retains the rider's asking and fills handle, retries Old refusals recorded under a tighter budget, and the new regression test covers a tolerant rider recovering through a second flight.