Skip to content

refactor: finish the m0 simplification audit - #6108

Merged
kixelated merged 11 commits into
mainfrom
quest/m0/audit-simplify
Oct 22, 2026
Merged

kixelated merged 11 commits into
mainfrom
quest/m0/audit-simplify

Conversation

@kixelated

@kixelated kixelated commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The simplification audit's second checkpoint (#6049) listed six private items still to do. Three of them did not wait on any open work.

Approach

Each change has its own commit. All are private and keep behavior the same:

  • moq-c: the session, server, dynamic, broadcast-request, and raw-track slabs no longer wrap each entry in an Option that is never None. The session, server, and dynamic entries now reuse Task instead of carrying their own copy of the close sender and callback. (-48 lines)
  • moq-net: lite's RouteWake and the origin's TrackReady were the same waker. They are now one private util::QueueWake<K>, which queues its key once per burst of wakes. RequestWaker and FetchWake stay separate because they write into a different kind of collection.
  • js/net: three publisher loops built the same "listen for the next change to these signals before reconciling" promise by hand, each marked with a TODO. They now share a private util/change.ts nextChange. Signal.race doesn't fit here for two reasons: it only starts listening when awaited, and its value would hit the loops' !next exit.
  • Quest: finishes the m0 run and adds its successor at the end of m1's Required. The successor records the three items still waiting on open work, the maintainer proposals from refactor: dedupe IETF request errors and binding-layer plumbing #6049 not yet planned, what was kept on purpose, and the largest-module baselines.

Impact

  • Public API: none. Every touched item is crate- or package-private, and the C ABI is unchanged.
  • Wire: none.

Open decisions

  1. Finish the run now, or add a third checkpoint? Three items still wait on open work. ietf/session.rs start() and ietf/adapter.rs vs kio::Queue wait on #5762, and the lite/IETF GroupServe driver waits on #5928.
    • ✅ A (recommended): finish the run and list the three items under "Check first" in the m1 successor, so m0 isn't held by unrelated PRs. Both PRs were still open on 2026-10-20, so B would hold m0 on unrelated work. Confirmed by the maintainer.
    • B: keep the m0 quest open as a third checkpoint until those PRs land.
    • C: give each item its own small quest that Requireds close-tail drain or compressed tracks, so the work starts as soon as those land rather than at the end of m1.
  2. Maintainer proposals from refactor: dedupe IETF request errors and binding-layer plumbing #6049 (copied into the successor, none implemented): a moq-video raw-frame publisher (yes), Background moved into moq-tokio (yes, after the publisher), Python connect = Client (yes), Swift typealiases (no), Kotlin AnnounceConsumer cancel behavior (keep). Each "yes" needs a /quest-plan.

Validation

  • cargo clippy -p moq-c -p moq-net --lib --tests -D warnings: passed. --all-targets fails only in rs/moq-net/benches/group.rs (Instant::now disallowed). This branch doesn't touch that file, so the failure predates it.
  • cargo test -p moq-c -p moq-net --lib --tests: moq-c 124 passed, moq-net 2283 passed, plus the integration targets.
  • js/net: bun run check, biome on the touched files, and bun test (2412 passed).
  • quest check: passed.
  • just check against origin/main: passed (7809 Rust tests, js check and test, and every other selected module).
  • Not run: interop, because no wire bytes change.

Next step

Nothing is left to do on the branch. Decision 1 is confirmed; marking ready with /quest-ready.

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

kixelated and others added 5 commits October 20, 2026 15:46
The session, server, dynamic, broadcast-request, and raw-track slabs wrapped
every entry in an Option that was never None. The session, server, and
dynamic entries also hand-rolled Task's close sender and callback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
lite's RouteWake and the origin's TrackReady were the same waker: queue a key
once per burst of wakes, unmarked when the owner pops it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Three publisher loops hand-built the same promise that listens for the next
change to several signals before reconciling, each marked with a TODO.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated marked this pull request as ready for review October 21, 2026 00:06
@coderabbitai

coderabbitai Bot commented Oct 21, 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 13 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: 278dfba1-3b99-4f90-b523-e07ce9f369fa
📥 Commits

Reviewing files that changed from the base of the PR and between d44813c and 0bce953.

📒 Files selected for processing: 15
  • js/net/src/ietf/publisher.ts
  • js/net/src/lite/publisher.ts
  • js/net/src/util/change.ts
  • quest/m0/README.md
  • quest/m0/audit-simplify.md
  • quest/m1/README.md
  • quest/m1/audit-simplify.md
  • rs/moq-c/src/consume.rs
  • rs/moq-c/src/origin.rs
  • rs/moq-c/src/server.rs
  • rs/moq-c/src/session.rs
  • rs/moq-net/src/lite/subscriber.rs
  • rs/moq-net/src/model/origin.rs
  • rs/moq-net/src/util.rs
  • rs/moq-net/src/util/wake.rs
  • 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 21, 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 🔄 Running since 2026-10-22T15:55:10.213470Z 0bce953 New commits
ℹ️ 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 added this pull request to the merge queue Oct 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 21, 2026
…6108

# Conflicts:
#	quest/m0/README.md
#	quest/m1/README.md
#	rs/moq-c/src/consume.rs
@kixelated
kixelated added this pull request to the merge queue Oct 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 21, 2026
kixelated and others added 2 commits October 21, 2026 11:02
Compressed tracks landed in #5928, so the GroupServe item no
longer waits on it.

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

Copy link
Copy Markdown
Collaborator Author

@codex review

Merged origin/main. The conflict in rs/moq-c/src/origin.rs kept main's per-request driver tuples, the new prepared slab, and the route-less dynamic (dropping dynamic_update), and applied this PR's never-None slab simplification to all of them.

(Written by Claude Opus 5.5)

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 2408c0da92

ℹ️ 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
kixelated added this pull request to the merge queue Oct 21, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 22, 2026
@kixelated

Copy link
Copy Markdown
Collaborator Author

Merged origin/main at 7590e1126b8a466f7b2a4cb7601158e7d6829388. The only conflict was the quest/m0/README.md Required list: main finished the compile time audit and this PR finishes the simplification audit, so both lines are dropped. The code auto-merged; this PR's hunks are unchanged from the reviewed 2408c0da92.

just check: nix flake check fails locally only on the runner-image user-namespace limit (unshare: write failed /proc/self/uid_map); the remaining steps (markdown, shell, toml, gh, Rust and JS tests) pass when run by hand.

Not enqueued yet: main's moq-net lib-test build is broken (E0061 in a_subscribe_drop_ends_an_arriving_group_with_its_code, a leftover argument from #6107), so this PR's queue run would fail on it. The fix is the draft #6223. With that one-liner applied locally, all 8788 Rust tests and the JS tests pass.

(Written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 22, 2026
# Conflicts:
#	quest/m0/README.md
#	quest/m1/README.md
@kixelated
kixelated added this pull request to the merge queue Oct 22, 2026
@kixelated

Copy link
Copy Markdown
Collaborator Author

Merged origin/main again to clear the quest-only conflicts left after moq-dev/moq#6092:

  • quest/m0/README.md: kept main's ordering (broadcast epochs already moved up, m0 audit-perf moved to m1, CI cost added) and dropped the m0 simplification audit entry, which this PR finishes.
  • quest/m1/README.md: dropped the m1 docs audit entry, finished in moq-dev/moq#6170, and kept this PR's m1 simplification audit successor.

quest check and just check pass (js, rs, quest, drill). The only failure was nix flake check, which hits a local user-namespace limit. This is a trivial conflict fix, so it's re-queued at ba7c403 without a new review.

(Written by Claude Opus 5.5)

@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 22, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated

Copy link
Copy Markdown
Collaborator Author

Merged origin/main (mechanical). The only conflict was quest/m0/audit-simplify.md (deleted here, link-edited on main); kept the deletion and carried main's intent into quest/m1/audit-simplify.md: the dead-code audit link now points at /quest/m2/audit-dead-code.md, and the "waits on close-tail drain" notes are dropped since that landed in moq-dev/moq#5762. No code changes beyond the merge.

Checks: quest check (and --base origin/main), cargo check --workspace --all-targets, cargo clippy --workspace --all-targets -D warnings, cargo test -p moq-net -p moq-c, js/net typecheck/tests/biome, all pass.

(Written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 22, 2026
@kixelated
kixelated added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit a9a8558 Oct 22, 2026
11 checks passed
@kixelated
kixelated deleted the quest/m0/audit-simplify branch October 22, 2026 19:17
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