carlos / platform Public

Regional domains (#447) Task 11: approved copy, CLI page, copy gate

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 744847152b423db1021ab9e77c2cd00a8242d9c2 parent cd0e84c
14 files changed, +243 −74
  • apimode.go +2 −2
  • approved_regional_domains_copy_test.go +149 −0
  • docs/site/cli.md +16 −0
  • docs/superpowers/plans/2026-10-28-regional-domains-447-copy.md +50 −46
  • domains_cli.go +11 −11
  • internal/console/apex.go +1 −1
  • internal/console/apiplacements.go +5 −5
  • internal/console/apisystemupdate_test.go +1 −1
  • internal/console/regional_reverse_test.go +2 −2
  • internal/console/regional_writers_test.go +1 −1
  • internal/console/regionalfloor.go +2 −2
  • internal/console/regionalfloor_test.go +1 −1
  • internal/domains/claims.go +1 −1
  • internal/release/layoutintent.go +1 −1
diff --git a/apimode.go b/apimode.go
index 57428bb44..137215ec2 100644
--- a/apimode.go
+++ b/apimode.go
@@ -4712,7 +4712,7 @@ type apiPlacementIn struct {
Host string `json:"host"`
}
-// placementsOldConsoleMsg (RD-16, draft) is the placements PUT's answer from
+// placementsOldConsoleMsg (RD-16) is the placements PUT's answer from
// a console without the door: the mux's bare 404, no JSON error.
const placementsOldConsoleMsg = "this console does not support regional domains yet."
@@ -4724,7 +4724,7 @@ type placementsProofError struct {
Verify *apiDomainDNSRecord
}
-// Error is RD-43 (draft); the CLI prints the record after it.
+// Error is RD-43; the CLI prints the record after it.
func (e *placementsProofError) Error() string {
return fmt.Sprintf("prove you control %s first. add this TXT record, then run the same command again.", e.Host)
}
diff --git a/approved_regional_domains_copy_test.go b/approved_regional_domains_copy_test.go
new file mode 100644
index 000000000..981a1cdc1
--- /dev/null
+++ b/approved_regional_domains_copy_test.go
@@ -0,0 +1,149 @@
+// approved_regional_domains_copy_test.go
+package main
+
+import (
+ "fmt"
+ "os"
+ "path/filepath"
+ "regexp"
+ "strconv"
+ "strings"
+ "testing"
+)
+
+// The copy gate of regional custom-domain placements (#447, plan Task 11),
+// modelled on the db region forward gate:
+//
+// - TestRegionalDomainsCopyRecordIsComplete: the record names exactly
+// regionalDomainsCopyIDs;
+// - TestRegionalDomainsCopyHasNoEmDash;
+// - TestRegionalDomainsBuiltCopyIsApproved: an id in
+// regionalDomainsCopyBuilt is an approved row;
+// - TestRegionalDomainsBuiltCopyIsApplied: a built row's text is in the
+// file it names. Whitespace is collapsed on both sides, so a row inside
+// a multi-line usage block matches, and each <placeholder> stands for
+// the code's format verb.
+const regionalDomainsCopyRecordPath = "docs/superpowers/plans/2026-10-28-regional-domains-447-copy.md"
+
+var regionalDomainsCopyIDPattern = regexp.MustCompile(`^RD-[0-9]+$`)
+
+// regionalDomainsCopyIDs is the record's inventory, pinned: RD-1 to RD-45.
+var regionalDomainsCopyIDs = func() []string {
+ ids := make([]string, 0, 45)
+ for i := 1; i <= 45; i++ {
+ ids = append(ids, "RD-"+strconv.Itoa(i))
+ }
+ return ids
+}()
+
+// regionalDomainsCopyBuilt is every id whose approved text the code or docs
+// carry: all of them. Luna's pass 3 approved the deck (2026-10-29, Paul's
+// delegation for large decks) and Task 11 applied it verbatim.
+var regionalDomainsCopyBuilt = regionalDomainsCopyIDs
+
+func mustParseRegionalDomainsRecord(t *testing.T) []copyRow {
+ t.Helper()
+ raw, err := os.ReadFile(regionalDomainsCopyRecordPath)
+ if err != nil {
+ t.Fatal(err)
+ }
+ rows, err := parseCopyTable(string(raw), regionalDomainsCopyRecordPath, regionalDomainsCopyIDPattern, "an RD-<n>")
+ if err != nil {
+ t.Fatal(err)
+ }
+ return rows
+}
+
+func TestRegionalDomainsCopyRecordIsComplete(t *testing.T) {
+ reportAll(t, checkMovesInventory(mustParseRegionalDomainsRecord(t), regionalDomainsCopyIDs))
+}
+
+func TestRegionalDomainsCopyHasNoEmDash(t *testing.T) {
+ reportAll(t, checkMovesNoEmDash(mustParseRegionalDomainsRecord(t)))
+}
+
+func TestRegionalDomainsBuiltCopyIsApproved(t *testing.T) {
+ reportAll(t, checkRunBuilt(mustParseRegionalDomainsRecord(t), regionalDomainsCopyBuilt))
+}
+
+// collapseSpace reads runs of whitespace as one space.
+func collapseSpace(s string) string { return strings.Join(strings.Fields(s), " ") }
+
+// checkRegionalDomainsApplied checks each approved row against the file it
+// names under root. A Go file's row is one literal or one format, as
+// movesTextApplied reads it, or (a row whose file cell says "a fragment") a
+// piece of a larger literal; a docs row is raw text. All of them are matched
+// with whitespace collapsed on both sides, and the deck's `\n` and `\t`
+// escapes read as the characters they stand for.
+func checkRegionalDomainsApplied(rows []copyRow, root string) []string {
+ var out []string
+ for _, r := range rows {
+ if r.Status != "approved" {
+ continue
+ }
+ body, err := os.ReadFile(filepath.Join(root, r.Path()))
+ if err != nil {
+ out = append(out, fmt.Sprintf("%s: %v", r.ID, err))
+ continue
+ }
+ text := collapseSpace(strings.NewReplacer(`\n`, "\n", `\t`, "\t").Replace(r.Text))
+ if !regionalDomainsTextApplied(r, text, body) {
+ out = append(out, fmt.Sprintf("%s: %s does not contain the approved text %q", r.ID, r.Path(), r.Text))
+ }
+ }
+ return out
+}
+
+func regionalDomainsTextApplied(r copyRow, text string, body []byte) bool {
+ switch {
+ case !strings.HasSuffix(r.Path(), ".go"):
+ rest := collapseSpace(string(body))
+ for _, s := range copyPlaceholder.Split(text, -1) {
+ i := strings.Index(rest, s)
+ if i < 0 {
+ return false
+ }
+ rest = rest[i+len(s):]
+ }
+ return true
+ case runFragment(r):
+ return goLiteralMatches(body, func(v string) bool { return strings.Contains(collapseSpace(v), text) })
+ }
+ for _, p := range goTextPatterns(r.Path(), body) {
+ if p = collapseSpace(p); informative(p) && movesRowSpoken(text, p) {
+ return true
+ }
+ }
+ return false
+}
+
+func TestRegionalDomainsBuiltCopyIsApplied(t *testing.T) {
+ reportAll(t, checkRegionalDomainsApplied(builtRows(mustParseRegionalDomainsRecord(t), regionalDomainsCopyBuilt), "."))
+}
+
+// The gate bites: a row whose text is not in its file, and a fragment that
+// is only in a comment, are refused; a row inside a multi-line literal and a
+// placeholder row are accepted.
+func TestRegionalDomainsApplyGateBites(t *testing.T) {
+ dir := t.TempDir()
+ src := "package p\n\n// not in the code: the sentence only in a comment.\nvar u = `usage\n line one\n runs on\n two lines`\n\nconst m = \"%s is served from %s.\"\n"
+ if err := os.WriteFile(filepath.Join(dir, "f.go"), []byte(src), 0o644); err != nil {
+ t.Fatal(err)
+ }
+ rows := []copyRow{
+ {"RD-1", "f.go (a fragment of the usage text)", "line one runs on two lines", "approved"},
+ {"RD-2", "f.go", "<host> is served from <route>.", "approved"},
+ {"RD-3", "f.go", "the sentence only in a comment.", "approved"},
+ {"RD-4", "f.go", "<host> is served from nowhere.", "approved"},
+ {"RD-5", "f.go (a fragment of the usage text)", "the sentence only in a comment", "approved"},
+ }
+ got := checkRegionalDomainsApplied(rows, dir)
+ if len(got) != 3 {
+ t.Fatalf("problems = %q, want RD-3, RD-4 and RD-5 only", got)
+ }
+ for i, id := range []string{"RD-3", "RD-4", "RD-5"} {
+ if !strings.HasPrefix(got[i], id+":") {
+ t.Errorf("problem %d = %q, want %s", i, got[i], id)
+ }
+ }
+}
diff --git a/docs/site/cli.md b/docs/site/cli.md
index 16c7d6dc8..9a505dca9 100644
--- a/docs/site/cli.md
+++ b/docs/site/cli.md
@@ -1307,6 +1307,22 @@ expecting many new instances a week should also enable `--wildcard` on
carlos domains detach --app teams '*.example.com'
```
+#### One domain, one instance per region
+
+A regional domain is served in each region by that region's own instance of the app. A request that reaches a server in one region is answered there and never sent to another region. If that region's instance is not running, the request gets a 503.
+
+```sh
+carlos domains placements --app shop example.com
+carlos domains placements --app shop example.com --set ie=shop-ie.example.net --set uk=shop-uk.example.net
+carlos domains placements --app shop example.com --set ie=shop-ie.example.net --set uk=shop-uk.example.net --wildcard --catchall
+```
+
+`--set` gives the whole set each time, one `region=instance` per region. Without `--set`, the command shows each region's instance, whether it is ready, and the addresses where its servers answer. Once every region you named is ready, point DNS for the domain at those addresses with latency-based routing.
+
+A regional domain has to be new. A hostname already attached as an ordinary domain is refused, and so is one that a catch-all already covers. To make an attached hostname regional, detach it first, then set its placements again. `--wildcard` and `--catchall` are set when the domain is created and cannot be changed afterwards. To change them, detach it first, then set its placements again.
+
+Each instance stays separate, with its own data, backups and hostname. Path prefixes, static sites and fleet placements are not supported on a regional domain.
+
### carlos features
Sets or lists an app's own feature flags โ€” switches the app defines, the
diff --git a/docs/superpowers/plans/2026-10-28-regional-domains-447-copy.md b/docs/superpowers/plans/2026-10-28-regional-domains-447-copy.md
index 30d0d7909..19c6d43b7 100644
--- a/docs/superpowers/plans/2026-10-28-regional-domains-447-copy.md
+++ b/docs/superpowers/plans/2026-10-28-regional-domains-447-copy.md
@@ -11,7 +11,11 @@ are not here.
The rules:
-- Every row starts `draft`. The implementing tasks write the draft text
+- Approval: every row is `approved`. approved by: Luna pass 3, 2026-10-29,
+ Paul's delegation for large decks (`LUNA-COPY-REVIEW-REGIONAL-DOMAINS.md`,
+ pass 3, applied verbatim). A row that changes now goes back through the
+ review.
+- Every row started `draft`. The implementing tasks write the draft text
into code so the branch works end to end. The copy task (plan Task 11)
runs the review: a Luna pass on Paul's house rules, then Paul's approval
(or his delegation to Luna, as for the region labels deck). Approved text
@@ -42,73 +46,73 @@ count.
| id | file | text | status |
|---|---|---|---|
-| RD-1 | domains_cli.go | placements --app <a> [--set <region>=<instance>]... [--wildcard] [--catchall] [flags] <hostname> without --set, shows which instance serves the hostname in each region, whether it is ready, and the addresses to point DNS at. with --set, makes the hostname a regional domain: each region serves it from the instance named for it, and never sends it to another region. give the whole set every time. --wildcard and --catchall take effect only when the domain is created. | draft |
-| RD-2 | domains_cli.go | a region and the instance that serves the hostname there, as region=instance. repeat it for each region | draft |
-| RD-3 | domains_cli.go | use one wildcard certificate for the domain. set only when the domain is created, and needs a CNAME. the message says which if it is missing | draft |
-| RD-4 | domains_cli.go | also serve every one-label name under the domain from the same instances. set only when the domain is created, and needs --wildcard | draft |
+| RD-1 | domains_cli.go (a fragment of the usage text) | placements --app <a> [--set <region>=<instance>]... [--wildcard] [--catchall] [flags] <hostname>. without --set, shows which instance serves the hostname in each region, whether it is ready, and the addresses to point DNS at. with --set, makes the hostname a regional domain. each region serves it from the instance named for it, and a request is never sent to another region. give the whole set every time. --wildcard and --catchall take effect only when the domain is created. | approved |
+| RD-2 | domains_cli.go | give the region and the instance that serves the hostname there, as region=instance. repeat this for each region | approved |
+| RD-3 | domains_cli.go | use one wildcard certificate for the domain. set it only when the domain is created. it needs a CNAME. the message says which CNAME is missing | approved |
+| RD-4 | domains_cli.go | also serve every one-label name under the domain from the same instances. set it only when the domain is created. it requires --wildcard | approved |
## CLI output (domains_cli.go)
| id | file | text | status |
|---|---|---|---|
-| RD-5 | domains_cli.go | REGION\tINSTANCE\tREADY\tADDRESSES | draft |
-| RD-6 | domains_cli.go | <host> is a regional domain. each region serves it from its own instance. | draft |
-| RD-7 | domains_cli.go | <host> is served from <route>. | draft |
-| RD-8 | domains_cli.go | point DNS for <host> at the addresses of the ready regions, with latency-based routing. | draft |
-| RD-9 | domains_cli.go | no server in this region serves <instance> yet. | draft |
-| RD-10 | domains_cli.go | the servers here run a release too old for regional domains. | draft |
-| RD-11 | domains_cli.go | no fixed address is published for this region. | draft |
-| RD-12 | domains_cli.go | not every server has reported. try again in a few minutes. | draft |
-| RD-13 | domains_cli.go | waiting for every server to report since the domain was created. this takes up to five minutes. | draft |
-| RD-14 | domains_cli.go | another route uses this hostname, so no region is ready. | draft |
-| RD-15 | domains_cli.go | <host> now serves from one instance in each of <n> regions. | draft |
-| RD-16 | domains_cli.go | this console does not support regional domains yet. | draft |
-| RD-42 | domains_cli.go | write each --set as region=instance, like uk=shop-uk.example.net | draft |
-| RD-43 | apimode.go | prove you control <host> first. add this TXT record, then run the same command again. | draft |
+| RD-5 | domains_cli.go | REGION\tINSTANCE\tREADY\tADDRESSES | approved |
+| RD-6 | domains_cli.go | <host> is a regional domain. each region serves it from its own instance. | approved |
+| RD-7 | domains_cli.go | <host> is served from <route>. | approved |
+| RD-8 | domains_cli.go | point DNS for <host> at the addresses of the ready regions, with latency-based routing. | approved |
+| RD-9 | domains_cli.go | no server in this region serves <instance> yet. | approved |
+| RD-10 | domains_cli.go | the servers here run a release too old for regional domains. | approved |
+| RD-11 | domains_cli.go | no fixed address is published for this region. | approved |
+| RD-12 | domains_cli.go | not every server has reported. try again in a few minutes. | approved |
+| RD-13 | domains_cli.go | the domain was just created. wait for every server to report. this takes up to five minutes. | approved |
+| RD-14 | domains_cli.go | another route already uses this hostname, so no region is ready. | approved |
+| RD-15 | domains_cli.go | <host> now serves from one instance in each of <n> regions. | approved |
+| RD-16 | apimode.go | this console does not support regional domains yet. | approved |
+| RD-42 | domains_cli.go | write each --set as region=instance, like uk=shop-uk.example.net | approved |
+| RD-43 | apimode.go | prove you control <host> first. add this TXT record, then run the same command again. | approved |
## Console refusals a member sees
| id | file | text | status |
|---|---|---|---|
-| RD-17 | internal/console/apiplacements.go | give between one and eight placements, one per region. | draft |
-| RD-18 | internal/console/apiplacements.go | <region> is named twice. give one instance per region. | draft |
-| RD-19 | internal/console/apiplacements.go | <instance> is named for two regions. give a different instance in each region. | draft |
-| RD-20 | internal/console/apiplacements.go | <instance> is not an instance of this app in <region>. | draft |
-| RD-21 | internal/console/apiplacements.go | <host> is already attached to this app as an ordinary domain. detach it first, then set placements to attach it again as a regional domain. | draft |
-| RD-22 | internal/console/apiplacements.go | could not check every server just now. try again in a few minutes. | draft |
-| RD-23 | internal/console/apiplacements.go | <box> runs <release>, which cannot serve regional domains. try again when every server runs <floor> or later. | draft |
-| RD-24 | internal/console/apiplacements.go | the placements changed while this request ran. try again. | draft |
-| RD-25 | internal/console/apiplacements.go | regional domains are not available on this console yet. | draft |
-| RD-26 | internal/domains/claims.go | this is a regional domain. carlos domains placements is the only way to change where it is served, and its wildcard and catch-all settings are fixed when it is created. to change those, detach it and create it again. | draft |
-| RD-27 | internal/console/apex.go | <host> is a regional domain, so it cannot also be an instance's hostname. choose another name. | draft |
-| RD-28 | internal/console/apidomains.go | a catch-all on <host> would cover a regional domain under it, so it cannot be turned on. | draft |
-| RD-29 | internal/console/domaincatchall.go | an instance catch-all cannot cover a regional domain. | draft |
-| RD-40 | internal/console/apiplacements.go | given a regional domain | draft |
-| RD-41 | internal/console/apiplacements.go | <box> does not say which release it runs. try again when every server runs <floor> or later. | draft |
-| RD-44 | internal/console/apiplacements.go | <host> is a regional domain. carlos domains placements shows the addresses to point DNS at in each region. | draft |
-| RD-45 | internal/console/apiplacements.go | servers on the <channel> channel are moving to <release>, which cannot serve regional domains. try again when they move to <floor> or later. | draft |
+| RD-17 | internal/console/apiplacements.go | give between one and eight placements, one per region. | approved |
+| RD-18 | internal/console/apiplacements.go | <region> is named twice. give one instance per region. | approved |
+| RD-19 | internal/console/apiplacements.go | <instance> is named for two regions. give a different instance in each region. | approved |
+| RD-20 | internal/console/apiplacements.go | <instance> is not an instance of this app in <region>. | approved |
+| RD-21 | internal/console/apiplacements.go | <host> is already attached to this app as an ordinary domain. detach it first, then set its placements to attach it again as a regional domain. | approved |
+| RD-22 | internal/console/apiplacements.go | could not check every server just now. try again in a few minutes. | approved |
+| RD-23 | internal/console/apiplacements.go | <box> runs <release>, which cannot serve regional domains. try again when every server runs <floor> or later. | approved |
+| RD-24 | internal/console/apiplacements.go | the placements changed while this request ran. try again. | approved |
+| RD-25 | internal/console/apiplacements.go | regional domains are not available on this console yet. | approved |
+| RD-26 | internal/domains/claims.go | this is a regional domain. carlos domains placements is the only way to change where it is served, and its wildcard and catch-all settings are fixed when it is created. to change those, detach it first, then set its placements again. | approved |
+| RD-27 | internal/console/apex.go | <host> is a regional domain, so it cannot also be an instance's hostname. choose another name. | approved |
+| RD-28 | internal/console/apidomains.go | a catch-all on <host> would cover a regional domain under it, so it cannot be turned on. | approved |
+| RD-29 | internal/console/domaincatchall.go | an instance catch-all cannot cover a regional domain. | approved |
+| RD-40 | internal/console/apiplacements.go | given a regional domain | approved |
+| RD-41 | internal/console/apiplacements.go | <box> does not say which release it runs. try again when every server runs <floor> or later. | approved |
+| RD-44 | internal/console/apiplacements.go | <host> is a regional domain. carlos domains placements shows the addresses to point DNS at for each region. | approved |
+| RD-45 | internal/console/apiplacements.go | servers on the <channel> channel are moving to <release>, which cannot serve regional domains. try again when they move to <floor> or later. | approved |
## Release floor (operators: internal/release, internal/console, system.go)
| id | file | text | status |
|---|---|---|---|
-| RD-30 | internal/console/regionalfloor.go | <channel> runs <release> and this deployment has a regional domain, so it takes only <floor> or later. <target> is not one. to move it there anyway, pass --allow-below-regional-floor | draft |
-| RD-31 | internal/console/regionalfloor.go | moving to <target> below <floor> on <channel> with --allow-below-regional-floor: servers on it cannot read regional domains and stop serving them | draft |
-| RD-32 | internal/release/layoutintent.go | allow a release below <floor> while regional domains exist. servers on it stop serving them | draft |
+| RD-30 | internal/console/regionalfloor.go | <channel> runs <release>. this deployment has a regional domain, so it must run <floor> or later. <target> is not one. to move the channel there anyway, pass --allow-below-regional-floor | approved |
+| RD-31 | internal/console/regionalfloor.go | moving to <target> below <floor> on <channel> with --allow-below-regional-floor: servers on that channel cannot read regional domains and stop serving them | approved |
+| RD-32 | internal/release/layoutintent.go | allow a release below <floor> while regional domains exist. servers running that release stop serving them | approved |
## carlos add (operators, cli.go)
| id | file | text | status |
|---|---|---|---|
-| RD-33 | cli.go | <host> belongs to a regional domain, so it cannot be a route here. detach the domain first. | draft |
-| RD-34 | cli.go | could not read the domain claim for <host>, so the regional domain check was skipped. | draft |
+| RD-33 | cli.go | <host> belongs to a regional domain, so it cannot be a route here. detach the domain first. | approved |
+| RD-34 | cli.go | could not read the domain claim for <host>, so the regional domain check was skipped. | approved |
## CLI page (docs/site/cli.md)
| id | file | text | status |
|---|---|---|---|
-| RD-35 | docs/site/cli.md | One domain, one instance per region | draft |
-| RD-36 | docs/site/cli.md | A regional domain is served in each region by that region's own instance of the app. A request that reaches a server in one region is answered there and never sent to another region. If that region's instance is not running, the request gets a 503. | draft |
-| RD-37 | docs/site/cli.md | `--set` gives the whole set each time, one `region=instance` per region. Without `--set`, the command shows each region's instance, whether it is ready, and the addresses its servers answer on. Once every region you named is ready, point DNS for the domain at those addresses with latency-based routing. | draft |
-| RD-38 | docs/site/cli.md | A regional domain has to be new. A hostname already attached as an ordinary domain is refused, and so is one that a catch-all already covers. To make an attached hostname regional, detach it first. `--wildcard` and `--catchall` are set when the domain is created and cannot be changed afterwards. To change them, detach the domain and set its placements again. | draft |
-| RD-39 | docs/site/cli.md | Each instance stays its own, with its own data, backups and hostname. Path prefixes, static sites and fleet placements are not supported on a regional domain. | draft |
+| RD-35 | docs/site/cli.md | One domain, one instance per region | approved |
+| RD-36 | docs/site/cli.md | A regional domain is served in each region by that region's own instance of the app. A request that reaches a server in one region is answered there and never sent to another region. If that region's instance is not running, the request gets a 503. | approved |
+| RD-37 | docs/site/cli.md | `--set` gives the whole set each time, one `region=instance` per region. Without `--set`, the command shows each region's instance, whether it is ready, and the addresses where its servers answer. Once every region you named is ready, point DNS for the domain at those addresses with latency-based routing. | approved |
+| RD-38 | docs/site/cli.md | A regional domain has to be new. A hostname already attached as an ordinary domain is refused, and so is one that a catch-all already covers. To make an attached hostname regional, detach it first, then set its placements again. `--wildcard` and `--catchall` are set when the domain is created and cannot be changed afterwards. To change them, detach it first, then set its placements again. | approved |
+| RD-39 | docs/site/cli.md | Each instance stays separate, with its own data, backups and hostname. Path prefixes, static sites and fleet placements are not supported on a regional domain. | approved |
diff --git a/domains_cli.go b/domains_cli.go
index 2d14e56e8..03434d98c 100644
--- a/domains_cli.go
+++ b/domains_cli.go
@@ -52,14 +52,14 @@ const domainsUsage = `usage: carlos domains <attach|verify|detach|list|paths|pla
by, as PUBLISHED. Read-only: the platform that owns the
hostname republishes the whole map, so there is no verb
here that writes one.
- placements --app <a> [--set <region>=<instance>]... [--wildcard] [--catchall] [flags] <hostname>
+ placements --app <a> [--set <region>=<instance>]... [--wildcard] [--catchall] [flags] <hostname>.
without --set, shows which instance serves the hostname in
each region, whether it is ready, and the addresses to
point DNS at. with --set, makes the hostname a regional
- domain: each region serves it from the instance named for
- it, and never sends it to another region. give the whole
- set every time. --wildcard and --catchall take effect only
- when the domain is created.
+ domain. each region serves it from the instance named for
+ it, and a request is never sent to another region. give
+ the whole set every time. --wildcard and --catchall take
+ effect only when the domain is created.
--account <a> account (sqid or name; default "ops")
--account-id <id> account sqid, matched as a sqid ONLY
@@ -484,9 +484,9 @@ func runDomainsPlacements(args []string) {
fs := flag.NewFlagSet("domains placements", flag.ExitOnError)
app := appFlag(fs, "app the hostname belongs to")
var set placementSet
- fs.Var(&set, "set", "a region and the instance that serves the hostname there, as region=instance. repeat it for each region")
- wildcard := fs.Bool("wildcard", false, "use one wildcard certificate for the domain. set only when the domain is created, and needs a CNAME. the message says which if it is missing")
- catchall := fs.Bool("catchall", false, "also serve every one-label name under the domain from the same instances. set only when the domain is created, and needs --wildcard")
+ fs.Var(&set, "set", "give the region and the instance that serves the hostname there, as region=instance. repeat this for each region")
+ wildcard := fs.Bool("wildcard", false, "use one wildcard certificate for the domain. set it only when the domain is created. it needs a CNAME. the message says which CNAME is missing")
+ catchall := fs.Bool("catchall", false, "also serve every one-label name under the domain from the same instances. set it only when the domain is created. it requires --wildcard")
consoleFlag := consoleOption(fs, "console to read through (default: the only logged-in one)")
acctRaw := fs.String("account", "", "account (sqid or name) the app belongs to (default: your only account, or the configured/chosen one)")
acctIDRaw := fs.String("account-id", "", "account sqid, matched as a sqid ONLY โ€” supersedes --account")
@@ -564,7 +564,7 @@ func (p *placementSet) String() string {
func (p *placementSet) Set(v string) error {
region, host, ok := strings.Cut(v, "=")
if !ok {
- // RD-42 (draft).
+ // RD-42.
return errors.New("write each --set as region=instance, like uk=shop-uk.example.net")
}
*p = append(*p, apiPlacementIn{Region: region, Host: host})
@@ -632,9 +632,9 @@ func placementReason(p apiPlacement) string {
case "evidence-incomplete":
return "not every server has reported. try again in a few minutes."
case "settling":
- return "waiting for every server to report since the domain was created. this takes up to five minutes."
+ return "the domain was just created. wait for every server to report. this takes up to five minutes."
case "route-collision":
- return "another route uses this hostname, so no region is ready."
+ return "another route already uses this hostname, so no region is ready."
}
return p.Reason
}
diff --git a/internal/console/apex.go b/internal/console/apex.go
index 8101e8a20..b32abfcf7 100644
--- a/internal/console/apex.go
+++ b/internal/console/apex.go
@@ -244,7 +244,7 @@ func (s *Server) regionalClaimHold(ctx context.Context, acct, host string) (*ape
// claimHeldSentence is hostHeldSentence for a hostname claim. A claim of
// another account is refused without saying whose or that it is a claim.
-// A regional claim of this account is RD-27 (draft).
+// A regional claim of this account is RD-27.
func claimHeldSentence(host string, hold *apexHold) string {
switch {
case hold.OtherAccount != "":
diff --git a/internal/console/apiplacements.go b/internal/console/apiplacements.go
index e32969479..e14f55a74 100644
--- a/internal/console/apiplacements.go
+++ b/internal/console/apiplacements.go
@@ -39,7 +39,7 @@ const (
reasonRouteCollision = "route-collision"
)
-// placementsUnreadableMsg (RD-22, draft) is the 503 when the console cannot
+// placementsUnreadableMsg (RD-22) is the 503 when the console cannot
// read the boxes' edges files or heartbeats.
const placementsUnreadableMsg = "could not check every server just now. try again in a few minutes."
@@ -338,7 +338,7 @@ func boxAtRegionalFloor(b status.Box) bool {
return ok && v.Compare(release.RegionalDomainsFloor) >= 0
}
-// The PUT door's member-facing refusals (copy deck, draft RD rows). The
+// The PUT door's member-facing refusals (the approved copy deck, RD rows). The
// neutral 409 of every evidence, walk and overlap refusal is the attach
// door's hostUnavailableMsg, so this door says nothing an attach does not.
const (
@@ -368,7 +368,7 @@ func placementsNotInstanceMsg(host, region string) string {
// RD-21.
func placementsOrdinaryMsg(host string) string {
- return fmt.Sprintf("%s is already attached to this app as an ordinary domain. detach it first, then set placements to attach it again as a regional domain.", host)
+ return fmt.Sprintf("%s is already attached to this app as an ordinary domain. detach it first, then set its placements to attach it again as a regional domain.", host)
}
// RD-23.
@@ -387,12 +387,12 @@ func placementsNoReleaseMsg(box, floor string) string {
return fmt.Sprintf("%s does not say which release it runs. try again when every server runs %s or later.", box, floor)
}
-// regionalDNSGuidance (RD-44, draft) is a regional domain's DNS advice on
+// regionalDNSGuidance (RD-44) is a regional domain's DNS advice on
// the domain list, the per-host GET and the settings page, in place of the
// single-edge advice (domainGuidance), which names every edge for one
// route. Where to point DNS is per region, and the placements read says it.
func regionalDNSGuidance(host string) string {
- return fmt.Sprintf("%s is a regional domain. carlos domains placements shows the addresses to point DNS at in each region.", host)
+ return fmt.Sprintf("%s is a regional domain. carlos domains placements shows the addresses to point DNS at for each region.", host)
}
// placementsControlPlaneVerb (RD-40) completes controlPlaneRefusal's
diff --git a/internal/console/apisystemupdate_test.go b/internal/console/apisystemupdate_test.go
index fcf20a21a..af66eb371 100644
--- a/internal/console/apisystemupdate_test.go
+++ b/internal/console/apisystemupdate_test.go
@@ -638,7 +638,7 @@ func TestSystemDoorsRefuseBelowTheRegionalFloor(t *testing.T) {
time.Sleep(1100 * time.Millisecond)
}
putRegionalClaim(t, fx.rel, "shop.example.com", "acct", "shop", rdHomeHost, false, false)
- want := "canary runs v0.31.0 and this deployment has a regional domain, so it takes only v0.31.0 or later. %s is not one. to move it there anyway, pass --allow-below-regional-floor"
+ want := "canary runs v0.31.0. this deployment has a regional domain, so it must run v0.31.0 or later. %s is not one. to move the channel there anyway, pass --allow-below-regional-floor"
pointer := func() *release.SystemPointer {
p, _, err := release.GetSystemPointer(ctx, fx.rel, fx.pub, "router", "canary")
if err != nil {
diff --git a/internal/console/regional_reverse_test.go b/internal/console/regional_reverse_test.go
index 01021ff7e..c19975749 100644
--- a/internal/console/regional_reverse_test.go
+++ b/internal/console/regional_reverse_test.go
@@ -27,12 +27,12 @@ import (
"github.com/carlosframework/platform/internal/provision"
)
-// rdCatchallMsg is RD-28 (draft) for host.
+// rdCatchallMsg is RD-28 for host.
func rdCatchallMsg(host string) string {
return "a catch-all on " + host + " would cover a regional domain under it, so it cannot be turned on."
}
-// rdInstanceCatchallMsg is RD-29 (draft).
+// rdInstanceCatchallMsg is RD-29.
const rdInstanceCatchallMsg = "an instance catch-all cannot cover a regional domain."
// rdInstWorld is the PUT's world whose app shop also has instances under
diff --git a/internal/console/regional_writers_test.go b/internal/console/regional_writers_test.go
index 496aecea3..9c6e68593 100644
--- a/internal/console/regional_writers_test.go
+++ b/internal/console/regional_writers_test.go
@@ -73,7 +73,7 @@ func requireNoRecord(t *testing.T, st release.Store, app, host string) {
}
}
-// rdHeldMsg is RD-27 (draft) for host.
+// rdHeldMsg is RD-27 for host.
func rdHeldMsg(host string) string {
return host + " is a regional domain, so it cannot also be an instance's hostname. choose another name."
}
diff --git a/internal/console/regionalfloor.go b/internal/console/regionalfloor.go
index d264209c5..e3200a553 100644
--- a/internal/console/regionalfloor.go
+++ b/internal/console/regionalfloor.go
@@ -40,11 +40,11 @@ import (
// consoleRegionalFloorRefusal (RD-30) takes the channel, its current
// release, the floor and the target.
-const consoleRegionalFloorRefusal = "%s runs %s and this deployment has a regional domain, so it takes only %s or later. %s is not one. to move it there anyway, pass --allow-below-regional-floor"
+const consoleRegionalFloorRefusal = "%s runs %s. this deployment has a regional domain, so it must run %s or later. %s is not one. to move the channel there anyway, pass --allow-below-regional-floor"
// consoleRegionalFloorOverride (RD-31) takes the target, the floor and the
// channel.
-const consoleRegionalFloorOverride = "moving to %s below %s on %s with --allow-below-regional-floor: servers on it cannot read regional domains and stop serving them"
+const consoleRegionalFloorOverride = "moving to %s below %s on %s with --allow-below-regional-floor: servers on that channel cannot read regional domains and stop serving them"
// errRegionalFloorPromotion is a promotion the regional floor refused.
var errRegionalFloorPromotion = errors.New("regional floor")
diff --git a/internal/console/regionalfloor_test.go b/internal/console/regionalfloor_test.go
index 653aff278..7f2ecfd74 100644
--- a/internal/console/regionalfloor_test.go
+++ b/internal/console/regionalfloor_test.go
@@ -21,7 +21,7 @@ const rdFloorClaimHost = "shop.example.com"
// rdFloorWant is RD-30 for stable at from, moving to target.
func rdFloorWant(from, target string) string {
- return "stable runs " + from + " and this deployment has a regional domain, so it takes only v0.31.0 or later. " + target + " is not one. to move it there anyway, pass --allow-below-regional-floor"
+ return "stable runs " + from + ". this deployment has a regional domain, so it must run v0.31.0 or later. " + target + " is not one. to move the channel there anyway, pass --allow-below-regional-floor"
}
// claimListCounter counts the claim listings a promotion makes (spec ยง11:
diff --git a/internal/domains/claims.go b/internal/domains/claims.go
index e1d14654d..50aecfd51 100644
--- a/internal/domains/claims.go
+++ b/internal/domains/claims.go
@@ -226,7 +226,7 @@ func claimSchemaRefusal(c Claim) string {
// claim in a way only the placements door may: a route that is not one of
// its bound hosts, its capabilities, its prefix map, or an instance catch-all
// under it.
-var ErrRegionalClaim = errors.New("this is a regional domain. carlos domains placements is the only way to change where it is served, and its wildcard and catch-all settings are fixed when it is created. to change those, detach it and create it again.")
+var ErrRegionalClaim = errors.New("this is a regional domain. carlos domains placements is the only way to change where it is served, and its wildcard and catch-all settings are fixed when it is created. to change those, detach it first, then set its placements again.")
// ErrBadPlacements is returned by SetClaimPlacements for a claim that would
// not pass ValidPlacements once written.
diff --git a/internal/release/layoutintent.go b/internal/release/layoutintent.go
index d6478a937..f25611d67 100644
--- a/internal/release/layoutintent.go
+++ b/internal/release/layoutintent.go
@@ -286,7 +286,7 @@ const RegionalFloorOverrideFlag = "allow-below-regional-floor"
// RegionalFloorOverrideUsage (RD-32) is the override flag's help text,
// shared by the two commands.
-const RegionalFloorOverrideUsage = "allow a release below v0.31.0 while regional domains exist. servers on it stop serving them"
+const RegionalFloorOverrideUsage = "allow a release below v0.31.0 while regional domains exist. servers running that release stop serving them"
// RegionalFloorAllows is RootfsFloorAllows against RegionalDomainsFloor:
// a channel running installed may move to candidate without the override