carlos / platform Public

domains: refuse names under another account's catch-all (H5-M1)

With DomainProof off (the default), another account could attach an
unclaimed child of a verified Wildcard+Catchall parent and get a
verified exact claim; every box then installed an exact alias that beats
the parent's star at the edge, carving the name out of the parent's
domain. Turning Wildcard on took a DNS proof of the parent, so the
parent's account now wins:

- console: heldElsewhere also refuses a host one label below another
  account's verified Wildcard+Catchall claim, with the existing neutral
  409 (no new copy). The parent's own account may still carve out.
- box: ReconcileAliasesReport skips such a claim before deriving
  anything (log only), so a claim made before this check serves nothing.
  Census card and overlay for the body change (no read added).

Domain proof stays opt-in. Carries the hunt tests
TestHunt_H5_M1_ForeignChildOfOrdinaryCatchall and
TestHunt_H5_M1_ReconcileInstallsForeignChildOverCatchall.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev f10a10e05ecee460b021a18be0f937a115872c39 parent 7e79410
7 files changed, +261 −6
  • docs/superpowers/notes/census-proposal-sec-h4-member-doors.md +19 −0
  • internal/console/domaincatchall.go +37 −6
  • internal/console/hunt_H5-M1_test.go +106 −0
  • internal/domains/aliases.go +38 −0
  • internal/domains/hunt_H5-M1_test.go +55 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −0
  • internal/provision/testdata/plan14-root-reads-sec-h4-member-doors.tsv +5 −0
