Skip to content

feat(land)!: retire the batching host gate, quest land serve - #707

Merged
kixelated merged 5 commits into
mainfrom
quest/m0/queue-watcher/retire
Nov 13, 2026
Merged

kixelated merged 5 commits into
mainfrom
quest/m0/queue-watcher/retire

Conversation

@kixelated

@kixelated kixelated commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Finishes quest/m0/queue-watcher/retire.md: no repository lands through quest land serve any more, so the batching host gate is deleted.

Precondition, checked 2026-11-13

  • Rulesets: moq-dev/moq, moq-dev/quest, moq-dev/rind, moq-dev/rust2 (and the kixel-ai/rind and kixel-ai/rust2 they redirect to) require a merge_queue rule with their Queue check. moq-dev/moq.pro requires quest land plus Main queue, which is the watcher's own queue: the own queue relies on the unreported quest land check, as the quest's Plan says. moq-dev/studio requires only Check; moq-dev/kixel.ai and kixel-ai/dotfiles require only the Pullfrog approval.
  • Hosts: every quest-land* unit on the maintainer's hosts runs quest land watch (moq, quest, rind, rust2 on one host, moq.pro on another). None runs quest land serve.

Changes

  • Deleted src/cli/land-serve.ts, land-park.ts and land-halt.ts, and the quest land serve command. The helpers the watcher shares (App tokens, save, excerpt, the private repository, state paths, locks, startDaemon, daemonLoop) moved to the new src/cli/land-daemon.ts.
  • land.ts loses batch building, overlap screening and the in-daemon quest check (build, combine, screener, BatchPolicy, Overlap, Rejection). land-fixer.ts loses the batch fixer's start and collection (startFixer, collectFixers, collectJob), the base fixer, and its fix PR. mergeBase, prepareHead, mergePinned, the fallback, launch, settle, importFix and publishHead stay, since the watcher uses them.
  • The fixer's base-alone mode is gone: quest land fix now needs at least one PR number, parseBaseFix is deleted, and so is the prompt's "The base alone" section. The prompt's "quest land then checks the base alone" clause went with it.
  • The watcher's QueueFailure record keeps only plan and reason. Serve's Failure fields (ejections, numbers, tip, blame, log) were never read.
  • Log pruning keeps serve's log names (base-, check-, batch-, fix-job-, fix-base-), so the logs serve left still expire. Serve's leftover fix-job-/fix-base- records and failure.json no longer keep their logs alive, since nothing reads them now.
  • QUEST_LAND_BASE, which only serve's sandbox set, is no longer stripped from quest agent's environment.
  • README: the "Land a batch with quest land" section is gone. What still holds for the watcher moved into a new "The land fixer" subsection: the wrapper contract, time limits, result format, validation and import bounds, quest land apply, quest-link pruning, and tokens and locks. The own-queue section now describes its own picks, ejections and landing path (fallback, retries) instead of pointing at serve. quest land watch --help was reworded the same way.
  • Quest tree: deleted the quest. The queue-watcher epic now has no children, so its README is sized [M] for its remaining end-to-end run.

Tests

  • Deleted the tests that only serve's batching, parking, halting, base fixer, overlap screening, stall comments and sandbox reached, plus test/land-fixer-diagnostics.test.ts, which drove startFixer/collectFixers. The watcher suite's crash handback covers the same exit-code path.
  • fixerFixture now drives the watcher's own queue with a real fixer. On it I ported the fixer tests for shared code: credential isolation, agent start at the base, the four deadline and admission tests, the pipe burst, the signal and unidentified-process handbacks, the five import-bound handbacks, both alternates tests, comment quoting and redaction, and token redaction. The four quest land apply tests now get their handback from the watcher.
  • Ported three landing tests to the own queue: dropping list links to quests the base finished, a merge refused with a 403, and a lost merge response.
  • just check and just test pass locally.

Choices made without asking

  • Shared helpers went to a new land-daemon.ts rather than into land-watch.ts, because land-bump, land-queue, land-watch-fix and land-watch-flaky import them too.
  • I deleted the fixer's base-alone mode as part of "halting" code, even though the epic said the fixer prompt stays as it was: that section described a mode that can no longer run. The prompt still says "batch" and lists batch/pr-<n> branches, which the watcher still supplies, so I left that wording alone.
  • I did not port serve-only landing tests whose paths the own queue reaches only rarely: prepared-head restarts, fallback push refused or moved, GitHub's transient "Repository not found", 405/409 retries on a stale pin, tree-mismatch CRITICAL, and per-PR workflow token scoping. land-head.ts keeps that code untested by an end-to-end run. See the follow-up below.
  • I sized the queue-watcher epic [M] now that its last child is gone.

Models

Size: M
Implementer: Claude Code, claude-opus-5-5, medium effort
Implementer: Claude Code, claude-opus-5-5, low effort (iterate, S)

