[PR #3051] [MERGED] feat: add CI check for unresolved @[ref] cross-references #3131

Closed
opened 2026-06-05 18:21:11 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/docs/pull/3051
Author: @mdrxy
Created: 3/10/2026
Status: Merged
Merged: 3/13/2026
Merged by: @mdrxy

Base: mainHead: open-swe/17c5902a-c75e-8353-6bb5-c3e07da552f4


📝 Commits (10+)

  • 6ed445f Add CI check for unresolved @[ref] cross-references
  • 37c25da fix missing cross refs
  • ae32c7f add github action
  • e09674c add file to trigger
  • b047e25 update workflow triggers
  • 014400c Merge branch 'main' into open-swe/17c5902a-c75e-8353-6bb5-c3e07da552f4
  • 9c7629a Merge branch 'main' into open-swe/17c5902a-c75e-8353-6bb5-c3e07da552f4
  • 42a777f Update pipeline/preprocessors/link_map.py
  • 516f40a Merge branch 'main' into open-swe/17c5902a-c75e-8353-6bb5-c3e07da552f4
  • 38eadb8 cr

📊 Changes

5 files changed (+285 additions, -2 deletions)

View changed files

📝 .github/workflows/ci.yml (+12 -0)
📝 Makefile (+6 -1)
📝 pipeline/preprocessors/link_map.py (+4 -1)
scripts/check_cross_refs.py (+133 -0)
tests/unit_tests/test_check_cross_refs.py (+130 -0)

📄 Description

Description

Adds a check that validates all @[ref] cross-references in source MDX/MD files resolve against entries in link_map.py. Previously, unresolved references silently passed through the build pipeline and appeared as raw @[ClassName] text in the published docs. Available via make check-cross-refs.

Note: I couldn't modify .github/workflows/_check-links.yml due to workflow permissions. To integrate into CI, add this step to _check-links.yml after "Install Python dependencies":

- name: Check for unresolved cross-references
  run: make check-cross-refs

Test Plan

  • make check-cross-refs reports unresolved references with file, line number, and scope
  • 12 unit tests covering: valid refs, unresolved refs, scope fences, code block skipping, escaped refs, titled refs, backtick refs, and code-samples exclusion

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/docs/pull/3051 **Author:** [@mdrxy](https://github.com/mdrxy) **Created:** 3/10/2026 **Status:** ✅ Merged **Merged:** 3/13/2026 **Merged by:** [@mdrxy](https://github.com/mdrxy) **Base:** `main` ← **Head:** `open-swe/17c5902a-c75e-8353-6bb5-c3e07da552f4` --- ### 📝 Commits (10+) - [`6ed445f`](https://github.com/langchain-ai/docs/commit/6ed445f5688dae842ef3608374a200559a2db8ef) Add CI check for unresolved @[ref] cross-references - [`37c25da`](https://github.com/langchain-ai/docs/commit/37c25da7bcb88f94e971f3e0b23868b9da026f00) fix missing cross refs - [`ae32c7f`](https://github.com/langchain-ai/docs/commit/ae32c7f643d5c249f8fc760594963f2f71232bc4) add github action - [`e09674c`](https://github.com/langchain-ai/docs/commit/e09674c48df3ed130eb80b69e7842523470c6a62) add file to trigger - [`b047e25`](https://github.com/langchain-ai/docs/commit/b047e258a9ecafebfec24e2e306c7002e81fb12c) update workflow triggers - [`014400c`](https://github.com/langchain-ai/docs/commit/014400c8461cfc76f4b11c82cc55d5d1968d1643) Merge branch 'main' into open-swe/17c5902a-c75e-8353-6bb5-c3e07da552f4 - [`9c7629a`](https://github.com/langchain-ai/docs/commit/9c7629a6e2424ba56a701fa708a15e8f318399e3) Merge branch 'main' into open-swe/17c5902a-c75e-8353-6bb5-c3e07da552f4 - [`42a777f`](https://github.com/langchain-ai/docs/commit/42a777fb3476a26b00aba9b94e478fd9a506378e) Update pipeline/preprocessors/link_map.py - [`516f40a`](https://github.com/langchain-ai/docs/commit/516f40a6ca696a6d6dbe758d433124a216e6c92b) Merge branch 'main' into open-swe/17c5902a-c75e-8353-6bb5-c3e07da552f4 - [`38eadb8`](https://github.com/langchain-ai/docs/commit/38eadb8ae1105ce29d66eaff615b89182c936e57) cr ### 📊 Changes **5 files changed** (+285 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+12 -0) 📝 `Makefile` (+6 -1) 📝 `pipeline/preprocessors/link_map.py` (+4 -1) ➕ `scripts/check_cross_refs.py` (+133 -0) ➕ `tests/unit_tests/test_check_cross_refs.py` (+130 -0) </details> ### 📄 Description ## Description Adds a check that validates all `@[ref]` cross-references in source MDX/MD files resolve against entries in `link_map.py`. Previously, unresolved references silently passed through the build pipeline and appeared as raw `@[ClassName]` text in the published docs. Available via `make check-cross-refs`. Note: I couldn't modify `.github/workflows/_check-links.yml` due to workflow permissions. To integrate into CI, add this step to `_check-links.yml` after "Install Python dependencies": ```yaml - name: Check for unresolved cross-references run: make check-cross-refs ``` ## Test Plan - [ ] `make check-cross-refs` reports unresolved references with file, line number, and scope - [ ] 12 unit tests covering: valid refs, unresolved refs, scope fences, code block skipping, escaped refs, titled refs, backtick refs, and code-samples exclusion --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-05 18:21:11 -04:00
yindo closed this issue 2026-06-05 18:21:11 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/docs#3131