Skip to content

Pilot a receipt-safe delegated check route to cut local slot wait #1734

Not planned

Description

@eowca

On 20 Loop-zero PRs sampled throughout the 24 hours ending 26 Nov 08:50 UTC, median last approval → first Mergify admission was 11.2 min. Median to the admission that landed was 13.6 min. The median final queue residence was 7.6 min.

Largest recurring actionable delay: a receipt-producing check waiting for a local heavy slot. For #1212, #1568 and #1614, after approval and source CI were both green, the first passing check on the final head still waited 13.9, 5.5 and 22.8 min respectively before it started. These are non-overlapping minutes before first admission. No earlier passing heavy-slot run at that head/recipe was found for these three. During their full local-ticket waits, danio-3 started 7, 6 and 10 other Loop-zero checks that finished successfully, respectively. This establishes that the remote route was doing work during those windows. It does not establish that these check stages were admitted remotely or that the time is fully recoverable.

The last passing proof took a median 6.8 min to admit on miki (13 jobs) and 0.1 min on danio-3 (7 jobs). The host split is observational and subject to routing and time-of-day differences. After the last observed local proof, hosted check, approval, and draft event, the median gap to successful admission was 0.47 min. #763 had a 34.8 min gap without enough local evidence to attribute it. Earlier failed queue attempts on #885 and #1568 are separated from first admission. Three same-head, same-base, same-command repeat passes (marked †) are outside the fix proposed here (#1526). Fetch ordering on an invalid receipt is also outside scope (#1405).

Smallest next change

Pilot one receipt-producing Loop-zero check with the existing operator-trusted [checks].runner stage protocol and danio-3 heavy-slot capacity. Keep the coordinator in the task worktree so that it writes the receipt which the normal readiness command validates. #1280 documented this route; the pilot is to make it operational and measure it. Work with the heavy-slot operator on the worker adapter and admission so the coordinator does not also reserve an execution slot while waiting on remotely slotted stages. The unconfigured default path can continue to run locally.

Acceptance

  • On one representative clean, exact-head change, show stage start/end and host admission wait, a coordinator-produced passing receipt, and normal loopzero ready accepting that receipt under the same trusted settings. Verify that hosted eligibility remains separate.
  • Compare the observed admission wait against the matched local baseline above. Record remote capacity, refusal or fallback if it occurs. If the adapter does not reduce the wait, retain the current route.
  • Use the existing runner interface, sandbox policy and receipt checks. Add no gate, flag or state.

Stage table

Twenty evenly spaced main commits with PR numbers out of 272 during the window. Times are UTC on Nov 25 or 26 (day of month shown). REST sources were each PR, its timeline, and check runs/statuses for the PR's final head. The Mergify bot's payload gives queue entry. Matched heavy-slot records give submit/start/end for the final passing exact-head proof. Its finish is a receipt-production proxy, since the receipt file usually disappears at merge. The #1614 ready and merge transcripts separately confirm the CLI accepted the receipt at that head. “Marked ready” is the latest draft transition before the successful entry, not the exact time a local ready invocation returned. It may precede approval or follow the first attempt. Hosted checks and slot wait overlap. “Exposed slot” counts only the wait after both approval and source checks were green, clipped at first entry. † marks potential duplicate proofs excluded from the recommendation.

