A gate job waits for its step's runner only while that runner is free, keeps off a runner already gating its project, and names the runner that ran it #138
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "task/3785-a-gate-job-runs-only-on-the-runner-of-th"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Tracker: #3785
A gate job prefers the runner of its flow run's latest step, for its warm caches. Until now that runner kept the job to itself the whole time it held its channel. It did so even with every slot taken, or with another gate of the same project running there, while another runner that meets the job sat idle (jobs 57 and 104).
What this PR delivers
409 runner_cannot_runwhile a free runner holds its channel.store.gate_runnersmakes this decision once, for both the channel's offers (offer_jobs) and the claim (claim_job), from the same list of connected runners (channel.connected_runners), so the two always agree.fullfailed at <head> on runner . Its output: …". So when a host fault (a held port, a full disk) stops a gate, the flow run names the host it stopped on.docs/api.md(Flow runs, Jobs, the channel's job offer) andrunner/README.mddescribe the rule.What it leaves
Item 2 of the task's Next is not built, by Agra's choice. That item asked to move a gate job that failed on a host-fault signature to another runner, or to record the host as the reason. Retrying the job on another runner would work around the fault and leave it on the host for every later job. Each fault is instead removed where it arises:
1681a1c;The task's other ask, that the flow run says where a host fault stopped it, is met by the carried text naming the runner. When the step's runner is free but broken (job 112: s32 with port 18988 held), the job still runs there and fails, and the flow run goes
failed → Implement, with the next step's prompt naming that runner.sak learns of a run's own
sak-gateruns only after they end. So a runner whose project lock is held by a run's in-runfull(job 104's 10.6 min wait) still counts as free, provided it has a slot. Only gate jobs count toward the lock. A claimed job waiting on that lock sayswaitingon its stream, and itsclaimed_bynames the runner.#3784 (on master since
9b00833) makes a runner short of free space let an offered job go unclaimed. That check runs on the runner, and sak is not told why the job was let go. So a step's runner that is short of space but still holds its channel and a free slot stays the one runner the job goes to. The job waits until the runner reports room again, and itsrunner_idnames that runner.Regression
tests/named_runner.sxcheck_busyconnects alpha and beta. It makes gate jobs whose step alpha ran, and whose Orchestrator beta ran:409 runner_cannot_run. This was already so.409 runner_cannot_run, though alpha has a slot free, and beta's claim takes it.Each arm is a
git archivetree holding this head'stests/named_runner.sx, run with the gate's pinned sx.At 8a5679e's
src/(this PR's previous head), the step's runner passed over for the lock still races beta for the job:At master 8cda22f's
src/:At this head it passes (
NAMED RUNNER OK). One mutation arm per clause ofgate_runners, and of the re-offer, fails only the checks that pin it:tests/runner_core.sxexpects the Implement prompt after the failed probe gate to read "failed at <head> on runner runner-core-other".Golden set
None. No file under
web/changes.Gates at the head
a563eb5merges master3744adeinto the branch. On master,claim_jobtakes the claiming process'sslotand answers a repeated claim by the process that holds the job again. The merge keeps both, and a fresh claim of a gate job still goes throughgate_runners. Gate step job 177 found640d09dconflicting with masterc76bb26, after Merge's job 176 saw the base move.fullata563eb5on s32: tracker gate run 461 (this run's #1), passed (11:20–11:51Z on 2026-10-25). That covers everytests/*.sxand the release with step9 and the deploy contract. It also covers both Playwright configs: the main one with 740 passed and 1 skipped, and the runner one with 10 passed.tests/named_runner.sxandtests/runner_lost.sx(which drives the slotted job claims) passed on a563eb5's tree. With master 3744ade'ssrc/, this head'stests/named_runner.sxfails the same 5 checks listed under Regression for master8cda22f.640d09d:fulltracker gate runs 373 and 381 passed on s32. Gate step jobs 161 (m5) and 174 passed. Gate step jobs 140 and 166 failed only #3807's reattach flake intests/runner_core.sx, which master now holds the fix for (3744ade).A gate job waits for its step's runner only while that runner is free, and its failure names the runner that ran itto A gate job waits for its step's runner only while that runner is free, keeps off a runner already gating its project, and names the runner that ran it