Skip to content

Error Recovery

Automatic retry and rollback when merge operations fail.

Auto-Retry

When a merge fails (e.g., merge conflict, CI failure), GitWire can automatically retry:

SettingDefaultDescription
Max retries3Maximum retry attempts
BackoffExponentialDelay between retries
Auto-removeAfter max retriesRemove from queue after exhausting retries

Rollback

When rollback_enabled is true in the queue config, GitWire can automatically:

  1. Revert the merge commit
  2. Create a revert PR with the reverted changes
  3. Record the rollback event for traceability

Rollback Event Record

FieldDescription
merge_commitSHA of the problematic merge
revert_commitSHA of the revert (if completed)
revert_pr_numberPR number of the revert
trigger_reasonWhy the rollback was triggered
statuspending, completed

Trigger Reasons

ReasonDescription
ci_failurePost-merge CI check failed
manualMaintainer triggered rollback
policy_violationMerged code violates a policy

Viewing Rollbacks

bash
curl https://gitwire.yourdomain.com/api/phase2/rollbacks \
  -H "Authorization: Bearer YOUR_API_KEY"

Feedback Rules

Released under the MIT License.