Skip to content

Commit ff18068

Browse files
committed
.
1 parent c442b71 commit ff18068

File tree

2 files changed

+71
-2
lines changed

2 files changed

+71
-2
lines changed

docs/capabilities/wake-up.mdx

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
title: "Wake Up & Auto-Fix"
3+
sidebarTitle: "Wake Up"
4+
icon: "bell"
5+
---
6+
7+
When your GitHub checks fail, Codegen automatically wakes up to analyze the failures and fix your PR. This intelligent system monitors CI status and proactively resolves issues without manual intervention.
8+
9+
## How Wake Up Works
10+
11+
Codegen continuously monitors your pull requests and automatically responds to check failures:
12+
13+
- **Automatic Detection:** Monitors GitHub check runs and CI status in real-time
14+
- **Intelligent Analysis:** Analyzes build logs, test failures, and error messages to understand root causes
15+
- **Targeted Fixes:** Generates specific code changes to resolve the identified issues
16+
- **Persistent Retry:** Will attempt to fix issues up to 3 times per PR
17+
18+
## What Triggers Wake Up
19+
20+
Wake up activates when:
21+
22+
- **CI Checks Fail:** Any GitHub check run reports a failure status
23+
- **Build Errors:** Compilation, linting, or build process failures
24+
- **Test Failures:** Unit tests, integration tests, or automated test suites fail
25+
- **Code Quality Issues:** Static analysis tools report violations or warnings
26+
27+
## The Auto-Fix Process
28+
29+
When Codegen wakes up to fix a failing PR, it follows this process:
30+
31+
1. **Detect Failure:** Monitor check status and identify when builds break
32+
2. **Analyze Logs:** Grep through CI logs to understand specific failure points
33+
3. **Generate Solution:** Create targeted code changes to resolve identified issues
34+
4. **Apply Fix:** Automatically commit fixes to the same PR branch
35+
5. **Re-validate:** Monitor the new check run to ensure the fix was successful
36+
37+
## Retry Logic
38+
39+
Codegen implements intelligent retry behavior:
40+
41+
- **Up to 3 attempts** per PR to resolve failing checks
42+
- **Progressive analysis** - each retry incorporates learnings from previous attempts
43+
- **Failure escalation** - if 3 attempts fail, the issue is flagged for human review
44+
45+
## GitHub Integration
46+
47+
The wake-up system integrates deeply with GitHub:
48+
49+
- **Check Run Annotations:** Creates detailed feedback with line-specific suggestions
50+
- **PR Comments:** Adds contextual suggestions and explanations
51+
- **Auto-Fix Actions:** Provides one-click fix buttons in the GitHub UI
52+
- **Status Updates:** Real-time updates on fix progress and results
53+
54+
<Note>
55+
Wake up only activates for repositories where Codegen has write access and the
56+
feature is enabled. It respects your repository permissions and team
57+
workflows.
58+
</Note>
59+
60+
## Benefits
61+
62+
- **Reduced Context Switching:** No need to manually investigate and fix CI failures
63+
- **Faster Iteration:** PRs get fixed automatically, keeping development velocity high
64+
- **Learning from Failures:** Each fix improves Codegen's understanding of your codebase
65+
- **24/7 Monitoring:** Works around the clock to keep your PRs in good shape

docs/docs.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"tab": "Documentation",
1515
"groups": [
1616
{
17-
"group": "Introduction",
17+
"group": "Overview",
1818
"pages": [
1919
"introduction/overview",
2020
"introduction/capabilities",
@@ -25,12 +25,16 @@
2525
"introduction/faq"
2626
]
2727
},
28+
{
29+
"group": "Capabilities",
30+
"pages": ["capabilities/wake-up"]
31+
},
2832
{
2933
"group": "Integrations",
3034
"pages": [
31-
"integrations/github",
3235
"integrations/slack",
3336
"integrations/linear",
37+
"integrations/github",
3438
"integrations/notion",
3539
"integrations/figma",
3640
"integrations/circleci",

0 commit comments

Comments
 (0)