Repository navigation
One broadcast's failure never ends export archive for the others - #9040
Conversation
Quest-Claim: d819428e3bc5fd08
…thers A recording that fails, or a path a handler refuses, is logged and dropped; every other broadcast keeps recording. Only the origin failing or a task panicking ends the export. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou'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. View limit details
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. |
|
Maintainer pick: (Written by Claude Opus 5.5 with high) |
There was a problem hiding this comment.
ℹ️ No critical issues — one design gap and a stale test comment, both minor.
Approach: sound — the isolation belongs at the export's own task boundary, where each path and each recording is already its own task, so a warn in the select loop beats teaching moq-archive to classify its errors.
Reviewed changes
- Recording isolation —
recordings.join_next()logs a failed recording instead of propagating it, and still callsrunning.done, so an instance re-announced during its recording records again; a panicked task still ends the export. - Follower isolation — a
followfailure now logs and drops that path instead of ending the export; origin close still returns quietly and a follower panic still fails. - Docs —
doc/bin/cli.mdand theexport/followdoc comments state the log-and-drop behavior, and the finished quest file is removed. - Tests — three scenario tests, and the old
a_refused_path_fails_the_exportis replaced by its inverse.
ℹ️ A path dropped on a refusal is never followed again
A recording that fails is retried once the instance is announced anew, but a path whose follower fails has no equivalent: Following is designed to recover from a refusal by itself, and discarding it throws that away. For a long-lived archive this means one transient refusal silently stops that broadcast from ever being recorded again while it stays announced.
Technical details
# No retry for a path (or recording) dropped by its first error
## Affected sites
- `rs/moq-cli/src/archive.rs:112-114` — the follower's `Err` warns and the path is dropped; nothing restarts it. `Following::poll_available` already implements the retry (`rs/moq-net/src/model/follow.rs:296-299`): after a refusal "the next call then waits for the serving route to change ... instead of asking the refusing route again", so continuing the loop on a non-`Closed` error would wait and resume without spinning.
- `rs/moq-cli/src/archive.rs:104-106` — `Available` is ignored, and a takeover that keeps the path present is a `Restart`/availability event rather than a new `Present` (`rs/moq-net/src/model/announced.rs:30-34`, `61-77`), so only `Absent`/`Offline` followed by `Present` can revive the path.
- `rs/moq-cli/src/archive.rs:130-132` — `running.done` removes the instance after a failure, and the follower re-sends it only when the broadcast changes, so a transient `record` failure (a request refusal, or a store failure surfaced by `moq_archive::Producer::run`) also goes unretried while that instance stays announced.
## Required outcome
- Decide whether the archive may silently miss a broadcast for the rest of the process after one transient error.
- If not, the smallest change is to keep `follow`'s loop going on a non-`Closed` error; covering a transient recording failure would need its own bounded retry.
## Open questions for the human
- Is "dropped" meant to last until the path cycles absent→present, or only until the serving route changes again?
deepseek-v4.1-flash | 𝕏
|
quest land watch: ended this pull request's pick, disarming its auto-merge, since its head 95ed1e4 is held by finding by pullfrog[bot]: This test passes against the pre-fix code, and the reason is worth pinning here: (written by quest land watch) |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This re-review covers only the single commit pushed since the last review (ad78a72), which touches a test's name and its doc comment and nothing else.
- Renamed the abort test —
a_dropped_publisher_leaves_the_others_recordingis nowan_aborted_track_leaves_the_others_recording, naming what the test actually exercises. - Corrected its doc comment — it now states that an aborted track is recorded as an end and
run()returnsOk, so the test never reaches the new failure isolation. Confirmed againstrs/moq-archive/src/producer/track.rs:255-272:Event::Next(Err(err))setsfailed,error(&err)builds the end, andrun()returnsOk(end), so the changedif let Errbranch is not exercised. This supersedes the stale claim that a dropped session does not close cleanly.
No behavior change; the earlier inline concern is addressed and resolved.
deepseek-v4.1-flash | 𝕏

Summary
moq export archivenow records every broadcast independently. A recording that fails (a track re-added with another priority or timescale, reused group sequences, a listing error) is logged atwarnand dropped, and a path whose follower fails (a handler refuses it) is dropped too. Every other broadcast keeps recording. Only the origin failing (announcements end) or a task panicking, which is a bug and stays loud, ends the export. A failed instance that is announced anew records again, sinceRunning::donestill runs.The quest asked to check whether an ordinary publisher disconnect surfaces as a recording error. It does not: a dropped session closes cleanly, and a track aborted with an error code is recorded as an end by
moq_archive::Producer::run, which returnsOk(rs/moq-archive/src/producer/track.rs:255-269).an_aborted_track_leaves_the_others_recordingpins that the export keeps running over such a publisher; it passes on the old code too, since neither case reaches the failure branch (probed: norecording endedon that test).Removes the quest file (
archive-isolate), which this PR finishes. Updatesdoc/bin/cli.md.Public API
CLI behavior only: a failed recording no longer exits
moq export archive. No Rust, JS, or binding API; no wire change. No!.Caused by
export archivewith one failure ending every recording (found by audit)Validation
cargo test -p moq-cli archive: 10 pass. Two new tests (a_failed_recording_leaves_the_others_recording,a_refused_path_leaves_the_others_recording) fail with the old?propagation restored and pass with the fix;a_failed_recording...stores a mismatched timescale.infofor one broadcast, then checks a second and a later third both write.endand the export task is still running. The old refused-path test, which asserted the export fails, is replaced.cargo clippy -p moq-cli --all-targets -D warningsandcargo fmtclean;quest checkok.moqbinary against a live relay; the tests driveexportitself over a real origin and a file store.Models
Size: S
Implementer: Claude Code, claude-sonnet-5-5, unknown effort (arm B)
Implementer: Claude Code, claude-sonnet-5-5, unknown effort (iterate, XS, arm B)
Review
Rewritten by
quest reviewafter each round.Head: ad78a72
Base: origin/main at 61f8956
Risk: medium,
the base has no RISK.md to name what is always high or customer-facing, so every change is mediumClassified: medium by default
Reviewer: Codex, gpt-6.1-sol, medium effort
Session:
01a1ec36-1577-79a0-8a74-6a4d50b51cd6, round 2Score: 9/10,
The incremental change accurately renames and documents the aborted-track test without changing behavior; no actionable defects were found, and builds and tests were not run as instructed.Rounds: 2; first round 0; findings 0: fixed 0, refuted 0, open 0
Findings: none