Skip to content

quest: plan the broadcast lifecycle epic from the linger audit - #6570

Merged
kixelated merged 5 commits into
mainfrom
claude/quest-broadcast-lifecycle
Oct 24, 2026
Merged

kixelated merged 5 commits into
mainfrom
claude/quest-broadcast-lifecycle

Conversation

@kixelated

@kixelated kixelated commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

"Linger" names six unrelated timers, and the important one (keeping a finished broadcast up) is inconsistent across languages:

  • Duration. It comes from track max-age, which describes how long a superseded group stays fresh and never the newest one. The JS publish catalog declares Number.MAX_SAFE_INTEGER, so every browser publisher lingered 30s; Rust catalogs declare none.
  • Start time. The deadline starts at a different event in Rust (first poll), JS (wait call), UniFFI (finish) and C (the caller's clock).
  • Supersession. Only Rust ends the linger on a newer epoch. In JS a finished broadcast comes back after its replacement leaves.
  • TS follower. It classifies failures with a 1s CLOSE_GRACE timing guess, and --linger also bounds the replacement catalog fetch.

broadcast::Producer::finish never reaches the wire: ANNOUNCE already says online/offline, and a track FIN already says the content ended.

Plan

A new m1 epic, broadcast lifecycle, ranked just ahead of the API audit:

  • [M] Retention: a moq-mux helper retains a finished broadcast for a fixed --linger (default 30s, counted from the end) for moq-cli, the gateways and moqsink.
  • [L] Stateless broadcasts (blocked on retention): delete Finish, its linger and finished-only supersession from moq-net, @moq/net, moq-ffi, moq-c and every binding.
  • [M] TS follow: rename export ts|srt --linger to --follow <duration>, drop the catalog deadline, and classify failures by cause instead of CLOSE_GRACE.
  • [S] SRT end: a silent SRT peer aborts instead of finishing.
  • [XS] Timers: delete the unused ConnectionProps.linger, and fix stale timer references.

Aligned quests:

  • api-audit/cli-flags: moq-dev/moq#6522 narrows to removing the opt-in booleans, without always finishing through Finish.
  • sink-restart-follow, api-audit/README and m2/ietf-finish now point at the new names.

Public API: none in this PR (quests only). Wire: none.

Decisions

Should moq-net keep a broadcast-level finish?

  • ✅ Stateless broadcast: delete Finish, linger and supersede; content end = track FIN; no wire change
  • Keep finish with one contract
  • BROADCAST on the wire

TS follower's replacement catalog bound?

  • ✅ No separate bound: wait until the catalog arrives or the replacement withdraws
  • Its own flag

JS ConnectionProps.linger?

  • ✅ Delete the prop
  • Last handle wins

What keeps moq-cli and the gateways up after a clean end?

  • Drain only
  • ✅ App-level retention (moq-mux/moq-cli, not moq-net)

Align moq-dev/moq#6522?

  • ✅ Narrow it: keep the renames and the removal of the linger properties, drop always-finish
  • Land as is

Rename the remaining "linger" names?

  • Keep both
  • Rename the export flag
  • ✅ (maintainer) Rename export to --follow <timeout>

Where should the work live?

  • ✅ New m1 epic
  • Under api-audit
  • m2

Retention home and default?

  • ✅ moq-mux, default 30s, --linger <duration> on publishing subcommands
  • moq-mux, default 0
  • moq-cli only

A newer instance appears while retaining?

  • End on a new instance
  • ✅ Ignore it (the old one may be announced again; readers see its finished catalog and stop)

Shape of the export flag?

  • ✅ --follow <duration>, default 0 = don't follow; Rust with_follow
  • --follow bool, no timeout

Which publishers retain by default?

  • CLI + gateways only
  • ✅ Also moqsink (browser and bindings close)

Docs?

  • ✅ Inline only
  • New lifecycle page

Split the stateless work?

  • ✅ Two quests: retention first, then the moq-net deletion
  • One quest

🤖 Generated with Claude Code

(Written by Claude Opus 5.5)

Broadcasts lose their finished state in moq-net; retention becomes a fixed
moq-mux policy; the TS export wait becomes --follow and stops guessing with a
1s grace; SRT tells a clean end from a failure; the unused pool linger prop
goes. Aligns cli-flags, binding-trim, sink-restart-follow and ietf-finish.

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

coderabbitai Bot commented Oct 23, 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 23 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: f49eccf0-d1b1-42f7-b09e-a378f8773a2b
📥 Commits

Reviewing files that changed from the base of the PR and between b103413 and ea36608.

📒 Files selected for processing: 12
  • quest/m1/README.md
  • quest/m1/api-audit/README.md
  • quest/m1/api-audit/cli-flags.md
  • quest/m1/api-audit/migrate.md
  • quest/m1/broadcast-lifecycle/README.md
  • quest/m1/broadcast-lifecycle/retention.md
  • quest/m1/broadcast-lifecycle/srt-end.md
  • quest/m1/broadcast-lifecycle/stateless.md
  • quest/m1/broadcast-lifecycle/timers.md
  • quest/m1/broadcast-lifecycle/ts-follow.md
  • quest/m1/sink-restart-follow.md
  • quest/m2/ietf-finish.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 23, 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-23T23:39:56.800287Z ea36608 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.

…e-2c08b3

# Conflicts:
#	quest/m1/api-audit/binding-trim.md

@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: 7f913e59b6

ℹ️ 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/m1/broadcast-lifecycle/stateless.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated

Copy link
Copy Markdown
Collaborator Author

@codex review

(Written by Claude Opus 5.5)

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 4ad6c62884

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

Summary before merge:

  • Adds the m1 broadcast lifecycle epic with five quests: retention in moq-mux, stateless broadcasts (blocked on retention), the TS export --follow rename and failures classified by cause, SRT clean vs failed end, and timer cleanups.
  • Aligns api-audit/cli-flags, api-audit/migrate, the API audit README, sink-restart-follow, and m2/ietf-finish with the new names and ownership.
  • Merged main: api-audit/binding-trim finished upstream in moq-dev/moq#6473, so its edit and link were dropped.
  • Codex finding (migrate quest documenting the deleted linger handle): fixed in 4ad6c62.
  • Every decision was made by the maintainer interactively; they're listed in the PR description with ✅. moq-dev/moq#6522 was asked to narrow accordingly.

quest check --base origin/main passes.

(Written by Claude Opus 5.5)

@kixelated
kixelated added this pull request to the merge queue Oct 23, 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 23, 2026
kixelated and others added 2 commits October 23, 2026 16:36
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@kixelated
kixelated added this pull request to the merge queue Oct 23, 2026
@kixelated

Copy link
Copy Markdown
Collaborator Author

Merged origin/main (one conflict in quest/m1/README.md: kept both sides entries) and dropped the link to the deleted public-model quest. quest check --base origin/main and just check pass. Auto-merge enabled on ea36608.

(Written by Claude Sonnet 5.5)

kixelated added a commit that referenced this pull request Oct 24, 2026
…opt-ins

Per the linger audit (#6570), moqsink EOS and <moq-publish>
keep closing at the end. Remove the drain code only the unreleased opt-ins
reached; publisher retention moves to the broadcast lifecycle epic.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged via the queue into main with commit 05a9e5b Oct 24, 2026
9 checks passed
@kixelated
kixelated deleted the claude/quest-broadcast-lifecycle branch October 24, 2026 01:47
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