carlos / platform Public

cli: carlos accounts subdomain (T7)

carlos accounts subdomain set|remove|show|inventory, a branch node
under accounts (operator scope) over the console's subdomain doors.
Refusals print the console's approved sentence as it comes, with any
hosts it names listed under it; only code not_found maps to the CLI's
not-found answer. set then tries a verified TLS handshake on one host
under the name every 5 s for up to 120 s and prints the serving or
still-issuing line; exit 0 either way.

The CLI prints public_host wherever it shows an instance or route
address (instances list table, routes table, deploy announcement, the
deploy and canary watch lines and timeout reports, gate-pass notes,
canary live line). Matching, doors and probes stay on host: watch
targets carry Display beside Host, and watchOrigin and
importVerifyTarget are unchanged.

Approved copy in accounts_subdomain_copy.go; the approved-copy test
pins every entry of the record, CLI and console. Golden re-recorded,
parity row added, make parity-doc run, docs/site/cli.md section added.
Census re-proposed under account-subdomains (runDeploy body change);
not approved, needs the reviewer's ruling.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 5def0e2b237b34fca4f1f1932742869427747fc3 parent 4bd7087
20 files changed, +1,044 −51
  • accounts.go +4 −1
  • accounts_subdomain.go +353 −0
  • accounts_subdomain_copy.go +43 −0
  • accounts_subdomain_test.go +417 −0
  • apimode.go +33 −9
  • approved_account_subdomains_copy_test.go +62 −0
  • canary.go +13 −2
  • deploy.go +62 −19
  • deploy_test.go +1 −1
  • deploywatch.go +3 −7
  • docs/parity.md +1 −0
  • docs/site/cli.md +13 −0
  • docs/superpowers/notes/census-proposal-account-subdomains.md +4 −2
  • instances_cli.go +1 −1
  • internal/provision/testdata/plan14-root-reads-account-subdomains.tsv +4 −1
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −1
  • parity/cli.tsv +4 −0
  • parity/parity.tsv +1 −0
  • routes_cli.go +4 −1
  • testdata/clireg-golden.jsonl +20 −6

Intent

Human

<task-notification> <task-id>a43e438c6ef448f9e</task-id> <tool-use-id>toolu_013eL7YcTeWDxq3JM7AXm6nJ</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/709ac745-ee81-4971-97b8-321e18b19cf6/tasks/a43e438c6ef448f9e.output</output-file> <status>completed</status> <summary>Agent "Implement Task 6: door + canonical URLs" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Status: DONE. Both open items from Astra's re-review are fixed and the covering tests pass. Commit: `4bd70870` console: account subdomain review fixes, round 2 (T6), on top of `026994a4`, `e990eebb` and `db268270`. Fixes: - **Item 4, canary flash:** the flash now gives the name URL only when it knows a box serves that host under the name. It checks the console box's route for the host, or the app's instance record when there is no route. A replica record, a sidecar, or anything that fails to read keeps the sqid host. `TestCanaryFlashFromRecords` covers a replica record with no local route (keeps the sqid host) and an ordinary record (gets the name host). - **Item 5, cache reset:** `TestSubdomainRollbackResetsClaimCache` runs the race over a store that caches like production. It first shows a settled claim is not re-read by a cached listing, then shows it is read again once after the rolled-back set, and checks the serial is 1. Tests: - RED: with each fix reverted, its new test failed (the replica record got the name host; the settled claim was read 0 times after the rollback). Both fixes are back in place. - Covering console run (Step 2 selector, both new tests, census and claim-invariant tests, all canary tests): passes in 120s. - Provision census guards: pass. No new pin is needed, because `handleNewCanary` and `channelFlashHost` are not census units. Concerns: none new. The minors left open in round 1 are still listed in the report. Report (round 2 section appended): `/home/paulca/amadan.net/carlos/platform/.claude/worktrees/design-account-name-hosts/.superpowers/sdd/2026-11-11-account-subdomains/task-6-report.md`</result> <usage><subagent_tokens>478660</subagent_tokens><tool_uses>13</tool_uses><duration_ms>321852</duration_ms></usage> </task-notification>