PR Approval Local submit → start → pass Host / slot min Source checks start → green / Eligibility green Marked ready First request → entry Approval → first / landed entry (min) Exposed slot (min)
#591 25 18:14:18 25 18:06:22 → 25 18:06:26 → 25 18:13:18 danio-3 / 0.1 25 18:13:45 → 25 18:17:09 / 25 18:18:43 25 18:18:26 25 18:19:04 → 25 18:19:19 5.0 / 5.0 0.0
#632 25 18:41:13 25 18:41:55 → 25 18:49:58 → 25 18:53:48 local / 8.1 † 25 18:40:47 → 25 18:44:07 / 25 18:54:21 25 18:54:00 25 18:54:29 → 25 18:54:44 13.5 / 13.5 5.9
#701 25 19:16:25 25 19:10:08 → 25 19:16:54 → 25 19:20:20 local / 6.8 25 19:16:10 → 25 19:19:17 / 25 19:21:00 25 19:20:31 25 19:20:59 → 25 19:21:08 4.7 / 4.7 0.0
#738 25 19:32:38 25 19:27:35 → 25 19:27:39 → 25 19:31:51 danio-3 / 0.1 25 19:32:18 → 25 19:35:22 / 25 19:37:10 25 19:36:38 25 19:37:02 → 25 19:37:21 4.7 / 4.7 0.0
#732 25 19:33:38 25 19:49:29 → 25 19:50:38 → 25 19:54:22 local / 1.1 25 19:49:35 → 25 19:52:51 / 25 20:03:47 25 20:03:28 25 20:04:27 → 25 20:04:35 31.0 / 31.0 0.0
#763 25 19:41:56 25 19:35:46 → 25 19:35:51 → 25 19:40:07 danio-3 / 0.1 25 19:41:09 → 25 19:44:38 / 25 19:47:10 25 19:46:43 25 20:21:46 → 25 20:21:58 40.0 / 40.0 0.0
#883 25 21:04:03 25 20:46:12 → 25 20:47:01 → 25 20:50:11 local / 0.8 25 21:09:09 → 25 21:12:02 / 25 21:12:51 25 21:12:23 25 21:12:50 → 25 21:12:59 8.9 / 8.9 0.0
#885 25 21:04:22 25 20:50:47 → 25 20:50:48 → 25 20:55:07 local / 0.0 25 21:03:48 → 25 21:06:39 / 25 21:09:00 25 21:08:35 25 21:08:57 → 25 21:09:05 4.7 / 42.5 0.0
#974 25 22:21:29 25 22:20:57 → 25 22:26:16 → 25 22:34:20 danio-3 / 5.3 25 22:20:57 → 25 22:24:42 / 25 22:34:54 25 22:34:34 25 22:34:58 → 25 22:35:04 13.6 / 13.6 1.6
#960 25 22:19:08 25 22:43:00 → 25 22:48:17 → 25 22:52:12 local / 5.3 25 22:52:31 → 25 22:55:27 / 25 22:56:48 25 22:56:27 25 22:57:37 → 25 22:57:49 38.7 / 38.7 0.0
#1062 25 23:09:45 25 23:09:00 → 25 23:09:19 → 25 23:17:12 danio-3 / 0.3 25 23:08:57 → 25 23:12:28 / 25 23:17:46 25 23:17:27 25 23:18:09 → 25 23:18:17 8.5 / 8.5 0.0
#1147 25 23:46:22 25 23:45:49 → 25 23:50:41 → 25 23:54:02 local / 4.9 25 23:45:38 → 25 23:48:53 / 25 23:54:48 25 23:54:30 25 23:55:05 → 25 23:55:17 8.9 / 8.9 1.8
#1201 26 00:11:53 26 00:13:48 → 26 00:31:40 → 26 00:35:15 local / 17.9 † 26 00:11:16 → 26 00:14:36 / 26 00:36:42 26 00:36:23 26 00:37:51 → 26 00:37:57 26.1 / 26.1 17.1
#1212 26 01:10:15 26 01:09:42 → 26 01:28:10 → 26 01:32:32 local / 18.5 26 01:09:39 → 26 01:14:15 / 26 01:10:46 26 00:34:12 26 01:32:51 → 26 01:32:58 22.7 / 22.7 13.9
#1394 26 02:27:17 26 02:18:20 → 26 02:18:27 → 26 02:26:05 danio-3 / 0.1 26 02:26:46 → 26 02:30:55 / 26 02:27:46 26 02:32:36 26 02:32:40 → 26 02:32:46 5.5 / 5.5 0.0
#1461 26 03:10:29 26 03:09:25 → 26 03:09:31 → 26 03:16:05 danio-3 / 0.1 26 03:10:01 → 26 03:13:53 / 26 03:11:05 26 03:16:36 26 03:16:39 → 26 03:16:44 6.3 / 6.3 0.0
#1507 26 03:40:17 26 06:51:59 → 26 06:52:53 → 26 06:57:22 local / 0.9 † 26 03:25:43 → 26 03:29:29 / 26 06:58:00 26 06:57:40 26 06:57:57 → 26 06:58:10 197.9 / 197.9 0.9
#1568 26 06:54:19 26 06:53:52 → 26 07:02:42 → 26 07:06:54 local / 8.8 26 06:53:32 → 26 06:57:11 / 26 07:07:23 26 07:07:03 26 07:07:20 → 26 07:07:58 13.7 / 25.1 5.5
#1614 26 07:15:28 26 07:16:28 → 26 07:41:35 → 26 07:45:31 local / 25.1 26 07:14:44 → 26 07:18:46 / 26 07:47:39 26 07:47:19 26 07:47:36 → 26 07:47:48 32.3 / 32.3 22.8
#1699 26 08:20:48 26 07:55:45 → 26 08:15:57 → 26 08:19:56 local / 20.2 26 08:20:18 → 26 08:24:32 / 26 08:25:16 26 08:24:56 26 08:25:54 → 26 08:25:58 5.2 / 5.2 0.0

