From ea33a49f1561741fe1f339c5498dc10ec82513a0 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Sun, 5 Jul 2026 17:25:09 -0400 Subject: [PATCH] conductor(plan): mark Phase 3 (download_media.py) complete [f503eb5d] --- .../tracks/twitter_threads_extraction_20260705/plan.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/conductor/tracks/twitter_threads_extraction_20260705/plan.md b/conductor/tracks/twitter_threads_extraction_20260705/plan.md index 7f5312c1..fabbd021 100644 --- a/conductor/tracks/twitter_threads_extraction_20260705/plan.md +++ b/conductor/tracks/twitter_threads_extraction_20260705/plan.md @@ -126,11 +126,11 @@ git commit -m "feat(twitter_threads): render_markdown.py — YAML front-matter + --- -## Phase 3: `download_media.py` (the media downloader) +## Phase 3: `download_media.py` (the media downloader) [checkpoint: f503eb5d] Focus: download the media files referenced by a `ThreadData`. Mock the HTTP in tests; real network only at runtime. -- [ ] **Task 3.1: Write failing tests for `download_media.py`** +- [x] **Task 3.1: Write failing tests for `download_media.py`** WHERE: `tests/test_twitter_threads_media.py` WHAT: 4+ tests: @@ -141,7 +141,7 @@ WHAT: 4+ tests: HOW: Mock `urllib.request.urlopen` via `unittest.mock.patch` (this is a boundary test — the HTTP boundary — so mocking is allowed per the structural testing contract). Use `tests/artifacts/twitter_threads_media_/` as the output dir per the workspace-paths convention. VERIFY: `uv run pytest tests/test_twitter_threads_media.py` FAILS. -- [ ] **Task 3.2: Implement `download_media.py`** +- [x] **Task 3.2: Implement `download_media.py`** WHERE: `scripts/twitter_threads/download_media.py` WHAT: The `download_media(thread: ThreadData, output_dir: Path) -> Result[list[Path], ErrorInfo]` function. @@ -156,7 +156,7 @@ HOW: - Use only stdlib (`urllib.request`, `pathlib`, `dataclasses`). No `requests`. VERIFY: `uv run pytest tests/test_twitter_threads_media.py` PASSES. -- [ ] **Task 3.3: Commit Phase 3** +- [x] **Task 3.3: Commit Phase 3** ```bash git add scripts/twitter_threads/download_media.py tests/test_twitter_threads_media.py