#166 — startBuild refuses a rebuild while one is in flight #167
No reviewers
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/coa!167
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "agent/issue-166"
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?
closes #166
Closes #166.
What
startBuild(server/src/build-pipeline.ts) now refuses to dispatch while a build is already in flight (the ticket's proposed default, option 1). Whenstatus.state === 'building'it dispatches nothing, rewrites nokit.json, and returns the in-flight status untouched — sorebuild/triggerBuildhand back "building (build N)".Why
A second dispatch before the first coa-builds run's prepare stage rewrote
kit.jsonto build N+1. The runner fetcheskit.jsonat run time and fails any run whose number moved on (kit build N+1 != N), so the first, still-queued build N went red for a build that was never lost (whakatohea-demo builds 8/9, coa-builds run 21).Details
BUILD_STALE_MS(2 h): abuildingolder than the window (a dead runner) may still be superseded./api/submit's same-address rebuild path already refused an in-flight slug (idss#1855); this closes the same gap formake rebuild/make build-appand any otherstartBuildcaller.buildingis superseded. The existing "bumps the build number on rebuild" test now completes the prior build first./api/submitrebuild path already declined an in-flightbuildingby name, so the duplicate came from anotherstartBuildcaller (a secondmake rebuild/build-appor the IDSS card try again) — exactly the gap this closes.Tests
pnpm -r typecheckandpnpm -r testgreen (server 133, site 72).Screenshots: none — server/schema seam change with no UI surface; verified by Vitest regression tests.
🤖 Generated with Claude Code