Repository navigation
feat(merge): close quest merge --land's gaps - #347
Conversation
Quest-Claim: 0b8a7d99d5a697e1
- Pick the repository's merge method: the one --squash or --rebase names, refused when disallowed, else the only one allowed, else a merge commit. - A bare PR number outside a checkout says to pass the PR URL. - A direct merge releases quest:merge once GitHub reports it merged. - quest status reports the head auto-merge was enabled on, from the quest land pin or the head branch's push activity, and quest wait prints auto-merge:moved when it differs from the current head. The iterate skill disables auto-merge before pushing. Deletes the finished quest quest/m0/helpers/merge-land.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…idden Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
|
I've taken this PR out of the queue for now. An audit found it contradicts moq-dev/quest#326: this PR releases a (Written by Claude Opus 5.5) |
Rework the PR on top of #326, where `quest merge` takes no label and no token: drop the direct-merge label release and the token-preserving refusal order, and keep the merge-method selection on an ungated base, the bare-number error outside a checkout, and the auto-merge head report. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e's head GitHub lists a merge into a branch as pr_merge or merge_queue_merge activity, which also moves its head. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Design change: this PR now keeps only three of its gaps, as decided in the 2026-11-01 comment after moq-dev/quest#326 merged. Kept:
Dropped:
The merges of (Written by Claude Opus 5.5) |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merges #347's merge-method changes into land, and applies the 2026-11-02 design change: drop the pick comment and src/cli/pick.ts. On a merge-queue base, a head GitHub refuses to enqueue now fails quest merge with a refusal that says to fix the PR (for example with /quest-iterate) and land it again. Queue removals reconciles picks from merge-queue timeline events and auto-merge state, trusting the enqueuer or enabler; Bad picks narrows to enqueueing armed picks GitHub never queued. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Closes the remaining gaps in
quest merge --landthat the questquest/m0/helpers/merge-land.mdlists, and deletes that quest along with its last link (inquest/m0/queue-watcher/pick.md's Related section).Since moq-dev/quest#326,
quest mergetakes no label and no token. So this PR no longer releases aquest:mergelabel after a direct merge, and it no longer keeps a caller's token valid across refusals. See theDesign change:comment.Changes
--landnow reads the repository's allowed methods:--squashor--rebasenames, and refuses one the repository disallows.--directfollows the same rule.<root> is not a checkout with an origin remote: … pass the full GitHub PR URL, or run inside a checkout or name one with --root. Before, it printed git's ownfatal: not a git repositoryerror.quest statusadds the head auto-merge was enabled on to the end of theauto-mergeline, and--jsonadds it asautoMerge.head.Quest-Land-Headpin when there is one. Otherwise it is the last update to the head branch before auto-merge was enabled, read from the head repository's activity. Updates are pushes, force pushes, branch creation, and merges into the branch (pr_merge,merge_queue_merge).-when it can't be told: GitHub hasn't listed the current head's update yet, an update happened in the same second auto-merge was enabled, or the head repository is gone. A token that may not read the head repository's activity also gets-, with a warning, and the rest of the status still prints.quest waitprintsauto-merge:movedonce per head while auto-merge stays on for a head other than the current one. The actor is the account that enabled it, and the URL is<pr>/commits/<enabled head>.gh pr merge <pr> --disable-autobefore any push.--help, the README, and the merge skill describe the new behavior.Choices made without asking
Quest-Land-Headinto every auto-merge commit body would replace the squash or merge commit message that ungated repositories get today. Reading it from the head branch's activity changes nothing GitHub merges. The cost is a-while GitHub's activity listing lags, which takes seconds to minutes.--landrefuses and asks for a flag. The Worker'slandPullRequest, by contrast, falls back to squash; I left the Worker unchanged./quest-iterateis the skill that pushes, and in moq-dev/moq#6985 the push came from an iterate session.pickreturn inland. Method selection here runs only when!snapshot.queue, so it doesn't touch the queue path. Whichever of the two lands second resolves the conflict inlandthe same way in either order:named !== undefined && named !== "merge", and passingnamed ?? "merge"topick;mergeMethodon the ungated path ahead of the!directauto-merge checks.Production observation: moq-dev/moq#6985 ejected as
head_movedThis PR doesn't fix this one, because the fix is already on
main. On 2026-11-01 the re-pick ata86499bran at 05:39:51Z. The PR timeline shows noauto_merge_disabledorauto_squash_enabledevent at that time. That matchesquestbefore moq-dev/quest#306, which asked GitHub to enable auto-merge again. GitHub kept the existing request and itsQuest-Land-Head: 5550df1…body. moq-dev/moq'sflake.lockpins quest at1ef2ca7(2026-10-30), which predates #306. Since #306,enqueuedisables and re-enables the request, so the pin names the new head. With this PR,quest statusandquest waitwould also have shown the stale pin before the gate ejected it.Suggested follow-ups
questflake input to a revision that includes moq-dev/quest#306, so re-picks there re-pin instead of being ejected ashead_moved.quest wait's setup (src/cli/wait.ts:240, which predates this PR) also reads onlypush,force_push, andbranch_creationactivity. When the current head came from a merge into the head branch (pr_mergeormerge_queue_merge), a wait from that head can fail withcannot resolve push time, and the merge never prints as an event.Validation
just checkpasses.just testpasses, run withCLAUDE_CONFIG_DIRunset.--direct;auto-merge:movedreported once per head, and not when auto-merge is on the current head;Review
quest review --new, restarted after the design change), gpt-6.1-sol at medium effort, session01a199ec-4087-7b53-bbff-1adb6e173f9c.8d7c22e6reported one finding: the enabled head ignoredpr_mergeandmerge_queue_mergeactivity, so a head reached by a merge into the branch read as unknown or as an older push. Fixed inb8dfdbf3, with a test.b8dfdbf3: no findings.6596bb317e64ec22235779031c2bf2984ea09ffc: review skipped as too trivial. Sinceb8dfdbf3it has a conflict-free merge oforigin/main(0db65d93, exempt) and6596bb31, which only removesquest/m0/helpers/submodule-links.md's Related link tomerge-land.md, the quest this PR deletes. That link came in on main and broke the requiredcheck(link does not resolve). No code changed.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code