carlos / platform Public

Domain registration design rev 2: builder check round 1 folded in

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev a28c6263794bebc7b0656f653c16dc14f2e6ff66 parent 8f5bba6
2 files changed, +66 −7
  • docs/superpowers/reviews/BUILDER-CHECK-FINDINGS-domain-registration.md +7 −0
  • docs/superpowers/specs/2026-11-01-domain-registration-design.md +59 −7
diff --git a/docs/superpowers/reviews/BUILDER-CHECK-FINDINGS-domain-registration.md b/docs/superpowers/reviews/BUILDER-CHECK-FINDINGS-domain-registration.md
new file mode 100644
index 000000000..02b451ef9
--- /dev/null
+++ b/docs/superpowers/reviews/BUILDER-CHECK-FINDINGS-domain-registration.md
@@ -0,0 +1,7 @@
+1. **What outcome is permitted when registration succeeds but payment cannot be captured?** §5.1 registers before capture, while §2 forbids Carloku funding an unpaid registration. An ambiguous registration could also remain unresolved beyond the payment authorisation’s lifetime; Stripe documents cancellation of uncaptured payments ([https://docs.stripe.com/api/payment_intents/capture](https://docs.stripe.com/api/payment_intents/capture)). Should Carloku retain the registration and pursue payment, or must the payment order change? Renewal also needs an explicit ordering: §4.2 says payment succeeds before renewal, whereas §6.1 specifies authorise-and-capture for renewals. These answers determine the payment states, recovery actions and refund requirements.
+
+2. **Must buying refuse a name already claimed by another app or account, or does successful registration confer authority to replace that claim?** The existing attach path does not resolve this automatically: another app’s verified claim is refused even when the new caller proves DNS control ([internal/domains/claims.go:726](/home/paulca/.cache/tmp/claude-1001/design-domain-registration/internal/domains/claims.go:726)). Yet §5.1 attaches both apex and `www` only after registration and capture. The answer changes whether the plan needs admission and reservation before purchase, or a new ownership-transfer mechanism. Otherwise a customer can pay successfully and remain permanently unable to attach.
+
+3. **What price does auto-renew authorise, and what happens when renewal fails the margin rule?** §6.2 defines catalog prices and a margin check at purchase, but does not establish whether renewals use the original price, the current catalog price, or a separately agreed renewal price. If registrar cost exceeds that price, should Carloku absorb the difference, request confirmation of a higher charge, or stop automatic renewal? This determines what must be recorded at purchase, the renewal notices and consent flow, and whether the margin guard can prevent renewal.
+
+4. **May transferring out lose latency steering and health-based failover, even when the app stays on Carloku?** §4.3 promises an importable standard zone file, but §5.3 requires latency records and a Route 53 ALIAS. The existing steering records carry provider-specific region and health-check fields ([internal/steering/route53.go:650](/home/paulca/.cache/tmp/claude-1001/design-domain-registration/internal/steering/route53.go:650)); AWS explicitly excludes alias and non-simple routing records from ordinary export/re-import ([https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/white-label-name-servers.html](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/white-label-name-servers.html)). Is a static address snapshot with a `www` CNAME acceptable, or must the migration preserve ongoing steering? That changes the export contract and whether the plan needs a continuing routing arrangement after transfer.
\ No newline at end of file
diff --git a/docs/superpowers/specs/2026-11-01-domain-registration-design.md b/docs/superpowers/specs/2026-11-01-domain-registration-design.md
index cdcd711a8..d8734685a 100644
--- a/docs/superpowers/specs/2026-11-01-domain-registration-design.md
+++ b/docs/superpowers/specs/2026-11-01-domain-registration-design.md
@@ -1,6 +1,6 @@
# Domain registration: buy a domain and have it just work
-Status: revision 1, DRAFT for Paul's read. Branch `design-domain-registration`.
+Status: revision 2, DRAFT for Paul's read (builder check round 1 folded in, §10). Branch `design-domain-registration`.
Review budget: at most three cross-model rounds (AGENTS.md stopping rules);
the builder check below is round 1.
@@ -115,7 +115,11 @@ today (plans Plan 3a: custom domains are paid-only).
- Every registration has an auto-renew flag, on by default (my call),
switchable in the console and the CLI.
- With it on, Carloku charges the card on file 30 days before expiry (my
- call) and renews at the registrar only once the charge succeeds. A
+ call) and renews at the registrar only once the charge succeeds.
+- The renewal price is the catalog's renewal price for that TLD and
+ currency at the time of charging (§6.2). The owner is emailed the
+ price at least 14 days before the charge (45 days before expiry), so a
+ price change is never a surprise (my call, §10 B3). A
failed charge retries and emails the owner; the domain is not renewed
until it is paid.
- With it off, the owner gets reminder emails at 30, 7 and 1 days before
@@ -134,6 +138,17 @@ One button or command:
- says, in reviewed copy, that DNSimple is a good place to take it, with a
link and the short steps, and that it can import the zone file.
+The zone file cannot carry steering: latency records, health checks and
+Route 53 ALIAS records have no standard zone-file form. The export
+therefore writes the managed records the way the attach door already
+tells customers on their own DNS to set them up (`internal/console/view.go`
+guidance): the apex as A records to the current edges, `www` as a CNAME to
+the steering host, plus every non-managed record unchanged. After a move
+the domain is an ordinary custom domain on Carloku, exactly as if it had
+been bought elsewhere. The DNSimple copy adds that DNSimple's ALIAS record
+pointed at the steering host keeps latency routing for the apex (my call,
+§10 B4).
+
The zone keeps answering on Carloku's nameservers until the registrar
reports the transfer complete and the domain's nameservers no longer name
ours, then it is deleted. A customer leaving Carloku altogether is told to
@@ -166,7 +181,11 @@ out of step in a way nobody notices:
1. Check availability and price at the registrar. Check the operator's
prepaid registrar balance covers it; refuse up front if not, and alert
- the operator (§6.3).
+ the operator (§6.3). Check the fleet's claims for the domain and `www`:
+ if another account or app holds a claim on either, refuse up front,
+ before any payment, with the attach door's own neutral refusal, and
+ report it to the operator (my call, §10 B2). Buying never evicts a
+ claim; an operator releases a stale one by hand.
2. **Authorise** the payment, capture later (my call: authorise-then-
capture, so a registration that fails cancels an authorisation instead
of issuing a refund).
@@ -185,10 +204,19 @@ out of step in a way nobody notices:
On an ambiguous registrar answer (timeout), do NOT cancel: record the
purchase as pending and reconcile it against the registrar before
either capturing or cancelling (the builder decides the mechanism; the
- rule is that an ambiguous answer is never read as a failure).
-
-Renewal is the same shape: charge, then renew, then record; an ambiguous
-renew is reconciled, never retried blind.
+ rule is that an ambiguous answer is never read as a failure). The
+ reconcile must settle well inside the card authorisation's lifetime
+ (days for cards); the plan states the bound.
+7. If the registration succeeded but the capture then fails (an expired
+ or revoked authorisation), Carloku keeps the registration, marks it
+ unpaid, turns auto-renew off, emails the owner a payment link and
+ alerts the operator. The domain is not withheld from the customer; the
+ loss is bounded by one registration fee (my call, §10 B1).
+
+Renewal is a different shape, because the domain already exists: charge
+in full (no separate authorisation), then renew, then record. A definite
+registrar failure refunds the charge; an ambiguous renew is reconciled,
+never retried blind (my call, §10 B1).
### 5.2 Branded nameservers (operator setup, once per deployment)
@@ -284,6 +312,12 @@ otherwise the TLD is refused with "not available right now" and the
operator is alerted. That protects against a registry price rise (the
.com fee rose on 2026-11-01) silently selling at a loss.
+Renewals are never blocked by the margin rule. If the registrar's renewal
+cost has risen above the catalog price, the renewal still goes through at
+the price the owner was told, Carloku absorbs the difference, and the
+operator is alerted to update the catalog. A customer's domain must not
+lapse because of our pricing (my call, §10 B3).
+
### 6.3 Registrar balance
Openprovider debits a prepaid balance. The operator gets an alert through
@@ -360,3 +394,21 @@ the buy door on dev (Openprovider sandbox), and flagship switches on once
the operator has the Openprovider membership, a funded balance, the
nameserver domain and the delegation set (the §5.2 runbook). Nothing
merges dormant without that date being set in the plan.
+
+## 10. Builder check (Astra, round 1) and what it changed
+
+Astra (gpt-6-astra) read revision 1 as the builder, findings in
+`docs/superpowers/reviews/BUILDER-CHECK-FINDINGS-domain-registration.md`.
+Four questions, all settled as my calls without changing what gets built:
+
+- B1. Registration succeeds, capture fails; renewal order. Settled in
+ §5.1 step 7 and the renewal paragraph after it: keep the domain, mark
+ it unpaid, bounded loss; renewals charge in full first.
+- B2. A name already claimed by another account. Settled in §5.1 step 1:
+ refuse before payment, never evict.
+- B3. Renewal price and the margin rule. Settled in §4.2 and §6.2: the
+ current catalog price with notice; renewals are never blocked on
+ margin.
+- B4. Transfer out cannot carry steering. Settled in §4.3: the export
+ uses the existing own-DNS guidance shape; the domain becomes an
+ ordinary custom domain.