Skip to content

quest(m2): plan sending a JS group's fill ahead of its live rest - #5495

Merged
kixelated merged 2 commits into
mainfrom
quest/plan-js-fill-first
Oct 14, 2026
Merged

kixelated merged 2 commits into
mainfrom
quest/plan-js-fill-first

Conversation

@kixelated

@kixelated kixelated commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds quest/m2/js-fill-first.md ([S], bottom of m2): JS mirrors Rust's start-object tie-break from #5470, so a draft-20 fill of the live group is sent ahead of that group's live rest.

Today Priority#position assumes sequences are unique within a subscription, but an IETF fill registers a second stream for the live group's sequence, so the two tie.

Decisions

Goal: "In JS, when a draft-20 fill and the live stream for the same group are both in flight, the fill (earlier start object) is sent first. Group order and track priority still dominate. Lite ordering is unchanged."

  • ✅ Yes, [S] at the bottom of m2
  • Yes, but in m1

Encoding:

  • ✅ Count streams, not groups: Priority.add takes the start object; a same-group stream with an earlier start counts as ahead. sendOrder packing unchanged, no new cap
  • Pack start into low bits (needs a bound on start)

Impact

Quest files only. Planned work: no public API (Priority is @internal), no wire change.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

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

coderabbitai Bot commented Oct 14, 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 26 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: 6c999eb0-288f-4d64-9c19-372ff0f5ba2f
📥 Commits

Reviewing files that changed from the base of the PR and between 9263834 and 0eeb9d1.

📒 Files selected for processing: 2
  • quest/m2/README.md
  • quest/m2/js-fill-first.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 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: bb1e2d2a74

ℹ️ 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 thread quest/m2/js-fill-first.md Outdated
Comment on lines +22 to +23
first object, a fill its start. Lite always starts at 0, so it keeps its
order.

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 Use Lite's actual nonzero frame start

Lite does not always start at object 0: draft-06+ subscriptions carry startFrame, frameRange returns that value for the selected start group, and #runTrack passes it through RunGroup.start (js/net/src/lite/publisher.ts:104-105,154-157,1163-1170). Following this plan when updating the required Priority.add call would therefore register a resumed mid-group Lite stream with a false start, violating the new stream-rank contract. Pass the group's actual start while verifying that Lite ordering remains unchanged because its group sequences are unique.

Useful? React with 👍 / 👎.

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.

Agreed, fixed in 0eeb9d1: every stream now passes the object it starts at, with Lite using its frameRange start, and the plan relies on Lite never registering two streams for one sequence rather than on a zero start.

(Written by Claude Opus 5.5)

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 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-14T03:41:30.865165Z 0eeb9d1 Manual request
ℹ️ 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.

Lite can start a group mid-way via draft-06+ startFrame, so the plan no
longer claims it always starts at 0.

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

kixelated commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator Author

@codex review

(Written by Claude Opus 5.5)

@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: 0eeb9d1

No actionable bugs found in this revised plan. Counting earlier-start streams within the same group preserves group ordering and track-priority precedence without adding an object-start bound to sendOrder packing; this is a simpler fit than reserving low bits. The planned live-rest-first regression covers the important registration order.

The independent Lite start finding 4266509361 is addressed: quest/m2/js-fill-first.md:21–25 now passes the actual frameRange start and explains unchanged Lite ordering through unique group sequences.

Verification limits: static review of the two quest files and relevant JS Priority, IETF/Lite publisher paths, tests, and Rust #5470 tie-break. This PR changes documentation only; no tests were run and the planned implementation is not yet verified.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 0eeb9d17fd

ℹ️ 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".

@kixelated

Copy link
Copy Markdown
Collaborator Author

Merge summary: adds the [S] m2 quest quest/m2/js-fill-first.md plus its m2 README entry. Both maintainer decisions stand as recorded: [S] at the bottom of m2, and rank streams rather than groups via the start object passed to Priority.add, with sendOrder packing unchanged.

Review: Codex noted that Lite can start a group mid-way through draft-06+ startFrame. Fixed in 0eeb9d1, so every stream passes its real start object and Lite keeps its order because it never registers two streams for one sequence. The new head has a Codex thumbs-up and a clean OpenAI review, and CI passes.

Note: the Rust tie-break this mirrors (#5470) is still open.

(Written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 14, 2026
Merged via the queue into main with commit 38138bb Oct 14, 2026
4 checks passed
@kixelated
kixelated deleted the quest/plan-js-fill-first branch October 14, 2026 03:56
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