A fleet dispatch to matou-workstation is never claimed there — stage-1 flip (#357) reverted to shadow #370

Open
opened 2026-11-19 18:37:18 +00:00 by ben · 5 comments
Owner

What happened

Stage 1 of #357 was flipped on 2026-11-19 at 18:20:59Z (FLEET_DISPATCH_MODE=live, FLEET_DISPATCH_LIVE_HOSTS=matou-workstation, self-pin 9fd804b, detection off) and reverted to shadow at 18:36:44Z.

The dispatcher side behaved as #365 specifies:

  • 18:21:06Z it posted fleet-dispatch host=matou-workstation on Matou/policy-generators#113, and at 18:21:09Z logged one dispatched Matou/policy-generators#113 to matou-workstation (slot 1).
  • Every later pass logged SKIP … a live dispatch marker (host=matou-workstation) already holds it. One dispatch in the whole live window.
  • matou-workstation's own tick stood down on the acting ack (18:22, 18:26, 18:28, 18:32); the other two hosts kept ticking.

The host side did not: no leg on matou-workstation ever claimed #113. The marker expired at its 600 s TTL, bens-mac-04's tick posted its own marker at 18:32:09Z and claimed the ticket at 18:32:59Z (run 715). The workstation sat with two free heavy slots for those ten minutes.

Evidence on the host

  • The dispatch's other two legs stood down at once (tasks 314823/314824, 18:21:10Z, 3 s). The workstation's runner fetched no task until 18:21:51Z.
  • The workstation legs that did run for policy-generators in the window (runs 680, 684, 688) all ended reason=fleet-head-elsewhere in ~/swarm/logs/run-swarm-verdicts.log. schedule_fleet_pick only returns that when SWARM_TICKET is empty, so none of them was the dispatched leg.
  • Same symptom before the flip, from the host's own tick: fleet-queue.log shows Matou/idss#2186 dispatched to matou-workstation at 18:06, 18:12 and 18:18 with never claimed (strike 1)/(strike 2), and Matou/idss#2184 at 16:06–16:12. Between 18:05 and 18:21:40 the runner fetched six tasks, none for idss.
  • So this is not caused by the dispatcher. A targeted workflow_dispatch leg for this host is either queued a long way behind other runs or not delivered. The runner is forgejo-runner.service, capacity 2.

Not established

Where the dispatched leg went. Job logs are not readable with an API token, so the run needs looking at in the Forgejo UI (policy-generators, the workflow_dispatch run created 18:21:10Z) or on the runner.

Why it matters for the dispatcher

  • In live mode the host's tick stands down, so an undelivered leg idles the slot for the whole marker TTL (600 s). The host tick re-dispatches after ~240 s with strikes; the dispatcher has no equivalent.
  • While the tick stands down it stops rewriting ~/swarm/state/fleet-queue.json, so cron and issues legs read a stale fleet head (fleet-head-elsewhere against a ticket another host already took).

Acceptance

  • A workflow_dispatch of swarm.yml with ticket+host=matou-workstation produces a leg on that host that claims the ticket within the host tick's 240 s wait, shown on a real ticket.
  • The stale fleet-queue.json under a live dispatcher is either refreshed or ruled harmless, with the reason written down.
  • Then #357 stage 1 can be flipped again (unit backups on the host: factory-dispatcher.service.live-2026-11-19 / .shadow-2026-11-19).
## What happened Stage 1 of #357 was flipped on 2026-11-19 at 18:20:59Z (`FLEET_DISPATCH_MODE=live`, `FLEET_DISPATCH_LIVE_HOSTS=matou-workstation`, self-pin `9fd804b`, detection off) and reverted to shadow at 18:36:44Z. The dispatcher side behaved as #365 specifies: - 18:21:06Z it posted `fleet-dispatch host=matou-workstation` on `Matou/policy-generators#113`, and at 18:21:09Z logged one `dispatched Matou/policy-generators#113 to matou-workstation (slot 1)`. - Every later pass logged `SKIP … a live dispatch marker (host=matou-workstation) already holds it`. One dispatch in the whole live window. - `matou-workstation`'s own tick stood down on the acting ack (18:22, 18:26, 18:28, 18:32); the other two hosts kept ticking. The host side did not: **no leg on `matou-workstation` ever claimed #113.** The marker expired at its 600 s TTL, `bens-mac-04`'s tick posted its own marker at 18:32:09Z and claimed the ticket at 18:32:59Z (run 715). The workstation sat with two free heavy slots for those ten minutes. ## Evidence on the host - The dispatch's other two legs stood down at once (tasks 314823/314824, 18:21:10Z, 3 s). The workstation's runner fetched no task until 18:21:51Z. - The workstation legs that did run for policy-generators in the window (runs 680, 684, 688) all ended `reason=fleet-head-elsewhere` in `~/swarm/logs/run-swarm-verdicts.log`. `schedule_fleet_pick` only returns that when `SWARM_TICKET` is empty, so none of them was the dispatched leg. - Same symptom before the flip, from the host's own tick: `fleet-queue.log` shows `Matou/idss#2186` dispatched to `matou-workstation` at 18:06, 18:12 and 18:18 with `never claimed (strike 1)`/`(strike 2)`, and `Matou/idss#2184` at 16:06–16:12. Between 18:05 and 18:21:40 the runner fetched six tasks, none for idss. - So this is not caused by the dispatcher. A targeted `workflow_dispatch` leg for this host is either queued a long way behind other runs or not delivered. The runner is `forgejo-runner.service`, capacity 2. ## Not established Where the dispatched leg went. Job logs are not readable with an API token, so the run needs looking at in the Forgejo UI (policy-generators, the `workflow_dispatch` run created 18:21:10Z) or on the runner. ## Why it matters for the dispatcher - In live mode the host's tick stands down, so an undelivered leg idles the slot for the whole marker TTL (600 s). The host tick re-dispatches after ~240 s with strikes; the dispatcher has no equivalent. - While the tick stands down it stops rewriting `~/swarm/state/fleet-queue.json`, so cron and `issues` legs read a stale fleet head (`fleet-head-elsewhere` against a ticket another host already took). ## Acceptance - A `workflow_dispatch` of `swarm.yml` with `ticket`+`host=matou-workstation` produces a leg on that host that claims the ticket within the host tick's 240 s wait, shown on a real ticket. - The stale `fleet-queue.json` under a live dispatcher is either refreshed or ruled harmless, with the reason written down. - Then #357 stage 1 can be flipped again (unit backups on the host: `factory-dispatcher.service.live-2026-11-19` / `.shadow-2026-11-19`).

Diagnosis — where the dispatched leg went (the ticket's "Not established")

Established from the tracker Actions API on elitebook-03 (reads are anonymous; no UI needed for this part). The dispatch was Matou/policy-generators run_number 714, workflow_dispatch, created 2026-11-19T18:21:10Z (ticket=113, host=matou-workstation).

  • Its elitebook-03 leg (task 314824) and bens-mac-04 leg (task 314823) were both picked at 18:21:10Z and stood down in 3s (success) — the two stand-down legs the ticket already noted.
  • Its matou-workstation leg has no task row at all across 400 task rows (actions/tasks pages 1–8, spanning 14:21Z→18:52Z). A task row is minted only when a runner picks the job (CreateTaskForRunner, GOTCHAS 78), so that leg was never picked by the matou-workstation runner — not within the 600s marker TTL, and not 30+ minutes later.
  • The runner was not dead: it picked policy-generators run 697/698/699/701's matou-workstation legs at 18:51–18:52Z — all newer run numbers than 714 — while run 714's leg (created 18:21:10Z) was still never picked. So the targeted leg was skipped, not merely delayed.
  • The same runner showed long dead stretches in the window: no matou-workstation leg picked 18:14:48Z→18:21:50Z (~7 min) or 18:23:34Z→18:34:20Z (~11 min) — consistent with GOTCHAS 78's "a runner that stops fetching without dying" and STATUS's matou-workstation "runner capacity 1" note.

Mechanism. Forgejo 15 hands jobs to every runner from ONE oldest-first queue across ALL repos (GetAvailableJobsForRunner: task_id=0 AND status=waiting, Asc(updated, id); GOTCHAS 78). A targeted workflow_dispatch leg has no priority in it. On the fleet's smallest / bottleneck runner (matou-workstation), a targeted leg waits behind every older queued job fleet-wide — and here it was never delivered at all. Under a live dispatcher the host tick stands down (fleet-queue.sh:104), so nothing re-dispatches it: the slot idles the full 600s TTL and another host claims the ticket when the marker expires (bens-mac-04 at 18:32:59Z). This is not a dispatcher/allocator fault — #365's arbitration behaved exactly as specified — it is leg delivery to that host, which live mode exposed by removing the host-tick fallback.

Acceptance item 2 — the stale fleet-queue.json is HARMLESS (ruled)

Confirmed in code: the dispatcher-ack stand-down gate (fleet-queue.sh:104, fleet_slot_report_acked_fresh) exit 0s before fleet_queue_cache_write (fleet-queue.sh:151), so a live-acked host does stop refreshing ~/swarm/state/fleet-queue.json. It is nonetheless harmless:

  1. The cache is read only by backstop legs with an empty SWARM_TICKET (schedule_fleet_pick, schedule-lib.sh:245-260). A targeted dispatched leg (SWARM_TICKET set) never reads it.
  2. A stale head can only cause (a) a backstop leg stands down fleet-head-elsewhere — a no-op exit 0 — or (b) the head is this repo's but no longer ready, the readiness jq fails, the pick stays empty, and the leg proceeds on this repo's own order, where the per-ticket claim (D4) guards against double-work. Neither loses work nor mis-lands.
  3. The staleness is bounded to exactly the window the dispatcher is live and acking. The instant the dispatcher stops/dies, the ack goes stale, the gate falls through, the tick resumes, and fleet_queue_cache_write refreshes the cache within one tick — so a stale cache never co-exists with a fallback that relies on it.
  4. A closed-event leg records the close for dependant-promotion (fleet_queue_recent_close_record, schedule-lib.sh:246-248) before it reads the cache head, so promotion is unaffected.

Refreshing the cache in the stand-down path would require running every repo's lister on every tick of a live host — exactly the cost the early stand-down exists to avoid — for no safety gain. Disposition: ruled harmless, not refreshed.

Ruled by agent under ADR 0174 — veto anytime. Proof: fleet-queue.sh:104/151, schedule-lib.sh:233-270 on 9fd804b; the Actions API trace above.

Why human

Two residues are one-way doors / host posture this session cannot act on:

  1. Why Forgejo never delivered run 714's matou-workstation leg (cancelled at the run level? dropped? starved by Asc(updated, id)?) needs forge-internal inspection. The public web-JSON job view (POST <forge>/<owner>/<repo>/actions/runs/714/jobs/0, the route GOTCHAS 78 names) returns 404 to an API token — it needs a logged-in session cookie / the Forgejo UI. And the runner's journalctl -u forgejo-runner* lives on the box.
  2. matou-workstation is unreachable from this session. The Matou/dev-factory session drainer is pinned to elitebook-03 (host-registry.conf), and elitebook-03's swarm key is denied publickey to matou-workstation. The fix — runner capacity / liveness on matou-workstation (STATUS: "runner capacity 1"; GOTCHAS 78: "no liveness restart yet", unlike bens-mac-04's self-restarting unit) — is host posture on that box, the same class routed to a human in #305 / #316.

So acceptance item 1 (a real-ticket dispatch claimed within 240s) can only be proven by a live dispatch to that host once delivery works, and acceptance item 3 (re-flip #357 stage 1) is the one-way go ADR 0009 decision 6 reserves for Ben (#357 is ready-for-human).

  • On matou-workstation: confirm the runner's actual capacity (STATUS says 1, this ticket says 2) and add the liveness restart GOTCHAS 78 flagged as still missing (bens-mac-04's pool unit restarts by design and stayed healthy). Read run 714's matou-workstation job state in the Forgejo UI to settle whether it was cancelled or starved.
  • Harness follow-up to weigh (not blocking): the dispatcher has no delivery check / re-dispatch — the host tick's #315 strike has no dispatcher equivalent (ADR 0009 decision 5 detection would cover it), so an undelivered targeted leg could release the ticket before the 600s TTL instead of idling the slot. Note this does not fix delivery (it only adds more legs to the same global queue); the durable fix is runner throughput on matou-workstation, or #204's host-puller, which removes the per-host stand-down legs from the queue entirely.

Relabelling ready-for-human and leaving bug / priority. The two-way-door parts (the diagnosis above + the item-2 ruling) are complete; the residue is host + human. Routed by agent under ADR 0174 — veto anytime.

## Diagnosis — where the dispatched leg went (the ticket's "Not established") Established from the tracker Actions API on `elitebook-03` (reads are anonymous; no UI needed for this part). The dispatch was **`Matou/policy-generators` run_number 714**, `workflow_dispatch`, created `2026-11-19T18:21:10Z` (`ticket=113`, `host=matou-workstation`). - Its **`elitebook-03` leg (task 314824)** and **`bens-mac-04` leg (task 314823)** were both picked at 18:21:10Z and stood down in 3s (`success`) — the two stand-down legs the ticket already noted. - Its **`matou-workstation` leg has no task row at all** across 400 task rows (`actions/tasks` pages 1–8, spanning 14:21Z→18:52Z). A task row is minted only when a runner **picks** the job (`CreateTaskForRunner`, GOTCHAS 78), so **that leg was never picked by the matou-workstation runner** — not within the 600s marker TTL, and not 30+ minutes later. - The runner was **not dead**: it picked `policy-generators` run 697/698/699/701's `matou-workstation` legs at 18:51–18:52Z — all **newer** run numbers than 714 — while run 714's leg (created 18:21:10Z) was still never picked. So the targeted leg was **skipped, not merely delayed**. - The same runner showed long dead stretches in the window: **no `matou-workstation` leg picked 18:14:48Z→18:21:50Z (~7 min) or 18:23:34Z→18:34:20Z (~11 min)** — consistent with GOTCHAS 78's "a runner that stops fetching without dying" and STATUS's `matou-workstation` "runner capacity 1" note. **Mechanism.** Forgejo 15 hands jobs to every runner from ONE oldest-first queue across ALL repos (`GetAvailableJobsForRunner`: `task_id=0 AND status=waiting`, `Asc(updated, id)`; GOTCHAS 78). A targeted `workflow_dispatch` leg has **no priority** in it. On the fleet's smallest / bottleneck runner (`matou-workstation`), a targeted leg waits behind every older queued job fleet-wide — and here it was never delivered at all. Under a **live** dispatcher the host tick stands down (`fleet-queue.sh:104`), so nothing re-dispatches it: the slot idles the full 600s TTL and another host claims the ticket when the marker expires (`bens-mac-04` at 18:32:59Z). This is **not** a dispatcher/allocator fault — #365's arbitration behaved exactly as specified — it is **leg delivery to that host**, which live mode exposed by removing the host-tick fallback. ## Acceptance item 2 — the stale `fleet-queue.json` is HARMLESS (ruled) Confirmed in code: the dispatcher-ack stand-down gate (`fleet-queue.sh:104`, `fleet_slot_report_acked_fresh`) `exit 0`s **before** `fleet_queue_cache_write` (`fleet-queue.sh:151`), so a live-acked host does stop refreshing `~/swarm/state/fleet-queue.json`. It is nonetheless harmless: 1. The cache is read **only** by backstop legs with an empty `SWARM_TICKET` (`schedule_fleet_pick`, `schedule-lib.sh:245-260`). A targeted dispatched leg (`SWARM_TICKET` set) never reads it. 2. A stale head can only cause (a) a backstop leg stands down `fleet-head-elsewhere` — a no-op `exit 0` — or (b) the head is this repo's but no longer ready, the readiness `jq` fails, the pick stays empty, and the leg proceeds on this repo's own order, where the per-ticket claim (D4) guards against double-work. Neither loses work nor mis-lands. 3. The staleness is bounded to exactly the window the dispatcher is live and acking. The instant the dispatcher stops/dies, the ack goes stale, the gate falls through, the tick resumes, and `fleet_queue_cache_write` refreshes the cache within one tick — so a stale cache never co-exists with a fallback that relies on it. 4. A `closed`-event leg records the close for dependant-promotion (`fleet_queue_recent_close_record`, `schedule-lib.sh:246-248`) **before** it reads the cache head, so promotion is unaffected. Refreshing the cache in the stand-down path would require running every repo's lister on every tick of a live host — exactly the cost the early stand-down exists to avoid — for no safety gain. **Disposition: ruled harmless, not refreshed.** *Ruled by agent under ADR 0174 — veto anytime. Proof: `fleet-queue.sh:104/151`, `schedule-lib.sh:233-270` on `9fd804b`; the Actions API trace above.* ## Why human Two residues are one-way doors / host posture this session cannot act on: 1. **Why Forgejo never delivered run 714's `matou-workstation` leg** (cancelled at the run level? dropped? starved by `Asc(updated, id)`?) needs forge-internal inspection. The public web-JSON job view (`POST <forge>/<owner>/<repo>/actions/runs/714/jobs/0`, the route GOTCHAS 78 names) returns **404 to an API token** — it needs a logged-in session cookie / the Forgejo UI. And the runner's `journalctl -u forgejo-runner*` lives on the box. 2. **`matou-workstation` is unreachable from this session.** The `Matou/dev-factory` session drainer is pinned to `elitebook-03` (`host-registry.conf`), and `elitebook-03`'s swarm key is denied `publickey` to `matou-workstation`. The fix — runner **capacity / liveness** on `matou-workstation` (STATUS: "runner capacity 1"; GOTCHAS 78: "no liveness restart yet", unlike `bens-mac-04`'s self-restarting unit) — is host posture on that box, the same class routed to a human in #305 / #316. So **acceptance item 1** (a real-ticket dispatch claimed within 240s) can only be proven by a live dispatch to that host once delivery works, and **acceptance item 3** (re-flip #357 stage 1) is the one-way go ADR 0009 decision 6 reserves for Ben (#357 is `ready-for-human`). ### Recommended human steps - On `matou-workstation`: confirm the runner's actual capacity (STATUS says 1, this ticket says 2) and add the liveness restart GOTCHAS 78 flagged as still missing (`bens-mac-04`'s pool unit restarts by design and stayed healthy). Read run 714's `matou-workstation` job state in the Forgejo UI to settle whether it was cancelled or starved. - Harness follow-up to weigh (not blocking): the dispatcher has no delivery check / re-dispatch — the host tick's #315 strike has no dispatcher equivalent (ADR 0009 decision 5 detection would cover it), so an undelivered targeted leg could release the ticket before the 600s TTL instead of idling the slot. Note this does **not** fix delivery (it only adds more legs to the same global queue); the durable fix is runner throughput on `matou-workstation`, or #204's host-puller, which removes the per-host stand-down legs from the queue entirely. Relabelling `ready-for-human` and leaving `bug` / `priority`. The two-way-door parts (the diagnosis above + the item-2 ruling) are complete; the residue is host + human. *Routed by agent under ADR 0174 — veto anytime.*
Author
Owner

Host facts read from matou-workstation by the laptop session (read-only, nothing changed): the runner's config.yml says capacity: 2 (STATUS's "capacity 1" is out of date); forgejo-runner.service has been up since 2026-10-14 22:49Z with Restart=always and 0 restarts; its journal for 18:14–18:36Z holds only task-pickup lines, no errors. So the runner did not crash or log a fault in the window — it simply was never handed run 714's leg. The dispatcher stays in shadow; no re-flip made.

Host facts read from `matou-workstation` by the laptop session (read-only, nothing changed): the runner's `config.yml` says `capacity: 2` (STATUS's "capacity 1" is out of date); `forgejo-runner.service` has been up since 2026-10-14 22:49Z with `Restart=always` and 0 restarts; its journal for 18:14–18:36Z holds only task-pickup lines, no errors. So the runner did not crash or log a fault in the window — it simply was never handed run 714's leg. The dispatcher stays in shadow; no re-flip made.
Author
Owner

Read in the Forgejo UI (Ben's browser session, 19:27Z): Matou/policy-generators run 714's matou-workstation leg is still Waiting — "Waiting for a runner with the following label: matou-workstation", 0s, 66 minutes after the dispatch. Not cancelled, not dropped. Runs 715, 719, 722, 723, 724, 726 and 729 are Waiting the same way, while 712 and 713 (created just before 714) only completed around 19:22Z — about 67 minutes after they were created. So the leg is queued, and that runner's queue is roughly an hour deep and drained oldest-first.

Pickup rate from the runner's journal (tasks fetched per 10 min, 18:00→19:20Z): 2, 6, 16, 13, 3, 10, 10, 2, 16 — about one task a minute, with capacity 2 and fetch_interval: 2s, one slot held by a long sandbox run. Every run in every repo adds a leg for this host, so legs arrive faster than they drain.

Consequence for #357: a targeted dispatch to this host cannot be claimed inside any marker TTL while the queue is this deep, whoever dispatches it. A liveness restart would not help — the runner is fetching, just far behind.

Read in the Forgejo UI (Ben's browser session, 19:27Z): `Matou/policy-generators` run 714's `matou-workstation` leg is **still Waiting** — "Waiting for a runner with the following label: matou-workstation", 0s, 66 minutes after the dispatch. Not cancelled, not dropped. Runs 715, 719, 722, 723, 724, 726 and 729 are Waiting the same way, while 712 and 713 (created just before 714) only completed around 19:22Z — about 67 minutes after they were created. So the leg is queued, and that runner's queue is roughly an hour deep and drained oldest-first. Pickup rate from the runner's journal (tasks fetched per 10 min, 18:00→19:20Z): 2, 6, 16, 13, 3, 10, 10, 2, 16 — about one task a minute, with capacity 2 and `fetch_interval: 2s`, one slot held by a long sandbox run. Every run in every repo adds a leg for this host, so legs arrive faster than they drain. Consequence for #357: a targeted dispatch to this host cannot be claimed inside any marker TTL while the queue is this deep, whoever dispatches it. A liveness restart would not help — the runner is fetching, just far behind.
Author
Owner

Measured 19:45–19:50Z (laptop session, read-only). The workstation runner is saturated, and not by swarm legs. Joining its journal's 99 picked task ids (17:30→19:49Z) with actions/tasks durations, against 278 slot-minutes (capacity 2):

what jobs slot-minutes share
Matou/dev-factory ci.yml test + static (both runs-on: matou-workstation, every push) 23 161 58%
two real ticket runs (swarm leg working a ticket) 2 73 26%
no-op / stand-down swarm legs 69 16 6%
pr-e2e-sweep 5 5 2%

So ~92% busy. test runs 9–14 min, static ~5 min, and main took a push every few minutes today, so both slots are usually held by CI or a ticket run and the host legs queue behind them. Fleet-wide there were 42 waiting runs at 19:45Z (35 swarm.yml), oldest created 18:38Z. Run creation is steady, not a flood: ~100 runs/hour across the eight repos, ~28 of them swarm.yml.

This corrects my earlier comment's reading: the pickup rate is low because the slots are full, not because the runner stops fetching. The host has 4 CPUs / 7 GB.

Measured 19:45–19:50Z (laptop session, read-only). **The workstation runner is saturated, and not by swarm legs.** Joining its journal's 99 picked task ids (17:30→19:49Z) with `actions/tasks` durations, against 278 slot-minutes (capacity 2): | what | jobs | slot-minutes | share | |---|---|---|---| | `Matou/dev-factory` `ci.yml` `test` + `static` (both `runs-on: matou-workstation`, every push) | 23 | 161 | 58% | | two real ticket runs (`swarm` leg working a ticket) | 2 | 73 | 26% | | no-op / stand-down `swarm` legs | 69 | 16 | 6% | | `pr-e2e-sweep` | 5 | 5 | 2% | So ~92% busy. `test` runs 9–14 min, `static` ~5 min, and `main` took a push every few minutes today, so both slots are usually held by CI or a ticket run and the host legs queue behind them. Fleet-wide there were 42 waiting runs at 19:45Z (35 `swarm.yml`), oldest created 18:38Z. Run creation is steady, not a flood: ~100 runs/hour across the eight repos, ~28 of them `swarm.yml`. This corrects my earlier comment's reading: the pickup rate is low because the slots are full, not because the runner stops fetching. The host has 4 CPUs / 7 GB.

Ruled by agent under ADR 0174 — veto anytime.

#370's open acceptance item "the stale fleet-queue.json under a live dispatcher is either refreshed or ruled harmless, with the reason written down" is resolved by #381 as ruled harmless, not refreshed.

Why harmless. #381 drops the SCHEDULE_FLEET_PICK guard in schedule_fleet_pick_signal so the host mirrors its verified ready-set as fleet-pick-task on every path, not only when a fleet pick exists. With that in place, a stale/absent fleet-queue.json on a cron/closed leg no longer causes any fault: fleet_queue_cache_head returns rc 1 → schedule_fleet_pick proceeds with no pick → the host's full verified ready-set is mirrored → the in-sandbox lister emits it with zero forge reads → the claim walk (lowest live claim id) claims the first claimable. The rc 124 this stale cache used to cause (its proof was #381 / matou-app run 55500) is gone.

The only residue is a self-clearing ~600 s window right after a dispatcher activates, in which a fresh-but-wrong cached head could cost one idle fleet-head-elsewhere tick; past the FLEET_QUEUE_CACHE_TTL=600 the cache reliably reads rc 1 → own order.

Why not refreshed (direction 2 declined). Moving fleet_queue_cache_write above the ADR 0009 stand-down would force a full fleet collection on every stand-down tick on every host — a worse forge-load trade than the fault it removes. The mirror closes the item on its own.

Two-way door / proof. Revertible (a later ticket can still add the refresh); proven by list-ready-tasks-test.sh case 6g + claim-next-task-test.sh T-#381 (no-pick, zero forge reads, exit 0). fleet-queue.sh is unchanged by #381. The reason is also recorded in docs/journal/2026-11-20-381.md and docs/gotchas/381-*.

This closes #370's stale-cache item only; #370's other item (the undelivered workflow_dispatch leg on matou-workstation) is untouched and #370 stays open on that.

**Ruled by agent under ADR 0174 — veto anytime.** #370's open acceptance item *"the stale `fleet-queue.json` under a live dispatcher is either refreshed or ruled harmless, with the reason written down"* is resolved by **#381** as **ruled harmless**, not refreshed. **Why harmless.** #381 drops the `SCHEDULE_FLEET_PICK` guard in `schedule_fleet_pick_signal` so the host mirrors its verified ready-set as `fleet-pick-task` on **every** path, not only when a fleet pick exists. With that in place, a stale/absent `fleet-queue.json` on a cron/`closed` leg no longer causes any fault: `fleet_queue_cache_head` returns rc 1 → `schedule_fleet_pick` proceeds with no pick → the host's full verified ready-set is mirrored → the in-sandbox lister emits it with **zero forge reads** → the claim walk (lowest live claim id) claims the first claimable. The `rc 124` this stale cache used to cause (its proof was #381 / matou-app run 55500) is gone. The only residue is a self-clearing ~600 s window right after a dispatcher activates, in which a *fresh-but-wrong* cached head could cost one idle `fleet-head-elsewhere` tick; past the `FLEET_QUEUE_CACHE_TTL=600` the cache reliably reads rc 1 → own order. **Why not refreshed (direction 2 declined).** Moving `fleet_queue_cache_write` above the ADR 0009 stand-down would force a full fleet collection on every stand-down tick on every host — a worse forge-load trade than the fault it removes. The mirror closes the item on its own. **Two-way door / proof.** Revertible (a later ticket can still add the refresh); proven by `list-ready-tasks-test.sh` case 6g + `claim-next-task-test.sh` T-#381 (no-pick, zero forge reads, exit 0). `fleet-queue.sh` is unchanged by #381. The reason is also recorded in `docs/journal/2026-11-20-381.md` and `docs/gotchas/381-*`. This closes #370's stale-cache item only; #370's other item (the undelivered `workflow_dispatch` leg on matou-workstation) is untouched and #370 stays open on that.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/dev-factory#370
No description provided.