carlos / platform Public

alias-wake-338: Astra round 2, two cuts instead of a third fix

Round 2: round-1 P1s resolved, census approved; one new P1, one P2
carried forward (the asset-resolution family's second round, stopping
rule 2).

- P1 (inherited prefixes vs published ownership): a platform alias keeps
  only its own prefix map and never inherits the instance's, so the
  owner the edges file publishes for it is what it serves. The alias
  never had the instance's map before this branch.
- P2 (assets for a hostname attached to a platform alias): refused up
  front rather than resolved through the alias; such a hostname gets no
  asset block, which is what it got before (the minted row has no
  generation).

Both mutation-checked. Census overlay re-proposed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev 4d364319244579efca26f3ca3e8c86bda578b0d7 parent 76af20e
8 files changed, +117 −20
  • docs/superpowers/notes/census-proposal-alias-wake-338.md +3 −3
  • docs/superpowers/reviews/CODEX-FINDINGS-alias-wake-338-R2.md +43 −0
  • internal/edge/edge.go +9 −9
  • internal/edge/platformalias_test.go +31 −0
  • internal/host/aliaswake_assets_test.go +16 −1
  • internal/host/assetpolicy.go +8 −0
  • internal/provision/testdata/plan14-root-reads-alias-wake-338.tsv +6 −6
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −1
diff --git a/docs/superpowers/notes/census-proposal-alias-wake-338.md b/docs/superpowers/notes/census-proposal-alias-wake-338.md
index 12d02879b..dc1b245e2 100644
--- a/docs/superpowers/notes/census-proposal-alias-wake-338.md
+++ b/docs/superpowers/notes/census-proposal-alias-wake-338.md
@@ -5,8 +5,8 @@ Ruling `census-ruling-alias-wake-338`. The independent reviewer approves or reje
| 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 resolved platform alias takes its source's own upstream entry (same proxy, route, hibernating: the existing activator wake, lease and fence), keeping its own prefix map if it has one; a refused alias, or one whose source has no entry, is dropped from the map (not served, not Allowed); the attached-hostname fold clears platformAlias |
-| `internal/host/assetpolicy.go` `assetInputs.primary` | sites | +whole:Route ×2 | #338 follow-up: a refused platform alias has no primary; a resolved one resolves to its source's row, as the edge serves it |
+| `internal/edge/edge.go` `Edge.Reload` | sites | +whole:Route | #338 follow-up: after the path fold, a resolved platform alias takes its source's own upstream entry (same proxy, route, hibernating: the existing activator wake, lease and fence), keeping its own prefix map (none for a minted apex) and never inheriting the source's (Astra r2 P1); a refused alias, or one whose source has no entry, is dropped from the map (not served, not Allowed); the attached-hostname fold clears platformAlias |
+| `internal/host/assetpolicy.go` `assetInputs.primary` | sites | +whole:Route ×2 | #338 follow-up: a refused platform alias has no primary; a resolved one resolves to its source's row, as the edge serves it; a hostname attached to a platform alias has none (refused, Astra r2 P2) |
| `internal/host/assetpolicy.go` `newAssetInputs` | sites | +whole:Route | #338 follow-up: records edge.PlatformAliasFold over the same routes (platformOf, platformRefused) |
| `internal/host/edgesfile.go` `edgesFileWriteClaims` | sites | +registry:Host, +whole:Route | #338 follow-up: skips publishing a platform alias edge.PlatformAliasFold refuses (and so anything attached to it); reads the same route listing |
@@ -26,6 +26,6 @@ New dispositions, which census-propose wrote and the reviewer checks against the
- 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 ×10; written legacy, accepted-legacy, frozen
-Seal: `5192052a23d2fdd6f5d48b5617fe28a9bb03458e1e931c060fbdc42c3d627927` → `b2d44f5fc354d2c47c91ec55842d1b8f6be0a2913a25157408cb177ed91a67ae`.
+Seal: `5192052a23d2fdd6f5d48b5617fe28a9bb03458e1e931c060fbdc42c3d627927` → `2f20bae6cb9da96cf1f247231d7b529a23828f2b0a74fa2c3bcbe4a7888e0f28`.
Overlay: `internal/provision/testdata/plan14-root-reads-alias-wake-338.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/docs/superpowers/reviews/CODEX-FINDINGS-alias-wake-338-R2.md b/docs/superpowers/reviews/CODEX-FINDINGS-alias-wake-338-R2.md
new file mode 100644
index 000000000..25eda5951
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-FINDINGS-alias-wake-338-R2.md
@@ -0,0 +1,43 @@
+| Round-1 finding | Disposition |
+|---|---|
+| P1: non-ready sources restore direct proxy | **Resolved.** Ownership includes non-ready routes; their aliases are refused ([platformalias.go:46](/home/paulca/amadan.net/carlos/platform-alias-wake/internal/edge/platformalias.go:46)). |
+| P1: alias prefix map disables wake | **Resolved.** The instance’s entry supplies the default backend while the alias retains its prefix map ([edge.go:1038](/home/paulca/amadan.net/carlos/platform-alias-wake/internal/edge/edge.go:1038)). |
+| P2: asset-policy primary disagrees | **Partly resolved.** Direct platform aliases resolve correctly; hostnames attached to them still resolve incorrectly. Carried forward below. |
+| P2: refused aliases remain advertised | **Resolved.** Refused rows are excluded before dependent aliases are published ([edgesfile.go:542](/home/paulca/amadan.net/carlos/platform-alias-wake/internal/host/edgesfile.go:542), [edgesfile.go:645](/home/paulca/amadan.net/carlos/platform-alias-wake/internal/host/edgesfile.go:645)). |
+
+Census verdicts cover root-input authority; they do not clear the behavioral findings below.
+
+| Census item | Verdict and evidence |
+|---|---|
+| `Edge.currentHosts` | **APPROVE.** Preserves platform names without giving attached names wildcard-parent authority ([edge.go:1224](/home/paulca/amadan.net/carlos/platform-alias-wake/internal/edge/edge.go:1224), [edge.go:1071](/home/paulca/amadan.net/carlos/platform-alias-wake/internal/edge/edge.go:1071)). |
+| `Edge.Reload` | **APPROVE.** Reuses existing registry rows and upstreams; adds no privileged input source or root-side operation ([edge.go:1025](/home/paulca/amadan.net/carlos/platform-alias-wake/internal/edge/edge.go:1025)). |
+| `assetInputs.primary` | **APPROVE.** Resolves already-read rows; no new root read. Existing disposition remains appropriate ([assetpolicy.go:261](/home/paulca/amadan.net/carlos/platform-alias-wake/internal/host/assetpolicy.go:261)). |
+| `newAssetInputs` | **APPROVE.** Indexes the existing snapshot through the shared fold ([assetpolicy.go:208](/home/paulca/amadan.net/carlos/platform-alias-wake/internal/host/assetpolicy.go:208)). |
+| `edgesFileWriteClaims` | **APPROVE.** Adds publication filtering over the same listing; retains `authority`, `F,J1`, with no additional root input ([edgesfile.go:534](/home/paulca/amadan.net/carlos/platform-alias-wake/internal/host/edgesfile.go:534)). |
+| `PlatformAliasFold` | **APPROVE.** Reads route fields and builds maps; opens nothing. `legacy` / `accepted-legacy` fits its reads ([platformalias.go:43](/home/paulca/amadan.net/carlos/platform-alias-wake/internal/edge/platformalias.go:43)). |
+| `internal/edge` envelope | **APPROVE.** Reviewed the changed declarations and dispatch consumers. Linux source fingerprint matches the overlay. |
+| `internal/host` envelope | **APPROVE.** Reviewed the changed publication and policy declarations and their consumers. Linux source fingerprint matches the overlay. |
+
+1. **P1 — Inherited prefixes escape the remote door’s app scope.**
+ **Fault family:** published ownership must cover every backend reachable through a hostname.
+
+ A `shop` instance has `/docs → docs-app`; its platform alias has no prefix map of its own. [edge.go:1038](/home/paulca/amadan.net/carlos/platform-alias-wake/internal/edge/edge.go:1038) copies the instance’s map into the alias. However, publication still uses `servedOwners`, which counts only path rows keyed directly on each hostname ([edgesfile.go:158](/home/paulca/amadan.net/carlos/platform-alias-wake/internal/host/edgesfile.go:158), [edgesfile.go:609](/home/paulca/amadan.net/carlos/platform-alias-wake/internal/host/edgesfile.go:609)). The alias is consequently advertised as wholly owned by `shop`.
+
+ A `shop` door caller on another box can request that alias’s `/docs` path: the remote ownership check admits it ([edge.go:1703](/home/paulca/amadan.net/carlos/platform-alias-wake/internal/edge/edge.go:1703)). Only the door flag crosses the hop, not the caller’s identity ([edge.go:3291](/home/paulca/amadan.net/carlos/platform-alias-wake/internal/edge/edge.go:3291)), so the home cannot enforce the final app check and serves `docs-app`, retaining the door’s rate-limit exemption.
+
+ **Fix:** derive published ownership from the same effective default backend and prefix map used by the edge, including attached hostnames. Publish no owner for mixed-app dispatch. Add a two-edge door test proving the other app is never reached.
+
+2. **P2 — Attached hostnames still miss platform-alias asset resolution.**
+ **Fault family:** cache policy and dispatch must identify the same primary. **Carried forward from round 1.**
+
+ For `www.example → platform-alias → instance`, the new checks resolve only the initially requested hostname. The attached-alias arm then returns `in.byHost[ph]` directly ([assetpolicy.go:265](/home/paulca/amadan.net/carlos/platform-alias-wake/internal/host/assetpolicy.go:265), [assetpolicy.go:272](/home/paulca/amadan.net/carlos/platform-alias-wake/internal/host/assetpolicy.go:272)). Policy therefore selects the platform row, while dispatch selects the instance.
+
+ Ordinary minted platform rows lack `AssetGen`, so caching is refused. Even with metadata, the primary comparison fails ([assetcatch.go:245](/home/paulca/amadan.net/carlos/platform-alias-wake/internal/edge/assetcatch.go:245)); local caching and acknowledged remote fills remain unavailable.
+
+ **Fix:** resolve the attached target through the platform fold, preserving refusal and intermediate prefix-map exclusions. Test fill followed by hit through an attached hostname. This family recurs in rounds 1 and 2: under stopping rule 2, choose an explicit refusal, remove this caching case, or centralize complete resolution with a guard test. I recommend centralizing it.
+
+No P3 findings.
+
+Reviewed `76af20e0274f925ee521e1d7667eec388eed024b` using `git diff origin/main...HEAD`. All six function digests, frozen-row fingerprints, both envelopes and the chain seal match. Changed Go files are formatted. Targeted tests could not start because Go’s build directory was blocked by the read-only sandbox; runtime and mutation-test results remain unverified. No files changed.
+
+NOT READY
\ No newline at end of file
diff --git a/internal/edge/edge.go b/internal/edge/edge.go
index 9a4695ace..bb2b1ced1 100644
--- a/internal/edge/edge.go
+++ b/internal/edge/edge.go
@@ -1016,12 +1016,14 @@ func (e *Edge) Reload() error {
// shares one ready 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
- // that map over the instance's entry, so its default backend is still
- // the instance's. A refused alias, or one whose instance has no entry
- // here, is not served: never a direct proxy around the instance.
+ // lease. Before the attached-hostname fold so a hostname attached to the
+ // alias inherits the result. The alias keeps its OWN prefix map (none
+ // for a minted apex) and never inherits the instance's: the edges file
+ // publishes a hostname's owner from its own path rows (servedOwners),
+ // so an inherited map would let a door caller of one app reach another
+ // app's target through the alias (Astra r2 P1). A refused alias, or one
+ // whose instance has no entry here, is not served: never a direct proxy
+ // around the instance.
sources, refused := PlatformAliasFold(routes)
for host := range refused {
if _, ok := m[host]; ok {
@@ -1040,9 +1042,7 @@ func (e *Edge) Reload() error {
delete(m, host)
continue
}
- if own.paths != nil {
- up.paths = own.paths
- }
+ up.paths = own.paths
up.alias, up.platformAlias = true, true
m[host] = up
}
diff --git a/internal/edge/platformalias_test.go b/internal/edge/platformalias_test.go
index 1c9c9b3b7..a6832fdbc 100644
--- a/internal/edge/platformalias_test.go
+++ b/internal/edge/platformalias_test.go
@@ -120,3 +120,34 @@ func TestPlatformAliasKeepsItsOwnPrefixMap(t *testing.T) {
t.Errorf("the alias's prefix map leaked onto the instance: %v", m["a.abc.oncarlos.com"].paths)
}
}
+
+// An alias never inherits its instance's prefix map (Astra r2 P1): the
+// published owner of a hostname is read from its own path rows, so an
+// inherited map would route one app's door caller to another app.
+func TestPlatformAliasDoesNotInheritTheInstancesPrefixMap(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: "docs.abc.oncarlos.com", Kind: "service", Account: "abc", App: "docs", Addr: "127.0.0.1:1", Status: "ready"},
+ } {
+ if err := reg.Upsert(rt); err != nil {
+ t.Fatal(err)
+ }
+ }
+ if err := reg.UpsertPath(registry.RoutePath{Host: "a.abc.oncarlos.com", Prefix: "docs", Target: "docs.abc.oncarlos.com"}); err != nil {
+ t.Fatal(err)
+ }
+ e, err := New(reg, &routeRecordingActivator{})
+ if err != nil {
+ t.Fatal(err)
+ }
+ m := e.current()
+ if m["a.abc.oncarlos.com"].paths["docs"] == "" {
+ t.Fatal("fixture: the instance has no prefix map")
+ }
+ up := m["shop.abc.oncarlos.com"]
+ if up.paths != nil || up.proxy != m["a.abc.oncarlos.com"].proxy {
+ t.Errorf("alias = paths %v, instance proxy %v; want no prefix map over the instance's entry", up.paths, up.proxy == m["a.abc.oncarlos.com"].proxy)
+ }
+}
diff --git a/internal/host/aliaswake_assets_test.go b/internal/host/aliaswake_assets_test.go
index 18a533913..452a7ac8d 100644
--- a/internal/host/aliaswake_assets_test.go
+++ b/internal/host/aliaswake_assets_test.go
@@ -21,7 +21,9 @@ func TestPlatformAliasPublicationFollowsTheEdgesRule(t *testing.T) {
w.instance(inst, assetGen1, "v1")
sock := "/run/carlos/" + inst + ".sock"
for _, rt := range []registry.Route{
- {Host: "shop.abc.example.com", Kind: "instance", Account: "abc", App: "shop", Platform: true, Status: "ready", Socket: sock},
+ // The alias row carries a build and generation of its own, so a hostname
+ // attached to it would be given one if it resolved to this row.
+ {Host: "shop.abc.example.com", Kind: "instance", Account: "abc", App: "shop", Platform: true, Status: "ready", Socket: sock, AssetGen: assetGen1, Version: "v1"},
{Host: "shop.xyz.example.com", Kind: "instance", Account: "xyz", App: "shop", Platform: true, Status: "ready", Socket: sock},
} {
if err := w.reg.Upsert(rt); err != nil {
@@ -43,6 +45,19 @@ func TestPlatformAliasPublicationFollowsTheEdgesRule(t *testing.T) {
if _, ok := w.policy.For("shop.xyz.example.com"); ok {
t.Error("another account's alias was given assets")
}
+ // A hostname attached to the platform alias is refused, not cached
+ // through it (Astra r2 P2, refused up front).
+ if err := w.reg.UpsertAlias(registry.RouteAlias{Alias: "www.shop.example", Host: "shop.abc.example.com", Account: "abc", App: "shop"}); err != nil {
+ t.Fatal(err)
+ }
+ if err := w.reg.SetAliasDNSStatus("www.shop.example", "pointing", assetT0.Unix()); err != nil {
+ t.Fatal(err)
+ }
+ hosts = w.hosts()
+ wantNoAssets(t, hosts, "www.shop.example")
+ if _, ok := w.policy.For("www.shop.example"); ok {
+ t.Error("a hostname attached to a platform alias was given assets")
+ }
// The instance leaves ready: its alias stops being advertised with it.
if err := w.reg.SetStatus(inst, "moving"); err != nil {
diff --git a/internal/host/assetpolicy.go b/internal/host/assetpolicy.go
index 10fabb7e0..de306cf0e 100644
--- a/internal/host/assetpolicy.go
+++ b/internal/host/assetpolicy.go
@@ -270,6 +270,14 @@ func (in assetInputs) primary(host string) (registry.Route, bool) {
return r, true
}
if ph, ok := in.aliasOf[host]; ok {
+ // A hostname attached to a platform alias is refused, not resolved
+ // through it: the cache never holds it (Astra r2 P2, stopping rule 2:
+ // refused up front rather than a third resolution fix). The minted
+ // apex row carries no asset generation, so this is what it got
+ // before platform aliases were folded.
+ if _, viaPlatform := in.platformOf[ph]; viaPlatform || in.platformRefused[ph] {
+ return registry.Route{}, false
+ }
r, ok := in.byHost[ph]
return r, ok
}
diff --git a/internal/provision/testdata/plan14-root-reads-alias-wake-338.tsv b/internal/provision/testdata/plan14-root-reads-alias-wake-338.tsv
index d95323690..1bdff7061 100644
--- a/internal/provision/testdata/plan14-root-reads-alias-wake-338.tsv
+++ b/internal/provision/testdata/plan14-root-reads-alias-wake-338.tsv
@@ -3,14 +3,14 @@
# 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 830ca468138fa214556ed707b67fdec08b6746a072e7a6d665c666360b1f090a internal/edge/platformalias.go PlatformAliasFold legacy accepted-legacy accepted-legacy;rev3=census-ruling-alias-wake-338;basis=#338 follow-up (renamed from platformAliasFold, exported for the publisher and asset policy): from a 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), else refuses it when its socket has any owner (its own tenant's not ready or ambiguous, or another tenant's); reads route columns only, opens nothing registry:Account@343,registry:Account@656,registry:App@245,registry:App@355,registry:App@668,registry:App@704,registry:Host@773,registry:Host@783,registry:Host@845,registry:Platform@214,registry:Platform@527,registry:Socket@260,registry:Socket@362,registry:Socket@414,registry:Socket@541,registry:Socket@675,registry:Socket@823,registry:Status@559,registry:Status@736,whole:Route@200,whole:Route@374,whole:Route@393,whole:Route@404,whole:Route@512,whole:Route@606,whole:Route@723,whole:Route@736,whole:Route@783,whole:Route@806 a18e4963cf88320ef3fb94b666b02838dc12cc3e9b2df3f2cbe2576ca682735f
-@legacy e79a1e502c75ba00552231c94d5a5286f74c102b009c3738d3a3d183a096b522 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 resolved platform alias takes its source's own upstream entry (same proxy, route, hibernating: the existing activator wake, lease and fence), keeping its own prefix map if it has one; a refused alias, or one whose source has no entry, is dropped from the map (not served, not Allowed); the attached-hostname fold clears platformAlias registry:Account@20101,registry:Alias@18270,registry:Alias@18357,registry:Alias@18593,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@18396,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@20091,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@20041,whole:Fleet@20070,whole:Route@130,whole:Route@15357,whole:Route@15364,whole:Route@15460,whole:Route@17162,whole:Route@4692,whole:Route@5590,whole:Route@6218,whole:Route@648,whole:Route@8808,whole:Route@8881,whole:Route@8941,whole:RouteAlias@18241,whole:RoutePath@16103 46144861ccd1f5bc29ed968f475eaa39082c39d522930a7119ae7810bf4f998c
-@legacy d23c6f92cc700f29435b0af46e92957dc62643d7284f410e9eab710a4e5624f5 internal/host/assetpolicy.go assetInputs.primary legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-asset-cache-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), in the edges file loop (edgesFileLoop, edgesFileWriteClaims), only on a box armed with CARLOS_ASSET_CACHE=1 (armAssetPolicy answers nil otherwise): resolves a hostname to its route row or, for an exact alias, its primary's, over rows already read; reads nothing itself; no root pass calls it; no root decision;rev3=census-ruling-alias-wake-338;basis=#338 follow-up: a refused platform alias has no primary; a resolved one resolves to its source's row, as the edge serves it whole:Route@190,whole:Route@211,whole:Route@236,whole:Route@264,whole:Route@326,whole:Route@346 855f8f6e91e6f313186c39360efde17c472fb30a1bf2b689a93b51c42d9e3edc
+@legacy 0b78ae5838265ecfdf8817d80ab707a3d44c6fc50ee7d374ac140fb097dcd591 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 resolved platform alias takes its source's own upstream entry (same proxy, route, hibernating: the existing activator wake, lease and fence), keeping its own prefix map (none for a minted apex) and never inheriting the source's (Astra r2 P1); a refused alias, or one whose source has no entry, is dropped from the map (not served, not Allowed); the attached-hostname fold clears platformAlias registry:Account@20179,registry:Alias@18348,registry:Alias@18435,registry:Alias@18671,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@18474,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@20169,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@20119,whole:Fleet@20148,whole:Route@130,whole:Route@15357,whole:Route@15364,whole:Route@15460,whole:Route@17269,whole:Route@4692,whole:Route@5590,whole:Route@6218,whole:Route@648,whole:Route@8808,whole:Route@8881,whole:Route@8941,whole:RouteAlias@18319,whole:RoutePath@16103 92d3dc52f9638ec6d4142762e815ab6799071ee43e36744edec87cd6081bea10
+@legacy 1acf1712972cf57058153c598e807202c734dc347425b0e61660cce48727cc1d internal/host/assetpolicy.go assetInputs.primary legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-asset-cache-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), in the edges file loop (edgesFileLoop, edgesFileWriteClaims), only on a box armed with CARLOS_ASSET_CACHE=1 (armAssetPolicy answers nil otherwise): resolves a hostname to its route row or, for an exact alias, its primary's, over rows already read; reads nothing itself; no root pass calls it; no root decision;rev3=census-ruling-alias-wake-338;basis=#338 follow-up: a refused platform alias has no primary; a resolved one resolves to its source's row, as the edge serves it; a hostname attached to a platform alias has none (refused, Astra r2 P2) whole:Route@190,whole:Route@211,whole:Route@236,whole:Route@264,whole:Route@767,whole:Route@787 ab10026a614763331fb3c9b8bf66f0795b132b4dd3465512638fec7771f51fae
@legacy 1a9bb53143c27a675bcaf1b5683f6be5de1c5dc1e0d367bc3f7d9c144f49671f internal/host/assetpolicy.go newAssetInputs legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-asset-cache-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), in the edges file loop (edgesFileLoop, edgesFileWriteClaims), only on a box armed with CARLOS_ASSET_CACHE=1 (armAssetPolicy answers nil otherwise): indexes rows already read (routes by host, exact aliases to their primary, hosts with path rows) and the owners (servedOwners when not handed them); reads nothing itself; no root pass calls it; no root decision;rev3=census-ruling-alias-wake-338;basis=#338 follow-up: records edge.PlatformAliasFold over the same routes (platformOf, platformRefused) registry:Alias@685,registry:Alias@720,registry:Alias@766,registry:Host@576,registry:Host@633,registry:Host@777,whole:Route@195,whole:Route@239,whole:Route@528,whole:Route@555,whole:Route@569,whole:Route@586,whole:Route@837,whole:RouteAlias@670,whole:RoutePath@610,whole:RoutePath@853 54c90ae15c22220b05121ba828a4a7c7be5c8a990d585bbe88900caaf319225d
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 (renamed from platformAliasFold, exported for the publisher and asset policy): from a 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), else refuses it when its socket has any owner (its own tenant's not ready or ambiguous, or another tenant's); reads route columns only, opens nothing registry:Account@343,registry:Account@656,registry:App@245,registry:App@355,registry:App@668,registry:App@704,registry:Host@773,registry:Host@783,registry:Host@845,registry:Platform@214,registry:Platform@527,registry:Socket@260,registry:Socket@362,registry:Socket@414,registry:Socket@541,registry:Socket@675,registry:Socket@823,registry:Status@559,registry:Status@736,whole:Route@200,whole:Route@374,whole:Route@393,whole:Route@404,whole:Route@512,whole:Route@606,whole:Route@723,whole:Route@736,whole:Route@783,whole:Route@806 a18e4963cf88320ef3fb94b666b02838dc12cc3e9b2df3f2cbe2576ca682735f
-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 resolved platform alias takes its source's own upstream entry (same proxy, route, hibernating: the existing activator wake, lease and fence), keeping its own prefix map if it has one; a refused alias, or one whose source has no entry, is dropped from the map (not served, not Allowed); the attached-hostname fold clears platformAlias registry:Account@20101,registry:Alias@18270,registry:Alias@18357,registry:Alias@18593,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@18396,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@20091,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@20041,whole:Fleet@20070,whole:Route@130,whole:Route@15357,whole:Route@15364,whole:Route@15460,whole:Route@17162,whole:Route@4692,whole:Route@5590,whole:Route@6218,whole:Route@648,whole:Route@8808,whole:Route@8881,whole:Route@8941,whole:RouteAlias@18241,whole:RoutePath@16103 46144861ccd1f5bc29ed968f475eaa39082c39d522930a7119ae7810bf4f998c
-internal/host/assetpolicy.go assetInputs.primary legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-asset-cache-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), in the edges file loop (edgesFileLoop, edgesFileWriteClaims), only on a box armed with CARLOS_ASSET_CACHE=1 (armAssetPolicy answers nil otherwise): resolves a hostname to its route row or, for an exact alias, its primary's, over rows already read; reads nothing itself; no root pass calls it; no root decision;rev3=census-ruling-alias-wake-338;basis=#338 follow-up: a refused platform alias has no primary; a resolved one resolves to its source's row, as the edge serves it whole:Route@190,whole:Route@211,whole:Route@236,whole:Route@264,whole:Route@326,whole:Route@346 855f8f6e91e6f313186c39360efde17c472fb30a1bf2b689a93b51c42d9e3edc
+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 resolved platform alias takes its source's own upstream entry (same proxy, route, hibernating: the existing activator wake, lease and fence), keeping its own prefix map (none for a minted apex) and never inheriting the source's (Astra r2 P1); a refused alias, or one whose source has no entry, is dropped from the map (not served, not Allowed); the attached-hostname fold clears platformAlias registry:Account@20179,registry:Alias@18348,registry:Alias@18435,registry:Alias@18671,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@18474,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@20169,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@20119,whole:Fleet@20148,whole:Route@130,whole:Route@15357,whole:Route@15364,whole:Route@15460,whole:Route@17269,whole:Route@4692,whole:Route@5590,whole:Route@6218,whole:Route@648,whole:Route@8808,whole:Route@8881,whole:Route@8941,whole:RouteAlias@18319,whole:RoutePath@16103 92d3dc52f9638ec6d4142762e815ab6799071ee43e36744edec87cd6081bea10
+internal/host/assetpolicy.go assetInputs.primary legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-asset-cache-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), in the edges file loop (edgesFileLoop, edgesFileWriteClaims), only on a box armed with CARLOS_ASSET_CACHE=1 (armAssetPolicy answers nil otherwise): resolves a hostname to its route row or, for an exact alias, its primary's, over rows already read; reads nothing itself; no root pass calls it; no root decision;rev3=census-ruling-alias-wake-338;basis=#338 follow-up: a refused platform alias has no primary; a resolved one resolves to its source's row, as the edge serves it; a hostname attached to a platform alias has none (refused, Astra r2 P2) whole:Route@190,whole:Route@211,whole:Route@236,whole:Route@264,whole:Route@767,whole:Route@787 ab10026a614763331fb3c9b8bf66f0795b132b4dd3465512638fec7771f51fae
internal/host/assetpolicy.go newAssetInputs legacy accepted-legacy accepted-legacy;rev3=census-ruling-edge-asset-cache-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), in the edges file loop (edgesFileLoop, edgesFileWriteClaims), only on a box armed with CARLOS_ASSET_CACHE=1 (armAssetPolicy answers nil otherwise): indexes rows already read (routes by host, exact aliases to their primary, hosts with path rows) and the owners (servedOwners when not handed them); reads nothing itself; no root pass calls it; no root decision;rev3=census-ruling-alias-wake-338;basis=#338 follow-up: records edge.PlatformAliasFold over the same routes (platformOf, platformRefused) registry:Alias@685,registry:Alias@720,registry:Alias@766,registry:Host@576,registry:Host@633,registry:Host@777,whole:Route@195,whole:Route@239,whole:Route@528,whole:Route@555,whole:Route@569,whole:Route@586,whole:Route@837,whole:RouteAlias@670,whole:RoutePath@610,whole:RoutePath@853 54c90ae15c22220b05121ba828a4a7c7be5c8a990d585bbe88900caaf319225d
internal/host/edgesfile.go edgesFileWriteClaims authority F,J1 rev3=census-ruling-self-serve-moves-1;basis=root-route;kept=F;scope=protected-decision-only; the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): region-ha-2a's body, which with the box's lifetimes switch on also publishes each served row's lifetime pair (registry:Incarnation and registry:ServingSeq, two new sites on the rows it already lists) and an alias's or served catch-all's primary's pair, and names that primary as target_host whatever the switch; a report the edge orders unstamped entries by, not a decision; no record, /data, release or claim read added; F,J1 authority retained; self-serve moves 1 Task 8;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Task 8: takes a localAddrs reader (instancectl.LocalAddresses in production, which reads /proc/net/fib_trie and /proc/net/if_inet6 in the agent) and publishes its non-loopback entries as the edges file's addrs before the write gate (boxAddrs, no read of its own), so an address change writes once. The same 44 sites, offsets moved; no record, /data, release or claim read added; a report the console's egress grant check reads, not a root decision; F,J1 authority retained.;rev3=census-ruling-edge-asset-cache-3;basis=starts with assets = assets.active(), so a policy whose box has not opened its asset store publishes no assets blocks and reads no manifests, and copies the decision's Primary (the route host the block was decided for, drift D4) into the published assets block; read sites unchanged (44); no read added. Merged onto main's #328 body, which takes the localAddrs reader: the assets.active() line sits after that signature and the loop passes pub and instancectl.LocalAddresses;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: the claims argument (*edgesClaims) becomes addrs (AddressSource) and the applyEdgesClaims(ctx, claims, routes, hosts) call is deleted with edgesclaims.go, which is the one whole:Route site removed: no host claim is read and every served row publishes as with region HA off; the box-address publication is the same code reading addrs.BoxAddresses() instead of claims.addrs; a report the edge reads, not a root decision; no read added; merge of origin/main d7ae1d76: main's edge asset cache plan 3 body is kept (census-ruling-edge-asset-cache-3): the first line is assets = assets.active(), so a policy whose store has not opened publishes no assets blocks and reads no manifests, and edgesFileLoop passes pub (assets.active() for that tick) in the assets argument; main's claims *edgesClaims argument is this branch's addrs AddressSource, and no edgesClaims, applyEdgesClaims or hostclaim reference remains;rev3=census-ruling-alias-wake-338;basis=#338 follow-up: skips publishing a platform alias edge.PlatformAliasFold refuses (and so anything attached to it); reads the same route listing registry:Account@12119,registry:Alias@6067,registry:Alias@6102,registry:Alias@6524,registry:Alias@6681,registry:Alias@6751,registry:Alias@6783,registry:Alias@7456,registry:Alias@9811,registry:App@12131,registry:DNSStatus@6199,registry:DNSStatus@6690,registry:Host@10039,registry:Host@1068,registry:Host@11549,registry:Host@3905,registry:Host@6159,registry:Host@7004,registry:Host@7440,registry:Host@7613,registry:Host@9858,registry:Host@9905,registry:Host@9955,registry:Host@9990,registry:Incarnation@3865,registry:Platform@3644,registry:Provisioned@3658,registry:Replica@3682,registry:ServingSeq@3880,registry:Status@1611,whole:Route@1012,whole:Route@1039,whole:Route@13214,whole:Route@13640,whole:Route@13815,whole:Route@4275,whole:Route@750,whole:RouteAlias@13236,whole:RouteAlias@13830,whole:RouteAlias@6052,whole:RouteAlias@9764,whole:RoutePath@13229,whole:RoutePath@13823,whole:RoutePath@4290,whole:WildcardDomain@9944 e75a5d7aacc51670ce9506f9301600c8a2bcfa3340825de0cc5b1b89ec8b5508
-@coverage internal/edge 956fa8e246ca8b11f05fbb2e0db708317b9ee58c20464800f075da720fe702fd
-@coverage internal/host 66d7da5192204f380d0e8cef9a5b969aa40d9191d27157382898991bf34c2c8b
+@coverage internal/edge eb3743f07bd5cd8394b4e9dfff5931bff9099e51362687f1e9c88baf716404de
+@coverage internal/host 25f86e4ab400612fe7948bb451a66c0e857c143d41a5fa261fa18661ea81d542
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index c231f2b56..39d84d8a6 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -8,4 +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 b2d44f5fc354d2c47c91ec55842d1b8f6be0a2913a25157408cb177ed91a67ae
+plan14-root-reads-alias-wake-338.tsv 2f20bae6cb9da96cf1f247231d7b529a23828f2b0a74fa2c3bcbe4a7888e0f28