Skip to content

quest(m1): an arrival read serves buffered and re-offered groups in Group Order, in Rust and JS - #9522

Merged
kixelated merged 3 commits into
mainfrom
quest-plan/js-group-order
Nov 24, 2026
Merged

kixelated merged 3 commits into
mainfrom
quest-plan/js-group-order

Conversation

@kixelated

@kixelated kixelated commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Plans one quest, quest/m1/arrival-group-order.md. It came out of the moq-dev/moq#9509 review thread, where the Rust and JS twins of the widened-read test pinned opposite orders.

Summary

  • Quest: [L], in m1. It is additive (no API or wire change) and fixes Rust/JS parity, and m1 holds additive fixes for this cycle.
  • Goal: an arrival read (recv_group / recvGroup, and the lite publishers serving from one) serves everything it holds unread in the subscription's Group Order: newest first unless ascending. That covers buffered groups (arrived, unread, a replay included), which Rust walks in arrival order and JS returns lowest first, and re-offered groups a widening takes back, which Rust already serves in Group Order (next_owed) and JS lowest first.
  • Also in scope: both resume readers (poll_lowest / #lowest, lowest first today) for arrival reads, the verify-resume TLA+ model, the docs that state the arrival order, and callers that drain a replay expecting oldest first.
  • Draft: no change. Its Group Order section already says a publisher SHOULD transmit pending Groups in Group Order.
  • Tests: the Rust and JS twins get order assertions back ([2, 1, 3, 4, 0], ascending [1, 2, 3, 0, 4]), and the cursor-independence and replay tests move to Group Order.

Decisions

Decided 2026-11-23 by the maintainer, via /quest-run: plan it, in m1.

Decided 2026-11-24 by the maintainer (comment): buffered groups (arrived, unread, no widening): ✅ (c) serve them in Group Order in both languages, newest first unless ascending (rejected: (a) keep each language's order and document the difference; (b) move JS to Rust's arrival order). This newer decision replaces the earlier scope, which covered only JS's re-offers and left buffered groups as a Waiting item. So the quest grew from M to L, was renamed from js-reoffer-order.md, and lost its Waiting section.

Choices I made while planning, for review:

  • Folded resume across route copies into the same quest: an arrival read through a resumed reader would otherwise still pick lowest first.
  • No ## Caused by culprit. JS's key-sorted buffer dates to moq-dev/moq#2772, and moq-dev/moq#6717 knowingly kept JS lowest-first when it added Rust's newest-first re-offer.

Overlap

I searched the quest tree, deleted quests, and the quest files every open PR adds or changes, and found no overlap. moq-dev/moq#9437 (widened-front-reader-asks-stale-again) also deals with widened readers, but it is about stale give-ups, not order. Buffered playback subscribes in ascending order is related: it makes buffered <moq-watch> media ask ascending.

Validation

This PR only changes a quest file, so there is no behavior to exercise. quest check passes. I checked the orders it describes against the source: Rust poll_recv_group, next_owed, and Reader::poll_lowest; JS #tryRecvGroup, bufferInsert, and ResumeReader.tryGroup; the twin tests it names; and the draft's Group Order section.

Models

Size: L
Implementer: Claude, claude-opus-5-5, high effort
Implementer: Claude Code, claude-opus-5-5, high effort (iterate, L)

🤖 Generated with Claude Code

(Written by Claude Opus 5.5 with high)

Review

Rewritten by quest review after each round.

  • Head: 0d725ce

  • Base: origin/main at 8e2ae08

  • Risk: low, The change only adds one new quest plan file (quest/m1/arrival-group-order.md, 42 lines) and touches no code, API, wire format, release script, or high-risk path; nothing a consumer or peer relies on reads it, and reverting the file fully undoes it, which RISK.md classes as low.

  • Classified: low by Claude Code, claude-haiku-5-5, low effort, session ebdd4d71-ca13-42c8-99a2-09d4bffa0053

  • Reviewer: Codex, gpt-6.1-sol, xhigh effort

  • Session: 01a20bbc-9248-7493-bcf4-a451fe6db47c, round 1

  • Score: 10/10, The plan covers ordering, consumer migration, documentation, and model updates without introducing a blocking defect.

  • Rounds: 2; first round 0; findings 0: fixed 0, refuted 0, open 0

  • Findings: none

…t's Group Order

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review November 24, 2026 04:01
@coderabbitai

coderabbitai Bot commented Nov 24, 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 7 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

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9af9bce5-3bc7-425f-b519-b3dd860e72ac
Commits

Reviewing files that changed from the base of the PR and between 8e2ae08 and 0d725ce.

Files selected for processing: 1

  • quest/m1/arrival-group-order.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

@kixelated
kixelated enabled auto-merge November 24, 2026 04:02
pullfrog[bot]
pullfrog Bot previously approved these changes Nov 24, 2026

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Approach: sound. The quest is scoped to widening re-offers, and it defers the separate plain-buffered-order question to the maintainer.

Reviewed changes: the single new quest plan file.

  • quest/m1/js-reoffer-order.md: plans JS parity with Rust's next_owed newest-first order for groups a widening takes back, and restores order assertions in both test twins. The referenced symbols (#reoffer, #tryRecvGroup, #tryResumed, next_owed, the Rust test) and the /quest/m3/buffered-ascending.md link all exist.

Pullfrog  | View workflow run | Using claude-sonnet-5-5 | 𝕏

@kixelated
kixelated added this pull request to the merge queue Nov 24, 2026
@kixelated

Copy link
Copy Markdown
Collaborator Author

Maintainer decision (via /quest-run, 2026-11-24): buffered groups (arrived, unread, no widening): ✅ (c) serve them in Group Order in both languages, newest first unless the subscription is ascending (rejected: (a) keep both orders and document; (b) move JS to Rust's arrival order). This changes Rust's tested arrival order too, so fold it into this quest and resize it if needed.

(Written by Claude Opus 5.5)

@moq-bot
moq-bot Bot removed this pull request from the merge queue due to a manual request Nov 24, 2026
@moq-bot

moq-bot Bot commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

quest land watch: ended this pull request's pick, taking it out of the queue, since its head db6ef2b is held by decision by kixelated: Maintainer decision (via /quest-run, 2026-11-24): buffered groups (arrived, unread, no widening): ✅ (c) serve them in Gr (#9522 (comment)). Push a fix, or answer each by a thread reply or a comment linking its review or decision, then land it again.

(written by quest land watch)

kixelated and others added 2 commits November 23, 2026 20:06
…val-order quest

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

Copy link
Copy Markdown
Collaborator Author

Applied in 0d725ce: the quest (renamed to quest/m1/arrival-group-order.md, now [L] and covering Rust and JS) has an arrival read serve both buffered and re-offered groups in Group Order, newest first unless ascending. Its Plan records the decision with (a) and (b) rejected, lists the twin tests that change (including ordered_and_arrival_cursors_are_independent and the JS replay test), and extends the work to both resume readers (poll_lowest / #lowest) and the verify-resume model. The Waiting item is gone. The lite-07 draft needs no change: its Group Order section already says a publisher SHOULD transmit pending Groups in Group Order.

(Written by Claude Opus 5.5 with high)

@kixelated kixelated changed the title quest(m1): a JS arrival read offers what a widening takes back in Rust's Group Order quest(m1): an arrival read serves buffered and re-offered groups in Group Order, in Rust and JS Nov 24, 2026

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes since the prior pullfrog review (db6ef2b): the quest plan was widened to cover buffered groups.

  • Renamed and rescoped the quest to quest/m1/arrival-group-order.md ([L]), folding in the 2026-11-24 maintainer decision to serve buffered groups in Group Order in both languages.
  • Extended the plan with updated test expectations, the Rust owed-set pick, the JS buffer walk, resume readers and the verify-resume model, doc updates, a caller audit, and the Impact migration note.

Pullfrog  | View workflow run | Using claude-sonnet-5-5 | 𝕏

@kixelated
kixelated added this pull request to the merge queue Nov 24, 2026
Merged via the queue into main with commit 7ddad7b Nov 24, 2026
9 checks passed
@kixelated
kixelated deleted the quest-plan/js-group-order branch November 24, 2026 04:53
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