Repository navigation
Conversation
…#275) A gateway answer says the host was unavailable at that moment. Reporting every entry on it as dead turned one GitHub outage into 70 false alarms in the 2026-11-09 report. classify() now returns kind "unavailable", the report lists those under Could not check, and they are not counted as problems. 404/410 and other 4xx/5xx answers stay dead.
3 tasks done
Owner
|
Thanks! Closing in favour of #300, which fixed the same classification and also covers licence pages and the retry. Your write-up of the cause was spot on. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The weekly link check reports a 502/503/504 as a dead link (
site/lib/link-check.mjs:61). When one big host has a short outage, every entry on it lands under "Dead": the 2026-11-09 run (#274) listed 70 github.com entries as dead from HTTP 504s, and a recheck the same day returned 200 for all 70. Fixes #275.Root cause
classify()treats every status from 400 up as permanent. A gateway answer means the host could not answer at that moment, not that the page is gone, so the report cannot tell an outage from a removed source.Fix
classify()returns a newunavailablekind for 502/503/504, before the>= 400branch. 404/410 and every other 4xx/5xx answer still classify asdead.site/check-links.mjslists those entries under the existing Could not check section (with the API skips) and keeps them out ofproblems, so an outage no longer opens entries that need a licence re-read.The optional delayed retry from the issue is not included: the existing immediate retry already covers a blip, and a 30 s wait per entry would lengthen the run without changing the classification.
Testing
node site/lib/lib.test.mjs: 1710 assertions pass. New cases: 502/503/504 returnunavailable(all three failed with"dead"on the oldclassify), 410 stilldead, and a 502 detail names the status.npm testpasses (274 + 1710 assertions),npm run lintreports "66 scripts parse, no unused imports".This change was drafted by an agent; the classification and the report section were read in the source before submitting.