diff --git a/docs/superpowers/notes/census-proposal-sec-h4-member-doors.md b/docs/superpowers/notes/census-proposal-sec-h4-member-doors.md
new file mode 100644
index 000000000..1a8968faa
--- /dev/null
+++ b/docs/superpowers/notes/census-proposal-sec-h4-member-doors.md
@@ -0,0 +1,19 @@
+# Census approval: sec-h4-member-doors
+
+Ruling `census-ruling-sec-h4-member-doors`. The independent reviewer approves or rejects every change below, 0 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26).
+
+| unit | change | read sites | what changed |
+|---|---|---|---|
+| `internal/domains/aliases.go` `ReconcileAliasesReport` | body | unchanged (110) | security hunt H5-M1: before deriving anything for a verified claim, the pass skips (log only) a claim whose host is one label below another account's verified Wildcard+Catchall claim (catchallParents over the claims it already read, underForeignCatchall), so no alias, path, wildcard, regional or HA ingress row is derived for it and an earlier row goes with the ordinary removal; no read added (claims already listed and read), writes less, never more; no root pass calls it; no root decision |
+
+Envelopes re-pinned: `internal/domains`.
+
+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:
+
+- `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;rev3=census-ruling-account-subdomains;basis=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
+
+Seal: `4eda67fee53800e2cfa4177b954c7f0fce6bdfcfbfe1aa2547ddcec3027b668b` → `041d0f648f279e5701a635f489ab68ff111fb4c8789f0a4887649805e7b7e4c0`.
+
+Overlay: `internal/provision/testdata/plan14-root-reads-sec-h4-member-doors.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/internal/console/domaincatchall.go b/internal/console/domaincatchall.go
index 06fbe230c..6045719de 100644
--- a/internal/console/domaincatchall.go
+++ b/internal/console/domaincatchall.go
@@ -188,12 +188,14 @@ func (s *Server) detachInstanceCatchall(ctx context.Context, acct *Account, app,
}
// heldElsewhere is the attach doors' last check before a claim write: a
-// real route another app serves (deploymentRouteTaken), or a live instance's
-// name under another account's instance catch-all (catchallInstanceName).
-// Both answer with the same neutral 409, from the same place in each door,
-// so neither reads apart from an ordinary "someone holds it".
+// real route another app serves (deploymentRouteTaken), a live instance's
+// name under another account's instance catch-all (catchallInstanceName),
+// or any name under another account's ordinary catch-all
+// (underForeignCatchall). All answer with the same neutral 409, from the
+// same place in each door, so none reads apart from an ordinary "someone
+// holds it".
//
-// A bucket read the catch-all check could not make is answered as a
+// A bucket read a catch-all check could not make is answered as a
// retryable error rather than a guess: refusing would read as "someone
// holds it", and admitting would skip the guard.
func (s *Server) heldElsewhere(ctx context.Context, host, sqid, app string) *doorRefusal {
@@ -201,8 +203,11 @@ func (s *Server) heldElsewhere(ctx context.Context, host, sqid, app string) *doo
return claimRefusal(host, domains.ErrHostUnavailable)
}
held, err := s.catchallInstanceName(ctx, host, sqid, app)
+ if err == nil && !held {
+ held, err = s.underForeignCatchall(ctx, host, sqid)
+ }
if err != nil {
- log.Printf("console: attach %s: instance catch-all check: %v", host, err)
+ log.Printf("console: attach %s: catch-all check: %v", host, err)
return &doorRefusal{Status: http.StatusBadGateway, Msg: "could not check the hostname — try again"}
}
if held {
@@ -211,6 +216,32 @@ func (s *Server) heldElsewhere(ctx context.Context, host, sqid, app string) *doo
return nil
}
+// underForeignCatchall reports whether host is one label below a parent
+// whose verified claim, held by another account, has Wildcard and Catchall
+// on (security hunt H5-M1). That catch-all serves every such name, and an
+// exact claim from another account would beat its star at the edge and
+// carve the name out of the parent's domain. Turning Wildcard on took a
+// DNS proof of the parent, so the parent's account wins. Its own account
+// may still carve names out, as before; the box refuses the same names
+// (domains.ReconcileAliases), so a claim that predates this check serves
+// nothing either.
+//
+// One GET (usually a 404).
+func (s *Server) underForeignCatchall(ctx context.Context, host, sqid string) (bool, error) {
+ label, parent, ok := strings.Cut(host, ".")
+ if !ok || label == "" || label == "*" || !strings.Contains(parent, ".") {
+ return false, nil
+ }
+ c, err := domains.GetClaim(ctx, s.cfg.Releases, parent)
+ if errors.Is(err, os.ErrNotExist) {
+ return false, nil
+ }
+ if err != nil {
+ return false, err
+ }
+ return !c.Pending && c.Wildcard && c.Catchall && c.Account != sqid, nil
+}
+
// catchallInstanceName reports whether host is a one-label name under
// another account's live instance catch-all that the catch-all reserves.
//
diff --git a/internal/console/hunt_H5-M1_test.go b/internal/console/hunt_H5-M1_test.go
new file mode 100644
index 000000000..c8c0a12a7
--- /dev/null
+++ b/internal/console/hunt_H5-M1_test.go
@@ -0,0 +1,106 @@
+package console
+
+// Hunt H5-M1 (verifier: opus). A parent claim carrying Wildcard+Catchall
+// derives "*.<parent>" -> the holder's route on every box. The attach door's
+// last collision check (heldElsewhere) covers real routes and INSTANCE
+// catch-alls only, and with DomainProof at its default (off) every attach is
+// proven by definition (domainPolicy.domainProver). So another account can
+// attach an unclaimed child of somebody else's catch-all and get a VERIFIED
+// exact claim, which every box then turns into an exact alias that beats the
+// star (edge lookupIn).
+//
+// The test asserts the SECURE answer (the foreign child is refused, or at
+// least written pending) through the real CLI door with two real accounts.
+
+import (
+ "context"
+ "errors"
+ "net/http"
+ "os"
+ "strings"
+ "testing"
+ "time"
+
+ "github.com/carlosframework/platform/internal/domains"
+)
+
+func TestHunt_H5_M1_ForeignChildOfOrdinaryCatchall(t *testing.T) {
+ fx, _ := instanceFixture(t, "code-h5m1")
+ noCatchallProof(fx)
+ ctx := context.Background()
+
+ // The victim: account bab (ops account), app titogo, holds the parent
+ // with both capabilities, routed at its own route. Written through the
+ // production writers (AttachClaim then SetClaimCapabilities) — the
+ // victim's own setup is not the gate under test.
+ if _, _, err := domains.AttachClaim(ctx, fx.rel, domains.Claim{
+ Host: "victim.example", Account: "bab", App: "titogo", Route: "go.tito.io",
+ CreatedAt: time.Now().UTC().Format(time.RFC3339),
+ }); err != nil {
+ t.Fatal(err)
+ }
+ if _, err := domains.SetClaimCapabilities(ctx, fx.rel, "victim.example", "bab", "titogo", true, true); err != nil {
+ t.Fatal(err)
+ }
+ parent, err := domains.GetClaim(ctx, fx.rel, "victim.example")
+ if err != nil || !parent.Wildcard || !parent.Catchall || parent.Pending {
+ t.Fatalf("test bug: parent claim = %+v err=%v, want verified wildcard+catchall", parent, err)
+ }
+
+ // The attacker: a different account with its own app and CLI token.
+ now := time.Now()
+ if err := fx.st.CreateAccount(42, "cdef", "widgets", "bob@keymail.dev", now); err != nil {
+ t.Fatal(err)
+ }
+ if _, err := fx.st.CreateAppIn(42, "widgets", "bob@keymail.dev", now); err != nil {
+ t.Fatal(err)
+ }
+ bob := cliToken(t, fx, "bob@keymail.dev", "code-h5m1-bob")
+
+ if fx.srv.cfg.DomainProof {
+ t.Fatal("test bug: the fixture must run with DomainProof at its default (off)")
+ }
+ code, _, out := rawReq(t, http.MethodPost, domainsURL(fx, "cdef", "widgets"), bob,
+ attachBody("shop.victim.example", "w.attacker.example"))
+ c, gerr := domains.GetClaim(ctx, fx.rel, "shop.victim.example")
+ if gerr == nil && c.Account == "cdef" && !c.Pending {
+ t.Fatalf("H5-M1: a foreign account attached shop.victim.example under bab's wildcard+catchall parent: "+
+ "door answered %d %s and stored a VERIFIED claim %s/%s -> %s (want the neutral 409 or at least a pending claim)",
+ code, strings.TrimSpace(out), c.Account, c.App, c.Route)
+ }
+ if gerr != nil && !errors.Is(gerr, os.ErrNotExist) {
+ t.Fatalf("read claim: %v", gerr)
+ }
+}
+
+// Negative control: the same attach with DomainProof on and no TXT proof
+// is written PENDING, so no box derives an alias from it.
+func TestHunt_H5_M1_ControlDomainProofOn(t *testing.T) {
+ fx, _ := instanceFixture(t, "code-h5m1c")
+ noCatchallProof(fx)
+ fx.srv.cfg.DomainProof = true
+ ctx := context.Background()
+ if _, _, err := domains.AttachClaim(ctx, fx.rel, domains.Claim{
+ Host: "victim.example", Account: "bab", App: "titogo", Route: "go.tito.io",
+ CreatedAt: time.Now().UTC().Format(time.RFC3339),
+ }); err != nil {
+ t.Fatal(err)
+ }
+ if _, err := domains.SetClaimCapabilities(ctx, fx.rel, "victim.example", "bab", "titogo", true, true); err != nil {
+ t.Fatal(err)
+ }
+ now := time.Now()
+ if err := fx.st.CreateAccount(42, "cdef", "widgets", "bob@keymail.dev", now); err != nil {
+ t.Fatal(err)
+ }
+ if _, err := fx.st.CreateAppIn(42, "widgets", "bob@keymail.dev", now); err != nil {
+ t.Fatal(err)
+ }
+ bob := cliToken(t, fx, "bob@keymail.dev", "code-h5m1c-bob")
+ code, _, out := rawReq(t, http.MethodPost, domainsURL(fx, "cdef", "widgets"), bob,
+ attachBody("shop.victim.example", "w.attacker.example"))
+ c, err := domains.GetClaim(ctx, fx.rel, "shop.victim.example")
+ if err == nil && !c.Pending {
+ t.Fatalf("control: with DomainProof on and no TXT proof the claim is verified (%d %s): %+v", code, out, c)
+ }
+}
diff --git a/internal/domains/aliases.go b/internal/domains/aliases.go
index 849b1e4e3..67ef3697d 100644
--- a/internal/domains/aliases.go
+++ b/internal/domains/aliases.go
@@ -289,6 +289,34 @@ func ReconcileAliases(ctx context.Context, s release.Store, reg *registry.Regist
return ReconcileAliasesReport(ctx, s, reg, now, deploymentRoutes, cache, nil)
}
+// catchallParents indexes, by host, the claims whose catch-all serves every
+// one-label name below them: verified, with Wildcard and Catchall both on.
+func catchallParents(claims []Claim) map[string]Claim {
+ out := map[string]Claim{}
+ for _, c := range claims {
+ if !c.Pending && c.Wildcard && c.Catchall {
+ out[c.Host] = c
+ }
+ }
+ return out
+}
+
+// underForeignCatchall returns the parent claim whose catch-all covers
+// c.Host, when that parent belongs to another account. The star matches
+// one label, so only a name exactly one label below the parent is covered.
+// The parent's own account may carve names out of its catch-all as before.
+func underForeignCatchall(parents map[string]Claim, c Claim) (Claim, bool) {
+ label, parent, ok := strings.Cut(c.Host, ".")
+ if !ok || label == "" || label == "*" {
+ return Claim{}, false
+ }
+ p, ok := parents[parent]
+ if !ok || p.Account == c.Account {
+ return Claim{}, false
+ }
+ return p, true
+}
+
// AliasReport is what a ReconcileAliasesReport pass says about itself.
//
// Complete is true only when every input the pass decided from was read and
@@ -510,6 +538,7 @@ func ReconcileAliasesReport(ctx context.Context, s release.Store, reg *registry.
boxRegion = rep.Region
}
wildCount := 0
+ parents := catchallParents(claims)
for _, c := range claims {
// A pending claim (#215) is a reservation by someone who has not
// proved they control the hostname, so it derives nothing at all:
@@ -520,6 +549,15 @@ func ReconcileAliasesReport(ctx context.Context, s release.Store, reg *registry.
if c.Pending {
continue
}
+ // A name one label below another account's catch-all is the
+ // catch-all's (security hunt H5-M1): an exact row for it would beat
+ // the star, so this claim derives nothing. Logged, like the other
+ // refusals here; the attach door refuses such a claim up front.
+ if p, under := underForeignCatchall(parents, c); under {
+ log.Printf("domains: %s refused: under %s/%s's catch-all *.%s, claim says %s/%s",
+ c.Host, p.Account, p.App, p.Host, c.Account, c.App)
+ continue
+ }
// A regional claim (#447, spec §7.2) derives regional_domains rows
// and, where it is bound here, its wildcard parent; then it
// continues, so the plain-alias, paths and catch-all halves below
diff --git a/internal/domains/hunt_H5-M1_test.go b/internal/domains/hunt_H5-M1_test.go
new file mode 100644
index 000000000..4fdca02c7
--- /dev/null
+++ b/internal/domains/hunt_H5-M1_test.go
@@ -0,0 +1,55 @@
+package domains
+
+// Hunt H5-M1 (verifier: opus), box half. Given the console door admits a
+// foreign exact claim under another account's wildcard+catchall parent
+// (internal/console/hunt_H5-M1_test.go), the box's ReconcileAliases is the
+// "authoritative tenancy gate". It checks the claim's own route belongs to the
+// claimant, but nothing about whose catch-all the name already sits under, so
+// both rows land: "*.victim.example" -> the victim's route and
+// "shop.victim.example" -> the attacker's. The edge's lookupIn tries the exact
+// key first, so the attacker serves the name.
+
+import (
+ "context"
+ "testing"
+
+ "github.com/carlosframework/platform/internal/release"
+)
+
+func TestHunt_H5_M1_ReconcileInstallsForeignChildOverCatchall(t *testing.T) {
+ s := release.NewDirStore(t.TempDir())
+ reg := aliasRegWith(t)
+ addRoute(t, reg, "victim-app.bab.oncarlos.com", "bab", "victim")
+ addRoute(t, reg, "attacker-app.cdef.oncarlos.com", "cdef", "widgets")
+ putClaim(t, s, Claim{Host: "victim.example", Account: "bab", App: "victim",
+ Route: "victim-app.bab.oncarlos.com", CreatedAt: "2026-10-01T00:00:00Z",
+ Wildcard: true, Catchall: true})
+ // What the console door wrote for the attacker with DomainProof off: a
+ // VERIFIED claim (no pending flag).
+ putClaim(t, s, Claim{Host: "shop.victim.example", Account: "cdef", App: "widgets",
+ Route: "attacker-app.cdef.oncarlos.com", CreatedAt: "2026-10-02T00:00:00Z"})
+
+ if err := ReconcileAliases(context.Background(), s, reg, aliasNow(), nil, nil); err != nil {
+ t.Fatal(err)
+ }
+ aliases, err := reg.ListAliases()
+ if err != nil {
+ t.Fatal(err)
+ }
+ var star, child string
+ for _, a := range aliases {
+ switch a.Alias {
+ case "*.victim.example":
+ star = a.Account + "/" + a.App + " -> " + a.Host
+ case "shop.victim.example":
+ child = a.Account + "/" + a.App + " -> " + a.Host
+ }
+ }
+ if star == "" {
+ t.Fatalf("test bug: the victim's catch-all was not derived: %+v", aliases)
+ }
+ if child != "" {
+ t.Fatalf("H5-M1: the box installed a foreign exact alias under bab's catch-all: shop.victim.example = %s (catch-all *.victim.example = %s); "+
+ "lookupIn prefers the exact key, so the attacker's route serves the victim's subdomain", child, star)
+ }
+}
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index 60fa52cca..6760ef1b7 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -232,3 +232,4 @@ plan14-root-reads-omr-run.tsv f82b5e513d7434e1440c13aa4aa8bc06348745749a21593cf4
plan14-root-reads-fleet-first-reconcile-speed.tsv 9206205b2a3bf27b8b85310f4a44f94ef0c5886d85d6e55dbf2f22e073a8af11
plan14-root-reads-free-storage-250.tsv 9206205b2a3bf27b8b85310f4a44f94ef0c5886d85d6e55dbf2f22e073a8af11
plan14-root-reads-fleet-first-reconcile-speed-4.tsv 4eda67fee53800e2cfa4177b954c7f0fce6bdfcfbfe1aa2547ddcec3027b668b
+plan14-root-reads-sec-h4-member-doors.tsv 041d0f648f279e5701a635f489ab68ff111fb4c8789f0a4887649805e7b7e4c0
diff --git a/internal/provision/testdata/plan14-root-reads-sec-h4-member-doors.tsv b/internal/provision/testdata/plan14-root-reads-sec-h4-member-doors.tsv
new file mode 100644
index 000000000..c3339d1e7
--- /dev/null
+++ b/internal/provision/testdata/plan14-root-reads-sec-h4-member-doors.tsv
@@ -0,0 +1,5 @@
+# Census overlay sec-h4-member-doors, written by census-propose (#369). census-ruling-sec-h4-member-doors, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-sec-h4-member-doors.md.
+# 1 body, 0 sites, 1 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+@legacy 74ddf436cbd5597e76d2de72f353ca9be135385b5755e30f986629e3516e72f4 internal/domains/aliases.go ReconcileAliasesReport legacy accepted-legacy 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;rev3=census-ruling-account-subdomains;basis=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;rev3=census-ruling-sec-h4-member-doors;basis=security hunt H5-M1: before deriving anything for a verified claim, the pass skips (log only) a claim whose host is one label below another account's verified Wildcard+Catchall claim (catchallParents over the claims it already read, underForeignCatchall), so no alias, path, wildcard, regional or HA ingress row is derived for it and an earlier row goes with the ordinary removal; no read added (claims already listed and read), writes less, never more; no root pass calls it; no root decision registry:Account@21945,registry:Account@21960,registry:Account@22078,registry:Account@22430,registry:Account@22443,registry:Alias@19939,registry:Alias@20072,registry:Alias@20142,registry:App@15703,registry:App@15903,registry:App@16059,registry:App@16260,registry:App@21973,registry:App@21984,registry:App@22091,registry:App@22456,registry:App@22465,registry:App@5754,registry:App@5950,registry:App@9574,registry:App@9773,registry:Host@16626,registry:Host@21755,registry:Host@21830,registry:Host@21853,registry:Host@21905,registry:Host@22239,registry:Host@22311,registry:Host@22415,registry:Host@22726,registry:Host@22872,registry:Host@22944,registry:Host@23478,registry:Host@23591,registry:Host@23743,registry:Host@23824,registry:Host@834,registry:Prefix@23486,registry:Prefix@23605,registry:Prefix@23751,registry:Prefix@23832,registry:Region@22100,registry:Status@12437,registry:Target@21925,registry:Target@22030,whole:RegionalDomain@20719,whole:RegionalDomain@20737,whole:RegionalDomain@21683,whole:RegionalDomain@21721,whole:RegionalDomain@21742,whole:RegionalDomain@21765,whole:RegionalDomain@21892,whole:RegionalDomain@276,whole:RegionalDomain@4205,whole:RegionalDomain@4406,whole:Route@1045,whole:Route@11767,whole:Route@12219,whole:Route@12381,whole:Route@15672,whole:Route@15747,whole:Route@15894,whole:Route@15956,whole:Route@16099,whole:Route@16255,whole:Route@17508,whole:Route@18633,whole:Route@18641,whole:Route@19472,whole:Route@19562,whole:Route@19570,whole:Route@22023,whole:Route@22074,whole:Route@2251,whole:Route@337,whole:Route@4387,whole:Route@4806,whole:Route@5097,whole:Route@5794,whole:Route@5945,whole:Route@6001,whole:Route@787,whole:Route@816,whole:Route@827,whole:Route@845,whole:Route@8920,whole:Route@9618,whole:Route@9764,whole:RouteAlias@18649,whole:RouteAlias@19454,whole:RouteAlias@19578,whole:RouteAlias@19733,whole:RouteAlias@19914,whole:RouteAlias@2259,whole:RoutePath@13964,whole:RoutePath@23371,whole:RoutePath@23413,whole:RoutePath@23548,whole:RoutePath@23578,whole:WildcardDomain@16822,whole:WildcardDomain@21789,whole:WildcardDomain@21818,whole:WildcardDomain@22299,whole:WildcardDomain@22321,whole:WildcardDomain@22345,whole:WildcardDomain@22394,whole:WildcardDomain@22557,whole:WildcardDomain@22685,whole:WildcardDomain@22714,whole:WildcardDomain@4620 586c235b8e3fe9649e9853f0298b84fee27462d722dd0ef740bf2f4c8e2766be
+internal/domains/aliases.go ReconcileAliasesReport legacy accepted-legacy 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;rev3=census-ruling-account-subdomains;basis=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;rev3=census-ruling-sec-h4-member-doors;basis=security hunt H5-M1: before deriving anything for a verified claim, the pass skips (log only) a claim whose host is one label below another account's verified Wildcard+Catchall claim (catchallParents over the claims it already read, underForeignCatchall), so no alias, path, wildcard, regional or HA ingress row is derived for it and an earlier row goes with the ordinary removal; no read added (claims already listed and read), writes less, never more; no root pass calls it; no root decision registry:Account@21945,registry:Account@21960,registry:Account@22078,registry:Account@22430,registry:Account@22443,registry:Alias@19939,registry:Alias@20072,registry:Alias@20142,registry:App@15703,registry:App@15903,registry:App@16059,registry:App@16260,registry:App@21973,registry:App@21984,registry:App@22091,registry:App@22456,registry:App@22465,registry:App@5754,registry:App@5950,registry:App@9574,registry:App@9773,registry:Host@16626,registry:Host@21755,registry:Host@21830,registry:Host@21853,registry:Host@21905,registry:Host@22239,registry:Host@22311,registry:Host@22415,registry:Host@22726,registry:Host@22872,registry:Host@22944,registry:Host@23478,registry:Host@23591,registry:Host@23743,registry:Host@23824,registry:Host@834,registry:Prefix@23486,registry:Prefix@23605,registry:Prefix@23751,registry:Prefix@23832,registry:Region@22100,registry:Status@12437,registry:Target@21925,registry:Target@22030,whole:RegionalDomain@20719,whole:RegionalDomain@20737,whole:RegionalDomain@21683,whole:RegionalDomain@21721,whole:RegionalDomain@21742,whole:RegionalDomain@21765,whole:RegionalDomain@21892,whole:RegionalDomain@276,whole:RegionalDomain@4205,whole:RegionalDomain@4406,whole:Route@1045,whole:Route@11767,whole:Route@12219,whole:Route@12381,whole:Route@15672,whole:Route@15747,whole:Route@15894,whole:Route@15956,whole:Route@16099,whole:Route@16255,whole:Route@17508,whole:Route@18633,whole:Route@18641,whole:Route@19472,whole:Route@19562,whole:Route@19570,whole:Route@22023,whole:Route@22074,whole:Route@2251,whole:Route@337,whole:Route@4387,whole:Route@4806,whole:Route@5097,whole:Route@5794,whole:Route@5945,whole:Route@6001,whole:Route@787,whole:Route@816,whole:Route@827,whole:Route@845,whole:Route@8920,whole:Route@9618,whole:Route@9764,whole:RouteAlias@18649,whole:RouteAlias@19454,whole:RouteAlias@19578,whole:RouteAlias@19733,whole:RouteAlias@19914,whole:RouteAlias@2259,whole:RoutePath@13964,whole:RoutePath@23371,whole:RoutePath@23413,whole:RoutePath@23548,whole:RoutePath@23578,whole:WildcardDomain@16822,whole:WildcardDomain@21789,whole:WildcardDomain@21818,whole:WildcardDomain@22299,whole:WildcardDomain@22321,whole:WildcardDomain@22345,whole:WildcardDomain@22394,whole:WildcardDomain@22557,whole:WildcardDomain@22685,whole:WildcardDomain@22714,whole:WildcardDomain@4620 586c235b8e3fe9649e9853f0298b84fee27462d722dd0ef740bf2f4c8e2766be
+@coverage internal/domains ae69b9c842934d7d907dd7b4ca90f1bd44d448dc46f01b01f6331840ce066db0