#148 release door POST /api/release frees a community's name on its IDSS claim secret #149

Merged
matou-build-agent merged 1 commit from agent/issue-148 into main 2026-09-24 06:09:35 +00:00

closes #148

closes #148
The door (idss ADR 0276, option A on idss#1805): body {slug}, Authorization:
Bearer <the community's claim secret>. Coa never learns the secret — it verifies
through the broker (POST /v1/subdomains/verify {host:"<slug>.idss.nz"}; 204=ok,
403/404=forbidden, unreachable/5xx=broker-error). On 204 it frees the name:
rm -rf communities/<slug>/ (tolerant of a dirty status.json, GOTCHAS 14) and the
per-slug hosted installers, then commits `release: <slug>` via the publisher chain
and pushes. Idempotent — existence is checked before the broker, so an unknown or
already-freed slug answers 404 and never 500s. A released mid-build slug's
build-complete callback 404s and is ignored (existing unknown-slug path).

Decisions:
- Validation lives in the schema (ReleaseRequestSchema, strict; secret never in
  the body), reused by the route.
- broker.ts (httpBroker, COA_BROKER_URL) as an injectable AppDeps.broker; the idss
  verify endpoint (idss#1805) and rehearsal-coa fake ship on the idss side.
- CommunityStore.remove + InstallerStore.removeAll (force rm, never throw on a
  missing dir); GitPublisher.release reuses commit(['-A', dir]) so `git add -A`
  stages the deletion tolerantly — same retry/serialisation as publish.

Server + schema seam only, not deployed. STATUS.md header + log updated.

Files: packages/schema/src/release.ts (+index, +test), server/src/broker.ts,
server/src/routes/release.ts, server/src/{app,community-store,git-publisher,
installer-store}.ts, server/test/release.test.ts, STATUS.md; existing test stubs
extended with release/removeAll.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/coa!149
No description provided.