openova/core/pool-domain-manager
e3mrah 3a34969a2f
feat(catalyst+pdm): Sovereign self-decommission + post-handover redirect (closes #319) (#451)
Customer-side decommission UI + PDM release endpoints + Catalyst-Zero
redirect to console.<sovereign-fqdn> once handover is finalised.

Anti-duplication map (canonical seams reused, NOT duplicated):
  - catalyst-api wipe.go: existing wipe endpoint already drives PDM
    release + Hetzner purge + tofu destroy + local cleanup. The new
    DecommissionPage POSTs to the same endpoint with an optional
    backup-destination payload.
  - PDM Allocator.Release: child zone delete + parent-zone NS revert
    + allocation row delete already idempotent. The new sovereign-side
    POST /api/v1/release is a thin FQDN-shaped wrapper that splits at
    the first dot and delegates to Allocator.Release.
  - The orphan force-release path adds gates (X-Force-Release-Confirm
    header, 30-day grace, DNS-NXDOMAIN check) on top of the same seam.

Scope contract with #317 (handover finalisation): NOT touching
internal/handler/handover.go. AdoptedAt is a new contract field on
Deployment + store.Record that the redirect helper consumes; future
#317 enhancement will populate it before deletion.

Files:
  core/pool-domain-manager/internal/handler/release.go         (NEW)
  core/pool-domain-manager/internal/handler/release_test.go    (NEW)
  core/pool-domain-manager/internal/handler/handler.go         (route wiring)
  products/catalyst/bootstrap/api/internal/handler/deployments.go     (AdoptedAt field + State()/toRecord/fromRecord)
  products/catalyst/bootstrap/api/internal/handler/deployments_adopted_test.go (NEW)
  products/catalyst/bootstrap/api/internal/store/store.go      (AdoptedAt persistence)
  products/catalyst/bootstrap/ui/src/pages/sovereign/DecommissionPage.tsx        (NEW)
  products/catalyst/bootstrap/ui/src/pages/sovereign/DecommissionPage.test.tsx   (NEW)
  products/catalyst/bootstrap/ui/src/pages/sovereign/Dashboard.tsx    (Decommission link)
  products/catalyst/bootstrap/ui/src/app/router.tsx            (redirect + decom route)
  docs/omantel-handover-wbs.md                                 (T319 → done)

Tests: 13 new Go test cases + 5 new vitest cases all green. catalyst-
api + PDM full suites pass. Live execution against omantel deferred to
Phase 8 per ticket scope (no Dynadot/Hetzner exec here).

Co-authored-by: hatiyildiz <hatiyildiz@noreply.github.com>
2026-05-01 19:27:18 +04:00
..
api feat(pdm): pool-domain-manager service skeleton (Phase 1 of #163) 2026-04-29 06:37:38 +02:00
cmd/pdm feat(pdm): per-Sovereign PowerDNS zones for #168 2026-04-29 08:36:45 +02:00
internal feat(catalyst+pdm): Sovereign self-decommission + post-handover redirect (closes #319) (#451) 2026-05-01 19:27:18 +04:00
Containerfile feat(pdm): pool-domain-manager service skeleton (Phase 1 of #163) 2026-04-29 06:37:38 +02:00
go.mod feat(pdm): pool-domain-manager service skeleton (Phase 1 of #163) 2026-04-29 06:37:38 +02:00
go.sum feat(pdm): pool-domain-manager service skeleton (Phase 1 of #163) 2026-04-29 06:37:38 +02:00