Attributed to this commit: 7.46 g CO₂e (964,837 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on design-account-name-hosts, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.

diff --git a/accounts.go b/accounts.go
index ba8c05950..39eb93e82 100644
--- a/accounts.go
+++ b/accounts.go
@@ -30,7 +30,7 @@ import (
"github.com/carlosframework/platform/internal/release"
)
-const accountsUsage = `usage: carlos accounts <create|list|migrate|plan>
+const accountsUsage = `usage: carlos accounts <create|list|migrate|plan|subdomain>
create --name <name> mint an account: the next free id, its
frozen sqid, and the bucket manifest every
@@ -60,6 +60,8 @@ const accountsUsage = `usage: carlos accounts <create|list|migrate|plan>
they are more generous than the plan's
[--reason <text>] why the plan is changing
[--console <url>] which logged-in console to use
+ subdomain <set|remove|show|inventory>
+ ` + cliSubdomainCopyShort + `
plan only works where the console has a plan catalog (CARLOS_PLAN_CATALOG).
@@ -86,6 +88,7 @@ func accountsCommand() *clireg.Node {
raw("list", cust, runAccountsList),
raw("migrate", op, runAccountsMigrate),
raw("plan", op, runAccountsPlan),
+ accountsSubdomainCommand(),
},
Fallback: func(args, consumed []string) {
fmt.Fprint(os.Stderr, accountsUsage)
diff --git a/accounts_subdomain.go b/accounts_subdomain.go
new file mode 100644
index 000000000..cf8d648c7
--- /dev/null
+++ b/accounts_subdomain.go
@@ -0,0 +1,353 @@
+package main
+
+// `carlos accounts subdomain set|remove|show|inventory`: a platform operator
+// gives an account a readable name in its app addresses
+// (<app>.<name>.<apps-domain> beside <app>.<sqid>.<apps-domain>), takes it
+// away, shows it, or lists the labels under the apps domain nobody holds,
+// through the console's subdomain doors (internal/console/apisubdomain.go;
+// account subdomains spec §4.3, §4.8).
+//
+// A refusal's sentence is the console's: its answer carries the approved
+// copy already formatted, so this side prints it as it comes, with the
+// hosts it is about listed under it. Only an unknown account (code
+// not_found, whose sentence is the mux's) is said in the CLI's own words.
+
+import (
+ "context"
+ "crypto/tls"
+ "encoding/json"
+ "errors"
+ "flag"
+ "fmt"
+ "io"
+ "log"
+ "net"
+ "net/http"
+ "net/url"
+ "os"
+ "strings"
+ "text/tabwriter"
+ "time"
+
+ "github.com/carlosframework/platform/internal/clireg"
+)
+
+const accountsSubdomainUsage = "usage: carlos accounts subdomain <set|remove|show|inventory>\n\n" +
+ " set --account <sqid> <name> " + cliSubdomainCopySetShort + "\n" +
+ " remove --account <sqid> " + cliSubdomainCopyRemoveShort + "\n" +
+ " show --account <sqid> " + cliSubdomainCopyShowShort + "\n" +
+ " inventory " + cliSubdomainCopyInventoryShort + "\n"
+
+// accountsSubdomainCommand is `carlos accounts subdomain`: a branch of the
+// four verbs, operator-scoped like plan. Bare or any other word prints
+// accountsSubdomainUsage (stderr, exit 1), as `carlos accounts` does.
+func accountsSubdomainCommand() *clireg.Node {
+ const op = clireg.Operator
+ verb := func(name string) *clireg.Node {
+ return raw(name, op, func(args []string) { runAccountsSubdomain(name, args) })
+ }
+ return &clireg.Node{
+ Name: "subdomain",
+ Audience: op,
+ Children: []*clireg.Node{verb("set"), verb("remove"), verb("show"), verb("inventory")},
+ Fallback: func(args, consumed []string) {
+ fmt.Fprint(os.Stderr, accountsSubdomainUsage)
+ os.Exit(1)
+ },
+ }
+}
+
+// subdomainHost is one host the console names under a label: who holds it,
+// for which app, and where it was found (claim, record, pending
+// allocation).
+type subdomainHost struct {
+ Host string `json:"host"`
+ Account string `json:"account"`
+ App string `json:"app"`
+ Source string `json:"source"`
+}
+
+// accountSubdomainReply is the door's answer about one account: its name
+// ("" for none), the host its apps answer under, and other accounts' hosts
+// under it (show).
+type accountSubdomainReply struct {
+ Account string `json:"account"`
+ Name string `json:"name"`
+ Host string `json:"host"`
+ Foreign []subdomainHost `json:"foreign"`
+}
+
+// subdomainInventoryReply is the inventory door's answer.
+type subdomainInventoryReply struct {
+ AppsDomain string `json:"apps_domain"`
+ Labels []struct {
+ Label string `json:"label"`
+ Hosts []subdomainHost `json:"hosts"`
+ } `json:"labels"`
+}
+
+// subdomainRefusal is a refusal from the doors: the console's sentence and
+// the hosts it is about, listed one to a line under it.
+type subdomainRefusal struct {
+ msg string
+ hosts []subdomainHost
+}
+
+func (e *subdomainRefusal) Error() string {
+ if len(e.hosts) == 0 {
+ return e.msg
+ }
+ var b strings.Builder
+ b.WriteString(e.msg)
+ b.WriteString("\n")
+ writeSubdomainHosts(&b, e.hosts, " ")
+ return strings.TrimRight(b.String(), "\n")
+}
+
+// writeSubdomainHosts lists hosts as aligned rows of host, account and app,
+// each line starting with indent.
+func writeSubdomainHosts(w io.Writer, hosts []subdomainHost, indent string) {
+ tw := tabwriter.NewWriter(w, 0, 0, 2, ' ', 0)
+ for _, h := range hosts {
+ fmt.Fprintf(tw, "%s%s\t%s\t%s\n", indent, h.Host, dashIfEmpty(h.Account), dashIfEmpty(h.App))
+ }
+ tw.Flush()
+}
+
+// subdomainError reads a refusal from the doors. An unknown account (code
+// not_found) is the CLI's not-found answer; everything else is the
+// console's sentence, with its hosts when it names some.
+func subdomainError(status int, body []byte) error {
+ var e struct {
+ Error string `json:"error"`
+ Code string `json:"code"`
+ Hosts []subdomainHost `json:"hosts"`
+ }
+ if json.Unmarshal(body, &e) != nil || e.Error == "" {
+ return apiErrorFromBody(status, body)
+ }
+ if e.Code == "not_found" {
+ return notFoundErr()
+ }
+ return &subdomainRefusal{msg: e.Error, hosts: e.Hosts}
+}
+
+func runAccountsSubdomain(verb string, args []string) {
+ if err := runAccountsSubdomainWithSession(context.Background(), nil, verb, args, stdout); err != nil {
+ if errors.Is(err, flag.ErrHelp) {
+ return
+ }
+ log.Fatalf("accounts subdomain %s: %v", verb, err)
+ }
+}
+
+// runAccountsSubdomainWithSession runs one verb. sess nil resolves the
+// console session from --console; a test passes its own.
+func runAccountsSubdomainWithSession(ctx context.Context, sess *apiSession, verb string, args []string, out io.Writer) error {
+ fs := flag.NewFlagSet("accounts subdomain "+verb, flag.ContinueOnError)
+ fs.SetOutput(out)
+ var account *string
+ header := ""
+ switch verb {
+ case "set":
+ header = "usage: carlos accounts subdomain set --account <sqid> <name> [flags]"
+ account = fs.String("account", "", cliSubdomainCopyFlagAccount)
+ case "remove", "show":
+ account = fs.String("account", "", cliSubdomainCopyFlagAccount)
+ case "inventory":
+ default:
+ return fmt.Errorf("unknown verb %q", verb)
+ }
+ consoleFlag := consoleOption(fs, "console origin to use")
+ fs.Usage = flagUsage(fs, header)
+ words, err := parseInterspersed(fs, args)
+ if err != nil {
+ return err
+ }
+ want := 0
+ if verb == "set" {
+ want = 1
+ }
+ if len(words) > want {
+ return fmt.Errorf("unexpected argument %q", words[want])
+ }
+ if len(words) < want {
+ return errors.New("usage: carlos accounts subdomain set --account <sqid> <name>")
+ }
+ acct := ""
+ if account != nil {
+ if acct, err = explicitStoreAccount(*account); err != nil {
+ return err
+ }
+ }
+ if sess == nil {
+ sess = requirePlanAPISession(*consoleFlag)
+ printUsing(out, sess)
+ }
+ switch verb {
+ case "set":
+ res, err := sess.setAccountSubdomain(ctx, acct, words[0])
+ if err != nil {
+ return err
+ }
+ fmt.Fprintln(out, colorFor(out).ok(fmt.Sprintf(cliSubdomainCopySetDone, res.Account, res.Name, res.Host)))
+ waitForSubdomainCertificate(ctx, out, res.Host)
+ case "remove":
+ res, err := sess.removeAccountSubdomain(ctx, acct)
+ if err != nil {
+ return err
+ }
+ fmt.Fprintln(out, colorFor(out).ok(fmt.Sprintf(cliSubdomainCopyRemoveDone, res.Account, res.Account)))
+ case "show":
+ res, err := sess.accountSubdomain(ctx, acct)
+ if err != nil {
+ return err
+ }
+ printAccountSubdomain(out, res)
+ case "inventory":
+ res, err := sess.subdomainInventory(ctx)
+ if err != nil {
+ return err
+ }
+ printSubdomainInventory(out, res)
+ }
+ return nil
+}
+
+func subdomainPath(account string) string {
+ return "/api/cli/accounts/" + url.PathEscape(account) + "/subdomain"
+}
+
+func (s *apiSession) accountSubdomain(ctx context.Context, account string) (accountSubdomainReply, error) {
+ status, body, err := s.getJSON(ctx, subdomainPath(account))
+ return decodeAccountSubdomain(status, body, err)
+}
+
+func (s *apiSession) setAccountSubdomain(ctx context.Context, account, name string) (accountSubdomainReply, error) {
+ status, body, err := s.postJSON(ctx, subdomainPath(account), map[string]string{"name": name})
+ return decodeAccountSubdomain(status, body, err)
+}
+
+func (s *apiSession) removeAccountSubdomain(ctx context.Context, account string) (accountSubdomainReply, error) {
+ status, body, err := s.deleteJSON(ctx, subdomainPath(account))
+ return decodeAccountSubdomain(status, body, err)
+}
+
+func (s *apiSession) subdomainInventory(ctx context.Context) (subdomainInventoryReply, error) {
+ status, body, err := s.getJSON(ctx, "/api/cli/system/subdomain-inventory")
+ if err != nil {
+ return subdomainInventoryReply{}, err
+ }
+ if status != http.StatusOK {
+ return subdomainInventoryReply{}, subdomainError(status, body)
+ }
+ var out subdomainInventoryReply
+ if err := json.Unmarshal(body, &out); err != nil {
+ return subdomainInventoryReply{}, fmt.Errorf("unreadable response: %w", err)
+ }
+ return out, nil
+}
+
+func decodeAccountSubdomain(status int, body []byte, err error) (accountSubdomainReply, error) {
+ if err != nil {
+ return accountSubdomainReply{}, err
+ }
+ if status != http.StatusOK {
+ return accountSubdomainReply{}, subdomainError(status, body)
+ }
+ var out accountSubdomainReply
+ if err := json.Unmarshal(body, &out); err != nil {
+ return accountSubdomainReply{}, fmt.Errorf("unreadable response: %w", err)
+ }
+ return out, nil
+}
+
+func printAccountSubdomain(w io.Writer, r accountSubdomainReply) {
+ if r.Name == "" {
+ fmt.Fprintf(w, cliSubdomainCopyShowNone+"\n", r.Account)
+ return
+ }
+ fmt.Fprintf(w, cliSubdomainCopyShowName+"\n", r.Account, r.Name)
+ if len(r.Foreign) > 0 {
+ fmt.Fprintln(w, cliSubdomainCopyShowForeign)
+ writeSubdomainHosts(w, r.Foreign, " ")
+ }
+}
+
+func printSubdomainInventory(w io.Writer, r subdomainInventoryReply) {
+ if len(r.Labels) == 0 {
+ fmt.Fprintf(w, cliSubdomainCopyInventoryEmpty+"\n", r.AppsDomain)
+ return
+ }
+ fmt.Fprintf(w, cliSubdomainCopyInventoryHeading+"\n", r.AppsDomain)
+ for _, l := range r.Labels {
+ fmt.Fprintf(w, " %s\n", l.Label)
+ writeSubdomainHosts(w, l.Hosts, " ")
+ }
+}
+
+// set's wait for the name's certificate (spec §4.8): one handshake every
+// subdomainCheckEvery, for up to subdomainCheckFor. Vars so a test can
+// shorten them and stand in for the network.
+var (
+ subdomainCheckEvery = 5 * time.Second
+ subdomainCheckFor = 120 * time.Second
+ subdomainHandshake = tlsHandshake
+)
+
+// subdomainProbeLabel is the label of the host set probes under the name.
+// Any one label under <name>.<apps-domain> is covered by the account's
+// wildcard certificate, and the edge serves that certificate for it whether
+// or not an app answers there (internal/edge/wildcard.go, certFor), so a
+// verified handshake on it says the wildcard is in place. Before it is, the
+// edge's per-host policy refuses a name that is not a route, so the probe
+// never starts a certificate order of its own.
+const subdomainProbeLabel = "carlos-check"
+
+// waitForSubdomainCertificate tries the probe host under root until a
+// verified TLS handshake succeeds or the wait ends, and says which. Neither
+// is a failure: the subdomain is set either way.
+func waitForSubdomainCertificate(ctx context.Context, w io.Writer, root string) {
+ if root == "" {
+ return
+ }
+ if subdomainServing(ctx, subdomainProbeLabel+"."+root) {
+ fmt.Fprintln(w, colorFor(w).ok(fmt.Sprintf(cliSubdomainCopySetServing, "*."+root)))
+ return
+ }
+ mutedf(w, cliSubdomainCopySetIssuing, root)
+}
+
+// subdomainServing reports whether a handshake with probe succeeds within
+// subdomainCheckFor, trying every subdomainCheckEvery.
+func subdomainServing(ctx context.Context, probe string) bool {
+ deadline := time.Now().Add(subdomainCheckFor)
+ for {
+ if subdomainHandshake(ctx, probe) == nil {
+ return true
+ }
+ if time.Now().Add(subdomainCheckEvery).After(deadline) {
+ return false
+ }
+ t := time.NewTimer(subdomainCheckEvery)
+ select {
+ case <-ctx.Done():
+ t.Stop()
+ return false
+ case <-t.C:
+ }
+ }
+}
+
+// tlsHandshake dials host:443 and completes a TLS handshake that verifies
+// the certificate for host against the system roots.
+func tlsHandshake(ctx context.Context, host string) error {
+ ctx, cancel := context.WithTimeout(ctx, 10*time.Second)
+ defer cancel()
+ d := &tls.Dialer{Config: &tls.Config{ServerName: host, MinVersion: tls.VersionTLS12}}
+ conn, err := d.DialContext(ctx, "tcp", net.JoinHostPort(host, "443"))
+ if err != nil {
+ return err
+ }
+ return conn.Close()
+}
diff --git a/accounts_subdomain_copy.go b/accounts_subdomain_copy.go
new file mode 100644
index 000000000..16db66f3c
--- /dev/null
+++ b/accounts_subdomain_copy.go
@@ -0,0 +1,43 @@
+package main
+
+// Approved copy for `carlos accounts subdomain` (docs/superpowers/plans/
+// 2026-11-11-account-subdomains-copy.json, the cli.* entries, whose File is
+// this file). Byte for byte the record's Text: change the record and this
+// file together, never one alone. Each constant names its record ID.
+//
+// The refusals are not here: the console's answer already carries the
+// approved sentence (internal/console/subdomain_copy.go), and the CLI prints
+// it as it comes.
+
+const (
+ // cli.subdomain.short
+ cliSubdomainCopyShort = "give an account a readable name in its app addresses"
+ // cli.subdomain.set.short
+ cliSubdomainCopySetShort = "give the account a subdomain"
+ // cli.subdomain.remove.short
+ cliSubdomainCopyRemoveShort = "take the account's subdomain away"
+ // cli.subdomain.show.short
+ cliSubdomainCopyShowShort = "show the account's subdomain"
+ // cli.subdomain.inventory.short
+ cliSubdomainCopyInventoryShort = "list unused labels under the apps domain"
+ // cli.subdomain.flag.account
+ cliSubdomainCopyFlagAccount = "account sqid to change or show"
+ // cli.subdomain.set.done
+ cliSubdomainCopySetDone = "account %s has the subdomain %s. its apps answer at <app>.%s, and at their old addresses too"
+ // cli.subdomain.set.serving
+ cliSubdomainCopySetServing = "checked: %s answers over https"
+ // cli.subdomain.set.issuing
+ cliSubdomainCopySetIssuing = "the certificate for *.%s is still being issued. addresses under it should work in a minute or two"
+ // cli.subdomain.remove.done
+ cliSubdomainCopyRemoveDone = "account %s no longer has a subdomain. its apps answer only at their %s addresses"
+ // cli.subdomain.show.none
+ cliSubdomainCopyShowNone = "account %s has no subdomain"
+ // cli.subdomain.show.name
+ cliSubdomainCopyShowName = "account %s has the subdomain %s"
+ // cli.subdomain.show.foreign
+ cliSubdomainCopyShowForeign = "these hosts under it belong to other accounts:"
+ // cli.subdomain.inventory.heading
+ cliSubdomainCopyInventoryHeading = "unused labels under %s. give one to an account to add hosts under it:"
+ // cli.subdomain.inventory.empty
+ cliSubdomainCopyInventoryEmpty = "every label under %s is an account sqid or an assigned subdomain"
+)
diff --git a/accounts_subdomain_test.go b/accounts_subdomain_test.go
new file mode 100644
index 000000000..9f4c4f113
--- /dev/null
+++ b/accounts_subdomain_test.go
@@ -0,0 +1,417 @@
+package main
+
+import (
+ "bytes"
+ "context"
+ "encoding/json"
+ "errors"
+ "io"
+ "net/http"
+ "net/http/httptest"
+ "reflect"
+ "strings"
+ "sync"
+ "sync/atomic"
+ "testing"
+ "time"
+)
+
+// subdomainConsole answers the subdomain doors with handler and records
+// each request as "METHOD path" and each POST body's name.
+func subdomainConsole(t *testing.T, handler func(w http.ResponseWriter, r *http.Request)) (*apiSession, *[]string, *[]string) {
+ t.Helper()
+ var mu sync.Mutex
+ var paths, names []string
+ ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ mu.Lock()
+ paths = append(paths, r.Method+" "+r.URL.RequestURI())
+ if r.Method == http.MethodPost {
+ var req struct {
+ Name string `json:"name"`
+ }
+ if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
+ t.Errorf("decode request: %v", err)
+ }
+ names = append(names, req.Name)
+ }
+ mu.Unlock()
+ handler(w, r)
+ }))
+ t.Cleanup(ts.Close)
+ return newTestSession(ts.URL), &paths, &names
+}
+
+func writeTestJSON(w http.ResponseWriter, status int, v any) {
+ w.Header().Set("Content-Type", "application/json")
+ w.WriteHeader(status)
+ json.NewEncoder(w).Encode(v)
+}
+
+// fastSubdomainCheck shortens set's TLS wait and replaces its handshake:
+// answer decides each attempt, and the hosts tried are recorded.
+func fastSubdomainCheck(t *testing.T, answer func(n int) error) *[]string {
+ t.Helper()
+ var mu sync.Mutex
+ var tried []string
+ oldEvery, oldFor, oldShake := subdomainCheckEvery, subdomainCheckFor, subdomainHandshake
+ subdomainCheckEvery, subdomainCheckFor = time.Millisecond, 50*time.Millisecond
+ subdomainHandshake = func(ctx context.Context, host string) error {
+ mu.Lock()
+ tried = append(tried, host)
+ n := len(tried)
+ mu.Unlock()
+ return answer(n)
+ }
+ t.Cleanup(func() { subdomainCheckEvery, subdomainCheckFor, subdomainHandshake = oldEvery, oldFor, oldShake })
+ return &tried
+}
+
+func TestAccountsSubdomainSet(t *testing.T) {
+ sess, paths, names := subdomainConsole(t, func(w http.ResponseWriter, r *http.Request) {
+ writeTestJSON(w, http.StatusOK, map[string]any{"account": "bdq", "name": "harbour", "host": "harbour.apps.test", "foreign": []any{}})
+ })
+
+ // The certificate is there on the second handshake.
+ tried := fastSubdomainCheck(t, func(n int) error {
+ if n < 2 {
+ return errors.New("tls: no certificate")
+ }
+ return nil
+ })
+ var out bytes.Buffer
+ if err := runAccountsSubdomainWithSession(context.Background(), sess, "set", []string{"--account", "bdq", "harbour"}, &out); err != nil {
+ t.Fatal(err)
+ }
+ if want := []string{"POST /api/cli/accounts/bdq/subdomain"}; !reflect.DeepEqual(*paths, want) {
+ t.Fatalf("paths %v, want %v", *paths, want)
+ }
+ if want := []string{"harbour"}; !reflect.DeepEqual(*names, want) {
+ t.Fatalf("names %v, want %v", *names, want)
+ }
+ text := out.String()
+ for _, want := range []string{
+ "account bdq has the subdomain harbour. its apps answer at <app>.harbour.apps.test, and at their old addresses too",
+ "checked: *.harbour.apps.test answers over https",
+ } {
+ if !strings.Contains(text, want) {
+ t.Errorf("output lacks %q:\n%s", want, text)
+ }
+ }
+ if len(*tried) != 2 {
+ t.Fatalf("handshakes %v, want two", *tried)
+ }
+ // The probe is one host directly under the name, which the wildcard
+ // covers.
+ for _, h := range *tried {
+ label, ok := strings.CutSuffix(h, ".harbour.apps.test")
+ if !ok || label == "" || strings.Contains(label, ".") {
+ t.Errorf("probed %q, want one label under harbour.apps.test", h)
+ }
+ }
+
+ // Still issuing when the wait ends: said, and not a failure.
+ fastSubdomainCheck(t, func(int) error { return errors.New("tls: no certificate") })
+ out.Reset()
+ if err := runAccountsSubdomainWithSession(context.Background(), sess, "set", []string{"harbour", "--account", "bdq"}, &out); err != nil {
+ t.Fatalf("a certificate still being issued must not fail set: %v", err)
+ }
+ if want := "the certificate for *.harbour.apps.test is still being issued. addresses under it should work in a minute or two"; !strings.Contains(out.String(), want) {
+ t.Errorf("output lacks %q:\n%s", want, out.String())
+ }
+ if strings.Contains(out.String(), "checked:") {
+ t.Errorf("a handshake that never succeeded must not be reported as checked:\n%s", out.String())
+ }
+}
+
+func TestAccountsSubdomainSetRefusalPrintsReason(t *testing.T) {
+ tried := fastSubdomainCheck(t, func(int) error { return nil })
+
+ sqidShaped := `"bcdfg" could be another account's own label later. pick a name with 7 or more letters, or with i, l, o, a digit or a hyphen in it`
+ sess, _, _ := subdomainConsole(t, func(w http.ResponseWriter, r *http.Request) {
+ writeTestJSON(w, http.StatusUnprocessableEntity, map[string]any{"error": sqidShaped, "code": "sqid_shaped"})
+ })
+ err := runAccountsSubdomainWithSession(context.Background(), sess, "set", []string{"--account", "bdq", "bcdfg"}, io.Discard)
+ if err == nil || err.Error() != sqidShaped {
+ t.Fatalf("err = %v, want the console's refusal as it came", err)
+ }
+
+ // A refusal about hosts lists them under its line.
+ occupied := "other accounts already have hosts under harbour.apps.test:"
+ sess, _, _ = subdomainConsole(t, func(w http.ResponseWriter, r *http.Request) {
+ writeTestJSON(w, http.StatusConflict, map[string]any{"error": occupied, "code": "occupied",
+ "hosts": []map[string]string{{"host": "shop.harbour.apps.test", "account": "bcd", "app": "shop", "source": "claim"}}})
+ })
+ err = runAccountsSubdomainWithSession(context.Background(), sess, "set", []string{"--account", "bdq", "harbour"}, io.Discard)
+ if err == nil {
+ t.Fatal("an occupied name must fail")
+ }
+ lines := strings.Split(err.Error(), "\n")
+ if lines[0] != occupied || len(lines) != 2 || !strings.Contains(lines[1], "shop.harbour.apps.test") || !strings.Contains(lines[1], "bcd") {
+ t.Fatalf("err = %q, want the refusal then the host", err.Error())
+ }
+
+ // The not-operator 404 carries only its sentence.
+ notOperator := "only a platform operator can change subdomains"
+ sess, _, _ = subdomainConsole(t, func(w http.ResponseWriter, r *http.Request) {
+ writeTestJSON(w, http.StatusNotFound, map[string]any{"error": notOperator})
+ })
+ if err := runAccountsSubdomainWithSession(context.Background(), sess, "set", []string{"--account", "bdq", "harbour"}, io.Discard); err == nil || err.Error() != notOperator {
+ t.Fatalf("err = %v, want %q", err, notOperator)
+ }
+
+ // An unknown account is the CLI's own not-found answer, not the mux's
+ // words.
+ sess, _, _ = subdomainConsole(t, func(w http.ResponseWriter, r *http.Request) {
+ writeTestJSON(w, http.StatusNotFound, map[string]any{"error": "404 page not found", "code": "not_found"})
+ })
+ if err := runAccountsSubdomainWithSession(context.Background(), sess, "set", []string{"--account", "bdq", "harbour"}, io.Discard); !errors.Is(err, errMembershipNotFound) {
+ t.Fatalf("err = %v, want the not-found answer", err)
+ }
+ if len(*tried) != 0 {
+ t.Fatalf("a refused set waited for a certificate: %v", *tried)
+ }
+
+ // Bad arguments stop before the network.
+ hits := 0
+ sess, _, _ = subdomainConsole(t, func(w http.ResponseWriter, r *http.Request) { hits++ })
+ for _, args := range [][]string{{"harbour"}, {"--account", "bdq"}, {"--account", "bdq", "harbour", "extra"}, {"--account", "not a sqid", "harbour"}} {
+ if err := runAccountsSubdomainWithSession(context.Background(), sess, "set", args, io.Discard); err == nil {
+ t.Errorf("set %v: no error", args)
+ }
+ }
+ if hits != 0 {
+ t.Fatalf("invalid arguments reached the console %d times", hits)
+ }
+}
+
+func TestAccountsSubdomainRemoveListsConflicts(t *testing.T) {
+ blocked := "account bdq still has hosts under harbour.apps.test. detach them first:"
+ sess, paths, _ := subdomainConsole(t, func(w http.ResponseWriter, r *http.Request) {
+ writeTestJSON(w, http.StatusConflict, map[string]any{"error": blocked, "code": "remove_blocked",
+ "hosts": []map[string]string{
+ {"host": "blog.harbour.apps.test", "account": "bdq", "app": "shop", "source": "claim"},
+ {"host": "docs.harbour.apps.test", "account": "bdq", "app": "", "source": "record"},
+ }})
+ })
+ err := runAccountsSubdomainWithSession(context.Background(), sess, "remove", []string{"--account", "bdq"}, io.Discard)
+ if err == nil {
+ t.Fatal("a blocked remove must fail")
+ }
+ if want := []string{"DELETE /api/cli/accounts/bdq/subdomain"}; !reflect.DeepEqual(*paths, want) {
+ t.Fatalf("paths %v, want %v", *paths, want)
+ }
+ lines := strings.Split(err.Error(), "\n")
+ if lines[0] != blocked || len(lines) != 3 {
+ t.Fatalf("err = %q, want the refusal and two hosts", err.Error())
+ }
+ if !strings.Contains(lines[1], "blog.harbour.apps.test") || !strings.Contains(lines[1], "shop") ||
+ !strings.Contains(lines[2], "docs.harbour.apps.test") {
+ t.Fatalf("hosts listed as %q", lines[1:])
+ }
+
+ sess, _, _ = subdomainConsole(t, func(w http.ResponseWriter, r *http.Request) {
+ writeTestJSON(w, http.StatusOK, map[string]any{"account": "bdq", "name": "", "host": "", "foreign": []any{}})
+ })
+ var out bytes.Buffer
+ if err := runAccountsSubdomainWithSession(context.Background(), sess, "remove", []string{"--account", "bdq"}, &out); err != nil {
+ t.Fatal(err)
+ }
+ if want := "account bdq no longer has a subdomain. its apps answer only at their bdq addresses\n"; !strings.HasSuffix(out.String(), want) {
+ t.Fatalf("output %q, want it to end %q", out.String(), want)
+ }
+}
+
+func TestAccountsSubdomainShowListsForeign(t *testing.T) {
+ sess, paths, _ := subdomainConsole(t, func(w http.ResponseWriter, r *http.Request) {
+ writeTestJSON(w, http.StatusOK, map[string]any{"account": "bdq", "name": "harbour", "host": "harbour.apps.test",
+ "foreign": []map[string]string{{"host": "x.harbour.apps.test", "account": "bcd", "app": "shop", "source": "record"}}})
+ })
+ var out bytes.Buffer
+ if err := runAccountsSubdomainWithSession(context.Background(), sess, "show", []string{"--account", "bdq"}, &out); err != nil {
+ t.Fatal(err)
+ }
+ if want := []string{"GET /api/cli/accounts/bdq/subdomain"}; !reflect.DeepEqual(*paths, want) {
+ t.Fatalf("paths %v, want %v", *paths, want)
+ }
+ lines := strings.Split(strings.TrimRight(out.String(), "\n"), "\n")
+ if len(lines) != 3 || lines[0] != "account bdq has the subdomain harbour" ||
+ lines[1] != "these hosts under it belong to other accounts:" ||
+ !strings.Contains(lines[2], "x.harbour.apps.test") || !strings.Contains(lines[2], "bcd") {
+ t.Fatalf("show output:\n%s", out.String())
+ }
+
+ sess, _, _ = subdomainConsole(t, func(w http.ResponseWriter, r *http.Request) {
+ writeTestJSON(w, http.StatusOK, map[string]any{"account": "bdq", "name": "", "host": "", "foreign": []any{}})
+ })
+ out.Reset()
+ if err := runAccountsSubdomainWithSession(context.Background(), sess, "show", []string{"--account", "bdq"}, &out); err != nil {
+ t.Fatal(err)
+ }
+ if out.String() != "account bdq has no subdomain\n" {
+ t.Fatalf("show output %q", out.String())
+ }
+
+ // The unreadable answer is the console's sentence, as it came.
+ unreadable := "could not check which accounts hold names under apps.test. nothing changed. try again"
+ sess, _, _ = subdomainConsole(t, func(w http.ResponseWriter, r *http.Request) {
+ writeTestJSON(w, http.StatusBadGateway, map[string]any{"error": unreadable, "code": "unreadable"})
+ })
+ if err := runAccountsSubdomainWithSession(context.Background(), sess, "show", []string{"--account", "bdq"}, io.Discard); err == nil || err.Error() != unreadable {
+ t.Fatalf("err = %v, want %q", err, unreadable)
+ }
+}
+
+func TestAccountsSubdomainInventory(t *testing.T) {
+ sess, paths, _ := subdomainConsole(t, func(w http.ResponseWriter, r *http.Request) {
+ writeTestJSON(w, http.StatusOK, map[string]any{"apps_domain": "apps.test", "labels": []map[string]any{
+ {"label": "team", "hosts": []map[string]string{
+ {"host": "*.team.apps.test", "account": "bdq", "app": "shop", "source": "claim"},
+ {"host": "x.team.apps.test", "account": "bcd", "app": "shop", "source": "record"},
+ }},
+ }})
+ })
+ var out bytes.Buffer
+ if err := runAccountsSubdomainWithSession(context.Background(), sess, "inventory", nil, &out); err != nil {
+ t.Fatal(err)
+ }
+ if want := []string{"GET /api/cli/system/subdomain-inventory"}; !reflect.DeepEqual(*paths, want) {
+ t.Fatalf("paths %v, want %v", *paths, want)
+ }
+ text := out.String()
+ if !strings.HasPrefix(text, "unused labels under apps.test. give one to an account to add hosts under it:\n") {
+ t.Fatalf("inventory output:\n%s", text)
+ }
+ for _, want := range []string{"team", "*.team.apps.test", "x.team.apps.test", "bcd"} {
+ if !strings.Contains(text, want) {
+ t.Errorf("inventory output lacks %q:\n%s", want, text)
+ }
+ }
+
+ sess, _, _ = subdomainConsole(t, func(w http.ResponseWriter, r *http.Request) {
+ writeTestJSON(w, http.StatusOK, map[string]any{"apps_domain": "apps.test", "labels": []any{}})
+ })
+ out.Reset()
+ if err := runAccountsSubdomainWithSession(context.Background(), sess, "inventory", nil, &out); err != nil {
+ t.Fatal(err)
+ }
+ if out.String() != "every label under apps.test is an account sqid or an assigned subdomain\n" {
+ t.Fatalf("inventory output %q", out.String())
+ }
+
+ // inventory takes no account and no words.
+ if err := runAccountsSubdomainWithSession(context.Background(), sess, "inventory", []string{"--account", "bdq"}, io.Discard); err == nil {
+ t.Error("inventory --account: no error")
+ }
+ if err := runAccountsSubdomainWithSession(context.Background(), sess, "inventory", []string{"team"}, io.Discard); err == nil {
+ t.Error("inventory team: no error")
+ }
+}
+
+// The shown host is public_host where the console sent one; matching and
+// probing stay on host.
+const (
+ testSqidHost = "shop.bdq.apps.test"
+ testNameHost = "shop.harbour.apps.test"
+)
+
+func TestInstancesTablePrintsPublicHost(t *testing.T) {
+ var out bytes.Buffer
+ printInstancesList(&out, []apiInstanceRecord{
+ {Host: testSqidHost, PublicHost: testNameHost, Channel: "stable"},
+ {Host: "blog.bdq.apps.test", Channel: "stable"},
+ })
+ text := out.String()
+ if !strings.Contains(text, testNameHost) || strings.Contains(text, testSqidHost) {
+ t.Fatalf("table must show the public host, not the sqid host:\n%s", text)
+ }
+ if !strings.Contains(text, "blog.bdq.apps.test") {
+ t.Fatalf("a record with no public host shows its host:\n%s", text)
+ }
+}
+
+func TestDeployWatchPrintsPublicHostProbesHost(t *testing.T) {
+ recs := []apiInstanceRecord{{Host: testSqidHost, PublicHost: testNameHost}, {Host: "blog.bdq.apps.test"}}
+ targets := watchTargetsFor([]string{testSqidHost, "blog.bdq.apps.test"}, recs, "")
+ if targets[0].Host != testSqidHost || targets[0].Origin != "https://"+testSqidHost || targets[0].Display != testNameHost {
+ t.Fatalf("target %+v: probe the sqid host, show the name host", targets[0])
+ }
+ if targets[1].shown() != "blog.bdq.apps.test" {
+ t.Fatalf("target %+v: no public host shows the host", targets[1])
+ }
+
+ // The rollout watch reads the box's report by host and prints the name.
+ var out bytes.Buffer
+ var calls atomic.Int64
+ list := sweeps(&calls, []apiInstanceRecord{
+ {Host: testSqidHost, PublicHost: testNameHost, Rollout: &apiRollout{Box: "x1", Installed: B, Serving: B, Awake: true, SchedulerIdle: true}},
+ })
+ if err := testWatch(&out, list, noURL(t)).run(targets[:1]); err != nil {
+ t.Fatalf("watch: %v\n%s", err, out.String())
+ }
+ if want := watchWordSwapped + " https://" + testNameHost; !strings.Contains(out.String(), want) || strings.Contains(out.String(), testSqidHost) {
+ t.Fatalf("output %q, want %q and no sqid host", out.String(), want)
+ }
+
+ // The URL watch polls the origin built from host and prints the name,
+ // live or timed out.
+ srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ w.Header().Set("X-Carlos-Version", B)
+ }))
+ defer srv.Close()
+ live := []watchTarget{{Host: testSqidHost, Display: testNameHost, Origin: srv.URL}}
+ out.Reset()
+ if err := watchVersion(&out, live, B, time.Second, 5*time.Millisecond, nil); err != nil {
+ t.Fatal(err)
+ }
+ if want := "live https://" + testNameHost; !strings.Contains(out.String(), want) {
+ t.Fatalf("output %q, want %q", out.String(), want)
+ }
+ err := watchVersion(io.Discard, live, "b-never", 20*time.Millisecond, 5*time.Millisecond, &watchDiagnostics{
+ wakeReason: func(host string) string {
+ if host != testSqidHost {
+ t.Errorf("wake reason asked for %q, want the probed host", host)
+ }
+ return ""
+ },
+ })
+ if err == nil || !strings.Contains(err.Error(), testNameHost) || strings.Contains(err.Error(), testSqidHost) {
+ t.Fatalf("timeout report %v, want the name host only", err)
+ }
+}
+
+func TestDeployAnnouncementPrintsPublicHost(t *testing.T) {
+ recs := []apiInstanceRecord{{Host: testSqidHost, PublicHost: testNameHost}}
+ if got, want := deployingLine([]string{testSqidHost}, "stable", publicHosts(recs)), "deploying https://"+testNameHost; got != want {
+ t.Fatalf("deployingLine = %q, want %q", got, want)
+ }
+ if got, want := deployingLine([]string{"blog.bdq.apps.test"}, "stable", publicHosts(recs)), "deploying https://blog.bdq.apps.test"; got != want {
+ t.Fatalf("deployingLine = %q, want %q", got, want)
+ }
+}
+
+func TestRoutesPrintsPublicHost(t *testing.T) {
+ useTempCredentials(t)
+ origin := routesConsole(t, []map[string]any{
+ {"host": testSqidHost, "public_host": testNameHost, "kind": "instance", "upstream": "127.0.0.1:9001",
+ "channel": "stable", "status": "ready", "health": "Running"},
+ {"host": "blog.bdq.apps.test", "kind": "instance", "upstream": "127.0.0.1:9002",
+ "channel": "stable", "status": "ready", "health": "Running"},
+ })
+ var out bytes.Buffer
+ old := stdout
+ stdout = &out
+ t.Cleanup(func() { stdout = old })
+
+ // --match matches host, the identity: "bdq" finds both rows.
+ runRoutes([]string{"-app", "titogo", "-account-id", "bae", "-console", origin, "-match", "bdq"})
+ text := out.String()
+ if !strings.Contains(text, testNameHost) || strings.Contains(text, testSqidHost) {
+ t.Fatalf("routes must show the public host, not the sqid host:\n%s", text)
+ }
+ if !strings.Contains(text, "blog.bdq.apps.test") {
+ t.Fatalf("a row with no public host shows its host:\n%s", text)
+ }
+ if n := strings.Count(text, "Running"); n != 2 {
+ t.Fatalf("--match bdq matched %d rows, want 2:\n%s", n, text)
+ }
+}
diff --git a/apimode.go b/apimode.go
index 00fa4dabf..9c965aa22 100644
--- a/apimode.go
+++ b/apimode.go
@@ -3387,14 +3387,20 @@ func (s *apiSession) instancesEnable(ctx context.Context, a apiAcct, app string,
type apiInstanceRecord struct {
// Restore is true when the create door accepted the request as a restore
// (#658); false from an older console that ignored the field.
- Restore bool `json:"restore"`
- Host string `json:"host"`
- Slug string `json:"slug"`
- Pool string `json:"pool"`
- Region string `json:"region"`
- Channel string `json:"channel"`
- CreatedAt string `json:"created_at"`
- CreatedBy string `json:"created_by"`
+ Restore bool `json:"restore"`
+ Host string `json:"host"`
+ // PublicHost is the host as the platform shows it: the name host
+ // (<app>.<name>.<apps-domain>) where the account has a subdomain
+ // (account subdomains spec §4.8). The console omits it when it would be
+ // Host. Host stays the identity every match, door and probe uses;
+ // PublicHost is only ever printed (shown).
+ PublicHost string `json:"public_host,omitempty"`
+ Slug string `json:"slug"`
+ Pool string `json:"pool"`
+ Region string `json:"region"`
+ Channel string `json:"channel"`
+ CreatedAt string `json:"created_at"`
+ CreatedBy string `json:"created_by"`
// Kind is the record's route class ("instance" | "service" | "static";
// empty means instance — provision.Record's own contract). The wire has
// carried it since the route-records design (the list embeds the whole
@@ -3993,13 +3999,31 @@ func (s *apiSession) instanceGatePass(ctx context.Context, a apiAcct, app, host
return (&http.Cookie{Name: pass.Name, Value: pass.Value}).String(), nil
}
+// shown is the record's host as printed: PublicHost, or Host.
+func (r apiInstanceRecord) shown() string {
+ if r.PublicHost != "" {
+ return r.PublicHost
+ }
+ return r.Host
+}
+
+// shown is the route's host as printed: PublicHost, or Host.
+func (r apiRouteRow) shown() string {
+ if r.PublicHost != "" {
+ return r.PublicHost
+ }
+ return r.Host
+}
+
// apiRouteRow is one row of the console's routes answer
// (internal/console/apiroutes.go). Every field is additive on the wire: a
// console that predates one sends nothing and it decodes as the zero
// value, which is why an empty Environment must be printed as "takes the
// app default" rather than as a binding this client failed to read.
type apiRouteRow struct {
- Host string `json:"host"`
+ Host string `json:"host"`
+ // PublicHost is as apiInstanceRecord's: printed, never matched.
+ PublicHost string `json:"public_host,omitempty"`
Kind string `json:"kind"`
Upstream string `json:"upstream"`
App string `json:"app"`
diff --git a/approved_account_subdomains_copy_test.go b/approved_account_subdomains_copy_test.go
new file mode 100644
index 000000000..decafc6db
--- /dev/null
+++ b/approved_account_subdomains_copy_test.go
@@ -0,0 +1,62 @@
+package main
+
+import (
+ "os"
+ "testing"
+)
+
+// accountSubdomainsCopyRecordPath is the account subdomains copy record: the
+// CLI strings (accounts_subdomain_copy.go), the console's refusals
+// (internal/console/subdomain_copy.go) and the settings page's row.
+const accountSubdomainsCopyRecordPath = "docs/superpowers/plans/2026-11-11-account-subdomains-copy.json"
+
+// accountSubdomainsCopyIDs is the record's inventory, pinned as a literal: a
+// record that loses an entry fails here even though every entry left in it
+// is applied.
+var accountSubdomainsCopyIDs = []string{
+ "cli.subdomain.short",
+ "cli.subdomain.set.short",
+ "cli.subdomain.remove.short",
+ "cli.subdomain.show.short",
+ "cli.subdomain.inventory.short",
+ "cli.subdomain.flag.account",
+ "cli.subdomain.set.done",
+ "cli.subdomain.set.serving",
+ "cli.subdomain.set.issuing",
+ "cli.subdomain.remove.done",
+ "cli.subdomain.show.none",
+ "cli.subdomain.show.name",
+ "cli.subdomain.show.foreign",
+ "cli.subdomain.inventory.heading",
+ "cli.subdomain.inventory.empty",
+ "refuse.shape",
+ "refuse.sqid_shaped",
+ "refuse.reserved",
+ "refuse.held",
+ "refuse.infrastructure",
+ "refuse.occupied",
+ "refuse.has_one",
+ "refuse.unreadable",
+ "refuse.rolled_back",
+ "refuse.rollback_failed",
+ "refuse.remove_blocked",
+ "refuse.not_operator",
+ "refuse.host_claims",
+ "refuse.create.unassigned",
+ "refuse.create.other_account",
+ "refuse.create.unreadable",
+ "refuse.create.unassignable",
+ "console.settings.subdomain.label",
+ "console.settings.subdomain.none",
+ "console.app.sqid_url.label",
+}
+
+// Every approved account subdomains string is present, byte for byte, in the
+// file the record names.
+func TestApprovedAccountSubdomainsCopy(t *testing.T) {
+ raw, err := os.ReadFile(accountSubdomainsCopyRecordPath)
+ if err != nil {
+ t.Fatal(err)
+ }
+ checkApprovedCopy(t, raw, ".", accountSubdomainsCopyIDs, nil)
+}
diff --git a/canary.go b/canary.go
index 081b734b2..4f4ba3091 100644
--- a/canary.go
+++ b/canary.go
@@ -584,6 +584,10 @@ func runCanaryDeploy(args []string) {
// One decision, used twice below: with --region it comes from the
// direct read of the canary's own record (codex plan-R5 1).
plan := canaryPlanFor(pre, recs, host, channel)
+ // shown is the canary's host as printed: its public host where the
+ // console sent one (account subdomains spec §4.8). host stays what the
+ // watch dials and every door is asked about.
+ public := publicHosts(recs)
switch plan {
case canaryPlanTaken:
log.Fatalf("canary: %s", canaryHostTaken(host, canaryHostChannel(pre, recs, host)))
@@ -593,6 +597,9 @@ func runCanaryDeploy(args []string) {
log.Fatalf("canary: create %s: %v", host, cerr)
}
fmt.Fprintf(stdout, "%s %s\n", pal.ok("canary host"), instanceCreatedLine(rec, environmentSuffix(rec.Environment)))
+ if rec.PublicHost != "" {
+ public[rec.Host] = rec.PublicHost
+ }
case canaryPlanRechannel:
// set-channel, not `carlos route --channel`: the record is where a
// provisioned route's channel lives, and the reconciler reverts the
@@ -602,6 +609,9 @@ func runCanaryDeploy(args []string) {
log.Fatalf("canary: move %s onto %s: %v", host, channel, serr)
}
fmt.Fprintf(stdout, "%s %s (now on %s)\n", pal.ok("canary host"), rec.Host, rec.Channel)
+ if rec.PublicHost != "" {
+ public[rec.Host] = rec.PublicHost
+ }
case canaryPlanReady:
mutedf(stdout, "canary host %s already follows %s\n", host, channel)
}
@@ -649,7 +659,8 @@ func runCanaryDeploy(args []string) {
}
fmt.Fprintf(stdout, "%s %s to %s\n", pal.ok("promoted"), *ver, channel)
- targets := passGatedTargets(stdout, []watchTarget{{Host: host, Origin: watchOrigin(host)}}, gatedHosts(recs), *ver, channel,
+ shown := shownHost(public, host)
+ targets := passGatedTargets(stdout, []watchTarget{{Host: host, Origin: watchOrigin(host), Display: public[host]}}, gatedHosts(recs), *ver, channel,
func(h string) (string, error) { return sess.instanceGatePass(ctx, acct, app2, h) })
// Empty only when the host is gated and the console gave no pass, which
// passGatedTargets has already said. "canary live at" would be a claim
@@ -658,7 +669,7 @@ func runCanaryDeploy(args []string) {
if err = watchVersion(stdout, targets, *ver, *timeout, canaryWatchEvery, nil); err != nil {
log.Fatalf("canary: %v", err)
}
- fmt.Fprintf(stdout, "\n%s https://%s\n", pal.ok("canary live at"), host)
+ fmt.Fprintf(stdout, "\n%s https://%s\n", pal.ok("canary live at"), shown)
}
mutedf(stdout, "promote it onward when you're happy — it costs no rung: carlos promote --app %s %s <channel>\n", app2, *ver)
}
diff --git a/deploy.go b/deploy.go
index 63eae5ca9..f6f7fb44b 100644
--- a/deploy.go
+++ b/deploy.go
@@ -468,7 +468,7 @@ func runDeploy(args []string) {
if err != nil {
log.Fatalf("deploy: %v", err)
}
- if line := deployingLine(hosts, channel); line != "" {
+ if line := deployingLine(hosts, channel, publicHosts(recs)); line != "" {
fmt.Fprintln(stdout, line)
}
if staticDeploy && *hostFlag != "" {
@@ -581,11 +581,7 @@ func runDeploy(args []string) {
// scheduler), so it keeps the URL watch and its DNS guidance
// exactly as before.
printWatchNote(probe, true, *app)
- targets := make([]watchTarget, 0, len(hosts))
- places := hostPlaces(recs)
- for _, h := range hosts {
- targets = append(targets, watchTarget{Host: h, Origin: watchOrigin(h), Probe: probe, Place: places[h]})
- }
+ targets := watchTargetsFor(hosts, recs, probe)
targets = passGatedTargets(stdout, targets, gatedHosts(recs), *ver, channel,
func(host string) (string, error) { return sess.instanceGatePass(ctx, acct, *app, host) })
if err := watchVersion(stdout, targets, *ver, *timeout, 2*time.Second, deployDiagnostics(ctx, sess, acct, *app)); err != nil {
@@ -598,7 +594,7 @@ func runDeploy(args []string) {
}
// An instance deploy follows each box's rollout of the build (spec §9.1,
// deploywatch.go), and is today's URL watch when no box reports one.
- if err := watchDeployed(ctx, sess, acct, *app, *ver, channel, hosts, gatedHosts(recs), hostPlaces(recs), probe, *timeout); err != nil {
+ if err := watchDeployed(ctx, sess, acct, *app, *ver, channel, watchTargetsFor(hosts, recs, probe), gatedHosts(recs), probe, *timeout); err != nil {
log.Fatalf("deploy: %v", err)
}
}
@@ -639,12 +635,12 @@ const staticRecheckWindow = 60 * time.Second
// resolve), and the no-instance path gets nothing: there is no URL to
// name, and its own "promoted, nothing to watch" message stays the
// honest report.
-func deployingLine(hosts []string, channel string) string {
+func deployingLine(hosts []string, channel string, public map[string]string) string {
switch len(hosts) {
case 0:
return ""
case 1:
- return "deploying https://" + hosts[0]
+ return "deploying https://" + shownHost(public, hosts[0])
}
return fmt.Sprintf("deploying %d instances on %s", len(hosts), channel)
}
@@ -1585,7 +1581,12 @@ func filterChannelHosts(recs []apiInstanceRecord, channel, hostFlag string) ([]s
// no pass, when the console would not or could not give one. All three are
// empty for an open host.
type watchTarget struct {
+ // Host is the instance's host, the identity: the watch dials Origin
+ // (watchOrigin(Host)) and reads box reports by it. Display is the host
+ // as printed, its public host where the console sent one (account
+ // subdomains spec §4.8), "" for Host itself (shown).
Host, Origin string
+ Display string
Probe string
Cookie string
Gated bool
@@ -1595,6 +1596,14 @@ type watchTarget struct {
Place string
}
+// shown is the host the watch prints for t: Display, or Host.
+func (t watchTarget) shown() string {
+ if t.Display != "" {
+ return t.Display
+ }
+ return t.Host
+}
+
// tail is RC-17's " in <place>", or nothing.
func (t watchTarget) tail() string {
if t.Place == "" {
@@ -1613,6 +1622,37 @@ func hostPlaces(recs []apiInstanceRecord) map[string]string {
return out
}
+// publicHosts maps each record's host to its public host, for the records
+// the console sent one for.
+func publicHosts(recs []apiInstanceRecord) map[string]string {
+ out := map[string]string{}
+ for _, r := range recs {
+ if r.PublicHost != "" {
+ out[r.Host] = r.PublicHost
+ }
+ }
+ return out
+}
+
+// shownHost is host as printed: its public host from public, or host.
+func shownHost(public map[string]string, host string) string {
+ if p := public[host]; p != "" {
+ return p
+ }
+ return host
+}
+
+// watchTargetsFor is the watch's targets for hosts: each dials and is
+// matched by its host, and prints its public host and place from recs.
+func watchTargetsFor(hosts []string, recs []apiInstanceRecord, probe string) []watchTarget {
+ places, public := hostPlaces(recs), publicHosts(recs)
+ targets := make([]watchTarget, 0, len(hosts))
+ for _, h := range hosts {
+ targets = append(targets, watchTarget{Host: h, Origin: watchOrigin(h), Display: public[h], Probe: probe, Place: places[h]})
+ }
+ return targets
+}
+
// gatedHosts is the set of instance hosts the console says carry a password
// gate. A console that predates gates says nothing (Gated nil), which reads
// as open here: such a console has no way to have set one.
@@ -1654,15 +1694,15 @@ func passGatedTargets(w io.Writer, targets []watchTarget, gated map[string]bool,
continue
case errors.As(err, &refused):
mutedf(w, "%s has a password gate and the console could not give the watch a pass: %v\n %s is on %s. its version can't be checked from outside, so this host is not watched\n",
- t.Host, err, ver, channel)
+ t.shown(), err, ver, channel)
continue
case err != nil:
mutedf(w, "%s has a password gate and the console could not give the watch a pass: %v\n watching it anyway. the gate will answer until the pass comes through, so this is likely to time out\n",
- t.Host, err)
+ t.shown(), err)
out = append(out, t)
continue
}
- mutedf(w, "%s has a password gate. the watch checks the version with a 15-minute pass from the console\n", t.Host)
+ mutedf(w, "%s has a password gate. the watch checks the version with a 15-minute pass from the console\n", t.shown())
t.Cookie, t.Gated = cookie, true
out = append(out, t)
}
@@ -1749,7 +1789,7 @@ func watchVersion(w io.Writer, targets []watchTarget, ver string, timeout, inter
for i, r := range results {
host := pending[i].Host
if r.live {
- fmt.Fprintf(w, "%s https://%s%s\n", colorFor(w).ok("live"), host, pending[i].tail())
+ fmt.Fprintf(w, "%s https://%s%s\n", colorFor(w).ok("live"), pending[i].shown(), pending[i].tail())
continue
}
last[host] = r.diag
@@ -1760,15 +1800,18 @@ func watchVersion(w io.Writer, targets []watchTarget, ver string, timeout, inter
return nil
}
if time.Now().After(deadline) {
- hosts := make([]string, 0, len(pending))
+ // Sorted by host, printed as shown; the diagnostics are the
+ // probed host's.
+ sort.Slice(pending, func(i, j int) bool { return pending[i].Host < pending[j].Host })
+ shown := make([]string, 0, len(pending))
for _, t := range pending {
- hosts = append(hosts, t.Host)
+ shown = append(shown, t.shown())
}
- sort.Strings(hosts)
var b strings.Builder
- fmt.Fprintf(&b, "timed out waiting for %s to serve %s:", strings.Join(hosts, ", "), ver)
- for _, h := range hosts {
- fmt.Fprintf(&b, "\n %s: %s", h, last[h])
+ fmt.Fprintf(&b, "timed out waiting for %s to serve %s:", strings.Join(shown, ", "), ver)
+ for i, t := range pending {
+ h := t.Host
+ fmt.Fprintf(&b, "\n %s: %s", shown[i], last[h])
// The reason a wake failed used to be journal-only (#131);
// now the platform log stream carries it member-safe, so a
// timeout report can SAY it instead of guessing at causes.
diff --git a/deploy_test.go b/deploy_test.go
index fd4b50b6f..1b78486ec 100644
--- a/deploy_test.go
+++ b/deploy_test.go
@@ -488,7 +488,7 @@ func TestDeployingLine(t *testing.T) {
"deploying 3 instances on stable"},
}
for _, c := range cases {
- if got := deployingLine(c.hosts, c.channel); got != c.want {
+ if got := deployingLine(c.hosts, c.channel, nil); got != c.want {
t.Errorf("%s: deployingLine = %q, want %q", c.name, got, c.want)
}
}
diff --git a/deploywatch.go b/deploywatch.go
index 8c21087a4..93e0160d8 100644
--- a/deploywatch.go
+++ b/deploywatch.go
@@ -579,7 +579,7 @@ func stayedOn(r *apiRollout) string {
func (rw rolloutWatch) printHost(c colors, h *watchedHost) {
// tail is RC-17's " in <place>" (region labels §5 row 20), "" when the
// console sent no label.
- host, tail := h.t.Host, h.t.tail()
+ host, tail := h.t.shown(), h.t.tail()
if h.mode == modeURL {
fmt.Fprintf(rw.w, "%s https://%s%s\n", c.ok("live"), host, tail)
return
@@ -665,7 +665,7 @@ func (rw rolloutWatch) timedOut(hosts []*watchedHost, boxes map[string][]*watche
}
sort.Slice(pending, func(i, j int) bool { return pending[i].t.Host < pending[j].t.Host })
for _, h := range pending {
- fmt.Fprintf(&b, "\n %s: %s", h.t.Host, rw.pendingDetail(h))
+ fmt.Fprintf(&b, "\n %s: %s", h.t.shown(), rw.pendingDetail(h))
// The reason a wake failed, from the platform log stream, as
// watchVersion gives it: only for a host polled by URL, whose poll
// is what woke it.
@@ -692,11 +692,7 @@ func (rw rolloutWatch) timedOut(hosts []*watchedHost, boxes map[string][]*watche
// watchDeployed is the watch for an instance (non-static) deploy of ver onto
// channel.
-func watchDeployed(ctx context.Context, sess *apiSession, acct apiAcct, app, ver, channel string, hosts []string, gated map[string]bool, places map[string]string, probe string, timeout time.Duration) error {
- targets := make([]watchTarget, 0, len(hosts))
- for _, h := range hosts {
- targets = append(targets, watchTarget{Host: h, Origin: watchOrigin(h), Probe: probe, Place: places[h]})
- }
+func watchDeployed(ctx context.Context, sess *apiSession, acct apiAcct, app, ver, channel string, targets []watchTarget, gated map[string]bool, probe string, timeout time.Duration) error {
return newDeployWatch(ctx, sess, acct, app, ver, channel, probe, timeout, gated).run(targets)
}
diff --git a/docs/parity.md b/docs/parity.md
index 974105242..66899f279 100644
--- a/docs/parity.md
+++ b/docs/parity.md
@@ -396,6 +396,7 @@ Discussion #742.
| op-economics | operator | `economics bill`<br>`economics backhaul` | `GET /fleet/economics`<br>`/fleet/economics/bill`<br>`/api/economics/bill`<br>`/api/economics/backhaul`<br>`/fleet/economics/scenarios` | The bill and backhaul inputs; the CLI posts to the /api/economics doors. |
| op-accounts-plan | operator | `accounts plan` | `GET /fleet/economics/accounts`<br>`/fleet/economics/tier` | The console sets the pool tier only. |
| op-accounts-migrate | operator | `accounts migrate` | | A one-off migration of an app's objects. |
+| op-accounts-subdomain | operator | `accounts subdomain set`<br>`accounts subdomain remove`<br>`accounts subdomain show`<br>`accounts subdomain inventory` | | Platform operators only. The account settings page shows the subdomain, read-only. |
| op-billing | operator | `billing problems`<br>`billing close`<br>`billing house` | | Billing problems and house accounts. |
| op-billing-pages | operator | | `/fleet/billing`<br>`/fleet/billing/accounts`<br>`/fleet/billing/payments`<br>`/fleet/billing/sync`<br>`/fleet/billing/sync/status` | The operator Billing pages: the overview, paying accounts and payments, and their background sync. |
| op-instance-policy | operator | `apps set [--egress-allow,--size]`<br>`instances set [--size]` | | Instance policy is set by an operator. |
diff --git a/docs/site/cli.md b/docs/site/cli.md
index 4679c8fe7..3bc0a7863 100644
--- a/docs/site/cli.md
+++ b/docs/site/cli.md
@@ -2303,6 +2303,19 @@ carlos accounts plan --account bac --set free --sponsored limits.json --reason "
Without `--set` it prints the plan, who set it and why, and every limit the account has. With `--set` it changes the plan and prints the result. `--reason` is required for a change. `--pack` can be repeated. `--sponsored` names a JSON file of limits; each one replaces the plan's limit where it is more generous.
+### carlos accounts subdomain
+
+Gives an account a readable name in its app addresses, so `shop.bdq.oncarlos.com` also answers at `shop.harbour.oncarlos.com`. It is a platform-operator command.
+
+```sh
+carlos accounts subdomain set --account bdq harbour
+carlos accounts subdomain show --account bdq
+carlos accounts subdomain remove --account bdq
+carlos accounts subdomain inventory
+```
+
+`set` gives the account the subdomain, then checks for up to two minutes that addresses under it answer over HTTPS. `remove` takes it away. It refuses while the account still has hosts attached under the name, and lists them. `show` prints the subdomain and any hosts under it that belong to other accounts. `inventory` lists the labels under the apps domain that are neither an account sqid nor an assigned subdomain, with the hosts under each.
+
### carlos billing
Lists the billing problems the console could not settle on its own, and closes one once you have dealt with it in the Stripe Dashboard. It is a deployment-operator command, and it only works where the console has billing turned on (see [Plans](plans#billing-operators)).
diff --git a/docs/superpowers/notes/census-proposal-account-subdomains.md b/docs/superpowers/notes/census-proposal-account-subdomains.md
index b309402e8..ee9027e9b 100644
--- a/docs/superpowers/notes/census-proposal-account-subdomains.md
+++ b/docs/superpowers/notes/census-proposal-account-subdomains.md
@@ -4,6 +4,7 @@ Ruling `census-ruling-account-subdomains`. The independent reviewer approves or
| unit | change | read sites | what changed |
|---|---|---|---|
+| `deploy.go` `runDeploy` | body | unchanged (1) | builds its watch targets with watchTargetsFor (host, watchOrigin(host), the instance list's public_host as Display, place, probe) from the instance list it already read, and passes them to watchDeployed; deployingLine prints the public host from that same list; the watch still dials and matches host; no read added, read site unchanged (1) |
| `internal/edge/wildcard.go` `newWildcardFromEnv` | body | unchanged (3) | with PLATFORM_APPS_DOMAIN set, also gives the wildcard manager a names reader: the edge's own registry handle's ListAccountNamespaces (the box's own registry database, as carlos, as ListWildcardDomains beside it), keeping the last good names on a read error; refresh() inverts them to sqid -> name and parentsFor adds <name>.<apps-domain> as a parent only beside a sqid parent it already derives from a route host, and only for a name in the subdomain shape; no apps domain, no reader; same read sites (body change only); no file, path, command or bucket read added |
| `internal/host/agent.go` `aliasPassReportingComplete` | body | unchanged (5) | sets AliasReport.AppsDomain from PLATFORM_APPS_DOMAIN (trimmed), the variable domainsTickConfig reads; same reads and calls otherwise; body change only |
| `internal/domains/aliases.go` `ReconcileAliasesReport` | sites | +whole:Route ×3, +whole:RouteAlias ×3 | with AliasReport.AppsDomain set, reads the box's own account_namespaces table (reg.ListAccountNamespaces), sorts a listed-but-unread namespace claim (ParseNamespaceHost on the dropped host): a not-found body keeps nothing and is not counted by relevantDropped, any other failure keeps that name's recorded rows; runs deriveNamespaceAliases after deriveInstanceAliases on the routes, alias rows and claims it already read (AccountNamespaces over the read claims), keepNamespaceAliases for unread names, and writes the table through writeAccountNamespaces (once, only when it differs; no shrink under StartupNoRemoval); the added sites are the routes and alias rows already read handed to those helpers; no file or bucket read added; fix round 1: keepNamespaceAliases runs before deriveNamespaceAliases, and repairNamespaceStatus stamps "pointing" on derived-shape rows of exact claims and kept names, over claims and rows already read |
@@ -12,12 +13,13 @@ Ruling `census-ruling-account-subdomains`. The independent reviewer approves or
| `internal/registry/registry.go` `Registry.Fingerprint` | sites | +file:Query | hashes account_namespaces (name, account) over the same fresh connection, with a section marker written only when a row exists, so a registry with no held names digests as before; the one added site is that SELECT (+file:Query) on the box's own registry database, as carlos; a digest, never a decision |
| `internal/registry/registry.go` `Registry.migrate` | sites | +file:Exec, +registry:sql | one more CREATE TABLE IF NOT EXISTS account_namespaces (name TEXT PRIMARY KEY, account TEXT NOT NULL), an in-binary literal (+file:Exec, +registry:sql); additive, no existing statement changed |
-Envelopes re-pinned: `internal/domains`, `internal/edge`, `internal/host`, `internal/provision`, `internal/registry`.
+Envelopes re-pinned: `.`, `internal/domains`, `internal/edge`, `internal/host`, `internal/provision`, `internal/registry`.
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.
Recorded dispositions, which each change must still satisfy:
+- `deploy.go` `runDeploy`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-edge-asset-cache-1;basis=takes --assets and --no-assets, refuses both together and bad folders before anything runs (deployAssets), reads the folders saved in .carlos/config for the session's console through configAssets (the config walk the CLI already makes), and saves a new list there as it saves the other deploy settings; read site unchanged (1), none added;rev3=census-ruling-gated-deploy-watch-164;basis=the static-deploy branch passes its watch targets through passGatedTargets (a console POST for a gate pass per gated host) and passes the gated-host set to watchDeployed; no new local read, read site unchanged (1), none added;rev3=census-ruling-region-labels;basis=builds a host-to-label map (hostPlaces) from the instance list it already read and passes it to the static watch targets and watchDeployed, so the watch lines say where; no read added;rev3=census-ruling-first-deploy-493;basis=Sequences existing console APIs for confirmed-missing app and first instance creation, with repeatable environment values; local artifact preflight before these new writes. Existing config artifact stat read retained.
- `internal/edge/wildcard.go` `newWildcardFromEnv`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-agent-start-demo-1;basis=Includes the configured demo domain in the existing wildcard manager's explicit parent input.;rev3=census-ruling-region-ha-g2r-fixes;basis=W2a: on a gated box (issuer gate armed: store and mirror exist) with no DNS provider, builds a serve-only wildcard manager that loads and serves wildcard PEMs from the existing local cache/mirror and never orders (dns nil never reaches obtain). Ungated boxes still get nil. Same parent inputs; no new path or provider credential read.
- `internal/host/agent.go` `aliasPassReportingComplete`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-region-ha-g2-fixes;basis=Extract the existing serialized alias pass, add cancellable locking and routing-only alias/regional publication from its completeness report; existing deployment/claim/registry reads retained, new in-memory Route/RegionalDomain passes.;rev3=census-ruling-fix-incomplete-domains-pass;basis=gains a startup bool parameter that it copies into domains.AliasReport.StartupNoRemoval; runHAIngressStartup passes true, aliasPassReporting (the ordinary agent pass) passes false; same reads and calls, body change only; no root pass calls it; no root decision
- `internal/domains/aliases.go` `ReconcileAliasesReport`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-edge-asset-cache-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), in its alias pass (aliasPassReporting in runAgent; ReconcileAliases, now a wrapper, is its other caller): main's ReconcileAliases body, moved here with the same reads and writes, plus a completeness report (AliasReport) set false at every point that already logged a failure and carried on, and when relevantDropped names a listed claim the pass could not rule out; the box's asset authority clock advances only after a complete pass; one more whole:Route and whole:RouteAlias site each, the routes and alias rows the pass already read handed to relevantDropped; no registry, file or bucket read added; no root pass calls it; no root decision;rev3=census-ruling-regional-domains-447;basis=#447 Task 4: in the alias pass inside the agent: reads the existing regional_domains rows (reg.ListRegional) beside the alias rows, derives a regional claim's rows through deriveRegional for AliasReport.Region (the caller's ReconcileConfig.Region, set by aliasPassReporting) and its wildcard parent when bound, skipping the alias, paths and catch-all halves for it, writes them through writeRegional, and keeps an unread regional claim's wildcard parent while the kept apex row still binds a target RegionalTarget accepts on the routes this pass read (same account and app, per-box cap); claims are read as before (the listing and per-claim GETs it already does); the added reads are the registry's regional rows and fields of rows the pass already holds;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 6 fix rounds 2-3: AliasReport.FleetRefused (edge.FleetArmVerdict's refused set) is called once on the pass's own listing; a Wildcard claim whose primary is fleet-refused derives no wildcard_domains row (an earlier one goes with the ordinary removal); the catch-all alias is derived as before (+registry:Host, +whole:Route). Rows already read; writes less, never more; no root pass calls it.;rev3=census-ruling-region-ha-g2-fixes;basis=Project accepted regional exact/catchall names and plain/delegated aliases into routing-only reports using existing claims and pre-pool metadata; new whole Route/RegionalDomain uses, no new external reader.;rev3=census-ruling-fix-incomplete-domains-pass;basis=adds AliasReport.StartupNoRemoval, an input set only by the agent startup HA ingress pass (host startupAliasPass via runHAIngressStartup): when set, the pass skips the route_aliases, wildcard_domains and route_paths removals (each skipped removal marks the pass incomplete) and the removal rules themselves are unchanged; derivations, refusals and writes are unchanged; same read sites (body change only); no new registry, file or bucket read; deletes less, never more, and only on the startup pass; no root pass calls it; no root decision
@@ -37,6 +39,6 @@ New dispositions, which census-propose wrote and the reviewer checks against the
- other `changed registry schema`: closed only if it is the registry schema (re-pinned)
- reads `internal/registry/remote_dispatch.go:Registry.dispatchRemote`: +registry:Names, +registry:StringMap; keeps hint, task E2
-Seal: `b3d35a0bd7c0500c74efbe5e8f566adb623696d31bd9860164907e08a2e79369` → `dde10a6f5fe44a4be206275f883b6613c9eeb850f184132d93136fc5e84d9134`.
+Seal: `b3d35a0bd7c0500c74efbe5e8f566adb623696d31bd9860164907e08a2e79369` → `17d8c803e6d0930608c76963b82b5e6211734029d0c3651cbe86130db869e390`.
Overlay: `internal/provision/testdata/plan14-root-reads-account-subdomains.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/instances_cli.go b/instances_cli.go
index 2342db522..41647cd10 100644
--- a/instances_cli.go
+++ b/instances_cli.go
@@ -748,7 +748,7 @@ func printInstancesList(out io.Writer, recs []apiInstanceRecord) {
}
reason += er
}
- fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", r.Host, instanceRegionCell(r), r.Channel, r.Pool,
+ fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n", r.shown(), instanceRegionCell(r), r.Channel, r.Pool,
installedCell(r), servingCell(r), rowHealth, upstreamsCell(r.Upstreams), humanBytes(r.DBBytes),
egressCell(r.Egress), r.CreatedAt, r.CreatedBy, reason, seedCell(r), runtimeCell(r), workersCell(r))
}
diff --git a/internal/provision/testdata/plan14-root-reads-account-subdomains.tsv b/internal/provision/testdata/plan14-root-reads-account-subdomains.tsv
index 5ab154750..7e1c11814 100644
--- a/internal/provision/testdata/plan14-root-reads-account-subdomains.tsv
+++ b/internal/provision/testdata/plan14-root-reads-account-subdomains.tsv
@@ -1,6 +1,7 @@
# Census overlay account-subdomains, written by census-propose (#369). census-ruling-account-subdomains, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-account-subdomains.md.
-# 2 body, 5 sites, 5 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+# 3 body, 5 sites, 6 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
# 8 new dispositions: 1 reads re-frozen at their disposition with the claim, 6 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 1 other.
+@legacy a7db0eae4f04f1dfc38a89842a97cb3e9929e137dd3137e5e402db3eee5cc21c deploy.go runDeploy legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-edge-asset-cache-1;basis=takes --assets and --no-assets, refuses both together and bad folders before anything runs (deployAssets), reads the folders saved in .carlos/config for the session's console through configAssets (the config walk the CLI already makes), and saves a new list there as it saves the other deploy settings; read site unchanged (1), none added;rev3=census-ruling-gated-deploy-watch-164;basis=the static-deploy branch passes its watch targets through passGatedTargets (a console POST for a gate pass per gated host) and passes the gated-host set to watchDeployed; no new local read, read site unchanged (1), none added;rev3=census-ruling-region-labels;basis=builds a host-to-label map (hostPlaces) from the instance list it already read and passes it to the static watch targets and watchDeployed, so the watch lines say where; no read added;rev3=census-ruling-first-deploy-493;basis=Sequences existing console APIs for confirmed-missing app and first instance creation, with repeatable environment values; local artifact preflight before these new writes. Existing config artifact stat read retained.;rev3=census-ruling-account-subdomains;basis=builds its watch targets with watchTargetsFor (host, watchOrigin(host), the instance list's public_host as Display, place, probe) from the instance list it already read, and passes them to watchDeployed; deployingLine prints the public host from that same list; the watch still dials and matches host; no read added, read site unchanged (1) file:Stat@9052 f011cacdfd05d9f422b530537a7b6bb1a65733ae76ee83464d6566540a9fcae6
@legacy 44c3c50f4bcda5c032356b159d9e5f4a15fdb66c82cbeca1989f1d1a247bac21 internal/edge/wildcard.go newWildcardFromEnv legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-agent-start-demo-1;basis=Includes the configured demo domain in the existing wildcard manager's explicit parent input.;rev3=census-ruling-region-ha-g2r-fixes;basis=W2a: on a gated box (issuer gate armed: store and mirror exist) with no DNS provider, builds a serve-only wildcard manager that loads and serves wildcard PEMs from the existing local cache/mirror and never orders (dns nil never reaches obtain). Ungated boxes still get nil. Same parent inputs; no new path or provider credential read.;rev3=census-ruling-account-subdomains;basis=with PLATFORM_APPS_DOMAIN set, also gives the wildcard manager a names reader: the edge's own registry handle's ListAccountNamespaces (the box's own registry database, as carlos, as ListWildcardDomains beside it), keeping the last good names on a read error; refresh() inverts them to sqid -> name and parentsFor adds <name>.<apps-domain> as a parent only beside a sqid parent it already derives from a route host, and only for a name in the subdomain shape; no apps domain, no reader; same read sites (body change only); no file, path, command or bucket read added registry:Host@6617,whole:WildcardDomain@6564,whole:WildcardDomain@6590 3fd6037048f31fdf43704ab87f43ab45a8aa8ad1a73b92bc656eeae367b4b225
@legacy 25840eb4a2ba81e4108851318ad48bc9d7bdccc6a824c7a8ca372306428913bb internal/host/agent.go aliasPassReportingComplete legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-g2-fixes;basis=Extract the existing serialized alias pass, add cancellable locking and routing-only alias/regional publication from its completeness report; existing deployment/claim/registry reads retained, new in-memory Route/RegionalDomain passes.;rev3=census-ruling-fix-incomplete-domains-pass;basis=gains a startup bool parameter that it copies into domains.AliasReport.StartupNoRemoval; runHAIngressStartup passes true, aliasPassReporting (the ordinary agent pass) passes false; same reads and calls, body change only; no root pass calls it; no root decision;rev3=census-ruling-account-subdomains;basis=sets AliasReport.AppsDomain from PLATFORM_APPS_DOMAIN (trimmed), the variable domainsTickConfig reads; same reads and calls otherwise; body change only whole:RegionalDomain@1778,whole:Route@1856,whole:Route@957,whole:Route@979,whole:Route@998 8a439cd701910b91d9bf8c39e96a56141c20c063f590dc26f557eb5337884ad6
@legacy 6640a6d2ced4baaf78c77b55c524e0cdf0392c0d028319922700db419e9a5c57 internal/domains/namespacealiases.go deriveNamespaceAliases legacy accepted-legacy accepted-legacy;rev3=census-ruling-account-subdomains;basis=new: derives <prefix>.<name>.<apps> -> <prefix>.<sqid>.<apps> alias rows from the routes, alias rows and claim listing the pass already read (Provisioned or Platform, not sidecar or replica, of the name's account), writes them "pointing" (fix round 1) with UpsertAlias, and SetAliasDNSStatus("pointing") for an existing one that is not, to the box's own registry, and HA names into the in-memory AliasIngress report; no file, path or bucket read registry:Account@1666,registry:Account@2867,registry:Alias@760,registry:App@1687,registry:App@1696,registry:App@1812,registry:DNSStatus@2137,registry:HA@2758,registry:Host@1238,registry:Host@1645,registry:Host@1655,registry:Host@1783,registry:Host@2740,registry:Host@2849,registry:Platform@1062,registry:Provisioned@1044,registry:Replica@1096,whole:Route@1028,whole:Route@1156,whole:Route@2412,whole:Route@2494,whole:Route@2532,whole:Route@2714,whole:Route@2769,whole:Route@3107,whole:Route@3172,whole:Route@3246,whole:Route@3302,whole:Route@3326,whole:Route@919,whole:RouteAlias@1617,whole:RouteAlias@712,whole:RouteAlias@742,whole:RouteAlias@755,whole:RouteAlias@771 c100c0ab8340ac352b4ccce7c6db7c572d5d54d4ba8924214d1cc097a7e39f21
@@ -14,6 +15,7 @@
@legacy 6487c32cb53e58f13d5304afbf1d1bfde28819c3d266fe32dd5600cade696388 internal/domains/reconcile.go StampHealth legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-dns-fresh-lookup-724;basis=section 4 now computes every cached verdict first, then freshUpgrade gives up to 64 randomly ordered names that could have a public zone (not under the apps domain, not special-use like .internal) and whose verdict is "" or "elsewhere" an uncached lookup (30 s pass budget) that may only upgrade to "pointing", then stamps; the extra sites are the indexed loops over the same rows (#724);rev3=census-ruling-no-negative-prime-724;basis=section 4 now hands each route and alias, with its previous stamp (the two new registry:DNSStatus reads, rt.DNSStatus and a.DNSStatus, same rows already listed), to dnsVerdicts, which first hands the pass's hostnames to Config.FreshRetain (the resolver forgets its in-memory backoff and strike for names no longer carried) and then decides each hostname once per pass and applies the verdict to every row carrying it: a name not "pointing" before this pass and eligible for a fresh lookup (public name, not under the apps domain, ResolveFresh set) is looked at uncached first within the same 64-lookup/30 s budget (shared, with previously "pointing" names' upgrade looks serviced before any fresh-first name so new names cannot starve a published one) and stamped from it (edge address, A or AAAA, "pointing", other "elsewhere", authoritative not-found "", authoritative NODATA for A and AAAA with the zone's SOA "" with no cached query), falling back to the cached lookup past the budget or on the second fresh failure in a row; the first fresh failure in a row is held (stamp and check time untouched, the resolver forgives it so the next pass asks fresh again); a previously "pointing" name keeps cached-first plus the upgrade-only fresh look (ResolveUpgrade, nearest zones first), so the fresh path still never unpublishes; a fresh-first name that ends the pass "pointing" (fresh or cached) has its fresh failure backoff cleared through Config.FreshForget, so an onboarding failure never suppresses the upgrade look that keeps it published; new names are ordered never-checked first then oldest check, and lookups answered from the backoff do not count against the budget; StampHealth's own body is unchanged by the last round; no new file, path or command input; the dropped Alias/Host/Route/RouteAlias sites are the old indexed loops folded into the candidate build (#724);rev3=census-ruling-account-subdomains;basis=reads the box's own account_namespaces table (only when DNS stamping runs) and leaves out of the DNS loop the alias rows isNamespaceDerived names (an alias under a held name, of that name's account, pointing at its sqid twin); if that read fails it logs and leaves out every alias two or more labels under the apps domain, still stamping every other alias, every route and all TLS expiry (fix round 1); the added RouteAlias sites are that filter over rows already listed; stamps less, never more; TLS stamping unchanged registry:Alias@1972,registry:Alias@4450,registry:Alias@5039,registry:Alias@5129,registry:Alias@5563,registry:Alias@5627,registry:Alias@5715,registry:DNSCheckedAt@4325,registry:DNSCheckedAt@4472,registry:DNSStatus@4311,registry:DNSStatus@4459,registry:DNSStatus@4664,registry:DNSStatus@4963,registry:Host@4302,registry:Host@4736,registry:Host@4820,registry:Host@5332,registry:Host@5391,registry:Host@5473,whole:Route@199,whole:Route@236,whole:Route@4126,whole:Route@4242,whole:Route@4571,whole:Route@5286,whole:RouteAlias@1680,whole:RouteAlias@1906,whole:RouteAlias@2058,whole:RouteAlias@2106,whole:RouteAlias@2126,whole:RouteAlias@2138,whole:RouteAlias@4172,whole:RouteAlias@4386,whole:RouteAlias@4866,whole:RouteAlias@5516,whole:RouteAlias@780 5288387d1eac4611bc4b1acc30569011009192e7210127001c27174e1e1cfa43
@legacy d5b19e5fea9c3ef9f7b7c68012a8529fcab3fe0a670e1e4a64d90366ab25bf10 internal/registry/registry.go Registry.Fingerprint legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the registry's SQLite side, as carlos: in the agent (/opt/carlos/carlos agent, carlos-edge.service) and in the registry child (carlos __registry-child, which a root pass forks as the service user); the remote arm, unchanged, in the process that holds a remote handle: census-ruling-seeded-instances's body with the row's lifetime pair (incarnation, serving_seq) folded into the edge's change poll, each only when non-zero, so a registry with no pair digests as before; self-serve moves 1 Task 7;rev3=census-ruling-regional-domains-447;basis=#447 Task 4: hashes regional_domains (host, target, account, app, region; created_at not) over the same fresh connection, with a section marker written only when a row exists, so a registry with no regional rows digests as before; the one added site is that SELECT (+file:Query) on the box's own registry database, as carlos; no file path read;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): review R1 finding 1: the routes SELECT also reads host, kind, account, app, platform and fingerprintForwardInert (one CASE over the ForwardForbidden columns), and every row folds host, kind, account and app (tagged, quoted), platform when set, and forward_inert=0 for a forward row that is not inert, so a rowid reused by another hostname, an in-place account or app rewrite, or a stray forbidden column moves the edge's change poll. Same one SELECT per table on the same fresh connection to the box's own registry database, as carlos; no table, file or bucket read added; a digest, never a decision.;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 5): the SELECT also reads fleet_label and, only when it is set, hashes "fleet_label=<q>" into the digest, so labelling a row moves the edge's reload fingerprint. Read sites unchanged (33). Registry side, not root; an unlabelled registry's digest is byte-identical.;rev3=census-ruling-stateless-replicas-1;basis=Read the additive stateless projection in the existing registry SELECT and hash only when set; no new read source.;rev3=census-ruling-agent-start-demo-1;basis=Existing SELECT reads four more demo columns; only a marked row adds them to the hash, so ordinary hashes remain unchanged.;rev3=census-ruling-stateless-replicas-2;basis=Four additive projection columns join the existing routes SELECT and hash only when nonzero; no new query or file read. merge of origin/main 6be08467: Union main demo identity and expiry with replica columns in the same SELECT and hash; merge-only body change.;rev3=census-ruling-agent-start-demo-3;basis=Hash moved-notice wire bytes so notice-only changes invalidate an edge route snapshot. Census read-site delta: +file:QueryRow.;rev3=census-ruling-edge-page-cache-1;basis=selects the new pages_off column with the rest and folds "pages_off=1" into the hash only when set, as assets_off, so a registry that never sets it fingerprints as before; same routes SELECT, no new table; read sites unchanged (34); no read added;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 1: hashes link_channels (link_id, account, token_hash, status, generation; connected, seen_at, seq and created_at not) over the same fresh connection, with a section marker written only when a row exists, so a registry with no links digests as before; the one added site is that SELECT (+file:Query) on the box's own registry database, as carlos; a digest, never a decision; linked deployments slice 1 Task 7: also folds home_link (id, serving_url, tunnel_url, the token's sha256 never the token, account, apps_domain, box_label, conn_gen; state and created_at not) and home_link_apps (name, home_account, home_app, home_host) through fingerprintHomeLink over the same fresh connection, each section marker written only when a row exists, so a registry with no link digests as before; no file path read; a digest, never a decision;rev3=census-ruling-account-subdomains;basis=hashes account_namespaces (name, account) over the same fresh connection, with a section marker written only when a row exists, so a registry with no held names digests as before; the one added site is that SELECT (+file:Query) on the box's own registry database, as carlos; a digest, never a decision file:Exec@284,file:Open@188,file:Query@10785,file:Query@11707,file:Query@12810,file:Query@368,file:Query@6655,file:Query@7134,file:Query@8120,file:Query@8816,file:Query@9728,file:QueryRow@13727,registry:ClaimIncarnation@1729,registry:ClaimIncarnation@5563,registry:ClaimIncarnation@5640,registry:ClaimOwner@1773,registry:ClaimOwner@5764,registry:ClaimOwner@5829,registry:ClaimRowID@1792,registry:ClaimRowID@5856,registry:ClaimRowID@5922,registry:ClaimStamp@1754,registry:ClaimStamp@5673,registry:ClaimStamp@5737,registry:Incarnation@1848,registry:Incarnation@6143,registry:Incarnation@6207,registry:ServingSeq@1867,registry:ServingSeq@6234,registry:ServingSeq@6297,registry:Text@158,registry:path@207,registry:remote@55,registry:remote@87,whole:remoteClient@57,whole:remoteClient@89 a52e0bc25d555bbf22f35655c54c0fa3aca6cedec5f0b6b80157d9d95f921a29
@legacy 5d46724aa4ebbec5cc075b3d28c1efd3fdd89e73abcb73ceaabc6bc2c68c36e5 internal/registry/registry.go Registry.migrate legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the registry's SQLite side, as carlos: in the agent (/opt/carlos/carlos agent, carlos-edge.service) and in the registry child (carlos __registry-child, which a root pass forks as the service user), on every registry open; a box CLI verb that opens the registry directly runs it as whoever runs the verb: census-ruling-seeded-instances's body with two more columns added to routes (incarnation and serving_seq, INTEGER NOT NULL DEFAULT 0, idempotent through the duplicate-column rule); self-serve moves 1 Task 7;rev3=census-ruling-rootfs-apps-2;basis=one more ALTER TABLE, routes ADD COLUMN runtime TEXT NOT NULL DEFAULT '', beside main's rate_limit, assets_off, asset_gen, incarnation and serving_seq (the last four from the merges of origin/main 3c33f2eb and 953b9fda); the same sixteen sites, no read added;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328/#329 plan 1 Task 4: three more ALTER TABLE statements in the existing loop, routes ADD COLUMN egress_allow, size and policy_expires_at, each TEXT NOT NULL DEFAULT '' and idempotent through the duplicate-column rule; the same sixteen sites, no read added.;rev3=census-ruling-region-ha-p1a;basis=one more ALTER TABLE in the existing loop: routes ADD COLUMN ha INTEGER NOT NULL DEFAULT 0, idempotent through the duplicate-column rule; the same sixteen sites, no read added;rev3=census-ruling-ha-p1a-433;basis=the registry's SQLite side as carlos (agent, registry child; a box CLI verb that opens the registry directly runs it as whoever runs it), on every registry open: the ALTER TABLE routes statements are now built from the one migration definition routeAddedColumns (addedColumn name, type, default; review r1 P2): for each entry without the Claim mark, "ALTER TABLE routes ADD COLUMN " + spec(), byte for byte the statements main runs, in main's order, under the same duplicate-column rule. +registry:Claim is that mark, +whole:addedColumn the struct. Every name, type and default is an in-binary literal; no statement added, removed or changed; no read added.;rev3=census-ruling-regional-domains-447;basis=#447 Task 4: one more CREATE TABLE IF NOT EXISTS regional_domains (host TEXT PRIMARY KEY, target, account, app, region TEXT NOT NULL DEFAULT '', created_at INTEGER NOT NULL DEFAULT 0), beside wildcard_domains; the added sites are that statement (+file:Exec, +registry:sql), an in-binary literal; additive, no existing statement changed;rev3=census-ruling-region-ha-p1b3b-t;basis=Create local HA duty/replay tables and revision triggers in the existing registry connection; no new database path.;rev3=census-ruling-agent-start-demo-3;basis=Create moved-notice storage as a single (id, wire) row; fingerprints include the stored wire bytes. Census read-site delta: +file:Exec, +registry:sql.;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 1: calls migrateLinks after migrateHADuties (one CREATE TABLE IF NOT EXISTS link_channels, an in-binary literal); additive, no existing statement changed; linked deployments slice 1 Task 7: also runs migrateHomeLink (CREATE TABLE IF NOT EXISTS home_link and home_link_apps) after migrateLinks; additive, the box's own registry database, as carlos;rev3=census-ruling-account-subdomains;basis=one more CREATE TABLE IF NOT EXISTS account_namespaces (name TEXT PRIMARY KEY, account TEXT NOT NULL), an in-binary literal (+file:Exec, +registry:sql); additive, no existing statement changed file:Exec@1124,file:Exec@1855,file:Exec@212,file:Exec@2409,file:Exec@3057,file:Exec@3822,file:Exec@4101,file:Exec@4964,file:Exec@51,file:Exec@5140,file:Exec@761,registry:Claim@686,registry:sql@1124,registry:sql@1855,registry:sql@212,registry:sql@2409,registry:sql@3057,registry:sql@3822,registry:sql@4101,registry:sql@4964,registry:sql@51,registry:sql@5140,registry:sql@761,whole:addedColumn@661 0c5fdaf1215e8f81c156a1fc1576cb075c2a52238bde75fc8320d49472fd117d
+deploy.go runDeploy legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-edge-asset-cache-1;basis=takes --assets and --no-assets, refuses both together and bad folders before anything runs (deployAssets), reads the folders saved in .carlos/config for the session's console through configAssets (the config walk the CLI already makes), and saves a new list there as it saves the other deploy settings; read site unchanged (1), none added;rev3=census-ruling-gated-deploy-watch-164;basis=the static-deploy branch passes its watch targets through passGatedTargets (a console POST for a gate pass per gated host) and passes the gated-host set to watchDeployed; no new local read, read site unchanged (1), none added;rev3=census-ruling-region-labels;basis=builds a host-to-label map (hostPlaces) from the instance list it already read and passes it to the static watch targets and watchDeployed, so the watch lines say where; no read added;rev3=census-ruling-first-deploy-493;basis=Sequences existing console APIs for confirmed-missing app and first instance creation, with repeatable environment values; local artifact preflight before these new writes. Existing config artifact stat read retained.;rev3=census-ruling-account-subdomains;basis=builds its watch targets with watchTargetsFor (host, watchOrigin(host), the instance list's public_host as Display, place, probe) from the instance list it already read, and passes them to watchDeployed; deployingLine prints the public host from that same list; the watch still dials and matches host; no read added, read site unchanged (1) file:Stat@9052 f011cacdfd05d9f422b530537a7b6bb1a65733ae76ee83464d6566540a9fcae6
internal/edge/wildcard.go newWildcardFromEnv legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-agent-start-demo-1;basis=Includes the configured demo domain in the existing wildcard manager's explicit parent input.;rev3=census-ruling-region-ha-g2r-fixes;basis=W2a: on a gated box (issuer gate armed: store and mirror exist) with no DNS provider, builds a serve-only wildcard manager that loads and serves wildcard PEMs from the existing local cache/mirror and never orders (dns nil never reaches obtain). Ungated boxes still get nil. Same parent inputs; no new path or provider credential read.;rev3=census-ruling-account-subdomains;basis=with PLATFORM_APPS_DOMAIN set, also gives the wildcard manager a names reader: the edge's own registry handle's ListAccountNamespaces (the box's own registry database, as carlos, as ListWildcardDomains beside it), keeping the last good names on a read error; refresh() inverts them to sqid -> name and parentsFor adds <name>.<apps-domain> as a parent only beside a sqid parent it already derives from a route host, and only for a name in the subdomain shape; no apps domain, no reader; same read sites (body change only); no file, path, command or bucket read added registry:Host@6617,whole:WildcardDomain@6564,whole:WildcardDomain@6590 3fd6037048f31fdf43704ab87f43ab45a8aa8ad1a73b92bc656eeae367b4b225
internal/host/agent.go aliasPassReportingComplete legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-g2-fixes;basis=Extract the existing serialized alias pass, add cancellable locking and routing-only alias/regional publication from its completeness report; existing deployment/claim/registry reads retained, new in-memory Route/RegionalDomain passes.;rev3=census-ruling-fix-incomplete-domains-pass;basis=gains a startup bool parameter that it copies into domains.AliasReport.StartupNoRemoval; runHAIngressStartup passes true, aliasPassReporting (the ordinary agent pass) passes false; same reads and calls, body change only; no root pass calls it; no root decision;rev3=census-ruling-account-subdomains;basis=sets AliasReport.AppsDomain from PLATFORM_APPS_DOMAIN (trimmed), the variable domainsTickConfig reads; same reads and calls otherwise; body change only whole:RegionalDomain@1778,whole:Route@1856,whole:Route@957,whole:Route@979,whole:Route@998 8a439cd701910b91d9bf8c39e96a56141c20c063f590dc26f557eb5337884ad6
internal/domains/namespacealiases.go deriveNamespaceAliases legacy accepted-legacy accepted-legacy;rev3=census-ruling-account-subdomains;basis=new: derives <prefix>.<name>.<apps> -> <prefix>.<sqid>.<apps> alias rows from the routes, alias rows and claim listing the pass already read (Provisioned or Platform, not sidecar or replica, of the name's account), writes them "pointing" (fix round 1) with UpsertAlias, and SetAliasDNSStatus("pointing") for an existing one that is not, to the box's own registry, and HA names into the in-memory AliasIngress report; no file, path or bucket read registry:Account@1666,registry:Account@2867,registry:Alias@760,registry:App@1687,registry:App@1696,registry:App@1812,registry:DNSStatus@2137,registry:HA@2758,registry:Host@1238,registry:Host@1645,registry:Host@1655,registry:Host@1783,registry:Host@2740,registry:Host@2849,registry:Platform@1062,registry:Provisioned@1044,registry:Replica@1096,whole:Route@1028,whole:Route@1156,whole:Route@2412,whole:Route@2494,whole:Route@2532,whole:Route@2714,whole:Route@2769,whole:Route@3107,whole:Route@3172,whole:Route@3246,whole:Route@3302,whole:Route@3326,whole:Route@919,whole:RouteAlias@1617,whole:RouteAlias@712,whole:RouteAlias@742,whole:RouteAlias@755,whole:RouteAlias@771 c100c0ab8340ac352b4ccce7c6db7c572d5d54d4ba8924214d1cc097a7e39f21
@@ -28,6 +30,7 @@ internal/domains/aliases.go deriveInstanceAliases legacy accepted-legacy accepte
internal/domains/reconcile.go StampHealth legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-dns-fresh-lookup-724;basis=section 4 now computes every cached verdict first, then freshUpgrade gives up to 64 randomly ordered names that could have a public zone (not under the apps domain, not special-use like .internal) and whose verdict is "" or "elsewhere" an uncached lookup (30 s pass budget) that may only upgrade to "pointing", then stamps; the extra sites are the indexed loops over the same rows (#724);rev3=census-ruling-no-negative-prime-724;basis=section 4 now hands each route and alias, with its previous stamp (the two new registry:DNSStatus reads, rt.DNSStatus and a.DNSStatus, same rows already listed), to dnsVerdicts, which first hands the pass's hostnames to Config.FreshRetain (the resolver forgets its in-memory backoff and strike for names no longer carried) and then decides each hostname once per pass and applies the verdict to every row carrying it: a name not "pointing" before this pass and eligible for a fresh lookup (public name, not under the apps domain, ResolveFresh set) is looked at uncached first within the same 64-lookup/30 s budget (shared, with previously "pointing" names' upgrade looks serviced before any fresh-first name so new names cannot starve a published one) and stamped from it (edge address, A or AAAA, "pointing", other "elsewhere", authoritative not-found "", authoritative NODATA for A and AAAA with the zone's SOA "" with no cached query), falling back to the cached lookup past the budget or on the second fresh failure in a row; the first fresh failure in a row is held (stamp and check time untouched, the resolver forgives it so the next pass asks fresh again); a previously "pointing" name keeps cached-first plus the upgrade-only fresh look (ResolveUpgrade, nearest zones first), so the fresh path still never unpublishes; a fresh-first name that ends the pass "pointing" (fresh or cached) has its fresh failure backoff cleared through Config.FreshForget, so an onboarding failure never suppresses the upgrade look that keeps it published; new names are ordered never-checked first then oldest check, and lookups answered from the backoff do not count against the budget; StampHealth's own body is unchanged by the last round; no new file, path or command input; the dropped Alias/Host/Route/RouteAlias sites are the old indexed loops folded into the candidate build (#724);rev3=census-ruling-account-subdomains;basis=reads the box's own account_namespaces table (only when DNS stamping runs) and leaves out of the DNS loop the alias rows isNamespaceDerived names (an alias under a held name, of that name's account, pointing at its sqid twin); if that read fails it logs and leaves out every alias two or more labels under the apps domain, still stamping every other alias, every route and all TLS expiry (fix round 1); the added RouteAlias sites are that filter over rows already listed; stamps less, never more; TLS stamping unchanged registry:Alias@1972,registry:Alias@4450,registry:Alias@5039,registry:Alias@5129,registry:Alias@5563,registry:Alias@5627,registry:Alias@5715,registry:DNSCheckedAt@4325,registry:DNSCheckedAt@4472,registry:DNSStatus@4311,registry:DNSStatus@4459,registry:DNSStatus@4664,registry:DNSStatus@4963,registry:Host@4302,registry:Host@4736,registry:Host@4820,registry:Host@5332,registry:Host@5391,registry:Host@5473,whole:Route@199,whole:Route@236,whole:Route@4126,whole:Route@4242,whole:Route@4571,whole:Route@5286,whole:RouteAlias@1680,whole:RouteAlias@1906,whole:RouteAlias@2058,whole:RouteAlias@2106,whole:RouteAlias@2126,whole:RouteAlias@2138,whole:RouteAlias@4172,whole:RouteAlias@4386,whole:RouteAlias@4866,whole:RouteAlias@5516,whole:RouteAlias@780 5288387d1eac4611bc4b1acc30569011009192e7210127001c27174e1e1cfa43
internal/registry/registry.go Registry.Fingerprint legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the registry's SQLite side, as carlos: in the agent (/opt/carlos/carlos agent, carlos-edge.service) and in the registry child (carlos __registry-child, which a root pass forks as the service user); the remote arm, unchanged, in the process that holds a remote handle: census-ruling-seeded-instances's body with the row's lifetime pair (incarnation, serving_seq) folded into the edge's change poll, each only when non-zero, so a registry with no pair digests as before; self-serve moves 1 Task 7;rev3=census-ruling-regional-domains-447;basis=#447 Task 4: hashes regional_domains (host, target, account, app, region; created_at not) over the same fresh connection, with a section marker written only when a row exists, so a registry with no regional rows digests as before; the one added site is that SELECT (+file:Query) on the box's own registry database, as carlos; no file path read;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): review R1 finding 1: the routes SELECT also reads host, kind, account, app, platform and fingerprintForwardInert (one CASE over the ForwardForbidden columns), and every row folds host, kind, account and app (tagged, quoted), platform when set, and forward_inert=0 for a forward row that is not inert, so a rowid reused by another hostname, an in-place account or app rewrite, or a stray forbidden column moves the edge's change poll. Same one SELECT per table on the same fresh connection to the box's own registry database, as carlos; no table, file or bucket read added; a digest, never a decision.;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 5): the SELECT also reads fleet_label and, only when it is set, hashes "fleet_label=<q>" into the digest, so labelling a row moves the edge's reload fingerprint. Read sites unchanged (33). Registry side, not root; an unlabelled registry's digest is byte-identical.;rev3=census-ruling-stateless-replicas-1;basis=Read the additive stateless projection in the existing registry SELECT and hash only when set; no new read source.;rev3=census-ruling-agent-start-demo-1;basis=Existing SELECT reads four more demo columns; only a marked row adds them to the hash, so ordinary hashes remain unchanged.;rev3=census-ruling-stateless-replicas-2;basis=Four additive projection columns join the existing routes SELECT and hash only when nonzero; no new query or file read. merge of origin/main 6be08467: Union main demo identity and expiry with replica columns in the same SELECT and hash; merge-only body change.;rev3=census-ruling-agent-start-demo-3;basis=Hash moved-notice wire bytes so notice-only changes invalidate an edge route snapshot. Census read-site delta: +file:QueryRow.;rev3=census-ruling-edge-page-cache-1;basis=selects the new pages_off column with the rest and folds "pages_off=1" into the hash only when set, as assets_off, so a registry that never sets it fingerprints as before; same routes SELECT, no new table; read sites unchanged (34); no read added;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 1: hashes link_channels (link_id, account, token_hash, status, generation; connected, seen_at, seq and created_at not) over the same fresh connection, with a section marker written only when a row exists, so a registry with no links digests as before; the one added site is that SELECT (+file:Query) on the box's own registry database, as carlos; a digest, never a decision; linked deployments slice 1 Task 7: also folds home_link (id, serving_url, tunnel_url, the token's sha256 never the token, account, apps_domain, box_label, conn_gen; state and created_at not) and home_link_apps (name, home_account, home_app, home_host) through fingerprintHomeLink over the same fresh connection, each section marker written only when a row exists, so a registry with no link digests as before; no file path read; a digest, never a decision;rev3=census-ruling-account-subdomains;basis=hashes account_namespaces (name, account) over the same fresh connection, with a section marker written only when a row exists, so a registry with no held names digests as before; the one added site is that SELECT (+file:Query) on the box's own registry database, as carlos; a digest, never a decision file:Exec@284,file:Open@188,file:Query@10785,file:Query@11707,file:Query@12810,file:Query@368,file:Query@6655,file:Query@7134,file:Query@8120,file:Query@8816,file:Query@9728,file:QueryRow@13727,registry:ClaimIncarnation@1729,registry:ClaimIncarnation@5563,registry:ClaimIncarnation@5640,registry:ClaimOwner@1773,registry:ClaimOwner@5764,registry:ClaimOwner@5829,registry:ClaimRowID@1792,registry:ClaimRowID@5856,registry:ClaimRowID@5922,registry:ClaimStamp@1754,registry:ClaimStamp@5673,registry:ClaimStamp@5737,registry:Incarnation@1848,registry:Incarnation@6143,registry:Incarnation@6207,registry:ServingSeq@1867,registry:ServingSeq@6234,registry:ServingSeq@6297,registry:Text@158,registry:path@207,registry:remote@55,registry:remote@87,whole:remoteClient@57,whole:remoteClient@89 a52e0bc25d555bbf22f35655c54c0fa3aca6cedec5f0b6b80157d9d95f921a29
internal/registry/registry.go Registry.migrate legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the registry's SQLite side, as carlos: in the agent (/opt/carlos/carlos agent, carlos-edge.service) and in the registry child (carlos __registry-child, which a root pass forks as the service user), on every registry open; a box CLI verb that opens the registry directly runs it as whoever runs the verb: census-ruling-seeded-instances's body with two more columns added to routes (incarnation and serving_seq, INTEGER NOT NULL DEFAULT 0, idempotent through the duplicate-column rule); self-serve moves 1 Task 7;rev3=census-ruling-rootfs-apps-2;basis=one more ALTER TABLE, routes ADD COLUMN runtime TEXT NOT NULL DEFAULT '', beside main's rate_limit, assets_off, asset_gen, incarnation and serving_seq (the last four from the merges of origin/main 3c33f2eb and 953b9fda); the same sixteen sites, no read added;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328/#329 plan 1 Task 4: three more ALTER TABLE statements in the existing loop, routes ADD COLUMN egress_allow, size and policy_expires_at, each TEXT NOT NULL DEFAULT '' and idempotent through the duplicate-column rule; the same sixteen sites, no read added.;rev3=census-ruling-region-ha-p1a;basis=one more ALTER TABLE in the existing loop: routes ADD COLUMN ha INTEGER NOT NULL DEFAULT 0, idempotent through the duplicate-column rule; the same sixteen sites, no read added;rev3=census-ruling-ha-p1a-433;basis=the registry's SQLite side as carlos (agent, registry child; a box CLI verb that opens the registry directly runs it as whoever runs it), on every registry open: the ALTER TABLE routes statements are now built from the one migration definition routeAddedColumns (addedColumn name, type, default; review r1 P2): for each entry without the Claim mark, "ALTER TABLE routes ADD COLUMN " + spec(), byte for byte the statements main runs, in main's order, under the same duplicate-column rule. +registry:Claim is that mark, +whole:addedColumn the struct. Every name, type and default is an in-binary literal; no statement added, removed or changed; no read added.;rev3=census-ruling-regional-domains-447;basis=#447 Task 4: one more CREATE TABLE IF NOT EXISTS regional_domains (host TEXT PRIMARY KEY, target, account, app, region TEXT NOT NULL DEFAULT '', created_at INTEGER NOT NULL DEFAULT 0), beside wildcard_domains; the added sites are that statement (+file:Exec, +registry:sql), an in-binary literal; additive, no existing statement changed;rev3=census-ruling-region-ha-p1b3b-t;basis=Create local HA duty/replay tables and revision triggers in the existing registry connection; no new database path.;rev3=census-ruling-agent-start-demo-3;basis=Create moved-notice storage as a single (id, wire) row; fingerprints include the stored wire bytes. Census read-site delta: +file:Exec, +registry:sql.;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 1: calls migrateLinks after migrateHADuties (one CREATE TABLE IF NOT EXISTS link_channels, an in-binary literal); additive, no existing statement changed; linked deployments slice 1 Task 7: also runs migrateHomeLink (CREATE TABLE IF NOT EXISTS home_link and home_link_apps) after migrateLinks; additive, the box's own registry database, as carlos;rev3=census-ruling-account-subdomains;basis=one more CREATE TABLE IF NOT EXISTS account_namespaces (name TEXT PRIMARY KEY, account TEXT NOT NULL), an in-binary literal (+file:Exec, +registry:sql); additive, no existing statement changed file:Exec@1124,file:Exec@1855,file:Exec@212,file:Exec@2409,file:Exec@3057,file:Exec@3822,file:Exec@4101,file:Exec@4964,file:Exec@51,file:Exec@5140,file:Exec@761,registry:Claim@686,registry:sql@1124,registry:sql@1855,registry:sql@212,registry:sql@2409,registry:sql@3057,registry:sql@3822,registry:sql@4101,registry:sql@4964,registry:sql@51,registry:sql@5140,registry:sql@761,whole:addedColumn@661 0c5fdaf1215e8f81c156a1fc1576cb075c2a52238bde75fc8320d49472fd117d
+@coverage . 724a5d9e8aef7202ca2d5a3f3ed0152e425b06a66458567d0627cfb2b725becb
@coverage internal/domains be259af4d007f9f06e6d827eb2fa775710788821cc1bbac3215ec1c9b67780fc
@coverage internal/edge 9b9f642f53505bd73aad991d29b75b68abba48b6eb9d242a6634bea069dc421c
@coverage internal/host aa8f6c1a0b8dd200cb7656622d1fb6004ea0e1bbac292459b4eafa463da7f9bb
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index 5ec72d473..43433e099 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -173,4 +173,4 @@ plan14-root-reads-stats-prune-400.tsv 75b32391a24d2c9269fc579aae68ac80b7b1d4ccf0
plan14-root-reads-group-observation-carry.tsv 587f6e92c5e594b9bb6436a2d0066849454407202e311f43483bed3be4591940
plan14-root-reads-activator-settle-wait.tsv b3d35a0bd7c0500c74efbe5e8f566adb623696d31bd9860164907e08a2e79369
plan14-root-reads-lease-checkpoint-no-compaction.tsv b3d35a0bd7c0500c74efbe5e8f566adb623696d31bd9860164907e08a2e79369
-plan14-root-reads-account-subdomains.tsv dde10a6f5fe44a4be206275f883b6613c9eeb850f184132d93136fc5e84d9134
+plan14-root-reads-account-subdomains.tsv 17d8c803e6d0930608c76963b82b5e6211734029d0c3651cbe86130db869e390
diff --git a/parity/cli.tsv b/parity/cli.tsv
index 0281a0587..fc471beaa 100644
--- a/parity/cli.tsv
+++ b/parity/cli.tsv
@@ -13,6 +13,10 @@ accounts create customer - - - - -
accounts list customer - - - - -
accounts migrate operator - - - - -
accounts plan operator - - - - -
+accounts subdomain inventory operator - - - - -
+accounts subdomain remove operator - - - - -
+accounts subdomain set operator - - - - -
+accounts subdomain show operator - - - - -
add box-local - - - - -
adopt box-local - - - - -
agent box-local - - - - -
diff --git a/parity/parity.tsv b/parity/parity.tsv
index b3a5081d6..48fb3c739 100644
--- a/parity/parity.tsv
+++ b/parity/parity.tsv
@@ -196,6 +196,7 @@ op-store-grant operator operator store grant A per-app storage override; no o
op-economics operator operator economics bill ; economics backhaul GET /fleet/economics ; /fleet/economics/bill ; /api/economics/bill ; /api/economics/backhaul ; /fleet/economics/scenarios The bill and backhaul inputs; the CLI posts to the /api/economics doors.
op-accounts-plan operator operator accounts plan GET /fleet/economics/accounts ; /fleet/economics/tier The console sets the pool tier only.
op-accounts-migrate operator operator accounts migrate A one-off migration of an app's objects.
+op-accounts-subdomain operator operator accounts subdomain set ; accounts subdomain remove ; accounts subdomain show ; accounts subdomain inventory Platform operators only. The account settings page shows the subdomain, read-only.
op-billing operator operator billing problems ; billing close ; billing house Billing problems and house accounts.
op-billing-pages operator operator /fleet/billing ; /fleet/billing/accounts ; /fleet/billing/payments ; /fleet/billing/sync ; /fleet/billing/sync/status The operator Billing pages: the overview, paying accounts and payments, and their background sync.
op-instance-policy operator operator apps set [--egress-allow,--size] ; instances set [--size] Instance policy is set by an operator.
diff --git a/routes_cli.go b/routes_cli.go
index 527d521c5..84996ca68 100644
--- a/routes_cli.go
+++ b/routes_cli.go
@@ -64,8 +64,11 @@ func runRoutes(args []string) {
continue
}
shown++
+ // HOST is the public host where the console sent one (account
+ // subdomains spec §4.8); --match and the path rows below stay on
+ // Host, the identity.
fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n",
- r.Host, routeRegionCell(r), dashIfEmpty(r.Kind), dashIfEmpty(r.Upstream), dashIfEmpty(r.Channel),
+ r.shown(), routeRegionCell(r), dashIfEmpty(r.Kind), dashIfEmpty(r.Upstream), dashIfEmpty(r.Channel),
// An empty ENVIRONMENT is a real answer — the route takes the
// app's default bundle — so it prints as a dash rather than a
// blank cell a reader would take for missing data.
diff --git a/testdata/clireg-golden.jsonl b/testdata/clireg-golden.jsonl
index dcdfae3bb..0519fdd89 100644
--- a/testdata/clireg-golden.jsonl
+++ b/testdata/clireg-golden.jsonl
@@ -24,12 +24,26 @@
{"case":"accounts migrate | -h","argv":["accounts","migrate","-h"],"exit":0,"stdout":"","stderr":"usage: carlos accounts migrate [flags]\nflags:\n --app, -a <string> app to move\n --dry-run print the plan and touch nothing\n --from <string> source account sqid, or \"legacy\" for the pre-accounts keys (default: ops, then legacy)\n --registry <string> registry database (default: $DIR/data/registry.db)\n --to <string> destination account sqid\n"}
{"case":"accounts plan | --zz-unknown-flag","argv":["accounts","plan","--zz-unknown-flag"],"exit":1,"stdout":"flag provided but not defined: -zz-unknown-flag\nusage: carlos accounts plan [flags]\nflags:\n --account <string> account sqid to show or change\n --console <string> console origin to use\n --destination, -d <name> use the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n --pack <value> a pack and how many, as name=quantity. repeat it for more than one pack\n --reason <string> why the plan is changing. it is kept with the change\n --set <string> plan to put the account on. leave it out to show the current plan\n --sponsored <string> a JSON file of limits for a sponsored account. each one replaces the plan's where it is more generous\n","stderr":"accounts plan: flag provided but not defined: -zz-unknown-flag\n"}
{"case":"accounts plan | -h","argv":["accounts","plan","-h"],"exit":0,"stdout":"usage: carlos accounts plan [flags]\nflags:\n --account <string> account sqid to show or change\n --console <string> console origin to use\n --destination, -d <name> use the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n --pack <value> a pack and how many, as name=quantity. repeat it for more than one pack\n --reason <string> why the plan is changing. it is kept with the change\n --set <string> plan to put the account on. leave it out to show the current plan\n --sponsored <string> a JSON file of limits for a sponsored account. each one replaces the plan's where it is more generous\n","stderr":""}
-{"case":"accounts | --help","argv":["accounts","--help"],"exit":1,"stdout":"","stderr":"usage: carlos accounts <create|list|migrate|plan>\n\n create --name <name> mint an account: the next free id, its\n frozen sqid, and the bucket manifest every\n box materializes identity from\n [--owner <address>] who owns it. On a box or in CI — no browser,\n no login — this is the path: it needs no\n identity of its own and takes precedence\n over any logged-in one.\n [--console <url>] which logged-in console to mint through\n (only needed with several)\n list your accounts. Signed-in (the usual case):\n name, sqid and your role, from the console.\n On a box with a registry: sqid, name and\n app count from the registry itself.\n [--console <url>] list through a console even where a\n registry exists (or: which logged-in\n console, with several)\n migrate --app <a> --to <sqid> copy an app's objects to the account-\n qualified prefix and re-stamp its routes\n [--from <sqid>] source account (default: the legacy,\n account-less keys)\n [--dry-run] print the plan and touch nothing\n plan --account <sqid> show or change an account's plan (deployment operators)\n [--set <plan>] put the account on this plan. needs --reason\n [--pack <name=quantity>] add a pack. repeat it for more than one\n [--sponsored <file.json>] limits for a sponsored account, used where\n they are more generous than the plan's\n [--reason <text>] why the plan is changing\n [--console <url>] which logged-in console to use\n\nplan only works where the console has a plan catalog (CARLOS_PLAN_CATALOG).\n\ncreate always names an owner, one way or the other: log this terminal in with\n\"carlos auth login\" and you become the owner, or pass --owner. It refuses\nrather than mint an account nobody can open in the console.\n\nmigrate never deletes a legacy object. Deleting them is a separate operator\nstep, behind the verification gate: every channel pointer must resolve from\nthe qualified keys with the fallback disabled, and one adopt pass must be a\nno-op, first.\n"}
-{"case":"accounts | --zz-unknown-flag","argv":["accounts","--zz-unknown-flag"],"exit":1,"stdout":"","stderr":"usage: carlos accounts <create|list|migrate|plan>\n\n create --name <name> mint an account: the next free id, its\n frozen sqid, and the bucket manifest every\n box materializes identity from\n [--owner <address>] who owns it. On a box or in CI — no browser,\n no login — this is the path: it needs no\n identity of its own and takes precedence\n over any logged-in one.\n [--console <url>] which logged-in console to mint through\n (only needed with several)\n list your accounts. Signed-in (the usual case):\n name, sqid and your role, from the console.\n On a box with a registry: sqid, name and\n app count from the registry itself.\n [--console <url>] list through a console even where a\n registry exists (or: which logged-in\n console, with several)\n migrate --app <a> --to <sqid> copy an app's objects to the account-\n qualified prefix and re-stamp its routes\n [--from <sqid>] source account (default: the legacy,\n account-less keys)\n [--dry-run] print the plan and touch nothing\n plan --account <sqid> show or change an account's plan (deployment operators)\n [--set <plan>] put the account on this plan. needs --reason\n [--pack <name=quantity>] add a pack. repeat it for more than one\n [--sponsored <file.json>] limits for a sponsored account, used where\n they are more generous than the plan's\n [--reason <text>] why the plan is changing\n [--console <url>] which logged-in console to use\n\nplan only works where the console has a plan catalog (CARLOS_PLAN_CATALOG).\n\ncreate always names an owner, one way or the other: log this terminal in with\n\"carlos auth login\" and you become the owner, or pass --owner. It refuses\nrather than mint an account nobody can open in the console.\n\nmigrate never deletes a legacy object. Deleting them is a separate operator\nstep, behind the verification gate: every channel pointer must resolve from\nthe qualified keys with the fallback disabled, and one adopt pass must be a\nno-op, first.\n"}
-{"case":"accounts | -h","argv":["accounts","-h"],"exit":1,"stdout":"","stderr":"usage: carlos accounts <create|list|migrate|plan>\n\n create --name <name> mint an account: the next free id, its\n frozen sqid, and the bucket manifest every\n box materializes identity from\n [--owner <address>] who owns it. On a box or in CI — no browser,\n no login — this is the path: it needs no\n identity of its own and takes precedence\n over any logged-in one.\n [--console <url>] which logged-in console to mint through\n (only needed with several)\n list your accounts. Signed-in (the usual case):\n name, sqid and your role, from the console.\n On a box with a registry: sqid, name and\n app count from the registry itself.\n [--console <url>] list through a console even where a\n registry exists (or: which logged-in\n console, with several)\n migrate --app <a> --to <sqid> copy an app's objects to the account-\n qualified prefix and re-stamp its routes\n [--from <sqid>] source account (default: the legacy,\n account-less keys)\n [--dry-run] print the plan and touch nothing\n plan --account <sqid> show or change an account's plan (deployment operators)\n [--set <plan>] put the account on this plan. needs --reason\n [--pack <name=quantity>] add a pack. repeat it for more than one\n [--sponsored <file.json>] limits for a sponsored account, used where\n they are more generous than the plan's\n [--reason <text>] why the plan is changing\n [--console <url>] which logged-in console to use\n\nplan only works where the console has a plan catalog (CARLOS_PLAN_CATALOG).\n\ncreate always names an owner, one way or the other: log this terminal in with\n\"carlos auth login\" and you become the owner, or pass --owner. It refuses\nrather than mint an account nobody can open in the console.\n\nmigrate never deletes a legacy object. Deleting them is a separate operator\nstep, behind the verification gate: every channel pointer must resolve from\nthe qualified keys with the fallback disabled, and one adopt pass must be a\nno-op, first.\n"}
-{"case":"accounts | bare","argv":["accounts"],"exit":1,"stdout":"","stderr":"usage: carlos accounts <create|list|migrate|plan>\n\n create --name <name> mint an account: the next free id, its\n frozen sqid, and the bucket manifest every\n box materializes identity from\n [--owner <address>] who owns it. On a box or in CI — no browser,\n no login — this is the path: it needs no\n identity of its own and takes precedence\n over any logged-in one.\n [--console <url>] which logged-in console to mint through\n (only needed with several)\n list your accounts. Signed-in (the usual case):\n name, sqid and your role, from the console.\n On a box with a registry: sqid, name and\n app count from the registry itself.\n [--console <url>] list through a console even where a\n registry exists (or: which logged-in\n console, with several)\n migrate --app <a> --to <sqid> copy an app's objects to the account-\n qualified prefix and re-stamp its routes\n [--from <sqid>] source account (default: the legacy,\n account-less keys)\n [--dry-run] print the plan and touch nothing\n plan --account <sqid> show or change an account's plan (deployment operators)\n [--set <plan>] put the account on this plan. needs --reason\n [--pack <name=quantity>] add a pack. repeat it for more than one\n [--sponsored <file.json>] limits for a sponsored account, used where\n they are more generous than the plan's\n [--reason <text>] why the plan is changing\n [--console <url>] which logged-in console to use\n\nplan only works where the console has a plan catalog (CARLOS_PLAN_CATALOG).\n\ncreate always names an owner, one way or the other: log this terminal in with\n\"carlos auth login\" and you become the owner, or pass --owner. It refuses\nrather than mint an account nobody can open in the console.\n\nmigrate never deletes a legacy object. Deleting them is a separate operator\nstep, behind the verification gate: every channel pointer must resolve from\nthe qualified keys with the fallback disabled, and one adopt pass must be a\nno-op, first.\n"}
-{"case":"accounts | help","argv":["accounts","help"],"exit":1,"stdout":"","stderr":"usage: carlos accounts <create|list|migrate|plan>\n\n create --name <name> mint an account: the next free id, its\n frozen sqid, and the bucket manifest every\n box materializes identity from\n [--owner <address>] who owns it. On a box or in CI — no browser,\n no login — this is the path: it needs no\n identity of its own and takes precedence\n over any logged-in one.\n [--console <url>] which logged-in console to mint through\n (only needed with several)\n list your accounts. Signed-in (the usual case):\n name, sqid and your role, from the console.\n On a box with a registry: sqid, name and\n app count from the registry itself.\n [--console <url>] list through a console even where a\n registry exists (or: which logged-in\n console, with several)\n migrate --app <a> --to <sqid> copy an app's objects to the account-\n qualified prefix and re-stamp its routes\n [--from <sqid>] source account (default: the legacy,\n account-less keys)\n [--dry-run] print the plan and touch nothing\n plan --account <sqid> show or change an account's plan (deployment operators)\n [--set <plan>] put the account on this plan. needs --reason\n [--pack <name=quantity>] add a pack. repeat it for more than one\n [--sponsored <file.json>] limits for a sponsored account, used where\n they are more generous than the plan's\n [--reason <text>] why the plan is changing\n [--console <url>] which logged-in console to use\n\nplan only works where the console has a plan catalog (CARLOS_PLAN_CATALOG).\n\ncreate always names an owner, one way or the other: log this terminal in with\n\"carlos auth login\" and you become the owner, or pass --owner. It refuses\nrather than mint an account nobody can open in the console.\n\nmigrate never deletes a legacy object. Deleting them is a separate operator\nstep, behind the verification gate: every channel pointer must resolve from\nthe qualified keys with the fallback disabled, and one adopt pass must be a\nno-op, first.\n"}
-{"case":"accounts | zz-unknown","argv":["accounts","zz-unknown"],"exit":1,"stdout":"","stderr":"usage: carlos accounts <create|list|migrate|plan>\n\n create --name <name> mint an account: the next free id, its\n frozen sqid, and the bucket manifest every\n box materializes identity from\n [--owner <address>] who owns it. On a box or in CI — no browser,\n no login — this is the path: it needs no\n identity of its own and takes precedence\n over any logged-in one.\n [--console <url>] which logged-in console to mint through\n (only needed with several)\n list your accounts. Signed-in (the usual case):\n name, sqid and your role, from the console.\n On a box with a registry: sqid, name and\n app count from the registry itself.\n [--console <url>] list through a console even where a\n registry exists (or: which logged-in\n console, with several)\n migrate --app <a> --to <sqid> copy an app's objects to the account-\n qualified prefix and re-stamp its routes\n [--from <sqid>] source account (default: the legacy,\n account-less keys)\n [--dry-run] print the plan and touch nothing\n plan --account <sqid> show or change an account's plan (deployment operators)\n [--set <plan>] put the account on this plan. needs --reason\n [--pack <name=quantity>] add a pack. repeat it for more than one\n [--sponsored <file.json>] limits for a sponsored account, used where\n they are more generous than the plan's\n [--reason <text>] why the plan is changing\n [--console <url>] which logged-in console to use\n\nplan only works where the console has a plan catalog (CARLOS_PLAN_CATALOG).\n\ncreate always names an owner, one way or the other: log this terminal in with\n\"carlos auth login\" and you become the owner, or pass --owner. It refuses\nrather than mint an account nobody can open in the console.\n\nmigrate never deletes a legacy object. Deleting them is a separate operator\nstep, behind the verification gate: every channel pointer must resolve from\nthe qualified keys with the fallback disabled, and one adopt pass must be a\nno-op, first.\n"}
+{"case":"accounts subdomain inventory | --zz-unknown-flag","argv":["accounts","subdomain","inventory","--zz-unknown-flag"],"exit":1,"stdout":"flag provided but not defined: -zz-unknown-flag\nusage: carlos accounts subdomain inventory [flags]\nflags:\n --console <string> console origin to use\n --destination, -d <name> use the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n","stderr":"accounts subdomain inventory: flag provided but not defined: -zz-unknown-flag\n"}
+{"case":"accounts subdomain inventory | -h","argv":["accounts","subdomain","inventory","-h"],"exit":0,"stdout":"usage: carlos accounts subdomain inventory [flags]\nflags:\n --console <string> console origin to use\n --destination, -d <name> use the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n","stderr":""}
+{"case":"accounts subdomain remove | --zz-unknown-flag","argv":["accounts","subdomain","remove","--zz-unknown-flag"],"exit":1,"stdout":"flag provided but not defined: -zz-unknown-flag\nusage: carlos accounts subdomain remove [flags]\nflags:\n --account <string> account sqid to change or show\n --console <string> console origin to use\n --destination, -d <name> use the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n","stderr":"accounts subdomain remove: flag provided but not defined: -zz-unknown-flag\n"}
+{"case":"accounts subdomain remove | -h","argv":["accounts","subdomain","remove","-h"],"exit":0,"stdout":"usage: carlos accounts subdomain remove [flags]\nflags:\n --account <string> account sqid to change or show\n --console <string> console origin to use\n --destination, -d <name> use the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n","stderr":""}
+{"case":"accounts subdomain set | --zz-unknown-flag","argv":["accounts","subdomain","set","--zz-unknown-flag"],"exit":1,"stdout":"flag provided but not defined: -zz-unknown-flag\nusage: carlos accounts subdomain set --account <sqid> <name> [flags]\nflags:\n --account <string> account sqid to change or show\n --console <string> console origin to use\n --destination, -d <name> use the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n","stderr":"accounts subdomain set: flag provided but not defined: -zz-unknown-flag\n"}
+{"case":"accounts subdomain set | -h","argv":["accounts","subdomain","set","-h"],"exit":0,"stdout":"usage: carlos accounts subdomain set --account <sqid> <name> [flags]\nflags:\n --account <string> account sqid to change or show\n --console <string> console origin to use\n --destination, -d <name> use the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n","stderr":""}
+{"case":"accounts subdomain show | --zz-unknown-flag","argv":["accounts","subdomain","show","--zz-unknown-flag"],"exit":1,"stdout":"flag provided but not defined: -zz-unknown-flag\nusage: carlos accounts subdomain show [flags]\nflags:\n --account <string> account sqid to change or show\n --console <string> console origin to use\n --destination, -d <name> use the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n","stderr":"accounts subdomain show: flag provided but not defined: -zz-unknown-flag\n"}
+{"case":"accounts subdomain show | -h","argv":["accounts","subdomain","show","-h"],"exit":0,"stdout":"usage: carlos accounts subdomain show [flags]\nflags:\n --account <string> account sqid to change or show\n --console <string> console origin to use\n --destination, -d <name> use the named block from .carlos/config's destinations (default: CARLOS_DESTINATION, else the file's default or only one)\n","stderr":""}
+{"case":"accounts subdomain | --help","argv":["accounts","subdomain","--help"],"exit":1,"stdout":"","stderr":"usage: carlos accounts subdomain <set|remove|show|inventory>\n\n set --account <sqid> <name> give the account a subdomain\n remove --account <sqid> take the account's subdomain away\n show --account <sqid> show the account's subdomain\n inventory list unused labels under the apps domain\n"}
+{"case":"accounts subdomain | --zz-unknown-flag","argv":["accounts","subdomain","--zz-unknown-flag"],"exit":1,"stdout":"","stderr":"usage: carlos accounts subdomain <set|remove|show|inventory>\n\n set --account <sqid> <name> give the account a subdomain\n remove --account <sqid> take the account's subdomain away\n show --account <sqid> show the account's subdomain\n inventory list unused labels under the apps domain\n"}
+{"case":"accounts subdomain | -h","argv":["accounts","subdomain","-h"],"exit":1,"stdout":"","stderr":"usage: carlos accounts subdomain <set|remove|show|inventory>\n\n set --account <sqid> <name> give the account a subdomain\n remove --account <sqid> take the account's subdomain away\n show --account <sqid> show the account's subdomain\n inventory list unused labels under the apps domain\n"}
+{"case":"accounts subdomain | bare","argv":["accounts","subdomain"],"exit":1,"stdout":"","stderr":"usage: carlos accounts subdomain <set|remove|show|inventory>\n\n set --account <sqid> <name> give the account a subdomain\n remove --account <sqid> take the account's subdomain away\n show --account <sqid> show the account's subdomain\n inventory list unused labels under the apps domain\n"}
+{"case":"accounts subdomain | help","argv":["accounts","subdomain","help"],"exit":1,"stdout":"","stderr":"usage: carlos accounts subdomain <set|remove|show|inventory>\n\n set --account <sqid> <name> give the account a subdomain\n remove --account <sqid> take the account's subdomain away\n show --account <sqid> show the account's subdomain\n inventory list unused labels under the apps domain\n"}
+{"case":"accounts subdomain | zz-unknown","argv":["accounts","subdomain","zz-unknown"],"exit":1,"stdout":"","stderr":"usage: carlos accounts subdomain <set|remove|show|inventory>\n\n set --account <sqid> <name> give the account a subdomain\n remove --account <sqid> take the account's subdomain away\n show --account <sqid> show the account's subdomain\n inventory list unused labels under the apps domain\n"}
+{"case":"accounts | --help","argv":["accounts","--help"],"exit":1,"stdout":"","stderr":"usage: carlos accounts <create|list|migrate|plan|subdomain>\n\n create --name <name> mint an account: the next free id, its\n frozen sqid, and the bucket manifest every\n box materializes identity from\n [--owner <address>] who owns it. On a box or in CI — no browser,\n no login — this is the path: it needs no\n identity of its own and takes precedence\n over any logged-in one.\n [--console <url>] which logged-in console to mint through\n (only needed with several)\n list your accounts. Signed-in (the usual case):\n name, sqid and your role, from the console.\n On a box with a registry: sqid, name and\n app count from the registry itself.\n [--console <url>] list through a console even where a\n registry exists (or: which logged-in\n console, with several)\n migrate --app <a> --to <sqid> copy an app's objects to the account-\n qualified prefix and re-stamp its routes\n [--from <sqid>] source account (default: the legacy,\n account-less keys)\n [--dry-run] print the plan and touch nothing\n plan --account <sqid> show or change an account's plan (deployment operators)\n [--set <plan>] put the account on this plan. needs --reason\n [--pack <name=quantity>] add a pack. repeat it for more than one\n [--sponsored <file.json>] limits for a sponsored account, used where\n they are more generous than the plan's\n [--reason <text>] why the plan is changing\n [--console <url>] which logged-in console to use\n subdomain <set|remove|show|inventory>\n give an account a readable name in its app addresses\n\nplan only works where the console has a plan catalog (CARLOS_PLAN_CATALOG).\n\ncreate always names an owner, one way or the other: log this terminal in with\n\"carlos auth login\" and you become the owner, or pass --owner. It refuses\nrather than mint an account nobody can open in the console.\n\nmigrate never deletes a legacy object. Deleting them is a separate operator\nstep, behind the verification gate: every channel pointer must resolve from\nthe qualified keys with the fallback disabled, and one adopt pass must be a\nno-op, first.\n"}
+{"case":"accounts | --zz-unknown-flag","argv":["accounts","--zz-unknown-flag"],"exit":1,"stdout":"","stderr":"usage: carlos accounts <create|list|migrate|plan|subdomain>\n\n create --name <name> mint an account: the next free id, its\n frozen sqid, and the bucket manifest every\n box materializes identity from\n [--owner <address>] who owns it. On a box or in CI — no browser,\n no login — this is the path: it needs no\n identity of its own and takes precedence\n over any logged-in one.\n [--console <url>] which logged-in console to mint through\n (only needed with several)\n list your accounts. Signed-in (the usual case):\n name, sqid and your role, from the console.\n On a box with a registry: sqid, name and\n app count from the registry itself.\n [--console <url>] list through a console even where a\n registry exists (or: which logged-in\n console, with several)\n migrate --app <a> --to <sqid> copy an app's objects to the account-\n qualified prefix and re-stamp its routes\n [--from <sqid>] source account (default: the legacy,\n account-less keys)\n [--dry-run] print the plan and touch nothing\n plan --account <sqid> show or change an account's plan (deployment operators)\n [--set <plan>] put the account on this plan. needs --reason\n [--pack <name=quantity>] add a pack. repeat it for more than one\n [--sponsored <file.json>] limits for a sponsored account, used where\n they are more generous than the plan's\n [--reason <text>] why the plan is changing\n [--console <url>] which logged-in console to use\n subdomain <set|remove|show|inventory>\n give an account a readable name in its app addresses\n\nplan only works where the console has a plan catalog (CARLOS_PLAN_CATALOG).\n\ncreate always names an owner, one way or the other: log this terminal in with\n\"carlos auth login\" and you become the owner, or pass --owner. It refuses\nrather than mint an account nobody can open in the console.\n\nmigrate never deletes a legacy object. Deleting them is a separate operator\nstep, behind the verification gate: every channel pointer must resolve from\nthe qualified keys with the fallback disabled, and one adopt pass must be a\nno-op, first.\n"}
+{"case":"accounts | -h","argv":["accounts","-h"],"exit":1,"stdout":"","stderr":"usage: carlos accounts <create|list|migrate|plan|subdomain>\n\n create --name <name> mint an account: the next free id, its\n frozen sqid, and the bucket manifest every\n box materializes identity from\n [--owner <address>] who owns it. On a box or in CI — no browser,\n no login — this is the path: it needs no\n identity of its own and takes precedence\n over any logged-in one.\n [--console <url>] which logged-in console to mint through\n (only needed with several)\n list your accounts. Signed-in (the usual case):\n name, sqid and your role, from the console.\n On a box with a registry: sqid, name and\n app count from the registry itself.\n [--console <url>] list through a console even where a\n registry exists (or: which logged-in\n console, with several)\n migrate --app <a> --to <sqid> copy an app's objects to the account-\n qualified prefix and re-stamp its routes\n [--from <sqid>] source account (default: the legacy,\n account-less keys)\n [--dry-run] print the plan and touch nothing\n plan --account <sqid> show or change an account's plan (deployment operators)\n [--set <plan>] put the account on this plan. needs --reason\n [--pack <name=quantity>] add a pack. repeat it for more than one\n [--sponsored <file.json>] limits for a sponsored account, used where\n they are more generous than the plan's\n [--reason <text>] why the plan is changing\n [--console <url>] which logged-in console to use\n subdomain <set|remove|show|inventory>\n give an account a readable name in its app addresses\n\nplan only works where the console has a plan catalog (CARLOS_PLAN_CATALOG).\n\ncreate always names an owner, one way or the other: log this terminal in with\n\"carlos auth login\" and you become the owner, or pass --owner. It refuses\nrather than mint an account nobody can open in the console.\n\nmigrate never deletes a legacy object. Deleting them is a separate operator\nstep, behind the verification gate: every channel pointer must resolve from\nthe qualified keys with the fallback disabled, and one adopt pass must be a\nno-op, first.\n"}
+{"case":"accounts | bare","argv":["accounts"],"exit":1,"stdout":"","stderr":"usage: carlos accounts <create|list|migrate|plan|subdomain>\n\n create --name <name> mint an account: the next free id, its\n frozen sqid, and the bucket manifest every\n box materializes identity from\n [--owner <address>] who owns it. On a box or in CI — no browser,\n no login — this is the path: it needs no\n identity of its own and takes precedence\n over any logged-in one.\n [--console <url>] which logged-in console to mint through\n (only needed with several)\n list your accounts. Signed-in (the usual case):\n name, sqid and your role, from the console.\n On a box with a registry: sqid, name and\n app count from the registry itself.\n [--console <url>] list through a console even where a\n registry exists (or: which logged-in\n console, with several)\n migrate --app <a> --to <sqid> copy an app's objects to the account-\n qualified prefix and re-stamp its routes\n [--from <sqid>] source account (default: the legacy,\n account-less keys)\n [--dry-run] print the plan and touch nothing\n plan --account <sqid> show or change an account's plan (deployment operators)\n [--set <plan>] put the account on this plan. needs --reason\n [--pack <name=quantity>] add a pack. repeat it for more than one\n [--sponsored <file.json>] limits for a sponsored account, used where\n they are more generous than the plan's\n [--reason <text>] why the plan is changing\n [--console <url>] which logged-in console to use\n subdomain <set|remove|show|inventory>\n give an account a readable name in its app addresses\n\nplan only works where the console has a plan catalog (CARLOS_PLAN_CATALOG).\n\ncreate always names an owner, one way or the other: log this terminal in with\n\"carlos auth login\" and you become the owner, or pass --owner. It refuses\nrather than mint an account nobody can open in the console.\n\nmigrate never deletes a legacy object. Deleting them is a separate operator\nstep, behind the verification gate: every channel pointer must resolve from\nthe qualified keys with the fallback disabled, and one adopt pass must be a\nno-op, first.\n"}
+{"case":"accounts | help","argv":["accounts","help"],"exit":1,"stdout":"","stderr":"usage: carlos accounts <create|list|migrate|plan|subdomain>\n\n create --name <name> mint an account: the next free id, its\n frozen sqid, and the bucket manifest every\n box materializes identity from\n [--owner <address>] who owns it. On a box or in CI — no browser,\n no login — this is the path: it needs no\n identity of its own and takes precedence\n over any logged-in one.\n [--console <url>] which logged-in console to mint through\n (only needed with several)\n list your accounts. Signed-in (the usual case):\n name, sqid and your role, from the console.\n On a box with a registry: sqid, name and\n app count from the registry itself.\n [--console <url>] list through a console even where a\n registry exists (or: which logged-in\n console, with several)\n migrate --app <a> --to <sqid> copy an app's objects to the account-\n qualified prefix and re-stamp its routes\n [--from <sqid>] source account (default: the legacy,\n account-less keys)\n [--dry-run] print the plan and touch nothing\n plan --account <sqid> show or change an account's plan (deployment operators)\n [--set <plan>] put the account on this plan. needs --reason\n [--pack <name=quantity>] add a pack. repeat it for more than one\n [--sponsored <file.json>] limits for a sponsored account, used where\n they are more generous than the plan's\n [--reason <text>] why the plan is changing\n [--console <url>] which logged-in console to use\n subdomain <set|remove|show|inventory>\n give an account a readable name in its app addresses\n\nplan only works where the console has a plan catalog (CARLOS_PLAN_CATALOG).\n\ncreate always names an owner, one way or the other: log this terminal in with\n\"carlos auth login\" and you become the owner, or pass --owner. It refuses\nrather than mint an account nobody can open in the console.\n\nmigrate never deletes a legacy object. Deleting them is a separate operator\nstep, behind the verification gate: every channel pointer must resolve from\nthe qualified keys with the fallback disabled, and one adopt pass must be a\nno-op, first.\n"}
+{"case":"accounts | zz-unknown","argv":["accounts","zz-unknown"],"exit":1,"stdout":"","stderr":"usage: carlos accounts <create|list|migrate|plan|subdomain>\n\n create --name <name> mint an account: the next free id, its\n frozen sqid, and the bucket manifest every\n box materializes identity from\n [--owner <address>] who owns it. On a box or in CI — no browser,\n no login — this is the path: it needs no\n identity of its own and takes precedence\n over any logged-in one.\n [--console <url>] which logged-in console to mint through\n (only needed with several)\n list your accounts. Signed-in (the usual case):\n name, sqid and your role, from the console.\n On a box with a registry: sqid, name and\n app count from the registry itself.\n [--console <url>] list through a console even where a\n registry exists (or: which logged-in\n console, with several)\n migrate --app <a> --to <sqid> copy an app's objects to the account-\n qualified prefix and re-stamp its routes\n [--from <sqid>] source account (default: the legacy,\n account-less keys)\n [--dry-run] print the plan and touch nothing\n plan --account <sqid> show or change an account's plan (deployment operators)\n [--set <plan>] put the account on this plan. needs --reason\n [--pack <name=quantity>] add a pack. repeat it for more than one\n [--sponsored <file.json>] limits for a sponsored account, used where\n they are more generous than the plan's\n [--reason <text>] why the plan is changing\n [--console <url>] which logged-in console to use\n subdomain <set|remove|show|inventory>\n give an account a readable name in its app addresses\n\nplan only works where the console has a plan catalog (CARLOS_PLAN_CATALOG).\n\ncreate always names an owner, one way or the other: log this terminal in with\n\"carlos auth login\" and you become the owner, or pass --owner. It refuses\nrather than mint an account nobody can open in the console.\n\nmigrate never deletes a legacy object. Deleting them is a separate operator\nstep, behind the verification gate: every channel pointer must resolve from\nthe qualified keys with the fallback disabled, and one adopt pass must be a\nno-op, first.\n"}
{"case":"add | --zz-unknown-flag","argv":["add","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"flag provided but not defined: -zz-unknown-flag\nusage: carlos add [flags]\nflags:\n --account <string> account (sqid or name) the app belongs to (default: ops)\n --account-id <string> account sqid, matched as a sqid ONLY — supersedes --account\n --addr <string> TCP upstream host:port (whole-app tenants)\n --app, -a <string> app whose releases this route runs\n --backing <string> process backing: \"\" (agent exec child) | \"unit\" (carlos-app@<host> systemd unit)\n --channel, -c <string> release channel to follow (default: stable)\n --db <string> instance database path\n --hibernate hibernate when idle\n --kind <string> instance | service | static (default: instance)\n --registry <string> registry database (default: $DIR/data/registry.db)\n --slug <string> root-domain short name (optional)\n --socket <string> unix socket upstream\n --status-named opt this app into being named on the public status page\n --unit <string> systemd unit that owns this route's process when it is neither an exec child nor a carlos-app@ tenant (e.g. console.service)\n"}
{"case":"add | -h","argv":["add","-h"],"exit":0,"stdout":"","stderr":"usage: carlos add [flags]\nflags:\n --account <string> account (sqid or name) the app belongs to (default: ops)\n --account-id <string> account sqid, matched as a sqid ONLY — supersedes --account\n --addr <string> TCP upstream host:port (whole-app tenants)\n --app, -a <string> app whose releases this route runs\n --backing <string> process backing: \"\" (agent exec child) | \"unit\" (carlos-app@<host> systemd unit)\n --channel, -c <string> release channel to follow (default: stable)\n --db <string> instance database path\n --hibernate hibernate when idle\n --kind <string> instance | service | static (default: instance)\n --registry <string> registry database (default: $DIR/data/registry.db)\n --slug <string> root-domain short name (optional)\n --socket <string> unix socket upstream\n --status-named opt this app into being named on the public status page\n --unit <string> systemd unit that owns this route's process when it is neither an exec child nor a carlos-app@ tenant (e.g. console.service)\n"}
{"case":"adopt | skipped","skipped":"opens root's release state and claims before reading its arguments, -h included"}