Skip to content

Judge a 4xx or 5xx page by its status, without asking Jev - #19

Merged
arrufat merged 1 commit into
page-classifyfrom
judge-status-gate
Oct 22, 2026
Merged

arrufat merged 1 commit into
page-classifyfrom
judge-status-gate

Conversation

@arrufat

@arrufat arrufat commented Oct 22, 2026

Copy link
Copy Markdown
Collaborator

judge() now returns a verdict from the HTTP status alone when the page answered 4xx or 5xx, and skips the classify call.

Why it is safe. In the local classifier's crawl, 1,781 pages answered 4xx or 5xx. Jev fired at least one check on 1,774 of them. The other seven were blocks too, scored around 0.6: Yahoo Japan's EEA notice, zeit.de's bot "Legal Notice", an ipapi rate-limit page and a maintenance page. None of them was a page worth reading, so the call was a round trip for an answer the status had already given.

What the verdict looks like.

  • 401 → is_login_wall, 402 → is_paywall, 403 and 429 → is_blocked, any other 4xx/5xx → is_error_page.
  • verdict.http_status holds the status. Every score and answer is None, so a caller can tell a verdict the model gave from one it did not.
  • The status is the one the last navigation or action reported. A page whose own script navigates elsewhere afterwards keeps the earlier status.

Why 2xx still goes to Jev. Bot blocks often come back as 200; the first page of that same crawl is an Incapsula block page served with 200.

Not included: isAccessibleForFree. Treating a page that declares isAccessibleForFree: false as a paywall looked like the next shortcut. On 86 hand-labelled pages, 81 of those declaring it were paywalls. But metered sites declare it on articles they still show in full: the Boston Globe did on four of four fresh articles, each 5–8k characters of visible text, and Jev rightly scored them at about 0.1. Skipping on the flag would drop readable pages, so it stays out.

Of the 1,781 pages that answered 4xx or 5xx in the classifier's crawl, Jev
found none worth reading: every one fired a check, and the seven that fired
none on both votes were blocks it scored near 0.6. Asking it is a round trip
for an answer the status already gave.

The session keeps the status the last navigation or action reported, and
judge() returns from it before calling classify: 401 names a login wall, 402
a paywall, 403 and 429 a block, anything else an error page. Scores and
answers stay None, so a caller can tell a verdict the model gave from one it
did not. A 2xx page still goes to Jev, since bot blocks often arrive as 200.
@arrufat
arrufat merged commit 7b17601 into page-classify Oct 22, 2026
4 of 8 checks passed
@arrufat
arrufat deleted the judge-status-gate branch October 22, 2026 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant