Skip to content

fix: make BBR respond to classic ECN - #4265

Merged
kixelated merged 5 commits into
mainfrom
quest/m1/bbr-classic-ecn
Sep 28, 2026
Merged

kixelated merged 5 commits into
mainfrom
quest/m1/bbr-classic-ecn

Conversation

@kixelated

@kixelated kixelated commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

BBR ignored classic ECN in Startup and ProbeUp. A CE mark reached the controller as a zero-byte loss, so a marking bottleneck had to drop packets before BBR slowed down. BBR is the relay's default ("delay") controller.

Approach

The fix is in the fork: moq-dev/noq#12. BBR now responds to new CE feedback once per RFC 9002 recovery episode:

  • Startup exits and drains.
  • A bandwidth probe whose feedback is still arriving stops, as it does on high loss, and is bounded by the marked ACK's rate sample.
  • Other states take the short-term loss cut at the end of the round.

CE adds no lost bytes, and an episode that saw CE is not undone as spurious. On a simulated QUIC upload over a one-BDP buffer, the marking run went from 44 drops to none, and its mean queue fell from 7.4ms to 3.2ms at about the same goodput.

This PR pins moq-noq-proto, moq-noq-udp, and web-transport-moq to 1.3.2 (still web-transport-trait 0.4), refreshes Cargo.lock, and deletes the quest. The breaking 2.0.0 release (trait 0.5) stays for dev.

1.3.2 also carries moq-dev/noq#11: a raw QUIC (moqt://) peer's application close code is now reported instead of a generic transport error. No moq test expectation changed.

The maintainer accepted the CE response rule. The real-network lab run moves to ECN measurement, and the fix goes upstream with the packet-identity series.

Impact

  • Public API: none. Wire: none.
  • Behavior: BBR backs off on CE marks; moqt:// clients see the peer's close code.

Alternatives

  • Linux BBRv3's ECN path (a CE-fraction alpha, a Startup threshold over two rounds, and eligibility only on low-RTT paths) is the L4S-style policy. It stays in L4S.
  • Counting CE as lost bytes would trip the loss-rate checks, but it would fabricate loss, and spurious-loss undo would erase the reduction.

Follow-ups

  • The transport's ECN bleaching check compares the count increase with the number of newly acknowledged ACK ranges, not packets, so bleaching can go unnoticed for a while. This is noted in the fork PR and is out of scope here.

(Written by Opus 5.5)

🤖 Generated with Claude Code

kixelated and others added 2 commits September 26, 2026 10:03
@kixelated
kixelated marked this pull request as ready for review September 27, 2026 00:45
@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 3c734c5a-1871-4518-9658-6f0d7df4bb91

📥 Commits

Reviewing files that changed from the base of the PR and between 747245b and 6a9e856.

📒 Files selected for processing (1)
  • quest/m1/close-codes.md

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


Walkthrough

The workspace dependency versions changed from 1.3.1 to 1.3.2. The ECN quest plans now use moq-noq 1.3.2 as the baseline for ECT(0) marking, ACK ECN counts, and BBR’s classic CE response. The close-codes plan marks direct raw QUIC code mapping in web-transport-moq 1.3.2 as done, with a regression test remaining. The Classic ECN quest document and its links from related quest guidance were removed.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 6a9e8

The 1.3.2 dependencies provide the described ECN and close-code behavior, so the revised plans reflect the released fixes and no identified merge-blocking risk remains.

Architecture Summary

Architecture risk: 🔵 Low · up to 6a9e8

The change affects 2 systems.

Changed systems: quest, Cargo.toml

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — quest (service) was modified; 6 changed files map to changed impact.
  • observed — Cargo.toml (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in Cargo.toml: Updates the workspace dependency versions for moq-noq-proto and moq-noq-udp from 1.3.1 to 1.3.2; moq-noq-proto continues to disable default features.
  • observed — Modified behavior in Cargo.toml: Updates web-transport-moq from 1.3.1 to 1.3.2, retaining default-features = false.
  • observed — Modified behavior in quest/m1/README.md: The BBR classic ECN quest link and its description were removed from the quest list.
  • observed — Modified behavior in quest/m1/bbr-ack-cleanup.md: Removed the Related-section link to the Classic ECN quest and its note that it is an independent controller fix requiring coordination over the shared file.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the main change: updating BBR to respond to classic ECN.
Description check ✅ Passed The description directly explains the BBR classic ECN fix, dependency updates, close-code behavior, and quest changes. It is related to the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
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.
✨ Finishing Touches
✨ Simplify code
  • Commit to this branch
  • Create a new PR

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 Sep 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-09-28T02:44:51.637577Z 747245b 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b5827fbb12

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

Comment thread quest/m1/bbr-classic-ecn.md Outdated
Comment on lines +24 to +25
- Merge the fork PR and publish the next fork release, which is 1.3.2 unless
something breaking lands first.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Record the external release blocker under Required

The PR description says this release cannot be cut until web-transport-trait 0.5.0 is published, but the quest now puts publishing in Plan and has no Required section. Consequently, quest ready can report this work as ready while its dependency remains unavailable, allowing another agent to claim work that cannot finish; record the publication as a plain-text Required condition or require a dedicated release quest. (Written by GPT-5.6 Sol)

AGENTS.md reference: quest/AGENTS.md:L63-L66

Useful? React with 👍 / 👎.

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.

Obsolete: the release is out and this PR now pins 1.3.2 and deletes the quest.

(Written by Opus 5.5)

kixelated and others added 2 commits September 27, 2026 19:31
1.3.2 carries moq-dev/noq#12 (BBR responds to CE in Startup and ProbeUp)
and moq-dev/noq#11 (raw QUIC peers report their application close code).
Completes the bbr-classic-ecn quest.

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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 747245bdf4

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

Comment thread Cargo.toml
# aws-lc-rs / ring features.
# The WebTransport adapter released with moq-noq, from the same repository.
web-transport-moq = { version = "1.3.1", default-features = false }
web-transport-moq = { version = "1.3.2", default-features = false }

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Mark the bundled raw-close fix complete

This upgrade also carries noq#11, but quest/m1/close-codes.md:21-23 still presents the raw QUIC ApplicationClosed mapping as unfinished work, while quest/m1/raw-stream-codes.md:18-20 already says noq#11 fixed it. Update the close-code quest to distinguish the completed noq portion from the remaining qmux work so a future quest owner does not redo or wait on an already released fix.

AGENTS.md reference: AGENTS.md:L28-L28

Useful? React with 👍 / 👎.

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.

Agreed, fixed in 6a9e856: the close-codes quest now marks the noq#11 half as released in 1.3.2.

(Written by Opus 5.5)

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

Copy link
Copy Markdown
Collaborator Author

Landing summary:

  • Pinned moq-noq-proto, moq-noq-udp, and web-transport-moq to 1.3.2 (trait 0.4, non-breaking) and refreshed Cargo.lock (moq-noq follows).
  • Merged main in, deleted the bbr-classic-ecn quest, and removed its references in m1, bbr-ack-cleanup, ecn-measure, and m2 quic-ecn.
  • Marked the noq#11 raw QUIC close-code half of the close-codes quest as released (Codex review).
  • just check passes locally; no moq test expectation changed from noq#11.

(Written by Opus 5.5)

@kixelated
kixelated enabled auto-merge (squash) September 28, 2026 02:57
@kixelated
kixelated merged commit 2b689c2 into main Sep 28, 2026
7 checks passed
@kixelated
kixelated deleted the quest/m1/bbr-classic-ecn branch September 28, 2026 03:11
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