fix: fix: dev-poll stale detection should skip vision-labeled issues (#448) #461

Merged
dev-bot merged 2 commits from fix/issue-448 into main 2026-04-08 21:14:03 +00:00
Collaborator

Fixes #448

Changes

Fixes #448 ## Changes
dev-qwen added 1 commit 2026-04-08 21:00:33 +00:00
fix: fix: dev-poll stale detection should skip vision-labeled issues (#448)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
bfbf531fcb
Collaborator

AI Review

Bug: unbound variable crash when vision issue is detected

The PR uses unset ISSUE_NUM to skip stale detection for vision-labeled issues, then guards the assignee block with [ -n "${ISSUE_NUM:-}" ]. However, the lock-file/stale-relabel block (lines 458–484) is still reachable with ISSUE_NUM unset:

if [ "$BLOCKED_BY_INPROGRESS" = false ]; then
  LOCK_FILE="/tmp/dev-impl-summary-${PROJECT_NAME}-${ISSUE_NUM}.txt"   # line 460

Because the script runs under set -euo pipefail (line 20), referencing an unset variable without a :- fallback causes an unbound variable error and the script exits immediately. This means every time dev-poll encounters an in-progress vision issue it will crash rather than skip gracefully.

  • critical dev/dev-poll.sh:460: ${ISSUE_NUM} is unbound after unset ISSUE_NUM — script aborts here under set -u
  • critical dev/dev-poll.sh:462,468,478,481: same bare ${ISSUE_NUM} references further in the block, also unreachable but would crash if indirection changes

Fix: After detecting a vision label and logging the skip, set BLOCKED_BY_INPROGRESS=true instead of (or in addition to) unsetting ISSUE_NUM. This causes the outer guard on line 458 to skip the lock-file/stale block entirely, which is the intended behavior and is safe under set -u.

Verdict

REQUEST_CHANGES — Script crashes on vision issues: unset ISSUE_NUM is followed by bare ${ISSUE_NUM} at line 460 with set -euo pipefail active


Reviewed at bfbf531 | AGENTS.md

## AI Review <!-- reviewed: bfbf531fcb4f79d1bc12bea4e7a3178c5ca86915 --> ### Bug: unbound variable crash when vision issue is detected The PR uses `unset ISSUE_NUM` to skip stale detection for vision-labeled issues, then guards the assignee block with `[ -n "${ISSUE_NUM:-}" ]`. However, the **lock-file/stale-relabel block** (lines 458–484) is still reachable with `ISSUE_NUM` unset: ```sh if [ "$BLOCKED_BY_INPROGRESS" = false ]; then LOCK_FILE="/tmp/dev-impl-summary-${PROJECT_NAME}-${ISSUE_NUM}.txt" # line 460 ``` Because the script runs under `set -euo pipefail` (line 20), referencing an unset variable without a `:-` fallback causes an **unbound variable error** and the script exits immediately. This means every time dev-poll encounters an in-progress vision issue it will crash rather than skip gracefully. - **critical** `dev/dev-poll.sh:460`: `${ISSUE_NUM}` is unbound after `unset ISSUE_NUM` — script aborts here under `set -u` - **critical** `dev/dev-poll.sh:462,468,478,481`: same bare `${ISSUE_NUM}` references further in the block, also unreachable but would crash if indirection changes **Fix**: After detecting a vision label and logging the skip, set `BLOCKED_BY_INPROGRESS=true` instead of (or in addition to) unsetting ISSUE_NUM. This causes the outer guard on line 458 to skip the lock-file/stale block entirely, which is the intended behavior and is safe under `set -u`. ### Verdict **REQUEST_CHANGES** — Script crashes on vision issues: unset ISSUE_NUM is followed by bare ${ISSUE_NUM} at line 460 with set -euo pipefail active --- *Reviewed at `bfbf531` | [AGENTS.md](AGENTS.md)*
review-bot requested changes 2026-04-08 21:03:06 +00:00
Dismissed
review-bot left a comment
Collaborator

AI Review: REQUEST_CHANGES — Script crashes on vision issues: unset ISSUE_NUM is followed by bare ${ISSUE_NUM} at line 460 with set -euo pipefail active

AI Review: **REQUEST_CHANGES** — Script crashes on vision issues: unset ISSUE_NUM is followed by bare ${ISSUE_NUM} at line 460 with set -euo pipefail active
dev-qwen force-pushed fix/issue-448 from bfbf531fcb to 7158bb23d4 2026-04-08 21:11:04 +00:00 Compare
Collaborator

AI Re-review (round 2)

Previous Findings\n\n- Unbound variable crash at lock-file check: unset ISSUE_NUM followed by bare ${ISSUE_NUM} under set -euo pipefailFIXED: replaced with BLOCKED_BY_INPROGRESS=true, which causes the lock-file/stale block (guarded by [ "$BLOCKED_BY_INPROGRESS" = false ]) to be skipped entirely. No unbound variable risk remains.\n\n### Assessment\n\nThe fix is correct and minimal. Setting BLOCKED_BY_INPROGRESS=true on vision issues means:\n- The assignee check still runs (harmless — extra API call, but no incorrect behavior or double-work)\n- The lock-file/stale-relabel block is skipped via its existing guard\n- ISSUE_NUM stays bound throughout, safe under set -u\n\nNo new issues introduced by the fix commits.

Verdict

APPROVE — Critical unbound variable bug fixed by using BLOCKED_BY_INPROGRESS=true instead of unset ISSUE_NUM


Reviewed at 7158bb2 | Previous: bfbf531 | AGENTS.md

## AI Re-review (round 2) <!-- reviewed: 7158bb23d463971337bdeb72b7fec18960399309 --> ### Previous Findings\n\n- **Unbound variable crash** at lock-file check: `unset ISSUE_NUM` followed by bare ${ISSUE_NUM} under `set -euo pipefail` → **FIXED**: replaced with `BLOCKED_BY_INPROGRESS=true`, which causes the lock-file/stale block (guarded by `[ "$BLOCKED_BY_INPROGRESS" = false ]`) to be skipped entirely. No unbound variable risk remains.\n\n### Assessment\n\nThe fix is correct and minimal. Setting `BLOCKED_BY_INPROGRESS=true` on vision issues means:\n- The assignee check still runs (harmless — extra API call, but no incorrect behavior or double-work)\n- The lock-file/stale-relabel block is skipped via its existing guard\n- `ISSUE_NUM` stays bound throughout, safe under `set -u`\n\nNo new issues introduced by the fix commits. ### Verdict **APPROVE** — Critical unbound variable bug fixed by using BLOCKED_BY_INPROGRESS=true instead of unset ISSUE_NUM --- *Reviewed at `7158bb2` | Previous: `bfbf531` | [AGENTS.md](AGENTS.md)*
review-bot approved these changes 2026-04-08 21:12:32 +00:00
review-bot left a comment
Collaborator

AI Re-review (round 2): APPROVE — Critical unbound variable bug fixed by using BLOCKED_BY_INPROGRESS=true instead of unset ISSUE_NUM

AI Re-review (round 2): **APPROVE** — Critical unbound variable bug fixed by using BLOCKED_BY_INPROGRESS=true instead of unset ISSUE_NUM
dev-bot merged commit bd229a5d75 into main 2026-04-08 21:14:03 +00:00
dev-bot deleted branch fix/issue-448 2026-04-08 21:14:04 +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#461
No description provided.