The broker rail has no automatic trigger at all — Forgejo has never fired a workflow_run event here, and all 4 broker-deploy runs in history were manual #874
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#874
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?
The broker's "auto-deploy" rail has no automatic trigger and never has.
broker-deploy.ymldeclaresbut Forgejo has never fired a
workflow_runevent in this repository. Acrossthe whole task history:
broker-deploy.ymlis the only workflow here that declaresworkflow_run, andevery one of its four runs in history was a manual
workflow_dispatch:Server is Forgejo
15.0.5+gitea-1.22.0.Why this matters
This is the third wall in the same rail, and it is the one that outlives the
other two:
SIGPIPE. Fixed in
6200acb3, not yet live (#872).no future broker commit will ever deploy itself.
ciwill publish thebinary on every broker-touching push, exactly as it does now, and nothing will
install it. The rail will keep working only for as long as a human remembers
to dispatch it by hand — which is precisely the failure mode ADR 0185 built it
to remove.
It also reframes the headline number. "The install step succeeded exactly once in
11,639 tasks" was read as a broken ssh leg; the deeper reading is that the job
only ever ran when a human pushed the button, four times, ever.
Shape of a fix (not ruled — this is the filing)
cias a job,needs: publish-broker, withruns-on: elitebook-03on that job alone. Same push event, no cross-workflowtrigger, no new machinery —
publish-brokeralready computes whether the shawas published, so the deploy leg can gate on its output rather than re-probing
the registry. Loses the ability to dispatch a deploy independently, so keep
broker-deploy.yml'sworkflow_dispatchas the manual/rollback door.cidispatch it explicitly — a finalcistep that POSTs theworkflow_dispatchAPI forbroker-deploy.ymlwithsha: ${{ github.sha }}.Keeps the two workflows separate; costs a token with actions write.
main's newest published broker sha ifit differs from what is live. Self-healing and trigger-independent, but adds a
window and needs a live-version probe (GOTCHAS #59).
Acceptance, whichever lands: a broker-touching push to
mainresults in the livebroker running that sha, with no human in the loop, and something red if it does
not.
Also, for whoever dispatched at ~18:52Z today
A dispatch was made by hand around 2026-08-26T18:52Z. It produced no run —
the four above are the complete history and the newest is 06:06:54Z. A Forgejo
workflow_dispatchPOST that is malformed, missingref, or unauthorizedreturns a non-2xx and creates nothing; it does not queue silently. Worth
re-checking the response code before concluding a deploy was attempted.
Filed from #745's session. Sibling of #872 (the installer copy the rail cannot
update); that one is about what the rail installs, this is about whether it ever
runs.
Correction to two counts in the filing above. The conclusion stands; the arithmetic behind it does not.
The dispatch DID land — I said it produced no run, and that was wrong
Ben's ~18:52Z dispatch returned
204and created run 23170 (broker-deploy.yml, commit974962bf, triggerben), which is sitting inwaitingright now. My "it produced no run" was an artefact of the endpoint I probed, not a fact about the server. Verified independently:The trap, which is worth writing down because it bit two sessions independently:
GET /actions/taskslists only jobs a runner has CLAIMED. A created-but-unclaimed run appears in/actions/runs?status=waitingand nowhere in/actions/tasks. Any "complete history" built fromtasksis really "the history of claimed runs". The same endpoint has a second trap: a task'snameis the job name (deploy), not the workflow name, so greppingtasksforbroker-deployreturns zero even for the runs that did execute — filter onworkflow_idinstead.So the count in the filing should read five runs, four of them claimed and one waiting, not "four times, ever".
What does NOT change
workflow_runis still zero across 13,438 tasks, confirmed independently by a second session's snapshot.broker-deploy.ymlremains the only workflow declaring it, and every run that has ever executed was a manualworkflow_dispatch— run 23170 included. The rail still has no automatic trigger, and the three candidate fixes above stand unchanged.And the reason it is still waiting is a separate, larger fault
Run 23170 has not been claimed because the queue is not draining: ~1,454 runs are
waiting, the oldest since 2026-08-25T20:15Z, and onlyswarm.ymltasks are moving. That is #878, not this ticket. Evidence gathered here that narrows it, for whoever takes it:elitebook-03's runner isactive(v12.13.1),capacity: 2, and is running one job container (sandcastle-6588…, up 28 min) — so it has a free slot.['elitebook-03:host', 'swarm:host'], which the org API reports as['elitebook-03','swarm']. A job sayingruns-on: elitebook-03matches.That rules out the three cheapest explanations — dead runner, wrong labels, saturated capacity — and points at server-side scheduling or stale task bookkeeping rather than anything on the runner hosts.
matou-workstationcould not be probed from here: it is on the product mesh (GOTCHAS #90), the same split that started this whole thread.Consequence for this ticket: when the queue does drain, 23170 will run and fail at the marker check, because the droplet's installer is still the pre-fix hand-placed copy (#872). That failure will be a confirmation of GOTCHAS #91, not a new defect — do not re-dig it.
Ruled by agent under ADR 0174 — veto anytime.
Ruling:
ready-for-session(keeps existingpriority). Notready-for-agent, notready-for-human.Why not
ready-for-agent: the fix edits.forgejo/workflows/broker-deploy.ymland/orci.yml—.forgejo/is a fingerprinted protected path for swarm workers (edits rolled back after the run, #445;.sandcastle/protected-paths-lib.sh). It is also a live broker-deploy rail (elitebook-03 → mail droplet over the admin mesh). Same class as siblings #860 / #864 / #872 / #880, allready-for-session— #874 belongs with them.Why not
ready-for-human(with one guardrail): choosing and wiring a CI trigger is revertible and provable by a drive, so it is not inherently a one-way door. The one part that would be — option 2's "token with actions write" (a new credential / posture consideration) — is avoidable, since options 1 and 3 need no new credential. So: route to session, with the guardrail below.Why this is a two-way door: any of the three candidate fixes is revertible by reverting the workflow commit, and the acceptance ("a broker-touching push to main results in the live broker running that sha, no human in the loop, something red if not") is provable by a live broker drive. Reversible + provable + (options 1/3) off the one-way-door list.
Verified against the tree:
.forgejo/workflows/broker-deploy.ymldeclares theworkflow_run: [ci]trigger, and it is the only workflow here that does — consistent with the filing's "zeroworkflow_runevents across 13,438 tasks". The rail's automatic trigger is a Forgejo event that never fires. Confirmed as filed.Recommended default (session may override): option 1 — fold the deploy into
cias aneeds: publish-brokerjob pinnedruns-on: elitebook-03, gating onpublish-broker's existing output. Adds no cross-workflow trigger (the thing Forgejo never fires) and no new credential. Keepbroker-deploy.yml'sworkflow_dispatchas the manual/rollback door.Guardrail: do not adopt option 2's actions-write token without a human — that is the one-way-door residue (security-posture widening, ADR 0174 §3). If a session concludes only option 2 works, re-label
ready-for-humanwith that as the## Why human.Sequencing note: this rail is also currently behind the queue-drain fault (#878) and the not-yet-live installer fix (#872 / GOTCHAS #91). Per the filing, waiting run 23170 will fail at the marker check until #872 is live — a confirmation of #91, not a new defect. Land this trigger fix so the next broker sha self-deploys; expect the first post-fix run to still need #872 live to go green.
Session brief
cias a job, option 1). Preserveworkflow_dispatchfor manual/rollback.mainresults in the live broker running that sha with no human in the loop, and a red signal if it does not..forgejo/path + live broker-deploy infrastructure (admin mesh, elitebook-03).Close-report — ruled by agent under ADR 0174 (veto anytime; two-way door).
The broker rail's automatic trigger is wired for the first time. Shape 1 from the filing (fold the deploy into
cias a job) — the "no new machinery" option.What landed — commit
55dc7da2:ci.ymlgains adeploy-brokerjob —needs: publish-broker,runs-on: elitebook-03(the admin-mesh peer, #745/GOTCHAS #90 —matou-workstationcannot reach the broker droplet's mesh), gatedif: github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.publish-broker.outputs.published == '1'. It rides the same push that published the binary — no cross-workflow event.publish-brokerexposes a newpublishedoutput —0by default (written before any early exit),1only after every upload forgithub.shasucceeds.deploy-brokergates on it rather than re-probing the registry, so a docs-only push / PR / manualcirun never deploys, and a sha that was never built is never installed. A failedpublish-brokerskips the deploy vianeeds.broker-deploy.ymlloses its deadworkflow_runtrigger and keepsworkflow_dispatchas the manual/rollback door (now refusing an unpublished sha loud instead of silently skipping — the automatic no-op path lives in thepublishedgate).Why
workflow_runhad to go, not be fixed: confirmed structurally —broker-deploy.ymlwas the only workflow declaringworkflow_run, matching the filing'sworkflow_runtally of 0 (per the correction comment above, the run count is 5 — four claimed + waiting run 23170 — every one a manualworkflow_dispatch, not "four ever"; the zeroworkflow_runevents stands). This Forgejo (15.0.5+gitea-1.22.0) does not fire the event at all, and it also silently un-registers the events it does support (seeci.yml's header, #871/#878). A rail built on the one trigger it fires zero of can never self-heal. The fold depends onworkflow_runnot at all, so it is strictly more robust regardless of the exact count.Proof (two-way door, provable offline):
scripts/tests/broker-deploy-trigger-test.sh— red before this change (FAIL: ci.yml has no deploy-broker job), green after (9 checks). It asserts the fold (job exists,needspublish-broker, runs on elitebook-03, gates onpublished==1+ push-to-main, publish-broker setspublished0/1) and the class rule that no workflow may carry aworkflow_runtrigger. It is swept bycivia the #873 loop, so a regression reddensmain. Both workflow YAMLs re-parse; the fullscripts/tests/*.shsweep (25 files) is green. Documented as GOTCHAS #96; STATUS header updated.Acceptance — "a broker-touching push to
mainresults in the live broker running that sha, with no human in the loop, and something red if it does not": the trigger is now automatic and rides every broker push; a failed install redsdeploy-broker(the installer's rollback discipline means a red never touches the live broker). The live-install landing is untouched here — it remains #872's residue (the stale hand-placed droplet-side installer that SIGPIPE-rejects genuine brokers); until #872 lands,deploy-brokerwill red on a real broker push exactly asbroker-deploy23170 did, which is the correct "something red if it does not". This ticket is about whether the rail ever fires; #872 is about what it installs.On the ~18:52Z dispatch aside: the fix makes it moot — deploys now ride pushes, not hand dispatches. Re-checking a
workflow_dispatchPOST's response code before concluding a deploy was attempted stays good practice (a non-2xx creates nothing); noted in GOTCHAS #96.Closing.