console: first claim wins under a catch-all; box rule dropped (H5-M1 r1)
Review round 1 (Astra P1-5, P1-6; Fable P1-1, P2-2): the box-side rule let a parent whose wildcard rests on an account-free, one-time CNAME check take a name another account already served, failed open on fleet boxes that cannot read the parent, and missed first-route children. It is dropped with its census overlay and card; internal/domains is back to main and the census is clean. Instead, first claim wins at the console: - attach: heldElsewhere still refuses a name one label under another account's verified catch-all, but the name's existing holder may re-attach (the allowance catchallInstanceName makes); - capability door: turning on wildcard and catch-all is the neutral 409 while another account holds a verified child one label below, or the listing shows one it could not read (foreignChildRefusal), after the regional scan. The same account's children are no bar. Existing children keep serving. The "took a DNS proof" comment is gone. TestCatchallRefusedOverForeignChild, TestCatchallOverOwnChildAllowed, TestChildPredatingCatchallReattaches (the first and third fail without the change); the console hunt test still passes. The box-side hunt test internal/domains/hunt_H5-M1_test.go is removed with the rule it pinned.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8 files changed,
+140
−127
docs/superpowers/notes/census-proposal-sec-h4-member-doors.md+0 −19internal/console/apidomains.go+9 −0internal/console/catchallchild_test.go+83 −0internal/console/domaincatchall.go+48 −9internal/domains/aliases.go+0 −38internal/domains/hunt_H5-M1_test.go+0 −55internal/provision/testdata/plan14-root-reads-chain.tsv+0 −1internal/provision/testdata/plan14-root-reads-sec-h4-member-doors.tsv+0 −5
diff --git a/docs/superpowers/notes/census-proposal-sec-h4-member-doors.md b/docs/superpowers/notes/census-proposal-sec-h4-member-doors.md| deleted file mode 100644 |
| index 1a8968faa..000000000 |
| --- a/docs/superpowers/notes/census-proposal-sec-h4-member-doors.md |
| +++ /dev/null |
| @@ -1,19 +0,0 @@ |
| -# 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/apidomains.go b/internal/console/apidomains.go| index 12ca3a3c8..aea427255 100644 |
| --- a/internal/console/apidomains.go |
| +++ b/internal/console/apidomains.go |
| @@ -807,6 +807,15 @@ func (s *Server) setDomainCapabilities(w http.ResponseWriter, r *http.Request, c |
| return false |
| } |
| } |
| + // First claim wins (security hunt H5-M1): a catch-all does not take a |
| + // name another account already holds one label below. After the |
| + // regional scan, whose own answer names its case. |
| + if wildcard && catchall && !(cur.Wildcard && cur.Catchall) { |
| + if ref := s.foreignChildRefusal(ctx, host, acct.Sqid); ref != nil { |
| + jsonError(w, ref.Status, ref.Msg) |
| + return false |
| + } |
| + } |
| // enabling is the false->true TRANSITION only — re-sending wildcard:true |
| // for a claim that already has it must not re-run the gate. Two reasons: |
| // the CNAME lookup is a live, sequential, request-path DNS round trip |
diff --git a/internal/console/catchallchild_test.go b/internal/console/catchallchild_test.go| new file mode 100644 |
| index 000000000..d5bd81a1a |
| --- /dev/null |
| +++ b/internal/console/catchallchild_test.go |
| @@ -0,0 +1,83 @@ |
| +package console |
| + |
| +import ( |
| + "context" |
| + "net/http" |
| + "testing" |
| + "time" |
| + |
| + "github.com/carlosframework/platform/internal/domains" |
| +) |
| + |
| +// Security hunt H5-M1, review round 1: first claim wins between a parent's |
| +// catch-all and another account's child one label below it. |
| +func catchallChildWorld(t *testing.T, code, childAccount string) (*consoleFixture, string) { |
| + t.Helper() |
| + const zone = "acme.oncarlos.com" |
| + fx, owner := domainOwnerFixture(t, code) |
| + fx.srv.delegationZone = zone |
| + fx.srv.lookupCNAME = func(_ context.Context, name string) (string, error) { |
| + return name + "." + zone + ".", nil |
| + } |
| + 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.AttachClaim(ctx, fx.rel, domains.Claim{Host: "shop.victim.example", Account: childAccount, App: "widgets", |
| + Route: "w.attacker.example", CreatedAt: time.Now().UTC().Format(time.RFC3339)}); err != nil { |
| + t.Fatal(err) |
| + } |
| + return fx, owner |
| +} |
| + |
| +// TestCatchallRefusedOverForeignChild: turning on wildcard and catch-all |
| +// over a parent is the neutral 409 while another account holds a verified |
| +// child, and nothing changes. |
| +func TestCatchallRefusedOverForeignChild(t *testing.T) { |
| + fx, owner := catchallChildWorld(t, "code-h5-child-foreign", "cdef") |
| + code, _, out := rawReq(t, http.MethodPost, domainsURL(fx, "bab", "titogo"), owner, |
| + `{"host":"victim.example","route":"go.tito.io","wildcard":true,"catchall":true}`) |
| + if code != http.StatusConflict || cutoverErrorOf(out) != hostUnavailableMsg { |
| + t.Fatalf("catch-all over a foreign child = %d %s, want 409 %q", code, out, hostUnavailableMsg) |
| + } |
| + if c := claimOf(t, fx, "victim.example"); c.Wildcard || c.Catchall { |
| + t.Fatalf("parent after the refusal = %+v, want unchanged", *c) |
| + } |
| +} |
| + |
| +// TestCatchallOverOwnChildAllowed: the same account's child is no bar. |
| +func TestCatchallOverOwnChildAllowed(t *testing.T) { |
| + fx, owner := catchallChildWorld(t, "code-h5-child-own", "bab") |
| + code, _, out := rawReq(t, http.MethodPost, domainsURL(fx, "bab", "titogo"), owner, |
| + `{"host":"victim.example","route":"go.tito.io","wildcard":true,"catchall":true}`) |
| + if code != http.StatusOK { |
| + t.Fatalf("catch-all over the account's own child = %d %s, want 200", code, out) |
| + } |
| + if c := claimOf(t, fx, "victim.example"); !c.Wildcard || !c.Catchall { |
| + t.Fatalf("parent = %+v, want wildcard and catch-all on", *c) |
| + } |
| +} |
| + |
| +// TestChildPredatingCatchallReattaches: a child claim held before the |
| +// parent's catch-all keeps its name: its holder's re-attach passes the |
| +// attach door's catch-all check. |
| +func TestChildPredatingCatchallReattaches(t *testing.T) { |
| + fx, _ := catchallChildWorld(t, "code-h5-child-old", "cdef") |
| + if _, err := domains.SetClaimCapabilities(context.Background(), 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-h5-child-old-bob") |
| + code, _, out := rawReq(t, http.MethodPost, domainsURL(fx, "cdef", "widgets"), bob, |
| + attachBody("shop.victim.example", "w.attacker.example")) |
| + if code != http.StatusOK { |
| + t.Fatalf("the earlier child's re-attach = %d %s, want 200", code, out) |
| + } |
| +} |
diff --git a/internal/console/domaincatchall.go b/internal/console/domaincatchall.go| index 6045719de..75f9e38d5 100644 |
| --- a/internal/console/domaincatchall.go |
| +++ b/internal/console/domaincatchall.go |
| @@ -204,7 +204,7 @@ func (s *Server) heldElsewhere(ctx context.Context, host, sqid, app string) *doo |
| } |
| held, err := s.catchallInstanceName(ctx, host, sqid, app) |
| if err == nil && !held { |
| - held, err = s.underForeignCatchall(ctx, host, sqid) |
| + held, err = s.underForeignCatchall(ctx, host, sqid, app) |
| } |
| if err != nil { |
| log.Printf("console: attach %s: catch-all check: %v", host, err) |
| @@ -220,14 +220,15 @@ func (s *Server) heldElsewhere(ctx context.Context, host, sqid, app string) *doo |
| // 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. |
| +// carve the name out of the parent's domain. First claim wins: the |
| +// capability door refuses turning a catch-all on over another account's |
| +// existing child (foreignChildRefusal), so a child that predates the |
| +// catch-all keeps its name, and its holder's re-attach passes here, the |
| +// allowance catchallInstanceName makes. The parent's own account may carve |
| +// names out, as before. |
| // |
| -// One GET (usually a 404). |
| -func (s *Server) underForeignCatchall(ctx context.Context, host, sqid string) (bool, error) { |
| +// One GET (usually a 404), and a second only under such a catch-all. |
| +func (s *Server) underForeignCatchall(ctx context.Context, host, sqid, app string) (bool, error) { |
| label, parent, ok := strings.Cut(host, ".") |
| if !ok || label == "" || label == "*" || !strings.Contains(parent, ".") { |
| return false, nil |
| @@ -239,7 +240,45 @@ func (s *Server) underForeignCatchall(ctx context.Context, host, sqid string) (b |
| if err != nil { |
| return false, err |
| } |
| - return !c.Pending && c.Wildcard && c.Catchall && c.Account != sqid, nil |
| + if c.Pending || !c.Wildcard || !c.Catchall || c.Account == sqid { |
| + return false, nil |
| + } |
| + if own, err := domains.GetClaim(ctx, s.cfg.Releases, host); err == nil && own.Account == sqid && own.App == app { |
| + return false, nil |
| + } else if err != nil && !errors.Is(err, os.ErrNotExist) { |
| + return false, err |
| + } |
| + return true, nil |
| +} |
| + |
| +// foreignChildRefusal is the capability door's half of first-claim-wins |
| +// (security hunt H5-M1): turning on Wildcard and Catchall together over |
| +// parent is refused while ANOTHER account holds a verified claim one label |
| +// below it, or the listing shows such a name it could not read. The |
| +// enabling CNAME check names no account and is made once, so it is no |
| +// reason for the parent to take a name someone else already serves. The |
| +// neutral 409, as heldElsewhere answers; a listing error is a retry. |
| +func (s *Server) foreignChildRefusal(ctx context.Context, parent, sqid string) *doorRefusal { |
| + claims, unread, err := s.claims.ListWithUnread(ctx, s.cfg.Releases) |
| + if err != nil { |
| + log.Printf("console: catch-all over %s: child scan: %v", parent, err) |
| + return &doorRefusal{Status: http.StatusBadGateway, Msg: "could not check the hostname — try again"} |
| + } |
| + under := func(h string) bool { |
| + label, ok := strings.CutSuffix(h, "."+parent) |
| + return ok && label != "" && label != "*" && !strings.Contains(label, ".") |
| + } |
| + for _, c := range claims { |
| + if under(c.Host) && c.Account != sqid && !c.Pending { |
| + return claimRefusal(parent, domains.ErrHostUnavailable) |
| + } |
| + } |
| + for _, u := range unread { |
| + if under(u.Host) { |
| + return claimRefusal(parent, domains.ErrHostUnavailable) |
| + } |
| + } |
| + return nil |
| } |
| // catchallInstanceName reports whether host is a one-label name under |
diff --git a/internal/domains/aliases.go b/internal/domains/aliases.go| index 67ef3697d..849b1e4e3 100644 |
| --- a/internal/domains/aliases.go |
| +++ b/internal/domains/aliases.go |
| @@ -289,34 +289,6 @@ 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 |
| @@ -538,7 +510,6 @@ 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: |
| @@ -549,15 +520,6 @@ 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| deleted file mode 100644 |
| index 4fdca02c7..000000000 |
| --- a/internal/domains/hunt_H5-M1_test.go |
| +++ /dev/null |
| @@ -1,55 +0,0 @@ |
| -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 331e1200f..cf4ca8783 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-chain.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-chain.tsv |
| @@ -233,4 +233,3 @@ plan14-root-reads-fleet-first-reconcile-speed.tsv 9206205b2a3bf27b8b85310f4a44f9 |
| plan14-root-reads-free-storage-250.tsv 9206205b2a3bf27b8b85310f4a44f94ef0c5886d85d6e55dbf2f22e073a8af11 |
| plan14-root-reads-fleet-first-reconcile-speed-4.tsv 4eda67fee53800e2cfa4177b954c7f0fce6bdfcfbfe1aa2547ddcec3027b668b |
| plan14-root-reads-sec-edge-redirect-linklocal.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| deleted file mode 100644 |
| index c3339d1e7..000000000 |
| --- a/internal/provision/testdata/plan14-root-reads-sec-h4-member-doors.tsv |
| +++ /dev/null |
| @@ -1,5 +0,0 @@ |
| -# 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 |