Repository navigation
fix(server): a watched PR the merge queue drops wakes the agent - #88
Merged
Merged
Conversation
GitHub's merge queue can take a PR out (merge conflict with the queue, failed queue checks) without touching its head, checks or comments, and the PR stays open. The watch saw nothing, so an agent waiting on the queue was never told. The GitHub detail read now asks for the latest RemovedFromMergeQueueEvent and the watch fingerprint counts them, both github.com only like isRequired. A removal after the watch began that the agent did not make wakes it once with the reason; the queue's own "merged" removal is ignored.
maschwenk
marked this pull request as ready for review
November 16, 2026 20:42
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
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.
when github's merge queue kicks a watched PR out (merge conflict with the queue, failed queue checks), the agent never hears about it. the PR stays open, its head, checks and comments don't change, so the watch's fingerprint never moves and evaluation has nothing to report. the agent's turn already ended with "waiting on the merge queue", so the PR just sits there until someone notices. merges already wake the agent; this is the other way out of the queue
what changed
RemovedFromMergeQueueEvent(timelineItems(last: 1, itemTypes: [REMOVED_FROM_MERGE_QUEUE_EVENT])) and maps it toPullRequestDetail.mergeQueueRemoval(at,reason,by). github logs a removal with reasonmergedwhen the queue merges a PR, so that one maps to nullfilteredCount), so a removal changesstatusand triggers a detail read on the next sweep instead of waiting for the 30 min forced reread- The merge queue took it out without merging: merge conflict., summary#N: left the merge queue, outcomefailed. the watch storesmergeQueueRemovedAtso the same removal never wakes twice; a later one (requeued, dropped again) does. a removal from before the watch, or one the agent made itself, doesn't wake@includelikeisRequired, so enterprise reads don't changechecked
vp run check:changed: format, lint, knip, graphql, typecheck (36 packages), tests all passpullRequestWatch.tsand passes with this@includeon and off. real removal reasons there are snake case (merge_conflict,merged), actorgithub-merge-queue