server: startBuild — provision, kit.json, dispatch; /api/submit phase-3 tail (phase-3 plan Task 7) #74
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.
Blocks
Depends on
Reference
Matou/coa#74
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?
Plan
docs/superpowers/plans/2026-08-31-coa-phase-3.mdTask 7.Deliverable
server/src/build-pipeline.tsstartBuild(slug, deps: Pick<AppDeps,'store'|'provisioner'|'dispatcher'|'publicUrl'>): Promise<Status>— configUrl (self-hosted URL, else provision; failure →tenantError, return) →build = (status.build ?? 0)+1→writeKit→ dispatch (failure →buildError,configUrlkept,buildNOT stored) →patchStatus({state:'building', build, configUrl, errors cleared})./api/submitcalls it after publish (route comment says phase 3).AppDepsgainsnotifyEmail(COA_NOTIFY_EMAIL),webhookSecret(BUILD_WEBHOOK_SECRET). UpdateCLAUDE.mdphase line,.env.example,docs/SECRETS_CHECKLIST.md(plan text). Testsserver/test/build-pipeline.test.ts+ submit tests appended (plan text).Acceptance
building; self-hosted → provisioner never called; provision failure →page-ready+tenantError, no kit, no dispatch; dispatch failure →page-ready+buildError, retry dispatches build 1; rebuild → build 2./api/submitstill 200 on any provision/dispatch failure.pnpm -r typecheck && pnpm -r test && make e2egreen (e2e still asserts phase-2 facts only).depends_on
Phase gate
Feature toggles / nav order in builds are phase 4. Never delete or rewrite anything under
communities/(ADR 0002/0003); phase 3 rewrites onlykit.json,status.json,index.html. No test reaches the real network, sends real mail, dispatches a real build or provisions a real tenant.Ruled by agent under ADR 0174 (two-way-door doctrine) — veto anytime
Ruling:
ready-for-agent. startBuild() pipeline + /api/submit phase-3 tail; provision/dispatch failures non-fatal.Why this is a two-way door: it is revertible by a later commit or label change, and provable by the tests the plan specifies — which never reach the real network, send real mail, dispatch a real build or provision a real tenant. It is not on the one-way-door list: the credential bytes, real GitHub dispatch/release and live coa-shared tenant are already carved out into the human ticket #79 and the session tickets #80/#81; env-gated defaults keep the wired code inert (noop/static, 503/unconfigured) until those land.
What proves it:
server/test/build-pipeline.test.ts+ appended submit tests (all deps stubbed);/api/submitstill 200 on any failure;make e2estill asserts phase-2 facts only.The ticket body is a complete agent brief (Deliverable / Acceptance / depends_on). The native Forgejo dependency links already mirror the plan's graph, so the swarm ready-list filter holds this ticket until its blockers close.
swarm-claim host=matou-dev-server-01 run=1464
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #74 — status
success⛔ close-report gates REFUSED this close — the following claims did not verify:
envelope
close-report for #74 — status
success⏳ close-report gates passed — every claim verified against the PR head; PR #105 (#105)'s required checks are not all green yet, so it was NOT merged (MERGE_AUTHORITY=agent-after-green). A later reconcile pass merges it once green.
envelope
close-report for #74 — status
success✅ close-report gates passed — every claim verified against the PR head; PR #105 (#105) is green and was merged (agent-after-green); the issue closed via
closes #74.envelope