Repository navigation
chore(release): 0.27.61 - #334
Merged
Merged
Conversation
…331) * fix: accept reordered reads, legal datagrams, and contiguous chunks read_to_end only extended the last buffered entry, so gap-filling out-of-order chunks hit the 4096-entry cap and returned TooLong. Datagram receive treated payload plus in-memory overhead as a protocol violation against the advertised limit, closing the connection on a legal frame. Stream compaction left chunks above the retention cutoff unmerged, so a contiguous 1200/1/1 pattern exceeded MAX_CHUNKS and closed with INTERNAL_ERROR. Merge read_to_end entries by offset on either side and apply the cap after merging. Compare datagram payloads with the advertised limit and charge overhead only when evicting. If compaction is still over the chunk cap, merge every contiguous run before rejecting. Co-authored-by: David Irvine <dirvine@users.noreply.github.com> * fix: make read_to_end prepend amortised O(new bytes) Store coalesced entries as VecDeque so descending STREAM chunks cannot force O(n²) suffix copies. Bound the observed span with the global end, and add copy-cost plus span regression tests. Co-authored-by: Cursor <cursoragent@cursor.com> * fix: merge smaller StoredRun into larger for O(min) absorb Reverse pairwise gap-filling could copy N*(N-2)/4 bytes with only two entries because absorb_following always appended right into left. Route bulk stored moves through StoredRun helpers that always charge copies, merge the smaller run into the larger, and add an N=8000 reverse-pairwise regression that fails on the old always-append-right path. Co-authored-by: Cursor <cursoragent@cursor.com> * test: harden recv copy-cost guards and n1 opposite fixture Catch silent prepend rebuilds via test allocator bounds, and keep H open while parked so opposite-winner setup cannot lose to Timing::fast quiet. Co-authored-by: Cursor <cursoragent@cursor.com> * test: hold B inbounds in raw_winner_adoption_is_reader_only An A→B inbound during the settle sleep was racing accept → register_connected_peer, recording an outer peer and superseding C_B. Park inbounds for the observation window and surface lifecycle/outer diagnostics on failure. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: David Irvine <dirvine@users.noreply.github.com> (cherry picked from commit 3d74020) Conflicts (test modules and CHANGELOG only): release/0.27.60 does not carry the held-back regression tests that #329 added on master, and #331 appended its new tests after them. Kept only the tests #331 adds; dropped #331's edits to three #329 read_to_end tests that are not on this branch. CHANGELOG keeps only the #331 entries.
0.27.x release line, from v0.27.60. Contents (#331): - read_to_end merges a delivered chunk with neighbours on either side, so a reordered contiguous stream is one entry; the 4096-entry cap is applied after merging, and merges do not recopy the bytes already buffered. - Datagrams: the protocol check compares the payload with the advertised max_datagram_frame_size; per-datagram overhead is charged only on eviction. - Stream reassembly: when compaction still leaves more than 1024 chunks, every contiguous run is merged before the stream is rejected.
…RFC 9221 §3) RFC 9221 §3 bounds the whole DATAGRAM frame (type, optional length and payload) by max_datagram_frame_size, and a value of 0 means no support. The receive check compared only the payload with datagram_receive_buffer_size, so a frame up to 9 bytes over the advertised limit was accepted, Some(0) accepted empty datagrams, and a receive buffer above 65535 accepted frames larger than the u16-capped value we advertise. The frame decoder now records each DATAGRAM frame's encoded length. DatagramState::received compares it with the advertised limit (min(window, u16::MAX)) and rejects every DATAGRAM frame when the limit is 0. Send side: max_size() already subtracts the 9-byte frame bound, so for peer limits >= 9 our frames always fit. For a peer limit of 0 or 1 it returned Some(0) and let an empty 2-byte frame go out; it now returns None (UnsupportedByPeer), so a strict receiver never sees one from us. Tests: frames over the limit with payloads that fit (both frame forms), a non-minimal length varint, the u16 cap, Some(0) with an empty datagram, frames exactly at the limit, and an end-to-end check that a peer limit of 0 disables send. (cherry picked from commit 2decc22) Conflicts (src/connection/datagrams.rs, tests only): release/0.27.61 does not carry the #329 test helper test_push_outgoing or the held-back peer_zero_length_datagram_flood_is_bounded test. Kept the new doc line and new tests; dropped the received() call-site update inside that absent test. The CHANGELOG entry lands in the 0.27.61 Fixed section.
Merged
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.
Summary
Release prep for ant-quic 0.27.61 on the 0.27.x line, from v0.27.60 (
ea64efc5). Baserelease/0.27.61is v0.27.60's commit, unchanged.Commits:
fb6954b3— cherry-pick of fix: accept reordered reads, legal datagrams, and contiguous chunks #331 (squash3d740201): receive-path fixes.read_to_endmerges a delivered chunk with neighbours on either side, so a reordered contiguous stream is one entry; the 4096-entry cap is applied after merging, and merges do not recopy already-buffered bytes.max_datagram_frame_size; per-datagram overhead is charged only when evicting.e0c8acbd— version 0.27.60 → 0.27.61 (Cargo.toml,Cargo.lock) and the CHANGELOG[0.27.61]section.Cherry-pick conflicts
Conflicts were in test modules and CHANGELOG only (
assembler.rs,datagrams.rs,recv_stream.rs,CHANGELOG.md).release/0.27.60does not carry the held-back regression tests that #329 added on master, and #331 appended its tests after them. Resolution: keep only the tests #331 adds; drop #331's edits to three #329read_to_endtests (read_to_end_coalesces_adjacent_chunks,read_to_end_caps_entry_count_across_gaps,read_to_end_coalesced_entries_assemble_correctly) that are not on this branch. Non-test code applied cleanly. CHANGELOG keeps only the #331 entries (not master's #329 / Cargo.lock / #316 / #317 notes).Not done here
No tag, publish, or merge. Tagging
v0.27.61after merge firesrelease.yml.

Confidence Score: 5/5
The PR appears safe to merge; no actionable issues were found.Summary
Prepares
ant-quic0.27.61 with receive-path fixes and regression coverage.read_to_endjoins reordered chunks without wasting its entry limit.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Delivered stream chunk] --> B[Check full observed span] B -->|Within size limit| C[Join touching stored runs] B -->|Too large| D[Return TooLong] C --> E[Check remaining entry count] E -->|Within cap| F[Wait for more data or assemble at EOF] E -->|Above cap| DReviews (1) · Last reviewed commit: "release: ant-quic 0.27.61" · Reviewed by Greptile