t1048: Fix auto-rebase: handle AI-completed rebase and increase max attempts#1478
t1048: Fix auto-rebase: handle AI-completed rebase and increase max attempts#1478marcusquinn merged 1 commit intomainfrom
Conversation
- Check for REBASE_HEAD before running git rebase --continue - AI agent may complete rebase itself, causing "no rebase in progress" error - Increase max_rebase_attempts from 2 to 5 for 10+ sibling PRs - Applied fix to both worktree and non-worktree code paths
Summary of ChangesHello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical issue in the automatic rebase mechanism where an AI agent completing a rebase prematurely would cause subsequent Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Caution Review failedThe pull request is closed. WalkthroughThe deployment script is enhanced to improve pull request rebase automation by increasing retry limits from 2 to 5 attempts and refining rebase continuation logic. After AI-based conflict resolution, the script now detects via REBASE_HEAD whether the rebase was completed by the AI agent or requires manual continuation, with proper abort and branch-return handling across multiple code paths. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related issues
Possibly related PRs
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Sat Feb 14 14:53:43 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|
There was a problem hiding this comment.
Code Review
This pull request effectively addresses the auto-rebase failure by checking if a rebase is already complete before attempting to continue. Increasing the max rebase attempts is also a sensible adjustment for handling a larger number of sibling PRs.



Summary
Fixes the auto-rebase failure in
deploy.shwhereresolve_rebase_conflicts()spawns an AI agent that completes the rebase itself, causing the subsequentgit rebase --continueto fail with "fatal: no rebase in progress".Changes
Detect rebase-already-done state: Check for
REBASE_HEADbefore runninggit rebase --continue. If the AI agent has already completed the rebase, skip the continue step.Increase max_rebase_attempts: Changed from 2 to 5 to handle 10+ sibling PRs without hitting the limit prematurely.
Applied to both code paths: Fixed both the worktree and non-worktree rebase paths in
rebase_sibling_pr().Testing
REBASE_HEADexistence before attempting continueImpact
Unblocks 17 PRs that were failing due to this race condition.
Ref #1476
Summary by CodeRabbit