|
| 1 | +--- |
| 2 | +title: "Check Suite Auto-fixer" |
| 3 | +sidebarTitle: "Checks Auto-fixer" |
| 4 | +icon: "bell" |
| 5 | +--- |
| 6 | + |
| 7 | +When GitHub checks fail on a Codegen PR, Codegen agents will automatically "wake up", analyze the failure, and push fix commit. |
| 8 | + |
| 9 | +<video |
| 10 | + controls |
| 11 | + src="https://res.cloudinary.com/dbikr6pew/video/upload/v1757875834/4-fixing-checks_aagrki.mp4" |
| 12 | + className="w-full aspect-[3456/2160] rounded-sm" |
| 13 | +/> |
| 14 | + |
| 15 | +This intelligent system monitors CI status and proactively resolves issues without manual intervention. |
| 16 | + |
| 17 | +<Card |
| 18 | + title="Configure Check Suite Auto-fixer" |
| 19 | + icon="rocket" |
| 20 | + href="https://codegen.com/settings/checks-autofixer" |
| 21 | +> |
| 22 | + Configure globally at the organization level or customize settings per |
| 23 | + repository. Enterprise plans can adjust retry limits for optimal performance. |
| 24 | +</Card> |
| 25 | + |
| 26 | +<Tip> |
| 27 | + Codegen will try to fix broken checks 3 times before "tapping out" by default. |
| 28 | + Enterprise customers can customize the retry count per check or per |
| 29 | + repository. |
| 30 | +</Tip> |
| 31 | + |
| 32 | +## How Checks Auto-Fixer Works |
| 33 | + |
| 34 | +Codegen continuously monitors your pull requests and automatically responds to check failures: |
| 35 | + |
| 36 | +- **Automatic Detection:** Monitors GitHub check runs and CI status in real-time |
| 37 | +- **Intelligent Analysis:** Analyzes build logs, test failures, and error messages to understand root causes |
| 38 | +- **Targeted Fixes:** Generates specific code changes to resolve the identified issues |
| 39 | +- **Persistent Retry:** Will attempt to fix issues up to 3 times per PR |
| 40 | + |
| 41 | +## What Triggers Auto-Fixing |
| 42 | + |
| 43 | +Check auto-fixing activates when: |
| 44 | + |
| 45 | +- **CI Checks Fail:** Any GitHub check run reports a failure status |
| 46 | +- **Build Errors:** Compilation, linting, or build process failures |
| 47 | +- **Test Failures:** Unit tests, integration tests, or automated test suites fail |
| 48 | +- **Code Quality Issues:** Static analysis tools report violations or warnings |
| 49 | + |
| 50 | +## The Auto-Fix Process |
| 51 | + |
| 52 | +When Codegen auto-fixes a failing PR, it follows this process: |
| 53 | + |
| 54 | +1. **Detect Failure:** Monitor check status and identify when builds break |
| 55 | +2. **Analyze Logs:** Grep through CI logs to understand specific failure points |
| 56 | +3. **Generate Solution:** Create targeted code changes to resolve identified issues |
| 57 | +4. **Apply Fix:** Automatically commit fixes to the same PR branch |
| 58 | +5. **Re-validate:** Monitor the new check run to ensure the fix was successful |
| 59 | + |
| 60 | +## Retry Logic |
| 61 | + |
| 62 | +Codegen implements intelligent retry behavior: |
| 63 | + |
| 64 | +- **Default: 3 attempts** per PR to resolve failing checks |
| 65 | +- **Enterprise customization** - Enterprise customers can configure retry limits: |
| 66 | + - Set global defaults at the organization level |
| 67 | + - Override per repository in repository settings |
| 68 | + - Customize retry counts per individual check type |
| 69 | +- **Progressive analysis** - each retry incorporates learnings from previous attempts |
| 70 | +- **Failure escalation** - when retry limit is reached, the issue is flagged for human review |
| 71 | + |
| 72 | +## Configuration Options |
| 73 | + |
| 74 | +The Checks Auto-Fixer can be configured at multiple levels: |
| 75 | + |
| 76 | +### Organization Level |
| 77 | + |
| 78 | +- **Global settings** - Configure default behavior for all repositories |
| 79 | +- **Available to all plans** - Enable/disable the feature organization-wide |
| 80 | +- **Access via** - Organization Settings → Checks Auto-Fixer |
| 81 | + |
| 82 | +### Repository Level |
| 83 | + |
| 84 | +- **Per-repo overrides** - Customize settings for specific repositories |
| 85 | +- **Individual check control** - Enable/disable monitoring per check type |
| 86 | +- **Custom instructions** - Provide specific guidance for handling each check |
| 87 | +- **Access via** - Repository Settings → Checks Auto-Fixer |
| 88 | + |
| 89 | +### Enterprise Features |
| 90 | + |
| 91 | +- **Custom retry limits** - Set retry counts globally, per repository, or per check type |
| 92 | +- **Advanced monitoring** - Granular control over which checks to monitor |
| 93 | +- **Priority handling** - Configure high-priority checks for immediate processing |
| 94 | + |
| 95 | +## GitHub Integration |
| 96 | + |
| 97 | +The auto-fix system integrates deeply with GitHub: |
| 98 | + |
| 99 | +- **Check Run Annotations:** Creates detailed feedback with line-specific suggestions |
| 100 | +- **PR Comments:** Adds contextual suggestions and explanations |
| 101 | +- **Auto-Fix Actions:** Provides one-click fix buttons in the GitHub UI |
| 102 | +- **Status Updates:** Real-time updates on fix progress and results |
| 103 | + |
| 104 | +<Note> |
| 105 | + Checks Auto-Fixer only activates for repositories where Codegen has write |
| 106 | + access and the feature is enabled. It respects your repository permissions and |
| 107 | + team workflows. |
| 108 | +</Note> |
| 109 | + |
| 110 | +## Benefits |
| 111 | + |
| 112 | +- **Reduced Context Switching:** No need to manually investigate and fix CI failures |
| 113 | +- **Faster Iteration:** PRs get fixed automatically, keeping development velocity high |
| 114 | +- **Learning from Failures:** Each fix improves Codegen's understanding of your codebase |
| 115 | +- **24/7 Monitoring:** Works around the clock to keep your PRs in good shape |
0 commit comments