Remove the client latest-chapter scan for lightnovelworld (#91) #93

Merged
sulthan merged 5 commits from ticket/91-client-lnw-scan-removed into main 2026-08-11 20:58:20 +07:00
Owner

Follows the spec published on #91: remove the client-side latest-chapter scan for lightnovelworld rather than porting #87's truncation into a second codebase.

  • lightnovelworld.latestChapterFromAnchors deleted, not stubbed: absence is what the background-fetch guard keys off.
  • computeLatestChapter tolerates an adapter with no scanner (yields null) and is exported as the test seam.
  • backgroundRefreshLatest skips a scanner-less Site before the due filter: no Series page fetched, no freshness timestamp recorded, no batch slot consumed. The on-page path (maybeCaptureLatestOnSeriesPage) routes through the same null-tolerant computation.
  • novelfull's scanner, the shared max-chapter helper and all four manga Sites untouched.
  • userscript/AGENTS.md records the Poll-only contract for this Site and why.

All seven acceptance criteria from the spec met. node --check clean; novel suite 30/30 (the regression pin fails if a lnw scan is reintroduced, scoped or not); manga suite 35/35, manga userscript byte-for-byte unchanged.

Two-axis code review: no hard standard violations, spec-clean; one follow-up commit matching the sibling adapter guard from the manga script.

Follows the spec published on #91: remove the client-side latest-chapter scan for lightnovelworld rather than porting #87's truncation into a second codebase. - lightnovelworld.latestChapterFromAnchors deleted, not stubbed: absence is what the background-fetch guard keys off. - computeLatestChapter tolerates an adapter with no scanner (yields null) and is exported as the test seam. - backgroundRefreshLatest skips a scanner-less Site before the due filter: no Series page fetched, no freshness timestamp recorded, no batch slot consumed. The on-page path (maybeCaptureLatestOnSeriesPage) routes through the same null-tolerant computation. - novelfull's scanner, the shared max-chapter helper and all four manga Sites untouched. - userscript/AGENTS.md records the Poll-only contract for this Site and why. All seven acceptance criteria from the spec met. node --check clean; novel suite 30/30 (the regression pin fails if a lnw scan is reintroduced, scoped or not); manga suite 35/35, manga userscript byte-for-byte unchanged. Two-axis code review: no hard standard violations, spec-clean; one follow-up commit matching the sibling adapter guard from the manga script.
sulthan added 4 commits 2026-08-11 20:28:01 +07:00
The scan was scoped to the stored series_id, which since #89 is the Series
slug while chapter addresses carry a Chapter Slug, so on divergent novels it
matched zero anchors. The Poll refreshes lnw Series on a one-hour cooldown,
four times faster than the client throttle, so the scan optimised nothing
while its unscoped alternative would have let a public wpdiscuz comment
anchor write a Latest Chapter every Reader of the row shares. Delete the
adapter method; the shared computation yields null for an adapter without a
scanner, and the background refresh skips the Site before the due filter so
no Series page is fetched and no freshness timestamp is recorded.
The new export is the seam the suite addresses behaviour through: for
lightnovelworld no anchor set yields a Latest Chapter, comment-shaped
anchors included, and for novelfull the scan still returns the maximum and
ignores other series. The old lnw scan test asserted the deleted behaviour.
The manga script's refresh guards both the adapter and its method; the
novel guard skipped the adapter null-check. Provably non-null today, but
the sibling shape is the convention to match.
sulthan added 1 commit 2026-08-11 20:28:32 +07:00
sulthan merged commit 672c16ffbf into main 2026-08-11 20:58:20 +07:00
Sign in to join this conversation.