Slice 4: Relocate _write_history orphan to history module #40

Closed
opened 2026-06-05 18:11:14 +02:00 by AlexKucera · 1 comment
AlexKucera commented 2026-06-05 18:11:14 +02:00 (Migrated from github.com)

Parent

#36 — PRD-003: Deepen Codebase Architecture

What to build

Move _write_history() from downloader.py to history.py as a module-level function. Update the single call site in sync_run's download closure to import from history instead of downloader. Remove the now-unused HistoryEntry import from downloader.

Acceptance criteria

  • _write_history() is defined in librofm_downloader/history.py
  • The call site in sync_run.py imports from history, not from downloader
  • downloader.py no longer imports HistoryEntry or exports _write_history
  • Full test suite passes
  • downloader.py contains only download-related logic (no persistence helpers)

Blocked by

None - can start immediately

## Parent #36 — PRD-003: Deepen Codebase Architecture ## What to build Move `_write_history()` from `downloader.py` to `history.py` as a module-level function. Update the single call site in sync_run's download closure to import from history instead of downloader. Remove the now-unused `HistoryEntry` import from downloader. ## Acceptance criteria - [ ] `_write_history()` is defined in `librofm_downloader/history.py` - [ ] The call site in `sync_run.py` imports from `history`, not from `downloader` - [ ] `downloader.py` no longer imports `HistoryEntry` or exports `_write_history` - [ ] Full test suite passes - [ ] `downloader.py` contains only download-related logic (no persistence helpers) ## Blocked by None - can start immediately
AlexKucera commented 2026-06-05 18:51:19 +02:00 (Migrated from github.com)

✅ Closed via commit 2930d16 refactor(reporters): remove cancel_event from progress reporters — relocated _write_history() from downloader.py → history.py. All 5 AC met, +1 test, full suite passes.

✅ Closed via commit `2930d16 refactor(reporters): remove cancel_event from progress reporters` — relocated _write_history() from downloader.py → history.py. All 5 AC met, +1 test, full suite passes.
Sign in to join this conversation.