carlos / platform Public

remote-instance-metrics: census overlays (approvals by census-propose, four new units by hand)

The four new units (Service.Tenancies, Service.putEntryLocked,
metricsOwners, metrics.Vouched) are decisions for the census owner on
#280; the fourteen changed units are approval classes.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev eed58aca7f3b2ced5a1b518ba3e933476b656054 parent bc06bdc
4 files changed, +88 −0
  • docs/superpowers/notes/census-proposal-remote-instance-metrics.md +45 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +2 −0
  • internal/provision/testdata/plan14-root-reads-remote-instance-metrics-decisions.tsv +10 −0
  • internal/provision/testdata/plan14-root-reads-remote-instance-metrics.tsv +31 −0

CI cancelled — superseded by a newer push — run details

diff --git a/docs/superpowers/notes/census-proposal-remote-instance-metrics.md b/docs/superpowers/notes/census-proposal-remote-instance-metrics.md
new file mode 100644
index 000000000..29b4c6a3c
--- /dev/null
+++ b/docs/superpowers/notes/census-proposal-remote-instance-metrics.md
@@ -0,0 +1,45 @@
+# Census approval: remote-instance-metrics
+
+Ruling `census-ruling-remote-instance-metrics`. Every change below keeps the disposition it already has, so it needs an approval, not a decision.
+
+| unit | change | read sites | what changed |
+|---|---|---|---|
+| `internal/activator/activator.go` `Service.WakeWorker` | body | unchanged (5) | the entries-map insertion goes through putEntryLocked (which also notes the route's tenant in memory for the metrics sampler); no read added |
+| `internal/activator/activator.go` `Service.begin` | body | unchanged (6) | the entries-map insertion goes through putEntryLocked (which also notes the route's tenant in memory for the metrics sampler); no read added |
+| `internal/activator/activator.go` `Service.sweepOnce` | body | unchanged (38) | its two entries-map insertions go through putEntryLocked (which also notes the route's tenant in memory for the metrics sampler); no read added |
+| `internal/activator/activator.go` `type Service` | body | unchanged (0) | gains tenancySeq, hostTenants and hostMixed, in-memory fields for Tenancies; no read added |
+| `internal/activator/probewake.go` `Service.ProbeWake` | body | unchanged (4) | the entries-map insertion goes through putEntryLocked; no read added |
+| `internal/activator/recoveryprobe.go` `Service.RecoveryProbe` | body | unchanged (8) | the entries-map insertion goes through putEntryLocked (its nil-map make moves there); no read added |
+| `internal/activator/swaphold.go` `Service.holdWakeLocked` | body | unchanged (2) | the entries-map insertion goes through putEntryLocked; no read added |
+| `internal/cgroup/cgroup.go` `Manager.sweepStale` | body | unchanged (2) | records the host of a per-host dir it could not remove in an in-memory leftover set (Manager.Leftover) for the metrics sampler; no read added, nothing removed differently |
+| `internal/console/apiinstances.go` `Server.healthByHost` | body | unchanged (12) | passes nil for ownerAppMetricsFrom's new tenant argument (local rows unchanged); no read added |
+| `internal/console/apiinstances.go` `Server.instanceHealth` | body | unchanged (18) | a remote record with an accepted rollout entry also counts a metrics reading its box tagged with the record's own account and app as awake (one ownerAppMetricsFrom call over the shared in-memory sweep); registry reads unchanged; no read added |
+| `internal/console/metricsview.go` `type UnitRow` | body | unchanged (1) | one more unexported field: the per-sample tenant tag index; schema only |
+| `internal/host/agent.go` `runAgent` | body | unchanged (5) | 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 |
+| `internal/host/metrics_loop.go` `sampler.tick` | body | unchanged (1) | calls the owners probe before and after the unit read and tags readings with metrics.TagUnits and metrics.CarryTags; no read added |
+| `internal/metrics/sample.go` `type UnitSample` | body | unchanged (1) | one more field, Owner (omitempty), the tenant tag; schema only |
+
+Envelopes re-pinned: `internal/activator`, `internal/cgroup`, `internal/console`, `internal/host`, `internal/metrics`.
+
+Review: a model from the other family than the author reads the branch's diff against main on the amadan.net remote (`origin` or `amadan`, whichever points at amadan.net) and gives a verdict for every unit and every re-pinned envelope above. For a unit, compare the change with its recorded disposition and basis below; for an envelope, read every changed function in the package and what it reaches. Escalate if the change lets root open, run, query or follow anything it did not before from a path or input a tenant, an app or a box agent can create, write or name; if it weakens a check, refusal, validation, argument or environment the basis relies on; or if the diff cannot settle either. Otherwise approve. Record each verdict on #280 with the tip. An escalation goes to the census owner as a decision.
+
+Recorded dispositions, which each change must still satisfy:
+
+- `internal/activator/activator.go` `Service.WakeWorker`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body; the stop now carries its reason for a run it interrupts (beginStopLocked's why argument); read sites unchanged, offsets moved
+- `internal/activator/activator.go` `Service.begin`: legacy, task accepted-legacy. Basis: 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; the stop now carries its reason for a run it interrupts (beginStopLocked's why argument); read sites unchanged, offsets moved;rev3=census-ruling-edge-request-records;basis=gains a req *http.Request parameter and one edge.MarkWoke(req) call on the path that starts a wake, so the edge's request record can say which request woke the app; no read added
+- `internal/activator/activator.go` `Service.sweepOnce`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=PROPOSED-seed;basis=census-ruling-FS-R6; registry remains legacy; PROPOSED-plans-2-box-limits: the sweep also narrows an entry's idle window to its account's plan idle through the SetIdleFor hook (never lengthens it; always-on workers and held probe entries are untouched; the hibernate, inflight and held-for-tick guards are unchanged).;rev3=census-ruling-plans-4c-box-throttle;basis=after the worker max_run branch, stops a non-worker entry past the plans continuous-awake ceiling (maxRunFor, passed the row), busy or not, never mid-command (plans 4c). One more whole-row read: the row handed to the hook, as idleFor already is. This bypasses the inflight and held-for-tick protections the idle stop keeps, on purpose: escalated by Astra and ACCEPTED by Paul (census owner), 2026-10-25.;rev3=census-ruling-plans-4d-lapse;basis=stops a live entry the turned-off hook names (never mid-command, never a move's active probe), stands down an exited worker it names instead of restarting it (Astra finding 4), and skips such rows in the due loop and the always-on arm so they are not woken (plans 4d). Four more whole-row reads: the row handed to the hook (a.disabled), as idleFor and maxRunFor already are. Only stops or skips.
+- `internal/activator/activator.go` `type Service`: authority, task B,C,D,F,J4. Basis: rev3=PROPOSED-seed; existing activator lifecycle and due-wake state plus owned seed exclusion and incarnation-keyed diagnostics; normal refusal and preparation ordering remain authoritative; PROPOSED-plans-2-box-limits adds the idleFor hook field, which only narrows idle windows;rev3=census-ruling-plans-4c-box-throttle;basis=gains the maxRunFor hook field beside idleFor (plans 4c). No read added.;rev3=census-ruling-plans-4d-lapse;basis=gains the disabledFor hook field beside maxRunFor (plans 4d). No read added.
+- `internal/activator/probewake.go` `Service.ProbeWake`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route
+- `internal/activator/recoveryprobe.go` `Service.RecoveryProbe`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route
+- `internal/activator/swaphold.go` `Service.holdWakeLocked`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route
+- `internal/cgroup/cgroup.go` `Manager.sweepStale`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J4;basis=root-input
+- `internal/console/apiinstances.go` `Server.healthByHost`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Takes only the caller's ownership start per host (sinceByHost): readings only from samples at or after it, via ownerAppMetricsFrom. The awake set, the box pin and the until window are gone. Registry reads unchanged.
+- `internal/console/apiinstances.go` `Server.instanceHealth`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Records with no local registry row get health only from remoteFacts (a box report whose rollout entry names the record's own account and app, generated after the record was created): awake is Running, held down is Failed, transient or unidentified is Can't tell right now. No metrics readings at all and no registry.Route literal for them. Local records unchanged.
+- `internal/console/metricsview.go` `type UnitRow`: diagnostic, task H3. Basis: schema-only;rev3=census-ruling-console-remote-instances;basis=Two unexported fields carrying those raw per-sample readings; schema only.
+- `internal/host/agent.go` `runAgent`: authority, task B,C,D,F. Basis: 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.
+- `internal/host/metrics_loop.go` `sampler.tick`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J4;basis=root-input
+- `internal/metrics/sample.go` `type UnitSample`: diagnostic, task H3. Basis: schema-only
+
+Seal: `9adcf40e879f038fc9285ff85b419d7ce4f03559e31f9afcd40a0f3496af7d8e` → `d9d77f3901969e40169fdd689bc5ccae5f4684a519cd7448130ceb9091911bd6`.
+
+Overlay: `internal/provision/testdata/plan14-root-reads-remote-instance-metrics.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index 83161f11f..1a211517c 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -59,3 +59,5 @@ plan14-root-reads-region-labels-decisions.tsv b265c2ae74edbaca766d33e085d31a8e7c
plan14-root-reads-region-labels.tsv d1e00cfb29d88b7a8e4998b641164e539067a6e1e9e4f52524255343c0c5f9f7
plan14-root-reads-app-region-set.tsv 798a1ee3d8c8b775f963b9ae1dbc45e18628fa0c1e63404f46606601766ad66c
plan14-root-reads-nearest-region-a.tsv 798a1ee3d8c8b775f963b9ae1dbc45e18628fa0c1e63404f46606601766ad66c
+plan14-root-reads-remote-instance-metrics-decisions.tsv 9adcf40e879f038fc9285ff85b419d7ce4f03559e31f9afcd40a0f3496af7d8e
+plan14-root-reads-remote-instance-metrics.tsv d9d77f3901969e40169fdd689bc5ccae5f4684a519cd7448130ceb9091911bd6
diff --git a/internal/provision/testdata/plan14-root-reads-remote-instance-metrics-decisions.tsv b/internal/provision/testdata/plan14-root-reads-remote-instance-metrics-decisions.tsv
new file mode 100644
index 000000000..aea8460cf
--- /dev/null
+++ b/internal/provision/testdata/plan14-root-reads-remote-instance-metrics-decisions.tsv
@@ -0,0 +1,10 @@
+# Census overlay remote-instance-metrics-decisions, written BY HAND (AGENTS.md, The census: census-propose refuses decisions). The four new units of census-ruling-remote-instance-metrics (branch remote-instance-metrics, note docs/superpowers/notes/remote-instance-metrics.md): the metrics sampler's tenant tags. Loaded from the chain manifest before plan14-root-reads-remote-instance-metrics.tsv, which census-propose wrote for the approvals. Card docs/superpowers/notes/census-proposal-remote-instance-metrics.md.
+# ASKED of the census owner on #280, 2026-10-26: accept all four as legacy agent rows. None is a root read: each reads a registry row already in memory or the agent's own registry listing; nothing a tenant names is opened.
+@legacy 074dc3410bb5dbe95d3f0b23e4f11ec84f9f2d9e37fa7cb50e7c202f8dc08194 internal/activator/tenancies.go Service.Tenancies legacy accepted-legacy accepted-legacy;rev3=census-ruling-remote-instance-metrics;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), through the metrics loop's owners closure only;basis=new (remote instance metrics, docs/superpowers/notes/remote-instance-metrics.md): reads the Account and App of each live activator entry's route, a row the activator already holds in memory, and returns them with an entry number for the metrics sampler's tenant tags; skips hosts whose entries have named two tenants and returns nothing in claim mode; no file, no store, no registry open, nothing written; decides only which tenant tag a metrics sample carries; root never calls it registry:Account@230,registry:App@247,whole:Route@232,whole:Route@249 3ca1083d0c885bc42444aabd1d19956462c16b8dad624b7fc9cec05a5dfe49d1
+@legacy b1b7bba4921f87e58666cb47cf66e03fc8fab561066c5537fad1bbd77f77c286 internal/activator/tenancies.go Service.putEntryLocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-remote-instance-metrics;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=new (remote instance metrics): the one insertion into the activator's entries map, replacing the same map write at seven call sites (begin, WakeWorker, sweepOnce twice, ProbeWake, RecoveryProbe, holdWakeLocked); also notes the Account and App of the entry's route, already in memory, in an in-memory per-host tenant set; no file, no store, no registry open; decides only whether the metrics sampler vouches for a host; root never calls it registry:Account@175,registry:App@192,whole:Route@177,whole:Route@194 fa3029b4758ce42209bb828d6e3c54a2b47444f01cf340ff8f5816e9d9407180
+@legacy aa146731df23fab2bd6f2df62e25a51c1d68e526093e13d4931add7d9483374d internal/host/metrics_owner.go metricsOwners legacy accepted-legacy accepted-legacy;rev3=census-ruling-remote-instance-metrics;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), from the metrics loop each 60 s tick;basis=new (remote instance metrics): asks the activator for its live tenancies and lists the agent's own registry (the reg.List the stamped-units read already makes each tick), twice per tick, and joins them with metrics.Vouched; no file path, nothing a tenant names, no store request, nothing written; decides only the tenant tag a metrics sample carries; root never calls it whole:Route@523 224f7b50fd18bebec1b089b76d082ef122084e8d53d27690f0393032cd4ff12d
+@legacy 9c8d89e26fb51bc5f5da38d6e2fa4755d9bee0a1a011bf02faefc8e1edc822ed internal/metrics/owner.go Vouched legacy accepted-legacy accepted-legacy;rev3=census-ruling-remote-instance-metrics;identity=the agent's metrics loop, through metricsOwners only (a pure function; the console's tests call it too);basis=new (remote instance metrics): joins registry rows already in hand (Host, Account, App) to the activator's live tenancies and a leftover predicate; pure: no file, no store, no registry open, nothing written; decides only the tenant tag a metrics sample carries registry:Account@253,registry:Account@289,registry:Account@472,registry:App@273,registry:App@316,registry:App@489,registry:Host@232,registry:Host@383,registry:Host@432,whole:Route@209 8a8e77aaa4aa0ca6077aa39310cb129247ab676099cfb494e6763e7fc4675794
+internal/activator/tenancies.go Service.Tenancies legacy accepted-legacy accepted-legacy;rev3=census-ruling-remote-instance-metrics;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), through the metrics loop's owners closure only;basis=new (remote instance metrics, docs/superpowers/notes/remote-instance-metrics.md): reads the Account and App of each live activator entry's route, a row the activator already holds in memory, and returns them with an entry number for the metrics sampler's tenant tags; skips hosts whose entries have named two tenants and returns nothing in claim mode; no file, no store, no registry open, nothing written; decides only which tenant tag a metrics sample carries; root never calls it registry:Account@230,registry:App@247,whole:Route@232,whole:Route@249 3ca1083d0c885bc42444aabd1d19956462c16b8dad624b7fc9cec05a5dfe49d1
+internal/activator/tenancies.go Service.putEntryLocked legacy accepted-legacy accepted-legacy;rev3=census-ruling-remote-instance-metrics;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=new (remote instance metrics): the one insertion into the activator's entries map, replacing the same map write at seven call sites (begin, WakeWorker, sweepOnce twice, ProbeWake, RecoveryProbe, holdWakeLocked); also notes the Account and App of the entry's route, already in memory, in an in-memory per-host tenant set; no file, no store, no registry open; decides only whether the metrics sampler vouches for a host; root never calls it registry:Account@175,registry:App@192,whole:Route@177,whole:Route@194 fa3029b4758ce42209bb828d6e3c54a2b47444f01cf340ff8f5816e9d9407180
+internal/host/metrics_owner.go metricsOwners legacy accepted-legacy accepted-legacy;rev3=census-ruling-remote-instance-metrics;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), from the metrics loop each 60 s tick;basis=new (remote instance metrics): asks the activator for its live tenancies and lists the agent's own registry (the reg.List the stamped-units read already makes each tick), twice per tick, and joins them with metrics.Vouched; no file path, nothing a tenant names, no store request, nothing written; decides only the tenant tag a metrics sample carries; root never calls it whole:Route@523 224f7b50fd18bebec1b089b76d082ef122084e8d53d27690f0393032cd4ff12d
+internal/metrics/owner.go Vouched legacy accepted-legacy accepted-legacy;rev3=census-ruling-remote-instance-metrics;identity=the agent's metrics loop, through metricsOwners only (a pure function; the console's tests call it too);basis=new (remote instance metrics): joins registry rows already in hand (Host, Account, App) to the activator's live tenancies and a leftover predicate; pure: no file, no store, no registry open, nothing written; decides only the tenant tag a metrics sample carries registry:Account@253,registry:Account@289,registry:Account@472,registry:App@273,registry:App@316,registry:App@489,registry:Host@232,registry:Host@383,registry:Host@432,whole:Route@209 8a8e77aaa4aa0ca6077aa39310cb129247ab676099cfb494e6763e7fc4675794
diff --git a/internal/provision/testdata/plan14-root-reads-remote-instance-metrics.tsv b/internal/provision/testdata/plan14-root-reads-remote-instance-metrics.tsv
new file mode 100644
index 000000000..996c7a96f
--- /dev/null
+++ b/internal/provision/testdata/plan14-root-reads-remote-instance-metrics.tsv
@@ -0,0 +1,31 @@
+# Census overlay remote-instance-metrics, written by census-propose (#369). census-ruling-remote-instance-metrics, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-remote-instance-metrics.md.
+# 14 body, 0 sites, 5 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+@legacy a6eb3e02e5814f935d9388a84d59ab4b707ff4013a285b392c9490ac54eedbc9 internal/activator/activator.go Service.WakeWorker legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body; the stop now carries its reason for a run it interrupts (beginStopLocked's why argument); read sites unchanged, offsets moved;rev3=census-ruling-remote-instance-metrics;basis=the entries-map insertion goes through putEntryLocked (which also notes the route's tenant in memory for the metrics sampler); no read added registry:Host@1249,registry:Host@1658,registry:Host@834,registry:Host@864,whole:Route@1225 dab4506e9f7a8b802d2c930222b4775a4b1626c31c4e39ce2f39ca51c3ce37de
+@legacy 0f486d4a3e0c57b860cf6a7966366d9baf83b7b69543f83def56eae800828258 internal/activator/activator.go Service.begin 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; the stop now carries its reason for a run it interrupts (beginStopLocked's why argument); read sites unchanged, offsets moved;rev3=census-ruling-edge-request-records;basis=gains a req *http.Request parameter and one edge.MarkWoke(req) call on the path that starts a wake, so the edge's request record can say which request woke the app; no read added;rev3=census-ruling-remote-instance-metrics;basis=the entries-map insertion goes through putEntryLocked (which also notes the route's tenant in memory for the metrics sampler); no read added registry:Host@1721,registry:Host@1807,registry:Host@345,registry:Host@929,whole:Route@1730,whole:Route@1737 2a6b1e1412a88632293b4bf767f6daf9376d2a00a87d1c27c91eaf02f82da468
+@legacy 59675b94e0210da250a611e302a33102209d5cb39ec40054b743ef9a795ad896 internal/activator/activator.go Service.sweepOnce legacy accepted-legacy accepted-legacy;rev3=PROPOSED-seed;basis=census-ruling-FS-R6; registry remains legacy; PROPOSED-plans-2-box-limits: the sweep also narrows an entry's idle window to its account's plan idle through the SetIdleFor hook (never lengthens it; always-on workers and held probe entries are untouched; the hibernate, inflight and held-for-tick guards are unchanged).;rev3=census-ruling-plans-4c-box-throttle;basis=after the worker max_run branch, stops a non-worker entry past the plans continuous-awake ceiling (maxRunFor, passed the row), busy or not, never mid-command (plans 4c). One more whole-row read: the row handed to the hook, as idleFor already is. This bypasses the inflight and held-for-tick protections the idle stop keeps, on purpose: escalated by Astra and ACCEPTED by Paul (census owner), 2026-10-25.;rev3=census-ruling-plans-4d-lapse;basis=stops a live entry the turned-off hook names (never mid-command, never a move's active probe), stands down an exited worker it names instead of restarting it (Astra finding 4), and skips such rows in the due loop and the always-on arm so they are not woken (plans 4d). Four more whole-row reads: the row handed to the hook (a.disabled), as idleFor and maxRunFor already are. Only stops or skips.;rev3=census-ruling-remote-instance-metrics;basis=its two entries-map insertions go through putEntryLocked (which also notes the route's tenant in memory for the metrics sampler); no read added registry:Hibernate@10051,registry:Hibernate@13703,registry:Hibernate@22874,registry:Hibernate@5522,registry:Hibernate@7526,registry:Host@22943,registry:Host@23001,registry:Host@23468,registry:Host@23561,registry:Host@24296,registry:Host@24385,registry:Host@25449,registry:Host@25736,registry:Host@25792,registry:NextDue@24251,registry:Status@22890,whole:Route@10053,whole:Route@10806,whole:Route@13705,whole:Route@15638,whole:Route@17348,whole:Route@17538,whole:Route@17831,whole:Route@18003,whole:Route@18150,whole:Route@22361,whole:Route@23050,whole:Route@23965,whole:Route@24305,whole:Route@24312,whole:Route@25264,whole:Route@25565,whole:Route@25769,whole:Route@5333,whole:Route@5524,whole:Route@7359,whole:Route@7528,whole:Route@7962 48ad35e412fd9bd7569fd3d8c8369c951caeff2a9ce153f8ed99038420b22b67
+@legacy 953938d6308026adf92bfd2e38d303c3a92a0d2e9b985153fbcf56510f135b44 internal/activator/probewake.go Service.ProbeWake legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-remote-instance-metrics;basis=the entries-map insertion goes through putEntryLocked; no read added whole:Route@673,whole:Route@698,whole:Route@817,whole:Route@825 2781783e5f445b0bb4d191a7598388da2a6d6f544ad42c6fe35c4b2117950e4c
+@legacy d66d9f5d97e996bd8ab21e4456de1e5771d038ebcbe5e763bc4f0e0459000246 internal/activator/recoveryprobe.go Service.RecoveryProbe legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-remote-instance-metrics;basis=the entries-map insertion goes through putEntryLocked (its nil-map make moves there); no read added registry:Host@1103,registry:Host@1134,registry:Host@317,registry:Host@489,registry:Host@597,registry:Host@890,whole:Route@899,whole:Route@906 ddcaf70cc9a2701e9efb6dd042188febd3c48b586b78ca361341ecf32781ca6b
+@legacy 8dc5d5765e58fd34d2ef176a9aac6cc4e68d7b209a970fa52ce3c403ed35cc83 internal/activator/swaphold.go Service.holdWakeLocked legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-remote-instance-metrics;basis=the entries-map insertion goes through putEntryLocked; no read added whole:Route@127,whole:Route@136 f670fc50a38c73000d04a59d2f4d5145c6bdbf08929a60f9257034dcf87e718e
+@legacy 6229b3f512ac8220942a71c00c05d57c8b6d5707eb817b0b9d814bc8e7887615 internal/cgroup/cgroup.go Manager.sweepStale legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-remote-instance-metrics;basis=records the host of a per-host dir it could not remove in an in-memory leftover set (Manager.Leftover) for the metrics sampler; no read added, nothing removed differently file:ReadDir@384,file:ReadDir@50 148cc59b7e6a047c782ab8904d544f7c1ccb1529e01848b4e7ba60a5f2b283f2
+@legacy 6f5cc7c36ae2736f0055576e94f051e472ca8efea8ab7c6a0ffe9f23b6afa202 internal/console/apiinstances.go Server.healthByHost legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Takes only the caller's ownership start per host (sinceByHost): readings only from samples at or after it, via ownerAppMetricsFrom. The awake set, the box pin and the until window are gone. Registry reads unchanged.;rev3=census-ruling-remote-instance-metrics;basis=passes nil for ownerAppMetricsFrom's new tenant argument (local rows unchanged); no read added registry:Backing@1183,registry:Hibernate@1117,registry:Kind@1100,registry:Provisioned@1158,registry:Status@977,registry:Unit@1174,registry:Unit@329,registry:Unit@364,whole:Route@177,whole:Route@220,whole:Route@286,whole:Route@954 b6fb3262a2276c08f0186de50662e108d3c5ed556e7c523009456c99ba0a8694
+@legacy 88041d4f44760c23194da0498718a6d2b666ceafaacbbf853d0ac115ed9292bd internal/console/apiinstances.go Server.instanceHealth legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Records with no local registry row get health only from remoteFacts (a box report whose rollout entry names the record's own account and app, generated after the record was created): awake is Running, held down is Failed, transient or unidentified is Can't tell right now. No metrics readings at all and no registry.Route literal for them. Local records unchanged.;rev3=census-ruling-remote-instance-metrics;basis=a remote record with an accepted rollout entry also counts a metrics reading its box tagged with the record's own account and app as awake (one ownerAppMetricsFrom call over the shared in-memory sweep); registry reads unchanged; no read added registry:Account@1987,registry:Account@2007,registry:App@1948,registry:App@1964,registry:Host@839,registry:Unit@2117,registry:Unit@2159,whole:Route@1151,whole:Route@2054,whole:Route@2075,whole:Route@3105,whole:Route@4929,whole:Route@4982,whole:Route@5097,whole:Route@792,whole:Route@821,whole:Route@832,whole:Route@850 8ae98bafde8d5a37ab36c5da3c29d10e396a45988d3f4fc30077c190f13034a8
+@legacy f0980583e1668d9bab93b81f49f6c80095da2d603e7ada5d5aadf641e45268a2 internal/host/metrics_loop.go sampler.tick legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-remote-instance-metrics;basis=calls the owners probe before and after the unit read and tags readings with metrics.TagUnits and metrics.CarryTags; no read added file:ReadBytes@963 74d913ac5a0b8a71822519a2a5e81235e4ec2d79793bbd4685e08d5e6e832533
+internal/activator/activator.go Service.WakeWorker legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body; the stop now carries its reason for a run it interrupts (beginStopLocked's why argument); read sites unchanged, offsets moved;rev3=census-ruling-remote-instance-metrics;basis=the entries-map insertion goes through putEntryLocked (which also notes the route's tenant in memory for the metrics sampler); no read added registry:Host@1249,registry:Host@1658,registry:Host@834,registry:Host@864,whole:Route@1225 dab4506e9f7a8b802d2c930222b4775a4b1626c31c4e39ce2f39ca51c3ce37de
+internal/activator/activator.go Service.begin 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; the stop now carries its reason for a run it interrupts (beginStopLocked's why argument); read sites unchanged, offsets moved;rev3=census-ruling-edge-request-records;basis=gains a req *http.Request parameter and one edge.MarkWoke(req) call on the path that starts a wake, so the edge's request record can say which request woke the app; no read added;rev3=census-ruling-remote-instance-metrics;basis=the entries-map insertion goes through putEntryLocked (which also notes the route's tenant in memory for the metrics sampler); no read added registry:Host@1721,registry:Host@1807,registry:Host@345,registry:Host@929,whole:Route@1730,whole:Route@1737 2a6b1e1412a88632293b4bf767f6daf9376d2a00a87d1c27c91eaf02f82da468
+internal/activator/activator.go Service.sweepOnce legacy accepted-legacy accepted-legacy;rev3=PROPOSED-seed;basis=census-ruling-FS-R6; registry remains legacy; PROPOSED-plans-2-box-limits: the sweep also narrows an entry's idle window to its account's plan idle through the SetIdleFor hook (never lengthens it; always-on workers and held probe entries are untouched; the hibernate, inflight and held-for-tick guards are unchanged).;rev3=census-ruling-plans-4c-box-throttle;basis=after the worker max_run branch, stops a non-worker entry past the plans continuous-awake ceiling (maxRunFor, passed the row), busy or not, never mid-command (plans 4c). One more whole-row read: the row handed to the hook, as idleFor already is. This bypasses the inflight and held-for-tick protections the idle stop keeps, on purpose: escalated by Astra and ACCEPTED by Paul (census owner), 2026-10-25.;rev3=census-ruling-plans-4d-lapse;basis=stops a live entry the turned-off hook names (never mid-command, never a move's active probe), stands down an exited worker it names instead of restarting it (Astra finding 4), and skips such rows in the due loop and the always-on arm so they are not woken (plans 4d). Four more whole-row reads: the row handed to the hook (a.disabled), as idleFor and maxRunFor already are. Only stops or skips.;rev3=census-ruling-remote-instance-metrics;basis=its two entries-map insertions go through putEntryLocked (which also notes the route's tenant in memory for the metrics sampler); no read added registry:Hibernate@10051,registry:Hibernate@13703,registry:Hibernate@22874,registry:Hibernate@5522,registry:Hibernate@7526,registry:Host@22943,registry:Host@23001,registry:Host@23468,registry:Host@23561,registry:Host@24296,registry:Host@24385,registry:Host@25449,registry:Host@25736,registry:Host@25792,registry:NextDue@24251,registry:Status@22890,whole:Route@10053,whole:Route@10806,whole:Route@13705,whole:Route@15638,whole:Route@17348,whole:Route@17538,whole:Route@17831,whole:Route@18003,whole:Route@18150,whole:Route@22361,whole:Route@23050,whole:Route@23965,whole:Route@24305,whole:Route@24312,whole:Route@25264,whole:Route@25565,whole:Route@25769,whole:Route@5333,whole:Route@5524,whole:Route@7359,whole:Route@7528,whole:Route@7962 48ad35e412fd9bd7569fd3d8c8369c951caeff2a9ce153f8ed99038420b22b67
+internal/activator/activator.go type Service authority B,C,D,F,J4 rev3=PROPOSED-seed; existing activator lifecycle and due-wake state plus owned seed exclusion and incarnation-keyed diagnostics; normal refusal and preparation ordering remain authoritative; PROPOSED-plans-2-box-limits adds the idleFor hook field, which only narrows idle windows;rev3=census-ruling-plans-4c-box-throttle;basis=gains the maxRunFor hook field beside idleFor (plans 4c). No read added.;rev3=census-ruling-plans-4d-lapse;basis=gains the disabledFor hook field beside maxRunFor (plans 4d). No read added.;rev3=census-ruling-remote-instance-metrics;basis=gains tenancySeq, hostTenants and hostMixed, in-memory fields for Tenancies; no read added b0884037418c076f20c9c7645bc63ff1b40323795af9554f2d35b99622a5c25f
+internal/activator/probewake.go Service.ProbeWake legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-remote-instance-metrics;basis=the entries-map insertion goes through putEntryLocked; no read added whole:Route@673,whole:Route@698,whole:Route@817,whole:Route@825 2781783e5f445b0bb4d191a7598388da2a6d6f544ad42c6fe35c4b2117950e4c
+internal/activator/recoveryprobe.go Service.RecoveryProbe legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-remote-instance-metrics;basis=the entries-map insertion goes through putEntryLocked (its nil-map make moves there); no read added registry:Host@1103,registry:Host@1134,registry:Host@317,registry:Host@489,registry:Host@597,registry:Host@890,whole:Route@899,whole:Route@906 ddcaf70cc9a2701e9efb6dd042188febd3c48b586b78ca361341ecf32781ca6b
+internal/activator/swaphold.go Service.holdWakeLocked legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-remote-instance-metrics;basis=the entries-map insertion goes through putEntryLocked; no read added whole:Route@127,whole:Route@136 f670fc50a38c73000d04a59d2f4d5145c6bdbf08929a60f9257034dcf87e718e
+internal/cgroup/cgroup.go Manager.sweepStale legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-remote-instance-metrics;basis=records the host of a per-host dir it could not remove in an in-memory leftover set (Manager.Leftover) for the metrics sampler; no read added, nothing removed differently file:ReadDir@384,file:ReadDir@50 148cc59b7e6a047c782ab8904d544f7c1ccb1529e01848b4e7ba60a5f2b283f2
+internal/console/apiinstances.go Server.healthByHost legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Takes only the caller's ownership start per host (sinceByHost): readings only from samples at or after it, via ownerAppMetricsFrom. The awake set, the box pin and the until window are gone. Registry reads unchanged.;rev3=census-ruling-remote-instance-metrics;basis=passes nil for ownerAppMetricsFrom's new tenant argument (local rows unchanged); no read added registry:Backing@1183,registry:Hibernate@1117,registry:Kind@1100,registry:Provisioned@1158,registry:Status@977,registry:Unit@1174,registry:Unit@329,registry:Unit@364,whole:Route@177,whole:Route@220,whole:Route@286,whole:Route@954 b6fb3262a2276c08f0186de50662e108d3c5ed556e7c523009456c99ba0a8694
+internal/console/apiinstances.go Server.instanceHealth legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-console-remote-instances;basis=Records with no local registry row get health only from remoteFacts (a box report whose rollout entry names the record's own account and app, generated after the record was created): awake is Running, held down is Failed, transient or unidentified is Can't tell right now. No metrics readings at all and no registry.Route literal for them. Local records unchanged.;rev3=census-ruling-remote-instance-metrics;basis=a remote record with an accepted rollout entry also counts a metrics reading its box tagged with the record's own account and app as awake (one ownerAppMetricsFrom call over the shared in-memory sweep); registry reads unchanged; no read added registry:Account@1987,registry:Account@2007,registry:App@1948,registry:App@1964,registry:Host@839,registry:Unit@2117,registry:Unit@2159,whole:Route@1151,whole:Route@2054,whole:Route@2075,whole:Route@3105,whole:Route@4929,whole:Route@4982,whole:Route@5097,whole:Route@792,whole:Route@821,whole:Route@832,whole:Route@850 8ae98bafde8d5a37ab36c5da3c29d10e396a45988d3f4fc30077c190f13034a8
+internal/console/metricsview.go type UnitRow diagnostic H3 schema-only;rev3=census-ruling-console-remote-instances;basis=Two unexported fields carrying those raw per-sample readings; schema only.;rev3=census-ruling-remote-instance-metrics;basis=one more unexported field: the per-sample tenant tag index; schema only file:ReadBytes@133 0026b45b05959c902d4621e22af0c55d43ba6881fd3986638fff66985d500726
+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 file:Exec@15382,file:Open@1150,registry:App@10663,whole:Route@10655,whole:Route@25558 86f6b56b31871b77d401220eaa81db6bbcd210828c410e474a7f5bbf1708905c
+internal/host/metrics_loop.go sampler.tick legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-remote-instance-metrics;basis=calls the owners probe before and after the unit read and tags readings with metrics.TagUnits and metrics.CarryTags; no read added file:ReadBytes@963 74d913ac5a0b8a71822519a2a5e81235e4ec2d79793bbd4685e08d5e6e832533
+internal/metrics/sample.go type UnitSample diagnostic H3 schema-only;rev3=census-ruling-remote-instance-metrics;basis=one more field, Owner (omitempty), the tenant tag; schema only file:ReadBytes@151 294c6d0be969498ccf499f72f9d0ba4f58544e3ae0038743954e2056a636adb7
+@coverage internal/activator 4ec80131ff1c00867e517914d59d579d57ca9c3f5b4d6090c5e59531bf8bc32d
+@coverage internal/cgroup 7b1a4c027236e1c79dc8e60e4bd8a134e6a9c1188cae3143a585cd7d35eefb3f
+@coverage internal/console cae64d776ae0c568f7202040c38f5f0eb38c3fdae2c3a419cfd293ed666b2252
+@coverage internal/host 6807ca1d83f09adf0a247223c94bd6a7aae7987ef78deabde6d7ccbbdbe0f2bf
+@coverage internal/metrics d7f3b57198083eb4e25ff6e3640e4f34b9f8235301182762c6883fa77ce12d76