carlos / platform Public

Merge main into precert-dns01-1293

Census chain: main's stateless-scale overlay kept; this branch's overlay
re-proposed on top.
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 1cceb72ebfdfacda022dc3a0b401767656e6135f parent ee7fee1parent 3d7f953
17 files changed, +867 −11
  • approved_stateless_scale_copy_test.go +62 −0
  • docs/site/rootfs.md +2 −0
  • docs/superpowers/notes/LUNA-COPY-BRIEF-STATELESS-SCALE-S1.md +454 −0
  • docs/superpowers/notes/census-proposal-precert-dns01-1293.md +1 −1
  • docs/superpowers/notes/census-proposal-stateless-scale-1-memory-env.md +25 −0
  • docs/superpowers/plans/2026-11-11-stateless-replicas-scale-copy.md +12 −0
  • docs/superpowers/reviews/CODEX-FINDINGS-STATELESS-SCALE-S1-R1.md +23 −0
  • docs/superpowers/reviews/CODEX-FINDINGS-STATELESS-SCALE-S1-R2.md +25 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-STATELESS-SCALE-S1-R2.md +8 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-STATELESS-SCALE-S1.md +72 −0
  • internal/activator/rootfs.go +2 −1
  • internal/activator/rootfs_invariants_test.go +3 −2
  • internal/activator/rootfs_memoryvar_test.go +134 −0
  • internal/activator/rootfsenv.go +30 −5
  • internal/activator/rootfsenv_test.go +1 −1
  • internal/provision/testdata/plan14-root-reads-chain.tsv +2 −1
  • internal/provision/testdata/plan14-root-reads-stateless-scale-1-memory-env.tsv +11 −0

CI passed — run details

CI log
=== gate ===
go: downloading go1.26.10 (linux/arm64)
go version go1.26.10 linux/arm64
opentofu: arm64, tofu 1.13.9, aws 6.73.0, archive 2.8.1
  tofu: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/tofu_1.13.9_linux_arm64.tar.gz
  tofu: downloaded, digest verified
  aws: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-aws_6.73.0_linux_arm64.zip
  aws: downloaded, digest verified
  archive: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-archive_2.8.1_linux_arm64.zip
  archive: downloaded, digest verified
  installed in /tmp/carlos-opentofu-aR0sGM
.amadan/test-gate.sh
go: downloading github.com/aws/aws-sdk-go-v2 v1.44.0
go: downloading github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.68.0
go: downloading github.com/aws/aws-sdk-go-v2/service/costexplorer v1.67.5
go: downloading github.com/aws/aws-sdk-go-v2/service/s3 v1.105.0
go: downloading github.com/aws/smithy-go v1.28.1
go: downloading github.com/benbjohnson/litestream v0.5.14
go: downloading github.com/superfly/ltx v0.5.1
go: downloading golang.org/x/net v0.62.0
go: downloading modernc.org/sqlite v1.55.0
go: downloading golang.org/x/sys v0.49.0
go: downloading golang.org/x/crypto v0.58.0
go: downloading golang.org/x/mod v0.41.0
go: downloading github.com/aws/aws-sdk-go-v2/service/route53 v1.64.1
go: downloading github.com/pion/logging v0.2.4
go: downloading github.com/pion/stun/v3 v3.1.5
go: downloading github.com/pion/turn/v4 v4.1.4
go: downloading github.com/aws/aws-sdk-go-v2/service/ec2 v1.324.0
go: downloading github.com/aws/aws-sdk-go-v2/service/sesv2 v1.66.6
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.31
go: downloading github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.14
go: downloading github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.23
go: downloading github.com/prometheus/client_golang v1.17.0
go: downloading golang.org/x/sync v0.24.0
go: downloading github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.20.18
go: downloading github.com/pion/randutil v0.1.0
go: downloading github.com/pion/transport/v4 v4.0.2
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/cespare/xxhash/v2 v2.3.0
go: downloading github.com/prometheus/client_model v0.5.0
go: downloading google.golang.org/protobuf v1.36.10
go: downloading github.com/prometheus/common v0.45.0
go: downloading github.com/prometheus/procfs v0.12.0
go: downloading github.com/pion/dtls/v3 v3.1.4
go: downloading golang.org/x/text v0.43.0
go: downloading github.com/wlynxg/anet v0.0.5
go: downloading github.com/klauspost/compress v1.20.2
go: downloading modernc.org/sqlite v1.55.0
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/mathutil v1.7.1
=== launchctx (4 s, from +0 s)
ok  	amadan.net/carlos/platform.git/launchctx	0.015s
?   	amadan.net/carlos/platform.git/launchctx/controlname	[no test files]
?   	amadan.net/carlos/platform.git/launchctx/wireid	[no test files]
=== vet (181 s, from +0 s)
go: downloading github.com/klauspost/compress v1.20.2
go: downloading modernc.org/sqlite v1.55.0
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading modernc.org/libc v1.74.1
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading github.com/google/uuid v1.6.0
go: downloading modernc.org/mathutil v1.7.1
=== vet-tags (170 s, from +0 s)
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading github.com/klauspost/compress v1.20.2
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/memory v1.11.0
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/google/uuid v1.6.0
go: downloading github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec
=== gofmt (1 s, from +0 s)
gofmt -l .: clean
=== rest (374 s, from +14 s)
ok  	github.com/carlosframework/platform/cmd/carlos-media	126.931s
?   	github.com/carlosframework/platform/cmd/changelog	[no test files]
ok  	github.com/carlosframework/platform/cmd/console	205.243s
ok  	github.com/carlosframework/platform/cmd/mediaimage	43.682s
ok  	github.com/carlosframework/platform/cmd/moveprobe	15.079s
ok  	github.com/carlosframework/platform/cmd/pricebook-export	0.067s
ok  	github.com/carlosframework/platform/cmd/rootfswitness	0.117s
ok  	github.com/carlosframework/platform/cmd/runsc-assets	0.231s
ok  	github.com/carlosframework/platform/cmd/zddprobe	0.983s
ok  	github.com/carlosframework/platform/internal/agentsock	0.081s
ok  	github.com/carlosframework/platform/internal/alerting	0.050s
ok  	github.com/carlosframework/platform/internal/analytics	0.577s
ok  	github.com/carlosframework/platform/internal/appconfig	44.981s
ok  	github.com/carlosframework/platform/internal/apperr	0.470s
ok  	github.com/carlosframework/platform/internal/applog	0.803s
ok  	github.com/carlosframework/platform/internal/apppolicy	3.050s
ok  	github.com/carlosframework/platform/internal/assetcache	0.689s
ok  	github.com/carlosframework/platform/internal/awsinv	0.021s
ok  	github.com/carlosframework/platform/internal/awsmanaged	0.591s
ok  	github.com/carlosframework/platform/internal/awsregiongroup	0.917s
ok  	github.com/carlosframework/platform/internal/awsterminations	0.033s
ok  	github.com/carlosframework/platform/internal/backupswords	0.018s
ok  	github.com/carlosframework/platform/internal/billing	0.108s
ok  	github.com/carlosframework/platform/internal/billing/billingtest	0.081s
ok  	github.com/carlosframework/platform/internal/billingstripe	2.373s
ok  	github.com/carlosframework/platform/internal/boxchoice	0.064s
ok  	github.com/carlosframework/platform/internal/boxid	1.716s
?   	github.com/carlosframework/platform/internal/boxid/boxidtest	[no test files]
?   	github.com/carlosframework/platform/internal/boxid/internal/signtest	[no test files]
ok  	github.com/carlosframework/platform/internal/boxroles	0.027s
ok  	github.com/carlosframework/platform/internal/boxself	0.166s
ok  	github.com/carlosframework/platform/internal/boxvolumes	0.065s
ok  	github.com/carlosframework/platform/internal/caps	0.073s
ok  	github.com/carlosframework/platform/internal/certwarm	0.018s
ok  	github.com/carlosframework/platform/internal/cgroup	1.418s
ok  	github.com/carlosframework/platform/internal/changelog	4.197s
ok  	github.com/carlosframework/platform/internal/clamd	0.063s
?   	github.com/carlosframework/platform/internal/cliflag	[no test files]
ok  	github.com/carlosframework/platform/internal/clireg	0.011s
ok  	github.com/carlosframework/platform/internal/codehealth	18.977s
ok  	github.com/carlosframework/platform/internal/compute	0.015s
?   	github.com/carlosframework/platform/internal/controlname	[no test files]
?   	github.com/carlosframework/platform/internal/controlsock	[no test files]
ok  	github.com/carlosframework/platform/internal/dbdoor	11.253s
ok  	github.com/carlosframework/platform/internal/dbdoor/dbdoortest	0.075s
ok  	github.com/carlosframework/platform/internal/dbquery	0.025s
ok  	github.com/carlosframework/platform/internal/dbreads	3.370s
?   	github.com/carlosframework/platform/internal/dbreads/dbreadstest	[no test files]
ok  	github.com/carlosframework/platform/internal/dbverify	0.021s
ok  	github.com/carlosframework/platform/internal/demo	0.012s
ok  	github.com/carlosframework/platform/internal/demobuild	3.547s
ok  	github.com/carlosframework/platform/internal/democlaim	0.612s
ok  	github.com/carlosframework/platform/internal/devbox	19.542s
ok  	github.com/carlosframework/platform/internal/dnsrec	0.015s
ok  	github.com/carlosframework/platform/internal/docsite	0.170s
ok  	github.com/carlosframework/platform/internal/domainreg	0.015s
ok  	github.com/carlosframework/platform/internal/domains	67.240s
ok  	github.com/carlosframework/platform/internal/doorkey	0.023s
ok  	github.com/carlosframework/platform/internal/economics	0.023s
ok  	github.com/carlosframework/platform/internal/edgefence	0.147s
ok  	github.com/carlosframework/platform/internal/edgeguard	0.528s
?   	github.com/carlosframework/platform/internal/edgeproof	[no test files]
ok  	github.com/carlosframework/platform/internal/edgesfile	0.102s
ok  	github.com/carlosframework/platform/internal/egressaddr	0.012s
ok  	github.com/carlosframework/platform/internal/execsandbox	108.353s
ok  	github.com/carlosframework/platform/internal/fileacl	0.009s
ok  	github.com/carlosframework/platform/internal/fleetapi	3.017s
ok  	github.com/carlosframework/platform/internal/fleetstore	0.007s
ok  	github.com/carlosframework/platform/internal/fxrate	0.046s
ok  	github.com/carlosframework/platform/internal/gate	6.038s
ok  	github.com/carlosframework/platform/internal/genselect	0.088s
ok  	github.com/carlosframework/platform/internal/geo	0.024s
ok  	github.com/carlosframework/platform/internal/geoip	0.287s
ok  	github.com/carlosframework/platform/internal/groupadmission	0.011s
ok  	github.com/carlosframework/platform/internal/grouprollaws	17.238s
ok  	github.com/carlosframework/platform/internal/hadeparture	0.010s
ok  	github.com/carlosframework/platform/internal/hafresh	0.009s
ok  	github.com/carlosframework/platform/internal/hairpin	0.236s
ok  	github.com/carlosframework/platform/internal/historyreadback	1.153s
ok  	github.com/carlosframework/platform/internal/hostactors	23.052s
ok  	github.com/carlosframework/platform/internal/hostbox	23.214s
ok  	github.com/carlosframework/platform/internal/hostclaim	3.339s
ok  	github.com/carlosframework/platform/internal/hostenv	0.051s
ok  	github.com/carlosframework/platform/internal/hostevidence	0.022s
ok  	github.com/carlosframework/platform/internal/hostexec	28.054s
ok  	github.com/carlosframework/platform/internal/hostfence	0.232s
ok  	github.com/carlosframework/platform/internal/hostfiles	29.094s
ok  	github.com/carlosframework/platform/internal/hostfloor	0.069s
ok  	github.com/carlosframework/platform/internal/hostguard	1.551s
ok  	github.com/carlosframework/platform/internal/hostops	9.709s
?   	github.com/carlosframework/platform/internal/hostops/fencerelease	[no test files]
ok  	github.com/carlosframework/platform/internal/hostops/internal/fencerelease	0.015s
ok  	github.com/carlosframework/platform/internal/hostquarantine	0.011s
ok  	github.com/carlosframework/platform/internal/hostrelocate	1.736s
ok  	github.com/carlosframework/platform/internal/hostresolve	0.786s
ok  	github.com/carlosframework/platform/internal/hostwrite	0.009s
ok  	github.com/carlosframework/platform/internal/infraview	0.022s
ok  	github.com/carlosframework/platform/internal/ingresshealth	0.020s
ok  	github.com/carlosframework/platform/internal/ingresshealth/awstg	0.021s
ok  	github.com/carlosframework/platform/internal/instancectl	55.815s
ok  	github.com/carlosframework/platform/internal/instanceexec	9.454s
ok  	github.com/carlosframework/platform/internal/instancefs	0.039s
ok  	github.com/carlosframework/platform/internal/instancekey	0.011s
ok  	github.com/carlosframework/platform/internal/instanceupdates	0.044s
ok  	github.com/carlosframework/platform/internal/interactive	0.631s
ok  	github.com/carlosframework/platform/internal/launchd	0.021s
ok  	github.com/carlosframework/platform/internal/layout	21.686s
ok  	github.com/carlosframework/platform/internal/layout/pubclass	104.563s
ok  	github.com/carlosframework/platform/internal/lbhealth	0.022s
ok  	github.com/carlosframework/platform/internal/lease	145.722s
ok  	github.com/carlosframework/platform/internal/lease/leasetest	2.012s
ok  	github.com/carlosframework/platform/internal/lease/locktest	0.021s
ok  	github.com/carlosframework/platform/internal/ledger	0.089s
ok  	github.com/carlosframework/platform/internal/mail	0.915s
ok  	github.com/carlosframework/platform/internal/mailer	0.980s
ok  	github.com/carlosframework/platform/internal/mailsubmit	2.318s
ok  	github.com/carlosframework/platform/internal/mailwire	0.014s
ok  	github.com/carlosframework/platform/internal/maintenance	0.259s
ok  	github.com/carlosframework/platform/internal/maintenanceexec	8.735s
ok  	github.com/carlosframework/platform/internal/maintenanceguard	0.341s
ok  	github.com/carlosframework/platform/internal/media	2.104s
ok  	github.com/carlosframework/platform/internal/media/mediatest	0.008s
ok  	github.com/carlosframework/platform/internal/mediaaws	62.411s
ok  	github.com/carlosframework/platform/internal/mediahandler	43.311s
ok  	github.com/carlosframework/platform/internal/mediajobs	1.178s
ok  	github.com/carlosframework/platform/internal/medialocal	9.547s
ok  	github.com/carlosframework/platform/internal/metrics	0.120s
ok  	github.com/carlosframework/platform/internal/minorunits	0.006s
ok  	github.com/carlosframework/platform/internal/moves	55.735s
ok  	github.com/carlosframework/platform/internal/moves/archive	3.013s
ok  	github.com/carlosframework/platform/internal/moves/offlinerun	0.157s
ok  	github.com/carlosframework/platform/internal/namedunits	0.058s
ok  	github.com/carlosframework/platform/internal/objstore	1.077s
ok  	github.com/carlosframework/platform/internal/ops	16.974s
ok  	github.com/carlosframework/platform/internal/pageindex	3.793s
ok  	github.com/carlosframework/platform/internal/parity	0.102s
?   	github.com/carlosframework/platform/internal/parity/cmd/parity-doc	[no test files]
ok  	github.com/carlosframework/platform/internal/park	0.635s
ok  	github.com/carlosframework/platform/internal/perf	0.177s
ok  	github.com/carlosframework/platform/internal/plans	0.110s
ok  	github.com/carlosframework/platform/internal/privatefile	0.009s
ok  	github.com/carlosframework/platform/internal/provision	236.352s
ok  	github.com/carlosframework/platform/internal/proxyproto	0.944s
ok  	github.com/carlosframework/platform/internal/publicrelease	0.025s
ok  	github.com/carlosframework/platform/internal/ratelimit	0.289s
ok  	github.com/carlosframework/platform/internal/regionlabel	0.068s
ok  	github.com/carlosframework/platform/internal/regionname	0.022s
ok  	github.com/carlosframework/platform/internal/registrar	0.019s
ok  	github.com/carlosframework/platform/internal/registrar/openprovider	0.312s
?   	github.com/carlosframework/platform/internal/registrar/registrartest	[no test files]
ok  	github.com/carlosframework/platform/internal/registry	85.565s
ok  	github.com/carlosframework/platform/internal/relay	7.648s
ok  	github.com/carlosframework/platform/internal/release	85.882s
ok  	github.com/carlosframework/platform/internal/replicagen	0.060s
ok  	github.com/carlosframework/platform/internal/replicas	0.093s
ok  	github.com/carlosframework/platform/internal/reqrec	7.160s
ok  	github.com/carlosframework/platform/internal/rollout	13.055s
ok  	github.com/carlosframework/platform/internal/rolloutwords	0.078s
ok  	github.com/carlosframework/platform/internal/rootaws	103.356s
ok  	github.com/carlosframework/platform/internal/rootfsimage	1.215s
ok  	github.com/carlosframework/platform/internal/rootparticipation	0.096s
ok  	github.com/carlosframework/platform/internal/rootstate	0.065s
ok  	github.com/carlosframework/platform/internal/runs	0.668s
ok  	github.com/carlosframework/platform/internal/s3compat	0.034s
ok  	github.com/carlosframework/platform/internal/s3fake	1.034s
ok  	github.com/carlosframework/platform/internal/safefile	0.039s
ok  	github.com/carlosframework/platform/internal/schedule	24.737s
ok  	github.com/carlosframework/platform/internal/seeds	0.068s
ok  	github.com/carlosframework/platform/internal/sim/litestreamfacts	5.189s
ok  	github.com/carlosframework/platform/internal/sim/mediajobs	47.213s
ok  	github.com/carlosframework/platform/internal/sim/regionha	24.848s
ok  	github.com/carlosframework/platform/internal/status	0.570s
ok  	github.com/carlosframework/platform/internal/steering	0.505s
ok  	github.com/carlosframework/platform/internal/stopevidence	0.563s
ok  	github.com/carlosframework/platform/internal/storecfg	0.561s
ok  	github.com/carlosframework/platform/internal/svcrole	0.019s
ok  	github.com/carlosframework/platform/internal/systemd	6.450s
?   	github.com/carlosframework/platform/internal/systemdshow	[no test files]
ok  	github.com/carlosframework/platform/internal/team	4.589s
ok  	github.com/carlosframework/platform/internal/teamcontract	0.402s
ok  	github.com/carlosframework/platform/internal/telemetry	0.050s
ok  	github.com/carlosframework/platform/internal/termfence	4.295s
ok  	github.com/carlosframework/platform/internal/timerspec	0.034s
ok  	github.com/carlosframework/platform/internal/tsidentity	4.217s
ok  	github.com/carlosframework/platform/internal/tunnelclient	0.555s
ok  	github.com/carlosframework/platform/internal/unixdial	0.011s
ok  	github.com/carlosframework/platform/internal/updatewords	0.064s
ok  	github.com/carlosframework/platform/internal/upstreamguard	0.009s
?   	github.com/carlosframework/platform/internal/upstreamguard/guardtest	[no test files]
ok  	github.com/carlosframework/platform/internal/usage	0.052s
ok  	github.com/carlosframework/platform/internal/version	0.017s
ok  	github.com/carlosframework/platform/internal/vet	3.330s
ok  	github.com/carlosframework/platform/internal/zonehost	0.030s
ok  	github.com/carlosframework/platform/internal/zonehost/route53zones	0.069s
?   	github.com/carlosframework/platform/internal/zonehost/zonehosttest	[no test files]
?   	github.com/carlosframework/platform/scripts/gitleaks-gate	[no test files]
ok  	github.com/carlosframework/platform/scripts/govulncheck-gate	0.030s
ok  	github.com/carlosframework/platform/scripts/pathmapcheck	0.086s
ok  	github.com/carlosframework/platform/scripts/region-ha-g2/fixture	5.207s
ok  	github.com/carlosframework/platform/scripts/stateless-replicas-drill	1.235s
ok  	github.com/carlosframework/platform/scripts/witness-pointer	0.025s
=== cutover-witness (154 s, from +14 s)
ok  	github.com/carlosframework/platform	1.744s
=== internal_grouproll@0 (275 s, from +72 s)
ok  	github.com/carlosframework/platform/internal/grouproll	273.313s
=== internal_grouproll@1 (276 s, from +72 s)
ok  	github.com/carlosframework/platform/internal/grouproll	274.981s
=== internal_activator@0 (145 s, from +139 s)
ok  	github.com/carlosframework/platform/internal/activator	141.430s
=== internal_activator@1 (135 s, from +139 s)
ok  	github.com/carlosframework/platform/internal/activator	131.722s
=== internal_activator@2 (141 s, from +139 s)
ok  	github.com/carlosframework/platform/internal/activator	137.217s
=== internal_activator@3 (157 s, from +139 s)
ok  	github.com/carlosframework/platform/internal/activator	153.087s
=== root@0 (119 s, from +168 s)
ok  	github.com/carlosframework/platform	109.842s
=== root@1 (114 s, from +168 s)
ok  	github.com/carlosframework/platform	104.870s
=== root@2 (117 s, from +168 s)
ok  	github.com/carlosframework/platform	107.856s
=== root@3 (112 s, from +168 s)
ok  	github.com/carlosframework/platform	102.800s
=== root@4 (97 s, from +168 s)
ok  	github.com/carlosframework/platform	89.023s
=== internal_edge@0 (192 s, from +174 s)
ok  	github.com/carlosframework/platform/internal/edge	182.786s
=== internal_edge@1 (186 s, from +174 s)
ok  	github.com/carlosframework/platform/internal/edge	177.118s
=== internal_edge@2 (166 s, from +174 s)
ok  	github.com/carlosframework/platform/internal/edge	156.967s
=== internal_edge@3 (150 s, from +174 s)
ok  	github.com/carlosframework/platform/internal/edge	142.544s
=== internal_host@0 (140 s, from +208 s)
ok  	github.com/carlosframework/platform/internal/host	135.251s
=== internal_host@1 (144 s, from +208 s)
ok  	github.com/carlosframework/platform/internal/host	139.178s
=== internal_host@2 (271 s, from +208 s)
ok  	github.com/carlosframework/platform/internal/host	265.923s
=== internal_host@3 (196 s, from +208 s)
ok  	github.com/carlosframework/platform/internal/host	191.692s
=== internal_host@4 (203 s, from +208 s)
ok  	github.com/carlosframework/platform/internal/host	198.500s
=== internal_host@5 (201 s, from +208 s)
ok  	github.com/carlosframework/platform/internal/host	196.379s
=== internal_console@0 (187 s, from +215 s)
ok  	github.com/carlosframework/platform/internal/console	180.713s
=== internal_console@1 (197 s, from +215 s)
ok  	github.com/carlosframework/platform/internal/console	190.516s
=== internal_console@2 (194 s, from +215 s)
ok  	github.com/carlosframework/platform/internal/console	186.984s
=== internal_console@3 (246 s, from +215 s)
ok  	github.com/carlosframework/platform/internal/console	239.381s
=== internal_console@4 (181 s, from +215 s)
ok  	github.com/carlosframework/platform/internal/console	174.700s
=== internal_console@5 (198 s, from +215 s)
ok  	github.com/carlosframework/platform/internal/console	190.940s
=== internal_console@6 (199 s, from +215 s)
ok  	github.com/carlosframework/platform/internal/console	192.120s
=== internal_console@7 (198 s, from +215 s)
ok  	github.com/carlosframework/platform/internal/console	191.405s
=== internal_console@8 (204 s, from +215 s)
ok  	github.com/carlosframework/platform/internal/console	197.753s
=== internal_console@9 (204 s, from +215 s)
ok  	github.com/carlosframework/platform/internal/console	197.156s
=== internal_console@10 (213 s, from +215 s)
ok  	github.com/carlosframework/platform/internal/console	206.177s
=== internal_console@11 (223 s, from +215 s)
ok  	github.com/carlosframework/platform/internal/console	216.706s
=== internal_console@12 (275 s, from +215 s)
ok  	github.com/carlosframework/platform/internal/console	269.149s
=== internal_console@13 (191 s, from +215 s)
ok  	github.com/carlosframework/platform/internal/console	184.627s
=== internal_console@14 (188 s, from +215 s)
ok  	github.com/carlosframework/platform/internal/console	180.407s
=== internal_console@15 (241 s, from +215 s)
ok  	github.com/carlosframework/platform/internal/console	233.871s
=== internal_console@16 (223 s, from +215 s)
ok  	github.com/carlosframework/platform/internal/console	214.859s
=== internal_console@17 (200 s, from +215 s)
ok  	github.com/carlosframework/platform/internal/console	192.028s
=== internal_console@18 (201 s, from +215 s)
ok  	github.com/carlosframework/platform/internal/console	193.636s
=== internal_console@19 (201 s, from +215 s)
ok  	github.com/carlosframework/platform/internal/console	193.314s
=== internal_console@20 (196 s, from +215 s)
ok  	github.com/carlosframework/platform/internal/console	188.842s
=== internal_console@21 (221 s, from +215 s)
ok  	github.com/carlosframework/platform/internal/console	212.744s
=== internal_console@22 (215 s, from +215 s)
ok  	github.com/carlosframework/platform/internal/console	207.129s
=== internal_console@23 (212 s, from +215 s)
ok  	github.com/carlosframework/platform/internal/console	204.615s
=== lists: internal_console 214 s, internal_edge 173 s, internal_activator 138 s, internal_host 207 s, root 167 s, internal_grouproll 71 s
=== cpu: the gate used 12304 cpu-seconds in 490 s, about 25.1 of 32 cores; the machine as a whole was 84% busy
=== opentofu ===
opentofu: 35 test files in 11 suites, OpenTofu v1.13.9
  initialised in 15 s
  ok      22 s  infra/modules/box-fence-writer/tests/writer.tftest.hcl  Success! 1 passed, 0 failed.
  ok      33 s  infra/modules/deployment-buckets/tests/data_lifecycle.tftest.hcl  Success! 3 passed, 0 failed.
  ok      21 s  infra/modules/deployment-buckets/tests/db_reads.tftest.hcl  Success! 1 passed, 0 failed.
  ok      23 s  infra/modules/deployment-buckets/tests/evidence.tftest.hcl  Success! 1 passed, 0 failed.
  ok      31 s  infra/modules/deployment-buckets/tests/fence_writers.tftest.hcl  Success! 3 passed, 0 failed.
  ok      88 s  infra/modules/media-engine/tests/media_engine.tftest.hcl  Success! 24 passed, 0 failed.
  ok      35 s  infra/modules/pdf-host/tests/computed.tftest.hcl  Success! 2 passed, 0 failed.
  ok      71 s  infra/modules/pdf-host/tests/pdf_host.tftest.hcl  Success! 24 passed, 0 failed.
  ok      40 s  infra/modules/region-group-operator-document/tests/document.tftest.hcl  Success! 12 passed, 0 failed.
  ok      18 s  infra/modules/region-host/ingress/tests/fixed-targets/tests/targets.tftest.hcl  Success! 2 passed, 0 failed.
  ok      69 s  infra/modules/region-host/ingress/tests/group_ingress.tftest.hcl  Success! 30 passed, 0 failed.
  ok      41 s  infra/modules/region-host/tests/alert_publish.tftest.hcl  Success! 18 passed, 0 failed.
  ok      39 s  infra/modules/region-host/tests/alerts_topic.tftest.hcl  Success! 16 passed, 0 failed.
  ok      11 s  infra/modules/region-host/tests/analytics_prune.tftest.hcl  Success! 2 passed, 0 failed.
  ok      17 s  infra/modules/region-host/tests/console_mail.tftest.hcl  Success! 4 passed, 0 failed.
  ok       9 s  infra/modules/region-host/tests/fixed_state_unchanged.tftest.hcl  Success! 1 passed, 0 failed.
  ok      68 s  infra/modules/region-host/tests/group.tftest.hcl  Success! 32 passed, 0 failed.
  ok      10 s  infra/modules/region-host/tests/group_alarms.tftest.hcl  Success! 4 passed, 0 failed.
  ok      11 s  infra/modules/region-host/tests/group_iam.tftest.hcl  Success! 4 passed, 0 failed.
  ok       6 s  infra/modules/region-host/tests/group_isolation.tftest.hcl  Success! 1 passed, 0 failed.
  ok      35 s  infra/modules/region-host/tests/group_operator.tftest.hcl  Success! 13 passed, 0 failed.
  ok      11 s  infra/modules/region-host/tests/group_user_data.tftest.hcl  Success! 3 passed, 0 failed.
  ok      28 s  infra/modules/region-host/tests/health_alarms.tftest.hcl  Success! 10 passed, 0 failed.
  ok      17 s  infra/modules/region-host/tests/ingress_drain_read.tftest.hcl  Success! 4 passed, 0 failed.
  ok       5 s  infra/modules/region-host/tests/instance_metadata.tftest.hcl  Success! 1 passed, 0 failed.
  ok      23 s  infra/modules/region-host/tests/mailer.tftest.hcl  Success! 6 passed, 0 failed.
  ok      11 s  infra/modules/region-host/tests/mailer_group.tftest.hcl  Success! 2 passed, 0 failed.
  ok      11 s  infra/modules/region-host/tests/managed_fleets/group_refusal.tftest.hcl  Success! 2 passed, 0 failed.
  ok     100 s  infra/modules/region-host/tests/managed_fleets/managed_fleets.tftest.hcl  Success! 46 passed, 0 failed.
  ok      69 s  infra/modules/region-host/tests/store_conversion.tftest.hcl  Success! 27 passed, 0 failed.
  ok      14 s  infra/modules/region-host/tests/store_scanning.tftest.hcl  Success! 4 passed, 0 failed.
  ok      17 s  infra/modules/region-host/tests/user_data_ignored.tftest.hcl  Success! 3 passed, 0 failed.
  ok      13 s  infra/modules/region-remote-host/tests/data_lifecycle.tftest.hcl  Success! 3 passed, 0 failed.
  ok      16 s  infra/modules/region-remote-host/tests/no_deployment_bucket.tftest.hcl  Success! 5 passed, 0 failed.
  ok      29 s  infra/modules/scanner-host/tests/scanner_host.tftest.hcl  Success! 14 passed, 0 failed.
