Repository navigation
test: scan the whole repo for stale doc paths, not just the package - #305
Open
Gabeyocum28 wants to merge 1 commit into
Open
Gabeyocum28 wants to merge 1 commit into
Gabeyocum28 wants to merge 1 commit into
Conversation
Gabeyocum28
requested review from
Cormac131,
HuggeK and
jewbetcha
as code owners
October 14, 2026 18:06
jewbetcha
approved these changes
Oct 14, 2026
open-flight#294 fixed stale docs/*.md pointers in scripts/, the issue templates, and the top-level guides by hand; open-flight#295 added a test guarding only src/openflight. Widen the scan to cover scripts/ (*.py, *.sh), .github/ (*.yml, *.md), README, CONTRIBUTING, CLAUDE.md, AGENTS.md and ui/README.md so the next docs move cannot strand any of them again. Links inside docs/ are deliberately not scanned: the Zensical build runs with --strict in CI and already fails on broken intra-docs links. The check compares every path component against the parent's real directory listing rather than calling is_file(), so it is case-exact on macOS and Windows too. That caught one more stale link on the first CI run: CONTRIBUTING.md said docs/CHANGELOG.md, the file is docs/changelog.md, and macOS let it pass locally. Fixed here. Run against the tree before open-flight#294 merged (b65b5f3) the widened test fails on all 15 paths that open-flight#294 and open-flight#295 fixed; on main it passes with 46 references checked.
Gabeyocum28
force-pushed
the
test/doc-references-repo-wide
branch
from
October 14, 2026 18:09
e765931 to
7ae2e10
Compare
This branch has not been deployed
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.
What does this PR do?
Widens
tests/test_doc_references.py(added in #295) so it scans every place outsidedocs/that points users at adocs/….mdpage, not justsrc/openflight:src/openflight/**/*.pyscripts/**/*.pyandscripts/**/*.sh.github/**/*.ymland.github/**/*.md(issue templates, PR template, workflows)README.md,CONTRIBUTING.md,CLAUDE.md,AGENTS.md,ui/README.mdOne parametrized test per reference asserts the file exists, with the source file and path in the assertion message. The scan roots are an explicit list so a new tree is added deliberately. A guard test asserts the scan found more than ten references so it can never pass vacuously. Links inside
docs/are deliberately not scanned: the Zensical build runs with--strictin CI and already fails on broken intra-docs links.Also adjusts the #295 changelog entry to describe the wider scan.
It already caught one. The first CI run failed on
CONTRIBUTING.mdpointing atdocs/CHANGELOG.md; the file isdocs/changelog.md. macOS let that pass locally because its filesystem is case-insensitive, so the test now checks every path component against the parent's real directory listing and is case-exact everywhere. The link is fixed in this PR.Why was this required?
#294 fixed eleven stale doc paths in scripts, the issue templates, and the top-level guides by hand, using a one-off grep. #295 fixed four more inside the package and added a test, but that test only guards
src/. The next docs restructure would strand the scripts and templates again with nothing to catch it. This turns the one-off cleanup into a permanent CI guard.Automated tests
This PR is a test. Red proof: run against the tree from just before #294 merged (b65b5f3), the widened test fails on all fifteen paths that #294 and #295 fixed (the eleven in scripts/templates/guides plus the four in
src/). On currentmainit passes with 46 references checked (after the CONTRIBUTING fix).Manual (human) testing
git worktreeat b65b5f3 (pre-docs: fix doc paths left stale by the docs restructure #294): 15 failed, 32 passed, each failure naming the stale source file and path.main: 46 passed. Confirmed the collected ids include references from all scan roots (scripts/setup/setup.sh,.github/ISSUE_TEMPLATE/hardware_help.yml,README.md,CLAUDE.md,src/openflight/kld7/radc.py, etc.).uv run pytest tests/gives 1840 passed, 11 skipped, 13 failed. The 13 aretest_camera_*and fail identically onmainin my environment becausecv2is not installed; unrelated.ruff checkandruff format --checkclean on the test file.No UI changes, so no screenshots.
Checklist
uv run pytest tests/ -v)uv run pylint src/openflight/ --fail-under=9) — nosrc/changesuv run ruff check src/openflight/)cd ui && npm run build) — no UI changescd ui && npm run lint) — no UI changes