ReviewOS

also looking at this

stacks/buddy

fix(ci): give the repair loop the guard it already had

#1407
Merged glennmichael123 wants to merge fix/wire-ci-repair-attempt-guard into main
10 files +229 -34
src/setup.tsmodified+6-1
Changes to src/setup.ts
@@ -1620,8 +1620,13 @@ ${generateComposerSetupSteps()}
16201620 - name: Install dependencies
16211621 run: bun install
16221622
1623 # --pr is what carries the diagnosis back to the pull request, and it is
1624 # also where the attempt counter lives: without it the anti-loop guard
1625 # has nothing to read and every failure looks like the first one.
1626 # A run triggered from a fork has no entry here, and the step is skipped.
16231627 - name: Attempt a fix
1624 run: bunx @buddysh/buddy fix-ci --run-id \${{ github.event.workflow_run.id }} --verbose
1628 if: \${{ github.event.workflow_run.pull_requests[0] }}
1629 run: bunx @buddysh/buddy fix-ci --run-id \${{ github.event.workflow_run.id }} --pr \${{ github.event.workflow_run.pull_requests[0].number }} --verbose
16251630 env:
16261631 GITHUB_TOKEN: \${{ secrets.GITHUB_TOKEN }}
16271632 ANTHROPIC_API_KEY: \${{ secrets.ANTHROPIC_API_KEY }}