A second build dispatch fails the queued one: kit build N+1 != N (whakatohea-demo builds 8/9) #166
Labels
No labels
agent-blocked
agent-working
bug
deferred
enhancement
model-haiku
model-opus
model-sonnet
needs-info
needs-triage
no-triage
priority
product-decision
ready-for-agent
ready-for-human
ready-for-session
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/coa#166
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?
Symptom (whakatohea-demo, 2026-09-25)
rebuild whakatohea-demodispatched build 8 at 19:14Z. At 19:24Z a second dispatch made build 9, from an unknown source (a second rebuild, or IDSS's community-app card try again). The only coa-builds runner (bens-mac-04, one job at a time) picked up build 8 at 19:40Z. It failed in 7 s at prepare:::error::kit build 9 != 8(coa-builds run 21). Build 9 (run 22) then succeeded. Nothing was lost, but the failure callback reported a real-looking failure for build 8, and a steward watching the build sees red.Cause
startBuild(server/src/build-pipeline.ts) computesbuild = status.build + 1, rewritescommunities/<slug>/kit.jsonwith the new number, dispatches, and setsstate: building. It does not check whether a build is already queued or running. The runner fetcheskit.jsonat run time and refuses a mismatch (coa-builds scripts/forgejo/coa-build.sh:kit build $kbuild != $BUILD). So any second dispatch before the first run's prepare stage makes the first run fail. With one runner and ~20 min builds, that window is wide.Want (pick one; proposed default: 1)
status.state === 'building',startBuild/rebuildreturn the in-flight build number (asrebuildalready does when it readsbuildingback) and dispatch nothing. The operator page and the IDSS card show "building (build N)". Add a staleness escape: abuildingolder than, say, 2 h may be superseded.Either way: a regression test for two dispatches in a row that leaves exactly one build that can succeed, with no failure recorded for the other.
Also worth knowing: who dispatched build 9. Check the server log or
/api/submitand the build-trigger callers for 19:24Z.🤖 Generated with Claude Code
swarm-claim host=matou-dev-server-01 run=12429
(automated multi-host claim — lowest live claim id works this ticket)