carlos / platform Public

domains: approved copy; census proposal domains-buy-nosub

Apply the delegated copy pass and show the approved card hint only with
the Add a card action. Pin all five strings in the approved-copy test.

Generate the root-read census proposal and re-pin the billing route in
the record-write inventory without changing its classification.
Co-Authored-By: Astra (gpt-6-astra) via Codex <noreply@openai.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 2d1e2bb554f247a95c5e687eea36c3265ec6de5d parent 3cbc7fc
10 files changed, +57 −6
  • approved_domains_buy_copy_test.go +6 −0
  • docs/superpowers/notes/census-proposal-domains-buy-nosub.md +11 −0
  • internal/console/billingcard_test.go +6 −0
  • internal/console/billingpage_copy.go +2 −1
  • internal/console/domainbuy_copy.go +3 −3
  • internal/console/templates/billing.html +1 −1
  • internal/provision/domains_buy_nosub_census_test.go +22 −0
  • internal/provision/plan9_b8_census_test.go +1 −1
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −0
  • internal/provision/testdata/plan14-root-reads-domains-buy-nosub.tsv +4 −0
diff --git a/approved_domains_buy_copy_test.go b/approved_domains_buy_copy_test.go
index 770fd6f58..5d0ec2998 100644
--- a/approved_domains_buy_copy_test.go
+++ b/approved_domains_buy_copy_test.go
@@ -9,6 +9,12 @@ import (
// Like approved_copy_test.go, compare decoded Go literals byte for byte.
func TestApprovedDomainsBuyCopy(t *testing.T) {
rows := []struct{ key, path, want string }{
+ // Approved by delegation (Luna), 2026-11-03, including the controller's hint.
+ {"browser.billingSetup", "internal/console/domainbuy_copy.go", "we could not set up billing for your account. try again later"},
+ {"browser.currency", "internal/console/domainbuy_copy.go", "we could not find a price for this domain in your account currency"},
+ {"billing.button.card", "internal/console/billingpage_copy.go", "Add a card"},
+ {"billing.card.failed", "internal/console/billingpage_copy.go", "We could not open the card setup page. Try again later."},
+ {"billing.card.hint", "internal/console/billingpage_copy.go", "Save a card for buying domains. Nothing is charged until you buy one."},
{"browser.title", "internal/console/domainbuy_copy.go", "Buy a domain"},
{"browser.name", "internal/console/domainbuy_copy.go", "Domain"},
{"browser.check", "internal/console/domainbuy_copy.go", "Check availability"},
diff --git a/docs/superpowers/notes/census-proposal-domains-buy-nosub.md b/docs/superpowers/notes/census-proposal-domains-buy-nosub.md
new file mode 100644
index 000000000..96d7338ef
--- /dev/null
+++ b/docs/superpowers/notes/census-proposal-domains-buy-nosub.md
@@ -0,0 +1,11 @@
+# Census approval: domains-buy-nosub
+
+Ruling `census-ruling-domains-buy-nosub`. The independent reviewer approves or rejects every change below, 0 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26).
+
+Envelopes re-pinned: `.`, `internal/registrar`.
+
+Review: a model from the other family than the author reads the branch's diff against main on the amadan.net remote (`origin` or `amadan`, whichever points at amadan.net) and gives a verdict for every unit and every re-pinned envelope above. For a unit, compare the change with its recorded disposition and basis below; for an envelope, read every changed function in the package and what it reaches. Reject if the change lets root open, run, query or follow anything it did not before from a path or input a tenant, an app or a box agent can create, write or name; if it weakens a check, refusal, validation, argument or environment the basis relies on; or if the diff cannot settle either. Otherwise approve. Record each verdict on #280 with the tip. A rejected unit goes back to the author to correct; nothing escalates to the census owner.
+
+Seal: `09ad1d7267b9598c64e89ec0faa7b18839c785c5c63905b398afe681cf9777c6` → `09ad1d7267b9598c64e89ec0faa7b18839c785c5c63905b398afe681cf9777c6`.
+
+Overlay: `internal/provision/testdata/plan14-root-reads-domains-buy-nosub.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/internal/console/billingcard_test.go b/internal/console/billingcard_test.go
index a9c69b066..78614539a 100644
--- a/internal/console/billingcard_test.go
+++ b/internal/console/billingcard_test.go
@@ -20,6 +20,9 @@ func TestBillingAddCardWithoutCustomer(t *testing.T) {
if page.Status != 200 || !strings.Contains(page.Body, "Add a card") || strings.Contains(page.Body, "/billing/portal") {
t.Fatal("missing add card action or unexpected portal")
}
+ if !strings.Contains(page.Body, billingCopy["card.hint"]) {
+ t.Fatal("missing add card hint")
+ }
o.stepUp(t)
for i := 0; i < 2; i++ {
r := o.request(t, http.MethodPost, o.billingBase()+"/card", nil)
@@ -54,6 +57,9 @@ func TestBillingAddCardWithoutCustomer(t *testing.T) {
if strings.Contains(page.Body, "/billing/card") || !strings.Contains(page.Body, "/billing/portal") {
t.Fatal("bound customer needs portal only")
}
+ if strings.Contains(page.Body, billingCopy["card.hint"]) {
+ t.Fatal("add card hint shown without the add card action")
+ }
}
func TestBillingAddCardGates(t *testing.T) {
diff --git a/internal/console/billingpage_copy.go b/internal/console/billingpage_copy.go
index 0055737fe..454595b1d 100644
--- a/internal/console/billingpage_copy.go
+++ b/internal/console/billingpage_copy.go
@@ -9,9 +9,10 @@ package console
// here. The change.* keys below are the plan's drafts for Task 10, declared
// here because Confirm now and the refusals of this task use them.
var billingCopy = map[string]string{
- // Drafts for the Luna pass: domain registration Plan 2, slice 1.
+ // Approved by delegation (Luna), 2026-11-03: domain registration Plan 2, slice 1.
"button.card": "Add a card",
"card.failed": "We could not open the card setup page. Try again later.",
+ "card.hint": "Save a card for buying domains. Nothing is charged until you buy one.",
"change.done": "Your billing change is saved.",
"change.pending": "Your card didn't go through, so nothing changed. Pay from Payment and invoices to finish.",
diff --git a/internal/console/domainbuy_copy.go b/internal/console/domainbuy_copy.go
index b4524af3e..5f64105cf 100644
--- a/internal/console/domainbuy_copy.go
+++ b/internal/console/domainbuy_copy.go
@@ -15,10 +15,10 @@ import (
// docs/superpowers/specs/LUNA-COPY-RESULT-DOMAINS-1.md, plus controller rulings
// on four flags. Apply later edits through a copy pass.
var domainBuyCopy = map[string]string{
- // Drafts for the Luna pass: domain registration Plan 2, slice 1.
- "plan": capMessage("cli.cap.custom_domain"), // Existing approved plan refusal.
+ "plan": capMessage("cli.cap.custom_domain"), // Existing approved plan refusal.
+ // Approved by delegation (Luna), 2026-11-03: domain registration Plan 2, slice 1.
"billingSetup": "we could not set up billing for your account. try again later",
- "currency": "there is no price for this domain ending in your account currency",
+ "currency": "we could not find a price for this domain in your account currency",
"title": "Buy a domain",
"name": "Domain",
diff --git a/internal/console/templates/billing.html b/internal/console/templates/billing.html
index ab91aaba9..11c599702 100644
--- a/internal/console/templates/billing.html
+++ b/internal/console/templates/billing.html
@@ -147,7 +147,7 @@
{{if eq . "card"}}<div class="settings-row"><form method="post" action="{{$.Base}}/billing/card">
<input type="hidden" name="csrf" value="{{$.CSRF}}">
<button type="submit">{{billingText "button.card"}}</button>
-</form></div>{{end}}
+</form><p class="muted">{{billingText "card.hint"}}</p></div>{{end}}
{{if eq . "portal"}}<div class="settings-row"><form method="post" action="{{$.Base}}/billing/portal">
<input type="hidden" name="csrf" value="{{$.CSRF}}">
<button type="submit">{{billingText "button.portal"}}</button>
diff --git a/internal/provision/domains_buy_nosub_census_test.go b/internal/provision/domains_buy_nosub_census_test.go
new file mode 100644
index 000000000..4774863e1
--- /dev/null
+++ b/internal/provision/domains_buy_nosub_census_test.go
@@ -0,0 +1,22 @@
+package provision
+
+// Author's record-write classification for domains-buy-nosub; independent
+// census review is still required. NewServer adds POST /a/{sqid}/billing/card
+// with the billing owner, CSRF, fresh-auth and billing-hold gates. The handler
+// reuses customer creation and opens setup Checkout, writing billing state
+// and provider customer/session objects only. No deployment record write or
+// new read in NewServer; the existing instances literal stays key-site.
+func domainsBuyNosubWriteCensusInventory() []censusEntry {
+ entries := append([]censusEntry(nil), devboxIdentityWriteCensusInventory()...)
+ r := censusEntry{"internal/console/server.go", "NewServer", "key-site", "lit:instances", "53e266e2e25e579c89471f34674b8b79dffc805a38151de303d44b2e528144c4"}
+ for i, e := range entries {
+ if e.File == r.File && e.Unit == r.Unit {
+ if e.Class != r.Class || e.Kinds != r.Kinds {
+ panic("domains-buy-nosub re-pin changes the class or kinds of " + r.File + ":" + r.Unit)
+ }
+ entries[i] = r
+ return entries
+ }
+ }
+ panic("domains-buy-nosub re-pin of an unlisted unit " + r.File + ":" + r.Unit)
+}
diff --git a/internal/provision/plan9_b8_census_test.go b/internal/provision/plan9_b8_census_test.go
index a3aa2a17e..dcbf5279a 100644
--- a/internal/provision/plan9_b8_census_test.go
+++ b/internal/provision/plan9_b8_census_test.go
@@ -366,7 +366,7 @@ func TestPlan9B8RecordWriteCensus(t *testing.T) {
if len(got) < 100 {
t.Fatalf("census found only %d units under %s; the walk is broken", len(got), root)
}
- inventory := devboxIdentityWriteCensusInventory()
+ inventory := domainsBuyNosubWriteCensusInventory()
problems := append(censusDiff(inventory, got), censusPolicy(inventory)...)
if len(problems) > 0 {
t.Fatalf("record-write census rejected %d site(s); update the explicit inventory only after reviewing the source:\n %s", len(problems), strings.Join(problems, "\n "))
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index 09e41a0a4..eae19e409 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -69,3 +69,4 @@ plan14-root-reads-region-ha-home-placement.tsv b0304f75d2c5f1b9818d0f282b89c00c0
plan14-root-reads-storedoor-stream-get.tsv 7e30dee4fb52370555ad173512d7f03782f0fbed725a8a6bf4f7e31f52c23668
plan14-root-reads-design-pdf-service.tsv 09ad1d7267b9598c64e89ec0faa7b18839c785c5c63905b398afe681cf9777c6
plan14-root-reads-region-ha-placement-survivor.tsv 09ad1d7267b9598c64e89ec0faa7b18839c785c5c63905b398afe681cf9777c6
+plan14-root-reads-domains-buy-nosub.tsv 09ad1d7267b9598c64e89ec0faa7b18839c785c5c63905b398afe681cf9777c6
diff --git a/internal/provision/testdata/plan14-root-reads-domains-buy-nosub.tsv b/internal/provision/testdata/plan14-root-reads-domains-buy-nosub.tsv
new file mode 100644
index 000000000..2cb216230
--- /dev/null
+++ b/internal/provision/testdata/plan14-root-reads-domains-buy-nosub.tsv
@@ -0,0 +1,4 @@
+# Census overlay domains-buy-nosub, written by census-propose (#369). census-ruling-domains-buy-nosub, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-domains-buy-nosub.md.
+# 0 body, 0 sites, 2 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+@coverage . 0b97f970046b7ed1ca4044e16dfb658bc013cd5120dce1cd8572d6e6b7ab5993
+@coverage internal/registrar 438f7149d09aa6a151338c68bfe428f704a09628f56e942b8fd4de8cebadd932