carlos / platform Public

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.

Commits 8
Discussions 0 0 open
Tasks 0/0 done

Discussions

  • No discussions on this branch yet.

Tasks

  • No tasks yet.

Activity