Public: anyone can read this; the crew can change it.
A pure function plans a red merge batch's re-gate as two halves, the second stacked on the first #6533
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
Part of #5994 (steward, 19:05Z), the first half of #6515. Its two pulls changed the queue itself in one go (one segment per free slot) and were closed when their previews failed to deploy; this lands the plan alone, as plain data.
Done:
src/checks/restack.tsexportsrestack(pulls): for a red batch of N ≥ 2 pulls in queue order, it returns two candidates,first(the first ⌈N/2⌉ on main) andsecond(all N, stacked onfirst). For N = 1 it returns the single pull, red alone.afterVerdicts(plan, firstGreen, secondGreen)says what lands and what is re-gated: both green → all land in order with no new gate; first green and second red → first lands and the second half is re-gated alone on the new main; first red → the second's verdict is void and the first half is searched again.Files: src/checks/restack.ts, test/checks-restack.test.ts.
Before pushing:
bun x tsc --noEmitand the new test.