crabidy/plan/youtube-rustypipe.md

1.6 KiB

Plan: youtube-rustypipe

Ordered tasks; each names its verification (ytdy tests and/or gates in quality/youtube-rustypipe.md).

  • 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<dyn Extractor>. Verifies: gates "Extractor seam".
  • 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.
  • 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.
  • T4 — Tests. Port every ytdy test from fake-script to FakeExtractor; add stream-preference and login-degradation tests. Verifies: ytdy suite green without network.
  • T5 — Environment. Remove yt-dlp from devenv.nix; trim ytdy Cargo.toml (drop process/io-util, add rustypipe); root workspace dep. Verifies: gates "Environment".
  • T6 — Full verification + live probe. Workspace suite, clippy/fmt/markdownlint; temporary ignored probe: search, stream URL fetch, decode, download capture — removed after passing.
  • T7 — Docs. plan/summary.md section incl. deviations; reconcile the architecture docs.