opentofu: 35 files in 204 s
opentofu: PASS
=== cross ===
--- shard 0 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling darwin/arm64
--- shard 1 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling darwin/amd64
--- shard 2 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling linux/arm64
linux/arm64 carlos binary: 65732770 bytes (ceiling 70000000)
--- shard 3 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling windows/amd64
--- shard 4 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling windows/arm64
=== minio-contract ===
go version go1.26.10 linux/arm64
minio contract: arm64, minio RELEASE.2025-09-07T16-13-09Z, mc RELEASE.2025-08-13T08-35-41Z
  minio: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/minio/minio.linux-arm64.RELEASE.2025-09-07T16-13-09Z
  minio: downloaded, digest verified
  mc: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/minio/mc.linux-arm64.RELEASE.2025-08-13T08-35-41Z
  mc: downloaded, digest verified
  minio healthy on 127.0.0.1:29560
Added `local` successfully.
Bucket created successfully `local/contract-bucket`.
Bucket created successfully `local/denied-bucket`.
Created policy `contract-only` successfully.
Added user `scopeduser` successfully.
Attached Policies: [contract-only]
To User: scopeduser
  buckets and scoped user ready
=== RUN   TestDeliveredContractMinio
=== RUN   TestDeliveredContractMinio/put
=== RUN   TestDeliveredContractMinio/get_round-trips_the_body
=== RUN   TestDeliveredContractMinio/list_shows_the_key
=== RUN   TestDeliveredContractMinio/head_and_list_agree_on_the_version
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_its_own_object
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/not_by_PutObjectTagging
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/and_not_by_x-amz-tagging_on_upload
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CreateMultipartUpload
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CopyObject_with_a_REPLACE_tagging_directive
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/but_multipart_itself_is_allowed
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_copy_itself_is_allowed
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/a_POST-policy_forged_tag_with_a_matching_version_is_still_not_a_verdict
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_an_ordinary_tagged-with-something-else_upload_is_allowed
=== RUN   TestDeliveredContractMinio/delete_removes_it
=== RUN   TestDeliveredContractMinio/cross-bucket_denial
--- PASS: TestDeliveredContractMinio (0.03s)
    --- PASS: TestDeliveredContractMinio/put (0.00s)
    --- PASS: TestDeliveredContractMinio/get_round-trips_the_body (0.00s)
    --- PASS: TestDeliveredContractMinio/list_shows_the_key (0.00s)
    --- PASS: TestDeliveredContractMinio/head_and_list_agree_on_the_version (0.00s)
    --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_its_own_object (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/not_by_PutObjectTagging (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/and_not_by_x-amz-tagging_on_upload (0.00s)
    --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route (0.01s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CreateMultipartUpload (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CopyObject_with_a_REPLACE_tagging_directive (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/but_multipart_itself_is_allowed (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_copy_itself_is_allowed (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/a_POST-policy_forged_tag_with_a_matching_version_is_still_not_a_verdict (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_an_ordinary_tagged-with-something-else_upload_is_allowed (0.00s)
    --- PASS: TestDeliveredContractMinio/delete_removes_it (0.00s)
    --- PASS: TestDeliveredContractMinio/cross-bucket_denial (0.00s)
PASS
ok  	github.com/carlosframework/platform/internal/objstore	0.036s
=== RUN   TestT4StorageProbeMinio
2026/11/22 13:06:53 moves: T4: STORE: list: operation error S3: ListObjectsV2, https response error StatusCode: 403, RequestID: 18EA5FDF222FE041, HostID: e3011d5af6ae33a6bd901f7e5c4d419a2ac8b910fc2dc25dc5fa227f109c25af, api error SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your key and signing method.
--- PASS: TestT4StorageProbeMinio (0.01s)
PASS
ok  	github.com/carlosframework/platform/internal/host	0.041s
=== RUN   TestS3StoreMinioContract
=== RUN   TestS3StoreMinioContract/conditional_get_and_etag_listing
=== RUN   TestS3StoreMinioContract/bump_through_every_mutation_path
--- PASS: TestS3StoreMinioContract (0.03s)
    --- PASS: TestS3StoreMinioContract/conditional_get_and_etag_listing (0.01s)
    --- PASS: TestS3StoreMinioContract/bump_through_every_mutation_path (0.02s)
PASS
ok  	github.com/carlosframework/platform/internal/release	0.042s
Bucket created successfully `local/analytics-versions`.
local/analytics-versions versioning is enabled
Created policy `analytics-versions` successfully.
Added user `analyticsversions` successfully.
Attached Policies: [analytics-versions]
To User: analyticsversions
=== RUN   TestS3StoreMinioVersions
--- PASS: TestS3StoreMinioVersions (0.03s)
PASS
ok  	github.com/carlosframework/platform/internal/release	0.041s
=== RUN   TestEndToEndMinio
=== RUN   TestEndToEndMinio/plan
=== RUN   TestEndToEndMinio/roll
=== RUN   TestEndToEndMinio/replace
=== RUN   TestEndToEndMinio/remove
--- PASS: TestEndToEndMinio (0.47s)
    --- PASS: TestEndToEndMinio/plan (0.01s)
    --- PASS: TestEndToEndMinio/roll (0.13s)
    --- PASS: TestEndToEndMinio/replace (0.15s)
    --- PASS: TestEndToEndMinio/remove (0.15s)
PASS
ok  	github.com/carlosframework/platform/internal/grouproll	0.474s
Bucket created successfully `local/dbf-deploy`.
Bucket created successfully `local/dbf-data-ie`.
Bucket created successfully `local/dbf-data-uk`.
local/dbf-deploy versioning is enabled
Created policy `dbf-console` successfully.
Created policy `dbf-ukbox` successfully.
Added user `dbfconsole` successfully.
Added user `dbfukbox` successfully.
Attached Policies: [dbf-console]
To User: dbfconsole
Attached Policies: [dbf-ukbox]
To User: dbfukbox
=== RUN   TestDBForwardMinio
2026/11/22 13:06:59 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/22 13:06:59 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/22 13:06:59 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/22 13:06:59 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/22 13:06:59 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/22 13:06:59 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/22 13:06:59 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000003
2026/11/22 13:06:59 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000003 maxTXID=0000000000000003 size=454
2026/11/22 13:06:59 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000003
2026/11/22 13:06:59 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/22 13:06:59 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/22 13:06:59 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/22 13:06:59 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/22 13:06:59 console: could not notify member@example.com of a CLI token issue: keymail: lookup member@example.com: keymail: GET /api/federation/lookup?addr=member%40example.com&from=console%40127.0.0.1%3A35917: could not determine target mailbox
    agent.go:136: dbreads: dbr_x2ihtft6rdrazbrphsw5g5j66u: planned 3 files (1544 bytes) and restored to 3 in 13ms
    agent.go:136: dbreads: dbr_x2ihtft6rdrazbrphsw5g5j66u: output 5 bytes in 1 confirmed chunks in 1ms
2026/11/22 13:07:00 console: db read dbr_x2ihtft6rdrazbrphsw5g5j66u: relayed 1 chunks (102 bytes) in 1.005s, ended done
    agent.go:136: dbreads: dbr_rxtsuhejofon4u6hac5nuvrkc4: planned 1 files (720 bytes) and restored to 1 in 11ms
    agent.go:136: dbreads: dbr_rxtsuhejofon4u6hac5nuvrkc4: output 5 bytes in 1 confirmed chunks in 2ms
2026/11/22 13:07:01 console: db read dbr_rxtsuhejofon4u6hac5nuvrkc4: relayed 1 chunks (102 bytes) in 1.005s, ended done
    agent.go:136: dbreads: dbr_czifh5t457izsnh6e2xne7fi5u: planned 3 files (1544 bytes) and held through 3 in 13ms
    agent.go:136: dbreads: dbr_czifh5t457izsnh6e2xne7fi5u: output 1544 bytes in 1 confirmed chunks in 1ms
2026/11/22 13:07:02 console: db read dbr_czifh5t457izsnh6e2xne7fi5u: relayed 1 chunks (1641 bytes) in 1.005s, ended done
=== RUN   TestDBForwardMinio/by_disconnect
=== NAME  TestDBForwardMinio
    agent.go:136: dbreads: dbr_7frulo3fy6n5qhsdmc5ghqutmy: planned 3 files (1544 bytes) and restored to 3 in 13ms
2026/11/22 13:07:02 console: db read dbr_7frulo3fy6n5qhsdmc5ghqutmy: relayed 0 chunks (0 bytes) in 16ms, ended client gone
    agent.go:136: dbreads: dbr_7frulo3fy6n5qhsdmc5ghqutmy: output 5 bytes in 1 confirmed chunks in 104ms
=== RUN   TestDBForwardMinio/by_timeout
=== NAME  TestDBForwardMinio
    agent.go:136: dbreads: dbr_2lbq2vwqsbuihiygk44f7ghsfa: planned 3 files (1544 bytes) and restored to 3 in 14ms
2026/11/22 13:07:22 console: db read dbr_2lbq2vwqsbuihiygk44f7ghsfa: relayed 0 chunks (0 bytes) in 19.253s, ended no-result
    agent.go:136: dbreads: dbr_2lbq2vwqsbuihiygk44f7ghsfa: output 5 bytes in 1 confirmed chunks in 19.224s
--- PASS: TestDBForwardMinio (22.90s)
    --- PASS: TestDBForwardMinio/by_disconnect (0.23s)
    --- PASS: TestDBForwardMinio/by_timeout (19.37s)
PASS
ok  	github.com/carlosframework/platform/internal/console	22.944s
Bucket created successfully `local/media-transfers`.
Bucket created successfully `local/media-transfer-results`.
Created policy `media-transfers` successfully.
Added user `mediatransfers` successfully.
Attached Policies: [media-transfers]
To User: mediatransfers
=== RUN   TestMediaTransfersMinio
    upload.go:117: codec: the store already holds video.mp4
    upload.go:117: codec: the store already holds video.m3u8
    upload.go:117: codec: the store already holds poster.jpg
--- PASS: TestMediaTransfersMinio (0.06s)
PASS
ok  	github.com/carlosframework/platform/internal/mediaaws	0.061s
Bucket created successfully `local/media-local-store`.
Bucket created successfully `local/media-local-results`.
Created policy `media-local` successfully.
Added user `medialocal` successfully.
Attached Policies: [media-local]
To User: medialocal
=== RUN   TestLocalEndToEndMinio
--- PASS: TestLocalEndToEndMinio (0.55s)
PASS
ok  	github.com/carlosframework/platform/internal/medialocal	0.553s
=== RUN   TestHeldHandoverTwoBoxMinio
2026/11/22 13:07:26 edge: mesh key: minted
2026/11/22 13:07:27 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/22 13:07:27 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/22 13:07:27 tenant admission is open. accepting tenant work
2026/11/22 13:07:27 activator: HA placement host=shop-23bf2549.example.test kind=Place ref=annie reason=roomiest generation=2026-11-22T13:07:27Z lock_generation=0
2026/11/22 13:07:27 lease: t8-23bf2549/shop-23bf2549.example.test: HA lease acquired in 4ms (first wake)
2026/11/22 13:07:27 activator: shop-23bf2549.example.test: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/11/22 13:07:27 activator: shop-23bf2549.example.test: started carlos-instance@shop\x2d23bf2549.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 6ms, control socket 0s, key gate 0s, logs 0s) 6ms, launch file 0s, gate 0s, root start 1ms)
2026/11/22 13:07:27 activator: shop-23bf2549.example.test: carlos-instance@shop\x2d23bf2549.example.test.service launched in 7ms, healthy 0s later
2026/11/22 13:07:27 activator: shop-23bf2549.example.test: woke in 21ms: checks 0s, lease 5ms, restore 0s, identity 0s, protect 0s, spawn 8ms, replicate 8ms
2026/11/22 13:07:27 lease: t8-23bf2549/plain-23bf2549.example.test: acquired in 1ms (client 0s, lock read and write 1ms)
2026/11/22 13:07:27 activator: no replica for plain-23bf2549.example.test in s3://contract-bucket/t8-23bf2549/plain-23bf2549.example.test — booting fresh
2026/11/22 13:07:27 activator: plain-23bf2549.example.test: started carlos-instance@plain\x2d23bf2549.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 1ms, instance key 0s, env 4ms, control socket 0s, key gate 0s, logs 0s) 5ms, launch file 0s, gate 0s, root start 1ms)
2026/11/22 13:07:27 activator: plain-23bf2549.example.test: carlos-instance@plain\x2d23bf2549.example.test.service launched in 6ms, healthy 0s later
2026/11/22 13:07:27 activator: plain-23bf2549.example.test: woke in 99ms: checks 0s, lease 1ms, restore 19ms, identity 0s, protect 0s, spawn 7ms, replicate 71ms
2026/11/22 13:07:27 lease: t8-23bf2549/bot0.shop.bac.sidecar.internal: HA lease acquired in 4ms (first wake)
2026/11/22 13:07:27 activator: bot0.shop.bac.sidecar.internal: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/11/22 13:07:27 activator: bot0.shop.bac.sidecar.internal: woke in 19ms: checks 0s, lease 5ms, restore 0s, identity 0s, protect 0s, spawn 7ms, settle 0s, replicate 7ms
2026/11/22 13:07:27 activator: next-due probe plain-23bf2549.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/22 13:07:27 activator: plain-23bf2549.example.test hibernated
2026/11/22 13:07:27 activator: bot0.shop.bac.sidecar.internal: released with a marker (clean true, txid 1, files 3:a929a6fec21dfdf1232a3e5e2ac5d1a2b5f82b53d7c3f80cc73f204974ed2f65) in 7ms: files 1ms, sync 4ms, record 1ms, marker 2ms
2026/11/22 13:07:27 activator: bot0.shop.bac.sidecar.internal hibernated
2026/11/22 13:07:27 activator: next-due probe shop-23bf2549.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/22 13:07:27 activator: shop-23bf2549.example.test: released with a marker (clean true, txid 1, files 3:5d0b771dcd31c3fba737fe7fc86155f38f0e7524cf714a20be9ba35aaccbd969) in 5ms: files 1ms, sync 2ms, record 1ms, marker 2ms
2026/11/22 13:07:27 activator: shop-23bf2549.example.test hibernated
2026/11/22 13:07:27 lease: t8-23bf2549/shop-23bf2549.example.test: HA lease acquired in 3ms (clean marker)
2026/11/22 13:07:27 activator: shop-23bf2549.example.test: restored (other-box)
2026/11/22 13:07:27 activator: shop-23bf2549.example.test: started carlos-instance@shop\x2d23bf2549.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 0s, control socket 0s, key gate 0s, logs 0s) 1ms, launch file 0s, gate 0s, root start 1ms)
2026/11/22 13:07:27 activator: shop-23bf2549.example.test: carlos-instance@shop\x2d23bf2549.example.test.service launched in 2ms, healthy 0s later
2026/11/22 13:07:27 activator: shop-23bf2549.example.test: woke in 90ms: checks 0s, lease 4ms, restore 28ms, identity 0s, protect 0s, spawn 2ms, replicate 56ms
2026/11/22 13:07:27 edge: ha-take shop-23bf2549.example.test from annie (txn t8-witness, marker generation 1): holder betty, generation 2
2026/11/22 13:07:27 edge: forward shop-23bf2549.example.test: annie handed the request over to betty; sending it there (occurrence #1)
    hadrain_twobox_minio_linux_test.go:1238: drain report: {V:1 Transaction:t8-witness Incarnation:c61fea9291441bb86a0ab6eff122fb65 Step:move Result:ok Reasons:[] Fence:t8-witness StartedAt:2026-11-22 13:07:27.358004304 +0000 UTC FinishedAt:2026-11-22 13:07:27.505575868 +0000 UTC Acked:[betty carol] Departed:[] Moved:[{Host:shop-23bf2549.example.test Holder:betty Gen:2 Confirmed:take}] Released:[{Host:plain-23bf2549.example.test Kind:other Marker:true Clean:true Reason:} {Host:bot0.shop.bac.sidecar.internal Kind:worker Marker:true Clean:true Reason:}] Unclean:[] Left:[] Holds:{LongestMS:120 Todays:0 RefusedAtOnce:1} Closed:0 Quiet:{DrainQuiet:{Waking:0 Stopping:0 Recovering:0 Owed:0} Held:[]}}
    hadrain_twobox_minio_linux_test.go:1239: driver calls: [begin shop-23bf2549.example.test <nil> stop plain-23bf2549.example.test marker=true clean=true <nil> stop bot0.shop.bac.sidecar.internal marker=true clean=true <nil> releasing shop-23bf2549.example.test <nil> stop shop-23bf2549.example.test marker=true clean=true <nil> taken shop-23bf2549.example.test betty <nil> end-moves]
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/bot0.shop.bac.sidecar.internal/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/bot0.shop.bac.sidecar.internal/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/bot0.shop.bac.sidecar.internal/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-23bf2549/shop-23bf2549.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: DELETE /contract-bucket/t8-23bf2549/plain-23bf2549.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-23bf2549/bot0.shop.bac.sidecar.internal/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-23bf2549/bot0.shop.bac.sidecar.internal/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-23bf2549/shop-23bf2549.example.test/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-23bf2549/shop-23bf2549.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-23bf2549/shop-23bf2549.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-23bf2549/shop-23bf2549.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-23bf2549/shop-23bf2549.example.test/head.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/generations/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0008/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0007/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0006/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0005/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0004/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0008/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0007/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0006/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0005/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0004/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-23bf2549/shop-23bf2549.example.test/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-23bf2549/shop-23bf2549.example.test/files/0/manifest.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-23bf2549/shop-23bf2549.example.test/files/0/objects/0000000000000001-76aa2aec2dd4e63cdcbf3327800e429d6b3888fdef6b3415192bc3e9754e9952
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-23bf2549/shop-23bf2549.example.test/files/0/objects/0000000000000003-391a18d7bee35f4800517379ab7c5ea5a1d49d472d8eff732ceaf3f1aaa63608
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-23bf2549/shop-23bf2549.example.test/0000/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-23bf2549/shop-23bf2549.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-23bf2549/shop-23bf2549.example.test/0000/0000000000000002-0000000000000002.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-23bf2549/shop-23bf2549.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1243: drain took 190ms; S3 calls 48 (DELETE lock=1 GET files=3 GET head=1 GET lock=3 GET replica=2 LIST replica=32 PUT lock=3 PUT replica=3); deployment store calls 20 (GET edges=14 LIST edges=4 PUT edges=2)
    hadrain_twobox_minio_linux_test.go:1367: the fenced A's start gate answers 503 "This service is unavailable. Try again later.\n" (Retry-After "10")
2026/11/22 13:07:27 lease: t8-23bf2549/plain-23bf2549.example.test: acquired in 1ms (client 0s, lock read and write 1ms)
2026/11/22 13:07:27 activator: plain-23bf2549.example.test: started carlos-instance@plain\x2d23bf2549.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 0s, control socket 0s, key gate 0s, logs 0s) 0s, launch file 0s, gate 0s, root start 1ms)
2026/11/22 13:07:27 activator: plain-23bf2549.example.test: carlos-instance@plain\x2d23bf2549.example.test.service launched in 1ms, healthy 0s later
2026/11/22 13:07:27 lease: /tmp/carlos-minio-contract-SHXDxV/g/dw3099334215/data/instances/plain-23bf2549.example.test/plain-23bf2549.example.test.db: continuity with the last clean close not proven; snapshot 1-0000000000000001 written before serving
2026/11/22 13:07:27 activator: plain-23bf2549.example.test: woke in 10ms: checks 0s, lease 2ms, restore 0s, identity 0s, protect 1ms, spawn 2ms, replicate 6ms
2026/11/22 13:07:27 activator: next-due probe shop-23bf2549.example.test: decode /api/next-due: invalid character 'b' looking for beginning of value — recording none (it sleeps until a request)
2026/11/22 13:07:27 activator: shop-23bf2549.example.test: released with a marker (clean true, txid 2, files 3:5d0b771dcd31c3fba737fe7fc86155f38f0e7524cf714a20be9ba35aaccbd969) in 4ms: files 1ms, sync 0s, record 1ms, marker 2ms
2026/11/22 13:07:27 activator: shop-23bf2549.example.test hibernated
2026/11/22 13:07:27 tenant admission is closed for shutdown
2026/11/22 13:07:27 activator: next-due probe plain-23bf2549.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/22 13:07:27 activator: plain-23bf2549.example.test hibernated
--- PASS: TestHeldHandoverTwoBoxMinio (0.57s)
=== RUN   TestHeldHandoverLostLeaseMinio
2026/11/22 13:07:27 edge: mesh key: minted
2026/11/22 13:07:27 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/22 13:07:27 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/22 13:07:27 tenant admission is open. accepting tenant work
2026/11/22 13:07:27 activator: HA placement host=shop-1a2286e3.example.test kind=Place ref=annie reason=roomiest generation=2026-11-22T13:07:27Z lock_generation=0
2026/11/22 13:07:27 lease: t8-1a2286e3/shop-1a2286e3.example.test: HA lease acquired in 3ms (first wake)
2026/11/22 13:07:27 activator: shop-1a2286e3.example.test: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/11/22 13:07:27 activator: shop-1a2286e3.example.test: started carlos-instance@shop\x2d1a2286e3.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 5ms, control socket 0s, key gate 0s, logs 0s) 6ms, launch file 0s, gate 0s, root start 1ms)
2026/11/22 13:07:27 activator: shop-1a2286e3.example.test: carlos-instance@shop\x2d1a2286e3.example.test.service launched in 7ms, healthy 0s later
2026/11/22 13:07:27 activator: shop-1a2286e3.example.test: woke in 66ms: checks 0s, lease 4ms, restore 0s, identity 0s, protect 0s, spawn 7ms, replicate 54ms
2026/11/22 13:07:27 activator: next-due probe shop-1a2286e3.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/22 13:07:27 activator: final checkpoint shop-1a2286e3.example.test: lease: release marker owed for s3://contract-bucket/t8-1a2286e3/shop-1a2286e3.example.test/lock.json (If-Match "274239867894fc2fac180d2f20e42767"): lease: write release marker: operation error S3: PutObject, https response error StatusCode: 503, RequestID: , HostID: , api error ServiceUnavailable: witness: refused
2026/11/22 13:07:27 activator: shop-1a2286e3.example.test hibernated
2026/11/22 13:07:27 activator: handover of shop-1a2286e3.example.test left: released without a marker; its held requests get today's answer
    hadrain_twobox_minio_linux_test.go:1469: the held request's hold ended "shop-1a2286e3.example.test client 4 "
    hadrain_twobox_minio_linux_test.go:1486: driver calls: [begin shop-1a2286e3.example.test <nil> releasing shop-1a2286e3.example.test <nil> stop shop-1a2286e3.example.test marker=false clean=false <nil> left shop-1a2286e3.example.test released without a marker]
    hadrain_twobox_minio_linux_test.go:1487: a request after the loss: 503 "This instance cannot wake right now. Please try again shortly.\n" (Retry-After "10", holder "none", 0s, err <nil>)
