You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #2118 (now fixed in PR #2121, which clears the 72-item broken-link/anchor backlog against the assembled _mkdocs_src tree). This issue tracks the remaining CI-gap closure: .github/workflows/link-check.yml's nav-integrity job's mkdocs build doesn't currently fail on a broken link or anchor against the assembled tree — the same detection gap #2113 originally found.
Design update, superseding this issue's original advisory-step proposal:mkdocs.yml's validation.links.not_found/anchors options cannot be set to error in the installed MkDocs version — confirmed against mkdocs.config.defaults._LogLevel, which validates strictly against {"warn", "info", "ignore"}. So the actual hard gate is mkdocs build --strict, which aborts the build on any WARNING-level log line (broken links and anchors are both logged at WARNING). This is a stronger fix than the originally-planned advisory-only step, and is safe to land now that #2118's backlog is clear (0 broken links/anchors as of PR #2121).
This has been prepared, verified, and committed locally, but — as before — this session's credentials lack the workflow OAuth scope needed to push a .github/workflows/*.yml change (both git push and the GitHub content-write API reject it with the same error). This issue tracks applying that prepared, verified change.
Exact diff to apply
In .github/workflows/link-check.yml, nav-integrity job, replace:
# --strict (#2118): fails the build on any relative-link or anchor# warning against the *assembled* site tree, not just the raw repo tree# `body-links` (below) validates — the gap #2113 found undetected. Safe# to make blocking now: the 60-item pre-existing backlog #2118 tracked# is cleared. mkdocs.yml's own `validation:` block can't express this# per-check (this MkDocs version's `links.not_found`/`anchors` only# accept warn/info/ignore, no `error`), so `--strict` — which escalates# every WARNING-level build log line, not just links — is the gate.
- name: Build siterun: mkdocs build --strict --site-dir /tmp/site 2>&1 | tee /tmp/mkdocs-build.log
And after the existing "Assert every nav entry resolves to a file" step, add:
# Convenience summary only — "Build site" above is what actually blocks.# Runs even when that step failed so the count is visible without# scrolling the full build log.
- name: Report assembled-tree broken-link countif: always()run: | count=$(grep -c "target .* is not found among documentation files" /tmp/mkdocs-build.log || true) echo "Broken links against the assembled docs tree: ${count:-0}" if [ "${count:-0}" -gt 0 ]; then echo "::warning::${count} broken link(s) found against the assembled docs site tree — see the 'Build site' step log above for the full list." fi
A deliberately reintroduced broken link ([bogus](does-not-exist.md) appended to README.md, then reverted) fails it: exit 1, Aborted with 1 warnings in strict mode! — proving the gate can actually fail, not just report.
python3 -m pytest tests/repo/test_required_status_checks.py -q still passes: this adds a step to the existing nav-integrity job, not a new job, so no new required-check registration is needed.
Acceptance
.github/workflows/link-check.yml's nav-integrity job builds with --strict
tests/repo/test_required_status_checks.py still passes
A PR run with a deliberately broken link fails the Docs nav integrity check; a clean PR passes it
Context
Follow-up to #2118 (now fixed in PR #2121, which clears the 72-item broken-link/anchor backlog against the assembled
_mkdocs_srctree). This issue tracks the remaining CI-gap closure:.github/workflows/link-check.yml'snav-integrityjob'smkdocs builddoesn't currently fail on a broken link or anchor against the assembled tree — the same detection gap #2113 originally found.Design update, superseding this issue's original advisory-step proposal:
mkdocs.yml'svalidation.links.not_found/anchorsoptions cannot be set toerrorin the installed MkDocs version — confirmed againstmkdocs.config.defaults._LogLevel, which validates strictly against{"warn", "info", "ignore"}. So the actual hard gate ismkdocs build --strict, which aborts the build on any WARNING-level log line (broken links and anchors are both logged at WARNING). This is a stronger fix than the originally-planned advisory-only step, and is safe to land now that #2118's backlog is clear (0 broken links/anchors as of PR #2121).This has been prepared, verified, and committed locally, but — as before — this session's credentials lack the
workflowOAuth scope needed to push a.github/workflows/*.ymlchange (bothgit pushand the GitHub content-write API reject it with the same error). This issue tracks applying that prepared, verified change.Exact diff to apply
In
.github/workflows/link-check.yml,nav-integrityjob, replace:with:
And after the existing "Assert every nav entry resolves to a file" step, add:
Verified locally (not a guess)
--strict: exit 0.[bogus](does-not-exist.md)appended toREADME.md, then reverted) fails it: exit 1,Aborted with 1 warnings in strict mode!— proving the gate can actually fail, not just report.python3 -m pytest tests/repo/test_required_status_checks.py -qstill passes: this adds a step to the existingnav-integrityjob, not a new job, so no new required-check registration is needed.Acceptance
.github/workflows/link-check.yml'snav-integrityjob builds with--stricttests/repo/test_required_status_checks.pystill passesDocs nav integritycheck; a clean PR passes itGenerated by Claude Code