Repository navigation
Conversation
…d PR A follow-up held for an operator (integry/mcptest#447: worktree_not_on_branch) blocked every later follow-up for its pull request. The blocked job only checked whether the PR was closed after the predecessor gate, so after the merge it kept waiting - before f5e3510 by queueing a replacement task every minute (103 tasks in two hours), after it by backing off forever - and the hold itself was never settled. - gatePredecessorHandoff reads the PR state when a predecessor blocks it. A merged or closed PR ends the job as cancelled_pr_closed without returning its comments to the pending list, then releases the hold. An open PR or an unreadable state keeps the existing wait. - releaseClosedPullRequestHandoffs, run with the periodic handoff recovery, releases operator holds whose PR has since closed (each PR read at most every 10 minutes) and drops the comments still queued for it. - Both use the operator release, forced: the agent must be proven gone and the PR lease taken, and retained files and commits stay in the worktree. The release records released_pr_merged / released_pr_closed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Owner
Author
|
/ultrafix |
Contributor
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 10) First action:
|
This branch has not been deployed
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.
Why
On integry/mcptest#447, a
/fixfollow-up at 18:45 finished its agent run, but ProPR found the worktree was not on the PR branch. It parked the follow-up for an operator (awaiting_operator/worktree_not_on_branch).Every later attempt for that PR then hit the predecessor gate and rescheduled itself. That was 103 tasks between 18:45 and 20:39, one per minute; task 38316 is the last. The PR merged at 20:36 and the loop didn't notice. It only stopped because the next attempt failed on disk pressure.
There are two causes:
processPullRequestCommentJobalready skips merged or closed PRs, but only insidevalidatePRAndComments. That runs aftergatePredecessorHandoff, so a blocked job never reaches it.cancelClosedPullRequestValidation) only cancels CI runs, and it's opt-in and webhook-only. The hold therefore blocks that PR's follow-ups forever.f5e3510 (wait in place with backoff) is on
mainbut not deployed yet. It turns the per-minute flood into one backing-off task, but that task would still never stop.Fix
gatePredecessorHandoffreads the PR state, but only when a predecessor blocks the job.cancelled_pr_closed. Its claimed comments are not returned to the pending list, the same as a job that finds the PR closed later. It releases its PR lease and then releases the hold.releaseClosedPullRequestHandoffsruns with the worker's periodic handoff recovery. It releases operator holds whose PR has since closed, reading each PR at most every 10 minutes, and deletes the PR's queued comments. A refused release (agent still running, liveness unknown, lease held) is retried after the interval.releaseFollowupHandoffRecord) withforce.released_pr_merged/released_pr_closed.Tests
test/followupHandoffReviewBlockers.test.ts, using real git fixtures:readPullRequestClosuredistinguishes merged, closed and open.Related handoff, PR comment, CI and worker suites pass.
prPublicationJobandprPublicationRecoveryJobneeded the new module added to their@propr/core-style module mocks.These fail on
maintoo, for local-environment reasons:configRoutes.followup;processGoalJob: the local test DB already has another branch's migration recorded.After deploy
PR #447's hold is released on the first sweep after deploy. The host disk is at 96%, which is what failed task 38316; that should be looked at separately.
🤖 Generated with Claude Code