Repository navigation
Check the Target Repository's Own Identity and Signing Settings Before Committing - #4036
Conversation
…e Committing The git-commit-conventions signing probe commits in a fresh scratch repository, so it reads only system and global config. A target repository with its own commit.gpgsign=false or user.email passed the probe and then committed unsigned or under another address. Add a read-only check to "Identity, verified not set" that compares user.email, user.signingkey, commit.gpgsign, and gpg.format in the target repository against what a fresh repository reads, printing each value's scope and origin. A difference is a stop at git add, surfaced to the maintainer as the host fault the section already names, never removed or bypassed with -c. Sh and PowerShell forms, regenerated. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The local review found that a path outside any repository passed the target check, since it then reads only host config. Guard it with rev-parse. Compare author.email and committer.email too, which override user.email on a commit. State that only develop and main rulesets require signatures, so a feature branch accepts an unsigned commit, and correct the signing bullet's claim that every fleet branch rejects one. Surface a DIFFERS setting by key and scope rather than the raw line, which holds observed host data. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ed Commit The scratch probe catches a host that does not sign, but a target repository that turns signing off passes it. Name the target-repository check beside it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
There was a problem hiding this comment.
🟡 Changes recommended
The change still has an active moderate issue because the PowerShell validation can report success when scratch repository initialization fails.
1 open issue
What changed in this PR
Strengthens git-commit-conventions by comparing target-repository identity and signing settings with a fresh repository before committing, while correcting signature-enforcement documentation and synchronizing generated skill distributions.
Changes:
- Adds shell and PowerShell checks for repository-specific identity and signing overrides.
- Clarifies that signature rules apply to the develop and main branches.
- Updates the canonical skill, generated copies, and source digest.
- The PowerShell check does not stop when scratch-repository initialization fails.
| File | Description |
|---|---|
| .github/skills/git-commit-conventions/SKILL.md | Updates the generated GitHub skill with target-repository identity and signing checks and corrected signature guidance. |
| .claude-plugin/fleet-skills/skills/git-commit-conventions/SKILL.md | Updates the generated Claude skill with target-repository identity and signing checks and corrected signature guidance. |
| .claude-plugin/fleet-skills/.source-digests/git-commit-conventions | Updates the source digest for the regenerated distributed skill content. |
| .agents/skills/git-commit-conventions/SKILL.md | Adds canonical shell and PowerShell checks for target-repository identity and signing settings and corrects signature-enforcement guidance. |
Review effort: Lite
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #4036 +/- ##
===========================================
- Coverage 81.60% 78.94% -2.67%
===========================================
Files 26 37 +11
Lines 9070 12669 +3599
===========================================
+ Hits 7402 10002 +2600
- Misses 1668 2667 +999
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@coderabbitai review |
|
/review |
Action not completed
|
PowerShell does not throw on a native command's nonzero exit, so a failed git init left the comparison running against no repository. Throw on it, as the sh form's && chain already stops. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
A recorded local strict-review pass covers head |

Summary
The
git-commit-conventionssigning probe commits in a fresh scratch repository, so it reads only the system and global git config. A target repository with its owncommit.gpgsign=false, or its ownuser.email, passed the probe. Its commit then landed unsigned or under another address."Identity, verified not set" now adds a read-only check. It runs in each target repository before the session's first commit there. It refuses a path outside any repository. It compares
user.email,author.email,committer.email,user.signingkey,commit.gpgsign, andgpg.formatthere against what a fresh repository reads, and prints each value's scope and origin. AnyDIFFERSline means stop atgit addand tell the maintainer about it as the host fault the section already names. The report names the setting and its scope, and keeps the raw line out of posted text, since that line holds observed host data. The agent neither removes the override nor commits past it with-c. The check comes in a one-line sh form and a PowerShell form.The signing bullet's claim that every fleet branch rejects an unsigned push is corrected. Only the
developandmainrulesets require signatures, perrepo-config/develop.jsonandrepo-config/main.json. The bullet now names both checks as what catches an unsigned commit on a feature branch.The scratch probe itself is unchanged. So its copies in
STANDUP.mdanddocs/host-setup.md, which check the host rather than a target repository, stay byte-identical with it.Verification
commit.gpgsign=falseand[email protected]printsDIFFERSfor those keys with scopelocaland exits non-zero. A local[email protected]does the same for that key. A directory outside any repository is refused. A fresh repository with no local settings printssamefor every key and exits zero.shellcheck -s shis clean on the sh form.build_dist.py --checkis current, and the pre-commit gates pass.local-strict-reviewpasses. The first raised seven findings, the second one, and the third none.Local review findings declined
.agents/skills/git-commit-conventions/SKILL.mdtarget-repository check,introduced: the values are compared as raw strings, socommit.gpgsign=yesbeside a globaltruereadsDIFFERS. Declined: the input is the maintainer's own config, and the failure is a loud spurious stop, never a silent pass. So the trust-boundaries rule gives it no fix.introduced:config --show-scopeneeds git 2.26 or later. Declined: on an older git only the provenance column is blank, and the verdict and the stop are unaffected.Dropped findings
STANDUP.mdoverride check aftergit init, consolidation: a narrower local-only form of the same check. It runs on a freshly initialized repository and is followed by verifying the real first commit's signature and identity, so it is not in disagreement with this change.Closes on promotion: #4010
🤖 Generated with Claude Code