2.8 KiB
2.8 KiB
Quality gates: incremental-captures
Criteria beyond the automatic tests. Each gate is pass/fail by reading the code. Tests live next to the modules they cover (fsdy, capture, capture_store, playback, cbd-tui).
Skipped playable (D1)
[playable] skipped = trueparses;skipped = false,skippedcombined with another field, and an empty table are typedPlayableCardinality-style errors — never panics.from_trackon anis_skippedwire track writes a skipped playable (queue persistence and bookmarks keep skipped-ness);to_tracksetsis_skippedand keeps the lib path.get_urls_for_trackon a skipped file is a typed error, not empty-vec success.
Incremental capture (D2)
- Download captures write into the final folder with no tmp/swap and never delete existing entries; bookmark captures keep tmp-and-swap byte-identically (their existing tests pass unchanged).
- Enumeration enforces
max_dirs/max_tracksbefore any download; the byte budget counts only bytes downloaded this run. - Reuse rule: parseable toml + non-skipped playable (+ existing file for
fileplayables) is not re-downloaded; skipped/broken/missing-audio entries are re-captured. - Uncapturable tracks write skipped tomls (no more silent omission); real download failures abort the run but keep prior writes.
- Stream URLs and cookies never appear in errors, logs, or progress events (only names, paths, counts).
Progress + RPC (D4)
CaptureLibraryNodereplies after validation (name, store enabled, download blessing) with the existing status mapping; the walk runs spawned and reports throughCaptureProgressupdates ending in exactly onefinishedevent (success or error).- The progress channel is bounded; a vanished receiver does not abort the capture.
Playback (D3)
playskipsis_skippedtracks without a provider call and bounds skipping by the queue length at entry: an all-skipped repeat queue stops with a warning instead of spinning.
TUI (D5, D7)
- Skipped tracks render red in queue and library; the current-track marker keeps precedence.
- Progress lines show name, done/total, and skipped count; finished lines expire on the render tick; errors render red.
- The
Wbinding description and the download-capture input label warn that captures can take long and resume by name. - The selected row of a focused pane renders colored items with the dark foreground (readable on the light bar); unfocused panes keep the colored foregrounds.
Hygiene
- New/changed public items documented, stating error/edge behavior.
clippy -D warnings,fmt,taplo,markdownlintclean; all tests green.architecture/incremental-captures.mdreconciled where the implementation diverged.