2026/11/22 13:07:27 tenant admission is closed for shutdown
2026/11/22 13:07:27 http: proxy error: context canceled
--- PASS: TestHeldHandoverLostLeaseMinio (0.32s)
PASS
ok  	github.com/carlosframework/platform/internal/host	0.935s
Bucket created successfully `local/gen-take`.
local/gen-take versioning is enabled
Created policy `gen-take` successfully.
Added user `gentake` successfully.
Attached Policies: [gen-take]
To User: gentake
=== RUN   TestGenerationTakeMinio
=== RUN   TestGenerationTakeMinio/take
2026/11/22 13:07:29 lease: instances/gen-1795352849094147390.shop.example.com: HA lease acquired in 5ms (first wake)
2026/11/22 13:07:29 lease: instances/gen-1795352849094147390.shop.example.com: HA lease acquired in 3ms (holder terminated)
    gentake_minio_test.go:308: a second create-only copy onto instances/gen-1795352849094147390.shop.example.com/g-00000000000000000002/0000/0000000000000001-0000000000000001.ltx: <nil> (destination condition honoured: false)
2026/11/22 13:07:29 ERROR retention enforcement failed system=store db=w.example.com.db error="enforce snapshot retention: remove ltx files: lease: invalid or changed generation binding"
2026/11/22 13:07:29 http: proxy error: context canceled
2026/11/22 13:07:29 ERROR retention enforcement failed system=store db=w.example.com.db error="enforce snapshot retention: remove ltx files: lease: a write has waited too long to reach storage (write fence)"
2026/11/22 13:07:29 http: proxy error: context canceled
=== RUN   TestGenerationTakeMinio/switch-412
2026/11/22 13:07:29 lease: instances/gen-1795352849221813942.shop.example.com: HA lease acquired in 3ms (first wake)
2026/11/22 13:07:29 ERROR retention enforcement failed system=store db=seed.db error="enforce snapshot retention: fetch ltx files: lease: a write has waited too long to reach storage (write fence)"
2026/11/22 13:07:29 http: proxy error: context canceled
2026/11/22 13:07:29 lease: instances/gen-1795352849221813942.shop.example.com: HA lease acquired in 3ms (clean marker)
=== RUN   TestGenerationTakeMinio/copy-version
=== RUN   TestGenerationTakeMinio/store-time
2026/11/22 13:07:29 lease: instances/gen-1795352849271344950.shop.example.com: HA lease acquired in 3ms (first wake)
2026/11/22 13:07:29 http: proxy error: context canceled
2026/11/22 13:07:29 ERROR retention enforcement failed system=store db=seed.db error="enforce snapshot retention: fetch ltx files: lease: a write has waited too long to reach storage (write fence)"
2026/11/22 13:07:29 lease: instances/gen-1795352849271344950.shop.example.com: HA lease acquired in 2ms (clean marker)
2026/11/22 13:07:29 lease: instances/gen-1795352849271344950.shop.example.com: HA lease acquired in 2ms (unclean marker)
2026/11/22 13:07:29 lease: instances/gen-1795352849271344950.shop.example.com: HA lease acquired in 2ms (unclean marker)
2026/11/22 13:07:29 lease: instances/gen-1795352849271344950.shop.example.com: HA lease acquired in 3ms (unclean marker)
2026/11/22 13:07:29 lease: instances/gen-1795352849271344950.shop.example.com: HA lease acquired in 2ms (unclean marker)
=== RUN   TestGenerationTakeMinio/skew
--- PASS: TestGenerationTakeMinio (0.29s)
    --- PASS: TestGenerationTakeMinio/take (0.13s)
    --- PASS: TestGenerationTakeMinio/switch-412 (0.04s)
    --- PASS: TestGenerationTakeMinio/copy-version (0.01s)
    --- PASS: TestGenerationTakeMinio/store-time (0.10s)
    --- PASS: TestGenerationTakeMinio/skew (0.01s)
PASS
ok  	github.com/carlosframework/platform/internal/lease	0.306s
minio contract: PASS
=== staticcheck ===
go version go1.26.10 linux/arm64
go: downloading honnef.co/go/tools v0.8.2
go: downloading github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c
go: downloading golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678
go: downloading golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa
go: downloading golang.org/x/sync v0.23.0
staticcheck: clean
=== govulncheck ===
go version go1.26.10 linux/arm64
go: downloading golang.org/x/vuln v1.8.0
go: downloading golang.org/x/telemetry v0.0.0-20260908163034-4bcc4b2ee518
go: downloading golang.org/x/tools v0.50.0
govulncheck: scanned github.com/carlosframework/platform, amadan.net/carlos/platform.git/launchctx
GO-2026-6859  called  stdlib@v1.26.10, fixed in v1.26.11
    HTTP/1 server crash due to MaxBytesReader header race in net/http
    excepted until 2027-01-31 (.amadan/govulncheck-exceptions.tsv:9): net/http MaxBytesReader header race, fixed in go1.26.11. CI and releases stay on go1.26.10 because 1.26.11 deadlocks the edge's Expect: 100-continue path (#897, .amadan/go-toolchain.sh); #904 checked every production MaxBytesReader site and found it unreachable.
GO-2026-5932  required  golang.org/x/crypto@v0.58.0, fixed in v0.58.1-0.20261009181718-2f1f834330b2
    The golang.org/x/crypto/openpgp package is unmaintained, unsafe by design, and has known security issues
    not fatal: no call path to the vulnerable code
