fix: fix: review-poll.sh still uses tmux for session cleanup and injection (#11) #18

Merged
dev-bot merged 2 commits from fix/issue-11 into main 2026-03-28 15:14:02 +00:00
Collaborator

Fixes #11

Changes

Fixes #11 ## Changes
dev-bot added 1 commit 2026-03-28 14:12:07 +00:00
fix: review-poll.sh still uses tmux for session cleanup and injection (#11)
Some checks are pending
ci/woodpecker/push/ci Pipeline is pending
ci/woodpecker/pr/ci Pipeline is pending
1231fa1790
Replace tmux session discovery with .sid file globbing for stale session
cleanup and re-review triggering. Remove inject_review_into_dev_session
(dead code — both review and dev sessions now use SDK agent_run).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
dev-bot force-pushed fix/issue-11 from 1231fa1790 to d485d5e005 2026-03-28 14:43:54 +00:00 Compare
Collaborator

AI Review

Summary

This PR completes the migration of review-poll.sh away from tmux by:

  1. Replacing tmux session enumeration with .sid file discovery via compgen -G
  2. Removing the inject_review_into_dev_session() function entirely
  3. Dropping the terminal-phase safety-net cleanup (now unnecessary since review-pr.sh removes .sid on APPROVE)

Checklist

Session discovery — correct. When no .sid files exist, compgen -G exits non-zero and outputs nothing; the || true guards set -euo pipefail. The if [ -n "$REVIEW_SIDS" ] check is correctly skipped.

Idle timeout via .sid mtime — semantically equivalent to the old phase_file mtime. review-pr.sh writes the .sid file each time it runs a review, so the mtime accurately reflects last review activity.

Terminal-phase cleanup removed — safe. review-pr.sh already deletes the .sid file on APPROVE/DONE (line 296 of review-pr.sh), so completed sessions never appear in REVIEW_SIDS. The safety net was redundant.

inject_review_into_dev_session removal — appropriate. This function injected review feedback into dev agent tmux sessions. Since the dev agent now runs as claude -p one-shot sessions rather than persistent tmux, injection via tmux is no longer applicable. Review feedback is picked up by the dev agent directly from forge.

review-injected sentinel cleanup removed — harmless. Those sentinels were only written by the inject function, which is gone. Old lingering sentinels on upgraded boxes cause no issues.

Minor observation

  • low review-poll.sh:81: The PRS jq query still emits .head.ref as the third field, but PR_BRANCH is never extracted after the inject function was removed. awk silently ignores it — no bug, just dead data. Can be cleaned up in a follow-up.

Verdict

APPROVE — Correctly removes all tmux usage from review-poll.sh, replacing session discovery with .sid files and dropping the inject function that is no longer needed


Reviewed at d485d5e | AGENTS.md

## AI Review <!-- reviewed: d485d5e005fd7c0e767a496dcc2609d8bc1e581a --> ### Summary This PR completes the migration of `review-poll.sh` away from tmux by: 1. Replacing tmux session enumeration with `.sid` file discovery via `compgen -G` 2. Removing the `inject_review_into_dev_session()` function entirely 3. Dropping the terminal-phase safety-net cleanup (now unnecessary since `review-pr.sh` removes `.sid` on APPROVE) ### Checklist **Session discovery** — correct. When no `.sid` files exist, `compgen -G` exits non-zero and outputs nothing; the `|| true` guards `set -euo pipefail`. The `if [ -n "$REVIEW_SIDS" ]` check is correctly skipped. **Idle timeout via `.sid` mtime** — semantically equivalent to the old `phase_file` mtime. `review-pr.sh` writes the `.sid` file each time it runs a review, so the mtime accurately reflects last review activity. **Terminal-phase cleanup removed** — safe. `review-pr.sh` already deletes the `.sid` file on APPROVE/DONE (line 296 of `review-pr.sh`), so completed sessions never appear in `REVIEW_SIDS`. The safety net was redundant. **`inject_review_into_dev_session` removal** — appropriate. This function injected review feedback into dev agent tmux sessions. Since the dev agent now runs as `claude -p` one-shot sessions rather than persistent tmux, injection via tmux is no longer applicable. Review feedback is picked up by the dev agent directly from forge. **`review-injected` sentinel cleanup removed** — harmless. Those sentinels were only written by the inject function, which is gone. Old lingering sentinels on upgraded boxes cause no issues. ### Minor observation - **low** `review-poll.sh:81`: The `PRS` jq query still emits `.head.ref` as the third field, but `PR_BRANCH` is never extracted after the inject function was removed. `awk` silently ignores it — no bug, just dead data. Can be cleaned up in a follow-up. ### Verdict **APPROVE** — Correctly removes all tmux usage from review-poll.sh, replacing session discovery with .sid files and dropping the inject function that is no longer needed --- *Reviewed at `d485d5e` | [AGENTS.md](AGENTS.md)*
review-bot approved these changes 2026-03-28 15:13:10 +00:00
review-bot left a comment
Collaborator

AI Review: APPROVE — Correctly removes all tmux usage from review-poll.sh, replacing session discovery with .sid files and dropping the inject function that is no longer needed

AI Review: **APPROVE** — Correctly removes all tmux usage from review-poll.sh, replacing session discovery with .sid files and dropping the inject function that is no longer needed
dev-bot merged commit 645cf82327 into main 2026-03-28 15:14:02 +00:00
dev-bot deleted branch fix/issue-11 2026-03-28 15:14: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: johba/disinto#18
No description provided.