Repository navigation
fix: Fail a sweep's run once done when its update errors - #183
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Claude Review
PR #183 makes a sweep fail its run once it's done when updating a BEHIND PR fails, the same way a failed evaluation already did. The failed list becomes a script-wide failedPrs list. The update path adds a PR to it when the error doesn't end the run, the sweep still tries the next candidate, and a PR event still only warns. The workflow and its template copy stay identical (same blob hashes). A new test covers a 502 on update across two candidates, the PR-event test now checks the run isn't failed, and automerge.md describes the new behaviour. failedPrs is declared before both places that add to it, errors that end the run still throw first, and 422s still skip before the warning. Failing a sweep run doesn't touch any PR's checks or merge state. One thing to accept knowingly: an update error that keeps happening for one PR (a branch restriction or a locked PR) now fails every sweep until that PR changes, which matches how evaluation errors already behave. I read the INDEX and the only diff piece (001.diff, all 4 files); there is no CLAUDE.md or AGENTS.md. I didn't open the full workflow or test harness, so points about the surrounding code come from the diff's context lines. Verdict: no problems found, OK to merge.
No findings.
## Why Re-Apply the repo-ci-baseline Template so this repo carries the Template changes from mpaulosky/dotfiles#182 and mpaulosky/dotfiles#183. ## What changed - `1efd0a5` Apply commit, `apply.sh` output alone: brings mpaulosky/dotfiles#182 and mpaulosky/dotfiles#183. - `.github/scripts/tests/pr-automerge.test.mjs` - `.github/workflows/pr-automerge.yml` ## Verification - The Apply commit is exactly `apply.sh`'s output on a branch up to date with `main`. - The pre-push gate (`scripts/gate.sh`) passed on `1efd0a5`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: T <t@e.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
## Why Re-Apply the repo-ci-baseline Template so this repo carries the Template changes from mpaulosky/dotfiles#182 and mpaulosky/dotfiles#183. ## What changed - `ac73808` Apply commit, `apply.sh` output alone: brings mpaulosky/dotfiles#182 and mpaulosky/dotfiles#183. - `.github/scripts/tests/pr-automerge.test.mjs` - `.github/workflows/pr-automerge.yml` ## Verification - The Apply commit is exactly `apply.sh`'s output on a branch up to date with `main`. - The pre-push gate (`scripts/gate.sh`) passed on `ac73808`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: T <t@e.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
## Why Re-Apply the repo-ci-baseline Template so this repo carries the Template changes from mpaulosky/dotfiles#182 and mpaulosky/dotfiles#183. ## What changed - `6b5713e` Apply commit, `apply.sh` output alone: brings mpaulosky/dotfiles#182 and mpaulosky/dotfiles#183. - `.github/scripts/tests/pr-automerge.test.mjs` - `.github/workflows/pr-automerge.yml` ## Verification - The Apply commit is exactly `apply.sh`'s output on a branch up to date with `main`. - The pre-push gate (`scripts/gate.sh`) passed on `6b5713e`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: T <t@e.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
## Why Re-Apply the repo-ci-baseline Template so this repo carries the Template changes from mpaulosky/dotfiles#182 and mpaulosky/dotfiles#183. ## What changed - `af20c10` Apply commit, `apply.sh` output alone: brings mpaulosky/dotfiles#182 and mpaulosky/dotfiles#183. - `.github/scripts/tests/pr-automerge.test.mjs` - `.github/workflows/pr-automerge.yml` ## Verification - The Apply commit is exactly `apply.sh`'s output on a branch up to date with `main`. - The pre-push gate (`scripts/gate.sh`) passed on `af20c10`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: T <t@e.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
## Why Re-Apply the repo-ci-baseline Template so this repo carries the Template changes from mpaulosky/dotfiles#182 and mpaulosky/dotfiles#183. ## What changed - `6043708` Apply commit, `apply.sh` output alone: brings mpaulosky/dotfiles#182 and mpaulosky/dotfiles#183. - `.github/scripts/tests/pr-automerge.test.mjs` - `.github/workflows/pr-automerge.yml` ## Verification - The Apply commit is exactly `apply.sh`'s output on a branch up to date with `main`. - The pre-push gate (`scripts/gate.sh`) passed on `6043708`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: T <t@e.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
## Why Re-Apply the repo-ci-baseline Template so this repo carries the Template changes from mpaulosky/dotfiles#182 and mpaulosky/dotfiles#183. ## What changed - `01fdabe` Apply commit, `apply.sh` output alone: brings mpaulosky/dotfiles#182 and mpaulosky/dotfiles#183. - `.github/scripts/tests/pr-automerge.test.mjs` - `.github/workflows/pr-automerge.yml` ## Verification - The Apply commit is exactly `apply.sh`'s output on a branch up to date with `main`. - The pre-push gate (`scripts/gate.sh`) passed on `01fdabe`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: T <t@e.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
## Why Re-Apply the repo-ci-baseline Template so this repo carries the Template changes from mpaulosky/dotfiles#182 and mpaulosky/dotfiles#183. ## What changed - `e312e50` Apply commit, `apply.sh` output alone: brings mpaulosky/dotfiles#182 and mpaulosky/dotfiles#183. - `.github/scripts/tests/pr-automerge.test.mjs` - `.github/workflows/pr-automerge.yml` ## Verification - The Apply commit is exactly `apply.sh`'s output on a branch up to date with `main`. - The pre-push gate (`scripts/gate.sh`) passed on `e312e50`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Teqslamer <teqslamer@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Refs #181; follows #182.
Why
Claude Review on mpaulosky/SuggestionApp#21 (the #180 re-Apply): besides the rate limit #182 fixed, a sweep's update that failed any other way (a 5xx, a 403 for a missing permission) only logged a warning, so the sweep ended green. A read error on one PR already fails the run once the sweep is done (#178); an update error now does too.
What changed
pr-automerge.yml(Template and dotfiles' copy):updateBranchOfrecords the PR in the run'sfailedPrsduring a sweep, and the sweep still tries the next candidate. On a PR event it stays a warning only, as ADR 0005 requires.failedPrsmoves up with the other sweep state (renamed fromfailed, whichbringUpToDatealso uses for a PR's failed checks).references/automerge.mdnotes it.Testing
test.shpasses (147 auto-merge tests).🤖 Generated with Claude Code