server: TenantProvisioner — coa-shared tenant via POST /admin/tenants (phase-3 plan Task 3) #70
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#70
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 3.Deliverable
server/src/tenant-provisioner.ts:TenantProvisioner.provision(slug) → {ok:true, configUrl} | {ok:false, error};httpProvisioner({adminUrl, token, publicUrl, fetch})POSTs${adminUrl}/admin/tenants{slug}withAuthorization: Bearer, 201 and 409 succeed withconfigUrl = ${publicUrl}/${slug}, other statuses/network errors →{ok:false, error:'<status> <body≤200>'};staticProvisioner(publicUrl).AppDeps.provisioner;defaultDeps()picks http whenCOA_SHARED_ADMIN_TOKENis set (envCOA_SHARED_ADMIN_URL,COA_SHARED_PUBLIC_URL), else static. Testserver/test/tenant-provisioner.test.ts(plan text).Acceptance
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. TenantProvisioner (http + static); AppDeps.provisioner wired env-gated.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/tenant-provisioner.test.tswithfetchinjected — no real network, andstaticProvisioneris the default whenCOA_SHARED_ADMIN_TOKENis unset.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.
Ruled by agent under the two-way-door doctrine — veto anytime. The deliverable is fully on
main(worker commit6c5261e; files + tests +AppDepswiring verified; seam green on1724dcb), but the worker died before its close-report and its PR was a fully-merged shell (now closed). Closing so the ready list unblocks #74. Proof:pnpm -r typecheck && pnpm -r testgreen on the main head.