carlos / platform Public

Merge remote-tracking branch 'origin/main' into gvisor-followups

claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 2dd8e498c5e1338e5cf92acb87411cd525eeac2c parent 08d971cparent 9673143
7 files changed, +1,033 −0
  • docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-spec-R1.md +59 −0
  • docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-spec-R2.md +93 −0
  • docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-spec-R3.md +49 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-spec-R2.md +36 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-spec-R3.md +38 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-spec.md +32 −0
  • docs/superpowers/specs/2026-11-29-instance-usage-design.md +726 −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-SV6ziw
.amadan/test-gate.sh
go: downloading github.com/aws/aws-sdk-go-v2/service/costexplorer v1.67.5
go: downloading github.com/aws/smithy-go v1.28.1
go: downloading github.com/aws/aws-sdk-go-v2/service/s3 v1.105.0
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading golang.org/x/net v0.62.0
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.68.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 github.com/aws/aws-sdk-go-v2/service/sts v1.45.6
go: downloading golang.org/x/sys v0.49.0
go: downloading golang.org/x/crypto v0.58.0
go: downloading golang.org/x/mod v0.41.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/aws/aws-sdk-go-v2/service/ssm v1.74.0
go: downloading github.com/klauspost/compress v1.20.2
go: downloading golang.org/x/text v0.43.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
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 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 github.com/google/uuid v1.6.0
go: downloading modernc.org/mathutil v1.7.1
go: downloading modernc.org/memory v1.11.0
go: downloading modernc.org/memory v1.11.0
go: downloading github.com/google/uuid v1.6.0
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec
=== 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 (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/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/mathutil v1.7.1
go: downloading modernc.org/memory v1.11.0
=== vet-tags (191 s, from +0 s)
go: downloading github.com/klauspost/compress v1.20.2
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading modernc.org/libc v1.74.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
=== gofmt (1 s, from +0 s)
gofmt -l .: clean
=== rest (389 s, from +15 s)
ok  	github.com/carlosframework/platform/cmd/carlos-media	122.565s
?   	github.com/carlosframework/platform/cmd/changelog	[no test files]
ok  	github.com/carlosframework/platform/cmd/console	208.260s
ok  	github.com/carlosframework/platform/cmd/mediaimage	41.715s
ok  	github.com/carlosframework/platform/cmd/moveprobe	15.541s
ok  	github.com/carlosframework/platform/cmd/pricebook-export	0.029s
ok  	github.com/carlosframework/platform/cmd/rootfswitness	0.112s
ok  	github.com/carlosframework/platform/cmd/runsc-assets	0.124s
ok  	github.com/carlosframework/platform/cmd/zddprobe	1.017s
ok  	github.com/carlosframework/platform/internal/agentsock	0.099s
ok  	github.com/carlosframework/platform/internal/alerting	0.027s
ok  	github.com/carlosframework/platform/internal/analytics	0.290s
ok  	github.com/carlosframework/platform/internal/appconfig	42.790s
ok  	github.com/carlosframework/platform/internal/apperr	0.301s
ok  	github.com/carlosframework/platform/internal/applog	3.827s
ok  	github.com/carlosframework/platform/internal/apppolicy	2.671s
ok  	github.com/carlosframework/platform/internal/assetcache	0.500s
ok  	github.com/carlosframework/platform/internal/awsinv	0.021s
ok  	github.com/carlosframework/platform/internal/awsmanaged	7.474s
ok  	github.com/carlosframework/platform/internal/awsregiongroup	0.394s
ok  	github.com/carlosframework/platform/internal/awsterminations	0.016s
ok  	github.com/carlosframework/platform/internal/backupswords	0.016s
ok  	github.com/carlosframework/platform/internal/billing	0.073s
ok  	github.com/carlosframework/platform/internal/billing/billingtest	0.065s
ok  	github.com/carlosframework/platform/internal/billingstripe	2.185s
ok  	github.com/carlosframework/platform/internal/boxchoice	0.032s
ok  	github.com/carlosframework/platform/internal/boxid	2.488s
?   	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.015s
ok  	github.com/carlosframework/platform/internal/boxself	0.194s
ok  	github.com/carlosframework/platform/internal/boxvolumes	0.030s
ok  	github.com/carlosframework/platform/internal/caps	4.301s
ok  	github.com/carlosframework/platform/internal/certwarm	0.020s
ok  	github.com/carlosframework/platform/internal/cgroup	1.480s
ok  	github.com/carlosframework/platform/internal/changelog	4.460s
ok  	github.com/carlosframework/platform/internal/clamd	0.098s
?   	github.com/carlosframework/platform/internal/cliflag	[no test files]
ok  	github.com/carlosframework/platform/internal/clireg	0.010s
ok  	github.com/carlosframework/platform/internal/codehealth	16.243s
ok  	github.com/carlosframework/platform/internal/compute	0.012s
ok  	github.com/carlosframework/platform/internal/consolefleet	0.011s
?   	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.980s
ok  	github.com/carlosframework/platform/internal/dbdoor/dbdoortest	0.044s
ok  	github.com/carlosframework/platform/internal/dbquery	0.015s
ok  	github.com/carlosframework/platform/internal/dbreads	3.408s
?   	github.com/carlosframework/platform/internal/dbreads/dbreadstest	[no test files]
ok  	github.com/carlosframework/platform/internal/dbverify	0.024s
ok  	github.com/carlosframework/platform/internal/demo	0.010s
ok  	github.com/carlosframework/platform/internal/demobuild	4.460s
ok  	github.com/carlosframework/platform/internal/democlaim	0.386s
ok  	github.com/carlosframework/platform/internal/devbox	16.607s
ok  	github.com/carlosframework/platform/internal/dnsrec	0.010s
ok  	github.com/carlosframework/platform/internal/docsite	0.129s
ok  	github.com/carlosframework/platform/internal/domainreg	0.021s
ok  	github.com/carlosframework/platform/internal/domains	70.661s
ok  	github.com/carlosframework/platform/internal/doorkey	0.033s
ok  	github.com/carlosframework/platform/internal/economics	0.014s
ok  	github.com/carlosframework/platform/internal/edgefence	0.100s
ok  	github.com/carlosframework/platform/internal/edgeguard	0.409s
?   	github.com/carlosframework/platform/internal/edgeproof	[no test files]
ok  	github.com/carlosframework/platform/internal/edgesfile	0.133s
ok  	github.com/carlosframework/platform/internal/egressaddr	0.024s
ok  	github.com/carlosframework/platform/internal/execsandbox	104.051s
ok  	github.com/carlosframework/platform/internal/fileacl	0.009s
ok  	github.com/carlosframework/platform/internal/fleetapi	1.897s
ok  	github.com/carlosframework/platform/internal/fleetstore	0.010s
ok  	github.com/carlosframework/platform/internal/fxrate	0.021s
ok  	github.com/carlosframework/platform/internal/gate	4.640s
ok  	github.com/carlosframework/platform/internal/genselect	0.110s
ok  	github.com/carlosframework/platform/internal/geo	0.055s
ok  	github.com/carlosframework/platform/internal/geoip	0.162s
ok  	github.com/carlosframework/platform/internal/groupadmission	0.011s
ok  	github.com/carlosframework/platform/internal/grouprollaws	18.023s
ok  	github.com/carlosframework/platform/internal/hadeparture	0.026s
ok  	github.com/carlosframework/platform/internal/hafresh	0.024s
ok  	github.com/carlosframework/platform/internal/hairpin	0.248s
ok  	github.com/carlosframework/platform/internal/historyreadback	1.408s
ok  	github.com/carlosframework/platform/internal/hostactors	23.525s
ok  	github.com/carlosframework/platform/internal/hostbox	22.577s
ok  	github.com/carlosframework/platform/internal/hostclaim	3.504s
ok  	github.com/carlosframework/platform/internal/hostenv	0.081s
ok  	github.com/carlosframework/platform/internal/hostevidence	0.056s
ok  	github.com/carlosframework/platform/internal/hostexec	21.662s
ok  	github.com/carlosframework/platform/internal/hostfence	0.191s
ok  	github.com/carlosframework/platform/internal/hostfiles	25.996s
ok  	github.com/carlosframework/platform/internal/hostfloor	0.482s
ok  	github.com/carlosframework/platform/internal/hostguard	1.794s
ok  	github.com/carlosframework/platform/internal/hostops	6.601s
?   	github.com/carlosframework/platform/internal/hostops/fencerelease	[no test files]
ok  	github.com/carlosframework/platform/internal/hostops/internal/fencerelease	0.011s
ok  	github.com/carlosframework/platform/internal/hostquarantine	0.013s
ok  	github.com/carlosframework/platform/internal/hostrelocate	2.497s
ok  	github.com/carlosframework/platform/internal/hostresolve	0.674s
ok  	github.com/carlosframework/platform/internal/hostwrite	0.011s
ok  	github.com/carlosframework/platform/internal/infraview	0.013s
ok  	github.com/carlosframework/platform/internal/ingresshealth	0.035s
ok  	github.com/carlosframework/platform/internal/ingresshealth/awstg	0.006s
ok  	github.com/carlosframework/platform/internal/instancectl	67.441s
ok  	github.com/carlosframework/platform/internal/instanceexec	9.213s
ok  	github.com/carlosframework/platform/internal/instancefs	17.336s
ok  	github.com/carlosframework/platform/internal/instancekey	0.003s
ok  	github.com/carlosframework/platform/internal/instanceupdates	0.014s
ok  	github.com/carlosframework/platform/internal/interactive	0.735s
ok  	github.com/carlosframework/platform/internal/launchd	0.016s
ok  	github.com/carlosframework/platform/internal/layout	23.757s
ok  	github.com/carlosframework/platform/internal/layout/pubclass	102.630s
ok  	github.com/carlosframework/platform/internal/lbhealth	0.011s
ok  	github.com/carlosframework/platform/internal/lease	149.327s
ok  	github.com/carlosframework/platform/internal/lease/leasetest	1.178s
ok  	github.com/carlosframework/platform/internal/lease/locktest	0.032s
ok  	github.com/carlosframework/platform/internal/ledger	0.072s
ok  	github.com/carlosframework/platform/internal/mail	0.961s
ok  	github.com/carlosframework/platform/internal/mailer	0.878s
ok  	github.com/carlosframework/platform/internal/mailsubmit	1.449s
ok  	github.com/carlosframework/platform/internal/mailwire	0.021s
ok  	github.com/carlosframework/platform/internal/maintenance	0.206s
ok  	github.com/carlosframework/platform/internal/maintenanceexec	8.331s
ok  	github.com/carlosframework/platform/internal/maintenanceguard	0.400s
ok  	github.com/carlosframework/platform/internal/managedboot	3.243s
?   	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.788s
ok  	github.com/carlosframework/platform/internal/media/mediatest	0.008s
ok  	github.com/carlosframework/platform/internal/mediaaws	60.680s
ok  	github.com/carlosframework/platform/internal/mediahandler	42.452s
ok  	github.com/carlosframework/platform/internal/mediajobs	0.910s
ok  	github.com/carlosframework/platform/internal/medialocal	10.377s
ok  	github.com/carlosframework/platform/internal/metrics	0.127s
ok  	github.com/carlosframework/platform/internal/minorunits	0.006s
ok  	github.com/carlosframework/platform/internal/moves	54.170s
ok  	github.com/carlosframework/platform/internal/moves/archive	2.739s
ok  	github.com/carlosframework/platform/internal/moves/offlinerun	0.064s
ok  	github.com/carlosframework/platform/internal/namedunits	0.053s
ok  	github.com/carlosframework/platform/internal/objstore	2.330s
ok  	github.com/carlosframework/platform/internal/ops	15.016s
ok  	github.com/carlosframework/platform/internal/pageindex	3.793s
ok  	github.com/carlosframework/platform/internal/parity	0.097s
?   	github.com/carlosframework/platform/internal/parity/cmd/parity-doc	[no test files]
ok  	github.com/carlosframework/platform/internal/park	0.691s
ok  	github.com/carlosframework/platform/internal/perf	0.202s
ok  	github.com/carlosframework/platform/internal/plans	0.086s
ok  	github.com/carlosframework/platform/internal/privatefile	0.009s
ok  	github.com/carlosframework/platform/internal/provision	239.787s
ok  	github.com/carlosframework/platform/internal/proxyproto	0.939s
ok  	github.com/carlosframework/platform/internal/publicrelease	0.111s
ok  	github.com/carlosframework/platform/internal/ratelimit	0.190s
ok  	github.com/carlosframework/platform/internal/regionlabel	0.084s
ok  	github.com/carlosframework/platform/internal/regionname	0.057s
ok  	github.com/carlosframework/platform/internal/registrar	0.012s
ok  	github.com/carlosframework/platform/internal/registrar/openprovider	0.749s
?   	github.com/carlosframework/platform/internal/registrar/registrartest	[no test files]
ok  	github.com/carlosframework/platform/internal/registry	83.702s
ok  	github.com/carlosframework/platform/internal/relay	7.627s
ok  	github.com/carlosframework/platform/internal/release	127.398s
?   	github.com/carlosframework/platform/internal/release/requestwitness	[no test files]
ok  	github.com/carlosframework/platform/internal/replicagen	0.042s
ok  	github.com/carlosframework/platform/internal/replicas	0.084s
ok  	github.com/carlosframework/platform/internal/reqrec	8.052s
ok  	github.com/carlosframework/platform/internal/rollout	11.077s
ok  	github.com/carlosframework/platform/internal/rolloutwords	0.013s
ok  	github.com/carlosframework/platform/internal/rootaws	102.024s
ok  	github.com/carlosframework/platform/internal/rootfsimage	1.120s
ok  	github.com/carlosframework/platform/internal/rootparticipation	0.129s
ok  	github.com/carlosframework/platform/internal/rootstate	0.061s
ok  	github.com/carlosframework/platform/internal/runs	0.789s
ok  	github.com/carlosframework/platform/internal/s3compat	0.061s
ok  	github.com/carlosframework/platform/internal/s3fake	1.023s
ok  	github.com/carlosframework/platform/internal/s3meter	0.830s
ok  	github.com/carlosframework/platform/internal/safefile	0.044s
ok  	github.com/carlosframework/platform/internal/schedule	22.921s
ok  	github.com/carlosframework/platform/internal/seeds	0.108s
ok  	github.com/carlosframework/platform/internal/share	0.068s
ok  	github.com/carlosframework/platform/internal/sim/litestreamfacts	4.741s
ok  	github.com/carlosframework/platform/internal/sim/mediajobs	49.997s
ok  	github.com/carlosframework/platform/internal/sim/regionha	22.713s
ok  	github.com/carlosframework/platform/internal/status	0.454s
ok  	github.com/carlosframework/platform/internal/steering	0.158s
ok  	github.com/carlosframework/platform/internal/stopevidence	0.296s
ok  	github.com/carlosframework/platform/internal/storecfg	0.374s
ok  	github.com/carlosframework/platform/internal/svcrole	0.009s
ok  	github.com/carlosframework/platform/internal/systemd	5.722s
?   	github.com/carlosframework/platform/internal/systemdshow	[no test files]
ok  	github.com/carlosframework/platform/internal/team	3.716s
ok  	github.com/carlosframework/platform/internal/teamcontract	0.147s
ok  	github.com/carlosframework/platform/internal/telemetry	0.035s
ok  	github.com/carlosframework/platform/internal/termfence	3.885s
ok  	github.com/carlosframework/platform/internal/timerspec	0.033s
ok  	github.com/carlosframework/platform/internal/tsidentity	4.169s
ok  	github.com/carlosframework/platform/internal/tunnelclient	0.412s
ok  	github.com/carlosframework/platform/internal/unixdial	0.014s
ok  	github.com/carlosframework/platform/internal/updatewords	0.042s
ok  	github.com/carlosframework/platform/internal/upstreamguard	0.025s
?   	github.com/carlosframework/platform/internal/upstreamguard/guardtest	[no test files]
ok  	github.com/carlosframework/platform/internal/usage	0.027s
ok  	github.com/carlosframework/platform/internal/version	0.010s
ok  	github.com/carlosframework/platform/internal/vet	2.708s
ok  	github.com/carlosframework/platform/internal/zonehost	0.017s
ok  	github.com/carlosframework/platform/internal/zonehost/route53zones	0.113s
?   	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.015s
ok  	github.com/carlosframework/platform/scripts/pathmapcheck	0.089s
ok  	github.com/carlosframework/platform/scripts/region-ha-g2/fixture	5.150s
ok  	github.com/carlosframework/platform/scripts/stateless-replicas-drill	1.181s
ok  	github.com/carlosframework/platform/scripts/witness-pointer	0.018s
=== cutover-witness (160 s, from +15 s)
ok  	github.com/carlosframework/platform	2.189s
=== internal_grouproll@0 (268 s, from +76 s)
ok  	github.com/carlosframework/platform/internal/grouproll	266.810s
=== internal_grouproll@1 (276 s, from +76 s)
ok  	github.com/carlosframework/platform/internal/grouproll	275.527s
=== internal_activator@0 (154 s, from +148 s)
ok  	github.com/carlosframework/platform/internal/activator	150.178s
=== internal_activator@1 (130 s, from +148 s)
ok  	github.com/carlosframework/platform/internal/activator	126.081s
=== internal_activator@2 (136 s, from +148 s)
ok  	github.com/carlosframework/platform/internal/activator	131.989s
=== internal_activator@3 (165 s, from +148 s)
ok  	github.com/carlosframework/platform/internal/activator	161.104s
=== internal_edge@0 (252 s, from +176 s)
ok  	github.com/carlosframework/platform/internal/edge	244.852s
=== internal_edge@1 (133 s, from +176 s)
ok  	github.com/carlosframework/platform/internal/edge	125.230s
=== internal_edge@2 (170 s, from +176 s)
ok  	github.com/carlosframework/platform/internal/edge	161.680s
=== internal_edge@3 (151 s, from +176 s)
ok  	github.com/carlosframework/platform/internal/edge	142.696s
=== root@0 (118 s, from +178 s)
ok  	github.com/carlosframework/platform	107.905s
=== root@1 (113 s, from +178 s)
ok  	github.com/carlosframework/platform	103.668s
=== root@2 (120 s, from +178 s)
ok  	github.com/carlosframework/platform	111.469s
=== root@3 (110 s, from +178 s)
ok  	github.com/carlosframework/platform	100.709s
=== root@4 (105 s, from +178 s)
ok  	github.com/carlosframework/platform	95.147s
=== internal_host@0 (177 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/host	171.980s
=== internal_host@1 (161 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/host	156.450s
=== internal_host@2 (172 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/host	166.885s
=== internal_host@3 (188 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/host	183.274s
=== internal_host@4 (218 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/host	213.428s
=== internal_host@5 (273 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/host	268.462s
=== internal_console@0 (177 s, from +227 s)
ok  	github.com/carlosframework/platform/internal/console	169.806s
=== internal_console@1 (177 s, from +227 s)
ok  	github.com/carlosframework/platform/internal/console	169.598s
=== internal_console@2 (238 s, from +227 s)
ok  	github.com/carlosframework/platform/internal/console	231.390s
=== internal_console@3 (258 s, from +227 s)
ok  	github.com/carlosframework/platform/internal/console	251.413s
=== internal_console@4 (226 s, from +227 s)
ok  	github.com/carlosframework/platform/internal/console	220.006s
=== internal_console@5 (244 s, from +227 s)
ok  	github.com/carlosframework/platform/internal/console	237.221s
=== internal_console@6 (218 s, from +227 s)
ok  	github.com/carlosframework/platform/internal/console	212.611s
=== internal_console@7 (236 s, from +227 s)
ok  	github.com/carlosframework/platform/internal/console	230.232s
=== internal_console@8 (244 s, from +227 s)
ok  	github.com/carlosframework/platform/internal/console	236.979s
=== internal_console@9 (239 s, from +227 s)
ok  	github.com/carlosframework/platform/internal/console	233.084s
=== internal_console@10 (244 s, from +227 s)
ok  	github.com/carlosframework/platform/internal/console	236.393s
=== internal_console@11 (248 s, from +227 s)
ok  	github.com/carlosframework/platform/internal/console	241.340s
=== internal_console@12 (370 s, from +227 s)
ok  	github.com/carlosframework/platform/internal/console	363.061s
=== internal_console@13 (215 s, from +227 s)
ok  	github.com/carlosframework/platform/internal/console	207.051s
=== internal_console@14 (205 s, from +227 s)
ok  	github.com/carlosframework/platform/internal/console	197.713s
=== internal_console@15 (227 s, from +227 s)
ok  	github.com/carlosframework/platform/internal/console	219.697s
=== internal_console@16 (231 s, from +227 s)
ok  	github.com/carlosframework/platform/internal/console	223.426s
=== internal_console@17 (258 s, from +227 s)
ok  	github.com/carlosframework/platform/internal/console	250.666s
=== internal_console@18 (282 s, from +227 s)
ok  	github.com/carlosframework/platform/internal/console	274.167s
=== internal_console@19 (244 s, from +227 s)
ok  	github.com/carlosframework/platform/internal/console	236.458s
=== internal_console@20 (214 s, from +227 s)
ok  	github.com/carlosframework/platform/internal/console	207.428s
=== internal_console@21 (238 s, from +227 s)
ok  	github.com/carlosframework/platform/internal/console	231.706s
=== internal_console@22 (242 s, from +227 s)
ok  	github.com/carlosframework/platform/internal/console	234.556s
=== internal_console@23 (238 s, from +227 s)
ok  	github.com/carlosframework/platform/internal/console	230.396s
=== lists: internal_console 226 s, internal_edge 175 s, internal_activator 147 s, internal_host 220 s, root 176 s, internal_grouproll 75 s
=== cpu: the gate used 13136 cpu-seconds in 598 s, about 22.0 of 32 cores; the machine as a whole was 73% busy
=== opentofu ===
opentofu: 39 test files in 11 suites, OpenTofu v1.13.9
  initialised in 14 s
  ok      14 s  infra/modules/box-fence-writer/tests/writer.tftest.hcl  Success! 1 passed, 0 failed.
  ok      17 s  infra/modules/deployment-buckets/tests/console_floors.tftest.hcl  Success! 1 passed, 0 failed.
  ok      28 s  infra/modules/deployment-buckets/tests/data_lifecycle.tftest.hcl  Success! 3 passed, 0 failed.
  ok      17 s  infra/modules/deployment-buckets/tests/db_reads.tftest.hcl  Success! 1 passed, 0 failed.
  ok      17 s  infra/modules/deployment-buckets/tests/evidence.tftest.hcl  Success! 1 passed, 0 failed.
  ok      25 s  infra/modules/deployment-buckets/tests/fence_writers.tftest.hcl  Success! 3 passed, 0 failed.
  ok      23 s  infra/modules/deployment-buckets/tests/media_results.tftest.hcl  Success! 2 passed, 0 failed.
  ok      86 s  infra/modules/media-engine/tests/media_engine.tftest.hcl  Success! 24 passed, 0 failed.
  ok      30 s  infra/modules/pdf-host/tests/computed.tftest.hcl  Success! 2 passed, 0 failed.
  ok      60 s  infra/modules/pdf-host/tests/pdf_host.tftest.hcl  Success! 24 passed, 0 failed.
  ok      45 s  infra/modules/region-group-operator-document/tests/document.tftest.hcl  Success! 12 passed, 0 failed.
  ok      22 s  infra/modules/region-host/ingress/tests/fixed-targets/tests/targets.tftest.hcl  Success! 2 passed, 0 failed.
  ok      65 s  infra/modules/region-host/ingress/tests/group_ingress.tftest.hcl  Success! 30 passed, 0 failed.
  ok      48 s  infra/modules/region-host/tests/alert_publish.tftest.hcl  Success! 18 passed, 0 failed.
  ok      44 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      16 s  infra/modules/region-host/tests/console_mail.tftest.hcl  Success! 4 passed, 0 failed.
  ok       9 s  infra/modules/region-host/tests/fixed_state_unchanged.tftest.hcl  Success! 1 passed, 0 failed.
  ok      70 s  infra/modules/region-host/tests/group.tftest.hcl  Success! 32 passed, 0 failed.
  ok      10 s  infra/modules/region-host/tests/group_alarms.tftest.hcl  Success! 4 passed, 0 failed.
  ok      10 s  infra/modules/region-host/tests/group_iam.tftest.hcl  Success! 4 passed, 0 failed.
  ok       6 s  infra/modules/region-host/tests/group_isolation.tftest.hcl  Success! 1 passed, 0 failed.
  ok      34 s  infra/modules/region-host/tests/group_operator.tftest.hcl  Success! 13 passed, 0 failed.
  ok       8 s  infra/modules/region-host/tests/group_user_data.tftest.hcl  Success! 3 passed, 0 failed.
  ok      27 s  infra/modules/region-host/tests/health_alarms.tftest.hcl  Success! 10 passed, 0 failed.
  ok      10 s  infra/modules/region-host/tests/ingress_drain_read.tftest.hcl  Success! 4 passed, 0 failed.
  ok       6 s  infra/modules/region-host/tests/instance_metadata.tftest.hcl  Success! 1 passed, 0 failed.
  ok      22 s  infra/modules/region-host/tests/mailer.tftest.hcl  Success! 6 passed, 0 failed.
  ok      12 s  infra/modules/region-host/tests/mailer_group.tftest.hcl  Success! 2 passed, 0 failed.
  ok      16 s  infra/modules/region-host/tests/managed_fleets/group_refusal.tftest.hcl  Success! 2 passed, 0 failed.
  ok     111 s  infra/modules/region-host/tests/managed_fleets/managed_fleets.tftest.hcl  Success! 46 passed, 0 failed.
  ok      73 s  infra/modules/region-host/tests/store_conversion.tftest.hcl  Success! 27 passed, 0 failed.
  ok      19 s  infra/modules/region-host/tests/store_scanning.tftest.hcl  Success! 4 passed, 0 failed.
  ok      31 s  infra/modules/region-host/tests/store_versioning.tftest.hcl  Success! 11 passed, 0 failed.
  ok      16 s  infra/modules/region-host/tests/store_write_credentials.tftest.hcl  Success! 4 passed, 0 failed.
  ok      18 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      15 s  infra/modules/region-remote-host/tests/no_deployment_bucket.tftest.hcl  Success! 5 passed, 0 failed.
  ok      28 s  infra/modules/scanner-host/tests/scanner_host.tftest.hcl  Success! 14 passed, 0 failed.
opentofu: 39 files in 212 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: 66715810 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:36128
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.039s
=== RUN   TestT4StorageProbeMinio
2026/11/30 11:48:37 moves: T4: STORE: list: operation error S3: ListObjectsV2, https response error StatusCode: 403, RequestID: 18ECD03E3DF55956, HostID: 45714f27dd36dbe45ebbc0bc5a404b5645fae85c3bd2d35fad5429f910112423, 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.049s
=== 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.044s
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.020s
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:_read_elsewhere
=== RUN   TestWriteCredentialContractMinio/refused:_head
=== RUN   TestWriteCredentialContractMinio/refused:_list
=== RUN   TestWriteCredentialContractMinio/refused:_delete
=== RUN   TestWriteCredentialContractMinio/refused:_put_tagged
=== RUN   TestWriteCredentialContractMinio/refused:_put_with_a_platform_tag
=== RUN   TestWriteCredentialContractMinio/refused:_put_outside_the_prefix
=== RUN   TestWriteCredentialContractMinio/refused:_list_uploads
=== RUN   TestWriteCredentialContractMinio/refused:_tag
=== RUN   TestWriteCredentialContractMinio/refused:_put_beside_the_prefix
=== RUN   TestWriteCredentialContractMinio/refused:_put_to_another_bucket
=== RUN   TestWriteCredentialContractMinio/refused:_copy_from_the_store
=== RUN   TestWriteCredentialContractMinio/refused:_bucket_settings
=== RUN   TestWriteCredentialContractMinio/refused:_read_under_the_prefix
--- PASS: TestWriteCredentialContractMinio (0.04s)
    --- PASS: TestWriteCredentialContractMinio/put_under_the_prefix (0.00s)
    --- PASS: TestWriteCredentialContractMinio/multipart_under_the_prefix (0.01s)
    --- PASS: TestWriteCredentialContractMinio/refused:_read_elsewhere (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_with_a_platform_tag (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_put_outside_the_prefix (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_list_uploads (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_tag (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:_bucket_settings (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_read_under_the_prefix (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.499s
Bucket created successfully `local/dbf-deploy`.
Bucket created successfully `local/dbf-data-ie`.
Bucket created successfully `local/dbf-data-uk`.
local/dbf-deploy versioning is enabled
Created policy `dbf-console` successfully.
Created policy `dbf-ukbox` successfully.
Added user `dbfconsole` successfully.
Added user `dbfukbox` successfully.
Attached Policies: [dbf-console]
To User: dbfconsole
Attached Policies: [dbf-ukbox]
To User: dbfukbox
=== RUN   TestDBForwardMinio
2026/11/30 11:48:46 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/30 11:48:46 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/30 11:48:46 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/30 11:48:46 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/30 11:48:46 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/30 11:48:46 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/30 11:48:46 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000003
2026/11/30 11:48:46 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000003 maxTXID=0000000000000003 size=454
2026/11/30 11:48:46 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000003
2026/11/30 11:48:46 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/30 11:48:46 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/30 11:48:46 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/30 11:48:46 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/30 11:48:46 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%3A36085: could not determine target mailbox
    agent.go:136: dbreads: dbr_ypg24f2fg5dhjtbxpwfhl6bmhu: planned 3 files (1544 bytes) and restored to 3 in 17ms
    agent.go:136: dbreads: dbr_ypg24f2fg5dhjtbxpwfhl6bmhu: output 5 bytes in 1 confirmed chunks in 2ms
2026/11/30 11:48:47 console: db read dbr_ypg24f2fg5dhjtbxpwfhl6bmhu: relayed 1 chunks (102 bytes) in 1.005s, ended done
    agent.go:136: dbreads: dbr_r7rmjz56ealr5zlsor6patasbq: planned 1 files (720 bytes) and restored to 1 in 13ms
    agent.go:136: dbreads: dbr_r7rmjz56ealr5zlsor6patasbq: output 5 bytes in 1 confirmed chunks in 2ms
2026/11/30 11:48:48 console: db read dbr_r7rmjz56ealr5zlsor6patasbq: relayed 1 chunks (102 bytes) in 1.005s, ended done
    agent.go:136: dbreads: dbr_tghb45fjlhivtdoxvhkf7spdue: planned 3 files (1544 bytes) and held through 3 in 12ms
    agent.go:136: dbreads: dbr_tghb45fjlhivtdoxvhkf7spdue: output 1544 bytes in 1 confirmed chunks in 1ms
2026/11/30 11:48:49 console: db read dbr_tghb45fjlhivtdoxvhkf7spdue: relayed 1 chunks (1641 bytes) in 1.005s, ended done
=== RUN   TestDBForwardMinio/by_disconnect
=== NAME  TestDBForwardMinio
    agent.go:136: dbreads: dbr_tbge3i4ci522tmqps34erfib34: planned 3 files (1544 bytes) and restored to 3 in 15ms
2026/11/30 11:48:49 console: db read dbr_tbge3i4ci522tmqps34erfib34: relayed 0 chunks (0 bytes) in 20ms, ended client gone
    agent.go:136: dbreads: dbr_tbge3i4ci522tmqps34erfib34: output 5 bytes in 1 confirmed chunks in 105ms
=== RUN   TestDBForwardMinio/by_timeout
=== NAME  TestDBForwardMinio
    agent.go:136: dbreads: dbr_oibyqhdahtxxjhh5aolju73gdy: planned 3 files (1544 bytes) and restored to 3 in 13ms
2026/11/30 11:49:09 console: db read dbr_oibyqhdahtxxjhh5aolju73gdy: relayed 0 chunks (0 bytes) in 19.35s, ended no-result
    agent.go:136: dbreads: dbr_oibyqhdahtxxjhh5aolju73gdy: output 5 bytes in 1 confirmed chunks in 19.323s
--- PASS: TestDBForwardMinio (23.04s)
    --- PASS: TestDBForwardMinio/by_disconnect (0.23s)
    --- PASS: TestDBForwardMinio/by_timeout (19.46s)
PASS
ok  	github.com/carlosframework/platform/internal/console	23.090s
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.07s)
PASS
ok  	github.com/carlosframework/platform/internal/mediaaws	0.081s
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.582s
=== RUN   TestHeldHandoverTwoBoxMinio
2026/11/30 11:49:14 edge: mesh key: minted
2026/11/30 11:49:14 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/30 11:49:14 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/30 11:49:14 tenant admission is open. accepting tenant work
2026/11/30 11:49:14 activator: HA placement host=shop-a1d3adfb.example.test kind=Place ref=annie reason=roomiest generation=2026-11-30T11:49:14Z lock_generation=0
2026/11/30 11:49:14 lease: t8-a1d3adfb/shop-a1d3adfb.example.test: HA lease acquired in 4ms (first wake)
2026/11/30 11:49:14 activator: shop-a1d3adfb.example.test: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/11/30 11:49:14 activator: shop-a1d3adfb.example.test: started carlos-instance@shop\x2da1d3adfb.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 6ms, control socket 0s, key gate 0s, logs 0s) 6ms, launch file 0s, gate 0s, root start 1ms)
2026/11/30 11:49:14 activator: shop-a1d3adfb.example.test: carlos-instance@shop\x2da1d3adfb.example.test.service launched in 8ms, healthy 0s later
2026/11/30 11:49:14 activator: shop-a1d3adfb.example.test: woke in 21ms: checks 0s, lease 5ms, restore 0s, identity 0s, protect 0s, spawn 8ms, replicate 8ms
2026/11/30 11:49:14 lease: t8-a1d3adfb/plain-a1d3adfb.example.test: acquired in 2ms (client 0s, lock read and write 1ms)
2026/11/30 11:49:14 activator: no replica for plain-a1d3adfb.example.test in s3://contract-bucket/t8-a1d3adfb/plain-a1d3adfb.example.test — booting fresh
2026/11/30 11:49:14 activator: plain-a1d3adfb.example.test: started carlos-instance@plain\x2da1d3adfb.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 1ms, instance key 0s, env 4ms, control socket 0s, key gate 0s, logs 0s) 6ms, launch file 0s, gate 0s, root start 1ms)
2026/11/30 11:49:14 activator: plain-a1d3adfb.example.test: carlos-instance@plain\x2da1d3adfb.example.test.service launched in 7ms, healthy 0s later
2026/11/30 11:49:14 activator: plain-a1d3adfb.example.test: woke in 40ms: checks 0s, lease 2ms, restore 18ms, identity 0s, protect 0s, spawn 7ms, replicate 12ms
2026/11/30 11:49:14 lease: t8-a1d3adfb/bot0.shop.bac.sidecar.internal: HA lease acquired in 4ms (first wake)
2026/11/30 11:49:14 activator: bot0.shop.bac.sidecar.internal: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/11/30 11:49:14 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/11/30 11:49:14 activator: next-due probe plain-a1d3adfb.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/30 11:49:14 activator: bot0.shop.bac.sidecar.internal: released with a marker (clean true, txid 1, files 3:7990da648bb567143a56058a8184ebc94b34149b4870b07e1293c7bb17f8369f) in 7ms: files 1ms, sync 4ms, record 1ms, marker 2ms
2026/11/30 11:49:14 activator: bot0.shop.bac.sidecar.internal hibernated
2026/11/30 11:49:14 activator: plain-a1d3adfb.example.test hibernated
2026/11/30 11:49:14 activator: next-due probe shop-a1d3adfb.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/30 11:49:14 activator: shop-a1d3adfb.example.test: released with a marker (clean true, txid 1, files 3:edb8b70962f5d62e9410c77a5fec3ab41e3b665050a0d71d2062b7f79561f361) in 8ms: files 1ms, sync 5ms, record 1ms, marker 2ms
2026/11/30 11:49:14 activator: shop-a1d3adfb.example.test hibernated
2026/11/30 11:49:14 lease: t8-a1d3adfb/shop-a1d3adfb.example.test: HA lease acquired in 3ms (clean marker)
2026/11/30 11:49:14 activator: shop-a1d3adfb.example.test: restored (other-box)
2026/11/30 11:49:14 activator: shop-a1d3adfb.example.test: started carlos-instance@shop\x2da1d3adfb.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/11/30 11:49:14 activator: shop-a1d3adfb.example.test: carlos-instance@shop\x2da1d3adfb.example.test.service launched in 2ms, healthy 0s later
2026/11/30 11:49:14 activator: shop-a1d3adfb.example.test: woke in 89ms: checks 0s, lease 4ms, restore 27ms, identity 0s, protect 0s, spawn 2ms, replicate 56ms
2026/11/30 11:49:14 edge: ha-take shop-a1d3adfb.example.test from annie (txn t8-witness, marker generation 1): holder betty, generation 2
2026/11/30 11:49:14 edge: forward shop-a1d3adfb.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:7e2ba489a5655e82742d71e33787f9cf Step:move Result:ok Reasons:[] Fence:t8-witness StartedAt:2026-11-30 11:49:14.664631948 +0000 UTC FinishedAt:2026-11-30 11:49:14.812519239 +0000 UTC Acked:[betty carol] Departed:[] Moved:[{Host:shop-a1d3adfb.example.test Holder:betty Gen:2 Confirmed:take}] Released:[{Host:bot0.shop.bac.sidecar.internal Kind:worker Marker:true Clean:true Reason:} {Host:plain-a1d3adfb.example.test Kind:other Marker:true Clean:true Reason:}] Unclean:[] Left:[] Holds:{LongestMS:133 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-a1d3adfb.example.test <nil> stop bot0.shop.bac.sidecar.internal marker=true clean=true <nil> stop plain-a1d3adfb.example.test marker=true clean=true <nil> releasing shop-a1d3adfb.example.test <nil> stop shop-a1d3adfb.example.test marker=true clean=true <nil> taken shop-a1d3adfb.example.test betty <nil> end-moves]
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-a1d3adfb/bot0.shop.bac.sidecar.internal/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/bot0.shop.bac.sidecar.internal/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/bot0.shop.bac.sidecar.internal/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/bot0.shop.bac.sidecar.internal/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/bot0.shop.bac.sidecar.internal/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/bot0.shop.bac.sidecar.internal/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/bot0.shop.bac.sidecar.internal/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-a1d3adfb/shop-a1d3adfb.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-a1d3adfb/bot0.shop.bac.sidecar.internal/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-a1d3adfb/bot0.shop.bac.sidecar.internal/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: DELETE /contract-bucket/t8-a1d3adfb/plain-a1d3adfb.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-a1d3adfb/shop-a1d3adfb.example.test/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-a1d3adfb/shop-a1d3adfb.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-a1d3adfb/shop-a1d3adfb.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-a1d3adfb/shop-a1d3adfb.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-a1d3adfb/shop-a1d3adfb.example.test/head.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/generations/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0008/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0007/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0006/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0005/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0004/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0008/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0007/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0006/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0005/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0004/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-a1d3adfb/shop-a1d3adfb.example.test/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-a1d3adfb/shop-a1d3adfb.example.test/files/0/manifest.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-a1d3adfb/shop-a1d3adfb.example.test/files/0/objects/0000000000000001-426ca8d420d3ef2b4443b43fa1645946a4d5961c1634f8acbbfddcc09e70d4f1
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-a1d3adfb/shop-a1d3adfb.example.test/files/0/objects/0000000000000003-fe150281712a51f52a1c8dc8dd895c7c047cd88161e0eaa9549b914c7b8c410b
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-a1d3adfb/shop-a1d3adfb.example.test/0000/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-a1d3adfb/shop-a1d3adfb.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-a1d3adfb/shop-a1d3adfb.example.test/0000/0000000000000002-0000000000000002.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-a1d3adfb/shop-a1d3adfb.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1243: drain took 195ms; S3 calls 52 (DELETE lock=1 GET files=3 GET head=1 GET lock=3 GET replica=2 LIST replica=35 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/11/30 11:49:14 lease: t8-a1d3adfb/plain-a1d3adfb.example.test: acquired in 2ms (client 0s, lock read and write 2ms)
2026/11/30 11:49:14 activator: plain-a1d3adfb.example.test: started carlos-instance@plain\x2da1d3adfb.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 0s, control socket 0s, key gate 0s, logs 0s) 0s, launch file 0s, gate 0s, root start 1ms)
2026/11/30 11:49:14 activator: plain-a1d3adfb.example.test: carlos-instance@plain\x2da1d3adfb.example.test.service launched in 1ms, healthy 0s later
2026/11/30 11:49:14 lease: /tmp/carlos-minio-contract-ld22C1/g/dw3831527667/data/instances/plain-a1d3adfb.example.test/plain-a1d3adfb.example.test.db: continuity with the last clean close not proven; snapshot 1-0000000000000001 written before serving
2026/11/30 11:49:14 activator: plain-a1d3adfb.example.test: woke in 11ms: checks 0s, lease 2ms, restore 0s, identity 0s, protect 1ms, spawn 2ms, replicate 7ms
2026/11/30 11:49:14 activator: next-due probe shop-a1d3adfb.example.test: decode /api/next-due: invalid character 'b' looking for beginning of value — recording none (it sleeps until a request)
2026/11/30 11:49:14 activator: shop-a1d3adfb.example.test: released with a marker (clean true, txid 2, files 3:edb8b70962f5d62e9410c77a5fec3ab41e3b665050a0d71d2062b7f79561f361) in 4ms: files 1ms, sync 0s, record 1ms, marker 2ms
2026/11/30 11:49:14 activator: shop-a1d3adfb.example.test hibernated
2026/11/30 11:49:14 tenant admission is closed for shutdown
2026/11/30 11:49:14 activator: next-due probe plain-a1d3adfb.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/30 11:49:14 activator: plain-a1d3adfb.example.test hibernated
--- PASS: TestHeldHandoverTwoBoxMinio (0.52s)
=== RUN   TestHeldHandoverLostLeaseMinio
2026/11/30 11:49:14 edge: mesh key: minted
2026/11/30 11:49:14 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/30 11:49:14 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/30 11:49:15 tenant admission is open. accepting tenant work
2026/11/30 11:49:15 activator: HA placement host=shop-97603b86.example.test kind=Place ref=annie reason=roomiest generation=2026-11-30T11:49:15Z lock_generation=0
2026/11/30 11:49:15 lease: t8-97603b86/shop-97603b86.example.test: HA lease acquired in 3ms (first wake)
2026/11/30 11:49:15 activator: shop-97603b86.example.test: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/11/30 11:49:15 activator: shop-97603b86.example.test: started carlos-instance@shop\x2d97603b86.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 6ms, control socket 0s, key gate 0s, logs 0s) 6ms, launch file 0s, gate 0s, root start 1ms)
2026/11/30 11:49:15 activator: shop-97603b86.example.test: carlos-instance@shop\x2d97603b86.example.test.service launched in 7ms, healthy 0s later
2026/11/30 11:49:15 activator: shop-97603b86.example.test: woke in 19ms: checks 0s, lease 5ms, restore 0s, identity 0s, protect 0s, spawn 8ms, replicate 7ms
2026/11/30 11:49:15 activator: next-due probe shop-97603b86.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/30 11:49:15 activator: final checkpoint shop-97603b86.example.test: lease: release marker owed for s3://contract-bucket/t8-97603b86/shop-97603b86.example.test/lock.json (If-Match "7aebf61903448d0a432568e13124edab"): lease: write release marker: operation error S3: PutObject, https response error StatusCode: 503, RequestID: , HostID: , api error ServiceUnavailable: witness: refused
2026/11/30 11:49:15 activator: shop-97603b86.example.test hibernated
2026/11/30 11:49:15 activator: handover of shop-97603b86.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-97603b86.example.test client 4 "
    hadrain_twobox_minio_linux_test.go:1486: driver calls: [begin shop-97603b86.example.test <nil> releasing shop-97603b86.example.test <nil> stop shop-97603b86.example.test marker=false clean=false <nil> left shop-97603b86.example.test released without a marker]
    hadrain_twobox_minio_linux_test.go:1487: a request after the loss: 503 "This instance cannot wake right now. Please try again shortly.\n" (Retry-After "10", holder "none", 0s, err <nil>)
2026/11/30 11:49:15 tenant admission is closed for shutdown
2026/11/30 11:49:15 http: proxy error: context canceled
--- PASS: TestHeldHandoverLostLeaseMinio (0.27s)
PASS
ok  	github.com/carlosframework/platform/internal/host	0.841s
Bucket created successfully `local/gen-take`.
local/gen-take versioning is enabled
Created policy `gen-take` successfully.
Added user `gentake` successfully.
Attached Policies: [gen-take]
To User: gentake
=== RUN   TestGenerationTakeMinio
=== RUN   TestGenerationTakeMinio/take
2026/11/30 11:49:16 lease: instances/gen-1796039356409786363.shop.example.com: HA lease acquired in 5ms (first wake)
2026/11/30 11:49:16 lease: instances/gen-1796039356409786363.shop.example.com: HA lease acquired in 3ms (holder terminated)
    gentake_minio_test.go:308: a second create-only copy onto instances/gen-1796039356409786363.shop.example.com/g-00000000000000000002/0000/0000000000000001-0000000000000001.ltx: <nil> (destination condition honoured: false)
2026/11/30 11:49:16 ERROR retention enforcement failed system=store db=w.example.com.db error="enforce snapshot retention: remove ltx files: lease: invalid or changed generation binding"
2026/11/30 11:49:16 ERROR retention enforcement failed system=store db=w.example.com.db error="enforce snapshot retention: remove ltx files: lease: a write has waited too long to reach storage (write fence)"
2026/11/30 11:49:16 ERROR enforce L0 time retention system=store db=w.example.com.db error="fetch l1 files: lease: a write has waited too long to reach storage (write fence)"
=== RUN   TestGenerationTakeMinio/switch-412
2026/11/30 11:49:16 lease: instances/gen-1796039356545315537.shop.example.com: HA lease acquired in 4ms (first wake)
2026/11/30 11:49:16 http: proxy error: context canceled
2026/11/30 11:49:16 ERROR retention enforcement failed system=store db=seed.db error="enforce snapshot retention: fetch ltx files: lease: a write has waited too long to reach storage (write fence)"
2026/11/30 11:49:16 lease: instances/gen-1796039356545315537.shop.example.com: HA lease acquired in 3ms (clean marker)
=== RUN   TestGenerationTakeMinio/copy-version
=== RUN   TestGenerationTakeMinio/store-time
2026/11/30 11:49:16 lease: instances/gen-1796039356599282498.shop.example.com: HA lease acquired in 4ms (first wake)
2026/11/30 11:49:16 ERROR retention enforcement failed system=store db=seed.db error="enforce snapshot retention: remove ltx files: lease: invalid or changed generation binding"
2026/11/30 11:49:16 lease: instances/gen-1796039356599282498.shop.example.com: HA lease acquired in 3ms (clean marker)
2026/11/30 11:49:16 lease: instances/gen-1796039356599282498.shop.example.com: HA lease acquired in 3ms (unclean marker)
2026/11/30 11:49:16 lease: instances/gen-1796039356599282498.shop.example.com: HA lease acquired in 3ms (unclean marker)
2026/11/30 11:49:16 lease: instances/gen-1796039356599282498.shop.example.com: HA lease acquired in 3ms (unclean marker)
2026/11/30 11:49:16 lease: instances/gen-1796039356599282498.shop.example.com: HA lease acquired in 3ms (unclean marker)
=== RUN   TestGenerationTakeMinio/skew
--- PASS: TestGenerationTakeMinio (0.36s)
    --- PASS: TestGenerationTakeMinio/take (0.14s)
    --- PASS: TestGenerationTakeMinio/switch-412 (0.04s)
    --- PASS: TestGenerationTakeMinio/copy-version (0.01s)
    --- PASS: TestGenerationTakeMinio/store-time (0.16s)
    --- PASS: TestGenerationTakeMinio/skew (0.01s)
PASS
ok  	github.com/carlosframework/platform/internal/lease	0.377s
minio contract: PASS
=== staticcheck ===
go version go1.26.10 linux/arm64
go: downloading honnef.co/go/tools v0.8.2
go: downloading golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678
go: downloading github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c
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 1m56.835s
    codehealth_test.go:107: line metrics (code lines, then physical):
          file-lines  5471  7324  internal/activator activator_test.go
          file-lines  4191  7043  internal/console server.go
          file-lines  4147  6311  . 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  3204  6398  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   362   631  cmd/console serve
          func-lines   360   362  internal/edge TestDemoAPIAliasBoundary
          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 (216 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/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               1093 at  474 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         18586 at   45 sites  functions over 300 code lines (blank and comment-only lines not counted)
    codehealth_test.go:115: file-lines         30683 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
--- PASS: TestCodeHealth (116.84s)
PASS
ok  	github.com/carlosframework/platform/internal/codehealth	117.926s
=== code-health-record ===
go version go1.26.10 linux/arm64
code-health record: comparing with the merge base 96731431af1bcd4da1535c80cbd3c8a11274b887 (main is 96731431af1bcd4da1535c80cbd3c8a11274b887)
=== 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.237s
=== internal_rootaws@0 (26 s, from +35 s)
ok  	github.com/carlosframework/platform/internal/rootaws	25.719s
=== internal_activator@0 (271 s, from +115 s)
ok  	github.com/carlosframework/platform/internal/activator	269.803s
=== internal_activator@1 (252 s, from +115 s)
ok  	github.com/carlosframework/platform/internal/activator	250.057s
=== internal_activator@2 (290 s, from +115 s)
ok  	github.com/carlosframework/platform/internal/activator	288.144s
=== internal_activator@3 (426 s, from +115 s)
ok  	github.com/carlosframework/platform/internal/activator	424.015s
=== internal_activator@4 (288 s, from +115 s)
ok  	github.com/carlosframework/platform/internal/activator	286.642s
=== internal_activator@5 (313 s, from +115 s)
ok  	github.com/carlosframework/platform/internal/activator	311.636s
=== internal_activator@6 (297 s, from +115 s)
ok  	github.com/carlosframework/platform/internal/activator	295.456s
=== internal_activator@7 (426 s, from +115 s)
ok  	github.com/carlosframework/platform/internal/activator	424.555s
=== internal_edge@0 (86 s, from +137 s)
ok  	github.com/carlosframework/platform/internal/edge	83.274s
=== internal_edge@1 (76 s, from +137 s)
ok  	github.com/carlosframework/platform/internal/edge	72.758s
=== internal_edge@2 (206 s, from +137 s)
ok  	github.com/carlosframework/platform/internal/edge	202.445s
=== internal_edge@3 (154 s, from +137 s)
ok  	github.com/carlosframework/platform/internal/edge	151.295s
=== internal_edge@4 (148 s, from +137 s)
ok  	github.com/carlosframework/platform/internal/edge	144.736s
=== internal_edge@5 (288 s, from +137 s)
ok  	github.com/carlosframework/platform/internal/edge	285.335s
=== internal_edge@6 (225 s, from +137 s)
ok  	github.com/carlosframework/platform/internal/edge	222.189s
=== internal_edge@7 (247 s, from +137 s)
ok  	github.com/carlosframework/platform/internal/edge	243.715s
=== internal_edge@8 (225 s, from +137 s)
ok  	github.com/carlosframework/platform/internal/edge	222.210s
=== internal_edge@9 (290 s, from +137 s)
ok  	github.com/carlosframework/platform/internal/edge	287.168s
=== internal_edge@10 (245 s, from +137 s)
ok  	github.com/carlosframework/platform/internal/edge	241.447s
=== internal_edge@11 (241 s, from +137 s)
ok  	github.com/carlosframework/platform/internal/edge	237.489s
=== internal_edge@12 (244 s, from +137 s)
ok  	github.com/carlosframework/platform/internal/edge	240.479s
=== internal_edge@13 (271 s, from +137 s)
ok  	github.com/carlosframework/platform/internal/edge	268.326s
=== internal_edge@14 (172 s, from +137 s)
ok  	github.com/carlosframework/platform/internal/edge	169.168s
=== internal_edge@15 (262 s, from +137 s)
ok  	github.com/carlosframework/platform/internal/edge	258.719s
=== internal_host@0 (15 s, from +201 s)
ok  	github.com/carlosframework/platform/internal/host	11.858s
=== internal_host@1 (9 s, from +201 s)
ok  	github.com/carlosframework/platform/internal/host	5.563s
=== lists: internal_edge 137 s, internal_activator 113 s, internal_host 199 s, internal_rootaws 34 s, internal_systemd 13 s
=== cpu: the gate used 7800 cpu-seconds in 541 s, about 14.4 of 32 cores; the machine as a whole was 45% busy
=== gitleaks ===
go version go1.26.10 linux/arm64
go: downloading github.com/zricethezav/gitleaks/v8 v8.30.1
go: downloading github.com/rs/zerolog v1.33.0
go: downloading github.com/spf13/cobra v1.9.1
go: downloading github.com/h2non/filetype v1.1.3
go: downloading github.com/fatih/semgroup v1.2.0
go: downloading github.com/gitleaks/go-gitdiff v0.9.1
go: downloading golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa
go: downloading github.com/hashicorp/go-version v1.7.0
go: downloading github.com/Masterminds/sprig/v3 v3.3.0
go: downloading github.com/charmbracelet/lipgloss v0.5.0
go: downloading github.com/mholt/archives v0.1.2
go: downloading github.com/spf13/viper v1.19.0
go: downloading github.com/BobuSumisu/aho-corasick v1.0.3
go: downloading github.com/lucasb-eyer/go-colorful v1.2.0
go: downloading github.com/muesli/reflow v0.2.1-0.20210115123740-9e1d0d53df68
go: downloading github.com/muesli/termenv v0.15.1
go: downloading github.com/mattn/go-runewidth v0.0.14
go: downloading github.com/pierrec/lz4/v4 v4.1.21
go: downloading github.com/klauspost/compress v1.17.11
go: downloading github.com/nwaples/rardecode/v2 v2.1.0
go: downloading github.com/bodgit/sevenzip v1.6.0
go: downloading github.com/minio/minlz v1.0.0
go: downloading github.com/klauspost/pgzip v1.2.6
go: downloading github.com/STARRY-S/zip v0.2.1
go: downloading github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707
go: downloading github.com/sorairolake/lzip-go v0.3.5
go: downloading github.com/andybalholm/brotli v1.1.2-0.20250424173009-453214e765f3
go: downloading github.com/therootcompany/xz v1.0.1
go: downloading github.com/ulikunitz/xz v0.5.12
go: downloading golang.org/x/text v0.22.0
go: downloading golang.org/x/sync v0.11.0
go: downloading github.com/spf13/pflag v1.0.6
go: downloading dario.cat/mergo v1.0.1
go: downloading github.com/Masterminds/goutils v1.1.1
go: downloading github.com/Masterminds/semver/v3 v3.3.0
go: downloading github.com/huandu/xstrings v1.5.0
go: downloading github.com/mitchellh/copystructure v1.2.0
go: downloading github.com/shopspring/decimal v1.4.0
go: downloading github.com/spf13/cast v1.7.1
go: downloading golang.org/x/crypto v0.35.0
go: downloading github.com/mattn/go-colorable v0.1.14
go: downloading github.com/rivo/uniseg v0.2.0
go: downloading github.com/fsnotify/fsnotify v1.8.0
go: downloading github.com/mitchellh/mapstructure v1.5.0
go: downloading github.com/sagikazarmark/slog-shim v0.1.0
go: downloading github.com/spf13/afero v1.12.0
go: downloading github.com/aymanbagabas/go-osc52/v2 v2.0.1
go: downloading golang.org/x/sys v0.30.0
go: downloading github.com/bodgit/plumbing v1.3.0
go: downloading github.com/bodgit/windows v1.0.1
go: downloading github.com/hashicorp/go-multierror v1.1.1
go: downloading go4.org v0.0.0-20230225012048-214862532bf5
go: downloading github.com/subosito/gotenv v1.6.0
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading gopkg.in/ini.v1 v1.67.0
go: downloading github.com/magiconair/properties v1.8.9
go: downloading github.com/pelletier/go-toml/v2 v2.2.3
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading github.com/hashicorp/golang-lru/v2 v2.0.7
go: downloading github.com/mitchellh/reflectwalk v1.0.2
go: downloading github.com/hashicorp/errwrap v1.1.0
self-test: reported source file: a key
self-test: reported source file: a 64-hex key
self-test: reported source file: a census-shaped entry
self-test: reported source file: a key marked gitleaks:allow
self-test: reported source file: a test's fake value outside tests
self-test: reported allowed file: another key beside its allowed value
self-test: reported a tracked file named gitleaks-gate-sentinel.env
self-test: reported 100 near misses of the names notscanned.go lists
self-test: skipped  the 33 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, 134 tracked files judged, 3 broken setups refused
gitleaks: scanned 12031 tracked files; 33 not scanned, by exact path (scripts/gitleaks-gate/notscanned.go)
gitleaks: clean
diff --git a/docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-spec-R1.md b/docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-spec-R1.md
new file mode 100644
index 000000000..b29b69af1
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-spec-R1.md
@@ -0,0 +1,59 @@
+Reviewed `e06a5d3ed`, round 1. **Five P1 findings and four P2 findings.**
+
+1. **P1 — §8: the memo key can expose another account’s usage.**
+ **Evidence:** [Spec:373](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:373) keys the answer by `(app, month)`. Apps are resolved within an account ([apicli.go:95](/home/paulca/amadan.net/carlos/platform-design-instance-usage/internal/console/apicli.go:95)); the existing analytics memo includes the account sqid ([analyticsview.go:477](/home/paulca/amadan.net/carlos/platform-design-instance-usage/internal/console/analyticsview.go:477)).
+ **Failure scenario:** Account A requests its `shop` usage and populates the memo. Account B requests its own `shop` within 60 seconds, passes authorization, and receives A’s hosts and totals.
+ **Fix:** Key the memo by canonical `(account sqid, app, month)`. Authenticate and check the hostname-history prerequisite before every cache hit. Test identical app names in different accounts.
+ **Fault family:** Tenant isolation across cached responses.
+
+2. **P1 — §4: activating hostname history does not separate previously reused identities.**
+ **Evidence:** [Spec:140](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:140) promises answers containing only hours counted after activation, but the proposed rows contain no activation boundary and §8 sums the whole month. Before activation, an existing hostname mark permits another create ([hostsused.go:26](/home/paulca/amadan.net/carlos/platform-design-instance-usage/internal/console/hostsused.go:26)).
+ **Failure scenario:** Counting starts while history is incomplete. An app deletes and recreates a hostname within an hour. History is then activated. The route now admits the request and returns both instances’ bytes under one host; their counts have already been combined.
+ **Fix:** Define and persist a trustworthy attribution start boundary. Exclude pre-activation buckets, including the overlapping hour, or introduce an activation epoch into counting. A current `active` mode alone cannot validate historical counts.
+ **Fault family:** Identity validity at count time.
+
+3. **P1 — §7: the watermark includes the batch that has not been written.**
+ **Evidence:** [Spec:296](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:296) defines the watermark as the oldest pending batch’s `DrainedAt`. §5 defines that timestamp as the *end* of the batch’s counting interval.
+ **Failure scenario:** A batch drained at January 1, 00:03 contains December’s final exchanges. Its December write fails, while the current-date watermark is published as 00:03. The route can declare December complete although those exchanges remain queued.
+ **Fix:** Advance the watermark only through a contiguous sequence of fully committed batches. A pending batch must hold it at the preceding committed boundary. Test a batch spanning month-end whose previous-date write fails.
+ **Fault family:** Completeness must follow durable counts.
+
+4. **P1 — §8: independently read totals and watermarks can describe different snapshots.**
+ **Evidence:** [Spec:354](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:354) reads monthly objects and today’s/yesterday’s watermarks separately, without defining an ordering or consistency check. §5 updates those objects separately.
+ **Failure scenario:** On January 1, the route reads December 31 before its final flush. The writer then commits the December counts and advances January’s watermark. The route reads that newer watermark and returns the older December total with `complete: true`. This remains possible after fixing finding 3.
+ **Fix:** Define a read protocol that makes the watermark valid for the returned totals—for example, capture committed watermarks first, then read their covered objects with appropriate cache rules. Test this interleaving explicitly.
+ **Fault family:** Completeness must describe the returned snapshot.
+
+5. **P1 — §7: current box health cannot establish historical completeness.**
+ **Evidence:** [Spec:300](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:300) considers recent counting boxes; `complete` checks only their watermarks and current `not_counting`. It does not check the month’s start against `counted_since`, historical outages, or dropped batches.
+ **Failure scenario:** Counting starts December 14. On January 1, all current watermarks pass month-end and `not_counting` is empty, so December becomes `complete: true` despite its missing first thirteen days. A box that temporarily ran an older binary can similarly disappear from the warning after upgrading.
+ **Fix:** Define completeness over coverage of the requested month. Preserve gaps and late starts, and keep affected months partial even after current counting recovers. Permitted undercounts must not become claims of complete measurement.
+ **Fault family:** Historical coverage cannot be inferred from present health.
+
+6. **P2 — §8: `hostsMode` does not establish verified hostname history.**
+ **Evidence:** [Spec:376](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:376) uses `s.hostsMode`. The existing distinction is explicit: `hostsActive` requires both active mode and a successful startup check ([hostsused.go:178](/home/paulca/amadan.net/carlos/platform-design-instance-usage/internal/console/hostsused.go:178)). Startup verification can remain pending while the console serves.
+ **Failure scenario:** The stored mode is active, but the startup inventory cannot be verified. Usage answers are admitted before the check establishes the identity prerequisite—or discovers a breach.
+ **Fix:** Require verified active history, including on memo hits, and specify the response while verification is pending.
+ **Fault family:** Identity prerequisite enforcement.
+
+7. **P2 — §§4, 12: the meter interface cannot express the two required host identities.**
+ **Evidence:** [Spec:158](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:158) requires a far alias to retain its request host in the old family and use an empty host in the new family. §12 keeps `Record`’s signature unchanged. The current far call supplies only the synthetic route ([assetcatch.go:1159](/home/paulca/amadan.net/carlos/platform-design-instance-usage/internal/edge/assetcatch.go:1159)); that route does not carry the asset block’s attribution decision.
+ **Failure scenario:** Keeping `rt.Host` attributes the alias as an instance; clearing it also changes the old day-file key.
+ **Fix:** Specify an explicit instance-attribution input or a dedicated far-delivery recording method, preserving the legacy route independently.
+ **Fault family:** Attribution metadata lost at the meter boundary.
+
+8. **P2 — §§6, 8, 13: the proposed sizes exceed the existing cache limits.**
+ **Evidence:** [Spec:290](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:290) estimates 1.5 MB per day for 1,000 instances. The cache retains bodies only up to 1 MiB and refuses reads above 8 MiB ([usagedays.go:47](/home/paulca/amadan.net/carlos/platform-design-instance-usage/internal/console/usagedays.go:47)).
+ **Failure scenario:** The stated 1,000-instance case rereads settled objects on every uncached request. Larger box-wide objects can exceed the read cap and produce permanent 503s even for an app below the 10,000-instance response cap.
+ **Fix:** Reconcile object partitioning, read limits, cache capacity and supported scale. Recalculate request costs using the actual cache policy.
+ **Fault family:** Storage-size and reader-bound compatibility.
+
+9. **P2 — §6: idle instance objects change existing economics discovery.**
+ **Evidence:** [Spec:258](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:258) requires idle boxes to write instance objects, but §6 claims `ListDirs(usage.EdgeBoxesPrefix)` remains unchanged. Existing edge-day writes skip empty flushes ([edge.go:231](/home/paulca/amadan.net/carlos/platform-design-instance-usage/internal/usage/edge.go:231)); the economics sweep treats every discovered directory as evidence of metered egress ([economicspass.go:410](/home/paulca/amadan.net/carlos/platform-design-instance-usage/internal/console/economicspass.go:410)).
+ **Failure scenario:** A box with no old edge-day object acquires a directory through an idle instance heartbeat. Economics now labels it metered although its evidence rule required an old day file.
+ **Fix:** Put the new family outside that discovery prefix, or explicitly revise and test the discovery contract. Extend T12 to include a previously empty box.
+ **Fault family:** Shared-prefix compatibility.
+
+No P3 findings.
+
+**NOT READY.**
\ No newline at end of file
diff --git a/docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-spec-R2.md b/docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-spec-R2.md
new file mode 100644
index 000000000..664a4d706
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-spec-R2.md
@@ -0,0 +1,93 @@
+Reviewed `6af091c2beb809b5538cee1741c467a041da2270`, round 2 of 3. **Three P1 findings and four P2 findings.**
+
+Round-1 dispositions:
+
+| Finding | Status |
+|---|---|
+| R1-1 P1 — cross-account memo | **Resolved:** canonical account sqid is included; authorization precedes hits. |
+| R1-2 P1 — attribution before activation | **Partly:** whole-month refusal works, but the partial exception cannot exclude pre-activation counts. |
+| R1-3 P1 — watermark over pending writes | **Resolved within one writer:** `committed` follows the fully written prefix. |
+| R1-4 P1 — inconsistent count/watermark snapshot | **Resolved:** seals precede count reads, subject to the stated settled-object immutability requirement. |
+| R1-5 P1 — historical completeness | **Partly:** gaps are retained for known boxes, but discovery can omit a serving box. |
+| R1-6 P2 — unverified hostname history | **Resolved:** `hostsActive()` is required before memo hits. |
+| R1-7 P2 — two host identities | **Resolved:** the explicit instance argument preserves legacy attribution independently. |
+| R1-8 P2 — object sizes | **Not resolved:** 16 hash buckets still combine unrelated apps. |
+| R1-9 P2 — economics discovery | **Resolved:** the new prefix is outside `usage/edge/`. |
+
+1. **P1 — §§4, 6, 8: partial answers cannot exclude counts before `from`.**
+
+ **Problem and evidence:** [§4:153](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:153) promises `[from, month end)` at an hourly boundary. But [§6:273](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:273) explicitly discards hourly figures and stores only daily totals. Boxes count before the console switch enables attribution.
+
+ **Failure scenario:** `from` is December 14 at 15:00. December 14’s object already combines traffic before and after 15:00, potentially including reused identities before activation. Including that date returns invalid earlier counts; excluding it loses valid later counts. `partial: true` does not restore the missing distinction.
+
+ **Fix:** Remove the exception, align its boundary to a whole UTC date, or retain sufficient time or activation-epoch information to filter exactly.
+
+ **Fault family:** Identity validity at count time; carries R1-2 forward.
+
+2. **P1 — §7: absence from usage storage does not prove a box served nothing.**
+
+ **Problem and evidence:** [§7:368](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:368) excludes boxes with neither new-family objects nor old day objects for D/D+1. Existing flush failures lose their window ([usage_loop.go:51](/home/paulca/amadan.net/carlos/platform-design-instance-usage/internal/host/usage_loop.go:51)). Economics discovery establishes only that a box has *ever written* usage; it does not establish exhaustive serving coverage ([economicspass.go:410](/home/paulca/amadan.net/carlos/platform-design-instance-usage/internal/console/economicspass.go:410)).
+
+ **Failure scenario:** A new box serves traffic, cannot write either usage family, and terminates. Other boxes seal the hour. The missing box is not a candidate, so the route declares the hour complete without its traffic. No registration-before-serving requirement prevents this.
+
+ The opposite problem also exists: every directory in the new family is a candidate for every date. Adding a box later can retroactively make previously complete months incomplete.
+
+ **Fix:** Establish durable serving-membership intervals independently of successful usage writes. Unknown membership must prevent completeness; boxes outside an interval must not affect it.
+
+ **Fault family:** The answer’s completeness claim; carries R1-5 forward.
+
+3. **P1 — §§5, 7: one writer can seal an hour while another writer still owes counts.**
+
+ **Problem and evidence:** [§5:224](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:224) explicitly accommodates overlapping agent processes. However, [§7:335](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:335) permits a process to seal using only its own `start`, committed batches and dropped buckets. The seal is shared by the whole box.
+
+ **Failure scenario:** Writers A and B both cover 13:00–14:00. A commits its batches through 14:05; B still owes a batch containing 13:00 traffic. A satisfies every stated condition and seals hour 13. The route returns that seal with totals missing B’s batch. Conditional writes and per-writer deduplication do not prevent this.
+
+ **Fix:** Either enforce exclusive serving-writer ownership, or require a seal to prove complete coverage and durable counts for every writer that served the hour.
+
+ **Fault family:** The answer’s completeness claim.
+
+4. **P2 — §§6, 13: hash sharding does not provide the claimed app isolation.**
+
+ **Problem and evidence:** [§6:253](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:253) puts all apps into 16 shared buckets. [§6:311](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:311) nevertheless sizes an object for one app and says other apps cannot enlarge it. The existing read cap applies to the entire object ([usagedays.go:60](/home/paulca/amadan.net/carlos/platform-design-instance-usage/internal/console/usagedays.go:60)).
+
+ **Failure scenario:** Eight apps hashing to the same shard each contribute 10,000 rows. At the spec’s estimated 110 bytes per row, the object exceeds 8 MiB. A small ninth app sharing that shard receives permanent 503s despite remaining below its response cap.
+
+ **Fix:** Partition by the full account/app identity, or define and enforce aggregate shard bounds. Recalculate cache capacity and request costs accordingly.
+
+ **Fault family:** Storage size and reader bounds; carries R1-8 forward.
+
+5. **P2 — §7: a clean restart still permanently loses the restart hour’s seal.**
+
+ **Problem and evidence:** [§7:337](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:337) sets the successor’s coverage start to its predecessor’s exit time. [§7:347](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:347) requires `start <= h0`.
+
+ **Failure scenario:** A fully flushed process exits cleanly at 14:02. Its successor starts at 14:02:13 and commits through 15:05. The predecessor could not seal hour 14 before it ended; the successor cannot seal it because 14:02 is after 14:00. All counts are durable, yet that month remains incomplete forever.
+
+ **Fix:** Preserve and validate coverage across the process handover, including the predecessor’s covered portion of the open hour, or explicitly classify every restart hour as incomplete.
+
+ **Fault family:** The answer’s completeness claim.
+
+6. **P2 — §§4, 8: temporary startup verification failure advances `from` unnecessarily.**
+
+ **Problem and evidence:** [§4:146](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:146) advances `from` after *anything* other than verified-active history. Existing startup verification can remain pending after a transient failure and then succeed in the background ([hostsused.go:144](/home/paulca/amadan.net/carlos/platform-design-instance-usage/internal/console/hostsused.go:144)).
+
+ **Failure scenario:** A console restarts on January 10. The history remains active, but its first verification attempt fails temporarily. On recovery, the stated rule moves `from` to January 10’s next hour. January’s previously valid whole-month query now returns 409.
+
+ **Fix:** Distinguish pending verification from an actual history break using durable activation identity or equivalent evidence. Pending verification should suspend answers without discarding the accepted range. Also correct the claim that activation records no time: activation writes `HostsState.At` ([hostsused_activate.go:467](/home/paulca/amadan.net/carlos/platform-design-instance-usage/internal/console/hostsused_activate.go:467)).
+
+ **Fault family:** Identity validity at count time.
+
+7. **P2 — §12: the census statement omits new root reads.**
+
+ **Problem and evidence:** [§12:620](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:620) says “root reads nothing new.” The proposed flush reads count objects and `applied` state ([§5:216](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:216)); startup reads seal objects and trusts `clean_exit` to extend coverage ([§7:337](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:337)).
+
+ **Failure scenario:** Implementation follows this census description and presents the change as write-only, omitting the new inputs and the decisions they control from the reviewer’s claims.
+
+ **Fix:** Inventory those reads explicitly, including their writers, validation and effects on deduplication and completeness. Carry them into the census card and independent review.
+
+ **Fault family:** Census accuracy and root-input review.
+
+No P3 findings.
+
+**Stopping rule 2 applies:** the completeness family has findings in two consecutive rounds. Identity validity and storage bounds also recur. Before another fix cycle, Paul must choose refusal of unsupported cases, removal of the feature causing them, or enforcement of the invariant with a guard simulation. I recommend refusing completeness claims where serving membership or writer coverage cannot be proved. One review round remains; this revision does not reset the budget.
+
+**NOT READY.**
\ No newline at end of file
diff --git a/docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-spec-R3.md b/docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-spec-R3.md
new file mode 100644
index 000000000..22fc55423
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-spec-R3.md
@@ -0,0 +1,49 @@
+Reviewed `a7d04abc1955e49e6d303e4a5b52ed649de0cc73`, round 3 of 3.
+
+| Round-2 finding | Disposition |
+|---|---|
+| R2-1 — pre-`from` counts | **Resolved:** whole-month boundaries exclude pre-`from` date objects; partial answers are removed. |
+| R2-2 — missing serving boxes | **Removed by the cut:** absent counts no longer support a completeness claim. |
+| R2-3 — overlapping writers’ seals | **Removed by the cut:** no seals remain. |
+| R2-4 — shared shards and bounds | **Partly:** app isolation is resolved; sizing and read-cost claims still need correction below. |
+| R2-5 — restart-hour seal | **Removed by the cut.** |
+| R2-6 — transient verification advances `from` | **Resolved:** pending verification suspends answers without moving the boundary; actual activation changes are distinguished. |
+| R2-7 — omitted census reads | **Resolved:** the flush’s new reads, writers, validation and effects are explicitly inventoried. |
+
+No P1 findings.
+
+1. **P2 — §§5–6: the writer-expiry rule lacks the metadata needed to implement it.**
+
+ **Problem and evidence:** [§5:236](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:236) retains writers seen within 48 hours, but the [stored shape at §6:285](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:285) contains only random writer IDs and random batch IDs. Neither records when another writer was last seen.
+
+ **Failure scenario:** A new overlapping writer cannot distinguish an expired marker from one whose successful PUT has an acknowledgement outstanding. Guessing that an unfamiliar marker is expired can remove it while preserving its counts; the original writer’s retry can then add that batch again.
+
+ **Fix:** Specify a persisted timestamp and conservative expiry rule, or retain all writer markers in each date object. Given the bounded writing period for a date, retaining them avoids this extra mechanism. Include marker retention in T5.
+
+ **Fault family:** Batch deduplication and retry-state retention.
+
+2. **P2 — §§5–6, T5: checking bucket age at the tick does not guarantee when its PUT lands.**
+
+ **Problem and evidence:** [§5:255](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:255) checks age against the tick and claims this keeps every write before settlement. [T5:483](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:483) requires the same guarantee while explicitly simulating delayed landings. The store’s conditional PUT checks an ETag, not an expiry time ([store.go:1142](/home/paulca/amadan.net/carlos/platform-design-instance-usage/internal/release/store.go:1142)).
+
+ **Failure scenario:** A still-eligible write starts before the deadline, returns an uncertain result, and lands after D+2 midnight. If the object has not changed, its ETag condition still passes. A cached absence or earlier body can then remain visible until cache expiry.
+
+ **Fix:** State the horizon as a limit on initiating/retrying writes, and acknowledge that an outstanding write may land later. Remove the absolute landing-time assertion from T5. The lower-bound contract already tolerates the resulting temporary undercount; completeness need not return.
+
+ **Fault family:** Write timing and settled-cache assumptions.
+
+3. **P2 — §§6, 13, T9: the size threshold and daily read estimate are overstated.**
+
+ **Problem and evidence:** [§6:326](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:326) and [T9:504](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:504) treat 9,000 rows as fitting within 1 MiB without bounding hostname length or counter width. An in-memory serialization of the proposed shape with 9,000 valid-length, 144-character hostnames produced **2,133,120 bytes**.
+
+ [§13:599](/home/paulca/amadan.net/carlos/platform-design-instance-usage/docs/superpowers/specs/2026-11-29-instance-usage-design.md:599) also budgets roughly 300 GETs/day for hourly polling. However, cached entries expire after six hours ([usagedays.go:228](/home/paulca/amadan.net/carlos/platform-design-instance-usage/internal/console/usagedays.go:228)), and sufficiently old dates are never retained ([usagedays.go:259](/home/paulca/amadan.net/carlos/platform-design-instance-usage/internal/console/usagedays.go:259)). The unchanged economics pass does not refresh this new family.
+
+ **Failure scenario:** Even with small objects and no eviction, six boxes near the end of a 31-day month require roughly **984 GETs/day**: 288 for unsettled dates plus four reads of 174 settled objects. Oversized objects or older months require repeated full-month reads.
+
+ **Fix:** Make sizing conditional on an explicit fixture, test long hostnames and wide counters, and budget for six-hour expiry, cache capacity, oversized bodies and historical months. Preserve the one-object-per-app layout.
+
+ **Fault family:** Storage size and reader bounds.
+
+No P3 findings. No files were changed or full test suites run. Apply these P2 corrections without another review round, subject to the existing census and sensitive-change checks.
+
+**READY AFTER FIXES.**
\ No newline at end of file
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-spec-R2.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-spec-R2.md
new file mode 100644
index 000000000..a6cd5e35c
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-spec-R2.md
@@ -0,0 +1,36 @@
+# Review brief: instance usage design, round 2 of 3
+
+Repo carlos/platform, branch `design-instance-usage`, commit 61916be97a90bd8c3dd73a23bfed3bbf1c957776.
+Under review: `docs/superpowers/specs/2026-11-29-instance-usage-design.md`.
+Authorities: AGENTS.md; the merged code it names (internal/edge/usagemeter.go, internal/host/usage_loop.go, internal/usage/edge.go, internal/console/economicspass.go, planmeasure.go, usageattrib.go, routedecls.go, internal/svcrole, internal/provision/hostsused.go, internal/console/hostsused.go). The request is discussion 1519; the consumer is Patrix's plans v1 design (patrix/patrix branch plans-v1, docs/superpowers/specs/2026-11-29-plans-v1-design.md §6.3), which is context, not an authority.
+
+You are an independent reviewer. Read the document, then the code it names, and check every claim against that code.
+
+## Fixed: do not re-argue
+
+- The consumer's requirement: bytes and requests attributed at count time to a never-reused instance identity and to the UTC hour the exchange completed, kept through delayed and retried flushes; unattributable bytes reported separately and never charged; a read-only role that can do nothing else.
+- Dates proposed for review: dev 2026-12-09, flagship and patrix-home 2026-12-14, the consumer enforcing from January 2027; production steps need Paul's go.
+
+## What to check
+
+1. Identity: does the hostname history (hosts-used) really make rt.Host a never-reused identity for every instance kind that serves traffic, including restores, custom domains and far-edge cache deliveries; what is unattributed.
+2. Hours and flushes: exactly-once per hour through retries, crashes and late flushes; the batch id and conditional writes; buckets older than 24 hours.
+3. Compatibility: the new file family; the existing day files, the economics pass and readers unchanged; older binaries.
+4. The route: scoping to one app, the role (outside Admin's union, owner-minted, app-bound), limits, 503 on unreadable files, complete_through and complete.
+5. Census, stopping rules 5 and 6, and the switch.
+
+## Round 2
+
+Earlier round: round 1, docs/superpowers/reviews/CODEX-FINDINGS-instance-usage-spec-R1.md; the spec's §16 maps each finding to its fault family and fix. First give one line per round-1 P1 and P2: resolved, partly, or not. Carry unresolved ones forward, then new findings, especially in the completeness invariant (sealing on the box, the clean-exit record, reading seals before counts, which boxes may have served a date), the @from activation record and the route's refusal of earlier months, the `partial=1` exception, the memo key, the meter's explicit instance host, the shard sizes against the cache limits, and the new prefix outside economics discovery. Name the fault family of each finding; if the completeness family produces findings again, say so.
+
+## Severity
+
+- **P1**: unsafe, would not work. **P2**: wrong or missing, fixed without another round. **P3**: polish, follow-up list.
+
+A P1 states its failure scenario and evidence (file:line).
+
+## Output
+
+Findings ranked P1, P2, P3, each with section, problem, evidence, failure scenario, fix and fault family. End with READY, READY AFTER FIXES, or NOT READY.
+
+Do not edit files. Do not spawn Anthropic-model reviewers or subagents of your own. Do not run the full test suites.
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-spec-R3.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-spec-R3.md
new file mode 100644
index 000000000..4443ba763
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-spec-R3.md
@@ -0,0 +1,38 @@
+# Review brief: instance usage design, round 3 of 3
+
+Repo carlos/platform, branch `design-instance-usage`, commit 0ee17fee1bf7aaa245867aa1322e174aec01a693.
+Under review: `docs/superpowers/specs/2026-11-29-instance-usage-design.md`.
+Authorities: AGENTS.md; the merged code it names (internal/edge/usagemeter.go, internal/host/usage_loop.go, internal/usage/edge.go, internal/console/economicspass.go, planmeasure.go, usageattrib.go, routedecls.go, internal/svcrole, internal/provision/hostsused.go, internal/console/hostsused.go). The request is discussion 1519; the consumer is Patrix's plans v1 design (patrix/patrix branch plans-v1, docs/superpowers/specs/2026-11-29-plans-v1-design.md §6.3), which is context, not an authority.
+
+You are an independent reviewer. Read the document, then the code it names, and check every claim against that code.
+
+## Fixed: do not re-argue
+
+- The consumer's requirement: bytes and requests attributed at count time to a never-reused instance identity and to the UTC hour the exchange completed, kept through delayed and retried flushes; unattributable bytes reported separately and never charged; a read-only role that can do nothing else.
+- Dates proposed for review: dev 2026-12-09, flagship and patrix-home 2026-12-14, the consumer enforcing from January 2027; production steps need Paul's go.
+
+## What to check
+
+1. Identity: does the hostname history (hosts-used) really make rt.Host a never-reused identity for every instance kind that serves traffic, including restores, custom domains and far-edge cache deliveries; what is unattributed.
+2. Hours and flushes: exactly-once per hour through retries, crashes and late flushes; the batch id and conditional writes; buckets older than 24 hours.
+3. Compatibility: the new file family; the existing day files, the economics pass and readers unchanged; older binaries.
+4. The route: scoping to one app, the role (outside Admin's union, owner-minted, app-bound), limits, 503 on unreadable files, complete_through and complete.
+5. Census, stopping rules 5 and 6, and the switch.
+
+## Round 3
+
+Earlier rounds: CODEX-FINDINGS-instance-usage-spec-R1.md and -R2.md in docs/superpowers/reviews/; the spec's §16 maps each finding to its family and fate. Paul's ruling after round 2 (stopping rule 2, recorded in §2 and on discussion 1519) is fixed: cut completeness. The route returns counts so far as a lower bound, with no complete claim and no partial months; counting is valid from the first whole UTC month after switch-on; one object per box, date and app. Judge the mechanisms that remain, not the cut.
+
+First give one line per round-2 finding: resolved, removed by the cut, partly, or not. Then new findings, especially in @from (a month start; what moves it; that a transient check failure does not), exactly-once flushing per batch, the one-object-per-app layout and its read costs, the memo, and the census statement. This is the last round: a NOT READY must say whether its P1s share one cause, and whether refusing the case up front or cutting the feature would remove them.
+
+## Severity
+
+- **P1**: unsafe, would not work. **P2**: wrong or missing, fixed without another round. **P3**: polish, follow-up list.
+
+A P1 states its failure scenario and evidence (file:line).
+
+## Output
+
+Findings ranked P1, P2, P3, each with section, problem, evidence, failure scenario, fix and fault family. End with READY, READY AFTER FIXES, or NOT READY.
+
+Do not edit files. Do not spawn Anthropic-model reviewers or subagents of your own. Do not run the full test suites.
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-spec.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-spec.md
new file mode 100644
index 000000000..e5617cd29
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-instance-usage-spec.md
@@ -0,0 +1,32 @@
+# Review brief: instance usage design, round 1 of 3
+
+Repo carlos/platform, branch `design-instance-usage`, commit d3ecefa9a5e929ea8cd6792867184f9d4a1a2fc6.
+Under review: `docs/superpowers/specs/2026-11-29-instance-usage-design.md`.
+Authorities: AGENTS.md; the merged code it names (internal/edge/usagemeter.go, internal/host/usage_loop.go, internal/usage/edge.go, internal/console/economicspass.go, planmeasure.go, usageattrib.go, routedecls.go, internal/svcrole, internal/provision/hostsused.go, internal/console/hostsused.go). The request is discussion 1519; the consumer is Patrix's plans v1 design (patrix/patrix branch plans-v1, docs/superpowers/specs/2026-11-29-plans-v1-design.md §6.3), which is context, not an authority.
+
+You are an independent reviewer. Read the document, then the code it names, and check every claim against that code.
+
+## Fixed: do not re-argue
+
+- The consumer's requirement: bytes and requests attributed at count time to a never-reused instance identity and to the UTC hour the exchange completed, kept through delayed and retried flushes; unattributable bytes reported separately and never charged; a read-only role that can do nothing else.
+- Dates proposed for review: dev 2026-12-09, flagship and patrix-home 2026-12-14, the consumer enforcing from January 2027; production steps need Paul's go.
+
+## What to check
+
+1. Identity: does the hostname history (hosts-used) really make rt.Host a never-reused identity for every instance kind that serves traffic, including restores, custom domains and far-edge cache deliveries; what is unattributed.
+2. Hours and flushes: exactly-once per hour through retries, crashes and late flushes; the batch id and conditional writes; buckets older than 24 hours.
+3. Compatibility: the new file family; the existing day files, the economics pass and readers unchanged; older binaries.
+4. The route: scoping to one app, the role (outside Admin's union, owner-minted, app-bound), limits, 503 on unreadable files, complete_through and complete.
+5. Census, stopping rules 5 and 6, and the switch.
+
+## Severity
+
+- **P1**: unsafe, would not work. **P2**: wrong or missing, fixed without another round. **P3**: polish, follow-up list.
+
+A P1 states its failure scenario and evidence (file:line).
+
+## Output
+
+Findings ranked P1, P2, P3, each with section, problem, evidence, failure scenario, fix and fault family. End with READY, READY AFTER FIXES, or NOT READY.
+
+Do not edit files. Do not spawn Anthropic-model reviewers or subagents of your own. Do not run the full test suites.
diff --git a/docs/superpowers/specs/2026-11-29-instance-usage-design.md b/docs/superpowers/specs/2026-11-29-instance-usage-design.md
new file mode 100644
index 000000000..429b2865e
--- /dev/null
+++ b/docs/superpowers/specs/2026-11-29-instance-usage-design.md
@@ -0,0 +1,726 @@
+# Bytes served per instance: a read-only usage route
+
+Status: revision 5, 2026-11-29. **Reviewed** (Astra rounds 1 to 3);
+ready after round 3's three P2 fixes, which this revision applies
+(**(R3-N)**, §16). Design only. Revision 4 applied Paul's ruling after
+Astra round 2 (§2): completeness is cut, and the route returns what has
+been counted so far as a lower bound. Branch
+`design-instance-usage`, off `main` at `4799995f`. Discussion:
+carlos/platform #1519. Consumer: patrix/patrix,
+`docs/superpowers/specs/2026-11-29-plans-v1-design.md` §6.3 and §6.4
+("plans v1" below). Review budget: three rounds (AGENTS.md stopping
+rules); all three spent, review closed. Code references are to `4799995f` and are
+starting points; re-check each.
+
+## 0. The ask in one paragraph
+
+A multi-tenant root on Carloku (Patrix's `patrix-home`, one `patrix-sites`
+instance per customer site, all on the `patrix` account) has to hold each
+site to a monthly bandwidth allowance. The platform counts edge bytes per
+route host, dates a whole flush by the time it ran, relabels a host's row
+when its owner changes, and has no credential that can read usage without
+also being able to delete instances. This spec counts bytes and requests
+per instance, places each exchange in the UTC date of the hour it
+completed, keeps that through late and retried flushes, writes one object
+per app per box and date in a new family apart from the existing one, and
+serves one app's whole UTC month, counted so far, through a new read-only
+route, a new `usage` service role and `carlos usage`. An instance is
+named by its own hostname, which the platform's hostname history never
+lets a second instance take.
+
+## 1. What exists today
+
+- **The meter.** `internal/edge/usagemeter.go` `Record(rt, requests,
+ bytes, hopped)` adds one exchange to a map keyed by `rt.Host`, under one
+ mutex, with no time attached. `SetOwner` relabels the row with the
+ route's current account and app. Record is called from three places,
+ each after the response is written: `ServeHTTP`'s observer defer
+ (`internal/edge/edge.go` 2771), the far asset catch
+ (`internal/edge/assetcatch.go` 1176) and the demo path
+ (`internal/edge/demo_traffic.go` 217).
+- **Aliases already resolve to the primary.** An attached hostname shares
+ its primary route's entry (`edge.go` 1498-1528), so `rt` in Record is
+ the instance's own route and `rt.Host` its own host, not the alias. The
+ exception is the far asset catch, which builds a synthetic route from
+ the request host (`assetcatch.go` 1170).
+- **The flush.** `internal/host/usage_loop.go` drains the meter every five
+ minutes and `usage.UpsertEdgeDay` (`internal/usage/edge.go` 231)
+ CAS-merges the whole drain into `usage/edge/<box>/days/<date>.json` at
+ the flush's own day and hour, skipping an empty flush. A failed write is
+ logged and the window is lost (`usage_loop.go` 51-58).
+- **The readers of that family** are the economics sweep
+ (`internal/console/economicspass.go` `sweepUsage`, 388), which also
+ treats every directory under `usage/edge/` as a box that meters egress
+ (410-416); the console's edge-day reader (`internal/console/edgedays.go`);
+ and the settled-day cache (`internal/console/usagedays.go`), which keeps
+ a body of at most 1 MiB (`usageDayCacheMaxBody`) and refuses to read one
+ over 8 MiB (`usageDayReadCap`).
+- **The hostname history** (nearest-region never-reuse,
+ `2026-10-26-nearest-region-without-claims-design.md`;
+ `internal/provision/hostsused.go`, `internal/console/hostsused.go`).
+ Every data-kind create writer puts a mark at
+ `control/hosts-used/<host>.json`, create-only, before it persists the
+ record, and "no code path ever deletes one". Once the history is active,
+ a create whose hostname is already marked is refused (S1). Data kinds
+ are every record kind but static and service (`Record.DataKind`), so
+ every instance is marked, stateless and addr-backed ones included, and a
+ record's kind cannot change in place (`ErrKindChange`). While the
+ history is invalidated, or active but not yet verified by the console's
+ start-up check, no data-kind create is admitted (S5, `hostsActive`,
+ `hostsused.go` 178). Activation runs offline with the console stopped
+ and writes the active state with its time, `HostsState.At`
+ (`hostsused_activate.go` 467); an invalidation rewrites `At` with its
+ own time (`hostsused.go` 485), so a later activation always writes a
+ new `At` **(R2-6, correcting revision 3's "records no time")**.
+ Flagship reports "mode: active. a hostname that has held data is never
+ created again", 721 hostnames (`carlos system hosts-used status`,
+ 2026-11-29).
+- **No role reads usage alone.** `carlos analytics` admits Instance and
+ Operate (`routedecls.go` 733). Instance can delete sibling instances
+ (#185); Operate can restart and reconfigure every instance.
+
+## 2. Paul's ruling, and the requirements
+
+**Paul's ruling (2026-11-29, posted on #1519), binding.** Astra round 2
+found the completeness family for the second round running (stopping
+rule 2). Paul chose to cut the feature that produces it:
+
+> Cut completeness. The route returns the bytes counted so far as a lower
+> bound, with no complete claim and no partial=1; counting is valid from
+> the first whole UTC month after switch-on; one file per app. The
+> consumer only restricts on bytes actually counted, so a missed count
+> favours the customer.
+
+So this spec has no `complete`, `complete_through`, seals, watermarks,
+clean-exit record, candidate-box discovery or `partial=1`. A count that is
+lost (a crash, a write that fails for 24 hours, a box that never flushes)
+is simply not in the figure.
+
+**Requirements** (from #1519 and plans v1 §6.3, as the ruling leaves them):
+
+- **R1.** Every metered exchange is attributed, when it is counted, to the
+ instance that served it, by an identity that is never reused. A host
+ that moves to another instance starts a new row.
+- **R2.** Every exchange is placed by the UTC hour it completed and keeps
+ that through every delay. November traffic flushed in December is
+ November's.
+- **R3.** The route sums an instance's bytes across all its hosts and
+ boxes for the requested month.
+- **R4.** Bytes with no instance identity are reported apart and never
+ charged to an instance.
+- **R5.** One call returns the whole app, wakes nothing and reads no
+ instance. Its figures are the bytes and requests counted so far: a lower
+ bound, never more than was served.
+- **R6.** A read-only role bound to one app that can do nothing else.
+- **R7.** `carlos usage --app <a> [--month YYYY-MM]` for operators.
+
+## 3. Decisions at a glance
+
+| # | Question | Recommendation |
+|---|---|---|
+| D1 | Identity | The instance's own hostname, passed to the meter explicitly, at count time. Answers only for whole UTC months from `from`, the first month after the switch is on with the history verified active (§4) |
+| D2 | Hour | The meter keys by the UTC hour the exchange completed; the flush adds it to that hour's date. A failed batch is retried whole, in order, at most once per object, for 24 hours, then dropped (§5) |
+| D3 | File | A new family under its own prefix, one object per box, date and app: `usage/instances/<box>/<date>/<account>/<app>.json`. Nothing under `usage/edge/` changes (§6) |
+| D4 | Meaning | Counted so far, a lower bound; no completeness claim (§7, Paul's ruling) |
+| D5 | Route | `GET /api/cli/apps/{account}/{app}/usage?month=YYYY-MM`; whole UTC months at or after `from`, earlier ones refused; at most 10,000 instances; the memo keyed by account, app and month; `hostsActive()` on every call (§8) |
+| D6 | Role | `usage`, outside Admin's union; the one door admits `Exactly(Usage, Instance, Operate, Admin)`; minted by an owner, bound to one app (§9) |
+| D7 | CLI | `carlos usage --app <a> [--month YYYY-MM] [--account <a>] [--json]` (§10) |
+| D8 | Rollout | Boxes count from the release; route, mint and `from` behind `CONSOLE_INSTANCE_USAGE`, switched on on flagship on 2026-12-14, so `from` is 2027-01-01 and the first look is early January 2027 (§12) |
+
+## 4. The instance identity (D1, R1)
+
+**The identity is the instance's own hostname.** My call, as the
+simplest identity the platform supports, because the hostname history
+(§1) makes a host never-reused once it is active:
+
+- Every instance create marks its host before the record exists, the
+ mark is never deleted, and once the history is active a marked host is
+ refused to every later create, by any account or app.
+- Instances that hold no data are covered: the history marks by record
+ kind, and every instance kind is a data kind. Static and service
+ records are exempt, and they are not counted here.
+- Custom domains are not instance hostnames: an attached name resolves to
+ its primary's route row, so the host recorded is the instance's own
+ whichever domain the visitor used, and a domain that moves is counted
+ to whichever instance served each request.
+- The one way a marked host comes back is an instance restore (#658),
+ which returns the same instance to its original owner on the proof its
+ own create recorded. Its bytes before and after are one site's.
+
+Revision 1 used the route row's `(host, incarnation)`; it needed the
+lifetimes cutover, whose state on flagship cannot be read, and still had
+to declare a window around a delete and recreate. A new identity column
+was set aside for the same reasons and because it adds a registry column
+every box migrates and the census pins.
+
+**The attribution start, `from` (R1-2, R2-1, R2-6).** A host is never
+reused only from the history's activation on, and boxes count from their
+release, which may be before it. So the console persists where
+attribution starts, on a whole month, and the route refuses anything
+earlier:
+
+- The first time a serving console of this build holds the history
+ verified active (`hostsActive()`: mode active and the start-up check
+ passed) with `CONSOLE_INSTANCE_USAGE` on, it writes
+ `usage/instances/@from.json` create-only:
+ `{"from": "<first day of the next UTC month>", "activation": "<HostsState.At>"}`.
+ The history was active when it was written, before `from` began, so
+ every hour from `from` on is after activation.
+- **`from` is a month start, so it is a date boundary.** Objects are per
+ date (§6), and the route reads only dates at or after `from`, so counts
+ a box made before `from` are never read, exactly, whatever the boxes
+ counted earlier **(R2-1)**.
+- **Only a real break moves `from`, and only forward (R2-6).** A break is
+ evidence the history stopped vouching: the serving console invalidates
+ it itself, or reads it as incomplete or invalidated, or reads it active
+ with an `At` other than the recorded `activation` (it was invalidated
+ and activated again offline). On a break the route refuses (409), and
+ the next time the console holds the history verified active it rewrites
+ `@from` by CAS: `from` becomes the first day of the month after that,
+ `activation` the new `At`. A start-up check that is merely pending, or
+ that failed and is retrying, is not a break: the route answers 503
+ meanwhile and `@from` is untouched, so a console restart never costs a
+ month already being answered.
+- The route answers whole months starting at or after `from` and refuses
+ an earlier month with 409, naming the first month it can answer. There
+ is no partial answer (Paul's ruling).
+
+**What the meter is told (R1-7).** The two families need two different
+hosts for a far-edge alias: the existing family keys it by the request
+host, the new one must not attribute it. So `Record` gains one explicit
+argument, the instance host: `Record(rt registry.Route, instance string,
+requests, bytes int64, hopped bool)`. The existing family still keys by
+`rt.Host` exactly as today; the new family counts the exchange only when
+`rt.Kind == "instance"`, under `instance`, with `""` meaning "this app's,
+not attributable". It stays one method for one exchange, as the meter's
+comment requires. The three callers:
+
+- `ServeHTTP` and the demo path pass `rt.Host`: the route row they served
+ is the instance's own.
+- The far asset catch passes `a.Primary` only when it equals the request
+ host, else `""`. An alias it delivers, or a block from an older
+ publisher with no `primary`, is unattributable: the block's primary is
+ up to an hour old, and a domain moved within that hour must not be
+ charged to its old instance (R4).
+
+**Owners.** Each row of the new family is keyed by account, app and
+instance host as they were on the route row when the exchange completed,
+as `usage.GuardKey` keys protection counts. An instance that changes
+hands keeps both owners' bytes apart, and each owner's route sees only
+its own.
+
+**Moves.** An instance moved to another box keeps its host; its bytes are
+summed across the boxes' objects (R3). A backhauled exchange is counted
+once, by the box holding the row, as today (`edge.go` 2734).
+
+## 5. The hour, and how a late flush keeps it (D2, R2)
+
+**Counting.** `UsageMeter` gains a clock (`now func() time.Time`, real by
+default, injected in tests) and a second map keyed by
+`{hour int64; account, app, instance string}`, `hour` being the Unix hour
+of `now()` when Record runs. Record runs once per exchange, after the last
+byte, so **an exchange counts whole in the hour it completes**: a
+download spanning midnight is never split. Record stays one lock and two
+map updates, with no allocation and no I/O. The existing per-host map and
+`SetOwner` are untouched.
+
+**Draining.** `Drain` swaps both maps under the lock and returns, in
+`usage.EdgeFlush`, a new `Instances` field.
+
+**Writing.** The flush groups a batch's buckets by UTC date and app and
+CAS-merges each group into that box's object for the date and app (§6),
+adding each instance's requests and bytes to the date's totals. A batch
+drained at 00:03 on 1 December holding 23:58 November traffic adds it to
+30 November's object.
+
+**Exactly once per batch.** Each agent process draws a random writer id
+at start; each batch gets a random id at drain. Each object records, per
+writer id, the last batch merged into it (`applied`). **Every writer's
+marker is kept for the object's whole life (R3-1):** nothing expires or
+removes one, so a writer whose successful PUT lost its answer always
+finds its own marker on the retry. The list stays small: an object is
+written only within about 25 hours of its date, so it holds one marker
+per agent process of that box in that window. The flush keeps a queue of batches not yet fully
+written, in drain order:
+
+1. Each tick works the queue oldest first, then the new batch. For each
+ object a batch still owes, it reads the object; if `applied[writer]`
+ is the batch's id, that part is already in (a write that landed but
+ whose answer was lost); otherwise it merges and writes conditionally
+ on the ETag it read. A conflict re-reads and checks again.
+2. A batch is never merged with another, and a later batch is never
+ written to an object while an earlier one still owes it, so
+ `applied[writer]` always names the newest batch merged by that writer.
+3. Every write is conditional on the ETag just read, so a delayed write
+ from an earlier attempt and the retry cannot both land: each batch is
+ merged into each object at most once, and while it is queued, at
+ least once. The per-writer id keeps this true if two agent processes
+ of one box ever overlap.
+4. **The drop horizon, a limit on starting writes (R3-2).** No write or
+ retry is started for a bucket whose hour began more than 24 hours
+ before the tick; such a bucket is dropped, logged with its bytes, and
+ counted on the box's status (`instance_usage_dropped_bytes`). This
+ bounds the queue at 288 batches, and the last write started for date
+ D begins by D+1 23:00, before D's settled time (D+2 00:00). It does not
+ bound when a write lands: the store's conditional PUT checks an ETag,
+ not a deadline, so a write started in time whose answer was lost may
+ still land after D settles. The settled-day cache may then hold an
+ earlier body, or an absence, until its six-hour trust runs out and it
+ reads the object again. That is a temporary undercount, which the
+ lower-bound contract allows (§7); it is never a double count.
+
+Losses are undercounts only: no fault adds a byte twice. A crash or
+restart loses the meter's last five minutes and the queue, as the
+existing family does today; under Paul's ruling that is a count the
+customer is not charged for.
+
+**Clocks.** The hour is the box's clock, as for every box-written usage
+object.
+
+## 6. The file, and compatibility (D3)
+
+**A new family under its own prefix (R1-9)**, outside `usage/edge/`, so
+the economics sweep's box discovery (`ListDirs("usage/edge/")`) and its
+"this box meters egress" rule see exactly what they see today. **One
+object per box, date and app (R2-4, Paul's ruling)**:
+
+```
+usage/instances/@from.json the attribution start (§4)
+usage/instances/<box>/<date>/<account>/<app>.json one app's counts on one box and date
+```
+
+```
+{
+ "v": 1, "box": "<box>", "date": "2026-11-30",
+ "account": "<sqid>", "app": "patrix-sites",
+ "applied": {"<writer id>": "<batch id>"},
+ "instances": {
+ "alpha.patrix.site": {"requests": 678, "bytes_out": 123,
+ "hop_requests": 4, "hop_bytes_out": 45},
+ "": {"requests": 2, "bytes_out": 900}
+ }
+}
+```
+
+The key `""` is the app's unattributable exchanges (§4). `hop_*` are the
+existing subset annotation: inside the totals, never added. Counts are
+per date, not per hour: a month is whole dates, so the route never needs
+an hour's figure; the hour does its work in placing each exchange in its
+date. The account and app path segments are the key-safe forms the
+console already uses for app keys (`keySegment`); the body's `box`,
+`date`, `account` and `app` must match the key, or the object is refused.
+Only an app with traffic in a flush gets a write; an idle box writes
+nothing.
+
+**Why a separate family, not a field on the old day file.** That file
+is rewritten whole by whichever binary runs on the box, so a rollback
+would drop a new field from the day, and its prefix is the economics
+sweep's discovery prefix. By "the consumer list is everything that parses
+the shape", the new family has three consumers, all new: the route, the
+settled-day cache and the flush itself (§12).
+
+**Compatibility.**
+
+- Everything under `usage/edge/` is unchanged in shape, meaning and set
+ of objects: same keys, same dating by flush, still skipping empty
+ flushes. Tests pin the old day file's bytes and the economics meters
+ for a fixed traffic script, including a box that writes no old day at
+ all (T10).
+- `usageDayDate` gains the new family, so a settled object is kept like
+ the others. The last write to date D is started by D+1 23:00, before
+ D+2 00:00; one that lands later is picked up when the cache's copy
+ expires, six hours at most (§5, R3-2).
+- Boxes write the deployment bucket under any key today (region-host's
+ `deployment_bucket_arn/*` grant), so no IAM changes. Fleet boxes would
+ write under `fleets/<fleet>/usage/instances/`, which the route never
+ reads.
+
+**Sizes and the readers' bounds (R1-8, R2-4, R3-3).** An object holds
+one app's rows only, so no other app can grow it. A row's size depends
+on its hostname and the width of its counters; measured by serialising
+the shape above compactly (`encoding/json`):
+
+| Fixture | Bytes a row | Rows under 1 MiB (kept in cache) | Rows under 8 MiB (read cap) | 10,000 rows |
+|---|---|---|---|---|
+| 25-character host, 10-digit counters (a `patrix-sites` instance) | about 128 | about 8,100 | about 65,000 | 1.3 MB |
+| 32-character host, 12-digit counters | about 143 | about 7,300 | about 58,000 | 1.4 MB |
+| 144-character host, 19-digit counters | about 283 | about 3,700 | about 29,000 | 2.8 MB |
+| 253-character host (the longest valid), 19-digit counters | about 392 | about 2,600 | about 21,000 | 3.9 MB |
+
+So within the route's cap (10,000 instances, §8) an object is always
+under the 8 MiB read cap, even at the longest hostnames and widest
+counters: no app within the cap can be refused for its size. Whether an
+object is kept in the cache depends on its hosts: a `patrix-sites`-shaped
+app is kept up to about 8,000 instances on one box and date, an app of
+long hostnames up to about 2,600. Past that its settled objects are
+re-read on each uncached call (§13). The builder pins the table with a
+fixture test (T9), not with an estimate.
+
+## 7. What the figures mean (D4)
+
+The route's figures are **the bytes and requests counted so far** for
+the month: a lower bound on what the instances served, never more
+(Paul's ruling). A count is missing when a box crashed before a flush,
+could not write for 24 hours, or ran an older release; it is never
+counted twice (§5). The answer makes no claim of completeness and has no
+freshness field of its own beyond `read_at`, the time the console read
+the objects. Counts reach the objects within a flush (five minutes) and
+the route within its memo (60 seconds).
+
+plans v1 already reads it this way: a stored figure only rises, and the
+site is restricted only on bytes actually counted, so a missed count
+favours the customer.
+
+## 8. The route (D5, R3, R4, R5)
+
+```
+GET /api/cli/apps/{account}/{app}/usage?month=2027-01
+200
+{
+ "app": "patrix-sites",
+ "month": "2027-01",
+ "from": "2027-01-01T00:00:00Z",
+ "to": "2027-02-01T00:00:00Z",
+ "instances": [
+ {"host": "alpha.patrix.site", "bytes_out": 123, "requests": 678,
+ "hop_bytes_out": 45, "hop_requests": 4}
+ ],
+ "unattributed": {"bytes_out": 900, "requests": 2},
+ "total": {"bytes_out": 1023, "requests": 680},
+ "read_at": "2027-01-14T13:05:41Z"
+}
+```
+
+- **The gate, on every call (R1-6).** `instanceGate` (persons who are
+ members, or a role the door admits, with its per-credential limiter),
+ then the hostname history: the route answers only while `hostsActive()`
+ holds and the active state's `At` is `@from`'s `activation`. While the
+ start-up check is pending it answers 503 with `Retry-After: 60` ("the
+ hostname history is still being checked; try again in a minute"). A
+ break (§4), or a console with host claims, which never activates the
+ history, is 409 ("this console's hostname history is not active, so
+ bytes cannot be tied to one instance"). Both checks run before the memo
+ is consulted. Before `@from` exists the route answers 409 ("counting by
+ instance has not started").
+- **One app, whole UTC months at or after `from`.** `month` defaults to
+ the current UTC month. A malformed or future month is 400; a month
+ starting before `from` is 409, naming the first month it can answer.
+ The answer sums whole dates of the month up to today.
+- **What it reads.** One LIST of `usage/instances/` for the boxes, then,
+ per box and date of the month up to today, the app's object, from the
+ console's own store (the root boxes the economics sweep reads). No
+ record, registry row or instance, and it wakes nothing. A missing object
+ is a box that served none of the app's traffic that day.
+- **Instances** are listed by host, summed over boxes and dates, sorted by
+ host. Only instances with traffic in the month appear; a deleted
+ instance still appears, since its host is never reused. The `""` row is
+ `unattributed`; `total` is both together.
+- **A cap, no paging.** At most 10,000 instances (about 1.1 MB of JSON);
+ past that, 409 "this app has more than 10,000 instances with traffic
+ this month; ask for paging".
+- **An unreadable object is an error, not a smaller figure.** An object
+ that exists but cannot be read or parsed, fails its key check, or is
+ over the 8 MiB read cap makes the answer a 503 with `Retry-After: 60`,
+ logged and filed as a failed job, so a figure never drops because of a
+ read fault.
+- **The memo (R1-1).** The answer is memoised for 60 seconds under the
+ key `(account sqid, app, month)`, the account sqid being the one the
+ gate resolved, as the analytics memo keys (`analyticsview.go` 477). The
+ gate and the history check run before every memo hit.
+- **Registered** only while `CONSOLE_INSTANCE_USAGE` is true (a
+ `routeGate`), so it 404s until then.
+
+## 9. The role (D6, R6)
+
+`svcrole.Usage Role = "usage"`, following the `domains` role's shape
+(`2026-11-28-domain-resale-design.md` §4.1, not built yet; nothing here
+depends on it):
+
+- **Outside Admin's union.** `Allow` panics on Usage, as on Run and
+ Platform. Its one door is registered with `Exactly(Usage, Instance,
+ Operate, Admin)`: the analytics read's holders plus Usage. Those three
+ can already read an app's analytics, logs and errors, so admitting them
+ adds nothing; keeping Usage out of the union means no later `Allow(...)`
+ registration can give a usage credential a second door.
+- **Bound to one app.** The mint requires `--app`, as Deploy and Run do,
+ and the gate refuses another app with the neutral 404.
+- **Minted by an owner**, through the existing services doors
+ (`POST /api/cli/services/{account}`, owner-gated, which no credential
+ reaches), and refused while `CONSOLE_INSTANCE_USAGE` is off.
+- **Persons** are not role-gated: any member of the account reads it.
+- **Pinned.** `svcroutes_test.go`'s intent list gives Usage exactly this
+ door; a test asserts no `Allow` set carries Usage; `closedDoors` and
+ `mintDoors` stay closed to it; `TestInstanceRoleMatchesTodaysAppTokenReach`
+ gains this door for Instance; `carlos services create --role` and
+ `roleNames()` list it.
+
+For Patrix: `carlos services create --role usage --app patrix-sites
+--account patrix patrix-home-usage`, kept in the root's secrets as
+`PLAZA_USAGE_TOKEN`, apart from the provisioning credential (plans v1
+§6.3 item 6).
+
+## 10. The CLI (D7, R7)
+
+```
+carlos usage --app <app> [--month YYYY-MM] [--account <sqid|name>] [--json]
+```
+
+A new `clireg` node (`usage`, customer audience) beside `analytics`, with
+its `parity/parity.tsv` row (`gap`: a console view is later) and a
+heading in `docs/site/cli.md`, in the same branch. It returns errors, not
+`log.Fatal`. `--json` prints the route's answer as is. The human output
+leads with the state:
+
+```
+patrix-sites, January 2027, counted so far (14 Jan 13:05 UTC)
+
+ Instance Sent Requests
+ alpha.patrix.site 14.2 GB 1,204,331
+ beta.patrix.site 312 MB 40,112
+ Not tied to a site 1.1 MB 88
+
+ 2 instances, 14.5 GB sent, 1,244,531 requests
+```
+
+A month before `from` says when counting by instance starts ("Counting
+by instance starts on 1 January 2027"). The wording is a sketch: the
+output gets the UX pass and Luna's copy review before it is built, and
+its strings land with an `approved_*_copy_test.go`.
+
+## 11. Tests
+
+Unit (fake clock, `release.DirStore` or a fault-injecting store):
+
+- **T1, November flushed in December** (the consumer's test). Exchanges
+ complete at 23:58:30 on 30 November; the drain runs at 00:03 on 1
+ December. They are in 30 November's object, in `month=2026-11`'s answer
+ and not in `month=2026-12`'s.
+- **T2, late and retried.** The 00:03 write fails twice; the 00:13 tick
+ writes it. Still November's, counted once.
+- **T3, lost answer and overlap.** The store applies a PUT and returns an
+ error; the retry sees `applied[writer]` and writes nothing. A delayed
+ first attempt racing the retry: exactly one lands. Two writer ids on one
+ box: neither's check is fooled by the other's batch.
+- **T4, ordering.** Batches X and Y pending for one object are applied X
+ then Y, never Y while X is pending.
+- **T5, never twice.** A randomized simulation over failures, lost
+ answers, delayed landings, overlapping writers, restarts and the drop
+ horizon checks after every step that each object's totals never exceed
+ what its batches counted, and equal it once nothing is queued, nothing
+ was dropped and no write is outstanding. It also checks that every
+ writer marker ever written to an object is still in it (R3-1), and that
+ no write or retry is started for a bucket past the drop horizon
+ (R3-2); a delayed landing after the horizon is allowed and must not
+ break the first check.
+- **T6, a spanning response** completes after midnight and is counted
+ whole in the new day.
+- **T7, `from` (R2-1, R2-6).** `@from` is written only with the history
+ verified active and the switch on, as the next month's first day; a
+ month before it is 409; counts written before `from` on its own boxes
+ never reach an answer. A start-up check that fails and then passes
+ leaves `@from` and its answers unchanged (503 meanwhile). A
+ self-invalidation, a read of incomplete or invalidated, and an active
+ state with a new `At` each move `from` to the month after the next
+ verified-active hold, never back.
+- **T8, the route.** Identical app names in two accounts never share a
+ memo entry (R1-1); a pending start-up check is 503 and a break 409, on a
+ memo hit too (R1-6); read failure, parse failure, a key mismatch and an
+ object over the read cap are 503; the cap answers 409; another app's
+ bound credential is 404; the switch off is 404.
+- **T9, object bounds (R2-4, R3-3).** Another app's traffic never
+ enlarges an app's object. A fixture test serialises the §6 table's four
+ shapes and pins their bytes a row; at 10,000 rows of 253-character
+ hosts and 19-digit counters the object is under the 8 MiB read cap.
+- **T10, compatibility (R1-9).** For a fixed traffic script the old day
+ file's bytes, the set of `usage/edge/` directories and the economics
+ sweep's meters (`EgressMetered` included) are identical before and
+ after, including a box that served nothing.
+- **T11, identity and attribution (R1-7).** An instance that changes
+ owner keeps two rows; a static route is not in the new family; a far
+ alias delivery is under the request host in the old family and `""` in
+ the new; a far delivery of the primary is attributed; a domain moved
+ mid-hour splits at count time.
+- **T12, the role.** As §9, plus the parity and docsite tests for the
+ CLI.
+- **T13, the meter under `-race`** (`internal/edge` is in `make race`).
+
+End to end: one edge with a real meter serving an instance and an alias,
+a flush across a midnight the test's clock crosses, and the console route
+reading the result.
+
+## 12. Rollout, the switch and review (stopping rules 5 and 6)
+
+**One slice, one merge**: box counting, the family, the route, the role
+and the CLI land together (rule 6).
+
+**The switch.** Boxes count from the release that carries this.
+`CARLOS_INSTANCE_USAGE=off` in a box's `host.env` stops its writes (an
+emergency stop; its traffic then goes uncounted, which favours the
+customer). The route, the role's mint and the writing of `@from` are
+behind the console setting `CONSOLE_INSTANCE_USAGE=true`; switched off,
+the route 404s and the mint refuses `--role usage`, and the boxes keep
+counting.
+
+**Prerequisite.** The console's hostname history is verified active.
+Flagship's is active. Dev's is not known; dev is switched on only if
+`carlos system hosts-used status` there says active.
+
+**Dates** (rule 5):
+
+| When | What |
+|---|---|
+| 2026-11-29 | design reviewed: Astra rounds 1 to 3, ready after round 3's fixes (applied) |
+| by 2026-12-08 | built, reviewed (per-task Astra on the meter, the flush and the role, since they touch billing and root, rule 3; one whole-branch review), merged |
+| 2026-12-09 | dev, only if its history is active: boxes rolled, switch on |
+| 2026-12-14 (Mon) | flagship: release rolled to every box, the console switched on (writing `@from` = 2027-01-01), `patrix-home`'s usage credential minted on the `patrix` account; each step on Paul's go (production approval rule) |
+| 2027-01-01 | the first month counted; Patrix enforces from here |
+
+**What Paul sees first:** early in January 2027, `carlos usage --app
+patrix-sites` on flagship listing each site's bytes and requests for
+January so far. From 2026-12-14 until then, the same command says
+counting by instance starts on 1 January 2027.
+
+**Census (R2-7).** `internal/edge`, `internal/host` and `internal/usage`
+are in the root binary, so the branch carries a census card and an
+independent reviewer from the other family (Astra) gives the verdict on
+#280. The change adds writes and one new read in the root binary, which
+the card claims:
+
+- **What is read:** the box's own count objects,
+ `usage/instances/<box>/<date>/<account>/<app>.json`, in the deployment
+ bucket (or a fleet's rebased prefix), by the agent's usage flush, before
+ each conditional write.
+- **Who writes them:** the agent processes of the same box label, through
+ this flush. The deployment bucket's `*` grant lets any platform box
+ write any key, the same exposure the old `usage/edge/` family has;
+ tenants, apps and their credentials cannot write there, and a fleet
+ box's store door confines it to its fleet's prefix.
+- **What is checked:** the body parses as v1 and its `box`, `date`,
+ `account` and `app` match the key; anything else stops that object's
+ write, is logged, and leaves the batch queued until the drop horizon.
+- **What it decides:** only whether a batch is already merged
+ (`applied[writer]`) and the totals the merge adds to. A forged object
+ could make the box skip a batch (an undercount) or carry false totals;
+ it can open, run or follow nothing, and decides nothing outside these
+ objects. The console reads `@from.json`, which only the console writes;
+ the console is outside the census scope.
+
+Revision 3's seal objects and clean-exit record, and the reads they
+needed at start-up, are gone with the cut.
+
+**Code health.** `Record` gains one argument at its three call sites;
+the far catch decides its instance host in one place. The family goes in
+a new `internal/usage/instances.go`, the queue in
+`internal/host/usage_loop.go`, the route in a new
+`internal/console/apiusage.go`.
+
+## 13. Cost
+
+Counted against the settled-day cache's real policy (1 MiB bodies, six
+hours' trust, 64 MiB in all):
+
+- **Boxes.** Per five-minute tick, one GET and one PUT for each app that
+ had traffic on that box in the tick. A box serving mostly `patrix-sites`
+ writes a few objects a tick; an idle box writes nothing. The cost grows
+ with apps served per box, as the analytics flush's one write per app
+ already does.
+- **The route, current month (R3-3).** One LIST a call, and per box and
+ date one GET, whether or not the object exists. The cache trusts a
+ settled entry (an absence included) for six hours, then reads it again,
+ and the unchanged economics pass does not refill this family. So
+ `patrix-home` reading hourly with six boxes near the end of a 31-day
+ month costs about 288 GETs a day for the unsettled dates (6 boxes x 2
+ dates x 24 calls) and about 696 for the settled ones (6 x 29 dates x 4
+ reads a day): about 1,000 GETs and 24 LISTs a day, growing with boxes
+ and with the day of the month.
+- **Objects the cache does not keep.** A settled object over 1 MiB
+ (§6), or any object when the cache's 64 MiB is under pressure, is read
+ on every uncached call: up to 24 a day per such object.
+- **Older months.** Dates before the first of last month are never kept
+ (`usageDayFirstKept`), so each uncached call for such a month reads
+ every box and date: about 190 GETs for six boxes and a whole month. The
+ consumer reads the current month only (plans v1 §6.4); an operator's
+ `--month` for an old month pays this once a minute at most (the memo).
+- **Memory.** The pending queue holds at most 24 hours of buckets.
+
+## 14. Non-goals
+
+- Any claim of completeness or freshness beyond `read_at` (Paul's
+ ruling).
+- Re-dating or de-duplicating the old day files, or changing the
+ economics sweep or `planmeasure.go`'s account bandwidth. Moving account
+ bandwidth onto the new family is a possible follow-up.
+- Fleet boxes, and consoles whose history is not active.
+- Any month before `from`, and any partial month.
+- A platform-side cap or enforcement. The consumer enforces.
+- Inbound bytes (uploads), an instance's own egress, mail.
+- A breakdown by path, kind or cache hit.
+- Per-hour answers or arbitrary ranges.
+- Paging past 10,000 instances.
+- Persisting the meter or the queue across a restart, or a final flush
+ at shutdown (a lost count is the customer's gain).
+- A console page; the parity row is a gap until one is asked for.
+
+## 15. Open questions for Paul
+
+None. Paul's ruling (§2) settles the round-2 family; the dates stand
+(coordinator, 2026-11-29), and each production step needs Paul's go.
+
+## 16. Review history
+
+**Revision 2** (2026-11-29, before review): identity changed from
+`(host, incarnation)` to the host, on the finding that flagship's
+hostname history is active. Not a round.
+
+**Round 1** (Astra, on `e06a5d3ed`,
+`CODEX-FINDINGS-instance-usage-spec-R1.md`): NOT READY, five P1 and four
+P2. Resolved in revision 3 (`61916be97`):
+
+| Finding | Fault family | Resolution in revision 3 |
+|---|---|---|
+| R1-1 P1, memo key across accounts | Tenant isolation across cached responses | Memo keyed by account sqid, app and month; gate and history checked before every hit |
+| R1-2 P1, identities reused before activation | Identity validity at count time | A persisted attribution start, `@from`; months before it refused |
+| R1-3 P1, watermark over an unwritten batch | The answer's completeness claim | Seals following the committed prefix |
+| R1-4 P1, totals and watermark from different snapshots | The answer's completeness claim | Seals written after counts, read before them |
+| R1-5 P1, present health for past completeness | The answer's completeness claim | Per-hour seals and candidate boxes |
+| R1-6 P2, mode without verification | Identity prerequisite enforcement | `hostsActive()` on every call and memo hit |
+| R1-7 P2, meter cannot carry two hosts | Attribution metadata at the meter boundary | `Record` takes the instance host explicitly |
+| R1-8 P2, sizes over the cache limits | Storage size and reader bounds | Per-date totals in 16 shards |
+| R1-9 P2, idle objects change economics discovery | Shared-prefix compatibility | New family under `usage/instances/` |
+
+**Round 2** (Astra, on `6af091c2b`,
+`CODEX-FINDINGS-instance-usage-spec-R2.md`): NOT READY, three P1 and four
+P2, and stopping rule 2 on the completeness family (R1-3 to R1-5, then
+R2-2, R2-3, R2-5). Paul ruled the same day to cut completeness (§2).
+Revision 4:
+
+| Finding | Fault family | In revision 4 |
+|---|---|---|
+| R2-1 P1, a partial answer cannot exclude counts before `from` | Identity validity at count time | Removed by the cut (no `partial=1`); what remains is resolved: `from` is a month start, so a date boundary, and pre-`from` objects are never read (§4, T7) |
+| R2-2 P1, absent usage does not prove a box served nothing | The answer's completeness claim | Removed by the cut: no completeness claim, no candidate boxes; a box that never wrote is an undercount |
+| R2-3 P1, one writer seals while another owes counts | The answer's completeness claim | Removed by the cut: no seals. Per-writer exactly-once is kept (§5, T3, T5) |
+| R2-4 P2, hash shards share apps | Storage size and reader bounds | Resolved by Paul's ruling: one object per box, date and app (§6, T9) |
+| R2-5 P2, a clean restart loses its hour's seal | The answer's completeness claim | Removed by the cut: no seals, no clean-exit record |
+| R2-6 P2, a pending start-up check advances `from` | Identity validity at count time | Resolved: only a real break moves `from`, judged by the mode and by `HostsState.At` against `@from`'s recorded activation; a pending or retried check answers 503 and touches nothing; the "records no time" claim is corrected (§1, §4, T7) |
+| R2-7 P2, the census statement omits new reads | Census accuracy and root-input review | Resolved: the flush's read of its own objects is inventoried with its writers, checks and effects for the card (§12) |
+
+Identity validity recurred in rounds 1 and 2 (R1-2, then R2-1 and R2-6).
+Under the cut it rests on one rule in one place, `@from` at a month
+start moved only by a real break, held by T7.
+
+**Round 3** (Astra, on `a7d04abc1`,
+`CODEX-FINDINGS-instance-usage-spec-R3.md`): READY AFTER FIXES, no P1,
+three P2. Round 2's findings: R2-1, R2-6 and R2-7 resolved; R2-2, R2-3
+and R2-5 removed by the cut; R2-4 partly, its sizing finished as R3-3.
+Revision 5 applies the three fixes without another round, as Astra
+directs:
+
+| Finding | Fault family | In revision 5 |
+|---|---|---|
+| R3-1 P2, writer expiry lacks its metadata | Batch deduplication and retry-state retention | Every writer marker is kept for the object's life; no expiry (§5, T5) |
+| R3-2 P2, the horizon cannot bound when a PUT lands | Write timing and settled-cache assumptions | The horizon limits starting writes; a late landing is a temporary undercount the cache picks up within six hours; T5's landing-time assertion removed (§5, §6, T5) |
+| R3-3 P2, size threshold and daily reads overstated | Storage size and reader bounds | Sizes from a serialised fixture over hostname length and counter width, pinned by T9; reads budgeted for the cache's six-hour trust, oversized objects and older months (§6, §13, T9) |
+
+**Reviewed: rounds 1 to 3; ready after these fixes.** The build still
+needs its census card and the independent census review (§12), and the
+per-task reviews rule 3 asks for.