Skip to content

moq-lite-05: encode Hop ID as fixed-width 64-bit integer#33

Merged
kixelated merged 3 commits into
mainfrom
hop-id-64bit
Jun 19, 2026
Merged

moq-lite-05: encode Hop ID as fixed-width 64-bit integer#33
kixelated merged 3 commits into
mainfrom
hop-id-64bit

Conversation

@kixelated

@kixelated kixelated commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

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):

  • ANNOUNCE_OK Hop ID(64)
  • ANNOUNCE Hop ID ... list → (64)
  • ANNOUNCE_INTEREST 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

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>
@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 77e9e0eb-2a05-4f7f-9ee6-b4797042cff3

📥 Commits

Reviewing files that changed from the base of the PR and between 5c2c0a6 and 193309b.

📒 Files selected for processing (2)
  • CLAUDE.md
  • draft-lcurley-moq-relay-hops.md
✅ Files skipped from review due to trivial changes (1)
  • draft-lcurley-moq-relay-hops.md

Walkthrough

The draft-lcurley-moq-lite.md document is updated to change the wire encoding of hop-related identifier fields from variable-length integers to fixed-width 64-bit integers. In ANNOUNCE_INTEREST, Exclude Hop is changed to (64). In ANNOUNCE_OK, the publisher's Hop ID field becomes Hop ID (64) with revised prose noting random assignment as the rationale for fixed-width encoding. In ANNOUNCE, the repeated Hop ID list element type changes from (i) to (64), and its description is updated accordingly. The moq-lite-05 changelog entry is revised to reflect all three changes. The draft-lcurley-moq-relay-hops.md Hop ID generation recommendation is updated from 62-bit to 64-bit varint maximum. Contributor guidance in CLAUDE.md is expanded to require changelog documentation when making wire-format or semantic changes.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: encoding Hop ID as fixed-width 64-bit integer in moq-lite-05, which is the primary focus of the pull request.
Description check ✅ Passed The description clearly explains the rationale for the change, details the affected protocol fields, and distinguishes between moq-lite-05 and moq-relay-hops changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch hop-id-64bit

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 | 🟠 Major

Reconcile 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

📥 Commits

Reviewing files that changed from the base of the PR and between 3e36aa8 and 5c2c0a6.

📒 Files selected for processing (1)
  • draft-lcurley-moq-lite.md

@kixelated kixelated changed the title moq-lite-05: encode Hop ID as fixed-width 64-bit integer Encode Hop ID as fixed-width 64-bit integer (moq-lite + relay-hops) Jun 18, 2026
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>
@kixelated kixelated changed the title Encode Hop ID as fixed-width 64-bit integer (moq-lite + relay-hops) moq-lite-05: encode Hop ID as fixed-width 64-bit integer Jun 18, 2026
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kixelated kixelated merged commit 0a66e5c into main Jun 19, 2026
2 checks passed
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