Skip to content

Check the Target Repository's Own Identity and Signing Settings Before Committing - #4036

Merged
ptr727 merged 4 commits into
developfrom
burndown/4010-target-repo-identity-check
Nov 10, 2026
Merged

ptr727 merged 4 commits into
developfrom
burndown/4010-target-repo-identity-check

Conversation

@ptr727

@ptr727 ptr727 commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Summary

The git-commit-conventions signing probe commits in a fresh scratch repository, so it reads only the system and global git config. A target repository with its own commit.gpgsign=false, or its own user.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, and gpg.format there against what a fresh repository reads, and prints each value's scope and origin. Any DIFFERS line means stop at git add and 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 develop and main rulesets require signatures, per repo-config/develop.json and repo-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.md and docs/host-setup.md, which check the host rather than a target repository, stay byte-identical with it.

Verification

  • Constructed cases, both forms: a fresh repository with local commit.gpgsign=false and [email protected] prints DIFFERS for those keys with scope local and 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 prints same for every key and exits zero.
  • shellcheck -s sh is clean on the sh form.
  • build_dist.py --check is current, and the pre-commit gates pass.
  • Three recorded local-strict-review passes. The first raised seven findings, the second one, and the third none.

Local review findings declined

  • .agents/skills/git-commit-conventions/SKILL.md target-repository check, introduced: the values are compared as raw strings, so commit.gpgsign=yes beside a global true reads DIFFERS. 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.
  • Same check, introduced: config --show-scope needs 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.md override check after git 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

ptr727 and others added 3 commits November 10, 2026 10:00
…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]>
Copilot AI lite review requested due to automatic review settings November 10, 2026 18:07
@ptr727

ptr727 commented Nov 10, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head a78b17b7e3ecbb7efbc19f5fc498572048263dcd, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
Finishing Touches

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

codecov Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.94%. Comparing base (b38e084) to head (ce3e02d).
⚠️ Report is 133 commits behind head on develop.

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     
Flag Coverage Δ
python-3.13 78.94% <ø> (-2.67%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@ptr727

ptr727 commented Nov 10, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@ptr727

ptr727 commented Nov 10, 2026

Copy link
Copy Markdown
Owner Author

/review

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Action not completed

Head commit changed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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]>
@ptr727

ptr727 commented Nov 10, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head ce3e02de63cae5a45ee5e0827a453361e719a229, the content this pull request carries at that commit against develop, and it recorded 0 findings.

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.

2 participants