Skip to content

docs: the comparison table claims 24 rules, the package defines 22 - #35

Merged
shenxianpeng merged 1 commit into
mainfrom
claude/submit-patch-commit-check-42ac3i
Sep 7, 2026
Merged

docs: the comparison table claims 24 rules, the package defines 22#35
shenxianpeng merged 1 commit into
mainfrom
claude/submit-patch-commit-check-42ac3i

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Sep 7, 2026

Copy link
Copy Markdown
Member

What

docs/compare/tools.md sells the engine as "One rule engine with 24 documented rules". The real number is 22.

Counted both sides:

  • docs/rules.md carries 22 { #ccNNN } anchors
  • commit_check.rules_catalog.ALL_RULES has 22 entries with a rule ID — CC001–CC013, CC101–CC102, CC201–CC202, CC301–CC304, CC401

The competitor comparison table is the page where a reader checks a claim hardest, and the rules page it links to is one click away, so an inflated count there costs more than it gains.

Why the existing tests missed it

tests/docs_sync_test.py already proves a great deal: every rule has an anchor, a section heading, and a "What it does / Why is this bad? / Options" body; every pasted failure line names a rule the package actually prints; every pinned rev: matches the release; every config default matches the runtime.

What none of them do is read a sentence that counts the rules out loud. So this drifted silently.

This PR adds test_prose_rule_counts_match_the_catalog, which scans every page for the N documented rules shape and compares it to len(ALL_RULES). docs/blog/posts/ is skipped — AGENTS.md is explicit that blog posts are dated records and must not be moved forward.

Verified the guard actually guards: with the number restored to 24 the new test fails; with 22 it passes.

Verification

$ pytest tests/ -q
10 passed

$ mkdocs build --strict
Documentation built in 1.85 seconds

🤖 Generated with Claude Code

https://claude.ai/code/session_018xYa7m3qup5wyN5MaXFgf6


Generated by Claude Code

Summary by CodeRabbit

  • Documentation

    • Corrected the Commit Check comparison entry to state that it has 22 documented rules.
  • Tests

    • Added automated checks to verify that rule counts stated in documentation match the available rule catalog.

The competitor table is where a reader checks the claim hardest, so an
inflated count there costs more than it gains. docs/rules.md carries 22
{ #ccNNN } anchors and ALL_RULES has 22 entries with a rule ID
(CC001-CC013, CC101-CC102, CC201-CC202, CC301-CC304, CC401).

The existing tests prove every rule is documented; none of them read a
sentence that counts them, which is why this survived. A new test does,
over every page outside docs/blog/posts (dated records, per AGENTS.md).
It fails on the old number.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018xYa7m3qup5wyN5MaXFgf6
@netlify

netlify Bot commented Sep 7, 2026

Copy link
Copy Markdown

Deploy Preview for commit-check ready!

Name Link
🔨 Latest commit 6213d5e
🔍 Latest deploy log https://app.netlify.com/projects/commit-check/deploys/6a9e971a515022000821d75d
😎 Deploy Preview https://deploy-preview-35--commit-check.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 1f7943d8-c6d7-4d61-bc29-74de3de546f4

📥 Commits

Reviewing files that changed from the base of the PR and between 42a5a9d and 6213d5e.

📒 Files selected for processing (2)
  • docs/compare/tools.md
  • tests/docs_sync_test.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The Commit Check documentation changes its documented rule count from 24 to 22. A documentation test scans Markdown files outside posts and verifies that prose counts match len(ALL_RULES).

Changes

Rule Count Synchronization

Layer / File(s) Summary
Documentation count validation
tests/docs_sync_test.py, docs/compare/tools.md
Adds a regex and test for matching documented rule counts against ALL_RULES. Updates the comparison table count to 22.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 6213d

This updates the documented rule count to 22 and adds coverage to keep future rule-count claims synchronized with the catalog. No current merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main documentation correction from 24 rules to 22 rules.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (1 skipped: 1 …
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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 claude/submit-patch-commit-check-42ac3i

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@shenxianpeng
shenxianpeng merged commit 837c88a into main Sep 7, 2026
7 of 8 checks passed
@shenxianpeng
shenxianpeng deleted the claude/submit-patch-commit-check-42ac3i branch September 7, 2026 10:54
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