Overlap

#652 also edits src/cli/land*.ts and README.md. The work is different, but expect merge conflicts with it.

Follow-ups

Decisions

  • Untested land-head.ts paths, user's answer 2026-11-13 (/quest-run pick round): ✅ add an [S] follow-up quest (rejected: port the tests in this PR; drop).
  • Host-dependent test failures, user's answer 2026-11-13: ✅ add a follow-up quest that fixes them at the root cause (rejected: leave them).

Merge with main

Merged main after #652 (signals). Kept its carry records (saveCarry, carriedBy) and SignalRefusal in land-fixer.ts, which the watcher uses; dropped its edits to serve's collectJob and its serve-only tests (a prepared head carrying the pin's finding, and two collectFixers handbacks), whose watcher counterparts from #652 remain. README: moved "Signals that hold a head" under the watch section, with serve's queue replaced by the own queue, and kept #652's contents: write reason for the watcher's token. quest land watch --help keeps #652's signal sentence.

Merged main again after #705 moved GitHub code into src/github/: kept serve's deletions (land-serve.ts, land-halt.ts, land-fixer-diagnostics.test.ts) and pointed the surviving imports at src/github/client, signals and land (LAND_CHECK, pin, Reason now live there rather than in land.ts). land-daemon.ts and land-watch.ts imports updated likewise.

(Written by Claude Opus 5.5 with medium; iterated by Claude Opus 5.5 with low)

🤖 Generated with Claude Code

Review

Rewritten by quest review after each round.

  • Head: f5153aa

  • Base: origin/main at c1c04e0

  • Reviewer: Codex, gpt-6.1-sol, high effort

  • Session: 01a1d70d-7097-73f3-a671-e04a1357bdc6, round 2

  • Score: 9/10, The merge resolutions preserve the reviewed watcher functionality with no actionable regressions found; landing-test coverage remains tracked as follow-up work, and builds and tests were not run as instructed.

  • Rounds: 3; findings 0: fixed 0, refuted 0, open 0

  • Findings: none

  • Reviewer: Codex, gpt-6.1-sol, medium effort, shadow

  • Session: 01a1d6db-5368-7293-9f3f-2126419282be

  • Rounds: 1; findings 0: fixed 0, refuted 0, open 0

kixelated and others added 2 commits November 13, 2026 13:25
No repository lands through `quest land serve` any more: moq, quest, rust2
and rind use GitHub's merge queue, and moq.pro the watcher's own queue,
whose base still requires the unreported `quest land` check.

Delete serve's batching, parking, halting, base fixer, overlap screening and
squash-push code with its tests and README section. The helpers the watcher
shares move to `land-daemon.ts`; the fixer's base-alone mode and
`QUEST_LAND_BASE` go with it. Serve's log names stay in log pruning so its
leftover logs still expire. Fixer and landing tests that only serve drove now
run on the watcher's own queue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kixelated kixelated changed the title Retire the batching host gate feat(land)!: retire the batching host gate, quest land serve Nov 13, 2026
@kixelated
kixelated marked this pull request as ready for review November 13, 2026 21:42
@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 36 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 172965e1-2e8a-4e3d-969c-312cd7839815
Commits

Reviewing files that changed from the base of the PR and between c1c04e0 and f5153aa.

Files selected for processing: 28

  • README.md
  • assets/land-fix.md
  • quest/m0/host-independent-tests.md
  • quest/m0/own-queue-landing-tests.md
  • quest/m0/queue-watcher/README.md
  • quest/m0/queue-watcher/retire.md
  • src/cli/agent.ts
  • src/cli/hold.ts
  • src/cli/land-bump.ts
  • src/cli/land-daemon.ts
  • src/cli/land-fix.ts
  • src/cli/land-fixer.ts
  • src/cli/land-halt.ts
  • src/cli/land-head.ts
  • src/cli/land-park.ts
  • src/cli/land-prune.ts
  • src/cli/land-queue.ts
  • src/cli/land-serve.ts
  • src/cli/land-watch-fix.ts
  • src/cli/land-watch-flaky.ts
  • src/cli/land-watch.ts
  • src/cli/land.ts
  • src/cli/main.ts
  • test/agent.test.ts
  • test/land-fixer-diagnostics.test.ts
  • test/land-prune.test.ts
  • test/land-watch.test.ts
  • test/land.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

pullfrog[bot]
pullfrog Bot previously approved these changes Nov 13, 2026

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

