carlos / platform Public

fix(edge): hold every closed box name without route authority

Use one held-name helper for every publication class. Keep holds out of
fleet deployment routes and alias suppression, and stop catch-all fallback.
Guard publisher and dispatch behavior across all name classes and box states,
including a decoder-field inventory. Refresh the root-read census proposal.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev eb3098a1c154510575ff4689043caaa26af9b3f5 parent 53a53e4
14 files changed, +464 −83
  • docs/superpowers/notes/census-proposal-region-ha-p3a.md +3 −3
  • docs/superpowers/notes/census-region-ha-p3a-claims.tsv +2 −2
  • internal/edge/boxroles_test.go +8 −2
  • internal/edge/edge.go +2 −1
  • internal/edge/held_names_test.go +164 −0
  • internal/edge/homemap.go +18 −29
  • internal/edgesfile/admission.go +23 −9
  • internal/edgesfile/homeelect.go +7 −20
  • internal/edgesfile/testdata/held-names.json +84 −0
  • internal/host/boxroles.go +2 −8
  • internal/host/boxroles_test.go +2 −2
  • internal/host/held_names_test.go +142 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −1
  • internal/provision/testdata/plan14-root-reads-region-ha-p3a.tsv +6 −6

Intent

Human

<task-notification> <task-id>bm1rw792p</task-id> <tool-use-id>toolu_019B9VCEQEZhBPds8JTd6Zym</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/6cb8c43c-d494-478a-8f04-1067486903df/tasks/bm1rw792p.output</output-file> <status>completed</status> <summary>Background command "W=/home/paulca/amadan.net/carlos/platform/.claude/worktrees/region-ha-p3/.superpowers/sdd/2026-11-03-region-ha-p3a; sleep 20; while true; do if [ -s $W/task-copy-astra-a.md ]; then cat $W/task-copy-astra-a.md; exit 0; fi; if ! pgrep -f "task-copy-astra-a.md" &gt;/dev/null; then echo DEAD; tail -c 400 $W/task-copy-astra-a.log; exit 1; fi; sleep 45; done" completed (exit code 0)</summary> </task-notification>

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

