GeezerVison is showing github.com — fix: check the first commit's author, name author.* in the CC017 advice by shenxianpeng · Pull Request #692 · commit-check/commit-check
Conversation
Before: Two gaps around the author of a commit that does not exist yet.
- In a repository with no commits, the author hooks (
check-author-name, check-author-email) skipped, so the first commit was never held to author_name_pattern or author_email_pattern:
$ git config user.name claude # cchk.toml: author_name_pattern = "^[A-Z][a-z]+ [A-Z][a-z]+$"
$ git commit -m "chore: add the commit policy"
⊘ skipped (not validated): author-name
$ git log --format="%an: %s"
claude: chore: add the commit policy
- With a tool named in
author.name, the CC017 advice did not get the commit through: after setting user.name and user.email and unsetting GIT_AUTHOR_*, git still records the author.* pair.
✖ CC017 ai-author failed: Claude <[email protected]>
An AI tool is the commit author: Claude Code
Suggest: Commit as yourself: set git config user.name and user.email to your own, and unset GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL if a tool set them; a commit that already exists then needs git commit --amend --reset-author
After:
- The first commit is checked like any other:
$ git commit -m "chore: add the commit policy"
✖ Commit rejected by Commit Check · 1 check failed
✖ CC101 author-name failed: claude
The committer name seems invalid
Suggest: git config user.name 'Your Name'
Docs: https://commit-check.com/rules/#cc101
$ git log --format="%an: %s"
fatal: your current branch 'main' does not have any commits yet
- The advice names every setting that can hold the tool:
✖ CC017 ai-author failed: Claude <[email protected]>
An AI tool is the commit author: Claude Code
Suggest: Commit as yourself: set git config user.name and user.email to your own, and unset author.name, author.email, GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL if a tool set them; a commit that already exists then needs git commit --amend --reset-author
Docs: https://commit-check.com/rules/#cc017
How
AuthorValidator shared the commit checks' skip, which has two halves: ignore_authors, and "no message and no commits yet". The second half does not fit the author checks: without --rev they read the identity git will record for the next commit (GIT_AUTHOR_*, then author.*, then user.*), and that exists before the first commit does. The validator now applies only the ignore_authors half.
ignore_authors still exempts an author on a first commit. With no commit author to compare, the ignore list reads the identity the next commit will carry; with a commit present it reads what it read before.
- With no identity configured and no commit to read one from, the check is still skipped.
git log is no longer asked in that case: on a repository with no commits it answers with an error message, which would have been read as the author.
- No extra git call for the hooks or a
HEAD check: the author checks look up once whether a commit exists, as they did before.
- The CC017 change is the advice text only.
--rev and HEAD checks keep the short "git commit --amend --reset-author" advice.
- Tests: four unit tests and one test on a real empty repository for the first commit, and the CC017 advice test now expects the new text. Line and branch coverage stay at 100%.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
The author hooks run with no message, and with no commit yet every
commit check was skipped, so the first commit of a repository was never
held to author_name_pattern or author_email_pattern. The identity under
test is the one git will record for the next commit, which exists before
the first commit does.
With no identity configured and no commit to read one from, the check is
still skipped; git log is no longer asked, since its error message would
be read as the author.
A tool named in author.name or author.email stays the author after
user.name and user.email are set and GIT_AUTHOR_* are unset, because git
reads the author.* pair first. The advice for a message that is not a
commit yet now lists them among the settings to unset.
coderabbitai
Bot
commented
Nov 11, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

Walkthrough
-
Author validation now checks configured identities before a repository’s first commit and skips when no identity is available. Pending AI-author remediation guidance now includes Git configuration settings to unset.
Changes: Author validation
| Layer / File(s) |
Summary |
Identity lookup, validation, and guidance commit_check/engine.py, tests/engine_test.py, tests/integration_test.py |
Configured author identities are validated before the first commit. Validation skips when no identity or commit is available. Tests cover these cases and the pending AI-author guidance update. |
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix
Possibly related PRs
Suggested labels: bug, tests
Suggested reviewers: copilot
Merge Risk: Low · up to c75ae
-
In a new repository, an author configured to be ignored may still fail the author check. Fix the first-commit ignore lookup before merging, or explicitly accept this bounded risk.
Pre-merge checks: 4 · 1
-
Failed checks: 1 warning
| Check name |
Status |
Explanation |
Resolution |
| Docstring Coverage |
 |
Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… |
Write docstrings for the functions missing them to satisfy the coverage threshold. |
Passed checks: 4 passed
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title accurately identifies both main changes: checking the first commit's author and adding author.* settings to CC017 advice. It is specific enough for a teammate scanning project history. |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
| Description Check |
 |
Check skipped - CodeRabbit’s high-level summary is enabled. |
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 3 functions across 3 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
codecov
Bot
commented
Nov 11, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (ab14f96) to head (274c403).
Additional details and impacted files
@@ Coverage Diff @@
## main #692 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 14 14
Lines 2552 2563 +11
Branches 499 504 +5
=========================================
+ Hits 2552 2563 +11
☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.
🚀 New features to boost your workflow:
- ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
With no commit yet there is no commit author for the ignore list to
compare, and git log answers with an error message instead. An ignored
author's first commit was therefore held to the author patterns now that
the first commit is checked. The author checks look up once whether a
commit exists, as they did before, and pass the ignore list the identity
the next commit will carry when none does.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
codspeed
Bot
commented
Nov 11, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Merging this PR will degrade performance by 18.49%
2 warnings
⚠️ 139 benchmarks are dominated by system calls
System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.
Learn more about system calls
See affected benchmarks
⚠️ 2 benchmarks with a significant change ran on different hardware
Their base and head results were measured on machines with a different CPU, core count or memory, so the changes might not come from the code. Run base and head on the same runner type.
Learn more about Macro Runners
See affected benchmarks
❌ 2 regressed benchmarks
✅ 682 untouched benchmarks
⏩ 131 skipped benchmarks1
Performance Changes
Tip Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing claude/project-thread-pofwgp (274c403) with main (03d6f61)2
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
bug
Something isn't working
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|