Skip to content

Fix check-nav-catalog to ignore commented catalog links#901

Merged
strawgate merged 2 commits intomainfrom
fix/check-nav-catalog-ignore-commented-links-900-33f9a38771b2c98c
Apr 14, 2026
Merged

Fix check-nav-catalog to ignore commented catalog links#901
strawgate merged 2 commits intomainfrom
fix/check-nav-catalog-ignore-commented-links-900-33f9a38771b2c98c

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions bot commented Apr 9, 2026

Summary

  • Strip HTML comment blocks from catalog markdown before extracting workflow slugs.
  • Keep slug extraction behavior unchanged for active gh-agent-workflows/<slug>.md links (including query/anchor variants).
  • Add regression tests for both extract_catalog_slugs and main() so commented catalog links are ignored.

Why

scripts/check-nav-catalog.py previously treated links inside HTML comments (<!-- ... -->) as active catalog entries. That created deterministic false CI failures when intentionally commented-out links were not present in nav.

Validation

  • python -m pytest tests/test_check_nav_catalog.py -v
  • python scripts/check-nav-catalog.py

Closes #900.


The body of this PR is automatically managed by the Trigger Update PR Body workflow.

github-actions bot and others added 2 commits April 9, 2026 11:43
Ignore catalog links inside HTML comments before extracting workflow slugs, so temporarily commented entries do not fail nav coverage checks.

Adds regression tests for slug extraction and main() success behavior with commented links.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions bot added the small_boom Small PR blast radius; usually low human-review need label Apr 9, 2026
@strawgate strawgate marked this pull request as ready for review April 14, 2026 17:14
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b9b7228c-25fe-41a6-917f-eca9b421822c

📥 Commits

Reviewing files that changed from the base of the PR and between 17f7a24 and b2dc1f2.

📒 Files selected for processing (2)
  • scripts/check-nav-catalog.py
  • tests/test_check_nav_catalog.py

📝 Walkthrough

Walkthrough

The changes modify the catalog slug extraction logic in scripts/check-nav-catalog.py to ignore markdown links inside HTML comment blocks. A new strip_html_comments() helper removes HTML comments from the catalog text before slug extraction occurs. The function extract_catalog_slugs() now uses the comment-stripped content instead of the original catalog text. Corresponding tests are added to verify that commented-out catalog links are excluded from validation, ensuring only visible catalog entries are checked for reachability from the navigation file.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The pull request fully addresses issue #900 by stripping HTML comments from catalog text before slug extraction and adding comprehensive regression tests.
Out of Scope Changes check ✅ Passed All changes are directly scoped to fixing the HTML comment parsing issue in check-nav-catalog.py and its tests, with no unrelated modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/check-nav-catalog-ignore-commented-links-900-33f9a38771b2c98c
  • 🛠️ Update Documentation: Commit on current branch
  • 🛠️ Update Documentation: Create PR

Comment @coderabbitai help to get the list of available commands and usage tips.

@strawgate strawgate merged commit 3ee38f5 into main Apr 14, 2026
28 checks passed
@strawgate strawgate deleted the fix/check-nav-catalog-ignore-commented-links-900-33f9a38771b2c98c branch April 14, 2026 17:16
strawgate added a commit that referenced this pull request Apr 14, 2026
Recompiles lock files to reflect merged changes from PRs:
#903, #901, #890, #885, #881, #866, #856, #814, #715

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

small_boom Small PR blast radius; usually low human-review need

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug-hunter] check-nav-catalog parses commented catalog links as active workflows

1 participant