Repository navigation
Fix root-token boundaries in doc citation scanning - #309
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 01aec83867
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # false positives. This repo's own `docs/` directory was dissolved by the doc | ||
| # refactor, after which `doc/` is the sole owned prefix. | ||
| CITATION = re.compile(r"\b(doc/[A-Za-z0-9_][A-Za-z0-9_./-]*\.(?:md|toml|json|yaml|yml|tsv|txt|py))") | ||
| CITATION = re.compile(r"(?<![\w./\\-])(doc/[A-Za-z0-9_][A-Za-z0-9_./-]*\.(?:md|toml|json|yaml|yml|tsv|txt|py))") |
There was a problem hiding this comment.
Keep
./doc citations in the scan
When a repository-root citation is written in the common shell-style form ./doc/missing.md, the new negative lookbehind rejects it because doc/ is preceded by a dot. The scanner then reports zero citations and allows a dangling in-repository reference to pass, contrary to its stated repo-root citation contract. Exclude dots only when they belong to a preceding path component, while continuing to recognize an explicit ./doc/... prefix.
Useful? React with 👍 / 👎.
The doc citation scanner interprets an upstream path such as
component-doc/scripts/validator.pyas a repository-root citation todoc/scripts/validator.py. This produces 15 false missing-file reports for the JiuwenSwarm catalog and blocks its data-only PR.Require a real root-token boundary before
doc/, excluding preceding word, slash, backslash, dot, and hyphen characters. Bare local citations and ROOT/REPO path-segment checks retain their existing behavior.Validation: 15 scanner regression cases pass, covering embedded upstream and URL paths, genuine missing local references, valid references, and valid/missing ROOT segments. Both whole-repository doc linters pass. A byte-identical temporary copy of the actual 173-feature catalog changes from 15 false positives to zero; adding a genuine missing root citation still fails. Catalog and checkpoint bytes remain unchanged.