census: re-propose stateless-scale-2-fleet-sizes for Task 5 (#892 S2)
Pins the root package and internal/updatewords envelopes. The chain seal is unchanged; the card is regenerated with the same 12 claims.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
docs/superpowers/notes/census-proposal-stateless-scale-2-fleet-sizes.md+1 −1internal/provision/testdata/plan14-root-reads-stateless-scale-2-fleet-sizes.tsv+3 −1
Intent
<task-notification> <task-id>a8df6ad79ffd246eb</task-id> <tool-use-id>toolu_015iTJZV1vmEve6FHXt5PuKv</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/29a43d67-87d2-4557-8e9d-9b70d303a90b/tasks/a8df6ad79ffd246eb.output</output-file> <status>completed</status> <summary>Agent "Implement S2 Task 5" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Status: DONE Commit: e169cfe9 `docs: fleet sizes in the CLI and docs (#892 S2)` on stateless-scale-2-fleet-sizes. Not pushed. Tests: RED then GREEN on the PS-2 applied-copy check (C06, C07, C08, C10, C11, C12). The root-package targeted run passes, including the new `TestSizeChangePrintsWarnings`. `./internal/docsite` and `./internal/updatewords` pass. The darwin, windows and linux/arm64 builds pass. Census-card: the envelopes `.` and `internal/updatewords` are re-pinned, with no unit changes. Seal is 8728f8fc69d5cd85ec59521a98d94fcbc6e4f3153dd58cf089b840383e589e0a (dry run). Concerns: - Three other files pinned the old text, so I edited them in place: - `docs/superpowers/plans/2026-10-07-instance-settings-5-copy.json` - `docs/superpowers/plans/2026-10-21-instance-policy-copy.json`, entries IP1-21, 22, 32, 33, 51, 52 and GAP-1 - `testdata/clireg-golden.jsonl` - IP1-21 and IP1-22 (console messages) were already stale from earlier tasks. - Warnings print to stdout, after the committed lines and before the takes-effect line. Report: /home/paulca/amadan.net/carlos/platform/.claude/worktrees/stateless-scale-1/.superpowers/sdd/2026-11-22-892-s2-fleet-sizes/task-5-report.md</result> <usage><subagent_tokens>71463</subagent_tokens><tool_uses>19</tool_uses><duration_ms>291223</duration_ms></usage> </task-notification>
Attributed to this commit: 15.5 g CO₂e (1,948,806 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on stateless-scale-2-fleet-sizes, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.
diff --git a/docs/superpowers/notes/census-proposal-stateless-scale-2-fleet-sizes.md b/docs/superpowers/notes/census-proposal-stateless-scale-2-fleet-sizes.md| index 6c5a00950..f7ab002e0 100644 |
| --- a/docs/superpowers/notes/census-proposal-stateless-scale-2-fleet-sizes.md |
| +++ b/docs/superpowers/notes/census-proposal-stateless-scale-2-fleet-sizes.md |
| @@ -15,7 +15,7 @@ Ruling `census-ruling-stateless-scale-2-fleet-sizes`. The independent reviewer a |
| | `internal/instancectl/size.go` `Server.handleSize` | body | unchanged (1) | root: after the unchanged SizeByName check, the named row must pass Server.Fleet.GenAllowed (a shared size always; a fleet size only on a CARLOS_FLEET box, not gVisor, within the MemTotal budget), else 400 before any systemctl call. Same one site; no read added in this body | |
| | `internal/rollout/scheduler.go` `scheduler.done` | sites | +whole:Route | the agent as carlos (#892 S2, review fix round 1): an attempt abandoned with activator.ErrFleetOverlapRefused emits its reason (PS-2-C05, the activator's own text naming only this box) once as a swap.no_room warn event on the instance's event stream, through the existing m.emit with the route s.route already read for the other events (+whole:Route); hostSlot.noRoomShown deduplicates it until an attempt ends another way. In-memory only; no read of a new input, no root call. Fix round 2: a test seam, m.afterDone (nil in production), deferred first so it runs after the events and OnChange; no behaviour change | |
| -Envelopes re-pinned: `internal/activator`, `internal/apppolicy`, `internal/cgroup`, `internal/host`, `internal/instancectl`, `internal/release`, `internal/rollout`. |
| +Envelopes re-pinned: `.`, `internal/activator`, `internal/apppolicy`, `internal/cgroup`, `internal/host`, `internal/instancectl`, `internal/release`, `internal/rollout`, `internal/updatewords`. |
| 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. Reject 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. A rejected unit goes back to the author to correct; nothing escalates to the census owner. |
diff --git a/internal/provision/testdata/plan14-root-reads-stateless-scale-2-fleet-sizes.tsv b/internal/provision/testdata/plan14-root-reads-stateless-scale-2-fleet-sizes.tsv| index 62899fa7a..63817854a 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-stateless-scale-2-fleet-sizes.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-stateless-scale-2-fleet-sizes.tsv |
| @@ -1,5 +1,5 @@ |
| # Census overlay stateless-scale-2-fleet-sizes, written by census-propose (#369). census-ruling-stateless-scale-2-fleet-sizes, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-stateless-scale-2-fleet-sizes.md. |
| -# 9 body, 1 sites, 7 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +# 9 body, 1 sites, 9 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| # 2 new dispositions: 0 reads re-frozen at their disposition with the claim, 2 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other. |
| @legacy e213deeb3081f3d42430e25aff0ae7c475279e486740b9fd5dd9f1d7fca790e2 internal/activator/opset.go Service.leaveSet legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-stateless-scale-2-fleet-sizes;basis=the agent as carlos (#892 S2): after a member's termination is proven and it leaves the set, the fleet-size overlap reservation it holds (genMember.reserve) is released, in memory, under a.mu. No read added; no root call added; the restore and the proof are unchanged whole:Route@167,whole:Route@262 d98d4d22859c0b0e0ce554518bd5f58a801746f0059195201eed1b481f9d2ecd |
| @legacy 9df0b085abd5b622634c95c659d2af4f7267e9f1dbfd4857620f998eff310932 internal/activator/swap.go Service.swapOverlap 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 zddr4, with no further change from this branch. the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body; admission and the switch refuse while a run's unit is starting, and the switch interrupts runs on the retiring generation; read sites unchanged, offsets moved;rev3=census-ruling-instance-egress-sizes-328-329;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=#329 plan 3 Task 4 and the final review: the new kind is registry:Size, one site, rt.Size != "" in the successor's max rule (the successor starts at the larger of its own sized tier and the incumbent's captured tier when the route has a size now or the incumbent runs at a tier other than its build's), and two more whole:Route sites: the successor's route is now sizedRouteLocked(e) with the wake route kept beside it as wakeRt for the incumbent's tier, and a second GenTier(rt, incumbent.Build) in that rule. The column comes from the agent's registry row (reconcile, from the signed app policy). Admission also refuses while a live size change is in flight. The raise still goes to root's /parent, whose memory_max root checks against its size table; no root decision here;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 N1, Task 8 and Task D: the incumbent's tier is recorded through recordCurrentTierLocked; genHealthy takes rt (so a rootfs generation is checked within the rootfs bound); the successor is installed through installProcLocked; after step 8 a rootfs build's declared processes are logged, never started (rootfsProcessesHook); no new file read;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R, R2: two new parameters from releaseBeforeSwap (pass, the proven pass, and due, whether the build needed a release); the admission and the exec gate both also ask releaseAdmitsSwapLocked, which refuses while any release record of the host is open (INV-R4) and, when a release was due, unless pass is this attempt's for the successor's build (INV-R5); no release runs here; the same 18 read sites, no read added; adds refusals only;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W, W2: step 8 no longer calls rootfsProcessesHook(ctx, e, rt, m.gen); it calls handOverRootfsWorkers(e), which stops and proves the retiring generation's workers gone and then registers the switched generation's set as pending (starts nothing; the tick starts them, and the stray rule refuses a start while an old worker is a stray, so two sets never run at once); site -whole:Route (rt no longer handed to the hook); no read added;rev3=census-ruling-edge-page-cache-1;basis=noteCurrent(e) instead of noteCurrent(e.host, m.gen.N) at the switch, as Service.wake; read sites unchanged (17); no read added;rev3=census-ruling-stateless-scale-2-fleet-sizes;basis=the agent as carlos (#892 S2): after admission and before the raise, a successor whose tier is a fleet size reserves its full MemoryMax through reserveFleetOverlap (memAvailable reads /proc/meminfo). With no room or an unreadable read the attempt is abandoned with PS-2-C05 before any raise, publication or spawn; the incumbent keeps serving. The token is stored on the member, released at once on a refused raise, a failed publication or a refused exec gate (nothing spawned), and otherwise moves to the retiring member at the switch. Adds a refusal only; the raise still goes to root's /parent unchanged; no root decision here. Read sites unchanged (17) registry:Kind@2060,registry:Size@5198,whole:Route@11149,whole:Route@13230,whole:Route@13237,whole:Route@13277,whole:Route@2062,whole:Route@2386,whole:Route@3729,whole:Route@3733,whole:Route@3778,whole:Route@4373,whole:Route@4425,whole:Route@5244,whole:Route@6688,whole:Route@8434,whole:Route@9153 9e25dc3b8ffb4f73453f61b70075da5466040ed25ad213906254e96a56916689 |
| @@ -23,6 +23,7 @@ internal/instancectl/size.go Server.handleSize legacy accepted-legacy accepted-l |
| internal/activator/fleetreserve_linux.go memAvailable legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-scale-2-fleet-sizes;basis=new (#892 S2), the agent as carlos, not root: os.ReadFile of the fixed /proc/meminfo (kernel-written; no tenant, app or agent can write or name it), then parseMemAvailable (the MemAvailable line in kB). Used only to admit or refuse a fleet-size overlap; an error refuses it and the old build keeps serving file:ReadFile@48 5d103dc06ce36dca4323999597c2ed1c15cbed2e63018549ca7b0581aee2c42f |
| internal/cgroup/fleetgate.go ReadMemTotal legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-scale-2-fleet-sizes;basis=new: os.ReadFile of the path its caller names, then ParseMemTotal (the MemTotal line in kB, positive, bounded). Its callers pass the fixed /proc/meminfo only (instancectl hostMemTotal for root, the agent's cgroup setup closure); kernel-written, not writable by a tenant, app or agent. Used only to bound fleet sizes; an error refuses every fleet size file:ReadFile@59 00e5b8e25b9e3dbc9ee3e449ceaa22d283d69969dfc6582b2cfcdc74c07ef69e |
| internal/rollout/scheduler.go scheduler.done legacy accepted-legacy accepted-legacy;rev3=J1,J4;basis=route-and-input;rev3=census-ruling-stateless-coordinator-route;basis=P25: classifies the preserved SwapResult.Err with errors.Is, including wrapped console-unreachable causes, to record the current scheduler revision and suppress duplicate abandoned logs. Diagnostic text no longer grants this classification. No new read sites or failure-book authority.;rev3=census-ruling-stateless-scale-2-fleet-sizes;basis=the agent as carlos (#892 S2, review fix round 1): an attempt abandoned with activator.ErrFleetOverlapRefused emits its reason (PS-2-C05, the activator's own text naming only this box) once as a swap.no_room warn event on the instance's event stream, through the existing m.emit with the route s.route already read for the other events (+whole:Route); hostSlot.noRoomShown deduplicates it until an attempt ends another way. In-memory only; no read of a new input, no root call. Fix round 2: a test seam, m.afterDone (nil in production), deferred first so it runs after the events and OnChange; no behaviour change file:Exec@5301,whole:Route@8917,whole:Route@9175,whole:Route@9333,whole:Route@9405,whole:Route@9524,whole:Route@9961 fb433c6ff1e3c8b5912d21dbd7f0f0904b39cd96275dbc024bc227a5d190d72f |
| +@coverage . fce2d28063e0c857161d13e1cc934661a426bf0c16e42dd8611b6c887b2e14ee |
| @coverage internal/activator 409bac58f019b723377efe6427e4d5c72c0640ab45819c33b8f3cacebdc4af49 |
| @coverage internal/apppolicy 0a758be8a30d847d27ff610736b668a526b8e5f47e6dcc042a8c143c25864295 |
| @coverage internal/cgroup 18eb14bb51403da80ca35f8046278f79557a890d21527ec868a16b80d508e54f |
| @@ -30,3 +31,4 @@ internal/rollout/scheduler.go scheduler.done legacy accepted-legacy accepted-leg |
| @coverage internal/instancectl 0dff99b0e92f914797c9c1004c9ad1af71e8704661a5dc14d0f6994c10f90f92 |
| @coverage internal/release 97eb61c0652f9fe333f21f77359133ef4e0d9bbba777418ca67f8fab6799ad75 |
| @coverage internal/rollout d63b3f24fdd319051026d77ba845aae0590f0a8755b3ed2631352f44f3235bb1 |
| +@coverage internal/updatewords 727597f77b7bade3ce98f0e4c3bb58302d778a0cc97263c106151933563491d9 |