Skip to content

Fail the script tests when a root or docs/ page links a missing file - #47

Merged
Xget7 merged 1 commit into
docs/architecturefrom
docs/link-check
Oct 20, 2026
Merged

Xget7 merged 1 commit into
docs/architecturefrom
docs/link-check

Conversation

@Xget7

@Xget7 Xget7 commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Summary

docs/ARCHITECTURE.md links the files that own each pipeline stage, so a rename silently orphans it.
A script test now checks that every relative link in the root and docs/ pages resolves.

test_relative_links_resolve
  for page in git ls-files  *.md (root), docs/**/*.md
    strip fenced code
    for each [text](target) and [ref]: target, skipping URLs and anchors
      assert page.parent / target exists

Package READMEs and distribution/ stay out: they link paths of the npm package and the mirror repos, which resolve there and not in this checkout.
The test runs in the scripts job, which ci-filters.yml triggers on any non-Markdown change, the case where a rename breaks a link.

Evidence

  • Before: renaming MetalWorld.mm in the page's link left every check green.
  • After:
    python3 -m unittest discover -s scripts/tests -p test_doc_links.py
    - ['../packages/splatkit-ios/Sources/SplatKitCore/rendering/metal/world/MetalWorldGone.mm']
    FAILED (failures=1)
    
    Reverted, python3 -m unittest discover -s scripts/tests: Ran 47 tests ... OK.
  • Where it ran: Mac, Python 3, on this branch.
  • Checks: script tests only; no native or React Native code changed.

Merge Danger

Door: Two-way.

Blast Radius: CI

A PR that renames a file linked from a root or docs/ page now fails the scripts job until the link is fixed.

docs/ARCHITECTURE.md links the files that own each pipeline stage; a rename that orphans one now turns the scripts job red.
@Xget7
Xget7 added this pull request to stack #48 October 20, 2026 14:28
@Xget7
Xget7 marked this pull request as ready for review October 20, 2026 14:29
@Xget7
Xget7 merged commit ed2b181 into main Oct 20, 2026
22 checks passed
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.

1 participant