I reviewed the whole retirement of quest land serve: the code it deletes, the shared helpers it moves, the cleanup of the fixer's base-alone mode, and the README and test rewrites. I also ran tsc, tsc -p src/core, prettier --check ., and the test/land.test.ts, test/land-watch.test.ts and test/land-prune.test.ts suites. All 127 tests pass.

  • Shared daemon plumbing moved to land-daemon.ts: I diffed the trimmed lines of the moved code against land-serve.ts on main. Only the file header, the imports, the startDaemon doc wording and the narrowed installationToken options type differ.
  • Batch, park, halt and base-fixer code deleted: build, combine, screener, startFixer, collectFixers, collectJob, proposeFix and the halt/park modules are gone. The watcher still uses prepare, launch, settle, importFix, publishHead, mergeBase and COLLECTION_ATTEMPTS, and all of them stay.
  • quest land fix requires PR numbers: commander now declares <prs...> as required, and fix() also rejects an empty list. validate() drops its pr flag, and the prompt's "The base alone" section is removed.
  • QueueFailure slimmed to { plan, reason }: both producers are updated (land-watch.ts handle() and land-queue.ts), and so is the test assertion.
  • Log pruning: serve's log-name families still expire. Only watch-job- records now keep a log alive, and failure.json no longer does.
  • QUEST_LAND_BASE no longer stripped: the change covers STRIPPED, the quest agent --help text and the test.
  • README and --help: the serve section is replaced by a new "The land fixer" subsection and a self-contained own-queue section. I checked the claims against the code: the ejection reasons in resolveQueue, and the batch/pr-<n> branches the watcher's prepare call supplies. The anchor links now point to #the-watchers-own-queue. Nothing stale is left in the source, README, CONTRIBUTING.md or docs/.
  • Quest tree: retire.md is deleted. The epic is sized [M], and its 2026-11-01 and 2026-11-06 decisions are still recorded in the epic README.

The coverage gap that remains is the one the PR body already names: land-head.ts paths such as the prepared-head restart, refused fallback, stale-pin 405/409 retries and tree mismatch no longer have an end-to-end test. The suggested follow-up quest covers it.

Pullfrog  | View workflow run | Using claude-opus-5-5 | 𝕏

kixelated and others added 2 commits November 13, 2026 14:35
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ered

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pullfrog[bot]
pullfrog Bot previously approved these changes Nov 13, 2026

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

Since the last review, the branch merged main, which brings in #652's signal handling, and added a follow-up quest. I checked the merge resolution against main's land-fixer.ts and ran tsc (root and src/core) and prettier --check .. I also ran the land, land-watch, land-prune, signals, agent, cli and usage suites: 228 tests pass and 1 is skipped.

  • Resolved the conflict in land-fixer.ts: on main, #652 put the re-enqueue readSignals check and its saveCarry inside serve's collectJob, so both went away with it. The watcher has its own copy of that path in land-watch-fix.ts: SignalRefusal, job.signaled and the unanswered_signal marker. The shared pieces stayed: SignalRefusal, carriedBy, saveCarry and carriedOf.
  • Kept the signal ejection in land.ts: resolveQueue still reads signals, so the own queue ejects held picks as unanswered_signal.
  • Dropped the serve-only signal tests: the watcher still covers the same behavior. test/land-watch.test.ts has "a fix whose dropped head drew a finding while the fixer ran", and the own queue has "the land fixer's requeue hands back a head a finding drew while it ran".
  • Updated the README and --help: "Signals that hold a head" now sits under the watch section and names the own queue instead of serve's queue. The watcher's token without a fixer now asks for contents: write, which disarming a signaled PR needs. Apart from the deliberate comment at land-prune.ts:9, nothing in the source, README, CONTRIBUTING.md or docs/ still mentions serve, halt or park.
  • Added the follow-up quest quest/m0/own-queue-landing-tests.md: it is sized [S] and covers the land-head.ts landing paths that lost their end-to-end tests, as the PR's Decisions section records. The unused COLLECTION_ATTEMPTS import was also removed from test/land.test.ts.

Pullfrog  | View workflow run | Using claude-opus-5-5 | 𝕏

@kixelated
kixelated added this pull request to the merge queue Nov 13, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 13, 2026
@moq-bot

moq-bot Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

quest land watch: the merge queue removed this pull request at 6c645aa because it conflicts with main (merge_conflict).

The land fixer works on it in the background, and the watcher re-enqueues it at the back of the queue once it is fixed or judged flaky, or hands it back here with what it needs.

(written by quest land watch)

@moq-bot

moq-bot Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

codex, gpt-6.1-sol, medium effort land fixer note:

The failure log reports:

CONFLICT (content): Merge conflict in src/cli/land-fixer.ts
CONFLICT (modify/delete): src/cli/land-halt.ts deleted in 6c645aa and modified in HEAD. Version HEAD of src/cli/land-halt.ts left in tree.
CONFLICT (modify/delete): src/cli/land-serve.ts deleted in 6c645aa and modified in HEAD. Version HEAD of src/cli/land-serve.ts left in tree.
CONFLICT (content): Merge conflict in src/cli/land.ts
CONFLICT (modify/delete): test/land-fixer-diagnostics.test.ts deleted in 6c645aa and modified in HEAD. Version HEAD of test/land-fixer-diagnostics.test.ts left in tree.
CONFLICT (content): Merge conflict in test/land.test.ts
Automatic merge failed; fix conflicts and then commit the result.

