alias-wake-338: a platform alias wakes its sleeping instance through the instance's own entry (#338 follow-up)
A platform alias (the domains pass's apex mint) shares its instance's socket but was built as a plain socket proxy: it never woke a sleeping instance (502 whenever it slept), bypassed the instance's gate, and under generations dialled a socket the instance no longer listens on. The edge now resolves such an alias to its instance's OWN upstream entry, as an attached hostname (#151) resolves to its primary's: same proxy, same route, so the existing activator wake, lease, fence, gate and generation socket apply unchanged. The instance is the one ready route of the same effective account and app on the alias's socket. An alias whose socket is only another tenant's is not served at all. The alias's own platform host stays in the wildcard parent set; a hostname attached to it does not. Tests: production-wired (real edge, activator, registry): the alias wakes a sleeping instance once, keyed on its host, held by its fence; another account's or app's alias on the socket never wakes or reaches it, asleep or awake. Mutation-checked. Census overlay alias-wake-338 proposed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7 files changed,
+333
−2
docs/superpowers/notes/census-proposal-alias-wake-338.md+25 −0internal/edge/edge.go+33 −2internal/edge/platformalias.go+62 −0internal/edge/platformalias_test.go+87 −0internal/host/aliaswake_test.go+115 −0internal/provision/testdata/plan14-root-reads-alias-wake-338.tsv+10 −0internal/provision/testdata/plan14-root-reads-chain.tsv+1 −0
CI cancelled — superseded by a newer push — run details
diff --git a/docs/superpowers/notes/census-proposal-alias-wake-338.md b/docs/superpowers/notes/census-proposal-alias-wake-338.md| new file mode 100644 |
| index 000000000..25daa5cbb |
| --- /dev/null |
| +++ b/docs/superpowers/notes/census-proposal-alias-wake-338.md |
| @@ -0,0 +1,25 @@ |
| +# Census approval: alias-wake-338 |
| + |
| +Ruling `census-ruling-alias-wake-338`. The independent reviewer approves or rejects every change below, 1 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26). |
| + |
| +| unit | change | read sites | what changed | |
| +|---|---|---|---| |
| +| `internal/edge/edge.go` `Edge.currentHosts` | body | unchanged (4) | #338 follow-up: a resolved platform alias (platformAlias) stays in the wildcard parent set as its own row was before; attached hostnames still excluded | |
| +| `internal/edge/edge.go` `Edge.Reload` | sites | +whole:Route | #338 follow-up: after the path fold, a platform alias with a source takes the source's own upstream entry (same proxy, route, hibernating, so the existing activator wake, lease and fence apply) unless it has its own prefix map; a foreign alias is dropped from the map (not served, so not Allowed for ACME either); the attached-hostname fold clears platformAlias | |
| + |
| +Envelopes re-pinned: `internal/edge`. |
| + |
| +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. Escalate 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. An escalation goes to the census owner as a decision. |
| + |
| +Recorded dispositions, which each change must still satisfy: |
| + |
| +- `internal/edge/edge.go` `Edge.currentHosts`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route |
| +- `internal/edge/edge.go` `Edge.Reload`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-design-edge-rate-limit-358;basis=each route's upstream entry gains rate: e.parseRateSettings(t), the row's rate_limit column parsed once per reload; the one added site is that whole:Route pass of t (parseRateSettings is a new unit, classified in the decisions overlay); no other read added;rev3=census-ruling-certwarm-wake;basis=the single reload hook call becomes runReloadHooks(), which runs every registered hook in order (#386); no read added, same 57 sites (56 before #358 landed on main);rev3=census-ruling-edge-asset-cache-3;basis=each tenant reverse proxy built in the switch (the tunnel, fleet, socket and TCP arms, every *httputil.ReverseProxy) is installed behind assetScrubbedProxy, which hands the proxy an assetInformationalScrub writer so an app's 1xx (103) loses the asset cache's reserved headers (X-Carlos-Asset-Fill, -Fill-Ack, -Expires, Carlos-Cache) on every local path, as the backhaul already does (final review F6); a type check of the proxy it just built and a wrapper around it; static and status handlers untouched; read sites unchanged (57), offsets moved; no read added |
| + |
| +New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff: |
| + |
| +- new `internal/edge/platformalias.go:platformAliasFold`: reads +registry:Account ×2, +registry:App ×4, +registry:Host ×3, +registry:Platform ×2, +registry:Socket ×6, +registry:Status ×2, +whole:Route ×2; written legacy, accepted-legacy, frozen |
| + |
| +Seal: `5192052a23d2fdd6f5d48b5617fe28a9bb03458e1e931c060fbdc42c3d627927` → `410ee337af4419b4ef7b3e78acee5408ae196d276d4d1f6ac3cde1697c84b7be`. |
| + |
| +Overlay: `internal/provision/testdata/plan14-root-reads-alias-wake-338.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`. |
diff --git a/internal/edge/edge.go b/internal/edge/edge.go| index e986d4258..3b2d83120 100644 |
| --- a/internal/edge/edge.go |
| +++ b/internal/edge/edge.go |
| @@ -426,6 +426,10 @@ type upstream struct { |
| // the flag exists so wildcard parent derivation (currentHosts) never |
| // treats a customer hostname as a platform host. |
| alias bool |
| + // platformAlias marks a platform alias resolved to its instance's entry |
| + // (platformalias.go). It is an alias like the above, but its own host is |
| + // a platform host, so currentHosts keeps it in the wildcard parent set. |
| + platformAlias bool |
| // paths, when non-nil, splits this hostname's traffic by leading URL |
| // segment: a bare first segment ("paulca") mapped to the HOSTNAME of the |
| // route that serves it, resolved against the same live map at request |
| @@ -1008,6 +1012,31 @@ func (e *Edge) Reload() error { |
| up.paths[p.Prefix] = p.Target |
| m[p.Host] = up |
| } |
| + // Platform aliases (#338 follow-up, platformalias.go): an alias that |
| + // shares one same-tenant route's socket resolves to that route's OWN |
| + // entry, as an attached hostname does below, so a request to it wakes |
| + // the instance through the instance's own wake path, fence and lease. |
| + // After the path fold so it inherits the instance's prefix map, and |
| + // before the attached-hostname fold so a hostname attached to the alias |
| + // inherits the result. An alias with a prefix map of its own keeps its |
| + // own entry. An alias whose socket is another tenant's is not served. |
| + sources, foreign := platformAliasFold(routes) |
| + for host := range foreign { |
| + if _, ok := m[host]; ok { |
| + delete(m, host) |
| + e.logThrottled("platform-alias-foreign "+host, fmt.Sprintf( |
| + "platform alias %s names a socket of another account or app; not served", host)) |
| + } |
| + } |
| + for host, src := range sources { |
| + own, ok := m[host] |
| + up, srcOK := m[src] |
| + if !ok || !srcOK || own.paths != nil { |
| + continue |
| + } |
| + up.alias, up.platformAlias = true, true |
| + m[host] = up |
| + } |
| // Attached hostnames (#151): each alias resolves to the primary's OWN |
| // entry — same proxy value, same route (so activator keying, version |
| // header, and purge tenancy are all the primary's). Routes always win |
| @@ -1028,7 +1057,9 @@ func (e *Edge) Reload() error { |
| if !ok { |
| continue |
| } |
| - up.alias = true |
| + // An attached hostname is never a platform host, even when its |
| + // primary is a platform alias resolved above. |
| + up.alias, up.platformAlias = true, false |
| m[a.Alias] = up |
| } |
| // Fleet channel auth: registry-backed, so this refreshes on the SAME poll |
| @@ -1185,7 +1216,7 @@ func (e *Edge) currentHosts() []string { |
| m := e.current() |
| out := make([]string, 0, len(m)) |
| for h, up := range m { |
| - if (up.route.Platform || up.route.Provisioned) && !up.alias { |
| + if (up.route.Platform || up.route.Provisioned) && !up.alias || up.platformAlias { |
| out = append(out, h) |
| } |
| } |
diff --git a/internal/edge/platformalias.go b/internal/edge/platformalias.go| new file mode 100644 |
| index 000000000..11129809d |
| --- /dev/null |
| +++ b/internal/edge/platformalias.go |
| @@ -0,0 +1,62 @@ |
| +package edge |
| + |
| +import ( |
| + "github.com/carlosframework/platform/internal/registry" |
| +) |
| + |
| +// Platform aliases (#338 follow-up). |
| +// |
| +// A platform alias is a row the domains pass minted (Route.Platform, the |
| +// <app>.<sqid>.<apps-domain> apex) that copies another route's socket: no |
| +// process of its own, the same instance under a second name. Built as an |
| +// ordinary socket route it was a plain proxy to that socket, so it never |
| +// woke a sleeping instance (502 whenever the instance slept), it bypassed |
| +// the instance's gate, and under generations it dialled a socket the |
| +// instance no longer listens on. |
| +// |
| +// So the edge resolves such an alias to its instance's OWN entry, exactly as |
| +// an attached hostname (#151) resolves to its primary's: the same proxy, the |
| +// same route row, so the wake, the lease, the fence, the gate, the |
| +// generation socket and usage are all the instance's, and nothing about the |
| +// wake path is new. |
| +// |
| +// The instance is the one route that shares the alias's socket and belongs |
| +// to the same tenant: the same effective account and the same app. An alias |
| +// whose socket belongs to another tenant's route is not served at all; one |
| +// whose socket is nobody's (a stale path, a hand-made row) keeps today's |
| +// plain proxy. |
| + |
| +// platformAliasKey is a socket as one tenant holds it. |
| +type platformAliasKey struct{ account, app, socket string } |
| + |
| +// platformAliasFold reads one registry listing and returns, for every ready |
| +// platform alias with a socket, either its instance's host (sources) or that |
| +// it must not be served (foreign): its socket belongs to a ready route of |
| +// another account or app and to none of its own tenant's. An alias whose |
| +// socket two of its own tenant's routes share resolves to neither. |
| +func platformAliasFold(routes []registry.Route) (sources map[string]string, foreign map[string]bool) { |
| + owners := map[platformAliasKey][]string{} |
| + bySocket := map[string]bool{} |
| + for _, s := range routes { |
| + if s.Platform || s.IsSidecar() || s.App == "" || s.Socket == "" || s.Status != "ready" { |
| + continue |
| + } |
| + k := platformAliasKey{registry.EffectiveAccount(s.Account), s.App, s.Socket} |
| + owners[k] = append(owners[k], s.Host) |
| + bySocket[s.Socket] = true |
| + } |
| + sources, foreign = map[string]string{}, map[string]bool{} |
| + for _, a := range routes { |
| + if !a.Platform || a.Socket == "" || a.Status != "ready" { |
| + continue |
| + } |
| + hosts := owners[platformAliasKey{registry.EffectiveAccount(a.Account), a.App, a.Socket}] |
| + switch { |
| + case a.App != "" && len(hosts) == 1: |
| + sources[a.Host] = hosts[0] |
| + case len(hosts) == 0 && bySocket[a.Socket]: |
| + foreign[a.Host] = true |
| + } |
| + } |
| + return sources, foreign |
| +} |
diff --git a/internal/edge/platformalias_test.go b/internal/edge/platformalias_test.go| new file mode 100644 |
| index 000000000..2f8c3b1fe |
| --- /dev/null |
| +++ b/internal/edge/platformalias_test.go |
| @@ -0,0 +1,87 @@ |
| +package edge |
| + |
| +import ( |
| + "maps" |
| + "slices" |
| + "testing" |
| + |
| + "github.com/carlosframework/platform/internal/registry" |
| +) |
| + |
| +// The fold's tenancy rule: an alias resolves only to the one ready route of |
| +// its own effective account and app on its socket; another tenant's socket |
| +// is foreign; a socket nobody holds, or two of its own tenant's routes |
| +// share, resolves to neither. |
| +func TestPlatformAliasFold(t *testing.T) { |
| + inst := func(host, acct, app, sock string) registry.Route { |
| + return registry.Route{Host: host, Kind: "instance", Account: acct, App: app, Socket: sock, Status: "ready", Hibernate: true} |
| + } |
| + alias := func(host, acct, app, sock string) registry.Route { |
| + return registry.Route{Host: host, Kind: "instance", Account: acct, App: app, Socket: sock, Status: "ready", Platform: true} |
| + } |
| + routes := []registry.Route{ |
| + inst("a.abc.example.com", "abc", "shop", "/s/a.sock"), |
| + alias("shop.abc.example.com", "abc", "shop", "/s/a.sock"), |
| + alias("shop.xyz.example.com", "xyz", "shop", "/s/a.sock"), // another account |
| + alias("blog.abc.example.com", "abc", "blog", "/s/a.sock"), // another app |
| + alias("stale.abc.example.com", "abc", "shop", "/s/gone.sock"), // nobody's socket |
| + inst("legacy.example.com", "", "ops", "/s/l.sock"), // empty account is the ops account |
| + alias("ops.bab.example.com", "bab", "ops", "/s/l.sock"), // ...so this is the same tenant |
| + inst("d1.abc.example.com", "abc", "dup", "/s/d.sock"), // two of one tenant's |
| + inst("d2.abc.example.com", "abc", "dup", "/s/d.sock"), // routes on one socket |
| + alias("dup.abc.example.com", "abc", "dup", "/s/d.sock"), // resolve to neither |
| + {Host: "w.abc.example.com", Kind: "sidecar", Account: "abc", App: "shop", Socket: "/s/w.sock", Status: "ready"}, |
| + alias("side.abc.example.com", "abc", "shop", "/s/w.sock"), // a sidecar is no source |
| + {Host: "n.abc.example.com", Kind: "instance", Account: "abc", App: "shop", Socket: "/s/n.sock", Status: "creating"}, |
| + alias("notready.abc.example.com", "abc", "shop", "/s/n.sock"), // a source not ready is no source |
| + } |
| + sources, foreign := platformAliasFold(routes) |
| + wantSources := map[string]string{"shop.abc.example.com": "a.abc.example.com", "ops.bab.example.com": "legacy.example.com"} |
| + if !maps.Equal(sources, wantSources) { |
| + t.Errorf("sources = %v, want %v", sources, wantSources) |
| + } |
| + wantForeign := map[string]bool{"shop.xyz.example.com": true, "blog.abc.example.com": true} |
| + if !maps.Equal(foreign, wantForeign) { |
| + t.Errorf("foreign = %v, want %v", foreign, wantForeign) |
| + } |
| +} |
| + |
| +// Wired through Reload: the alias maps to the instance's OWN entry (the |
| +// identical proxy, the instance's route, hibernating), as an attached |
| +// hostname does; another tenant's alias on the socket has no entry; and the |
| +// alias's own platform host stays in the wildcard parent set. |
| +func TestPlatformAliasSharesTheInstanceEntry(t *testing.T) { |
| + reg := openReg(t) |
| + for _, rt := range []registry.Route{ |
| + {Host: "a.abc.oncarlos.com", Kind: "instance", Account: "abc", App: "shop", Socket: "/s/a.sock", Status: "ready", Hibernate: true}, |
| + {Host: "shop.abc.oncarlos.com", Kind: "instance", Account: "abc", App: "shop", Socket: "/s/a.sock", Status: "ready", Platform: true}, |
| + {Host: "shop.xyz.oncarlos.com", Kind: "instance", Account: "xyz", App: "shop", Socket: "/s/a.sock", Status: "ready", Platform: true}, |
| + } { |
| + if err := reg.Upsert(rt); err != nil { |
| + t.Fatal(err) |
| + } |
| + } |
| + upsertAlias(t, reg, "www.shop.example", "shop.abc.oncarlos.com") |
| + e, err := New(reg, &routeRecordingActivator{}) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + m := e.current() |
| + inst, ok := m["a.abc.oncarlos.com"] |
| + if !ok || !inst.hibernating { |
| + t.Fatalf("instance entry: %+v", inst) |
| + } |
| + for _, h := range []string{"shop.abc.oncarlos.com", "www.shop.example"} { |
| + up, ok := m[h] |
| + if !ok || up.proxy != inst.proxy || up.route.Host != "a.abc.oncarlos.com" || !up.hibernating || !up.alias { |
| + t.Errorf("%s is not the instance's entry: %+v", h, up) |
| + } |
| + } |
| + if _, ok := m["shop.xyz.oncarlos.com"]; ok { |
| + t.Error("another account's alias on the instance's socket is served") |
| + } |
| + hosts := e.currentHosts() |
| + if !slices.Contains(hosts, "shop.abc.oncarlos.com") || slices.Contains(hosts, "www.shop.example") { |
| + t.Errorf("currentHosts = %v, want the platform alias and not the attached hostname", hosts) |
| + } |
| +} |
diff --git a/internal/host/aliaswake_test.go b/internal/host/aliaswake_test.go| new file mode 100644 |
| index 000000000..4ce2f450e |
| --- /dev/null |
| +++ b/internal/host/aliaswake_test.go |
| @@ -0,0 +1,115 @@ |
| +package host |
| + |
| +import ( |
| + "context" |
| + "errors" |
| + "io" |
| + "net/http" |
| + "net/http/httptest" |
| + "testing" |
| + "time" |
| + |
| + "github.com/carlosframework/platform/internal/activator" |
| + "github.com/carlosframework/platform/internal/edge" |
| + "github.com/carlosframework/platform/internal/registry" |
| +) |
| + |
| +// #338 follow-up, production-wired: a real edge over a real activator and |
| +// registry. A platform alias (the domains pass's apex mint, which shares |
| +// its instance's socket) wakes the sleeping instance through the instance's |
| +// own wake path: one wake, keyed on the instance's host, under the |
| +// instance's fence. Another account's alias on the same socket never wakes |
| +// it. |
| +func TestPlatformAliasWakesItsSleepingInstance(t *testing.T) { |
| + const host = "shop-a.bab.oncarlos.com" |
| + reg, inst, svc, _ := wakeFixture(t, host, time.Hour, func(w http.ResponseWriter, r *http.Request) { |
| + io.WriteString(w, "awake") |
| + }) |
| + for _, rt := range []registry.Route{ |
| + {Host: "shop.bab.oncarlos.com", Kind: "instance", Account: "bab", App: "app", Platform: true, Status: "ready", Socket: inst.socket}, |
| + {Host: "shop.xyz.oncarlos.com", Kind: "instance", Account: "xyz", App: "app", Platform: true, Status: "ready", Socket: inst.socket}, |
| + {Host: "blog.bab.oncarlos.com", Kind: "instance", Account: "bab", App: "blog", Platform: true, Status: "ready", Socket: inst.socket}, |
| + } { |
| + if err := reg.Upsert(rt); err != nil { |
| + t.Fatal(err) |
| + } |
| + } |
| + e, err := edge.New(reg, svc) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + server := httptest.NewServer(e) |
| + defer server.Close() |
| + client := &http.Client{Timeout: 10 * time.Second} |
| + get := func(host string) (int, string) { |
| + t.Helper() |
| + r, _ := http.NewRequest(http.MethodGet, server.URL+"/", nil) |
| + r.Host = host |
| + resp, err := client.Do(r) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + defer resp.Body.Close() |
| + b, _ := io.ReadAll(resp.Body) |
| + return resp.StatusCode, string(b) |
| + } |
| + |
| + // Another account's alias, and another app's, on the instance's |
| + // socket: neither wakes it. |
| + for _, other := range []string{"shop.xyz.oncarlos.com", "blog.bab.oncarlos.com"} { |
| + if code, _ := get(other); code == http.StatusOK { |
| + t.Errorf("%s answered 200", other) |
| + } |
| + if inst.running() || svc.Owns(host) || inst.startCount() != 0 { |
| + t.Fatalf("%s woke another tenant's instance", other) |
| + } |
| + } |
| + |
| + // The instance's fence holds for its alias as it does for its host. |
| + gen := uint64(7) |
| + fctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) |
| + defer cancel() |
| + // Nothing was running, so the stop is unproven; the fence is installed. |
| + if _, err := svc.FenceAndStopIfUnfenced(fctx, host, gen); err != nil && !errors.Is(err, activator.ErrStopUnproven) { |
| + t.Fatal(err) |
| + } |
| + ownCode, _ := get(host) |
| + aliasCode, _ := get("shop.bab.oncarlos.com") |
| + if aliasCode != ownCode || ownCode == http.StatusOK || inst.startCount() != 0 { |
| + t.Fatalf("under the fence: host %d, alias %d, starts %d", ownCode, aliasCode, inst.startCount()) |
| + } |
| + if !svc.LiftFence(host, gen) { |
| + t.Fatal("fence not lifted") |
| + } |
| + |
| + // The alias wakes the sleeping instance, once, keyed on its host. |
| + if code, body := get("shop.bab.oncarlos.com"); code != http.StatusOK || body != "awake" { |
| + t.Fatalf("alias: %d %q, want 200 awake", code, body) |
| + } |
| + if !svc.Owns(host) || inst.startCount() != 1 { |
| + t.Fatalf("after the alias: owns %v, starts %d", svc.Owns(host), inst.startCount()) |
| + } |
| + // The instance's own host and the alias share that one wake. |
| + if code, body := get(host); code != http.StatusOK || body != "awake" { |
| + t.Fatalf("host: %d %q", code, body) |
| + } |
| + if code, _ := get("shop.bab.oncarlos.com"); code != http.StatusOK || inst.startCount() != 1 { |
| + t.Fatalf("second alias request: %d, starts %d", code, inst.startCount()) |
| + } |
| + // The app sees the name the browser asked for. |
| + served := inst.served() |
| + if len(served) == 0 || served[0].Host != "shop.bab.oncarlos.com" { |
| + t.Errorf("first request reached the app with Host %v", served) |
| + } |
| + // With the instance awake, another tenant's alias on its socket still |
| + // never reaches it: the edge does not serve it at all. |
| + before := len(inst.served()) |
| + for _, other := range []string{"shop.xyz.oncarlos.com", "blog.bab.oncarlos.com"} { |
| + if code, _ := get(other); code == http.StatusOK { |
| + t.Errorf("%s answered 200 with the instance awake", other) |
| + } |
| + } |
| + if len(inst.served()) != before { |
| + t.Errorf("another tenant's alias reached the awake instance") |
| + } |
| +} |
diff --git a/internal/provision/testdata/plan14-root-reads-alias-wake-338.tsv b/internal/provision/testdata/plan14-root-reads-alias-wake-338.tsv| new file mode 100644 |
| index 000000000..5e2b53621 |
| --- /dev/null |
| +++ b/internal/provision/testdata/plan14-root-reads-alias-wake-338.tsv |
| @@ -0,0 +1,10 @@ |
| +# Census overlay alias-wake-338, written by census-propose (#369). census-ruling-alias-wake-338, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-alias-wake-338.md. |
| +# 1 body, 1 sites, 1 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +# 1 new dispositions: 0 reads re-frozen at their disposition with the claim, 1 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other. |
| +@legacy 50b49b4c666f8ef7da4d351441b1518dfa0ab7022e1a32f0de1c7730257190c9 internal/edge/edge.go Edge.currentHosts legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-alias-wake-338;basis=#338 follow-up: a resolved platform alias (platformAlias) stays in the wildcard parent set as its own row was before; attached hostnames still excluded registry:Platform@123,registry:Provisioned@144,whole:Route@126,whole:Route@147 ca98cb2611a9334a4f42b2dea56f3273f4ee01395657d70a3012891927199354 |
| +@legacy d7aecec81ec29d7e1ef8e63a35a2b5f22f7ec69a6b8c3c0678f1fad0cf2d32c5 internal/edge/platformalias.go platformAliasFold legacy accepted-legacy accepted-legacy;rev3=census-ruling-alias-wake-338;basis=#338 follow-up: from the edge's own registry listing, maps each ready platform alias with a socket to the one ready non-platform, non-sidecar route of the same effective account and app on that socket (sources), or marks it foreign when only another tenant's route holds that socket; reads route columns only, opens nothing registry:Account@362,registry:Account@686,registry:App@241,registry:App@374,registry:App@698,registry:App@734,registry:Host@423,registry:Host@777,registry:Host@853,registry:Platform@210,registry:Platform@555,registry:Socket@256,registry:Socket@381,registry:Socket@442,registry:Socket@569,registry:Socket@705,registry:Socket@831,registry:Status@274,registry:Status@587,whole:Route@196,whole:Route@540 2469d4d74c457bdcd6de221649cf7907c38b2c97cbb2ee7715e219f557020895 |
| +@legacy ae27b00e587f0301bd966c308c3df382475a603eb559970cd23d8f6b4923e4fb internal/edge/edge.go Edge.Reload legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-design-edge-rate-limit-358;basis=each route's upstream entry gains rate: e.parseRateSettings(t), the row's rate_limit column parsed once per reload; the one added site is that whole:Route pass of t (parseRateSettings is a new unit, classified in the decisions overlay); no other read added;rev3=census-ruling-certwarm-wake;basis=the single reload hook call becomes runReloadHooks(), which runs every registered hook in order (#386); no read added, same 57 sites (56 before #358 landed on main);rev3=census-ruling-edge-asset-cache-3;basis=each tenant reverse proxy built in the switch (the tunnel, fleet, socket and TCP arms, every *httputil.ReverseProxy) is installed behind assetScrubbedProxy, which hands the proxy an assetInformationalScrub writer so an app's 1xx (103) loses the asset cache's reserved headers (X-Carlos-Asset-Fill, -Fill-Ack, -Expires, Carlos-Cache) on every local path, as the backhaul already does (final review F6); a type check of the proxy it just built and a wrapper around it; static and status handlers untouched; read sites unchanged (57), offsets moved; no read added;rev3=census-ruling-alias-wake-338;basis=#338 follow-up: after the path fold, a platform alias with a source takes the source's own upstream entry (same proxy, route, hibernating, so the existing activator wake, lease and fence apply) unless it has its own prefix map; a foreign alias is dropped from the map (not served, so not Allowed for ACME either); the attached-hostname fold clears platformAlias registry:Account@19866,registry:Alias@18035,registry:Alias@18122,registry:Alias@18358,registry:FleetBox@5526,registry:Health@7689,registry:Health@7807,registry:Hibernate@13017,registry:Hibernate@14927,registry:Hibernate@6049,registry:Host@13065,registry:Host@14989,registry:Host@15297,registry:Host@15324,registry:Host@16125,registry:Host@16391,registry:Host@18161,registry:Host@6098,registry:Host@8290,registry:Host@8385,registry:Host@8665,registry:Host@8691,registry:Host@8743,registry:Kind@11542,registry:Kind@11564,registry:Kind@12993,registry:Kind@14903,registry:Kind@6025,registry:Kind@8831,registry:Kind@8891,registry:Name@19856,registry:Prefix@16366,registry:Region@2252,registry:Socket@15305,registry:Socket@5633,registry:Socket@6162,registry:Status@1835,registry:Target@16378,registry:Tunnel@4574,registry:Tunnel@4630,registry:Version@11523,registry:Version@11625,whole:Fleet@19806,whole:Fleet@19835,whole:Route@130,whole:Route@15357,whole:Route@15364,whole:Route@15460,whole:Route@17021,whole:Route@4692,whole:Route@5590,whole:Route@6218,whole:Route@648,whole:Route@8808,whole:Route@8881,whole:Route@8941,whole:RouteAlias@18006,whole:RoutePath@16103 aeed86152a343620191525e310ebe9daeb69b9587a466cb20274afae2b38ec57 |
| +internal/edge/edge.go Edge.currentHosts legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-alias-wake-338;basis=#338 follow-up: a resolved platform alias (platformAlias) stays in the wildcard parent set as its own row was before; attached hostnames still excluded registry:Platform@123,registry:Provisioned@144,whole:Route@126,whole:Route@147 ca98cb2611a9334a4f42b2dea56f3273f4ee01395657d70a3012891927199354 |
| +internal/edge/platformalias.go platformAliasFold legacy accepted-legacy accepted-legacy;rev3=census-ruling-alias-wake-338;basis=#338 follow-up: from the edge's own registry listing, maps each ready platform alias with a socket to the one ready non-platform, non-sidecar route of the same effective account and app on that socket (sources), or marks it foreign when only another tenant's route holds that socket; reads route columns only, opens nothing registry:Account@362,registry:Account@686,registry:App@241,registry:App@374,registry:App@698,registry:App@734,registry:Host@423,registry:Host@777,registry:Host@853,registry:Platform@210,registry:Platform@555,registry:Socket@256,registry:Socket@381,registry:Socket@442,registry:Socket@569,registry:Socket@705,registry:Socket@831,registry:Status@274,registry:Status@587,whole:Route@196,whole:Route@540 2469d4d74c457bdcd6de221649cf7907c38b2c97cbb2ee7715e219f557020895 |
| +internal/edge/edge.go Edge.Reload legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-design-edge-rate-limit-358;basis=each route's upstream entry gains rate: e.parseRateSettings(t), the row's rate_limit column parsed once per reload; the one added site is that whole:Route pass of t (parseRateSettings is a new unit, classified in the decisions overlay); no other read added;rev3=census-ruling-certwarm-wake;basis=the single reload hook call becomes runReloadHooks(), which runs every registered hook in order (#386); no read added, same 57 sites (56 before #358 landed on main);rev3=census-ruling-edge-asset-cache-3;basis=each tenant reverse proxy built in the switch (the tunnel, fleet, socket and TCP arms, every *httputil.ReverseProxy) is installed behind assetScrubbedProxy, which hands the proxy an assetInformationalScrub writer so an app's 1xx (103) loses the asset cache's reserved headers (X-Carlos-Asset-Fill, -Fill-Ack, -Expires, Carlos-Cache) on every local path, as the backhaul already does (final review F6); a type check of the proxy it just built and a wrapper around it; static and status handlers untouched; read sites unchanged (57), offsets moved; no read added;rev3=census-ruling-alias-wake-338;basis=#338 follow-up: after the path fold, a platform alias with a source takes the source's own upstream entry (same proxy, route, hibernating, so the existing activator wake, lease and fence apply) unless it has its own prefix map; a foreign alias is dropped from the map (not served, so not Allowed for ACME either); the attached-hostname fold clears platformAlias registry:Account@19866,registry:Alias@18035,registry:Alias@18122,registry:Alias@18358,registry:FleetBox@5526,registry:Health@7689,registry:Health@7807,registry:Hibernate@13017,registry:Hibernate@14927,registry:Hibernate@6049,registry:Host@13065,registry:Host@14989,registry:Host@15297,registry:Host@15324,registry:Host@16125,registry:Host@16391,registry:Host@18161,registry:Host@6098,registry:Host@8290,registry:Host@8385,registry:Host@8665,registry:Host@8691,registry:Host@8743,registry:Kind@11542,registry:Kind@11564,registry:Kind@12993,registry:Kind@14903,registry:Kind@6025,registry:Kind@8831,registry:Kind@8891,registry:Name@19856,registry:Prefix@16366,registry:Region@2252,registry:Socket@15305,registry:Socket@5633,registry:Socket@6162,registry:Status@1835,registry:Target@16378,registry:Tunnel@4574,registry:Tunnel@4630,registry:Version@11523,registry:Version@11625,whole:Fleet@19806,whole:Fleet@19835,whole:Route@130,whole:Route@15357,whole:Route@15364,whole:Route@15460,whole:Route@17021,whole:Route@4692,whole:Route@5590,whole:Route@6218,whole:Route@648,whole:Route@8808,whole:Route@8881,whole:Route@8941,whole:RouteAlias@18006,whole:RoutePath@16103 aeed86152a343620191525e310ebe9daeb69b9587a466cb20274afae2b38ec57 |
| +@coverage internal/edge 3a63e0e4f9b658e43f42abfbbb8661b718be8e647d6f2b74093b1dfdcf871841 |
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv| index 6d87270ab..368b384dc 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-chain.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-chain.tsv |
| @@ -8,3 +8,4 @@ plan14-root-reads-remote-metrics-nested.tsv e923841657499fc729713abdd750cbd2d601 |
| plan14-root-reads-region-ha-p1a.tsv 125c5c411cd0a04000d9652800b51bc7c066081c00753fb1c7b6ee0b6e717dbd |
| plan14-root-reads-nearest-region-b.tsv f4e36134015ec6d09bada7be500c8faad22450afda12d033a8e3e24b1e8bb361 |
| plan14-root-reads-alias-socket-follow-338.tsv 5192052a23d2fdd6f5d48b5617fe28a9bb03458e1e931c060fbdc42c3d627927 |
| +plan14-root-reads-alias-wake-338.tsv 410ee337af4419b4ef7b3e78acee5408ae196d276d4d1f6ac3cde1697c84b7be |