Fleet-wide queue: one head of the line across repos, dispatched when a ticket is ready #301
Open
opened 2026-10-22 05:09:53 +00:00 by ben
·
6 comments
No Branch/Tag specified
main
sandcastle/rescue-20261120-212246
sandcastle/rescue-20261120-202650
sandcastle/rescue-20261120-202316
sandcastle/worker/20261120192753-1909682
sandcastle/rescue-20261120-191443
sandcastle/rescue-20261120-195103
sandcastle/rescue-20261120-201254
sandcastle/rescue-20261120-201438
sandcastle/rescue-20261120-144756
sandcastle/rescue-20261120-184843
sandcastle/rescue-20261120-190817
sandcastle/rescue-20261120-045815
sandcastle/rescue-20261120-143144
sandcastle/rescue-20261120-144025
sandcastle/worker/20261120032838-3834852
sandcastle/worker/20261120034547-1076409
sandcastle/rescue-20261120-031041
sandcastle/rescue-20261120-035031
sandcastle/rescue-20261120-041046
sandcastle/rescue-20261120-041556
sandcastle/rescue-20261120-042712
sandcastle/rescue-20261120-044145
sandcastle/rescue-20261120-044401
sandcastle/worker/20261120020735-3225234
sandcastle/rescue-20261120-025017
sandcastle/worker/20261120012937-3577764
sandcastle/rescue-20261120-024432
sandcastle/rescue-20261120-012510
sandcastle/rescue-20261120-020027
sandcastle/rescue-20261120-022005
sandcastle/rescue-20261120-023040
sandcastle/rescue-20261120-023059
sandcastle/rescue-20261120-023617
sandcastle/rescue-20261120-023726
sandcastle/rescue-20261120-024624
sandcastle/rescue-20261120-030108
sandcastle/rescue-20261120-011059
sandcastle/rescue-20261119-235227
sandcastle/rescue-20261119-220002
sandcastle/rescue-20261119-234418
sandcastle/worker/20261119210537-2901903
sandcastle/rescue-20261119-215319
sandcastle/worker/20261119210832-2140478
sandcastle/rescue-20261119-205729
sandcastle/worker/20261119195637-2051281
sandcastle/rescue-20261119-203604
sandcastle/rescue-20261119-212545
sandcastle/rescue-20261119-213258
sandcastle/rescue-20261119-214233
sandcastle/rescue-20261119-215039
sandcastle/rescue-20261119-200052
sandcastle/rescue-20261119-202558
sandcastle/rescue-20261119-202859
sandcastle/rescue-20261119-204522
sandcastle/rescue-20261119-202901
sandcastle/worker/20261119192821-2242548
sandcastle/rescue-20261119-201432
sandcastle/worker/20261119185826-1049892
sandcastle/rescue-20261119-192442
sandcastle/rescue-20261119-194543
sandcastle/rescue-20261119-195715
sandcastle/rescue-20261119-195042
sandcastle/rescue-20261119-194153
sandcastle/rescue-20261119-193223
sandcastle/rescue-20261119-181821
sandcastle/rescue-20261119-182031
sandcastle/rescue-20261119-191400
sandcastle/rescue-20261119-184524
sandcastle/rescue-20261119-185251
sandcastle/rescue-20261119-190111
sandcastle/rescue-20261119-171507
sandcastle/rescue-20261119-172406
sandcastle/rescue-20261119-180227
sandcastle/rescue-20261119-181611
sandcastle/rescue-20261119-183926
sandcastle/rescue-20261119-165410
sandcastle/rescue-20261119-181300
sandcastle/worker/20261119152654-1251003
sandcastle/rescue-20261119-175608
sandcastle/rescue-20261119-153212
sandcastle/rescue-20261119-155612
sandcastle/rescue-20261119-161612
sandcastle/rescue-20261119-162645
sandcastle/rescue-20261119-151259
sandcastle/worker/20261119-091545-699963
sandcastle/rescue-20261119-152400
sandcastle/rescue-20261119-150650
sandcastle/rescue-20261119-151018
sandcastle/rescue-20261119-145753
sandcastle/rescue-20261119-144640
sandcastle/worker/20261119-141805-b375a7
sandcastle/rescue-20261119-143616
sandcastle/rescue-20261119-142315
sandcastle/rescue-20261119-143536
sandcastle/rescue-20261119-144907
sandcastle/rescue-20261119-150929
sandcastle/rescue-20261119-140252
sandcastle/rescue-20261119-132837
sandcastle/rescue-20261119-140917
sandcastle/rescue-20261118-232015
sandcastle/rescue-20261118-224358
sandcastle/rescue-20261118-231012
sandcastle/rescue-20261118-221954
sandcastle/rescue-20261118-223235
sandcastle/rescue-20261118-215029
sandcastle/rescue-20261118-220457
sandcastle/rescue-20261118-213647
sandcastle/rescue-20261118-213651
sandcastle/rescue-20261118-203142
sandcastle/rescue-20261118-201242
sandcastle/rescue-20261118-160449
sandcastle/worker/20261118-151037-fa1423
sandcastle/rescue-20261118-141033
sandcastle/rescue-20261118-153435
sandcastle/rescue-20261118-155226
sandcastle/rescue-20261118-140135
sandcastle/rescue-20261118-072336
sandcastle/rescue-20261118-071306
sandcastle/rescue-20261118-065902
sandcastle/rescue-20261118-070925
sandcastle/rescue-20261118-064628
sandcastle/rescue-20261118-060611
sandcastle/rescue-20261118-063652
sandcastle/rescue-20261118-065117
sandcastle/rescue-20261118-065556
sandcastle/rescue-20261118-055026
sandcastle/worker/20261118-000033-5f0b74
sandcastle/rescue-20261118-054929
sandcastle/rescue-20261118-053613
sandcastle/worker/20261118-050837-870db6
sandcastle/rescue-20261118-051315
sandcastle/rescue-20261118-052156
sandcastle/rescue-20261118-053056
sandcastle/rescue-20261118-042651
sandcastle/rescue-20261118-050517
sandcastle/rescue-20261118-052017
sandcastle/rescue-20261118-052046
sandcastle/rescue-20261118-053617
sandcastle/rescue-20261118-040341
sandcastle/rescue-20261118-035452
sandcastle/rescue-20261117-180034
sandcastle/worker/20261117-173516-cca624
backport/idss-2068-2111-2114
sandcastle/rescue-20261117-123242
sandcastle/rescue-20261117-124231
backport/idss-2057
sandcastle/rescue-20261116-154411
sandcastle/rescue-20261117-175037
sandcastle/rescue-20261116-153352
sandcastle/rescue-20261107-062749
session-runner-land-mode-recheck-2181
sandcastle/rescue-20261107-061316
fp/idss-2180
sandcastle/rescue-20261107-060212
forward-port/provision-disk-guard
sandcastle/rescue-20261107-060021
sandcastle/rescue-20261107-054649
sandcastle/worker/20261107-043349-cf0d7e
backport/idss-2177
sandcastle/rescue-20261116-175301
sandcastle/rescue-20261116-175950
backport/idss-2176
sandcastle/rescue-20261106-135208
sandcastle/rescue-20261107-045600
sandcastle/rescue-20261107-051315
sandcastle/rescue-20261107-053423
sandcastle/worker/20261106-111451-8c1ff0
sandcastle/rescue-20261106-023514
sandcastle/rescue-20261106-113455
sandcastle/rescue-20261106-115043
sandcastle/rescue-20261106-121303
sandcastle/rescue-20261106-134211
sandcastle/worker/20261106-013937-c15abc
fix/336-job-locality-runner-uuid
sandcastle/rescue-20261106-000320
sandcastle/rescue-20261105-113317
sandcastle/rescue-20261105-235352
sandcastle/rescue-20261106-020541
sandcastle/rescue-20261106-022516
sandcastle/rescue-20261106-024735
sandcastle/rescue-20261106-024744
sandcastle/rescue-20261106-024751
sandcastle/worker/20261105-104416-4319e1
sandcastle/rescue-20261105-111401
sandcastle/worker/20261105-054650-133b83
sandcastle/rescue-20261105-104304
sandcastle/rescue-20261105-110432
sandcastle/rescue-20261105-110637
sandcastle/rescue-20261105-112240
sandcastle/rescue-20261105-102818
sandcastle/worker/20261105-090131-e38a52
sandcastle/rescue-20261105-101105
sandcastle/rescue-20261105-094209
sandcastle/rescue-20261105-095705
sandcastle/rescue-20261105-091351
sandcastle/rescue-20261105-092126
sandcastle/rescue-20261105-093755
sandcastle/rescue-20261105-095339
sandcastle/rescue-20261105-101509
sandcastle/worker/20261105-033507-997386
sandcastle/worker/20261105-072852-43a339
sandcastle/rescue-20261105-085215
sandcastle/rescue-20261105-090546
sandcastle/rescue-20261105-090731
sandcastle/rescue-20261105-091600
sandcastle/worker/20261105-073544-9e3e7b
sandcastle/rescue-20261105-085541
sandcastle/worker/20261105-030149-b06fe6
sandcastle/rescue-20261105-075223
sandcastle/rescue-20261105-080157
sandcastle/rescue-20261105-081231
sandcastle/rescue-20261105-081252
sandcastle/rescue-20261105-081916
sandcastle/rescue-20261105-082029
sandcastle/rescue-20261105-082600
sandcastle/rescue-20261105-082859
sandcastle/rescue-20261105-083557
sandcastle/rescue-20261105-084327
sandcastle/rescue-20261105-090802
sandcastle/rescue-20261105-092213
sandcastle/worker/20261105-004228-d59980
sandcastle/worker/20261104-200255-c897e8
sandcastle/rescue-20261105-021604
sandcastle/rescue-20261105-062428
sandcastle/rescue-20261105-064420
sandcastle/worker/20261104-185608-12e745
sandcastle/rescue-20261105-011719
sandcastle/rescue-20261104-221030
sandcastle/rescue-20261105-003304
sandcastle/rescue-20261105-005511
sandcastle/rescue-20261105-013351
sandcastle/rescue-20261105-015246
sandcastle/worker/20261104-204335-4df59d
sandcastle/worker/20261104-144451-39719f
sandcastle/rescue-20261104-210849
sandcastle/rescue-20261104-211127
sandcastle/rescue-20261104-212722
sandcastle/worker/20261104-194113-a58f71
sandcastle/rescue-20261104-193329
sandcastle/rescue-20261104-200835
sandcastle/rescue-20261104-201057
sandcastle/rescue-20261104-202237
sandcastle/rescue-20261104-204239
sandcastle/rescue-20261104-185105
sandcastle/rescue-20261104-185510
sandcastle/rescue-20261104-192703
sandcastle/rescue-20261104-184907
sandcastle/rescue-20261104-183301
sandcastle/rescue-20261104-183354
backport/idss-2161
backport/idss-2155
fp/idss-2147
backport/idss-2145
backport/idss-2134
backport/idss-2119
sandcastle/worker/20261030-141035-c3d689
sandcastle/worker/20261030-125730-11b08b
sandcastle/worker/20261030-172321-20db0e
backport/idss-2114
backport/idss-2112
forward-port/idss-2111
forward-port/idss-2068
backport/idss-2111
backport/idss-2110
backport/idss-2106
backport/idss-2068
backport/idss-2104
sandcastle/rescue-20261030-110900
sandcastle/worker/20261029-055633-763b74
sandcastle/worker/20261029-000831-e4c652
sandcastle/worker/20261028-162655-0e8071
sandcastle/rescue-20261030-110112
sandcastle/rescue-20261030-110131
sandcastle/rescue-20261030-110135
sandcastle/rescue-20261030-110153
sandcastle/rescue-20261030-110156
sandcastle/rescue-20261030-110200
sandcastle/rescue-20261030-110220
backport/idss-1913
agent/issue-306
runner-busy-not-stalled
sandcastle/worker/20261024-045639-da1b9a
sandcastle/worker/20261023-060833-778cbe
fleet-queue-watcher-301-proposal
floor-vue
sandcastle/worker/20261021-191646-b93327
sandcastle/worker/20261021-233637-f21837
sandcastle/worker/20261021-233255-c766f7
sandcastle/worker/20261021-040000-b7a28d
backport/idss-2050
backport/idss-2050-session-pr-landing
sandcastle/worker/20261020-221737-cc96f3
backport/idss-2052
agent/issue-289
backstop-waiting-runs
sandcastle/worker/20261017-204619-942ae4
sandcastle/worker/20261017-204620-aa17c2
sandcastle/worker/20261017-144914-3ec608
sandcastle/worker/20261017-063336-7f5d31
sandcastle/rescue-20261017-062529
sandcastle/worker/20261017-010124-c49097
sandcastle/worker/20261017-003840-0c4ab1
sandcastle/rescue-20261017-054742
sandcastle/worker/20261017-053155-61c4c7
sandcastle/worker/20261017-050606-f20d66
sandcastle/rescue-20261017-052443
sandcastle/worker/20261017-050839-ec5b54
sandcastle/rescue-20261017-052212
sandcastle/worker/20261017-050442-495e4b
sandcastle/rescue-20261017-051857
sandcastle/worker/20261017-000426-34fa18
agent/issue-272
agent/issue-273
agent/issue-244
agent/issue-269
sandcastle/rescue-20261016-184726
sandcastle/rescue-20261016-184906
sandcastle/rescue-20261016-185533
sandcastle/rescue-20261016-191907
sandcastle/rescue-20261016-192219
sandcastle/worker/20261016-155725-c51ed1
agent/issue-195
agent/issue-196
agent/issue-197
agent/issue-198
agent/issue-200
agent/issue-203
agent/issue-205
agent/issue-206
agent/issue-207
agent/issue-209
agent/issue-213
agent/issue-216
agent/issue-217
agent/issue-218
agent/issue-222
agent/issue-238
agent/issue-208
sandcastle/worker/20261016-155833-1b8f77
agent/issue-241
agent/issue-230
agent/issue-239
land/issue-193
forward-port/idss-2048
backport/idss-2048
agent/issue-237
agent/issue-225
agent/issue-193
agent/issue-176
backport/1717-unclaimed-commit-gate
backport/1733-drive-yield-runlog
fix/159-rehearsal-report-token-leak
fix/157-ready-list-standdown
fix/154-verdict-no-match-trap
factory-floor-visual-rework
landing-shell-guard
No results found.
Labels
Clear labels
agent-blocked
Sandcastle hit a blocker — human resolves it, then re-adds ready-for-agent
agent-working
Claimed by a live swarm run — other hosts skip it
bug
Something is broken
deferred
Ruled defer-with-criteria: parked until a revisit criterion in the issue body fires
enhancement
New feature or improvement
landing-pr
Additive: this ticket lands ONLY by a PR with screenshots (or a waiver) that a human merges — ADR 0265. Only a human removes it.
model-haiku
Per-ticket model override (additive): run this ticket on the cheap/fast model
model-opus
Per-ticket model override (additive): run this ticket on the top-tier model
model-sonnet
Per-ticket model override (additive): run this ticket on the mid-tier model
needs-info
Waiting on reporter for more information
needs-triage
Maintainer needs to evaluate this issue
no-triage
Escape hatch: triage automation must skip this issue
priority
Additive urgency marker — the swarm queue works these first
ready-for-agent
Fully specified, ready for an AFK agent
ready-for-human
Needs the human's hands, eyes, or a one-way-door ruling (ADR 0174)
ready-for-session
Needs an interactive agent session (host creds/protected paths/live doors), not the human (ADR 0174)
wontfix
Will not be actioned
No labels
agent-blocked
agent-working
bug
deferred
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-info
needs-triage
no-triage
priority
ready-for-agent
ready-for-human
ready-for-session
wontfix
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
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.
Dependencies
No dependencies set.
Reference
Matou/dev-factory#301
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Ask (Ben, 2026-10-22)
Tickets should be picked up in the order they were filed across all consumer repos, with
priorityjumping the line, and a ready ticket should not wait for the next half-hour tick.How it works today (what the Floor's "empty ticket" cards are)
ticket/runholder with no issue yet, reads its own repo's ready set, and stands downno-ready-tasks. The Floor paints that holder as a ticket card with a dash.priority→ the rest, in the tracker's newest-first order. Step 1 (landed onmain2026-10-22 with this ticket): each group is now oldest first, so the filing date is the line within a repo.closed, the cron, and dispatch. Alabeledtrigger is not an option (#103): Forgejo delivers add and remove as onelabel_updatedaction with no label field, so every claim/release toggle ofagent-workingre-fired the workflow — 2,700 queued no-op runs on 2026-08-26.Proposal (design conversation needed — who yields to whom)
One fleet queue watcher on a pool host (a cron tick every 1–2 min, next to
backstop-tick.sh):GET /repos/issues/search?owner=<org>&state=open&type=issues&labels=ready-for-agent(minusagent-working, minus blocked-by-open-dependency — the same filters aslist-ready-tasks.sh).priorityfirst, then oldestcreated_at; drive blockers keep their precedence inside their repo.workflow_dispatchthe swarm workflow of the head ticket's repo only — the leg then runs the existing per-repo lister (now oldest-first) and claims the head. Nothing is dispatched when no slot is free, so the empty-leg noise on the Floor goes away with the cron reduced to a backstop.Interactions to rule on: the per-host leg rule (GOTCHAS 62/64), the drive-yield gate (#111), the #213 starvation yield,
schedule-backstop.sh's "already covered" guard, and whether the watcher is one host's cron or every host's (claiming already makes double-dispatch harmless, only noisy).Acceptance
priorityticket filed last is claimed first.labeledtrigger.Filed from Ben's Floor session 2026-10-22 (step 1 oldest-first lands with this ticket's number in its commit).
Triage:
enhancement+ready-for-session.Ruled by agent under ADR 0174 — veto anytime
Ruling: this is
ready-for-session, notready-for-agentand notready-for-human.Why not
ready-for-agent: the proposal's own surface is protected-path + host-standing work a swarm worker in a container must not touch:.forgejo/workflows/swarm.yml(and theclosed/cron/workflow_dispatchtrigger set) —.forgejo/is a fingerprinted protected path (protected-paths-lib.sh).backstop-tick.sh, doing an org-wide read andworkflow_dispatch— that needs a host's own cron install, dispatch credentials, and evidence directories.schedule-backstop.shis the host-side home for exactly this class of tick.A session carries that standing; the swarm queue reads only
ready-for-agent, so this is invisible to workers by construction.Why not
ready-for-human: none of the one-way-door list applies — no personal credentials, no security-posture widening, no member-facing trust accept, no data destruction, no non-routine spend. The design questions the ticket flags ("who yields to whom": the per-host leg rule / GOTCHAS 62/64, the #111 drive-yield gate, the #213 starvation yield,schedule-backstop.sh's already-covered guard, one-host-vs-every-host watcher) are revertible config/code calls, so the session that implements this rules them under ADR 0174 rather than escalating to Ben. Ben's veto stays asynchronous.Why it's a two-way door: the whole change is one cron tick + ordering/dispatch logic, reversible by a later commit or by lifting the label. Claiming already makes double-dispatch harmless (only noisy), so even the one-host-vs-every-host choice is safely revertible.
What proves it: the acceptance criteria are all offline- or probe-provable, and the ticket already demands them — "Offline tests for the watcher's ordering and dispatch decision" plus the four behavioural checks (older-ticket-first across two repos,
priorityjumping last-filed, ~2-min claim with nolabeledtrigger, no ticket-shaped idle holder). Those tests are the veto surface: if the ordering/dispatch regresses, they red.Notes for the session
issues/search?owner=usage anywhere in the harness;swarm.ymlfires strictly per-repo on:15,:45+closed+workflow_dispatch, matching the ticket's "how it works today". This is net-new.labeledtrigger (#103 — Forgejo collapses add/remove into onelabel_updatedwith no label field; it caused 2,700 no-op runs on 2026-08-26). The ~2-min claim latency must come from the new short-interval watcher tick, not a label webhook.list-ready-tasks.sh, now oldest-first per step 1) stays the claim path; the watcher only decides which repo'sswarm.ymlto dispatch. Generalise the #213 want-file mechanism ("I am starving" → "someone is ahead of me") rather than adding a second fairness rail..forgejo/workflows/swarm.yml, and a new host-side watcher alongsideschedule-backstop.sh/backstop-tick.sh.docs/journal/YYYY-MM-DD-301.md) + aSTATUS.mdsurface row, per CLAUDE.md.Ruled by agent under ADR 0174 — routing to
ready-for-humanRouting:
ready-for-session→ready-for-human. Step 1 (oldest-first within a repo) is already onmain(1aa946b, yours). I built the fleet queue watcher the proposal describes and offline-proved it, but I am not landing it onmainor closing this — because this is your design call, and the honest ADR-0174 move is to hand you the ruling with a concrete, tested proposal in front of it.Why human (not
ready-for-agent/session-decided)The triage comment (05:12Z) ruled the session could decide "who yields to whom" under ADR 0174. But 11 minutes later (05:23Z) you landed
1aa946b, whose own journal says the watcher's per-host-leg rule, drive yield and #213 yield are "Ben's design call, see Blocked on Ben", and whose STATUS entry says it "Needs Ben's ruling on who yields to whom … before it is built." A human's explicit, post-triage statement outranks the bot's ruling and reads as a pre-emptive veto on building it without you. ADR 0174 rule 2: when a ticket turns on a human's decision, stop that part and route toready-for-human. So I stopped at "built and proven, dormant, as a proposal."What I landed / preserved (all two-way doors)
mainbeyond your step 1.fleet-queue-watcher-301-proposal(pushed): a complete, offline-tested implementation you can review, run, adopt (merge + wire) or discard.fleet-queue-tick.sh— one org-wideissues/searchread; orderspriorityfirst then oldestcreated_at(the only cross-repo key); walks pastagent-working/ open-dependency-blocked candidates (bounded byFLEET_HEAD_BUDGET); dispatches only the head ticket's reposwarm.ymlby delegating toschedule-backstop.shpointed at that repo (so the "already covered" decision reuses ONE source of truth — the in-flight/queued guard, GOTCHAS 78/#238/#588); an empty fleet dispatches nothing (idle tick → no run → no holder).tests/fleet-queue-tick-test.sh— 12 offline scenarios (shimmedcurl, no network): older-repo-first;priorityjumps the last-filed line; head repo woken and only that one; blocked/claimed head skipped to the next; empty fleet dispatches nothing; an in-flight head-repo swarm suppresses.bash tests/fleet-queue-tick-test.sh→12 scenarios passed.The rulings I'd propose (so the conversation is concrete — veto any line)
HOST_NAMEcleared treats any host's in-flight leg of the head repo as "covered", so two watchers collapse onto one dispatch. Cheapest, most resilient, no single-host dependency.swarm.yml; the one-leg-per-host matrix and the per-host in-flight discrimination stay exactly as they are.labeledtrigger (#103): the ~2-min pickup comes from the tick interval, never a label webhook.Residue that is genuinely yours (the live-cron rollout)
host-state-lib.sh): a new every-host crontab line (~1–2 min), a new owned entrypoint, host-state-lib tests updated — thenonboard-host installon the pool hosts. (Touches live crontabs.)swarm.yml's:15,:45cron to a pure backstop (protected path) once the watcher is primary.Veto anytime — relabel to
ready-for-session(adopt the proposal as-is) or edit the rulings and a session will wire it.Ruling (Ben, 2026-10-22)
What that changes in the proposal above:
maxIterations: 3→1inmain.mts. A run is one slot, one sandbox, one worker, one ticket. The fleet order holds exactly, because every ticket passes through the watcher's choice — no run claims its own repo's second and third tickets ahead of an older ticket elsewhere.report_self_rearminreport-lib.sh), which today re-dispatches its own repo whenever its own ready list is non-empty. It becomes:GET /repos/{owner}/{repo}/issues/{n}/blockson the ticket just closed → the open issues it was blocking (Forgejo carries the repository per entry, so cross-repo dependants count). Keep those that areready-for-agent, notagent-working, with every other blocker closed. If any:workflow_dispatchthat ticket's repo with the ticket number as an input; the leg's lister puts that ticket first.closedtrigger; the same rule applies in that leg: dependants of the closed ticket first, then the fleet order.Reading to confirm: a dependant beats a
priorityticket in another repo (dependants first, then the queue, as worded). Cost per ticket: one dispatch + one leg (~10–20 s observed) on top of the sandbox the ticket already got.Ruled by agent under ADR 0174 — veto anytime.
This headless triage pass saw #301 as untriaged — it carries
agent-working+enhancementand no triage-state label, sopreflight-triage.sh(the source-of-truth predicate) surfaces it. Reconstructing the timeline, that's because of a deliberate maintainer action at 07:23Z, not a gap:ready-for-sessionagent-working), built + offline-proved the fleet-queue-watcher proposalready-for-human(released the claim) because the "who yields to whom" design call looked like a human-decision gatemaxIterations: 3→1inmain.mts; the "on close" step becomes the D5 self-rearm inreport-lib.shdoing a/blocksdependant-first dispatch then the fleet head; point 4 dropped)ready-for-humanand hand-addedagent-workingRuling: resting triage state is
ready-for-session(categoryenhancement, kept). Your 07:09Z ruling dissolved the human-decision gate that justifiedready-for-human— you made the design calls (run length, yield rules, the self-rearm shape). What remains is executable, and it's session-standing work, not swarm-worker work: it editsmain.mts,.forgejo/workflows/swarm.yml(a fingerprinted protected path),report-lib.sh, and wires a host cron — none of which a containerisedready-for-agentworker may touch. Soready-for-session, matching the original 05:13Z triage before the (now-cleared) gate.Why this is a two-way door: the label is additive and fully reversible, and the change itself is one cron tick + ordering/dispatch/self-rearm logic, revertible by a later commit. It's provable by the offline suite the proposal already carries (
tests/fleet-queue-tick-test.sh, 12 scenarios) plus the acceptance checks in the body. None of the one-way-door list applies.What I did — minimal and non-destructive: I added
ready-for-sessionand touched none of your labels —agent-workingstays exactly as you set it. Aready-for-sessionticket carryingagent-workingis the normal shape of a claimed session ticket, so this is coherent, and it stops #301 reading as untriaged on every future pass.Two things to flag for your veto:
agent-workingis hand-set with no backing claim (no claim-marker comment from a run after it).janitor_sweepre-arms anagent-workingticket whose claim it can't prove live — and it re-arms toready-for-agent, which would be the wrong lane for this work (swarm worker vs. the protected paths above) and would conflict with theready-for-sessionI just set. If you meantagent-workingas a transient "I'm on it" marker, fine; if you want it to rest,ready-for-sessionalone is the stable state.fleet-queue-watcher-301-proposalfrom the 05:38Z session plus your 07:09Z ruling are the starting contract.Veto anytime — drop
ready-for-session, or relabel as you see fit.#301 design analysis — ADR 0174 agent (session-runner on matou-workstation), 2026-10-22. Ruled by agent under ADR 0174 — veto anytime.
This ticket is flagged "design conversation needed — who yields to whom" and sits under Blocked on Ben in
STATUS.md. Step 1 (the ready list is oldest-first within each group) was the only unambiguous two-way-door slice, and it landed with this ticket's filing commit (1aa946b). The watcher itself turns on a set of fairness rulings reserved for a human — ADR 0005 reserves capacity/fairness judgements for a person, and ADR 0174 rule 2 stops at a one-way door. So this session did the two-way-door work that remains: proved the mechanism against the live forge, caught a gap in the proposal, and reduced each open question to a single pick — then relabelledready-for-human. Each decision below is phrased so a ruling is one choice.Feasibility, proven live (2026-10-22)
The org-wide read works — but
owner=Matouover-captures.GET /repos/issues/search?owner=Matou&state=open&type=issues&labels=ready-for-agent&limit=50returned 27 ready tickets across repos, each carryingrepository.full_name,created_atandlabels— enough to order the whole fleet in one call. Gap in the proposal (step 1): the search also returns repos that are not swarm consumers — e.g.Matou/coahad 4 ready tickets in the probe, and coa has no vendoredswarm.ymlto dispatch. The watcher MUST intersect the org read with the actual consumer set, never dispatch to any Matou repo wearing the label. See D0.Dispatch is cheap and storm-safe. The swarm workflow has no concurrency group (
cancel-in-progress: false, nogroup:— GOTCHAS 64 =UnlimitedConcurrency,.forgejo/workflows/swarm.yml:42), so a dispatch never queues behind another run; a leg that lands on a busy host yields in seconds on the heavy-slot flock (GOTCHAS 62). Storm protection is already the flocks +closed-only trigger + ready-set debounce + per-ticket claiming (GOTCHAS 32/35). Repeated/overlapping dispatches are tolerable by design — the cost is noise, not safety.The dispatch call already exists.
schedule-backstop.sh:176-179doesPOST /actions/workflows/swarm.yml/dispatches {"ref":"main"}per repo, guarded by (a) an in-flight read ofactions/tasks(waiting/running/started-in-window, per-host name match — GOTCHAS 62 / #238) and (b) a queued-run read ofactions/runs?status=waiting(GOTCHAS 78). The watcher should reuse this path per head repo, never reimplement the guard.Decisions for Ben (each a single pick)
D0 — Consumer-set filter (new, from finding 1). The watcher dispatches only repos that are swarm consumers.
backstop-tick.shalready loops over — and intersect it with the org read. No product strings in the harness (CLAUDE.md); the list is host/identity config.D1 — What "the head's repo" actually buys. Dispatch is per-repo and fans to every host as per-host legs (GOTCHAS 62); the watcher can only choose WHICH repo to wake, not which ticket — the woken repo's
list-ready-tasks.sh(now oldest-first) picks the head ticket. So "fleet head" = the repo whose head ticket is fleet-first; dispatch it, the leg claims it.prioritythencreated_at, drive-blocker precedence stays strictly within-repo; (b) drive blockers are a fleet-global top tier abovepriority. Recommend (a) — a drive blocker already front-runs its own repo's queue, and the repo is dispatched by its head's fleet rank.D2 / D5 — "When a slot is free" = which host, and one watcher or every host's. Slots are per-host flocks (
host-capacity-lib.sh, 2 by default); a dispatch wakes all hosts; the host with a free slot claims, others yield cheaply. So "dispatch when a slot is free" cannot target a host — it means "dispatch when SOME consumer-serving host has a free heavy slot."elitebook-03) runs the watcher and reads a fleet-aggregated free-slot view (the collector already builds host occupancy for the Floor). Fewer dispatches, but a SPOF and a new cross-host read.D3 — Drive-yield gate (#111). A drive reservation holds host capacity; a dispatched leg already yields to it mid-run (
list-ready-tasks.sh:47-52answers[]on/run/host-signals/drive-wanted). Under Option A the watcher's local free-slot probe reads the samehost_capacitypool the drive reserves (exclusive, or slot-1 underdrive-exclusive slot), so a drive already shows as "no free slot."host_capacityread, not a naive count.D4 — #213 generalisation (the deepest call). Today #213 is reactive: a repo writes a want-file after 3 starved ticks (
swarm-yield-signal.sh); peers' legs answer[]and free the slot (list-ready-tasks.sh:75-85). Step 4 proposes generalising to "someone is ahead of me": a leg consults the fleet head and stands down if another repo holds the older/higher ticket.D6 — The :15/:45 cron and the Floor empty-leg noise. The watcher (1–2 min) becomes the primary pickup; the ticket wants the cron reduced "to a backstop" so the empty holders stop. But those holders are the per-host legs each writing a
ticket/runholder (run-swarm.sh:190,ref=run) before standing downno-ready-tasks— they come from EVERY scheduled run. The watcher only dispatches a repo with a ready head AND a free slot, so watcher-driven runs rarely stand down empty; the empty holders come from the unconditional :15/:45 cron.backstop-tick.sh+report_self_rearm.Why not just a
labeledtrigger (settled, not re-opened)#103 / GOTCHAS 32: Forgejo delivers a label add and a label remove as one
label_updatedaction with nolabelfield, firing on everyagent-workingtoggle — 2,700 no-op runs on 2026-08-26 (swarm.yml:3-12). The watcher's polling cron is the accepted alternative; it honours this by polling, never triggering.Acceptance mapping (how the recommended design meets each AC)
created_atascending).priorityfiled last claimed first →list-ready-taskspriority tier + fleet priority-first.labeledtrigger → watcher cron 1–2 min, polling (see #103).Why human
The build turns on rulings reserved for a human (ADR 0005: capacity/fairness judgements; ADR 0174 rule 2): D2/D5 (every-host vs one-host watcher and how free-slot is read), D4 (reactive vs proactive fleet yield and the slot-utilisation trade-off), and D6 (whether/when to cut the :15/:45 cron). These shape the whole mechanism and interact with the per-host leg rule (GOTCHAS 62/64), the #111 drive yield and the #213 peer yield; building before the ruling risks churn and a storm-class regression — the very #103 / GOTCHAS 78 failure mode this ticket is careful about. The two-way-door work is done: feasibility proven against the live forge, the consumer-set gap caught (D0), and each question reduced to a pick. Relabelled
ready-for-session→ready-for-human.(D0 is also fileable as a standalone follow-up regardless of the larger ruling — the watcher cannot be correct without it.)
Built and landed on
main—ea10102(ADR 0007,docs/journal/2026-10-22-301-landed.md)Ben's ruling, as code:
main.mtsmaxIterations: 1.fleet-queue.shoverfleet-queue-lib.sh, vendored) runs from a host cron every two minutes (queue-schedulein the host registry →<home>/factory-cron/fleet-queue-tick.sh). When the host has a free pooled slot, no drive reservation and no dispatch in flight, it runs every registered repo's OWNlist-ready-tasks.shin parallel, merges them, orders fleet-wide (priority/drive blocker →created_at→ number), promotes the dependants of recently closed tickets (Forgejoblocks, any repo), caches the order on the host, andworkflow_dispatches the head's repo withinputs.ticket+inputs.host.inputs.hostbefore any slot; the dispatched leg works exactlyinputs.ticket(mirrored into the sandbox as/run/host-signals/fleet-pick; the lister answers it or[]) or stands downfleet-pick-gone.after-close <slug> <n>: close recorded on the host, dependants promoted, the pick dispatched to the same host with no slot gate. Aclosed-event leg records the close too, so a human's close promotes on the next tick.closedlegs are backstops reading the host cache: head elsewhere →fleet-head-elsewhere; head here → work it; no cache → the pre-#301 path. The slot holder is written only once a leg has a ticket, so idle ticks leave no "empty ticket" card on the Floor.The design analysis's picks, as built: D0 the fleet is the host registry's repo set (no org-wide search, so no
coaover-capture); D1 the watcher picks the ticket, not just the repo; D2/D5 every host watches for itself and dispatches to itself; D3 the watcher probes the same pool the drive reserves; D4 the #213 yield stands as it was (the cache gate adds the proactive half); D6 the :15/:45 cron stays as a backstop.Tests:
tests/fleet-queue-lib-test.sh(37),tests/fleet-queue-test.sh(22), new cases in the lister, schedule-lib, report-lib, run-swarm-stages, run-swarm-drive-yield, onboard-lib and host-state-lib suites; the full offline loop is green. No Actions API read (the #28 ratchet holds).Rollout — owed, pull-only, human (relabelled
ready-for-human)FACTORY_REFand this repo's self-pin toea10102+.swarm.yml(onboard.sh workflows …) — the dispatch inputs and the host stand-down.onboard-host enrolon each pool host — thequeue-schedulecron line and the generatedfleet-queue-tick.sh.Until a host is re-enrolled its legs run the pre-#301 path; until a consumer is re-rendered a dispatch for it fires every host's leg (today's behaviour). Acceptance (older ticket first across repos,
prioritylast-filed first, ~2 min pickup, no empty holders) is checkable live once all three are done.FORGEJO_API=prefix assignment, from #301) #303