carlos / platform Public

docs, census: P2-1 to P2-3 fixed; census re-proposed

The plan's ruling 6 note now says how each of the three was fixed, which
P2-2 option was taken and why, and names a further finding in the same
family the stronger simulation check surfaced (left for Paul). Census
claims for fastTick, runAgent, agentOwnedVars, controlMount, mailSubmits
and warnUndeclaredMailBuild extended; overlay re-proposed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev 76f4f582c4dfe04be85c8045e44655c901a917ef parent a90e743
5 files changed, +31 −26
  • docs/superpowers/notes/census-claims-platform-mail-submission.tsv +6 −6
  • docs/superpowers/notes/census-proposal-platform-mail-submission.md +5 −5
  • docs/superpowers/plans/2026-11-13-platform-mail-submission.md +6 −1
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −1
  • internal/provision/testdata/plan14-root-reads-platform-mail-submission.tsv +13 −13

CI passed — run details

diff --git a/docs/superpowers/notes/census-claims-platform-mail-submission.tsv b/docs/superpowers/notes/census-claims-platform-mail-submission.tsv
index b909988f0..9d472b1ed 100644
--- a/docs/superpowers/notes/census-claims-platform-mail-submission.tsv
+++ b/docs/superpowers/notes/census-claims-platform-mail-submission.tsv
@@ -31,15 +31,15 @@ internal/host/units/carlos-mailer.service:external Task 3, new: runs /opt/carlos
internal/status/snapshot.go:CollectBox Task 3: copies Probes.MailerArmed into BoxMetrics.MailerArmed (json mailer_armed, omitempty; private, like Layout) and counts it in the condition that builds Metrics; the same 28 sites, no read added.
#
# Task 4 (the verb at both bind sites, CARLOS_MAIL agent-owned).
-internal/activator/backend_exec.go:ExecBackend.controlMount Task 4, new: the one composer of a control socket's verbs, for both bind sites. Mounts the schedule verbs and GET /updates exactly as the two inline copies did (same conditions, same host, token reader and write fence), and POST /v1/mail (mailsubmit.Mount) under its own condition, b.Mail != nil. Reads rt.Host and passes the route to Mount; returns nil when nothing is mounted. The agent (carlos-edge.service, user carlos), not root. Fable P2-9: passes b.MailSwitch to mailsubmit.Mount. No read added.
+internal/activator/backend_exec.go:ExecBackend.controlMount Task 4, new: the one composer of a control socket's verbs, for both bind sites. Mounts the schedule verbs and GET /updates exactly as the two inline copies did (same conditions, same host, token reader and write fence), and POST /v1/mail (mailsubmit.Mount) under its own condition, b.Mail != nil. Reads rt.Host and passes the route to Mount; returns nil when nothing is mounted. The agent (carlos-edge.service, user carlos), not root. Fable P2-9: passes b.MailSwitch to mailsubmit.Mount. No read added. Fable final P2-2: passes b.mailVerbSwitched (b.MailSwitch, with an unknown switch forwarded to the mailer, which reads the switch itself and refuses an unswitched app) in place of b.MailSwitch. No read added.
internal/activator/backend_exec.go:ExecBackend.spawnChildFrom Task 4: the inline mount (Timers, UpdatesReader) is replaced by b.controlMount(rt, tokenReader, n): the same verbs under the same conditions, plus the mail verb when b.Mail is set. The three rt.Host reads move into controlMount; the route is passed whole. Agent, not root; nothing else changes. Task 6: also calls warnUndeclaredMailBuild with the route and the version being spawned (a log line and an instance event, never a refusal).
internal/activator/prepare.go:ExecBackend.listenControl Task 4: the same replacement as spawnChildFrom, with gen as the write fence's generation, so the nested and rootfs listener mounts exactly what the flat one does. Agent, not root.
-internal/activator/backend_exec.go:ExecBackend.agentOwnedVars Task 4: also decides CARLOS_MAIL through mailSubmits: set to "submit" only when the control socket bound, the verb is mounted, the app sender's switch is on and the route is Provisioned; stripped otherwise, a tenant-supplied value from fileEnv included. agentOwnedNames and moves.AgentOwnedVars gain it as a pinned pair. Only narrows what a tenant's files can set. Agent, not root.
-internal/activator/backend_exec.go:ExecBackend.mailSubmits Task 4, new: the CARLOS_MAIL rule. Reads rt.App, rt.Host, rt.Provisioned and RouteAccount(rt) from the agent's own registry row, and asks b.MailSwitch (the agent's cache of the console-written app sender record, internal/host/mailswitch.go: one bounded Get of apps/<acct>/<app>/email/senders/app.json through the agent's deploy store). Logs once per host at error level for an unprovisioned route of a switched app. Agent, not root; no file read.
+internal/activator/backend_exec.go:ExecBackend.agentOwnedVars Task 4: also decides CARLOS_MAIL through mailSubmits: set to "submit" only when the control socket bound, the verb is mounted, the app sender's switch is on and the route is Provisioned; stripped otherwise, a tenant-supplied value from fileEnv included. agentOwnedNames and moves.AgentOwnedVars gain it as a pinned pair. Only narrows what a tenant's files can set. Agent, not root. Fable final P2-2: passes fileEnv to mailSubmits, which reads it only to decide an unknown switch; CARLOS_MAIL is still set or stripped by the agent alone. No read added.
+internal/activator/backend_exec.go:ExecBackend.mailSubmits Task 4, new: the CARLOS_MAIL rule. Reads rt.App, rt.Host, rt.Provisioned and RouteAccount(rt) from the agent's own registry row, and asks b.MailSwitch (the agent's cache of the console-written app sender record, internal/host/mailswitch.go: one bounded Get of apps/<acct>/<app>/email/senders/app.json through the agent's deploy store). Logs once per host at error level for an unprovisioned route of a switched app. Agent, not root; no file read. Fable final P2-2: MailSwitch is three-valued. An unknown switch (the agent could not read the record) is decided from fileEnv, the environment the instance is about to start with and already read by the spawn: submit when it holds a non-empty *_MAIL_FROM and no non-empty *_SMTP_HOST (mailUnknownSubmits), logged once per host. A tenant can write fileEnv, so it can make its own instance submit; the mailer reads the switch itself and refuses an unswitched app, so that grants nothing. Agent, not root; no file read added (+registry:Host for the log key).
internal/mailsubmit/verb.go:Mount Task 4, new: POST /v1/mail on an instance's control socket. The bearer by the existing verbs' rule (empty or unreadable token refuses everything; SHA-256 constant-time compare); MaxBytesReader(14 MiB), the JSON envelope, base64 raw of at most 10 MiB, 1 to 50 non-empty recipients, a non-empty from, else 400 BAD_REQUEST; at most 2 messages per socket in the agent at once, the next 429 RATE (review round 1, Task 4 P3). Stamps account, app and host from the route the socket was bound for, never from the body, and forwards; a transport error or an answer outside 200/400/403/429/503 is 503 MAILER_UNAVAILABLE. Runs in the agent, as carlos; the body is a tenant's and is only decoded and forwarded, never used to name a path, route or account. Fable P2-9 (2026-11-14): takes the agent's switch read (ExecBackend.MailSwitch) and answers 403 SUBMISSION_OFF before reading the body when the route's app is not switched; a package-level bound of MaxInFlight messages across every socket answers 503 MAILER_UNAVAILABLE. No read added: the switch is the agent's in-memory cache.
internal/mailsubmit/forward.go:SocketForwarder.Send Task 4, new: the agent's client to the mailer: one HTTP POST of /v1/send over a fresh dial of the constant /run/carlos-mailer/mailer.sock, 60 s timeout, answer read to at most 64 KiB and decoded. Runs in the agent, as carlos. The socket's directory is root's; the mailer at the other end is a separate uid.
-internal/host/agent.go:runAgent Task 4: sets eb.Mail = mailsubmit.SocketForwarder{} on every box, and eb.MailSwitch to a mailSwitchCache's On that opens the deploy store itself through openDeployStore, retried at most once a minute with an error line until it opens (review round 1, Task 4 P3), armed for the serial-move refresh (armedMailSwitch). Task 6: also sets the ExecBackend's ManifestOf, the same staged-manifest read as TierOf (rt.App and RouteAccount(rt), hence +registry:App and +whole:Route), for the spawn-time check of decision 10, which logs and emits an event and never refuses. Agent, not root.
-internal/host/agent.go:fastTick Task 4: on a serial move, after the schedule leg, starts the armed mail switch cache's Refresh on its own goroutine (each read bounded at 2 s, overlapping refreshes skipped). It re-reads the app sender records already cached, through the agent's deploy store. Agent, not root; the tick waits on nothing new.
+internal/host/agent.go:runAgent Task 4: sets eb.Mail = mailsubmit.SocketForwarder{} on every box, and eb.MailSwitch to a mailSwitchCache's On that opens the deploy store itself through openDeployStore, retried at most once a minute with an error line until it opens (review round 1, Task 4 P3), armed for the serial-move refresh (armedMailSwitch). Task 6: also sets the ExecBackend's ManifestOf, the same staged-manifest read as TierOf (rt.App and RouteAccount(rt), hence +registry:App and +whole:Route), for the spawn-time check of decision 10, which logs and emits an event and never refuses. Agent, not root. Fable final P2-2: eb.MailSwitch is the cache's State (three-valued: on, off, unknown) in place of On; an unreadable switch is unknown, never off. No read added.
+internal/host/agent.go:fastTick Task 4: on a serial move, after the schedule leg, starts the armed mail switch cache's Refresh on its own goroutine (each read bounded at 2 s, overlapping refreshes skipped). It re-reads the app sender records already cached, through the agent's deploy store. Agent, not root; the tick waits on nothing new. Fable final P2-1: on a serial move, before the pass set and the restart leg, calls the armed cache's MarkStale (a counter bump under the cache's mutex; no I/O), so a spawn the move causes reads the switch again, bounded, instead of using an answer from before the move. No read added.
#
# Task 5 (the mailer's send: policy, hygiene, rate, per-box cap, SES).
internal/host/agent.go:provisionTickConfig Task 5: its region, pools and fleet label now come from BoxScopeFromEnv, which is the same three reads moved out unchanged (CARLOS_REGION trimmed, provision.ParseBoxPools(CARLOS_POOLS), and resolveFleetIdentity's label only when its fleet is the one the region places the box on), so the box-local mailer resolves "on this box" by the agent's rule. The ReconcileConfig it returns is field for field what it was. Agent, not root.
@@ -60,5 +60,5 @@ infra/modules/region-host/tests/mailer_group.tftest.hcl:external Task 8, new: pl
cli.go:runShip Task 6: a --mail flag (only "submit" accepted, refused with one line otherwise, and refused with --rootfs), set on the manifest in direct-bucket mode and sent to the console in API mode, where a console that does not echo it is refused (ship_mail.go, apimode.go), as --stateless is. A person's ship command; no root read, no box state.
internal/activator/backend_exec.go:ExecBackend.spawnUnitFrom Task 6: calls warnUndeclaredMailBuild with the route and the version being spawned. Logs and emits an instance event once per (host, version) when the app is switched and the staged manifest does not declare --mail submit; never refuses. Agent, not root.
internal/activator/rootfs.go:ExecBackend.spawnRootfs Task 6: the same warnUndeclaredMailBuild call for a rootfs spawn. Agent, not root.
-internal/activator/mailbuild.go:ExecBackend.warnUndeclaredMailBuild Task 6, new: design decision 10's loud log, never a refusal (a refused wake would turn a mail gap into a site outage). Asks the agent's switch cache (MailSwitch) and reads the staged manifest of the version being spawned through ManifestOf (release.ReadStagedManifest, the read TierOf already makes); logs at error level and emits one instance event per (host, version). Agent, not root; reads only what the spawn already reads.
+internal/activator/mailbuild.go:ExecBackend.warnUndeclaredMailBuild Task 6, new: design decision 10's loud log, never a refusal (a refused wake would turn a mail gap into a site outage). Asks the agent's switch cache (MailSwitch) and reads the staged manifest of the version being spawned through ManifestOf (release.ReadStagedManifest, the read TierOf already makes); logs at error level and emits one instance event per (host, version). Agent, not root; reads only what the spawn already reads. Fable final P2-2: MailSwitch is three-valued; logs only for a switch read as on, never for an unknown one. No read added.
internal/activator/cmdunit.go:ExecBackend.cmdVars Fable P3 (2026-11-14): a cmd one-shot's environment also strips CARLOS_MAIL, as seedVars does: a one-shot has no control socket, so it cannot submit mail. Only narrows what a run is given; no read added. Agent, not root.
diff --git a/docs/superpowers/notes/census-proposal-platform-mail-submission.md b/docs/superpowers/notes/census-proposal-platform-mail-submission.md
index 350853d84..6d9407010 100644
--- a/docs/superpowers/notes/census-proposal-platform-mail-submission.md
+++ b/docs/superpowers/notes/census-proposal-platform-mail-submission.md
@@ -8,7 +8,7 @@ Ruling `census-ruling-platform-mail-submission`. The independent reviewer approv
| `infra/modules/region-host/outputs.tf` `external` | body | unchanged (1) | Task 8: output "mailer_user_name", the user's name or null. Read-only. |
| `infra/modules/region-host/variables.tf` `external` | body | unchanged (1) | Task 8: variable "mailer", an object {ses_region, ses_account_id, deployment_bucket_region, optional deployment_bucket_kms_key_arn} defaulting to null, which creates nothing; validated (AWS region shapes, 12-digit account, KMS ARN or empty). |
| `internal/activator/cmdunit.go` `ExecBackend.cmdVars` | body | unchanged (2) | Fable P3 (2026-11-14): a cmd one-shot's environment also strips CARLOS_MAIL, as seedVars does: a one-shot has no control socket, so it cannot submit mail. Only narrows what a run is given; no read added. Agent, not root. |
-| `internal/host/agent.go` `fastTick` | body | unchanged (1) | Task 4: on a serial move, after the schedule leg, starts the armed mail switch cache's Refresh on its own goroutine (each read bounded at 2 s, overlapping refreshes skipped). It re-reads the app sender records already cached, through the agent's deploy store. Agent, not root; the tick waits on nothing new. |
+| `internal/host/agent.go` `fastTick` | body | unchanged (1) | Task 4: on a serial move, after the schedule leg, starts the armed mail switch cache's Refresh on its own goroutine (each read bounded at 2 s, overlapping refreshes skipped). It re-reads the app sender records already cached, through the agent's deploy store. Agent, not root; the tick waits on nothing new. Fable final P2-1: on a serial move, before the pass set and the restart leg, calls the armed cache's MarkStale (a counter bump under the cache's mutex; no I/O), so a spawn the move causes reads the switch again, bounded, instead of using an answer from before the move. No read added. |
| `internal/host/agent.go` `provisionTickConfig` | body | unchanged (2) | Task 5: its region, pools and fleet label now come from BoxScopeFromEnv, which is the same three reads moved out unchanged (CARLOS_REGION trimmed, provision.ParseBoxPools(CARLOS_POOLS), and resolveFleetIdentity's label only when its fleet is the one the region places the box on), so the box-local mailer resolves "on this box" by the agent's rule. The ReconcileConfig it returns is field for field what it was. Agent, not root. |
| `internal/host/agent.go` `statusLoop` | body | unchanged (7) | Task 3 (plan gap G6 (b)): the status tick also fills Probes.MailerArmed from mailerArmed(mailwire.MailerSocket, 2s): a stat of /run/carlos-mailer/mailer.sock and, only when it is a socket, GET /v1/health on it. The agent (carlos-edge.service, user carlos), not root; reported in the private BoxMetrics block only. The same seven sites; no store request, no read of /etc/carlos-mailer (which uid carlos cannot traverse). |
| `internal/host/bootstrap.go` `bootstrapWithGroup` | body | unchanged (3) | Task 3: the sysusers.d/carlos.conf it writes is now the constant sysusersConf, which adds "u carlos-mailer - \"CARLOS mailer\" - /usr/sbin/nologin" ahead of the existing "g carlos-sockets -" line, so the tmpfiles line naming group carlos-mailer resolves on a box whose confs arrive by a staged-tree refresh. Constant text, no input; no read added. |
@@ -26,12 +26,12 @@ Ruling `census-ruling-platform-mail-submission`. The independent reviewer approv
| `internal/host/units/carlos-instance-tty@.service` `external` | body | unchanged (1) | Task 3: InaccessiblePaths= gains -/run/carlos-mailer -/etc/carlos-mailer (optional). Only hides more; no read added. |
| `internal/host/units/carlos-instance@.service` `external` | body | unchanged (1) | Task 3: InaccessiblePaths= gains -/run/carlos-mailer -/etc/carlos-mailer (optional). Only hides more; no read added. |
| `internal/status/snapshot.go` `CollectBox` | body | unchanged (28) | Task 3: copies Probes.MailerArmed into BoxMetrics.MailerArmed (json mailer_armed, omitempty; private, like Layout) and counts it in the condition that builds Metrics; the same 28 sites, no read added. |
-| `internal/activator/backend_exec.go` `ExecBackend.agentOwnedVars` | sites | +whole:Route | Task 4: also decides CARLOS_MAIL through mailSubmits: set to "submit" only when the control socket bound, the verb is mounted, the app sender's switch is on and the route is Provisioned; stripped otherwise, a tenant-supplied value from fileEnv included. agentOwnedNames and moves.AgentOwnedVars gain it as a pinned pair. Only narrows what a tenant's files can set. Agent, not root. |
+| `internal/activator/backend_exec.go` `ExecBackend.agentOwnedVars` | sites | +whole:Route | Task 4: also decides CARLOS_MAIL through mailSubmits: set to "submit" only when the control socket bound, the verb is mounted, the app sender's switch is on and the route is Provisioned; stripped otherwise, a tenant-supplied value from fileEnv included. agentOwnedNames and moves.AgentOwnedVars gain it as a pinned pair. Only narrows what a tenant's files can set. Agent, not root. Fable final P2-2: passes fileEnv to mailSubmits, which reads it only to decide an unknown switch; CARLOS_MAIL is still set or stripped by the agent alone. No read added. |
| `internal/activator/backend_exec.go` `ExecBackend.spawnChildFrom` | sites | -registry:Host ×3, +whole:Route ×3 | Task 4: the inline mount (Timers, UpdatesReader) is replaced by b.controlMount(rt, tokenReader, n): the same verbs under the same conditions, plus the mail verb when b.Mail is set. The three rt.Host reads move into controlMount; the route is passed whole. Agent, not root; nothing else changes. Task 6: also calls warnUndeclaredMailBuild with the route and the version being spawned (a log line and an instance event, never a refusal). |
| `internal/activator/backend_exec.go` `ExecBackend.spawnUnitFrom` | sites | +whole:Route ×2 | Task 6: calls warnUndeclaredMailBuild with the route and the version being spawned. Logs and emits an instance event once per (host, version) when the app is switched and the staged manifest does not declare --mail submit; never refuses. Agent, not root. |
| `internal/activator/prepare.go` `ExecBackend.listenControl` | sites | -registry:Host ×3, +whole:Route | Task 4: the same replacement as spawnChildFrom, with gen as the write fence's generation, so the nested and rootfs listener mounts exactly what the flat one does. Agent, not root. |
| `internal/activator/rootfs.go` `ExecBackend.spawnRootfs` | sites | +whole:Route | Task 6: the same warnUndeclaredMailBuild call for a rootfs spawn. Agent, not root. |
-| `internal/host/agent.go` `runAgent` | sites | +registry:App, +whole:Route | Task 4: sets eb.Mail = mailsubmit.SocketForwarder{} on every box, and eb.MailSwitch to a mailSwitchCache's On that opens the deploy store itself through openDeployStore, retried at most once a minute with an error line until it opens (review round 1, Task 4 P3), armed for the serial-move refresh (armedMailSwitch). Task 6: also sets the ExecBackend's ManifestOf, the same staged-manifest read as TierOf (rt.App and RouteAccount(rt), hence +registry:App and +whole:Route), for the spawn-time check of decision 10, which logs and emits an event and never refuses. Agent, not root. |
+| `internal/host/agent.go` `runAgent` | sites | +registry:App, +whole:Route | Task 4: sets eb.Mail = mailsubmit.SocketForwarder{} on every box, and eb.MailSwitch to a mailSwitchCache's On that opens the deploy store itself through openDeployStore, retried at most once a minute with an error line until it opens (review round 1, Task 4 P3), armed for the serial-move refresh (armedMailSwitch). Task 6: also sets the ExecBackend's ManifestOf, the same staged-manifest read as TierOf (rt.App and RouteAccount(rt), hence +registry:App and +whole:Route), for the spawn-time check of decision 10, which logs and emits an event and never refuses. Agent, not root. Fable final P2-2: eb.MailSwitch is the cache's State (three-valued: on, off, unknown) in place of On; an unreadable switch is unknown, never off. No read added. |
Envelopes re-pinned: `.`, `infra/modules/region-host`, `infra/modules/region-host/tests`, `internal/activator`, `internal/host`, `internal/host/demo_units`, `internal/host/units`, `internal/hostenv`, `internal/instancectl`, `internal/mailer`, `internal/mailsubmit`, `internal/mailwire`, `internal/moves`, `internal/provision`, `internal/release`, `internal/status`.
@@ -74,7 +74,7 @@ New dispositions, which census-propose wrote and the reviewer checks against the
- new `infra/modules/region-host/tests/mailer.tftest.hcl:external`: reads +file:external; written legacy, accepted-legacy, frozen
- new `infra/modules/region-host/tests/mailer_group.tftest.hcl:external`: reads +file:external; written legacy, accepted-legacy, frozen
- new `internal/activator/backend_exec.go:ExecBackend.controlMount`: reads +registry:Host ×3, +whole:Route; written legacy, accepted-legacy, frozen
-- new `internal/activator/backend_exec.go:ExecBackend.mailSubmits`: reads +registry:App ×2, +registry:Host ×2, +registry:Provisioned, +whole:Route; written legacy, accepted-legacy, frozen
+- new `internal/activator/backend_exec.go:ExecBackend.mailSubmits`: reads +registry:App ×3, +registry:Host ×4, +registry:Provisioned, +whole:Route; written legacy, accepted-legacy, frozen
- new `internal/activator/mailbuild.go:ExecBackend.warnUndeclaredMailBuild`: reads +registry:App ×3, +registry:Host ×3, +whole:Route ×3; written legacy, accepted-legacy, frozen
- new `internal/host/mailerreport.go:mailerArmed`: reads +file:Stat; written legacy, accepted-legacy, frozen
- new `internal/host/units/carlos-mailer-arm.path:external`: reads +file:external; written legacy, accepted-legacy, frozen
@@ -88,6 +88,6 @@ New dispositions, which census-propose wrote and the reviewer checks against the
- new `internal/mailsubmit/forward.go:SocketForwarder.Send`: reads +file:ReadAll; written legacy, accepted-legacy, frozen
- new `internal/mailsubmit/verb.go:Mount`: reads +registry:App, +registry:Host, +whole:Route; written legacy, accepted-legacy, frozen
-Seal: `5603979dfa1a34a1b30784d1f9252f20b0ed95c114bde54e8b173f9262fe8f46` → `98f09a319faffbf4f0ac2ba6598c66f4dd252cec9f71fb5ec9dc08a636f26617`.
+Seal: `5603979dfa1a34a1b30784d1f9252f20b0ed95c114bde54e8b173f9262fe8f46` → `fcddd17b6ff602f8de505aa64a109bf16d1424e38b9378c24c2ffff2e50aa4e5`.
Overlay: `internal/provision/testdata/plan14-root-reads-platform-mail-submission.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/docs/superpowers/plans/2026-11-13-platform-mail-submission.md b/docs/superpowers/plans/2026-11-13-platform-mail-submission.md
index 41f5a0ba7..5050c9f2b 100644
--- a/docs/superpowers/plans/2026-11-13-platform-mail-submission.md
+++ b/docs/superpowers/plans/2026-11-13-platform-mail-submission.md
@@ -74,7 +74,12 @@ Plan choices that are not gaps, for the plan reviewer (each resolves an item on
- **P2-A, two doors answered 200 without a switched app's From:** the environment mint now answers a sender it cannot read as a From not delivered (`*envFromError`: the door cannot tell whether the app is switched), and a re-declare delivers the From whenever the app is switched, not only when the declaration changed, so a retry after a failed delivery delivers.
- **P2-B, the guard held only in its shipped configuration:** the lock test clears its "judged" mark when the app lock is released, so the judgement and the write must share one hold; the lifetime create, the claim-create door and the claim-create finish are each driven and judged; the declare door's app lock is tested; the simulation no longer panics with every environment released, and a wide seed sweep (environment-driven, and run in CI) covers many seeds and steps, Fable's failing seeds among them. P3s: `allocRecordLocked`'s recovery replay judges before it writes; the `*`-parameter rule reads unquoted parameter names only, so a quoted boundary holding `*=` is admitted; and the lock assertion is noted as a detector (a held app lock, not this request's hold).
-6. **Fable's final whole-branch review of `b0aba39b0`: APPROVE, no P1**, so the review stops and its P2s are fixed without another round; Astra's census verdict (M1: the mailer unit unsets `AWS_ACCESS_KEY` and `AWS_SECRET_KEY` too; L1: `statusLoop` has seven sites) is applied. Fixed on the branch: the reap runs from the hourly pass for every account, with or without a plan catalog (P2-5); `email status` reports a switched app's state and pause from its pause block, with no false drift (P2-6); a third concurrent send waits up to 5 s for a sender slot (P2-7); "armed" means AWS accepted the key once (P2-8); the verb answers `403 SUBMISSION_OFF` before reading an unswitched app's body, and bounds the agent's messages across every socket (P2-9); the rollback rule (P2-10, runbook 5c and operator step 12); and the copy fixes (P2-4), with every string of the code now a row of the record and the record checked both ways. P2-1 to P2-3 of that review, in the one-working-channel family, wait on Paul.
+6. **Fable's final whole-branch review of `b0aba39b0`: APPROVE, no P1**, so the review stops and its P2s are fixed without another round; Astra's census verdict (M1: the mailer unit unsets `AWS_ACCESS_KEY` and `AWS_SECRET_KEY` too; L1: `statusLoop` has seven sites) is applied. Fixed on the branch: the reap runs from the hourly pass for every account, with or without a plan catalog (P2-5); `email status` reports a switched app's state and pause from its pause block, with no false drift (P2-6); a third concurrent send waits up to 5 s for a sender slot (P2-7); "armed" means AWS accepted the key once (P2-8); the verb answers `403 SUBMISSION_OFF` before reading an unswitched app's body, and bounds the agent's messages across every socket (P2-9); the rollback rule (P2-10, runbook 5c and operator step 12); and the copy fixes (P2-4), with every string of the code now a row of the record and the record checked both ways. P2-1 to P2-3 of that review, in the one-working-channel family, were **ruled by Paul, 2026-11-14: fix as the reviewer named them**, under ruling 2's option 1, and are fixed:
+ - **P2-1, a flip's restart could respawn on the agent's stale answer:** a serial move marks every cached switch answer stale, synchronously, before the move's pass set and restart leg (`mailSwitchCache.MarkStale` in `fastTick`), and `State` reads a stale answer again, bounded. A read that a `MarkStale` overtook stores a stale entry and never replaces a later one. Pinned by `TestFastTickMarksMailSwitchStaleBeforeTheBounce` (a spawn in the pass set and one in the restart leg, both before `Refresh`) and `TestMailSwitchMarkStale`.
+ - **P2-2, an unreadable switch read as off:** of the reviewer's two options, **the second**: the switch is three-valued (`activator.MailSwitchState`), and an unknown one is decided from the environment the instance is about to start with: submit when it holds a `*_MAIL_FROM` and no `*_SMTP_HOST`, otherwise the SMTP its bundle carries (`mailUnknownSubmits`). Chosen over persisting the last good answer because it also covers an app the agent has never read (a new placement, or the deploy store not yet open), needs no new agent-written file, and follows from the switch's own write order, so the bundle is always the channel the console delivered. The verb forwards an unknown app; the mailer reads the switch itself and refuses an unswitched one. A failed read is unknown even with an older answer cached, since that answer may be the one the move changed. Pinned by `TestMailSwitchCache` and `TestMailUnknownSwitchDecidedByTheBundle`.
+ - **P2-3, the week-7 reap could race a switch-off:** each app's reap (`reapSubmittedAppUser`) takes the account lock, then the app lock (`beginCopiesMutation`), the door's order, and reads the record under them. `TestSubmissionChannelSimulation` runs a whole switch-off inside a reap paused before its deletes, and for that step checks that every SMTP key the switch-off delivered is one AWS still holds, active.
+ - Each fix was watched to fail with its fix removed.
+ - **Found while doing it, not fixed (same family, for Paul):** with that key check on every step, the scripted sequence shows a switch-on that fails after reaping an owned environment's IAM user but before taking the five out of its bundle (team's write #2). The environment record still names the deleted user, so the next switch-off's `EnableEnvironment` treats the bundle as delivered and mints nothing: instances in that environment end on SMTP with a deleted key. The check is scoped to the P2-3 step until this is ruled.
The copy review (Task 6 P2-6) is still Paul's; the copy record stays a draft.
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index a3a186327..1a09074df 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -217,4 +217,4 @@ plan14-root-reads-g6-pool.tsv 94ccbabaf19c3a449cec248a0c32fcc8593c82d3f7f433c6a4
plan14-root-reads-pdf-host-client-groups.tsv e8beda8fd31db92f742943be631e8d034bbb4880225e69a680d5a0be893807af
plan14-root-reads-log-retention-knobs.tsv e8beda8fd31db92f742943be631e8d034bbb4880225e69a680d5a0be893807af
plan14-root-reads-fleet-record-labels-m1.tsv 5603979dfa1a34a1b30784d1f9252f20b0ed95c114bde54e8b173f9262fe8f46
-plan14-root-reads-platform-mail-submission.tsv 98f09a319faffbf4f0ac2ba6598c66f4dd252cec9f71fb5ec9dc08a636f26617
+plan14-root-reads-platform-mail-submission.tsv fcddd17b6ff602f8de505aa64a109bf16d1424e38b9378c24c2ffff2e50aa4e5
diff --git a/internal/provision/testdata/plan14-root-reads-platform-mail-submission.tsv b/internal/provision/testdata/plan14-root-reads-platform-mail-submission.tsv
index 6a91a17bd..e89068068 100644
--- a/internal/provision/testdata/plan14-root-reads-platform-mail-submission.tsv
+++ b/internal/provision/testdata/plan14-root-reads-platform-mail-submission.tsv
@@ -5,7 +5,7 @@
@legacy 12110bd4e36dfb84a8352ad3b2ae1f8de1fe5f118f805606a148de17705e112e infra/modules/region-host/outputs.tf external legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-region-ha-p3b;basis=Keep fixed outputs through indexed resources, return null for group instance/EIP, and expose group, pinned template, ingress and boot-parameter names. Operator Terraform outputs only; no new box read.;rev3=census-ruling-region-ha-g2-fixes;basis=Expose the module alert topic ARN, null without an alerts topic; no new box runtime read.;rev3=census-ruling-region-ha-g3-fixes;basis=Return the selected existing or module-created alert topic ARN, null when neither input is set. Terraform output only; no new root runtime read.;rev3=census-ruling-managed-fleets-2b1;basis=managed fleets 2b-1 Task 5: three outputs, managed_fleet_user_boundary_arn, managed_fleet_user_path and managed_fleet_bucket_prefix, each null unless managed_fleets_enabled; Terraform outputs for the operator only; no box runtime read is added;rev3=census-ruling-w6-ingress-drain;basis=new output ingress_target_groups: the ARNs joined with commas in fixed mode when set, null otherwise and in group mode; the operator copies it into the box's host.env (CARLOS_INGRESS_TARGET_GROUPS) by hand. Output only; no read added.;rev3=census-ruling-platform-mail-submission;basis=Task 8: output "mailer_user_name", the user's name or null. Read-only. file:external@0 fc7a4e1f10e52775047a9b0cedb636a00641e8f6831970baefea419871be9868
@legacy 4ef72ca2ef3fd96a836ca96e6e8ed2a3cd8c730d65010fcf2d46cf7f810ac42a infra/modules/region-host/variables.tf external legacy accepted-legacy accepted-legacy;rev3=census-ruling-console-invite-delivery;basis=tofu on an operator's machine with the operator's AWS credentials (no box unit; no binary embeds the file): main's variables with console_mail_from (validated as one lowercase address) and console_mail_region, both empty by default; no read is added and nothing on a box reads the file;rev3=census-ruling-hunt-account-root-hardening;basis=adds deny_release_key_reads (bool, default true); no read is added and nothing on a box reads the file;rev3=census-ruling-region-ha-p3b;basis=Add default-fixed mode and validated group count, zones, pinned image/release/template, ingress, configuration key and transaction-open refusal. Operator-supplied Terraform values select root boot inputs; no direct box runtime read and no group activation by default.;rev3=census-ruling-region-ha-g2-fixes;basis=Add an empty-default set of additional alert topic ARNs, validating concrete SNS topic syntax and excluding wildcards/subscriptions; operator Terraform input, no box runtime read.;rev3=census-ruling-region-ha-g3-fixes;basis=Add optional alerts_topic_arn with concrete same-region SNS ARN validation and mutual exclusion with alerts_email. The caller owns the existing topic policy and subscriptions; no runtime sink is configured and no new root read is added.;rev3=census-ruling-managed-fleets-2b1;basis=managed fleets 2b-1 Task 5: five variables, managed_fleets_enabled (bool, default false, refused unless mode is fixed), managed_fleets_deployment, managed_fleets_regions (concrete ami/subnet/sg IDs, arm64 types, no ID in two regions), managed_fleet_bucket_prefix (1-24 chars, no reserved prefix, must not cover the deployment, data or staging buckets, disjoint from store_bucket_prefix) and managed_fleet_user_path (literal IAM path, disjoint from store_user_path); store_bucket_prefix and store_user_path gain a validation refusing *, ? or ${ only when managed fleets and object storage are both on; operator Terraform input only; no box runtime read and nothing on a box reads the file;rev3=census-ruling-fixedbox-health-alarms;basis=Add optional health_alerts_topic_arn (concrete same-region SNS ARN validation, empty default); enable_auto_recovery description covers both status alarms. Operator Terraform input; no box runtime read.;rev3=census-ruling-w6-ingress-drain;basis=new variable ingress_target_group_arns (list(string), default [], non-nullable) validated as distinct ELB target group ARNs (arn:aws(-x)*:elasticloadbalancing:<region>:<12 digits>:targetgroup/<name>/<16 hex>); drives the IAM policy and output above. No read added.;rev3=census-ruling-stats-prune-400;basis=new variable enable_analytics_version_prune (bool, default false) driving the policy above; operator Terraform input; no box runtime read;rev3=census-ruling-platform-mail-submission;basis=Task 8: variable "mailer", an object {ses_region, ses_account_id, deployment_bucket_region, optional deployment_bucket_kms_key_arn} defaulting to null, which creates nothing; validated (AWS region shapes, 12-digit account, KMS ARN or empty). file:external@0 4e3076d5835fcd03f51edcd5f6847371c2f2059598b4bf7841cba2aead5b3754
@legacy 901d155a108cd677bde6d864798e22b56eed5a42eafa8595ccc62c51f453fecc internal/activator/cmdunit.go ExecBackend.cmdVars legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): composes the command's environment over the serving generation's launch snapshot; the host comes from the row, never from a tenant file;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only.;rev3=census-ruling-platform-mail-submission;basis=Fable P3 (2026-11-14): a cmd one-shot's environment also strips CARLOS_MAIL, as seedVars does: a one-shot has no control socket, so it cannot submit mail. Only narrows what a run is given; no read added. Agent, not root. registry:Host@356,whole:Route@462 75f3a85e8bdbb5a27b22eeb094135628e315d4c4c80482040b836ceb44955ad9
-@legacy 2d0d5c7d06f3d3299a7b17609928866ebb192d07468a1876e0ad9df56571ace8 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.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: signals the owned replica worker on the existing tick; coalesced asynchronous execution, no timer or bucket scan added. merge of origin/main 7920cccf: Retain main box-role reader pass on the existing tick alongside the replica worker signal; merge-only body change, unchanged read sites.;rev3=census-ruling-restart-new-box-gap;basis=calls the optional restartGain hook (restartGainSeed) once per existing tick before the serial read; no new root path, timer or read kind; nil hook is unchanged;rev3=census-ruling-agent-start-demo-3;basis=Refresh moved notices through the shared watch before normal convergence; no new per-box poll. Census read-site delta: unchanged (1).;rev3=census-ruling-stateless-replicas-4-task1;basis=Signals the owned replica swap worker (armedReplicaDeploy.tick) beside the placement worker on the existing tick; coalesced background pass, no timer, no bucket read. Its transitions go through the console's authenticated /deploy.;rev3=census-ruling-platform-mail-submission;basis=Task 4: on a serial move, after the schedule leg, starts the armed mail switch cache's Refresh on its own goroutine (each read bounded at 2 s, overlapping refreshes skipped). It re-reads the app sender records already cached, through the agent's deploy store. Agent, not root; the tick waits on nothing new. registry:Host@5822 a1cd273f24047c63670f8c32c000a84f1a3861d058da38c5318551929f312390
+@legacy 3a5f3f0f0b8434fcb139db73ff5709c77daeaacbb2f81aae31d20d1009aef101 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.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: signals the owned replica worker on the existing tick; coalesced asynchronous execution, no timer or bucket scan added. merge of origin/main 7920cccf: Retain main box-role reader pass on the existing tick alongside the replica worker signal; merge-only body change, unchanged read sites.;rev3=census-ruling-restart-new-box-gap;basis=calls the optional restartGain hook (restartGainSeed) once per existing tick before the serial read; no new root path, timer or read kind; nil hook is unchanged;rev3=census-ruling-agent-start-demo-3;basis=Refresh moved notices through the shared watch before normal convergence; no new per-box poll. Census read-site delta: unchanged (1).;rev3=census-ruling-stateless-replicas-4-task1;basis=Signals the owned replica swap worker (armedReplicaDeploy.tick) beside the placement worker on the existing tick; coalesced background pass, no timer, no bucket read. Its transitions go through the console's authenticated /deploy.;rev3=census-ruling-platform-mail-submission;basis=Task 4: on a serial move, after the schedule leg, starts the armed mail switch cache's Refresh on its own goroutine (each read bounded at 2 s, overlapping refreshes skipped). It re-reads the app sender records already cached, through the agent's deploy store. Agent, not root; the tick waits on nothing new. Fable final P2-1: on a serial move, before the pass set and the restart leg, calls the armed cache's MarkStale (a counter bump under the cache's mutex; no I/O), so a spawn the move causes reads the switch again, bounded, instead of using an answer from before the move. No read added. registry:Host@6331 92553f6afaa845f4b1c35f2b5decd659bd1f6211beb3f202f9490bb2bb57b3cf
@legacy 562d26b51dcbce93d68fabfe933e074c2b2933fcded74156fd88f559407862da internal/host/agent.go provisionTickConfig legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-ha-p1a-433;basis=the agent (carlos-edge.service, user carlos) and the edges file loop's eligibility: the same CARLOS_POOLS read, now parsed by provision.ParseBoxPools (internal/provision, envelope re-pinned), the one parser boxPools also uses. "@shared" (provision.SharedPoolToken, never a valid pool name) is the shared "" pool; other tokens are literal as before; empty elements and repeats dropped. No read added.;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 4, rule 2): sets ReconcileConfig.FleetBox to the box's own fleet label from resolveFleetIdentity(getenv), only when the identity resolves and region == PlacementTarget(identity.Fleet); otherwise it stays "" (the box admits only unlabelled records). The same environment the fleet loops already read; read sites unchanged (2). Agent config, not root.;rev3=census-ruling-platform-mail-submission;basis=Task 5: its region, pools and fleet label now come from BoxScopeFromEnv, which is the same three reads moved out unchanged (CARLOS_REGION trimmed, provision.ParseBoxPools(CARLOS_POOLS), and resolveFleetIdentity's label only when its fleet is the one the region places the box on), so the box-local mailer resolves "on this box" by the agent's rule. The ReconcileConfig it returns is field for field what it was. Agent, not root. data-literal@173,data-literal@214 cabe3cb9662118eb82ddbc77dbbdb80b6718494caea097c8ffb894ccc4903fe3
@legacy 8a3138bade129a8c842dda4b12dc687af177d73ddfd0a9b5cf071432455f9550 internal/host/agent.go statusLoop legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): the status tick's context carries the box's lifetime judge; read sites unchanged, offsets moved;rev3=census-ruling-rootfs-apps-2;basis=main's body as of the merge of origin/main 953b9fda (its later changes, regional box names and self-serve moves plan 1 among them, under main's own census rulings), where the tick fills rootfs_ready and rootfs_blocked from armedRootfs.Load().probe, which each tick runs NestedOK's checks and asks the control socket's GET /ready/rootfs (never the store); the same four direct sites;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Task 11 and #329 plan 3 Task 7: takes root's GET /egress reader and fills p.Egress = egressStatusProbe(egressStatus, routes, provision.PolicyReadStates()) and p.SizeCommittedMiB = sizeCommittedMiB(armedSizeSource.Load(), routes); the two added whole:Route sites are the tick's own registry list handed to those two units (decision rows), which read root's control socket and the activator's memory; no store request added; the four existing sites unchanged, offsets moved.;rev3=census-ruling-fleet-alerts-1;basis=the agent (carlos-edge.service, user carlos): the status tick passes os.Geteuid() to alertDeliveryProbe, which fills AlertDelivery.EngineBeat/EngineBeatWhy from engineBeatArmed (the env value and the euid only, no file access, root refused before the path is looked at), and fills Probes.DiskFullETAHours from diskETAProbe(&processDiskTrend, now), a Theil-Sen fit over the metrics loop's in-memory ring of disk readings; the same six sites, no read added, no store request added;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): the status tick's Probes gain HeldStreams: heldStreamsState(), which calls the edge's in-memory counters function (nil until the edge is ready). No file, bucket or registry access added.;rev3=census-ruling-stateless-replicas-3;basis=Fix round 1 Q20: read the detached in-memory replica snapshot source into Probes.ReplicaCopies on the existing five-minute tick. Existing six direct read sites unchanged. No additional bucket request, changed cadence or app lifecycle action.;rev3=census-ruling-agent-start-demo-3;basis=Report moved capability only when the serving edge reports readiness; report claim-seed support only with CARLOS_DEMO_CLAIM=1. Reads the explicit capability flag from the process environment; no new filesystem or registry read.;rev3=census-ruling-stateless-replicas-4-task5;basis=Task 5 fix round 1 (#511 R16 amendment): the status tick also fills Probes.ApplyFinished from systemApplyFinished(release.OptDir()), an Lstat of root's apply journal <opt>/system/router/journal.json in the root-owned, world-readable state directory: finished only when the journal is absent, any other answer unknown and so unfinished. Round 0: Probes.PrevRelease from prevReleaseOf (carlos.prev and carlos.prev.version, the files withMovesFields already reads). Reported in the private BoxMetrics block; no bucket request or cadence change.;rev3=census-ruling-offline-move-stage-refusals-339;basis=#339: the agent (carlos-edge.service, user carlos): the status tick fills p.OfflineMove = offlineMoveFactsProbe(routes); the added whole:Route site is the tick's own registry list handed to that unit, which under a non-root euid lists the names of root's <opt>/live and nothing else; no store request added.;rev3=census-ruling-platform-mail-submission;basis=Task 3 (plan gap G6 (b)): the status tick also fills Probes.MailerArmed from mailerArmed(mailwire.MailerSocket, 2s): a stat of /run/carlos-mailer/mailer.sock and, only when it is a socket, GET /v1/health on it. The agent (carlos-edge.service, user carlos), not root; reported in the private BoxMetrics block only. The same seven sites; no store request, no read of /etc/carlos-mailer (which uid carlos cannot traverse). whole:Route@10554,whole:Route@12628,whole:Route@12909,whole:Route@13267,whole:Route@6583,whole:Route@6610,whole:Route@7918 352bd5962a711a29f0f0f2f0d5e4d0a9a58f41ebf049e4f37ff41c31a4ea4eae
@legacy 722920e1d095fe935962342d131ef5e8d5c97481b52b7ddc38dc214bf84ee9a5 internal/host/bootstrap.go bootstrapWithGroup legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p3b;basis=Move bootstrapWith body here, retaining host.env, embedded unit reads and tmpfiles execution. Group live caller holds root mutation guard; skip automatic update/recovery units, preserve Restart=no/nftables drop-in and masks, and write separate root-owned /run/carlos-group-maintenance tmpfiles rule outside service ownership walk. No agent receipt read.;rev3=census-ruling-gvisor-demos;basis=Create the rootfs parent at 0700 and runtime root at 0755. Existing host.env/unit reads unchanged; workload templates remain unarmed.;rev3=census-ruling-platform-mail-submission;basis=Task 3: the sysusers.d/carlos.conf it writes is now the constant sysusersConf, which adds "u carlos-mailer - \"CARLOS mailer\" - /usr/sbin/nologin" ahead of the existing "g carlos-sockets -" line, so the tmpfiles line naming group carlos-mailer resolves on a box whose confs arrive by a staged-tree refresh. Constant text, no input; no read added. file:Command@12045,file:ReadFile@564,file:ReadFile@7111 62fa76ad0fa812a0effc7c6add43ddcf54313450c13f20fbb2fee9d004488588
@@ -24,9 +24,9 @@
@legacy 683a26c2185a385d210ce4b376f13740422e0e405a09e402953a0457ca608508 infra/modules/region-host/mailer.tf external legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 8, new: with var.mailer set (default null: nothing), aws_iam_user.mailer carlos-mailer-<region> at path /carlos-mailer/ (precondition: ses_account_id is the module's own account) and aws_iam_user_policy.mailer with ses:SendRawEmail on identity/*, configuration-set/carlos-* and tenant/carlos-*/* in ses_region (the tenant per Task 8 review P2-1, as the console's own policy grants its tenant), and s3:GetObject on apps/*/*/email/senders/*, apps/*/*/instances/* and accounts/*/email/domains/* (plus kms:Decrypt via S3 only when a bucket KMS key is given). No s3:ListBucket, no write, no IAM action, no access key resource (the key never enters state). The host role gains nothing. In group mode two String region parameters, CARLOS_MAIL_REGION and CARLOS_DEPLOYMENT_REGION, under the region's existing /carlos/<deployment>/<region>/ path, which host-env write --group already reads and validates against hostenv's allowlist. References no sibling script; nothing a box's root runs or reads beyond those two plain values. file:external@0 a48c782bf4f63f5121c6ccae7d19793f0af4c9f9856127319f6bb9014357890f
@legacy 1dfce6c598f867f9f8e3251758ab91e9a1d16656d9831806b5fab5b8c5421952 infra/modules/region-host/tests/mailer.tftest.hcl external legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 8, new: plan-only runs under mock_provider: off by default; the user's name and path; the policy's two statements exactly; no ListBucket, Put, delete, SendEmail, IAM or wildcard action; KMS adds decrypt through S3 only; another account refused; a bad region refused; the host role gains no SES. Test-only. file:external@0 d8f1e5acb446a2e33848958b3ea036ab81c1f17565ab8df5409883b0afb39164
@legacy e22f1e9844d61fe949ab40748b17135bde43efa378e310b484c471ffbce7eed9 infra/modules/region-host/tests/mailer_group.tftest.hcl external legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 8, new: plan-only runs under mock_provider with group.tftest.hcl's fixtures (plus an AMI override): the two region parameters' names and values with mailer set, none without. Test-only. file:external@0 c36b70fc72d0b317db438c66a7e669a49a92ddce904ae8307f3503031c53f73f
-@legacy 9c70d586be7aafa1e5c00e564bfac7347f702aed86c67a2072e95d58545d5e00 internal/activator/backend_exec.go ExecBackend.controlMount legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 4, new: the one composer of a control socket's verbs, for both bind sites. Mounts the schedule verbs and GET /updates exactly as the two inline copies did (same conditions, same host, token reader and write fence), and POST /v1/mail (mailsubmit.Mount) under its own condition, b.Mail != nil. Reads rt.Host and passes the route to Mount; returns nil when nothing is mounted. The agent (carlos-edge.service, user carlos), not root. Fable P2-9: passes b.MailSwitch to mailsubmit.Mount. No read added. registry:Host@292,registry:Host@347,registry:Host@426,whole:Route@515 df735c417720309504a5623549c6f02ec8050bcbdcb8b42d05ef31380710ca93
-@legacy bce32b49d764738f9b80e81a4b6473b446149bb1e62062886297d1431cc4cc4e internal/activator/backend_exec.go ExecBackend.mailSubmits legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 4, new: the CARLOS_MAIL rule. Reads rt.App, rt.Host, rt.Provisioned and RouteAccount(rt) from the agent's own registry row, and asks b.MailSwitch (the agent's cache of the console-written app sender record, internal/host/mailswitch.go: one bounded Get of apps/<acct>/<app>/email/senders/app.json through the agent's deploy store). Logs once per host at error level for an unprovisioned route of a switched app. Agent, not root; no file read. registry:App@213,registry:App@526,registry:Host@317,registry:Host@511,registry:Provisioned@246,whole:Route@185 cfd7494b38dc64c2710233dbc2da850eb7b89fc9aecfa648cd7affd5e9a354d0
-@legacy 3b93bc668acb347c8b3a81163a8718993c852cb5675cc33c30a431a42d22b331 internal/activator/mailbuild.go ExecBackend.warnUndeclaredMailBuild legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 6, new: design decision 10's loud log, never a refusal (a refused wake would turn a mail gap into a site outage). Asks the agent's switch cache (MailSwitch) and reads the staged manifest of the version being spawned through ManifestOf (release.ReadStagedManifest, the read TierOf already makes); logs at error level and emits one instance event per (host, version). Agent, not root; reads only what the spawn already reads. registry:App@1201,registry:App@219,registry:App@848,registry:Host@1177,registry:Host@249,registry:Host@819,whole:Route@1228,whole:Route@191,whole:Route@368 e36bed0c8ebdd741227e4805972b569f78497105874c75832dbcb0ccf17956f3
+@legacy 695579261117dd7b8ecd6ebbe00980d65f627ec951aa51633bec2feb1c1aaab7 internal/activator/backend_exec.go ExecBackend.controlMount legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 4, new: the one composer of a control socket's verbs, for both bind sites. Mounts the schedule verbs and GET /updates exactly as the two inline copies did (same conditions, same host, token reader and write fence), and POST /v1/mail (mailsubmit.Mount) under its own condition, b.Mail != nil. Reads rt.Host and passes the route to Mount; returns nil when nothing is mounted. The agent (carlos-edge.service, user carlos), not root. Fable P2-9: passes b.MailSwitch to mailsubmit.Mount. No read added. Fable final P2-2: passes b.mailVerbSwitched (b.MailSwitch, with an unknown switch forwarded to the mailer, which reads the switch itself and refuses an unswitched app) in place of b.MailSwitch. No read added. registry:Host@292,registry:Host@347,registry:Host@426,whole:Route@515 f6030dc1c42e45b98226a433509a7550abf15525ad8ff05c1a93d4facc3be084
+@legacy 920e4835a37f7525008217f8ce9f46ae7217c46d495d5a684bba4498204b803c internal/activator/backend_exec.go ExecBackend.mailSubmits legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 4, new: the CARLOS_MAIL rule. Reads rt.App, rt.Host, rt.Provisioned and RouteAccount(rt) from the agent's own registry row, and asks b.MailSwitch (the agent's cache of the console-written app sender record, internal/host/mailswitch.go: one bounded Get of apps/<acct>/<app>/email/senders/app.json through the agent's deploy store). Logs once per host at error level for an unprovisioned route of a switched app. Agent, not root; no file read. Fable final P2-2: MailSwitch is three-valued. An unknown switch (the agent could not read the record) is decided from fileEnv, the environment the instance is about to start with and already read by the spawn: submit when it holds a non-empty *_MAIL_FROM and no non-empty *_SMTP_HOST (mailUnknownSubmits), logged once per host. A tenant can write fileEnv, so it can make its own instance submit; the mailer reads the switch itself and refuses an unswitched app, so that grants nothing. Agent, not root; no file read added (+registry:Host for the log key). registry:App@1044,registry:App@243,registry:App@666,registry:Host@1029,registry:Host@386,registry:Host@674,registry:Host@835,registry:Provisioned@764,whole:Route@212 9a30f4766509ef6e113775cabcd824d7984353b7cc4f3c9be0e53d0fa3759738
+@legacy 537d412b155b7dec261d1a571e8ae25295706d796cf273ffe240b868839853e7 internal/activator/mailbuild.go ExecBackend.warnUndeclaredMailBuild legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 6, new: design decision 10's loud log, never a refusal (a refused wake would turn a mail gap into a site outage). Asks the agent's switch cache (MailSwitch) and reads the staged manifest of the version being spawned through ManifestOf (release.ReadStagedManifest, the read TierOf already makes); logs at error level and emits one instance event per (host, version). Agent, not root; reads only what the spawn already reads. Fable final P2-2: MailSwitch is three-valued; logs only for a switch read as on, never for an unknown one. No read added. registry:App@1216,registry:App@218,registry:App@863,registry:Host@1192,registry:Host@264,registry:Host@834,whole:Route@1243,whole:Route@191,whole:Route@383 55a0c1dc213858a9172ed5af4477e778f488470f109cb0ea1a2ca108bae0befe
@legacy d6700cb69f36e6e7cb8fdf4f4b747269ba9bf6545143e4dd943acedc018bc4b1 internal/host/mailerreport.go mailerArmed legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 3, new: the agent's MailerArmed probe. Stats the constant socket path and dials it for GET /v1/health with a 2 s timeout; true only on a 200. Runs in the agent as carlos, never as root; the path is a constant, in a root-owned 0750 root:carlos directory nothing a tenant or an app can write. Answers a bool into the private status block. file:Stat@72 6fd83d5c27429d06864d02a141f7036c2f3e1e8e89366ad6d2a232d417420052
@legacy 85d678c6a608ff70b7a60141d0efde911544f4b7aa9a7d9508f0e13cf2b7e724 internal/host/units/carlos-mailer-arm.path external legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 3, new: [Path] PathExists=/etc/carlos-mailer/keys, Unit=carlos-mailer.socket, WantedBy=multi-user.target; enabled and armed by bootstrap like every .path. PID 1 watches a path in a root-owned 0750 root:carlos-mailer directory only root (the operator) writes; it starts a socket unit and reads nothing. file:external@0 6b28c6282ee930560f859f20c752c65f0e550412b9c6ffb1fc10c292a3941a2a
@legacy 4ad5b393a6c6cc39f01cf25506e98100e3075bd2f06594d763978b8605d8e48d internal/host/units/carlos-mailer.service external legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 3, new: runs /opt/carlos/carlos mailer serve as the static user carlos-mailer (never root), socket-activated, ConditionPathExists=/etc/carlos-mailer/keys, EnvironmentFile=-/etc/carlos/host.env (read by PID 1, as every carlos service's) with UnsetEnvironment= of every credential a host.env may carry (CARLOS_SECRETS_KEY, CARLOS_RELEASE_KEY, the tunnel, service, sidecar and DNS tokens, the alert webhook, CARLOS_ADMIN_TOKEN, CARLOS_INSTANCE_KEY, AWS keys and profiles; review round 1 Task 3 P3), AWS_EC2_METADATA_DISABLED=true, IPAddressDeny=169.254.169.254/32 fd00:ec2::254/128, StateDirectory=carlos-mailer 0700, and the relay's hardening block with no ReadWritePaths; Environment=GOMEMLIMIT=288MiB with MemoryHigh=320M and MemoryMax=384M for four 10 MiB sends (review round 1, Task 5 P3). No root process reads anything new; the mailer reads its own key file and state. file:external@0 3b9c4fa4c4487653863e3140d4007a8c873b031649f9e53b318b4802305c085e
@@ -38,7 +38,7 @@
@legacy c577b1c36d95d7616e46d796828771d5e9a7d2b7229d0c6b3353c3ec4c313bf7 internal/mailer/keys.go loadKeys legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 5, new: reads /etc/carlos-mailer/keys (a constant path) as carlos-mailer: refuses anything but a regular 0640 file owned by root and group carlos-mailer, more than two keys, or a malformed line; errors never carry a secret. Root never reads it. The file is written by the operator by hand, in a 0750 root:carlos-mailer directory uid carlos cannot traverse. file:Open@68,file:ReadFrom@488,file:Stat@154 c86150ed82395d1051892825ea4893a289e2eda699372974c4373845794d707d
@legacy 92d90fe8f4ae11810f6e85c8df7ceb2a4024c8da10e42c8788ee154f5b8a60ce internal/mailsubmit/forward.go SocketForwarder.Send legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 4, new: the agent's client to the mailer: one HTTP POST of /v1/send over a fresh dial of the constant /run/carlos-mailer/mailer.sock, 60 s timeout, answer read to at most 64 KiB and decoded. Runs in the agent, as carlos. The socket's directory is root's; the mailer at the other end is a separate uid. file:ReadAll@885 b1c14436f42f60c4157ad0dffb1b998931a58b3a2ebf545578ff6d2e243dcd58
@legacy ead0c42093b81b9b0a1770f97bf0cd82b051ceccb4db0a4f3ee2cdb118f4e776 internal/mailsubmit/verb.go Mount legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 4, new: POST /v1/mail on an instance's control socket. The bearer by the existing verbs' rule (empty or unreadable token refuses everything; SHA-256 constant-time compare); MaxBytesReader(14 MiB), the JSON envelope, base64 raw of at most 10 MiB, 1 to 50 non-empty recipients, a non-empty from, else 400 BAD_REQUEST; at most 2 messages per socket in the agent at once, the next 429 RATE (review round 1, Task 4 P3). Stamps account, app and host from the route the socket was bound for, never from the body, and forwards; a transport error or an answer outside 200/400/403/429/503 is 503 MAILER_UNAVAILABLE. Runs in the agent, as carlos; the body is a tenant's and is only decoded and forwarded, never used to name a path, route or account. Fable P2-9 (2026-11-14): takes the agent's switch read (ExecBackend.MailSwitch) and answers 403 SUBMISSION_OFF before reading the body when the route's app is not switched; a package-level bound of MaxInFlight messages across every socket answers 503 MAILER_UNAVAILABLE. No read added: the switch is the agent's in-memory cache. registry:App@193,registry:Host@201,whole:Route@188 ea96879be3ed7737161f75b774458e635bcb87c919782317421f1b8b64fb8fd2
-@legacy 9d438dcdbaabed1854fa668aa67b6b86f60ede58d5d3d2ba3c3dcb410a9f1976 internal/activator/backend_exec.go ExecBackend.agentOwnedVars legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only.;rev3=census-ruling-platform-mail-submission;basis=Task 4: also decides CARLOS_MAIL through mailSubmits: set to "submit" only when the control socket bound, the verb is mounted, the app sender's switch is on and the route is Provisioned; stripped otherwise, a tenant-supplied value from fileEnv included. agentOwnedNames and moves.AgentOwnedVars gain it as a pinned pair. Only narrows what a tenant's files can set. Agent, not root. registry:Host@1209,whole:Route@1171,whole:Route@631 7cc1bcb0b415ee478350a0519799542e0b1e5419c94121519c6e1b349d613c10
+@legacy a234ce265f7d1305c520106916cac40dc6d5029df1fb99d3893a5da0edef349d internal/activator/backend_exec.go ExecBackend.agentOwnedVars legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only.;rev3=census-ruling-platform-mail-submission;basis=Task 4: also decides CARLOS_MAIL through mailSubmits: set to "submit" only when the control socket bound, the verb is mounted, the app sender's switch is on and the route is Provisioned; stripped otherwise, a tenant-supplied value from fileEnv included. agentOwnedNames and moves.AgentOwnedVars gain it as a pinned pair. Only narrows what a tenant's files can set. Agent, not root. Fable final P2-2: passes fileEnv to mailSubmits, which reads it only to decide an unknown switch; CARLOS_MAIL is still set or stripped by the agent alone. No read added. registry:Host@1218,whole:Route@1180,whole:Route@631 952387129dd18e38eb1e26fa72ea34082b81fddf3f64daf33ed78264f4433943
@legacy 1f1d689a9e588993d353a6b73ee82dc3821e4ddeedf24c8a1662ac724b84283b internal/activator/backend_exec.go ExecBackend.spawnChildFrom legacy accepted-legacy accepted-legacy;rev3=census-ruling-zddr3;basis=Census ruling zddr3: changed legacy row (comment-only change describing the shim placement); the same class as the accepted-legacy Manager.startIn and placementLive under fix1-merge-review (existing agent delegated-cgroup management remains legacy); no root decision; no registry, /data, release or claim reads. Boundary: the agent's own delegated cgroup subtree (including its scratch probe child), /proc/self, and pipes to and from its own parent, running as carlos.;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos (the flat start body): the same change as seedChild: ensureAdminTokenFor(ctx, rt, paths) for the token (the same flat path), the key's producer carrying the HA mint decision, and launchEnvLayer(ctx, rt) for the env and key layer the replica gate reads; a non-HA host's token, key and env are produced and read as before; +whole:Route; only adds refusals for HA hosts;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only.;rev3=census-ruling-edge-page-cache-1;basis=the control listener is now built with the whole route (edge.ListenControl(controlSocket, rt, ...)), the +whole:Route site; it computes the launch inputs once from the build it execs by path (a staged exe's caller-named build, or the gate-resolved pinned version; "" for an unpinned live link) and fileEnv it already read, keeps them on the childProc, and for a live-link spawn publishes them to the in-memory cache (NoteProcessInputs) beside the existing purge; no new file read;rev3=census-ruling-gvisor-demos;basis=Task 5: gate launch using startup-captured mode and existing route/role/layout before preparation or execution; migrate structured root start identity and reject mismatches. Unsupported gVisor paths refuse; native behavior and existing root authority checks retained. No new root read source. Merge2 e8a1ddde: retain main build parameter, pinned live identity, launchInputs from captured build/environment, and current-process input publication. edge.ListenControl now receives the whole Route as main requires (+whole:Route); no new filesystem or storage input. Branch sandboxLaunch remains before preparation and spawn; existing direct primitive gate unchanged.;rev3=census-ruling-security-review-mitigations;basis=Enforce the unchanged never-served resident refusal once at the shared flat/foreign primary binary spawn sink, before placement, live-link/token/env/control preparation or execution. Covers plain, generation and staged Service wakes; existing served/explicit-flat exemptions and other gates retained. No new filesystem/store source.;rev3=census-ruling-instance-gomemlimit-991;basis=#991: the agent as carlos (flat exec child): resolves the zero tier once with the existing b.tier(rt) live-tier read (the +whole:Route site) and passes it to spawnInCgroupAtTier, which previously made the same read itself. Inside the build closure (which the cgroup manager calls after writing the limits) it asks cgroup.Manager.Capped(host, child, tier), a read of memory.max in the agent's own delegated cgroup subtree, and only when that reads back as the tier adds GOMEMLIMIT=GoMemLimitOf(tier.MemoryMax) to the child env, unless the app's fileEnv names it. No delegation, a cgroup that could not be made, or a failed memory.max write gives no default (Astra R1 P2-1). Containment behaviour unchanged; no gate moved or weakened; no registry, /data, release or store read added.;rev3=census-ruling-platform-mail-submission;basis=Task 4: the inline mount (Timers, UpdatesReader) is replaced by b.controlMount(rt, tokenReader, n): the same verbs under the same conditions, plus the mail verb when b.Mail is set. The three rt.Host reads move into controlMount; the route is passed whole. Agent, not root; nothing else changes. Task 6: also calls warnUndeclaredMailBuild with the route and the version being spawned (a log line and an instance event, never a refusal). file:Command@11633,registry:Host@13029,registry:Host@13390,registry:Host@13484,registry:Host@258,registry:Host@4236,registry:Stateless@11564,whole:Route@11456,whole:Route@11605,whole:Route@12126,whole:Route@13781,whole:Route@13873,whole:Route@1527,whole:Route@189,whole:Route@1944,whole:Route@2305,whole:Route@287,whole:Route@4091,whole:Route@4119,whole:Route@4430,whole:Route@476,whole:Route@6501,whole:Route@7027,whole:Route@9259,whole:Route@9383,whole:Route@9432 3d41b02bd489afc873fb9b89d214dc338348aea37fb3de8a138dc26cde6b69ad
@legacy f8548413a8fdccad95a1cd9c588a06c14b54de6eb4d3208fbb72495308946c97 internal/activator/backend_exec.go ExecBackend.spawnUnitFrom legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=Re-digested at the pre-land merge: the body includes main's own change under census ruling 292, with no further change from this branch. the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body; it calls prepareKeyedAt and keeps the launch environment and its key layer on the generation's handle; read sites unchanged, offsets moved;rev3=census-ruling-wake-latency-2;basis=times the launch's steps with time.Now() (build, prepare, launch file, gate, root start) and adds them to its existing "started" journal line; no read added or moved;rev3=census-ruling-rootfs-apps-2;basis=the unit names in its error and log lines go through runUnitName, and newUnitProcFor's new error (a role with no unit to observe) fails the start as markStartUncertain after root started the unit; the binary spawn is otherwise unchanged, a rootfs row never reaches it (nestedGate refuses one); no read added;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only.;rev3=census-ruling-edge-page-cache-1;basis=computes the page cache launch inputs once (launchInputs: sha256 over the staged or pinned exe's Version and the fileEnv this spawn already read; "" with no exe, since root binds the movable live link) and keeps them on the unit handle (up.inputs); no new file, registry or bucket read; read sites unchanged (29); no read added;rev3=census-ruling-gvisor-demos;basis=Task 5: gate launch using startup-captured mode and existing route/role/layout before preparation or execution; migrate structured root start identity and reject mismatches. Unsupported gVisor paths refuse; native behavior and existing root authority checks retained. No new root read source. Merge2 e8a1ddde: retain main launchInputs computed from the captured file environment and pinned/staged build and store them on the handle, alongside branch sandbox gate, validated root StartResponse Unit/Sandbox/InvocationID and all uncertain-start cleanup. No new direct read.;rev3=census-ruling-fix-silent-start-kill-861;basis=#861: one log line before killFailedGen naming the host, the generation unit (runUnitName) and the error already in hand; the +registry:Host sites are those two arguments to log.Printf; no new read source, behaviour unchanged;rev3=census-ruling-instance-gomemlimit-991;basis=#991: the agent as carlos (nested start): resolves the zero tier once (b.tier(rt), the existing live-tier read), adds GOMEMLIMIT=GoMemLimitOf(tier.MemoryMax) to the launch file env unless the app's fileEnv already names it (withGoMemLimit; skipped under gVisor, where root supplies its own and drops any launch value), passes that same tier to startRole, and logs it. No new read source; root still validates memory_max against the size table; read sites unchanged.;rev3=census-ruling-platform-mail-submission;basis=Task 6: calls warnUndeclaredMailBuild with the route and the version being spawned. Logs and emits an instance event once per (host, version) when the app is switched and the staged manifest does not declare --mail submit; never refuses. Agent, not root. registry:Host@1308,registry:Host@2277,registry:Host@2382,registry:Host@2513,registry:Host@2970,registry:Host@4046,registry:Host@4407,registry:Host@5175,registry:Host@5761,registry:Host@6026,registry:Host@6183,registry:Host@6204,registry:Host@6425,registry:Host@6610,registry:Host@7005,registry:Host@7266,registry:Host@7375,registry:Host@8374,registry:Host@8468,registry:Stateless@2327,whole:Route@1093,whole:Route@1472,whole:Route@1714,whole:Route@197,whole:Route@2127,whole:Route@2367,whole:Route@3027,whole:Route@3082,whole:Route@4282,whole:Route@431,whole:Route@6258,whole:Route@7455,whole:Route@995 ddbf6eef60b08fca97a3b63af8a931efb73e014392059996073d41811b488493
@legacy fa76f66ed1ce2b9e9b96dd442f08e32b99d090fa72055b83bb9c2fa35a4907db internal/activator/prepare.go ExecBackend.listenControl legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-edge-page-cache-1;basis=passes the whole route to edge.ListenControl instead of rt.Host (the -registry:Host +whole:Route change); nothing else;rev3=census-ruling-platform-mail-submission;basis=Task 4: the same replacement as spawnChildFrom, with gen as the write fence's generation, so the nested and rootfs listener mounts exactly what the flat one does. Agent, not root. registry:Host@508,whole:Route@361,whole:Route@389 f6534861cdbeef80dbcfaf6b07df685e4ac2f2a86650db54f174871526a50aff
@@ -47,7 +47,7 @@ cli.go runShip legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;r
infra/modules/region-host/outputs.tf external legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-region-ha-p3b;basis=Keep fixed outputs through indexed resources, return null for group instance/EIP, and expose group, pinned template, ingress and boot-parameter names. Operator Terraform outputs only; no new box read.;rev3=census-ruling-region-ha-g2-fixes;basis=Expose the module alert topic ARN, null without an alerts topic; no new box runtime read.;rev3=census-ruling-region-ha-g3-fixes;basis=Return the selected existing or module-created alert topic ARN, null when neither input is set. Terraform output only; no new root runtime read.;rev3=census-ruling-managed-fleets-2b1;basis=managed fleets 2b-1 Task 5: three outputs, managed_fleet_user_boundary_arn, managed_fleet_user_path and managed_fleet_bucket_prefix, each null unless managed_fleets_enabled; Terraform outputs for the operator only; no box runtime read is added;rev3=census-ruling-w6-ingress-drain;basis=new output ingress_target_groups: the ARNs joined with commas in fixed mode when set, null otherwise and in group mode; the operator copies it into the box's host.env (CARLOS_INGRESS_TARGET_GROUPS) by hand. Output only; no read added.;rev3=census-ruling-platform-mail-submission;basis=Task 8: output "mailer_user_name", the user's name or null. Read-only. file:external@0 fc7a4e1f10e52775047a9b0cedb636a00641e8f6831970baefea419871be9868
infra/modules/region-host/variables.tf external legacy accepted-legacy accepted-legacy;rev3=census-ruling-console-invite-delivery;basis=tofu on an operator's machine with the operator's AWS credentials (no box unit; no binary embeds the file): main's variables with console_mail_from (validated as one lowercase address) and console_mail_region, both empty by default; no read is added and nothing on a box reads the file;rev3=census-ruling-hunt-account-root-hardening;basis=adds deny_release_key_reads (bool, default true); no read is added and nothing on a box reads the file;rev3=census-ruling-region-ha-p3b;basis=Add default-fixed mode and validated group count, zones, pinned image/release/template, ingress, configuration key and transaction-open refusal. Operator-supplied Terraform values select root boot inputs; no direct box runtime read and no group activation by default.;rev3=census-ruling-region-ha-g2-fixes;basis=Add an empty-default set of additional alert topic ARNs, validating concrete SNS topic syntax and excluding wildcards/subscriptions; operator Terraform input, no box runtime read.;rev3=census-ruling-region-ha-g3-fixes;basis=Add optional alerts_topic_arn with concrete same-region SNS ARN validation and mutual exclusion with alerts_email. The caller owns the existing topic policy and subscriptions; no runtime sink is configured and no new root read is added.;rev3=census-ruling-managed-fleets-2b1;basis=managed fleets 2b-1 Task 5: five variables, managed_fleets_enabled (bool, default false, refused unless mode is fixed), managed_fleets_deployment, managed_fleets_regions (concrete ami/subnet/sg IDs, arm64 types, no ID in two regions), managed_fleet_bucket_prefix (1-24 chars, no reserved prefix, must not cover the deployment, data or staging buckets, disjoint from store_bucket_prefix) and managed_fleet_user_path (literal IAM path, disjoint from store_user_path); store_bucket_prefix and store_user_path gain a validation refusing *, ? or ${ only when managed fleets and object storage are both on; operator Terraform input only; no box runtime read and nothing on a box reads the file;rev3=census-ruling-fixedbox-health-alarms;basis=Add optional health_alerts_topic_arn (concrete same-region SNS ARN validation, empty default); enable_auto_recovery description covers both status alarms. Operator Terraform input; no box runtime read.;rev3=census-ruling-w6-ingress-drain;basis=new variable ingress_target_group_arns (list(string), default [], non-nullable) validated as distinct ELB target group ARNs (arn:aws(-x)*:elasticloadbalancing:<region>:<12 digits>:targetgroup/<name>/<16 hex>); drives the IAM policy and output above. No read added.;rev3=census-ruling-stats-prune-400;basis=new variable enable_analytics_version_prune (bool, default false) driving the policy above; operator Terraform input; no box runtime read;rev3=census-ruling-platform-mail-submission;basis=Task 8: variable "mailer", an object {ses_region, ses_account_id, deployment_bucket_region, optional deployment_bucket_kms_key_arn} defaulting to null, which creates nothing; validated (AWS region shapes, 12-digit account, KMS ARN or empty). file:external@0 4e3076d5835fcd03f51edcd5f6847371c2f2059598b4bf7841cba2aead5b3754
internal/activator/cmdunit.go ExecBackend.cmdVars legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): composes the command's environment over the serving generation's launch snapshot; the host comes from the row, never from a tenant file;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only.;rev3=census-ruling-platform-mail-submission;basis=Fable P3 (2026-11-14): a cmd one-shot's environment also strips CARLOS_MAIL, as seedVars does: a one-shot has no control socket, so it cannot submit mail. Only narrows what a run is given; no read added. Agent, not root. registry:Host@356,whole:Route@462 75f3a85e8bdbb5a27b22eeb094135628e315d4c4c80482040b836ceb44955ad9
-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.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: signals the owned replica worker on the existing tick; coalesced asynchronous execution, no timer or bucket scan added. merge of origin/main 7920cccf: Retain main box-role reader pass on the existing tick alongside the replica worker signal; merge-only body change, unchanged read sites.;rev3=census-ruling-restart-new-box-gap;basis=calls the optional restartGain hook (restartGainSeed) once per existing tick before the serial read; no new root path, timer or read kind; nil hook is unchanged;rev3=census-ruling-agent-start-demo-3;basis=Refresh moved notices through the shared watch before normal convergence; no new per-box poll. Census read-site delta: unchanged (1).;rev3=census-ruling-stateless-replicas-4-task1;basis=Signals the owned replica swap worker (armedReplicaDeploy.tick) beside the placement worker on the existing tick; coalesced background pass, no timer, no bucket read. Its transitions go through the console's authenticated /deploy.;rev3=census-ruling-platform-mail-submission;basis=Task 4: on a serial move, after the schedule leg, starts the armed mail switch cache's Refresh on its own goroutine (each read bounded at 2 s, overlapping refreshes skipped). It re-reads the app sender records already cached, through the agent's deploy store. Agent, not root; the tick waits on nothing new. registry:Host@5822 a1cd273f24047c63670f8c32c000a84f1a3861d058da38c5318551929f312390
+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.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: signals the owned replica worker on the existing tick; coalesced asynchronous execution, no timer or bucket scan added. merge of origin/main 7920cccf: Retain main box-role reader pass on the existing tick alongside the replica worker signal; merge-only body change, unchanged read sites.;rev3=census-ruling-restart-new-box-gap;basis=calls the optional restartGain hook (restartGainSeed) once per existing tick before the serial read; no new root path, timer or read kind; nil hook is unchanged;rev3=census-ruling-agent-start-demo-3;basis=Refresh moved notices through the shared watch before normal convergence; no new per-box poll. Census read-site delta: unchanged (1).;rev3=census-ruling-stateless-replicas-4-task1;basis=Signals the owned replica swap worker (armedReplicaDeploy.tick) beside the placement worker on the existing tick; coalesced background pass, no timer, no bucket read. Its transitions go through the console's authenticated /deploy.;rev3=census-ruling-platform-mail-submission;basis=Task 4: on a serial move, after the schedule leg, starts the armed mail switch cache's Refresh on its own goroutine (each read bounded at 2 s, overlapping refreshes skipped). It re-reads the app sender records already cached, through the agent's deploy store. Agent, not root; the tick waits on nothing new. Fable final P2-1: on a serial move, before the pass set and the restart leg, calls the armed cache's MarkStale (a counter bump under the cache's mutex; no I/O), so a spawn the move causes reads the switch again, bounded, instead of using an answer from before the move. No read added. registry:Host@6331 92553f6afaa845f4b1c35f2b5decd659bd1f6211beb3f202f9490bb2bb57b3cf
internal/host/agent.go provisionTickConfig legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-ha-p1a-433;basis=the agent (carlos-edge.service, user carlos) and the edges file loop's eligibility: the same CARLOS_POOLS read, now parsed by provision.ParseBoxPools (internal/provision, envelope re-pinned), the one parser boxPools also uses. "@shared" (provision.SharedPoolToken, never a valid pool name) is the shared "" pool; other tokens are literal as before; empty elements and repeats dropped. No read added.;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (Task 4, rule 2): sets ReconcileConfig.FleetBox to the box's own fleet label from resolveFleetIdentity(getenv), only when the identity resolves and region == PlacementTarget(identity.Fleet); otherwise it stays "" (the box admits only unlabelled records). The same environment the fleet loops already read; read sites unchanged (2). Agent config, not root.;rev3=census-ruling-platform-mail-submission;basis=Task 5: its region, pools and fleet label now come from BoxScopeFromEnv, which is the same three reads moved out unchanged (CARLOS_REGION trimmed, provision.ParseBoxPools(CARLOS_POOLS), and resolveFleetIdentity's label only when its fleet is the one the region places the box on), so the box-local mailer resolves "on this box" by the agent's rule. The ReconcileConfig it returns is field for field what it was. Agent, not root. data-literal@173,data-literal@214 cabe3cb9662118eb82ddbc77dbbdb80b6718494caea097c8ffb894ccc4903fe3
internal/host/agent.go statusLoop legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): the status tick's context carries the box's lifetime judge; read sites unchanged, offsets moved;rev3=census-ruling-rootfs-apps-2;basis=main's body as of the merge of origin/main 953b9fda (its later changes, regional box names and self-serve moves plan 1 among them, under main's own census rulings), where the tick fills rootfs_ready and rootfs_blocked from armedRootfs.Load().probe, which each tick runs NestedOK's checks and asks the control socket's GET /ready/rootfs (never the store); the same four direct sites;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Task 11 and #329 plan 3 Task 7: takes root's GET /egress reader and fills p.Egress = egressStatusProbe(egressStatus, routes, provision.PolicyReadStates()) and p.SizeCommittedMiB = sizeCommittedMiB(armedSizeSource.Load(), routes); the two added whole:Route sites are the tick's own registry list handed to those two units (decision rows), which read root's control socket and the activator's memory; no store request added; the four existing sites unchanged, offsets moved.;rev3=census-ruling-fleet-alerts-1;basis=the agent (carlos-edge.service, user carlos): the status tick passes os.Geteuid() to alertDeliveryProbe, which fills AlertDelivery.EngineBeat/EngineBeatWhy from engineBeatArmed (the env value and the euid only, no file access, root refused before the path is looked at), and fills Probes.DiskFullETAHours from diskETAProbe(&processDiskTrend, now), a Theil-Sen fit over the metrics loop's in-memory ring of disk readings; the same six sites, no read added, no store request added;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): the status tick's Probes gain HeldStreams: heldStreamsState(), which calls the edge's in-memory counters function (nil until the edge is ready). No file, bucket or registry access added.;rev3=census-ruling-stateless-replicas-3;basis=Fix round 1 Q20: read the detached in-memory replica snapshot source into Probes.ReplicaCopies on the existing five-minute tick. Existing six direct read sites unchanged. No additional bucket request, changed cadence or app lifecycle action.;rev3=census-ruling-agent-start-demo-3;basis=Report moved capability only when the serving edge reports readiness; report claim-seed support only with CARLOS_DEMO_CLAIM=1. Reads the explicit capability flag from the process environment; no new filesystem or registry read.;rev3=census-ruling-stateless-replicas-4-task5;basis=Task 5 fix round 1 (#511 R16 amendment): the status tick also fills Probes.ApplyFinished from systemApplyFinished(release.OptDir()), an Lstat of root's apply journal <opt>/system/router/journal.json in the root-owned, world-readable state directory: finished only when the journal is absent, any other answer unknown and so unfinished. Round 0: Probes.PrevRelease from prevReleaseOf (carlos.prev and carlos.prev.version, the files withMovesFields already reads). Reported in the private BoxMetrics block; no bucket request or cadence change.;rev3=census-ruling-offline-move-stage-refusals-339;basis=#339: the agent (carlos-edge.service, user carlos): the status tick fills p.OfflineMove = offlineMoveFactsProbe(routes); the added whole:Route site is the tick's own registry list handed to that unit, which under a non-root euid lists the names of root's <opt>/live and nothing else; no store request added.;rev3=census-ruling-platform-mail-submission;basis=Task 3 (plan gap G6 (b)): the status tick also fills Probes.MailerArmed from mailerArmed(mailwire.MailerSocket, 2s): a stat of /run/carlos-mailer/mailer.sock and, only when it is a socket, GET /v1/health on it. The agent (carlos-edge.service, user carlos), not root; reported in the private BoxMetrics block only. The same seven sites; no store request, no read of /etc/carlos-mailer (which uid carlos cannot traverse). whole:Route@10554,whole:Route@12628,whole:Route@12909,whole:Route@13267,whole:Route@6583,whole:Route@6610,whole:Route@7918 352bd5962a711a29f0f0f2f0d5e4d0a9a58f41ebf049e4f37ff41c31a4ea4eae
internal/host/bootstrap.go bootstrapWithGroup legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-p3b;basis=Move bootstrapWith body here, retaining host.env, embedded unit reads and tmpfiles execution. Group live caller holds root mutation guard; skip automatic update/recovery units, preserve Restart=no/nftables drop-in and masks, and write separate root-owned /run/carlos-group-maintenance tmpfiles rule outside service ownership walk. No agent receipt read.;rev3=census-ruling-gvisor-demos;basis=Create the rootfs parent at 0700 and runtime root at 0755. Existing host.env/unit reads unchanged; workload templates remain unarmed.;rev3=census-ruling-platform-mail-submission;basis=Task 3: the sysusers.d/carlos.conf it writes is now the constant sysusersConf, which adds "u carlos-mailer - \"CARLOS mailer\" - /usr/sbin/nologin" ahead of the existing "g carlos-sockets -" line, so the tmpfiles line naming group carlos-mailer resolves on a box whose confs arrive by a staged-tree refresh. Constant text, no input; no read added. file:Command@12045,file:ReadFile@564,file:ReadFile@7111 62fa76ad0fa812a0effc7c6add43ddcf54313450c13f20fbb2fee9d004488588
@@ -68,9 +68,9 @@ internal/status/snapshot.go CollectBox legacy accepted-legacy accepted-legacy;re
infra/modules/region-host/mailer.tf external legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 8, new: with var.mailer set (default null: nothing), aws_iam_user.mailer carlos-mailer-<region> at path /carlos-mailer/ (precondition: ses_account_id is the module's own account) and aws_iam_user_policy.mailer with ses:SendRawEmail on identity/*, configuration-set/carlos-* and tenant/carlos-*/* in ses_region (the tenant per Task 8 review P2-1, as the console's own policy grants its tenant), and s3:GetObject on apps/*/*/email/senders/*, apps/*/*/instances/* and accounts/*/email/domains/* (plus kms:Decrypt via S3 only when a bucket KMS key is given). No s3:ListBucket, no write, no IAM action, no access key resource (the key never enters state). The host role gains nothing. In group mode two String region parameters, CARLOS_MAIL_REGION and CARLOS_DEPLOYMENT_REGION, under the region's existing /carlos/<deployment>/<region>/ path, which host-env write --group already reads and validates against hostenv's allowlist. References no sibling script; nothing a box's root runs or reads beyond those two plain values. file:external@0 a48c782bf4f63f5121c6ccae7d19793f0af4c9f9856127319f6bb9014357890f
infra/modules/region-host/tests/mailer.tftest.hcl external legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 8, new: plan-only runs under mock_provider: off by default; the user's name and path; the policy's two statements exactly; no ListBucket, Put, delete, SendEmail, IAM or wildcard action; KMS adds decrypt through S3 only; another account refused; a bad region refused; the host role gains no SES. Test-only. file:external@0 d8f1e5acb446a2e33848958b3ea036ab81c1f17565ab8df5409883b0afb39164
infra/modules/region-host/tests/mailer_group.tftest.hcl external legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 8, new: plan-only runs under mock_provider with group.tftest.hcl's fixtures (plus an AMI override): the two region parameters' names and values with mailer set, none without. Test-only. file:external@0 c36b70fc72d0b317db438c66a7e669a49a92ddce904ae8307f3503031c53f73f
-internal/activator/backend_exec.go ExecBackend.controlMount legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 4, new: the one composer of a control socket's verbs, for both bind sites. Mounts the schedule verbs and GET /updates exactly as the two inline copies did (same conditions, same host, token reader and write fence), and POST /v1/mail (mailsubmit.Mount) under its own condition, b.Mail != nil. Reads rt.Host and passes the route to Mount; returns nil when nothing is mounted. The agent (carlos-edge.service, user carlos), not root. Fable P2-9: passes b.MailSwitch to mailsubmit.Mount. No read added. registry:Host@292,registry:Host@347,registry:Host@426,whole:Route@515 df735c417720309504a5623549c6f02ec8050bcbdcb8b42d05ef31380710ca93
-internal/activator/backend_exec.go ExecBackend.mailSubmits legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 4, new: the CARLOS_MAIL rule. Reads rt.App, rt.Host, rt.Provisioned and RouteAccount(rt) from the agent's own registry row, and asks b.MailSwitch (the agent's cache of the console-written app sender record, internal/host/mailswitch.go: one bounded Get of apps/<acct>/<app>/email/senders/app.json through the agent's deploy store). Logs once per host at error level for an unprovisioned route of a switched app. Agent, not root; no file read. registry:App@213,registry:App@526,registry:Host@317,registry:Host@511,registry:Provisioned@246,whole:Route@185 cfd7494b38dc64c2710233dbc2da850eb7b89fc9aecfa648cd7affd5e9a354d0
-internal/activator/mailbuild.go ExecBackend.warnUndeclaredMailBuild legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 6, new: design decision 10's loud log, never a refusal (a refused wake would turn a mail gap into a site outage). Asks the agent's switch cache (MailSwitch) and reads the staged manifest of the version being spawned through ManifestOf (release.ReadStagedManifest, the read TierOf already makes); logs at error level and emits one instance event per (host, version). Agent, not root; reads only what the spawn already reads. registry:App@1201,registry:App@219,registry:App@848,registry:Host@1177,registry:Host@249,registry:Host@819,whole:Route@1228,whole:Route@191,whole:Route@368 e36bed0c8ebdd741227e4805972b569f78497105874c75832dbcb0ccf17956f3
+internal/activator/backend_exec.go ExecBackend.controlMount legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 4, new: the one composer of a control socket's verbs, for both bind sites. Mounts the schedule verbs and GET /updates exactly as the two inline copies did (same conditions, same host, token reader and write fence), and POST /v1/mail (mailsubmit.Mount) under its own condition, b.Mail != nil. Reads rt.Host and passes the route to Mount; returns nil when nothing is mounted. The agent (carlos-edge.service, user carlos), not root. Fable P2-9: passes b.MailSwitch to mailsubmit.Mount. No read added. Fable final P2-2: passes b.mailVerbSwitched (b.MailSwitch, with an unknown switch forwarded to the mailer, which reads the switch itself and refuses an unswitched app) in place of b.MailSwitch. No read added. registry:Host@292,registry:Host@347,registry:Host@426,whole:Route@515 f6030dc1c42e45b98226a433509a7550abf15525ad8ff05c1a93d4facc3be084
+internal/activator/backend_exec.go ExecBackend.mailSubmits legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 4, new: the CARLOS_MAIL rule. Reads rt.App, rt.Host, rt.Provisioned and RouteAccount(rt) from the agent's own registry row, and asks b.MailSwitch (the agent's cache of the console-written app sender record, internal/host/mailswitch.go: one bounded Get of apps/<acct>/<app>/email/senders/app.json through the agent's deploy store). Logs once per host at error level for an unprovisioned route of a switched app. Agent, not root; no file read. Fable final P2-2: MailSwitch is three-valued. An unknown switch (the agent could not read the record) is decided from fileEnv, the environment the instance is about to start with and already read by the spawn: submit when it holds a non-empty *_MAIL_FROM and no non-empty *_SMTP_HOST (mailUnknownSubmits), logged once per host. A tenant can write fileEnv, so it can make its own instance submit; the mailer reads the switch itself and refuses an unswitched app, so that grants nothing. Agent, not root; no file read added (+registry:Host for the log key). registry:App@1044,registry:App@243,registry:App@666,registry:Host@1029,registry:Host@386,registry:Host@674,registry:Host@835,registry:Provisioned@764,whole:Route@212 9a30f4766509ef6e113775cabcd824d7984353b7cc4f3c9be0e53d0fa3759738
+internal/activator/mailbuild.go ExecBackend.warnUndeclaredMailBuild legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 6, new: design decision 10's loud log, never a refusal (a refused wake would turn a mail gap into a site outage). Asks the agent's switch cache (MailSwitch) and reads the staged manifest of the version being spawned through ManifestOf (release.ReadStagedManifest, the read TierOf already makes); logs at error level and emits one instance event per (host, version). Agent, not root; reads only what the spawn already reads. Fable final P2-2: MailSwitch is three-valued; logs only for a switch read as on, never for an unknown one. No read added. registry:App@1216,registry:App@218,registry:App@863,registry:Host@1192,registry:Host@264,registry:Host@834,whole:Route@1243,whole:Route@191,whole:Route@383 55a0c1dc213858a9172ed5af4477e778f488470f109cb0ea1a2ca108bae0befe
internal/host/mailerreport.go mailerArmed legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 3, new: the agent's MailerArmed probe. Stats the constant socket path and dials it for GET /v1/health with a 2 s timeout; true only on a 200. Runs in the agent as carlos, never as root; the path is a constant, in a root-owned 0750 root:carlos directory nothing a tenant or an app can write. Answers a bool into the private status block. file:Stat@72 6fd83d5c27429d06864d02a141f7036c2f3e1e8e89366ad6d2a232d417420052
internal/host/units/carlos-mailer-arm.path external legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 3, new: [Path] PathExists=/etc/carlos-mailer/keys, Unit=carlos-mailer.socket, WantedBy=multi-user.target; enabled and armed by bootstrap like every .path. PID 1 watches a path in a root-owned 0750 root:carlos-mailer directory only root (the operator) writes; it starts a socket unit and reads nothing. file:external@0 6b28c6282ee930560f859f20c752c65f0e550412b9c6ffb1fc10c292a3941a2a
internal/host/units/carlos-mailer.service external legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 3, new: runs /opt/carlos/carlos mailer serve as the static user carlos-mailer (never root), socket-activated, ConditionPathExists=/etc/carlos-mailer/keys, EnvironmentFile=-/etc/carlos/host.env (read by PID 1, as every carlos service's) with UnsetEnvironment= of every credential a host.env may carry (CARLOS_SECRETS_KEY, CARLOS_RELEASE_KEY, the tunnel, service, sidecar and DNS tokens, the alert webhook, CARLOS_ADMIN_TOKEN, CARLOS_INSTANCE_KEY, AWS keys and profiles; review round 1 Task 3 P3), AWS_EC2_METADATA_DISABLED=true, IPAddressDeny=169.254.169.254/32 fd00:ec2::254/128, StateDirectory=carlos-mailer 0700, and the relay's hardening block with no ReadWritePaths; Environment=GOMEMLIMIT=288MiB with MemoryHigh=320M and MemoryMax=384M for four 10 MiB sends (review round 1, Task 5 P3). No root process reads anything new; the mailer reads its own key file and state. file:external@0 3b9c4fa4c4487653863e3140d4007a8c873b031649f9e53b318b4802305c085e
@@ -82,17 +82,17 @@ internal/mailer/keys.go KeyFile.Changed legacy accepted-legacy accepted-legacy;r
internal/mailer/keys.go loadKeys legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 5, new: reads /etc/carlos-mailer/keys (a constant path) as carlos-mailer: refuses anything but a regular 0640 file owned by root and group carlos-mailer, more than two keys, or a malformed line; errors never carry a secret. Root never reads it. The file is written by the operator by hand, in a 0750 root:carlos-mailer directory uid carlos cannot traverse. file:Open@68,file:ReadFrom@488,file:Stat@154 c86150ed82395d1051892825ea4893a289e2eda699372974c4373845794d707d
internal/mailsubmit/forward.go SocketForwarder.Send legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 4, new: the agent's client to the mailer: one HTTP POST of /v1/send over a fresh dial of the constant /run/carlos-mailer/mailer.sock, 60 s timeout, answer read to at most 64 KiB and decoded. Runs in the agent, as carlos. The socket's directory is root's; the mailer at the other end is a separate uid. file:ReadAll@885 b1c14436f42f60c4157ad0dffb1b998931a58b3a2ebf545578ff6d2e243dcd58
internal/mailsubmit/verb.go Mount legacy accepted-legacy accepted-legacy;rev3=census-ruling-platform-mail-submission;basis=Task 4, new: POST /v1/mail on an instance's control socket. The bearer by the existing verbs' rule (empty or unreadable token refuses everything; SHA-256 constant-time compare); MaxBytesReader(14 MiB), the JSON envelope, base64 raw of at most 10 MiB, 1 to 50 non-empty recipients, a non-empty from, else 400 BAD_REQUEST; at most 2 messages per socket in the agent at once, the next 429 RATE (review round 1, Task 4 P3). Stamps account, app and host from the route the socket was bound for, never from the body, and forwards; a transport error or an answer outside 200/400/403/429/503 is 503 MAILER_UNAVAILABLE. Runs in the agent, as carlos; the body is a tenant's and is only decoded and forwarded, never used to name a path, route or account. Fable P2-9 (2026-11-14): takes the agent's switch read (ExecBackend.MailSwitch) and answers 403 SUBMISSION_OFF before reading the body when the route's app is not switched; a package-level bound of MaxInFlight messages across every socket answers 503 MAILER_UNAVAILABLE. No read added: the switch is the agent's in-memory cache. registry:App@193,registry:Host@201,whole:Route@188 ea96879be3ed7737161f75b774458e635bcb87c919782317421f1b8b64fb8fd2
-internal/activator/backend_exec.go ExecBackend.agentOwnedVars legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only.;rev3=census-ruling-platform-mail-submission;basis=Task 4: also decides CARLOS_MAIL through mailSubmits: set to "submit" only when the control socket bound, the verb is mounted, the app sender's switch is on and the route is Provisioned; stripped otherwise, a tenant-supplied value from fileEnv included. agentOwnedNames and moves.AgentOwnedVars gain it as a pinned pair. Only narrows what a tenant's files can set. Agent, not root. registry:Host@1209,whole:Route@1171,whole:Route@631 7cc1bcb0b415ee478350a0519799542e0b1e5419c94121519c6e1b349d613c10
+internal/activator/backend_exec.go ExecBackend.agentOwnedVars legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only.;rev3=census-ruling-platform-mail-submission;basis=Task 4: also decides CARLOS_MAIL through mailSubmits: set to "submit" only when the control socket bound, the verb is mounted, the app sender's switch is on and the route is Provisioned; stripped otherwise, a tenant-supplied value from fileEnv included. agentOwnedNames and moves.AgentOwnedVars gain it as a pinned pair. Only narrows what a tenant's files can set. Agent, not root. Fable final P2-2: passes fileEnv to mailSubmits, which reads it only to decide an unknown switch; CARLOS_MAIL is still set or stripped by the agent alone. No read added. registry:Host@1218,whole:Route@1180,whole:Route@631 952387129dd18e38eb1e26fa72ea34082b81fddf3f64daf33ed78264f4433943
internal/activator/backend_exec.go ExecBackend.spawnChildFrom legacy accepted-legacy accepted-legacy;rev3=census-ruling-zddr3;basis=Census ruling zddr3: changed legacy row (comment-only change describing the shim placement); the same class as the accepted-legacy Manager.startIn and placementLive under fix1-merge-review (existing agent delegated-cgroup management remains legacy); no root decision; no registry, /data, release or claim reads. Boundary: the agent's own delegated cgroup subtree (including its scratch probe child), /proc/self, and pipes to and from its own parent, running as carlos.;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos (the flat start body): the same change as seedChild: ensureAdminTokenFor(ctx, rt, paths) for the token (the same flat path), the key's producer carrying the HA mint decision, and launchEnvLayer(ctx, rt) for the env and key layer the replica gate reads; a non-HA host's token, key and env are produced and read as before; +whole:Route; only adds refusals for HA hosts;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only.;rev3=census-ruling-edge-page-cache-1;basis=the control listener is now built with the whole route (edge.ListenControl(controlSocket, rt, ...)), the +whole:Route site; it computes the launch inputs once from the build it execs by path (a staged exe's caller-named build, or the gate-resolved pinned version; "" for an unpinned live link) and fileEnv it already read, keeps them on the childProc, and for a live-link spawn publishes them to the in-memory cache (NoteProcessInputs) beside the existing purge; no new file read;rev3=census-ruling-gvisor-demos;basis=Task 5: gate launch using startup-captured mode and existing route/role/layout before preparation or execution; migrate structured root start identity and reject mismatches. Unsupported gVisor paths refuse; native behavior and existing root authority checks retained. No new root read source. Merge2 e8a1ddde: retain main build parameter, pinned live identity, launchInputs from captured build/environment, and current-process input publication. edge.ListenControl now receives the whole Route as main requires (+whole:Route); no new filesystem or storage input. Branch sandboxLaunch remains before preparation and spawn; existing direct primitive gate unchanged.;rev3=census-ruling-security-review-mitigations;basis=Enforce the unchanged never-served resident refusal once at the shared flat/foreign primary binary spawn sink, before placement, live-link/token/env/control preparation or execution. Covers plain, generation and staged Service wakes; existing served/explicit-flat exemptions and other gates retained. No new filesystem/store source.;rev3=census-ruling-instance-gomemlimit-991;basis=#991: the agent as carlos (flat exec child): resolves the zero tier once with the existing b.tier(rt) live-tier read (the +whole:Route site) and passes it to spawnInCgroupAtTier, which previously made the same read itself. Inside the build closure (which the cgroup manager calls after writing the limits) it asks cgroup.Manager.Capped(host, child, tier), a read of memory.max in the agent's own delegated cgroup subtree, and only when that reads back as the tier adds GOMEMLIMIT=GoMemLimitOf(tier.MemoryMax) to the child env, unless the app's fileEnv names it. No delegation, a cgroup that could not be made, or a failed memory.max write gives no default (Astra R1 P2-1). Containment behaviour unchanged; no gate moved or weakened; no registry, /data, release or store read added.;rev3=census-ruling-platform-mail-submission;basis=Task 4: the inline mount (Timers, UpdatesReader) is replaced by b.controlMount(rt, tokenReader, n): the same verbs under the same conditions, plus the mail verb when b.Mail is set. The three rt.Host reads move into controlMount; the route is passed whole. Agent, not root; nothing else changes. Task 6: also calls warnUndeclaredMailBuild with the route and the version being spawned (a log line and an instance event, never a refusal). file:Command@11633,registry:Host@13029,registry:Host@13390,registry:Host@13484,registry:Host@258,registry:Host@4236,registry:Stateless@11564,whole:Route@11456,whole:Route@11605,whole:Route@12126,whole:Route@13781,whole:Route@13873,whole:Route@1527,whole:Route@189,whole:Route@1944,whole:Route@2305,whole:Route@287,whole:Route@4091,whole:Route@4119,whole:Route@4430,whole:Route@476,whole:Route@6501,whole:Route@7027,whole:Route@9259,whole:Route@9383,whole:Route@9432 3d41b02bd489afc873fb9b89d214dc338348aea37fb3de8a138dc26cde6b69ad
internal/activator/backend_exec.go ExecBackend.spawnUnitFrom legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=Re-digested at the pre-land merge: the body includes main's own change under census ruling 292, with no further change from this branch. the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body; it calls prepareKeyedAt and keeps the launch environment and its key layer on the generation's handle; read sites unchanged, offsets moved;rev3=census-ruling-wake-latency-2;basis=times the launch's steps with time.Now() (build, prepare, launch file, gate, root start) and adds them to its existing "started" journal line; no read added or moved;rev3=census-ruling-rootfs-apps-2;basis=the unit names in its error and log lines go through runUnitName, and newUnitProcFor's new error (a role with no unit to observe) fails the start as markStartUncertain after root started the unit; the binary spawn is otherwise unchanged, a rootfs row never reaches it (nestedGate refuses one); no read added;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only.;rev3=census-ruling-edge-page-cache-1;basis=computes the page cache launch inputs once (launchInputs: sha256 over the staged or pinned exe's Version and the fileEnv this spawn already read; "" with no exe, since root binds the movable live link) and keeps them on the unit handle (up.inputs); no new file, registry or bucket read; read sites unchanged (29); no read added;rev3=census-ruling-gvisor-demos;basis=Task 5: gate launch using startup-captured mode and existing route/role/layout before preparation or execution; migrate structured root start identity and reject mismatches. Unsupported gVisor paths refuse; native behavior and existing root authority checks retained. No new root read source. Merge2 e8a1ddde: retain main launchInputs computed from the captured file environment and pinned/staged build and store them on the handle, alongside branch sandbox gate, validated root StartResponse Unit/Sandbox/InvocationID and all uncertain-start cleanup. No new direct read.;rev3=census-ruling-fix-silent-start-kill-861;basis=#861: one log line before killFailedGen naming the host, the generation unit (runUnitName) and the error already in hand; the +registry:Host sites are those two arguments to log.Printf; no new read source, behaviour unchanged;rev3=census-ruling-instance-gomemlimit-991;basis=#991: the agent as carlos (nested start): resolves the zero tier once (b.tier(rt), the existing live-tier read), adds GOMEMLIMIT=GoMemLimitOf(tier.MemoryMax) to the launch file env unless the app's fileEnv already names it (withGoMemLimit; skipped under gVisor, where root supplies its own and drops any launch value), passes that same tier to startRole, and logs it. No new read source; root still validates memory_max against the size table; read sites unchanged.;rev3=census-ruling-platform-mail-submission;basis=Task 6: calls warnUndeclaredMailBuild with the route and the version being spawned. Logs and emits an instance event once per (host, version) when the app is switched and the staged manifest does not declare --mail submit; never refuses. Agent, not root. registry:Host@1308,registry:Host@2277,registry:Host@2382,registry:Host@2513,registry:Host@2970,registry:Host@4046,registry:Host@4407,registry:Host@5175,registry:Host@5761,registry:Host@6026,registry:Host@6183,registry:Host@6204,registry:Host@6425,registry:Host@6610,registry:Host@7005,registry:Host@7266,registry:Host@7375,registry:Host@8374,registry:Host@8468,registry:Stateless@2327,whole:Route@1093,whole:Route@1472,whole:Route@1714,whole:Route@197,whole:Route@2127,whole:Route@2367,whole:Route@3027,whole:Route@3082,whole:Route@4282,whole:Route@431,whole:Route@6258,whole:Route@7455,whole:Route@995 ddbf6eef60b08fca97a3b63af8a931efb73e014392059996073d41811b488493
internal/activator/prepare.go ExecBackend.listenControl legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-edge-page-cache-1;basis=passes the whole route to edge.ListenControl instead of rt.Host (the -registry:Host +whole:Route change); nothing else;rev3=census-ruling-platform-mail-submission;basis=Task 4: the same replacement as spawnChildFrom, with gen as the write fence's generation, so the nested and rootfs listener mounts exactly what the flat one does. Agent, not root. registry:Host@508,whole:Route@361,whole:Route@389 f6534861cdbeef80dbcfaf6b07df685e4ac2f2a86650db54f174871526a50aff
internal/activator/rootfs.go ExecBackend.spawnRootfs legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-2;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=root-route (J1, as spawnUnitFrom, whose shape it has): new (rootfs Plan 2 Tasks 5 and 9): prepareKeyedAt (the instance's own directories, environment and listeners, unchanged), the schema-2 tenant launch file (environment only, CARLOS_SOCKET and CARLOS_DB set by the agent), the caller's exec gate, then StartRootfs over the control socket naming the image and web; root resolves the command from its own staged manifest (C4) and the tenant file may name no command (the trampoline refuses one); the failure handling is spawnUnitFrom's; its sites are the row's host and route; no root decision; final fix I1: root's answers that guarantee no start (ErrStartRefused: 503 not ready or claim-armed, 501 unconfigured, 400, 409, 507), like its 403, are marked a refusal (refuseRootfs), so verdictOf and classifyStep record no failure of the build and no stop is asked; a 502 and a transport failure still may have run; the same nineteen sites, offsets moved;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 fix wave 1 (d35fcb1f, census P1-1): takes the tier root is asked for as an argument; a zero tier means GenTier's (the former body), so a caller that chose a limit has it kept, as spawnChildFrom and spawnUnitFrom keep theirs; the same nineteen sites, no read added;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only.;rev3=census-ruling-edge-page-cache-1;basis=sets up.inputs = launchInputs(id.Version, fileEnv): the image version and env this spawn already read, hashed in memory; no new read; read sites unchanged (20); no read added;rev3=census-ruling-gvisor-demos;basis=Task 5: gate launch using startup-captured mode and existing route/role/layout before preparation or execution; migrate structured root start identity and reject mismatches. Unsupported gVisor paths refuse; native behavior and existing root authority checks retained. No new root read source. Merge2 e8a1ddde: retain main launchInputs on rootfs handle from existing staged image version and fileEnv. Keep branch sandbox gate and root identity validation. No new read.;rev3=census-ruling-fix-silent-start-kill-861;basis=#861: one log line before killFailedRootfsGen naming the host, the unit and the error already in hand; the +registry:Host site is that argument to log.Printf; no new read source, behaviour unchanged;rev3=census-ruling-platform-mail-submission;basis=Task 6: the same warnUndeclaredMailBuild call for a rootfs spawn. Agent, not root. registry:Host@1358,registry:Host@1531,registry:Host@1831,registry:Host@1950,registry:Host@2697,registry:Host@3034,registry:Host@3261,registry:Host@3388,registry:Host@3713,registry:Host@3841,registry:Host@390,registry:Host@3950,registry:Host@4667,registry:Host@4761,whole:Route@1105,whole:Route@1137,whole:Route@1224,whole:Route@199,whole:Route@2057,whole:Route@3094,whole:Route@4026,whole:Route@502,whole:Route@602,whole:Route@732 a19e5be10a746fec3fedc5715314f6cf00fa6f3d4be23db3242bf2f599a1a563
-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-agent-start-demo-1;basis=Passes the existing registry, data store and hibernation prefix into the demo worker, and the existing instance-control client into the demo before-exec hook. No alternate data store or polling loop. Merge resolution against origin/main 9bd45488 retains main's HA departure controller, lifecycle and duty wiring alongside the demo data store and worker; no read site added by the resolution.;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. No new external reads or 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. Preserve merged main's agent wiring and census basis; the branch removes one whole Route use by moving worker iteration to the helper, with no added read kind.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: arms a fleet-only worker using the existing registry, activator, backend and authenticated console transport. Owned worker stops and joins at shutdown. No new bucket reader. merge of origin/main 9b8b2c50: retain HA duty/departure lifecycle, wake-slot and existing agent wiring alongside the replica placement worker; no new read introduced by resolution. merge of origin/main 6be08467: Retain main demo configuration, admission, build and expiry wiring alongside the replica worker; merge-only body change, no additional read. merge of origin/main 7920cccf: Retain main box-role/group admission wiring and boot publication beside the owned replica worker and shutdown; main moves the boot registry List into runWorkerBootPassAfterAdmission, removing its inline whole Route site. No new read introduced by conflict resolution.;rev3=census-ruling-stateless-replicas-3;basis=Task 1 fix round 1 M3: retain the private snapshot source and cancel/join ownership, but use the replica-health-specific retry loop. It logs its first failure only and retains the existing exponential backoff capped at 30 seconds; unsupported builds return nil. Existing five direct read sites unchanged; no new credentials, bucket reader or app lifecycle action. Fix round 1 Q20: publish Edge.ReplicaSnapshots as a separate in-memory status source, leaving the tenant-visible Upstreams source unchanged. No new external reader or authority.;rev3=census-ruling-region-ha-p3b;basis=Load root-written group marker/configuration, configure signed boot binding and agent receipt completer, wire cancellable admission into departure work and expose cached GroupReaderSnapshot. New indirect boot reads use protected root files; agent-owned receipt controls duplicate initial completion only, never root restart permission. Same five direct sites. Merge 45cebde4 retains the replica health socket lifecycle and setReplicaSource beside GroupReaderSnapshot; no extra read beyond main.;rev3=census-ruling-agent-start-demo-2;basis=agent.go:309-329 opens demo-traffic.db beside the operator-configured registry when a demo domain exists, closes it at shutdown and wires drain-before-purge; :1010-1019 shares the worker and write gate; :1164-1177 installs the fleet identity and closed-until-worker serving callback. One added whole Route pass; the new indirect filesystem/SQL reads are claimed in openDemoTraffic and worker/store units. No request chooses the database pathname.;rev3=census-ruling-region-ha-p1b3b-s;basis=Wire the service duty view to authoritative cached sidecar manifest placement in LifetimeIndex and the edge sidecar projection; missing policy denies duty. Existing instance duty wiring remains.;rev3=census-ruling-region-ha-g2-t3;basis=T3a: wire eb.Page = PageOperator beside OwnerTerminated before departures arm, so suspect-holder pages work if departure setup fails; no new read; existing nine sites and authority unchanged; pages through the existing sink. T3b: publish the same backend through an atomic pointer for the metrics observer, and clear it on return; no new external read or authority.;rev3=census-ruling-agent-start-demo-3;basis=Wire the claim activator and root snapshot client into the demo worker; pass moved readiness to status reporting. Census read-site delta: unchanged (9).;rev3=census-ruling-region-ha-g2-fixes;basis=Wire local pool evidence, live withdrawal activator, startup ingress scan and alias publication, and edge lookup; no new direct sites; new indirect record/claim reads use existing store/judge paths described in ingress helpers.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3: starts the existing record-view backstop loop with a departure-inventory listener (non-blocking, coalesced signal) even without an armed RecordView; it requests the existing full pass (backstopFullDue) there. Same nine read sites; no new read or authority.;rev3=census-ruling-region-ha-graceful-terminate-t2;basis=Derive one signal-time deadline with a 90-second budget; cap departure stop and startup/seed/service shutdown joins by it. No read added.;rev3=census-ruling-static-sweep-periodic;basis=in the edge-ready callback, publishes e.LargestStaticTree in staticTreeSource for the disk alert line (diskAlertFrac in the metrics loop); in-memory wiring only, no read added; read sites unchanged (9);rev3=census-ruling-edge-page-cache-1;basis=wires the exec backend's CurrentInputs into the edge cache (wireCurrentInputs) and, in the ready hook after armEdgeAssetCache (whose returned store it now keeps), calls armEdgePageCache, which does nothing unless CARLOS_PAGE_CACHE=1; read sites unchanged (9); no read added;rev3=census-ruling-gvisor-demos;basis=Capture sandbox resolution and refusal once; log errors once; gate route admission and BeforeExec before process launch. No new root read. Task 5: pass the once-captured sandbox effective mode/config error into ExecBackend, UnitBackend and the immutable Client expectation. Same startup environment/registry reads; swapArming declines gVisor before placement. Task 8: arm read-only status projection with the existing Client.SandboxStatus callback. Agent status now queries the existing root /ready endpoint; no new root authority or guest-file input. Merge2 e8a1ddde: retain main wireCurrentInputs and armEdgePageCache through the existing asset-store ready hook alongside branch once-captured sandbox mode, wake gates and root status wiring. No new direct read; main page-cache helpers retain their own census overlays.;rev3=census-ruling-region-ha-held-build;basis=wires the drain state: svc.SetDrainingSource(boxDrain.IsDraining), svc.SetPeerDrainView(e.PeerDraining), e.SetPeerDrainedHook(svc.DropHoldersNaming); in-memory only; no read added; region HA held-requests Task 5: on group members, starts the drain driver over the activator, the edge and boxDrain, and serves its root-only drain socket; no read added beyond the socket's own Branch review r1: the drain state follows the root start fence on group members (the fence reader is the existing fenceLocation.read, a root-owned fixed path); e.SetPeerUndrainedHook(svc.AllowHoldersNaming) beside the drained hook (memory only); the drain socket serves only the agent's own user. No read added.;rev3=census-ruling-security-review-mitigations;basis=Wire the cached operator flat-layout choice into the exec backend's new-resident refusal; no read source added, existing authority retained.;rev3=census-ruling-w6-ingress-drain;basis=agent (user carlos), not root. Builds the ingress drain (newIngressDrain) with arming read at ask time from os.Getenv (CARLOS_REGION_HA, CARLOS_INGRESS_TARGET_GROUPS, both from the root-owned host.env), the fixed admission and lease.CurrentSelf (existing IMDS identity); its reader is awstg.Load, the box role's credentials calling ELB DescribeTargetHealth/DescribeTargetGroupAttributes (new AWS reads, by the agent). Wires admission.closeStartsForIngressDrain, the lbhealth drain condition, ingress.setEdge, and ingress.shutdownStarted in WithShutdownStarted. The drain socket (/run/carlos/.ha-drain/drain.sock, agent-user only, existing) is now also served on a fixed box with the drain configured (was group members only), routing /v1/ingress/* to the ingress drain and the group drain verbs to 404 there. armHADepartures now takes fixtureDepartureGetenv() and MakeQueue fixtureDepartureQueue(), which in a production (non-rootrunner) build are os.Getenv and nil, as before. Read sites unchanged (9).;rev3=census-ruling-stateless-replicas-4-task1;basis=Arms the fleet-only replica swap worker next to the placement worker: same console URL and fleet token as the existing replicaCoordinatorAPI, the existing activator Service; stops and joins at shutdown. No new read site, credential or bucket reader.;rev3=census-ruling-stateless-replicas-4-task2;basis=Task 2: sets deployWorker.step to the rollout scheduler answer for the record permit (replicaStepOf over armedRollout), an in-memory callback; no read site, credential or bucket reader added.;rev3=census-ruling-stateless-replicas-4-task2-fix2;basis=Task 2 fix round 2: the swap worker step is armedReplicaStep, the same lazy scheduler lookup as before as a named function; no read site added.;rev3=census-ruling-stateless-replicas-4-merge-main;basis=Merge of main 5fac2ff1: both sides changed it. Main (01d6ca78, linked-deployments-slice1) starts linkLoop beside tunnelLoop; this branch keeps its replica coordinator wiring. Both kept as-is; no read added.;rev3=census-ruling-stateless-replicas-4-final;basis=#511 final wave item 2: wires the swap worker's drive (armedReplicaDrive, the armed rollout manager's DriveReplicaRelease); no read added;rev3=census-ruling-stateless-replicas-4-merge-main2;basis=Merge of main af871da0 (v0.34.49): both sides changed it. Main (178dcfe5, member-backups-2a) moves the inline duty-view closure into armDutyView/dutyView and starts verifyAssignLoop; its sites drop by registry:Host and whole:Route x2 as main recorded them. This branch keeps its replica coordinator, swap worker and drive wiring. Both kept as-is; no read added.;rev3=census-ruling-stateless-replicas-4-drill3;basis=drill 3 R24: makes one in-memory channel, closes it (once) inside the edge's existing shutdown-started callback after ingress.shutdownStarted, and passes it to tunnelLoop, which drains only a fleet channel name; no read added, same six sites; touches no admission, lease, ingress drain, listener or file; the agent process, no root decision;rev3=census-ruling-edge-ppv2;basis=Agent (uid carlos), not root. memwatchLoop now gets edgeProxyCounters(&demoEdge) (in-process counters, no read). The drain socket's driver is newAgentDrainSocket(ingress, e, os.Getenv), which attaches the edge trust handler only when CARLOS_INGRESS_PROXY_SOURCES in the agent's environment (from the root-owned host.env) parses to a non-empty list; the socket is served when drainSocketServed: a group member or a configured ingress drain (both as before), or a box armed for PROXY protocol (new). The socket's path and agent-user-only permissions are unchanged. Read sites unchanged (6).;rev3=census-ruling-same-box-edge-fence;basis=Agent (uid carlos), not root. One added line: armEdgeFenceStatus(ctl.EdgeFence), beside the existing armExecSandboxStatus, so the layout report can ask root's /ready for the edge fence state over the control socket client the agent already holds. No read added.;rev3=census-ruling-platform-mail-submission;basis=Task 4: sets eb.Mail = mailsubmit.SocketForwarder{} on every box, and eb.MailSwitch to a mailSwitchCache's On that opens the deploy store itself through openDeployStore, retried at most once a minute with an error line until it opens (review round 1, Task 4 P3), armed for the serial-move refresh (armedMailSwitch). Task 6: also sets the ExecBackend's ManifestOf, the same staged-manifest read as TierOf (rt.App and RouteAccount(rt), hence +registry:App and +whole:Route), for the spawn-time check of decision 10, which logs and emits an event and never refuses. Agent, not root. file:Exec@21578,file:Open@2191,file:Statfs@57102,registry:App@13287,registry:App@13665,whole:Route@13279,whole:Route@13657,whole:Route@50580 ee6470495a59bc35232da4558dc1082c7c068dbee1893cf3c2da365557b9360b
+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-agent-start-demo-1;basis=Passes the existing registry, data store and hibernation prefix into the demo worker, and the existing instance-control client into the demo before-exec hook. No alternate data store or polling loop. Merge resolution against origin/main 9bd45488 retains main's HA departure controller, lifecycle and duty wiring alongside the demo data store and worker; no read site added by the resolution.;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. No new external reads or 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. Preserve merged main's agent wiring and census basis; the branch removes one whole Route use by moving worker iteration to the helper, with no added read kind.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: arms a fleet-only worker using the existing registry, activator, backend and authenticated console transport. Owned worker stops and joins at shutdown. No new bucket reader. merge of origin/main 9b8b2c50: retain HA duty/departure lifecycle, wake-slot and existing agent wiring alongside the replica placement worker; no new read introduced by resolution. merge of origin/main 6be08467: Retain main demo configuration, admission, build and expiry wiring alongside the replica worker; merge-only body change, no additional read. merge of origin/main 7920cccf: Retain main box-role/group admission wiring and boot publication beside the owned replica worker and shutdown; main moves the boot registry List into runWorkerBootPassAfterAdmission, removing its inline whole Route site. No new read introduced by conflict resolution.;rev3=census-ruling-stateless-replicas-3;basis=Task 1 fix round 1 M3: retain the private snapshot source and cancel/join ownership, but use the replica-health-specific retry loop. It logs its first failure only and retains the existing exponential backoff capped at 30 seconds; unsupported builds return nil. Existing five direct read sites unchanged; no new credentials, bucket reader or app lifecycle action. Fix round 1 Q20: publish Edge.ReplicaSnapshots as a separate in-memory status source, leaving the tenant-visible Upstreams source unchanged. No new external reader or authority.;rev3=census-ruling-region-ha-p3b;basis=Load root-written group marker/configuration, configure signed boot binding and agent receipt completer, wire cancellable admission into departure work and expose cached GroupReaderSnapshot. New indirect boot reads use protected root files; agent-owned receipt controls duplicate initial completion only, never root restart permission. Same five direct sites. Merge 45cebde4 retains the replica health socket lifecycle and setReplicaSource beside GroupReaderSnapshot; no extra read beyond main.;rev3=census-ruling-agent-start-demo-2;basis=agent.go:309-329 opens demo-traffic.db beside the operator-configured registry when a demo domain exists, closes it at shutdown and wires drain-before-purge; :1010-1019 shares the worker and write gate; :1164-1177 installs the fleet identity and closed-until-worker serving callback. One added whole Route pass; the new indirect filesystem/SQL reads are claimed in openDemoTraffic and worker/store units. No request chooses the database pathname.;rev3=census-ruling-region-ha-p1b3b-s;basis=Wire the service duty view to authoritative cached sidecar manifest placement in LifetimeIndex and the edge sidecar projection; missing policy denies duty. Existing instance duty wiring remains.;rev3=census-ruling-region-ha-g2-t3;basis=T3a: wire eb.Page = PageOperator beside OwnerTerminated before departures arm, so suspect-holder pages work if departure setup fails; no new read; existing nine sites and authority unchanged; pages through the existing sink. T3b: publish the same backend through an atomic pointer for the metrics observer, and clear it on return; no new external read or authority.;rev3=census-ruling-agent-start-demo-3;basis=Wire the claim activator and root snapshot client into the demo worker; pass moved readiness to status reporting. Census read-site delta: unchanged (9).;rev3=census-ruling-region-ha-g2-fixes;basis=Wire local pool evidence, live withdrawal activator, startup ingress scan and alias publication, and edge lookup; no new direct sites; new indirect record/claim reads use existing store/judge paths described in ingress helpers.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3: starts the existing record-view backstop loop with a departure-inventory listener (non-blocking, coalesced signal) even without an armed RecordView; it requests the existing full pass (backstopFullDue) there. Same nine read sites; no new read or authority.;rev3=census-ruling-region-ha-graceful-terminate-t2;basis=Derive one signal-time deadline with a 90-second budget; cap departure stop and startup/seed/service shutdown joins by it. No read added.;rev3=census-ruling-static-sweep-periodic;basis=in the edge-ready callback, publishes e.LargestStaticTree in staticTreeSource for the disk alert line (diskAlertFrac in the metrics loop); in-memory wiring only, no read added; read sites unchanged (9);rev3=census-ruling-edge-page-cache-1;basis=wires the exec backend's CurrentInputs into the edge cache (wireCurrentInputs) and, in the ready hook after armEdgeAssetCache (whose returned store it now keeps), calls armEdgePageCache, which does nothing unless CARLOS_PAGE_CACHE=1; read sites unchanged (9); no read added;rev3=census-ruling-gvisor-demos;basis=Capture sandbox resolution and refusal once; log errors once; gate route admission and BeforeExec before process launch. No new root read. Task 5: pass the once-captured sandbox effective mode/config error into ExecBackend, UnitBackend and the immutable Client expectation. Same startup environment/registry reads; swapArming declines gVisor before placement. Task 8: arm read-only status projection with the existing Client.SandboxStatus callback. Agent status now queries the existing root /ready endpoint; no new root authority or guest-file input. Merge2 e8a1ddde: retain main wireCurrentInputs and armEdgePageCache through the existing asset-store ready hook alongside branch once-captured sandbox mode, wake gates and root status wiring. No new direct read; main page-cache helpers retain their own census overlays.;rev3=census-ruling-region-ha-held-build;basis=wires the drain state: svc.SetDrainingSource(boxDrain.IsDraining), svc.SetPeerDrainView(e.PeerDraining), e.SetPeerDrainedHook(svc.DropHoldersNaming); in-memory only; no read added; region HA held-requests Task 5: on group members, starts the drain driver over the activator, the edge and boxDrain, and serves its root-only drain socket; no read added beyond the socket's own Branch review r1: the drain state follows the root start fence on group members (the fence reader is the existing fenceLocation.read, a root-owned fixed path); e.SetPeerUndrainedHook(svc.AllowHoldersNaming) beside the drained hook (memory only); the drain socket serves only the agent's own user. No read added.;rev3=census-ruling-security-review-mitigations;basis=Wire the cached operator flat-layout choice into the exec backend's new-resident refusal; no read source added, existing authority retained.;rev3=census-ruling-w6-ingress-drain;basis=agent (user carlos), not root. Builds the ingress drain (newIngressDrain) with arming read at ask time from os.Getenv (CARLOS_REGION_HA, CARLOS_INGRESS_TARGET_GROUPS, both from the root-owned host.env), the fixed admission and lease.CurrentSelf (existing IMDS identity); its reader is awstg.Load, the box role's credentials calling ELB DescribeTargetHealth/DescribeTargetGroupAttributes (new AWS reads, by the agent). Wires admission.closeStartsForIngressDrain, the lbhealth drain condition, ingress.setEdge, and ingress.shutdownStarted in WithShutdownStarted. The drain socket (/run/carlos/.ha-drain/drain.sock, agent-user only, existing) is now also served on a fixed box with the drain configured (was group members only), routing /v1/ingress/* to the ingress drain and the group drain verbs to 404 there. armHADepartures now takes fixtureDepartureGetenv() and MakeQueue fixtureDepartureQueue(), which in a production (non-rootrunner) build are os.Getenv and nil, as before. Read sites unchanged (9).;rev3=census-ruling-stateless-replicas-4-task1;basis=Arms the fleet-only replica swap worker next to the placement worker: same console URL and fleet token as the existing replicaCoordinatorAPI, the existing activator Service; stops and joins at shutdown. No new read site, credential or bucket reader.;rev3=census-ruling-stateless-replicas-4-task2;basis=Task 2: sets deployWorker.step to the rollout scheduler answer for the record permit (replicaStepOf over armedRollout), an in-memory callback; no read site, credential or bucket reader added.;rev3=census-ruling-stateless-replicas-4-task2-fix2;basis=Task 2 fix round 2: the swap worker step is armedReplicaStep, the same lazy scheduler lookup as before as a named function; no read site added.;rev3=census-ruling-stateless-replicas-4-merge-main;basis=Merge of main 5fac2ff1: both sides changed it. Main (01d6ca78, linked-deployments-slice1) starts linkLoop beside tunnelLoop; this branch keeps its replica coordinator wiring. Both kept as-is; no read added.;rev3=census-ruling-stateless-replicas-4-final;basis=#511 final wave item 2: wires the swap worker's drive (armedReplicaDrive, the armed rollout manager's DriveReplicaRelease); no read added;rev3=census-ruling-stateless-replicas-4-merge-main2;basis=Merge of main af871da0 (v0.34.49): both sides changed it. Main (178dcfe5, member-backups-2a) moves the inline duty-view closure into armDutyView/dutyView and starts verifyAssignLoop; its sites drop by registry:Host and whole:Route x2 as main recorded them. This branch keeps its replica coordinator, swap worker and drive wiring. Both kept as-is; no read added.;rev3=census-ruling-stateless-replicas-4-drill3;basis=drill 3 R24: makes one in-memory channel, closes it (once) inside the edge's existing shutdown-started callback after ingress.shutdownStarted, and passes it to tunnelLoop, which drains only a fleet channel name; no read added, same six sites; touches no admission, lease, ingress drain, listener or file; the agent process, no root decision;rev3=census-ruling-edge-ppv2;basis=Agent (uid carlos), not root. memwatchLoop now gets edgeProxyCounters(&demoEdge) (in-process counters, no read). The drain socket's driver is newAgentDrainSocket(ingress, e, os.Getenv), which attaches the edge trust handler only when CARLOS_INGRESS_PROXY_SOURCES in the agent's environment (from the root-owned host.env) parses to a non-empty list; the socket is served when drainSocketServed: a group member or a configured ingress drain (both as before), or a box armed for PROXY protocol (new). The socket's path and agent-user-only permissions are unchanged. Read sites unchanged (6).;rev3=census-ruling-same-box-edge-fence;basis=Agent (uid carlos), not root. One added line: armEdgeFenceStatus(ctl.EdgeFence), beside the existing armExecSandboxStatus, so the layout report can ask root's /ready for the edge fence state over the control socket client the agent already holds. No read added.;rev3=census-ruling-platform-mail-submission;basis=Task 4: sets eb.Mail = mailsubmit.SocketForwarder{} on every box, and eb.MailSwitch to a mailSwitchCache's On that opens the deploy store itself through openDeployStore, retried at most once a minute with an error line until it opens (review round 1, Task 4 P3), armed for the serial-move refresh (armedMailSwitch). Task 6: also sets the ExecBackend's ManifestOf, the same staged-manifest read as TierOf (rt.App and RouteAccount(rt), hence +registry:App and +whole:Route), for the spawn-time check of decision 10, which logs and emits an event and never refuses. Agent, not root. Fable final P2-2: eb.MailSwitch is the cache's State (three-valued: on, off, unknown) in place of On; an unreadable switch is unknown, never off. No read added. file:Exec@21625,file:Open@2191,file:Statfs@57149,registry:App@13287,registry:App@13665,whole:Route@13279,whole:Route@13657,whole:Route@50627 247a8a69a6787acac3f026049bab641138e0f6bf4124b07c30f9cef62fa2f939
@coverage . 295f50675373126c17b6adc286bad9a8935f6e1020fca5daa1ad23f71b6f27db
@coverage infra/modules/region-host d1a978ca67367880d0940ae7aa460f311addd4335c196a279d86caa6fe1e1721
@coverage infra/modules/region-host/tests 1aa5c549b79e7d8b19a266a2aeae8e4e2bb22b40072f36362da95bcf2c439a07
-@coverage internal/activator 583441b86d19dc592f5275a310fd7b5983c6f970766fed9f3ab7de202812dcb5
-@coverage internal/host 747db9767698d63c8604bdc001a0423eebdd818e618eb2baad52324b1e0e7ac0
+@coverage internal/activator 984e8c0efea814d70afdf235f2a32319a5c08b02629144125d89e85cbc22fbb1
+@coverage internal/host d9794415522e074dd3d14a51222349918b3fd3ed06144581ce2cb1abbdd5af65
@coverage internal/host/demo_units 3a34238356068c6176879f3ee189c81af8e08bfcc0246c5feba80d7169f7af6a
@coverage internal/host/units 1c742096c3a89946d8539b0113ea2ce07a833356d4a0262e55f8d5defb566055
@coverage internal/hostenv ba3d0f9a72e3a494116ce3ace34b05ab7218422327c365d57d2c6aabaa252558