| 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 |