Browser-backed Sites join the Cover pipeline (#62) #72
Reference in New Issue
Block a user
Delete Branch "feat/62-browser-sites-join-cover-pipeline"
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?
Fixes #62
Browser-backed Sites join the Cover pipeline: kagane and novelfull Series now get their Covers at creation, through the same acquisition path as every other Site, instead of waiting for a poll pass.
What changed
latest.Acquirer(creation-time acquisition, fired by the first Bookmark of a Series) previously skipped kagane and novelfull entirely — their pages only yield a Cloudflare challenge to the TLS client, so the request was spent for nothing. It now routes them like the poller does, with the two Sites split exactly as the issue demands:BROWSER_WS_URLconfigured, acquisition is skipped entirely and nothing falls back to a plain fetch.access-control-allow-origin: *, measured 2026-08-09). With no browser configured, the page fetch falls back to the TLS client — novelfull's challenge is a live time-varying fact (AGENTS.md), so when the page body answers, the Cover still lands; when it is challenged, nothing happens.The byte-routing rule (kagane → browser, every other Site → TLS) is now one shared function (
latest.fetchCoverBytes) used by both the Poller and the Acquirer, so the two cannot drift apart.Acceptance criteria
TestAcquireKaganeCoverThroughBrowserTestAcquireNovelfullCoverOverPlainTLSTestAcquireKaganeSkippedWithoutBrowserTestAcquireNovelfullCoverWithoutBrowsergo test ./...is green, with live-network checks gated behindSMOKE_BROWSER_WS_URLlike the existing kagane image smoke test — newTestSmokeAcquireKaganeCoverproves the end-to-end acquire path against the real browser when the env var is setVerification
go test ./...green across all packagesSMOKE_BROWSER_WS_URL, skipped by defaultPost-review changes (
a66491a)fetcherForis now a shared function used by both the Poller and the Acquirer; novelfull falls back to the plain-TLS fetcher in both when no browser is configured, so pre-existing (client-scraped) novelfull rows get healed by the poll as well, not just Series created after this change (TestNovelfullUsesTLSWhenNoBrowserFetcher).TestAcquireKaganeBytesNeverFallBackToPlainTLSpins that kagane cover bytes never route to the TLS fetcher even when the page came through a browser.NewTLSFetcherfails, kagane/novelfull acquisition still works via the sidecar (main.go).