Split the latest-chapter poll cooldown so browser-backed sites rest longer #42

Closed
opened 2026-08-09 03:35:24 +07:00 by sulthan · 1 comment
Owner

Part of #38

What to build

Browser-backed sites rest longer between latest-chapter checks than plain-TLS ones.

Today one cooldown governs every site, so kagane and novelfull — the only two that cost a browser
wake — are checked as often as asura, demonic, comix and lightnovelworld. After this ticket a
browser-backed series becomes due after 6 hours while every other site keeps its 1-hour cadence,
and both classes are still selected by a single due query in a single poll cycle.

Sizing: 6 hours of staleness on those two sites is acceptable to Readers; 1 hour on the main
libraries is not negotiable, which is why this is a split rather than a global change.

Implementation decisions

  • The poller config gains a browser cooldown read from its own environment variable, defaulting to
    6 hours, clamped by the same floor as its sibling so a typo cannot turn a polite check into a
    hammer. The existing cooldown keeps its 1-hour default and its meaning for every other site.
  • The due-check store query takes a second cutoff plus the list of browser-backed sites and chooses
    per row with a conditional on the site column. Everything is a bound parameter; nothing is
    concatenated into query text.
  • The store stays ignorant of which sites are behind a challenge. The poller passes the list — it
    already owns that knowledge, since it already decides which fetcher a site gets.
  • Ordering and exclusions are unchanged: reader count descending then least-recently-checked,
    finished skipped, archived still polled, orphan series excluded by the bookmark join.
  • The backend configuration notes gain the new variable alongside the existing poller settings.

Acceptance criteria

  • In one cycle, from one query, a browser-backed series checked 2 hours ago is not due while a
    plain-TLS series checked 2 hours ago is; at 7 hours both are.
  • The new setting covers default, override, clamp-below-floor, and unparseable-value fallback,
    matching how the sibling poller settings are already covered.
  • The existing due-query behaviours still hold: oldest-first ordering, the batch limit,
    reader-count precedence, finished-versus-archived, orphan exclusion.
  • The poller's startup log line reports both cooldowns.
  • Backend configuration docs list the new variable, its default, and its floor.
  • go test ./... passes.

Blocked by

None — can start immediately.

Part of #38 ## What to build Browser-backed sites rest longer between latest-chapter checks than plain-TLS ones. Today one cooldown governs every site, so kagane and novelfull — the only two that cost a browser wake — are checked as often as asura, demonic, comix and lightnovelworld. After this ticket a browser-backed series becomes due after 6 hours while every other site keeps its 1-hour cadence, and both classes are still selected by a single due query in a single poll cycle. Sizing: 6 hours of staleness on those two sites is acceptable to Readers; 1 hour on the main libraries is not negotiable, which is why this is a split rather than a global change. ## Implementation decisions - The poller config gains a browser cooldown read from its own environment variable, defaulting to 6 hours, clamped by the same floor as its sibling so a typo cannot turn a polite check into a hammer. The existing cooldown keeps its 1-hour default and its meaning for every other site. - The due-check store query takes a second cutoff plus the list of browser-backed sites and chooses per row with a conditional on the site column. Everything is a bound parameter; nothing is concatenated into query text. - The store stays ignorant of which sites are behind a challenge. The poller passes the list — it already owns that knowledge, since it already decides which fetcher a site gets. - Ordering and exclusions are unchanged: reader count descending then least-recently-checked, finished skipped, archived still polled, orphan series excluded by the bookmark join. - The backend configuration notes gain the new variable alongside the existing poller settings. ## Acceptance criteria - [x] In one cycle, from one query, a browser-backed series checked 2 hours ago is not due while a plain-TLS series checked 2 hours ago is; at 7 hours both are. - [x] The new setting covers default, override, clamp-below-floor, and unparseable-value fallback, matching how the sibling poller settings are already covered. - [x] The existing due-query behaviours still hold: oldest-first ordering, the batch limit, reader-count precedence, finished-versus-archived, orphan exclusion. - [x] The poller's startup log line reports both cooldowns. - [x] Backend configuration docs list the new variable, its default, and its floor. - [x] `go test ./...` passes. ## Blocked by None — can start immediately.
sulthan added the ready-for-agent label 2026-08-09 03:35:24 +07:00
Author
Owner

Implemented on branch issue-42-browser-cooldown in commit a214076. Browser-backed kagane/novelfull series now use LATEST_CHAPTER_POLL_BROWSER_COOLDOWN (default 6h, shared 15m floor); plain-TLS series retain 1h. Due selection remains one parameterized query with unchanged ordering and exclusions. Added config, wiring, poller, and documentation coverage. Verification: go test ./... passes.

Implemented on branch issue-42-browser-cooldown in commit a214076. Browser-backed kagane/novelfull series now use LATEST_CHAPTER_POLL_BROWSER_COOLDOWN (default 6h, shared 15m floor); plain-TLS series retain 1h. Due selection remains one parameterized query with unchanged ordering and exclusions. Added config, wiring, poller, and documentation coverage. Verification: go test ./... passes.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sulthan/mangaBookmark#42