moq-lite-05: encode Hop ID as fixed-width 64-bit integer#33
Conversation
Hop IDs are random, so a varint would almost never be shorter than its fixed-width equivalent. Switch Hop ID (ANNOUNCE, ANNOUNCE_OK) and Exclude Hop (ANNOUNCE_INTEREST) from varint to a fixed 64-bit encoding, which also recovers the 2 bits a 62-bit varint would have cost. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
WalkthroughThe 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches✨ Simplify code
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 |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
draft-lcurley-moq-lite.md (1)
627-714:⚠️ Potential issue | 🟠 MajorReconcile Hop ID encoding with draft-lcurley-moq-relay-hops.md.
The changes in this PR switch Hop ID encoding from variable-length to fixed-width 64-bit in three places: ANNOUNCE_INTEREST's Exclude Hop, ANNOUNCE_OK, and ANNOUNCE. However, draft-lcurley-moq-relay-hops.md defines the same Hop ID fields using variable-length integer encoding (vi64) in both HOP_PATH and EXCLUDE_HOP parameters, and references the 62-bit varint maximum as the limit for randomly-assigned Hop IDs.
These specs define overlapping functionality with incompatible wire encodings for the same semantic concept. If they are intended to work together or describe related extension points in the MoQ stack, the Hop ID encoding must be aligned. If they are independent specifications, this should be documented to avoid confusion.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@draft-lcurley-moq-lite.md` around lines 627 - 714, The Hop ID encoding is inconsistent between this specification and draft-lcurley-moq-relay-hops.md. This document specifies Hop IDs as fixed-width 64-bit integers in three places: the Exclude Hop field in ANNOUNCE_INTEREST, the Hop ID field in ANNOUNCE_OK, and the Hop ID fields in ANNOUNCE. However, draft-lcurley-moq-relay-hops.md defines HOP_PATH and EXCLUDE_HOP parameters using variable-length integer encoding (vi64). To fix this, either align the Hop ID encoding between both specifications by choosing one approach and updating both documents accordingly, or add clear documentation explaining that these specifications are independent and how the Hop ID concepts relate to each other despite the different encodings.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@draft-lcurley-moq-lite.md`:
- Around line 627-714: The Hop ID encoding is inconsistent between this
specification and draft-lcurley-moq-relay-hops.md. This document specifies Hop
IDs as fixed-width 64-bit integers in three places: the Exclude Hop field in
ANNOUNCE_INTEREST, the Hop ID field in ANNOUNCE_OK, and the Hop ID fields in
ANNOUNCE. However, draft-lcurley-moq-relay-hops.md defines HOP_PATH and
EXCLUDE_HOP parameters using variable-length integer encoding (vi64). To fix
this, either align the Hop ID encoding between both specifications by choosing
one approach and updating both documents accordingly, or add clear documentation
explaining that these specifications are independent and how the Hop ID concepts
relate to each other despite the different encodings.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: c727b2e6-24a5-45bb-af9b-f3e26414e78f
📒 Files selected for processing (1)
draft-lcurley-moq-lite.md
Keep Hop ID as a varint (moqt KVPs are varint-native and support the full 64-bit range), correcting the stale "62-bit varint maximum" wording. No wire or IANA change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Hop IDs are randomly assigned, so a variable-length integer would almost never be shorter than its fixed-width equivalent.
moq-lite-05
Switches Hop ID from a 62-bit varint to a fixed-width 64-bit integer, which also recovers the 2 bits a varint would have cost. Changed in three places (all carry/compare Hop ID values):
Hop ID→(64)Hop ID ...list →(64)Exclude Hop→(64)(matched against Hop ID entries)Plus rationale prose and a moq-lite-05 changelog entry.
moq-relay-hops (moqt extension)
Left as a varint — moqt Key-Value-Pairs are varint-native and support the full 64-bit range, so there's no framing benefit to a fixed-width field. Only corrects the stale "62-bit varint maximum" wording to 64-bit. No wire or IANA change.
Both drafts validate (kramdown-rfc + xml2rfc OK).
🤖 Generated with Claude Code