PS-007: Repo-wide link resolution + staleness prevention#19
Merged
Conversation
- Add _find_repo_root() to both prescreen implementations (ref-impl + Copilot CLI port) - Fix traversal guard: resolve relative links against repo root (.git boundary), not file parent dir. Allows ../../target.md within repo while blocking escape. - Add --scan-links [DIR] batch mode to Copilot CLI prescreen (walks all .md files) - Add check_framework_version_strings() to validate-docs.py (flags stale version headers in framework docs vs critic-status.yaml) - 9 new tests (4 ref-impl traversal + 5 batch scan) Self-test: 0 broken links across 62 .md files. Full suite: 883 passed, 6 skipped. Origin: PS-007 task (2026-03-12), PR #16 retro (broken links from file moves).
Contributor
Author
CI Self-Validation TriageVerdict: REVISE — all findings are pre-existing patterns in touched files, none introduced by this PR. ports/copilot-cli/quorum-prescreen.py (2 HIGH)
ports/copilot-cli/test_quorum_prescreen.py (4 HIGH)
reference-implementation/quorum/prescreen.py (2 HIGH)
reference-implementation/tests/test_prescreen.py (1 HIGH)
Tester Performance7 findings excluded via L1 evidence contradiction across 4 files — correctly filtered before reaching the verdict. All pre-existing HIGHs are tracked in the project backlog for a dedicated code quality cleanup pass. |
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
Enhances PS-007 (broken markdown link detection) to resolve relative paths against the repo root instead of the file's parent directory, and adds a batch scanning mode. Also adds staleness prevention to
validate-docs.py.Changes
Core fix: Repo-root bounded traversal
_find_repo_root()— walks up to.gitboundary../../target.mdfrom a nested subdir now resolves correctly within the repo. Previously, the ref-impl blocked any upward traversal past the file's parent dir (overly restrictive), and the Copilot CLI port had no guard at all.gitis found (preserves old behavior for standalone files)Batch scanning (Copilot CLI port)
python3 quorum-prescreen.py --scan-links [DIR]walks all.mdfiles under a directory.git,node_modules,venv,quorum-runs,golden-test-set, and other output directoriesStaleness prevention (validate-docs.py)
check_framework_version_strings(): Flags version headers in framework docs (*_FRAMEWORK.md,IMPLEMENTATION.md,TESTER_CRITIC_BRIEF.md) that don't matchcritic-status.yamlversionTesting
Origin
PR #16 retro — all 7 broken link findings were in files moved one directory deeper via
git mv. Existing PS-007 couldn't resolve../../paths that stayed within the repo boundary.