Skip to content

Chore/refresh sample output - #2

Merged
shenxianpeng merged 2 commits into
mainfrom
chore/refresh-sample-output
Aug 4, 2026
Merged

Chore/refresh sample output#2
shenxianpeng merged 2 commits into
mainfrom
chore/refresh-sample-output

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Aug 4, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Documentation

    • Added release notes covering new diagnostic rule IDs, JSON metadata, terminal links, expanded branch types, author-pattern configuration, and improved installation and validation behavior.
    • Updated documentation examples to use the correct subject-imperative rule identifier.
    • Added links to the rules reference and unified documentation resources.
  • Tests

    • Added checks to ensure documentation examples match current rule names.

The pasted terminal transcripts still named rules by their config key —
subject_imperative, ai_attribution — but the tool moved to the kebab-case
form the reference headings use. Six samples across four pages, and every
existing test passed, because the heading and options-table guards read
reference tables rather than transcripts.

Adds the missing guard: any CCxxx line in any page must name the rule the
way the installed package prints it. Reverting one sample makes it fail
with the page, the rule and both spellings named.
The changelog stopped at v2.11.0 while v2.12.0, v2.12.1 and v2.12.2 shipped,
so three releases and a user-facing feature — configurable author name and
email patterns — were absent from the site.

Adds those three, and drafts v2.13.0 from the twelve commits on main: stable
rule IDs, the wider default branch types, the linked rule IDs in terminal
output, and the move to this domain. The v2.13.0 date is today's and needs
matching to the actual release.
@coderabbitai

coderabbitai Bot commented Aug 4, 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: Pro Plus

Run ID: ef554790-d0b5-4e3a-96d0-015042d1f141

📥 Commits

Reviewing files that changed from the base of the PR and between cf1caae and 188893e.

📒 Files selected for processing (6)
  • docs/changelog.md
  • docs/guides/ai-attribution.md
  • docs/index.md
  • docs/rules.md
  • docs/what-is-new.md
  • tests/docs_sync_test.py

📝 Walkthrough

Walkthrough

The change adds release notes, updates documented rule-name examples, and adds a test that checks Markdown failure samples against the current rule definitions.

Changes

Documentation and validation

Layer / File(s) Summary
Release notes and historical changes
docs/changelog.md, docs/what-is-new.md
Release notes cover versions 2.13.0 through 2.12.0 and describe rule IDs, output metadata, branch types, author patterns, and other documented behavior changes.
Rule-name example alignment
docs/index.md, docs/rules.md, docs/guides/ai-attribution.md
CC003 examples use subject-imperative. The CC013 example remains unchanged.
Documentation sample validation
tests/docs_sync_test.py
The test extracts rule IDs and printed names from Markdown failure samples and compares them with ALL_RULES.

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

🚥 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 accurately describes the documentation sample-output updates and related synchronization test.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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 chore/refresh-sample-output

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 7ddc2b7 into main Aug 4, 2026
4 checks passed
@shenxianpeng
shenxianpeng deleted the chore/refresh-sample-output branch August 4, 2026 10:39
shenxianpeng added a commit that referenced this pull request Aug 4, 2026
Follow-up to #2, which merged the sample-output fix and the missing
changelog entries. This is the structural pass.

## Why

The site had roughly pre-commit.com's content volume (2.9k lines vs
2.3k) spread across **17 navigation destinations instead of 1**. Nine of
those pages were under 100 lines. pre-commit.com reads as clear not
because it categorises well, but because there is nothing to categorise
— one page, one Ctrl-F, one URL.

Four places said the same thing twice:

- install steps in `installation.md` **and** quickstart step 1
- CLI invocations in `quickstart.md` **and** `example.md`
- releases in `what-is-new.md` **and** `changelog.md` — #2 had to touch
both, which is how an entry went missing
- "what it checks" on the landing page restating the rules reference

## What changed

| New page | Absorbed |
|---|---|
| `/getting-started/` | `installation` + `quickstart` |
| `/guides/integrations/` | `pre-commit` + `github-actions` +
`organization` |
| `/guides/policies/` | `signoff` + `ai-attribution` |
| `/` | `why` + `projects` (incl. the architecture diagram) |
| `/changelog/` | `what-is-new` → a Highlights table |

The Highlights table links into the entries below rather than restating
them, so a release is written up once. All 18 version headings gained
stable anchors (`/changelog/#v2130`).

## URLs

**`/rules/` and `/configuration/` do not move.** Every released version
of the package prints `commit-check.com/rules/#ccNNN` — hardcoded as
`RULES_DOCS_URL` in `commit_check/rules_catalog.py` and asserted in its
tests — so that path is a published interface, not a documentation path.

Every retired URL gets a redirect stub emitted by
`scripts/mkdocs_hooks.py`. Production is GitHub Pages, where
`netlify.toml` has no effect, so the build hook is the only mechanism
that reaches users; `netlify.toml` covers deploy previews only. The
forced `/getting-started/` → `/getting-started/quickstart/` redirect is
removed — it would have shadowed the real page that now lives there.

## Correctness fixes the merge surfaced

- **`commit-check-action@v1`** in the GitHub Actions guide. The action
has been on v2 since v2.0.0 (latest v2.12.0). The `v1` floating tag
still resolves, so nothing errored — users just silently got an old
action. The landing page already said `@v2`; the two disagreed.
- **`author_name` / `author_email`** in the changelog from #2. The
runtime options are `author_name_pattern` / `author_email_pattern`.
- **Five `rev:` pins spread across four versions** (v2.5.0, v2.11.0,
v2.12.2 ×2) → v2.13.0. The blog post keeps its own pin; a dated post
records what was true when written.
- **`v2.11.1` was missing entirely** from the changelog, and its two
signoff fixes (#462, #464) were filed under v2.12.0 where they did not
ship.
- Hardcoded version badges dropped from the ecosystem cards — they went
stale on their own.

## Guards added

`mkdocs.yml` turns on `validation.anchors` and `unrecognized_links`, so
the deploy build's `--strict` now fails on a broken anchor. The pages
cross-link by section anchor after this change, and a stale anchor is
invisible in a rendered page — it just scrolls to the top. Verified by
breaking one: `Aborted with 1 warnings in strict mode`.

The docs-sync CI job now installs the **released** package rather than
`main`. That exception existed because the rule IDs were merged but
unreleased; while it stood, CI was validating the site against code no
reader could install. v2.13.0 is on PyPI, so it is over. Left unpinned
deliberately — the check only means something against what `pip install
commit-check` actually returns.

## Verification

- 7/7 docs-sync tests pass **against the released 2.13.0 from PyPI**,
not the working tree
- `mkdocs build --strict` clean
- A script walked every internal link and anchor in the built site: all
resolve, `/rules/#cc003` intact
- Redirect stubs confirmed for all 10 retired URLs

---
_Generated by [Claude
Code](https://claude.ai/code/session_01U9zFxq8V4qxG4aMzJhGBFn)_

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
* Restructured guides consolidating integrations and policies into
streamlined references
* Enhanced getting-started guide with pip, uv, and pipx installation
support plus SLSA provenance verification
* Improved changelog with highlights table and per-version anchors for
better discoverability
  * Refreshed homepage and configuration examples to v2.13.0

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude <noreply@anthropic.com>
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