fix(refresh): only 200 is a page, so a 202 challenge names itself

The health check earned its keep on the first run: six sources broken, four
cycles each, "last confirmed never" — and a last status of **202**. That is
game8.co's edge answering a GitHub runner with a bot-management body instead of
the wiki.

`response.ok` admitted it. A 202 therefore passed the status gate as a
document, reached the parser, yielded nothing, and was reported as "kept
previous snapshot; new body yielded 0 events" — an accurate description of the
symptom that never mentioned the status explaining it, which is why this looked
like a parser problem for days. Require 200: 202 means the request was accepted
for processing, 204 has no body, 206 is a fragment, and none of them is a page.
The rejection note already names the Server header, so the next cycle reads
`HTTP 202 (AkamaiGHost)` instead.

Recorded in CLAUDE.md § Scraping conduct, including that this must not be worked
around. The per-host spacing added alongside does not help and was never going
to — a 202 on a cycle's first request is address reputation, not rate. Browser
-shaped headers or a residential egress would be defeating an access control,
which is the ground uma.moe was declined on, and game8's robots.txt is
permissive, which makes doing it there worse rather than better.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
This commit is contained in:
Lucas Winther
2026-08-17 22:05:05 +02:00
co-authored by Claude Opus 5
parent 988f72a56f
commit 54052d50c4
4 changed files with 51 additions and 1 deletions
+9 -1
View File
@@ -346,7 +346,15 @@ async function refreshOne(
};
}
if (!response.ok) {
// 200 is the only status that means "here is the page". `response.ok` also
// admits the rest of the 2xx range, and that cost us the diagnosis: game8.co's
// edge answers a GitHub runner with **202 Accepted** and a bot-management
// body, which sailed through this gate as a document, reached the parser,
// yielded no events and was reported as "kept previous snapshot" — describing
// the symptom while the status that explained it went unmentioned. 202 means
// the request was accepted for processing; 204 has no body and 206 is a
// fragment. None of them is a wiki page.
if (response.status !== 200) {
await store.recordCheck(adapter.id, {
at: nowIso,
status: response.status,