Schedule Release Evidence Around Merge-Queue Contention
Compare immediate dispatch, final-window starts, and waiting to decide when speculative release checks earn their runner time in a busy merge queue.
A successor can finish its checks early and still delay the branch’s first update. When it takes the only specialist runner, its earlier landing comes at the expense of the queue head.
Which clock did the scheduler improve?
In a ZP11 merge queue, record when the candidate’s Proof-Pack, its bundle of required release evidence, becomes complete. Record gate admission and the branch update separately. Unresolved predecessors can hold up admission. If the branch tip moves after admission, the candidate can lose its chance to land. Charge runner time to the attempt that consumed it, even when the queue immediately rebuilds the same change.
When a head check becomes runnable, record who holds its eligible slots. A successor can hold one through teardown even after its pack is ready. Reclaiming that slot earlier buys no time if the head is still waiting for an input. Aggregate utilization hides both cases when a check needs a specific device or network attachment.
Buy the last interval of overlap
In this fictional schedule, predecessors run serially, take ten minutes apiece, and land as soon as they pass. Each independently passes with 80% probability. Any failure retires the prefix, the ordered changes built into the candidate. At depth d, the prefix has d unresolved predecessors and survives with probability 0.8^d. The queue has already materialized the exact candidate for that prefix. Its ten-minute task runs on a separate worker and always passes. Pack assembly, admission, and branch updates take zero elapsed time.
Immediate dispatch runs from minute zero to minute ten. At positive depth, a final-window start runs from minute 10(d − 1) to minute 10d, after the first d − 1 predecessors land. At depth one, both start at minute zero. Waiting runs from minute 10d to minute 10(d + 1). Either overlapping start lands the candidate ten minutes earlier, at minute 10d, if the prefix survives. When events share a timestamp, the gate admits the candidate after the final predecessor lands and the candidate’s pack is ready.
The worker costs one runner-minute equivalent per minute and displaces no other work. Once started, a task consumes all ten minutes even if its prefix retires. The model gives its result no reuse value after retirement. Immediate dispatch incurs discard on any prefix failure. A final-window start incurs discard only if the last predecessor fails after all earlier ones pass. All policies pay for the same task on surviving prefixes.
| Depth | Gain if the prefix survives (minutes) | Expected gain vs. waiting (minutes) | Expected discard, immediate (runner-minutes) | Expected discard, final window (runner-minutes) | Immediate break-even v |
|---|---|---|---|---|---|
| 1 | 10 | 8 | 2 | 2 | 0.25 |
| 2 | 10 | 6.4 | 3.6 | 1.6 | 0.56 |
| 3 | 10 | 5.12 | 4.88 | 1.28 | 0.95 |
| 4 | 10 | 4.096 | 5.904 | 1.024 | 1.44 |
The break-even column rounds to two decimal places.
Let v be the value of one minute saved at landing in runner-minute equivalents. Either overlapping start gains 10 × 0.8^d minutes in expectation. Immediate dispatch discards 10 × (1 − 0.8^d) runner-minutes in expectation. Dividing expected cost by expected gain gives a break-even v of 1.25^d − 1. At v = 1, immediate dispatch beats waiting through depth three. Depth four is the first at which its expected discard costs more than the earlier landing is worth.
A final-window start discards 2 × 0.8^(d − 1) runner-minutes in expectation. Its break-even v stays at 0.25 because both the expected benefit and expected discard scale with the chance that the earlier predecessors pass. At v = 1 it beats waiting at every positive depth. With the slot available at no extra cost, it ties immediate dispatch at depth one and beats it at every greater depth.
Figure 1 — At depth four, immediate dispatch spends 5.904 runner-minute equivalents on expected discard for a landing benefit worth 4.096. Starting in the final window preserves that benefit and cuts expected discard to 1.024. Illustrative prefix model — not measured data.
At depth three, a final-window start saves 3.6 expected runner-minutes over immediate dispatch. That saving caps the premium for reserving the later slot up front. Once the first two predecessors land, compare the slot cost with the benefit and risk conditional on those passes.
Subtract the remaining task and pack assembly time on the admission path from the forecast of the final predecessor’s landing. A longer task can push the latest start across earlier decisions, exposing it to more unresolved predecessors. When that start has passed, price the partial overlap still available.
Shared failures change the price of waiting
In a fictional variant, a shared service stays in one state throughout the sequence. It starts healthy with 80% probability. Every predecessor passes when the service is healthy. The first decision retires the prefix when the service is down. At every positive depth, immediate dispatch earns an expected eight runner-minute equivalents at v = 1 and wastes an expected two runner-minutes. A pass reveals that the entire prefix will survive in this model. At depth two or greater, that first pass arrives by the latest start, so the final-window policy keeps the full expected landing benefit and discards no work. At depth one, it must start before seeing the pass and still ties immediate dispatch. When a real service can change state between calls, estimate the chance that it stays healthy through the remaining checks. A verdict that proves health for one request cannot establish survival for the rest of the prefix.
Two candidates, one specialist slot
In a fictional contention schedule, the queue materializes the successor at minute 8. Its check needs ten uninterrupted minutes on a specialist runner. The head becomes ready for two minutes on that runner class at minute 10. The separate layout adds a runner for the successor. The shared layout has one runner. Both candidates pass and the successor’s evidence stays applicable after the head lands. Check durations include setup and cleanup. Pack assembly, admission, and branch updates take zero elapsed time, with events at the same timestamp processed in dependency order.
Under waiting, the head gets the specialist at minute 10 and lands at minute 12. The successor starts after that update at minute 12. The successor’s pack is ready at minute 22, and the successor lands at minute 22 on either layout.
An immediate start at minute 8 makes the successor’s pack ready at minute 18 on either layout. With separate runners, the head lands at minute 12 and the successor at minute 18. On the shared runner, the successor’s check releases the slot at minute 18. The head then runs for two minutes and lands at minute 20. The successor lands after the head’s update, also at minute 20.
Figure 2 — Waiting puts the two branch updates at minutes 12 and 22. Immediate dispatch on separate runners moves the second update to minute 18. On the shared runner, the head and successor land in order at minute 20. Illustrative landing times — not measured data.
In the fictional shared-runner schedule, allow either check to fail while keeping the same run times. The head reports its verdict after two minutes of specialist work and either lands or retires the prefix. When the head passes, both policies spend ten runner-minutes on the successor’s check regardless of its verdict. When the head fails, waiting skips the check. With immediate dispatch the successor has already consumed ten runner-minutes, and this model assigns its result zero reuse value.
Let p be the probability that the head passes and q the probability that the successor passes given that the head passes. Use the same probabilities under both policies. In runner-minute equivalents, h prices each minute of head decision delay, including its effect on recovery, r prices each discarded runner-minute, and v prices each minute saved on the successor’s landing. If earlier discovery of a successor failure carries no separate value, immediate dispatch pays when
2 × p × q × v > 8 × h + (1 − p) × 10 × r
The two-minute landing gain requires both candidates to pass. On the shared runner, immediate dispatch shifts the head’s verdict from minute 12 to minute 20 regardless of outcome. Only a head failure makes the successor’s work a speculative cost that waiting would have avoided.
With separate runners the head reports at minute 12 and the successor gains four minutes when both pass. If the successor still runs for ten minutes after starting at minute 8 regardless of the head’s verdict, immediate dispatch pays when 4 × p × q × v > (1 − p) × 10 × r + c. Here c prices incremental capacity beyond the execution cost already counted. A free spare slot gives c = 0. If cancellation reclaims the slot sooner, price the failure branch through actual release.
At p = 0.8, q = 1 and v = h = r = 1, the expected landing gain is worth 1.6 runner-minute equivalents. Delaying the head always costs eight runner-minute equivalents. Retired work costs two runner-minute equivalents in expectation. Holding the probabilities and costs fixed, v must exceed 6.25 for immediate dispatch to pay. A job starting at minute 8 can fit ahead of the head only if it releases the slot within two minutes, including cleanup. Reserving by nominal check duration can delay the head even when the check itself fits.
A cancellation timeout starts recovery
Advance the queue generation when a prefix retires and enforce it at the branch write. Keep the canceled job’s slot out of rotation until the executor or lease authority confirms the release of its exclusive resources. A cancellation acknowledgment confirms release only if the executor guarantees that it acknowledges after releasing those resources. See how the gate enforces generation checks.
Log the cancellation time, executor, attempt ID and lease ID. Set the escalation deadline using the runner class’s observed cancel-to-release tail and the head’s wait budget. At the deadline, check executor and lease state. A lost acknowledgment need not block reuse once both confirm teardown. If the executor goes silent or the lease persists, quarantine the slot and route eligible work elsewhere. Report the head as blocked if no substitute exists. Restore capacity after ending or isolating the old attempt and verifying safe reassignment. Match release events to attempt and lease IDs so stale acknowledgments cannot free a reassigned slot.
While teardown runs, check the replacement’s required ZP11 zones, the gate’s evidence categories. Reuse a receipt, a machine-verifiable record of a check and its subject, only where it still applies under the active policy. Dispatch checks for uncovered zones. Reuse can keep the replacement off the quarantined runner.
Replay the decisions each policy could observe
Hold arrivals and inventory fixed across dispatch policies within each layout. Reveal failures at the replayed report time to avoid handing late starters historical verdicts early. Vary unobserved outcomes for canceled checks. Replay a shared service-state timeline so dispatch timing can change which state a check encounters.
Measure the head’s decision time, both branch update times, and retirement-to-release latency by runner class. Keep trials without a second landing visible through the observation horizon. Dropping them can make a policy that strands successors look fast. Attribute runnable head wait to the jobs occupying eligible slots so savings on abundant workers cannot hide a specialist bottleneck.
Work backward from the projected final predecessor landing to find the latest start that preserves the overlap. At dispatch, update the survival estimate using the verdicts already available and price the slot through confirmed release. Start the successor early when the expected value of its earlier landing covers the head’s decision delay, the work a prefix failure would strand, and any premium for extra capacity.