Repository navigation
Conversation
Quest-Claim: 79ebe9ce878ab3c7
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ledged Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
marked this pull request as ready for review
November 15, 2026 15:47
Contributor
|
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 15 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. |
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This review covered the full PR: SendStream now reports acknowledgment only through Offset/offset()/poll_acked, and egress billing, the open-stream log, and every backend move onto it.
- Trait collapse —
acknowledged(),delivered(), andpoll_delivered()are removed fromtransport::poll::SendStreamand from every wrapper (boxed, ietfRanked, fuzzRecorded,MockSendStream, moq-uringLocal). Thepoll_ackeddocs now promise that acknowledged bytes stay acknowledged after a reset or stop. - Per-frame egress billing —
coding::Writer's newBillingmints an offset after each write that ends a frame, plus one idle offset at a park when none is outstanding. It polls them oldest first and falls back to billing bytes taken onAcked::Unsupported. It stops billing on error. Only tracked meters create aBilling, so untracked streams mint nothing. - Open-stream log —
OpenStreamis gone.make_roomnow reads onlyListed::rank(), and theDEBUG-gatedLine::startcount askspoll_ackedat each stream's current offset with a noop waiter, which registers nothing. - Memory transport —
Offset = u64. An offset counts as delivered once the reader has taken every byte before it. Reset and stop fail only the bytes not yet taken, and the session-close check runs first so earlier reads still count. - QUIC drivers and web adapters — moq-tokio and moq-uring add crate-private
poll_ackedmethods. These keep the acknowledged prefix throughSTOP_SENDINGand map other failures to the peer's stop code or the connection's loss. Theunreachable!arm holds because every moq-quic move to a closed state callslose()first, and a held handle is never released. The web adapters forward the driver'ssend::Offset, which already counts the header. After a reset they answer from the savedEnded { offset, acked }. - qmux — drops the three methods and stays
Acked::Unsupported, so its egress bills the bytes the stream accepted. This is the maintainer decision recorded in the Impact section. - Quests — deletes the finished quest, cuts
quic-ack-hookdown to the public driver API and its trap tests, and removeslag-histogram's dependency onquic-ack-hook.
claude-opus-5-5 | 𝕏
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Finishes quest/m2/api-ack-one-primitive.md.
Problem
moq_net::transport::poll::SendStreamis public and unsealed, and it carried three ways to report acknowledgment:acknowledged(),delivered()withpoll_delivered(), and theoffset()/poll_ackedpair moq-dev/moq#8739 added. Every method that ships at the cut is one every out-of-tree transport implements for good. The maintainer decided on 2026-11-15 to keepoffset/poll_ackedand collapse the rest.Approach
acknowledged,delivered, andpoll_deliveredare gone;Offset,offset(), andpoll_ackedremain.coding::Writer): a privateBillingkeeps a queue of minted offsets, each with the bytes the writer had written when it was minted. A write that ends a frame mints one. A park with nothing outstanding mints one for a frame still being written. Parks poll the oldest offset and bill through each one acknowledged.Acked::Unsupportedfalls back to billing the bytes taken, and an error stops billing. Offsets never outnumber the waiting frames plus one, andstats::Deliveryalready holds an entry per waiting frame.transport/open.rs): it counts acknowledged streams by askingpoll_ackedat each stream's current offset.OpenStreamis gone. The listing hands out(Rank, Arc<Listed>), andmake_roomreads only the rank, so it no longer asks the transport about acknowledgment.quic::web::send::Stream):type Offsetis the driver'ssend::Offset, andpoll_ackedforwards to new crate-private driver methods. Offsets count the WebTransport header, and the writer maps them through its own byte count, so nothing needs adjusting. Once reset, a stream answers from the offset and acknowledged prefix it kept at the reset (Ended).send::Stream::poll_acked,send::Finished::poll_acked, andFinished::offsetare added, all crate-private. Bytes the peer acknowledged stay acknowledged; the rest fail with the peer's stop code or the connection's loss. A reset consumes the handle, so a handle never waits past one. moq-tokio checks for a foreign offset before taking the lock, and releases the lock before its oneunreachable!.type Offset = u64counts the bytes written. An offset is delivered once the reader has taken those bytes. A reset or stop fails the bytes not yet taken, and bytes taken before the reset still count.Acked::Unsupported, so its egress bills the bytes it accepted (decided 2026-11-15).poll_acked, and it points atBilling's per-frame offsets.Impact
moq-net(breaking):transport::poll::SendStream::{acknowledged, delivered, poll_delivered}are removed. Migration:type Offset,offset(), andpoll_acked. Otherwise it keepstype Offset = ()and the default, which reportsAcked::Unsupported.delivered()mintsoffset()after writing and awaitspoll_acked(waiter, &offset).acknowledged()becomespoll_ackedat the currentoffset(), ready withAcked::Delivered.moq-net(breaking):transport::memory::SendStream'sOffsetchanges from()tou64, and it implementspoll_acked.moq-tokio,moq-uring(breaking):quic::web::send::Streamloses the three methods. ItsOffsetchanges from()to the driver'ssend::Offset, and it implementspoll_acked.qmux(breaking):SendStreamloses the three methods.bytes/framesbill as before once the stream finishes. A reset bills each frame whose end the peer acknowledged before it, plus the acknowledged part of a frame still being written when a park asked about it. Bytes acknowledged after the last offset asked about stay unbilled; that is at most one frame, measured below. A STOP_SENDING bills, the same way, what the peer acknowledged before it: the drivers answerpoll_ackedfrom the acknowledged prefix even though moq-quic fails the wait once the peer stops reading. Over qmux, egress bills the bytes the stream accepted, not what the link took.Alternatives
Deliveryalready keeps one entry per waiting frame.Decisions
Taken while the maintainer was away; each can be undone in review.
Endedto answer from without anOptionorexpect. That is one extra driver lock per opened stream.Waitingdecision on whether to do it at all.Acked::Unsupportedas not acknowledged, as the old== Some(true)did.OpenStream.acknowledged()stays. It belongs to JS's own open listing, not a transport trait, and is now only read by tests.Validation
just checkpassed, includingtest rs: moq-net 3385 lib tests plus integration, moq-tokio, moq-uring, and qmux.writer::egress_bills_acknowledged_payload, andwriter::egress_bills_taken_payload_without_acknowledgmentsfor the unsupported fallback.memory::an_offset_is_acknowledged_once_the_reader_takes_it.web::session::an_offset_stays_acknowledged_through_a_resetandan_offset_stays_acknowledged_through_a_stop, over raw QUIC and WebTransport. The stop test fails without the review fix (Ready(Err(Stopped(3)))).web::an_offset_stays_acknowledged_through_a_reset, which ran on this host rather than skipping.moqt://andhttps://. So QUIC egress bills on acknowledgment; billing the bytes taken would have billed all 40 at once.Writer(bottleneck rate, RTT, unbounded send buffer, 20.8 kB frames) and reset the stream at 68 points across each run. The table reports payload acknowledged before the reset but not billed:main. The extra is the minted offset: one transport lock plus oneBoxin the boxed layer per frame. One outstanding offset costs the same in this loop, because acknowledgments keep up and both policies mint once per frame; per-frame minting adds offsets only while acknowledgments lag.Follow-ups
Models
Size: M
Implementer: Claude Code, claude-opus-5-5, unknown effort (arm B)
(Written by Claude Opus 5.5)
🤖 Generated with Claude Code
Review
Rewritten by
quest reviewafter each round.Head: 663c204
Base: origin/main at 0e6e469
Risk: high,
The change affects customer billing accounting, where incorrect delivery counts could lose billable usage that a revert cannot recover.Classified: medium by default
Reviewer: Codex, gpt-6.1-sol, high effort
Session:
01a1dfd9-b5ee-7d93-bb9f-a5de65df51a2, round 2Score: 10/10,
Both adapters now preserve acknowledged offsets after STOP_SENDING, and the incremental changes introduce no further findings; builds and tests were not run.Raised the risk to high:
The change affects customer billing accounting, where incorrect delivery counts could lose billable usage that a revert cannot recover.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 86dc9bd:
rs/moq-net/src/coding/writer.rs:425:Preserve acknowledged payload when the peer stops the stream;Both drivers now return success when acked_len() covers the requested offset despite a failed acknowledgment wait, preserving the acknowledged prefix after STOP_SENDING.