Skip to content

quest: plan quest land, a batched merge gate - #228

Merged
kixelated merged 2 commits into
mainfrom
quest-plan/land
Oct 26, 2026
Merged

kixelated merged 2 commits into
mainfrom
quest-plan/land

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Plans quest land, a batched merge gate that any repository runs from its own CI. kixelated/quest is the first adopter.

Why

moq-dev/moq's serial GitHub merge queue landed 5.5 PRs per hour across 414 merges. Waiting was 98% of queue time, with a median of 18 PRs ahead of each new entry. GitHub's merge queue cannot test several PRs in one run, and this repository can't use it at all because it isn't owned by an organization. Data and the full decision trail: moq-dev/moq#6854.

Quests

  • quest/m0/helpers/land.md (new, [L]): the engine. It builds the queued PRs into a chain of squash commits, using quest resolve for quest files, runs the repository's check once, and fast-forwards the base to the longest passing prefix. Each PR's branch is moved to its squash commit so GitHub shows the PR as merged. A failed batch is bisected by prefix, with no retries and no batch-size constant.
  • quest/m0/helpers/land-adopt.md (new, [S]): kixelated/quest's own main lands through the gate. The push credential is a GitHub Actions bypass, guarded by a source-policy test.
  • quest/m0/helpers/queue-siblings.md (narrowed): the gate's chain covers the link-list conflict. This quest keeps the dead-link quest check failure and repositories that still use GitHub's queue.

Decisions (user, 2026-10-26)

What runs the gate:

  • ✅ Custom, fast-forward
  • Custom, merge API
  • Mergify

Where it lives:

  • ✅ In quest, shared
  • In moq only

Engine host:

  • ✅ quest CLI in Actions
  • kix Worker

Quest-index conflicts:

  • ✅ Resolve semantically
  • Eject as today

Batch policy:

  • ✅ All queued, prefix bisect
  • Adaptive size

queue-siblings.md:

  • ✅ Narrow it
  • Fold into gate
  • Leave as is

Command name:

  • quest queue
  • ✅ quest land
  • quest train

Adopters besides moq:

  • ✅ kixelated/quest
  • ✅ moq.pro
  • ✅ (user) kixelated/rust2

Push credential for kixelated/quest and kixelated/rust2:

  • ✅ Actions bypass + test
  • Per-repo App

Choices made without asking

  • The exact queue-membership signal (auto-merge pinned to the head, or something else) is left to the engine quest, which decides with a recommendation.
  • Fork PRs without maintainer edits are ejected with a comment, since the gate can't move their head.
  • If GitHub turns out not to mark a PR merged when its head lands by push, the quest stops and reports instead of falling back to closing PRs.

🤖 Generated with Claude Code

(Written by Claude Opus 5.5)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-26T06:04:09.213557Z 65dff1f New commits
🔒 Security Review ✅ Completed 2026-10-26T06:06:46.077867Z 65dff1f New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review by review (OpenAI)

Reviewed commit: 63f0764

P2 — Test the shortened prefix after a failed head lease (quest/m0/helpers/land.md:42–43). The plan tests only the batch tip, but then lands the prefix before the first failed lease. A passing A+B does not establish that A passes: B can fix a failure introduced by A. If B changes while the batch runs, its lease fails and the specified fallback would land untested, potentially broken A, violating the tested-tree guarantee. Require a successful check on that exact prefix before advancing base, or abort the landing when a lease fails; include an A-fails/A+B-passes regression with B's lease failing.

Direction: sharing the gate and keeping credentials out of PR execution are sensible; the scratch-repository check before relying on GitHub's merged-state behavior is also appropriate. The failed-lease path needs the same exact-tree discipline as ordinary bisection.

Verification: static inspection of the proposed plans and existing landing requirements only. No implementation, tests, or live GitHub push/merge behavior exercised.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review by review (OpenAI)

Reviewed commit: 65dff1f

The prior P2 is fixed in the plan: quest/m0/helpers/land.md:42–45 now permits a shortened landing only when that exact prefix passed its check; otherwise nothing lands. Lines 63–66 explicitly require the A-fails/A+B-passes/B-lease-fails regression. This addresses the unsafe fallback identified in the previous review.

No new actionable bugs found in this focused update. Direction is sound: preserving the tested-tree invariant with a conservative abort is simpler and safer than assuming a passing batch proves its prefixes pass.

Verification: static comparison against the previous reviewed head, with unchanged base. This is a documentation plan; implementation, regression tests, and live GitHub behavior were not exercised.

@kixelated

Copy link
Copy Markdown
Collaborator Author

Merge summary: fixed the OpenAI review's P2 in 65dff1f. After a failed head lease, the prefix before it lands only if a check passed on exactly that prefix; otherwise nothing lands. The plan now also lists the A-fails / A+B-passes / B-lease-fails regression test. No recorded decision changed. Codex (code and security) and the OpenAI review found nothing on 65dff1f, CI passed, and quest check --base origin/main passes (53 documents). Landing by squash.

The first CI run on 63f0764 failed test/runner.test.ts > cancels on request, publishing the partial work (terminated never set), which this quest-only diff cannot touch, and it passed on 65dff1f. It looks like a flake worth a follow-up.

(Written by Claude Opus 5.5)

@kixelated
kixelated merged commit 83f66c5 into main Oct 26, 2026
4 checks passed
@kixelated
kixelated deleted the quest-plan/land branch October 26, 2026 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant