From d087ffe19b4a7e97b1abe92f703c4d202c500161 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Mon, 2 Nov 2026 20:52:32 -0800 Subject: [PATCH 1/2] chore(quest): claim quest/m0/queue-watcher/host.md Quest-Claim: bdde152b533be65c From e913304d4dc5e8769a4af60e08c1694ded1de75c Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Mon, 2 Nov 2026 20:53:01 -0800 Subject: [PATCH 2/2] quest: delete the watcher host quest, live for moq-dev/moq kixelated/nixos#16 runs quest land watch for moq-dev/moq as its own user, with moq-bot's key and the shared fixer launcher; it has re-enqueued dropped PRs since 2026-11-02. Co-Authored-By: Claude Opus 5.5 --- quest/m0/host-land/host.md | 6 ++-- quest/m0/queue-watcher/README.md | 1 - quest/m0/queue-watcher/host.md | 55 ------------------------------- quest/m0/queue-watcher/runners.md | 2 +- 4 files changed, 5 insertions(+), 59 deletions(-) delete mode 100644 quest/m0/queue-watcher/host.md diff --git a/quest/m0/host-land/host.md b/quest/m0/host-land/host.md index c5343c18..4edc7dc7 100644 --- a/quest/m0/host-land/host.md +++ b/quest/m0/host-land/host.md @@ -112,5 +112,7 @@ Amended 2026-11-01 (maintainer, /quest-plan; see the except fixes the switch needs. The `QUEST_GATE_PRIORITY=1` export in the generated check command (planned 2026-10-31) is dropped with it. The items above stay, since the fixer container and its launcher serve the watcher too, -and the gate keeps serving the repositories not yet switched. The watcher's -own unit is [Watcher on the host](/quest/m0/queue-watcher/host.md). +and the gate keeps serving the repositories not yet switched. The watcher +runs from the same module as each repository's daemon in watch mode +(`services.quest-land.repositories..watch`), live for moq-dev/moq +since 2026-11-02. diff --git a/quest/m0/queue-watcher/README.md b/quest/m0/queue-watcher/README.md index 722adc41..ffc23d75 100644 --- a/quest/m0/queue-watcher/README.md +++ b/quest/m0/queue-watcher/README.md @@ -132,7 +132,6 @@ Shared shape, for the children to follow: - [Bad picks](/quest/m0/queue-watcher/bad-picks.md) - a pick whose auto-merge is armed on a ready PR GitHub never queued is enqueued at the head it was armed on - [Flaky failures](/quest/m0/queue-watcher/flaky.md) - a flaky failure is re-enqueued unchanged, and a test seen flaking twice is disabled in a separate PR with a follow-up quest -- [Watcher on the host](/quest/m0/queue-watcher/host.md) - kixelated/nixos runs the watcher for moq-dev/moq beside its fixer container - [The other repositories follow](/quest/m0/queue-watcher/follow.md) - condition: quest, rind and rust2 are cut over; rind and rust2 each land a PR, and a fork PR lands - [Harden the queue runners](/quest/m0/queue-watcher/runners.md) - each queue runner runs only its repository's queue workflow, and every outside fork PR needs approval - [Retire the batching gate](/quest/m0/queue-watcher/retire.md) - once no repository lands through `quest land serve`, its batching code and host units go diff --git a/quest/m0/queue-watcher/host.md b/quest/m0/queue-watcher/host.md deleted file mode 100644 index 75d4a932..00000000 --- a/quest/m0/queue-watcher/host.md +++ /dev/null @@ -1,55 +0,0 @@ -# [S] The host runs the queue watcher for moq-dev/moq - -## Goal - -The maintainer's NixOS host runs the queue watcher for moq-dev/moq from -[kixelated/nixos](https://github.com/kixelated/nixos), as its own unprivileged -user under a hardened systemd unit like `quest-land.service`, with moq-bot's -key through `LoadCredential` and the same `qland-fix` fixer container and -launcher. Check it by watching it re-enqueue a PR the queue dropped. - -## Plan - -Decided 2026-11-01 (maintainer, /quest-plan; see the -[epic](/quest/m0/queue-watcher/README.md)): the watcher runs on the host, and -`merge_group` builds run on its self-hosted runner `moq-ci` (label -`moq-queue`, `modules/ci-runners.nix`). - -- Add a watcher instance for moq to the quest-land module, and pin a quest - with the watcher. -- The `quest land serve` instance for moq is disabled at moq's cutover - (`services.quest-land.repositories.moq.enable = false`), which moq's - [land quest](https://github.com/moq-dev/moq/blob/main/quest/m0/ci/land.md) - owns; the fixer container keeps serving the watcher. -- moq-bot may need `actions: read` on moq-dev/moq for the `merge_group` logs; - the maintainer accepts any new installation permission. -- The runner's own setup and the `merge_group` workflow are moq's switch, - not this quest. - -The watcher command, from -[moq-dev/quest#389](https://github.com/moq-dev/quest/pull/389), run as the -same user and with the same state directory as moq's `quest land serve` -instance, and with `quest` and `flock` on PATH as for it, since the watcher -merges conflicts with the quest merge driver in the same private repository: - -```sh -quest land watch --app-id 1039466 --fixer -``` - -The fixer launcher client is the one `serve --fixer` uses, reaching -`/run/quest-land-fixer.sock` with the failure log and the PR's number. The -watcher needs no check sandbox: the `merge_group` builds run on GitHub's side. -`--fixer-jobs` (default 2) caps the watcher's own fixer jobs below the -launcher's shared slots, and `--fixer-effort` (default `medium`) sets -`QUEST_LAND_FIXER_EFFORT` in the wrapper's environment. The launcher passes -only the log and the PR numbers into the container, where `quest land fix` -defaults to `medium`, so a non-default effort needs the launcher to forward -that variable as `quest land fix --effort`. With a fixer, the watcher's -installation token asks for `merge_queues: write` (re-enqueueing, granted to -moq-bot on 2026-11-02), `contents: write` (arming auto-merge and pushing -fixes), `pull_requests: write`, and `actions: read`, and a push that carries a -workflow change asks for `workflows: write`. - -## Related - -- [Gate host](/quest/m0/host-land/host.md) - the units and fixer container this reuses diff --git a/quest/m0/queue-watcher/runners.md b/quest/m0/queue-watcher/runners.md index 1b19950f..3d36b63d 100644 --- a/quest/m0/queue-watcher/runners.md +++ b/quest/m0/queue-watcher/runners.md @@ -38,4 +38,4 @@ items, m0, ranked right after the [cutover](/quest/m0/queue-watcher/follow.md). ## Related -- [Watcher on the host](/quest/m0/queue-watcher/host.md) - the host module these runners and daemons share +- [Gate host](/quest/m0/host-land/host.md) - the host module these runners and daemons share