# Quality gates: youtube-rustypipe Criteria beyond the automatic tests (ytdy unit tests run against the fake extractor; live behavior verified by a removed-after-passing probe). ## Extractor seam (D1) - [x] All provider logic (paths, search-term store, node shapes, capability flags, error mapping) is testable through the `Extractor` trait with a fake — no network, no fake shell scripts, no yt-dlp. - [x] The `ProviderClient` surface, path scheme, and search-term semantics (dedup, implicit recreation, rename re-searches, idempotent delete) are unchanged — existing behavioral tests carry over. ## Stream selection (D2) - [x] `get_urls_for_track` returns the highest-average-bitrate `audio/mp4` stream; a non-mp4 fallback logs a warning naming the chosen mime. - [x] No panic when a video has no audio streams — typed error. ## Login (D3) - [x] A cached valid login wins over re-reading the (stale-prone) cookies file; a missing/unreadable/rejected cookies file degrades to logged-out with a warning — init never fails over login. - [x] Cookie values, auth headers, and rustypipe cache contents never appear in logs or errors (paths only). - [x] `playlists` shows up only when logged in; playlist nodes cap their track count (`MAX_PLAYLIST_TRACKS`) via bounded pagination. ## Environment (D4) - [x] `yt-dlp` is gone from `devenv.nix`; ytdy no longer depends on `tokio/process`; the `binary` setting is gone from `ytdy.toml` (unknown old keys are tolerated). - [x] rustypipe state lives under `/crabidy/rustypipe/`; a broken client build disables the provider non-fatally. - [x] rustypipe uses rustls (no openssl build dependency). ## Hygiene - [x] New/changed public items documented, stating error/edge behavior. - [x] `clippy -D warnings`, `fmt`, `markdownlint` clean; all tests green. - [x] Live probe (removed after passing): search + stream URL + download capture through the real provider; stream decodes with the player's decoder stack.