Skip to content

Allow retrying git commits without signing when signing fails#4219

Open
tim-smart wants to merge 5 commits into
pingdotgg:mainfrom
tim-smart:t3code/git-signing-toggle
Open

Allow retrying git commits without signing when signing fails#4219
tim-smart wants to merge 5 commits into
pingdotgg:mainfrom
tim-smart:t3code/git-signing-toggle

Conversation

@tim-smart

@tim-smart tim-smart commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Previously, when git signing failed (due to non-interactive environments etc),
the git commit would be aborted.

With this change, it allows you to retry with signing disabled.


Note

Medium Risk
Touches core commit/git execution and error classification across server and clients; behavior changes on failure paths but is scoped to signing retries with tests.

Overview
Adds commit-signing failure detection and a one-shot unsigned retry path for stacked git actions when GPG/SSH signing fails (common in non-interactive environments).

The server classifies signing errors via stderr patterns and surfaces failureKind: commit_signing_failed on GitCommandError and action_failed progress events (defaulting to unknown for older clients). Commits can pass disableCommitSigning, which adds --no-gpg-sign for that attempt only. Hook progress attribution is tightened so multi-hook output is not mislabeled, and failed hooks are not mistaken for signing failures.

Web shows a toast action Retry without signing; mobile shows the same via Alert. buildUnsignedCommitRetryInput rebuilds the request with signing off while keeping action, message, and file paths; feature-branch retries avoid creating a second branch and can sync thread branch state after success. Unsigned retries do not offer another signing retry if they still fail.

Reviewed by Cursor Bugbot for commit 2de8119. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Allow retrying git commits without signing when commit signing fails

  • Adds isCommitSigningFailure detection by matching GPG, pinentry, and SSH signer error patterns in commit stderr output in GitVcsDriverCore.ts.
  • Introduces a failureKind field ('unknown' | 'commit_signing_failed') on GitCommandError and action_failed progress events, with a default of 'unknown' for backwards compatibility.
  • On a signing failure, the web UI (GitActionsControl.tsx) shows a "Retry without signing" button in the error toast; the mobile client (use-selected-thread-git-actions.ts) shows a native Alert with the same retry option.
  • buildUnsignedCommitRetryInput constructs a retry payload with disableCommitSigning: true while preserving the original action, commit message, and file paths.
  • Adds --no-gpg-sign to the git commit invocation when disableCommitSigning is set, propagated from the contract layer through the server to the git core.

Macroscope summarized 2de8119.

@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Jul 21, 2026
@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

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

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 98b94970-358c-40d5-9ec9-783266aa3609

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)
  • Create PR with unit tests

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.

@tim-smart tim-smart changed the title Allow retrying git commits with signing when signing fails Allow retrying git commits without signing when signing fails Jul 21, 2026
Comment thread apps/mobile/src/state/use-selected-thread-git-actions.ts
Comment thread packages/contracts/src/git.ts
Comment thread apps/mobile/src/state/use-selected-thread-git-actions.ts Outdated
Comment thread packages/contracts/src/git.ts
@macroscopeapp

macroscopeapp Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Needs human review

This PR introduces a new feature with user-facing dialogs and recovery workflows for commit signing failures. The changes span mobile, web, and server layers with new error classification logic and a disableCommitSigning flag propagated throughout the stack, warranting human review.

You can customize Macroscope's approvability policy. Learn more.

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a48b520. Configure here.

Comment thread apps/server/src/git/GitManager.ts
- Detect commit signing failures across server and client
- Let stacked git actions retry once with signing disabled
- Preserve unsigned commit behavior in commit, push, and PR flows
- Prevent stale action controls from appearing on Git progress toasts
@tim-smart
tim-smart force-pushed the t3code/git-signing-toggle branch from 61e9467 to 2de8119 Compare July 21, 2026 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant