# Plan: youtube-rustypipe Ordered tasks; each names its verification (ytdy tests and/or gates in `quality/youtube-rustypipe.md`). - [x] **T1 — Extractor trait + models.** `Extractor` (search_videos, video, audio_stream_url, saved_playlists, playlist_videos) with `VideoEntry`/`PlaylistEntry` models and a typed `ExtractError`; `Client` holds a `Box`. Verifies: gates "Extractor seam". - [x] **T2 — RustyPipeExtractor.** rustypipe client (rustls, storage dir, timeout, retries), mp4a-preferring stream pick, cookie-txt login with cache-first order, saved playlists + bounded playlist pagination. Verifies: gates "Stream selection", "Login"; live probe. - [x] **T3 — Client rework.** Settings without `binary`; init builds the extractor non-fatally; logged-in gating from the login outcome; all trait methods routed through the seam. Verifies: existing behavioral tests, rewritten against the fake. - [x] **T4 — Tests.** Port every ytdy test from fake-script to FakeExtractor; add stream-preference and login-degradation tests. Verifies: ytdy suite green without network. - [x] **T5 — Environment.** Remove `yt-dlp` from `devenv.nix`; trim ytdy `Cargo.toml` (drop process/io-util, add rustypipe); root workspace dep. Verifies: gates "Environment". - [x] **T6 — Full verification + live probe.** Workspace suite, clippy/fmt/markdownlint; temporary ignored probe: search, stream URL fetch, decode, download capture — removed after passing. - [x] **T7 — Docs.** `plan/summary.md` section incl. deviations; reconcile the architecture docs. - [x] **T8 — Same-day fix: windowed fetching + stream sidecar.** YouTube caps tokenless URLs at their leading ~1 MiB (measured; offset starts refused; upstream web-client deciphering broken; botguard ineffective through iOS). `WindowedHttpStream` in audio-player, windowed capture downloads, `yt-dlp` back as a stream-URL-only sidecar with degrade-and-fallback, `botguard_bin` passthrough, capture deadline 30 min. Verifies: audio-player windowed tests, capture window-chaining test, ytdy sidecar tests, gates "Stream fetching"; live probe on the failing track.