stateless-scale-1-memory-env
#892 S1: rootfs web and workers get CARLOS_MEMORY_MIB.
What changes. Web and every worker of a rootfs instance get CARLOS_MEMORY_MIB: the memory.max root is asked to start that unit at, in MiB, rounded down. Web's comes from the tier spawnRootfs passes root. A worker's comes from its web generation's tier (Gen.Tier), the figure LaunchRootfsWorker already passes root. Release, carlos run and sessions get none: the name is removed from their environment, because their unit does not set the limit they run under. The agent sets it after the instance's files, so no tenant file can supply a false figure. Nothing new is read, and there is no replica logic, as agreed with the #511 Plan 4 controller.
Why. It lets one image and one Puma or Sidekiq-swarm config size itself from the instance's size. This is the first slice of the #892 design (docs/superpowers/specs/2026-11-11-stateless-replicas-production-scale-design.md §4 S1, on design-stateless-replicas-scale).
Tests. internal/activator/rootfs_memoryvar_test.go checks that web's figure equals root's memory_max at the default, large and xlarge sizes, that a tenant's value is overridden, that a worker follows its generation's tier, that run, session and release carry none, and the rounding rule. The web launch-file invariant and the contract key list are updated, and approved_stateless_scale_copy_test.go pins docs row PS-1-C01. Mutation-checked: a wrong shift fails the web test, and dropping the session removal fails the one-shot test.
Census. Proposal stateless-scale-1-memory-env, four units (spawnRootfs, rootfsCmdVars, rootfsTTYVars, rootfsWorkerVars), map composition only. Astra gives the census verdict with the branch review.
Copy. PS-1-C01 in docs/site/rootfs.md was approved by delegation (Luna pass) and goes to Paul's copy review.
Discussions
- No discussions on this branch yet.
Tasks
- No tasks yet.
Activity
- paul@keymail.dev pushed 33d221529 reviews: Astra round 2 findings body (S1 census)
- paul@keymail.dev pushed b18e3980c reviews: Astra round 2 on #892 S1 census after merging main, READY
- paul@keymail.dev pushed 819b7cfb4 reviews: Astra round 2 brief, S1 census after merging main
- paul@keymail.dev pushed f15d5aba4 merge main into stateless-scale-1-memory-env; census re-proposed
- paul@keymail.dev pushed 64e7aba56 reviews: Astra round 1 on #892 S1, READY, census approved
- paul@keymail.dev pushed 33b468af9 reviews: S1 brief names the design commit it reviews against
- paul@keymail.dev pushed 4dd2825ac test: the web launch-file invariant includes CARLOS_MEMORY_MIB (#892 S1)
- paul@keymail.dev pushed 1649f85c7 feat: give rootfs web and workers CARLOS_MEMORY_MIB (#892 S1)