govulncheck: clean (2 finding(s), none called outside .amadan/govulncheck-exceptions.tsv)
=== code-health ===
go version go1.26.10 linux/arm64
    codehealth_test.go:42: scanned in 1m46.955s
    codehealth_test.go:107: line metrics (code lines, then physical):
          file-lines  5471  7324  internal/activator activator_test.go
          file-lines  4219  7040  internal/console server.go
          file-lines  4184  6365  . apimode.go
          file-lines  3782  7198  internal/activator activator.go
          file-lines  3530  4459  . apimode_test.go
          file-lines  3261  3864  internal/registry registry_test.go
          file-lines  3211  6362  internal/host agent.go
          file-lines  3094  3992  internal/provision reconcile_test.go
          func-lines   870   891  internal/host plan14InstalledClaimLaunch
          func-lines   811  1275  internal/provision Reconcile
          func-lines   769  1242  internal/console (*Server).handleAPIInstanceCreate
          func-lines   688  1232  internal/host runAgent
          func-lines   570   903  internal/activator (*Service).doWakeOnce
          func-lines   538   546  internal/host runServingParkPeerNamespace
          func-lines   519   712  . runRoute
          func-lines   509   569  internal/host TestPagingIsRateLimited
          func-lines   494   809  internal/release adoptHost
          func-lines   441   500  internal/host TestRootInstanceStopExecStop
          func-lines   421   436  internal/host (*ClaimWakeAssembly).Build
          func-lines   421   437  internal/team TestFixture
          func-lines   412   414  internal/console TestDemoProtectionsSourceToLimitAndTakedown
          func-lines   408   485  . TestFleetAppServesThroughTheHub
          func-lines   400   868  internal/provision rootReadArchivedChain
          func-lines   399   732  internal/release PassFilter
          func-lines   390   398  internal/host runFilesSeedPreparationWithLive
          func-lines   384   905  internal/edge (*Edge).ServeHTTP
          func-lines   383   406  internal/console TestDemoSourceToLiveAndUpdate
          func-lines   378   600  internal/console (*Server).handleAPIShip
          func-lines   374   377  internal/host plan14RequiredArtifactsRootRunner
          func-lines   371   417  internal/host TestRootEgressKernelProof
          func-lines   367   635  cmd/console serve
          func-lines   364   371  internal/host testRootMigrationBootstrap
          func-lines   360   362  internal/edge TestDemoAPIAliasBoundary
          func-lines   358   362  internal/registry (*Registry).haJournal
          func-lines   357   358  internal/registry (*Registry).dispatchRemote
          func-lines   355   372  internal/host TestRootSandboxUpdateFromOldBox
          func-lines   343   354  internal/analytics Prune
          func-lines   340   353  internal/host newColdRootHarness
          func-lines   335   557  internal/console (*Store).migrate
          func-lines   334   334  internal/host TestPlan12RecoveryRestoreSourceDatabase
          func-lines   330   371  internal/edge TestRegionalNameNeverLeavesItsRegion
          func-lines   329   471  . runDeploy
          func-lines   329   329  internal/host TestPlan12RecoveryRestoreSourceDatabase.func1
          func-lines   327   369  internal/edge TestTunnelWebSocketEndToEnd
          func-lines   325   455  internal/objstore TestDeliveredContractMinio
          func-lines   320   654  internal/appconfig SyncExecWithCallbacks
          func-lines   315   318  internal/host plan14TimerIntention
          func-lines   311   314  internal/host plan14TimerIntention.func1
          func-lines   310   315  internal/hostbox ColdHandover.Run
          func-lines   308   309  internal/host rootFilesSeedIsolatedWitness
          func-lines   305   323  internal/host hairpinKernelWitness
          func-lines   304   308  internal/console TestHAP2ProductionDoors
          func-lines   302   329  internal/host TestRootG2PoolIngress
        release-importers: . cmd/console internal/activator internal/analytics internal/appconfig internal/apperr internal/applog internal/apppolicy internal/boxid internal/boxvolumes internal/console internal/dbreads internal/dbreads/dbreadstest internal/dbverify internal/demobuild internal/domains internal/doorkey internal/edge internal/edgeproof internal/edgesfile internal/fleetapi internal/grouproll internal/grouprollaws internal/historyreadback internal/host internal/hostactors internal/hostbox internal/hostclaim internal/hostevidence internal/hostexec internal/hostfence internal/hostfiles internal/hostfloor internal/hostguard internal/hostops internal/hostrelocate internal/hostresolve internal/instancectl internal/instanceupdates internal/interactive internal/layout internal/lease internal/ledger internal/mail internal/mailer internal/mailsubmit internal/metrics internal/moves internal/objstore internal/ops internal/park internal/plans internal/provision internal/relay internal/rollout internal/rootfsimage internal/runs internal/s3fake internal/schedule internal/seeds internal/status internal/telemetry internal/usage internal/vet scripts/pathmapcheck scripts/witness-pointer
        not scanned (203 files):
          cmd/carlos-media/drill_other.go: built only for other systems or tags
          cmd/carlos-media/harden_other.go: built only for other systems or tags
          cmd/console/servelock_windows.go: built only for other systems or tags
          cmd/moveprobe/detach_windows.go: built only for other systems or tags
          cmd/rootfswitness/mmap_other.go: built only for other systems or tags
          devbox_acl_other.go: built only for other systems or tags
          devbox_envfile_darwin_test.go: built only for other systems or tags
          devbox_envfile_other.go: built only for other systems or tags
          interactive_term_darwin.go: built only for other systems or tags
          interactive_term_other.go: built only for other systems or tags
          internal/activator/claimprocess_root_other.go: built only for other systems or tags
          internal/activator/escrow_stamp_other.go: built only for other systems or tags
          internal/activator/harecord_other.go: built only for other systems or tags
          internal/activator/ownenv_other.go: built only for other systems or tags
          internal/activator/pty_other.go: built only for other systems or tags
          internal/activator/race_on_test.go: built only for other systems or tags
          internal/activator/rolelaunch_other.go: built only for other systems or tags
          internal/assetcache/statfs_other.go: built only for other systems or tags
          internal/boxself/io_other.go: built only for other systems or tags
          internal/cgroup/cleanup_other.go: built only for other systems or tags
          internal/cgroup/cleanup_other_test.go: built only for other systems or tags
          internal/cgroup/hostprocs_other.go: built only for other systems or tags
          internal/cgroup/recreate_other.go: built only for other systems or tags
          internal/cgroup/role_other.go: built only for other systems or tags
          internal/cgroup/shim_other.go: built only for other systems or tags
          internal/cgroup/strict_other.go: built only for other systems or tags
          internal/cgroup/verify_other.go: built only for other systems or tags
          internal/console/claim_sql_identity_other.go: built only for other systems or tags
          internal/console/geoipverify_other.go: built only for other systems or tags
          internal/console/hostreports_process_other.go: built only for other systems or tags
          internal/console/replicaview_other.go: built only for other systems or tags
          internal/console/restore_sim_nice_other_test.go: built only for other systems or tags
          internal/console/scalecost_other_test.go: built only for other systems or tags
          internal/console/seedscratch_windows.go: built only for other systems or tags
          internal/dbreads/worker_other.go: built only for other systems or tags
          internal/demobuild/security_other.go: built only for other systems or tags
          internal/democlaim/source_other.go: built only for other systems or tags
          internal/devbox/peer_darwin.go: built only for other systems or tags
          internal/devbox/peer_darwin_test.go: built only for other systems or tags
          internal/devbox/peer_other.go: built only for other systems or tags
          internal/devbox/socketcheck_other.go: built only for other systems or tags
          internal/edge/devboxpeer_other.go: built only for other systems or tags
          internal/edge/hairpin_other.go: built only for other systems or tags
          internal/edge/heldbudget_other.go: built only for other systems or tags
          internal/edge/purge_listen_unix.go: built only for other systems or tags
          internal/edge/purge_listen_windows.go: built only for other systems or tags
          internal/edge/race_on_test.go: built only for other systems or tags
          internal/edge/static_artifact_other.go: built only for other systems or tags
          internal/edge/static_recordlock_other.go: built only for other systems or tags
          internal/edge/static_sweep_other.go: built only for other systems or tags
          internal/execsandbox/cleanup_other.go: built only for other systems or tags
          internal/execsandbox/file_other.go: built only for other systems or tags
          internal/execsandbox/oci_other.go: built only for other systems or tags
          internal/fileacl/fileacl_darwin.go: built only for other systems or tags
          internal/fileacl/fileacl_darwin_amd64.s: built only for other systems or tags
          internal/fileacl/fileacl_darwin_arm64.s: built only for other systems or tags
          internal/fileacl/fileacl_darwin_test.go: built only for other systems or tags
          internal/grouproll/state_other.go: built only for other systems or tags
          internal/grouprollaws/pty_darwin.go: built only for other systems or tags
          internal/grouprollaws/pty_other.go: built only for other systems or tags
          internal/hairpin/native_other.go: built only for other systems or tags
          internal/host/applylock_other_test.go: built only for other systems or tags
          internal/host/bootstrapfs_other.go: built only for other systems or tags
          internal/host/boxroles_config_other.go: built only for other systems or tags
          internal/host/claimfilesseed_delegation_other.go: built only for other systems or tags
          internal/host/claimfilesseed_transport_other.go: built only for other systems or tags
          internal/host/claimjournal_containment_other.go: built only for other systems or tags
          internal/host/claimjournal_migration_other.go: built only for other systems or tags
          internal/host/claimlaunch_kernel_other.go: built only for other systems or tags
          internal/host/claimlaunch_rev2_other_test.go: built only for other systems or tags
          internal/host/claimproduction_other.go: built only for other systems or tags
          internal/host/claimready_other.go: built only for other systems or tags
          internal/host/claimroleassembly_other.go: built only for other systems or tags
          internal/host/claimservingartifact_other.go: built only for other systems or tags
          internal/host/claimservinghandover_reboot_other.go: built only for other systems or tags
          internal/host/claimservinghandover_reboot_other_test.go: built only for other systems or tags
          internal/host/claimservingpark_other.go: built only for other systems or tags
          internal/host/claimstate_other.go: built only for other systems or tags
          internal/host/claimstop_kernel_other.go: built only for other systems or tags
          internal/host/claimtoken_inventory_other.go: built only for other systems or tags
          internal/host/claimunit_dropin_other.go: built only for other systems or tags
          internal/host/claimunit_files_other.go: built only for other systems or tags
          internal/host/claimunit_migrate_other.go: built only for other systems or tags
          internal/host/claimunit_ready_other.go: built only for other systems or tags
          internal/host/claimunit_socket_migration_other.go: built only for other systems or tags
          internal/host/dbreads_other.go: built only for other systems or tags
          internal/host/egress_rail_other.go: built only for other systems or tags
          internal/host/fileowner_other.go: built only for other systems or tags
          internal/host/flock_windows.go: built only for other systems or tags
          internal/host/group_config_other.go: built only for other systems or tags
          internal/host/group_maintenance_other.go: built only for other systems or tags
          internal/host/group_maintenance_verbs_other.go: built only for other systems or tags
          internal/host/group_receipt_other.go: built only for other systems or tags
          internal/host/hadrain_call_other.go: built only for other systems or tags
          internal/host/hadrain_socket_other.go: built only for other systems or tags
          internal/host/hadrainfence_other.go: built only for other systems or tags
          internal/host/headroom_other.go: built only for other systems or tags
          internal/host/installchannel_other.go: built only for other systems or tags
          internal/host/metrics_nested_other.go: built only for other systems or tags
          internal/host/movesfloor_other.go: built only for other systems or tags
          internal/host/movesfloorgate_other.go: built only for other systems or tags
          internal/host/movesheldrelease_other.go: built only for other systems or tags
          internal/host/movesmeasure_other.go: built only for other systems or tags
          internal/host/offcloudcredentials_other.go: built only for other systems or tags
          internal/host/registrychild_exec_other.go: built only for other systems or tags
          internal/host/registrychild_other.go: built only for other systems or tags
          internal/host/registryowner_chown_other.go: built only for other systems or tags
          internal/host/registryowner_descriptor_unix.go: built only for other systems or tags
          internal/host/replicahealth_other.go: built only for other systems or tags
          internal/host/rootgeneration_census_other.go: built only for other systems or tags
          internal/host/rootgeneration_kernel_other.go: built only for other systems or tags
          internal/host/rootgeneration_payload_other.go: built only for other systems or tags
          internal/host/rootgeneration_retired_other.go: built only for other systems or tags
          internal/host/rootmigration_production_other.go: built only for other systems or tags
          internal/host/runscset_other.go: built only for other systems or tags
          internal/host/sandboxenv_other.go: built only for other systems or tags
          internal/host/statfs_windows.go: built only for other systems or tags
          internal/host/systemapply_other.go: built only for other systems or tags
          internal/hostbox/census_vendor_other.go: built only for other systems or tags
          internal/hostbox/inventory_identity_other.go: built only for other systems or tags
          internal/hostbox/journalmigration_other.go: built only for other systems or tags
          internal/hostbox/journalnamespace_other.go: built only for other systems or tags
          internal/hostbox/journaltrust_other.go: built only for other systems or tags
          internal/hostbox/migration_census_other.go: built only for other systems or tags
          internal/hostbox/typedpark_other.go: built only for other systems or tags
          internal/hostenv/group_other.go: built only for other systems or tags
          internal/hostenv/write_other.go: built only for other systems or tags
          internal/hostenv/write_other_test.go: built only for other systems or tags
          internal/hostexec/clock_other.go: built only for other systems or tags
          internal/hostexec/clock_other_test.go: built only for other systems or tags
          internal/hostexec/local_other.go: built only for other systems or tags
          internal/hostexec/pending_other.go: built only for other systems or tags
          internal/hostexec/probe_other.go: built only for other systems or tags
          internal/hostexec/rootprocess_other.go: built only for other systems or tags
          internal/hostfiles/dir_other.go: built only for other systems or tags
          internal/hostfiles/refuse_other.go: built only for other systems or tags
          internal/hostfiles/watch_other.go: built only for other systems or tags
          internal/hostfloor/controllers_other.go: built only for other systems or tags
          internal/hostfloor/image_other.go: built only for other systems or tags
          internal/hostguard/flock_other.go: built only for other systems or tags
          internal/hostguard/flock_other_test.go: built only for other systems or tags
          internal/hostguard/record_other.go: built only for other systems or tags
          internal/instancectl/claimexec_other.go: built only for other systems or tags
          internal/instancectl/claimexec_socket_other.go: built only for other systems or tags
          internal/instancectl/claimlaunch_snapshot_other.go: built only for other systems or tags
          internal/instancectl/claimnetwork_other.go: built only for other systems or tags
          internal/instancectl/demo_snapshot_other.go: built only for other systems or tags
          internal/instancectl/egress_cgroup_other.go: built only for other systems or tags
          internal/instancectl/egress_dropin_other.go: built only for other systems or tags
          internal/instancectl/gvisorprobe_other.go: built only for other systems or tags
          internal/instancectl/peer_other.go: built only for other systems or tags
          internal/instancectl/peer_tuple_other.go: built only for other systems or tags
          internal/instancectl/rootfs_identity_other.go: built only for other systems or tags
          internal/instanceexec/claimexec_other.go: built only for other systems or tags
          internal/instanceexec/exec_rootfs_other.go: built only for other systems or tags
          internal/instanceexec/probe_gvisor_other.go: built only for other systems or tags
          internal/instanceexec/probe_hardening_other.go: built only for other systems or tags
          internal/instanceexec/probe_other.go: built only for other systems or tags
          internal/instanceexec/probe_rootfs_other.go: built only for other systems or tags
          internal/instanceexec/sandbox_other.go: built only for other systems or tags
          internal/instanceexec/scope_other.go: built only for other systems or tags
          internal/instanceexec/stop_other.go: built only for other systems or tags
          internal/instanceexec/tty_other.go: built only for other systems or tags
          internal/instancefs/instancefs_other.go: built only for other systems or tags
          internal/launchd/activate_darwin.go: built only for other systems or tags
          internal/launchd/activate_darwin_amd64.s: built only for other systems or tags
          internal/launchd/activate_darwin_arm64.s: built only for other systems or tags
          internal/launchd/activate_darwin_test.go: built only for other systems or tags
          internal/layout/journal_other.go: built only for other systems or tags
          internal/layout/links_other.go: built only for other systems or tags
          internal/mailer/keys_other.go: built only for other systems or tags
          internal/maintenanceexec/run_other.go: built only for other systems or tags
          internal/mediahandler/collect_other.go: built only for other systems or tags
          internal/mediahandler/procs_other.go: built only for other systems or tags
          internal/medialocal/runner_other.go: built only for other systems or tags
          internal/moves/archive/open_other.go: built only for other systems or tags
          internal/moves/archive/sync_other.go: built only for other systems or tags
          internal/ops/flock_windows.go: built only for other systems or tags
          internal/park/local_other.go: built only for other systems or tags
          internal/privatefile/io_other.go: built only for other systems or tags
          internal/proxyproto/peek_other.go: built only for other systems or tags
          internal/relay/race_on_test.go: built only for other systems or tags
          internal/release/consumedfence_other.go: built only for other systems or tags
          internal/release/digestcache_other.go: built only for other systems or tags
          internal/rootaws/credentials_other.go: built only for other systems or tags
          internal/rootaws/open_darwin.go: built only for other systems or tags
          internal/rootfsimage/dir_other.go: built only for other systems or tags
          internal/rootstate/authoritydir_other.go: built only for other systems or tags
          internal/rootstate/authorityfile_other.go: built only for other systems or tags
          internal/rootstate/file_other.go: built only for other systems or tags
          internal/rootstate/link_other.go: built only for other systems or tags
          internal/rootstate/persistent_other.go: built only for other systems or tags
          internal/rootstate/state_other.go: built only for other systems or tags
          internal/safefile/file_other.go: built only for other systems or tags
          internal/safefile/reap_other.go: built only for other systems or tags
          internal/stopevidence/fds_other.go: built only for other systems or tags
          internal/stopevidence/fds_other_test.go: built only for other systems or tags
          internal/stopevidence/holders_other.go: built only for other systems or tags
          internal/stopevidence/reconstruct_other.go: built only for other systems or tags
          internal/team/storelock_other.go: built only for other systems or tags
          internal/team/storelock_windows.go: built only for other systems or tags
          move_offline_run_other.go: built only for other systems or tags
          system_group_other.go: built only for other systems or tags
        
    codehealth_test.go:115: fatal               1094 at  474 sites  log.Fatal*, (*log.Logger).Fatal* and os.Exit in the root package's production files
    codehealth_test.go:115: sleep               1005 at  811 sites  time.Sleep in test files
    codehealth_test.go:115: db-no-context        885 at  703 sites  database calls with no context (dbOpWithoutContext) in production files
    codehealth_test.go:115: host-context         188 at  142 sites  context.Background and context.TODO in internal/host production files
    codehealth_test.go:115: func-lines         18578 at   45 sites  functions over 300 code lines (blank and comment-only lines not counted)
    codehealth_test.go:115: file-lines         30752 at    8 sites  files over 3,000 code lines, counted the same way
    codehealth_test.go:115: release-importers     66 at    1 sites  packages whose production files import internal/release
    codehealth_test.go:119: below the record: file-lines internal/activator activator.go -: 3782 in the code, the record allows 3783 (make code-health-record lowers it)
    codehealth_test.go:119: below the record: file-lines internal/host agent.go -: 3211 in the code, the record allows 3214 (make code-health-record lowers it)
