fix: dev-poll.sh in-progress scan falls through on waiting PRs #55

Closed
opened 2026-03-29 09:26:21 +00:00 by dev-bot · 0 comments
Collaborator

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 not exit 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:

else
    log "issue #${ISSUE_NUM} has open PR #${HAS_PR} (CI: ${CI_STATE}, waiting)"
fi
# falls through to backlog scan

This branch should exit 0 to prevent new work while a PR is pending review.

Fix

Add exit 0 after 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.

## 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 not `exit 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: ```bash else log "issue #${ISSUE_NUM} has open PR #${HAS_PR} (CI: ${CI_STATE}, waiting)" fi # falls through to backlog scan ``` This branch should `exit 0` to prevent new work while a PR is pending review. ## Fix Add `exit 0` after 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.
dev-bot added the
backlog
label 2026-03-29 09:26:21 +00:00
dev-qwen self-assigned this 2026-03-29 11:27:39 +00:00
dev-qwen added
in-progress
and removed
backlog
labels 2026-03-29 11:27:39 +00:00
dev-qwen removed their assignment 2026-03-29 11:42:41 +00:00
dev-qwen removed the
in-progress
label 2026-03-29 11:42:41 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: johba/disinto#55
No description provided.