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
✅ 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.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Parent
#36 — PRD-003: Deepen Codebase Architecture
What to build
Move
_write_history()fromdownloader.pytohistory.pyas 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-unusedHistoryEntryimport from downloader.Acceptance criteria
_write_history()is defined inlibrofm_downloader/history.pysync_run.pyimports fromhistory, not fromdownloaderdownloader.pyno longer importsHistoryEntryor exports_write_historydownloader.pycontains only download-related logic (no persistence helpers)Blocked by
None - can start immediately
✅ 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.