Mechanical resolution is ready at d2b29a10c03878836dadbb64a1ddc0fead7d57fa on pr-707. It merges base, preserves the retired service and test deletions, and follows base’s GitHub library moves in surviving imports. No protected paths were edited.

In the merged tree, nix develop --command just install and nix develop --command just check passed. Formatting was checked with nix develop --command bun x prettier --write src/cli/land-fixer.ts src/cli/land.ts src/cli/land-daemon.ts src/cli/land-watch.ts test/land.test.ts. nix develop --command just test failed with 1,206 tests passing, 5 skipped, and two failures. The recipe stopped before its install, build, and lifecycle stages.

Both failures reproduced on a separate base checkout using nix develop --command bun run test test/usage.test.ts and nix develop --command bun run test test/review.test.ts -t "Codex reaches a gateway": the usage assertion at line 665 misses its expected session (its fixture assumes /work is a deleted checkout, but /work exists here); the review assertion at line 540 reports AssertionError: expected 3 to be 1. The usage test also failed in isolation on the resolved PR. Required checks therefore cannot be reported as passing.

(written by codex, gpt-6.1-sol, medium effort)

@moq-bot

moq-bot Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

codex, gpt-6.1-sol, medium effort land fixer: nix develop --command just test failed: test/review.test.ts:540 "AssertionError: expected 3 to be 1" and test/usage.test.ts:665 missing expected session; both reproduce on base alone.. Recommendation: Review the mechanical merge commit d2b29a10c03878836dadbb64a1ddc0fead7d57fa on pr-707 and rerun the required checks after resolving the base/runner test failures.

CONFLICT (content): Merge conflict in src/cli/land-fixer.ts
CONFLICT (modify/delete): src/cli/land-halt.ts deleted in 6c645aa1a1e47cd4a20314eb33b13462e4ea4619 and modified in HEAD.  Version HEAD of src/cli/land-halt.ts left in tree.
Auto-merging src/cli/land-head.ts
Auto-merging src/cli/land-queue.ts
CONFLICT (modify/delete): src/cli/land-serve.ts deleted in 6c645aa1a1e47cd4a20314eb33b13462e4ea4619 and modified in HEAD.  Version HEAD of src/cli/land-serve.ts left in tree.
Auto-merging src/cli/land-watch-fix.ts
Auto-merging src/cli/land-watch.ts
Auto-merging src/cli/land.ts
CONFLICT (content): Merge conflict in src/cli/land.ts
Auto-merging src/cli/main.ts
CONFLICT (modify/delete): test/land-fixer-diagnostics.test.ts deleted in 6c645aa1a1e47cd4a20314eb33b13462e4ea4619 and modified in HEAD.  Version HEAD of test/land-fixer-diagnostics.test.ts left in tree.
Auto-merging test/land-watch.test.ts
Auto-merging test/land.test.ts
CONFLICT (content): Merge conflict in test/land.test.ts
Automatic merge failed; fix conflicts and then commit the result.

(written by codex, gpt-6.1-sol, medium effort)

Follows #705's moves into src/github/ and keeps serve's deletions; adds a host-independent tests follow-up quest.

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

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes

Since the last review, the branch merged main after #705, which moved GitHub code into src/github/, and it added a second follow-up quest. I ran tsc on the root and on src/core, prettier --check . and quest check (24 documents ok). The land, land-watch, land-prune and agent suites also ran: 171 tests pass and 1 is skipped.

  • Pointed the surviving imports at src/github/: land.ts now takes LAND_CHECK, pin, pinned and Reason from ../github/land and no longer defines them itself. land-fixer.ts, land-daemon.ts, land-watch.ts and main.ts import from ../github/client, signals and land instead of the old ./github, ./signals and ./land. test/land.test.ts now gets EJECTED and pin from src/github/land. Nothing still imports the deleted serve, halt or park modules. The other ./github and ./status imports in src/cli resolve to files that still exist on main.
  • Added the follow-up quest quest/m0/host-independent-tests.md: it is sized [S] and covers the /work fixture cwd in test/usage.test.ts and the ambient gateway variables reaching test/review.test.ts. The PR's Decisions section records both. The test names and fixture details it cites match the current files.

Pullfrog  | View workflow run | Using claude-opus-5-5 | 𝕏

@kixelated
kixelated added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit fd385d0 Nov 13, 2026
20 checks passed
@kixelated
kixelated deleted the quest/m0/queue-watcher/retire branch November 13, 2026 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant