Repository navigation
feat(land): screen queued PRs with quest check and report overlaps before batching - #322
Merged
Merged
Conversation
Quest-Claim: c6163bc25c3353e5
Before building a batch, quest land squashes each queued PR alone onto the current base and runs quest check on it in the daemon, reading quest files from git objects. A PR with findings the base lacks, such as a link to a quest the base finished, is ejected alone as failed_checks instead of failing the whole batch. A newly queued PR is also squashed onto each PR ahead of it, and the daemon comments once on it with the PRs and files it conflicts with. Finishes quest/m0/land-queue-checks.md and narrows quest/m0/helpers/queue-siblings.md to what remains. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
marked this pull request as ready for review
October 31, 2026 15:34
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
This was referenced Oct 31, 2026
moq-bot Bot
pushed a commit
that referenced
this pull request
Nov 1, 2026
* fix(land): screen only the PRs a batch reaches #322 squashed every queued PR onto the base and every new one onto each PR ahead of it before building a batch. With 62 queued on moq that is about 1,900 merges, so the daemon screened for over 20 minutes and never built a batch. Each candidate is now screened as the batch reaches it, memoized per batch, and a new PR's conflict report covers the four PRs landing soonest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test(land): give the daemon tests a measured timeout On the land gate's host under load 28, land tests that take 1.1-1.8 s unloaded took 5.2-6.8 s and failed vitest's 5 s default, ejecting this PR twice. Like move, start and landed, the file now allows 30 s. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Finishes quest/m0/land-queue-checks.md: before batching,
quest landscreens each queued PR, so a problem one PR can be blamed for never ejects a whole batch.Changes
quest checkbefore batching (src/cli/land.tsbuild/screen): each queued head is squashed alone onto the current base in the daemon's scratch worktree, using the samequest resolvemerge driver as the chain.quest checkthen runs on that squash. A PR whose findings the base lacks, such as a link to a quest the base has since finished (moq-dev/moq#7135), is left out of the chain and ejected alone asfailed_checks, with the findings in its comment. Findings are compared with the base's by path and message, ignoring line numbers, so a PR that only moves an existing finding is not blamed for it. A base with noquest/directory skips the check.failure.json(tip = that squash, log = the findings) and goes throughresumeFailure, so a configured fixer gets it the same way it gets a failed batch.src/cli/land-serve.tsreportOverlaps): a newly queued PR is also squashed onto each PR ahead of it (each squashed alone onto the base). If any of them conflict, the daemon comments once on the later PR with their numbers and files, as with moq-dev/moq#6994 / moq-dev/moq#7196.screened.jsonin the state directory records each PR's queue time, so a PR is screened again only after it is requeued.snapshot(root, commit, submodules = false)(src/cli/tree.ts) treats every path inside a submodule as existing instead of reading the submodule. The daemon's bare repository has no submodule checkouts.quest land servehelp, and tests are updated. The test Forge can now delete files, and three quest-file fixtures now add or delete the quest files they link, so they passquest check.quest landthe dead-link failure now ejects only the culprit, before batching. That quest keeps the tolerant check, or another way to spare the PR from ejection, on every gate.Trust model: why the per-PR check runs in the daemon, not
--sandboxquest checkhere runs nothing from the PR's tree:check()in-process onsnapshot(dir, commit), which reads quest files from git objects (git ls-tree -randgit cat-file --batch) in the daemon's private repository. No files are checked out for it, so nobunfig.toml,.env, hook, or package script in the PR is ever loaded.ls-treeandcat-file --batchapply no filters or textconv.check()is pure: it parses Markdown and tests whether paths exist in the tree listing. The one place it could read outside git objects is a submodule. Withsubmodules = falseit never runsgit -C <root>/<module>, so a PR-controlled gitlink path cannot point it at another repository on the host.mergeWorktree: hooks are off,GIT_CONFIG_GLOBAL=/dev/null, and the merge driver isquest resolve, run from the git directory, asbuildalready did.Running it through
--sandboxwould cost one container per queued PR on every round and add nothing, because nothing from the tree runs.Choices made without asking
failed_checksreason, not a new one.quest statusand/quest-completealready handle it, and the comment says it wasquest check.merge_conflicthandling.quest statusdoes not read it as an ejection.Suggested follow-ups
quest check --base(the quest-branch accuracy check) in the same screen, if CI does not already gate it.Review
gpt-6-astra, medium effort (quest review --deep; this change processes untrusted PR content in the trusted daemon).failure.jsonand goes throughresumeFailure, with a new test.62c4f45dccc9e29cb0d39de219fa5be0b38c0205: 0 findings.Local checks on 62c4f45:
just checkpassed.just testpassed (725 passed, 2 skipped; 426 for each build's lifecycle), run withenv -u CLAUDE_CONFIG_DIR.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code