Skip to content

fix(net): skip an empty SUBSCRIBE_NAMESPACE on draft-14 - #5024

Closed
kixelated wants to merge 2 commits into
mainfrom
quest/m0/ietf-d14-root-prefix
Closed

kixelated wants to merge 2 commits into
mainfrom
quest/m0/ietf-d14-root-prefix

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Problem

Draft-14 makes a SUBSCRIBE_NAMESPACE prefix with N = 0 a protocol violation. An unscoped origin's interest is that empty prefix, and both moq-net and js/net sent it. A peer that enforces the draft refuses the request, so an unscoped link learns nothing.

Approach

On draft-14, subscribe_prefixes drops an empty prefix and run_subscribe_namespace returns before encoding one. Both paths log at debug. The session still warns and continues when a peer refuses some other namespace subscription. JavaScript skips the same empty prefix and keeps the announce consumer open until the caller closes it, so an unsolicited PUBLISH_NAMESPACE still lands. A scoped prefix is still sent. Draft-15 and later still send an empty prefix.

A draft-14 session test covers an unscoped origin (no SUBSCRIBE_NAMESPACE) and a scoped one (one request for cam). The JavaScript tests cover the same split, and the unscoped case still accepts an unsolicited announcement.

This completes quest/m0/ietf-d14-root-prefix from #5020. That quest file is not on main, so this branch leaves quest/ untouched. Delete the quest file once #5020 merges.

Impact

  • Public API: none.
  • Wire: draft-14 no longer sends SUBSCRIBE_NAMESPACE with an empty prefix. Draft-15 and later are unchanged. Scoped prefixes are unchanged. A refused namespace subscription still warns, and the session stays up.

Alternatives

Follow-ups

(Written by Grok 4.7)

kixelated and others added 2 commits October 7, 2026 12:15
Draft-14 treats a prefix with no tuple fields as a protocol violation.
An unscoped origin asks for that prefix, so the session skips it and
takes the peer's unsolicited PUBLISH_NAMESPACE. A refusal still warns
and continues. Scoped prefixes are unchanged.

Co-authored-by: Grok 4.7 <noreply@x.ai>
@kixelated

Copy link
Copy Markdown
Collaborator Author

Draft-14 now skips an empty SUBSCRIBE_NAMESPACE in moq-net and js/net. A scoped prefix is still sent. A refused namespace subscription still warns, and the session stays up.

Recommendation: skip, and leave this draft. Compare it with #5018 before any merge, and wait for #5016 so the moq-net tests compile. The draft-14 violation is real, so this should stay. Merge it only after that review.

(Written by Grok 4.7)

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Automated review by review (OpenAI)

Reviewed commit 8374b76b9ccb4a67d7bb2a032f450ac9a3b36e03.

No actionable correctness issue found within the stated draft-14-only scope. Both Rust send paths omit the illegal empty prefix, and the TypeScript consumer remains registered for unsolicited announcements. The scoped-prefix regression checks are appropriate.

Direction: reconcile this alternative with #5018 before landing; they intentionally cover different draft ranges and overlap in the same paths. This is not an additional implementation finding.

Verification: static diff and lifecycle review only; tests were not run. The described base-branch test-compilation issue was not independently reproduced.

@coderabbitai

coderabbitai Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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 30 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 4ff57a39-2678-4bb9-b01d-5cbb617cadc2
📥 Commits

Reviewing files that changed from the base of the PR and between 9d5cf8d and 8374b76.

📒 Files selected for processing (4)
  • js/net/src/ietf/subscriber.test.ts
  • js/net/src/ietf/subscriber.ts
  • rs/moq-net/src/ietf/session.rs
  • rs/moq-net/src/ietf/subscriber.rs
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@kixelated

Copy link
Copy Markdown
Collaborator Author

Superseded by #5018, which skips the empty SUBSCRIBE_NAMESPACE on both draft-14 and draft-15 in rs/moq-net and js/net.

Nothing was ported: #5018's tests already cover the unscoped skip, the scoped prefix still being asked, the unsolicited PUBLISH_NAMESPACE still landing in JS, and draft-16 still sending the empty prefix. The extra send-path guard in run_subscribe_namespace has no caller that bypasses the session filter.

quest/m0/ietf-d14-root-prefix.md is not on main (it is added by #5020), so there was no quest file to delete here.

(Written by Claude Opus 5.5)

@kixelated kixelated closed this Oct 8, 2026
@kixelated
kixelated deleted the quest/m0/ietf-d14-root-prefix branch October 8, 2026 07:06
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