server: make rebuild / provision / resend KIND= (phase-3 plan Task 9) #76
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.
Depends on
Reference
Matou/coa#76
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 9.Deliverable
server/src/cli/rebuild.ts(rebuild(slug, deps)→{ok, build}|{ok:false,error}viastartBuild),server/src/cli/provision.ts(refusesalready provisionedwhenconfigUrlset withouttenantError; else clearsconfigUrland runsstartBuild),resend(slug, deps, kind='page-ready'|'installers-ready')(installers-ready needsreleaseUrl). package.json scripts, Makefile targetsrebuild,provision,resend SLUG= KIND=, README lines. Tests (plan text).Acceptance
make rebuild SLUG=x/make provision SLUG=xexit 1 withfailed: no community: xon an unknown slug.pnpm -r typecheck && pnpm -r testgreen.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. CLI rebuild / provision / resend KIND= + Makefile targets.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: appended CLI tests;
make rebuild/provision SLUG=xexits 1 withfailed: no community: xon an unknown slug;pnpm -r testgreen.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=1465
(automated multi-host claim — lowest live claim id works this ticket)
Ruled by agent under the two-way-door doctrine — veto anytime
Implementing Task 9 I hit three bugs in the plan's literal text and corrected them to their evident intent. All three are two-way doors — revertible by a later commit and proven by the green suite; none touch the one-way-door list (no credential bytes, real dispatch/release, live tenant,
communities/data, or contract change).Makefilerebuildtarget collided with a pnpm built-in. The plan'srebuild: ; pnpm --filter @coa/server rebuild $(SLUG)invokes pnpm's built-inpnpm rebuild(rebuilds native deps), which exits 0 without ever runningsrc/cli/rebuild.ts. Fixed by forcing the script:pnpm --filter @coa/server run rebuild $(SLUG)(addedrunto all three CLI targets for consistency). Proof:make rebuild SLUG=x/make provision SLUG=xnow run the script and printfailed: no community: x(CLI + pnpm exit 1; GNUmakereports the failed recipe and exits 2, its standard code for any non-zero recipe).Plan CLI tests asserted cleared fields via
toMatchObject({ error: undefined })/{ tenantError: undefined }on disk-read statuses. zod omits absent optional keys and Vitest'stoMatchObjectfails on an absent key, so these can never pass. Rewrote to the repo's own convention (resend.test.ts:28,community-store.test.ts:47): assert the field with.toBeUndefined()on the property — same intent (the field was cleared), passing.rebuild"reports a dispatch failure" test usedstaticProvisioner('x').FIXTURE_SUBMISSIONhas asharedbackend, sostartBuildprovisions andKitSchema.configUrl(.url()) rejectsx/ngati-example, throwing inwriteKitbefore dispatch is reached — the test can never observe the401. Changed tostaticProvisioner('http://coa-infra.test')(the valid URL used by the neighbouring Task 7 tests) so dispatch runs and the401is reported as intended.CLI behaviour, semantics, and acceptance are unchanged; only buggy scaffolding was corrected.
pnpm -r typecheck && pnpm -r testgreen.close-report for #76 — status
success⛔ close-report gates REFUSED this close — the following claims did not verify:
envelope
close-report for #76 — status
success✅ close-report gates passed — every claim verified against main; PR #111 (#111) was already merged (a reconcile pass landed it before this close-report ran) and the merge closed this issue via
closes #76.envelope