Skip to content

chore(loop): re-open a loop PR's review when a new commit arrives - #83

Merged
Alex1990 merged 1 commit into
mainfrom
fix/d26-review-reopen
Oct 21, 2026
Merged

Alex1990 merged 1 commit into
mainfrom
fix/d26-review-reopen

Conversation

@Alex1990

Copy link
Copy Markdown
Owner

What / why

D26, the review path. A pull_request.synchronize on a loop PR was skipped whenever the
task was not claimable, and pr-review leaves it in exactly such a state:

So a revised loop PR could never be reviewed again: every later push logged
skip: task #82 not claimable (status=rejected). That is the loop's only path back
after its own review, and the reason #82's fix commit could not reach a reviewer
without a new task.

Change

  • shared/route.mjs: reviewReopenOf({ eventName, action, event }, status) — returns
    the PR number only for pull_request.synchronize with status rejected or
    waiting-merge.
  • entry.mjs doRun: before the claim check, that event moves the task to ready
    (timeline reopened-for-review) so the routed pr-review actually runs.
  • scripts/loop/README.md: D26 closed for the review path; its second face (a PR task
    triaged into waiting-human) is split out as D38 — still open, because reopening it
    needs a deliberate human act on the PR, not another claimability exception (D29).

Proof

rejected          82          <- reopen
waiting-merge     82          <- reopen
waiting-human     null        <- inbox guard unchanged (D29)
ready             null        <- already claimable
opened event      null        <- handled by the existing route
issue labeled     null
route: {"action":"run","taskId":82,"kind":"pr","stage":"pr-review","loopTask":77,"reason":"loop PR synchronize"}

End-to-end proof: after this lands, pushing the miner fixes to loop/77-session-mining
must log review reopen: task #82 rejected → ready, then start stage=pr-review.

Risk

Host scripts only. The widening is bounded to two terminal states on one event; bot
pushes do not raise synchronize runs at all (GITHUB_TOKEN events are suppressed), so
this cannot make a PR re-review itself in a loop.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage

Metric % Covered / Total
Lines 91.73% 1121/1222
Statements 90.42% 1209/1337
Functions 92.76% 218/235
Branches 76.97% 575/747

@Alex1990
Alex1990 merged commit 961de93 into main Oct 21, 2026
3 checks passed
@Alex1990
Alex1990 deleted the fix/d26-review-reopen branch October 21, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant