feat: one registry entry per Site, one shared Series-page read #95

Merged
sulthan merged 7 commits from feat/94-site-registry into main 2026-08-12 05:43:39 +07:00

7 Commits

Author SHA1 Message Date
sulthan f1b26f4b4f chore: refresh code graph after review fixes (#94) 2026-08-12 00:34:33 +07:00
sulthan 700de20225 fix: fetch route fails closed for unknown sites (#94)
Security review found the route's old default handed the TLS fetcher to
any unrecognised site string; unreachable today because the shared read
gates first, but a trap for a future caller that skips the gate. Returns
nil now, matching the registry's zero-entry handling and the function's
own docstring. Review's log-injection finding (unquoted series_url in
read.go error wraps) was verified against Go's url.Parse and does not
hold: control characters are rejected anywhere in the URL, so a
client-supplied value reaching the log cannot carry a newline.
2026-08-12 00:34:24 +07:00
sulthan d998f8725c fix: keep the legacy cover heal and no-chapter byte count (#94)
Restore two review findings against spec claims 'the Poll keeps its own
Cover policy' and 'pinning is the only behavioural change': prefetchCover
now also runs on ticks where the page fetch itself fails (the heal is
independent of the page read, and its source may answer while the origin
does not), and the no-chapter log surfaces the fetched body length again
via a BodyLen fact on seriesRead. Browser dispatch iterates the sorted
browser site list so its outcome cannot depend on map order.
2026-08-12 00:29:42 +07:00
sulthan 5621202bcf chore: refresh code graph after Site registry (#94) 2026-08-12 00:23:29 +07:00
sulthan f2151309f7 feat: one shared series-page read for the Poll and the Acquisition (#94)
Extract gate, route, fetch and both parses into readSeriesPage, which
returns facts only; checkOne and acquire keep their scheduling, stamp
order and persistence policies. The poller also stops logging the fetched
body length, which only made sense while the body lived at the call site.
2026-08-12 00:23:00 +07:00
sulthan 2d134fb05c feat: one registry entry per Site, derived browser route and gate (#94)
Collapse the six per-site comparison points into a sites map in sites.go:
Latest Chapter parse, Cover parse, browser-backed list, fetcher route,
host pins, and the browser payload read all become lookups into it. All
six hosts are now pinned in fetchableSeriesURL; asura/demonic/comix were
previously accepted on any https host.
2026-08-12 00:21:28 +07:00
sulthan 4a92e956cf docs: record ADR-0009 Site registry and define Acquisition (#94) 2026-08-12 00:09:22 +07:00