fix(ci): authenticate Link Check to github.com to stop rate-limit false-positives (#316) - #317
Merged
Merged
Conversation
…se-positives (#316) The Link Check job (tcort/github-action-markdown-link-check, unauthenticated) intermittently reported LIVE github.com URLs as dead (Status 0/503) when a run checked many links at once and hit GitHub's ~60/hr anonymous rate limit — seen blocking approved PRs #313/#315 on consecutive runs, every flagged link 200 in a browser. retryOn429 never engaged because GitHub sheds anonymous load with 503, not 429. Fix (no new secret, read-only token only): - httpHeaders: send Authorization: Bearer <token> for github.com / api.github.com / raw.githubusercontent.com, so those links are checked AUTHENTICATED (5000/hr). A CI step renders the read-only workflow GITHUB_TOKEN into the placeholder via envsubst (whitelisted to only) → a git-ignored .markdown-link-check.ci.json; locally the placeholder stays inert ('Bearer '), so github still answers anonymously and the committed config carries no token. - aliveStatusCodes: add 429 + 503 so a throttled probe of a live host defers instead of being reported dead (belt-and-suspenders alongside the token). - retryCount 3 -> 5. Real dead links still fail (a genuine 404 is not in aliveStatusCodes). Job stays continue-on-error. Verified: config renders to valid JSON with + without a token; make validate + 354 tests pass. Closes #316. AI-assisted (OpenCode). Requires human review. Co-authored-by: OpenCode Agent <william.zujkowski@gsa.gov>
Follow-up within #316: with github.com now authenticated, the only remaining Link Check false-positive was nvd.nist.gov -> Status 0. NVD is bot-hostile to the checker's unauthenticated HEAD probe (same behavior as asciinema.org) but is a live, stable gov site referenced from the dependency-analysis skill. Ignore it, matching the asciinema treatment. Real dead links still fail. Co-authored-by: OpenCode Agent <william.zujkowski@gsa.gov>
mogul
approved these changes
Aug 12, 2026
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.
Summary
Closes #316. The Link Check job (
tcort/github-action-markdown-link-check, unauthenticated) intermittently reports live github.com URLs as dead (Status: 0/503) when a run checks many links at once and hits GitHub's ~60/hr anonymous rate limit — observed blocking approved PRs #313 and #315 on consecutive runs; every flagged link is 200 in a browser.retryOn429never engaged because GitHub sheds anonymous load with503, not429.Fix (no new secret — read-only token only)
Authorization: Bearer <token>for github.com / api.github.com / raw.githubusercontent.com so those links are checked authenticated (5000/hr). A CI step renders the read-only workflowGITHUB_TOKENinto the placeholder withenvsubst(whitelisted to${MLC_GITHUB_TOKEN}only) → a git-ignored.markdown-link-check.ci.json. Locally the placeholder stays inert (Bearer), so the committed config carries no token and github answers anonymously.429+503so a throttled probe of a live host defers instead of being reported dead (belt-and-suspenders).retryCount3 → 5.Real dead links still fail (a genuine 404 isn't in aliveStatusCodes). Job stays
continue-on-error.Verification
Config renders to valid JSON with + without a token;
envsubstonly touches the whitelisted placeholder;make validate+ 354 tests pass;gettext-base/envsubstis preinstalled on ubuntu runners.Impact
Stops the recurring re-run tax on every PR that touches many github.com links (retires the workaround applied on #313/#315). Read-only
github.token, no elevated permission.Rollback
Revert. CI config + link-check config only; no repo content change.
AI-assisted (OpenCode). Requires human review.