carlos / platform Public

Plan 2a ready for review: domains at the account level Question open

On branch plan-domains-2a

Plan: docs/superpowers/plans/2026-11-19-domain-registration-2a-account-domains.md

Plan 2 split in two: 2a (this) folds in spec rev 4 §11; 2b keeps the reconcile, apex reconverge on edge change and alerts. Transfers in come after Plan 3 (renewals); their entry point is the "Registered elsewhere" card built here.

Findings in the code:

  • Purchases, registrations and contacts are already in console.db; only the SQL gate, the per-app lock and the doors are app-bound. No data moves.
  • Openprovider's EnsureContact updates an existing handle in place, so editing a contact today would change existing registrations (R12). Fixed: each purchase freezes a versioned contact.
  • A purged app's custom-domain claims are never released, so no other app can attach those hosts. Fixed in every purge branch.
  • Account deletion doesn't check registrations. Fixed, under the billing hold.
  • Nothing renews yet (Plan 3), so the page shows expiry and price only; no auto-renew switch.

Reviews: Astra rounds 1-3 (findings files beside the brief). Round 2 hit stopping rule 2; Paul cut: buying off while CARLOSHOSTCLAIM is on; addresses under a bought domain (docs.) move to Plan 4; pointing goes through the existing attach door. Round 3 found 4 P1s with no shared cause (two lifecycle gaps, an unclassified table, a name clash), all fixed in 40ca6f78 without a fourth round.

Needed from Paul: approve the plan (or ask for a fourth Astra round on the round 3 fixes), and pick execution: subagent-driven (Opus implements, Astra reviews Tasks 4, 6, 7, 9) recommended.

Task 1 done: the Domains screens redrawn in the mockup kit (UX pass at 390 px and desktop, light and dark; reviewed). Files in docs/superpowers/mockups/domains-account-kit/: overview, buy-name, buy-app, buy-pay, domain-bought, domain-elsewhere, contacts, purchase-card. Open any of them in a browser from a checkout of the branch.

No auto-renew switch, Change owner, Transfer out or Add address (later plans). Tasks 2-7 (backend) go ahead now; Tasks 8-9 build these screens unless you ask for changes here.

Build done, awaiting Paul's go to merge. Tip 6bd4f34b. All 11 build tasks reviewed (Astra on 4, 6, 7, 9; Fable also on 6); whole-branch review by Astra + Fable, one fix wave, Astra scoped re-review: READY AFTER FIXES, both P2s handled (copy approved by Luna and pinned; one race parked below). Census: Astra approved the root-package card and the record-write layer.

Paul's cuts during the build: plan round 2 (buying off under CARLOSHOSTCLAIM; extra addresses to Plan 4; Point through the attach door) and whole-branch round 1 (purge keeps domain claims; Point may take over an own-account claim whose app no longer exists at all).

Parked for Paul: Point reads app membership once; if the owner recreates a purged app's name and attaches the same host in the instant before the takeover, the recreated app's claim is released. Same account only.

Owed after merge: release + dev roll; witnesses on dev (Domains page, a Not-yet purchase, point to wakecheck, contact edit then second purchase, one real unpoint to confirm Route 53 accepts the alias-first delete batch); flagship with the next release.

Follow-ups (not in this branch): pre-existing em dashes in ownership.go, app_settings.html and two domains help lines; ReapAccount should log when it reaps an account holding registrations (before renewals); deferred minors in the SDD ledger.