diff --git a/docs/superpowers/notes/census-proposal-region-ha-p3a.md b/docs/superpowers/notes/census-proposal-region-ha-p3a.md
index 682dc025f..b96219208 100644
--- a/docs/superpowers/notes/census-proposal-region-ha-p3a.md
+++ b/docs/superpowers/notes/census-proposal-region-ha-p3a.md
@@ -10,7 +10,7 @@ Ruling `census-ruling-region-ha-p3a`. The independent reviewer approves or rejec
| `internal/activator/rootfsworkers.go` `Service.installRootfsWorkerLocked` | body | unchanged (1) | P3a Task 3: add/recheck the local start prohibition on generation, worker, sidecar, command or root-control launch, including retained leases; preserve existing lease/ownership checks and fixed-unit exemptions. Whole Route passes to the in-memory predicate; no new filesystem/store read. |
| `internal/edge/edge.go` `RunWithActivatorReady` | body | unchanged (5) | P3a Task 3: invoke the local admission Close before HTTP/HTTPS draining and door shutdown in both dev and normal listeners; existing reads unchanged. |
| `internal/host/agent.go` `fastTick` | body | unchanged (1) | Run the optional desired-role reader on the existing tick after observing the armed change index; no new root path or timer, nil reader is unchanged. |
-| `internal/host/edgesfile.go` `edgesFileWriteClaims` | body | unchanged (65) | Publish one injected role snapshot; preserve the real-route bit separately from wildcard/platform class during booting withdrawal; acknowledge the exact published role/admitted/drained tuple only after PUT; existing registry reads unchanged. |
+| `internal/host/edgesfile.go` `edgesFileWriteClaims` | body | unchanged (65) | Publish one injected role snapshot; hold every published name during booting withdrawal, with held separate from route provenance and wildcard/platform class; held names grant no deployment-route authority; acknowledge the exact published role/admitted/drained tuple only after PUT; existing registry reads unchanged. |
| `internal/activator/activator.go` `Service.WakeWorker` | sites | +whole:Route ×2 | P3a Task 3: check local tenant admission and start permission before lease/restore, preserving already-awake reuse during drain and existing serialization. Whole Route passes to the local predicate; no new filesystem or store read. |
| `internal/activator/activator.go` `Service.begin` | sites | +whole:Route ×3 | P3a Task 3: check local tenant admission and start permission before lease/restore, preserving already-awake reuse during drain and existing serialization. Whole Route passes to the local predicate; no new filesystem or store read. |
| `internal/activator/activator.go` `Service.doWakeOnce` | sites | +whole:Route ×2 | P3a Task 3: check local tenant admission and start permission before lease/restore, preserving already-awake reuse during drain and existing serialization. Whole Route passes to the local predicate; no new filesystem or store read. |
@@ -32,7 +32,7 @@ Ruling `census-ruling-region-ha-p3a`. The independent reviewer approves or rejec
| `internal/activator/genservice.go` `Service.startGenExe` | sites | +whole:Route | P3a Task 3: add/recheck the local start prohibition on generation, worker, sidecar, command or root-control launch, including retained leases; preserve existing lease/ownership checks and fixed-unit exemptions. Whole Route passes to the in-memory predicate; no new filesystem/store read. |
| `internal/activator/hawake.go` `ExecBackend.haSpawnGate` | sites | +whole:Route | P3a Task 3: add/recheck the local start prohibition on generation, worker, sidecar, command or root-control launch, including retained leases; preserve existing lease/ownership checks and fixed-unit exemptions. Whole Route passes to the in-memory predicate; no new filesystem/store read. |
| `internal/activator/workerbuild.go` `Service.startWorker` | sites | +whole:Route | P3a Task 3: add/recheck the local start prohibition on generation, worker, sidecar, command or root-control launch, including retained leases; preserve existing lease/ownership checks and fixed-unit exemptions. Whole Route passes to the in-memory predicate; no new filesystem/store read. |
-| `internal/edge/edge.go` `Edge.ServeHTTP` | sites | +whole:Route ×2 | Refuse a reserved exact hostname with no serving peer before a local or remote catch-all can handle it; one snapshot supplies the reservation and dial decision; no new read or forwarding authority. P3a Task 3: refuse a managed tenant before forwarding, geo/proof preparation and dispatch; recheck the route after login next-path resolution. Only the fixed platform/unit scope is exempt. Whole Route passes to a local permission check, not a new store/path read. |
+| `internal/edge/edge.go` `Edge.ServeHTTP` | sites | +whole:Route ×2 | Refuse every held name class with no serving peer, including held wildcard children, before a local or remote catch-all can handle it; one snapshot supplies the reservation and dial decision; no new read or forwarding authority. P3a Task 3: refuse a managed tenant before forwarding, geo/proof preparation and dispatch; recheck the route after login next-path resolution. Only the fixed platform/unit scope is exempt. Whole Route passes to a local permission check, not a new store/path read. |
| `internal/host/agent.go` `runAgent` | sites | -whole:Route | P3a Task 3: install closed fixed admission before every launch source, bind activator/backend and edge, wire the real termination Started lifecycle and role reader after the change index; close before cancellation/child shutdown. Existing reads unchanged; no new cloud authority. Fix R1: move bind/lifecycle/edge-option wiring into wireAgentAdmission and worker listing into runWorkerBootPassAfterAdmission. Worker boot waits for admission before listing then uses unchanged bounded wakes and per-host serialization; whole Route read moves to the helper. No new storage, cloud, or root execution authority. |
| `internal/host/schedule_wiring.go` `newScheduleDeps` | sites | +whole:Route ×4 | P3a Task 3 fix R1: defer timers while local admission is closed, before token mint or attempt bookkeeping; translate an admission refusal from WithDuty into ErrDutyDeferred. Four whole Route predicate uses check existing fixed-route exemptions or pass the same row to WithDuty; no new external read or start authority. |
@@ -106,6 +106,6 @@ New dispositions, which census-propose wrote and the reviewer checks against the
- new `internal/host/memwatch.go:memwatchLoop`: reads +file:CommandContext; written legacy, accepted-legacy, frozen
- reads `internal/activator/backend_exec.go:ExecBackend.nestedReady`: +whole:Route; keeps legacy, task accepted-legacy
-Seal: `c68e2453bfc8afaf3794eb4c08850428982fa6954269b6b99bddfda4e6242929` → `2dcba62c7ed40c6c548bfb5a510d489d1d5a0ba5595fcbea46f15659a91e9355`.
+Seal: `c68e2453bfc8afaf3794eb4c08850428982fa6954269b6b99bddfda4e6242929` → `754722950bfe1ee96603aa373d2fa272585e17e39a70a221fb6f8cebf0e6bca6`.
Overlay: `internal/provision/testdata/plan14-root-reads-region-ha-p3a.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/docs/superpowers/notes/census-region-ha-p3a-claims.tsv b/docs/superpowers/notes/census-region-ha-p3a-claims.tsv
index d122dd9e4..f0f8c7de9 100644
--- a/docs/superpowers/notes/census-region-ha-p3a-claims.tsv
+++ b/docs/superpowers/notes/census-region-ha-p3a-claims.tsv
@@ -9,11 +9,11 @@ infra/modules/region-host/ingress/variables.tf:external Add ingress-only inputs
infra/modules/region-host/ingress/versions.tf:external Declare OpenTofu and AWS provider requirements for the isolated ingress child; no root runtime reads.
infra/modules/region-host/tests/fixed_state_unchanged.tftest.hcl:external Add mock regression for the unchanged fixed instance/profile/SG/root-volume wiring and legacy outputs; no root runtime reads.
internal/host/agent.go:fastTick Run the optional desired-role reader on the existing tick after observing the armed change index; no new root path or timer, nil reader is unchanged.
-internal/host/edgesfile.go:edgesFileWriteClaims Publish one injected role snapshot; preserve the real-route bit separately from wildcard/platform class during booting withdrawal; acknowledge the exact published role/admitted/drained tuple only after PUT; existing registry reads unchanged.
+internal/host/edgesfile.go:edgesFileWriteClaims Publish one injected role snapshot; hold every published name during booting withdrawal, with held separate from route provenance and wildcard/platform class; held names grant no deployment-route authority; acknowledge the exact published role/admitted/drained tuple only after PUT; existing registry reads unchanged.
internal/boxroles/roles.go:Read Two point GETs of validated own and canonical-region desired-role keys; strict bounded parsing, errors never default to serve; no filesystem read or root authority grant.
internal/host/boxroles.go:boxRoleReader.pass Apply successful two-GET roles even while the watch is unusable; preserve restrictions and close starts on failed reads/application; retain one jittered ReadGate and bounded retry backoff through watch failure; throttle failure logs; no filesystem read.
internal/host/boxroles_config_linux.go:readRoleRegionConfig Read the fixed operator-delivered /etc/carlos/region-config.json through no-symlink openat2, fstat root ownership/regular-file/non-writable checks, single-link check and 4097-byte limited read; validate explicit canonical code and unchanged raw placement, never infer from AWS.
-internal/edge/edge.go:Edge.ServeHTTP Refuse a reserved exact hostname with no serving peer before a local or remote catch-all can handle it; one snapshot supplies the reservation and dial decision; no new read or forwarding authority. P3a Task 3: refuse a managed tenant before forwarding, geo/proof preparation and dispatch; recheck the route after login next-path resolution. Only the fixed platform/unit scope is exempt. Whole Route passes to a local permission check, not a new store/path read.
+internal/edge/edge.go:Edge.ServeHTTP Refuse every held name class with no serving peer, including held wildcard children, before a local or remote catch-all can handle it; one snapshot supplies the reservation and dial decision; no new read or forwarding authority. P3a Task 3: refuse a managed tenant before forwarding, geo/proof preparation and dispatch; recheck the route after login next-path resolution. Only the fixed platform/unit scope is exempt. Whole Route passes to a local permission check, not a new store/path read.
internal/activator/activator.go:Service.serveWakeError P3a Task 3: neutral admission 503 with Retry-After before forwarded-holder diagnostics; no new read, no holder identity. Fix R1: distinguish startup from drain/shutdown using the same admission state; retain 503, Retry-After, no-store and removal of holder identity. Read sites unchanged.
internal/activator/activator.go:type Service P3a Task 3: immutable callbacks installed before Start for tenant admission, local start permission, fixed route exemptions and shutdown closure; nil callbacks preserve switch-off behavior; no new reads. Fix R1: add an immutable startup-phase callback for response copy, set before service startup. No new read or execution authority.
internal/activator/claimwake.go:Service.doClaimWake P3a Task 3: add/recheck the local start prohibition on generation, worker, sidecar, command or root-control launch, including retained leases; preserve existing lease/ownership checks and fixed-unit exemptions. Whole Route passes to the in-memory predicate; no new filesystem/store read.
diff --git a/internal/edge/boxroles_test.go b/internal/edge/boxroles_test.go
index d5fd5d1a1..b5880e7d2 100644
--- a/internal/edge/boxroles_test.go
+++ b/internal/edge/boxroles_test.go
@@ -80,7 +80,9 @@ func TestAdmissionWithdrawalWindow(t *testing.T) {
}
alias := wakeFile("z-alias")
alias["hosts"] = map[string]any{"shop.example.com": map[string]any{"role": "home", "alias": true, "stamp": 100}}
- m := wakeMap(t, wakeFile("self"), f, alias)
+ self := wakeFile("self")
+ self["hosts"] = map[string]any{}
+ m := wakeMap(t, self, f, alias)
if hosts := m.Hosts(); len(hosts) != 1 || hosts[0] != "shop.example.com" {
t.Fatalf("parent changed %v", hosts)
}
@@ -88,7 +90,11 @@ func TestAdmissionWithdrawalWindow(t *testing.T) {
t.Fatalf("delegated parents changed %v", parents)
}
_, box, ok := m.Home("shop.example.com")
- if ok != admitted || (ok && box != "g-first") {
+ wantBox := "g-first"
+ if !admitted {
+ wantBox = "z-alias"
+ }
+ if !ok || box != wantBox {
t.Fatalf("alias takeover %s %v", box, ok)
}
}
diff --git a/internal/edge/edge.go b/internal/edge/edge.go
index f7062a30a..68e58d8d9 100644
--- a/internal/edge/edge.go
+++ b/internal/edge/edge.go
@@ -2001,7 +2001,8 @@ func (e *Edge) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// just before the dial: the name is homed elsewhere, so its declared asset
// paths are answered from this box's store or filled from that home.
if !e.servesExactly(host) {
- if home, remote := e.homes.Load().exactHome(host); remote {
+ home, exact := e.homes.Load().findHome(host)
+ if exact || (home.held && !home.dial) {
if !home.dial {
body := "This service is unavailable. Try again later."
if home.starting {
diff --git a/internal/edge/held_names_test.go b/internal/edge/held_names_test.go
new file mode 100644
index 000000000..5e10718fc
--- /dev/null
+++ b/internal/edge/held_names_test.go
@@ -0,0 +1,164 @@
+package edge
+
+import (
+ "crypto/tls"
+ "crypto/x509"
+ "encoding/json"
+ "fmt"
+ "net"
+ "net/http"
+ "net/http/httptest"
+ "os"
+ "reflect"
+ "sort"
+ "strings"
+ "sync/atomic"
+ "testing"
+ "time"
+
+ "github.com/carlosframework/platform/internal/edgesfile"
+)
+
+// All decoded fields are classified here, including references that do not
+// register another name. A newly decoded field must be classified before this
+// guard can pass. Hosts/Namespace keys register names; target_host and
+// assets.primary refer to primaries, covered by the derived-alias fixture.
+func TestHeldNamesDecoderCoverage(t *testing.T) {
+ for _, tc := range []struct {
+ value any
+ fields string
+ }{
+ {edgesFileView{}, "AdmissionFields Namespace etag V Box EIP Hosts PrivateIP PrivateCIDR Region Placement DataBucket SecretsKeyFP BurstNotices Generation Capabilities HibernationConfigured Draining Role Headroom placementNull"},
+ {edgesHostView{}, "Role Replica Platform Alias Wildcard Account App Stamp Incarnation ServingSeq TargetHost Assets"},
+ {edgesAssetsView{}, "Paths Gen At Primary"},
+ {edgesfile.Host{}, "Role Platform Alias Wildcard Assets"},
+ {edgesfile.HostAssets{}, "Paths Gen At Primary"},
+ {edgesfile.NamespaceHost{}, "Held Route Platform Wildcard"},
+ {edgesfile.AdmissionFields{}, "BoxRole Admitted Drained"},
+ {edgesfile.File{}, "AdmissionFields Namespace V Box EIP Region Generation Hosts Addrs"},
+ } {
+ typ := reflect.TypeOf(tc.value)
+ var got []string
+ for i := 0; i < typ.NumField(); i++ {
+ got = append(got, typ.Field(i).Name)
+ }
+ want := strings.Fields(tc.fields)
+ sort.Strings(got)
+ sort.Strings(want)
+ if !reflect.DeepEqual(got, want) {
+ t.Errorf("%s decoder changed; classify new fields and extend held-name matrix: got %v want %v", typ, got, want)
+ }
+ }
+}
+
+func TestHeldNamesGuard(t *testing.T) {
+ var classes []struct {
+ Class, Name string
+ Host map[string]any
+ Route bool
+ }
+ body, err := os.ReadFile("../edgesfile/testdata/held-names.json")
+ if err != nil {
+ t.Fatal(err)
+ }
+ if err = json.Unmarshal(body, &classes); err != nil {
+ t.Fatal(err)
+ }
+ for _, c := range classes {
+ for _, state := range []string{"legacy", "booting", "not-admitted", "serve", "drain", "platform"} {
+ for _, local := range []bool{false, true} {
+ t.Run(fmt.Sprintf("%s/%s/local=%t", c.Class, state, local), func(t *testing.T) {
+ self := "observer"
+ var localHosts []string
+ if local {
+ self = "z-wild"
+ localHosts = []string{"*.example.com"}
+ }
+ e, m, _ := hopEdge(t, self, localHosts...)
+ query := c.Name
+ if strings.HasPrefix(query, "*.") {
+ query = "a" + query[1:]
+ }
+ rec, peerIP := heldNameHome(t, query)
+ homeIP := peerIP
+ peer := map[string]any{"v": 1, "box": "z-wild", "eip": peerIP, "hosts": map[string]any{"*.example.com": map[string]any{"role": "home", "account": "acct-w", "app": "w"}}}
+ h := map[string]any{}
+ for k, v := range c.Host {
+ h[k] = v
+ }
+ h["account"], h["app"] = "acct-a", "a"
+ f := map[string]any{"v": 1, "box": "g-first", "eip": homeIP, "hosts": map[string]any{c.Name: h}}
+ closed := state != "legacy" && state != "serve"
+ if state != "legacy" {
+ role := state
+ if role == "not-admitted" {
+ role = "serve"
+ }
+ f["box_role"], f["admitted"], f["drained"] = role, state != "booting" && state != "not-admitted", false
+ }
+ if state == "booting" {
+ f["hosts"] = map[string]any{}
+ f["namespace"] = map[string]any{c.Name: map[string]any{"held": true, "route": c.Route, "wildcard": h["wildcard"] == true, "platform": h["platform"] == true}}
+ }
+ for box, file := range map[string]any{"g-first": f, "z-wild": peer} {
+ b, err := json.Marshal(file)
+ if err != nil {
+ t.Fatal(err)
+ }
+ putJSON(t, m.s, edgesfile.Key(box), string(b))
+ }
+ refreshHomeMap(t, m)
+ resp := hopRequest(t, e, query, map[string]string{"Cookie": "private=acct-a"})
+ gotBody := readBody(t, resp)
+ if closed {
+ if resp.StatusCode != http.StatusServiceUnavailable || rec.Load() != 0 {
+ t.Errorf("held name reached catch-all: status=%d body=%q requests=%d", resp.StatusCode, gotBody, rec.Load())
+ }
+ if _, box, ok := m.Home(query); ok {
+ t.Errorf("held Home resolved to %s", box)
+ }
+ if acct, _, _, _, ok := m.Owner(query); ok {
+ t.Errorf("held Owner resolved to %s", acct)
+ }
+ if addr, _, ok := m.ExactHome(c.Name); !ok || addr != "" {
+ t.Errorf("missing held exact marker: %q %t", addr, ok)
+ }
+ } else {
+ // Cert-only parents have always allowed an actual catch-all to serve.
+ wantStatus := http.StatusOK
+ if c.Class == "cert-only-parent" {
+ wantStatus = http.StatusNotFound
+ }
+ if resp.StatusCode != wantStatus {
+ t.Errorf("serving behavior changed: %d %s", resp.StatusCode, gotBody)
+ }
+ if !local && c.Class != "cert-only-parent" {
+ if acct, _, _, _, ok := m.Owner(query); !ok || acct != "acct-a" {
+ t.Errorf("serving owner changed: %q %t", acct, ok)
+ }
+ }
+ }
+ })
+ }
+ }
+ }
+}
+
+func heldNameHome(t *testing.T, host string) (*atomic.Int64, string) {
+ t.Helper()
+ calls := &atomic.Int64{}
+ cert, _ := selfSignedLeaf(t, host, time.Now().Add(time.Hour))
+ server := httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { calls.Add(1); w.WriteHeader(http.StatusOK) }))
+ server.TLS = &tls.Config{Certificates: []tls.Certificate{*cert}}
+ server.StartTLS()
+ t.Cleanup(server.Close)
+ ip, port, err := net.SplitHostPort(server.Listener.Addr().String())
+ if err != nil {
+ t.Fatal(err)
+ }
+ oldPort, oldCAs := backhaulPort, backhaulRootCAs
+ backhaulPort, backhaulRootCAs = port, x509.NewCertPool()
+ backhaulRootCAs.AddCert(cert.Leaf)
+ t.Cleanup(func() { backhaulPort, backhaulRootCAs = oldPort, oldCAs })
+ return calls, ip
+}
diff --git a/internal/edge/homemap.go b/internal/edge/homemap.go
index 47dc3be6e..0fd84c0fb 100644
--- a/internal/edge/homemap.go
+++ b/internal/edge/homemap.go
@@ -238,7 +238,7 @@ type edgesAssetsView struct {
// homeEntry is one folded answer: where to dial, and which box that is.
type homeEntry struct {
- reserved bool
+ held bool
starting bool
// eip is the address to dial: edgesfile.Reader.Dial's answer, the home box's
// private address within its region and its EIP from anywhere else.
@@ -866,19 +866,7 @@ func foldHomes(files map[string]edgesFileView, self string, privateDial bool) (m
}
reader := edgesfile.Reader{Box: self, Self: own.dialPoint(), SelfKnown: ownKnown, PrivateDial: privateDial}
hosts := make(map[string]homeEntry)
- reserved := map[string]bool{}
- for _, f := range files {
- for host, n := range f.Namespace {
- if f.ProjectHome("", false, n).Reserved {
- reserved[host] = true
- }
- }
- for host, h := range f.Hosts {
- if f.ProjectHome(h.Role, h.Alias, edgesfile.NamespaceHost{}).Reserved {
- reserved[host] = true
- }
- }
- }
+
for _, k := range keys {
f := files[k]
if f.Box == "" || f.Box == self {
@@ -895,9 +883,6 @@ func foldHomes(files map[string]edgesFileView, self string, privateDial bool) (m
}
}
for host, h := range entries {
- if h.Alias && reserved[host] {
- continue
- }
if host == "" {
continue
}
@@ -906,7 +891,7 @@ func foldHomes(files map[string]edgesFileView, self string, privateDial bool) (m
// A dial target needs an address. A file with none (a box
// with no discoverable public IP) still carries its cert
// halves below; its dial halves are simply not dialable.
- if addr == "" && !f.ProjectHome(h.Role, h.Alias, f.Namespace[host]).Reserved {
+ if addr == "" && !f.ProjectHome(h.Role, h.Alias, f.Namespace[host]).Held {
if !h.Wildcard || !strings.HasPrefix(host, "*.") {
continue
}
@@ -924,7 +909,7 @@ func foldHomes(files map[string]edgesFileView, self string, privateDial bool) (m
continue
}
projection := f.ProjectHome(h.Role, h.Alias, f.Namespace[host])
- in := homeEntry{reserved: projection.Reserved, starting: projection.Starting, eip: addr, box: f.Box, platform: h.Platform && !h.Alias && !h.Wildcard, alias: h.Alias, wildcard: h.Wildcard, dial: projection.Dial,
+ in := homeEntry{held: projection.Held, starting: projection.Starting, eip: addr, box: f.Box, platform: h.Platform && !h.Alias && !h.Wildcard, alias: h.Alias, wildcard: h.Wildcard, dial: projection.Dial,
account: h.Account, app: h.App, stamp: h.Stamp, incarnation: h.Incarnation, servingSeq: h.ServingSeq, targetHost: h.TargetHost, assets: h.Assets}
prev, dup := hosts[host]
if !dup {
@@ -943,7 +928,7 @@ func foldHomes(files map[string]edgesFileView, self string, privateDial bool) (m
// replaces an alias never inherits the alias's owner or pair,
// even when it publishes none of its own.
merged := prev
- merged.reserved = prev.reserved || in.reserved
+ merged.held = prev.held || in.held
merged.starting = prev.starting || in.starting
merged.platform = prev.platform || in.platform
merged.wildcard = prev.wildcard || in.wildcard
@@ -1090,11 +1075,8 @@ func (m *homeMap) Home(host string) (eip, box string, ok bool) {
}
func (m *homeMap) exactHome(host string) (homeEntry, bool) {
- if m == nil || m.self == "" {
- return homeEntry{}, false
- }
- h, found := m.snapshot().hosts[host]
- return h, found && (h.dial || h.reserved)
+ h, exact := m.findHome(host)
+ return h, exact
}
// ExactHome is Home without the one-label wildcard fallback: the dial target
@@ -1119,16 +1101,23 @@ func (m *homeMap) ExactHome(host string) (eip, box string, ok bool) {
// snapshot read. Home and Owner both go through it, so they can never pick
// different entries for the same host.
func (m *homeMap) lookupHome(host string) (homeEntry, bool) {
+ h, _ := m.findHome(host)
+ return h, h.dial
+}
+
+// findHome reads one snapshot for dispatch and ownership. The boolean marks
+// an exact match; a held wildcard can also refuse a child's fallback.
+func (m *homeMap) findHome(host string) (homeEntry, bool) {
if m == nil || m.self == "" {
return homeEntry{}, false
}
hosts := m.snapshot().hosts
- if h, ok := hosts[host]; ok && (h.dial || h.reserved) {
- return h, h.dial
+ if h, ok := hosts[host]; ok && (h.dial || h.held) {
+ return h, true
}
if i := strings.IndexByte(host, '.'); i > 0 {
- if h, ok := hosts["*"+host[i:]]; ok && h.dial {
- return h, true
+ if h, ok := hosts["*"+host[i:]]; ok && (h.dial || h.held) {
+ return h, false
}
}
return homeEntry{}, false
diff --git a/internal/edgesfile/admission.go b/internal/edgesfile/admission.go
index 31e8d9b2f..7c48367ca 100644
--- a/internal/edgesfile/admission.go
+++ b/internal/edgesfile/admission.go
@@ -29,20 +29,31 @@ func (f AdmissionFields) HomeEligible() bool {
// NamespaceHost preserves name ownership during startup withdrawal. It
// carries no address, owner, alias target or serving role.
type NamespaceHost struct {
+ Held bool `json:"held,omitempty"`
Route bool `json:"route,omitempty"`
Platform bool `json:"platform,omitempty"`
Wildcard bool `json:"wildcard,omitempty"`
}
-// HomeProjection keeps namespace ownership separate from serving permission.
-// A box that is not serving (booting, not admitted, drain, platform) withdraws
-// its own hostnames from dial targets but still reserves them, so no other
-// account's catch-all or wildcard parent can take them. Reserving a name never
-// makes it a deployment route: only a real, non-alias home has that class.
-// Wildcard cert parents retain their class without suppressing peer aliases.
+// Hold preserves every name a non-serving box publishes: exact routes,
+// aliases, catch-all-derived names and certificate-only wildcard parents.
+// Booting, not-admitted, drain and platform boxes hold all of these classes.
+// A held name must never fall back to another app's or account's catch-all or
+// wildcard parent. Holding never grants deployment-route authority, including
+// DeploymentRoutesComplete and alias reconciliation. Route records provenance
+// separately; ProjectHome grants route authority only to serving host rows.
+func (n NamespaceHost) Hold(role string, alias, platform, wildcard bool) NamespaceHost {
+ n.Held = true
+ n.Route = n.Route || (role == RoleHome && !alias)
+ n.Platform = n.Platform || (platform && !alias)
+ n.Wildcard = n.Wildcard || wildcard
+ return n
+}
+
+// HomeProjection separates held names, dial targets and deployment routes.
type HomeProjection struct {
Dial bool
- Reserved bool
+ Held bool
Starting bool
Route bool
}
@@ -50,12 +61,15 @@ type HomeProjection struct {
func (f AdmissionFields) ProjectHome(role string, alias bool, n NamespaceHost) HomeProjection {
eligible := f.HomeEligible()
route := role == RoleHome && !alias
+ if !eligible && role != "" {
+ n = n.Hold(role, alias, false, false)
+ }
boxRole, admitted := "", true
starting := (admissionField(f.BoxRole, &boxRole) && boxRole == "booting") || (admissionField(f.Admitted, &admitted) && !admitted)
return HomeProjection{
Starting: starting,
Dial: eligible && role == RoleHome,
- Reserved: n.Route || (!eligible && route),
- Route: n.Route || route,
+ Held: n.Held,
+ Route: eligible && route && !n.Held,
}
}
diff --git a/internal/edgesfile/homeelect.go b/internal/edgesfile/homeelect.go
index f034009d8..4d6a910e1 100644
--- a/internal/edgesfile/homeelect.go
+++ b/internal/edgesfile/homeelect.go
@@ -137,11 +137,10 @@ type electedEntry struct {
// electFile is one file's entries, decoded once for every reader.
type electFile struct {
AdmissionFields
- namespace map[string]NamespaceHost
- key string
- box string
- dial DialPoint
- hosts map[string]electedEntry
+ key string
+ box string
+ dial DialPoint
+ hosts map[string]electedEntry
}
// decodeForElection decodes every host entry of every file, in bucket-key
@@ -162,7 +161,7 @@ func decodeForElection(files []PlacementView) ([]electFile, error) {
slices.SortStableFunc(sorted, func(a, b PlacementView) int { return strings.Compare(key(a), key(b)) })
out := make([]electFile, 0, len(sorted))
for _, f := range sorted {
- ef := electFile{AdmissionFields: f.AdmissionFields, namespace: f.Namespace, key: key(f), box: f.Box, dial: f.DialPoint(), hosts: make(map[string]electedEntry, len(f.Hosts))}
+ ef := electFile{AdmissionFields: f.AdmissionFields, key: key(f), box: f.Box, dial: f.DialPoint(), hosts: make(map[string]electedEntry, len(f.Hosts))}
for host, raw := range f.Hosts {
var in electedEntry
if err := json.Unmarshal(raw, &in); err != nil {
@@ -184,25 +183,13 @@ func elect(files []electFile, r Reader) map[string]Elected {
e Elected
}
won := map[string]held{}
- reserved := map[string]bool{}
- for _, f := range files {
- for host, n := range f.namespace {
- if f.ProjectHome("", false, n).Reserved {
- reserved[host] = true
- }
- }
- for host, h := range f.hosts {
- if f.ProjectHome(h.Role, h.Alias, NamespaceHost{}).Reserved {
- reserved[host] = true
- }
- }
- }
+
for _, f := range files {
if !f.HomeEligible() || f.box == "" || f.box == r.Box || r.Dial(f.dial) == "" {
continue
}
for host, in := range f.hosts {
- if host == "" || !f.ProjectHome(in.Role, in.Alias, NamespaceHost{}).Dial || (in.Alias && reserved[host]) {
+ if host == "" || !f.ProjectHome(in.Role, in.Alias, NamespaceHost{}).Dial {
continue
}
c := HomeClaim{Dial: true, Alias: in.Alias, Stamp: in.Stamp,
diff --git a/internal/edgesfile/testdata/held-names.json b/internal/edgesfile/testdata/held-names.json
new file mode 100644
index 000000000..a22ad8771
--- /dev/null
+++ b/internal/edgesfile/testdata/held-names.json
@@ -0,0 +1,84 @@
+[
+ {
+ "class": "exact-route",
+ "name": "a.example.com",
+ "host": {
+ "role": "home"
+ },
+ "route": true
+ },
+ {
+ "class": "platform-route",
+ "name": "a.example.com",
+ "host": {
+ "role": "home",
+ "platform": true
+ },
+ "route": true
+ },
+ {
+ "class": "catchall-derived-route",
+ "name": "a.example.com",
+ "host": {
+ "role": "home",
+ "platform": true
+ },
+ "route": true
+ },
+ {
+ "class": "replica-route",
+ "name": "a.example.com",
+ "host": {
+ "role": "home",
+ "replica": true
+ },
+ "route": true
+ },
+ {
+ "class": "plain-alias",
+ "name": "a.example.com",
+ "host": {
+ "role": "home",
+ "alias": true,
+ "target_host": "primary.example.net"
+ }
+ },
+ {
+ "class": "derived-alias",
+ "name": "a.example.com",
+ "host": {
+ "role": "home",
+ "alias": true,
+ "target_host": "primary.example.net",
+ "assets": {
+ "primary": "primary.example.net"
+ }
+ }
+ },
+ {
+ "class": "route-catchall",
+ "name": "*.shop.example.com",
+ "host": {
+ "role": "home"
+ },
+ "route": true
+ },
+ {
+ "class": "alias-catchall",
+ "name": "*.shop.example.com",
+ "host": {
+ "role": "home",
+ "alias": true,
+ "wildcard": true,
+ "target_host": "primary.example.net"
+ }
+ },
+ {
+ "class": "cert-only-parent",
+ "name": "*.shop.example.com",
+ "host": {
+ "role": "wildcard",
+ "wildcard": true
+ }
+ }
+]
diff --git a/internal/host/boxroles.go b/internal/host/boxroles.go
index 640278ed1..00f8acea1 100644
--- a/internal/host/boxroles.go
+++ b/internal/host/boxroles.go
@@ -119,19 +119,13 @@ func withBoxRole(f edgesFile, last []byte) edgesFile {
f.Namespace = map[string]edgesfile.NamespaceHost{}
reserve := func(hosts map[string]edgeHost) {
for host, h := range hosts {
- if !h.Alias || h.Wildcard {
- n := f.Namespace[host]
- n.Route = n.Route || (h.Role == edgesfile.RoleHome && !h.Alias)
- n.Platform = n.Platform || (h.Platform && !h.Alias)
- n.Wildcard = n.Wildcard || h.Wildcard
- f.Namespace[host] = n
- }
+ f.Namespace[host] = f.Namespace[host].Hold(h.Role, h.Alias, h.Platform, h.Wildcard)
}
}
var prior edgesFile
if json.Unmarshal(last, &prior) == nil {
for host, n := range prior.Namespace {
- f.Namespace[host] = n
+ f.Namespace[host] = n.Hold("", false, false, false)
}
reserve(prior.Hosts)
}
diff --git a/internal/host/boxroles_test.go b/internal/host/boxroles_test.go
index 55aea141b..3a1bc35c8 100644
--- a/internal/host/boxroles_test.go
+++ b/internal/host/boxroles_test.go
@@ -348,14 +348,14 @@ func TestAdmissionWithdrawalWindow(t *testing.T) {
t.Fatalf("boot publication %s", body)
}
routes, complete := edgesfile.DeploymentRoutesComplete(ctx, s, time.Now())
- if !complete || !routes["shop.example.com"] {
+ if !complete || routes["shop.example.com"] != admitted {
t.Fatal("namespace withdrawn", routes, complete)
}
if err := domains.ReconcileAliases(ctx, s, other, time.Now, routes, nil); err != nil {
t.Fatal(err)
}
aliases, err := other.ListAliases()
- if err != nil || len(aliases) != 0 {
+ if err != nil || (len(aliases) == 0) != admitted {
t.Fatal("alias takeover", aliases, err)
}
_, ok, err := edge.FoldedHome(map[string][]byte{edgesFileKey("box"): body}, "observer", "shop.example.com")
diff --git a/internal/host/held_names_test.go b/internal/host/held_names_test.go
new file mode 100644
index 000000000..c309617f2
--- /dev/null
+++ b/internal/host/held_names_test.go
@@ -0,0 +1,142 @@
+package host
+
+import (
+ "context"
+ "encoding/json"
+ "os"
+ "testing"
+ "time"
+
+ "github.com/carlosframework/platform/internal/boxroles"
+ "github.com/carlosframework/platform/internal/domains"
+ "github.com/carlosframework/platform/internal/edgesfile"
+ "github.com/carlosframework/platform/internal/registry"
+ "github.com/carlosframework/platform/internal/release"
+ "github.com/carlosframework/platform/internal/status"
+)
+
+func TestHeldNamesPublicationGuard(t *testing.T) {
+ var classes []struct {
+ Class, Name string
+ Host edgeHost
+ Route bool
+ }
+ body, err := os.ReadFile("../edgesfile/testdata/held-names.json")
+ if err != nil {
+ t.Fatal(err)
+ }
+ if err = json.Unmarshal(body, &classes); err != nil {
+ t.Fatal(err)
+ }
+ for _, c := range classes {
+ for _, state := range []string{"legacy", "booting", "not-admitted", "serve", "drain", "platform"} {
+ t.Run(c.Class+"/"+state, func(t *testing.T) {
+ ctx := context.Background()
+ s := release.NewDirStore(t.TempDir())
+
+ reg := edgesTestRegistry(t)
+ primary := c.Name
+ if c.Host.Alias {
+ primary = "primary.example.net"
+ }
+ if c.Host.Role == "home" {
+ if err := reg.Upsert(registry.Route{Host: primary, Account: "acct", App: "app", Kind: "service", Addr: "127.0.0.1:3000", Status: "ready", Platform: c.Host.Platform, Replica: c.Host.Replica}); err != nil {
+ t.Fatal(err)
+ }
+ }
+ if c.Host.Alias {
+ if err := reg.UpsertAlias(registry.RouteAlias{Alias: c.Name, Host: primary, Account: "acct", App: "app", DNSStatus: "pointing"}); err != nil {
+ t.Fatal(err)
+ }
+ }
+ if c.Host.Wildcard {
+ if err := reg.UpsertWildcardDomain(registry.WildcardDomain{Host: c.Name[2:], Account: "acct", App: "app"}); err != nil {
+ t.Fatal(err)
+ }
+ }
+ source := &rolePublication{role: boxroles.Serve, admitted: true}
+ f := edgesFile{Box: "g-first", RoleSource: source}
+ if state == "legacy" {
+ f.RoleSource = nil
+ }
+ var last []byte
+ if err := edgesFilePass(ctx, s, reg, f, "203.0.113.1", &last); err != nil {
+ t.Fatal(err)
+ }
+ serving, err := edgesfile.Parse(last)
+ if err != nil {
+ t.Fatal(err)
+ }
+ h, present := serving.Hosts[c.Name]
+ if !present || h.Role != c.Host.Role || h.Alias != c.Host.Alias || h.Wildcard != c.Host.Wildcard {
+ t.Fatalf("fixture did not publish class %s: %s", c.Class, last)
+ }
+ closed := state != "legacy" && state != "serve"
+ if state != "legacy" {
+ source.role = boxroles.Role(state)
+ if state == "not-admitted" {
+ source.role = boxroles.Serve
+ }
+ source.admitted = state != "booting" && state != "not-admitted"
+ }
+ if err := edgesFilePass(ctx, s, reg, f, "203.0.113.1", &last); err != nil {
+ t.Fatal(err)
+ }
+ b, _, err := s.Get(ctx, edgesfile.Key(f.Box))
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ if err = status.WriteBox(ctx, s, status.Box{Label: f.Box, GeneratedAt: time.Now()}); err != nil {
+ t.Fatal(err)
+ }
+ decoded, err := edgesfile.Parse(b)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if closed && (state == "booting" || state == "not-admitted") {
+ if _, ok := decoded.Namespace[c.Name]; !ok {
+ t.Errorf("withdrawal dropped %s: %s", c.Class, b)
+ }
+ }
+ routes, complete := edgesfile.DeploymentRoutesComplete(ctx, s, time.Now())
+ if !complete || routes[c.Name] != (c.Route && !closed) {
+ t.Errorf("held name counted as route or serving route lost: routes=%v complete=%t bytes=%s", routes, complete, b)
+ }
+ // Reconciliation consumes the real fleet route set. A hold alone must
+ // never delete the serving peer's alias on that key.
+ if closed {
+ reg := edgesTestRegistry(t)
+ primary := "primary.example.net"
+ if err = reg.Upsert(registry.Route{Host: primary, Account: "acct", App: "app", Kind: "service", Addr: "127.0.0.1:3000", Status: "ready"}); err != nil {
+ t.Fatal(err)
+ }
+ claim := domains.Claim{Schema: 1, Host: c.Name, Account: "acct", App: "app", Route: primary}
+ if c.Name[0] == '*' {
+ claim.Host = c.Name[2:]
+ claim.Wildcard = true
+ claim.Catchall = true
+ }
+ cb, _ := json.Marshal(claim)
+ if _, err = s.Put(ctx, domains.ClaimKey(claim.Host), cb, ""); err != nil {
+ t.Fatal(err)
+ }
+ if err = domains.ReconcileAliases(ctx, s, reg, time.Now, routes, nil); err != nil {
+ t.Fatal(err)
+ }
+ aliases, err := reg.ListAliases()
+ if err != nil {
+ t.Fatal(err)
+ }
+ found := false
+ for _, a := range aliases {
+ found = found || a.Alias == c.Name
+ }
+ if !found {
+ t.Errorf("hold suppressed peer alias %s: %v", c.Name, aliases)
+ }
+ }
+ })
+ }
+ }
+}
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index e888ff23d..411257709 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -75,4 +75,4 @@ plan14-root-reads-domains-check-country.tsv b0fc198c53bb0dacba33a54c3d8bf8fe5ac0
plan14-root-reads-static-stream-extract.tsv 7fb932b118e67e23b33a374c6a4020b38976667c7ec4cfb855c0f8b598b1756b
plan14-root-reads-ls284.tsv 744b16d970f22476b79982e57c326157ca5137fa96ccaee4a7ae10c25248d124
plan14-root-reads-region-ha-p1b3b-t.tsv c68e2453bfc8afaf3794eb4c08850428982fa6954269b6b99bddfda4e6242929
-plan14-root-reads-region-ha-p3a.tsv 2dcba62c7ed40c6c548bfb5a510d489d1d5a0ba5595fcbea46f15659a91e9355
+plan14-root-reads-region-ha-p3a.tsv 754722950bfe1ee96603aa373d2fa272585e17e39a70a221fb6f8cebf0e6bca6
diff --git a/internal/provision/testdata/plan14-root-reads-region-ha-p3a.tsv b/internal/provision/testdata/plan14-root-reads-region-ha-p3a.tsv
index 4630ca8d2..ad4088402 100644
--- a/internal/provision/testdata/plan14-root-reads-region-ha-p3a.tsv
+++ b/internal/provision/testdata/plan14-root-reads-region-ha-p3a.tsv
@@ -50,7 +50,7 @@
@legacy 20b2b61d4d7e38c529ad737228c91df3dea42c439c685bc3b82da31092cb214a internal/activator/genservice.go Service.startGen legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: add/recheck the local start prohibition on generation, worker, sidecar, command or root-control launch, including retained leases; preserve existing lease/ownership checks and fixed-unit exemptions. Whole Route passes to the in-memory predicate; no new filesystem/store read. whole:Route@120,whole:Route@249,whole:Route@307,whole:Route@522 48410b006d4ff4566c9379d6696f55c9b67d882b5a5b685ad757960fa619cabe
@legacy ecfe00ccdb2d18bd5c05fb0dc2e86b8857d9f528a5a2ca3350ab6a9a054f2e93 internal/activator/genservice.go Service.startGenExe legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: add/recheck the local start prohibition on generation, worker, sidecar, command or root-control launch, including retained leases; preserve existing lease/ownership checks and fixed-unit exemptions. Whole Route passes to the in-memory predicate; no new filesystem/store read. whole:Route@170,whole:Route@253 445d05293d9e0a7ae4858c723a77eb0d267ee3839f67dacbeaa762de58546a07
@legacy d5d3f63f7810cc876d19791895726c64872024d4a40e9dc5cf4bccca96d90b4a internal/activator/hawake.go ExecBackend.haSpawnGate legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new: before every spawn of a host this backend acquired HA, re-runs haContained and refuses an uncontained row; a non-HA host passes; +registry:Host, +whole:Route; only refuses;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: add/recheck the local start prohibition on generation, worker, sidecar, command or root-control launch, including retained leases; preserve existing lease/ownership checks and fixed-unit exemptions. Whole Route passes to the in-memory predicate; no new filesystem/store read. registry:Host@153,whole:Route@210,whole:Route@93 71c81e3c5168d1a2a0fc56144828676efe2673ac52415b787e0ab3e8bf18959b
-@legacy ee8f0fb34be740265cfa74de136702b6b7b4e3b5ae1ed7c4038ce38f128c5117 internal/edge/edge.go Edge.ServeHTTP legacy accepted-legacy accepted-legacy;rev3=census-ruling-seeded-instances;basis=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body with the import gate checked after the door's scope and a gated row left out of the response cache; serving only;rev3=census-ruling-edge-request-records;basis=one more call in the observer defer, observeRecords(up.route, ...), passing on the route the defer already holds; no new kind of read;rev3=census-ruling-design-edge-rate-limit-358;basis=calls rateAdmit twice, and an admitted request holds a slot on both paths: on the upgrade path before the activator or proxy (the handshake holds its slot through slotWriter, given back at the first final answer or at the reverse proxy's hijack on a 101, so an open WebSocket is not counted; released by a defer), and on the ordinary path after the response-cache check and before the activator and proxy (an admitted request holds a slot through slotWriter, released by a defer); a refusal is a 429 written there and returns; the upgrade path's comment now names slotWriter as its one wrapper; one comment on the door mark reworded; read sites unchanged (22: main's 21 plus edge-request-records' observeRecords pass of the route), offsets moved; no read added;rev3=census-ruling-plans-4c-box-throttle;basis=calls planThrottleAdmit before the response cache, and on an upgrade trackUpgrade then planUpgradeAdmit (plans 4c, Astra findings 1 and 2); the new reads live in those units (plans-4c-units decision). The same read sites here.;rev3=census-ruling-plans-4d-lapse;basis=calls planDisabledAdmit right after the import gate, passing the final upstream's route and the request host; a turned-off route gets the fixed disabled page before the meter, gate, cache and activator (plans 4d). The new read lives in that unit (plans-4d-units decision); one more whole-row pass here.;rev3=census-ruling-edge-protection-2;basis=runs the guard, a pure in-memory matcher on r.URL.Path and RawQuery (internal/edgeguard), once per request after the meter and observer defer and before the password gate, the upgrade branch, the cache and the activator, for a request that is not a door call, a backhauled door hop or a tunnel delivery; a matched block answers a 404 itself through guardDecide; the two new sites are one expression, up.route.Kind == "static" (a static route this box serves checks only the hard tier here and leaves the probe tier to serveTree), a read of the route row the edge already resolved; no new kind of read;rev3=census-ruling-edge-asset-cache-3;basis=the asset cache's three hooks (asset cache plan 3): the request's reserved asset headers are deleted at entry (the fill assertion kept only beside a verified hop); on the exact-remote and lookup-miss branches the far catch (serveAssetFar) is tried before backhaulTo and backhaul; after the observer defer and main's hard and probe checks, a verified hop with a valid fill assertion is answered by serveAssetFillForHop; after the upgrade branch and before gzip and the shared cache, the local catch (serveAssetLocal); the observer defer skips only the usage meter for an acknowledged home fill (out.unbilled); the new reads live in the new units of the edge-asset-cache-3-decisions overlay; the same route row and read sites (25); no read added;rev3=census-ruling-regional-domains-447;basis=#447 Task 5: straight after lookupUpstreamPath it calls regionalGate (regional.go), which for an entry built from a regional_domains row answers 503 to a hop or a deny entry before any arm that can leave the box (the exact-home backhaul, the far asset catch, the door dial, the miss backhaul), and lets a star match through only to the exact-home arm when ExactHome names another box for that distinct exact name; after the exact-home arm a regional deny entry the arm did not answer is refused (regionalRefuse, 503); refusals only, on the route map the edge already holds; read sites unchanged (25);rev3=census-ruling-static-headers;basis=the shared response cache is no longer looked up or filled for a static-kind route: one more read of the route row the edge already resolved (up.route.Kind == "static") in the cacheable expression; a refusal only, nothing new opened or followed;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2 (N-HA10): one call, frontForwardHA, right after the route lookup's !ok block and before the login POST; same reads;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 4: loginPost and cacheable treat a forward row as not this box's to answer (IsForward(), +whole:Route x2): no login form and no shared cache for a forward host. Serving only.;rev3=census-ruling-tunnel-websockets;basis=Deletes the Carlos-Upgrade marker header from incoming requests and puts the upgrade admission (host, path, the entry tenancy, all in hand) on a tunnel arm request. For a login POST on an ungated ArmTunnel row it reads the visitor request body (bounded by gate.MaxFormBody, 413 past it; a request body, not a file) and resolves next against the entry Reload built (Gate, Route); the bytes pass on only when loginPassesThrough holds (spec 7, Tasks 3, 5 and 6).;rev3=census-ruling-console-protection-tab;basis=one more call in the observer defer, observeGuardCount(up.route, out), beside the observeRecords call that files the guard Match: it passes on the route row the defer already holds (+whole:Route) and the request outcome to the usage meter, which counts the check in memory. Called whether or not the request was unbilled, as observeRecords is. Nothing is opened, read or followed; no new kind of read; no check, refusal or serving decision changes.;rev3=census-ruling-probe-burst-limit;basis=answers a probe-burst notice POST (serveBurstNotice) ahead of every route for a non-door caller; builds the guard state for up.route and stamps its account and app (RouteAccount, App) for the cool-down's this-app/other-app label; for a catalogue match on a non-static or tunnelled route, offers the burst rule (in-memory limiter, burstDecide: 429 or a watch verdict, never a block for a fleet or forward row); the observer defer calls noteBurst(up.route, ...); the added sites are the route value already in hand (+registry:App, +whole:Route x5); no new root read or write kind;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): parses the request's query once (stripHoldMarker) to record the carlos_hold=1 mark in the request context; calls classifyHold on the upstream already resolved from the loaded map (the +whole:Route is that in-memory Route), including a second pass for a login POST; gives a marked request on a door-refused route the plain 404; adds the hold branch (planThrottleAdmit, rateAdmit, serveHeld) after the gate; and excludes marked requests from the shared cache. Reads only the request and the already-loaded upstream map; no registry or bucket read added.;rev3=census-ruling-region-ha-p3a;basis=Refuse a reserved exact hostname with no serving peer before a local or remote catch-all can handle it; one snapshot supplies the reservation and dial decision; no new read or forwarding authority. P3a Task 3: refuse a managed tenant before forwarding, geo/proof preparation and dispatch; recheck the route after login next-path resolution. Only the fixed platform/unit scope is exempt. Whole Route passes to a local permission check, not a new store/path read. file:ReadAll@15378,registry:App@21535,registry:Gate@14352,registry:Gate@25926,registry:Gate@25986,registry:Gate@26044,registry:Host@26029,registry:ImportGate@33429,registry:Kind@20397,registry:Kind@23835,registry:Kind@33371,registry:Kind@33400,whole:Route@14247,whole:Route@14358,whole:Route@17175,whole:Route@17959,whole:Route@18417,whole:Route@18609,whole:Route@20400,whole:Route@21461,whole:Route@21527,whole:Route@21538,whole:Route@21791,whole:Route@21886,whole:Route@21962,whole:Route@22006,whole:Route@22308,whole:Route@22338,whole:Route@23838,whole:Route@24123,whole:Route@25929,whole:Route@25989,whole:Route@26032,whole:Route@26047,whole:Route@26965,whole:Route@29028,whole:Route@33374,whole:Route@33403,whole:Route@33432,whole:Route@33464,whole:Route@35312,whole:Route@5267 9b1df28b2df18736fbfdbe25eacba988dc08c7c54f78b944f4ad7f4a4ce25bfb
+@legacy e33a3783ee68fb347f748e260ed33037591240f2576eb3bcdd06f43eafa67ea1 internal/edge/edge.go Edge.ServeHTTP legacy accepted-legacy accepted-legacy;rev3=census-ruling-seeded-instances;basis=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body with the import gate checked after the door's scope and a gated row left out of the response cache; serving only;rev3=census-ruling-edge-request-records;basis=one more call in the observer defer, observeRecords(up.route, ...), passing on the route the defer already holds; no new kind of read;rev3=census-ruling-design-edge-rate-limit-358;basis=calls rateAdmit twice, and an admitted request holds a slot on both paths: on the upgrade path before the activator or proxy (the handshake holds its slot through slotWriter, given back at the first final answer or at the reverse proxy's hijack on a 101, so an open WebSocket is not counted; released by a defer), and on the ordinary path after the response-cache check and before the activator and proxy (an admitted request holds a slot through slotWriter, released by a defer); a refusal is a 429 written there and returns; the upgrade path's comment now names slotWriter as its one wrapper; one comment on the door mark reworded; read sites unchanged (22: main's 21 plus edge-request-records' observeRecords pass of the route), offsets moved; no read added;rev3=census-ruling-plans-4c-box-throttle;basis=calls planThrottleAdmit before the response cache, and on an upgrade trackUpgrade then planUpgradeAdmit (plans 4c, Astra findings 1 and 2); the new reads live in those units (plans-4c-units decision). The same read sites here.;rev3=census-ruling-plans-4d-lapse;basis=calls planDisabledAdmit right after the import gate, passing the final upstream's route and the request host; a turned-off route gets the fixed disabled page before the meter, gate, cache and activator (plans 4d). The new read lives in that unit (plans-4d-units decision); one more whole-row pass here.;rev3=census-ruling-edge-protection-2;basis=runs the guard, a pure in-memory matcher on r.URL.Path and RawQuery (internal/edgeguard), once per request after the meter and observer defer and before the password gate, the upgrade branch, the cache and the activator, for a request that is not a door call, a backhauled door hop or a tunnel delivery; a matched block answers a 404 itself through guardDecide; the two new sites are one expression, up.route.Kind == "static" (a static route this box serves checks only the hard tier here and leaves the probe tier to serveTree), a read of the route row the edge already resolved; no new kind of read;rev3=census-ruling-edge-asset-cache-3;basis=the asset cache's three hooks (asset cache plan 3): the request's reserved asset headers are deleted at entry (the fill assertion kept only beside a verified hop); on the exact-remote and lookup-miss branches the far catch (serveAssetFar) is tried before backhaulTo and backhaul; after the observer defer and main's hard and probe checks, a verified hop with a valid fill assertion is answered by serveAssetFillForHop; after the upgrade branch and before gzip and the shared cache, the local catch (serveAssetLocal); the observer defer skips only the usage meter for an acknowledged home fill (out.unbilled); the new reads live in the new units of the edge-asset-cache-3-decisions overlay; the same route row and read sites (25); no read added;rev3=census-ruling-regional-domains-447;basis=#447 Task 5: straight after lookupUpstreamPath it calls regionalGate (regional.go), which for an entry built from a regional_domains row answers 503 to a hop or a deny entry before any arm that can leave the box (the exact-home backhaul, the far asset catch, the door dial, the miss backhaul), and lets a star match through only to the exact-home arm when ExactHome names another box for that distinct exact name; after the exact-home arm a regional deny entry the arm did not answer is refused (regionalRefuse, 503); refusals only, on the route map the edge already holds; read sites unchanged (25);rev3=census-ruling-static-headers;basis=the shared response cache is no longer looked up or filled for a static-kind route: one more read of the route row the edge already resolved (up.route.Kind == "static") in the cacheable expression; a refusal only, nothing new opened or followed;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2 (N-HA10): one call, frontForwardHA, right after the route lookup's !ok block and before the login POST; same reads;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 4: loginPost and cacheable treat a forward row as not this box's to answer (IsForward(), +whole:Route x2): no login form and no shared cache for a forward host. Serving only.;rev3=census-ruling-tunnel-websockets;basis=Deletes the Carlos-Upgrade marker header from incoming requests and puts the upgrade admission (host, path, the entry tenancy, all in hand) on a tunnel arm request. For a login POST on an ungated ArmTunnel row it reads the visitor request body (bounded by gate.MaxFormBody, 413 past it; a request body, not a file) and resolves next against the entry Reload built (Gate, Route); the bytes pass on only when loginPassesThrough holds (spec 7, Tasks 3, 5 and 6).;rev3=census-ruling-console-protection-tab;basis=one more call in the observer defer, observeGuardCount(up.route, out), beside the observeRecords call that files the guard Match: it passes on the route row the defer already holds (+whole:Route) and the request outcome to the usage meter, which counts the check in memory. Called whether or not the request was unbilled, as observeRecords is. Nothing is opened, read or followed; no new kind of read; no check, refusal or serving decision changes.;rev3=census-ruling-probe-burst-limit;basis=answers a probe-burst notice POST (serveBurstNotice) ahead of every route for a non-door caller; builds the guard state for up.route and stamps its account and app (RouteAccount, App) for the cool-down's this-app/other-app label; for a catalogue match on a non-static or tunnelled route, offers the burst rule (in-memory limiter, burstDecide: 429 or a watch verdict, never a block for a fleet or forward row); the observer defer calls noteBurst(up.route, ...); the added sites are the route value already in hand (+registry:App, +whole:Route x5); no new root read or write kind;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): parses the request's query once (stripHoldMarker) to record the carlos_hold=1 mark in the request context; calls classifyHold on the upstream already resolved from the loaded map (the +whole:Route is that in-memory Route), including a second pass for a login POST; gives a marked request on a door-refused route the plain 404; adds the hold branch (planThrottleAdmit, rateAdmit, serveHeld) after the gate; and excludes marked requests from the shared cache. Reads only the request and the already-loaded upstream map; no registry or bucket read added.;rev3=census-ruling-region-ha-p3a;basis=Refuse every held name class with no serving peer, including held wildcard children, before a local or remote catch-all can handle it; one snapshot supplies the reservation and dial decision; no new read or forwarding authority. P3a Task 3: refuse a managed tenant before forwarding, geo/proof preparation and dispatch; recheck the route after login next-path resolution. Only the fixed platform/unit scope is exempt. Whole Route passes to a local permission check, not a new store/path read. file:ReadAll@15405,registry:App@21562,registry:Gate@14379,registry:Gate@25953,registry:Gate@26013,registry:Gate@26071,registry:Host@26056,registry:ImportGate@33456,registry:Kind@20424,registry:Kind@23862,registry:Kind@33398,registry:Kind@33427,whole:Route@14274,whole:Route@14385,whole:Route@17202,whole:Route@17986,whole:Route@18444,whole:Route@18636,whole:Route@20427,whole:Route@21488,whole:Route@21554,whole:Route@21565,whole:Route@21818,whole:Route@21913,whole:Route@21989,whole:Route@22033,whole:Route@22335,whole:Route@22365,whole:Route@23865,whole:Route@24150,whole:Route@25956,whole:Route@26016,whole:Route@26059,whole:Route@26074,whole:Route@26992,whole:Route@29055,whole:Route@33401,whole:Route@33430,whole:Route@33459,whole:Route@33491,whole:Route@35339,whole:Route@5267 5476545ea7aa077d8db55d9ee51bdb854c4e3c093daaf706c44b63d17e5b4957
@legacy 3718b1a504525b86388061b7d768fe876df57b4cae39ad6f7d49eb0df4835473 internal/host/schedule_wiring.go newScheduleDeps legacy accepted-legacy accepted-legacy;rev3=census-ruling-moves-offline-fixes;basis=root-route (J1, main's disposition); the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), from armSchedule: main's body with the runner's Skip set to scheduleSkip; no new read site;rev3=census-ruling-region-ha-p1b3b-t;basis=Wire Runner.WithDuty before token access through the existing Service. No new read.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3 fix R1: defer timers while local admission is closed, before token mint or attempt bookkeeping; translate an admission refusal from WithDuty into ErrDutyDeferred. Four whole Route predicate uses check existing fixed-route exemptions or pass the same row to WithDuty; no new external read or start authority. registry:App@1979,registry:App@388,registry:Host@2046,registry:Host@396,whole:Route@1223,whole:Route@1298,whole:Route@1974,whole:Route@383,whole:Route@872,whole:Route@946 143dc95af7d681eb5cbd9ca957acd888e1942404f9463b4e9a4bc6bf216d95dd
internal/activator/activator.go Service.serveWakeError diagnostic C,J4 rev3=PROPOSED-seed; incarnation-keyed missing-files diagnostics and indexed retry results; throttles output only and grants no retry, stop or launch;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: one more case, errLeaseRefused (a born-HA host outside the nested layout or an HA acquire's refusal): logged at most once per diagnostic window (allowFilesDiagnostic(rt.Host, ...)) and answered 503 with Retry-After: 10; the other cases unchanged; +registry:Host x2 are rt.Host in that call and the log line; it only answers;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: two new answers, a resident inside its backoff gets 503 with Retry-After (RFS-3-C16), and a rootfs row refused before the lease (errRootfsNotAdmitted) gets the existing wake-failed 503; no read added;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: for a verified HA hop, a held lease answers 503 Retry-After 1 with X-Carlos-Holder (answerForwarded) and every other refusal adds X-Carlos-Holder: none (noteNoHolder); legacy routes and cancellation unchanged; same reads;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: neutral admission 503 with Retry-After before forwarded-holder diagnostics; no new read, no holder identity. Fix R1: distinguish startup from drain/shutdown using the same admission state; retain 503, Retry-After, no-store and removal of holder identity. Read sites unchanged. registry:Host@1253,registry:Host@1317,registry:Host@3019,registry:Host@3083,whole:Route@387 a39a010317dae409f05d3a32267414170852694bce8213ca8d61bfb06925d08b
internal/activator/activator.go type Service authority B,C,D,F,J4 rev3=PROPOSED-seed; existing activator lifecycle and due-wake state plus owned seed exclusion and incarnation-keyed diagnostics; normal refusal and preparation ordering remain authoritative; PROPOSED-plans-2-box-limits adds the idleFor hook field, which only narrows idle windows;rev3=census-ruling-plans-4c-box-throttle;basis=gains the maxRunFor hook field beside idleFor (plans 4c). No read added.;rev3=census-ruling-plans-4d-lapse;basis=gains the disabledFor hook field beside maxRunFor (plans 4d). No read added.;rev3=census-ruling-remote-instance-metrics;basis=gains tenancySeq, hostTenants and hostMixed, in-memory fields for Tenancies; no read added;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: one more field, markers (markerRetry: an atomic running flag and the last log time) for retryOwedMarkers; no read added; merge of origin/main d7ae1d76: main's fields are kept as main has them (census-ruling-remote-instance-metrics: tenancySeq, hostTenants, hostMixed); this branch's change is the same as above;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: new fields for rootfs admission (rootfsArmed, rootfsSwept), the per-host gate ask and refusal memo, and residency state (lister, backoff, start ceiling, cursor, test seam); no read;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R: one new field, releaseOps (host to the in-memory release record, under a.mu); no read;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W: one new field, leaseNow (a clock seam for a worker start's headroom against the lease deadline, nil is the real clock); no read;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: gains the holder cache and its single-flight state; no read;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (controller ruling after branch review R1, and Paul's R2 ruling): one field, Fleet (activator.FleetWake: the box's fleet state, not on a fleet by default, on a fleet with a known label and a record reader, or on a fleet with an invalid identity), set by the agent before Start and read only by routeCurrentUnderLease. No read in the declaration. Agent, not root.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a fix round 1: one field, drainBudget (time.Duration), which New copies from residentDrainBudget and a rootfs entry's lease watch reads in its place, so a test's change of the package var never races a watch goroutine; declaration only, reads nothing; merge of origin/main 6f1f6ca6: main's one field, Fleet (activator.FleetWake), is kept as main has it (census-ruling-managed-fleets-1b); this branch's change is the same as above;rev3=census-ruling-region-ha-p1b3a;basis=Add bounded placement peer and diagnostic state and the over-capacity callback; no read in this declaration and no new root authority.;rev3=census-ruling-stateless-replicas-1;basis=Add coordinator, existing-record observation callback and per-host preparation locks; no read in the declaration. Task 3a: Add optional canonical storage-selection and durable deploy-ID callbacks; declaration only, no read or authority in these fields.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds the heldLegs map to actEntry (legs by id, under a.mu) and heldWakeHook (atomic pointer to a callback) and heldLegSeq (atomic counter) to Service. State only, in memory; no read of tenant, app or box-agent-writable input.;rev3=census-ruling-wake-storm-cap;basis=the agent as carlos: one field, wakeSlots (chan struct{}, the wake semaphore made by New from Config.WakeSlots, default 4); declaration only, no read.;rev3=census-ruling-region-ha-p1b3b-t;basis=Add the B2 DutyStore interface field and process-local duty view, suppression and invalidation state. No read added. B2 adds the verified-successor identity callback; no read in the declaration. B3b adds a nonblocking departure-suspicion callback, invoked only after an accepted holder-forward failure and after cache locks release; it cannot authorize a take.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: immutable callbacks installed before Start for tenant admission, local start permission, fixed route exemptions and shutdown closure; nil callbacks preserve switch-off behavior; no new reads. Fix R1: add an immutable startup-phase callback for response copy, set before service startup. No new read or execution authority. 6021fe3c1c364d0d4192cdc6c759a6340a4b3c099dd7394c8e5ed9e9bbde912b
@@ -58,7 +58,7 @@ internal/activator/claimwake.go Service.doClaimWake legacy accepted-legacy accep
internal/activator/rootfsworkers.go Service.installRootfsWorkerLocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W, W1.11: the one writer of a worker's proc; installs only on the host's own entry, for a worker still the entry's, while the entry is awake and owned (a resident only with its lease watch); refused, the caller stops and proves gone what it started; in-memory;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: add/recheck the local start prohibition on generation, worker, sidecar, command or root-control launch, including retained leases; preserve existing lease/ownership checks and fixed-unit exemptions. Whole Route passes to the in-memory predicate; no new filesystem/store read. whole:Route@263 4796e557b3281e2165ac8cee36361bd88b4faef56f5520e5c83a3c7fd050a535
internal/edge/edge.go RunWithActivatorReady legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-certwarm-wake;basis=registers the cert warm's nudge on OnReload and on the home map's new served-hosts wake (#386); nudge only sends on a buffered channel; no read added, same 5 sites;rev3=census-ruling-edge-roll-blip;basis=the :80/:443 (and dev) listeners are bound on the calling goroutine with net.Listen via listen()/listenAddr (same empty-address defaults as ListenAndServe) before the serve goroutines, which now call Serve/ServeTLS on them, and one log line names the bound addresses; no read added, same 5 sites;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): the inline home-map arming (newHomeMap, one boot Refresh, Store, run) moves unchanged into the new Edge.ArmHomeMap and is called here as e.ArmHomeMap(); same refresh, same timeout, same order. The reads are moved, none added.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: invoke the local admission Close before HTTP/HTTPS draining and door shutdown in both dev and normal listeners; existing reads unchanged. data-literal@129,data-literal@148,data-literal@284,data-literal@417,file:Open@1013 58941f6f3c6726de8d9e93562a1b95de0f7f90d43b6a54107958efd95af38d78
internal/host/agent.go fastTick legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=PROPOSED-s3-change-index;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=observes the change index before any pass (observeIndex), runs the backstop's requested full pass and a scoped pass for moved app scopes (indexTick), and arms the canary pointer gate on the sweep (canaryPointerGate) only on a tick whose own index observation succeeded; read site unchanged, offset moved;rev3=census-ruling-stateless-replicas-1;basis=Call coordinator Tick on the existing tick before convergence; client renews held terms only at the pinned interval. Existing registry read unchanged. Final review I3: signal the owned renewal worker instead of waiting for its sequential console HTTP calls. Existing convergence and record read unchanged.;rev3=census-ruling-region-ha-p3a;basis=Run the optional desired-role reader on the existing tick after observing the armed change index; no new root path or timer, nil reader is unchanged. registry:Host@4821 487aa39fc1d1a2bb188ab5b71f0ee4bc0b417c53914f74c2b55867001a2ce528
-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;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 6 and its fix rounds: publishes by FleetArmVerdict (via fleetRefusedFor): withheld rows left out; a forward host's path rows left out of its owner; no assets for forward rows; the alias loop replays Reload's alias fold from the served rows so a chained alias carries its root primary's owner; certRefused and parentRefused leave out a refused claim's wildcard parent (+registry:Alias x5, +registry:Host x4, +whole:Route, +whole:RouteAlias x2, +whole:RoutePath x7, +whole:WildcardDomain). Rows already read in the pass; keeps authority F,J1; publishes less, never more.;rev3=census-ruling-probe-burst-limit;basis=sets the constant BurstNotices=true on the box's own edges file (this build's edge answers probe-burst notices, so peers may send them); not from config or any read; the same 65 sites; a report other edges read, not a root decision; F,J1 authority retained; no new root read or write kind;rev3=census-ruling-region-ha-p3a;basis=Publish one injected role snapshot; preserve the real-route bit separately from wildcard/platform class during booting withdrawal; acknowledge the exact published role/admitted/drained tuple only after PUT; existing registry reads unchanged. registry:Account@15753,registry:Alias@10256,registry:Alias@13226,registry:Alias@13276,registry:Alias@8683,registry:Alias@8702,registry:Alias@8801,registry:Alias@8855,registry:Alias@8890,registry:Alias@8952,registry:Alias@9322,registry:Alias@9479,registry:Alias@9549,registry:Alias@9581,registry:App@15765,registry:DNSStatus@8997,registry:DNSStatus@9488,registry:Host@13129,registry:Host@13149,registry:Host@13414,registry:Host@13494,registry:Host@13529,registry:Host@13578,registry:Host@14040,registry:Host@14075,registry:Host@15183,registry:Host@3889,registry:Host@3935,registry:Host@3994,registry:Host@5109,registry:Host@6079,registry:Host@8728,registry:Host@8776,registry:Incarnation@5069,registry:Platform@4848,registry:Provisioned@4862,registry:Replica@4886,registry:ServingSeq@5084,registry:Status@2677,whole:Route@1026,whole:Route@17223,whole:Route@18041,whole:Route@18216,whole:Route@1841,whole:Route@2047,whole:Route@6164,whole:Route@750,whole:RouteAlias@13180,whole:RouteAlias@17245,whole:RouteAlias@18231,whole:RouteAlias@8566,whole:RouteAlias@8648,whole:RouteAlias@8840,whole:RoutePath@17238,whole:RoutePath@18224,whole:RoutePath@5948,whole:RoutePath@5980,whole:RoutePath@6027,whole:RoutePath@6055,whole:RoutePath@6093,whole:RoutePath@6113,whole:RoutePath@6125,whole:RoutePath@6179,whole:WildcardDomain@13107,whole:WildcardDomain@13483 623de89af2adc399601b13eb4f6a529f45f8e13def4230beb7995d19d72dfe9c
+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;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 6 and its fix rounds: publishes by FleetArmVerdict (via fleetRefusedFor): withheld rows left out; a forward host's path rows left out of its owner; no assets for forward rows; the alias loop replays Reload's alias fold from the served rows so a chained alias carries its root primary's owner; certRefused and parentRefused leave out a refused claim's wildcard parent (+registry:Alias x5, +registry:Host x4, +whole:Route, +whole:RouteAlias x2, +whole:RoutePath x7, +whole:WildcardDomain). Rows already read in the pass; keeps authority F,J1; publishes less, never more.;rev3=census-ruling-probe-burst-limit;basis=sets the constant BurstNotices=true on the box's own edges file (this build's edge answers probe-burst notices, so peers may send them); not from config or any read; the same 65 sites; a report other edges read, not a root decision; F,J1 authority retained; no new root read or write kind;rev3=census-ruling-region-ha-p3a;basis=Publish one injected role snapshot; hold every published name during booting withdrawal, with held separate from route provenance and wildcard/platform class; held names grant no deployment-route authority; acknowledge the exact published role/admitted/drained tuple only after PUT; existing registry reads unchanged. registry:Account@15753,registry:Alias@10256,registry:Alias@13226,registry:Alias@13276,registry:Alias@8683,registry:Alias@8702,registry:Alias@8801,registry:Alias@8855,registry:Alias@8890,registry:Alias@8952,registry:Alias@9322,registry:Alias@9479,registry:Alias@9549,registry:Alias@9581,registry:App@15765,registry:DNSStatus@8997,registry:DNSStatus@9488,registry:Host@13129,registry:Host@13149,registry:Host@13414,registry:Host@13494,registry:Host@13529,registry:Host@13578,registry:Host@14040,registry:Host@14075,registry:Host@15183,registry:Host@3889,registry:Host@3935,registry:Host@3994,registry:Host@5109,registry:Host@6079,registry:Host@8728,registry:Host@8776,registry:Incarnation@5069,registry:Platform@4848,registry:Provisioned@4862,registry:Replica@4886,registry:ServingSeq@5084,registry:Status@2677,whole:Route@1026,whole:Route@17223,whole:Route@18041,whole:Route@18216,whole:Route@1841,whole:Route@2047,whole:Route@6164,whole:Route@750,whole:RouteAlias@13180,whole:RouteAlias@17245,whole:RouteAlias@18231,whole:RouteAlias@8566,whole:RouteAlias@8648,whole:RouteAlias@8840,whole:RoutePath@17238,whole:RoutePath@18224,whole:RoutePath@5948,whole:RoutePath@5980,whole:RoutePath@6027,whole:RoutePath@6055,whole:RoutePath@6093,whole:RoutePath@6113,whole:RoutePath@6125,whole:RoutePath@6179,whole:WildcardDomain@13107,whole:WildcardDomain@13483 623de89af2adc399601b13eb4f6a529f45f8e13def4230beb7995d19d72dfe9c
infra/modules/region-host/group_alarms.tf external legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p3a;basis=Add default-off termination queue age alarm, using existing queue name and regional SNS topic; no IAM, queue, consumer or instance changes. Copy sweep 1: apply approved variable and alarm descriptions verbatim; no resource, threshold, action or read changes. file:external@0 0ae34a01de1eed9c44b120330f794ed7e9067c2afc74b51c2b56e979aaa0743d
infra/modules/region-host/ingress/alarms.tf external legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p3a;basis=Add per-TG NLB alarms and optional deployment/region clock and admission alarms, notify only; no compute actions or fixed identifiers. file:external@0 a4da64aa4ccbe2ffc0618ffe7e1e6d4ca5ee616b056a938a94c9eb3041bcffbb
infra/modules/region-host/ingress/main.tf external legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p3a;basis=Add isolated IPv4 NLB, VPC/zone lookups, validated CIDR egress, protected new EIPs and TCP health-checked target groups; no fixed-resource edits or root runtime reads. file:external@0 103369ef62af3311ee0e01e751e23a03ca3634015841f0a9437ee7e682353d37
@@ -109,7 +109,7 @@ internal/activator/genservice.go Service.startGen legacy accepted-legacy accepte
internal/activator/genservice.go Service.startGenExe legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: add/recheck the local start prohibition on generation, worker, sidecar, command or root-control launch, including retained leases; preserve existing lease/ownership checks and fixed-unit exemptions. Whole Route passes to the in-memory predicate; no new filesystem/store read. whole:Route@170,whole:Route@253 445d05293d9e0a7ae4858c723a77eb0d267ee3839f67dacbeaa762de58546a07
internal/activator/hawake.go ExecBackend.haSpawnGate legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p1a;basis=new: before every spawn of a host this backend acquired HA, re-runs haContained and refuses an uncontained row; a non-HA host passes; +registry:Host, +whole:Route; only refuses;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: add/recheck the local start prohibition on generation, worker, sidecar, command or root-control launch, including retained leases; preserve existing lease/ownership checks and fixed-unit exemptions. Whole Route passes to the in-memory predicate; no new filesystem/store read. registry:Host@153,whole:Route@210,whole:Route@93 71c81e3c5168d1a2a0fc56144828676efe2673ac52415b787e0ab3e8bf18959b
internal/activator/workerbuild.go Service.startWorker authority E2 E39: close the unsupported claimed worker path before backend entry, replacement or supervised stop. Claims-off paths remain unchanged. This is refusal coverage, not positive root-reserved worker launch support. Fixtures: TestPlan14GenerationWorkerStartBoundary, TestPlan14GenerationWorkerRealBackendRefusal, TestPlan14GenerationWorkerReplacementBoundary, TestPlan14GenerationWorkerSupervisionBoundary. Pre-flight 29 and E39 worker launch audit.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: add/recheck the local start prohibition on generation, worker, sidecar, command or root-control launch, including retained leases; preserve existing lease/ownership checks and fixed-unit exemptions. Whole Route passes to the in-memory predicate; no new filesystem/store read. registry:Host@1301,registry:Host@1479,registry:Host@2414,whole:Route@1031,whole:Route@233,whole:Route@2520 efa454a478f289a6f63432802e63d313ba2c1f4298aae6cfb46c666e99b47654
-internal/edge/edge.go Edge.ServeHTTP legacy accepted-legacy accepted-legacy;rev3=census-ruling-seeded-instances;basis=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body with the import gate checked after the door's scope and a gated row left out of the response cache; serving only;rev3=census-ruling-edge-request-records;basis=one more call in the observer defer, observeRecords(up.route, ...), passing on the route the defer already holds; no new kind of read;rev3=census-ruling-design-edge-rate-limit-358;basis=calls rateAdmit twice, and an admitted request holds a slot on both paths: on the upgrade path before the activator or proxy (the handshake holds its slot through slotWriter, given back at the first final answer or at the reverse proxy's hijack on a 101, so an open WebSocket is not counted; released by a defer), and on the ordinary path after the response-cache check and before the activator and proxy (an admitted request holds a slot through slotWriter, released by a defer); a refusal is a 429 written there and returns; the upgrade path's comment now names slotWriter as its one wrapper; one comment on the door mark reworded; read sites unchanged (22: main's 21 plus edge-request-records' observeRecords pass of the route), offsets moved; no read added;rev3=census-ruling-plans-4c-box-throttle;basis=calls planThrottleAdmit before the response cache, and on an upgrade trackUpgrade then planUpgradeAdmit (plans 4c, Astra findings 1 and 2); the new reads live in those units (plans-4c-units decision). The same read sites here.;rev3=census-ruling-plans-4d-lapse;basis=calls planDisabledAdmit right after the import gate, passing the final upstream's route and the request host; a turned-off route gets the fixed disabled page before the meter, gate, cache and activator (plans 4d). The new read lives in that unit (plans-4d-units decision); one more whole-row pass here.;rev3=census-ruling-edge-protection-2;basis=runs the guard, a pure in-memory matcher on r.URL.Path and RawQuery (internal/edgeguard), once per request after the meter and observer defer and before the password gate, the upgrade branch, the cache and the activator, for a request that is not a door call, a backhauled door hop or a tunnel delivery; a matched block answers a 404 itself through guardDecide; the two new sites are one expression, up.route.Kind == "static" (a static route this box serves checks only the hard tier here and leaves the probe tier to serveTree), a read of the route row the edge already resolved; no new kind of read;rev3=census-ruling-edge-asset-cache-3;basis=the asset cache's three hooks (asset cache plan 3): the request's reserved asset headers are deleted at entry (the fill assertion kept only beside a verified hop); on the exact-remote and lookup-miss branches the far catch (serveAssetFar) is tried before backhaulTo and backhaul; after the observer defer and main's hard and probe checks, a verified hop with a valid fill assertion is answered by serveAssetFillForHop; after the upgrade branch and before gzip and the shared cache, the local catch (serveAssetLocal); the observer defer skips only the usage meter for an acknowledged home fill (out.unbilled); the new reads live in the new units of the edge-asset-cache-3-decisions overlay; the same route row and read sites (25); no read added;rev3=census-ruling-regional-domains-447;basis=#447 Task 5: straight after lookupUpstreamPath it calls regionalGate (regional.go), which for an entry built from a regional_domains row answers 503 to a hop or a deny entry before any arm that can leave the box (the exact-home backhaul, the far asset catch, the door dial, the miss backhaul), and lets a star match through only to the exact-home arm when ExactHome names another box for that distinct exact name; after the exact-home arm a regional deny entry the arm did not answer is refused (regionalRefuse, 503); refusals only, on the route map the edge already holds; read sites unchanged (25);rev3=census-ruling-static-headers;basis=the shared response cache is no longer looked up or filled for a static-kind route: one more read of the route row the edge already resolved (up.route.Kind == "static") in the cacheable expression; a refusal only, nothing new opened or followed;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2 (N-HA10): one call, frontForwardHA, right after the route lookup's !ok block and before the login POST; same reads;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 4: loginPost and cacheable treat a forward row as not this box's to answer (IsForward(), +whole:Route x2): no login form and no shared cache for a forward host. Serving only.;rev3=census-ruling-tunnel-websockets;basis=Deletes the Carlos-Upgrade marker header from incoming requests and puts the upgrade admission (host, path, the entry tenancy, all in hand) on a tunnel arm request. For a login POST on an ungated ArmTunnel row it reads the visitor request body (bounded by gate.MaxFormBody, 413 past it; a request body, not a file) and resolves next against the entry Reload built (Gate, Route); the bytes pass on only when loginPassesThrough holds (spec 7, Tasks 3, 5 and 6).;rev3=census-ruling-console-protection-tab;basis=one more call in the observer defer, observeGuardCount(up.route, out), beside the observeRecords call that files the guard Match: it passes on the route row the defer already holds (+whole:Route) and the request outcome to the usage meter, which counts the check in memory. Called whether or not the request was unbilled, as observeRecords is. Nothing is opened, read or followed; no new kind of read; no check, refusal or serving decision changes.;rev3=census-ruling-probe-burst-limit;basis=answers a probe-burst notice POST (serveBurstNotice) ahead of every route for a non-door caller; builds the guard state for up.route and stamps its account and app (RouteAccount, App) for the cool-down's this-app/other-app label; for a catalogue match on a non-static or tunnelled route, offers the burst rule (in-memory limiter, burstDecide: 429 or a watch verdict, never a block for a fleet or forward row); the observer defer calls noteBurst(up.route, ...); the added sites are the route value already in hand (+registry:App, +whole:Route x5); no new root read or write kind;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): parses the request's query once (stripHoldMarker) to record the carlos_hold=1 mark in the request context; calls classifyHold on the upstream already resolved from the loaded map (the +whole:Route is that in-memory Route), including a second pass for a login POST; gives a marked request on a door-refused route the plain 404; adds the hold branch (planThrottleAdmit, rateAdmit, serveHeld) after the gate; and excludes marked requests from the shared cache. Reads only the request and the already-loaded upstream map; no registry or bucket read added.;rev3=census-ruling-region-ha-p3a;basis=Refuse a reserved exact hostname with no serving peer before a local or remote catch-all can handle it; one snapshot supplies the reservation and dial decision; no new read or forwarding authority. P3a Task 3: refuse a managed tenant before forwarding, geo/proof preparation and dispatch; recheck the route after login next-path resolution. Only the fixed platform/unit scope is exempt. Whole Route passes to a local permission check, not a new store/path read. file:ReadAll@15378,registry:App@21535,registry:Gate@14352,registry:Gate@25926,registry:Gate@25986,registry:Gate@26044,registry:Host@26029,registry:ImportGate@33429,registry:Kind@20397,registry:Kind@23835,registry:Kind@33371,registry:Kind@33400,whole:Route@14247,whole:Route@14358,whole:Route@17175,whole:Route@17959,whole:Route@18417,whole:Route@18609,whole:Route@20400,whole:Route@21461,whole:Route@21527,whole:Route@21538,whole:Route@21791,whole:Route@21886,whole:Route@21962,whole:Route@22006,whole:Route@22308,whole:Route@22338,whole:Route@23838,whole:Route@24123,whole:Route@25929,whole:Route@25989,whole:Route@26032,whole:Route@26047,whole:Route@26965,whole:Route@29028,whole:Route@33374,whole:Route@33403,whole:Route@33432,whole:Route@33464,whole:Route@35312,whole:Route@5267 9b1df28b2df18736fbfdbe25eacba988dc08c7c54f78b944f4ad7f4a4ce25bfb
+internal/edge/edge.go Edge.ServeHTTP legacy accepted-legacy accepted-legacy;rev3=census-ruling-seeded-instances;basis=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body with the import gate checked after the door's scope and a gated row left out of the response cache; serving only;rev3=census-ruling-edge-request-records;basis=one more call in the observer defer, observeRecords(up.route, ...), passing on the route the defer already holds; no new kind of read;rev3=census-ruling-design-edge-rate-limit-358;basis=calls rateAdmit twice, and an admitted request holds a slot on both paths: on the upgrade path before the activator or proxy (the handshake holds its slot through slotWriter, given back at the first final answer or at the reverse proxy's hijack on a 101, so an open WebSocket is not counted; released by a defer), and on the ordinary path after the response-cache check and before the activator and proxy (an admitted request holds a slot through slotWriter, released by a defer); a refusal is a 429 written there and returns; the upgrade path's comment now names slotWriter as its one wrapper; one comment on the door mark reworded; read sites unchanged (22: main's 21 plus edge-request-records' observeRecords pass of the route), offsets moved; no read added;rev3=census-ruling-plans-4c-box-throttle;basis=calls planThrottleAdmit before the response cache, and on an upgrade trackUpgrade then planUpgradeAdmit (plans 4c, Astra findings 1 and 2); the new reads live in those units (plans-4c-units decision). The same read sites here.;rev3=census-ruling-plans-4d-lapse;basis=calls planDisabledAdmit right after the import gate, passing the final upstream's route and the request host; a turned-off route gets the fixed disabled page before the meter, gate, cache and activator (plans 4d). The new read lives in that unit (plans-4d-units decision); one more whole-row pass here.;rev3=census-ruling-edge-protection-2;basis=runs the guard, a pure in-memory matcher on r.URL.Path and RawQuery (internal/edgeguard), once per request after the meter and observer defer and before the password gate, the upgrade branch, the cache and the activator, for a request that is not a door call, a backhauled door hop or a tunnel delivery; a matched block answers a 404 itself through guardDecide; the two new sites are one expression, up.route.Kind == "static" (a static route this box serves checks only the hard tier here and leaves the probe tier to serveTree), a read of the route row the edge already resolved; no new kind of read;rev3=census-ruling-edge-asset-cache-3;basis=the asset cache's three hooks (asset cache plan 3): the request's reserved asset headers are deleted at entry (the fill assertion kept only beside a verified hop); on the exact-remote and lookup-miss branches the far catch (serveAssetFar) is tried before backhaulTo and backhaul; after the observer defer and main's hard and probe checks, a verified hop with a valid fill assertion is answered by serveAssetFillForHop; after the upgrade branch and before gzip and the shared cache, the local catch (serveAssetLocal); the observer defer skips only the usage meter for an acknowledged home fill (out.unbilled); the new reads live in the new units of the edge-asset-cache-3-decisions overlay; the same route row and read sites (25); no read added;rev3=census-ruling-regional-domains-447;basis=#447 Task 5: straight after lookupUpstreamPath it calls regionalGate (regional.go), which for an entry built from a regional_domains row answers 503 to a hop or a deny entry before any arm that can leave the box (the exact-home backhaul, the far asset catch, the door dial, the miss backhaul), and lets a star match through only to the exact-home arm when ExactHome names another box for that distinct exact name; after the exact-home arm a regional deny entry the arm did not answer is refused (regionalRefuse, 503); refusals only, on the route map the edge already holds; read sites unchanged (25);rev3=census-ruling-static-headers;basis=the shared response cache is no longer looked up or filled for a static-kind route: one more read of the route row the edge already resolved (up.route.Kind == "static") in the cacheable expression; a refusal only, nothing new opened or followed;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2 (N-HA10): one call, frontForwardHA, right after the route lookup's !ok block and before the login POST; same reads;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 4: loginPost and cacheable treat a forward row as not this box's to answer (IsForward(), +whole:Route x2): no login form and no shared cache for a forward host. Serving only.;rev3=census-ruling-tunnel-websockets;basis=Deletes the Carlos-Upgrade marker header from incoming requests and puts the upgrade admission (host, path, the entry tenancy, all in hand) on a tunnel arm request. For a login POST on an ungated ArmTunnel row it reads the visitor request body (bounded by gate.MaxFormBody, 413 past it; a request body, not a file) and resolves next against the entry Reload built (Gate, Route); the bytes pass on only when loginPassesThrough holds (spec 7, Tasks 3, 5 and 6).;rev3=census-ruling-console-protection-tab;basis=one more call in the observer defer, observeGuardCount(up.route, out), beside the observeRecords call that files the guard Match: it passes on the route row the defer already holds (+whole:Route) and the request outcome to the usage meter, which counts the check in memory. Called whether or not the request was unbilled, as observeRecords is. Nothing is opened, read or followed; no new kind of read; no check, refusal or serving decision changes.;rev3=census-ruling-probe-burst-limit;basis=answers a probe-burst notice POST (serveBurstNotice) ahead of every route for a non-door caller; builds the guard state for up.route and stamps its account and app (RouteAccount, App) for the cool-down's this-app/other-app label; for a catalogue match on a non-static or tunnelled route, offers the burst rule (in-memory limiter, burstDecide: 429 or a watch verdict, never a block for a fleet or forward row); the observer defer calls noteBurst(up.route, ...); the added sites are the route value already in hand (+registry:App, +whole:Route x5); no new root read or write kind;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): parses the request's query once (stripHoldMarker) to record the carlos_hold=1 mark in the request context; calls classifyHold on the upstream already resolved from the loaded map (the +whole:Route is that in-memory Route), including a second pass for a login POST; gives a marked request on a door-refused route the plain 404; adds the hold branch (planThrottleAdmit, rateAdmit, serveHeld) after the gate; and excludes marked requests from the shared cache. Reads only the request and the already-loaded upstream map; no registry or bucket read added.;rev3=census-ruling-region-ha-p3a;basis=Refuse every held name class with no serving peer, including held wildcard children, before a local or remote catch-all can handle it; one snapshot supplies the reservation and dial decision; no new read or forwarding authority. P3a Task 3: refuse a managed tenant before forwarding, geo/proof preparation and dispatch; recheck the route after login next-path resolution. Only the fixed platform/unit scope is exempt. Whole Route passes to a local permission check, not a new store/path read. file:ReadAll@15405,registry:App@21562,registry:Gate@14379,registry:Gate@25953,registry:Gate@26013,registry:Gate@26071,registry:Host@26056,registry:ImportGate@33456,registry:Kind@20424,registry:Kind@23862,registry:Kind@33398,registry:Kind@33427,whole:Route@14274,whole:Route@14385,whole:Route@17202,whole:Route@17986,whole:Route@18444,whole:Route@18636,whole:Route@20427,whole:Route@21488,whole:Route@21554,whole:Route@21565,whole:Route@21818,whole:Route@21913,whole:Route@21989,whole:Route@22033,whole:Route@22335,whole:Route@22365,whole:Route@23865,whole:Route@24150,whole:Route@25956,whole:Route@26016,whole:Route@26059,whole:Route@26074,whole:Route@26992,whole:Route@29055,whole:Route@33401,whole:Route@33430,whole:Route@33459,whole:Route@33491,whole:Route@35339,whole:Route@5267 5476545ea7aa077d8db55d9ee51bdb854c4e3c093daaf706c44b63d17e5b4957
internal/host/agent.go runAgent authority B,C,D,F rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): builds the box's lifetime judge once (newBoxJudge, nil with host claims on) and hands it to the seed placement, the moves and runs workers and every loop it starts; read sites unchanged, offsets moved; B,C,D,F authority retained; self-serve moves 1 Task 8: derives the box's lifetimes switch from the judge once (lifetimes := boxJudge != nil) and hands it to the edges file loop; read sites unchanged, offsets moved;rev3=census-ruling-plans-4d-lapse;basis=arms two more plans hooks from the same snapshot: e.SetPlanDisabledFor(planDisabledFor) beside SetPlanGovernedFor, and svc.SetDisabledFor(planDisabledRoute) beside SetMaxRunFor (plans 4d); the reads live in those units (plans-4d-units decision); read sites unchanged, offsets moved;rev3=census-ruling-rootfs-apps-2;basis=main's body as of the merge of origin/main 9b81d97b (with main's plan rate ceiling, edge request records, regional box names, self-serve moves plan 1, plans 4d-1 lapse and its other later changes under main's own census rulings) plus the rootfs placement wiring in the activator start: an agentRootfs built from eb.NestedOK, CARLOS_DEPLOYMENT_SINGLE_TENANT, CARLOS_POOLS, the claim flag, swapArming's answer, the control client's /ready/rootfs and, on a fleet box whose identity resolved, fleetOwnerCheck over the deploy store main already opens for the fleet label (fleetStore), then arm and armedRootfs.Store; this body reads nothing new itself; the closures it wires read later, at a rootfs wake and each status tick: GET /ready/rootfs over the control socket, NestedOK's checks, and release.FleetOwnerKey for the judged row's own account and this box's fleet from the deploy store;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Tasks 7 and 11, #329 plan 3 Task 7 and plan 1 Task 7's policy cache: the control client is built once and handed to eb.Control, to the status tick (egressStatus) and to a new egressNudgeLoop goroutine; armSizeSource(svc, "/sys/fs/cgroup") after the activator Service; armPolicyCache() after armChangeIndex; statusLoop takes egressStatus. The reads are those units' own (decision rows); this body reads nothing new: the same five sites, offsets moved, in the agent; B,C,D,F authority retained.;rev3=census-ruling-remote-instance-metrics;basis=builds the metrics loop's owners closure (metricsOwners over the agent's registry, the activator and cgm.Leftover) when an activator exists and hands it to metricsLoop; reads nothing new itself;rev3=census-ruling-edge-asset-cache-3;basis=adds file:Statfs. runAgent keeps its authority (B,C,D,F). The new site is assetcache.Statfs, an exported assetcache.FS interface value (var Statfs FS = statfsFS{}), not a function value and not a call in runAgent: the ready hook passes it to armEdgeAssetCache as the store's filesystem, and armEdgeAssetCache calls its Space method on the configured data directory (dataDir(): $CARLOS_DATA_DIR, else /data), which calls unix.Statfs there (statfsFS.Space, accepted legacy at census-ruling-edge-asset-cache-2). No request-supplied pathname reaches it.;rev3=census-ruling-remote-metrics-nested;basis=main's body (merged origin/main acfa4f80, under main's own census rulings) plus: snapshots the nested layout (snapshotNestedUnits over /sys/fs/cgroup/carlos.slice/carlos-instances.slice) once at start, before the activator, and hands the metrics loop a unitSources struct (stamped units, routeHostNames, that root and the snapshot); reads nothing new itself;rev3=census-ruling-region-ha-p1a;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): wires region HA P1a into the activator: cfg.Record = haRecordFacts(openDeployStore, boxJudge) (the box's lifetime judge this body already builds with newBoxJudge, nil with host claims on; CI fix) and cfg.Self = lease.CurrentSelf; eb.Lifetimes (the process's lifetime index), eb.Registry, eb.StartupSwept (seedSweptAtStart.Load), eb.FilesStore from newProductionFilesStore (now lease.NewFilesStore, rootaws-loaded, a log line on failure) and lease.SetObligationDir(<data>/.ha-owed) (logged on failure; HA acquires then refuse); this body reads nothing new itself, the same five sites; the reads are those units' own (haRecordFacts and lease's SetObligationDir are new rows on this card); merge of origin/main d7ae1d76: main's own later changes to this body are kept as main has them, under main's rulings (census-ruling-remote-instance-metrics: the metricsOwners closure for metricsLoop; census-ruling-edge-asset-cache-3: the +file:Statfs site, assetcache.Statfs handed to the asset ready hook); this branch's change is the same as above;rev3=census-ruling-region-ha-p1b1;basis=region HA P1b-1: builds one termfence.Confirmer (Self from lease.CurrentSelf at each call, EC2 DescribeInstances method only, client from rootaws.LoadDefaultConfig with retries off, built lazily on first use) and sets eb.OwnerTerminated; this body reads nothing new itself, the same six sites;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 7: the startup Sweep literal hands its answer to startupSwept, which logs as before and, only on a clean sweep, marks rootfs admission swept (MarkRootfsSwept); same Sweep call, no read added;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (controller ruling after branch review R1, and Paul's R2 ruling): sets svc.Fleet = fleetWakeFor(os.Getenv, identity, identErr, fleetStore) from the identity it already resolves once and the deployment store the fleet loops already opened, and logs an ERROR naming the identity error when the box is on a fleet with an invalid identity. fleetWakeFor reads CARLOS_REGION and CARLOS_FLEET from the same environment. Read sites unchanged (6). Agent, not root; a platform box is unchanged.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 12: one call more beside armRunsPass, armInteractivePass(svc, reg, rolloutSink, boxJudge), in the same activator Configure hook, handing it the same box judge; fix round 1 (Astra P2, shutdown): after svc.Shutdown(ctx), shutdownInteractive(ctx) ends and joins every interactive session under the same shutdown budget; the worker's own reads are its units' (interactive.go); this body reads nothing new, the same six sites; merge of origin/main 6f1f6ca6: main's svc.Fleet = fleetWakeFor(...) and its invalid-identity ERROR line are kept as main has them (census-ruling-managed-fleets-1b); this branch's change is the same as above; read sites unchanged (6);rev3=census-ruling-fix-set-aside-exdev;basis=set-aside EXDEV fix: one field more on the agent ExecBackend literal, RawInstanceDir: layout.RawInstanceDir (a pure path join: <dataDir>/.instances/<InstanceID(host)>), so the start rule set-aside moves a copy out through the raw directory instead of through the nosymfollow bind; this body reads nothing new, the same six sites;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 3: one more assignment beside eb.FilesStore: eb.EscrowKey = haEscrowKey(os.Getenv("CARLOS_SECRETS_KEY")), the agent's own environment parsed by appconfig.ParsePrivateKey as the moves pass parses it (unset or unparseable: a log line and nil, and HA publication refuses on the box). No path is opened or read, no read site added; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 4: one more goroutine beside configSyncLoop: go escrowLoop(agentCtx, reg, svc), the escrow sweep every 30 s over the same registry and Service. This body reads nothing new itself; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 5: one more call beside eb.EscrowKey: wireRawSecretPages(eb, PageOperator, metricsBoxLabel(os.Getenv, readMachineID())), which sets eb.OnRawSecret to page an operator (alerting.Page through PageOperator, LevelIncident) on its own goroutine with a 20 s timeout; metricsBoxLabel and readMachineID are the reads this body already makes for the moves refusal log; no new read site; the same six sites, offsets moved; B,C,D,F authority retained. Merge of origin/main 90c4d3aa: main's own later changes to this body are kept as main has them, under main's rulings; this branch's change is the same as above. Merge of origin/main 00bf5b8c (fleet set-aside EXDEV fix): main's change to this body is kept as main has it, under its own census ruling; this branch's change is unchanged.;rev3=census-ruling-probe-burst-limit;basis=two more sink wirings beside setAnalyticsSink: setProtectionSink(e.SetProtectionRecordOnly) and setAssetOwnersSource(e.AssetOwners), function values the telemetry pass calls; this body reads nothing new, the same six sites; authority B,C,D,F retained; no new root read or write kind;rev3=census-ruling-region-ha-p1b3a;basis=Arm HA placement exactly once on the existing Service before activatorStart and edges publication, wiring AwakeApps and the PageOperator callback; existing six read sites unchanged, no new root authority.;rev3=census-ruling-stateless-replicas-1;basis=Final review I3: start the concrete coordinator's renewal worker with agent setup; existing closeReplicaCoordinator shutdown cancels and joins it before release. No new read sites or credentials. Merge origin/main c59715e7: retain main's armHAPlacement(svc, PageOperator) wiring beside the existing activator setup; stateless coordinator and shutdown wiring remain. Same read sites; no new root read or credential.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): in the edge-ready callback, calls act.SetHeldWakeHook(e.HeldWake) when act is non-nil (installing the non-blocking wake callback) and stores e.HeldStreamsForStatus in heldStreamsSource. Wiring of in-memory callbacks only; no read added.;rev3=census-ruling-region-ha-p1b3b-t;basis=Wire Service.SetDutyView to the live edge DutySnapshot in the ready callback. No new read; no new loop or cloud operation. B2 wires the registry as the persistent DutyStore before service startup; no new cloud or filesystem path. B3b: arm one journal-backed termination consumer before service startup using agentCtx and the shared confirmer; expose edge tick and join at edge shutdown. No new direct read sites.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: install closed fixed admission before every launch source, bind activator/backend and edge, wire the real termination Started lifecycle and role reader after the change index; close before cancellation/child shutdown. Existing reads unchanged; no new cloud authority. Fix R1: move bind/lifecycle/edge-option wiring into wireAgentAdmission and worker listing into runWorkerBootPassAfterAdmission. Worker boot waits for admission before listing then uses unchanged bounded wakes and per-host serialization; whole Route read moves to the helper. No new storage, cloud, or root execution authority. file:Exec@18155,file:Open@1517,file:Statfs@46949,registry:App@11910,whole:Route@11902 f4eec5ecc2ca4c37bd80395aa9f01cb153bfe0a94e753992f79dbefb2c1a126a
internal/host/schedule_wiring.go newScheduleDeps legacy accepted-legacy accepted-legacy;rev3=census-ruling-moves-offline-fixes;basis=root-route (J1, main's disposition); the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), from armSchedule: main's body with the runner's Skip set to scheduleSkip; no new read site;rev3=census-ruling-region-ha-p1b3b-t;basis=Wire Runner.WithDuty before token access through the existing Service. No new read.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3 fix R1: defer timers while local admission is closed, before token mint or attempt bookkeeping; translate an admission refusal from WithDuty into ErrDutyDeferred. Four whole Route predicate uses check existing fixed-route exemptions or pass the same row to WithDuty; no new external read or start authority. registry:App@1979,registry:App@388,registry:Host@2046,registry:Host@396,whole:Route@1223,whole:Route@1298,whole:Route@1974,whole:Route@383,whole:Route@872,whole:Route@946 143dc95af7d681eb5cbd9ca957acd888e1942404f9463b4e9a4bc6bf216d95dd
@coverage infra/modules/region-host 3c50b6dd14e7f99e9aff32bdcecffa28af5c6fffbc6c64d1a44e0271275ce861
@@ -120,9 +120,9 @@ internal/host/schedule_wiring.go newScheduleDeps legacy accepted-legacy accepted
@coverage infra/modules/region-host/tests e3b4f8199f84822455ff1624e4ba739d9aa7b4933c3fc2cb79f657ec43c21082
@coverage internal/activator c16decc0fdbca4134e5a24e02799803bda8563809c6bd4c9122aeb8fc523cc91
@coverage internal/boxroles b8804945a8da39c3f4d1778dc977ee1a071a6c8489ace1c5a22c92b5acb85d91
-@coverage internal/edge c53b9bdeebb59af00c9967acb8fdf39b69e0d47095620096e14212db88256185
-@coverage internal/edgesfile 79ccfee3606279650719114b126a16cef92707b148d8c941e1100e21115f7283
+@coverage internal/edge fdc4d80d561135c8b4d01273497e198e6641d94efd0c352adb22594aace8d4aa
+@coverage internal/edgesfile 89b59db1d072c72e0a75f468814077feaab09b4cd99da34769adc9eafae19e20
@coverage internal/groupadmission 2172be5de464b7860474c2c38d13ed3c2c16a50e9b151e123642f4c832968a2e
-@coverage internal/host cd3d05362ce973ac2d240a645f8edafeab79cc9b2815d41177224b6415efdb54
+@coverage internal/host 284a84f197aef7f84e7db264a35d1fd0df5fa3969601e76703bd9f5d0597f9da
@coverage internal/hostenv d9df92980cd7f97c31ad7334ee552e7f6378fdb310d8a1ca0d0d0cda983db81e
@coverage internal/release 95051eb07c6f91bdda535e8b8b45154a97c0f6869e92c32572e7f84c32677af4