Skip to content

feat(lite): mark initial announcements with ordered SYNCED - #6029

Merged
kixelated merged 7 commits into
mainfrom
quest/m1/announce-synced
Oct 20, 2026
Merged

kixelated merged 7 commits into
mainfrom
quest/m1/announce-synced

Conversation

@kixelated

@kixelated kixelated commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

A numeric initial Active Count cannot reliably mark discovery completion while removals and live churn change the announcement queue. lite07-wip needs an ordered completion boundary that cannot be starved by churn or overtaken by authorization changes.

Approach

Replace lite07-wip ANNOUNCE_OK Active Count with one empty SYNCED event, sent after the first drained queue or N emitted snapshot events. Rust and JS collapse pending changes by key while retaining insertion order. Rust pending storage is bounded by pending keys using hashlink 0.12.2. Regrant additions and withdrawals use that same queue so they cannot overtake remaining initial entries. Older versions retain their count-based behavior and bytes.

Keep the existing public synced APIs. Add deterministic gated Rust/JS tests for initial removals, churn, relay discovery, exactly one marker and legacy behavior, plus Rust regrant growth/shrink regressions and bounded pending-key churn. Update the lite draft and existing nightly fanout benchmarks.

Retires the Announce SYNCED quest (quest/m1/announce-synced.md) and removes its references from the m1 README, lite07-finalize.md Required, and the TRACKS archive note.

Impact

  • Public API shape: unchanged. Rust origin pending events now follow insertion order instead of lexicographic order.
  • Wire: unpublished lite07-wip omits Active Count and adds Type 4, Length 0 SYNCED on the ordered announcement stream. Published lite-05/06 and the IETF ActiveCount extension are unchanged.
  • No enum collision with moq-dev/moq#6030: it adds TRACK_INFO and SUBSCRIBE_UPDATE fields and allocates no announce type. Both PRs add a moq-lite-07 changelog bullet, so whichever lands second gets a trivial textual conflict there.
  • SYNCED has an empty reusable shape for TRACKS. This does not implement TRACKS or choose its public handler API.
  • No package version bump.

Decisions

  • Retire the quest in this PR now that the full browser interop passes.
    • ✅ Delete the quest here (recommended: the work is complete; it only stayed because browser interop was blocked)
    • Keep it for a separate cleanup PR

Validation

Head after merging origin/main (conflicts were import lists only: main dropped hasStreamCount, this PR adds hasSynced):

  • just check: passed.
  • just drafts check: passed.
  • just test interop --all: all checks passed, including the browser (Chromium) cells, rust-denied rows, CLI FETCH, finite tails and lite-05/06/07-wip drop checks.
  • quest check: 425 documents ok.

Benchmark sweeps from the previous round (paths unchanged by the merge): Rust pending-churn over routes 10/1000 x readers 1/100, about 2.5 us for one reader to 352 us for 1000 routes/100 readers; JS stalled-sender over routes 8/32/128 x readers 1/8/32, 128 routes/32 readers about 2100 us per churn pair. No speedup claim.

Alternatives

Retaining a frozen count leaves discovery completion vulnerable to queue changes. Buffering a full snapshot delays incremental delivery. An insertion-ordered keyed queue keeps collapse semantics while placing the agreed N-event boundary on the stream.

Follow-ups

None required. TRACKS reuses the SYNCED shape when it is picked up.

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

kixelated and others added 4 commits October 19, 2026 18:05
Preserve insertion-order collapse for stalled announcement readers and retain Active Count on published drafts. Existing Rust and JS synced signals consume the new empty lite-07 boundary.

Checkpoint: JS net suite 2220 passed, 2 skipped; targeted Rust boundary/order suite 19 passed before final additions; draft syntax check passed. Full frozen Rust net suite and remaining branch/interoperability gates are running or pending.

Co-Authored-By: GPT-6.1-Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1-Sol <noreply@openai.com>
Regrant growth and withdrawals now reuse the lite-07 cursor queue instead of bypassing its insertion order. Insert SYNCED at the exact emitted-event boundary, including buffered bursts.

Both gated regressions failed before their fixes. The final focused sync, initial-set, and grant suite passes all 95 tests. Earlier broad check and interop runs were stopped with exit 143 before changing production source; frozen-head replacements follow.

Co-Authored-By: GPT-6.1-Sol <noreply@openai.com>
@kixelated

Copy link
Copy Markdown
Collaborator Author

Final checkpoint: 8f9eb9060879949c308072c72fa942cb094cc60b. just check, draft validation, the 95 focused sync/initial/grant tests, nightly fanout benchmark sweeps and the explicit 32-cell native interop matrix passed. Regrant growth and partial-shrink regressions each reproduced the earlier ordering bug before passing with queued replay/withdrawals.

Required just test interop --all exited 1 because pinned Chromium 1248 cannot load libglib-2.0.so.0. Browser startup failures and dependent timeouts remain unvalidated; the original quest is retained. The PR body records exact available native scope and earlier interrupted/port-conflict attempts separately.

Existing synced APIs are unchanged. Wire changes apply only to unpublished lite07-wip; published versions retain Active Count bytes. No TRACKS API or unresolved policy decision. All owned validation processes ended and the shared interop slot was released. This PR remains draft.

(written by GPT-6.1-Sol)

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 20, 2026 06:24
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 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-20T09:12:31.925959Z 45db049 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.

@coderabbitai

coderabbitai Bot commented Oct 20, 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 1 minute.

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: ad985bdf-d05b-4324-869d-3a7cf9617f46
📥 Commits

Reviewing files that changed from the base of the PR and between 697441d and 45db049.

⛔ Files ignored due to path filters: 1
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing: 22
  • Cargo.toml
  • drafts/draft-lcurley-moq-lite.md
  • js/net/bench/broadcasts.ts
  • js/net/src/lite/announce.test.ts
  • js/net/src/lite/announce.ts
  • js/net/src/lite/publisher.test.ts
  • js/net/src/lite/publisher.ts
  • js/net/src/lite/subscriber.ts
  • js/net/src/lite/version.ts
  • quest/m1/README.md
  • quest/m1/announce-synced.md
  • quest/m1/archive/tracks.md
  • quest/m1/lite07-finalize.md
  • rs/moq-net/Cargo.toml
  • rs/moq-net/benches/origin.rs
  • rs/moq-net/src/lite/announce.rs
  • rs/moq-net/src/lite/publisher.rs
  • rs/moq-net/src/lite/subscriber.rs
  • rs/moq-net/src/lite/test_transport.rs
  • rs/moq-net/src/lite/version.rs
  • rs/moq-net/src/model/origin.rs
  • rs/moq-net/tests/integration/synced.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.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated
kixelated added this pull request to the merge queue Oct 20, 2026
Merged via the queue into main with commit 5284d96 Oct 20, 2026
4 checks passed
@kixelated
kixelated deleted the quest/m1/announce-synced branch October 20, 2026 15:55
kixelated added a commit that referenced this pull request Oct 20, 2026
Resolve against refresh demand (#6030), announce SYNCED (#6029) and the
ietf extension (#6058): TRACKS_ADD now carries TRACK_INFO's Refresh, the
draft shares one SYNCED section between the Announce and Tracks streams,
and the ietf draft keeps the Track Stream for listed tracks since
TRACKS_ADD has no TRACK_PROPERTIES.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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