carlos / platform Public

docs: demo disk bound spec, plan and task 1-2 notes (F5)

The approved F5 design (one shared demo disk, rev 4.2), its
implementation plan (rev 3.1, bound (8+G+R) x 32 MiB with the native
case and assumptions), the task 1 root-runner results and the task 2
consumer audit. Docs only: the root-runner witness and the audit
tests stay on branch demo-disk-task1. Reviewed by Astra (spec 4
rounds, plan 3 rounds plus a scoped check).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Squashed from docs-demo-disk-bound into main.
claude agent, operated by paul@keymail.dev e4847933cfd5e9e618b93d189656ba9abece7cdb parent 94bc324
4 files changed, +1,900 −0
  • docs/superpowers/notes/2026-11-29-demo-disk-task1-results.md +373 −0
  • docs/superpowers/notes/2026-11-29-demo-disk-task2-audit.md +133 −0
  • docs/superpowers/plans/2026-11-29-demo-disk-bound.md +526 −0
  • docs/superpowers/specs/2026-11-29-demo-disk-bound-design.md +868 −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-CEDwlC
.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/prometheus/client_golang v1.17.0
go: downloading golang.org/x/sync v0.24.0
go: downloading modernc.org/sqlite v1.55.0
go: downloading golang.org/x/sys v0.49.0
go: downloading github.com/aws/aws-sdk-go-v2/config v1.32.6
go: downloading github.com/aws/aws-sdk-go-v2/service/sns v1.43.0
go: downloading github.com/aws/aws-sdk-go-v2/service/acm v1.45.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ec2 v1.324.0
go: downloading github.com/aws/aws-sdk-go-v2/service/iam v1.58.2
go: downloading github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.37.0
go: downloading github.com/aws/aws-sdk-go-v2/service/route53 v1.64.1
go: downloading golang.org/x/crypto v0.58.0
go: downloading github.com/lmittmann/tint v1.1.3
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading golang.org/x/net v0.62.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ssm v1.74.0
go: downloading github.com/pion/stun/v3 v3.1.5
go: downloading github.com/pion/turn/v4 v4.1.4
go: downloading github.com/prometheus/common v0.45.0
go: downloading google.golang.org/protobuf v1.36.10
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/pion/transport/v4 v4.0.2
go: downloading github.com/pion/dtls/v3 v3.1.4
go: downloading github.com/wlynxg/anet v0.0.5
go: downloading golang.org/x/text v0.43.0
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/s3shared v1.19.31
go: downloading github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.23
go: downloading github.com/pion/randutil v0.1.0
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/klauspost/compress v1.20.2
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 github.com/dustin/go-humanize v1.0.1
go: downloading modernc.org/memory v1.11.0
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/google/uuid v1.6.0
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading github.com/google/uuid v1.6.0
go: downloading modernc.org/memory v1.11.0
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 (169 s, from +0 s)
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
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/memory v1.11.0
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec
=== vet-tags (175 s, from +0 s)
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/klauspost/compress v1.20.2
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/memory v1.11.0
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
=== gofmt (1 s, from +0 s)
gofmt -l .: clean
=== rest (393 s, from +14 s)
ok  	github.com/carlosframework/platform/cmd/carlos-media	125.992s
?   	github.com/carlosframework/platform/cmd/changelog	[no test files]
ok  	github.com/carlosframework/platform/cmd/console	217.081s
ok  	github.com/carlosframework/platform/cmd/mediaimage	38.600s
ok  	github.com/carlosframework/platform/cmd/moveprobe	15.104s
ok  	github.com/carlosframework/platform/cmd/pricebook-export	0.059s
ok  	github.com/carlosframework/platform/cmd/rootfswitness	0.153s
ok  	github.com/carlosframework/platform/cmd/runsc-assets	0.152s
ok  	github.com/carlosframework/platform/cmd/zddprobe	0.937s
ok  	github.com/carlosframework/platform/internal/agentsock	0.080s
ok  	github.com/carlosframework/platform/internal/alerting	0.059s
ok  	github.com/carlosframework/platform/internal/analytics	0.225s
ok  	github.com/carlosframework/platform/internal/appconfig	41.167s
ok  	github.com/carlosframework/platform/internal/apperr	0.252s
ok  	github.com/carlosframework/platform/internal/applog	3.361s
ok  	github.com/carlosframework/platform/internal/apppolicy	2.053s
ok  	github.com/carlosframework/platform/internal/assetcache	0.525s
ok  	github.com/carlosframework/platform/internal/awsinv	0.017s
ok  	github.com/carlosframework/platform/internal/awsmanaged	10.690s
ok  	github.com/carlosframework/platform/internal/awsregiongroup	0.333s
ok  	github.com/carlosframework/platform/internal/awsterminations	0.022s
ok  	github.com/carlosframework/platform/internal/backupswords	0.015s
ok  	github.com/carlosframework/platform/internal/billing	0.062s
ok  	github.com/carlosframework/platform/internal/billing/billingtest	0.078s
ok  	github.com/carlosframework/platform/internal/billingstripe	1.884s
ok  	github.com/carlosframework/platform/internal/boxchoice	0.021s
ok  	github.com/carlosframework/platform/internal/boxid	2.416s
?   	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.016s
ok  	github.com/carlosframework/platform/internal/boxself	0.241s
ok  	github.com/carlosframework/platform/internal/boxvolumes	0.065s
ok  	github.com/carlosframework/platform/internal/caps	3.147s
ok  	github.com/carlosframework/platform/internal/certwarm	0.016s
ok  	github.com/carlosframework/platform/internal/cgroup	1.317s
ok  	github.com/carlosframework/platform/internal/changelog	3.927s
ok  	github.com/carlosframework/platform/internal/clamd	0.078s
?   	github.com/carlosframework/platform/internal/cliflag	[no test files]
ok  	github.com/carlosframework/platform/internal/clireg	0.022s
ok  	github.com/carlosframework/platform/internal/codehealth	13.687s
ok  	github.com/carlosframework/platform/internal/compute	0.050s
ok  	github.com/carlosframework/platform/internal/consolefleet	0.014s
?   	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	9.938s
ok  	github.com/carlosframework/platform/internal/dbdoor/dbdoortest	0.049s
ok  	github.com/carlosframework/platform/internal/dbquery	0.030s
ok  	github.com/carlosframework/platform/internal/dbreads	3.166s
?   	github.com/carlosframework/platform/internal/dbreads/dbreadstest	[no test files]
ok  	github.com/carlosframework/platform/internal/dbverify	0.038s
ok  	github.com/carlosframework/platform/internal/demo	0.029s
ok  	github.com/carlosframework/platform/internal/demobuild	3.898s
ok  	github.com/carlosframework/platform/internal/democlaim	0.347s
ok  	github.com/carlosframework/platform/internal/devbox	13.290s
ok  	github.com/carlosframework/platform/internal/dnsrec	0.017s
ok  	github.com/carlosframework/platform/internal/docsite	0.091s
ok  	github.com/carlosframework/platform/internal/domainreg	0.042s
ok  	github.com/carlosframework/platform/internal/domains	69.918s
ok  	github.com/carlosframework/platform/internal/doorkey	0.029s
ok  	github.com/carlosframework/platform/internal/economics	0.045s
ok  	github.com/carlosframework/platform/internal/edgefence	0.174s
ok  	github.com/carlosframework/platform/internal/edgeguard	0.272s
?   	github.com/carlosframework/platform/internal/edgeproof	[no test files]
ok  	github.com/carlosframework/platform/internal/edgesfile	0.087s
ok  	github.com/carlosframework/platform/internal/egressaddr	0.012s
ok  	github.com/carlosframework/platform/internal/execsandbox	98.551s
ok  	github.com/carlosframework/platform/internal/fileacl	0.010s
ok  	github.com/carlosframework/platform/internal/fleetapi	1.917s
ok  	github.com/carlosframework/platform/internal/fleetstore	0.010s
ok  	github.com/carlosframework/platform/internal/fxrate	0.052s
ok  	github.com/carlosframework/platform/internal/gate	4.378s
ok  	github.com/carlosframework/platform/internal/genselect	0.058s
ok  	github.com/carlosframework/platform/internal/geo	0.035s
ok  	github.com/carlosframework/platform/internal/geoip	0.162s
ok  	github.com/carlosframework/platform/internal/groupadmission	0.009s
ok  	github.com/carlosframework/platform/internal/grouprollaws	16.498s
ok  	github.com/carlosframework/platform/internal/hadeparture	0.018s
ok  	github.com/carlosframework/platform/internal/hafresh	0.010s
ok  	github.com/carlosframework/platform/internal/hairpin	0.179s
ok  	github.com/carlosframework/platform/internal/historyreadback	0.947s
ok  	github.com/carlosframework/platform/internal/hostactors	16.878s
ok  	github.com/carlosframework/platform/internal/hostbox	17.788s
ok  	github.com/carlosframework/platform/internal/hostclaim	1.724s
ok  	github.com/carlosframework/platform/internal/hostenv	0.059s
ok  	github.com/carlosframework/platform/internal/hostevidence	0.038s
ok  	github.com/carlosframework/platform/internal/hostexec	20.698s
ok  	github.com/carlosframework/platform/internal/hostfence	0.145s
ok  	github.com/carlosframework/platform/internal/hostfiles	23.470s
ok  	github.com/carlosframework/platform/internal/hostfloor	0.482s
ok  	github.com/carlosframework/platform/internal/hostguard	1.564s
ok  	github.com/carlosframework/platform/internal/hostops	6.640s
?   	github.com/carlosframework/platform/internal/hostops/fencerelease	[no test files]
ok  	github.com/carlosframework/platform/internal/hostops/internal/fencerelease	0.006s
ok  	github.com/carlosframework/platform/internal/hostquarantine	0.015s
ok  	github.com/carlosframework/platform/internal/hostrelocate	1.623s
ok  	github.com/carlosframework/platform/internal/hostresolve	0.446s
ok  	github.com/carlosframework/platform/internal/hostwrite	0.007s
ok  	github.com/carlosframework/platform/internal/identity	0.007s
ok  	github.com/carlosframework/platform/internal/infraview	0.018s
ok  	github.com/carlosframework/platform/internal/ingresshealth	0.011s
ok  	github.com/carlosframework/platform/internal/ingresshealth/awstg	0.016s
ok  	github.com/carlosframework/platform/internal/instancectl	66.056s
ok  	github.com/carlosframework/platform/internal/instanceexec	8.803s
ok  	github.com/carlosframework/platform/internal/instancefs	14.556s
ok  	github.com/carlosframework/platform/internal/instancekey	0.008s
ok  	github.com/carlosframework/platform/internal/instanceupdates	0.021s
ok  	github.com/carlosframework/platform/internal/interactive	0.606s
ok  	github.com/carlosframework/platform/internal/launchd	0.013s
ok  	github.com/carlosframework/platform/internal/layout	18.224s
ok  	github.com/carlosframework/platform/internal/layout/pubclass	102.646s
ok  	github.com/carlosframework/platform/internal/lbhealth	0.011s
ok  	github.com/carlosframework/platform/internal/lease	146.643s
ok  	github.com/carlosframework/platform/internal/lease/leasetest	1.443s
ok  	github.com/carlosframework/platform/internal/lease/locktest	0.017s
ok  	github.com/carlosframework/platform/internal/ledger	0.078s
ok  	github.com/carlosframework/platform/internal/mail	0.927s
ok  	github.com/carlosframework/platform/internal/mailer	0.835s
ok  	github.com/carlosframework/platform/internal/mailsubmit	1.379s
ok  	github.com/carlosframework/platform/internal/mailwire	0.016s
ok  	github.com/carlosframework/platform/internal/maintenance	0.228s
ok  	github.com/carlosframework/platform/internal/maintenanceexec	9.430s
ok  	github.com/carlosframework/platform/internal/maintenanceguard	0.244s
ok  	github.com/carlosframework/platform/internal/managedboot	3.226s
?   	github.com/carlosframework/platform/internal/managedboot/boottest	[no test files]
?   	github.com/carlosframework/platform/internal/managedboot/roottest	[no test files]
ok  	github.com/carlosframework/platform/internal/media	1.797s
ok  	github.com/carlosframework/platform/internal/media/mediatest	0.007s
ok  	github.com/carlosframework/platform/internal/mediaaws	58.525s
ok  	github.com/carlosframework/platform/internal/mediahandler	38.303s
ok  	github.com/carlosframework/platform/internal/mediajobs	0.881s
ok  	github.com/carlosframework/platform/internal/medialocal	9.584s
ok  	github.com/carlosframework/platform/internal/metrics	0.176s
ok  	github.com/carlosframework/platform/internal/minorunits	0.024s
ok  	github.com/carlosframework/platform/internal/moves	50.264s
ok  	github.com/carlosframework/platform/internal/moves/archive	2.241s
ok  	github.com/carlosframework/platform/internal/moves/offlinerun	0.100s
ok  	github.com/carlosframework/platform/internal/namedunits	0.018s
ok  	github.com/carlosframework/platform/internal/objstore	1.635s
ok  	github.com/carlosframework/platform/internal/ops	13.630s
ok  	github.com/carlosframework/platform/internal/pageindex	3.876s
ok  	github.com/carlosframework/platform/internal/parity	0.130s
?   	github.com/carlosframework/platform/internal/parity/cmd/parity-doc	[no test files]
ok  	github.com/carlosframework/platform/internal/park	0.609s
ok  	github.com/carlosframework/platform/internal/perf	0.168s
ok  	github.com/carlosframework/platform/internal/plans	0.100s
ok  	github.com/carlosframework/platform/internal/privatefile	0.012s
ok  	github.com/carlosframework/platform/internal/provision	238.726s
ok  	github.com/carlosframework/platform/internal/proxyproto	0.946s
ok  	github.com/carlosframework/platform/internal/publicrelease	0.062s
ok  	github.com/carlosframework/platform/internal/ratelimit	0.239s
ok  	github.com/carlosframework/platform/internal/regionlabel	0.073s
ok  	github.com/carlosframework/platform/internal/regionname	0.070s
ok  	github.com/carlosframework/platform/internal/registrar	0.004s
ok  	github.com/carlosframework/platform/internal/registrar/openprovider	0.592s
?   	github.com/carlosframework/platform/internal/registrar/registrartest	[no test files]
ok  	github.com/carlosframework/platform/internal/registry	79.513s
ok  	github.com/carlosframework/platform/internal/relay	7.456s
ok  	github.com/carlosframework/platform/internal/release	131.399s
?   	github.com/carlosframework/platform/internal/release/requestwitness	[no test files]
ok  	github.com/carlosframework/platform/internal/replicagen	0.044s
ok  	github.com/carlosframework/platform/internal/replicas	0.055s
ok  	github.com/carlosframework/platform/internal/reqrec	8.008s
ok  	github.com/carlosframework/platform/internal/rollout	10.741s
ok  	github.com/carlosframework/platform/internal/rolloutwords	0.078s
ok  	github.com/carlosframework/platform/internal/rootaws	100.509s
ok  	github.com/carlosframework/platform/internal/rootfsimage	0.997s
ok  	github.com/carlosframework/platform/internal/rootparticipation	0.089s
ok  	github.com/carlosframework/platform/internal/rootstate	0.050s
ok  	github.com/carlosframework/platform/internal/runs	0.973s
ok  	github.com/carlosframework/platform/internal/s3compat	0.019s
ok  	github.com/carlosframework/platform/internal/s3fake	0.900s
ok  	github.com/carlosframework/platform/internal/s3meter	0.348s
ok  	github.com/carlosframework/platform/internal/safefile	0.020s
ok  	github.com/carlosframework/platform/internal/schedule	23.041s
ok  	github.com/carlosframework/platform/internal/seeds	0.046s
ok  	github.com/carlosframework/platform/internal/share	0.019s
ok  	github.com/carlosframework/platform/internal/sim/litestreamfacts	5.179s
ok  	github.com/carlosframework/platform/internal/sim/mediajobs	49.872s
ok  	github.com/carlosframework/platform/internal/sim/regionha	22.542s
ok  	github.com/carlosframework/platform/internal/status	0.334s
ok  	github.com/carlosframework/platform/internal/steering	0.222s
ok  	github.com/carlosframework/platform/internal/stopevidence	0.390s
ok  	github.com/carlosframework/platform/internal/storecfg	0.341s
ok  	github.com/carlosframework/platform/internal/svcrole	0.014s
ok  	github.com/carlosframework/platform/internal/systemd	5.715s
?   	github.com/carlosframework/platform/internal/systemdshow	[no test files]
ok  	github.com/carlosframework/platform/internal/team	3.124s
ok  	github.com/carlosframework/platform/internal/teamcontract	0.169s
ok  	github.com/carlosframework/platform/internal/telemetry	0.027s
ok  	github.com/carlosframework/platform/internal/termfence	3.492s
ok  	github.com/carlosframework/platform/internal/timerspec	0.009s
ok  	github.com/carlosframework/platform/internal/tsidentity	4.157s
ok  	github.com/carlosframework/platform/internal/tunnelclient	0.360s
ok  	github.com/carlosframework/platform/internal/unixdial	0.015s
ok  	github.com/carlosframework/platform/internal/updatewords	0.031s
ok  	github.com/carlosframework/platform/internal/upstreamguard	0.018s
?   	github.com/carlosframework/platform/internal/upstreamguard/guardtest	[no test files]
ok  	github.com/carlosframework/platform/internal/usage	0.147s
ok  	github.com/carlosframework/platform/internal/version	0.007s
ok  	github.com/carlosframework/platform/internal/vet	2.925s
ok  	github.com/carlosframework/platform/internal/zonehost	0.019s
ok  	github.com/carlosframework/platform/internal/zonehost/route53zones	0.062s
?   	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.026s
ok  	github.com/carlosframework/platform/scripts/pathmapcheck	0.100s
ok  	github.com/carlosframework/platform/scripts/region-ha-g2/fixture	5.305s
ok  	github.com/carlosframework/platform/scripts/stateless-replicas-drill	1.196s
ok  	github.com/carlosframework/platform/scripts/witness-pointer	0.026s
=== cutover-witness (156 s, from +14 s)
ok  	github.com/carlosframework/platform	1.902s
=== internal_grouproll@0 (278 s, from +74 s)
ok  	github.com/carlosframework/platform/internal/grouproll	276.425s
=== internal_grouproll@1 (286 s, from +74 s)
ok  	github.com/carlosframework/platform/internal/grouproll	284.336s
=== internal_activator@0 (149 s, from +149 s)
ok  	github.com/carlosframework/platform/internal/activator	144.064s
=== internal_activator@1 (134 s, from +149 s)
ok  	github.com/carlosframework/platform/internal/activator	128.680s
=== internal_activator@2 (140 s, from +149 s)
ok  	github.com/carlosframework/platform/internal/activator	134.084s
=== internal_activator@3 (170 s, from +149 s)
ok  	github.com/carlosframework/platform/internal/activator	164.058s
=== root@0 (141 s, from +170 s)
ok  	github.com/carlosframework/platform	131.584s
=== root@1 (114 s, from +170 s)
ok  	github.com/carlosframework/platform	102.705s
=== root@2 (129 s, from +170 s)
ok  	github.com/carlosframework/platform	119.794s
=== root@3 (121 s, from +170 s)
ok  	github.com/carlosframework/platform	112.790s
=== root@4 (116 s, from +170 s)
ok  	github.com/carlosframework/platform	107.071s
=== internal_edge@0 (203 s, from +176 s)
ok  	github.com/carlosframework/platform/internal/edge	193.870s
=== internal_edge@1 (147 s, from +176 s)
ok  	github.com/carlosframework/platform/internal/edge	139.167s
=== internal_edge@2 (154 s, from +176 s)
ok  	github.com/carlosframework/platform/internal/edge	146.066s
=== internal_edge@3 (222 s, from +176 s)
ok  	github.com/carlosframework/platform/internal/edge	215.147s
=== internal_host@0 (194 s, from +223 s)
ok  	github.com/carlosframework/platform/internal/host	189.194s
=== internal_host@1 (271 s, from +223 s)
ok  	github.com/carlosframework/platform/internal/host	266.027s
=== internal_host@2 (193 s, from +223 s)
ok  	github.com/carlosframework/platform/internal/host	187.905s
=== internal_host@3 (166 s, from +223 s)
ok  	github.com/carlosframework/platform/internal/host	161.264s
=== internal_host@4 (218 s, from +223 s)
ok  	github.com/carlosframework/platform/internal/host	213.022s
=== internal_host@5 (155 s, from +223 s)
ok  	github.com/carlosframework/platform/internal/host	150.062s
=== internal_console@0 (180 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	172.818s
=== internal_console@1 (228 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	221.720s
=== internal_console@2 (210 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	201.992s
=== internal_console@3 (262 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	255.961s
=== internal_console@4 (223 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	215.305s
=== internal_console@5 (236 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	227.893s
=== internal_console@6 (225 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	218.589s
=== internal_console@7 (244 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	236.639s
=== internal_console@8 (256 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	247.722s
=== internal_console@9 (237 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	230.253s
=== internal_console@10 (233 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	225.132s
=== internal_console@11 (257 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	250.157s
=== internal_console@12 (351 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	343.392s
=== internal_console@13 (240 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	232.469s
=== internal_console@14 (230 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	223.601s
=== internal_console@15 (260 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	252.822s
=== internal_console@16 (228 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	220.914s
=== internal_console@17 (264 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	257.097s
=== internal_console@18 (222 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	213.712s
=== internal_console@19 (258 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	251.585s
=== internal_console@20 (217 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	210.104s
=== internal_console@21 (249 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	242.238s
=== internal_console@22 (237 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	229.939s
=== internal_console@23 (242 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	234.127s
=== lists: internal_console 227 s, internal_edge 175 s, internal_activator 148 s, internal_host 222 s, root 168 s, internal_grouproll 74 s
=== cpu: the gate used 13260 cpu-seconds in 579 s, about 22.9 of 32 cores; the machine as a whole was 76% busy
=== opentofu ===
opentofu: 40 test files in 11 suites, OpenTofu v1.13.9
  initialised in 14 s
  ok      21 s  infra/modules/box-fence-writer/tests/writer.tftest.hcl  Success! 1 passed, 0 failed.
  ok      24 s  infra/modules/deployment-buckets/tests/console_floors.tftest.hcl  Success! 1 passed, 0 failed.
  ok      34 s  infra/modules/deployment-buckets/tests/data_lifecycle.tftest.hcl  Success! 3 passed, 0 failed.
  ok      25 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      33 s  infra/modules/deployment-buckets/tests/fence_writers.tftest.hcl  Success! 3 passed, 0 failed.
  ok      27 s  infra/modules/deployment-buckets/tests/media_results.tftest.hcl  Success! 2 passed, 0 failed.
  ok      30 s  infra/modules/deployment-buckets/tests/published_floors.tftest.hcl  Success! 3 passed, 0 failed.
  ok      82 s  infra/modules/media-engine/tests/media_engine.tftest.hcl  Success! 24 passed, 0 failed.
  ok      23 s  infra/modules/pdf-host/tests/computed.tftest.hcl  Success! 2 passed, 0 failed.
  ok      55 s  infra/modules/pdf-host/tests/pdf_host.tftest.hcl  Success! 24 passed, 0 failed.
  ok      38 s  infra/modules/region-group-operator-document/tests/document.tftest.hcl  Success! 12 passed, 0 failed.
  ok      16 s  infra/modules/region-host/ingress/tests/fixed-targets/tests/targets.tftest.hcl  Success! 2 passed, 0 failed.
  ok      72 s  infra/modules/region-host/ingress/tests/group_ingress.tftest.hcl  Success! 30 passed, 0 failed.
  ok      42 s  infra/modules/region-host/tests/alert_publish.tftest.hcl  Success! 18 passed, 0 failed.
  ok      40 s  infra/modules/region-host/tests/alerts_topic.tftest.hcl  Success! 16 passed, 0 failed.
  ok      12 s  infra/modules/region-host/tests/analytics_prune.tftest.hcl  Success! 2 passed, 0 failed.
  ok      14 s  infra/modules/region-host/tests/console_mail.tftest.hcl  Success! 4 passed, 0 failed.
  ok       6 s  infra/modules/region-host/tests/fixed_state_unchanged.tftest.hcl  Success! 1 passed, 0 failed.
  ok      73 s  infra/modules/region-host/tests/group.tftest.hcl  Success! 32 passed, 0 failed.
  ok      12 s  infra/modules/region-host/tests/group_alarms.tftest.hcl  Success! 4 passed, 0 failed.
  ok      12 s  infra/modules/region-host/tests/group_iam.tftest.hcl  Success! 4 passed, 0 failed.
  ok       5 s  infra/modules/region-host/tests/group_isolation.tftest.hcl  Success! 1 passed, 0 failed.
  ok      36 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      32 s  infra/modules/region-host/tests/health_alarms.tftest.hcl  Success! 10 passed, 0 failed.
  ok      19 s  infra/modules/region-host/tests/ingress_drain_read.tftest.hcl  Success! 4 passed, 0 failed.
  ok       9 s  infra/modules/region-host/tests/instance_metadata.tftest.hcl  Success! 1 passed, 0 failed.
  ok      25 s  infra/modules/region-host/tests/mailer.tftest.hcl  Success! 6 passed, 0 failed.
  ok      14 s  infra/modules/region-host/tests/mailer_group.tftest.hcl  Success! 2 passed, 0 failed.
  ok      12 s  infra/modules/region-host/tests/managed_fleets/group_refusal.tftest.hcl  Success! 2 passed, 0 failed.
  ok      98 s  infra/modules/region-host/tests/managed_fleets/managed_fleets.tftest.hcl  Success! 46 passed, 0 failed.
  ok      65 s  infra/modules/region-host/tests/store_conversion.tftest.hcl  Success! 27 passed, 0 failed.
  ok      16 s  infra/modules/region-host/tests/store_scanning.tftest.hcl  Success! 4 passed, 0 failed.
  ok      28 s  infra/modules/region-host/tests/store_versioning.tftest.hcl  Success! 11 passed, 0 failed.
  ok      15 s  infra/modules/region-host/tests/store_write_credentials.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      12 s  infra/modules/region-remote-host/tests/data_lifecycle.tftest.hcl  Success! 3 passed, 0 failed.
  ok      14 s  infra/modules/region-remote-host/tests/no_deployment_bucket.tftest.hcl  Success! 5 passed, 0 failed.
  ok      27 s  infra/modules/scanner-host/tests/scanner_host.tftest.hcl  Success! 14 passed, 0 failed.
opentofu: 40 files in 214 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: 66912418 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:39531
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.02s)
        --- 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.040s
=== RUN   TestT4StorageProbeMinio
2026/12/01 02:00:27 moves: T4: STORE: list: operation error S3: ListObjectsV2, https response error StatusCode: 403, RequestID: 18ECFEBA49926773, HostID: 8713e26522073f5c2c4dad2e373e5f9a1e44e746283b37e24aca5c0d95c16621, 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.046s
=== RUN   TestS3StoreMinioContract
=== RUN   TestS3StoreMinioContract/conditional_get_and_etag_listing
=== RUN   TestS3StoreMinioContract/bump_through_every_mutation_path
--- PASS: TestS3StoreMinioContract (0.04s)
    --- 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.046s
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.04s)
PASS
ok  	github.com/carlosframework/platform/internal/release	0.043s
Bucket created successfully `local/store-versioned`.
local/store-versioned versioning is enabled
Created policy `store-versioned` successfully.
Added user `storeversioned` successfully.
Attached Policies: [store-versioned]
To User: storeversioned
=== RUN   TestVersionedContractMinio
--- PASS: TestVersionedContractMinio (0.01s)
PASS
ok  	github.com/carlosframework/platform/internal/objstore	0.021s
Bucket created successfully `local/wc-bucket`.
Created policy `writer` successfully.
Added user `wcwriter` successfully.
Attached Policies: [writer]
To User: wcwriter
=== RUN   TestWriteCredentialContractMinio
=== RUN   TestWriteCredentialContractMinio/put_under_the_prefix
=== RUN   TestWriteCredentialContractMinio/multipart_under_the_prefix
=== RUN   TestWriteCredentialContractMinio/refused:_put_with_a_platform_tag
=== RUN   TestWriteCredentialContractMinio/refused:_bucket_settings
=== RUN   TestWriteCredentialContractMinio/refused:_head
=== RUN   TestWriteCredentialContractMinio/refused:_list
=== RUN   TestWriteCredentialContractMinio/refused:_delete
=== RUN   TestWriteCredentialContractMinio/refused:_put_tagged
=== RUN   TestWriteCredentialContractMinio/refused:_put_outside_the_prefix
=== RUN   TestWriteCredentialContractMinio/refused:_put_beside_the_prefix
=== RUN   TestWriteCredentialContractMinio/refused:_put_to_another_bucket
=== RUN   TestWriteCredentialContractMinio/refused:_copy_from_the_store
=== RUN   TestWriteCredentialContractMinio/refused:_read_under_the_prefix
=== RUN   TestWriteCredentialContractMinio/refused:_read_elsewhere
=== RUN   TestWriteCredentialContractMinio/refused:_list_uploads
=== RUN   TestWriteCredentialContractMinio/refused:_tag
--- PASS: TestWriteCredentialContractMinio (0.04s)
    --- PASS: TestWriteCredentialContractMinio/put_under_the_prefix (0.00s)
    --- PASS: TestWriteCredentialContractMinio/multipart_under_the_prefix (0.01s)
    --- PASS: TestWriteCredentialContractMinio/refused:_put_with_a_platform_tag (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_bucket_settings (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_head (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_list (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_delete (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_put_tagged (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_put_outside_the_prefix (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_put_beside_the_prefix (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_put_to_another_bucket (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_copy_from_the_store (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_read_under_the_prefix (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_read_elsewhere (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_list_uploads (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_tag (0.00s)
PASS
ok  	github.com/carlosframework/platform/internal/objstore	0.050s
=== RUN   TestEndToEndMinio
=== RUN   TestEndToEndMinio/plan
=== RUN   TestEndToEndMinio/roll
=== RUN   TestEndToEndMinio/replace
=== RUN   TestEndToEndMinio/remove
--- PASS: TestEndToEndMinio (0.49s)
    --- PASS: TestEndToEndMinio/plan (0.01s)
    --- PASS: TestEndToEndMinio/roll (0.13s)
    --- PASS: TestEndToEndMinio/replace (0.16s)
    --- PASS: TestEndToEndMinio/remove (0.16s)
PASS
ok  	github.com/carlosframework/platform/internal/grouproll	0.502s
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/12/01 02:00:36 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/12/01 02:00:36 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/12/01 02:00:36 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/12/01 02:00:36 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/12/01 02:00:36 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/12/01 02:00:36 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/12/01 02:00:36 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000003
2026/12/01 02:00:36 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000003 maxTXID=0000000000000003 size=454
2026/12/01 02:00:36 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000003
2026/12/01 02:00:36 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/12/01 02:00:36 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/12/01 02:00:36 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/12/01 02:00:36 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/12/01 02:00:36 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%3A46329: could not determine target mailbox
    agent.go:136: dbreads: dbr_pw7vimho4liy2qxc7p6bssjfei: planned 3 files (1544 bytes) and restored to 3 in 15ms
    agent.go:136: dbreads: dbr_pw7vimho4liy2qxc7p6bssjfei: output 5 bytes in 1 confirmed chunks in 2ms
2026/12/01 02:00:37 console: db read dbr_pw7vimho4liy2qxc7p6bssjfei: relayed 1 chunks (102 bytes) in 1.006s, ended done
    agent.go:136: dbreads: dbr_7orx7gyqhb6dwbgooozb6p3mvu: planned 1 files (720 bytes) and restored to 1 in 12ms
    agent.go:136: dbreads: dbr_7orx7gyqhb6dwbgooozb6p3mvu: output 5 bytes in 1 confirmed chunks in 2ms
2026/12/01 02:00:38 console: db read dbr_7orx7gyqhb6dwbgooozb6p3mvu: relayed 1 chunks (102 bytes) in 1.005s, ended done
    agent.go:136: dbreads: dbr_ty3fufrtblxndqwytgoyydcfcq: planned 3 files (1544 bytes) and held through 3 in 13ms
    agent.go:136: dbreads: dbr_ty3fufrtblxndqwytgoyydcfcq: output 1544 bytes in 1 confirmed chunks in 1ms
2026/12/01 02:00:39 console: db read dbr_ty3fufrtblxndqwytgoyydcfcq: relayed 1 chunks (1641 bytes) in 1.005s, ended done
=== RUN   TestDBForwardMinio/by_disconnect
=== NAME  TestDBForwardMinio
    agent.go:136: dbreads: dbr_bqtvlnms557g7mtmb7n2uxbqdu: planned 3 files (1544 bytes) and restored to 3 in 13ms
2026/12/01 02:00:39 console: db read dbr_bqtvlnms557g7mtmb7n2uxbqdu: relayed 0 chunks (0 bytes) in 19ms, ended client gone
    agent.go:136: dbreads: dbr_bqtvlnms557g7mtmb7n2uxbqdu: output 5 bytes in 1 confirmed chunks in 105ms
=== RUN   TestDBForwardMinio/by_timeout
=== NAME  TestDBForwardMinio
    agent.go:136: dbreads: dbr_qbykgsxpsrwktdpfmrwpyvxtxu: planned 3 files (1544 bytes) and restored to 3 in 14ms
2026/12/01 02:01:00 console: db read dbr_qbykgsxpsrwktdpfmrwpyvxtxu: relayed 0 chunks (0 bytes) in 19.986s, ended no-result
    agent.go:136: dbreads: dbr_qbykgsxpsrwktdpfmrwpyvxtxu: output 5 bytes in 1 confirmed chunks in 19.959s
--- PASS: TestDBForwardMinio (23.68s)
    --- PASS: TestDBForwardMinio/by_disconnect (0.23s)
    --- PASS: TestDBForwardMinio/by_timeout (20.10s)
PASS
ok  	github.com/carlosframework/platform/internal/console	23.727s
Bucket created successfully `local/media-transfers`.
Bucket created successfully `local/media-transfer-results`.
local/media-transfer-results versioning is enabled
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.08s)
PASS
ok  	github.com/carlosframework/platform/internal/mediaaws	0.084s
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.58s)
PASS
ok  	github.com/carlosframework/platform/internal/medialocal	0.590s
=== RUN   TestHeldHandoverTwoBoxMinio
2026/12/01 02:01:05 edge: mesh key: minted
2026/12/01 02:01:05 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/12/01 02:01:05 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/12/01 02:01:05 tenant admission is open. accepting tenant work
2026/12/01 02:01:05 activator: HA placement host=shop-561b2751.example.test kind=Place ref=annie reason=roomiest generation=2026-12-01T02:01:05Z lock_generation=0
2026/12/01 02:01:05 lease: t8-561b2751/shop-561b2751.example.test: HA lease acquired in 4ms (first wake)
2026/12/01 02:01:05 activator: shop-561b2751.example.test: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/12/01 02:01:05 activator: shop-561b2751.example.test: started carlos-instance@shop\x2d561b2751.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) 7ms, launch file 0s, gate 0s, root start 1ms)
2026/12/01 02:01:05 activator: shop-561b2751.example.test: carlos-instance@shop\x2d561b2751.example.test.service launched in 8ms, healthy 0s later
2026/12/01 02:01:05 activator: shop-561b2751.example.test: woke in 22ms: checks 0s, lease 5ms, restore 0s, identity 0s, protect 0s, spawn 8ms, replicate 9ms
2026/12/01 02:01:05 lease: t8-561b2751/plain-561b2751.example.test: acquired in 2ms (client 0s, lock read and write 2ms)
2026/12/01 02:01:05 activator: no replica for plain-561b2751.example.test in s3://contract-bucket/t8-561b2751/plain-561b2751.example.test — booting fresh
2026/12/01 02:01:05 activator: plain-561b2751.example.test: started carlos-instance@plain\x2d561b2751.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 2ms, instance key 0s, env 5ms, control socket 0s, key gate 0s, logs 0s) 7ms, launch file 0s, gate 0s, root start 1ms)
2026/12/01 02:01:05 activator: plain-561b2751.example.test: carlos-instance@plain\x2d561b2751.example.test.service launched in 9ms, healthy 0s later
2026/12/01 02:01:05 activator: plain-561b2751.example.test: woke in 99ms: checks 0s, lease 2ms, restore 18ms, identity 0s, protect 0s, spawn 9ms, replicate 69ms
2026/12/01 02:01:05 lease: t8-561b2751/bot0.shop.bac.sidecar.internal: HA lease acquired in 4ms (first wake)
2026/12/01 02:01:05 activator: bot0.shop.bac.sidecar.internal: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/12/01 02:01:05 activator: bot0.shop.bac.sidecar.internal: woke in 21ms: checks 0s, lease 5ms, restore 0s, identity 0s, protect 0s, spawn 7ms, settle 0s, replicate 8ms
2026/12/01 02:01:05 activator: next-due probe plain-561b2751.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/12/01 02:01:05 activator: plain-561b2751.example.test hibernated
2026/12/01 02:01:05 activator: next-due probe shop-561b2751.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/12/01 02:01:05 activator: bot0.shop.bac.sidecar.internal: released with a marker (clean true, txid 1, files 3:8dbcc2d8144413ce7e24666ab05072bc6b4d73c2f128fb5cf32d33223341f044) in 8ms: files 1ms, sync 4ms, record 1ms, marker 2ms
2026/12/01 02:01:05 activator: bot0.shop.bac.sidecar.internal hibernated
2026/12/01 02:01:05 activator: shop-561b2751.example.test: released with a marker (clean true, txid 1, files 3:eefe7dbaea017a1d5a8795c70370bb1f071cda6f2cc1c7b1d0e67befe215d39a) in 6ms: files 1ms, sync 3ms, record 1ms, marker 2ms
2026/12/01 02:01:05 activator: shop-561b2751.example.test hibernated
2026/12/01 02:01:05 lease: t8-561b2751/shop-561b2751.example.test: HA lease acquired in 3ms (clean marker)
2026/12/01 02:01:05 activator: shop-561b2751.example.test: restored (other-box)
2026/12/01 02:01:05 activator: shop-561b2751.example.test: started carlos-instance@shop\x2d561b2751.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 1ms, control socket 0s, key gate 0s, logs 0s) 1ms, launch file 0s, gate 0s, root start 1ms)
2026/12/01 02:01:05 activator: shop-561b2751.example.test: carlos-instance@shop\x2d561b2751.example.test.service launched in 2ms, healthy 0s later
2026/12/01 02:01:05 activator: shop-561b2751.example.test: woke in 89ms: checks 0s, lease 4ms, restore 25ms, identity 0s, protect 0s, spawn 2ms, replicate 57ms
2026/12/01 02:01:05 edge: ha-take shop-561b2751.example.test from annie (txn t8-witness, marker generation 1): holder betty, generation 2
2026/12/01 02:01:05 edge: forward shop-561b2751.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:e596ae91206df8de7b6cbc582caa3eba Step:move Result:ok Reasons:[] Fence:t8-witness StartedAt:2026-12-01 02:01:05.783492052 +0000 UTC FinishedAt:2026-12-01 02:01:05.931701668 +0000 UTC Acked:[betty carol] Departed:[] Moved:[{Host:shop-561b2751.example.test Holder:betty Gen:2 Confirmed:take}] Released:[{Host:plain-561b2751.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-561b2751.example.test <nil> stop plain-561b2751.example.test marker=true clean=true <nil> releasing shop-561b2751.example.test <nil> stop bot0.shop.bac.sidecar.internal marker=true clean=true <nil> stop shop-561b2751.example.test marker=true clean=true <nil> taken shop-561b2751.example.test betty <nil> end-moves]
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-561b2751/bot0.shop.bac.sidecar.internal/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/bot0.shop.bac.sidecar.internal/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/bot0.shop.bac.sidecar.internal/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/bot0.shop.bac.sidecar.internal/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/bot0.shop.bac.sidecar.internal/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/bot0.shop.bac.sidecar.internal/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/bot0.shop.bac.sidecar.internal/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-561b2751/shop-561b2751.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: DELETE /contract-bucket/t8-561b2751/plain-561b2751.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-561b2751/bot0.shop.bac.sidecar.internal/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-561b2751/bot0.shop.bac.sidecar.internal/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-561b2751/shop-561b2751.example.test/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-561b2751/shop-561b2751.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-561b2751/shop-561b2751.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-561b2751/shop-561b2751.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-561b2751/shop-561b2751.example.test/head.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/shop-561b2751.example.test/generations/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/shop-561b2751.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/shop-561b2751.example.test/0008/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/shop-561b2751.example.test/0007/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/shop-561b2751.example.test/0006/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/shop-561b2751.example.test/0005/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/shop-561b2751.example.test/0004/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/shop-561b2751.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/shop-561b2751.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/shop-561b2751.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/shop-561b2751.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/shop-561b2751.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/shop-561b2751.example.test/0008/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/shop-561b2751.example.test/0007/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/shop-561b2751.example.test/0006/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/shop-561b2751.example.test/0005/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/shop-561b2751.example.test/0004/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/shop-561b2751.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/shop-561b2751.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/shop-561b2751.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/shop-561b2751.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-561b2751/shop-561b2751.example.test/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-561b2751/shop-561b2751.example.test/files/0/manifest.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-561b2751/shop-561b2751.example.test/files/0/objects/0000000000000001-08b5e31610d19b644bcc555786c8f02baf9777b4fd628d265b04fc887b0500cb
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-561b2751/shop-561b2751.example.test/files/0/objects/0000000000000003-156f55c737255a23e34d2c9ebd1108621e384e9f9d115d7cef9636c325d442a4
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/shop-561b2751.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/shop-561b2751.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/shop-561b2751.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-561b2751/shop-561b2751.example.test/0000/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/shop-561b2751.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/shop-561b2751.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-561b2751/shop-561b2751.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-561b2751/shop-561b2751.example.test/0000/0000000000000002-0000000000000002.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-561b2751/shop-561b2751.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1243: drain took 186ms; S3 calls 50 (DELETE lock=1 GET files=3 GET head=1 GET lock=3 GET replica=2 LIST replica=33 PUT lock=3 PUT replica=4); 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/12/01 02:01:05 lease: t8-561b2751/plain-561b2751.example.test: acquired in 2ms (client 0s, lock read and write 2ms)
2026/12/01 02:01:05 activator: plain-561b2751.example.test: started carlos-instance@plain\x2d561b2751.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/12/01 02:01:05 activator: plain-561b2751.example.test: carlos-instance@plain\x2d561b2751.example.test.service launched in 1ms, healthy 0s later
2026/12/01 02:01:05 lease: /tmp/carlos-minio-contract-QKl5dy/g/dw3691983817/data/instances/plain-561b2751.example.test/plain-561b2751.example.test.db: continuity with the last clean close not proven; snapshot 1-0000000000000001 written before serving
2026/12/01 02:01:05 activator: plain-561b2751.example.test: woke in 10ms: checks 0s, lease 2ms, restore 0s, identity 0s, protect 1ms, spawn 2ms, replicate 6ms
2026/12/01 02:01:05 activator: next-due probe shop-561b2751.example.test: decode /api/next-due: invalid character 'b' looking for beginning of value — recording none (it sleeps until a request)
2026/12/01 02:01:05 activator: shop-561b2751.example.test: released with a marker (clean true, txid 2, files 3:eefe7dbaea017a1d5a8795c70370bb1f071cda6f2cc1c7b1d0e67befe215d39a) in 4ms: files 1ms, sync 0s, record 1ms, marker 2ms
2026/12/01 02:01:05 activator: shop-561b2751.example.test hibernated
2026/12/01 02:01:05 tenant admission is closed for shutdown
2026/12/01 02:01:05 activator: next-due probe plain-561b2751.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/12/01 02:01:05 activator: plain-561b2751.example.test hibernated
--- PASS: TestHeldHandoverTwoBoxMinio (0.58s)
=== RUN   TestHeldHandoverLostLeaseMinio
2026/12/01 02:01:05 edge: mesh key: minted
2026/12/01 02:01:06 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/12/01 02:01:06 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/12/01 02:01:06 tenant admission is open. accepting tenant work
2026/12/01 02:01:06 activator: HA placement host=shop-2836bd32.example.test kind=Place ref=annie reason=roomiest generation=2026-12-01T02:01:06Z lock_generation=0
2026/12/01 02:01:06 lease: t8-2836bd32/shop-2836bd32.example.test: HA lease acquired in 3ms (first wake)
2026/12/01 02:01:06 activator: shop-2836bd32.example.test: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/12/01 02:01:06 activator: shop-2836bd32.example.test: started carlos-instance@shop\x2d2836bd32.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/12/01 02:01:06 activator: shop-2836bd32.example.test: carlos-instance@shop\x2d2836bd32.example.test.service launched in 7ms, healthy 0s later
2026/12/01 02:01:06 activator: shop-2836bd32.example.test: woke in 66ms: checks 0s, lease 5ms, restore 0s, identity 0s, protect 0s, spawn 8ms, replicate 53ms
2026/12/01 02:01:06 activator: next-due probe shop-2836bd32.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/12/01 02:01:06 activator: final checkpoint shop-2836bd32.example.test: lease: release marker owed for s3://contract-bucket/t8-2836bd32/shop-2836bd32.example.test/lock.json (If-Match "ea7e66e2138547c86c36fe960f07ed5a"): lease: write release marker: operation error S3: PutObject, https response error StatusCode: 503, RequestID: , HostID: , api error ServiceUnavailable: witness: refused
2026/12/01 02:01:06 activator: shop-2836bd32.example.test hibernated
2026/12/01 02:01:06 activator: handover of shop-2836bd32.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-2836bd32.example.test client 4 "
    hadrain_twobox_minio_linux_test.go:1486: driver calls: [begin shop-2836bd32.example.test <nil> releasing shop-2836bd32.example.test <nil> stop shop-2836bd32.example.test marker=false clean=false <nil> left shop-2836bd32.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/12/01 02:01:06 tenant admission is closed for shutdown
2026/12/01 02:01:06 http: proxy error: context canceled
--- PASS: TestHeldHandoverLostLeaseMinio (0.32s)
PASS
ok  	github.com/carlosframework/platform/internal/host	0.947s
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/12/01 02:01:07 lease: instances/gen-1796090467588943109.shop.example.com: HA lease acquired in 5ms (first wake)
2026/12/01 02:01:07 lease: instances/gen-1796090467588943109.shop.example.com: HA lease acquired in 4ms (holder terminated)
    gentake_minio_test.go:308: a second create-only copy onto instances/gen-1796090467588943109.shop.example.com/g-00000000000000000002/0000/0000000000000001-0000000000000001.ltx: <nil> (destination condition honoured: false)
2026/12/01 02:01:07 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/12/01 02:01:07 http: proxy error: context canceled
2026/12/01 02:01:07 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/12/01 02:01:07 http: proxy error: context canceled
=== RUN   TestGenerationTakeMinio/switch-412
2026/12/01 02:01:07 lease: instances/gen-1796090467731438220.shop.example.com: HA lease acquired in 4ms (first wake)
2026/12/01 02:01:07 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/12/01 02:01:07 lease: instances/gen-1796090467731438220.shop.example.com: HA lease acquired in 3ms (clean marker)
=== RUN   TestGenerationTakeMinio/copy-version
=== RUN   TestGenerationTakeMinio/store-time
2026/12/01 02:01:07 lease: instances/gen-1796090467783234255.shop.example.com: HA lease acquired in 3ms (first wake)
2026/12/01 02:01:07 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/12/01 02:01:07 lease: instances/gen-1796090467783234255.shop.example.com: HA lease acquired in 3ms (clean marker)
2026/12/01 02:01:07 lease: instances/gen-1796090467783234255.shop.example.com: HA lease acquired in 2ms (unclean marker)
2026/12/01 02:01:07 lease: instances/gen-1796090467783234255.shop.example.com: HA lease acquired in 3ms (unclean marker)
2026/12/01 02:01:07 lease: instances/gen-1796090467783234255.shop.example.com: HA lease acquired in 3ms (unclean marker)
2026/12/01 02:01:07 lease: instances/gen-1796090467783234255.shop.example.com: HA lease acquired in 3ms (unclean marker)
=== RUN   TestGenerationTakeMinio/skew
--- PASS: TestGenerationTakeMinio (0.32s)
    --- PASS: TestGenerationTakeMinio/take (0.14s)
    --- PASS: TestGenerationTakeMinio/switch-412 (0.04s)
    --- PASS: TestGenerationTakeMinio/copy-version (0.01s)
    --- PASS: TestGenerationTakeMinio/store-time (0.11s)
    --- PASS: TestGenerationTakeMinio/skew (0.01s)
PASS
ok  	github.com/carlosframework/platform/internal/lease	0.326s
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/sync v0.23.0
go: downloading golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa
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, carlos-vulnscan
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 1m58s
    codehealth_test.go:107: line metrics (code lines, then physical):
          file-lines  5471  7324  internal/activator activator_test.go
          file-lines  4160  6981  internal/console server.go
          file-lines  4120  6283  . apimode.go
          file-lines  3785  7224  internal/activator activator.go
          file-lines  3530  4459  . apimode_test.go
          file-lines  3261  3864  internal/registry registry_test.go
          file-lines  3175  6348  internal/host agent.go
          file-lines  3094  3992  internal/provision reconcile_test.go
          func-lines   870   891  internal/host plan14InstalledClaimLaunch
          func-lines   810  1277  internal/provision Reconcile
          func-lines   769  1242  internal/console (*Server).handleAPIInstanceCreate
          func-lines   683  1238  internal/host runAgent
          func-lines   571   908  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   817  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   402   406  internal/registry (*Registry).haJournal
          func-lines   400   868  internal/provision rootReadArchivedChain
          func-lines   399   733  internal/release PassFilter
          func-lines   390   398  internal/host runFilesSeedPreparationWithLive
          func-lines   383   406  internal/console TestDemoSourceToLiveAndUpdate
          func-lines   374   377  internal/host plan14RequiredArtifactsRootRunner
          func-lines   371   417  internal/host TestRootEgressKernelProof
          func-lines   369   883  internal/edge (*Edge).ServeHTTP
          func-lines   367   584  internal/console (*Server).handleAPIShip
          func-lines   364   371  internal/host testRootMigrationBootstrap
          func-lines   360   362  internal/edge TestDemoAPIAliasBoundary
          func-lines   358   628  cmd/console serve
          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 (217 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/fleetsocket_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
          domains_transfer_signals_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/fleetreserve_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/domains/certimport_read_portable.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/replicaconsole_owner_other.go: built only for other systems or tags
          internal/edge/replicaconsole_peer_other.go: built only for other systems or tags
          internal/edge/replicaconsole_socket_other_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/consolefleet_owner_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/managedboot_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/fleetsize_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/netlink_route_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/managedboot/admission_other.go: built only for other systems or tags
          internal/managedboot/identity_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/schedule/envfile_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               1090 at  473 sites  log.Fatal*, (*log.Logger).Fatal* and os.Exit in the root package's production files
    codehealth_test.go:115: sleep               1006 at  812 sites  time.Sleep in test files
    codehealth_test.go:115: db-no-context        873 at  696 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         18582 at   45 sites  functions over 300 code lines (blank and comment-only lines not counted)
    codehealth_test.go:115: file-lines         30596 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: func-lines cmd/console serve -: 358 in the code, the record allows 362 (make code-health-record lowers it)
    codehealth_test.go:119: below the record: file-lines . apimode.go -: 4120 in the code, the record allows 4147 (make code-health-record lowers it)
    codehealth_test.go:119: below the record: file-lines internal/console server.go -: 4160 in the code, the record allows 4191 (make code-health-record lowers it)
    codehealth_test.go:119: below the record: file-lines internal/host agent.go -: 3175 in the code, the record allows 3204 (make code-health-record lowers it)
--- PASS: TestCodeHealth (118.00s)
PASS
ok  	github.com/carlosframework/platform/internal/codehealth	119.054s
=== code-health-record ===
go version go1.26.10 linux/arm64
code-health record: HEAD is on main; comparing with its parent 94bc324a2e7f1b0482e4b0ff3d7f8140080b93b8
=== 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 +14 s)
ok  	github.com/carlosframework/platform/internal/systemd	13.730s
=== internal_rootaws@0 (26 s, from +35 s)
ok  	github.com/carlosframework/platform/internal/rootaws	26.002s
=== internal_activator@0 (256 s, from +115 s)
ok  	github.com/carlosframework/platform/internal/activator	253.704s
=== internal_activator@1 (283 s, from +115 s)
ok  	github.com/carlosframework/platform/internal/activator	280.649s
=== internal_activator@2 (305 s, from +115 s)
ok  	github.com/carlosframework/platform/internal/activator	302.351s
=== internal_activator@3 (367 s, from +115 s)
ok  	github.com/carlosframework/platform/internal/activator	364.551s
=== internal_activator@4 (315 s, from +115 s)
ok  	github.com/carlosframework/platform/internal/activator	312.162s
=== internal_activator@5 (310 s, from +115 s)
ok  	github.com/carlosframework/platform/internal/activator	307.320s
=== internal_activator@6 (313 s, from +115 s)
ok  	github.com/carlosframework/platform/internal/activator	310.501s
=== internal_activator@7 (411 s, from +115 s)
ok  	github.com/carlosframework/platform/internal/activator	408.405s
=== internal_edge@0 (85 s, from +139 s)
ok  	github.com/carlosframework/platform/internal/edge	81.836s
=== internal_edge@1 (102 s, from +139 s)
ok  	github.com/carlosframework/platform/internal/edge	99.257s
=== internal_edge@2 (212 s, from +139 s)
ok  	github.com/carlosframework/platform/internal/edge	208.801s
=== internal_edge@3 (164 s, from +139 s)
ok  	github.com/carlosframework/platform/internal/edge	161.595s
=== internal_edge@4 (191 s, from +139 s)
ok  	github.com/carlosframework/platform/internal/edge	188.154s
=== internal_edge@5 (230 s, from +139 s)
ok  	github.com/carlosframework/platform/internal/edge	226.575s
=== internal_edge@6 (205 s, from +139 s)
ok  	github.com/carlosframework/platform/internal/edge	202.632s
=== internal_edge@7 (216 s, from +139 s)
ok  	github.com/carlosframework/platform/internal/edge	213.058s
=== internal_edge@8 (268 s, from +139 s)
ok  	github.com/carlosframework/platform/internal/edge	264.902s
=== internal_edge@9 (288 s, from +139 s)
ok  	github.com/carlosframework/platform/internal/edge	284.875s
=== internal_edge@10 (228 s, from +139 s)
ok  	github.com/carlosframework/platform/internal/edge	224.791s
=== internal_edge@11 (225 s, from +139 s)
ok  	github.com/carlosframework/platform/internal/edge	221.787s
=== internal_edge@12 (254 s, from +139 s)
ok  	github.com/carlosframework/platform/internal/edge	251.282s
=== internal_edge@13 (258 s, from +139 s)
ok  	github.com/carlosframework/platform/internal/edge	255.436s
=== internal_edge@14 (177 s, from +139 s)
ok  	github.com/carlosframework/platform/internal/edge	173.541s
=== internal_edge@15 (259 s, from +139 s)
ok  	github.com/carlosframework/platform/internal/edge	256.084s
=== internal_host@0 (16 s, from +201 s)
ok  	github.com/carlosframework/platform/internal/host	11.965s
=== internal_host@1 (10 s, from +201 s)
ok  	github.com/carlosframework/platform/internal/host	5.681s
=== lists: internal_edge 138 s, internal_activator 114 s, internal_host 201 s, internal_rootaws 34 s, internal_systemd 14 s
=== cpu: the gate used 7750 cpu-seconds in 526 s, about 14.7 of 32 cores; the machine as a whole was 46% busy
=== gitleaks ===
go version go1.26.10 linux/arm64
go: downloading github.com/zricethezav/gitleaks/v8 v8.30.1
go: downloading github.com/Masterminds/sprig/v3 v3.3.0
go: downloading github.com/spf13/viper v1.19.0
go: downloading github.com/charmbracelet/lipgloss v0.5.0
go: downloading github.com/gitleaks/go-gitdiff v0.9.1
go: downloading github.com/rs/zerolog v1.33.0
go: downloading github.com/h2non/filetype v1.1.3
go: downloading github.com/mholt/archives v0.1.2
go: downloading github.com/fatih/semgroup v1.2.0
go: downloading github.com/BobuSumisu/aho-corasick v1.0.3
go: downloading github.com/hashicorp/go-version v1.7.0
go: downloading golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa
go: downloading github.com/spf13/cobra v1.9.1
go: downloading golang.org/x/sync v0.11.0
go: downloading github.com/muesli/reflow v0.2.1-0.20210115123740-9e1d0d53df68
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/termenv v0.15.1
go: downloading dario.cat/mergo v1.0.1
go: downloading github.com/mitchellh/copystructure v1.2.0
go: downloading github.com/Masterminds/semver/v3 v3.3.0
go: downloading golang.org/x/crypto v0.35.0
go: downloading github.com/spf13/cast v1.7.1
go: downloading github.com/shopspring/decimal v1.4.0
go: downloading github.com/huandu/xstrings v1.5.0
go: downloading github.com/Masterminds/goutils v1.1.1
go: downloading github.com/spf13/pflag v1.0.6
go: downloading github.com/mitchellh/reflectwalk v1.0.2
go: downloading github.com/aymanbagabas/go-osc52/v2 v2.0.1
go: downloading golang.org/x/sys v0.30.0
go: downloading golang.org/x/text v0.22.0
go: downloading github.com/klauspost/compress v1.17.11
go: downloading github.com/klauspost/pgzip v1.2.6
go: downloading github.com/therootcompany/xz v1.0.1
go: downloading github.com/nwaples/rardecode/v2 v2.1.0
go: downloading github.com/andybalholm/brotli v1.1.2-0.20250424173009-453214e765f3
go: downloading github.com/ulikunitz/xz v0.5.12
go: downloading github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707
go: downloading github.com/pierrec/lz4/v4 v4.1.21
go: downloading github.com/STARRY-S/zip v0.2.1
go: downloading github.com/bodgit/sevenzip v1.6.0
go: downloading github.com/sorairolake/lzip-go v0.3.5
go: downloading github.com/minio/minlz v1.0.0
go: downloading github.com/bodgit/plumbing v1.3.0
go: downloading github.com/hashicorp/go-multierror v1.1.1
go: downloading github.com/bodgit/windows v1.0.1
go: downloading go4.org v0.0.0-20230225012048-214862532bf5
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/rivo/uniseg v0.2.0
go: downloading github.com/hashicorp/errwrap v1.1.0
go: downloading github.com/fsnotify/fsnotify v1.8.0
go: downloading github.com/spf13/afero v1.12.0
go: downloading github.com/sagikazarmark/slog-shim v0.1.0
go: downloading github.com/mitchellh/mapstructure v1.5.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/subosito/gotenv v1.6.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 103 near misses of the names notscanned.go lists
self-test: skipped  the 34 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, 138 tracked files judged, 3 broken setups refused
gitleaks: scanned 12175 tracked files; 34 not scanned, by exact path (scripts/gitleaks-gate/notscanned.go)
gitleaks: clean
diff --git a/docs/superpowers/notes/2026-11-29-demo-disk-task1-results.md b/docs/superpowers/notes/2026-11-29-demo-disk-task1-results.md
new file mode 100644
index 000000000..8c869ced8
--- /dev/null
+++ b/docs/superpowers/notes/2026-11-29-demo-disk-task1-results.md
@@ -0,0 +1,373 @@
+# Demo disk bound: plan task 1 results (2026-11-29)
+
+Plan: `docs/superpowers/plans/2026-11-29-demo-disk-bound.md`, task 1. Spec:
+`docs/superpowers/specs/2026-11-29-demo-disk-bound-design.md` (W2, W3, W11,
+decisions 2 to 13).
+
+**Verdict: PASS, with Paul's cut option (a) (2026-11-29).**
+
+- The first runs stopped on one decisive fact: a clean shutdown with the
+ demo disk active left a busy-unmount error and the loop device still
+ attached (W2, last bullet). It failed the same way in three runs.
+- Paul chose option (a): the phase-2 helper stays active
+ (`RemainAfterExit=yes`), and its `ExecStop=` unmounts both probe tmpfs.
+- The re-run with that unit passed twice (see "Re-run with option (a)").
+ Every other fact passed before and again in both re-runs.
+- The spec is now rev 4.2, and the plan carries the corrections.
+
+Prototype code (not production, `-tags rootrunner`):
+`internal/host/demodisk_task1_rootrunner_linux_test.go`.
+
+## Scopes used, and every instance
+
+All within Paul's three approved scopes (2026-11-29).
+
+1. **Root runner** (dev account 640012953448, profile kass, eu-west-1).
+ Before the first run: no running `purpose=plan14-root-runner` instance
+ (one terminated, i-024f69dffa34d5807, not mine). After the last run: no
+ running instance. All nine I launched (seven, then two for the re-run)
+ were terminated by the script; none leaked. Before and after the re-run,
+ no runner instance was running.
+
+ | Run | Instance | What | Result |
+ |---|---|---|---|
+ | A1 20261129T224206-c4ee3f | i-055f61bca2894465c | reboot pair | prototype bug (`/etc/sysusers.d` absent) |
+ | B1 20261129T224517-f207df | i-00bb3ade9908d6c0e | gVisor + legacy walk | legacy walk measured; gVisor stopped on a prototype parser bug |
+ | A2 20261129T224701-2d92dc | i-03e75ccefb7855431 | reboot pair | same parser bug |
+ | A3 20261129T225150-6d4bdd | i-07276878773e444ad | reboot pair | **shutdown FAIL**; probe/native/purge hit a prototype `/run` fill |
+ | B2 20261129T225305-b98eb5 | i-09ec0fb83454f77f4 | gVisor | gVisor facts recorded |
+ | A4 20261129T225855-97a76b | i-0f33ac609ce4e2523 | reboot pair | **shutdown FAIL** again; native and W3 recorded |
+ | A5 20261129T230311-4697f6 | i-0127020dd0b78d517 | reboot pair | **shutdown FAIL** again; everything else PASS |
+ | A6 20261129T232728-674129 | i-02dfb42c1de1fc91a | reboot pair, option (a) | **all PASS**, shutdown clean |
+ | A7 20261129T233028-32e222 | i-00c5af1429af51e62 | reboot pair, option (a) | **all PASS**, shutdown clean |
+
+ Full logs: `s3://carlos-dev-640012953448/root-runner/<run>/`.
+
+ The parser bug: `dumpe2fs -h` (e2fsprogs 1.47.2) labels the journal
+ `Total journal size: 32M`, not `Journal size`. Slice 4's `CheckFormat`
+ must read that label.
+
+2. **Dev demo box** (box-1, i-05789ae978ebf2608, profile kass): one
+ throwaway demo created and purged through the real generated control
+ unit (W11 below). Otherwise read-only SSM only.
+3. **Flagship demo box** (i-035b5187c5e5cc879, profile keymail): read-only
+ SSM only (`df -B1`, `df -i`, `lsblk`, `stat -f`, `du` of the version
+ store and build trees, `command -v`, `dpkg-query`, `ls /dev/loop*`,
+ `losetup -a`, `systemctl --version`, `systemctl cat` and `show` of
+ control and the edge, unit listing, `grep` of four host.env keys). No
+ writes, restarts or config changes.
+
+## Fact table
+
+| # | Fact | Verdict | Evidence |
+|---|---|---|---|
+| 1a | Pinned `mkfs` makes the pinned format | PASS | exit 0 in 9 ms; every stable field exact; exactly the 13 features; state clean |
+| 1b | Image fully reserved | PASS | size 4,294,967,296, allocated 4,294,971,392 |
+| 1c | `systemd-analyze verify`: no cycle | PASS | no output for the unit set or `default.target`; no cycle lines in the boot journal |
+| 1d | Boot order (D6) | PASS | phase 1 done 3,758,402 us, tmpfiles starts 3,761,804; view up 4,105,603, phase 2 starts 4,118,422; phase 2 done 4,208,042, control 12,791,966, agent 12,916,647 |
+| 1e | Receipt (D10) and `f_blocks` beside the superblock | PASS | Block count 1,048,576; `statfs` f_blocks 1,023,920 (overhead clusters 24,656) |
+| 1f | D11 comparison inside the generated control unit | PASS | `mounted` at boot; all four mounts equal the receipt; disk dev 1792 vs `/data` 66305 |
+| 1g | D11 comparison inside the agent unit | PASS | `mounted` at boot, uid 999, same fields |
+| 1h | Each refusal case, control and agent separately | PASS | table below |
+| 1i | Native demo sees data and run dirs on the demo disk and run tmpfs | PASS | data dev 1792 (receipt 1792), run dev = run tmpfs; both writable |
+| 1j | gVisor demo, same | PASS | `<host>.db` and `-wal` dev 1792 = demo disk; `app.sock` dev 60 = run tmpfs; guest write and integrity ok |
+| 1k | Probe units see both probe tmpfs | PASS | native probe: `symlink-eloop` fails only when the data probe tmpfs is full; gVisor probe: `host-socket` fails only when the run probe tmpfs is full |
+| 1l | Clean shutdown: no busy unmount, no loop device | FAIL as specified (three runs); **PASS with option (a)** (two runs) | below |
+| 2 | W3 native `/tmp` and `/var/tmp` | PASS, with a note | below |
+| 3a | W11 on the dev demo box | PASS | below |
+| 3b | W11 on the root runner, disk mounted | PASS | 9 of 9 removals ok, nothing left; 209 inodes back on the demo disk, 3 on the run tmpfs |
+| 4 | Legacy geometry and control's memory | recorded | below |
+| 5 | Facts the slices need | recorded | below |
+| - | Helper rerun while mounted | PASS | no `dumpe2fs` or `e2fsck` call, still one loop device, receipt byte-identical |
+| - | Generated control unit, prototype vs flagship | identical | `claimUnitContent` output equals flagship's `systemctl cat` text (blank lines aside) |
+
+## 1. W2 on the root runner
+
+The runner is stock Debian 13 arm64: kernel 6.12.96+deb13-cloud-arm64,
+systemd 257.13-1~deb13u1, e2fsprogs 1.47.2-3+b11, util-linux 2.41. The
+prototype installs the real units from `unitsFS` and the generated control
+unit from `claimUnitContent` (demo box, build worker). It adds the two
+prototype helper units, which carry D6's lines exactly, and swaps only the
+`ExecStart=` of control and the edge, through a drop-in, for a check verb
+in the same binary. Each unit keeps its own namespace settings.
+
+**The image.** The exact pinned command runs with `MKE2FS_CONFIG=/dev/null`.
+mke2fs prints "Your mke2fs.conf file does not define the ext4 filesystem
+type", and `-F` carries on (exit 0). The 4 GiB image is fallocated first.
+`dumpe2fs -h` shows:
+
+- block size 4096, block count 1,048,576, inode count 262,144, inode size 256;
+- reserved 0, blocks per group 32,768, inodes per group 8,192;
+- total journal size 32M, label `carlos-demo`, state clean;
+- features exactly `has_journal ext_attr dir_index filetype extent 64bit
+ flex_bg sparse_super large_file huge_file dir_nlink extra_isize
+ metadata_csum`.
+
+The full output is in the run logs, for reference only. mkfs also makes a
+root-owned `lost+found` (16 KiB) at the disk root, which becomes an entry in
+`/data/.instances` (see "Noticed").
+
+**Loop and mounts.** The loop device is configured from the image
+descriptor: autoclear 1, direct I/O 1, logical sector 4096,
+`discard_max_bytes` set to 0. Each mount is `fsopen`/`fsmount`/`move_mount`
+onto an `openat2` (no-symlinks) descriptor. All four mounts carry `f_flags`
+12334: nosuid, nodev, noexec, relatime, nosymfollow, and ST_VALID (0x20).
+The views and both unit namespaces report the same flags; `ProtectSystem=strict`
+adds no read-only bit under `ReadWritePaths=/data`.
+
+**Boot.** Phase 1 ran its one `dumpe2fs` and no `e2fsck`: the image was
+clean at every boot, even after the busy shutdowns below. It mounted both
+filesystems and wrote the receipt. tmpfiles then made `_probe` on both,
+and phase 2 mounted the two probe tmpfs (`size=1M,nr_inodes=64`: 256
+blocks, 64 inodes). The control and agent checks, started at boot in
+their own units, both answered `mounted`.
+
+**Refusals** (control and agent restarted for each, read separately):
+
+| Case | Control | Agent |
+|---|---|---|
+| baseline | mounted | mounted |
+| receipt missing | unavailable (receipt missing) | unavailable |
+| receipt device wrong (dev + 1) | unavailable (`dev got 1792 receipt 1793`) | unavailable |
+| one total wrong (f_blocks + 1) | unavailable | unavailable |
+| one flag missing (`noexec` cleared on the run view by `mount_setattr`) | unavailable | unavailable |
+| flag restored | mounted | mounted |
+| store unreadable (a file where the store directory was) | unavailable (`not a directory`) | mounted: the agent never reads the store; in the design it asks control first |
+| store fails its check (mode 0777) | unavailable | mounted (same reason) |
+| store restored | mounted | mounted |
+| image present, no mount, stale receipt | unavailable (dev, f_blocks, f_files differ: root volume seen) | unavailable |
+| image present, no mount, no receipt | unavailable | unavailable |
+| marker present, image missing | unavailable | unavailable |
+| no image, no marker | legacy | unavailable: the prototype agent reads no door, as noted above |
+
+After the last unmount the autoclear loop device was gone at once.
+
+**The failure: clean shutdown.** The reboot between phase 1 and phase 2
+ran with the disk, the views and both probe tmpfs mounted. A3, A4 and A5 all
+show the same journal:
+
+```
+Unmounting data-instances.mount ...
+umount: /data/instances: target is busy.
+Failed unmounting data-instances.mount - carlos instance data (bind, nosymfollow).
+umount: /run/carlos/instances: target is busy.
+Failed unmounting run-carlos-instances.mount ...
+(7 s later, at umount.target)
+Unmounting data-instances-_probe.mount ...
+```
+
+The shutdown witness is a unit ordered to stop after all four mounts. It
+found `/dev/loop0` still backing `demo.img`, with `/data/instances` and
+`/run/carlos/instances` still mounted.
+
+Cause, from `systemctl show` on the booted system: the dynamic mount unit
+`data-instances-_probe.mount` has `RequiresMountsFor=/data/instances` but
+no `After=data-instances.mount`, and likewise for the run side. So the views'
+stop jobs run as soon as the edge and control have stopped, while the
+probe tmpfs is still on top of them. The final unmount and loop detach are
+left to systemd-shutdown. No damage was seen: every next boot found the
+image clean. Still, the fact the plan made decisive does not hold with
+D6's units as written.
+
+A second finding, from the same mount table: the probe tmpfs mounted on
+the view path also appears at the raw path, as `/data/.instances/_probe`
+(`data-.instances-_probe.mount`). The view and the raw directory are bind
+peers with shared propagation, so a mount on either shows on both. D8's
+sentence "a mount on the raw `_probe` would not show through them" is
+therefore wrong in both directions. That is harmless to the probe, but it
+means decision 9's "underlying directory" check and §8's look under the
+views see a mount there.
+
+**Cut options put to Paul** (he chose (a), 2026-11-29):
+
+- (a) Make phase 2 `RemainAfterExit=yes` with an `ExecStop=` that unmounts
+ both probe tmpfs. It is already `After=` the views, so its stop runs
+ before theirs. Then re-run W2's shutdown witness.
+- (b) Give the probe tmpfs real `.mount` units with explicit `After=` and
+ `Before=` lines. This loses decision 8's mount-by-descriptor.
+- (c) Mount the probe tmpfs somewhere other than on top of the views (spec
+ change to decision 8).
+
+### Re-run with option (a)
+
+The phase-2 unit became `Type=oneshot`, `RemainAfterExit=yes`,
+`ExecStart=... __dd-phase2`, `ExecStop=... __dd-phase2-stop`. The stop
+unmounts `/data/instances/_probe` and `/run/carlos/instances/_probe` and
+skips a path that is not a mount root. All other lines are unchanged, and
+mount-by-descriptor is kept. The witness was tightened at the same time.
+It requires:
+
+- no "target is busy", "Failed unmounting" or "Failed with result" line in
+ the shutdown journal;
+- the stop verb's log showing both unmounts ok and 0 probe mounts left in
+ the host namespace;
+- a shutdown witness, ordered after all four mounts' stop jobs, that sees
+ no loop device for `demo.img` and no demo mount;
+- a next boot whose phase 1 ran no `e2fsck` and mounted the disk.
+
+Both runs, A6 (i-02dfb42c1de1fc91a) and A7 (i-00c5af1429af51e62), passed
+all of it, and both instances were terminated. Every phase-2 subtest passed
+in both runs: boot, rerun, probe, native, purge and refusals. A6's shutdown
+journal shows the order:
+
+```
+Stopping carlos-demo-probe-space.service ...
+__dd-phase2-stop: stop: umount /data/instances/_probe: <nil>
+__dd-phase2-stop: stop: umount /run/carlos/instances/_probe: <nil>
+Unmounted data-.instances-_probe.mount (the propagated copy goes too)
+Unmounted data-instances-_probe.mount
+Stopped carlos-demo-probe-space.service
+Unmounted data-instances.mount / run-carlos-instances.mount
+(at umount.target) EXT4-fs (loop0): unmounting filesystem; Unmounted data-.instances.mount
+Stopping carlos-dd-shutdown-witness.service -> losetup -a: empty, no demo mounts
+```
+
+The witness found the loop device already gone (it waited 0 quarter
+seconds). A7 shows the same order and the same empty witness.
+
+## 2. W3: native temporary directories
+
+Native demo under the real template, the real demo drop-in and the real
+trampoline (`instance-exec run`), on the runner with the disk mounted:
+
+| | `/tmp` | `/var/tmp` |
+|---|---|---|
+| `PrivateTmp=yes` (today) | host `/tmp/systemd-private-.../tmp` (host `/tmp` is a tmpfs) | host `/var/tmp/systemd-private-.../tmp` on the **root volume** (ext4 `/dev/nvme0n1p1`), writable despite the drop-in's `TemporaryFileSystem=/var:ro` |
+| `PrivateTmp=disconnected` | one private tmpfs, `size=190352k`, 409,600 inodes, mode 700 | the same tmpfs (`/var-tmp` on it), writable; the unit starts, so it composes with `/var:ro` |
+
+So today a native demo can fill the root volume through `/var/tmp`, which
+is what D13 closes.
+
+Fill with `disconnected`: writing to `/var/tmp` stopped with ENOSPC at
+194,920,448 bytes, which is the tmpfs size. The unit's memory peak was
+234.6M under `MemoryMax=256M`, and the unit exited cleanly. The host's
+`/var/tmp` free blocks dropped by 8 KiB at most during the run (noise), and
+`du` stayed at 0. The host does not grow.
+
+One nuance: the write never got past the memory cap. systemd sizes the
+private tmpfs at about 10% of RAM (186 MiB on a 2 GB t4g.small), which is
+below the 256 MiB cap.
+
+For slice 2: `systemctl show -p PrivateTmp` prints `yes` for both modes.
+The mode is in `PrivateTmpEx=` (`connected` or `disconnected`), so
+`assertDemoUnit` must read `PrivateTmpEx`.
+
+## 3. W11: purge from the generated control unit
+
+**Dev demo box.** The effective unit's `ReadWritePaths` are
+`/var/lib/carlos-demo-builds /data /run/carlos/instances /opt/carlos/live
+/opt/carlos/versions /var/lib/carlos-release/private /run/carlos-control
+/run/systemd/system -/var/lib/carlos/oci-rootfs`, with
+`ProtectSystem=strict` and `PrivateTmp=yes`. There are no drop-ins, and the
+unit text is identical to the flagship's. The box runs v0.44.0 in gVisor
+mode.
+
+1. 22:25:21Z: created `grand-cloud-71` (POST `/api/demo/apps`, the repo's
+ `internal/console/testdata/demo` starter). Building at 22:25:25, live
+ at 22:25:45, HTTP 200.
+2. Present before the purge:
+ - the data dir with `.db`, `-wal`, `-shm`, `.db.assigned`, `.env` and
+ `launch.run.json`;
+ - the run dir with `app.sock` and `app.sock.control`;
+ - `exe/<host>`, the live link, the OCI rootfs and bundle;
+ - the gVisor unit and slice;
+ - the version `v0.0.0-demo.1/bad/tmp-demo-grand-cloud-71` (17,626,831
+ bytes) and its manifest.
+3. 22:26:01Z: `carlos system demos takedown --host grand-cloud-71.dev.trycarlos.com`
+ against the dev console. The unit stopped at 22:26:02. The first cleanup
+ attempt logged `DEMO-POLICY` (status not yet `releasing`, the same as on
+ 2026-11-09), and the retry ran at about 22:26:40.
+4. `takedown-status` showed `Cleanup: Complete` at about 22:31:30. The demo
+ URL answers 404.
+5. After: every path above is absent; units, slice and version are gone; the
+ version store is 0 bytes and root-volume use is back to 4,471,881,728
+ bytes.
+6. The only leftover is `/data/programs/grand-cloud-71.dev.trycarlos.com.json`,
+ the known minor from 2026-11-09, which is not one of purge's removals.
+
+On this box demos still live on the root volume, so this exercises the
+generated unit's permissions, not the demo disk.
+
+**Root runner, disk mounted.** The control unit's `ExecStart=` was swapped
+for purge's own removal sequence. It ran inside the real
+`instanceDemoPurgeGuard` (root release lock and adoption lock under `/data`;
+no guard error) and called the same `instancefs` calls in today's order:
+
+- the three DB names;
+- the data dir on the demo disk;
+- the run dir on the run tmpfs;
+- `exe/<id>`;
+- the live link;
+- the version and its manifest.
+
+All nine returned ok and nothing was left behind. The demo disk got its
+inodes back (261,917 to 262,126) and the run tmpfs too (8,183 to 8,186).
+`/data/.instances` is a submount of the writable `/data` there.
+
+## 4. Legacy geometry and control's memory (slice 3)
+
+- Root volume `statfs` on both demo boxes: f_files 1,957,888; f_ffree
+ 1,886,933 (flagship) and 1,823,749 (dev).
+- Control's effective `MemoryMax` is 1 GiB (1,073,741,824) with
+ `GOMEMLIMIT=768MiB` on both boxes, because both run the build worker.
+- The formula: 16 B × 1,957,888 = 31,326,208 bytes (29.9 MiB). That is
+ under half of 1 GiB, and under half of the 256 MiB default too. By the
+ plan's rule, the walk may also replace today's removal on the legacy root
+ volume.
+- Measured on the runner, with a prototype unlink-only walk on an ext4 of
+ the flagship root's geometry (7,681,218 blocks, `-N 1957888`; f_files
+ 1,958,960), run under `MemoryMax=1G`:
+
+ | Chain depth | Walk time | Go heap peak | Stack capacity | VmHWM | cgroup memory peak |
+ |---|---|---|---|---|---|
+ | 100,000 | 2.8 s | 20.0 MB | 1.9 MB (formula 1.6 MB) | 50 MB | 32.4M |
+ | 300,000 | 3 min 14 s | 24.9 MB | 5.8 MB (formula 4.8 MB) | 72 MB | **1G** |
+
+ The process's own memory is linear and matches the formula. At 300,000
+ levels, though, the unit's cgroup reached its 1 GiB `MemoryMax`, and the
+ walk slowed about 70-fold. That is kernel memory charged to the cgroup
+ (dentries, inodes and directory blocks), not the walk's heap. It finished,
+ and the chain was gone.
+
+ Slice 3's W12-legacy says "peak memory matches the formula". That holds
+ for the process but not for the cgroup. This is for Paul or slice 3's
+ reviewer; it is not a task-1 stop condition.
+
+## 5. Facts the slices need
+
+| | Flagship demo box | Dev demo box |
+|---|---|---|
+| Release, sandbox | v0.44.0, systemd (auto) | v0.44.0, gVisor |
+| Root volume (EBS) | 32,212,254,720 B (30 GiB) | 32,212,254,720 B (30 GiB) |
+| Root filesystem size | 31,462,268,928 B | 31,462,268,928 B |
+| Used / available | 2,508,738,560 / 27,569,156,096 B | 4,471,664,640 / 25,606,230,016 B |
+| Inodes total / free | 1,957,888 / 1,886,933 | 1,957,888 / 1,823,749 |
+| `/run` (tmpfs) | 194,920,448 B, 237,937 inodes | same size, same inodes |
+| Kept builds per demo now | none: 0 demos, version store 0 B | none at rest; the one throwaway demo held 17,626,831 B (one version) |
+| Demo build concurrency | 1 (build worker on) | 1 (build worker on) |
+| e2fsprogs | 1.47.2-3+b12; `mkfs.ext4`, `e2fsck`, `dumpe2fs` under `/usr/sbin` | same |
+| Loop | module (`CONFIG_BLK_DEV_LOOP=m`), `max_loop` 8, `/dev/loop0-7`, none in use | same |
+| systemd | 257.13-1~deb13u1 | same |
+| Only demos | yes: `/data/.instances` holds only `_probe`, no flat instance DB, no non-demo instance unit | yes (old failed demo units only) |
+
+The capacity sum (spec §10) for the flagship root volume, today:
+
+- demo disk 4 GiB;
+- claim scratch 768 MiB;
+- `DiskFloor` max(1 GiB, 10% of 29.3 GiB) = 2.93 GiB;
+- total about 7.7 GiB, against 25.7 GiB available.
+
+The spec's worst case of 1,952 MiB of staged builds for each of 20 demos
+(38.1 GiB) does not fit beside it. That is unchanged until slice 1's bounded
+retention lands.
+
+## Noticed, not fixed
+
+- `lost+found` (root, 0700, 16 KiB) sits at the root of the demo disk,
+ so it is an entry of `/data/.instances`. Task 2's consumer audit should
+ check the layout pass, the readiness sweep and the look under the views
+ for an unexpected non-host entry.
+- The `needs_recovery` bit is set on the mounted image, as the plan
+ expects. The receipt's `f_flags` include ST_VALID (0x20).
+- On the runner, the native demo's `/var/tmp` with `PrivateTmp=yes` is
+ mounted without `nodev`.
diff --git a/docs/superpowers/notes/2026-11-29-demo-disk-task2-audit.md b/docs/superpowers/notes/2026-11-29-demo-disk-task2-audit.md
new file mode 100644
index 000000000..a89e71ba1
--- /dev/null
+++ b/docs/superpowers/notes/2026-11-29-demo-disk-task2-audit.md
@@ -0,0 +1,133 @@
+# Demo disk bound: plan task 2, the consumer audit (2026-11-29)
+
+Plan: `docs/superpowers/plans/2026-11-29-demo-disk-bound.md`, task 2. Spec:
+rev 4.2, §8. Code audited at 4a0176244 (main plus the task-1 branch). No
+production code changed.
+
+**What changes on a demo box.**
+
+- The demo disk (ext4 on a loop device) is mounted on the raw directory
+ `/data/.instances`, so `/data/instances` and every instance directory now
+ sit on a different filesystem from `/data`.
+- The demo run tmpfs is mounted on `/run/carlos/.instances`.
+- The probe tmpfs sits on `/data/instances/_probe` and also appears at
+ `/data/.instances/_probe`, because the view and the raw directory share
+ propagation. The same holds for the run side.
+- The disk's root carries mkfs's `lost+found` (root, 0700).
+
+**What can break.**
+
+- A rename that crosses `/data` and an instance directory (EXDEV).
+- A device comparison between paths on the two sides.
+- A reader that lists the instance trees and meets `lost+found` or a probe
+ mount.
+
+**Method.** I grepped the non-test Go for:
+
+- the APIs the plan names: `RawInstanceDir`, `rawInstanceDir`, `rawRunDir`,
+ `InstanceRunDir`, `NestedDBPath`, `DataRoot`, `DemoRunRoot`;
+- the literals `/data/instances`, `/data/.instances`, `/run/carlos/instances`,
+ `/run/carlos/.instances`, `"instances"` and `.instances`;
+- every `os.Rename`, `Renameat*` and `Link*` (75 files);
+- every `os.SameFile` and `st_dev` comparison (about 90 sites);
+- every listing of the instance trees.
+
+Each site was then followed to its caller to see whether a demo can reach
+it. The console's URL and bucket-key uses of "instances" (for example
+`apps/<a>/<app>/instances/<host>.json`) are not filesystem paths and are
+left out. Sites that do the same thing are one row.
+
+**Count: 33 consumers.** 20 unaffected, 6 that change in a named slice, and
+7 that must refuse for demos. Five of the seven are unreachable for demos
+today and keep a test that says so. One, offline operator moves, is
+**reachable today** and needs a slice-5 refusal. The seventh, phase-1 moves
+and relocation, is reachable only if the moves switch is set on a demo box,
+and the same slice-5 guard closes it.
+
+## Must refuse for demos (cross-device renames and device comparisons)
+
+| # | Consumer and sites | Why it matters | Demo reachability today | Test (state now; slice that makes or keeps it pass) |
+|---|---|---|---|---|
+| R1 | Activator set-aside: `internal/activator/startrule.go:189-320`. Covers `reconcileAssignment`; `setAsideSource`, whose `os.SameFile` compares the view with the raw directory; and `supersede`, which renames into `<data>/.superseded` | Cross-device rename. The raw directory no longer shares `.superseded`'s filesystem, so preferring it no longer avoids EXDEV | Unreachable. `Restore` sends a demo to `restoreDemoLocal` (`demo_durability.go:105`), which never calls `reconcileAssignment`. The seed and HA callers return early for demos (`activator.go:3531`, `hawake.go:143`) | `TestDemoDiskAuditDemoRestoreNeverSetsAside` (`internal/activator/demodisk_audit_linux_test.go`): **PASSES now**. Its contrast shows an ordinary labelled row does get set aside. It stays as a guard; slice 5 keeps it green |
+| R2 | Layout migration, flat to nested and back: `internal/layout/journal.go` (renames), `plan.go:109-181`, `preflight.go:209,430`, `extras.go:189`, `pass.go:377` | Moving `<data>/<host>.db` into the raw directory is a cross-device rename | Unreachable. `RouteFor` mints a demo nested whatever the box's layout (`reconcile.go:670`). `Classify` answers nested, so the pass never moves it, and `AssertDemoRoute` refuses a flat demo row | `TestDemoDiskAuditDemoMintedNested` (`internal/provision/demodisk_audit_test.go`) and `TestDemoDiskAuditDemoClassifiesNested` (`internal/activator/...`): **PASS now** |
+| R3 | Claim-census migration and every claim-mode user of the raw tree. Covers `internal/host/claimcensus_migration_linux.go:215` and `layout/census.go` (`VerifyInstanceCensusAlias` compares mount points). Also the claim serving park and maintenance (`claimservingpark*_linux.go`, `claimservingmaintenance_linux.go:48`); `claimstop_writers_linux.go:257`; `claimlaunch_*`; `claimroleassembly*`; `claimtoken_inventory_linux.go`; `claimfilesseed_*`; `claimservingretire.go`; `claimretire_transport.go`; `rootrecord_claim.go`; `rootmigration_census.go`; `rootinventory_sibling.go`; `claimunit_definition.go`; the socket and journal migrations; `claimproduction.go:249` | Renames and identity checks across the raw tree, and mount-point comparisons | Unreachable. Root control refuses to start on a demo box in claim mode (`instancectl/sandbox.go:98`, `demo.ErrConfig`). The agent's gate refuses every demo route when claims are on (`provision/demo_policy.go:95`) | `TestDemoDiskAuditDemoBoxRefusesClaimMode` (`internal/instancectl/demodisk_audit_test.go`) and `TestDemoDiskAuditDemoRouteRefusedWithClaimsOrFlat` (`internal/provision/...`): **PASS now** |
+| R4 | **Offline operator moves.** The source report and retire (`internal/host/movesoffline.go:776-890`); the seal (`movesoffline_seal.go:682`); landing (`movesoffline_land.go`, `moveslandinstall.go`); the park (`internal/park/local_linux.go`, which renames into `<data>/.offline-moves`); revert (`movesrevert.go:749`) | Cross-device renames in both directions: park out of the raw directory, land into it | **Reachable.** Neither the moves pass (`movespass.go:1172`), nor `offlineRound`, nor the console's offline-move doors (`internal/console/apiinstancemove_offline*.go`) check for a demo. A demo box is offline-capable: hibernation configured, claims and the moves switch unset | `TestDemoDiskAuditOfflineMoveRefusesDemoRoute` (`internal/host/demodisk_audit_pending_linux_test.go`, tag `demodiskaudit`): **FAILS now** ("the box took part in an offline move of a demo: it wrote a source report"); its ordinary-row contrast passes. **Slice 5** adds the refusal and drops the tag |
+| R5 | Phase-1 moves and relocation (`movesphase1.go`, `movesretire.go`, `movesstage.go`, `moveslogoutbox.go`, `relocationinstall.go:348`) | Cross-device renames out of and into the raw tree | Not reached while the moves switch is unset, which it is on both demo boxes. `AssertDemoRoute` refuses a moved row (`rt.Moved`) | Covered by R4's slice-5 refusal, which is placed in the moves pass for any demo record. R4's test is the witness |
+| R6 | Region-HA park, handover and restore (`internal/hostbox/typedpark_linux.go:114`, `typedretire.go`, `coldhandover.go`, `restore.go`, `servinghandover.go:67,208`, `inventoryscope.go:48,72`, `parkleases.go`, `reconcile_adapter.go`) | Cross-device renames, and a device comparison | Unreachable: `demoDataShape` refuses an HA demo. Should it ever run, `typedpark` refuses on its own (`srcFS.Dev != dstFS.Dev`), so it fails closed | Existing `TestDemoDatabaseRejectsOtherDurabilityPaths` (`internal/activator/demo_durability_test.go`): **PASSES** |
+| R7 | Seed placement (`internal/activator/seedplace.go:230,258,435`; its `os.SameFile` at `:553`) | Renames toward the instance directory, and an identity check | Unreachable: `activator.go:3531` skips seed placement for demos, and `AssertDemoRoute` refuses a seeded row | Existing `TestDemoDatabaseRejectsOtherDurabilityPaths` (demo `Seed` and `SeedExe` refused, and demo never classified HA): **PASSES** |
+
+## Changes in a named slice
+
+| # | Consumer and sites | What changes | Slice |
+|---|---|---|---|
+| C1 | Demo purge removals (`internal/instancectl/demo_cleanup.go:110-148`; `instancefs.RemoveAllBeneath`'s hoist, `dirs_linux.go:315`) | The unlink-only walk on the demo disk and run tmpfs; task 1's W11 witnessed today's removals landing | 3 |
+| C2 | `diskRoom` (`internal/instancectl/hardening.go:570`, `statfs(DataRoot)`) | Gets a root-volume path; the demo floors are separate (D12). The claim-only `DiskRoom(<data>/instances)` in `claimlaunch_production.go:101` is unreachable (R3) | 7 |
+| C3 | The disk reading and alert (`internal/host/probes.go:214`, `readDiskFrac`, `readDiskBytes` on `/data`) | Inodes and `/run` in slice 1; the demo disk and run tmpfs readings later (§7.6) | 1, then 8 |
+| C4 | Control's look under the views (`internal/instancectl/server.go:1754-1810`, `inspectMountpoints`) | A plain `umount` of a view fails "busy" under the probe tmpfs. The listing would then read the demo disk, and readiness fails. It must unmount the probe tmpfs first (or unmount recursively), then expect an empty mountpoint (spec §8, rev 4.2) | 6 |
+| C5 | The box listing's host map (`internal/layout/hostsused.go:48`, `HostsFromBoxListing`) | `instances/lost+found` and `.instances/lost+found` are reported as unmapped. They are the box's, like `_probe` | 5: `TestDemoDiskAuditBoxListingKeepsLostFound` (`internal/layout/demodisk_audit_pending_test.go`, tag `demodiskaudit`), **FAILS now** with unmapped `[".instances/lost+found" "instances/lost+found"]` |
+| C6 | The agent's boot run sweep (`internal/runs/stage.go:110`, called from `internal/host/runs.go:141` at every agent start) | It cannot open `lost+found` as carlos (EACCES), and logs a failed sweep at every start. It must skip `lost+found` | 5: `TestDemoDiskAuditRunSweepSkipsLostFound` (`internal/runs/demodisk_audit_pending_test.go`, tag `demodiskaudit`), **FAILS now** with `fstatat .../lost+found/.carlos-run: permission denied` |
+
+## Unaffected
+
+| # | Consumer and sites | Why it is unaffected |
+|---|---|---|
+| U1 | Path definitions (`internal/provision/provision.go:3263-3312`: `InstanceID`, `InstanceDir`, `NestedDBPath`, `InstanceRunDir`, `NestedSocket`, `NestedPaths`) | Strings only |
+| U2 | Mint of nested paths (`internal/provision/reconcile.go:657-684`) | Strings; a demo is always minted nested (R2's test) |
+| U3 | Row-shape comparisons with no I/O: `internal/appconfig/syncexec.go:67`; `internal/activator/layout.go:124`, `paths.go:49`, `generations.go:135`; `internal/provision/sidecar_reconcile.go:134`, `seedfleet.go:269`, `seedreconcile.go:314`, `seedrollback.go:80,250`, `demo_claim_seed.go:150,201`; `internal/registry/aliassocket.go:43-59`; `cli.go:409` | String comparisons of a row's paths |
+| U4 | gVisor OCI binds (`internal/instancectl/ocibundle.go:72-73`) | The bind sources resolve to the demo disk and run tmpfs; witnessed (task 1, run B2) |
+| U5 | The native trampoline and its exit record (`internal/instanceexec/exec.go:164`, `exit.go:119`; `exec_rootfs.go:53` is rootfs-only, which demos refuse) | Reads and writes inside one instance's own directories; witnessed (task 1, native demo) |
+| U6 | The readiness probes (`internal/instanceexec/probe.go:300-304`, the namespace's exact `instances/_probe` shape; `probe_gvisor_linux.go:73`; `internal/instancectl/gvisorprobe.go:30`) | Only the filesystem under `_probe` changes; both probes passed on their tmpfs (task 1) |
+| U7 | The agent's nested gate (`internal/host/agent.go:1792`) | The three views are still nosymfollow mounts |
+| U8 | Demo restore and its init proof (`internal/activator/demo_durability.go:105-200`) | Same-directory atomic writes inside the instance directory |
+| U9 | Same-directory atomic renames in the instance and run trees: `internal/activator/canonlink.go:43`; `instancefs.WriteAtomic` (`instancefs_linux.go`); `internal/appconfig/sync.go`, `dropin.go`; `safefile`; and, for non-demo or HA rows only, `installed.go:58`, `harecord.go:74`, and `backend_exec.go:1176` (the quarantine) | Source and target are in one directory, so one filesystem |
+| U10 | The claim snapshot's read of the DB (`internal/host/demo_claim_snapshot.go:26`; `internal/democlaim/source_linux.go:135`) | Read through the view; the scratch is its own loop image (spec §7.4) |
+| U11 | The snapshot scratch's device check (`internal/instancectl/demo_snapshot_linux.go:40`) | Compares its own mount with its parent, under `/var/lib` |
+| U12 | Legacy claim-launch cleanup on every start and stop (`internal/instancectl/legacy_claim_cleanup.go:17-25`, `claimlaunch_snapshot.go:20,65`) | Removes files inside one instance directory |
+| U13 | Purge's version pins (`internal/instancectl/demo_versions.go:51`) | Reads `<data>/...` generations on the root volume |
+| U14 | The nested config reaper (`internal/appconfig/syncexec.go:1667`) | Lists `<data>/instances`; skips `lost+found` silently (`ReadDir` error, `continue`) |
+| U15 | The platform litestream glob (`internal/ops/litestream.go:399`) | `filepath.Glob` ignores the unreadable `lost+found` |
+| U16 | Bootstrap's directories and `chown -R /data` (`internal/host/bootstrap.go:517-529, 798`) | Unchanged. A re-bootstrap with the disk mounted would chown `lost+found` and the probe tmpfs to carlos: harmless, and rolls do not run it |
+| U17 | The tmpfiles lines (`internal/host/bootstrap.go:72-136`) | Witnessed over the mounts (task 1): owner, mode and `_probe` right on both |
+| U18 | Identity-over-time checks, one object before and after: `execsandbox` file and cleanup; `instancectl/server.go:1563`; `edge/static.go`; `mailer/keys.go`; `safefile/reap_linux.go`; `rootstate`; `cgroup`; `hostfiles`; `maintenanceexec`; `demobuild/bundle.go`; `rootfsimage`; `release/digestcache_linux.go`; `stopevidence`; `moves/archive`; `mediahandler`; `history_cli.go`; `instancefs/purge_linux.go`; `dirs_linux.go:289,581`; `activator/rolelaunch*` | Never compare two paths across the new boundary |
+| U19 | Control's roots (`internal/instancectl/server.go:383,397`, `DataRoot`, `DemoRunRoot`) | Configuration; purge (C1) and `diskRoom` (C2) are their own rows |
+| U20 | `ship_check.go:39-40` | Checks a build image, not a box |
+
+## Tests, and how to run them
+
+- The tests that pass now are ordinary tests, so they guard from today:
+ - `go test ./internal/activator -run TestDemoDiskAudit`
+ - `go test ./internal/provision -run TestDemoDiskAudit`
+ - `go test ./internal/instancectl -run TestDemoDiskAudit`
+- The tests that fail now carry the `demodiskaudit` build tag, so `main`'s
+ CI stays green:
+ - `go test -tags demodiskaudit ./internal/host ./internal/layout ./internal/runs -run TestDemoDiskAudit`
+ (`internal/host` needs `TMPDIR` set for its socket tests)
+ - The slice that makes each pass removes its tag in the same change.
+
+## What this changes in the slices' scope
+
+- **Slice 5 grows by three production fixes**, each with its pending test:
+ - the demo refusal in the box's moves pass (R4, which covers R5);
+ - `lost+found` in `HostsFromBoxListing` (C5);
+ - `lost+found` in the boot run sweep (C6).
+
+ The plan already gave slice 5 "offline moves refuse a demo route". What is
+ new is that it is a real, reachable gap, not a reachability proof.
+ `internal/host` and `internal/runs` are in the root binary, so slice 5's
+ census covers them.
+- **Recommended, outside the census:** a console-side refusal of offline
+ and phase-1 moves for demo apps, so the operator gets a clear answer
+ rather than a box that will not take part. It would land with slice 5 or
+ as a small console change.
+- **Slice 6:** the look under the views (C4), already corrected in the plan
+ and the spec at rev 4.2.
+- No other slice changes. The set-aside, layout migration, the claim
+ family, region HA and seeds need no production change for demos, only
+ the guards above, which pass today.
+
+## Noticed, not fixed
+
+- `GOOS=darwin go vet ./internal/instancectl` fails on
+ `edgefence_test.go:102` (`mustHaveCallsInOrder` undefined), before and
+ after this change. The CI cross-compile builds only non-test code, so
+ only a darwin `vet` sees it.
diff --git a/docs/superpowers/plans/2026-11-29-demo-disk-bound.md b/docs/superpowers/plans/2026-11-29-demo-disk-bound.md
new file mode 100644
index 000000000..c39a1eb15
--- /dev/null
+++ b/docs/superpowers/plans/2026-11-29-demo-disk-bound.md
@@ -0,0 +1,526 @@
+# Demo disk bound (F5): plan (rev 3.1)
+
+**Goal:** on a demo box, no demo's runtime writes can take bytes or inodes from the root volume, `/run` or the readiness probe. All demo data lives on one fixed, fully reserved demo disk, and demo run dirs live on one capped tmpfs. A demo that fills either is noticed, attributed and cleared through the CLI.
+
+**Why now:** F5 of Fable's gVisor audit (3793aa49) was cut from the gVisor flagship-demos plan (`docs/superpowers/plans/2026-11-16-gvisor-flagship-demos.md`, "Cut: per-demo disk bound (F5)") to its own design. Until this lands, the plan's "accepted, uncovered" outage stands: one demo can fill `/data`, `/run` or the inodes and take the flagship demo box down with no warning.
+
+**Authority:** `docs/superpowers/specs/2026-11-29-demo-disk-bound-design.md`, **approved by Paul 2026-11-29 (rev 4.1)**, with all six recommended answers:
+- a 4 GiB demo disk (262,144 inodes) and a 16 MiB run tmpfs (8,192 inodes);
+- switch-over option (a), only after every cleanup is confirmed;
+- bounded build-output retention first, then measure; volume growth only with Paul's scoped approval;
+- no new visitor page;
+- the failed-check path, with Paul's explicit OK before any demo data is deleted.
+
+Section and decision numbers below (§7.5, D6) are the spec's.
+
+**One implementation refinement of the spec, by this plan (round 1 P1):** the boot helper never creates the image. Only an explicit enable step at the switch-over creates it (slice 9). That step ships only in the release that holds every other slice. Spec §7.1's "first mount at the reboot" therefore becomes: enable makes the image, then the reboot mounts it. Nothing else in the spec changes. The spec records this as an implementation note (controller ruling, 2026-11-29).
+
+**Review history:**
+- Plan rev 1 (061665e4b), Astra round 1 (`~/.cache/sec-review-20261116/reviews/F5plan-R1-astra.md`): NOT READY, 1 P1 and 6 P2. Paul's decisions stand. Rev 2 answers all seven; the last section maps each.
+- Plan rev 2 (f9382cb82), Astra round 2 (`F5plan-R2-astra.md`): NOT READY, 2 P1 and 1 P2. Seven round-1 items resolved, two partly. **Stopping rule 2 fired** on the geometry family ("reproducible, verified filesystem geometry"), which had findings in rounds 1 and 2. **Controller ruling (2026-11-29): centralize the invariant**: one format and recovery validator, used by the boot helper and every check, held by clean, dirty and already-mounted witnesses. Rev 3 applies it and answers the other two findings. The round tables at the end map each.
+- Plan rev 3 (97d1534fa), Astra round 3 (`F5plan-R3-astra.md`), the last round: NOT READY, 1 P1 and 1 P2, both local. R2-1 and R2-2 resolved, R2-3 partly. **Paul (2026-11-29): fix both, then one tiny scoped Astra check.** Rev 3.1 applies the two fixes (slice 1 and slice 9).
+- Rounds used: 3 of 3, plus Paul's tiny scoped check of rev 3.1. Nothing further without Paul.
+
+**Scope:** demo boxes only (`CARLOS_DEMO_BOX=1`). Shared pools, non-demo instances and per-demo isolation between demos are out (spec §3).
+
+## Global constraints (AGENTS.md)
+
+- **Round limit:**
+ - At most three cross-model review rounds for this plan, and separately for each slice's branch. Astra reviews Claude's work; Opus or Fable reviews Codex's.
+ - A review stops at the first round with no P1. That round's P2s are applied without another round. P3s go on the branch's follow-up list. A fourth round needs Paul's go.
+ - Two rounds in the same fault family stop the fixing and go to Paul with stopping rule 2's three choices.
+ - Every brief and handoff carries the round history; a revision or handoff does not restart the count. Briefs follow `docs/superpowers/reviews/REVIEW-BRIEF-TEMPLATE.md`.
+- **Review sized to risk (rule 3):** every slice except slice 2 touches root, termination, purge, storage or activation, so each gets its own task-level review. Slice 2 is covered by its whole-branch review.
+- **Census:** every slice that changes the root binary's packages or `internal/host/units` needs `make census-card`, a CLAIMS file, `make census-propose`, and an approval from the other model family, recorded on #280. That includes agent code in `internal/host` (slice 8's agent half included). Only console-package code is outside it.
+- **Never review against unmerged work (rule 4):** each slice is reviewed against `main` with its predecessors merged.
+- **No dormant feature (rule 5), dated:**
+ - Slices 4 to 8 cannot activate anything: only slice 9's enable step can make the image.
+ - The switch-on commitment: the dev demo box switches within 3 days of slice 9's release, and flagship at the first #421 window after the dev witnesses. The session lead records that date on #1096 when slice 9 merges.
+ - Merging slices does not wait for a booked window. **The switch-over itself** requires a booked window, release-lock coordination with 8a3d302, and Paul's GO.
+- **Something Paul can see lands first (rule 6):** slice 1 carries the inode and `/run` reporting with the retention change.
+- **One session per slice (rule 7),** ending when the slice merges. After three days or three compactions, write the handoff and stop.
+- **Say so before Paul asks (rule 8):** 24 hours without a merge, or rule 1 or 2 firing, gets a post on the branch's discussion and a note to Paul.
+- **Branches and commits:** work lands through reviewed branches on amadan; commit subjects stay under 80 characters; never push to `main`.
+- **Production infrastructure needs scoped approval:** growing a volume, and any root operation on a flagship box.
+- **Operate via API and CLI.** The exceptions are the switch-over's one root command and spec §7.7's failure path, both over SSM inside an approved window.
+- **Wire shapes are additive:** new status, door and receipt fields are added, never renamed, and old readers ignore them.
+- **Provider-neutral core:** Linux features only, no cloud API.
+- **Go here:**
+ - Pure Go (`CGO_ENABLED=0`): `fsopen`, `fsmount`, `move_mount`, `LOOP_CONFIGURE` and `LOOP_GET_STATUS64` go through `golang.org/x/sys/unix`.
+ - Linux-only code sits behind build tags with `_other.go` stubs, because the cross-compile gate builds darwin and windows.
+ - Functions stay under 300 lines and files under 3,000.
+ - Tests wait on seams, not sleeps.
+ - `make code-health` passes before each push.
+- **Tests:** targeted `-run` on changed packages while iterating, and the full gate once before handing a branch off. Root-runner tests compile under `-tags rootrunner`. A root-runner test may activate a disk through the internal enable function; production activation is only slice 9's verb.
+- **User-facing text** (status fields, alert text, CLI output) goes through copy review, and any console surface through the UX pass, before merge.
+
+## The pinned format (spec D3, settled here)
+
+Task 1 and production use exactly this command. Production runs it only in slice 9's enable step.
+
+```
+MKE2FS_CONFIG=/dev/null /usr/sbin/mkfs.ext4 -q -F -t ext4 \
+ -b 4096 -I 256 -N 262144 -m 0 -J size=32 -L carlos-demo \
+ -O none,has_journal,ext_attr,dir_index,filetype,extent,64bit,flex_bg,sparse_super,large_file,huge_file,dir_nlink,extra_isize,metadata_csum \
+ -E nodiscard,lazy_itable_init=0,lazy_journal_init=0,root_owner=<carlos uid>:<carlos gid> \
+ <store>/demo.img.new 1048576
+```
+
+### One validator (the controller's ruling on the geometry family)
+
+Every reading of the image or of the mounted demo filesystems goes through **one package**, `internal/demodisk`. Its functions are used by the boot helpers, enable, control's door and pre-start checks, and the agent's wake check. A guard test fails if any other package runs `dumpe2fs`, parses superblock output, or compares a receipt.
+
+It separates three things that rev 2 mixed.
+
+**1. Provenance and permanent geometry: `CheckFormat`.** It runs on the image file, never on a mounted or loop-associated image. It checks the descriptor checks of D2 (owner root, mode 0600, link count 1, exact size, store ancestors), then these **stable** superblock fields only:
+
+| Field | Expected value |
+|---|---|
+| Block size | 4096 |
+| Block count | 1048576 |
+| Inode count | 262144 |
+| Inode size | 256 |
+| Reserved block count | 0 |
+| Blocks per group | 32768 |
+| Inodes per group | 8192 |
+| Journal | present (`has_journal`); `Total journal size` 32M (the label `dumpe2fs -h` prints in e2fsprogs 1.47.2; task 1) |
+| Filesystem volume name | carlos-demo |
+| Permanent features | exactly the 13 listed in the `-O` option, after `none` |
+
+It never compares UUIDs, hash seeds, timestamps, free block or inode counts, mount counts, the last-mounted path, or the error and check history: these change in normal use. Task 1 records one full `dumpe2fs -h` output for reference only.
+
+**2. Recovery state: `NeedsRecovery`.** These are the fields that may legitimately differ after an unclean shutdown:
+- the `needs_recovery` feature (ext4's incompat RECOVER bit, which e2fsprogs prints among the features);
+- a filesystem state other than `clean`.
+
+They are allowed **only on an image that no loop device backs** (decision 10's reconciliation finds none). Any other extra or missing feature is a format failure, never recovery.
+
+**3. The sequence before any mount** (boot helper only; enable makes a fresh image and then runs steps 1 and 4):
+1. `CheckFormat` passes, with recovery state allowed.
+2. If `NeedsRecovery`, run `e2fsck -p`. Exit 0 or 1 continues; anything else leaves the disk unmounted and reported (spec §9 F4).
+3. Read the superblock again.
+4. `CheckClean`: `CheckFormat` with recovery state **not** allowed. That means exactly the 13 features, no `needs_recovery`, and state `clean`.
+5. Mount.
+
+**Already mounted (a helper rerun):** if a loop device backed by this image is already mounted at `/data/.instances`, the helper never runs `dumpe2fs`, never runs `e2fsck`, and never re-mounts. A mounted ext4 carries `needs_recovery` by design. It verifies instead through `VerifyMounted`:
+- the loop device's backing identity (`LOOP_GET_STATUS64` device and inode equal the image's);
+- `statfs` of each mount against the receipt.
+
+Control and the agent use only `VerifyMounted`'s receipt comparison, from their own namespaces (D11). It compares the receipt's `f_type`, `f_bsize`, `f_blocks`, `f_files`, `f_flags` and device. Those are stable for a mounted filesystem. Free counts are never compared.
+
+**Witnesses for the validator** (root runner, slice 5, with test activation):
+- **clean boot:** `CheckFormat` then `CheckClean`, no `e2fsck`, mount;
+- **dirty-shutdown recovery:** demos writing, then an unclean reset (`echo b > /proc/sysrq-trigger`). At the next boot the image shows `needs_recovery`; `CheckFormat` passes with recovery allowed; `e2fsck -p` runs; `CheckClean` passes; it mounts and demos wake with their data;
+- **mounted-helper rerun:** `systemctl restart carlos-demo-disk.service` while mounted: no `dumpe2fs` or `e2fsck` call (a seam counts them), no second loop device, the same receipt.
+
+Unit tests feed recorded superblock outputs: clean; `needs_recovery`; not clean; one extra permanent feature; one missing feature; a wrong count. Each gets the right verdict in each mode, and recovery state on an associated image is refused.
+
+## Task 1: settle the decisive facts (root runner and dev demo box; stop if any fails)
+
+No slice code is written until this is done. Each item is decisive: a failure stops the plan, and the finding goes to Paul with the cut options (spec §9 F13, §13). The root runner is its own approval scope (`root-runner`); the dev demo box is a separate scope.
+
+1. **W2 prototype: boot-time mounts, receipt and verification inside both generated units.** On the root runner, build a hand-made prototype, not merged code:
+ - an image made by the pinned command above, its superblock checked against the stable fields;
+ - a scratch phase-1 and phase-2 oneshot with D6's ordering lines;
+ - mounts by descriptor at boot: the demo disk, the run tmpfs, and **both** probe tmpfs (`/data/instances/_probe` and `/run/carlos/instances/_probe`);
+ - a receipt written as D10 specifies.
+
+ Then:
+ - `systemd-analyze verify` on the unit set reports no cycle.
+ - A prototype of D11's comparison runs inside the generated control unit and inside the generated agent unit. It is a test binary started in each unit's own namespace (`systemd-run` with that unit's properties, or a debug verb in the shipped binary), not a look through `/proc/<pid>/root`. Each records, separately:
+ - its `statfs` of each of the four mounts against the receipt;
+ - the device comparison with `/data`;
+ - the resulting state.
+ - Then repeat with each refusal case and record the refusal for each: receipt missing, receipt device wrong, one total wrong, one flag missing, store unreadable, and image present with no mount.
+ - A native demo and a gVisor demo see their data and run dirs on the demo disk and run tmpfs.
+ - The probe units see both probe tmpfs.
+ - A clean shutdown leaves no busy-unmount error and no loop device.
+ - Ext4's `statfs` `f_blocks` is recorded beside the superblock block count (D10).
+2. **W3: native temporary directories.** In a native demo under the demo drop-in, record what backs `/tmp` and `/var/tmp`, with `PrivateTmp=yes` and then with `PrivateTmp=disconnected`. With `disconnected`, write past the memory cap: the host `/var/tmp` does not grow, and it composes with the drop-in's read-only `/var`.
+3. **W11: purge from the generated control unit.** On the dev demo box, read the effective generated control unit (`systemctl show`, `claimUnitContent`'s `ReadWritePaths=`). Run one complete demo purge and record that every removal lands. Repeat on the root runner with the prototype disk mounted, so `/data/.instances` is a submount of the writable `/data`.
+4. **Legacy geometry and control's memory** (for slice 3). Read from each demo box, through status:
+ - the root volume's `statfs` `f_files` and `f_ffree`;
+ - control's effective `MemoryMax` in the generated unit (256 MiB by default; 1 GiB with the build worker, `replaceClaimControlMemory`).
+5. **Facts the slices need,** recorded on #1096:
+ - the flagship demo box's root volume size and current use;
+ - staged build outputs held per demo today, and the box's demo build concurrency;
+ - `e2fsprogs` version and the loop driver on both demo boxes;
+ - no non-demo instance on either demo box.
+
+**Finish line:** a task-1 note on #1096 with every result, including each comparison and refusal recorded separately, and Paul told. Any failure: stop.
+
+**Results (2026-11-29): PASS, with Paul's cut option (a).** See `docs/superpowers/notes/2026-11-29-demo-disk-task1-results.md`.
+
+- The first runs stopped on W2's clean shutdown: the views unmounted busy under the probe tmpfs, in three runs.
+- Paul chose option (a): phase 2 stays active (`RemainAfterExit=yes`) and its `ExecStop=` unmounts both probe tmpfs. The re-run passed twice, and every other fact passes.
+- The spec (rev 4.2) and slices 2, 5, 6 and task 2 below carry the corrections.
+
+## Task 2: consumer audit (code only, before slice 4)
+
+1. **Search.** Grep every use of:
+ - `RawInstanceDir`, `rawInstanceDir`, `rawRunDir`, `InstanceRunDir`, `NestedDBPath`, `DataRoot`, `DemoRunRoot`;
+ - the literals `/data/instances`, `/data/.instances`, `/run/carlos/instances` and `/run/carlos/.instances`;
+ - every `rename`/`Renameat*`, `os.SameFile` and `st_dev` comparison that can touch those trees;
+ - every reader that lists `/data/instances` or `/data/.instances` (the layout pass, readiness sweeps, status, census, the look under the views). Each must handle the root-owned `lost+found` (0700, made by `mkfs`) at the demo disk's root, and the probe tmpfs at both `/data/instances/_probe` and `/data/.instances/_probe` (task 1).
+
+ Write the list to `docs/superpowers/notes/2026-11-29-demo-disk-task2-audit.md` (the coordinator's name for it; done 2026-11-29), with one row per consumer and every site listed.
+2. **A disposition for each site:**
+ - **unaffected:** stays on one filesystem;
+ - **cross-device:** a rename that would cross the demo disk boundary, with the fix;
+ - **device comparison:** what it compares and why it stays right;
+ - **unreachable for demos:** with the guard that makes it so.
+3. **Refusal tests where reachability is the safety argument.** Each lands with the slice that owns the consumer, or with slice 5 if none does:
+ - activator set-aside (`internal/activator/startrule.go:251`) refuses for a demo route, or is shown unreachable by a test;
+ - claim-census migration refuses a demo route;
+ - offline moves refuse a demo route;
+ - flat-to-nested layout migration refuses or never sees a demo.
+4. **Finish line:** the note merged, with every site disposed of and every refusal test named.
+
+**Results (2026-11-29):** `docs/superpowers/notes/2026-11-29-demo-disk-task2-audit.md`. 33 consumers: 20 unaffected, 6 that change in a named slice, 7 that must refuse.
+
+- The set-aside, layout migration, the claim family (claim-census migration included), region HA and seeds are unreachable for demos. Their tests pass today and stay as guards.
+- **Offline operator moves are reachable today.** Their pending test (tag `demodiskaudit`) fails, and slice 5 adds the refusal.
+- Slice 5 also handles mkfs's `lost+found` in the box listing and the boot run sweep, each with a pending test.
+
+## Slice 1: bounded build-output retention, and the numbers (first; visible)
+
+Paul's Q3 and Q4 answer: retention shrinks the biggest term in the capacity sum, and the volume is measured after it.
+
+1. **The deletion-safety contract.** Retention for demo apps:
+ - **Pin sources, all of them:**
+ - live links (`release.LivePins`);
+ - every registry row, demo or not;
+ - settings pins (`settingsPins`);
+ - generation pins (`release.GenerationPins` over the generations file);
+ - root generation pins (`productionRootGenerationPins`, the source today's sweep is given, `internal/host/agent.go:6146`).
+
+ A source that cannot be read in full makes the pass delete nothing.
+ - **Exclusion:** retention runs inside the adopt pass, under the adoption pass lock (`lockAdoptPass`, `agent.go:6075`), held from the first pin read until the last removal. With no lock, it does nothing.
+ - **When:** after every actual adoption of a demo version, in whatever pass adopted it: the hourly pass, relayed adoption, and `-stage-only`, which on hardened boxes stages **and adopts** a relayed version (`internal/host/agent.go:6303`). Also in the hourly pass as a backstop. Never in a `-config-only` or `-restart-only` pass, which adopts nothing.
+ - **Staged but not adopted:** a demo app's version staged after its newest adopted version is in flight and kept until a later pass sees it adopted or superseded.
+ - **What is kept per demo app:**
+ - the complete **distinct** pin set (below);
+ - pending outputs;
+ - nothing else.
+
+ The rollback is `PrevVersion`, already a pin.
+ - **Deletion unit:** per app. Retention removes `<version>/<account>/<app>` and its `.manifest.json` beneath the version store with no symlinks, as `purgeDemoVersions` does. It never removes a whole version directory, which can hold other apps. The existing time-graced sweep (`release.SweepStaged`) stays the only remover of whole version directories, and is unchanged.
+ - **Non-demo apps** are untouched.
+ - **Failure and backlog.** A retention run that cannot take the lock or read a source deletes nothing and logs why. The next adoption or hourly pass retries. Box status reports **retention backlog**: the demo versions held beyond the bound, and since when. While it is non-zero the root-volume disk alert is the guard, and a backlog older than 24 hours raises its own status line for the operator.
+2. **Tests:**
+ - 61 updates leave pinned, in-flight and one rollback version only;
+ - a version pinned only by a root generation pin survives;
+ - a version pinned only by a settings pin survives;
+ - an unreadable source deletes nothing;
+ - a pass that cannot take the lock deletes nothing;
+ - a staged, not yet adopted version survives;
+ - a version directory shared with a non-demo app keeps the non-demo app's files and the directory;
+ - concurrent adoption: a second pass blocked on the lock, then run, deletes nothing the first adopted (a seam, not a sleep);
+ - **successive relayed updates with no hourly pass:** ten `-stage-only` adoptions in a row keep the store within the bound after each;
+ - **distinct pin values:** a demo route whose `Version`, `PrevVersion`, `GoodVersion`, settings pin, `LastExecuted` and resolved target all name different builds, plus a root generation pin on a seventh build: all seven survive, and only the unpinned ones go;
+ - a failed run (lock busy, then an unreadable source) deletes nothing and reports backlog; the next run clears it;
+ - **failed outputs do not accumulate:** three jobs for one demo each stage an output and fail settlement (never adopted). Before each next stage, the previous unadopted, unpinned output is removed, so the store holds the pins plus at most one unadopted output after every step. When the cleanup cannot read a pin source, the new stage is refused and nothing is deleted.
+3. **The numbers Paul sees (spec slice 1):**
+ - Box status gains free inodes on `/data`, free bytes and inodes on `/run`, and staged build-output bytes held for demos.
+ - The disk alert reads the higher of blocks and inodes used, on `/data` and `/run`, and on any filesystem a later slice reports.
+ - **Tests:** the fields are additive; the alert fires on inodes alone; the incident lifecycle runs through the alerts engine's tests.
+ - Copy review for the text.
+4. **Capacity, as a bound from the complete distinct pin set, not an observation.**
+ - **Per demo app,** the distinct union of:
+ - the registry's `Version`, `PrevVersion` and `GoodVersion` (`internal/release/pins.go:138`);
+ - the settings pin, `LastExecuted` and the resolved target (`SettingsRefs`, `pins.go:197`);
+ - the live link, which names `Version`;
+ - the previous link (`<opt>/previous/<host>`), which after a failed adoption rolls back names the failed build, which no row names;
+ - generation pins (none for gVisor demos, which have no generation overlap; natively at most what the generations file holds for the app, G);
+ - reserved trees on the box that cover one of the app's outputs (R): a root generation's Tree is `<ver>/<demo account>`, shared by every demo, so one native demo's reservation at demo.n keeps every demo's demo.n output; R can be as large as the number of distinct reserved versions on the box.
+ - So at most 7 + G + R builds.
+ - **Pending outputs: at most one per demo, enforced on the box.** `ActiveJobID` alone does not bound them: a failed settlement frees the job slot (`internal/console/demo_publish.go:370`) without proving the output was adopted or removed. So before the box stages a new output for a demo app, under the adoption lock, it deletes every staged version of that app that is neither adopted nor pinned (a failed job's leftover). This uses the same selection and per-app deletion as retention, in the staging pass (`-stage-only` or the hourly pass). If that cleanup cannot run in full (lock busy, a pin source unreadable), the new output is **not staged**: the stage fails, the job fails, and the next attempt retries the cleanup first. So a demo never holds more than one unadopted output. The pass admits a demo route only with the adoption lock held on a correctly configured demo box, before it can reuse, restage or adopt any output (`release.WithRouteAdmission`). An app held by a registry row that is not a valid demo binding, or by unread settings references, keeps everything, reports what it keeps beyond the bound as backlog with the reason, and stages nothing new.
+ - **Bound per demo:** (8 + G + R) × 32 MiB: the 7 + G + R pins and one pending output. Under gVisor (G = R = 0): 256 MiB, and 5.0 GiB for 20 demos. Natively, with G = 1 and one root reservation per demo at distinct versions (R ≤ 20): 928 MiB a demo, about 18.1 GiB for 20; more reservations raise R. Executable bytes only: manifests, filesystem overhead and crash-left temporary files are outside these totals, and after a repoint whose registry stamp failed the live link names one more build until the next stamp.
+ - The worst case is written into spec §10's sum for the flagship box with task 1's volume size.
+ - After the dev roll, the observed numbers are recorded beside the bound, not instead of it.
+ - If the sum does not fit 20 demos, stop and ask Paul: scoped volume growth, or a lower `CARLOS_DEMO_MAX_LIVE`.
+
+Census applies (`internal/release`, `internal/host`). Usual dev-first roll.
+
+## Slice 2: native demos use `PrivateTmp=disconnected` (D13)
+
+- Add `PrivateTmp=disconnected` to `internal/host/demo_units/demo.conf`, and read it back in `assertDemoUnit` (`internal/instancectl/demo_policy.go`) from `PrivateTmpEx=`, which shows `connected` or `disconnected`. `PrivateTmp=` shows `yes` for both modes on systemd 257 (task 1).
+- **Tests:** a unit-text test, and a readback test that fails without it.
+- **Witness:** W3 on the root runner, and on the dev demo box if it runs native.
+- Independent of the demo disk; live on release. Census applies (`internal/host` embeds the drop-in).
+
+## Slice 3: unlink-only purge on capped filesystems (§7.5)
+
+1. **The walk.** A new removal in `internal/instancefs` (Linux, with an `_other` stub):
+ - descends with `openat2` beneath, `RESOLVE_NO_SYMLINKS`;
+ - climbs with `..`, checked against a stack of `(device, inode)` pairs; a mismatch is an error, never success;
+ - finds a child in its parent by inode number;
+ - removes only with `unlinkat` and `unlinkat(AT_REMOVEDIR)`;
+ - holds at most three descriptors;
+ - reads directory entries in batches of 256.
+2. **Memory, on every geometry it runs on.**
+ - The stack grows with the actual depth (16 bytes a level), never preallocated from `f_files`. Peak memory is 16 bytes × depth plus one batch buffer.
+ - Depth is at most the filesystem's inode count: 262,144 levels (4 MiB) on the demo disk.
+ - On today's root volume, task 1's `f_files` sets the worst case. If 16 bytes × `f_files` stays under half of control's effective `MemoryMax`, the walk also replaces today's removal for demo purge on the legacy root volume.
+ - If it does not, the walk stays limited to the demo disk and run tmpfs. Legacy purge keeps today's remover, which can hoist because it runs on a volume that is not the capped one. The decision is recorded on #1096 with the numbers.
+3. **Purge uses it** (`internal/instancectl/demo_cleanup.go`) for the data and run directories and for each of the three DB names, in today's order. A directory planted at `<host>.db-wal` is then removed, not refused. Version removal keeps `purgeDemoVersions`' unlink-then-select order unchanged.
+4. **Tests:**
+ - a guard test that the walk calls no rename and no create (a syscall seam);
+ - a file or a tree at a DB name;
+ - a swapped `..` is an error;
+ - an interrupted walk resumes;
+ - peak heap measured for a chain of known depth, and linear in depth.
+5. **Witnesses** (root runner, `-tags rootrunner`):
+ - **W12 (capped):** on a small loop ext4, a chain past 65,536 levels under `<host>.db-wal`, a packed top directory, and a hard-linked filler that fills the disk. Purge completes and the space returns.
+ - **W12-legacy (if the walk runs on the root volume):** on an ext4 with the flagship root volume's geometry from task 1, the deepest chain the test can build in its time budget, purged by control's code under its effective `MemoryMax` in a matching cgroup. It completes, and peak memory matches the formula.
+ - **W11** again on the dev demo box after release.
+
+Census applies.
+
+## Slice 4: the store and the activation-state door (release A; enforces nothing)
+
+1. **The store exists before anything reads it.**
+ - The generated control unit on demo boxes gains `StateDirectory=carlos-demo-disk` with `StateDirectoryMode=0700`. systemd creates `/var/lib/carlos-demo-disk` root-owned before control starts.
+ - The phase-1 helper unit is installed in this release with only its store step: on a demo box at boot it makes the store if absent (root, 0700, through D2's descriptor checks) and does nothing else.
+ - Status reports `demo disk store: present` or `absent`, from control.
+2. **The door, answering only.**
+ - Control's `GET /demo-disk` answers `legacy`, `mounted` or `unavailable` per D11. The store, image, marker and receipt reads are all by descriptor.
+ - With no image and no marker it answers `legacy`. A missing or unreadable store answers `unavailable`.
+ - Nothing calls the door yet, and nothing refuses on it.
+3. **Tests:**
+ - the store checks (symlinked or carlos-owned ancestor, wrong mode);
+ - each of the door's three answers, including every error giving `unavailable`;
+ - unit text for the `StateDirectory=` lines and the helper.
+4. **Intermediate-release witness (IR, below).**
+
+Census applies.
+
+## Slice 5: mount path, receipt and enforcement (release B; still no image)
+
+Precondition for rolling release B to a box: release A is on it, and its status shows the store present and the door answering `legacy`.
+
+1. **Phase-1 helper, full** (D2, D5 to D7, D9, D10), except creation:
+ - check activation from host.env;
+ - if the disk is already mounted from this image: `VerifyMounted` only; no fsck, no remount (the validator's rerun case);
+ - otherwise, if `demo.img` **and** the `activated` marker both exist:
+ - reconcile loop devices by backing identity, refusing if any association remains;
+ - refuse over a non-empty underlying `/data/.instances`;
+ - run the validator's sequence (`CheckFormat` with recovery allowed, `e2fsck -p` if needed, `CheckClean`);
+ - `LOOP_CONFIGURE` from the descriptor, discard off, re-`fallocate`;
+ - mount the disk and the run tmpfs by descriptor with the four flags;
+ - write the receipt.
+ - An image without the marker, or the marker without an image, is not mounted: it is reported for the operator (slice 9's retry rules).
+ - With neither: nothing. **It never creates an image.**
+2. **Enforcement (D11).**
+ - Control's pre-start checks refuse a demo start on anything but `legacy` or a verified `mounted`.
+ - The activator asks the door after the termination proof and before `Restore` (`internal/activator/activator.go`, between the `wakeHostProven` block and step 2), and on `mounted` repeats the comparison from its own namespace.
+ - A failed request, a timeout, a 404 from an older control, or an unknown answer counts as `unavailable`.
+ - This is why release A goes first: on every box, the door exists and the store is present before any agent depends on them.
+3. **Consumers:** task 2's refusal tests for every consumer this slice owns, and control's start-time look under the bind mounts accepting the demo disk.
+4. **Tests:** spec §14's helper, format, receipt and activation tests.
+5. **Witnesses on the root runner** (test activation), native and gVisor:
+ - the validator's three witnesses: clean boot, dirty-shutdown recovery, mounted-helper rerun;
+ - W5: reboot, `e2fsck -p`, mount, receipt, wake with data;
+ - W8: `fstrim -av` keeps the image's allocation;
+ - **IR**.
+
+Census applies.
+
+## Slice 6: the probe's own tmpfs (D8)
+
+1. **Phase-2 helper.** `carlos-demo-probe-space.service`, with D6's phase-2 lines, including Paul's option (a): `RemainAfterExit=yes` and an `ExecStop=` stop verb that unmounts both probe tmpfs (skipping a path that is not a mount root). It acts only when the demo disk is mounted: it mounts a tmpfs (`size=1M,nr_inodes=64`, the four flags) by descriptor on `/data/instances/_probe` and on `/run/carlos/instances/_probe`, and adds both to the receipt.
+2. **D11 now requires both probe mounts in the receipt for `mounted`.**
+3. **Control's start-time look under the bind mounts** (`carlos-instance-control.service` comment, lines 17-25). A plain `umount` of a view now fails "busy" under the probe tmpfs, and the listing would then read the demo disk itself. So the look unmounts the probe tmpfs first (or unmounts recursively), expects the view's mountpoint directory on the root volume to be empty, and still reports anything else it finds (spec §8).
+4. **Unchanged:** the probe's code and checks.
+5. **Control's pre-start check** reads the demo disk's and run tmpfs's `statfs` flags.
+6. **Tests:**
+ - unit text;
+ - receipt entries;
+ - control refuses a demo filesystem missing a flag;
+ - the under-view inspection accepts the probe submounts and still reports a stray file.
+7. **Witnesses on the root runner** (test activation), native and gVisor:
+ - **W2 complete:** task 1's comparisons and refusals, repeated with production code inside both generated units, and the clean-shutdown witness: no "target is busy", no loop device left after the mounts' stop jobs, the next boot clean;
+ - **W6:** fill the run tmpfs; `/run` free bytes and inodes do not move; the probe reruns and passes; a build and a claim export complete;
+ - **IR**.
+
+Census applies.
+
+## Slice 7: floors on the right filesystems (D12)
+
+- `diskRoom` gets its own root-volume path (`/data`). `DataRoot` stays `/data/instances` because purge uses it (`internal/instancectl/hardening.go`, `server.go`).
+- Demo starts need 5% of blocks **and** 5% of inodes free on the demo disk and on the run tmpfs, and get the existing insufficient-storage refusal below that.
+- **Tests:**
+ - `diskRoom` reads the root volume, never the demo disk;
+ - each floor fails alone on blocks and alone on inodes;
+ - non-demo boxes are unchanged.
+- **IR.** Census applies.
+
+## Slice 8: CLI diagnostics and clearing (§7.6)
+
+1. **Visible numbers (agent, `internal/host`).** While the demo disk or the run tmpfs is over the alert threshold, the agent computes visible bytes and entries for each demo on both devices. It uses a read-only walk (openat2 beneath, no symlinks), on a timer, only while over the threshold.
+2. **Held numbers (root, in control).**
+ - For each demo's cgroup processes, `stat` (never open) each `/proc/<pid>/fd/<n>`.
+ - Keep those with link count 0 on the demo disk's or the run tmpfs's device, from the receipt.
+ - Per device, sum allocated bytes and count distinct `(device, inode)` pairs.
+ - Serve the results to the agent through a control door with no request input.
+3. **Status and CLI.**
+ - `GET /api/cli/system/demos` and `carlos system demos status` gain both devices' bytes and inodes, used and free.
+ - They gain the usage table: awake, and per device visible bytes and entries, held bytes and held inodes.
+ - Each device gets an unexplained-use line.
+ - All fields additive; copy review for the labels; `docs/site/cli.md` describes the output. No new command, so no parity row.
+4. **Runbook** `docs/superpowers/runbooks/demo-disk.md`:
+ - the four clearing steps;
+ - the five-step CLI-only fallback, ending in confirmed cleanup and measured capacity;
+ - the switch-over (below);
+ - the §7.7 failure path, with Paul's OK before any data is deleted.
+5. **Witness W4** on the root runner (test activation), native and gVisor:
+ - held bytes on each device;
+ - held inodes with no bytes on each device;
+ - one file opened many times, counted once;
+ - the fallback with the diagnostic forced to fail.
+
+ Each case is cleared by the CLI with measured recovery. Plus **IR**.
+
+**Census applies to both halves:** the control code and the agent code in `internal/host`. The console code is outside the census and goes through the whole-branch review.
+
+## Slice 9: the enable step (release C; the activation-ready release)
+
+1. **`carlos demo-disk enable`: create-only, under exclusion.** A root verb of the platform binary (hidden, internal audience; its `parity/cli.tsv` row marked internal like `__demo-snapshot`). Run over SSM in the switch-over.
+ - **Exclusion.** It takes the store lock (`flock(LOCK_EX|LOCK_NB)` on the store directory descriptor, the same lock the boot helper holds). A busy lock refuses with "another demo-disk operation is running"; it never waits and never proceeds.
+ - **Preconditions:** activation from host.env; the store checks.
+ - **State table.** It reads `demo.img` and the `activated` marker by descriptor and acts only on the first row. Every other row leaves the image's identity (device, inode) and contents untouched.
+
+ | `demo.img` | marker | Outcome |
+ |---|---|---|
+ | absent | absent | **create** (below) |
+ | present | absent | **finish an interrupted enable:** `CheckClean` on the image, with no loop association. If it passes, write the marker (`O_EXCL`) and stop. If it fails, refuse and report: a replacement needs Paul's OK through §7.7. It never re-creates. |
+ | present | present | **refuse: already enabled.** This includes a populated image after a failed boot mount. |
+ | absent | present | **refuse: the disk was lost or deleted.** The only way on is §7.7's path with Paul's explicit OK, which runs `enable --after-loss`. That flag is valid only in this row, and it creates as below, keeping the marker. |
+
+ - **Create** (the absent/absent row, or absent/present with `--after-loss`):
+ - **first, with the store lock held and the state table already read, delete every abandoned `demo.img.new.*` temporary** and `fsync` the store. Only names matching `demo.img.new.` plus the random suffix are removed. `demo.img` and the marker are never touched by this step;
+ - refuse unless the underlying `/data/.instances` holds only `_probe` and empty directories (W9);
+ - only now, refuse unless the reservation room holds (D5), measured after the temporaries' space is freed;
+ - create `demo.img.new.<random>` with `O_EXCL`, `fallocate`, run the pinned command, then `CheckClean`, `fsync`;
+ - **publish with `renameat2(RENAME_NOREPLACE)`** to `demo.img`, which fails with EEXIST rather than replace anything, then `fsync` the store;
+ - write the marker with `O_EXCL`, then `fsync`.
+
+ A crash before publish leaves only a `.new` file. A crash after publish but before the marker is the present/absent row.
+ - It does not mount; the reboot does.
+2. **Before merge,** the release containing this verb must also contain slices 4 to 8. The verb refuses to run unless every one of them is present: the phase-2 unit file is installed, and the door, floors and diagnostics answer in the binary's own build.
+3. **Tests:**
+ - each row of the state table;
+ - a **populated image after a failed mount:** image with demo data, marker present, underlying directory empty. Enable refuses, and the image's device, inode and content checksum are unchanged;
+ - **concurrent enables** (two processes released together through a seam): exactly one creates; the other refuses on the lock; the published image is the first one's;
+ - `RENAME_NOREPLACE` publication refusing over an existing `demo.img` planted between the check and the rename;
+ - a crash injected after publish and before the marker, then a retry that writes only the marker;
+ - **crash after allocation, with room for exactly one image:** on a test filesystem sized so the floor, the claim scratch and one 4 GiB image fit and no more, a crash injected after `fallocate` (and again after `mkfs`) of `demo.img.new.<random>`. The retry removes the temporary, passes the room check, creates and publishes with no extra capacity. Run once for the initial enable and once for `--after-loss`. The marker and any existing final image are untouched by the cleanup;
+ - `--after-loss` refused in every row but absent/present;
+ - refusal over a non-empty directory, without room, on a non-demo box;
+ - the pinned arguments and environment.
+4. **The full witness on the root runner,** native and gVisor, with the real verb:
+ - **W1:** a demo fills the demo disk with bytes, then with inodes. The root volume's and `/run`'s free bytes **and** inodes do not move. The edge, the agent and control answer their health checks throughout. With the disk still full, the probe reruns and passes, a build completes and a claim export completes. The alert fires; `carlos system demos status` names the cause and the demo; takedown frees the space; another demo wakes.
+ - **W7:** a claim of a demo on the demo disk exports, and **the claimed app starts** on its target with the data.
+ - **W12** through a real takedown on the full disk.
+ - **W9:** enable refused over live demo data, and the boot helper refusing to mount over it.
+
+ Results go on #1096.
+
+## IR: the intermediate-release witness (every release from slice 4 to slice 9)
+
+Before each of releases A, B and the slice 6, 7, 8 and 9 releases rolls to a demo box, the root runner (and then the dev demo box after roll) shows:
+1. **live upgrade without reboot:** adopt the release with demos live; they keep serving and wake; the door answers `legacy`; no image exists;
+2. **empty-box reboot:** reboot with no demos; nothing makes an image; the store is present; the door answers `legacy`; a new demo is created and wakes;
+3. **reboot with existing demo data:** reboot with live demos; nothing is mounted over them; they wake with their data; the door answers `legacy`.
+
+In every intermediate release, legacy operation keeps working and no image is created. Release C adds the enable verb, but nothing runs it until the switch-over.
+
+## Operation: switch-over (dev, then flagship), with Paul's GO
+
+An operation, not a build session. **Requires:**
+- release C rolled to the box;
+- the slice 9 full witness passed;
+- task 1 facts recorded;
+- the capacity sum fits (slice 1, step 4);
+- for flagship: a booked #421 window, release-lock coordination with 8a3d302, and Paul's explicit GO.
+
+The dev demo box goes first, within the dated commitment.
+
+**Steps (spec §7.8, Paul's option a):**
+1. `carlos system demos serving off`.
+2. Let claims in flight finish (`carlos system demos status`).
+3. Take down the remaining demos with `carlos system demos takedown --host <host>`.
+4. Confirm each cleanup with `takedown-status --host <host>` until it is no longer pending, and confirm the box shows no demo directories.
+5. Over SSM, run `carlos demo-disk enable`. If it refuses (W9: live data present), go back to step 3; never force it.
+6. Reboot the box. The phase-1 helper mounts the disk and run tmpfs; the phase-2 helper mounts the probe space.
+7. Check:
+ - the door answers `mounted` and the receipt is present;
+ - the probe passes;
+ - a disposable witness demo is created, woken and claimed, and the claimed app starts (W7);
+ - status shows the demo disk.
+8. `carlos system demos serving on`.
+
+Record the box, times and results in the roll log and on #1096. **W9** is this operation, including the refusal, on the dev box.
+
+**Rollback:**
+1. Serving off.
+2. Revert the release.
+3. Do not reboot until the demos made after the switch have expired.
+4. Deleting the image needs Paul's explicit OK (spec §13).
+
+**Failed check at boot (§7.7):** serving stays off. An operator repairs it by hand; deleting the image and accepting the loss of demo data needs Paul's explicit OK; serving goes back on only after the new mount is verified.
+
+## Witness map
+
+| Witness | What | Owner |
+|---|---|---|
+| W1 | full demo disk: protected filesystems' bytes and inodes unchanged; edge, agent, control responsive; probe, build, claim keep working; alert; CLI clears | slice 9 (root runner); dev box after switch |
+| W2 | boot-time mounts; receipt comparisons and refusals inside both generated units; both probe mounts; no cycle; clean shutdown | task 1 (prototype); slice 6 (production) |
+| W3 | native `/tmp` and `/var/tmp` | task 1; slice 2 |
+| W4 | held bytes and held inodes on both devices; fallback | slice 8 |
+| W5 | reboot: fsck, mount, receipt, wake with data | slice 5; dev box after switch |
+| W6 | full run tmpfs: `/run` unaffected; probe, build, claim keep working | slice 6 |
+| W7 | claim export from the demo disk, and the claimed app starts | slice 9; switch-over step 7 |
+| W8 | `fstrim` keeps the reservation | slice 5 |
+| W9 | switch refused over live data; done on an empty box | slice 9 tests; switch-over |
+| W10 | retired in spec rev 3 (per-demo run mounts cut) | none |
+| W11 | purge from the generated control unit | task 1; slice 3 |
+| W12 | full-disk cleanup of a deep, packed, linked tree; legacy geometry within control's memory | slice 3; slice 9 through takedown |
+| IR | live upgrade, empty-box reboot, reboot with demo data: legacy holds, no image | every release from slice 4 to 9 |
+| V | the validator: clean boot, dirty-shutdown recovery, mounted-helper rerun | slice 5 |
+| E | enable's state table, populated image after a failed mount, concurrent enables | slice 9 |
+
+## Not in this plan
+
+- Per-demo isolation between demos (cut by Paul, spec rev 3).
+- A visitor page for a full disk (Paul's Q5).
+- Growing the flagship volume: only if slice 1's bound says so, and only with Paul's scoped approval.
+- Shared pools and non-demo instances.
+
+## Round 1 findings and where they went
+
+| Finding | Family | Disposition |
+|---|---|---|
+| P1 slice 4 not inactive alone; store must exist before checks | activation only after all safety prerequisites exist | The helper never creates an image; only slice 9's enable verb does, and it ships only with slices 4 to 8 and refuses without them. Release A creates the store (`StateDirectory=` and the helper's store step) and the door before release B enforces anything. The IR witness (live upgrade, empty-box reboot, reboot with data) runs on every intermediate release. |
+| P2 retention deletion-safety contract | never delete a build still in use or being adopted | Complete pin sources including root generation pins; the adoption lock held from collection through deletion; staged-but-not-adopted kept; per-app deletion only; witnesses for a root-only pin, concurrent adoption and a shared version; capacity as a bound including pins and in-flight builds (slice 1). |
+| P2 task 1 W2 weaker than the gate | verification inside the actual execution boundary | The task 1 prototype runs the receipt comparison inside both generated units, with both probe mounts and every refusal recorded; repeated with production code in slice 6 (W2 complete). |
+| P2 consumer audit has no task | every consumer of the changed layout remains valid | Task 2: exhaustive search, a disposition per site, refusal tests for set-aside, claim-census migration, offline moves and layout migration. |
+| P2 feature set undecided | reproducible, verified geometry | "The pinned format": exact command, feature set and expected superblock values, checked before every mount. |
+| P2 slice 3 memory on today's root volume | reclamation within control's resource limits | The stack grows with depth; peak = 16 B × depth; task 1 measures legacy `f_files` and control's `MemoryMax`; the walk runs on the legacy volume only if it fits half the budget; W12-legacy witness (slice 3). |
+| P2 witness assertions lost | acceptance tests prove the promised outcome | W7 includes the claimed app starting; W9 includes the refusal; W1 checks responsiveness and bytes and inodes on both protected filesystems; slice 6 updates the under-view inspection for probe submounts; slice 8 keeps the census for its agent half. |
+| Merge gate on a booked window | | Dropped. Kept: a dated switch-on commitment, and a booked window, release-lock coordination and Paul's GO before the switch-over. |
+
+## Round 2 findings and where they went (stopping rule 2 on geometry; controller ruling: centralize)
+
+| Finding | Family | Disposition |
+|---|---|---|
+| P1 exact feature check refuses journal recovery; full-output rule too strict | reproducible, verified filesystem geometry (second round: stopping rule 2) | One validator in `internal/demodisk` used by every reader: `CheckFormat` (provenance and stable geometry), recovery state allowed only on an unassociated image, `e2fsck -p`, then `CheckClean` before any mount. The rerun case never fscks and verifies by backing identity and receipt. Only stable fields are compared. Witnesses: clean boot, dirty-shutdown recovery, mounted-helper rerun. A guard test keeps the validator the only reader. |
+| P1 enable can replace an existing image | existing demo data is never destroyed by enablement | Create-only under the store lock; a state table for image and marker; `RENAME_NOREPLACE` publication; `--after-loss` only for marker-without-image and only on Paul's OK; tests for every state, a populated image after a failed mount, and concurrent enables, with identity and contents preserved (slice 9). The boot helper mounts only with both image and marker. |
+| P2 retention schedule and bound disagree with the code | capacity accounts for every retained and pending build | Retention runs after every actual demo adoption, including relayed adoption and `-stage-only`. The bound comes from the complete distinct pin set (`Version`, `PrevVersion`, `GoodVersion`, settings pin, `LastExecuted`, resolved target, generation and root generation pins) plus one pending output per demo. Failure deletes nothing and reports backlog. Tests for successive relayed updates without an hourly pass, and for distinct pin values (slice 1). |
+
+## Round 3 findings and where they went (Paul's extra fix, 2026-11-29)
+
+| Finding | Family | Disposition |
+|---|---|---|
+| P1 a leftover temporary image blocks the retry's room check | interrupted enablement remains safely retryable | Under the store lock, after the state table is read, abandoned `demo.img.new.*` temporaries are removed before the room check; `demo.img` and the marker are never touched by it. A crash-after-allocation witness with room for exactly one image covers the initial enable and `--after-loss` (slice 9). |
+| P2 `ActiveJobID` does not bound pending outputs | capacity accounts for every retained and pending build | The box removes a demo app's unadopted, unpinned outputs before staging a new one, and refuses the stage if that cleanup cannot run in full. A test covers repeated failed settlements (slice 1). The bound of one pending output per demo now follows from the box, not the console. |
diff --git a/docs/superpowers/specs/2026-11-29-demo-disk-bound-design.md b/docs/superpowers/specs/2026-11-29-demo-disk-bound-design.md
new file mode 100644
index 000000000..3e735be59
--- /dev/null
+++ b/docs/superpowers/specs/2026-11-29-demo-disk-bound-design.md
@@ -0,0 +1,868 @@
+# Demo disk bound (F5): design
+
+Status: **Approved by Paul 2026-11-29 (rev 4.1); rev 4.2 records plan task 1's corrections, with Paul's option (a)**, with all six recommended
+answers in §15. Plan: `docs/superpowers/plans/2026-11-29-demo-disk-bound.md`.
+Discussion: amadan carlos/platform #1096
+(the gVisor audit's follow-up list). Branch `design-demo-disk-bound`, cut
+from `origin/main` at 4799995f7. Line citations are to that commit.
+
+Asked for by the gVisor flagship-demos plan
+(`docs/superpowers/plans/2026-11-16-gvisor-flagship-demos.md`, section
+"Cut: per-demo disk bound (F5) gets its own design"). The finding is F5 of
+Fable's audit at 3793aa49 (`~/.cache/sec-review-20261116/fable-gvisor-report.md`
+on docs-t1): one demo can fill the root volume or `/run`, and then bundle
+and drop-in writes fail box-wide. Everything not quoted from the plan, the
+audit or Paul is the designer's call.
+
+Authorities, all merged: the gVisor demos design
+(`2026-11-08-gvisor-demos-design.md`, rev 5.5), the agent /start demo
+design (`2026-11-02-agent-start-demo-design.md`), the isolated-exec layout
+(`data-instances.mount`, `internal/layout`), and the claim snapshot's
+scratch disk (`internal/instancectl/demo_snapshot_disk.go`), whose loop
+ext4 image this design reuses.
+
+**Review budget:** AGENTS.md stopping rules, at most three cross-model
+review rounds (Astra, since the author is Claude). All three are used.
+Paul approved **one scoped fix round** after round 3: this rev 4, then a
+scoped Astra check of rev 4's changes only. Nothing beyond that without
+Paul.
+
+**Review history:**
+
+- Rev 1 (fa01230b8), Astra round 1 (`~/.cache/sec-review-20261116/reviews/F5-R1-astra.md`):
+ NOT READY, 6 P1 and 4 P2, against a per-demo loop image design. Rev 2
+ answered all ten.
+- Rev 2 (3cfae7716), Astra round 2 (`F5-R2-astra.md`): NOT READY, 3 P1 and
+ 2 P2. **Stopping rule 2 fired** on "reclamation independent of tenant
+ contents". **Paul's choice (2026-11-29): cut the per-demo mounted
+ filesystems and simplify to one shared demo disk.** Rev 3 was that
+ design.
+- Rev 3 (fa0c5b7c9), Astra round 3 (`F5-R3-astra.md`), the last round: NOT
+ READY, 3 P1 and 5 P2, all local; the shared-disk choice stands. All five
+ round-2 findings resolved. **Paul approved one scoped fix round
+ (2026-11-29)**; rev 4 answers all eight. §16 maps every finding of all
+ three rounds.
+- Rev 4 (c7dc7a04e), Astra's scoped check (`F5-R4check-astra.md`): READY
+ AFTER FIXES. Seven round-3 items resolved, R3-8 partly (one P2), no new
+ P1. **Rev 4.1** applies that P2 without reopening review (§7.6, §14 W4,
+ §16).
+- Rounds used: 3 of 3, plus Paul's scoped check of rev 4. Review is
+ closed.
+- **Rev 4.2** (2026-11-29, no review round): plan task 1's measured
+ corrections, with Paul's choice of cut option (a). Decisions 6, 8, 9 and
+ 13 and §8 change; see "Task 1 corrections" in §15.
+
+## 1. What a user gets, and when
+
+A demo that writes too much can no longer hurt the box. Its writes land on
+one fixed-size demo disk that holds every demo's data, so the root volume,
+the registry, the agent, the readiness probe, builds, claim exports and
+every other service keep working whatever the demos do. Today the same
+demo can fill the root volume or `/run` and take the whole box down, with
+no warning when it is `/run` or the inodes.
+
+**The cost, stated plainly:** the demos share that disk. One demo can fill
+it and stop the other demos on the box from writing or waking until it
+expires or an operator takes it down. The box and its other services are
+protected; demos are not protected from each other. §7.6 says how that is
+noticed and cleared through the CLI.
+
+Visible first (slice 1): `carlos status` on a demo box and the existing
+disk alert cover inodes as well as blocks, and `/run`. Then (slice 2): the
+demo disk and the demo run tmpfs, reported the same way and in
+`carlos system demos status`.
+
+Switch-on: slice 2 is live on a demo box (`CARLOS_DEMO_BOX=1`) from the
+reboot in its flagship window (§13), and on the dev demo box first.
+Non-demo boxes run none of it.
+
+## 2. The problem, from the code
+
+Where a demo can write, and what bounds it today:
+
+| Where | Backed by | Bound today | Survives the demo's stop? |
+|---|---|---|---|
+| `/data/instances/<iid>` (data dir) | root volume (ext4) | none | yes |
+| `/run/carlos/instances/<iid>` (run dir) | the box's `/run` tmpfs | the unit's memory cap, per run | yes |
+| guest `/tmp`, `/dev/shm`, `/dev` (gVisor) | sentry memory | unit memory cap; `/dev/shm` and `/dev` 64 MiB | no |
+| `/tmp`, `/var/tmp` (native, `PrivateTmp=yes`) | the host's `/tmp` and `/var/tmp` | none on `/var/tmp` during a run | no |
+| build workspace | per-build tmpfs (`internal/demobuild/unit.go:149`) | 512 MiB | no |
+| build outputs in the version store | root volume | 32 MiB each, 1 initial build plus 60 updates per demo (`internal/demo/config.go:15`, `internal/console/demo_store.go:513`) | until purge |
+| claim snapshot scratch | per-export loop ext4 (`demo_snapshot_disk.go:28`) | 768 MiB | no |
+
+The runtime doors this design closes:
+
+1. **`/data` blocks and inodes.** Every instance directory, the registry,
+ the activator's state and litestream's shadow WAL share the root volume
+ (`internal/instancectl/hardening.go:539`). The start floor (`DiskFloor`)
+ refuses new starts but never stops a writer, and the disk alert
+ (`internal/host/probes.go:214`, `readDiskFrac`) reads free blocks only,
+ so millions of empty files run the inode table out unseen.
+2. **`/run` bytes and inodes.** Run dirs sit on the box's `/run` tmpfs (a
+ few hundred MiB on a 2 GiB t4g.small). A demo's files there outlive its
+ stop, so one demo woken twice can fill `/run`, and then systemd cannot
+ write runtime units or drop-ins and every start on the box fails.
+3. **Native `/var/tmp`.** `PrivateTmp=yes`
+ (`internal/host/units/carlos-instance@.service:110`) gives a native demo
+ a private directory in the host's `/var/tmp`, which systemd mounts over
+ the demo drop-in's read-only `/var` (`internal/host/demo_units/demo.conf`).
+ Removed at stop, but unbounded during a run.
+
+A scanned cap was rejected by the plan: unlinked open files and fast writes
+outrun a scan, and stopping a demo from root bypasses the activator's
+fences (`hardening.go:539-555`). The bound has to be one the kernel
+enforces on every write.
+
+## 3. Goals and non-goals
+
+### Goals
+
+- No demo runtime write, by any path (unlinked open files and the gVisor
+ gofer's writes included), can take bytes or inodes from the root volume,
+ `/run`, or the readiness probe's working space.
+- The bound refuses writes (ENOSPC); nothing is stopped for using disk.
+- Same bound, same code, under native and gVisor.
+- Demo data survives hibernation, wake and reboot, and stays readable for
+ claim export, as today.
+- Cleanup frees space on a full demo disk: it only ever unlinks and
+ removes directories there, never needs a new entry.
+- A full demo disk keeps builds, claim exports and purges working, is
+ noticed by an alert, and is cleared by an operator through the CLI.
+- No new host.env setting, no cloud API, no infra producer on the box.
+
+### Non-goals, and the promise they narrow
+
+- **Demos are not protected from each other** (Paul's choice; §1).
+- **Build outputs are not bounded here.** One initial build and 60
+ updates at up to 32 MiB each allow 1,952 MiB per demo, about 38.1 GiB for
+ 20 live demos, on the root volume until purge. So this design promises
+ the box is safe from demos' *runtime writes*, not from every byte a demo
+ can cause. The claim scratch's 768 MiB free-space check protects its
+ headroom when the demo disk is made; it is not a permanent reservation
+ against build outputs. §10 puts the worst case in the capacity sums and
+ §15 Q4 asks for bounded retention. Plan slice 1's retention now bounds
+ them at 256 MiB per demo, 5.0 GiB for 20 (§10).
+- Shared pools and non-demo instances.
+- Other platform-written bytes per demo (unit files, exe links, logs),
+ which are small and fixed per demo; runsc's diagnostics (plan slice 3,
+ F9); memory, which the unit caps already bound.
+
+## 4. Mechanisms compared
+
+All five were compared in rev 2 against a t4g.small with
+`CARLOS_DEMO_MAX_LIVE` at 20 (`internal/demo/config.go:35`).
+
+| | A: loop image per demo | B: project quotas (dedicated device, or inside one image) | C: one shared demo disk | D: tmpfs for run dirs | E: scanned cap |
+|---|---|---|---|---|---|
+| Protects the box | yes | yes | **yes** | yes (`/run`) | no (plan) |
+| Protects demos from each other | yes | natively escapable: a file's owner may change its project ID from the initial user namespace, where native demos run | **no** | per-demo only if one tmpfs each | no |
+| Purge | per-demo unmount, loop release and image delete: a teardown state machine that two review rounds could not close | tree walk inside a shared filesystem | **unlink and rmdir only (§7.5)** | ordinary deletion in one shared tmpfs | n/a |
+| Mounts at runtime | one per demo, made and torn down while services run | none per demo | **none: mounted at boot, before every consumer** | one at boot | n/a |
+| gVisor and native parity | yes | no | **yes** | yes | n/a |
+| Infra | volume size | B on a device: a second device per provider | **volume size** | none | n/a |
+
+Rev 2 recommended A. Round 2 found the reclamation family a second time,
+and under stopping rule 2 Paul cut A for **C**, which keeps everything the
+box needs and has no per-demo mount to tear down. B remains rejected for
+the native escape.
+
+## 5. Recommendation
+
+**One fully reserved, pinned ext4 image holding all demo instance data,
+mounted by root at boot over `/data/.instances` before anything else uses
+it, plus one size- and inode-capped tmpfs over `/run/carlos/.instances` for
+all demo run dirs. The readiness probe's two directories get their own
+small tmpfs mounts, outside both.** Native demos get
+`PrivateTmp=disconnected`. Purge on the demo disk only unlinks and removes
+directories.
+
+## 6. Decisions
+
+1. **One demo disk, mounted where demo data already lives.** A demo box
+ holds only demo instances (plan: "the flagship demo box serves nothing
+ but demos"; task 1 confirms no other instance runs there). The disk is
+ mounted on the raw directory `/data/.instances`, so every demo's data
+ directory and the `/data/instances` view (`data-instances.mount`, a
+ bind of `/data/.instances` made after it) land on it with no change to
+ the layout or any path.
+2. **Image store, provenance and format (kept from rev 2).** The image is
+ `/var/lib/carlos-demo-disk/demo.img`, in a directory root:root 0700 on a
+ root-owned ancestor chain (`/`, `/var`, `/var/lib`) that bootstrap's
+ `chown -R carlos /data` (`internal/host/bootstrap.go:798`) never
+ reaches. The helper opens the store with `openat2` from `/` with
+ `RESOLVE_NO_SYMLINKS`, checking every component is root's and not group-
+ or world-writable, and opens the image beneath it and checks it by
+ `fstat`: regular file, owner root, mode 0600, link count 1, exact size.
+ The loop device is configured from that descriptor (autoclear, direct
+ I/O, 4 KiB logical blocks), never from a path.
+3. **Pinned format, verified before every mount.** `mkfs.ext4` runs with
+ `MKE2FS_CONFIG=/dev/null` and every parameter explicit: `-b 4096 -I 256
+ -N <inodes> -m 0 -J size=32 -O ^resize_inode -E nodiscard,
+ lazy_itable_init=0,lazy_journal_init=0,root_owner=<carlos uid>:<carlos
+ gid>`, with an explicit feature list chosen in the plan and pinned in a
+ test. Before every mount the helper reads the superblock (`dumpe2fs -h`)
+ and checks block size, block count, inode count and size, reserved
+ blocks 0, the journal and its size (`Total journal size`), and the exact feature set. These are
+ superblock values; they are never compared with `statfs` (decision 10).
+4. **Sizes.** Proposed: a 4 GiB image with 262,144 inodes (one per 16 KiB);
+ the inode count includes every directory and platform entry, not only
+ files. The inode tables (64 MiB), journal (32 MiB) and other metadata
+ leave about 3.9 GiB of *allocated* data for all demos together; the plan
+ measures it and status shows it. Sparse files can have a logical length
+ beyond that, so the claim export keeps its own size checks on DB plus
+ WAL (`internal/democlaim/source_linux.go:74,87`). Run tmpfs:
+ `size=16M,nr_inodes=8192,mode=2750`, owner carlos, group carlos-sockets.
+ Probe tmpfs (decision 8): `size=1M,nr_inodes=64` each. Constants in one
+ place in `internal/demo`. §15 Q1.
+5. **Fully reserved, and kept so.** The image is `fallocate`d whole when
+ made, and only when free space on the store's filesystem (`fstatfs` on
+ the store descriptor) stays at or above `DiskFloor(total)` plus the claim
+ scratch (768 MiB) afterwards. The loop device's
+ `queue/discard_max_bytes` is set to 0 and `fallocate` re-run at every
+ mount, so Debian's weekly `fstrim` cannot quietly make the image sparse.
+6. **Mounted at boot, by descriptor, by root helpers in two phases.** Both
+ are oneshot root services with no namespacing options (so they act in
+ the host namespace), shipped in `internal/host/units`, run by the same
+ binary with two verbs.
+ - `carlos-demo-disk.service` (phase 1): `DefaultDependencies=no`;
+ `RequiresMountsFor=/data /var/lib /run`;
+ `After=local-fs.target systemd-remount-fs.service`;
+ `Before=systemd-tmpfiles-setup.service data-instances.mount
+ run-carlos-instances.mount carlos-edge.service
+ carlos-instance-control.service`; `Conflicts=shutdown.target`,
+ `Before=shutdown.target`; `WantedBy=sysinit.target`. It does not order
+ itself after `sysinit.target`, so there is no cycle with
+ `systemd-tmpfiles-setup.service` (which runs before `sysinit.target`).
+ It opens `/data/.instances` and `/run/carlos/.instances` with
+ `openat2` and no symlinks (creating the run one as root: `/run` is
+ empty at boot) and mounts the demo disk and the run tmpfs with
+ `fsopen`/`fsmount`/`move_mount` onto those descriptors, with
+ `nosuid,nodev,noexec,nosymfollow`. tmpfiles then gives the run
+ directory its usual owner and mode and makes `_probe` on both.
+ - `carlos-demo-probe-space.service` (phase 2): `DefaultDependencies=no`;
+ `After=data-instances.mount run-carlos-instances.mount
+ systemd-tmpfiles-setup.service`; `Before=carlos-edge.service
+ carlos-instance-control.service`; the same shutdown lines and
+ `WantedBy=sysinit.target`. It mounts decision 8's probe tmpfs onto the
+ view paths. It is `Type=oneshot` with `RemainAfterExit=yes` and an
+ `ExecStop=` (the same binary, a stop verb) that unmounts both probe
+ tmpfs from the view paths, skipping a path that is not a mount root
+ (Paul's option (a), 2026-11-29). Its ordering makes that stop run
+ after the edge and control have stopped and before the views unmount.
+ That ordering has to be written here: systemd gives the probe tmpfs's
+ own mount units `RequiresMountsFor=` the view but no `After=` on it, so
+ without this stop the views unmount first and fail "target is busy"
+ with the loop device still attached (task 1, three runs).
+ Both mounts exist before any carlos service starts, so no service
+ depends on mount propagation. At shutdown the mounts go after the
+ services that use them (the instance units' `RequiresMountsFor=` and the
+ views' `Before=umount.target`); the autoclear loop device is released
+ at the last unmount. Task 1 witnessed boot and shutdown (W2) and that
+ `systemd-analyze verify` reports no cycle: with the phase-2 stop above,
+ the views unmount cleanly and the loop device is gone before the
+ mounts' stop jobs finish (two runs).
+7. **Activation is checked inside the helper.** No unit condition (systemd's
+ `ConditionEnvironment=` does not read `host.env`). The helper opens
+ `/etc/carlos/host.env` by descriptor, checks it is root's and not
+ writable by others, and does nothing on a box without
+ `CARLOS_DEMO_BOX=1`.
+8. **The readiness probe never works on the shared disk.** The native probe
+ creates a file and a symlink in `/data/instances/_probe`
+ (`internal/instanceexec/probe.go:429`); the gVisor probe makes its
+ socket in the probe's run directory
+ (`internal/instanceexec/probe_gvisor_linux.go:73`). A full demo disk
+ would fail the probe, and the builder's proof and claim export's
+ `AcquireSnapshot` both require `Ready()`
+ (`internal/instancectl/server.go:444`,
+ `internal/demobuild/snapshot_slot.go:7`). So phase 2 mounts a small
+ tmpfs, with the same four flags (`nosuid,nodev,noexec,nosymfollow`), on
+ the view paths `/data/instances/_probe` and `/run/carlos/instances/_probe`,
+ opened by descriptor. (The probe units bind the view paths. The view
+ and the raw directory are bind peers with shared propagation, so the
+ probe tmpfs mounted on the view also appears at `/data/.instances/_probe`
+ and `/run/carlos/.instances/_probe`, and the phase-2 stop's unmount
+ removes both copies. Task 1 measured both.) The probe's code and checks do not change: it still plants
+ its file and symlink, still expects ELOOP from the `nosymfollow` it sees,
+ still makes its socket, on a mount carrying exactly the flags demo
+ mounts carry. What moves is only the filesystem under it. That the demo
+ disk and the run tmpfs themselves carry those flags is checked before
+ every demo start by decision 11, from `statfs` flags, so no property the
+ probe proved for demos goes unproved.
+9. **Never hide data under the mount.** Phase 1 mounts the demo disk only
+ when the underlying `/data/.instances` holds nothing but `_probe` and
+ empty directories (checked by descriptor); otherwise it refuses and
+ reports. At a boot that follows a clean shutdown, the phase-2 stop has
+ unmounted the propagated probe tmpfs, so `_probe` there is an ordinary
+ empty directory. If `_probe` is itself a mount root (a previous phase 2
+ mounted the probe tmpfs over a disk that was never mounted, and nothing
+ unmounted it), the check counts it as the probe's and does not look
+ inside it; any other entry still refuses. The disk's own root carries a
+ root-owned `lost+found` that `mkfs` makes; it is on the disk, not
+ underneath, and never reaches this check. That is the case at the switch while demos still live on the
+ root volume (§7.8), and after a boot where the disk could not mount and
+ something was written underneath (§9 F5).
+10. **Recovery before mount, and a receipt with the mounted totals.** At
+ boot no loop device backs the image; if one does (the helper was
+ rerun), the helper verifies the existing mount instead and never runs
+ `e2fsck` or makes a second association. Otherwise it runs `e2fsck -p`;
+ exit 0 or 1 continues, anything else leaves the disk unmounted and
+ reported (§9 F4). After mounting and checking the loop device's backing
+ identity (`LOOP_GET_STATUS64` device and inode equal the image's), it
+ reads `statfs` on each of its mounts (demo disk, run tmpfs, both probe
+ tmpfs) and writes a receipt to `/run/carlos-demo-disk/receipt`
+ (root-owned directory 0755, file 0644): for each mount, its device
+ number, `f_type`, `f_bsize`, `f_blocks`, `f_files` and `f_flags`. Ext4
+ reports `f_blocks` after its overhead, so these mounted totals are the
+ values later checks compare against, not the superblock's. Control
+ cannot issue loop ioctls (`PrivateDevices=yes`), so it never tries.
+11. **One activation state, from root, never inferred.** Control answers a
+ new identity-free door, `GET /demo-disk`, with exactly one of three
+ states, derived from root-owned facts it reads as root:
+ - `legacy`: the store opens and checks clean (decision 2), holds no
+ `demo.img`, and holds no `activated` marker (a root file written at
+ the first successful mount and never removed);
+ - `mounted`: `demo.img` checks clean, the receipt exists, and control's
+ own `statfs` of `/data/instances`, `/run/carlos/instances` and both
+ probe paths, run inside its unit, equals the receipt for each mount
+ and the demo disk's device differs from `/data`'s;
+ - `unavailable`: anything else, including any error reading the store,
+ the image or the receipt.
+ The agent asks before `Restore` in every demo wake (§7.2) and proceeds
+ only on `legacy` or `mounted`; on `mounted` it repeats the `statfs`
+ comparison against the receipt (0644) from its own namespace. A failed
+ request, a timeout, an unknown answer or a missing receipt is
+ `unavailable`, never `legacy`. Control's own pre-start checks use the
+ same state and refuse a demo start on anything but `legacy` or
+ `mounted`, with the existing insufficient-storage answer.
+12. **Floors on the right filesystems.** `diskRoom` keeps checking the root
+ volume: it gets a separate root-volume path (`/data`) instead of
+ reading `DataRoot`, which stays `/data/instances` because purge uses it
+ (`internal/instancectl/hardening.go:566`, `server.go:397`). Without this
+ the existing 1 GiB floor would apply to the 4 GiB demo disk and stop
+ checking the root volume. Demo starts additionally need 5% of the demo
+ disk's blocks **and** 5% of its inodes free, and 5% of the run tmpfs's
+ bytes and inodes. Below that, demo starts and wakes are refused: part
+ of the accepted cost.
+13. **Native demos use `PrivateTmp=disconnected`.** The native demo drop-in
+ (`demo.conf`) sets it, so `/tmp` and `/var/tmp` are private tmpfs,
+ charged to the unit's memory and gone at stop, as the gVisor guest's
+ `/tmp` is. `assertDemoUnit` reads it back from `PrivateTmpEx=`
+ (`connected` or `disconnected`); `PrivateTmp=` shows `yes` for both
+ modes on systemd 257. W3 verified that it composes with the drop-in's
+ read-only `/var`: one private tmpfs backs both `/tmp` and `/var/tmp`.
+ systemd sizes it at about 10% of RAM (186 MiB on the demo boxes), so
+ writes stop there with ENOSPC, below the unit's memory cap, and the
+ host's `/var/tmp` does not grow. Today, with `PrivateTmp=yes`, a native
+ demo's `/var/tmp` is on the root volume and writable.
+14. **Provider-neutral.** Loop devices, ext4, tmpfs and the mount API are
+ Linux. The one provider-facing number is the root volume's size.
+
+## 7. How it works
+
+### 7.1 First mount
+
+At the reboot that activates it (§7.8), with the image absent and
+`/data/.instances` holding only `_probe` and empty directories, phase 1
+checks the reservation room, creates `demo.img.new` (`O_EXCL`), allocates
+it, formats it (decision 3), verifies the superblock, syncs, renames it to
+`demo.img`, syncs the store, mounts as at every boot, and writes the
+`activated` marker. A crash leaves `.new`, which the next run deletes; the
+final name only ever holds a pinned, made filesystem.
+
+### 7.2 Every boot, and every wake
+
+Boot: phase 1 (decisions 6, 9, 10), then tmpfiles, the two views, phase 2
+(decision 8), then the carlos services. Wake: in the activator's wake,
+after the lease, the route check and the termination proof
+(`wakeHostProven`, `internal/activator/activator.go:3081`) and before
+`Restore` (line 3096), a demo wake asks control for the activation state
+and checks its own view (decision 11); anything but `legacy` or a verified
+`mounted` gives the lease back as any failed wake step does. Then control's
+pre-start checks (`refuseStart`, `hardening.go:583`, and `assertDemoUnit`)
+apply decisions 11 and 12. The native unit and the gVisor view
+(`internal/execsandbox/view.go`) bind the same two sources as today, now
+on the demo disk and the demo run tmpfs.
+
+### 7.3 Hibernation and wake
+
+Nothing per demo is mounted, so hibernation and wake are as today.
+
+### 7.4 Claim export
+
+The claim freezes the demo, then the agent opens the DB through the view
+with `openat2` beneath (`internal/host/demo_claim_snapshot.go:30`), as
+today, now on the demo disk. Reading needs no space. The snapshot scratch
+is a separate loop image under `/var/lib/carlos-demo-snapshots` on the
+root volume, and the readiness proof `AcquireSnapshot` needs no longer
+depends on the demo disk (decision 8), so a full demo disk does not stop
+an export (W1).
+
+### 7.5 Purge
+
+Purge stays in control (`purgeDemoWithJobs`,
+`internal/instancectl/demo_cleanup.go:77`) in today's order: stop and prove
+the demo's units gone, delete the DB files, remove the data and run
+directories, then the versions (`purgeDemoVersions`, which unlinks this
+host's live link before it computes pins and deletes). Two changes:
+
+- **Deletion on a capped filesystem never creates an entry.** Today's tree
+ removal (`instancefs.RemoveAllBeneath`) hoists a subtree up with
+ `Renameat2` past 65,536 levels (`internal/instancefs/dirs_linux.go:315`),
+ which adds a directory entry and can need a new directory block: ENOSPC
+ on a full disk, every retry. On the demo disk and the run tmpfs, purge
+ uses an **unlink-only walk** instead: it descends by name with `openat2`
+ beneath and no symlinks, climbs back with `..`, and removes with
+ `unlinkat` and `unlinkat(AT_REMOVEDIR)` only. Instead of a stack of
+ names it keeps a stack of `(device, inode)` pairs, which it checks on
+ every climb (a `..` that is not the recorded parent is an error, never
+ success), and finds the child to remove in the parent by its inode
+ number. Its depth is bounded by the filesystem's inode count, so the
+ stack is at most 262,144 × 16 bytes, 4 MiB, with no hoist ever needed.
+ It holds at most three descriptors, reads entries in batches, and is
+ safe without the hoist's tricks because purge runs only after the
+ demo's units are stopped and proved empty, so nothing changes the tree
+ under it. Unlinking and removing directories on ext4 and tmpfs never
+ allocate. The rule is stated once, in `instancefs`, and a guard test pins
+ that this walk calls no rename and no create.
+- **A planted name must not stop purge.** `RemoveBeneath` refuses a
+ directory, so a demo that makes `<host>.db-wal` a directory makes every
+ purge fail at that step (`demo_cleanup.go:138-143`). Each of the three
+ DB names is removed with the unlink-only walk, which removes a file or a
+ whole tree at that name, in the same order.
+
+**Control may write these paths.** On a demo box control runs from the
+*generated* unit, not the template: `claimUnitContent`
+(`internal/host/claimunit.go:177-190`, installed by bootstrap,
+`bootstrap.go:633`) adds `ReadWritePaths=/data /run/carlos/instances
+/opt/carlos/live /opt/carlos/versions /var/lib/carlos-release/private` and
+the `carlos-demo-snapshots` state directory. Purge's guard also takes the
+adoption lock (`internal/host/claimstop_run.go:288`), under `/data`. Rev 3's
+"should fail with EROFS" was wrong and is withdrawn. No permission change
+is proposed; W11 verifies, on the generated unit, that a complete purge
+lands on the demo disk (a submount of the writable `/data`), the run
+tmpfs, and the version store.
+
+### 7.6 When one demo fills the disk
+
+**What happens.** Writes by every demo on the box get ENOSPC; SQLite says
+"database or disk is full". Decision 12 refuses demo starts and wakes
+below 5% free, so visitors to other demos may see the existing wake error.
+The root volume, `/run`, the registry, the agent, control, the edge, the
+readiness probe, builds, claim exports and purges are unaffected (W1).
+
+**How it is noticed.** The disk alert (slice 1) reads the higher of blocks
+used and inodes used on `/data`, `/run`, the demo disk and the demo run
+tmpfs. `carlos system demos status` (and its API,
+`GET /api/cli/system/demos`) gains, per demo box: the demo disk's and the
+run tmpfs's bytes and inodes used and free, and a **usage table** while
+either is over the alert threshold. The table lists, per demo, whether it
+is awake, and then for **each of the two devices** (demo disk and run
+tmpfs) four numbers: visible bytes and visible entries in its directory,
+and **held allocated bytes** and **held inodes**, the space and inodes taken
+by deleted files still open, which no directory shows. Held bytes find an
+unlinked-open file filling either device; held inodes find a flood of
+empty unlinked-open files, which holds inodes and no bytes. The agent
+computes the visible numbers with the unlink-only walk's read-only twin
+over each demo's directories (openat2 beneath, no symlinks, bounded by the
+inode count). Root computes the held numbers by `stat`ing, never opening,
+each `/proc/<pid>/fd/<n>` of the processes in each demo's cgroup, keeping
+those with link count 0 whose device is the demo disk's or the run
+tmpfs's (from the receipt), and per device summing allocated blocks over
+**distinct** `(device, inode)` pairs and counting those pairs, so one file
+open many times counts once. Under gVisor the sentry and gofer hold those
+descriptors in the same cgroup. The table also shows, per device, what
+the attributed numbers do not explain: the device's used bytes and inodes
+less the sum of every demo's visible and held numbers.
+
+**How an operator clears it, with the CLI only:**
+
+1. `carlos system demos status` names the full filesystem (demo disk or run
+ tmpfs) and the cause (bytes or inodes) and shows the usage table.
+2. On the full device, pick the demo with the most of whatever matches
+ the cause: visible bytes plus held bytes when bytes ran out, visible
+ entries plus held inodes when inodes ran out.
+3. `carlos system demos takedown --host <host>`. Takedown stops the demo's
+ units, which releases held bytes at once, and its purge deletes its
+ files.
+4. Verify: `carlos system demos takedown-status --host <host>` until cleanup
+ is no longer pending, then `carlos system demos status` shows the
+ filesystem back above the floor. If it is not, repeat from step 1.
+
+**Fallback, when the table does not attribute it** (the unexplained share
+is most of the use, the diagnostic failed, or takedowns of the attributed
+demos did not bring capacity back), still with the CLI only:
+
+1. `carlos system demos serving off`, so nothing new arrives.
+2. Held space and held inodes exist only while a process holds them, so
+ take down the **awake** demos first, one at a time, largest total use
+ first: `carlos system demos takedown --host <host>`, then
+ `carlos system demos takedown-status --host <host>` until cleanup is no
+ longer pending, then `carlos system demos status` to read the full
+ device again. Stop as soon as it is back above the floor.
+3. If it is still below, take down the hibernating demos the same way,
+ largest visible use first.
+4. Finish when `takedown-status` shows every cleanup done and
+ `carlos system demos status` shows the device's free bytes and inodes
+ back above the floor, measured, not assumed; then
+ `carlos system demos serving on`.
+5. If the box holds no demos and the device is still below the floor, the
+ use is not a demo's: that is a fault for §7.7's operator path, and
+ serving stays off.
+
+Without an operator, the demo's own 24-hour expiry clears it. The runbook
+carries these steps; SSM is for the failures of §7.7 only.
+
+### 7.7 Crash recovery
+
+- Crash while demos write: the journal replays at mount; `e2fsck -p` runs
+ first (decision 10).
+- `e2fsck -p` cannot repair it: the disk stays unmounted and reported,
+ control answers `unavailable`, and every demo start is refused. The
+ runbook keeps serving off (`carlos system demos serving off`) throughout,
+ then either repairs it by hand (`e2fsck` with an operator watching, over
+ SSM) or, with Paul's explicit authorization of the data loss, deletes
+ `demo.img` and reboots. A fresh disk is made at that boot (the
+ `activated` marker stays, so nothing in between reads as `legacy`); the
+ old demos then refuse to wake, because `restoreDemoLocal` refuses a
+ missing DB once a demo's remote initialization marker exists
+ (`internal/activator/demo_durability.go:105-109`), and they expire or
+ are taken down. Serving goes back on after the mount is verified.
+- Crash while making the image: `.new` is deleted and the make repeats.
+
+### 7.8 The switch from demos on the root volume
+
+Before slice 2, demo data lives in `/data/.instances` on the root volume.
+Mounting over it would hide that data, so decision 9 refuses until the box
+holds no demo data. The release can roll as usual: until the image exists,
+control answers `legacy`, nothing changes, and status says "demo disk not
+active". The switch is one step in the flagship window (§13): stop new
+demos (`carlos system demos serving off`), let claims in flight finish,
+deal with the live demos as Paul chooses (§15 Q2), confirm every cleanup
+finished (`takedown-status` for each, and the box status showing no demo
+directories), reboot, check the witnesses, turn serving back on.
+
+## 8. Consumer list
+
+Mounting a filesystem over `/data/.instances` changes the shape for
+anything that renames between it and the rest of `/data` (EXDEV) or
+compares devices. Plan task 1 greps every use of `RawInstanceDir`,
+`rawInstanceDir`, `NestedDBPath`, `DataRoot` and `/data/instances` and
+checks each on a demo box. Known now:
+
+| Consumer | Effect | Outcome |
+|---|---|---|
+| activator set-aside (`internal/activator/startrule.go:251`) | renames a local copy into `/data/.superseded` | EXDEV on a demo box; the plan proves set-aside is unreachable for demos (local-only, no replica) or refuses it for them |
+| layout migration (flat to nested) | renames `/data/<host>.db` into the raw dir | demos are nested from birth; the plan confirms no demo is flat |
+| control's start-time look under the bind mounts (unit comment lines 17-25) | unmounts the views in a private namespace and lists | with the probe tmpfs on the view, a plain `umount /data/instances` fails "busy" and the look would list the demo disk itself; it must unmount the probe tmpfs first (or unmount recursively), then expect the view's mountpoint directory on the root volume to be empty, as today |
+| `diskRoom` (`hardening.go:566`, `DataRoot` = `/data/instances`) | statfs | gets its own root-volume path; the demo floors are separate (decision 12) |
+| `readDiskFrac` (`probes.go:214`) | statfs `/data` | the root volume, as before; the demo filesystems get their own readings (§7.6) |
+| purge's tree removals | `RemoveAllBeneath` | the unlink-only walk on the demo disk and run tmpfs (§7.5) |
+| readiness probe (`probe.go:429`, `probe_gvisor_linux.go:73`) | writes in `_probe` | on its own tmpfs (decision 8) |
+| claim census migration, offline moves | read raw dirs | refused for demos today; the plan confirms |
+
+## 9. Failure modes
+
+- **F1. One demo fills the demo disk, or its inodes.** The accepted cost
+ (§7.6): alert, CLI takedown or expiry. The box, the probe, builds,
+ claims and purges are unaffected.
+- **F2. One demo fills the demo run tmpfs.** Other demos cannot create
+ sockets and fail to wake until it is taken down; `/run` and the probe's
+ run tmpfs are unaffected. Same alert, same clearing.
+- **F3. Build outputs fill the root volume.** Not bounded here (§3). The
+ root-volume floor refuses starts; the alert warns first; §15 Q4.
+- **F4. The demo disk fails its check at boot.** Unmounted, reported,
+ `unavailable`, demos refused; §7.7 for the operator.
+- **F5. Something was written under an unmounted demo disk.** Only possible
+ if a boot left the disk unmounted and a non-demo writer used
+ `/data/.instances`; decision 11 keeps demo wakes from doing it. The next
+ boot refuses to mount over it (decision 9), and the runbook moves it
+ aside.
+- **F6. `fstrim` punches holes.** Prevented by decision 5.
+- **F7. The helper is missing or failed** (a roll in progress, a bad
+ build). Control answers `unavailable` once the `activated` marker or the
+ image exists; nothing writes demo data onto the root volume.
+- **F8. No room to make the image.** The helper refuses and reports;
+ control answers `legacy`; demos run as before. The volume or the size has
+ to change (§15 Q1, Q3).
+- **F9. A deep or hostile tree on a full disk.** The unlink-only walk
+ removes it without a new entry (§7.5, W12).
+
+## 10. What the box must provide, and capacity
+
+On the root volume (where `/var/lib` and `/data` both live today), at 20
+live demos:
+
+- demo disk: 4 GiB, reserved (§15 Q1);
+- claim scratch: 768 MiB free when the disk is made;
+- `DiskFloor`: 1 GiB or 10% of the volume, whichever is larger;
+- the OS, the platform, the demo toolchain and runsc: measured in task 1;
+- staged build outputs: bounded by slice 1's retention at (8 + G + R) ×
+ 32 MiB per demo, R being the reserved trees on the box that cover a
+ demo's output: 256 MiB with G = R = 0 under gVisor, 5.0 GiB for 20;
+ natively about 18.1 GiB for 20 with G = 1 and one reservation a demo,
+ more with more reservations; executable bytes only (plan slice 1,
+ step 4);
+
+Plan task 1 reads the flagship demo box's volume size and fills in the sum.
+Growing the volume is an infra change and Paul's approval (§15 Q3).
+
+Also: `e2fsprogs` and the loop driver (already needed by the claim
+scratch); kernel 5.14 or later (Debian 13 has 6.12); systemd 256 or later
+for `PrivateTmp=disconnected` (the boxes run 257). Nothing in host.env:
+the sizes are code constants and the box already knows it is a demo box.
+
+## 11. Provider boundary
+
+Everything is a Linux feature driven from the core; no cloud API is
+called, and a self-hosted demo box gets the same bound on any disk.
+
+## 12. Census and review
+
+Slice 2 changes the root binary and `internal/host/units`: two new root
+units, new root reads (host.env by descriptor, the store and image by
+descriptor, the superblock, loop status, `e2fsck` over a filesystem the
+tenant shaped only through the kernel, `stat` of demo processes' fds),
+control's new door and checks, and purge's unlink-only walk. The census
+applies; the reviewer is from the other model family. The brief names:
+
+- Every byte root formats, checks or mounts comes from an image in a store
+ whose whole ancestor chain is root's, opened and checked by descriptor;
+ neither the tenant nor the agent ever sees the image or the block
+ device.
+- Root mounts only onto descriptors it opened with no symlinks, at boot,
+ before any carlos process runs, and never over data (decision 9).
+- No `e2fsck` while a loop device backs the image; never a second
+ association.
+- `legacy` comes only from a clean read of root's own store; every error
+ is `unavailable`.
+- The held-space diagnostic `stat`s fd links and never opens them.
+- The unlink-only walk never renames or creates.
+
+Per stopping rule 3, slice 2's root work gets its own review before merge;
+slice 1 is covered by the whole-branch review.
+
+## 13. Rollout
+
+**Slice 1: see it.** Box status and the disk alert gain inodes on `/data`
+and bytes and inodes on `/run`, and read any further filesystem slice 2
+adds. Small, agent-side, no census. Dev-first roll; Paul sees the numbers
+on both demo boxes. It turns the plan's "accepted, uncovered" outage into a
+warned one before the fix exists.
+
+**Slice 2: bound it.**
+
+1. **Plan task 1 settles three facts first.** Each is decisive; a failure
+ stops the slice and goes to Paul.
+ - *Boot-time mounts reach every service (W2).* On the disposable root
+ runner with the shipped units: reboot with the demo disk active;
+ `systemd-analyze verify` shows no ordering cycle; control's `GET
+ /demo-disk` answers `mounted` from inside its generated unit and the
+ agent's wake check passes from inside the agent (the code itself, not
+ an outside look through `/proc/<pid>/root`), both comparing their
+ `statfs` with the receipt; a native and a gVisor demo see their data
+ and run dirs on the demo disk and the run tmpfs, and the probe units
+ see the probe tmpfs. A clean shutdown leaves no busy-unmount error.
+ - *Native temporary directories (W3).* In a native demo, the backing of
+ `/tmp` and `/var/tmp` with `PrivateTmp=yes` and with `disconnected`
+ under the demo drop-in; write past the memory cap and watch the host.
+ - *Purge from the generated control unit (W11).* Inspect the effective
+ generated unit and run one complete demo purge through it on the dev
+ demo box, recording that every removal lands.
+ The same task records the flagship box's volume size, retained build
+ outputs per demo, `e2fsprogs` and loop there, and confirms only demos
+ run on a demo box.
+2. Build; witnesses on the root runner under both sandboxes.
+3. Release; dev demo box first (gVisor), switched with §7.8's steps;
+ witness there.
+4. Flagship: the release at the next roll, and the switch (§7.8) in a #421
+ window with the release lock holder's version (8a3d302's rules) and
+ Paul's go.
+
+Rollback: an older binary ignores the demo disk but the mounts stay until
+reboot, so demos keep working. After a reboot on an older binary the demo
+data sits unmounted in the image and the older binary would write new demo
+data underneath; the runbook's rollback therefore turns serving off,
+reverts, and does not reboot until the demos made under slice 2 have
+expired, or deletes the image with Paul's authorization of the loss.
+
+## 14. Tests and witnesses
+
+Unit and integration tests:
+
+- The helpers: activation from host.env; store and image checks (symlinked
+ or carlos-owned ancestor, non-root, hard-linked, wrong size, non-regular
+ image all refused before any loop or fsck); the `mkfs` arguments and
+ environment exactly decision 3's; a superblock differing in any checked
+ field refused; refusal over a non-empty underlying directory; `.new`
+ cleanup; a second run a no-op; never `e2fsck` with an existing
+ association; the receipt's mounted totals; the `activated` marker.
+- The activation state: `legacy` only from a clean store with no image and
+ no marker; `unavailable` on every read error, a missing or mismatched
+ receipt, a missing image with the marker present; the agent treats a
+ failed request, a timeout and an unknown answer as `unavailable`.
+- `diskRoom` reads the root volume; the demo floors on blocks and on
+ inodes, for the demo disk and the run tmpfs.
+- The unlink-only walk: removes a file or a tree; a guard test pins that
+ it calls no rename and no create; a swapped `..` is an error; a tree as
+ deep as a small test filesystem's inode count removes, with the stack
+ sized from that count.
+- Purge: a demo that made `<host>.db-wal` a directory still purges.
+- Unit-text tests pin both helper units (including `DefaultDependencies=no`
+ and the ordering lines) and the native `PrivateTmp=disconnected`.
+
+Witnesses on the root runner, native and gVisor each:
+
+- **W1** A demo writes until ENOSPC, then creates files until no inode is
+ left. Root volume and `/run` free bytes and inodes do not move. With the
+ demo disk still full: the readiness probe reruns and passes, a demo
+ build completes, and a claim export of another demo completes. The edge,
+ agent and control keep serving; the alert fires; `carlos system demos
+ status` names the cause and the demo; takedown frees the space and
+ another demo wakes.
+- **W2** Boot-time mounts and the activation state (task 1).
+- **W3** Native `/tmp` and `/var/tmp` (task 1).
+- **W4** Diagnostics, each case in its own run, each checked in
+ `carlos system demos status` and cleared by the CLI steps of §7.6:
+ an unlinked open file filling the demo disk (held bytes on the demo
+ disk); an unlinked open file filling the run tmpfs (held bytes on the run
+ tmpfs, while the demo's run directory looks empty); many empty
+ unlinked-open files exhausting inodes on each device (held inodes, no
+ bytes); one file opened many times (counted once). Each names the right
+ demo, and takedown brings measured capacity back. The fallback is
+ exercised once with the diagnostic forced to fail.
+- **W5** Reboot: `e2fsck -p`, mount, receipt; a demo wakes with its data.
+- **W6** A demo fills the run tmpfs: `/run` free bytes and inodes do not
+ move; with it full, the probe reruns and passes, and a build and a claim
+ export complete.
+- **W7** A claim of a demo on the demo disk exports and the claimed app
+ starts.
+- **W8** `fstrim -av`: the image keeps its allocated blocks.
+- **W9** The switch: refused over live demo data; done after serving off,
+ confirmed cleanup and an empty box.
+- **W11** Purge from the generated control unit (task 1).
+- **W12** Full-disk cleanup: a demo plants a directory chain deeper than
+ 65,536 levels under `<host>.db-wal`, packs the top of its data directory
+ so a new entry would need a new directory block, and fills the rest of
+ the disk with a large file that has a second hard link elsewhere in its
+ tree (so its space is freed only when the later link goes). Takedown's
+ purge completes on the full disk and the space comes back.
+
+Dev demo box after release: W1, W5, W7 and the switch.
+
+## 15. Open questions for Paul
+
+1. **Size of the shared demo disk.** Proposed: 4 GiB, fully reserved,
+ about 3.9 GiB of allocated data for all demos together (measured by the
+ plan), and 262,144 inodes, which count every file, directory and
+ platform entry. About 200 MiB per demo at 20 live demos, though one demo
+ can use all of it. The run tmpfs is 16 MiB and 8,192 entries for all
+ demos. The claim keeps its own export size checks either way.
+2. **Demos still live at the switch.** The disk cannot be mounted over live
+ demo data. Choices: (a) turn serving off, let claims in flight finish,
+ take down the remaining demos, confirm each cleanup finished, reboot and
+ turn serving on: a few minutes without `/start`, and live demos end
+ early; (b) turn serving off and wait for the box to empty, up to 24
+ hours without new demos; (c) keep serving and switch whenever the box
+ happens to be empty. Recommended: (a), in a quiet hour, only once
+ cleanup is confirmed.
+3. **Room on the flagship demo box.** The plan measures the volume. Needed
+ at 20 live demos: the 4 GiB disk, 768 MiB of claim scratch, the floor
+ (1 GiB or 10%), the platform, and up to 5.0 GiB of build outputs once
+ retention lands (Q4). Recommended: settle Q4, then measure, then ask
+ for scoped approval to grow the volume only if it still does not fit
+ (or lower `CARLOS_DEMO_MAX_LIVE`).
+4. **Build-output retention.** Each demo may store 61 builds of up to
+ 32 MiB (1,952 MiB) on the box until purge. Recommended: bounded
+ retention, keeping every build a live link, a rollback or a generation
+ pins and deleting the rest as each update lands, rather than fewer
+ updates. A follow-up plan; until it lands, the worst case stays in the
+ capacity sum.
+5. **A full demo disk, as visitors see it.** When one demo fills the disk,
+ every demo on the box may fail to write or to wake, showing the app's own
+ errors or the existing wake error; reads are not promised to keep
+ working. Builds, claim exports and the probe keep working (decision 8,
+ W1). Recommended: no new page now; the alert and the CLI steps (§7.6)
+ clear it. Alternative: an edge page for demos refused by the floor,
+ which needs copy review.
+6. **The demo disk fails its check after a crash.** Every demo on the box
+ is refused until an operator acts. Recommended: serving stays off
+ throughout; an operator repairs by hand; if that fails, you authorize
+ deleting the disk and losing every live demo's data, and serving goes
+ back on only after the new disk's mount is verified (the old demos
+ cannot be reset silently; the initialization marker refuses them).
+
+### Implementation note: who creates the image (controller ruling, plan round 1)
+
+The image is created **only by an explicit enable step at the switch-over**
+(`carlos demo-disk enable`, run in the approved window after the box is
+empty), never by the boot helper. Boot only checks, recovers and mounts an
+image that enable made. This implements Paul's approved switch-over (Q2
+option a) and replaces §7.1's "first mount at the reboot": enable makes the
+image, then the reboot mounts it. Enable is create-only: it never replaces
+an existing image (plan, slice 9). Recorded 2026-11-29 on the controller's
+ruling after plan round 1 (P1, activation ordering).
+
+### Task 1 corrections (rev 4.2, 2026-11-29)
+
+From `docs/superpowers/notes/2026-11-29-demo-disk-task1-results.md`:
+
+- Clean shutdown failed with the phase-2 unit as first written. Paul chose
+ option (a): phase 2 stays active and unmounts both probe tmpfs on stop
+ (decision 6). The re-run passed twice.
+- The probe tmpfs on a view also shows at the raw path (decision 8). What
+ decision 9 and §8's look under the views expect is written there.
+- `dumpe2fs -h` (e2fsprogs 1.47.2) labels the journal size `Total journal
+ size`. That is the field the format check reads (decision 3; plan).
+- `assertDemoUnit` reads `PrivateTmpEx=` (decision 13).
+- `mkfs` makes a root-owned `lost+found` at the disk's root, which is an
+ entry of `/data/instances`; plan task 2 audits its consumers.
+
+### Paul's answers (2026-11-29)
+
+All six as recommended: Q1 a 4 GiB demo disk and a 16 MiB run tmpfs; Q2
+option (a), after every cleanup is confirmed; Q3 and Q4 bounded build-output
+retention first, then measure, and volume growth only with his scoped
+approval; Q5 no new visitor page; Q6 the failed-check path, with his
+explicit OK before any data is deleted.
+
+## 16. Round findings and where they went
+
+### Round 1 (rev 1)
+
+| Finding | Family | Disposition |
+|---|---|---|
+| P1-1 image store under agent-owned `/data` | provenance of bytes root mounts | Root-owned store, descriptor checks, reservation on the store (decisions 2, 5). |
+| P1-2 1 KiB mkfs blocks vs 4 KiB loop sectors | filesystem geometry | Pinned `-b 4096` format, verified before mount (decision 3). |
+| P1-3 attach after the first data writes | mount before access | The disk is mounted at boot before every consumer; the wake checks the activation state before `Restore` (decisions 6, 11). |
+| P1-4 hostile filename blocks purge | reclamation | Per-demo detach cut; the part that applies to today's purge is fixed with the unlink-only walk (§7.5). |
+| P1-5 boot recovery and run dirs | recovery reconstructs prerequisites | Boot mounts on parents; tmpfiles makes the rest (decision 6). |
+| P1-6 `ConditionEnvironment` | helper activation | The helper reads host.env itself (decision 7). |
+| P2-7 exclusive image before fsck | one owner of filesystem mutation | One image, one association made only at boot; never fsck with one present (decision 10). |
+| P2-8 build outputs omitted | tenant-triggered storage | Worst case in §10, promise narrowed (§3), Q4. |
+| P2-9 usable capacity | usable capacity | Restated for the shared disk (decision 4). |
+| P2-10 quotas inside one image | alternatives on equal assumptions | In §4; still rejected for the native escape. |
+
+### Round 2 (rev 2)
+
+| Finding | Family | Disposition |
+|---|---|---|
+| R2-1 held-descriptor unmount keeps its target busy | reclamation | Gone with Paul's cut: nothing is unmounted at purge. |
+| R2-2 tenant-changed run-dir mode refuses purge | reclamation | Gone: run dirs are plain directories in one shared tmpfs. |
+| R2-3 control cannot read loop status | verification at the execution boundary | The helper checks loop identity; control and the agent compare `statfs` with the receipt inside their own units (decisions 10, 11). |
+| R2-4 version deletion order | reclamation | Purge's code and order stay in control (§7.5). |
+| R2-5 sparse files vs the export limit | usable capacity | "About 3.9 GiB of allocated data"; export size checks stay (decision 4). |
+| Stopping rule 2 (reclamation) | | Paul cut per-demo filesystems for one shared demo disk (2026-11-29). |
+
+### Round 3 (rev 3), answered under Paul's one scoped fix round
+
+| Finding | Family | Disposition in rev 4 |
+|---|---|---|
+| R3-1 the tree removal's hoist can need a new entry on a full disk | reclamation independent of tenant contents | Unlink-only walk with an identity stack bounded by the inode count, no rename or create, pinned by a guard test; the planted DB name removed by it; full-disk witness W12 (§7.5). |
+| R3-2 a full shared disk fails the probe, and with it builds and claims | platform recovery services independent of tenant capacity | The probe's two directories get their own tmpfs with the same four flags; probe code and checks unchanged; the demo filesystems' flags checked before every demo start; W1 and W6 rerun the probe and complete a build and a claim on a full disk (decision 8). |
+| R3-3 the agent cannot tell legacy from required-but-unavailable | verification at the execution boundary | Control's `GET /demo-disk` gives `legacy`, `mounted` or `unavailable` from root-owned facts and an `activated` marker; every error is `unavailable`, never `legacy` (decision 11). |
+| R3-4 early-boot unit dependencies | mount before consumers | `DefaultDependencies=no`, explicit mounts, `WantedBy=sysinit.target`, shutdown lines, no order after `sysinit.target`; `systemd-analyze verify` in W2 (decision 6). |
+| R3-5 superblock geometry vs `statfs` totals | correct mount verification | The receipt records the mounted `statfs` totals; checks compare with those; W2 exercises it (decisions 3, 10, 11). |
+| R3-6 `diskRoom` would check the demo disk, not the root volume | capacity checks target the intended filesystem | `diskRoom` gets its own root-volume path; `DataRoot` unchanged; separate demo floors on blocks and inodes (decision 12). |
+| R3-7 the generated control unit already writes `/data` | review the effective execution boundary | Corrected from `claimUnitContent`; rev 3's EROFS claim and `ReadWritePaths=` proposal withdrawn; W11 runs on the generated unit (§7.5). |
+| R3-8 the clearing runbook missed run, inode and held-space cases; wrong takedown syntax | operator can identify and clear the failure through the product | CLI status with a usage table including held bytes; `carlos system demos takedown --host <host>`; `takedown-status` and status as the verify step (§7.6). Scoped check of rev 4: partly resolved (P2, held space counted on the demo disk only, and in bytes only). Rev 4.1, applied without reopening review: held allocated bytes and distinct held inodes for both devices, an unexplained-use line, a CLI-only fallback ending in confirmed cleanup and measured capacity, and W4 extended to the run tmpfs and held-inode cases. |
+| Q1 to Q6 notes | | Q1 inode totals include directories and platform entries; Q2 (a) only after confirmed cleanup; Q3 settle Q4 and measure before asking to grow; Q4 keeps the worst case in the sum until retention lands; Q5 now states builds, claims and the probe keep working; Q6 keeps serving off throughout and needs Paul's authorization for data loss. |