From 0807fd03b76a3f0d6f3ca290ce1a2246533271f8 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sun, 1 Nov 2026 18:58:38 -0800 Subject: [PATCH 1/3] quest: plan kix enqueueing ready PRs and quest wait after merges Co-Authored-By: Claude Opus 5.5 --- quest/m0/kix/README.md | 1 + quest/m0/kix/enqueue.md | 35 +++++++++++++++++++++++++++++++++++ quest/m1/README.md | 1 + quest/m1/wait-merge-heads.md | 24 ++++++++++++++++++++++++ 4 files changed, 61 insertions(+) create mode 100644 quest/m0/kix/enqueue.md create mode 100644 quest/m1/wait-merge-heads.md diff --git a/quest/m0/kix/README.md b/quest/m0/kix/README.md index 9fda0ef8..c4a1e7b1 100644 --- a/quest/m0/kix/README.md +++ b/quest/m0/kix/README.md @@ -139,4 +139,5 @@ fixes what it finds: - [Job sandbox](/quest/m0/kix/sandbox/README.md) - head approval for kix-pushed heads, and opencode sandboxed - [Web execution](/quest/m0/kix/execution.md) - spawn and iterate through the UI, ending in contribution PRs - [Land review](/quest/m0/kix/land-review.md) - kix lands only heads with a review that counts on that exact head +- [Merge queue enqueue](/quest/m0/kix/enqueue.md) - kix enqueues ready PRs into a merge queue instead of only arming auto-merge - [Runner review checks](/quest/m0/kix/review-check.md) - runners publish the App's `quest review` check, so their heads land without a human approval diff --git a/quest/m0/kix/enqueue.md b/quest/m0/kix/enqueue.md new file mode 100644 index 00000000..8348f0ee --- /dev/null +++ b/quest/m0/kix/enqueue.md @@ -0,0 +1,35 @@ +# [S] kix enqueues ready PRs into the merge queue + +## Goal + +On a base with a merge queue, kix's Worker enqueues a PR whose head it +lands with `enqueuePullRequest` pinned to that head as soon as GitHub can +queue it, instead of only arming auto-merge, so kix-landed PRs reach the +queue even when GitHub fails to move auto-merge PRs into it. While required +checks are still pending, kix keeps arming auto-merge bound to the head, as +`quest merge --land` does. + +## Plan + +Decided 2026-11-02 (maintainer, /quest-plan of the follow-ups from the +2026-11-02 `/quest-complete` session, raised by +[moq-dev/quest#385](https://github.com/moq-dev/quest/pull/385)): ✅ plan it, +m0. + +- `landPullRequest` (`cloudflare/src/github/service.ts`) lands a merge-queue + base only by arming auto-merge. Since about 2026-09-10, GitHub often never + moves such PRs into the queue + ([community#209348](https://github.com/orgs/community/discussions/209348)). +- Share the CLI's split from #385 (`land` in `src/cli/hold.ts`): enqueue + with `expectedHeadOid` when the PR is ready, arm auto-merge when checks may + be pending, and fall back to enqueueing when GitHub answers that the PR is + already in clean status. Move the decision into shared code if both sides + can call it, rather than keeping two copies. +- A refused enqueue (conflict, failing checks) is a job result the runner + reports, like any other refused landing; kix doesn't fix it. +- The [land review](/quest/m0/kix/land-review.md) rule still applies first: + kix enqueues only a head with a review that counts on it. + +## Required + +- [Land review](/quest/m0/kix/land-review.md) - rewrites the same `landPullRequest`, in [moq-dev/quest#351](https://github.com/moq-dev/quest/pull/351) diff --git a/quest/m1/README.md b/quest/m1/README.md index eb8ea81c..46768a56 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -26,3 +26,4 @@ earlier "Later work" milestone became m2. - [Quest log theme](/quest/m1/theme/README.md) - an MMO-style identity, copy, board, landing page, and CLI output for the demo and launch - [Launch material](/quest/m1/launch.md) - README, quickstart, demo, comparison, and launch-post drafts - [Workers in a 5-minute cache](/quest/m1/worker-cache.md) - re-plan #276's worker/coordinator split and gate tickets, after confirming the cache premise +- [quest wait after a merge](/quest/m1/wait-merge-heads.md) - `quest wait` resolves a head that reached the branch by a merge into it diff --git a/quest/m1/wait-merge-heads.md b/quest/m1/wait-merge-heads.md new file mode 100644 index 00000000..2143a9ae --- /dev/null +++ b/quest/m1/wait-merge-heads.md @@ -0,0 +1,24 @@ +# [XS] quest wait resolves heads that came from a merge into the branch + +## Goal + +`quest wait ` finds when `` reached the PR's head branch +even when it got there by a merge into the branch, such as GitHub's +**Update branch** or a merge queue's merge, instead of failing with +`cannot resolve push time for ; pass a timestamp with --since`. + +## Plan + +Decided 2026-11-02 (maintainer, /quest-plan of the follow-ups from the +2026-11-02 `/quest-complete` session, raised by +[moq-dev/quest#347](https://github.com/moq-dev/quest/pull/347)): ✅ plan it, +m1, since agents merge locally and push, so it's rare, and `--since` works +around it. + +- `quest wait`'s setup (`src/cli/wait.ts`) matches the point only among the + branch's `push`, `force_push` and `branch_creation` activities. Also + accept `pr_merge` and `merge_queue_merge`, which #347 taught + `quest status`'s enabled-head lookup to count as moving the head; reuse + `BRANCH_UPDATES` (`src/cli/status.ts`) rather than keeping a second list. +- Keep reporting force pushes as before: the new activity types only resolve + the starting point. From 1fa1248c14df88972d004c27859288f5bad87580 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sun, 1 Nov 2026 19:05:17 -0800 Subject: [PATCH 2/3] quest: say how quest wait shares BRANCH_UPDATES and keeps push reporting Co-Authored-By: Claude Opus 5.5 --- quest/m1/wait-merge-heads.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/quest/m1/wait-merge-heads.md b/quest/m1/wait-merge-heads.md index 2143a9ae..1c68b6b0 100644 --- a/quest/m1/wait-merge-heads.md +++ b/quest/m1/wait-merge-heads.md @@ -17,8 +17,10 @@ around it. - `quest wait`'s setup (`src/cli/wait.ts`) matches the point only among the branch's `push`, `force_push` and `branch_creation` activities. Also - accept `pr_merge` and `merge_queue_merge`, which #347 taught - `quest status`'s enabled-head lookup to count as moving the head; reuse - `BRANCH_UPDATES` (`src/cli/status.ts`) rather than keeping a second list. -- Keep reporting force pushes as before: the new activity types only resolve - the starting point. + accept `pr_merge` and `merge_queue_merge` when resolving the point, the + types #347 taught `quest status`'s enabled-head lookup to count as moving + the head. Export `BRANCH_UPDATES` from `src/cli/status.ts`, or move it to a + module both import, rather than keeping a second list. +- Use that merge-inclusive list only to find the starting point. The pushes + `quest wait` reports keep using the existing push list, so a merge into the + branch is never reported as `pushed`, and force pushes print as before. From 816b4af1cb596f9ec51b4f0a33e5a7ac2ef4ce32 Mon Sep 17 00:00:00 2001 From: quest fixer Date: Sun, 1 Nov 2026 19:48:23 -0800 Subject: [PATCH 3/3] docs: repair completed land review quest references --- quest/m0/kix/enqueue.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/quest/m0/kix/enqueue.md b/quest/m0/kix/enqueue.md index 8348f0ee..9b40e3b2 100644 --- a/quest/m0/kix/enqueue.md +++ b/quest/m0/kix/enqueue.md @@ -27,9 +27,5 @@ m0. can call it, rather than keeping two copies. - A refused enqueue (conflict, failing checks) is a job result the runner reports, like any other refused landing; kix doesn't fix it. -- The [land review](/quest/m0/kix/land-review.md) rule still applies first: +- The [land review](/cloudflare/src/github/review.ts) rule still applies first: kix enqueues only a head with a review that counts on it. - -## Required - -- [Land review](/quest/m0/kix/land-review.md) - rewrites the same `landPullRequest`, in [moq-dev/quest#351](https://github.com/moq-dev/quest/pull/351)