fix: dev-poll.sh in-progress scan falls through on waiting PRs #55
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
In
dev/dev-poll.sh, the PRIORITY 1 in-progress scan (line ~393) detects a PR in "waiting" state (CI passed, no review yet) but does notexit 0. It logs the waiting PR and falls through to the backlog scan, which can launch a new dev-agent for a different issue while the first agent is still walking its PR to merge.How it manifests
Two dev-agents run concurrently: one walking PR #54 (review poll), the other implementing #43. Both hit llama-server simultaneously. The first agent's review cycle continues but the system is no longer single-threaded per project.
Root cause
Line ~393 in the in-progress scan:
This branch should
exit 0to prevent new work while a PR is pending review.Fix
Add
exit 0after the log line in the else branch (~line 394), so the poll exits when it detects a PR waiting for review.Context
Discovered on 2026-03-29 when lock cleanup + this bug combined to launch two agents concurrently. The lock check is the primary guard, but this should be the secondary defense.