Repository navigation
quest: plan judging checks by their latest run on the head - #422
Conversation
quest status, quest wait, and the quest land gate count every check run on a head, so a run that a newer run of the same check replaced still fails them although GitHub merges the head (moq-dev/moq#7325). Plan the fix in m1 and split it from the m0 landing-status quest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The quest land gate fails a check name if any run with that name failed (since #229), so it can wrongly refuse release-plz PRs that GitHub would merge. Maintainer decision 2026-11-02: land work, m0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
WalkthroughThe m0 planning documents now focus on stale Merge Risk:
|
…nding Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main split the check-run half of this quest into quest/m0/latest-check-runs.md (#422). Keep that quest, delete status-landing.md, which this PR completes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Complete quest/m0/latest-check-runs.md, which main split from this PR's quest in #422, and delete it. - Move the latest-run filter to src/github/checks.ts, shared by the CLI and the Worker, and key commit statuses by context and newest createdAt. - quest status derives its checks state from the latest runs instead of the rollup state, which counts superseded runs. - The Worker's job context lists only the latest runs, with a state derived from them. - Regression tests shaped after moq-dev/moq#7325 for status, wait, the land gate, and the Worker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
Plans Checks are judged by their latest run in m0, ranked just above Current landing status among the land quests.
quest status,quest wait, and thequest landgate count every check run on a head. When a newer run of a check replaces an older one, the older run still fails them, even though GitHub merges the head. Example: moq-dev/moq#7325, where a cancelledRelease gaterun sat beside a passing one on the same head. The quest records what was read on that head:stateisFAILUREfilter=latestdedupes only within a check suitegh pr checkskeeps the newest run per name, workflow, and eventIt also names every place that judges checks:
status.ts,wait.ts, the gate'schecksinland.ts, and the Worker'sreadTarget.Decisions
quest landgate fails a check name if any run with that name failed. So it can wrongly refuse release-plz PRs that GitHub would merge, which makes this land work. The file moved fromquest/m1/toquest/m0/latest-check-runs.md. Both milestone READMEs'Requiredlists, the cross-link inquest/m0/status-landing.md, and the quest's Plan are updated to match.Choices made while planning
landing-stoppedhalf. The two halves can be completed separately, and both stay in m0.quest status.land.tsdeliberately fails a name if any of its reports fails (from moq-dev/quest#229). That makes the gate reject heads that GitHub merges, so the plan reverses that rule.databaseId). Thechecksstate comes from those latest runs, not from the rollup'sstate.gh pr checks' key was rejected because its list can disagree with mergeability.[S]. It's one shared helper insrc/github/, used in four places, plus regression fixtures recorded from #7325.Validation
quest checkandquest check --base origin/main: 90 documents oknix develop -c just check: passedjust testnot run, since this PR only changes the quest treeCodeRabbit findings (fixed in
c4d08d6)status-landing.md: its Goal now says re-queueing clears the stale reason, soquest statusprintslanding-stopped -. That keepsstatusLines' output contract instead of dropping the line.latest-check-runs.mdGoal: it now claims to match the merge state GitHub reported on #7325, not a documented GitHub rule.latest-check-runs.mdPlan: it now lists the fields each producer must fetch (CheckRun.databaseId, the check suite's appdatabaseId, statuscreatedAt), notes which of status, wait, land, and the Worker lack them, and gives statuses a tie-breaker.Review
Round 2 (session
01a19f5d):quest review --base origin/main, reviewer Codexgpt-6.1-solat medium effort, headc4d08d6d1466b07f8456bf3ae061f567d0e55cd2against base91058d2. It reported no findings. Round 1, ond53b720, also had none.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code