moq-cli: rename --output to --format, --name to --broadcast, add accept subcommand#1395
moq-cli: rename --output to --format, --name to --broadcast, add accept subcommand#1395kixelated wants to merge 2 commits into
Conversation
…pt subcommand - Rename `--output` to `--format` on subscribe for symmetry with publish; OutputFormat enum becomes SubscribeFormat - Rename `--name` to `--broadcast` on every subcommand; old `--name` kept as a hidden alias for backwards compatibility - `--max-latency` now accepts humantime durations (e.g. `500ms`, `1s`) instead of bare millisecond integers - Add new `accept` subcommand: server-side counterpart of `subscribe`. Runs a relay and writes the first incoming broadcast's media to stdout - Add doc comments to every Command variant so `--help` no longer leaks the flattened struct's about text - Update README to match the actual CLI surface (was several releases out of date) Bumped moq-cli to 0.8.0 since the flag rename and parser change are breaking. release-plz uses cargo-semver-checks which only inspects library API, so binary CLI surface changes need a manual minor bump. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThis PR releases moq-cli version 0.8.0 with three major changes: a new 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@rs/moq-cli/src/main.rs`:
- Around line 52-53: Update the doc comment for the Accept enum variant so it
accurately describes current behavior: state that it runs a relay and writes the
media of the first incoming broadcast that matches the name provided via
--broadcast to stdout (rather than any "first incoming broadcast"); edit the
comment on the Accept variant in main.rs to mention the --broadcast filter
explicitly and that it waits for the specified broadcast name.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 18f310ba-993d-4ae0-91fd-038fd4827f32
⛔ Files ignored due to path filters (1)
Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (5)
rs/moq-cli/Cargo.tomlrs/moq-cli/README.mdrs/moq-cli/src/main.rsrs/moq-cli/src/server.rsrs/moq-cli/src/subscribe.rs
| /// Run a relay and write the first incoming broadcast's media to stdout. | ||
| Accept { |
There was a problem hiding this comment.
Clarify accept help text to reflect --broadcast filtering.
The current text says "first incoming broadcast", but runtime behavior waits for the broadcast named by --broadcast. Please make that explicit to avoid misleading --help output.
Proposed wording update
- /// Run a relay and write the first incoming broadcast's media to stdout.
+ /// Run a relay and write media for the incoming `--broadcast` to stdout.As per coding guidelines, "Comments must reflect the current state of the code, not its history. Don't write historical context; describe what the code does today or delete the comment."
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| /// Run a relay and write the first incoming broadcast's media to stdout. | |
| Accept { | |
| /// Run a relay and write media for the incoming `--broadcast` to stdout. | |
| Accept { |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@rs/moq-cli/src/main.rs` around lines 52 - 53, Update the doc comment for the
Accept enum variant so it accurately describes current behavior: state that it
runs a relay and writes the media of the first incoming broadcast that matches
the name provided via --broadcast to stdout (rather than any "first incoming
broadcast"); edit the comment on the Accept variant in main.rs to mention the
--broadcast filter explicitly and that it waits for the specified broadcast
name.
Patch bump only, matching the project's existing version policy. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
--output→--formatonsubscribefor symmetry withpublish.OutputFormatenum becomesSubscribeFormat.--name→--broadcaston every subcommand; the old--nameis kept as a hidden alias for backwards compatibility.--max-latencynow accepts humantime durations (500ms,1s) instead of a bare millisecond integer.acceptsubcommand: the server-side counterpart ofsubscribe. Runs a relay and writes the first incoming broadcast's media to stdout.Commandvariant so--helpno longer leaks the flattened struct's about text onserve/publish.CLI surface now:
```
moq-cli serve --broadcast N [--dir D] <fmp4|avc3|hls --playlist P>
moq-cli accept --broadcast N [--dir D] --format fmp4 [--max-latency 500ms]
moq-cli publish --url U --broadcast N <fmp4|avc3|hls --playlist P>
moq-cli subscribe --url U --broadcast N --format fmp4 [--max-latency 500ms]
```
Manual patch bump to `0.7.22` since release-plz uses cargo-semver-checks, which only inspects library API. Binary CLI surface changes aren't auto-detected, so the bump won't happen on its own.
Test plan
🤖 Generated with Claude Code