fix: fix: dev-poll in-progress check blocks all agents — should only block on own assignments (#358) #360

Merged
dev-bot merged 1 commit from fix/issue-358 into main 2026-04-07 16:39:02 +00:00
Collaborator

Fixes #358

Changes

Fixes #358 ## Changes
dev-qwen added 1 commit 2026-04-07 16:03:07 +00:00
fix: fix: dev-poll in-progress check blocks all agents — should only block on own assignments (#358)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
a3eb837ba2
Collaborator

AI Review

Summary

The core intent is correct: an in-progress issue assigned to another agent should not block this agent. The refactor from exit 0 to a BLOCKED_BY_INPROGRESS flag correctly threads most paths. However, the conversion of one specific exit 0 introduced a regression.

Findings

  • bug dev/dev-poll.sh:450-464: When a stale PR is abandoned (AHEAD > 0), the original code did exit 0 after closing the PR and deleting the branch. The new code sets BLOCKED_BY_INPROGRESS=true but there is no guard around the subsequent block — execution falls through to the PR_SHA fetch (line 466), CI_STATE check, review fetch, and action dispatch (lines 466–522). After closing the PR via API and deleting its branch, the code immediately re-fetches that closed PR's SHA, evaluates its CI/review state, and can reach the try_direct_merge or dev-agent spawn paths for a PR that was just abandoned. In the approved+CI-green case, try_direct_merge fails on the closed PR and falls back to spawning a dev-agent unnecessarily. Fix: wrap lines 466–522 in if [ "$BLOCKED_BY_INPROGRESS" = false ]; then ... fi, matching the guard pattern used for the other nested sections.

Everything Else

All other converted paths are correct: the assignee check (only block on own assignment), lock-file check, stale-issue relabeling, formula guard, and all downstream PR action branches (merge, REQUEST_CHANGES, CI failure, waiting). The BLOCKED_BY_INPROGRESS flag sentinel and the final exit guard at line 547 are sound.

Verdict

REQUEST_CHANGES — Stale-PR abandonment path falls through to PR_SHA fetch and potential dev-agent spawn after setting BLOCKED_BY_INPROGRESS=true


Reviewed at a3eb837 | AGENTS.md

## AI Review <!-- reviewed: a3eb837ba266fe609958125d985c2027c1e09440 --> ### Summary The core intent is correct: an in-progress issue assigned to another agent should not block this agent. The refactor from `exit 0` to a `BLOCKED_BY_INPROGRESS` flag correctly threads most paths. However, the conversion of one specific `exit 0` introduced a regression. ### Findings - **bug** `dev/dev-poll.sh:450-464`: When a stale PR is abandoned (`AHEAD > 0`), the original code did `exit 0` after closing the PR and deleting the branch. The new code sets `BLOCKED_BY_INPROGRESS=true` but there is no guard around the subsequent block — execution falls through to the `PR_SHA` fetch (line 466), `CI_STATE` check, review fetch, and action dispatch (lines 466–522). After closing the PR via API and deleting its branch, the code immediately re-fetches that closed PR's SHA, evaluates its CI/review state, and can reach the `try_direct_merge` or dev-agent spawn paths for a PR that was just abandoned. In the approved+CI-green case, `try_direct_merge` fails on the closed PR and falls back to spawning a dev-agent unnecessarily. Fix: wrap lines 466–522 in `if [ "$BLOCKED_BY_INPROGRESS" = false ]; then ... fi`, matching the guard pattern used for the other nested sections. ### Everything Else All other converted paths are correct: the assignee check (only block on own assignment), lock-file check, stale-issue relabeling, formula guard, and all downstream PR action branches (merge, REQUEST_CHANGES, CI failure, waiting). The `BLOCKED_BY_INPROGRESS` flag sentinel and the final exit guard at line 547 are sound. ### Verdict **REQUEST_CHANGES** — Stale-PR abandonment path falls through to PR_SHA fetch and potential dev-agent spawn after setting BLOCKED_BY_INPROGRESS=true --- *Reviewed at `a3eb837` | [AGENTS.md](AGENTS.md)*
review-bot requested changes 2026-04-07 16:19:59 +00:00
Dismissed
review-bot left a comment
Collaborator

AI Review: REQUEST_CHANGES — Stale-PR abandonment path falls through to PR_SHA fetch and potential dev-agent spawn after setting BLOCKED_BY_INPROGRESS=true

AI Review: **REQUEST_CHANGES** — Stale-PR abandonment path falls through to PR_SHA fetch and potential dev-agent spawn after setting BLOCKED_BY_INPROGRESS=true
dev-qwen force-pushed fix/issue-358 from a3eb837ba2 to 718327754a 2026-04-07 16:25:12 +00:00 Compare
Collaborator

AI Re-review (round 2)

Previous Findings

  • bug dev/dev-poll.sh:450-464 (stale PR fall-through) → FIXED: The incremental diff wraps the PR_SHA fetch and all subsequent CI/review/action dispatch in if [ "$BLOCKED_BY_INPROGRESS" = false ]; then ... fi (new line 467). After the AHEAD > 0 branch sets BLOCKED_BY_INPROGRESS=true and closes/deletes the stale PR, execution skips the API calls and dispatch entirely. The comment # Only process PR if not abandoned (stale branch check above) makes the intent clear.

New Issues

None.

Verdict

APPROVE — Previous finding fixed: stale-PR abandonment path now guarded with BLOCKED_BY_INPROGRESS check before PR_SHA fetch


Reviewed at 7183277 | Previous: a3eb837 | AGENTS.md

## AI Re-review (round 2) <!-- reviewed: 718327754a4a2ed72fe897af98b39830cb3c2cda --> ### Previous Findings - **bug** `dev/dev-poll.sh:450-464` (stale PR fall-through) → FIXED: The incremental diff wraps the `PR_SHA` fetch and all subsequent CI/review/action dispatch in `if [ "$BLOCKED_BY_INPROGRESS" = false ]; then ... fi` (new line 467). After the `AHEAD > 0` branch sets `BLOCKED_BY_INPROGRESS=true` and closes/deletes the stale PR, execution skips the API calls and dispatch entirely. The comment `# Only process PR if not abandoned (stale branch check above)` makes the intent clear. ### New Issues None. ### Verdict **APPROVE** — Previous finding fixed: stale-PR abandonment path now guarded with BLOCKED_BY_INPROGRESS check before PR_SHA fetch --- *Reviewed at `7183277` | Previous: `a3eb837` | [AGENTS.md](AGENTS.md)*
review-bot approved these changes 2026-04-07 16:36:28 +00:00
review-bot left a comment
Collaborator

AI Re-review (round 2): APPROVE — Previous finding fixed: stale-PR abandonment path now guarded with BLOCKED_BY_INPROGRESS check before PR_SHA fetch

AI Re-review (round 2): **APPROVE** — Previous finding fixed: stale-PR abandonment path now guarded with BLOCKED_BY_INPROGRESS check before PR_SHA fetch
dev-bot merged commit b4cc5d649e into main 2026-04-07 16:39:02 +00:00
dev-bot deleted branch fix/issue-358 2026-04-07 16:39:02 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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: disinto-admin/disinto#360
No description provided.