Repository navigation
Read the merge queue's reason when it rejects a pull request - #1373
Conversation
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 8e68dc3b-e16a-4d41-8c77-14541adca1e7) |
Revision history
|
1c0f031 to
b6152dd
Compare
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 5fc41608-bd01-4ebe-8b74-8aee55d441da) |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Change-Id: Ic68644735337fb896acc5f3a44eb1815c5d57b60
b6152dd to
d1c6b24
Compare
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 8f48dec4-1e45-41dc-80b7-c9a1cfcb67e6) |
|
@Mergifyio queue |
🛑 The pull request has been removed from the queue
|
|
Queued — the merge queue status continues in this comment ↓. |
|
@Mergifyio queue |
Merge Queue Status
This pull request spent 2 hours 44 minutes 35 seconds in the queue, including 1 hour 33 minutes 22 seconds running CI. Required conditions to merge
|
Summary
After a pull request enters the merge queue, the landing guard could only say queued or not. When the queue rejected one, it said nothing about why.
This teaches the guard to read the queue's own message. It reports the kind of rejection, the reason, and the next step.
It was checked against real rejected pull requests. It also ignores a rejection that is older than the pull request's latest commit.
Review Claim
Approve a read-only check that reports why the merge queue rejected a pull request and what to do next.
Review Lane
behavior
Review Unit
product-skill
Safety Invariant
It only reads Mergify comments and GitHub pull request data; it writes nothing. The token comes from the GitHub login and is never printed or saved.
Slice Rationale
The reader, its test data and the skill text that tells people to use it are one claim. The queue time limit change is a different kind of file and ships separately.
Non-goals
Measured
Command:
python3 -m unittest product/skills/land-stack/tests/test_queue_feedback.pyRan 9 tests in 0.046sthenFAILED (failures=1, errors=8)(the reader did not exist yet)Ran 13 tests in 0.045sthenOKTest Plan
Test Plan
python3 -m unittest discover -s product/skills/land-stack/testsprintedRan 38 tests in 0.425sthenOK(the 13 new tests are in the separate run above)check_skill_test_coverage.py,check_skills_three_harnesses.py,check_ecosystem_boundaries.py,check_skill_file_refs.py,check_no_dated_provenance.py,check_skill_trigger_policy.pyandcheck_skill_trigger_mechanism.pyeach exited 0python3 engine/skills/make-pr/scripts/preflight.py --base origin/main --dry-runprintedunit product-skill: 4 file(s)andok preflight passedRevert Plan
Revert Plan
git revert <sha>🤖 Generated with Claude Code
Note
Low Risk
Changes are limited to the land-stack skill script, docs, and tests; no runtime product or security-sensitive paths.
Overview
Adds
--queue-feedbacktoverify_stack.pyso the land-stack workflow can read Mergify’s Merge Queue Status comment (not just the merge-queue check run) after a queue write. The script parses the embedded Mergify payload and reason text, classifies outcomes as merged / in-queue / waiting / rejected, and for rejections reports a kind (timeout,conflict,checks-failed,ahead-failed,other), failing or still-running checks, and a next-step hint. It can callgh apifor bot comments or replay via--feedback-json; exit 0 when nothing is rejected, 1 on rejection, 2 when feedback cannot be read. Stale dequeue comments are treated as waiting when the head commit is newer than the status comment.SKILL.mddocuments when to use this after--queue-stateand how to act on each rejection kind. Tests and a fixture of real Mergify comments cover timeouts, conflicts, check failures, requeues, and CLI exit codes.Reviewed by Cursor Bugbot for commit d1c6b24. Bugbot is set up for automated code reviews on this repo. Configure here.