Skip to content

Resolve tree/ links as directories in the cross-repository link checker - #41

Draft
Pigbibi wants to merge 1 commit into
mainfrom
fix/cross-repo-links-tree-dirs
Draft

Pigbibi wants to merge 1 commit into
mainfrom
fix/cross-repo-links-tree-dirs

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #28

Problem

scripts/check_cross_repo_links.py classified every github.com/<org>/<repo>/(blob|tree)/<ref>/<path> link as github-blob and resolved it against the file list from git ls-tree -r, which contains no directories. Any directory link (e.g. QuantRuntimeSettings/tree/main/compat/bundles, which exists on main) was therefore reported as broken.

Change

  • tree/ links are classified github-tree and must resolve to a directory on the default branch; blob/ links must resolve to a file.
  • Directories are derived from the tracked file list; relative links accept either a file or a directory.
  • Trailing slashes and query strings are tolerated.
  • New scripts/test_cross_repo_links.py (unittest, 7 cases) runs in the workflow before the scan.

Risk

P2, R1. Checker-only change; no runtime, secret or deploy impact. Requires an exact-head codex-review-state:v1 marker before merge.

This was referenced Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cross-repository links do not resolve

1 participant