#74 server: startBuild — provision, kit.json, dispatch; /api/submit phase-3 tail #104
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!104
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "sandcastle/worker/20260831-214228-ce6788"
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?
Implements #74 — Task 7 of the phase-3 plan.
server/src/build-pipeline.tsstartBuild(slug, deps): config URL (self-hosted URL, elseprovisioner.provision; failure →tenantError, no kit, no dispatch) →build = (status.build ?? 0)+1→writeKit→dispatcher.dispatch(failure →buildError,configUrlkept,buildnot stored) →patchStatus({state:"building", …})./api/submitcalls it after publish and returns its status; still 200 on any provision/dispatch failure.AppDepsgainsnotifyEmail/webhookSecret.Tests:
server/test/build-pipeline.test.ts(6) + submit phase-3 tail.pnpm -r typecheck && pnpm -r testgreen. e2e not in the CI seam; phase-2 facts unaffected.🤖 Generated with Claude Code
server/src/build-pipeline.ts adds startBuild(slug, deps): config URL (self-hosted URL, else provisioner.provision — failure → tenantError, no kit, no dispatch) → build = (status.build ?? 0)+1 → writeKit → dispatcher.dispatch (failure → buildError, configUrl kept, build not stored) → patchStatus ({state:'building', …, errors cleared}). Never throws for provision/dispatch failures. /api/submit calls it after publish and returns its status; still 200 on any failure. AppDeps gains notifyEmail (COA_NOTIFY_EMAIL, default notify@mail.matou.nz) and webhookSecret (BUILD_WEBHOOK_SECRET, default ''). Tests: server/test/build-pipeline.test.ts (6) + submit.test.ts phase-3 tail (shared→building+kit+dispatch; dispatch-fail→200 page-ready+buildError); existing submit success assertions now expect state 'building'. Docs: CLAUDE.md phase line → phase 3; .env.example phase-3 builds/coa-shared block; docs/SECRETS_CHECKLIST.md COA_SHARED_ADMIN_TOKEN + coa-builds repo secrets. STATUS.md milestone log entry. Verified: pnpm -r typecheck && pnpm -r test green. make e2e not runnable in sandbox (no root to install browser system libs; e2e is not in the CI seam and phase-2 facts unaffected — index.html still rendered at page-ready). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>