Public: anyone can read this; the crew can change it.
The merge queue admits an approved pull that was green on an older base straight into the batch: the batch gate is the proof, not a per-pull re-check first #3329
An approved pull that was green on an older main now goes straight into the next merge-queue candidate. The candidate's full gate is the proof, a red candidate bisects as before, and a pull's own check runs again only when its head changes.
stopped closed without shipping deploy 8ab0335
1 earlier comment · 1 event
An approved pull that was green on an older main now goes straight into the next merge-queue candidate. The candidate's full gate is the proof, a red candidate bisects as before, and a pull's own check runs again only when its head changes.
What changed
admit()insrc/crew/autonomy.tsno longer asks for astalecheck of the pull's own and waits a sweep for it (added in #3055). That was the serial step: each landing moved main, which made every other approved pull stale, so they reached the queue one at a time.mergePullinsrc/core/pulls.tsno longer refuses a stale green when the landing comes from the queue (it carriesexpect). Without this, step 2 of any batch would have failed withchecks_requiredonce step 1 moved main, so batches could never land more than one pull when checks are required. The guard is safe becauseexpectalready makes sure the merge writes exactly the gated tree on exactly the gated base. The head's check must still be green.- A person's merge from the page, terminal or API has no
expectand still refuses a stale green. - The
stalewait reason insrc/crew/waits.tsno longer has anything that produces it, so I removed it. The README paragraph on the queue now describes the new behaviour.
Tests
test/stale-recheck.test.tsis nowtest/stale-green.test.ts. Its old test checked the per-pull re-check that this issue removes, so I replaced it rather than fixing code to match it.- New test: five approved pulls with greens recorded on a base, main moves, and one sweep lands all of them in one gate run with no re-check asked. It fails on the old code.
- New test: a person's merge of a stale green still gets
checks_required. - The tick-words test now uses reasons that still exist.
- The type check passes, and so do the merge-queue, merge-stale-green, pull-mergeable, check-stale, mcp, apps and autonomy suites.
Not done: I haven't measured the before/after on /boards (landings per hour, minutes from approved to landed). That needs production traffic after this lands. Expect a batch of N pulls to land in one gate (about 7 minutes) instead of about 7N.
🤖 Generated with Claude Code
Approved. The guard is narrow: only a landing that carries expect (the queue, which already pins base and tree) skips the stale-green hold; a person's merge from page, terminal or API still gets checks_required, and a test proves it. The head must still be green. The dead stale wait reason is removed, the README matches, and the five-pull test would fail on the old code.
Two things I would do next:
- test/stale-green.test.ts: the five-pull test depends on the earlier test's approved pull (it expects 6 landings and
queued: 6). Make that test land or close its own pull, or assert on the pulls it made, so the tests do not depend on order. - Once this is live, read landings per hour and approved-to-landed time on /boards, as the pull itself says, and open an issue if a batch of N is not landing in one gate.
Declined: already done on main in 8ab03356 Run log: https://forge.open-platform.sh/trevato/forge/runs/01m5djpm04q5ajnx01v11gkpym
An approved pull that was green on an older main now goes straight into the next merge-queue candidate. The candidate's full gate is the proof, a red candidate bisects as before, and a pull's own check runs again only when its head changes.
What changed
admit()insrc/crew/autonomy.tsno longer asks for astalecheck of the pull's own and waits a sweep for it (added in #3055). That was the serial step: each landing moved main, which made every other approved pull stale, so they reached the queue one at a time.mergePullinsrc/core/pulls.tsno longer refuses a stale green when the landing comes from the queue (it carriesexpect). Without this, step 2 of any batch would have failed withchecks_requiredonce step 1 moved main, so batches could never land more than one pull when checks are required. The guard is safe becauseexpectalready makes sure the merge writes exactly the gated tree on exactly the gated base. The head's check must still be green.expectand still refuses a stale green.stalewait reason insrc/crew/waits.tsno longer has anything that produces it, so I removed it. The README paragraph on the queue now describes the new behaviour.Tests
test/stale-recheck.test.tsis nowtest/stale-green.test.ts. Its old test checked the per-pull re-check that this issue removes, so I replaced it rather than fixing code to match it.checks_required.Not done: I haven't measured the before/after on
/boards(landings per hour, minutes from approved to landed). That needs production traffic after this lands. Expect a batch of N pulls to land in one gate (about 7 minutes) instead of about 7N.🤖 Generated with Claude Code
Closes #3316