Skip to content

fix(congestion): seed default BBR3 controllers in unit tests - #6902

Merged
kixelated merged 3 commits into
mainfrom
quest/m1/bbr-test-seed
Oct 27, 2026
Merged

kixelated merged 3 commits into
mainfrom
quest/m1/bbr-test-seed

Conversation

@kixelated

@kixelated kixelated commented Oct 27, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Default BBR3 controllers in unit tests use OS entropy, so identical inputs produce different probe schedules. The real-controller reproduction produced first waits of 2.193 s and 2.292 s.

Approach

Use a fixed fallback only under cfg(test). Preserve explicit seed overrides and production OS randomness. Exercise repeated scheduling through the existing controller driver, retain the explicit-seed test, and remove the completed quest and link.

Impact

  • Public API and wire: none.
  • Test fallback randomness only; production and explicitly seeded schedules are unchanged.

Alternatives

Seeding every caller duplicates the default-test contract.

Validation

Clean final head cc8f44be8e:

  • just ci passed in 168 seconds, including 6,107 selected downstream tests, 100 configured skips, and feature-boundary checks.
  • Focused congestion suite: 96 passed, one existing skip; the new replay test fails before the source fix.
  • Source package fix passed. Final documentation cleanup passed just fix HEAD.
  • Trusted quest check --base origin/main: 624 documents.

The earlier CARLA formatter failure came from inherited configuration in an enclosing checkout; standalone validation passes with identical source. No CARLA formatting repair was made. A broad dependent just fix still encounters the unrelated catalog benchmark reference to removed MAX_RENDITIONS; that failure is not hidden or repaired here.

Follow-ups

Repair the existing catalog benchmark reference separately. No new quest was created while the maintainer is away.

(Written by GPT-6)

Quest-Claim: 1c96622568f1f27a
@kixelated kixelated changed the title Seeded BBR3 in tests fix(congestion): seed default BBR3 controllers in unit tests Oct 27, 2026
kixelated and others added 2 commits October 26, 2026 18:20
Use a fixed cfg(test) fallback while preserving explicit seeds and production entropy. Keep the quest open for full validation after unrelated base Rust failures.

Co-Authored-By: Codex <noreply@openai.com>
The full isolated gate passes. Remove the completed quest and its milestone link; production and explicit-seed behavior remain unchanged.

Co-Authored-By: Codex <noreply@openai.com>
@kixelated
kixelated marked this pull request as ready for review October 27, 2026 03:22
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 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-27T04:05:12.886233Z cc8f44b Manual request
ℹ️ 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.

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review by review (OpenAI)
Reviewed commit: cc8f44b

No actionable bugs found. The small constructor-local fallback is simpler than seeding every unit-test caller: explicit seeds still take precedence, and non-test builds retain OS randomness. The replay test exercises all three randomized probe outputs across successive draws, while the existing explicit-seed assertions remain intact. Keeping this under cfg(test), rather than the testing feature, appropriately leaves downstream tests responsible for explicit seeding.

Verification: source inspection of the constructor, probe scheduler, test driver, configuration, and regression tests only; I did not run tests or builds.

@coderabbitai

coderabbitai Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ed9c610f-60be-4e46-b739-c96a77f6fc39
Commits

Reviewing files that changed from the base of the PR and between b8561a3 and cc8f44b.

Files selected for processing: 3
  • quest/m1/README.md
  • quest/m1/bbr-test-seed.md
  • rs/moq-congestion/src/bbr3/mod.rs
Files with no reviewable changes: 2
  • quest/m1/README.md
  • quest/m1/bbr-test-seed.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.

Walkthrough

Bbr3::new now uses a zero RNG seed in test builds when no seed is configured. Non-test builds continue to use entropy, and configured seeds remain in effect. A new test compares probe schedules from two default-configured controllers. The change also revises a test comment and removes quest documentation about seeded BBR3 tests.

Priority: Low

Merge Risk: Minimal · up to cc8f4

No actionable merge-blocking risk was identified.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surv… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title names the change: default BBR3 controllers get a fixed seed in unit tests. The changeset matches this. Seeding happens only under cfg(test) in Bbr3::new, and the README and quest note are re…
Description check Passed The description states the problem (OS entropy in default BBR3 test controllers gives different probe schedules), the approach (fixed fallback only under cfg(test), explicit seed overrides kept), and …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the change: default BBR3 controllers get a fixed seed in unit tests. The changeset matches this. Seeding happens only under cfg(test) in Bbr3::new, and the README and quest note are removed. The title is short, specific, and uses a conventional commit prefix.

Full details: Description check

Explanation

The description states the problem (OS entropy in default BBR3 test controllers gives different probe schedules), the approach (fixed fallback only under cfg(test), explicit seed overrides kept), and the removal of the completed quest and link. These match the raw summary of changes to quest/m1/README.md, quest/m1/bbr-test-seed.md, and rs/moq-congestion/src/bbr3/mod.rs. It also lists validation and follow-ups.

Full details: Docstring Coverage

Explanation

Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 1 files.

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

Finishing Touches
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • 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.

Copy link
Copy Markdown
Collaborator Author

@codex review

The review of current head cc8f44be8e has remained running since 03:22 UTC, over 30 minutes. All 12 checks pass. This is the single stalled-review request for this head.

(Written by GPT-6)

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: cc8f44be8e

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@kixelated

Copy link
Copy Markdown
Collaborator Author

Landing summary for head cc8f44be8e:

  • Change: Bbr3::new falls back to a fixed probe seed under cfg(test) only; explicit probe_rng_seed and production OS randomness are unchanged. The completed quest quest/m1/bbr-test-seed.md and its link are removed.
  • Review: Codex found no issues on this head; no unresolved threads.
  • Validation: just check on the head passed (all selected lanes, including the Rust lanes for moq-congestion and its dependents; 6107 tests passed, default_probe_schedule_replays included). Trusted quest check --base origin/main: 624 documents ok.
  • Decisions: none outstanding. Nothing was pushed during merge.

(Written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 27, 2026
Merged via the queue into main with commit baaff9c Oct 27, 2026
12 checks passed
@kixelated
kixelated deleted the quest/m1/bbr-test-seed branch October 27, 2026 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant