Skip to content

Comments

moq-lite-03#15

Merged
kixelated merged 12 commits intomainfrom
moq-lite-03
Feb 25, 2026
Merged

moq-lite-03#15
kixelated merged 12 commits intomainfrom
moq-lite-03

Conversation

@kixelated
Copy link
Collaborator

No description provided.

kixelated and others added 3 commits January 10, 2026 21:11
Replace SETUP handshake with ALPN-based version negotiation (moq-lite-xx).
Add FETCH stream for single group download, PROBE stream for bitrate
measurement, start/end group ranges to subscriptions, and GROUP_DROP
for indicating unavailable groups. Unknown stream types are now non-fatal
to enable extension negotiation via stream probing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@claude
Copy link
Contributor

claude bot commented Feb 24, 2026

Claude finished @kixelated's task —— View job


Pull Request Review

Reviewing PR #15: MOQ Lite Draft-03 updates

Todo List:

  • Read and analyze the changed draft document
  • Review protocol specification changes for technical accuracy
  • Check document formatting and structure
  • Verify references and citations
  • Provide comprehensive feedback

Remove Instant Delta from FRAME and the Instant section from Delivery.
Expiration is now based on when the first byte of a group arrives
rather than per-frame instant values.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@claude
Copy link
Contributor

claude bot commented Feb 24, 2026

Claude finished @kixelated's task —— View job


Pull Request Review

Reviewing PR #15: MOQ Lite Draft-03 updates

Todo List:

  • Read and analyze the changed draft document
  • Review protocol specification changes for technical accuracy
  • Check document formatting and structure
  • Verify references and citations
  • Provide comprehensive feedback on code quality, bugs, performance, security, and test coverage

Protocol Specification Review

This PR introduces significant improvements to the MOQ Lite Draft-03 specification. Here's my comprehensive analysis:

Protocol Design Quality

Strengths:

  • ALPN Handshake (draft-lcurley-moq-lite.md:78-80): Excellent decision to move version negotiation to ALPN (moq-lite-03), eliminating complex handshake messages
  • Stream-based Architecture (draft-lcurley-moq-lite.md:165-167): Clean separation using bidirectional streams for control and unidirectional for data
  • Extension Negotiation (draft-lcurley-moq-lite.md:83-84): Smart approach using stream probing for extension discovery rather than complex parameter negotiation

Technical Correctness

New Features Analysis:

  1. FETCH Stream (draft-lcurley-moq-lite.md:217-225): HTTP-like single request/response model is well-designed and addresses use cases for random access
  2. GROUP_DROP (draft-lcurley-moq-lite.md:525-546): Essential for handling unavailable groups with proper error codes
  3. PROBE Stream (draft-lcurley-moq-lite.md:226-234): Bitrate measurement capability addresses congestion control needs

Priority System (draft-lcurley-moq-lite.md:243-297): The dual priority system (subscriber + publisher) with concrete examples (lines 260-285) is well-architected for relay scenarios.

Potential Issues ⚠️

  1. Expiration Logic (draft-lcurley-moq-lite.md:310-316):

    • Arrival timestamp-based expiration may cause issues with clock skew
    • Recommendation: Consider adding guidance on clock synchronization or use relative timestamps
  2. Stream Management (draft-lcurley-moq-lite.md:145-159):

    • Half-close handling requires both endpoints to coordinate close operations
    • Risk: Potential for resource leaks if peers don't cooperate
    • Recommendation: Add timeout guidelines for forced cleanup
  3. Group Sequence Gaps (draft-lcurley-moq-lite.md:607-608):

    • Specification says to "handle gaps" but doesn't specify how
    • Recommendation: Add guidance on gap detection and recovery strategies

Performance Considerations

  • Flow Control: Proper use of QUIC stream resets for expired groups prevents flow control blocking
  • Prioritization: Two-tier priority system enables effective resource allocation during congestion
  • Parallel Delivery: Multiple group streams enable out-of-order delivery for latency optimization

Security Analysis

  • No Credential Exposure: Payload is opaque; no secrets in protocol headers
  • Resource Protection: Message length prefixes prevent buffer overflow attacks
  • Extension Safety: Unknown streams reset gracefully without fatal errors

Message Encoding Quality

  • Consistency: All messages use variable-length prefixes with consistent structure
  • Extensibility: Length-prefixed design allows future field additions
  • Efficiency: Compact encoding with appropriate use of variable-length integers

Documentation Quality

  • Clear Examples: Priority scenarios (lines 260-285) effectively illustrate complex behavior
  • Comprehensive Changelog: Detailed comparison with upstream (lines 627-692)
  • Implementation Guidance: Clear SHOULD/MUST/MAY usage following RFC 2119

Minor Format Issues 📝

  1. Table Formatting (draft-lcurley-moq-lite.md:173-183): Stream type table could use consistent spacing
  2. TODO Sections (draft-lcurley-moq-lite.md:717, 730): Security considerations and acknowledgments need completion

Overall Assessment

This is a high-quality protocol specification that successfully simplifies MoqTransport while maintaining essential functionality. The technical changes are well-reasoned, the new features address real-world needs, and the documentation is thorough.

Recommendation: ✅ APPROVE - This draft represents significant improvement over previous versions and is ready for implementation and testing.

Key Improvements in Draft-03:

  • Simplified handshake via ALPN
  • Added essential FETCH and PROBE capabilities
  • Improved subscription lifecycle management
  • Better expiration and prioritization mechanisms

Expiration is computed by comparing a group's arrival time to the
latest group's arrival time. A group is never expired until a newer
group (by sequence number) exists.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@claude
Copy link
Contributor

claude bot commented Feb 24, 2026

Claude finished @kixelated's task —— View job


Pull Request Review

Reviewing PR #15: MOQ Lite Draft-03 updates

Todo List:

  • Read and analyze the changed draft document
  • Review protocol specification changes for technical accuracy
  • Check document formatting and structure
  • Verify references and citations
  • Assess security considerations
  • Evaluate performance implications
  • Provide comprehensive feedback on code quality, bugs, performance, security, and test coverage

Protocol Specification Review

This PR introduces significant improvements to the MOQ Lite Draft-03 specification. Here's my comprehensive analysis:

Protocol Design Quality

Strengths:

  • ALPN Handshake (draft-lcurley-moq-lite.md:78-80): Excellent decision to move version negotiation to ALPN (moq-lite-03), eliminating complex handshake messages and reducing connection setup complexity
  • Stream-based Architecture (draft-lcurley-moq-lite.md:165-167): Clean separation using bidirectional streams for control and unidirectional for data provides clear message flow boundaries
  • Extension Negotiation (draft-lcurley-moq-lite.md:83-84): Smart approach using stream probing for extension discovery rather than complex parameter negotiation - graceful degradation via stream resets

Technical Correctness

New Features Analysis:

  1. FETCH Stream (draft-lcurley-moq-lite.md:217-225): HTTP-like single request/response model is well-designed and addresses use cases for random access content retrieval
  2. GROUP_DROP (draft-lcurley-moq-lite.md:525-546): Essential for handling unavailable groups with proper error codes and range specification
  3. PROBE Stream (draft-lcurley-moq-lite.md:226-234): Bitrate measurement capability addresses congestion control needs for adaptive streaming

Priority System (draft-lcurley-moq-lite.md:243-297): The dual priority system (subscriber + publisher) with concrete examples (lines 260-285) is well-architected for relay scenarios where conflicts can occur.

Potential Issues ⚠️

  1. Expiration Logic (draft-lcurley-moq-lite.md:310-316):

    • Arrival timestamp-based expiration may cause issues with clock skew between endpoints
    • Recommendation: Consider adding guidance on clock synchronization or use relative timestamps based on sequence numbers
  2. Stream Management (draft-lcurley-moq-lite.md:145-159):

    • Half-close handling requires both endpoints to coordinate close operations
    • Risk: Potential for resource leaks if peers don't cooperate on stream termination
    • Recommendation: Add timeout guidelines for forced cleanup after graceful close attempts
  3. Group Sequence Gaps (draft-lcurley-moq-lite.md:607-608):

    • Specification says subscribers "MUST handle gaps" but doesn't specify how
    • Recommendation: Add guidance on gap detection strategies and recovery mechanisms
  4. Message Length Security (draft-lcurley-moq-lite.md:342-347):

    • While length-prefixed messages are good for framing, consider maximum message size limits
    • Recommendation: Specify reasonable upper bounds to prevent resource exhaustion attacks

Performance Considerations

  • Flow Control: Proper use of QUIC stream resets for expired groups prevents flow control window blocking
  • Prioritization: Two-tier priority system enables effective resource allocation during network congestion
  • Parallel Delivery: Multiple group streams enable out-of-order delivery for latency optimization
  • Bandwidth Probing: PROBE stream allows adaptive bitrate control

Security Analysis

  • No Credential Exposure: Payload is opaque; no secrets exposed in protocol headers
  • Resource Protection: Message length prefixes prevent buffer overflow attacks
  • Extension Safety: Unknown streams reset gracefully without fatal connection errors
  • Stream Isolation: Each subscription/group uses separate streams, limiting blast radius of issues

Security Concerns:

  • Resource Exhaustion: No explicit limits on subscription count or concurrent streams
  • Amplification: PROBE stream could potentially be abused for traffic amplification
  • Note: Security Considerations section (line 714-715) is marked as TODO and needs completion

Message Encoding Quality

  • Consistency: All messages use variable-length integer prefixes with consistent structure
  • Extensibility: Length-prefixed design allows future field additions without breaking compatibility
  • Efficiency: Compact encoding with appropriate use of variable-length integers for scalability

Documentation Quality

  • Clear Examples: Priority scenarios (lines 260-285) effectively illustrate complex conferencing behavior
  • Comprehensive Changelog: Detailed comparison with upstream MoqTransport (lines 627-692)
  • Implementation Guidance: Clear SHOULD/MUST/MAY usage following RFC 2119 conventions
  • Architectural Context: Good explanation of rationale and relationship to MoqTransport

Format and Structure Issues 📝

  1. Table Formatting (draft-lcurley-moq-lite.md:173-183): Stream type table could use consistent spacing for better readability
  2. TODO Sections:
    • Security Considerations (line 715) needs completion
    • Acknowledgments section (line 728) needs completion
  3. Reference Consistency: IETF draft references are properly formatted

Test Coverage Considerations 📋

Since this is a protocol specification rather than implementation:

  • Interoperability: Consider test vectors for message encoding/decoding
  • Edge Cases: Document expected behavior for malformed messages and connection failures
  • Conformance: Clear success/failure criteria for implementation testing

Overall Assessment

This is a high-quality protocol specification that successfully simplifies MoqTransport while maintaining essential functionality for real-time media delivery. The technical changes are well-reasoned, the new features address real-world deployment needs, and the documentation is thorough and implementer-friendly.

Recommendation: ✅ APPROVE - This draft represents significant improvement over previous versions and is ready for implementation and testing.

Key Improvements in Draft-03:

  • Simplified handshake via ALPN negotiation
  • Added essential FETCH and PROBE capabilities for complete feature set
  • Improved subscription lifecycle management with proper termination handling
  • Better expiration and prioritization mechanisms for congestion scenarios
  • Cleaner stream-based architecture with explicit message boundaries

Minor Action Items:

  • Complete Security Considerations section
  • Add implementation guidance for gap handling
  • Consider adding resource limit recommendations

Replace start/end group with Group Sequence + Group Count for fewer
bytes on the wire. Count of 0 means unbounded.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@claude
Copy link
Contributor

claude bot commented Feb 24, 2026

Claude finished @kixelated's task —— View job


Pull Request Review

Reviewing PR #15: MOQ Lite Draft-03 updates

Todo List:

  • Read and analyze the changed draft document
  • Review protocol specification changes for technical accuracy
  • Check document formatting and structure
  • Verify references and citations
  • Assess security considerations
  • Evaluate performance implications
  • Provide comprehensive feedback on specification quality

Comprehensive Protocol Specification Review

This PR introduces significant improvements to the MOQ Lite Draft-03 specification. Based on my analysis of the 266 additions and 115 deletions, here's my comprehensive review:

Major Protocol Changes

  1. ALPN-Based Handshake (draft-lcurley-moq-lite.md:78-80):

    • Excellent simplification moving version negotiation to ALPN (moq-lite-03)
    • Eliminates complex handshake messages and reduces connection setup overhead
    • Clean, deterministic version negotiation
  2. Stream-Based Architecture (draft-lcurley-moq-lite.md:165-167):

    • Clear separation: bidirectional for control, unidirectional for data
    • Proper stream lifecycle management with termination semantics (lines 145-159)
    • Extension negotiation via stream probing (line 84) is elegant and graceful
  3. New FETCH Stream (draft-lcurley-moq-lite.md:217-225):

    • HTTP-like single request/response model addresses random access needs
    • Clean design for on-demand content retrieval
    • Proper error handling via stream resets
  4. GROUP_DROP Mechanism (draft-lcurley-moq-lite.md:525-546):

    • Essential for handling unavailable content with proper error codes
    • Range-based dropping is efficient for gaps
    • Good separation between error conditions (code 0 = unavailable, non-zero = error)
  5. PROBE Stream (draft-lcurley-moq-lite.md:226-234):

    • Addresses congestion control and adaptive bitrate needs
    • Simple bitrate measurement interface
    • Graceful degradation if unsupported

Technical Quality Assessment

Protocol Design Strengths:

  • Priority System (draft-lcurley-moq-lite.md:260-285): Dual priority (subscriber + publisher) with concrete conferencing examples effectively handles relay conflicts
  • Message Encoding (draft-lcurley-moq-lite.md:342-347): Consistent variable-length prefixes, extensible length-prefixed design
  • Stream Management: Clear termination semantics prevent resource leaks
  • Expiration Logic (draft-lcurley-moq-lite.md:310-316): Arrival timestamp-based with proper flow control protection

Performance Considerations:

  • Out-of-order group delivery enables latency optimization during congestion
  • Flow control protection via stream resets for expired content
  • Parallel transmission of multiple groups across separate streams
  • Effective prioritization during network degradation

Potential Issues ⚠️

  1. Clock Synchronization (draft-lcurley-moq-lite.md:312-313):

    • Arrival timestamp-based expiration may have issues with clock skew
    • Recommendation: Consider relative timestamps or clock sync guidance
  2. Gap Handling (draft-lcurley-moq-lite.md:607-608):

    • Specification requires gap handling but lacks implementation guidance
    • Recommendation: Add detection and recovery strategies
  3. Resource Limits:

    • No explicit limits on subscription count or concurrent streams
    • Recommendation: Add guidance on reasonable implementation limits
  4. Incomplete Sections:

    • Security Considerations (line 715-716): Marked as TODO
    • Acknowledgments (line 727-729): Marked as TODO

Security Analysis

Positive Security Aspects:

  • Payload is opaque; no credential exposure in protocol headers
  • Length-prefixed messages prevent buffer overflow attacks
  • Stream isolation limits blast radius of issues
  • Unknown streams reset gracefully without fatal errors

Areas Needing Attention:

  • Resource exhaustion protection needs clarification
  • PROBE stream amplification potential should be addressed
  • Security Considerations section requires completion

Documentation Quality

Strengths:

  • Clear examples for complex scenarios (priority conflicts, lines 260-285)
  • Comprehensive changelog documenting all changes (lines 627-640)
  • Detailed upstream differences comparison (lines 649-692)
  • Proper RFC 2119 terminology usage (MUST/SHOULD/MAY)

Minor Format Issues:

  • Table alignment could be improved (lines 173-183)
  • Consistent spacing in stream type tables would enhance readability

Message Design Quality

  • Consistency: All control messages follow same variable-length pattern
  • Extensibility: Length-prefixed design allows future field additions
  • Efficiency: Appropriate use of variable-length integers
  • Clarity: Each message has clear purpose and well-defined fields

Test Coverage Considerations 📋

For protocol implementation testing:

  • Message encoding/decoding test vectors would be valuable
  • Edge case documentation (malformed messages, connection failures)
  • Interoperability test scenarios for different implementations

Overall Assessment

This is a high-quality protocol specification that successfully achieves its goal of simplifying MoqTransport while maintaining essential real-time media delivery capabilities. The technical changes are well-reasoned, new features address practical deployment needs, and the documentation is thorough.

Key Improvements in Draft-03:

  • Simplified handshake eliminates connection setup complexity
  • Complete feature set with FETCH and PROBE capabilities
  • Improved subscription lifecycle with proper termination
  • Better expiration and prioritization for congestion scenarios
  • Cleaner architecture with explicit message boundaries

Recommendation: ✅ APPROVE

This draft represents a significant improvement and is ready for implementation and testing.

Minor Action Items for Future Versions:

  • Complete Security Considerations section
  • Add implementation guidance for gap handling
  • Consider resource limit recommendations
  • Complete Acknowledgments section

Remove ANNOUNCE_INIT to simplify the protocol and avoid large messages.
The publisher now sends individual ANNOUNCE messages for all matching
broadcasts. Add Hops field to ANNOUNCE as a tiebreaker for multiple paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@claude
Copy link
Contributor

claude bot commented Feb 24, 2026

Claude finished @kixelated's task —— View job


Pull Request Review

Reviewing PR #15: MOQ Lite Draft-03 updates

Todo List:

  • Read repository instructions and context
  • Analyze the changed draft document
  • Review protocol specification changes for technical accuracy
  • Check document formatting and structure
  • Verify references and citations
  • Assess security considerations
  • Evaluate performance implications
  • Provide comprehensive feedback on specification quality

Comprehensive Protocol Specification Review

This PR introduces significant improvements to the MOQ Lite Draft-03 specification. Based on my analysis of the 279 additions and 155 deletions, here's my comprehensive review:

Major Protocol Changes

  1. ALPN-Based Handshake (draft-lcurley-moq-lite.md:78-80):

    • Excellent simplification moving version negotiation to ALPN (moq-lite-03)
    • Eliminates complex handshake messages and reduces connection setup overhead
    • Clean, deterministic version negotiation
  2. Stream-Based Architecture (draft-lcurley-moq-lite.md:165-167):

    • Clear separation: bidirectional for control, unidirectional for data
    • Proper stream lifecycle management with termination semantics (lines 145-159)
    • Extension negotiation via stream probing (line 84) is elegant and graceful
  3. New FETCH Stream (draft-lcurley-moq-lite.md:217-225):

    • HTTP-like single request/response model addresses random access needs
    • Clean design for on-demand content retrieval
    • Proper error handling via stream resets
  4. GROUP_DROP Mechanism (draft-lcurley-moq-lite.md:525-546):

    • Essential for handling unavailable content with proper error codes
    • Range-based dropping is efficient for gaps
    • Good separation between error conditions (code 0 = unavailable, non-zero = error)
  5. PROBE Stream (draft-lcurley-moq-lite.md:226-234):

    • Addresses congestion control and adaptive bitrate needs
    • Simple bitrate measurement interface
    • Graceful degradation if unsupported

Technical Quality Assessment

Protocol Design Strengths:

  • Priority System (draft-lcurley-moq-lite.md:260-285): Dual priority (subscriber + publisher) with concrete conferencing examples effectively handles relay conflicts
  • Message Encoding (draft-lcurley-moq-lite.md:342-347): Consistent variable-length prefixes, extensible length-prefixed design
  • Stream Management: Clear termination semantics prevent resource leaks
  • Expiration Logic (draft-lcurley-moq-lite.md:310-316): Arrival timestamp-based with proper flow control protection

Performance Considerations:

  • Out-of-order group delivery enables latency optimization during congestion
  • Flow control protection via stream resets for expired content
  • Parallel transmission of multiple groups across separate streams
  • Effective prioritization during network degradation

Potential Issues ⚠️

  1. Clock Synchronization (draft-lcurley-moq-lite.md:312-313):

    • Arrival timestamp-based expiration may have issues with clock skew
    • Recommendation: Consider relative timestamps or clock sync guidance
  2. Gap Handling (draft-lcurley-moq-lite.md:607-608):

    • Specification requires gap handling but lacks implementation guidance
    • Recommendation: Add detection and recovery strategies
  3. Resource Limits:

    • No explicit limits on subscription count or concurrent streams
    • Recommendation: Add guidance on reasonable implementation limits
  4. Incomplete Sections:

    • Security Considerations (line 689): Marked as TODO
    • Acknowledgments (line 702): Marked as TODO

Security Analysis

Positive Security Aspects:

  • Payload is opaque; no credential exposure in protocol headers
  • Length-prefixed messages prevent buffer overflow attacks
  • Stream isolation limits blast radius of issues
  • Unknown streams reset gracefully without fatal errors

Areas Needing Attention:

  • Resource exhaustion protection needs clarification
  • PROBE stream amplification potential should be addressed
  • Security Considerations section requires completion

Documentation Quality

Strengths:

  • Clear examples for complex scenarios (priority conflicts, lines 260-285)
  • Comprehensive changelog documenting all changes (lines 600-614)
  • Detailed upstream differences comparison (lines 625-664)
  • Proper RFC 2119 terminology usage (MUST/SHOULD/MAY)

Minor Format Issues:

  • Table alignment could be improved (lines 173-183)
  • Consistent spacing in stream type tables would enhance readability

Message Design Quality

  • Consistency: All control messages follow same variable-length pattern
  • Extensibility: Length-prefixed design allows future field additions
  • Efficiency: Appropriate use of variable-length integers
  • Clarity: Each message has clear purpose and well-defined fields

Best Practices Assessment

  • Follows IETF draft conventions and kramdown-rfc format
  • Proper use of normative language (RFC 2119)
  • Clear separation of concerns between protocol layers
  • Good balance of simplicity and functionality

Test Coverage Considerations 📋

For protocol implementation testing:

  • Message encoding/decoding test vectors would be valuable
  • Edge case documentation (malformed messages, connection failures)
  • Interoperability test scenarios for different implementations

Overall Assessment

This is a high-quality protocol specification that successfully achieves its goal of simplifying MoqTransport while maintaining essential real-time media delivery capabilities. The technical changes are well-reasoned, new features address practical deployment needs, and the documentation is thorough.

Key Improvements in Draft-03:

  • Simplified handshake eliminates connection setup complexity
  • Complete feature set with FETCH and PROBE capabilities
  • Improved subscription lifecycle with proper termination
  • Better expiration and prioritization for congestion scenarios
  • Cleaner architecture with explicit message boundaries

Recommendation: ✅ APPROVE

This draft represents a significant improvement and is ready for implementation and testing.

Minor Action Items for Future Versions:

  • Complete Security Considerations section
  • Add implementation guidance for gap handling
  • Consider resource limit recommendations
  • Complete Acknowledgments section

Add a type field before message length to distinguish SUBSCRIBE_OK
(0x0) and SUBSCRIBE_DROP (0x1) on the subscribe response stream.
SUBSCRIBE_OK must be the first message; SUBSCRIBE_DROP before it
is invalid.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@claude
Copy link
Contributor

claude bot commented Feb 24, 2026

Claude finished @kixelated's task —— View job


Pull Request Review

Reviewing PR #15: MOQ Lite Draft-03 updates

Todo List:

  • Read and analyze the changed draft document
  • Review protocol specification changes for technical accuracy
  • Check document formatting and structure
  • Verify references and citations
  • Assess security considerations
  • Evaluate performance implications
  • Provide comprehensive feedback on specification quality

Protocol Specification Review

This PR contains refinements to the MOQ Lite Draft-03 specification with focused corrections and clarifications. Here's my comprehensive analysis:

Change Summary

The changes in this PR are primarily editorial improvements and consistency fixes rather than substantial protocol modifications:

  1. ALPN Version Handling (draft-lcurley-moq-lite.md:79-80):

    • Removed hardcoded "latest: moq-lite-03" references
    • Good change: Makes the document version-agnostic and maintainable
  2. Message Naming Consistency (draft-lcurley-moq-lite.md:204, 207, 500-526):

    • Renamed GROUP_DROP to SUBSCRIBE_DROP throughout
    • Added type discriminators (0x0 for SUBSCRIBE_OK, 0x1 for SUBSCRIBE_DROP)
    • Excellent improvement: Clear message disambiguation on Subscribe stream
  3. Protocol Requirement Softening (draft-lcurley-moq-lite.md:124):

    • Changed "MUST process or buffer" to "SHOULD process or buffer" for out-of-order groups
    • Appropriate: Gives implementers flexibility while maintaining guidance
  4. Editorial Cleanup:

    • Removed redundant "No additional handshake is required" text
    • Cleaned up changelog entries for clarity

Technical Quality Assessment

Protocol Design Improvements:

  • Type Safety: Adding explicit type fields (0x0/0x1) to SUBSCRIBE_OK/SUBSCRIBE_DROP prevents message confusion
  • Naming Clarity: SUBSCRIBE_DROP better reflects that this message is sent on the Subscribe stream
  • Version Independence: Removing version-specific text improves document maintainability

Message Encoding Quality:

  • The type discriminator pattern is consistent with other protocol designs
  • Clear field definitions with proper descriptions
  • Maintains backward compatibility within draft-03

Security Considerations

Positive Aspects:

  • No security-relevant protocol changes
  • Type discriminators improve message parsing safety
  • Editorial changes don't introduce new attack vectors

Remaining Issues:

  • Security Considerations section still marked as "TODO Security" (line 697)
  • No explicit guidance on message size limits for DoS protection

Performance Impact

No Performance Concerns:

  • Changes are editorial/clarity improvements only
  • Type discriminators add minimal overhead (single varint)
  • SHOULD vs MUST change gives implementers performance optimization flexibility

Documentation Quality

Improvements:

  • Cleaner, more maintainable version handling
  • Better message naming consistency
  • Clear type field documentation
  • Updated changelog accurately reflects changes

Format Quality:

  • Proper kramdown-rfc formatting maintained
  • Consistent field descriptions
  • Appropriate use of normative language (RFC 2119)

Implementation Considerations

Backward Compatibility:

  • Changes within draft-03 maintain wire-format compatibility
  • Type discriminators help parsers distinguish messages
  • SHOULD requirement gives implementers reasonable flexibility

Edge Cases Handled:

  • Clear ordering requirements for SUBSCRIBE_OK/SUBSCRIBE_DROP
  • Proper stream termination semantics maintained
  • Gap handling guidance preserved

Minor Observations 📝

  1. Incomplete Sections: Security Considerations (line 697) and Acknowledgments (line 710) still need completion
  2. Consistent Terminology: The renaming from GROUP_DROP to SUBSCRIBE_DROP improves clarity throughout

Overall Assessment

This is a high-quality set of refinements that improves the specification's clarity, consistency, and maintainability without introducing breaking changes or complexity.

Key Improvements:

  • Better message naming and type safety
  • Version-agnostic documentation
  • More flexible implementation requirements
  • Cleaner editorial presentation

Recommendation: ✅ APPROVE

These are exactly the kind of iterative improvements that strengthen a protocol specification. The changes are well-reasoned, maintain compatibility, and improve implementer experience.

Remaining Action Items:

  • Complete Security Considerations section
  • Complete Acknowledgments section

@kixelated kixelated marked this pull request as ready for review February 24, 2026 21:27
@coderabbitai
Copy link

coderabbitai bot commented Feb 24, 2026

Walkthrough

The draft reorganizes moq-lite into a new revision with ALPN-based version negotiation and immediate session activation after QUIC/WebTransport handshake; extension negotiation uses stream probing via unknown-type stream resets. ANNOUNCE_INIT is removed; ANNOUNCE gains Hops. New stream types FETCH (single-group HTTP-like downloads) and PROBE (ongoing bitrate measurement) are added. SUBSCRIBE, SUBSCRIBE_UPDATE, and SUBSCRIBE_OK carry explicit Priority, Ordered, Max Latency, Start Group, and End Group fields; SUBSCRIBE_DROP is added. GROUP and FRAME semantics clarify gaps and out-of-order delivery. Message encodings, stream types, and public constants are revised; legacy SESSION_* constructs removed.

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'moq-lite-03' refers to a version/draft number rather than describing the actual changes made, which include significant protocol revisions like session handshake overhauls, new stream types, and message signature updates. Consider a more descriptive title that captures the main change, such as 'Refactor MOQ Lite protocol: ALPN-based versioning and stream probing' or 'Update MOQ Lite to version 03 with session and stream changes'.
Description check ❓ Inconclusive No pull request description was provided by the author; the description field is empty, making it impossible to assess whether it relates to the changeset. Add a pull request description explaining the key changes, such as the migration to ALPN-based versioning, introduction of FETCH and PROBE streams, and updates to subscription lifecycle messages.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch moq-lite-03

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 7

🧹 Nitpick comments (1)
draft-lcurley-moq-lite.md (1)

159-161: Handshake section duplicates the Session section verbatim — consider removing or cross-referencing.

Lines 159–161 reproduce the same two sentences already stated at Lines 78–80 with no additional content. This creates a maintenance hazard where one copy could drift from the other.

✂️ Proposed fix: replace with a cross-reference
 ## Handshake
-The moq-lite version is negotiated via ALPN during the QUIC handshake.
-The ALPN format is `moq-lite-xx` where `xx` is the two-digit draft version.
-The session is active immediately after the connection is established.
+See the [Session](`#session`) section for version negotiation details.
+There are no additional handshake messages; the session is active immediately after the connection is established.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@draft-lcurley-moq-lite.md` around lines 159 - 161, The Handshake section
duplicates the Session section's ALPN and session-active sentences; remove the
repeated sentences in the Handshake section and replace them with a brief
cross-reference to the Session section (e.g., "See the Session section for ALPN
negotiation and session activation details"), ensuring references to the ALPN
format `moq-lite-xx` and the immediate session activation remain only in the
Session section; update any nearby anchors or headings if needed so the
cross-reference resolves correctly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@draft-lcurley-moq-lite.md`:
- Line 273: Update the sentence fragment in the line "The subscriber priority
takes precedence, so we could override it if we decided to full screen Ali's
window:" to use the hyphenated adjective form by changing "full screen Ali's
window" to "full-screen Ali's window" so the phrase correctly uses a compound
adjective.
- Around line 491-498: Clarify that the "Group Sequence" field in SUBSCRIBE_OK
is the raw absolute sequence (no +1 offset) by adding a sentence to the
paragraph for SUBSCRIBE_OK stating that "Group Sequence is an absolute group
sequence number, not the +1-offset encoding used by SUBSCRIBE's Start Group";
reference the symbols "Group Sequence", "SUBSCRIBE_OK", "SUBSCRIBE Start Group"
(and note that SUBSCRIBE_DROP reuses the same field name) so readers understand
the asymmetry.
- Around line 519-521: Clarify that for SUBSCRIBE_DROP the field "Group Count =
0" means "drop all remaining groups up to the subscription's End Group (if End
Group ≠ 0) or drop indefinitely (if End Group = 0/unbounded)"; explicitly state
this contrasts with SUBSCRIBE_OK where "Group Count = 0" denotes an unbounded
continuation. Update the SUBSCRIBE_DROP description to say that when End Group ≠
0 the drop is bounded by End Group (finite), and when End Group = 0 the
publisher MUST treat the subscription as terminated and send a FIN immediately
after issuing the SUBSCRIBE_DROP with Group Count = 0. Reference the symbols
SUBSCRIBE_DROP, SUBSCRIBE_OK, Group Count, Group Sequence and End Group when
making these edits.
- Around line 78-82: Clarify ALPN usage: state that "moq-lite-xx" as an ALPN
label applies only to bare-QUIC deployments (i.e., negotiated during the QUIC
handshake), and add a separate paragraph explaining WebTransport-over-HTTP/3
behavior where the underlying QUIC ALPN remains "h3" and the moq-lite protocol
must be advertised as a WebTransport subprotocol token via the
WT-Available-Protocols / WT-Protocol CONNECT headers; reference the existing
ALPN text and the terms "moq-lite-xx", "WT-Available-Protocols", and
"WT-Protocol" so readers know which mechanism to use in each deployment.
- Around line 207-208: Clarify the FIN semantics for Subscribe streams by
documenting two edge cases: (1) specify that a GROUP stream reset (QUIC RST) is
treated as an implied SUBSCRIBE_DROP for that group unless an explicit
SUBSCRIBE_DROP is received, and therefore it counts as "accounted for" toward
issuing the Subscribe stream FIN (reference: GROUP stream, SUBSCRIBE_DROP,
Subscribe stream FIN); and (2) define what "track ended" means for unbounded
subscriptions — state that the publisher indicates track end either by sending a
sentinel final group sequence (e.g., final group number) or by issuing a
publisher-side FIN on the track, and that either of these events closes
unbounded Subscribe streams (reference: unbounded subscriptions, track end,
publisher FIN).
- Around line 378-380: The sentence currently says "A client MUST ONLY alternate
between status values" but should refer to the ANNOUNCE sender, so change
"client" to "publisher" (i.e., the sender of ANNOUNCE messages) to match the
Flow section; update the ANNOUNCE description around the "status" rule (the
sentence referencing status/alternation) and any other occurrences in the
document to use "publisher" (or "sender") consistently so relays/bridges are
correctly covered.
- Around line 414-416: The spec is ambiguous about byte alignment between
"Subscriber Ordered (1)" and the varint "Subscriber Max Latency (i)"; update the
message layout so the varint starts on a byte boundary by replacing the current
bit-field pair with an explicit single byte flag: define "Subscriber Flags (8)"
where bit 7 = Ordered and bits 6–0 = Reserved (0), and remove the separate
"Subscriber Ordered (1)" and trailing implicit padding; apply the same change to
the SUBSCRIBE_UPDATE and SUBSCRIBE_OK message layouts and add a short prose note
that Reserved bits MUST be set to 0 and that Subscriber Max Latency (i) begins
at the next byte boundary.

---

Nitpick comments:
In `@draft-lcurley-moq-lite.md`:
- Around line 159-161: The Handshake section duplicates the Session section's
ALPN and session-active sentences; remove the repeated sentences in the
Handshake section and replace them with a brief cross-reference to the Session
section (e.g., "See the Session section for ALPN negotiation and session
activation details"), ensuring references to the ALPN format `moq-lite-xx` and
the immediate session activation remain only in the Session section; update any
nearby anchors or headings if needed so the cross-reference resolves correctly.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9da8678 and db669f3.

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

Comment on lines 491 to 498
**Group Sequence**:
The resolved absolute start group sequence.

**Group Count**:
The number of consecutive groups in the subscription, starting from Group Sequence.
A value of 0 means unbounded.

See [SUBSCRIBE](#subscribe) for information about the other fields.
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Clarify that Group Sequence in SUBSCRIBE_OK is NOT +1-encoded like Start Group in SUBSCRIBE.

SUBSCRIBE's Start Group uses an offset encoding where 0 = latest and non-zero = absolute sequence + 1 (Lines 443–444). SUBSCRIBE_OK's Group Sequence is described as "the resolved absolute start group sequence" without explicitly noting it carries the raw absolute value (no +1 offset). This asymmetry is easily misread, especially when SUBSCRIBE_DROP reuses the same Group Sequence field name.

Add a clarifying sentence, e.g.:

"This is an absolute group sequence number, not the +1-offset encoding used in SUBSCRIBE Start Group."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@draft-lcurley-moq-lite.md` around lines 491 - 498, Clarify that the "Group
Sequence" field in SUBSCRIBE_OK is the raw absolute sequence (no +1 offset) by
adding a sentence to the paragraph for SUBSCRIBE_OK stating that "Group Sequence
is an absolute group sequence number, not the +1-offset encoding used by
SUBSCRIBE's Start Group"; reference the symbols "Group Sequence",
"SUBSCRIBE_OK", "SUBSCRIBE Start Group" (and note that SUBSCRIBE_DROP reuses the
same field name) so readers understand the asymmetry.

@kixelated kixelated changed the title (AI) moq-lite-03 moq-lite-03 Feb 25, 2026
@claude
Copy link
Contributor

claude bot commented Feb 25, 2026

Claude finished @kixelated's task —— View job


Pull Request Review

Reviewing PR #15: MOQ Lite Draft-03 updates

Todo List:

  • Read and analyze the changed draft document
  • Review protocol specification changes for technical accuracy
  • Check document formatting and structure
  • Verify references and citations
  • Assess security considerations
  • Evaluate performance implications
  • Provide comprehensive feedback on specification quality

Comprehensive Protocol Specification Review

This PR introduces significant improvements to the MOQ Lite Draft-03 specification. Based on my analysis of the protocol changes, here's my comprehensive review:

Major Protocol Improvements

1. ALPN-Based Session Negotiation (lines 78-80)

  • Excellent simplification moving version negotiation to ALPN (moq-lite-xx)
  • Eliminates complex handshake messages and reduces connection setup overhead
  • Clean separation for bare QUIC vs WebTransport over HTTP/3 deployments
  • Note: The spec correctly addresses both deployment scenarios

2. Stream-Based Architecture (lines 163-181)

  • Clear separation: bidirectional for control, unidirectional for data
  • Proper stream lifecycle management with termination semantics (lines 145-159)
  • Extension negotiation via stream probing (line 83) is elegant and provides graceful degradation

3. New FETCH Stream (lines 210-217)

  • HTTP-like single request/response model addresses random access needs
  • Clean design for on-demand content retrieval
  • Proper error handling via stream resets

4. SUBSCRIBE_DROP Mechanism (lines 502-527)

  • Essential for handling unavailable content with proper error codes
  • Range-based dropping is efficient for gaps
  • Good separation between error conditions (code 0 = unavailable, non-zero = error)

5. PROBE Stream (lines 219-226)

  • Addresses congestion control and adaptive bitrate needs
  • Simple bitrate measurement interface
  • Graceful degradation if unsupported

Technical Quality Assessment

Protocol Design Strengths:

  • Priority System (lines 244-278): Dual priority (subscriber + publisher) with concrete conferencing examples effectively handles relay conflicts
  • Message Encoding (lines 334-347): Consistent variable-length prefixes, extensible length-prefixed design
  • Stream Management: Clear termination semantics prevent resource leaks
  • Expiration Logic (lines 292-307): Arrival timestamp-based with proper flow control protection

Performance Characteristics:

  • Out-of-order group delivery enables latency optimization during congestion
  • Flow control protection via stream resets for expired content
  • Parallel transmission of multiple groups across separate streams
  • Effective prioritization during network degradation

Areas for Improvement ⚠️

1. Message Layout Ambiguities (lines 414-415, 460-462, 480-482)

  • Subscriber Ordered (8) field creates byte alignment issues with following varint fields
  • Under RFC 9000 conventions, this could lead to implementation inconsistencies
  • Recommendation: Combine priority and ordered into a single Flags (8) byte with bit assignments

2. Group Sequence Encoding Asymmetry (lines 491-493)

  • SUBSCRIBE uses +1 offset encoding for Start Group (lines 441-444)
  • SUBSCRIBE_OK uses raw absolute values for Group Sequence
  • Recommendation: Add clarifying note about encoding differences

3. SUBSCRIBE_DROP Semantics (lines 518-527)

  • "All remaining groups" meaning unclear for bounded vs unbounded subscriptions
  • Should clarify behavior when End Group ≠ 0 vs End Group = 0

4. Terminology Consistency (line 378)

  • Uses "client" instead of "publisher" for ANNOUNCE sender
  • Should be consistent with Flow section terminology

Security Analysis

Positive Security Aspects:

  • Payload is opaque; no credential exposure in protocol headers
  • Length-prefixed messages prevent buffer overflow attacks
  • Stream isolation limits blast radius of issues
  • Unknown streams reset gracefully without fatal errors

Areas Needing Attention:

  • Security Considerations section incomplete (line 698)
  • No explicit resource limits mentioned for preventing exhaustion attacks
  • PROBE stream potential amplification should be addressed

Documentation Quality

Strengths:

  • Clear examples for complex scenarios (priority conflicts, lines 254-278)
  • Comprehensive changelog documenting all changes (lines 609-623)
  • Detailed upstream differences comparison (lines 631-673)
  • Proper RFC 2119 terminology usage (MUST/SHOULD/MAY)
  • Good balance of simplicity and functionality

Minor Format Issues:

  • Handshake section (lines 159-161) duplicates Session section content
  • Table alignment could be improved (lines 170-181)
  • Security and Acknowledgments sections incomplete

Best Practices Assessment

  • Follows IETF draft conventions and kramdown-rfc format
  • Proper use of normative language (RFC 2119)
  • Clear separation of concerns between protocol layers
  • Good balance of simplicity and functionality
  • Rationale section provides excellent context for design decisions

Overall Assessment

This is a high-quality protocol specification that successfully achieves its goal of simplifying MoqTransport while maintaining essential real-time media delivery capabilities. The technical changes are well-reasoned, new features address practical deployment needs, and the documentation is thorough.

Key Improvements in Draft-03:

  • Simplified handshake eliminates connection setup complexity
  • Complete feature set with FETCH and PROBE capabilities
  • Improved subscription lifecycle with proper termination
  • Better expiration and prioritization for congestion scenarios
  • Cleaner architecture with explicit message boundaries

Recommendation: ✅ APPROVE

This draft represents a significant improvement over previous versions and is ready for implementation and testing.

Minor Action Items for Future Versions:

  • Complete Security Considerations section
  • Resolve byte alignment ambiguities in message layouts
  • Add implementation guidance for gap handling
  • Complete Acknowledgments section
  • Consider adding resource limit recommendations

The protocol design demonstrates a strong understanding of real-time media requirements and provides a solid foundation for practical MOQ implementations.


Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

♻️ Duplicate comments (1)
draft-lcurley-moq-lite.md (1)

78-84: ALPN/WebTransport negotiation section looks good.

The text now correctly distinguishes bare-QUIC (ALPN token during the QUIC handshake) from WebTransport over HTTP/3, which offers a protocol negotiation mechanism similar to ALPN, using WT-Available-Protocols in the CONNECT request to enumerate possible protocols in preference order. The extension negotiation via stream probing is a clean addition.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@draft-lcurley-moq-lite.md` around lines 78 - 84, The ALPN/WebTransport
negotiation text is correct and needs no change; confirm that the document uses
the `moq-lite-xx` version identifier consistently and that the distinction
between bare QUIC ALPN negotiation and WebTransport over HTTP/3 using
`WT-Available-Protocols`/`WT-Protocol` in the CONNECT request is preserved, and
ensure the paragraph explaining extension negotiation via stream probing
(opening a stream with an unknown type and peer RESET) remains as-is.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@draft-lcurley-moq-lite.md`:
- Around line 213-215: Clarify that the Fetch response stream carries only bare
FRAME messages and does not include a preceding GROUP header: update the text
around the FETCH/FRAME/GROUP descriptions to state explicitly that unlike Group
Streams (which MUST start with a GROUP message), a Fetch response returns FRAME
messages directly with no GROUP frame, and that the Subscribe ID and Group
Sequence for those frames are taken from the original FETCH request (i.e., the
group sequence is the one requested in the FETCH message). Include references to
the FETCH, FRAME, and GROUP symbols so readers understand this exception.
- Around line 490-493: The spec currently defines "Start Group" = 0 requires the
publisher to send a subsequent SUBSCRIBE_OK but omits an error/timeout path; add
a sentence after the "Start Group" definition stating that if the subscriber
does not receive a resolved non-zero Start Group in a subsequent SUBSCRIBE_OK
within an implementation-specific timeout, the subscriber MAY reset/terminate
the stream (or send an explicit error/UNSUBSCRIBE) to avoid hanging, and include
that this timeout and behavior are implementation-specific; reference the terms
"Start Group" and "SUBSCRIBE_OK" when adding the sentence so it's clear where
the timeout applies.
- Around line 222-226: Clarify PROBE semantics by stating that the subscriber
MAY send additional PROBE messages over the same bidirectional stream to update
the target bitrate and that the publisher MUST treat each PROBE as a new target
to attempt (or explicitly document if it only accepts the first), and also
specify how the publisher replies (periodic PROBE responses reflecting current
measured bitrate) and what to do if it cannot honor updates (e.g., reset the
stream if PROBE unsupported); reference the PROBE message, subscriber, publisher
and the bidirectional stream to make this negotiation behavior explicit.
- Line 643: Appendix B's "No group/object ID gaps" entry conflicts with the
updated GROUP section and zero-frame group allowance; update or remove that
appendix entry so it reflects the spec body: state that subscribers MUST handle
gaps (as described in the GROUP section) and that zero-frame groups are
permitted to represent gaps, or remove the assertion that gaps cannot exist;
ensure the appendix text references the GROUP behavior and the zero-frame group
allowance to avoid misleading implementors.
- Around line 476-485: The SUBSCRIBE_OK and SUBSCRIBE_DROP message definitions
break the spec's universal length‑prefixed framing by putting Type before
Message Length, which will mislead generic parsers; update both message
definitions (SUBSCRIBE_OK, SUBSCRIBE_DROP) so that Message Length (i) is the
first field and Type (i) becomes the first byte of the payload (i.e., reorder
fields to "Message Length (i)" then "Type (i) = 0x0/0x1" followed by the
remaining fields), and ensure the spec text clarifies that these messages now
follow the same length‑prefixed framing as ANNOUNCE, SUBSCRIBE, FRAME, etc.
- Around line 518-522: Update the SUBSCRIBE_DROP field descriptions to use the
same +1-offset encoding as SUBSCRIBE and SUBSCRIBE_OK (i.e., "absolute group
sequence + 1, with 0 reserved") so implementations don't silently off-by-one
decode dropped ranges; explicitly state the semantics for End Group = 0 (e.g.,
treat 0 as "unbounded / drop to latest" or "N/A" per your chosen convention) and
mention Start Group = 0 meaning "N/A" or reserved as well, and ensure the prose
references SUBSCRIBE_DROP, Start Group, End Group and the FIN accounting at Line
206 so readers know this change prevents FIN miscounting.

---

Duplicate comments:
In `@draft-lcurley-moq-lite.md`:
- Around line 78-84: The ALPN/WebTransport negotiation text is correct and needs
no change; confirm that the document uses the `moq-lite-xx` version identifier
consistently and that the distinction between bare QUIC ALPN negotiation and
WebTransport over HTTP/3 using `WT-Available-Protocols`/`WT-Protocol` in the
CONNECT request is preserved, and ensure the paragraph explaining extension
negotiation via stream probing (opening a stream with an unknown type and peer
RESET) remains as-is.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between db669f3 and 58e2f51.

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

Comment on lines 476 to +485
SUBSCRIBE_OK Message {
Message Length = 0
Type (i) = 0x0
Message Length (i)
Publisher Priority (8)
Publisher Ordered (8)
Publisher Max Latency (i)
Start Group (i)
End Group (i)
}
~~~
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Type before Message Length breaks the spec's universal length-prefixed framing.

The spec states (Line 334–336): "Most messages are prefixed with a variable-length integer indicating the number of bytes in the message payload that follows." Every other message (ANNOUNCE_PLEASE, ANNOUNCE, SUBSCRIBE, SUBSCRIBE_UPDATE, FETCH, PROBE, GROUP, FRAME) follows Message Length (i) as the first field. SUBSCRIBE_OK and SUBSCRIBE_DROP uniquely put Type (i) first, meaning the byte values 0x0 and 0x1 appear where a parser expects a length. A generic subscriber-side parser reading the Subscribe response stream will interpret the Type varint as a length and then misalign every subsequent field — causing silent wire-level misparse.

The spec needs to either:

  1. Explicitly document that the Subscribe response stream uses a Type–Length–Value framing (not Length-first like all other streams), so parsers know to read Type first.
  2. Move Type after Message Length and make it the first byte of the message payload (consistent with the rest of the spec).
💡 Option 2: move Type inside the length-prefixed payload
 SUBSCRIBE_OK Message {
+  Message Length (i)
+  Type (i) = 0x0
-  Type (i) = 0x0
-  Message Length (i)
   Publisher Priority (8)
   Publisher Ordered (8)
   Publisher Max Latency (i)
   Start Group (i)
   End Group (i)
 }

 SUBSCRIBE_DROP Message {
+  Message Length (i)
+  Type (i) = 0x1
-  Type (i) = 0x1
-  Message Length (i)
   Start Group (i)
   End Group (i)
   Error Code (i)
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@draft-lcurley-moq-lite.md` around lines 476 - 485, The SUBSCRIBE_OK and
SUBSCRIBE_DROP message definitions break the spec's universal length‑prefixed
framing by putting Type before Message Length, which will mislead generic
parsers; update both message definitions (SUBSCRIBE_OK, SUBSCRIBE_DROP) so that
Message Length (i) is the first field and Type (i) becomes the first byte of the
payload (i.e., reorder fields to "Message Length (i)" then "Type (i) = 0x0/0x1"
followed by the remaining fields), and ensure the spec text clarifies that these
messages now follow the same length‑prefixed framing as ANNOUNCE, SUBSCRIBE,
FRAME, etc.

Comment on lines +490 to +493
**Start Group**:
The resolved absolute start group sequence.
A value of 0 means the start group is not yet known; the publisher MUST send a subsequent SUBSCRIBE_OK with a resolved value.
A non-zero value is the absolute group sequence + 1.
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

No timeout or error path defined when Start Group = 0 is never resolved in a subsequent SUBSCRIBE_OK.

The spec requires the publisher to send a follow-up SUBSCRIBE_OK with a resolved Start Group, but provides no guidance to the subscriber if it never arrives. The subscriber has no defined recourse — it silently hangs. Consider adding a sentence that the subscriber MAY reset the stream if the start group is not resolved within an implementation-specific timeout.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@draft-lcurley-moq-lite.md` around lines 490 - 493, The spec currently defines
"Start Group" = 0 requires the publisher to send a subsequent SUBSCRIBE_OK but
omits an error/timeout path; add a sentence after the "Start Group" definition
stating that if the subscriber does not receive a resolved non-zero Start Group
in a subsequent SUBSCRIBE_OK within an implementation-specific timeout, the
subscriber MAY reset/terminate the stream (or send an explicit
error/UNSUBSCRIBE) to avoid hanging, and include that this timeout and behavior
are implementation-specific; reference the terms "Start Group" and
"SUBSCRIBE_OK" when adding the sentence so it's clear where the timeout applies.

Comment on lines +518 to +522
**Start Group**:
The first absolute group sequence in the dropped range.

**End Group**:
The last absolute group sequence in the dropped range (inclusive).
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

SUBSCRIBE_DROP uses raw absolute group sequences while SUBSCRIBE/SUBSCRIBE_OK use +1-offset encoding — silent off-by-one for every implementation.

SUBSCRIBE and SUBSCRIBE_OK both encode group sequences as absolute + 1 (0 reserved for "latest"/"unknown"). SUBSCRIBE_DROP describes Start Group and End Group as plain "absolute group sequence" with no +1 offset and no special meaning for 0. An implementation that applies the same +1 decoding it uses for SUBSCRIBE/SUBSCRIBE_OK will misidentify every dropped range by one, causing the subscriber's FIN accounting (Line 206) to fail silently.

Additionally, End Group = 0 is left undefined here: unlike SUBSCRIBE (unbounded) and SUBSCRIBE_OK (unbounded), there is no guidance on whether End Group = 0 in SUBSCRIBE_DROP means "drop group 0", "drop all remaining", or is an error.

Consider using the same +1-offset convention throughout (SUBSCRIBE_DROP Start Group = 0 can mean "N/A" or reuse the absolute-value convention consistently), and add explicit prose for the 0-value semantics:

💡 Proposed prose fix for SUBSCRIBE_DROP field descriptions
 **Start Group**:
-The first absolute group sequence in the dropped range.
+The first group in the dropped range.
+A non-zero value is the absolute group sequence + 1 (matching the encoding in SUBSCRIBE and SUBSCRIBE_OK).

 **End Group**:
-The last absolute group sequence in the dropped range (inclusive).
+The last group in the dropped range (inclusive).
+A value of 0 means all remaining groups in the subscription (i.e., up to and including the subscription's End Group if bounded, or until the track ends if unbounded).
+A non-zero value is the absolute group sequence + 1.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@draft-lcurley-moq-lite.md` around lines 518 - 522, Update the SUBSCRIBE_DROP
field descriptions to use the same +1-offset encoding as SUBSCRIBE and
SUBSCRIBE_OK (i.e., "absolute group sequence + 1, with 0 reserved") so
implementations don't silently off-by-one decode dropped ranges; explicitly
state the semantics for End Group = 0 (e.g., treat 0 as "unbounded / drop to
latest" or "N/A" per your chosen convention) and mention Start Group = 0 meaning
"N/A" or reserved as well, and ensure the prose references SUBSCRIBE_DROP, Start
Group, End Group and the FIN accounting at Line 206 so readers know this change
prevents FIN miscounting.

- Subscriptions start at the latest group, not the latest object.
- Subscriptions default to the latest group, not the latest object.
- No subgroups
- No group/object ID gaps
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Appendix B "No group/object ID gaps" directly contradicts the new gap requirement in the spec body.

Line 589 (GROUP section) now reads: "A subscriber MUST handle gaps, potentially caused by congestion." Lines 322–323 also explicitly allow zero-frame groups as gaps. The Appendix B entry "No group/object ID gaps" is no longer accurate and will mislead implementors cross-referencing the diff from MoqTransport.

✏️ Proposed fix
-No group/object ID gaps
+Group sequence gaps are supported (subscriber MUST handle gaps)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@draft-lcurley-moq-lite.md` at line 643, Appendix B's "No group/object ID
gaps" entry conflicts with the updated GROUP section and zero-frame group
allowance; update or remove that appendix entry so it reflects the spec body:
state that subscribers MUST handle gaps (as described in the GROUP section) and
that zero-frame groups are permitted to represent gaps, or remove the assertion
that gaps cannot exist; ensure the appendix text references the GROUP behavior
and the zero-frame group allowance to avoid misleading implementors.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (3)
draft-lcurley-moq-lite.md (3)

645-645: ⚠️ Potential issue | 🟡 Minor

Appendix B still contradicts normative gap behavior.

Line 645 says “No group/object ID gaps,” but Line 591 says subscribers MUST handle gaps. Appendix text should match the body to avoid implementation confusion.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@draft-lcurley-moq-lite.md` at line 645, Appendix B currently states "No
group/object ID gaps" which contradicts the normative requirement that
subscribers MUST handle gaps; update Appendix B's wording (the "No group/object
ID gaps" paragraph) to either remove the absolute claim or explicitly state that
gaps can occur and subscribers MUST implement the gap-handling behavior
described in the main body (the subscriber requirements), ensuring Appendix B
aligns with the normative text.

478-486: ⚠️ Potential issue | 🟠 Major

Type before Message Length still creates framing ambiguity on Subscribe response streams.

At Line 478-486 and Line 508-514, both SUBSCRIBE_OK and SUBSCRIBE_DROP place Type (i) before Message Length (i). This still deviates from the document’s length-first framing convention and can mislead generic decoders unless you explicitly define this stream as TLV-framed in prose.

Also applies to: 508-514

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@draft-lcurley-moq-lite.md` around lines 478 - 486, The SUBSCRIBE_OK and
SUBSCRIBE_DROP message layouts violate the document’s length-first framing;
change each message so Message Length (i) appears before Type (i) (i.e., swap
the two fields in the SUBSCRIBE_OK Message and the SUBSCRIBE_DROP Message
definitions) to restore consistent length-first framing and avoid ambiguity for
generic decoders (update the entries that currently list "Type (i)" then
"Message Length (i)" to list "Message Length (i)" then "Type (i)").

520-525: ⚠️ Potential issue | 🟠 Major

SUBSCRIBE_DROP group range encoding is inconsistent with SUBSCRIBE/SUBSCRIBE_OK.

At Line 521 and Line 524, Start Group/End Group are described as raw absolute sequences, while SUBSCRIBE and SUBSCRIBE_OK use absolute + 1 encoding (Line 445, Line 450, Line 495, Line 500). This inconsistency is a wire-level off-by-one footgun.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@draft-lcurley-moq-lite.md` around lines 520 - 525, The SUBSCRIBE_DROP group
range encoding description is inconsistent with SUBSCRIBE/SUBSCRIBE_OK; update
the SUBSCRIBE_DROP fields "Start Group" and "End Group" to use the same
"absolute + 1" encoding convention as used by SUBSCRIBE and SUBSCRIBE_OK (rather
than raw absolute sequences), and adjust the wording/examples in the
SUBSCRIBE_DROP section so Start Group/End Group are documented and encoded as
absolute+1 to avoid the off-by-one wire-level bug.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@draft-lcurley-moq-lite.md`:
- Line 645: Appendix B currently states "No group/object ID gaps" which
contradicts the normative requirement that subscribers MUST handle gaps; update
Appendix B's wording (the "No group/object ID gaps" paragraph) to either remove
the absolute claim or explicitly state that gaps can occur and subscribers MUST
implement the gap-handling behavior described in the main body (the subscriber
requirements), ensuring Appendix B aligns with the normative text.
- Around line 478-486: The SUBSCRIBE_OK and SUBSCRIBE_DROP message layouts
violate the document’s length-first framing; change each message so Message
Length (i) appears before Type (i) (i.e., swap the two fields in the
SUBSCRIBE_OK Message and the SUBSCRIBE_DROP Message definitions) to restore
consistent length-first framing and avoid ambiguity for generic decoders (update
the entries that currently list "Type (i)" then "Message Length (i)" to list
"Message Length (i)" then "Type (i)").
- Around line 520-525: The SUBSCRIBE_DROP group range encoding description is
inconsistent with SUBSCRIBE/SUBSCRIBE_OK; update the SUBSCRIBE_DROP fields
"Start Group" and "End Group" to use the same "absolute + 1" encoding convention
as used by SUBSCRIBE and SUBSCRIBE_OK (rather than raw absolute sequences), and
adjust the wording/examples in the SUBSCRIBE_DROP section so Start Group/End
Group are documented and encoded as absolute+1 to avoid the off-by-one
wire-level bug.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 58e2f51 and 54047e2.

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

@kixelated kixelated merged commit 4c05cfd into main Feb 25, 2026
3 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