Skip to content

quest(m1): plan early SUBSCRIBE_DROPs in Rust and JS publishers - #5303

Open
kixelated wants to merge 1 commit into
mainfrom
quest/m1/subscribe-drop-early
Open

kixelated wants to merge 1 commit into
mainfrom
quest/m1/subscribe-drop-early

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Adds Early drops as a child of the SUBSCRIBE_DROP questline, following the Codex finding on #5301 that the JS publisher never sends SUBSCRIBE_DROP.

The new [L] quest covers lite-05 and lite-06. The Rust and @moq/net publishers send a DROP the moment they give a sequence up (cursor skips, max-delay expiry, and drops the upstream publisher sent), and both keep the end-of-track sweep. A per-sequence dropped mark in both track models lets a relay forward upstream drops. The parent keeps resets before the header, lite-07, and showing drops to readers.

Decisions

How should the drop_unserved port be tracked?

  • ✅ Split a child quest
  • Note it in the existing quest
  • Nothing

Goal: mirror only Rust's end-of-track sweep in JS?

  • Confirmed, end-of-track only
  • ✅ Also drop early

Early drops in Rust too?

  • ✅ Rust and JS together (maintainer: "Make sure Rust drops early too")
  • JS only

What counts as giving a sequence up?

  • ✅ Cursor skips
  • ✅ Max-delay expiry
  • ✅ (maintainer) Explicit gaps only when the original publisher explicitly sent a DROP, like after a cut
  • Explicit gaps inferred from missing sequences

Tests?

  • ✅ Unit tests plus just test interop --tail
  • Unit tests only

Where does the per-sequence dropped mark go?

  • ✅ In this child
  • Leave to the parent

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 11, 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 10 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: bfb97b6c-c0f8-43ce-a97e-570ddfe4add5

📥 Commits

Reviewing files that changed from the base of the PR and between 5978e61 and b5afa63.


📒 Files selected for processing (3)
  • quest/m1/README.md
  • quest/m1/subscribe-drop-early.md
  • quest/m1/subscribe-drop.md

  • Autofix · 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.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T03:33:30.500868Z b5afa63 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: b5afa63.

The focused Rust/JS parity quest follows the independent #5301 finding. Keeping lite-07, reset-before-header handling, and reader errors in the parent is reasonable.

One actionable acceptance gap in quest/m1/subscribe-drop-early.md:28–33: the child explicitly says max-delay expiry also closes the parent's grace-aging hole, but dropping a buffered group does not cover a never-arrived gap. Rust marks a group served before its stream opens, and Tail::expire silently folds missing gaps. An absent group has no buffered object to expire and, correctly, is not an explicit upstream DROP. Keeping the existing end sweep alone can therefore still omit it.

Make preserving unresolved gaps for the final sweep an explicit acceptance condition, rather than treating them as delivered on the publisher's grace clock. Add a mirrored mock-time regression: serve group 0, leave group 1 absent, queue group 2 behind exhausted stream credit for longer than the publisher's grace, then release credit and finish. Group 1 must be named before FIN without waiting for the receiver's later-started grace. Also retain the live-reordering case: no inferred DROP while group 1 could still arrive.

This PR changes planning documents only; no current API or wire change. GitHub-only static review of all three changed files and relevant Rust/JS publisher, subscriber, model, and tail code; tests not run. Head and reviews rechecked before posting; no existing substantive review to duplicate.

(Written by OpenAI)

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b5afa63c85

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +49 to +50
- Mirrored Rust and JS publisher unit tests for each trigger: the subscriber's
owed range settles at the skip, before the track ends and without the grace.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Defer the pre-FIN settlement test to the parent

The requested pre-track-end assertion cannot pass within this quest's stated scope. JS invokes #settleTail only after #runResponses resolves on subscribe-stream FIN (js/net/src/lite/subscriber.ts:721-727), and Rust similarly enters ServeMode::Tail only after receiving FIN (rs/moq-net/src/lite/subscriber.rs:5179-5208); receiving a DROP merely accounts its range. Because lines 11-12 explicitly defer surfacing drops to readers, nothing externally settles when the early DROP arrives. Test the emitted/accounted DROP and immediate post-FIN settlement here, or pull reader disposition into this child.

Useful? React with 👍 / 👎.

Comment on lines +44 to +45
Update the lite draft's SUBSCRIBE_DROP text to say a publisher SHOULD send it
as soon as it gives a sequence up. Run `just drafts check`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep the draft update with SUBSCRIBE_DROP restoration

This child cannot make the requested normative draft change while keeping lite-07 as a non-goal. The current draft has no SUBSCRIBE_DROP message section and explicitly says lite-07 removed it (drafts/draft-lcurley-moq-lite.md:1542-1547), while the parent that depends on this child owns restoring it. Updating only the historical changelog would not establish the new SHOULD, but restoring the message here would prematurely change lite-07. Move this behavior wording to the parent, or move the restoration into this child so the implementation and draft can land consistently.

Useful? React with 👍 / 👎.

This branch has not been deployed

No deployments
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