fix(ci): use shared runner state until admission waits

Merged
TE
5d ago
+75-10

Two admission paths need the runner document until they actually wait. Fast-checks repeatedly reuses its fixed workflow document after sleeping, hiding runners becoming idle. The nightly builder does the opposite after #31891: its second reader call goes live even when the dedicated-builder check returned immediately and the owned route has not slept.

Fast-checks now reads live after its first existing wait, retaining the shared 180-second deadline and injected-reader contract. The builder switches to live only after its existing dedicated admission sleep completes, so immediate dedicated/owned/helper checks continue to use a fresh valid document. No wait or timer is added. Follow-up to #31834 and #31891; prior art read: #30529, #30648 and #31889. Their fleet admission, credential scope and overflow remain in place.

Performance

metricbeforeafterdeltaharness or run link
routing-App runner-list requests/h at 1000 builder picks/h, dedicated offline and owned idle with no sleep30000-3000 (-100%)same 1000-invocation main() harness at 032ad6a2cce7 and this head, one visible approved group
routing-App runner-list requests/h at 1000 busy fast-checks waits/h, runner idle at first recheck04000+4000, intentional live rechecksame busy-document/live-idle choose() regression, two visible approved groups with one-page lists
fast-checks placement when capacity becomes idle at first recheckoverflow at 180 sfleet at 15 srestores fleet placementtest_busy_document_is_rechecked_live_after_waiting

These fixture rates do not claim aggregate installation traffic. No current workflow in this checkout invokes the fast-checks source script, so that repair has no measured live traffic delta. Existing wait deadlines and cleanup remain. No compilation or cache behavior changes.

Observed / Not run

All 60 nightly builder and 14 fast-checks picker tests pass, including shared-deadline and byte-dripping response/artifact timeout coverage. The no-wait builder regression fails at 032ad6a2cce7 with three runner API requests and passes at this head with zero; the busy-builder regression also asserts no org runner-list calls before sleeping. The fast-checks regression fails at test-only 2ba469dbaa6c and passes with its fix. git diff --check and the pre-push gate pass. No application build is needed for these picker reads.

Changelog

none

Agent session: agent session