--- PASS: TestCodeHealth (106.96s)
PASS
ok  	github.com/carlosframework/platform/internal/codehealth	108.006s
=== code-health-record ===
go version go1.26.10 linux/arm64
code-health record: comparing with the merge base 3d7f95385db1f2f5a085dc60fd799af93139163b (main is 3d7f95385db1f2f5a085dc60fd799af93139163b)
=== RUN   TestRecordAgainstBase
--- PASS: TestRecordAgainstBase (0.01s)
PASS
ok  	github.com/carlosframework/platform/internal/codehealth	0.008s
code-health record: no line went up without a reason
=== race ===
go version go1.26.10 linux/arm64
GATE_RACE=1 .amadan/test-gate.sh
=== internal_systemd@0 (14 s, from +13 s)
ok  	github.com/carlosframework/platform/internal/systemd	12.975s
=== internal_rootaws@0 (26 s, from +34 s)
ok  	github.com/carlosframework/platform/internal/rootaws	25.314s
=== internal_activator@0 (279 s, from +110 s)
ok  	github.com/carlosframework/platform/internal/activator	276.623s
=== internal_activator@1 (269 s, from +110 s)
ok  	github.com/carlosframework/platform/internal/activator	266.849s
=== internal_activator@2 (292 s, from +110 s)
ok  	github.com/carlosframework/platform/internal/activator	289.093s
=== internal_activator@3 (387 s, from +110 s)
ok  	github.com/carlosframework/platform/internal/activator	384.987s
=== internal_activator@4 (284 s, from +110 s)
ok  	github.com/carlosframework/platform/internal/activator	281.195s
=== internal_activator@5 (292 s, from +110 s)
ok  	github.com/carlosframework/platform/internal/activator	289.244s
=== internal_activator@6 (303 s, from +110 s)
ok  	github.com/carlosframework/platform/internal/activator	300.049s
=== internal_activator@7 (434 s, from +110 s)
ok  	github.com/carlosframework/platform/internal/activator	431.611s
=== internal_edge@0 (83 s, from +131 s)
ok  	github.com/carlosframework/platform/internal/edge	80.543s
=== internal_edge@1 (65 s, from +131 s)
ok  	github.com/carlosframework/platform/internal/edge	61.770s
=== internal_edge@2 (188 s, from +131 s)
ok  	github.com/carlosframework/platform/internal/edge	185.165s
=== internal_edge@3 (149 s, from +131 s)
ok  	github.com/carlosframework/platform/internal/edge	145.778s
=== internal_edge@4 (167 s, from +131 s)
ok  	github.com/carlosframework/platform/internal/edge	164.032s
=== internal_edge@5 (224 s, from +131 s)
ok  	github.com/carlosframework/platform/internal/edge	220.707s
=== internal_edge@6 (214 s, from +131 s)
ok  	github.com/carlosframework/platform/internal/edge	211.274s
=== internal_edge@7 (218 s, from +131 s)
ok  	github.com/carlosframework/platform/internal/edge	214.955s
=== internal_edge@8 (207 s, from +131 s)
ok  	github.com/carlosframework/platform/internal/edge	203.692s
=== internal_edge@9 (321 s, from +131 s)
ok  	github.com/carlosframework/platform/internal/edge	318.323s
=== internal_edge@10 (219 s, from +131 s)
ok  	github.com/carlosframework/platform/internal/edge	215.692s
=== internal_edge@11 (239 s, from +131 s)
ok  	github.com/carlosframework/platform/internal/edge	236.316s
=== internal_edge@12 (245 s, from +131 s)
ok  	github.com/carlosframework/platform/internal/edge	242.233s
=== internal_edge@13 (254 s, from +131 s)
ok  	github.com/carlosframework/platform/internal/edge	251.560s
=== internal_edge@14 (193 s, from +131 s)
ok  	github.com/carlosframework/platform/internal/edge	189.850s
=== internal_edge@15 (260 s, from +131 s)
ok  	github.com/carlosframework/platform/internal/edge	257.325s
=== internal_host@0 (15 s, from +189 s)
ok  	github.com/carlosframework/platform/internal/host	11.203s
=== internal_host@1 (9 s, from +189 s)
ok  	github.com/carlosframework/platform/internal/host	5.404s
=== lists: internal_edge 130 s, internal_activator 110 s, internal_host 188 s, internal_rootaws 34 s, internal_systemd 13 s
=== cpu: the gate used 7548 cpu-seconds in 544 s, about 13.9 of 32 cores; the machine as a whole was 43% busy
=== gitleaks ===
go version go1.26.10 linux/arm64
go: downloading github.com/zricethezav/gitleaks/v8 v8.30.1
go: downloading github.com/rs/zerolog v1.33.0
go: downloading github.com/spf13/cobra v1.9.1
go: downloading github.com/spf13/viper v1.19.0
go: downloading github.com/BobuSumisu/aho-corasick v1.0.3
go: downloading github.com/hashicorp/go-version v1.7.0
go: downloading github.com/fatih/semgroup v1.2.0
go: downloading github.com/charmbracelet/lipgloss v0.5.0
go: downloading github.com/gitleaks/go-gitdiff v0.9.1
go: downloading github.com/h2non/filetype v1.1.3
go: downloading github.com/mholt/archives v0.1.2
go: downloading golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa
go: downloading github.com/Masterminds/sprig/v3 v3.3.0
go: downloading golang.org/x/sync v0.11.0
go: downloading github.com/Masterminds/goutils v1.1.1
go: downloading github.com/mitchellh/copystructure v1.2.0
go: downloading dario.cat/mergo v1.0.1
go: downloading golang.org/x/crypto v0.35.0
go: downloading github.com/shopspring/decimal v1.4.0
go: downloading github.com/spf13/cast v1.7.1
go: downloading github.com/huandu/xstrings v1.5.0
go: downloading github.com/Masterminds/semver/v3 v3.3.0
go: downloading github.com/nwaples/rardecode/v2 v2.1.0
go: downloading github.com/klauspost/compress v1.17.11
go: downloading github.com/andybalholm/brotli v1.1.2-0.20250424173009-453214e765f3
go: downloading github.com/bodgit/sevenzip v1.6.0
go: downloading github.com/STARRY-S/zip v0.2.1
go: downloading github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707
go: downloading github.com/klauspost/pgzip v1.2.6
go: downloading github.com/pierrec/lz4/v4 v4.1.21
go: downloading github.com/minio/minlz v1.0.0
go: downloading github.com/sorairolake/lzip-go v0.3.5
go: downloading github.com/therootcompany/xz v1.0.1
go: downloading github.com/ulikunitz/xz v0.5.12
go: downloading golang.org/x/text v0.22.0
go: downloading github.com/fsnotify/fsnotify v1.8.0
go: downloading github.com/mitchellh/mapstructure v1.5.0
go: downloading github.com/sagikazarmark/slog-shim v0.1.0
go: downloading github.com/spf13/afero v1.12.0
go: downloading github.com/spf13/pflag v1.0.6
go: downloading github.com/lucasb-eyer/go-colorful v1.2.0
go: downloading github.com/mattn/go-runewidth v0.0.14
go: downloading github.com/muesli/reflow v0.2.1-0.20210115123740-9e1d0d53df68
go: downloading github.com/muesli/termenv v0.15.1
go: downloading github.com/mitchellh/reflectwalk v1.0.2
go: downloading github.com/subosito/gotenv v1.6.0
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading gopkg.in/ini.v1 v1.67.0
go: downloading github.com/magiconair/properties v1.8.9
go: downloading github.com/pelletier/go-toml/v2 v2.2.3
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading github.com/bodgit/plumbing v1.3.0
go: downloading github.com/bodgit/windows v1.0.1
go: downloading github.com/hashicorp/go-multierror v1.1.1
go: downloading go4.org v0.0.0-20230225012048-214862532bf5
go: downloading golang.org/x/sys v0.30.0
go: downloading github.com/rivo/uniseg v0.2.0
go: downloading github.com/hashicorp/golang-lru/v2 v2.0.7
go: downloading github.com/mattn/go-colorable v0.1.14
go: downloading github.com/aymanbagabas/go-osc52/v2 v2.0.1
go: downloading github.com/hashicorp/errwrap v1.1.0
self-test: reported source file: a key
self-test: reported source file: a 64-hex key
self-test: reported source file: a census-shaped entry
self-test: reported source file: a key marked gitleaks:allow
self-test: reported source file: a test's fake value outside tests
self-test: reported allowed file: another key beside its allowed value
self-test: reported a tracked file named gitleaks-gate-sentinel.env
self-test: reported 94 near misses of the names notscanned.go lists
self-test: skipped  the 31 files notscanned.go lists
self-test: refused  a notscanned.go entry git does not track
self-test: refused  a config that does not parse
self-test: refused  a config that does not exist
self-test: refused  a missing gitleaks binary
self-test: 6 planted keys reported, 126 tracked files judged, 3 broken setups refused
gitleaks: scanned 11249 tracked files; 31 not scanned, by exact path (scripts/gitleaks-gate/notscanned.go)
gitleaks: clean
diff --git a/approved_stateless_scale_copy_test.go b/approved_stateless_scale_copy_test.go
new file mode 100644
index 000000000..74cca3cfc
--- /dev/null
+++ b/approved_stateless_scale_copy_test.go
@@ -0,0 +1,62 @@
+package main
+
+import (
+ "os"
+ "regexp"
+ "strings"
+ "testing"
+)
+
+// The #892 copy deck (stateless replicas at production scale).
+const statelessScaleCopyDeck = "docs/superpowers/plans/2026-11-11-stateless-replicas-scale-copy.md"
+
+var statelessScaleBuiltCopy = []string{"PS-1-C01"}
+
+func statelessScaleCopyRows(t *testing.T) []copyRow {
+ t.Helper()
+ raw, err := os.ReadFile(statelessScaleCopyDeck)
+ if err != nil {
+ t.Fatal(err)
+ }
+ // Normalize only the status column. Approval notes are never applied text.
+ lines := strings.Split(string(raw), "\n")
+ for i, line := range lines {
+ cells := strings.Split(line, "|")
+ if len(cells) >= 6 {
+ status := strings.TrimSpace(cells[len(cells)-2])
+ if strings.HasPrefix(status, "approved") {
+ cells[len(cells)-2] = " approved "
+ } else if strings.HasPrefix(status, "pending (") {
+ cells[len(cells)-2] = " pending "
+ }
+ lines[i] = strings.Join(cells, "|")
+ }
+ }
+ rows, err := parseCopyTableStatuses(strings.Join(lines, "\n"), statelessScaleCopyDeck, regexp.MustCompile(`^PS-[1-4]-C[0-9]{2}$`), "a PS-<slice>-C<nn>", "pending", "approved")
+ if err != nil {
+ t.Fatal(err)
+ }
+ return rows
+}
+
+func TestStatelessScaleBuiltCopyIsApproved(t *testing.T) {
+ reportAll(t, checkRunBuilt(statelessScaleCopyRows(t), statelessScaleBuiltCopy))
+}
+
+func TestStatelessScaleCopyIsApplied(t *testing.T) {
+ rows := builtRows(statelessScaleCopyRows(t), statelessScaleBuiltCopy)
+ for i := range rows {
+ rows[i].Text = rootfsAppliedText(rows[i].Text)
+ }
+ reportAll(t, checkRunApplied(rows, "."))
+}
+
+func TestStatelessScaleCopyHasNoEmDash(t *testing.T) {
+ raw, err := os.ReadFile(statelessScaleCopyDeck)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if strings.Contains(string(raw), "—") {
+ t.Fatal("copy deck contains an em dash")
+ }
+}
diff --git a/docs/site/rootfs.md b/docs/site/rootfs.md
index b23704779..d1b4aa9a6 100644
--- a/docs/site/rootfs.md
+++ b/docs/site/rootfs.md
@@ -45,6 +45,8 @@ Every process of the instance gets the same environment: web, the workers and re
- CARLOS_HOST, CARLOS_REGION, CARLOS_CONTROL_SOCKET and CARLOS_PURGE mean what they mean for a binary instance, as [What an instance is started with](/docs/cli#what-an-instance-is-started-with) says.
+- CARLOS_MEMORY_MIB is the memory limit, in MiB, that web and each worker start with. For example, it is 2048 at the xlarge size. Use it to choose how many processes to start, such as Puma workers. Release, carlos run and consoles do not get this variable.
+
- HOME is /tmp unless the image or the app sets it.
## Health
diff --git a/docs/superpowers/notes/LUNA-COPY-BRIEF-STATELESS-SCALE-S1.md b/docs/superpowers/notes/LUNA-COPY-BRIEF-STATELESS-SCALE-S1.md
new file mode 100644
index 000000000..d2f522578
--- /dev/null
+++ b/docs/superpowers/notes/LUNA-COPY-BRIEF-STATELESS-SCALE-S1.md
@@ -0,0 +1,454 @@
+# Copy review brief: CARLOS_MEMORY_MIB in the rootfs docs (#892 S1)
+
+Paul delegates copy review for platform CLI, console and docs copy to you. You
+are the copy editor; your edits will be applied as approved copy.
+
+## The facts
+
+A rootfs app's processes are declared in processes.json: web (serves HTTP),
+workers (background jobs such as Sidekiq), release (runs once per deploy, for
+migrations) and console (an interactive session). The platform now gives web
+and every worker a new environment variable, CARLOS_MEMORY_MIB: the memory
+limit that process was started with, in MiB (for example 1024, or 2048 at the
+xlarge size). The app's files cannot set it. Release, `carlos run` commands
+and consoles do not get it. Its purpose: one image and one config can pick
+how many processes to start (Puma's workers, the number of Sidekiq processes)
+from the instance's size. The size changes at the next start, and the
+variable with it.
+
+Readers: developers deploying a Rails or similar app on the platform.
+
+## The string (draft; the id is fixed)
+
+- PS-1-C01, a new bullet in docs/site/rootfs.md under "What every process
+ gets", after the CARLOS_HOST bullet. The section starts "Every process of
+ the instance gets the same environment: web, the workers and release
+ alike." Draft:
+
+ > CARLOS_MEMORY_MIB is the memory limit web and each worker were started with, in MiB, such as 2048 at the xlarge size. Use it to choose how many processes to start, such as Puma's workers. Release, carlos run and consoles do not get it.
+
+## House rules (Paul's, all binding)
+
+- No em dashes, ever. Use a full stop and a new sentence.
+- Plain words. No jargon a reader would not know. Short.
+- Neutral names only (shop, example.com). Never a tenant's name.
+- Keep the literal names CARLOS_MEMORY_MIB, carlos run and xlarge.
+- One paragraph, no line breaks inside it.
+- Do not change the facts. If a fact looks wrong, flag it.
+
+## Output
+
+1. A table of changes only: `id | current | new | why`.
+2. A list of flagged rows: `id | problem`.
+3. One line of counts: changed, flagged, left alone.
+
+## Result (gpt-5.6-luna, 2026-11-11), applied verbatim
+
+I’m using the copy-review skill because this task is specifically a review gate for user-facing copy. I’ll read its instructions and the requested brief, then return only the brief’s required output.
+exec
+/bin/bash -lc "sed -n '1,240p' /home/paulca/.agents/skills/copy-review/SKILL.md && sed -n '1,260p' docs/superpowers/notes/LUNA-COPY-BRIEF-STATELESS-SCALE-S1.md && sed -n '1,220p' docs/site/rootfs.md" in /home/paulca/amadan.net/carlos/platform/.claude/worktrees/stateless-scale-1
+ succeeded in 0ms:
+---
+name: copy-review
+description: Mandatory review gate for all user-facing language. Use whenever writing or changing user-facing copy — marketing pages, landing pages, headlines, taglines, UI strings, emails, error messages, docs prose, READMEs — BEFORE that copy is written into any file or artifact. Extract every string, launch the review server, wait for the user's edits, and apply them verbatim. Never ship copy the user has not reviewed. Translations are not reviewed — translate approved source copy yourself. Not for Amadan issues, comments or channel posts — that is agents talking to agents.
+---
+
+# Copy Review
+
+The user reviews and rewrites every user-facing string before it ships.
+Claude drafts; the user has final say over every word.
+
+## Workflow
+
+### 1. Draft into a string index, not into files
+
+Do not write copy directly into templates/components. First produce
+`copy-review/strings.json` in the project root:
+
+```json
+[
+ {
+ "id": "hero.headline",
+ "section": "Hero",
+ "label": "Headline",
+ "text": "Draft copy here",
+ "context": "The first thing you see on the page, above the signup form. It has to say what the product is for someone who arrived from a search result.",
+ "notes": "H1, keep under ~8 words"
+ }
+]
+```
+
+- `id`: stable dot-path key. This is the contract — it must map 1:1 to
+ where the string ends up in the codebase.
+- `section`: groups strings in the UI (Hero, Pricing, Footer, Email: welcome…).
+- `label`: human name for the string.
+- `context`: two or three sentences of plain English, shown under the copy
+ in the review UI. Where the string appears, and what it is trying to do.
+ Write it for someone who cannot see the page — no component names, no CSS,
+ no `<h1>`. "Sits under the plan cards on the pricing page. It is there to
+ stop people worrying about being locked in," not "hero H1, marketing site."
+ If the string only makes sense next to another one (a heading and its
+ button, an error and the field it belongs to), say so here.
+- `notes`: optional constraints — length limits, a word that must appear,
+ markup that must survive. Shown in italics under the context.
+- Order the array top-to-bottom as the copy appears on the page.
+
+The strings file must be `<project>/copy-review/strings.json`, under `~/amadan.net` or `~/src` (or a folder listed in `~/.config/copy-review/roots`), outside hidden folders (a `.claude/worktrees/` checkout is fine), with no symlinked `preview/`. `copy-review` refuses anything else (exit 2) and says why. `serve.sh` still takes a strings file anywhere.
+
+Reviewing existing copy rather than drafting new copy is the same flow: put
+the current, live wording into each string's `text` as the draft, and carry
+on from step 1b.
+
+Include EVERY user-facing string: headlines, body, button labels, alt text,
+meta descriptions, form placeholders, error/empty states. If a human will
+read it, it goes in the index.
+
+**Source language only.** Translations never go in the index. The user
+reviews the words in the language they wrote them in; asking them to check
+French or Japanese is a wasted round trip. Once the source strings are
+approved, translate them yourself as a best guess and write them straight
+into the locale files, keeping the same keys, placeholders and markup. They
+get corrected as they are used. Say in your hand-back which locales you
+filled in, so nobody mistakes them for reviewed copy.
+
+Every string gets a `context`. The user is reviewing words stripped out of
+the page they live on; without it they are guessing at what a button label
+is for. Writing it is also a check on you — if you cannot say in plain
+English what a string is doing there, it probably should not be there.
+
+### 1b. Build the preview
+
+When the copy lives on a screen (a web page, app UI, an HTML email), build
+`copy-review/preview/` as well. The user then reviews the copy where it
+lives: they see the page, click the text they want to change, edit it
+beside the page and watch it update as they type. Docs and READMEs get
+their Markdown rendered. Plain-text copy (SMS, push notifications,
+plain-text email) has no page; skip this step and the review is the list,
+as before.
+
+Where the page comes from:
+
+- **An existing page you can render.** Start the project's dev server if
+ it isn't running, then snapshot the page:
+
+ ```bash
+ <path-to-this-skill>/snapshot.sh http://localhost:3000/pricing copy-review/preview
+ ```
+
+ It loads the page in headless Chrome, saves the rendered HTML as
+ `<out-dir>/index.html` (the second argument; it defaults to
+ `copy-review/preview` if you leave it off, shown above for clarity) with
+ local copies of its stylesheets, fonts, images and SVG sprite references,
+ and strips scripts, event handlers, frames and embeds. It prints `FAILED`
+ for every asset it couldn't fetch and `LEFTOVER` for every absolute or
+ root-relative reference that would still load from elsewhere, and exits 2
+ when there are any. Deal with each one; don't ignore them. For a page
+ behind a login, pass the session cookie as
+ `SNAPSHOT_COOKIE='_app_session=…'`; it is sent to that page's origin only.
+ Then replace the page's text with your draft strings and add the bindings
+ below.
+
+ The review server looks for `preview/` next to `strings.json`, wherever
+ that is — not always `copy-review/`. If yours lives somewhere else, point
+ the snapshot at `<dir-of-strings.json>/preview` instead of the default.
+
+ Re-running `snapshot.sh` into the same out-dir replaces `index.html`
+ outright, so any bindings you hand-added are lost with it — only
+ re-snapshot when the page structure changed (see rerolls, below), and
+ redo the bindings after. Exit 1 means the run failed. Some causes are
+ refused up front, before anything is touched: no URL given, no headless
+ Chrome found, a URL that isn't a valid `http://` or `https://` address, a
+ bad timeout value, or an out-dir that already held files `snapshot.sh`
+ didn't create itself (it only touches a directory that's empty, new, or
+ still carries the `.copy-review-snapshot` marker an earlier successful run
+ of its own left behind) — none of these remove an existing `index.html`.
+ Only a failure once capture is under way — the page didn't load (a
+ non-2xx response: an expired `SNAPSHOT_COOKIE`, a wrong URL) or the page's
+ own script errored while it settled — also removes any `index.html` a
+ previous successful run left, so a stale page is never mistaken for this
+ one. Fix what it printed and re-run, or hand-build the page instead.
+- **A new page.** Hand-build `index.html` in the project's markup style and
+ copy the project's compiled stylesheet into `preview/` beside it.
+- **An HTML email.** Use the rendered email HTML (the framework's mailer
+ preview, where there is one).
+- **A README or docs page.** Render the Markdown to HTML, copy
+ `<path-to-this-skill>/ui/doc.css` into `preview/` and link it.
+- **A page you can't reach** (a login you can't satisfy, no runnable app).
+ Hand-build it.
+
+Tie each element to its string with an attribute. The element's text, or
+the attribute's value, must be exactly the string's `text` in
+`strings.json`:
+
+| Attribute | Use it when |
+|---|---|
+| `data-copy="id"` | The element's text is the string. The element holds only that text: when an icon or other text shares it, wrap the string in a `<span>` and bind the span. |
+| `data-copy-html` (with `data-copy`) | The string carries markup that must survive (say so in its `notes`). |
+| `data-copy-placeholder="id"`, `data-copy-alt="id"`, `data-copy-title="id"`, `data-copy-aria-label="id"` | The string is that attribute's value. One element can carry several. |
+
+The same id can sit on several elements (a button in both the header and
+the footer); all of them update. Bindings may not nest. A string with no
+element on the page (a meta description, an error message, another email)
+is list-only. That's fine: the user finds it in the List view.
+
+Check before you hand over:
+
+```bash
+node <path-to-this-skill>/preview-check.mjs copy-review/strings.json
+```
+
+Fix every `Preview error` line: an id that isn't in `strings.json`, a
+nested binding, or an element whose text doesn't match its string (usually
+a string bound to the wrong element). The list-only line is information,
+not an error. The server runs the same check when it starts and shows any
+errors to the user in a warning banner, so an unfixed one gets seen.
+
+Then look at it, with `screenshot.sh <url-or-file> <width> <out.png>`:
+
+```bash
+<path-to-this-skill>/screenshot.sh http://localhost:3000/pricing 390 /tmp/source-390.png
+<path-to-this-skill>/screenshot.sh http://localhost:3000/pricing 1280 /tmp/source-1280.png
+<path-to-this-skill>/screenshot.sh copy-review/preview/index.html 390 /tmp/preview-390.png
+<path-to-this-skill>/screenshot.sh copy-review/preview/index.html 1280 /tmp/preview-1280.png
+```
+
+For a snapshot, screenshot the source page and the preview at 390px and
+1280px wide and compare them. A page that builds itself with JavaScript
+after it loads may not survive the snapshot; hand-build it instead. For a
+hand-built preview, screenshot it at both widths and check it reads as the
+page it stands for. A page taller than 1600px needs `--full` (a fourth
+argument) on each call above — the default window crops everything below
+that, which misses most of a long page.
+
+The preview is a copy under `copy-review/`. Building it never touches the
+project's code, so step 4 still holds.
+
+### 2. Start the review
+
+```bash
+copy-review submit copy-review/strings.json --watch-pid $PPID
+```
+
+It hands the review to the copy review app, which is always running on this machine, and prints one line: the review's URL. Give the user that URL as a Markdown link, with the URL as both text and target, and nothing else: never `localhost`, never `127.0.0.1`, never a URL you assembled yourself. `--watch-pid $PPID` names the session that is waiting, so the index can mark the review "agent gone" if this session ends; the review stays open either way.
+
+Running `submit` again for the same file while its review is open sends your new draft under the same link, and the user's page asks them to reload. If another session is still waiting on that review, `submit` refuses (exit 4); pass `--replace` only when you are taking that review over.
+
+**If `copy-review` exits 3**, the app isn't running here. Say so, and use `serve.sh` instead (below).
+
+**Sandbox.** `copy-review` talks to the app over a socket a sandboxed shell can't reach, so it always runs outside the sandbox. Claude Code is set up for that in `~/.claude/settings.json` (`"sandbox": { "excludedCommands": ["copy-review:*"] }` and `"permissions": { "allow": ["Bash(copy-review:*)"] }`), so it runs without a prompt: don't turn the sandbox off for it. Codex is set up the same way by a rule file, `~/.codex/rules/copy-review.rules`, containing `prefix_rule(pattern = ["copy-review"], decision = "allow")`, so it runs outside Codex's sandbox without asking. If it says it can't reach the app from inside a sandbox, that setup is missing: tell the user rather than retrying with the sandbox off. Waiting for the result needs nothing outside the sandbox.
+
+Nothing runs per review: one app serves them all. A review stays open until the user approves it, rerolls it, or dismisses it from the index (a dismissed review has no result: if none comes, ask the user), and it survives the app restarting. Leave `draft.json` alone while a review is open; the app deletes it when the review is done.
+
+**Inline reroll.** Under every string the page has a small instructions box and
+a Reroll button. The user types what they want instead ("shorter", "don't
+mention pricing", or nothing at all) and the app rewrites that one string on
+the spot through `reroll.sh`. GPT-5.6 Luna drafts it, through Codex running in
+a sealed-off sandbox that holds none of the user's files; if that fails, Claude
+Sonnet drafts it with every tool switched off. Either way the drafter sees only
+the copy and the instructions, and the page shows which one answered
+(`WRITING_DRAFT_MODEL` picks another Codex model, `WRITING_FALLBACK_MODEL`
+another Claude model). The edit box updates in place, the draft on the left
+stays for comparison, and the page never closes. If the user typed while the
+reroll was out, the new text is offered beside theirs rather than replacing it.
+You do nothing; the round trip is between the browser and the app. It needs
+`codex` (signed in to ChatGPT) and `bwrap`, or `claude`, on the app's PATH, so
+if the user reports "Reroll failed" the fix is on this box, not in the strings.
+
+**With a preview**, the page opens on the preview with an editor beside it
+(a bottom sheet on a phone), and a List view holds the cards. When you give
+the user the URL, say whether the preview is a snapshot or hand-built, and
+name the list-only strings (the server prints them on start as `Preview: n
+strings are list-only: …`), so they know what they won't find on the page.
+
+**Edits autosave** to `copy-review/draft.json`, about a second after the
+user stops typing, so a reload, a closed tab or a move from phone to
+desktop loses nothing. A `draft.stale.json` is a draft left from an
+earlier `strings.json`, set aside when the strings changed.
+
+The app writes the outcome to `copy-review/result.json`, as before, with two more fields: `review`, the id at the end of the URL, and `generation`. Poll for it, and check it is this review's:
+
+```bash
+until grep -qs '"review": "<id>"' copy-review/result.json; do sleep 5; done; cat copy-review/result.json
+```
+
+A `result.json` from an earlier review is renamed to `result.<n>.json` when you submit a new one, so it never answers for this one.
+
+(Poll in chunks if needed; the result file survives any timeout.)
+
+### 3. Handle the result
+
+`result.json` is one of:
+
+```json
+{ "action": "approve",
+ "strings": [ { "id": "...", "text": "...", "original": "...", "edited": true,
+ "rerolled": false, "rerolls": [], "done": true } ] }
+```
+
+```json
+{ "action": "reroll", "guidance": "less breathless, shorter, no em dashes",
+ "strings": [ { "id": "...", "text": "...", "original": "...", "edited": false } ] }
+# Copy review brief: CARLOS_MEMORY_MIB in the rootfs docs (#892 S1)
+
+Paul delegates copy review for platform CLI, console and docs copy to you. You
+are the copy editor; your edits will be applied as approved copy.
+
+## The facts
+
+A rootfs app's processes are declared in processes.json: web (serves HTTP),
+workers (background jobs such as Sidekiq), release (runs once per deploy, for
+migrations) and console (an interactive session). The platform now gives web
+and every worker a new environment variable, CARLOS_MEMORY_MIB: the memory
+limit that process was started with, in MiB (for example 1024, or 2048 at the
+xlarge size). The app's files cannot set it. Release, `carlos run` commands
+and consoles do not get it. Its purpose: one image and one config can pick
+how many processes to start (Puma's workers, the number of Sidekiq processes)
+from the instance's size. The size changes at the next start, and the
+variable with it.
+
+Readers: developers deploying a Rails or similar app on the platform.
+
+## The string (draft; the id is fixed)
+
+- PS-1-C01, a new bullet in docs/site/rootfs.md under "What every process
+ gets", after the CARLOS_HOST bullet. The section starts "Every process of
+ the instance gets the same environment: web, the workers and release
+ alike." Draft:
+
+ > CARLOS_MEMORY_MIB is the memory limit web and each worker were started with, in MiB, such as 2048 at the xlarge size. Use it to choose how many processes to start, such as Puma's workers. Release, carlos run and consoles do not get it.
+
+## House rules (Paul's, all binding)
+
+- No em dashes, ever. Use a full stop and a new sentence.
+- Plain words. No jargon a reader would not know. Short.
+- Neutral names only (shop, example.com). Never a tenant's name.
+- Keep the literal names CARLOS_MEMORY_MIB, carlos run and xlarge.
+- One paragraph, no line breaks inside it.
+- Do not change the facts. If a fact looks wrong, flag it.
+
+## Output
+
+1. A table of changes only: `id | current | new | why`.
+2. A list of flagged rows: `id | problem`.
+3. One line of counts: changed, flagged, left alone.
+# Rootfs apps
+
+A rootfs app is an app shipped as a read-only Linux image instead of a single binary. You build the image on your own machine, from a Dockerfile or anything else that makes an OCI image or a directory, and carlos ship --rootfs uploads it. The platform never builds anything and never pulls from a registry.
+
+A rootfs app runs only on boxes your account owns: a fleet of yours on a deployment that runs apps for other people, or any box of a deployment run for one customer. The box must be on the nested layout, must run overlap deploys and must have passed its rootfs check. The console refuses anywhere else, and so does the box.
+
+A fleet app's secrets and its store credential are sealed to the fleet's own secrets key, so register one before the app needs a secret. [carlos fleets](/docs/cli#carlos-fleets) explains how.
+
+## What fixes an app's kind
+
+An app's first release makes it a binary app or a rootfs app, and it stays that kind. A release of the other kind is refused when you ship it. To change kinds, create a new app.
+
+Each instance takes its hibernation setting from the release it is created with, and keeps it. A rootfs app is always on unless that release was shipped with carlos ship --hibernate. A later release that asks for the other setting is refused when you ship it.
+
+## Processes
+
+The JSON file you pass to carlos ship --processes names the commands the image runs. Each is an argv array, either an absolute path or a name found on the image's PATH, with an optional env of plain values (never secrets) and an optional working_dir.
+
+```json
+{
+ "web": {"command": ["bundle", "exec", "puma", "-C", "config/puma.rb"]},
+ "worker": {"command": ["/rails/bin/jobs"]},
+ "release": {"command": ["/rails/bin/rails", "db:migrate"]},
+ "console": {"command": ["/rails/bin/rails", "console"]}
+}
+```
+
+- web is required, exactly one. It serves HTTP on CARLOS_SOCKET.
+
+- release is optional, at most one. It runs on every deploy, the first included, before the new web starts. It may run for ten minutes unless it sets timeout_sec.
+
+- console is optional, at most one. It is the command an interactive session starts. The platform never starts it on its own.
+
+- Any other name is a worker, up to four of them. A name is lowercase letters, digits and hyphens, starts with a letter, and is at most 16 characters long.
+
+Commands are not run through a shell, so a $CARLOS_SOCKET written in a command is passed as it is. Read the variable in your server's config file instead, or run the command with sh -c if your image has a shell.
+
+## What every process gets
+
+Every process of the instance gets the same environment: web, the workers and release alike. That is the app's config bundle, the instance's own variables and secrets, its store's coordinates, and these:
+
+- CARLOS_SOCKET is the unix socket web serves HTTP on.
+
+- CARLOS_DB is the instance's SQLite database, the one file the platform replicates. An app that keeps its data somewhere else can ignore it.
+
+- CARLOS_HOST, CARLOS_REGION, CARLOS_CONTROL_SOCKET and CARLOS_PURGE mean what they mean for a binary instance, as [What an instance is started with](/docs/cli#what-an-instance-is-started-with) says.
+
+- HOME is /tmp unless the image or the app sets it.
+
+## Health
+
+web must answer GET / on CARLOS_SOCKET with a status below 500 within 120 seconds of starting. Until it does, the instance does not serve and its workers do not start.
+
+## What it can write
+
+The image is the instance's root filesystem, and it is read-only. An instance writes in two places: the directory CARLOS_DB is in, which is kept across restarts and deploys, and /tmp, which is empty at every start. /tmp is held in memory, so what is in it counts against the instance's memory.
+
+## Memory and CPU
+
+All of an instance's processes share one memory and CPU limit, the same tiers a binary instance gets, 1 GB by default. A process that goes over it is stopped and started again.
+
+## JIT compilers
+
+Memory is never writable and executable at once, unless the release is shipped with carlos ship --jit. A JIT compiler needs that: Node, Bun and Deno, the JVM, Ruby's YJIT and PHP's opcache JIT. Ruby, PHP and Python run well without one.
+
+A release shipped with --jit has jit set in its manifest, and every process of its instances runs with that protection off: web, the workers and release. Nothing else about the instance changes. The setting belongs to the release, so a later release can turn it on or off.
+
+Node stops at start without --jit. node --jitless does run, but only as an interpreter and without WebAssembly, which makes most apps much slower. Ship a Node app with --jit instead.
+
+carlos ship --check warns when a process runs Node, Bun or Deno and the release is not shipped with --jit, because the check passes on your machine and the box then stops the process at start.
+
+## Network
+
+An instance can reach public addresses, such as an object store or a managed database's public endpoint. It cannot reach a private address unless a system operator allows it for the app with carlos apps set --egress-allow, and it never reaches the box it runs on or the cloud's metadata service.
+
+## Commands and consoles
+
+carlos run runs a one-off command on an instance: a data fix, a rake task, an artisan or manage.py command. It runs inside the instance's image, in web's working_dir, with web's environment and the same database. Its output comes back to your terminal, and carlos exits with the command's own status.
+
+```sh
+carlos run --app shop --instance shop.example.com -- bin/rails db:seed
+carlos run --app shop --instance shop.example.com -- php artisan cache:clear
+carlos run --app shop --instance shop.example.com -- python manage.py clearsessions
+```
+
+A command with a slash in it, like bin/rails, is found from web's working_dir. A bare name, like php, is found along the image's PATH. Commands are not run through a shell, so for a pipe or a variable, run sh -c with the line in quotes.
+
+A console runs the same way, in a terminal session. Sessions are off until an owner turns them on for the app. Then carlos console starts the app's console process, and carlos run -it starts any other command, such as a shell.
+
+```sh
+carlos apps set shop --interactive on
+carlos console --app shop --instance shop.example.com
+carlos run -it --app shop --instance shop.example.com -- sh
+```
+
+carlos ship fills in console when a release declares none: bin/rails console for Rails, php artisan tinker for Laravel and python manage.py shell for Django. Any other app declares its own in processes.json.
+
+A session can read and change everything the instance can. It ends after 30 minutes without a keystroke, and a deploy or a restart ends it too. [carlos run](/docs/cli#carlos-run) has the limits, the exit statuses and how to run commands from CI.
+
+## Deployments run for one customer
+
+A deployment whose boxes all belong to one customer says so with CARLOS_DEPLOYMENT_SINGLE_TENANT=1, in the console's environment and in every box's host.env. A rootfs app can then run on any of its boxes, not only on a fleet. Leave it unset on a deployment that runs apps for other people. The console does not start if the value is anything but 0 or 1.
+
+```ini
+CARLOS_DEPLOYMENT_SINGLE_TENANT=1
+```
+
+Dedicated pools do not count as a customer's own boxes yet, because nothing ties a pool to one account. On a deployment that runs apps for other people, a rootfs app cannot run in one.
+
+## Not in this version
+
+More than one copy of an app across boxes, more than one SQLite database per instance, moving a rootfs instance to another fleet or region, and starting a new rootfs instance from a copy of another database.
+
+codex
+| id | current | new | why |
+|---|---|---|---|
+| PS-1-C01 | CARLOS_MEMORY_MIB is the memory limit web and each worker were started with, in MiB, such as 2048 at the xlarge size. Use it to choose how many processes to start, such as Puma's workers. Release, carlos run and consoles do not get it. | CARLOS_MEMORY_MIB is the memory limit, in MiB, that web and each worker start with. For example, it is 2048 at the xlarge size. Use it to choose how many processes to start, such as Puma workers. Release, carlos run and consoles do not get this variable. | Fixes the grammar, uses shorter plain sentences, and makes “it” explicit. |
+
+No flagged rows.
+
+changed: 1, flagged: 0, left alone: 0
diff --git a/docs/superpowers/notes/census-proposal-precert-dns01-1293.md b/docs/superpowers/notes/census-proposal-precert-dns01-1293.md
index f384a6c1e..5f74fa03f 100644
--- a/docs/superpowers/notes/census-proposal-precert-dns01-1293.md
+++ b/docs/superpowers/notes/census-proposal-precert-dns01-1293.md
@@ -14,6 +14,6 @@ Recorded dispositions, which each change must still satisfy:
- `internal/edge/edge.go` `RunWithActivatorReady`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-certwarm-wake;basis=registers the cert warm's nudge on OnReload and on the home map's new served-hosts wake (#386); nudge only sends on a buffered channel; no read added, same 5 sites;rev3=census-ruling-edge-roll-blip;basis=the :80/:443 (and dev) listeners are bound on the calling goroutine with net.Listen via listen()/listenAddr (same empty-address defaults as ListenAndServe) before the serve goroutines, which now call Serve/ServeTLS on them, and one log line names the bound addresses; no read added, same 5 sites;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): the inline home-map arming (newHomeMap, one boot Refresh, Store, run) moves unchanged into the new Edge.ArmHomeMap and is called here as e.ArmHomeMap(); same refresh, same timeout, same order. The reads are moved, none added.;rev3=census-ruling-agent-start-demo-1;basis=Logs the combined explicit wildcard parents through demoWildcardDomains; no new watcher or read loop.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: invoke the local admission Close before HTTP/HTTPS draining and door shutdown in both dev and normal listeners. Preserve merged main's startup behavior and its census basis; the same five read sites, no new reads.;rev3=census-ruling-stateless-replicas-3;basis=Task 1b: defer stopping and joining the edge's replica jobs at shutdown. Existing five direct read sites unchanged; no new reader or authority.;rev3=census-ruling-region-ha-p3b;basis=Wrap dev, HTTP and HTTPS listeners through ConfigureGroupHairpin before serving. Indirectly read protected root boot identity and group-ingress.json; kernel local/peer addresses mark local ingress, never HTTP headers. Agent edge uses verified public source for accounting; direct read sites unchanged and absent marker keeps original listeners. CI fix removes interface enumeration: local peer must match snapshot primary IPv4, an ingress IPv4 installed locally by root, or loopback; kernel destination must still be an ingress EIP on port 80/443. Merge 45cebde4 retains deferred stopReplicaProbes alongside group listener wrapping and shutdown admission closure.;rev3=census-ruling-demo-api-site-route;basis=Change the startup failure context from load routes to initialize because origin validation now runs during construction. Existing five read sites unchanged; no new read or runtime authority.;rev3=census-ruling-region-ha-graceful-terminate-t2;basis=Invoke the agent shutdown timestamp hook synchronously at SIGTERM/SIGINT receipt before closing admission in dev and TLS paths. No read added.;rev3=census-ruling-region-ha-held-build;basis=region HA held-requests Task 5: registers the https and http servers with the connection drain (conns.serve) so a drain can close idle keep-alive connections; no read added;rev3=census-ruling-warm-set-published-724;basis=#724: the inline cert warm construction (newCertWarm over warmSet and dnsGate, then OnReload and setServedWake registering warm.nudge) moves unchanged into the new Edge.newIssuerWarm in certwarm.go and is called here with the same apps domain, parents, perHostCert, warmResolver, edgeIPs and store; the loop still starts here. The warm set it wires now reads the published edges files through the home map (OwnServedHosts and ServedHosts, both already polled) instead of the local route table, regional names aside. It is a different source, not a subset: an attached name not yet published as pointing is no longer listed, while a name the route table has already dropped stays listed until this box's next edges file write and the home map's next poll catch up (HostPolicy still refuses an order for a name the registry no longer holds). A name published not pointing is not a warm candidate at all, whether or not its certificate is cached: the warm neither looks it up, orders it nor re-arms its renewal until its home box publishes it pointing again (a cached certificate keeps serving and re-arms on a handshake at the issuer). The warm reads the set only after the issuer gate, and the read is in memory (route table and the home map's last snapshot); it also drops a DNS-miss entry for a name that has left the set before probing it. It keeps a failure record while any box publishes the exact name (the home map DeployedHosts: every box's file, own included, pointing or not, the same in-memory snapshot) or the name is a regional route-table name, and prunes it only once no box publishes it. That retention set has no apps-domain or wildcard filter (those stay on candidacy only), so a name published not pointing, or one a wildcard parent starts covering, keeps the record that explains its backoff; the set is never a source of candidates. No read site added in this unit, same 5 sites.;rev3=census-ruling-w6-ingress-drain;basis=the two public servers are built by e.publicServers (internal/edge/ingressdrain.go): :443 as before (same handler, TLS config and ReadHeaderTimeout 10 s), :80 now wrapped by plainTracked so the ingress drain can count and close its requests (its barrier is never §25's); Serve's error test is listenerFailed(err) = err != nil && !errors.Is(err, http.ErrServerClosed) (was err != ErrServerClosed), so a graceful Shutdown by the drain is not fatal. New Edge.plain connDrain field. Same flags, addresses and listeners; read sites unchanged (5); no read added.;rev3=census-ruling-edge-ppv2;basis=Edge process (uid carlos), not root. Edge gains the proxy atomic.Pointer. Outside dev mode, before either public listener binds and before the ready hook hands the Edge to the agent, calls e.loadProxyIngress(os.Getenv, dataDir): CARLOS_INGRESS_PROXY_SOURCES from the edge's own environment (carlos-edge.service loads the root-owned 0600 host.env) through hostenv.ParseProxySources; blank leaves the edge unarmed with nothing read; a non-empty list arms it and Lstats <dataDir>/edge/trust-barrier (armProxyIngress); a value that does not parse is log.Fatal. After the hairpin configuration, wrapProxyIngress wraps both public listeners outermost (returns them untouched when unarmed); when armed it logs the armed line and starts runProxyJournal (counters to the journal, no reads). The existing 5 read sites are unchanged.;rev3=census-ruling-audit-request-path;basis=the dev-mode http.Server gains IdleTimeout: publicIdleTimeout (120 s) beside its ReadHeaderTimeout; comment updated. Same 5 read sites, no read added.
-Seal: `f959a3626e83650aaad1880eecc3feddebdbd78474937f4c619df658eb46a1d6` → `2ddc949f4e27e0e652da34c52801f3d32fd0b8f06165c55efe2ee2f3d3885a69`.
+Seal: `47ebd73418bcbe1bdf9cf34a2b94e3393a1279aea58f9ee0aca3f0cfe42b9132` → `b2f039a12bb284c9a36b391339e25e3f77ec94a3d4e38389ec9ef75261d7873f`.
Overlay: `internal/provision/testdata/plan14-root-reads-precert-dns01-1293.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/docs/superpowers/notes/census-proposal-stateless-scale-1-memory-env.md b/docs/superpowers/notes/census-proposal-stateless-scale-1-memory-env.md
new file mode 100644
index 000000000..8ff3e5f41
--- /dev/null
+++ b/docs/superpowers/notes/census-proposal-stateless-scale-1-memory-env.md
@@ -0,0 +1,25 @@
+# Census approval: stateless-scale-1-memory-env
+
+Ruling `census-ruling-stateless-scale-1-memory-env`. The independent reviewer approves or rejects every change below, 0 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26).
+
+| unit | change | read sites | what changed |
+|---|---|---|---|
+| `internal/activator/rootfs.go` `ExecBackend.spawnRootfs` | body | unchanged (24) | #892 S1: the web launch environment also gets CARLOS_MEMORY_MIB, the tier argument's MemoryMax (the limit this call already passes StartRootfs) in MiB, through withMemoryVar (map composition, set after the file environment); no read added, read sites unchanged |
+| `internal/activator/rootfsenv.go` `ExecBackend.rootfsCmdVars` | body | unchanged (3) | #892 S1: CARLOS_MEMORY_MIB removed from a run's (and so a release's) environment with withoutVars, so a tenant file cannot supply it; map composition only, no read added |
+| `internal/activator/rootfsenv.go` `ExecBackend.rootfsTTYVars` | body | unchanged (3) | #892 S1: CARLOS_MEMORY_MIB removed from a session's environment with withoutVars; map composition only, no read added |
+| `internal/activator/rootfsenv.go` `ExecBackend.rootfsWorkerVars` | body | unchanged (4) | #892 S1: a worker's environment also gets CARLOS_MEMORY_MIB from g.Tier.MemoryMax (the limit LaunchRootfsWorker already passes StartRootfsWorker) in MiB, through withMemoryVar; map composition only, no read added |
+
+Envelopes re-pinned: `internal/activator`.
+
+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.
+
+Recorded dispositions, which each change must still satisfy:
+
+- `internal/activator/rootfs.go` `ExecBackend.spawnRootfs`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-rootfs-apps-2;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=root-route (J1, as spawnUnitFrom, whose shape it has): new (rootfs Plan 2 Tasks 5 and 9): prepareKeyedAt (the instance's own directories, environment and listeners, unchanged), the schema-2 tenant launch file (environment only, CARLOS_SOCKET and CARLOS_DB set by the agent), the caller's exec gate, then StartRootfs over the control socket naming the image and web; root resolves the command from its own staged manifest (C4) and the tenant file may name no command (the trampoline refuses one); the failure handling is spawnUnitFrom's; its sites are the row's host and route; no root decision; final fix I1: root's answers that guarantee no start (ErrStartRefused: 503 not ready or claim-armed, 501 unconfigured, 400, 409, 507), like its 403, are marked a refusal (refuseRootfs), so verdictOf and classifyStep record no failure of the build and no stop is asked; a 502 and a transport failure still may have run; the same nineteen sites, offsets moved;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 fix wave 1 (d35fcb1f, census P1-1): takes the tier root is asked for as an argument; a zero tier means GenTier's (the former body), so a caller that chose a limit has it kept, as spawnChildFrom and spawnUnitFrom keep theirs; the same nineteen sites, no read added;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only.;rev3=census-ruling-edge-page-cache-1;basis=sets up.inputs = launchInputs(id.Version, fileEnv): the image version and env this spawn already read, hashed in memory; no new read; read sites unchanged (20); no read added;rev3=census-ruling-gvisor-demos;basis=Task 5: gate launch using startup-captured mode and existing route/role/layout before preparation or execution; migrate structured root start identity and reject mismatches. Unsupported gVisor paths refuse; native behavior and existing root authority checks retained. No new root read source. Merge2 e8a1ddde: retain main launchInputs on rootfs handle from existing staged image version and fileEnv. Keep branch sandbox gate and root identity validation. No new read.;rev3=census-ruling-fix-silent-start-kill-861;basis=#861: one log line before killFailedRootfsGen naming the host, the unit and the error already in hand; the +registry:Host site is that argument to log.Printf; no new read source, behaviour unchanged;rev3=census-ruling-platform-mail-submission;basis=Task 6: the same warnUndeclaredMailBuild call for a rootfs spawn. Agent, not root.
+- `internal/activator/rootfsenv.go` `ExecBackend.rootfsCmdVars`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 6: a rootfs cmd's environment is the binary cmdVars composed through rootfsVars (the image's socket and database paths); reads Socket;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only.
+- `internal/activator/rootfsenv.go` `ExecBackend.rootfsTTYVars`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 8, new: a rootfs session environment: ttyVars over the generation launch environment, then rootfsVars with the row canonical socket and dbPath set after the file environment, as rootfsCmdVars does; map composition only;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only.
+- `internal/activator/rootfsenv.go` `ExecBackend.rootfsWorkerVars`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W, D1: a worker's launch environment is web's launch environment for the generation (the handle's LaunchEnv, the agent-owned variables as web got them), with the generation's control socket only when web's listener bound, then rootfsVars with the row's canonical socket and database path; nothing from a tenant or app is added;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only.
+
+Seal: `f959a3626e83650aaad1880eecc3feddebdbd78474937f4c619df658eb46a1d6` → `47ebd73418bcbe1bdf9cf34a2b94e3393a1279aea58f9ee0aca3f0cfe42b9132`.
+
+Overlay: `internal/provision/testdata/plan14-root-reads-stateless-scale-1-memory-env.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/docs/superpowers/plans/2026-11-11-stateless-replicas-scale-copy.md b/docs/superpowers/plans/2026-11-11-stateless-replicas-scale-copy.md
new file mode 100644
index 000000000..5cac89b3c
--- /dev/null
+++ b/docs/superpowers/plans/2026-11-11-stateless-replicas-scale-copy.md
@@ -0,0 +1,12 @@
+# Stateless replicas at production scale: copy deck
+
+Copy for #892 (spec `docs/superpowers/specs/2026-11-11-stateless-replicas-production-scale-design.md`).
+Use the rootfs copy deck's id/file/text/status format. No em dashes. Examples
+use shop and example.com. Rows are approved by delegation (a Luna pass) and
+listed for Paul's copy review; his edits replace them verbatim.
+
+## S1: CARLOS_MEMORY_MIB
+
+| id | file | text | status |
+|---|---|---|---|
+| PS-1-C01 | docs/site/rootfs.md | CARLOS_MEMORY_MIB is the memory limit, in MiB, that web and each worker start with. For example, it is 2048 at the xlarge size. Use it to choose how many processes to start, such as Puma workers. Release, carlos run and consoles do not get this variable. | approved by delegation (Luna pass, gpt-5.6-luna, 2026-11-11; brief and result in docs/superpowers/notes/LUNA-COPY-BRIEF-STATELESS-SCALE-S1.md); for Paul's copy review |
diff --git a/docs/superpowers/reviews/CODEX-FINDINGS-STATELESS-SCALE-S1-R1.md b/docs/superpowers/reviews/CODEX-FINDINGS-STATELESS-SCALE-S1-R1.md
new file mode 100644
index 000000000..4bc89dc0b
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-FINDINGS-STATELESS-SCALE-S1-R1.md
@@ -0,0 +1,23 @@
+# Astra findings: #892 S1 branch and census, round 1
+
+Reviewer: Astra (codex exec -m gpt-6-astra, read-only), brief CODEX-REVIEW-BRIEF-STATELESS-SCALE-S1.md, code tip 4dd2825a. Final answer verbatim below.
+
+Findings: **P1: none. P2: none. P3: none.**
+
+Reviewed `origin/main..4dd2825a`, using the authority specified in the brief.
+
+- All five launch roles satisfy S1. Web and workers derive MiB from the exact limit passed to root; release, run and session environments remove the name after composition. Manifest validation also rejects `CARLOS_*` variables.
+- Config-change comparisons, `launchInputs`, escrow and moves retain their existing file-environment inputs. The worker/web equality check remains consistent.
+- The tests have assertions that can detect incorrect values, tenant overrides, missing removal, rounding errors, map mutation and unapplied copy. The web memory test compares against the captured root request; the worker test deliberately changes `g.Tier`.
+
+Targeted tests **could not run**: Go failed to create its work directory under `/home/paulca/.cache/tmp` because the sandbox is read-only. This is a source-review verdict, not a test-pass claim.
+
+| unit | approve or reject | lines read | reason |
+|---|---|---|---|
+| `ExecBackend.spawnRootfs` | approve | `internal/activator/rootfs.go:331–446` | Sets the variable after environment composition from `tier.MemoryMax`, also passed to root at line 387. Existing gates, reads and failure handling remain intact. |
+| `ExecBackend.rootfsCmdVars` | approve | `internal/activator/rootfsenv.go:39–46,56–63`; `backend_rootfs.go:340–346` | Removes the name after all merges; release inherits that removal. No new read or weakened check. |
+| `ExecBackend.rootfsTTYVars` | approve | `internal/activator/rootfsenv.go:48–54`; `backend_rootfs.go:340–343` | Removes the name from the final session environment without changing socket, database or authentication checks. |
+| `ExecBackend.rootfsWorkerVars` | approve | `internal/activator/rootfsenv.go:65–76`; `backend_rootfs.go:502–589` | Uses `g.Tier.MemoryMax`, matching root’s request at line 562; overrides the retained file environment. No new authority or read source. |
+| `internal/activator` envelope | approve | `rootfs.go:78–103,331–446`; `rootfsenv.go:19–76`; `backend_exec.go:3410–3439`; `prepare.go:345–368`; changed tests | The new helper only copies maps and formats an existing integer. All changed production functions preserve root’s existing paths, commands, validation and refusal behavior. |
+
+**READY**
diff --git a/docs/superpowers/reviews/CODEX-FINDINGS-STATELESS-SCALE-S1-R2.md b/docs/superpowers/reviews/CODEX-FINDINGS-STATELESS-SCALE-S1-R2.md
new file mode 100644
index 000000000..559d340da
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-FINDINGS-STATELESS-SCALE-S1-R2.md
@@ -0,0 +1,25 @@
+# Astra findings: #892 S1 census after merging main, round 2
+
+Reviewer: Astra (codex exec -m gpt-6-astra, effort high, read-only), brief CODEX-REVIEW-BRIEF-STATELESS-SCALE-S1-R2.md, tip 819b7cfb. Final answer verbatim below.
+
+**P1: none. P2: none. P3: none.** Round 1 had no outstanding findings.
+
+Reviewed commit `819b7cfb4f26719583b9ae1143e629dcf0199c33` against amadan’s `origin/main` at `d3266e8e6fbbad5367453a9d75ed016182b84a84`.
+
+The `spawnRootfs` merge resolution preserves both parents’ changes without meaningful reordering. `withMemoryVar` wraps the completed environment composition; `warnUndeclaredMailBuild` remains immediately afterward, before the launch-file write and execution gate. The warning neither modifies that environment nor changes the requested memory limit.
+
+All paths below are under `internal/activator/`; ranges identify lines read.
+
+| Unit | Verdict | Lines read | Reason |
+|---|---|---|---|
+| `ExecBackend.spawnRootfs` | Approve | `rootfs.go:331–446`; `mailbuild.go:12–59` | Uses `tier.MemoryMax`, also passed to root at line 388. Preserves gates, identity validation, refusal handling and retained file environment. No new read source or root authority. |
+| `ExecBackend.rootfsCmdVars` | Approve | `rootfsenv.go:39–46,56–63`; `cmdunit.go:209–239`; `backend_rootfs.go:385–407` | Removes the name after composition; release inherits removal. Existing socket, database and credential handling remains intact. |
+| `ExecBackend.rootfsTTYVars` | Approve | `rootfsenv.go:48–54`; `cmdunit.go:232–239`; `backend_rootfs.go:385–407` | Removes the name from the final session environment without weakening existing checks or introducing reads. |
+| `ExecBackend.rootfsWorkerVars` | Approve | `rootfsenv.go:65–76`; `backend_rootfs.go:563–651` | Uses `g.Tier.MemoryMax`, matching root’s request at line 623. Overrides tenant input while preserving storage-mode handling and launch checks. |
+| `internal/activator` envelope | Approve | Above; `rootfsenv.go:19–37`; `backend_exec.go:2883–2912,3624–3654`; `prepare.go:344–373`; `rootfs_memoryvar_test.go:1–134`; `rootfs_invariants_test.go:1197–1220`; `rootfsenv_test.go:55–98` | All changed production functions preserve existing root boundaries. The helper copies maps and formats an existing integer. Changed tests cover requested limits, tenant overrides, one-shot removal, rounding and input preservation. |
+
+The census chain retains main’s entries and appends the S1 overlay. All four units retain their recorded dispositions.
+
+Source review only: no Go commands or tests ran, as instructed. No files changed or external verdicts posted.
+
+**READY**
\ No newline at end of file
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-STATELESS-SCALE-S1-R2.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-STATELESS-SCALE-S1-R2.md
new file mode 100644
index 000000000..24f70a9b3
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-STATELESS-SCALE-S1-R2.md
@@ -0,0 +1,8 @@
+# Astra brief: #892 S1 census re-approval after merging main (round 2)
+
+You approved this branch's census in round 1 (CODEX-FINDINGS-STATELESS-SCALE-S1-R1.md, code tip 4dd2825a, base 01d6ca78). Main has since moved 142 commits. Merge commit f15d5aba brings origin/main in; the only conflicts were:
+
+1. internal/activator/rootfs.go, ExecBackend.spawnRootfs: the branch's withMemoryVar(...) line and main's new b.warnUndeclaredMailBuild(rt, id.Version) call (census-ruling-platform-mail-submission). Both are kept.
+2. internal/provision/testdata/plan14-root-reads-chain.tsv: main's chain lines taken; the S1 overlay re-proposed with make census-propose on the new base (seal f959a362 -> 47ebd734), same four units and claims.
+
+Task: read docs/superpowers/notes/census-proposal-stateless-scale-1-memory-env.md (the card) and `git diff origin/main...HEAD` for internal/activator/. Answer the card's review question for every unit and the re-pinned internal/activator envelope: approve or reject, with lines read. Also say whether the merge resolution in spawnRootfs loses or reorders anything from either side in a way that matters. Report P1/P2/P3 findings, then the table, then READY or NOT READY. Read-only; do not run go (the sandbox has no build cache).
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-STATELESS-SCALE-S1.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-STATELESS-SCALE-S1.md
new file mode 100644
index 000000000..cd5d8041f
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-STATELESS-SCALE-S1.md
@@ -0,0 +1,72 @@
+# Review brief: #892 S1, CARLOS_MEMORY_MIB (branch and census), round 1 of 3
+
+Repo carlos/platform, branch `stateless-scale-1-memory-env`, commit 4dd2825a.
+Under review: the diff `origin/main..4dd2825a` (main is 01d6ca78), and the census
+card `docs/superpowers/notes/census-proposal-stateless-scale-1-memory-env.md`.
+Authorities (merged on main): `docs/superpowers/specs/2026-11-11-stateless-replicas-production-scale-design.md`
+§4 S1, rev 2, read from branch `design-stateless-replicas-scale` at 2d7fcb29
+(`git show 2d7fcb29:<path>`). Its review is closed (Astra round 1, READY AFTER FIXES,
+fixes applied); its merge waits only on CI, so treat that file as the authority.
+Also `docs/site/rootfs.md`,
+AGENTS.md "The census: the reviewer decides".
+
+You are an independent reviewer (the author is a Claude model). You give two
+verdicts: one for the branch, and one census verdict for every unit and re-pinned
+envelope on the card.
+
+## Fixed: do not re-argue
+
+- The spec's S1 rules: web gets the tier `spawnRootfs` passes root; a worker gets
+ `g.Tier`, the figure `LaunchRootfsWorker` passes root; release, runs and sessions
+ get none, and the name is removed from theirs.
+- Copy row PS-1-C01 is approved by delegation (Luna) and goes to Paul separately.
+ Do not edit the wording.
+
+## What to check
+
+1. For each of web, worker, release, run and session: is the variable exactly what
+ the spec says (the same number passed to root on that start, in MiB rounded
+ down, or absent), and can no tenant file, config bundle or earlier launch
+ environment put a different value in front of the process? Check every path
+ that writes a rootfs launch file (`writeRootfsLaunchFor`, `writeRootfsWorkerLaunch`).
+2. Does anything compare or hash a launch environment such that a new variable
+ changes behaviour: restarts on config change, edge page cache inputs
+ (`launchInputs`), escrow of the launch env, moves' box-owned variables, the
+ worker-equals-web check?
+3. Census: for each unit on the card (`spawnRootfs`, `rootfsCmdVars`,
+ `rootfsTTYVars`, `rootfsWorkerVars`) and the re-pinned `internal/activator`
+ envelope, apply AGENTS.md's rule: reject if root now opens, runs, queries or
+ follows anything new from a path or input a tenant, app or box agent controls,
+ or if a check, refusal or environment root relies on is weakened. Cite lines.
+4. Are the tests (`internal/activator/rootfs_memoryvar_test.go`, the updated
+ `TestRootfsWebLaunchCarriesTheContract`, `approved_stateless_scale_copy_test.go`)
+ able to fail for the behaviour they name?
+
+## Severity
+
+- **P1**: unsafe, would not compile, a test fails, or it would not work.
+ Blocks merge.
+- **P2**: wrong or missing. Fixed without reopening this review. (The
+ census, and review of any newly changed security, root, termination
+ or production-storage behaviour, still check the fix; see AGENTS.md,
+ "Stopping rules".)
+- **P3**: clarity or polish. Goes on a follow-up list; never a reason for
+ another round.
+
+A P1 states its failure scenario and the evidence (file:line). Do not
+raise a P2 to P1 to keep the review open.
+
+## Output
+
+Findings ranked P1, P2, P3, each with the evidence (file:line, verified), the
+failure scenario, a concrete fix and its fault family. Then the census table:
+`unit | approve or reject | lines read | reason`, one row per unit and one for the
+envelope. End with exactly one branch verdict:
+
+- **READY**: no P1 and no P2.
+- **READY AFTER FIXES**: no P1. The listed P2s are fixed without another
+ round.
+- **NOT READY**: one or more P1s, listed.
+
+Do not edit files. Do not spawn Anthropic-model reviewers or subagents of
+your own. Do not run the full test suites; targeted `go test -run` is fine.
diff --git a/internal/activator/rootfs.go b/internal/activator/rootfs.go
index 952e06266..81ae32e26 100644
--- a/internal/activator/rootfs.go
+++ b/internal/activator/rootfs.go
@@ -367,7 +367,8 @@ func (b *ExecBackend) spawnRootfs(ctx context.Context, rt registry.Route, sock s
_ = os.Remove(filepath.Join(p.dataDir, instancectl.GenLaunchFileName(gen)))
}
}
- childVars := storageVars(rt, rootfsVars(b.agentOwnedVars(rt, sock+".control", fileEnv, ctl != nil), sock, p.dbPath))
+ // memoryVar is tier, the limit root is asked for below (#892 S1).
+ childVars := withMemoryVar(storageVars(rt, rootfsVars(b.agentOwnedVars(rt, sock+".control", fileEnv, ctl != nil), sock, p.dbPath)), tier.MemoryMax)
b.warnUndeclaredMailBuild(rt, id.Version)
steps.mark(time.Now(), "prepare ("+prep.String()+")")
if err := b.writeRootfsLaunchFor(p, instancectl.RoleRun, gen, rt.Host, release.ProcessWeb, rootfsLaunchEnv(childVars)); err != nil {
diff --git a/internal/activator/rootfs_invariants_test.go b/internal/activator/rootfs_invariants_test.go
index 57c4e6d39..43538ae43 100644
--- a/internal/activator/rootfs_invariants_test.go
+++ b/internal/activator/rootfs_invariants_test.go
@@ -1211,8 +1211,9 @@ var rootfsLaunchRows = map[string]func(t *testing.T) (instancectl.Launch, map[st
l := readLaunchNamed(t, b, rt, instancectl.GenLaunchFileName(7))
// What startRootfs composed: the file environment the generation
// launched with (its handle keeps it), the agent-owned variables,
- // then the socket and the database.
- vars := rootfsVars(b.agentOwnedVars(rt, sock+".control", p.(*unitProc).LaunchEnv(), true), sock, b.pathsFor(rt).dbPath)
+ // then the socket and the database, and the memory limit root was
+ // asked for (#892 S1).
+ vars := withMemoryVar(rootfsVars(b.agentOwnedVars(rt, sock+".control", p.(*unitProc).LaunchEnv(), true), sock, b.pathsFor(rt).dbPath), webMemoryMaxAsked(t, ctl))
if vars["SHOP_MODE"] != "live" {
t.Fatalf("the instance's file did not reach the composed variables: %v", vars)
}
diff --git a/internal/activator/rootfs_memoryvar_test.go b/internal/activator/rootfs_memoryvar_test.go
new file mode 100644
index 000000000..6e3b69710
--- /dev/null
+++ b/internal/activator/rootfs_memoryvar_test.go
@@ -0,0 +1,134 @@
+package activator
+
+import (
+ "context"
+ "fmt"
+ "path/filepath"
+ "regexp"
+ "strconv"
+ "testing"
+
+ "github.com/carlosframework/platform/internal/cgroup"
+ "github.com/carlosframework/platform/internal/instancectl"
+)
+
+// #892 S1 (spec 2026-11-11-stateless-replicas-production-scale-design.md
+// §4 S1): web and every worker get CARLOS_MEMORY_MIB, the memory.max root
+// is asked to start that unit at, in MiB; a tenant's file cannot set it;
+// release, runs and sessions never carry it.
+
+// The tenant's file tries to set the figure itself.
+const memoryVarEnvFile = "SHOP_MODE=live\nCARLOS_MEMORY_MIB=99999\n"
+
+var startRootfsMemRe = regexp.MustCompile(`^start-rootfs \S+ gen=7 memory_max=(\d+) `)
+
+// webMemoryMaxAsked is the memory_max of root's start of generation 7.
+func webMemoryMaxAsked(t *testing.T, ctl *fakeControl) int64 {
+ t.Helper()
+ for _, c := range ctl.callList() {
+ if m := startRootfsMemRe.FindStringSubmatch(c); m != nil {
+ n, err := strconv.ParseInt(m[1], 10, 64)
+ if err != nil {
+ t.Fatal(err)
+ }
+ return n
+ }
+ }
+ t.Fatalf("root was never asked to start generation 7: %q", ctl.callList())
+ return 0
+}
+
+func TestRootfsWebMemoryVarIsTheLimitRootIsAsked(t *testing.T) {
+ for _, size := range []string{"", "large", "xlarge"} {
+ t.Run("size="+size, func(t *testing.T) {
+ b, ctl := newRootfsBackend(t)
+ rt := rootfsRoute(b)
+ rt.Size = size
+ startRootfsGen7(t, b, ctl, rt, memoryVarEnvFile)
+ asked := webMemoryMaxAsked(t, ctl)
+ if size != "" {
+ s, _ := cgroup.SizeByName(size)
+ if asked != s.Limit.MemoryMax {
+ t.Fatalf("root was asked memory_max=%d for size %s, want %d", asked, size, s.Limit.MemoryMax)
+ }
+ }
+ env := envMap(t, readLaunchNamed(t, b, rt, instancectl.GenLaunchFileName(7)).Env)
+ if want := strconv.FormatInt(asked>>20, 10); env[memoryVar] != want {
+ t.Errorf("%s = %q, want %q (memory_max %d)", memoryVar, env[memoryVar], want, asked)
+ }
+ if env["SHOP_MODE"] != "live" {
+ t.Errorf("the tenant's own variable is gone: %v", env)
+ }
+ })
+ }
+}
+
+func TestRootfsWorkerMemoryVarIsItsGenerationsTier(t *testing.T) {
+ t.Parallel()
+ b, ctl, rt, units := newWorkerBackend(t)
+ web, g := startWorkerWeb(t, b, ctl, rt, units, memoryVarEnvFile)
+ // A generation kept at a larger tier than the row's (a swap keeping the
+ // incumbent's while a shrink waits): the worker follows the generation,
+ // which is what root is asked for.
+ xl, _ := cgroup.SizeByName("xlarge")
+ g.Tier = xl.Limit
+ units.set(instancectl.WorkerUnitName(rt.Host, "jobs"), "active", "inv1", true)
+ before := len(ctl.callList())
+ wp, err := b.LaunchRootfsWorker(context.Background(), rt, "jobs", g, web)
+ if err != nil {
+ t.Fatalf("LaunchRootfsWorker: %v", err)
+ }
+ t.Cleanup(func() { stopWorker(t, wp) })
+ want := fmt.Sprintf("start-rootfs-worker %s jobs memory_max=%d ", rt.Host, xl.Limit.MemoryMax)
+ if calls := ctl.callList()[before:]; len(calls) != 1 || len(calls[0]) < len(want) || calls[0][:len(want)] != want {
+ t.Fatalf("root was asked %q, want a start beginning %q", calls, want)
+ }
+ env := envMap(t, readLaunchNamed(t, b, rt, instancectl.WorkerLaunchFileName("jobs")).Env)
+ if env[memoryVar] != "2048" {
+ t.Errorf("worker %s = %q, want 2048", memoryVar, env[memoryVar])
+ }
+}
+
+func TestRootfsOneShotsCarryNoMemoryVar(t *testing.T) {
+ b, ctl := newRootfsBackend(t)
+ rt := rootfsRoute(b)
+ up, _ := startRootfsGen7(t, b, ctl, rt, memoryVarEnvFile)
+ genEnv := up.LaunchEnv()
+ if genEnv[memoryVar] != "99999" {
+ t.Fatalf("the generation's file environment lost the tenant's value before the composer ran: %v", genEnv)
+ }
+ p := b.pathsFor(rt)
+ for name, vars := range map[string]map[string]string{
+ "run": b.rootfsCmdVars(rt, genEnv, p.dbPath, "r1", filepath.Join(p.dataDir, CmdRunDirName, "r1")),
+ "session": b.rootfsTTYVars(rt, genEnv, p.dbPath, "s1", "xterm"),
+ "release": b.rootfsReleaseVars(rt, genEnv, p.dbPath),
+ } {
+ if v, ok := vars[memoryVar]; ok {
+ t.Errorf("a %s carries %s=%q", name, memoryVar, v)
+ }
+ }
+}
+
+func TestWithMemoryVar(t *testing.T) {
+ t.Parallel()
+ in := map[string]string{memoryVar: "7", "A": "1"}
+ for _, c := range []struct {
+ max int64
+ want string
+ set bool
+ }{
+ {512 << 20, "512", true},
+ {(1 << 30) + (1 << 19), "1024", true}, // rounded down
+ {0, "", false},
+ {-1, "", false},
+ } {
+ got := withMemoryVar(in, c.max)
+ v, ok := got[memoryVar]
+ if ok != c.set || v != c.want || got["A"] != "1" {
+ t.Errorf("withMemoryVar(%d) = %v, want set=%v %q", c.max, got, c.set, c.want)
+ }
+ }
+ if in[memoryVar] != "7" {
+ t.Errorf("withMemoryVar wrote its argument: %v", in)
+ }
+}
diff --git a/internal/activator/rootfsenv.go b/internal/activator/rootfsenv.go
index 1c82e25c3..b63e16bb4 100644
--- a/internal/activator/rootfsenv.go
+++ b/internal/activator/rootfsenv.go
@@ -10,7 +10,31 @@
// logged.
package activator
-import "github.com/carlosframework/platform/internal/registry"
+import (
+ "strconv"
+
+ "github.com/carlosframework/platform/internal/registry"
+)
+
+// memoryVar is the memory limit, in MiB, that root is asked to start a
+// rootfs web or worker unit at (#892 S1, spec
+// 2026-11-11-stateless-replicas-production-scale-design.md §4 S1), so an
+// app can size its own process managers (Puma's workers, a Sidekiq swarm)
+// from it. Agent-owned: set after the instance's files on every web and
+// worker launch (withMemoryVar), and removed from every one-shot's
+// environment (release, run, session), whose unit does not set the limit
+// it runs under, so no tenant file supplies a false one.
+const memoryVar = "CARLOS_MEMORY_MIB"
+
+// withMemoryVar is vars with memoryVar set to memoryMax in MiB, rounded
+// down, or removed when memoryMax names no limit. memoryMax is exactly the
+// figure the caller passes root for this start: nothing is read for it.
+func withMemoryVar(vars map[string]string, memoryMax int64) map[string]string {
+ if memoryMax <= 0 {
+ return withoutVars(vars, memoryVar)
+ }
+ return withVar(vars, memoryVar, strconv.FormatInt(memoryMax>>20, 10))
+}
// rootfsCmdVars is a carlos run's environment on a rootfs row: cmdVars over
// fileEnv, the file environment the run's generation launched with (no
@@ -18,7 +42,7 @@ import "github.com/carlosframework/platform/internal/registry"
// run's id and directory set), then rootfsVars with the row's canonical
// socket and dbPath.
func (b *ExecBackend) rootfsCmdVars(rt registry.Route, fileEnv map[string]string, dbPath, runID, runDir string) map[string]string {
- return storageVars(rt, rootfsVars(b.cmdVars(rt, fileEnv, dbPath, runID, runDir), rt.Socket, dbPath))
+ return withoutVars(storageVars(rt, rootfsVars(b.cmdVars(rt, fileEnv, dbPath, runID, runDir), rt.Socket, dbPath)), memoryVar)
}
// rootfsTTYVars is a session's environment on a rootfs row (Plan 6 Task
@@ -26,7 +50,7 @@ func (b *ExecBackend) rootfsCmdVars(rt registry.Route, fileEnv map[string]string
// launched with (no run id or directory; TERM and CARLOS_SESSION_ID set),
// then rootfsVars with the row's canonical socket and dbPath.
func (b *ExecBackend) rootfsTTYVars(rt registry.Route, fileEnv map[string]string, dbPath, sessionID, term string) map[string]string {
- return storageVars(rt, rootfsVars(b.ttyVars(rt, fileEnv, dbPath, sessionID, term), rt.Socket, dbPath))
+ return withoutVars(storageVars(rt, rootfsVars(b.ttyVars(rt, fileEnv, dbPath, sessionID, term), rt.Socket, dbPath)), memoryVar)
}
// rootfsReleaseVars is a release command's environment on a rootfs row
@@ -44,8 +68,9 @@ func (b *ExecBackend) rootfsReleaseVars(rt registry.Route, fileEnv map[string]st
// g's control socket only when web's listener bound (haveControl), then
// rootfsVars with the row's canonical socket and dbPath. So a worker's
// launch file is web's, CARLOS_SOCKET aside: a worker serves nothing, and
-// names the instance's socket, never a generation's.
+// names the instance's socket, never a generation's. Its memoryVar is g's
+// tier, the limit LaunchRootfsWorker asks root for.
func (b *ExecBackend) rootfsWorkerVars(rt registry.Route, g Gen, dbPath string, genEnv map[string]string, haveControl bool) map[string]string {
rt.Stateless = g.Stateless
- return storageVars(rt, rootfsVars(b.agentOwnedVars(rt, g.Control, genEnv, haveControl), rt.Socket, dbPath))
+ return withMemoryVar(storageVars(rt, rootfsVars(b.agentOwnedVars(rt, g.Control, genEnv, haveControl), rt.Socket, dbPath)), g.Tier.MemoryMax)
}
diff --git a/internal/activator/rootfsenv_test.go b/internal/activator/rootfsenv_test.go
index b3b02992a..62a7c87e6 100644
--- a/internal/activator/rootfsenv_test.go
+++ b/internal/activator/rootfsenv_test.go
@@ -88,7 +88,7 @@ func TestRootfsWebLaunchCarriesTheContract(t *testing.T) {
// The whole list, so a variable that starts reaching the web process
// is a visible change here. CARLOS_PURGE is the agent's (no cache on
// this backend: removed, the tenant's value with it).
- wantKeys := []string{"CARLOS_ADMIN_TOKEN", "CARLOS_CONTROL_SOCKET", "CARLOS_DB", "CARLOS_HOST", "CARLOS_INSTANCE_KEY", "CARLOS_REGION", "CARLOS_SOCKET", "SHOP_MODE"}
+ wantKeys := []string{"CARLOS_ADMIN_TOKEN", "CARLOS_CONTROL_SOCKET", "CARLOS_DB", "CARLOS_HOST", "CARLOS_INSTANCE_KEY", "CARLOS_MEMORY_MIB", "CARLOS_REGION", "CARLOS_SOCKET", "SHOP_MODE"}
if got := sortedKeys(env); !slices.Equal(got, wantKeys) {
t.Errorf("launch variables %v, want %v", got, wantKeys)
}
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index e121fc839..60631158b 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -274,4 +274,5 @@ plan14-root-reads-media-spike-fixes.tsv 194e88ad9cd7413c93b1181c0ac1e962107039ad
plan14-root-reads-media-spike-values.tsv 194e88ad9cd7413c93b1181c0ac1e962107039ad84525e065893a8c14cdb3138
plan14-root-reads-path-routes-across-boxes.tsv f959a3626e83650aaad1880eecc3feddebdbd78474937f4c619df658eb46a1d6
plan14-root-reads-headers-security-allowlist.tsv f959a3626e83650aaad1880eecc3feddebdbd78474937f4c619df658eb46a1d6
-plan14-root-reads-precert-dns01-1293.tsv 2ddc949f4e27e0e652da34c52801f3d32fd0b8f06165c55efe2ee2f3d3885a69
+plan14-root-reads-stateless-scale-1-memory-env.tsv 47ebd73418bcbe1bdf9cf34a2b94e3393a1279aea58f9ee0aca3f0cfe42b9132
+plan14-root-reads-precert-dns01-1293.tsv b2f039a12bb284c9a36b391339e25e3f77ec94a3d4e38389ec9ef75261d7873f
diff --git a/internal/provision/testdata/plan14-root-reads-stateless-scale-1-memory-env.tsv b/internal/provision/testdata/plan14-root-reads-stateless-scale-1-memory-env.tsv
new file mode 100644
index 000000000..b5d2faad9
--- /dev/null
+++ b/internal/provision/testdata/plan14-root-reads-stateless-scale-1-memory-env.tsv
@@ -0,0 +1,11 @@
+# Census overlay stateless-scale-1-memory-env, written by census-propose (#369). census-ruling-stateless-scale-1-memory-env, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-stateless-scale-1-memory-env.md.
+# 4 body, 0 sites, 1 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+@legacy 63b6ae73ae7a5e7fcb94e7e3ccf2e3e3042fc97f8fa6f7cb1617b7c680a741b0 internal/activator/rootfs.go ExecBackend.spawnRootfs legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-2;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=root-route (J1, as spawnUnitFrom, whose shape it has): new (rootfs Plan 2 Tasks 5 and 9): prepareKeyedAt (the instance's own directories, environment and listeners, unchanged), the schema-2 tenant launch file (environment only, CARLOS_SOCKET and CARLOS_DB set by the agent), the caller's exec gate, then StartRootfs over the control socket naming the image and web; root resolves the command from its own staged manifest (C4) and the tenant file may name no command (the trampoline refuses one); the failure handling is spawnUnitFrom's; its sites are the row's host and route; no root decision; final fix I1: root's answers that guarantee no start (ErrStartRefused: 503 not ready or claim-armed, 501 unconfigured, 400, 409, 507), like its 403, are marked a refusal (refuseRootfs), so verdictOf and classifyStep record no failure of the build and no stop is asked; a 502 and a transport failure still may have run; the same nineteen sites, offsets moved;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 fix wave 1 (d35fcb1f, census P1-1): takes the tier root is asked for as an argument; a zero tier means GenTier's (the former body), so a caller that chose a limit has it kept, as spawnChildFrom and spawnUnitFrom keep theirs; the same nineteen sites, no read added;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only.;rev3=census-ruling-edge-page-cache-1;basis=sets up.inputs = launchInputs(id.Version, fileEnv): the image version and env this spawn already read, hashed in memory; no new read; read sites unchanged (20); no read added;rev3=census-ruling-gvisor-demos;basis=Task 5: gate launch using startup-captured mode and existing route/role/layout before preparation or execution; migrate structured root start identity and reject mismatches. Unsupported gVisor paths refuse; native behavior and existing root authority checks retained. No new root read source. Merge2 e8a1ddde: retain main launchInputs on rootfs handle from existing staged image version and fileEnv. Keep branch sandbox gate and root identity validation. No new read.;rev3=census-ruling-fix-silent-start-kill-861;basis=#861: one log line before killFailedRootfsGen naming the host, the unit and the error already in hand; the +registry:Host site is that argument to log.Printf; no new read source, behaviour unchanged;rev3=census-ruling-platform-mail-submission;basis=Task 6: the same warnUndeclaredMailBuild call for a rootfs spawn. Agent, not root.;rev3=census-ruling-stateless-scale-1-memory-env;basis=#892 S1: the web launch environment also gets CARLOS_MEMORY_MIB, the tier argument's MemoryMax (the limit this call already passes StartRootfs) in MiB, through withMemoryVar (map composition, set after the file environment); no read added, read sites unchanged registry:Host@1457,registry:Host@1630,registry:Host@1930,registry:Host@2049,registry:Host@2796,registry:Host@3133,registry:Host@3360,registry:Host@3487,registry:Host@3812,registry:Host@390,registry:Host@3940,registry:Host@4049,registry:Host@4766,registry:Host@4860,whole:Route@1187,whole:Route@1219,whole:Route@1323,whole:Route@199,whole:Route@2156,whole:Route@3193,whole:Route@4125,whole:Route@502,whole:Route@602,whole:Route@732 9e4314f070f62601e55b55d1a787e3a8a284e23e2ca353cbd75d5d3004333205
+@legacy 8061783955656afc384898b19b87d35bd0309ac2a8472cc5b7ab92984f5450d8 internal/activator/rootfsenv.go ExecBackend.rootfsCmdVars legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 6: a rootfs cmd's environment is the binary cmdVars composed through rootfsVars (the image's socket and database paths); reads Socket;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only.;rev3=census-ruling-stateless-scale-1-memory-env;basis=#892 S1: CARLOS_MEMORY_MIB removed from a run's (and so a release's) environment with withoutVars, so a tenant file cannot supply it; map composition only, no read added registry:Socket@226,whole:Route@164,whole:Route@189 e596326646077114dde78cc5e6e2eb6a4cade90f7dcc7c37c8e696e6b0560ccc
+@legacy 898f335260ca9ed7c2e3de28c9dbb6088a77785784efa35fae5bcece12da9f1e internal/activator/rootfsenv.go ExecBackend.rootfsTTYVars legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 8, new: a rootfs session environment: ttyVars over the generation launch environment, then rootfsVars with the row canonical socket and dbPath set after the file environment, as rootfsCmdVars does; map composition only;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only.;rev3=census-ruling-stateless-scale-1-memory-env;basis=#892 S1: CARLOS_MEMORY_MIB removed from a session's environment with withoutVars; map composition only, no read added registry:Socket@230,whole:Route@166,whole:Route@191 206b1ea4bf3a8d72465400b66350d59be2cd47894a0013ae222ed616a9c7ab78
+@legacy e7d46b1a7d5c307add5b3b7593bc16e38b5d0b1cb8ccc51ecda60d18294f4fdf internal/activator/rootfsenv.go ExecBackend.rootfsWorkerVars legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W, D1: a worker's launch environment is web's launch environment for the generation (the handle's LaunchEnv, the agent-owned variables as web got them), with the generation's control socket only when web's listener bound, then rootfsVars with the row's canonical socket and database path; nothing from a tenant or app is added;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only.;rev3=census-ruling-stateless-scale-1-memory-env;basis=#892 S1: a worker's environment also gets CARLOS_MEMORY_MIB from g.Tier.MemoryMax (the limit LaunchRootfsWorker already passes StartRootfsWorker) in MiB, through withMemoryVar; map composition only, no read added registry:Socket@275,registry:Stateless@145,whole:Route@206,whole:Route@238 0faa3ee9a5266dff34476168d119eb295f8647a7b713f5d59a61f508befe7b05
+internal/activator/rootfs.go ExecBackend.spawnRootfs legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-2;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=root-route (J1, as spawnUnitFrom, whose shape it has): new (rootfs Plan 2 Tasks 5 and 9): prepareKeyedAt (the instance's own directories, environment and listeners, unchanged), the schema-2 tenant launch file (environment only, CARLOS_SOCKET and CARLOS_DB set by the agent), the caller's exec gate, then StartRootfs over the control socket naming the image and web; root resolves the command from its own staged manifest (C4) and the tenant file may name no command (the trampoline refuses one); the failure handling is spawnUnitFrom's; its sites are the row's host and route; no root decision; final fix I1: root's answers that guarantee no start (ErrStartRefused: 503 not ready or claim-armed, 501 unconfigured, 400, 409, 507), like its 403, are marked a refusal (refuseRootfs), so verdictOf and classifyStep record no failure of the build and no stop is asked; a 502 and a transport failure still may have run; the same nineteen sites, offsets moved;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 fix wave 1 (d35fcb1f, census P1-1): takes the tier root is asked for as an argument; a zero tier means GenTier's (the former body), so a caller that chose a limit has it kept, as spawnChildFrom and spawnUnitFrom keep theirs; the same nineteen sites, no read added;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only.;rev3=census-ruling-edge-page-cache-1;basis=sets up.inputs = launchInputs(id.Version, fileEnv): the image version and env this spawn already read, hashed in memory; no new read; read sites unchanged (20); no read added;rev3=census-ruling-gvisor-demos;basis=Task 5: gate launch using startup-captured mode and existing route/role/layout before preparation or execution; migrate structured root start identity and reject mismatches. Unsupported gVisor paths refuse; native behavior and existing root authority checks retained. No new root read source. Merge2 e8a1ddde: retain main launchInputs on rootfs handle from existing staged image version and fileEnv. Keep branch sandbox gate and root identity validation. No new read.;rev3=census-ruling-fix-silent-start-kill-861;basis=#861: one log line before killFailedRootfsGen naming the host, the unit and the error already in hand; the +registry:Host site is that argument to log.Printf; no new read source, behaviour unchanged;rev3=census-ruling-platform-mail-submission;basis=Task 6: the same warnUndeclaredMailBuild call for a rootfs spawn. Agent, not root.;rev3=census-ruling-stateless-scale-1-memory-env;basis=#892 S1: the web launch environment also gets CARLOS_MEMORY_MIB, the tier argument's MemoryMax (the limit this call already passes StartRootfs) in MiB, through withMemoryVar (map composition, set after the file environment); no read added, read sites unchanged registry:Host@1457,registry:Host@1630,registry:Host@1930,registry:Host@2049,registry:Host@2796,registry:Host@3133,registry:Host@3360,registry:Host@3487,registry:Host@3812,registry:Host@390,registry:Host@3940,registry:Host@4049,registry:Host@4766,registry:Host@4860,whole:Route@1187,whole:Route@1219,whole:Route@1323,whole:Route@199,whole:Route@2156,whole:Route@3193,whole:Route@4125,whole:Route@502,whole:Route@602,whole:Route@732 9e4314f070f62601e55b55d1a787e3a8a284e23e2ca353cbd75d5d3004333205
+internal/activator/rootfsenv.go ExecBackend.rootfsCmdVars legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 6: a rootfs cmd's environment is the binary cmdVars composed through rootfsVars (the image's socket and database paths); reads Socket;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only.;rev3=census-ruling-stateless-scale-1-memory-env;basis=#892 S1: CARLOS_MEMORY_MIB removed from a run's (and so a release's) environment with withoutVars, so a tenant file cannot supply it; map composition only, no read added registry:Socket@226,whole:Route@164,whole:Route@189 e596326646077114dde78cc5e6e2eb6a4cade90f7dcc7c37c8e696e6b0560ccc
+internal/activator/rootfsenv.go ExecBackend.rootfsTTYVars legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 8, new: a rootfs session environment: ttyVars over the generation launch environment, then rootfsVars with the row canonical socket and dbPath set after the file environment, as rootfsCmdVars does; map composition only;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only.;rev3=census-ruling-stateless-scale-1-memory-env;basis=#892 S1: CARLOS_MEMORY_MIB removed from a session's environment with withoutVars; map composition only, no read added registry:Socket@230,whole:Route@166,whole:Route@191 206b1ea4bf3a8d72465400b66350d59be2cd47894a0013ae222ed616a9c7ab78
+internal/activator/rootfsenv.go ExecBackend.rootfsWorkerVars legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W, D1: a worker's launch environment is web's launch environment for the generation (the handle's LaunchEnv, the agent-owned variables as web got them), with the generation's control socket only when web's listener bound, then rootfsVars with the row's canonical socket and database path; nothing from a tenant or app is added;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Use the verified generation/launch mode to remove CARLOS_DB after environment merges and omit the binary --db argument where applicable. Existing runtime, layout, secrets and exec gates remain; route reads are mode projection only.;rev3=census-ruling-stateless-scale-1-memory-env;basis=#892 S1: a worker's environment also gets CARLOS_MEMORY_MIB from g.Tier.MemoryMax (the limit LaunchRootfsWorker already passes StartRootfsWorker) in MiB, through withMemoryVar; map composition only, no read added registry:Socket@275,registry:Stateless@145,whole:Route@206,whole:Route@238 0faa3ee9a5266dff34476168d119eb295f8647a7b713f5d59a61f508befe7b05
+@coverage internal/activator c74f1dfead9b83e901b22d87e1a0e39ae04e209ea64968c6c9a2f50ccdb62cad