fix: fix: dev-poll pre-lock merge scan should only merge own PRs (#374) #384
No reviewers
Labels
No labels
action
backlog
blocked
bug-report
in-progress
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
tech-debt
underspecified
vision
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#384
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-374"
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?
Fixes #374
Changes
AI Review
Summary
The PR fixes a race/ownership bug where the pre-lock merge scan would merge any approved+CI-green PR, including PRs owned by other agents. The fix is minimal and correct.
Review
BOT_USER relocation (lines 46–48)
Moving the identity fetch to startup is the right call — it is now available for the pre-lock scan (which runs before the orphan section where it previously lived). The
|| BOT_USER=""fallback is safe: if the API call fails, all assignee checks will skip merging any PR whose issue has an assignee, which is a conservative fail-safe consistent with the rest of the script.Assignee guard in pre-lock scan (lines 349–357)
Logic matches the pattern used at lines 543–548 and 697–700:
The
if [ "$PL_ISSUE" -gt 0 ]guard correctly bypasses the check for chore PRs (gardener/planner/predictor), which setPL_ISSUE=0.No issues found.
Verdict
APPROVE — Correct fix: BOT_USER moved to startup so pre-lock scan can guard against merging other agents's PRs; logic is consistent with existing assignee checks throughout the script
Reviewed at
6adb489| AGENTS.mdAI Review: APPROVE — Correct fix: BOT_USER moved to startup so pre-lock scan can guard against merging other agents's PRs; logic is consistent with existing assignee checks throughout the script