Repository navigation
fix(ingest): a review requested on a draft runs to the end - #39
Merged
Merged
Conversation
Ticking "Request normal/priority review" on a draft's gate comment re-queued its head, and the next PR-ingest pass closed it as `pr_draft` because the PR was still a draft, cancelling the run a few minutes after it started and putting the draft body back with the box unticked (dashpay/platform#5285, run 3512, 2026-10-05). The draft branch of `ingest_repo` now keeps a head for the draft's current commit when someone asked for it (any trigger but new_pr / new_push); automatic heads and heads for older commits still close. The deferred-comment pass no longer overwrites the worker's running, done or failed body on such a draft, but still honours a box ticked on an older draft body. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Mentions and review requests are ignored on drafts, so the boxes are the only way to retry there. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On dashpay/platform#5285 (a draft), ticking Request normal review on the gate comment started run 3512. Five minutes later the run was cancelled and the comment went back to "Review not started yet because this PR is a draft" with the box unticked. It happened again on every re-tick (live events 13:33, 13:40, 14:01, 14:05 UTC on 2026-10-05):
The box re-queues the head. Then the next PR-ingest pass sees
isDraftandclose_pr_heads(..., "pr_draft")closes every queued and running head for the PR, so the reaper cancels the run.Fix
ingest_repo(draft branch): a head for the draft's current commit is kept when someone asked for it, meaning any trigger exceptnew_pr/new_push. Automatic heads, and heads for older commits, still close as before.update_queue_comments(deferred pass): on a draft whose commit is being reviewed or has been reviewed, the worker's comment is no longer overwritten with the draft comment. A box ticked on an older draft comment still counts. After a failed review the draft comment and its boxes come back, because mentions and review requests are ignored on drafts and the boxes are the only way to retry.Behaviour change worth knowing: if a review was explicitly requested (box, mention, review request) and the PR is then converted to draft on the same commit, that review now finishes instead of being cancelled.
Tests
test_review_requested_on_a_draft_runs_to_the_endreplays the #5285 sequence: tick box → ingest while queued → ingest while running → done → failed → stale ticked box → push to the draft. It fails onmainat the "still queued after ingest" assertion.test_automatic_head_on_a_pr_turned_draft_is_closedkeeps the old behaviour for automatic heads.make check: 425 passed.🤖 Generated with Claude Code