Commit a57088f
fix(screenshot): retry PR lookup to handle Vercel-before-PR race
Vercel posts the success `deployment_status` webhook the moment its
build finishes, which on the Linear-driven path is ~7-15s before the
agent's `gh pr create` returns. The processor's first lookup against
the GitHub commit-pulls API came back empty and we'd silently drop
the screenshot.
Add a retry wrapper with backoff (0s, 5s, 10s, 20s — total max ~35s)
around the PR lookup. The first hit returns immediately, so the
warm-cache happy path is unchanged.
Verified end-to-end on backgroundagent-dev: Linear issue ABCA-70 →
agent → PR #2 in vercel-abca-linear → Vercel preview → screenshot
landed on both the GitHub PR and the Linear issue.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent cd6238c commit a57088f
1 file changed
Lines changed: 34 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
133 | 137 | | |
134 | | - | |
| 138 | + | |
135 | 139 | | |
136 | 140 | | |
137 | 141 | | |
| |||
249 | 253 | | |
250 | 254 | | |
251 | 255 | | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
252 | 284 | | |
253 | 285 | | |
254 | 286 | | |
| |||
0 commit comments