Prefetch kagane covers during the poll cycle #45
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Blocked by: #43
Part of #38
What to build
The poll cycle fetches a bookmarked kagane series' cover once and persists it, so the bytes are
already stored before any Reader opens the web UI. This is what takes the browser off the request
path in the normal case — and it is the precondition for the browser living on a machine that is
usually asleep.
The on-first-view fallback stays: a series bookmarked between cycles still shows its cover
immediately rather than waiting up to six hours.
Implementation decisions
there. Both behaviours are driven through one poll cycle with fakes; no new seam.
fetched through the browser and persisted.
the series' check stamp. The poller keeps stamping its check time before fetching, so a series
behind a broken browser waits out a full cooldown instead of retrying every tick.
Acceptance criteria
successful cycle without cover prefetch would.
go test ./...passes.Blocked by
Implemented and opened PR #51: #51
The latest-chapter poller now receives the shared browser cover fetcher, checks persistent Kagane cover storage, prefetches only missing Kagane covers, and leaves chapter polling plus cooldown stamping unchanged when cover work fails. Shared image-id and content-type validation prevents invalid challenge responses from being persisted. Added deterministic coverage for missing, cached, failed, invalid, nil-fetcher, and non-Kagane paths. Verification:
go test ./...passed.