carlos / platform Public

spec: domain registration rev 5 draft, transfers in

Registration-only transfers (R13-R16, Paul 2026-11-21): keep the
domain's nameservers, pay at submit and refund on failure, "Move to
Carloku" on the domain page plus carlos domains transfer, ahead of
Plans 2b and 3.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev bc20667f8bf99674740bf12f488228a6f79a6494 parent 21e821a
1 file changed, +176 −1
  • docs/superpowers/specs/2026-11-01-domain-registration-design.md +176 −1

CI cancelled — superseded by a newer push — run details

CI log
=== gate ===
go: downloading go1.26.10 (linux/arm64)
go version go1.26.10 linux/arm64
opentofu: arm64, tofu 1.13.9, aws 6.73.0, archive 2.8.1
  tofu: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/tofu_1.13.9_linux_arm64.tar.gz
  tofu: downloaded, digest verified
  aws: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-aws_6.73.0_linux_arm64.zip
  aws: downloaded, digest verified
  archive: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-archive_2.8.1_linux_arm64.zip
  archive: downloaded, digest verified
  installed in /tmp/carlos-opentofu-GAlAo5
.amadan/test-gate.sh
go: downloading github.com/aws/aws-sdk-go-v2 v1.44.0
go: downloading github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.68.0
go: downloading github.com/aws/aws-sdk-go-v2/service/costexplorer v1.67.5
go: downloading github.com/aws/aws-sdk-go-v2/service/s3 v1.105.0
go: downloading github.com/aws/smithy-go v1.28.1
go: downloading github.com/benbjohnson/litestream v0.5.14
go: downloading github.com/superfly/ltx v0.5.1
go: downloading golang.org/x/net v0.62.0
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/aws/aws-sdk-go-v2/service/acm v1.45.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ec2 v1.324.0
go: downloading github.com/aws/aws-sdk-go-v2/service/iam v1.58.2
go: downloading golang.org/x/crypto v0.58.0
go: downloading golang.org/x/sys v0.49.0
go: downloading golang.org/x/mod v0.41.0
go: downloading github.com/oschwald/maxminddb-golang v1.13.1
go: downloading github.com/aws/aws-sdk-go-v2/service/sesv2 v1.66.6
go: downloading github.com/pion/logging v0.2.4
go: downloading github.com/pion/stun/v3 v3.1.5
go: downloading github.com/pion/turn/v4 v4.1.4
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/pion/dtls/v3 v3.1.4
go: downloading github.com/pion/transport/v4 v4.0.2
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/pion/randutil v0.1.0
go: downloading github.com/wlynxg/anet v0.0.5
go: downloading github.com/prometheus/client_golang v1.17.0
go: downloading github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.20.18
go: downloading github.com/prometheus/procfs v0.12.0
go: downloading github.com/beorn7/perks v1.0.1
go: downloading google.golang.org/protobuf v1.36.10
go: downloading github.com/prometheus/common v0.45.0
go: downloading github.com/prometheus/client_model v0.5.0
go: downloading github.com/cespare/xxhash/v2 v2.3.0
go: downloading github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0
go: downloading github.com/klauspost/compress v1.20.2
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/memory v1.11.0
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/google/uuid v1.6.0
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/google/uuid v1.6.0
go: downloading github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec

amadan: job cancelled — a newer push superseded it
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 3c9e4ccff..eadae6f3b 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,8 @@
# Domain registration: buy a domain and have it just work
-Status: revision 4, APPROVED by Paul 2026-11-03 ("go ahead"): domains
+Status: revision 5 DRAFT (2026-11-21): transfers in (§12, R13-R16),
+approach approved by Paul 2026-11-21 ("Go ahead"); the written §12 awaits
+his approval. Revision 4, APPROVED by Paul 2026-11-03 ("go ahead"): domains
move to the account level (§11, R9-R12). Revision 3 was APPROVED by Paul 2026-11-01
("Go"); Plan 1 built on it (20c867c). Where §11 and an earlier section
disagree, §11 wins. Builder check round 1 folded in (§10); R8 added.
@@ -650,3 +652,176 @@ without changing what Paul approved:
now says so (the first draft wrongly said the contact's country decides).
- C2. App Trash and purge: addresses follow the app until purge (§11.7).
- C3. App deleted mid-purchase: the purchase finishes unpointed (§11.7).
+
+## 12. Revision 5: transfers in (2026-11-21)
+
+### 12.1 Why
+
+Paul, 2026-11-21, after Plan 2a reached dev: "bring transfers forward so
+that I can get it in to Carloku. I'd prefer that!" The first domain is his
+own rushedsunlight.com, registered at eNom and expiring 2026-12-02. R7 said
+transfers in come later; this revision brings them ahead of Plans 2b
+(reconcile, apex reconverge, alerts) and 3 (renewals).
+
+What rushedsunlight.com uses today (public DNS, 2026-11-21): nameservers at
+DNSimple, Google Workspace mail (MX and SPF), no website. Its DNS does not
+live at the registrar, so moving the registration changes nothing anyone
+sees. That shapes the first slice.
+
+### 12.2 Rulings (Paul, 2026-11-21)
+
+R13. **Registration only.** A transfer moves the registration to Carloku and
+ keeps the domain's nameservers exactly as they are. Moving a domain's
+ DNS into a Carloku zone waits for customer records (Plan 4, §5.3a),
+ because doing it without them would drop the customer's mail and other
+ records.
+R14. **Pay at submit, refund on failure.** The customer pays the transfer
+ price (one year, which the registry adds to the expiry) when they
+ submit. A transfer that fails or is refused is refunded in full,
+ automatically.
+R15. **Entry points:** "Move to Carloku" on a domain's page and on its
+ "Registered elsewhere" card (§11.3, §11.6), and
+ `carlos domains transfer <name> --auth-code <code>`.
+R16. **Order:** transfers in ship before Plans 2b and 3. Renewals (Plan 3)
+ must ship before the first transferred domain needs renewing (a year
+ after its transfer completes); until then the operator is alerted 60
+ days before any registration expires (my call, §12.6).
+
+Non-goals (this revision): moving DNS during a transfer; bulk transfers;
+TLDs not in the operator's catalog; registry-specific transfer schemes that
+need no auth code (for example .uk's tag change).
+
+Anti-goals:
+- A transfer that changes or breaks the domain's DNS or mail.
+- Money taken for a transfer that never completes and is never refunded.
+- An auth code in a log line, an error, a URL or a stored record after its
+ transfer was submitted.
+- A transferred domain that renews at the registrar on its own (§5.5 still
+ holds: registrar-side auto-renew OFF).
+
+### 12.3 What the customer sees
+
+On a domain's page (registered elsewhere), owners see **Move to Carloku**.
+Starting it from the CLI needs no attached address: any registrable domain
+the customer controls can be transferred by name.
+
+One short form, then a transfer card:
+1. **Before you start**, in the form: unlock the domain at its current
+ registrar and get its transfer code (auth code); the page says both in a
+ line each, without naming registrars.
+2. **The form:** the auth code, "Registered to" (the saved contacts of
+ §11.5, as buying), and the summary: price for the transfer (one year
+ added to the expiry), "Your DNS and email don't change", and the
+ nameservers the domain uses today, read at submit, so the customer sees
+ what will be kept.
+3. **Pay:** the existing payment page.
+4. **The transfer card**, like the purchase card (§11.4): Paid → Sent →
+ Waiting for the current registrar (up to five days; it can be approved
+ sooner at the current registrar, and the card says so) → Done (the
+ domain's card now reads "Bought here" with its new expiry) or Failed
+ (with the reason in plain words, and "Refunded").
+
+After it completes the domain is a bought domain in every way §11 describes,
+except that its DNS is hosted elsewhere: its page shows Addresses, Renewal
+and Registered to, plus the records to set at its DNS host (the registered
+elsewhere guidance), and a line saying its DNS is hosted elsewhere. Point at
+an app (§11.7 as built) is not offered for it; its addresses are attached
+through the ordinary attach door (my call: Point writes a Carloku zone, and
+this domain has none).
+
+Refusals, all before any payment, each with plain copy:
+- the name is not a registrable domain, its TLD is not in the catalog, or
+ it is premium;
+- the domain is already registered with Carloku (this or another account:
+ the neutral refusal);
+- another account or app holds a claim on the domain or `www` (the buying
+ rule, §5.1 step 1, neutral refusal);
+- the registrar's transfer check says it cannot be transferred now (locked,
+ within 60 days of a registration or transfer, or expired past the point
+ the registry allows), named plainly where the registrar says why;
+- the paid-plan rule and the daily cap (§11.4).
+
+A wrong or stale auth code is usually only found by the registrar after
+submit; that ends as Failed and refunded.
+
+### 12.4 How it works
+
+The transfer is a second kind of purchase in the account-level purchase
+store (§11.7), with its own states, reusing Plan 1's machinery where it fits:
+quote, Checkout, the purchase pass, the CAS state moves, the frozen saved
+contact (R12, Plan 2a), the operator alerts.
+
+Sequence:
+1. **Check.** Normalise the name (§5.1); registrar transfer check and price;
+ catalog transfer price and cost ceiling (§6.2; a TLD's transfer price
+ defaults to its renewal price, my call); the refusals above. Read the
+ domain's current nameservers from public DNS and show them.
+2. **Pay** (R14). Checkout as for buying. The charge is captured when the
+ registrar accepts the transfer request (step 3), not when the transfer
+ completes, because completion can take longer than a card authorisation
+ lasts (my call: Plan 1's authorise-then-capture otherwise).
+3. **Submit.** Send the transfer to the registrar with the auth code, the
+ frozen registrant handle, the nameservers read at step 1 (registration
+ only, R13), WHOIS privacy where the TLD allows it, and registrar-side
+ auto-renew OFF (§5.5). A definite refusal: cancel the authorisation,
+ Failed. An ambiguous answer is never read as a failure (§5.1 step 6):
+ reconcile with Lookup before capturing or cancelling. Accepted: capture.
+ The auth code is deleted from the purchase record in the same move that
+ records the submit.
+4. **Wait.** The purchase pass asks the registrar for the transfer's status
+ at a slow cadence (my call: every 30 minutes while waiting, one call per
+ pending transfer; the request budget of §7.2 allows it).
+5. **Done.** Record the registration (§11.7 store) with the registrar's
+ expiry, no zone, and the frozen registrant. The domain's card becomes
+ "Bought here".
+6. **Failed** after acceptance (the losing registrar refused, the code was
+ wrong, the registry timed it out): refund the capture in full, record the
+ reason. A refund that fails is retried and alerts the operator; the money
+ rule is that every failed transfer ends refunded.
+
+A transferred domain has no hosted zone. Nothing in Plans 1-2a may assume a
+bought domain has one: Point refuses it (as above), the zone reconverge of
+Plan 2b skips it, and transfer out (Plan 4) exports no zone file for it,
+only the auth code and the unlock.
+
+### 12.5 Provider boundary
+
+- `Registrar` gains a transfer request and a transfer status read (names and
+ shapes the builder's), both provider-neutral; the Openprovider adapter
+ implements them on its `/v1` transfer endpoints (the documented examples
+ are `/v1beta/domains/transfer`; confirm the `/v1` path, §7.1), and the
+ fake gains them with scripted outcomes.
+- Error mapping follows Plan 1: transport errors and 5xx after send are
+ indeterminate; a documented refusal is definite.
+- The auth code is a secret (§7.4): redacted in every `String`/`GoString`,
+ never logged, never in a URL, held in the purchase record only until the
+ submit records.
+
+### 12.6 Money, renewals and operations
+
+- Price: the catalog's transfer price for the TLD in the account's currency
+ (§6.2), one year. Cost ceiling as for buying.
+- Until Plan 3 ships, nothing renews any domain. The operator is alerted 60
+ days before any registration's expiry, bought or transferred (my call), so
+ a domain cannot lapse unnoticed.
+- The registrar balance check and alert (§6.3) cover transfers as purchases.
+- Abuse: the daily cap counts transfers with purchases (my call).
+
+### 12.7 Switch-on and the first transfer
+
+Transfers ride the buy door's switch (`domainBuyReady`; off while
+`CARLOS_HOST_CLAIM` is on). The Openprovider sandbox cannot exercise a real
+transfer, so the witness is the first real one on flagship: rushedsunlight.com,
+Paul's own domain, after the release with his GO. The plan says what is
+witnessed on dev first (the flow up to the registrar call, against the
+fake or the sandbox's transfer check).
+
+### 12.8 Left to the builder
+
+- Storage shape for the transfer kind and its states.
+- The exact registrar calls and field names, after reading the `/v1`
+ reference.
+- The CLI's flags beyond `--auth-code`, and how it waits (as `buy` does).
+- Layout of the form and card, from the mockup kit, with a UX pass
+ (AGENTS.md) before copy review.
+