Skip to content

fix(shaper): verify reorder only on admitted datagrams - #6037

Merged
kixelated merged 4 commits into
mainfrom
quest/m1/test-flakes-2/flapping-peer-reorder
Oct 20, 2026
Merged

kixelated merged 4 commits into
mainfrom
quest/m1/test-flakes-2/flapping-peer-reorder

Conversation

@kixelated

@kixelated kixelated commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The exact flapping-peer seed 783778834340462316 still failed on main e900b9f62a3c63ba577811974f45119f3251194e, after moq-dev/moq#5943. Recovery succeeded, but impairment verification counted lost and overflowing datagrams as chances for reorder to act. The failing path had 499 datagrams but only 436 could apply delay or reorder.

Approach

Count loss exposure separately from admission to delay/reorder, preserving each decision's phase. Keep the existing probability cutoff, seeded draws, impairment profile, and delivery assertions. Add deterministic recorded-count and actual admission-path regressions, then remove the completed quest and its reference.

Decisions

  • Merge origin/main to bring the branch up to date: ✅ merge (no conflicts) / rebase (never, per the repo rules).
  • Draft state: ✅ mark ready, since nothing is unfinished and the earlier draft hold was a no-merge instruction, which ready-for-review does not change / keep draft.

Validation

  • Exact command in the Nix shell: MOQ_SHAPER_SEED=783778834340462316 just test drill -E 'test(=bursts_cross_a_flapping_peer::impaired)' --success-output immediate.
  • Baseline: exit 100, original reorder-verification failure. The deterministic regression also failed before the fix.
  • Same seed after the source fix: exit 0, 1 passed in 16.299s. All 120 groups recovered, with flap and bottleneck overflow asserted. Scheduling still changes traffic, so this is a single replay result.
  • Frozen head d1907360df980f7620caf36648b0a87f7f5f6bf1: just check e900b9f62a3c63ba577811974f45119f3251194e passed.
  • After a first origin/main merge (head 7184eea474589e5d4fffad17482d3390e745f573): the seed replay passed again (16.5s), and just check passed every gate (644 + 216 tests, lint, quest, drill mutations, flake) except bench/relay.test.py's test_a_foreign_listener_never_proves_relay_readiness. That fixture is untouched here and fails the same on main on this host: its hold.py picks a random port that collided with a busy listener (EADDRINUSE), so the harness blocks forever reading the never-written .ready FIFO.
  • After a second origin/main merge (head 07382b2563, quest README conflict resolved by keeping main's new macOS QUIC child and dropping this completed quest's entry): just check passed in full, including bench/relay.test.py.

Impact

  • Public API: none.
  • Wire: none.

Alternatives

Changing the seed, profile, cutoff, timeouts, or delivery assertions would hide the accounting bug.

Follow-ups

  • bench/relay.test.py foreign-listener fixture: a port collision in hold.py hangs the test instead of retrying or failing, which breaks just check on loaded hosts.

🤖 Generated with Claude Code

(Written by Claude Opus 5.5)

kixelated and others added 2 commits October 19, 2026 19:31
Co-Authored-By: GPT-6.1-Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1-Sol <noreply@openai.com>
@kixelated

Copy link
Copy Markdown
Collaborator Author

Quest outcome: the exact seed reproduced the original verifier failure on e900b9f62a3c63ba577811974f45119f3251194e (exit 100), and a deterministic regression confirmed dropped datagrams were counted as reorder opportunities. The corrected per-phase accounting passes that seed (exit 0) and the complete required changed-package gate on d1907360df980f7620caf36648b0a87f7f5f6bf1 (exit 0). Evidence is preserved in the isolated worktree's .scratch/.

No public API or wire changes, open implementation decisions, or remaining local checks. All owned commands have ended. The PR remains draft under the user's explicit no-merge instruction.

(written by GPT-6.1-Sol)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review October 20, 2026 05:41
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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 4 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2191f7e8-25b3-4606-8713-fac4230b25df
📥 Commits

Reviewing files that changed from the base of the PR and between 697441d and 07382b2.

📒 Files selected for processing: 3
  • quest/m1/test-flakes-2/README.md
  • quest/m1/test-flakes-2/flapping-peer-reorder.md
  • rs/moq-shaper/src/lib.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T08:59:09.683916Z 07382b2 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	quest/m1/test-flakes-2/README.md
@kixelated
kixelated added this pull request to the merge queue Oct 20, 2026
Merged via the queue into main with commit 5f6ec86 Oct 20, 2026
6 checks passed
@kixelated
kixelated deleted the quest/m1/test-flakes-2/flapping-peer-reorder branch October 20, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant