Skip to content

chore(release): 0.27.61 - #334

Merged
dirvine merged 3 commits into
release/0.27.61from
prep/0.27.61
Oct 17, 2026
Merged

dirvine merged 3 commits into
release/0.27.61from
prep/0.27.61

Conversation

@dirvine

@dirvine dirvine commented Oct 17, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Release prep for ant-quic 0.27.61 on the 0.27.x line, from v0.27.60 (ea64efc5). Base release/0.27.61 is v0.27.60's commit, unchanged.

Commits:

  1. fb6954b3 — cherry-pick of fix: accept reordered reads, legal datagrams, and contiguous chunks #331 (squash 3d740201): receive-path fixes.
    • 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 already-buffered bytes.
    • Datagrams: the protocol check compares the payload with the advertised max_datagram_frame_size; per-datagram overhead is charged only when evicting.
    • Stream reassembly: if compaction still leaves more than 1024 chunks, every contiguous run is merged before the stream is rejected.
  2. 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.60 does 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 #329 read_to_end tests (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.61 after merge fires release.yml.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

Prepares ant-quic 0.27.61 with receive-path fixes and regression coverage.

  • read_to_end joins reordered chunks without wasting its entry limit.
  • The stream assembler merges contiguous chunks before rejecting a full buffer.
  • Datagrams at the advertised payload limit are accepted.
  • Peer-connection tests hold competing events back during setup.
  • The package metadata and changelog now identify release 0.27.61.

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| D
Loading

Reviews (1) · Last reviewed commit: "release: ant-quic 0.27.61" · Reviewed by Greptile

…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.
@dirvine
dirvine merged commit 6fe2a52 into release/0.27.61 Oct 17, 2026
2 checks passed
@dirvine dirvine mentioned this pull request Nov 3, 2026
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

⌂ 换网址