diff --git a/quest/m0/land-fixer/README.md b/quest/m0/land-fixer/README.md index 8f8e96a7..2b605689 100644 --- a/quest/m0/land-fixer/README.md +++ b/quest/m0/land-fixer/README.md @@ -102,6 +102,8 @@ resolves itself and what it hands back; that docs update finishes the epic. - [Fixer comments](/quest/m0/land-fixer/comments.md) - a per-job, comment-only GitHub token lets the fixer explain its work on the PRs - [Attempt budget](/quest/m0/land-fixer/attempts.md) - only a fix that fails again spends a pick's single attempt - [Batch triage](/quest/m0/land-fixer/triage.md) - the fixer blames the failing PR before ejection, and a red base halts the queue +- [CI failures park](/quest/m0/land-fixer/ci-park.md) - a PR whose own required CI fails is parked for the fixer with the failing log, not ejected +- [Queue status in the required check](/quest/m0/land-fixer/check-status.md) - the gate shows each PR's queue state in its required check run, never completing it - [Flaky tests](/quest/m0/land-fixer/flaky.md) - the gate reruns a failed module, disables a flaky test on the batch's base PR, and files a follow-up - [Local mergeability](/quest/m0/land-fixer/mergeability.md) - `quest land` merges with the quest driver instead of ejecting on GitHub's conflict flag - [Protected edits](/quest/m0/land-fixer/protected.md) - the fixer edits protected paths when it judges the edit mechanical, and the fix lands diff --git a/quest/m0/land-fixer/check-status.md b/quest/m0/land-fixer/check-status.md new file mode 100644 index 00000000..07944d33 --- /dev/null +++ b/quest/m0/land-fixer/check-status.md @@ -0,0 +1,38 @@ +# [S] The gate shows queue status in its required check + +## Goal + +Each queued PR's required `quest land` check run shows where the PR stands: +queued at a position, waiting on named checks, in a batch, parked for the +fixer, or behind a halted queue. The gate only ever sets that check to queued +or in progress. It never marks it completed, so GitHub's auto-merge can never +fire around the gate. + +## Plan + +Decided 2026-11-01 (user, settling +[moq-dev/quest#355](https://github.com/moq-dev/quest/pull/355)'s decision 7, +[record](https://github.com/moq-dev/quest/pull/355#issuecomment-6561562421)): +"Comment once, but should plan using the require Github check for status? If +possible?" Triage posts the one comment; this quest is the check-run part. + +It is possible. The App already owns the required `quest land` check name; +the rulesets require it, and nothing reports it today. The App can create a +check run with that name on each queued PR's head and update its `status` +(`queued` / `in_progress`) and `output.title` and `output.summary`. While no +conclusion is ever set, the required check stays unsatisfied. The gate keeps +landing through its own push or the pinned squash merge, as now. + +- One check run per pinned head, updated in place; a new head gets a new run. +- Never set `conclusion`: a `success` would let auto-merge land the PR + without the gate, and any other conclusion would read as a failure. +- Needs the App's `checks: write`, an installation permission the maintainer + accepts. Check it during this work; it may already be granted for the + existing check. +- [Fixer comments](/quest/m0/land-fixer/comments.md) explain decisions on + the PR; the check run shows state only. + +## Related + +- [A PR whose own CI fails is parked](/quest/m0/land-fixer/ci-park.md) - one of the states shown +- [Batch triage](/quest/m0/land-fixer/triage.md) - the parked, waiting, and halted states diff --git a/quest/m0/land-fixer/ci-park.md b/quest/m0/land-fixer/ci-park.md new file mode 100644 index 00000000..7e1e4687 --- /dev/null +++ b/quest/m0/land-fixer/ci-park.md @@ -0,0 +1,34 @@ +# [S] A PR whose own CI fails is parked for the fixer + +## Goal + +A queued PR whose required GitHub checks fail is not ejected. The gate +fetches the failing checks' logs, parks the PR, and starts a fixer job with +those logs, the same way it handles a failing batch. The PR leaves the queue +only if the fixer hands it back. + +## Plan + +Decided 2026-11-01 (user, settling +[moq-dev/quest#355](https://github.com/moq-dev/quest/pull/355)'s decision 8, +[record](https://github.com/moq-dev/quest/pull/355#issuecomment-6561562421)): + +- A PR whose own required GitHub CI fails: + - ✅ Park it with the failing check's log for the fixer + - Keep ejecting it at once + +It builds on the parking mechanism from [Batch triage](/quest/m0/land-fixer/triage.md) +(`src/cli/land-park.ts`, and `fail(...)` in `src/cli/land-serve.ts`). Fetch +each failing check run's log through the App's `checks: read` and +`actions: read`, and trim it the way the batch failure excerpt is trimmed. A +fix the fixer pushes reruns the PR's CI. The PR rejoins batches once its +required checks pass, as with +[triage](/quest/m0/land-fixer/triage.md)'s `checks_pending` rule. + +## Required + +- [Batch triage](/quest/m0/land-fixer/triage.md) - provides the parking mechanism + +## Related + +- [Queue status in the required check](/quest/m0/land-fixer/check-status.md) - shows the PR's parked state