session: add the dev-factory #26 per-repo concurrency group to .forgejo/workflows/{swarm,triage}.yml #705
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#705
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?
Consumer follow-up to dev-factory #26 (ADR 0001 pull-only)
dev-factory #26 added a per-repo workflow-level
concurrencygroup to theswarm/triage workflow templates so a triage mass-label or a burst of
closedevents collapses to one running + at most one queued run instead of a matrix
storm (71 dev-factory + 73 idss no-op swarm jobs in one hour were observed).
The factory is pull-only: this repo renders its own copies of the workflows,
so the change lands here as a separate re-render, not a push from dev-factory.
Ask
Re-render (or hand-apply) so
.forgejo/workflows/swarm.ymlcarries:and
.forgejo/workflows/triage.yml:placed at workflow level (after
on:, beforejobs:).cancel-in-progressMUST stay false — a live worker's run is never cancelled by a later event.
.forgejo/is a protected path, so this needs a session standing.Acceptance
.forgejo/workflows/{swarm,triage}.ymlcarry the concurrency block.ready-for-agentlabel events yields one running + at mostone queued swarm run (verify live).
Upstream: Matou/dev-factory#26
close-report for #705 — status
successRuled by agent under ADR 0174 — veto anytime. Two-way door: a revertible
workflow key that only narrows when runs execute; no security-posture change,
no credential, no spend, no data touched. Proved by an offline test plus a live
A/B on the real runner pool.
.forgejo/is a protected path, which is why thisneeded a session standing rather than a swarm worker.
What landed
.forgejo/workflows/swarm.ymlandtriage.ymlnow carry a workflow-levelconcurrencyblock betweenon:andjobs:, hand-applied fromMatou/dev-factory@d3288d4'sonboarding/templates/workflows/{swarm,triage}.yml.tmpl(ADR 0001 pull-only — the factory does not push, so this was a re-render, not a
sync):
Groups are keyed distinctly so the two heavy flows queue independently — they
already coordinate on the shared host-capacity slots (#577 / ADR 0184), not on
this group.
cancel-in-progressisfalseand guarded against ever flipping.New offline guard
scripts/tests/workflow-concurrency-test.sh(red beforegreen — first run: "swarm.yml carries no workflow-level concurrency block
(#705)"; now 8 checks pass). It asserts the block is at workflow level
(column 0, after
on:, beforejobs:— indented under a job it would apply permatrix leg instead of per run), that each group is per-repo and distinct from
the other workflow's, that
cancel-in-progressisfalse, and cross-checks allof it against the parsed YAML document (including that no job declares its own
concurrency).Acceptance
1. Both workflows carry the concurrency block — yes, verified on
origin/main.2. "A burst of three
ready-for-agentlabel events yields one running + atmost one queued swarm run (verify live)" — verified live, with one honest
amendment to the wording (below).
Three
ready-for-agentlabel events fired in the same second onto closedissues (#708/#706/#703 —
list-ready-tasks.shqueriesstate=open, so each runis a guaranteed no-op; the labels were removed afterwards, all three issues are
back to their original sets). Result — runs 9346/9347/9348, strictly serial:
Across every post-change swarm run there is zero cross-run overlap. The
pre-change contrast is the storm itself: live worker run 9326 (
16:39:32 -> 17:01:07, 22 minutes) was overlapped by nine other swarm runs.That alone was not proof, because
matou-workstation'sforgejo-runneriscapacity: 1— it could not have overlapped them either way. So an A/B probepair ran on the multi-capacity
swarmpool, threeworkflow_dispatches eachfired in the same second (
17:21:19Z), one arm with the group and one without:concurrency)17:21:20->:53; 9358 and 9359 both17:21:54->17:22:27concurrency-probe-${{ github.repository }})17:21:20->:53; 936017:22:28->17:23:01; 936117:23:02->:35Same pool, same second: the control arm overlapped, proving capacity >= 2 was
available; the grouped arm never once overlapped. Workflow-level
concurrencyis honoured by this instance (Forgejo v15.0.5; the feature landed in Forgejo
v14.0). All three grouped runs finished
success— socancel-in-progress: falseis confirmed too: a later run never kills an earlier one.The two probe workflows were added and deleted inside this session
(
5ec90b0c->8b951784->33a0e88c);.forgejo/workflows/is back to itseight real workflows.
The amendment
The acceptance line says "at most one queued". That is GitHub's semantics.
Forgejo implements
cancel-in-progress: falseas queue behind, not "keep atmost one pending" — it queues every superseded run rather than collapsing the
pending set. A burst of three therefore gives one running + two queued.
Nothing is dropped and nothing runs in parallel, so the effect #26 was bought
for — the matrix storm — is gone; the queue itself is not collapsed. Flagged
upstream as
Matou/dev-factory#38so the consumers still owing this change(
Matou/dev-factory#32,matou-app#79) do not read "three runs queued" as afailed verification. I have taken the substance of the criterion as met and the
wording as inherited from the upstream ticket; veto if you read it the other
way.
Commits (all on
main)840c6674— the concurrency block on both workflows + the offline guard +STATUS.md5ec90b0c,8b951784,33a0e88c— probe up, A/B on the swarm pool, probedown
349b0ee3—STATUS.md: the live evidence and the semantics amendmentSTATUS.mdcarries the header note and a milestone-log entry. No secretswritten; nothing outside
.forgejo/workflows/,scripts/tests/andSTATUS.mdwas touched.