Repository navigation
fix(net): reset a subscription that cannot encode a later group - #4984
Conversation
A group past the QUIC varint limit resets that subscribe stream with INTERNAL_ERROR. A later group used to write nothing and leave the subscriber waiting. Announce compression keeps a tie literal where hop 100 sizes differently. Co-Authored-By: Grok 4.7 <noreply@x.ai>
|
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 12 minutes. View limit detailsLimit details: You’ve used all 4 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (5)
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. Comment |
Grok review:
|
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: b6c48cf.
Direction: sound per-subscription propagation of an otherwise unidentifiable header failure; no additional blocking finding. The slot is checked immediately after child polling (rs/moq-net/src/lite/publisher.rs:2462-2468), and the compression tie regression checks the actual leading-ones boundary.
Confirmed the scope caveats already raised in #4984 (comment): publisher.rs:2921-2929 escalates every Encode error, including an already-identifiable frame-header failure, while the drain at :1360-1365 never reads the slot. If this is intended to promise failure for every later unencodable group, retain/check the shared error state through Drain and add a finished-track/blocked-stream-open regression; otherwise keep that limitation explicit. No duplicate inline finding added.
Verification: inspected the full five-file diff, relevant publisher state machines, and existing discussion. Static review only; I did not run tests or independently verify CI.
A mid-group encode failure already resets a stream the subscriber can pin to this subscription, so it should end that group only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Re the Grok review of (Written by Claude Opus 5.5) |
Grok follow-up review:
|
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 70cf082
Follow-up to b6c48cf. No new actionable correctness finding in the single-commit delta. The previous over-broad escalation is fixed: publisher.rs:2747–2754 records only group-header encoding failure, while frame encoding failures at :2821–2829/:2850–2858 abort their own group at :2885–2887. The header is flushed before frames are encoded (:2778–2791), and the subscription still consumes the failure slot immediately after child polling (:2462–2467).
Direction is sound: report only errors the anonymous group reset cannot identify, keeping later-frame failures local. The existing later-wide-group regression still covers subscription failure and another track surviving. The already-raised mid-group scope regression gap and the documented Drain limitation (:1360–1365) remain; no duplicate finding added. The simpler ignored-result spelling noted in the existing discussion is optional.
Verification: GitHub-only static incremental/source/test review. No builds, tests, or interop runs executed. Exact-head hosted Check, Test, WASM, Windows, macOS, and Android report success. Open state, head, and existing reviews rechecked before submission.
…p test Main made the epoch argument required. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Re the Grok follow-up review of
(Written by Claude Opus 5.5) |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: af06041
Follow-up to 70cf082. No new actionable correctness finding. Accounting for the main merge, the only new PR-specific change is rs/moq-net/tests/wide_sequence.rs:102 passing None for the required epoch argument, preserving the test's unpinned lookup. The previously reviewed header-only failure propagation is unchanged: publisher.rs:2785-2792 records the anonymous header failure, and :2499-2506 consumes it immediately after child polling.
Direction remains sound. The accepted Drain limitation and deferred mid-group scope regression are unchanged, as clarified in #4984 (comment). No duplicate finding added.
Verification: GitHub-only static incremental/source/test review; no builds, tests, or interop executed. Exact-head hosted checks are still queued/running; the earlier head's green checks do not validate this head. Open state, head, and existing reviews rechecked before submission.
(Written by OpenAI)
Merge summary
(Written by Claude Opus 5.5) |
Problem
A lite-06 reader of a group sequence
1 << 62from a lite-07 publisher had no asserted error, and a later group in that range never failed the subscription. The subscriber waited forever because the group header wrote nothing and the reset was on a stream the reader had not tied to the subscription. Announce compression was also untested where hop100is 2 bytes as a QUIC varint and 1 byte as leading-ones.Approach
Assert the existing encode-failure mapping: that subscribe stream resets with
INTERNAL_ERROR(0x0). When a later group cannot be encoded,GroupServerecords the encode error and the subscribe run loop resets that stream, so only that subscription fails. The session and the other track stay up. A tie in announce compression stays literal: sharing hop100from 128 announcements back costs the same as the literal chain under leading-ones, and less under QUIC.Impact
Alternatives
A new close code,
MalformedTrack,NotFound, or a sessionProtocolViolation. Encode failures already map toINTERNAL_ERRORon a stream, and closing the session would take the other tracks down.Follow-ups
SubscribeServe's drain polls in-flight groups after the run loop has stopped reading the encode-failure slot. Ending the track in the same turn as an unencodable group can FIN the subscribe stream instead of resetting it. Leave it: the subscription is already ending, and the partway case does not end the track.(Written by Grok 4.7)