test(docs): S6 — doc-accuracy guardrail (#76)#83
Merged
Conversation
Adds tests/test_doc_accuracy.py — the guard that keeps this refresh from silently re-staling (the root cause the epic fixes). Two checks: - living onboarding docs (README, docs/architecture/*, module READMEs) must not reference deleted symbols (PriogridCountryMapper / mapping/README / use_disk_cache / cachetools / geopandas) as current; an inline `legacy-ok` marker whitelists an intentional historical mention. - internal relative doc links (README + docs/** + module READMEs) must resolve. ADRs, CICs, and the historical reports are excluded from the symbol scan (they reference superseded designs as a record) but are still link-checked. Implemented as pytest tests so the same check runs in CI via the existing run_pytest workflow; docs/validate_docs.sh also invokes it for local runs. Proven to fail on a reintroduced deleted symbol and on a broken link, then revert to green. ruff clean; 128 passed (the +2 guardrail tests), 43 xfailed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jun 27, 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.
Epic: #70 · S6 (#76) · depends on #72/#73/#74/#75 ✅ — the final story.
Adds
tests/test_doc_accuracy.py, the guard against silent re-staling (the epic's root cause):docs/architecture/*, module READMEs); inlinelegacy-okmarker whitelists an intentional historical mention.docs/**+ module READMEs.ADRs / CICs / historical reports are excluded from the symbol scan (they reference superseded designs as a record) but still link-checked. Runs in CI via the existing
run_pytestworkflow (it's intests/);docs/validate_docs.shalso invokes it locally.Proven negative case: fails on a reintroduced deleted symbol and a broken link; green after revert. ruff clean; 128 passed (+2), 43 xfailed.
Closes #76