Activity

  1. eowca commented on Nov 26, 2026

    @eowca
    ContributorAuthor

    Pilot preflight stopped at the remote execution boundary.

    I ran the actual remote_allowed function from host-config's isolated scheduler harness against miki's installed policy. The installed heavy-slot script matched host-config 70513f8 byte-for-byte. Danio-3 answered with Loop-zero 72f087e4 and Bubblewrap 0.9.0.

    Command shape Remote admission
    loopzero check Allowed as a whole job
    uv sync --offline --locked --group dev Refused
    uv run --group dev ruff check src tests Refused
    uv run --group dev tach check Refused
    uv run --python 3.14 python scripts/check_architecture_docs.py Refused
    scripts/size_budget.sh Refused
    uv run --group dev pytest -q Refused

    The allowed whole-check job runs a second coordinator and the transport copies its worker receipt back. It cannot serve as a one-stage call with the task-worktree coordinator as the only receipt writer. The generic job sandbox mounts its private checkout and worktree Git directory writable. Allowlisting the raw stages there would grant the checking commands writes that the existing Loop-zero check sandbox denies.

    A follow-up would need a separately reviewed, operator-trusted remote stage execution path that admits the pinned policy's exact stage under equivalent read-only source/Git isolation and returns a bound result without writing a task receipt. This preflight did not submit a stage ticket, produce a delegated receipt, or measure a remote admission wait. The matched local baselines remain 13.9, 5.5 and 22.8 min of exposed slot wait. The existing route stays in use. The pilot is parked here. Whole-job receipt compatibility remains in host-config #198.

  2. eowca commented on Nov 26, 2026

    @eowca
    ContributorAuthor

    Recommendation: close the separate delegated-route pilot. Expected incremental saving over the already-merged #1740 whole-job route is about 0% on today's supported stage path. All six individual Loop-zero stage commands were refused in the existing preflight. No extra capacity or faster admission for a receipt-safe delegated stage has been measured. Whole-job portability takes the same opportunity without the additional adapter once the common CLI rollout is live.

    Last 24 hours of slot wait

    Source: miki's heavy-slot-jobs.jsonl, job rows completed 25 Nov 10:35:29Z through 26 Nov 10:35:29Z, using queue_wait_s. I identified Loop-zero heads by commit presence in the local Loop-zero object store and used only clean actual passes for proof comparisons.

    Cohort Jobs Total wait Median p90
    All check-pool jobs 1,715 9,064.6m 2.42m 16.40m
    Miki check-pool jobs 1,225 8,075.2m 3.86m 17.33m
    Loop-zero clean miki passes 365 3,551.1m 8.85m 20.63m
    Loop-zero clean danio-3 passes 257 605.1m 0.31m 7.09m

    After deduping miki proof rows by head, recorded base and argv, 350 first passes spent 3,436.1 minutes waiting. Danio-3 started another successful Loop-zero job during 225 of those waits. The time from that observed start to the local admission sums to 1,940.7 minutes in an optimistic substitution model. This is evidence of overlap, not a forecast of free capacity, a like-for-like route comparison, or a delegated-stage saving. The 5% bar is 171.8 minutes/day even on the narrower first-local-proof cohort, or 403.8 minutes/day for miki's check pool.

    Smallest pilot if the post-rollout numbers reopen this

    First finish #1740's whole-job proof and use that route as the comparator. If the next 24 hours show a residual opportunity above 5%, run one matched, clean Loop-zero head via the existing trusted [checks].runner protocol. Delegate only the existing pytest stage through an operator-installed adapter with equivalent read-only checkout/Git and network policy. The normal task-worktree coordinator owns the receipt, keeps the rest of the stages local, and does not double-reserve a slot while the worker is queued. Bind exact head, trusted base, stage, and environment digest through the existing protocol. A refusal before start can use the existing local fallback. Measure total admission delay and time to an unchanged passing receipt accepted by ordinary ready, versus a whole-job run at the same head and policy. Hosted eligibility remains independent. Stop if isolation fails, the receipt is rejected, or the result extrapolates below the 5% bar. No new flag, gate, state, or generic stage allowlist.

  3. eowca commented on Nov 26, 2026

    @eowca
    ContributorAuthor

    Lean ruling (26 Nov): closed per the measurement above. The whole-job route already captures the saving (median clean-pass wait 8.85 min on miki vs 0.31 min on danio-3), and the delegated-stage route shows no measurable extra saving against the 5% threshold. Keep loop-zero minimal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions