Skip to content

links: check github.com blob links through the raw host - #30

Merged
tannevaled merged 1 commit into
mainfrom
links-blob-via-raw
Oct 10, 2026
Merged

tannevaled merged 1 commit into
mainfrom
links-blob-via-raw

Conversation

@tannevaled

Copy link
Copy Markdown
Contributor

The external-link job on main has been red since 2026-10-10. Five github.com/go-ndarray/ndarray/blob/main/... links returned 503 on all three attempts, on three runs in a row. The files all exist.

Cause: github.com serves blob pages to curl's default User-Agent with 503 most of the time. Locally it failed 7 of 8 requests, while a browser User-Agent got 200 every time. githubstatus.com reports all systems operational.

Fix: a blob link claims that a file exists at a ref, so the job now asks raw.githubusercontent.com/<owner>/<repo>/<ref>/<path>, with the anchor and query removed. The log still prints the URL as written in the docs.

Checked locally on five cases:

link probe result
blob/main/BENCHMARKS.md raw 200
blob/main/docs/perf.md#anchor raw, anchor removed 200
blob/v0.9.1/SECURITY.md?plain=1 raw at the tag 200
blob/main/NO_SUCH_FILE.md raw 404, still caught
/security (not a blob link) unchanged 200

The same inline checker is copied in go-fileshare/docs, the authn docs, and the landing kit's links.yml. Those copies will hit the same 503 once they link to blob pages.

🤖 Generated with Claude Code

github.com answers curl's requests for blob pages with 503 most of the
time: 7 of 8 locally, and all 3 attempts for five links on every run of
main on 2026-10-10, while a browser User-Agent gets 200. The raw host
answers 200 for an existing file and 404 for a missing one, and a blob
link claims exactly that the file exists at that ref, so the check asks
raw.githubusercontent.com/<o>/<r>/<ref>/<path> (anchor and query
dropped). The printed URL is still the one in the docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tannevaled
tannevaled merged commit 012e962 into main Oct 10, 2026
3 checks passed
@tannevaled
tannevaled deleted the links-blob-via-raw branch October 10, 2026 19:31
tannevaled added a commit to go-fileshare/docs that referenced this pull request Oct 10, 2026
github.com answers curl's requests for blob pages with 503 most of the
time (7 of 8 locally on 2026-10-10; it turned go-ndarray/docs main red,
all 3 attempts on 3 runs). The raw host answers 200 for an existing file
and 404 for a missing one, which is what a blob link claims, so the check
asks raw.githubusercontent.com/<o>/<r>/<ref>/<path>. Port of
go-ndarray/docs#30; this site's two blob links pass today by luck.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
tannevaled added a commit to go-fleettools/landingkit that referenced this pull request Oct 10, 2026
…#2)

`landingkit links <built-site>` is the kit's links.yml as a tested
command. github.com answers a program's request for a blob page with 503
most of the time, so a github.com/<o>/<r>/blob/<ref>/<path> link is probed
at raw.githubusercontent.com/<o>/<r>/<ref>/<path>, anchor and query
stripped: 200 for a file, 404 for a missing one (go-ndarray/docs#30).
Tests prove an existing blob path passes and a missing one fails without
asking github.com; CI runs it live on example/, which links to a blob page.

workflows/links.yml is a template for landings that runs the command at
the version their go.mod pins.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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