carlos / platform Public

store: fix Astra round 2's P2s; record round 2 and the stopping-rule hold

- the next-page line says "run the same command with --after", with
  the cursor shell-quoted, so it keeps the store and key
- --keep-days is checked right after flag parsing, before any session;
  an explicit 0 is refused
- copy: versioning.permanent no longer promises indefinite retention;
  the older-console refusal says to run the original command again;
  round 2's copy table applied

Round 2's P1 (version listings without URL encoding) is round 1's
recovery family two rounds running: stopping rule 2 holds it for Paul.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev 8a67586ffe5d7a00229ee7af6732318c885dfb71 parent 5726426
9 files changed, +259 −30
  • docs/site/cli.md +2 −2
  • docs/superpowers/notes/store-versioning-copy-deck.md +7 −7
  • docs/superpowers/reviews/CODEX-FINDINGS-store-versioning.md +126 −1
  • docs/superpowers/specs/2026-11-22-store-versioning-design.md +7 −1
  • internal/console/store_versioning_copy.go +5 −5
  • internal/provision/testdata/plan14-root-reads-store-versioning.tsv +1 −1
  • store.go +6 −4
  • store_versioning.go +64 −8
  • store_versioning_test.go +41 −1

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-v2zRsh
.amadan/test-gate.sh
go: downloading github.com/aws/aws-sdk-go-v2 v1.44.0
go: downloading github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.68.0
go: downloading github.com/aws/aws-sdk-go-v2/service/costexplorer v1.67.5
go: downloading github.com/aws/aws-sdk-go-v2/service/s3 v1.105.0
go: downloading github.com/aws/smithy-go v1.28.1
go: downloading github.com/benbjohnson/litestream v0.5.14
go: downloading golang.org/x/net v0.62.0
go: downloading github.com/superfly/ltx v0.5.1
go: downloading modernc.org/sqlite v1.55.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/route53 v1.64.1
go: downloading golang.org/x/sys v0.49.0
go: downloading github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.37.0
go: downloading github.com/aws/aws-sdk-go-v2/service/iam v1.58.2
go: downloading golang.org/x/crypto v0.58.0
go: downloading github.com/pion/dtls/v3 v3.1.4
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/wlynxg/anet v0.0.5
go: downloading github.com/prometheus/client_golang v1.17.0
go: downloading golang.org/x/sync v0.24.0
go: downloading github.com/lmittmann/tint v1.1.3
go: downloading github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.20.18
go: downloading github.com/prometheus/client_model v0.5.0
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/cespare/xxhash/v2 v2.3.0
go: downloading github.com/prometheus/common v0.45.0
go: downloading github.com/prometheus/procfs v0.12.0
go: downloading google.golang.org/protobuf v1.36.10
go: downloading golang.org/x/text v0.43.0
go: downloading github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0
go: downloading modernc.org/sqlite v1.55.0
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading github.com/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 modernc.org/libc v1.74.1
go: downloading modernc.org/memory v1.11.0
go: downloading github.com/google/uuid v1.6.0
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/dustin/go-humanize v1.0.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 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 (170 s, from +0 s)
go: downloading github.com/klauspost/compress v1.20.2
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
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 github.com/google/uuid v1.6.0
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading modernc.org/memory v1.11.0
go: downloading modernc.org/mathutil v1.7.1
=== vet-tags (186 s, from +0 s)
go: downloading modernc.org/sqlite v1.55.0
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/memory v1.11.0
go: downloading github.com/google/uuid v1.6.0
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading modernc.org/mathutil v1.7.1
=== gofmt (1 s, from +0 s)
gofmt -l .: clean
=== rest (380 s, from +15 s)
ok  	github.com/carlosframework/platform/cmd/carlos-media	126.116s
?   	github.com/carlosframework/platform/cmd/changelog	[no test files]
ok  	github.com/carlosframework/platform/cmd/console	200.521s
ok  	github.com/carlosframework/platform/cmd/mediaimage	41.717s
ok  	github.com/carlosframework/platform/cmd/moveprobe	16.110s
ok  	github.com/carlosframework/platform/cmd/pricebook-export	0.083s
ok  	github.com/carlosframework/platform/cmd/rootfswitness	0.118s
ok  	github.com/carlosframework/platform/cmd/runsc-assets	0.190s
ok  	github.com/carlosframework/platform/cmd/zddprobe	0.959s
ok  	github.com/carlosframework/platform/internal/agentsock	0.074s
ok  	github.com/carlosframework/platform/internal/alerting	0.030s
ok  	github.com/carlosframework/platform/internal/analytics	0.275s
ok  	github.com/carlosframework/platform/internal/appconfig	39.845s
ok  	github.com/carlosframework/platform/internal/apperr	0.468s
ok  	github.com/carlosframework/platform/internal/applog	0.550s
ok  	github.com/carlosframework/platform/internal/apppolicy	2.952s
ok  	github.com/carlosframework/platform/internal/assetcache	0.539s
ok  	github.com/carlosframework/platform/internal/awsinv	0.011s
ok  	github.com/carlosframework/platform/internal/awsmanaged	0.468s
ok  	github.com/carlosframework/platform/internal/awsregiongroup	0.252s
ok  	github.com/carlosframework/platform/internal/awsterminations	0.089s
ok  	github.com/carlosframework/platform/internal/backupswords	0.029s
ok  	github.com/carlosframework/platform/internal/billing	0.095s
ok  	github.com/carlosframework/platform/internal/billing/billingtest	0.036s
ok  	github.com/carlosframework/platform/internal/billingstripe	2.013s
ok  	github.com/carlosframework/platform/internal/boxchoice	0.069s
ok  	github.com/carlosframework/platform/internal/boxid	2.800s
?   	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.009s
ok  	github.com/carlosframework/platform/internal/boxself	0.186s
ok  	github.com/carlosframework/platform/internal/boxvolumes	0.040s
ok  	github.com/carlosframework/platform/internal/caps	0.111s
ok  	github.com/carlosframework/platform/internal/certwarm	0.013s
ok  	github.com/carlosframework/platform/internal/cgroup	1.414s
ok  	github.com/carlosframework/platform/internal/changelog	3.795s
ok  	github.com/carlosframework/platform/internal/clamd	0.082s
?   	github.com/carlosframework/platform/internal/cliflag	[no test files]
ok  	github.com/carlosframework/platform/internal/clireg	0.012s
ok  	github.com/carlosframework/platform/internal/codehealth	18.508s
ok  	github.com/carlosframework/platform/internal/compute	0.013s
?   	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	10.414s
ok  	github.com/carlosframework/platform/internal/dbdoor/dbdoortest	0.029s
ok  	github.com/carlosframework/platform/internal/dbquery	0.027s
ok  	github.com/carlosframework/platform/internal/dbreads	3.005s
?   	github.com/carlosframework/platform/internal/dbreads/dbreadstest	[no test files]
ok  	github.com/carlosframework/platform/internal/dbverify	0.041s
ok  	github.com/carlosframework/platform/internal/demo	0.018s
ok  	github.com/carlosframework/platform/internal/demobuild	2.959s
ok  	github.com/carlosframework/platform/internal/democlaim	0.635s
ok  	github.com/carlosframework/platform/internal/devbox	17.668s
ok  	github.com/carlosframework/platform/internal/dnsrec	0.010s
ok  	github.com/carlosframework/platform/internal/docsite	0.119s
ok  	github.com/carlosframework/platform/internal/domainreg	0.020s
ok  	github.com/carlosframework/platform/internal/domains	68.211s
ok  	github.com/carlosframework/platform/internal/doorkey	0.047s
ok  	github.com/carlosframework/platform/internal/economics	0.023s
ok  	github.com/carlosframework/platform/internal/edgefence	0.200s
ok  	github.com/carlosframework/platform/internal/edgeguard	0.663s
?   	github.com/carlosframework/platform/internal/edgeproof	[no test files]
ok  	github.com/carlosframework/platform/internal/edgesfile	0.107s
ok  	github.com/carlosframework/platform/internal/egressaddr	0.012s
ok  	github.com/carlosframework/platform/internal/execsandbox	103.454s
ok  	github.com/carlosframework/platform/internal/fileacl	0.017s
ok  	github.com/carlosframework/platform/internal/fleetapi	1.921s
ok  	github.com/carlosframework/platform/internal/fleetstore	0.012s
ok  	github.com/carlosframework/platform/internal/fxrate	0.033s
ok  	github.com/carlosframework/platform/internal/gate	3.963s
ok  	github.com/carlosframework/platform/internal/genselect	0.102s
ok  	github.com/carlosframework/platform/internal/geo	0.063s
ok  	github.com/carlosframework/platform/internal/geoip	0.086s
ok  	github.com/carlosframework/platform/internal/groupadmission	0.008s
ok  	github.com/carlosframework/platform/internal/grouprollaws	17.071s
ok  	github.com/carlosframework/platform/internal/hadeparture	0.019s
ok  	github.com/carlosframework/platform/internal/hafresh	0.009s
ok  	github.com/carlosframework/platform/internal/hairpin	0.184s
ok  	github.com/carlosframework/platform/internal/historyreadback	0.978s
ok  	github.com/carlosframework/platform/internal/hostactors	23.010s
ok  	github.com/carlosframework/platform/internal/hostbox	24.143s
ok  	github.com/carlosframework/platform/internal/hostclaim	2.808s
ok  	github.com/carlosframework/platform/internal/hostenv	0.049s
ok  	github.com/carlosframework/platform/internal/hostevidence	0.022s
ok  	github.com/carlosframework/platform/internal/hostexec	24.268s
ok  	github.com/carlosframework/platform/internal/hostfence	0.162s
ok  	github.com/carlosframework/platform/internal/hostfiles	27.683s
ok  	github.com/carlosframework/platform/internal/hostfloor	0.142s
ok  	github.com/carlosframework/platform/internal/hostguard	1.554s
ok  	github.com/carlosframework/platform/internal/hostops	7.177s
?   	github.com/carlosframework/platform/internal/hostops/fencerelease	[no test files]
ok  	github.com/carlosframework/platform/internal/hostops/internal/fencerelease	0.012s
ok  	github.com/carlosframework/platform/internal/hostquarantine	0.016s
ok  	github.com/carlosframework/platform/internal/hostrelocate	1.803s
ok  	github.com/carlosframework/platform/internal/hostresolve	0.786s
ok  	github.com/carlosframework/platform/internal/hostwrite	0.031s
ok  	github.com/carlosframework/platform/internal/infraview	0.012s
ok  	github.com/carlosframework/platform/internal/ingresshealth	0.010s
ok  	github.com/carlosframework/platform/internal/ingresshealth/awstg	0.020s
ok  	github.com/carlosframework/platform/internal/instancectl	55.695s
ok  	github.com/carlosframework/platform/internal/instanceexec	8.224s
ok  	github.com/carlosframework/platform/internal/instancefs	0.028s
ok  	github.com/carlosframework/platform/internal/instancekey	0.021s
ok  	github.com/carlosframework/platform/internal/instanceupdates	0.021s
ok  	github.com/carlosframework/platform/internal/interactive	0.703s
ok  	github.com/carlosframework/platform/internal/launchd	0.006s
ok  	github.com/carlosframework/platform/internal/layout	22.780s
ok  	github.com/carlosframework/platform/internal/layout/pubclass	98.062s
ok  	github.com/carlosframework/platform/internal/lbhealth	0.011s
ok  	github.com/carlosframework/platform/internal/lease	144.217s
ok  	github.com/carlosframework/platform/internal/lease/leasetest	1.290s
ok  	github.com/carlosframework/platform/internal/lease/locktest	0.009s
ok  	github.com/carlosframework/platform/internal/ledger	0.047s
ok  	github.com/carlosframework/platform/internal/mail	1.280s
ok  	github.com/carlosframework/platform/internal/mailer	0.745s
ok  	github.com/carlosframework/platform/internal/mailsubmit	1.485s
ok  	github.com/carlosframework/platform/internal/mailwire	0.018s
ok  	github.com/carlosframework/platform/internal/maintenance	0.191s
ok  	github.com/carlosframework/platform/internal/maintenanceexec	8.206s
ok  	github.com/carlosframework/platform/internal/maintenanceguard	0.368s
ok  	github.com/carlosframework/platform/internal/media	2.296s
ok  	github.com/carlosframework/platform/internal/media/mediatest	0.006s
ok  	github.com/carlosframework/platform/internal/mediaaws	62.925s
ok  	github.com/carlosframework/platform/internal/mediahandler	42.823s
ok  	github.com/carlosframework/platform/internal/mediajobs	1.049s
ok  	github.com/carlosframework/platform/internal/medialocal	9.937s
ok  	github.com/carlosframework/platform/internal/metrics	0.222s
ok  	github.com/carlosframework/platform/internal/minorunits	0.008s
ok  	github.com/carlosframework/platform/internal/moves	52.732s
ok  	github.com/carlosframework/platform/internal/moves/archive	3.068s
ok  	github.com/carlosframework/platform/internal/moves/offlinerun	0.116s
ok  	github.com/carlosframework/platform/internal/namedunits	0.036s
ok  	github.com/carlosframework/platform/internal/objstore	0.751s
ok  	github.com/carlosframework/platform/internal/ops	17.174s
ok  	github.com/carlosframework/platform/internal/pageindex	3.778s
ok  	github.com/carlosframework/platform/internal/parity	0.080s
?   	github.com/carlosframework/platform/internal/parity/cmd/parity-doc	[no test files]
ok  	github.com/carlosframework/platform/internal/park	0.501s
ok  	github.com/carlosframework/platform/internal/perf	0.191s
ok  	github.com/carlosframework/platform/internal/plans	0.116s
ok  	github.com/carlosframework/platform/internal/privatefile	0.010s
ok  	github.com/carlosframework/platform/internal/provision	237.852s
ok  	github.com/carlosframework/platform/internal/proxyproto	0.932s
ok  	github.com/carlosframework/platform/internal/publicrelease	0.039s
ok  	github.com/carlosframework/platform/internal/ratelimit	0.196s
ok  	github.com/carlosframework/platform/internal/regionlabel	0.048s
ok  	github.com/carlosframework/platform/internal/regionname	0.045s
ok  	github.com/carlosframework/platform/internal/registrar	0.010s
ok  	github.com/carlosframework/platform/internal/registrar/openprovider	0.212s
?   	github.com/carlosframework/platform/internal/registrar/registrartest	[no test files]
ok  	github.com/carlosframework/platform/internal/registry	87.849s
ok  	github.com/carlosframework/platform/internal/relay	7.735s
ok  	github.com/carlosframework/platform/internal/release	91.689s
ok  	github.com/carlosframework/platform/internal/replicagen	0.036s
ok  	github.com/carlosframework/platform/internal/replicas	0.107s
ok  	github.com/carlosframework/platform/internal/reqrec	6.647s
ok  	github.com/carlosframework/platform/internal/rollout	13.231s
ok  	github.com/carlosframework/platform/internal/rolloutwords	0.028s
ok  	github.com/carlosframework/platform/internal/rootaws	101.448s
ok  	github.com/carlosframework/platform/internal/rootfsimage	0.739s
ok  	github.com/carlosframework/platform/internal/rootparticipation	0.109s
ok  	github.com/carlosframework/platform/internal/rootstate	0.053s
ok  	github.com/carlosframework/platform/internal/runs	0.771s
ok  	github.com/carlosframework/platform/internal/s3compat	0.041s
ok  	github.com/carlosframework/platform/internal/s3fake	1.088s
ok  	github.com/carlosframework/platform/internal/safefile	0.031s
ok  	github.com/carlosframework/platform/internal/schedule	25.007s
ok  	github.com/carlosframework/platform/internal/seeds	0.047s
ok  	github.com/carlosframework/platform/internal/sim/litestreamfacts	4.877s
ok  	github.com/carlosframework/platform/internal/sim/mediajobs	47.613s
ok  	github.com/carlosframework/platform/internal/sim/regionha	23.275s
ok  	github.com/carlosframework/platform/internal/status	0.734s
ok  	github.com/carlosframework/platform/internal/steering	0.478s
ok  	github.com/carlosframework/platform/internal/stopevidence	0.783s
ok  	github.com/carlosframework/platform/internal/storecfg	0.564s
ok  	github.com/carlosframework/platform/internal/svcrole	0.061s
ok  	github.com/carlosframework/platform/internal/systemd	6.093s
?   	github.com/carlosframework/platform/internal/systemdshow	[no test files]
ok  	github.com/carlosframework/platform/internal/team	5.348s
ok  	github.com/carlosframework/platform/internal/teamcontract	0.372s
ok  	github.com/carlosframework/platform/internal/telemetry	0.057s
ok  	github.com/carlosframework/platform/internal/termfence	2.902s
ok  	github.com/carlosframework/platform/internal/timerspec	0.026s
ok  	github.com/carlosframework/platform/internal/tsidentity	4.210s
ok  	github.com/carlosframework/platform/internal/tunnelclient	0.468s
ok  	github.com/carlosframework/platform/internal/unixdial	0.016s
ok  	github.com/carlosframework/platform/internal/updatewords	0.027s
ok  	github.com/carlosframework/platform/internal/upstreamguard	0.014s
?   	github.com/carlosframework/platform/internal/upstreamguard/guardtest	[no test files]
ok  	github.com/carlosframework/platform/internal/usage	0.030s
ok  	github.com/carlosframework/platform/internal/version	0.015s
ok  	github.com/carlosframework/platform/internal/vet	3.081s
ok  	github.com/carlosframework/platform/internal/zonehost	0.013s
ok  	github.com/carlosframework/platform/internal/zonehost/route53zones	0.075s
?   	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.033s
ok  	github.com/carlosframework/platform/scripts/pathmapcheck	0.079s
ok  	github.com/carlosframework/platform/scripts/region-ha-g2/fixture	5.253s
ok  	github.com/carlosframework/platform/scripts/stateless-replicas-drill	1.196s
ok  	github.com/carlosframework/platform/scripts/witness-pointer	0.020s
=== cutover-witness (157 s, from +15 s)
ok  	github.com/carlosframework/platform	2.470s
=== internal_grouproll@0 (277 s, from +75 s)
ok  	github.com/carlosframework/platform/internal/grouproll	275.216s
=== internal_grouproll@1 (277 s, from +75 s)
ok  	github.com/carlosframework/platform/internal/grouproll	275.266s
=== internal_activator@0 (148 s, from +146 s)
ok  	github.com/carlosframework/platform/internal/activator	142.175s
=== internal_activator@1 (133 s, from +146 s)
ok  	github.com/carlosframework/platform/internal/activator	128.597s
=== internal_activator@2 (141 s, from +146 s)
ok  	github.com/carlosframework/platform/internal/activator	136.459s
=== internal_activator@3 (159 s, from +146 s)
ok  	github.com/carlosframework/platform/internal/activator	154.494s
=== internal_edge@0 (191 s, from +166 s)
ok  	github.com/carlosframework/platform/internal/edge	181.321s
=== internal_edge@1 (195 s, from +166 s)
ok  	github.com/carlosframework/platform/internal/edge	185.429s
=== internal_edge@2 (163 s, from +166 s)
ok  	github.com/carlosframework/platform/internal/edge	151.602s
=== internal_edge@3 (162 s, from +166 s)
ok  	github.com/carlosframework/platform/internal/edge	152.981s
=== root@0 (118 s, from +175 s)
ok  	github.com/carlosframework/platform	107.878s
=== root@1 (108 s, from +175 s)
ok  	github.com/carlosframework/platform	98.790s
=== root@2 (123 s, from +175 s)
ok  	github.com/carlosframework/platform	114.253s
=== root@3 (111 s, from +175 s)
ok  	github.com/carlosframework/platform	100.874s
=== root@4 (99 s, from +175 s)
ok  	github.com/carlosframework/platform	90.306s
=== internal_host@0 (139 s, from +213 s)
ok  	github.com/carlosframework/platform/internal/host	133.954s
=== internal_host@1 (143 s, from +213 s)
ok  	github.com/carlosframework/platform/internal/host	138.912s
=== internal_host@2 (263 s, from +213 s)
ok  	github.com/carlosframework/platform/internal/host	258.643s
=== internal_host@3 (190 s, from +213 s)
ok  	github.com/carlosframework/platform/internal/host	185.612s
=== internal_host@4 (214 s, from +213 s)
ok  	github.com/carlosframework/platform/internal/host	209.483s
=== internal_host@5 (170 s, from +213 s)
ok  	github.com/carlosframework/platform/internal/host	165.377s
=== internal_console@0 (162 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/console	155.936s
=== internal_console@1 (168 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/console	160.967s
=== internal_console@2 (228 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/console	221.534s
=== internal_console@3 (240 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/console	233.451s
=== internal_console@4 (217 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/console	210.233s
=== internal_console@5 (228 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/console	220.804s
=== internal_console@6 (193 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/console	185.561s
=== internal_console@7 (198 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/console	192.051s
=== internal_console@8 (204 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/console	196.605s
=== internal_console@9 (202 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/console	195.786s
=== internal_console@10 (220 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/console	213.796s
=== internal_console@11 (206 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/console	199.387s
=== internal_console@12 (272 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/console	265.078s
=== internal_console@13 (191 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/console	183.531s
=== internal_console@14 (189 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/console	182.205s
=== internal_console@15 (209 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/console	202.367s
=== internal_console@16 (195 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/console	188.472s
=== internal_console@17 (195 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/console	188.498s
=== internal_console@18 (201 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/console	195.084s
=== internal_console@19 (198 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/console	191.589s
=== internal_console@20 (220 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/console	213.315s
=== internal_console@21 (207 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/console	200.484s
=== internal_console@22 (218 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/console	212.336s
=== internal_console@23 (246 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/console	240.227s
=== lists: internal_console 220 s, internal_edge 164 s, internal_activator 145 s, internal_host 212 s, root 173 s, internal_grouproll 74 s
=== cpu: the gate used 12423 cpu-seconds in 493 s, about 25.2 of 32 cores; the machine as a whole was 84% busy
=== opentofu ===
opentofu: 36 test files in 11 suites, OpenTofu v1.13.9
  initialised in 15 s
  ok      17 s  infra/modules/box-fence-writer/tests/writer.tftest.hcl  Success! 1 passed, 0 failed.
  ok      29 s  infra/modules/deployment-buckets/tests/data_lifecycle.tftest.hcl  Success! 3 passed, 0 failed.
  ok      16 s  infra/modules/deployment-buckets/tests/db_reads.tftest.hcl  Success! 1 passed, 0 failed.
  ok      15 s  infra/modules/deployment-buckets/tests/evidence.tftest.hcl  Success! 1 passed, 0 failed.
  ok      27 s  infra/modules/deployment-buckets/tests/fence_writers.tftest.hcl  Success! 3 passed, 0 failed.
  ok      84 s  infra/modules/media-engine/tests/media_engine.tftest.hcl  Success! 24 passed, 0 failed.
  ok      34 s  infra/modules/pdf-host/tests/computed.tftest.hcl  Success! 2 passed, 0 failed.
  ok      70 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      67 s  infra/modules/region-host/ingress/tests/group_ingress.tftest.hcl  Success! 30 passed, 0 failed.
  ok      46 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      17 s  infra/modules/region-host/tests/console_mail.tftest.hcl  Success! 4 passed, 0 failed.
  ok       9 s  infra/modules/region-host/tests/fixed_state_unchanged.tftest.hcl  Success! 1 passed, 0 failed.
  ok      70 s  infra/modules/region-host/tests/group.tftest.hcl  Success! 32 passed, 0 failed.
  ok      11 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       5 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      31 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       5 s  infra/modules/region-host/tests/instance_metadata.tftest.hcl  Success! 1 passed, 0 failed.
  ok      23 s  infra/modules/region-host/tests/mailer.tftest.hcl  Success! 6 passed, 0 failed.
  ok      10 s  infra/modules/region-host/tests/mailer_group.tftest.hcl  Success! 2 passed, 0 failed.
  ok      13 s  infra/modules/region-host/tests/managed_fleets/group_refusal.tftest.hcl  Success! 2 passed, 0 failed.
  ok     107 s  infra/modules/region-host/tests/managed_fleets/managed_fleets.tftest.hcl  Success! 46 passed, 0 failed.
  ok      71 s  infra/modules/region-host/tests/store_conversion.tftest.hcl  Success! 27 passed, 0 failed.
  ok      20 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/user_data_ignored.tftest.hcl  Success! 3 passed, 0 failed.
  ok       9 s  infra/modules/region-remote-host/tests/data_lifecycle.tftest.hcl  Success! 3 passed, 0 failed.
  ok      14 s  infra/modules/region-remote-host/tests/no_deployment_bucket.tftest.hcl  Success! 5 passed, 0 failed.
  ok      27 s  infra/modules/scanner-host/tests/scanner_host.tftest.hcl  Success! 14 passed, 0 failed.
opentofu: 36 files in 206 s
opentofu: PASS
=== cross ===
--- shard 0 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling darwin/arm64
--- shard 1 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling darwin/amd64
--- shard 2 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling linux/arm64
linux/arm64 carlos binary: 65732770 bytes (ceiling 70000000)
--- shard 3 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling windows/amd64
--- shard 4 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling windows/arm64
=== minio-contract ===
go version go1.26.10 linux/arm64
minio contract: arm64, minio RELEASE.2025-09-07T16-13-09Z, mc RELEASE.2025-08-13T08-35-41Z
  minio: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/minio/minio.linux-arm64.RELEASE.2025-09-07T16-13-09Z
  minio: downloaded, digest verified
  mc: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/minio/mc.linux-arm64.RELEASE.2025-08-13T08-35-41Z
  mc: downloaded, digest verified
  minio healthy on 127.0.0.1:32826
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.037s
=== RUN   TestT4StorageProbeMinio
2026/11/22 20:16:42 moves: T4: STORE: list: operation error S3: ListObjectsV2, https response error StatusCode: 403, RequestID: 18EA7753AD64034B, HostID: dea0856c695c92bf55ced5b741140af51733794caa8fc131e96f008e46192ce6, api error SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your key and signing method.
--- PASS: TestT4StorageProbeMinio (0.01s)
PASS
ok  	github.com/carlosframework/platform/internal/host	0.046s
=== RUN   TestS3StoreMinioContract
=== RUN   TestS3StoreMinioContract/conditional_get_and_etag_listing
=== RUN   TestS3StoreMinioContract/bump_through_every_mutation_path
--- PASS: TestS3StoreMinioContract (0.03s)
    --- PASS: TestS3StoreMinioContract/conditional_get_and_etag_listing (0.01s)
    --- PASS: TestS3StoreMinioContract/bump_through_every_mutation_path (0.02s)
PASS
ok  	github.com/carlosframework/platform/internal/release	0.041s
Bucket created successfully `local/analytics-versions`.
local/analytics-versions versioning is enabled
Created policy `analytics-versions` successfully.
Added user `analyticsversions` successfully.
Attached Policies: [analytics-versions]
To User: analyticsversions
=== RUN   TestS3StoreMinioVersions
--- PASS: TestS3StoreMinioVersions (0.03s)
PASS
ok  	github.com/carlosframework/platform/internal/release	0.040s
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.019s
=== RUN   TestEndToEndMinio
=== RUN   TestEndToEndMinio/plan
=== RUN   TestEndToEndMinio/roll
=== RUN   TestEndToEndMinio/replace
=== RUN   TestEndToEndMinio/remove
--- PASS: TestEndToEndMinio (0.47s)
    --- PASS: TestEndToEndMinio/plan (0.01s)
    --- PASS: TestEndToEndMinio/roll (0.12s)
    --- PASS: TestEndToEndMinio/replace (0.15s)
    --- PASS: TestEndToEndMinio/remove (0.15s)
PASS
ok  	github.com/carlosframework/platform/internal/grouproll	0.477s
Bucket created successfully `local/dbf-deploy`.
Bucket created successfully `local/dbf-data-ie`.
Bucket created successfully `local/dbf-data-uk`.
local/dbf-deploy versioning is enabled
Created policy `dbf-console` successfully.
Created policy `dbf-ukbox` successfully.
Added user `dbfconsole` successfully.
Added user `dbfukbox` successfully.
Attached Policies: [dbf-console]
To User: dbfconsole
Attached Policies: [dbf-ukbox]
To User: dbfukbox
=== RUN   TestDBForwardMinio
2026/11/22 20:16:49 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/22 20:16:49 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/22 20:16:49 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/22 20:16:49 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/22 20:16:49 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/22 20:16:49 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/22 20:16:49 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000003
2026/11/22 20:16:49 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000003 maxTXID=0000000000000003 size=454
2026/11/22 20:16:49 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000003
2026/11/22 20:16:49 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/22 20:16:49 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/22 20:16:49 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/22 20:16:50 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/22 20:16:50 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%3A44539: could not determine target mailbox
    agent.go:136: dbreads: dbr_wdyk2h3putblze5czqerb72ymi: planned 3 files (1544 bytes) and restored to 3 in 15ms
    agent.go:136: dbreads: dbr_wdyk2h3putblze5czqerb72ymi: output 5 bytes in 1 confirmed chunks in 2ms
2026/11/22 20:16:51 console: db read dbr_wdyk2h3putblze5czqerb72ymi: relayed 1 chunks (102 bytes) in 1.005s, ended done
    agent.go:136: dbreads: dbr_v4jqk3uauuzghnukigzyduqcze: planned 1 files (720 bytes) and restored to 1 in 12ms
    agent.go:136: dbreads: dbr_v4jqk3uauuzghnukigzyduqcze: output 5 bytes in 1 confirmed chunks in 2ms
2026/11/22 20:16:52 console: db read dbr_v4jqk3uauuzghnukigzyduqcze: relayed 1 chunks (102 bytes) in 1.005s, ended done
    agent.go:136: dbreads: dbr_fsc2r4pmk7yk3zbls53esy5tyq: planned 3 files (1544 bytes) and held through 3 in 12ms
    agent.go:136: dbreads: dbr_fsc2r4pmk7yk3zbls53esy5tyq: output 1544 bytes in 1 confirmed chunks in 1ms
2026/11/22 20:16:53 console: db read dbr_fsc2r4pmk7yk3zbls53esy5tyq: relayed 1 chunks (1641 bytes) in 1.004s, ended done
=== RUN   TestDBForwardMinio/by_disconnect
=== NAME  TestDBForwardMinio
    agent.go:136: dbreads: dbr_b4zhbim7jyvkneuvr7isb3rmam: planned 3 files (1544 bytes) and restored to 3 in 14ms
2026/11/22 20:16:53 console: db read dbr_b4zhbim7jyvkneuvr7isb3rmam: relayed 0 chunks (0 bytes) in 28ms, ended client gone
    agent.go:136: dbreads: dbr_b4zhbim7jyvkneuvr7isb3rmam: output 5 bytes in 1 confirmed chunks in 104ms
=== RUN   TestDBForwardMinio/by_timeout
=== NAME  TestDBForwardMinio
    agent.go:136: dbreads: dbr_jcx2yudfogd2lh7sbqawn4wfma: planned 3 files (1544 bytes) and restored to 3 in 13ms
2026/11/22 20:17:13 console: db read dbr_jcx2yudfogd2lh7sbqawn4wfma: relayed 0 chunks (0 bytes) in 19.65s, ended no-result
    agent.go:136: dbreads: dbr_jcx2yudfogd2lh7sbqawn4wfma: output 5 bytes in 1 confirmed chunks in 19.625s
--- PASS: TestDBForwardMinio (23.32s)
    --- PASS: TestDBForwardMinio/by_disconnect (0.24s)
    --- PASS: TestDBForwardMinio/by_timeout (19.76s)
PASS
ok  	github.com/carlosframework/platform/internal/console	23.367s
Bucket created successfully `local/media-transfers`.
Bucket created successfully `local/media-transfer-results`.
Created policy `media-transfers` successfully.
Added user `mediatransfers` successfully.
Attached Policies: [media-transfers]
To User: mediatransfers
=== RUN   TestMediaTransfersMinio
    upload.go:117: codec: the store already holds video.mp4
    upload.go:117: codec: the store already holds video.m3u8
    upload.go:117: codec: the store already holds poster.jpg
--- PASS: TestMediaTransfersMinio (0.05s)
PASS
ok  	github.com/carlosframework/platform/internal/mediaaws	0.059s
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.54s)
PASS
ok  	github.com/carlosframework/platform/internal/medialocal	0.547s
=== RUN   TestHeldHandoverTwoBoxMinio
2026/11/22 20:17:17 edge: mesh key: minted
2026/11/22 20:17:17 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/22 20:17:18 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/22 20:17:18 tenant admission is open. accepting tenant work
2026/11/22 20:17:18 activator: HA placement host=shop-50eb08b2.example.test kind=Place ref=annie reason=roomiest generation=2026-11-22T20:17:18Z lock_generation=0
2026/11/22 20:17:18 lease: t8-50eb08b2/shop-50eb08b2.example.test: HA lease acquired in 4ms (first wake)
2026/11/22 20:17:18 activator: shop-50eb08b2.example.test: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/11/22 20:17:18 activator: shop-50eb08b2.example.test: started carlos-instance@shop\x2d50eb08b2.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 6ms, control socket 0s, key gate 0s, logs 0s) 6ms, launch file 0s, gate 0s, root start 1ms)
2026/11/22 20:17:18 activator: shop-50eb08b2.example.test: carlos-instance@shop\x2d50eb08b2.example.test.service launched in 7ms, healthy 0s later
2026/11/22 20:17:18 activator: shop-50eb08b2.example.test: woke in 22ms: checks 0s, lease 5ms, restore 0s, identity 0s, protect 0s, spawn 8ms, replicate 9ms
2026/11/22 20:17:18 lease: t8-50eb08b2/plain-50eb08b2.example.test: acquired in 2ms (client 0s, lock read and write 1ms)
2026/11/22 20:17:18 activator: no replica for plain-50eb08b2.example.test in s3://contract-bucket/t8-50eb08b2/plain-50eb08b2.example.test — booting fresh
2026/11/22 20:17:18 activator: plain-50eb08b2.example.test: started carlos-instance@plain\x2d50eb08b2.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 1ms, instance key 0s, env 4ms, control socket 0s, key gate 0s, logs 0s) 5ms, launch file 0s, gate 0s, root start 1ms)
2026/11/22 20:17:18 activator: plain-50eb08b2.example.test: carlos-instance@plain\x2d50eb08b2.example.test.service launched in 6ms, healthy 0s later
2026/11/22 20:17:18 activator: plain-50eb08b2.example.test: woke in 41ms: checks 0s, lease 2ms, restore 17ms, identity 0s, protect 0s, spawn 7ms, replicate 15ms
2026/11/22 20:17:18 lease: t8-50eb08b2/bot0.shop.bac.sidecar.internal: HA lease acquired in 4ms (first wake)
2026/11/22 20:17:18 activator: bot0.shop.bac.sidecar.internal: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/11/22 20:17:18 activator: bot0.shop.bac.sidecar.internal: woke in 19ms: checks 0s, lease 4ms, restore 0s, identity 0s, protect 0s, spawn 7ms, settle 0s, replicate 7ms
2026/11/22 20:17:18 activator: next-due probe plain-50eb08b2.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/22 20:17:18 activator: bot0.shop.bac.sidecar.internal: released with a marker (clean true, txid 1, files 3:db4f11e1a0f4b0df98fa2c13f803bbdd6e597e5ff7e2656365553054db3f1375) in 5ms: files 1ms, sync 2ms, record 1ms, marker 2ms
2026/11/22 20:17:18 activator: bot0.shop.bac.sidecar.internal hibernated
2026/11/22 20:17:18 activator: plain-50eb08b2.example.test hibernated
2026/11/22 20:17:18 activator: next-due probe shop-50eb08b2.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/22 20:17:18 activator: shop-50eb08b2.example.test: released with a marker (clean true, txid 1, files 3:1ce97c39c383538d039836cd350d5ada6ad842d841bb0af995dbc4484162d4b9) in 6ms: files 1ms, sync 3ms, record 1ms, marker 2ms
2026/11/22 20:17:18 activator: shop-50eb08b2.example.test hibernated
2026/11/22 20:17:18 lease: t8-50eb08b2/shop-50eb08b2.example.test: HA lease acquired in 3ms (clean marker)
2026/11/22 20:17:18 activator: shop-50eb08b2.example.test: restored (other-box)
2026/11/22 20:17:18 activator: shop-50eb08b2.example.test: started carlos-instance@shop\x2d50eb08b2.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 0s, control socket 0s, key gate 0s, logs 0s) 1ms, launch file 0s, gate 0s, root start 1ms)
2026/11/22 20:17:18 activator: shop-50eb08b2.example.test: carlos-instance@shop\x2d50eb08b2.example.test.service launched in 2ms, healthy 0s later
2026/11/22 20:17:18 activator: shop-50eb08b2.example.test: woke in 35ms: checks 0s, lease 3ms, restore 23ms, identity 0s, protect 0s, spawn 2ms, replicate 6ms
2026/11/22 20:17:18 edge: ha-take shop-50eb08b2.example.test from annie (txn t8-witness, marker generation 1): holder betty, generation 2
2026/11/22 20:17:18 edge: forward shop-50eb08b2.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:ac780def96707aa2404ebd8ba1975b9f Step:move Result:ok Reasons:[] Fence:t8-witness StartedAt:2026-11-22 20:17:18.25549663 +0000 UTC FinishedAt:2026-11-22 20:17:18.352667867 +0000 UTC Acked:[betty carol] Departed:[] Moved:[{Host:shop-50eb08b2.example.test Holder:betty Gen:2 Confirmed:take}] Released:[{Host:bot0.shop.bac.sidecar.internal Kind:worker Marker:true Clean:true Reason:} {Host:plain-50eb08b2.example.test Kind:other Marker:true Clean:true Reason:}] Unclean:[] Left:[] Holds:{LongestMS:77 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-50eb08b2.example.test <nil> stop bot0.shop.bac.sidecar.internal marker=true clean=true <nil> stop plain-50eb08b2.example.test marker=true clean=true <nil> releasing shop-50eb08b2.example.test <nil> stop shop-50eb08b2.example.test marker=true clean=true <nil> taken shop-50eb08b2.example.test betty <nil> end-moves]
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/bot0.shop.bac.sidecar.internal/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/bot0.shop.bac.sidecar.internal/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/bot0.shop.bac.sidecar.internal/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/bot0.shop.bac.sidecar.internal/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-50eb08b2/shop-50eb08b2.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-50eb08b2/bot0.shop.bac.sidecar.internal/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-50eb08b2/bot0.shop.bac.sidecar.internal/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: DELETE /contract-bucket/t8-50eb08b2/plain-50eb08b2.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-50eb08b2/shop-50eb08b2.example.test/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-50eb08b2/shop-50eb08b2.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-50eb08b2/shop-50eb08b2.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-50eb08b2/shop-50eb08b2.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-50eb08b2/shop-50eb08b2.example.test/head.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/generations/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0008/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0007/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0006/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0005/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0004/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0008/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0007/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0006/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0005/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0004/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-50eb08b2/shop-50eb08b2.example.test/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-50eb08b2/shop-50eb08b2.example.test/files/0/manifest.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-50eb08b2/shop-50eb08b2.example.test/files/0/objects/0000000000000001-5d314f49cc0df1f8fa1a26fce3bb4652473230d1cc2bcd7327107cfffbefb771
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-50eb08b2/shop-50eb08b2.example.test/files/0/objects/0000000000000003-7958935921aa2cb0ec0cbc7bc46a68569dc59ce72ee327a5ab12837f8896207d
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-50eb08b2/shop-50eb08b2.example.test/0000/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-50eb08b2/shop-50eb08b2.example.test/0000/0000000000000002-0000000000000002.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-50eb08b2/shop-50eb08b2.example.test/0001/0000000000000001-0000000000000002.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-50eb08b2/shop-50eb08b2.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-50eb08b2/shop-50eb08b2.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1243: drain took 146ms; S3 calls 54 (DELETE lock=1 GET files=3 GET head=1 GET lock=3 GET replica=2 LIST replica=37 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/22 20:17:18 lease: t8-50eb08b2/plain-50eb08b2.example.test: acquired in 2ms (client 0s, lock read and write 2ms)
2026/11/22 20:17:18 activator: plain-50eb08b2.example.test: started carlos-instance@plain\x2d50eb08b2.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 0s, control socket 0s, key gate 0s, logs 0s) 0s, launch file 0s, gate 0s, root start 1ms)
2026/11/22 20:17:18 activator: plain-50eb08b2.example.test: carlos-instance@plain\x2d50eb08b2.example.test.service launched in 1ms, healthy 0s later
2026/11/22 20:17:18 lease: /tmp/carlos-minio-contract-VzZakj/g/dw1323480339/data/instances/plain-50eb08b2.example.test/plain-50eb08b2.example.test.db: continuity with the last clean close not proven; snapshot 1-0000000000000001 written before serving
2026/11/22 20:17:18 activator: plain-50eb08b2.example.test: woke in 9ms: checks 0s, lease 2ms, restore 0s, identity 0s, protect 0s, spawn 2ms, replicate 5ms
2026/11/22 20:17:18 activator: next-due probe shop-50eb08b2.example.test: decode /api/next-due: invalid character 'b' looking for beginning of value — recording none (it sleeps until a request)
2026/11/22 20:17:18 activator: shop-50eb08b2.example.test: released with a marker (clean true, txid 2, files 3:1ce97c39c383538d039836cd350d5ada6ad842d841bb0af995dbc4484162d4b9) in 4ms: files 1ms, sync 0s, record 1ms, marker 2ms
2026/11/22 20:17:18 activator: shop-50eb08b2.example.test hibernated
2026/11/22 20:17:18 tenant admission is closed for shutdown
2026/11/22 20:17:18 activator: next-due probe plain-50eb08b2.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/22 20:17:18 activator: plain-50eb08b2.example.test hibernated
--- PASS: TestHeldHandoverTwoBoxMinio (0.47s)
=== RUN   TestHeldHandoverLostLeaseMinio
2026/11/22 20:17:18 edge: mesh key: minted
2026/11/22 20:17:18 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/22 20:17:18 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/22 20:17:18 tenant admission is open. accepting tenant work
2026/11/22 20:17:18 activator: HA placement host=shop-bafd5a9a.example.test kind=Place ref=annie reason=roomiest generation=2026-11-22T20:17:18Z lock_generation=0
2026/11/22 20:17:18 lease: t8-bafd5a9a/shop-bafd5a9a.example.test: HA lease acquired in 3ms (first wake)
2026/11/22 20:17:18 activator: shop-bafd5a9a.example.test: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/11/22 20:17:18 activator: shop-bafd5a9a.example.test: started carlos-instance@shop\x2dbafd5a9a.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 6ms, control socket 0s, key gate 0s, logs 0s) 6ms, launch file 0s, gate 0s, root start 1ms)
2026/11/22 20:17:18 activator: shop-bafd5a9a.example.test: carlos-instance@shop\x2dbafd5a9a.example.test.service launched in 7ms, healthy 0s later
2026/11/22 20:17:18 activator: shop-bafd5a9a.example.test: woke in 17ms: checks 0s, lease 4ms, restore 0s, identity 0s, protect 0s, spawn 7ms, replicate 6ms
2026/11/22 20:17:18 activator: next-due probe shop-bafd5a9a.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/22 20:17:18 activator: final checkpoint shop-bafd5a9a.example.test: lease: release marker owed for s3://contract-bucket/t8-bafd5a9a/shop-bafd5a9a.example.test/lock.json (If-Match "b88486fff901661a8e6c95c3c9b0f7b5"): lease: write release marker: operation error S3: PutObject, https response error StatusCode: 503, RequestID: , HostID: , api error ServiceUnavailable: witness: refused
2026/11/22 20:17:18 activator: shop-bafd5a9a.example.test hibernated
2026/11/22 20:17:18 activator: handover of shop-bafd5a9a.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-bafd5a9a.example.test client 1 "
    hadrain_twobox_minio_linux_test.go:1486: driver calls: [begin shop-bafd5a9a.example.test <nil> releasing shop-bafd5a9a.example.test <nil> stop shop-bafd5a9a.example.test marker=false clean=false <nil> left shop-bafd5a9a.example.test released without a marker]
    hadrain_twobox_minio_linux_test.go:1487: a request after the loss: 503 "This instance cannot wake right now. Please try again shortly.\n" (Retry-After "10", holder "none", 0s, err <nil>)
2026/11/22 20:17:18 tenant admission is closed for shutdown
2026/11/22 20:17:18 http: proxy error: context canceled
--- PASS: TestHeldHandoverLostLeaseMinio (0.27s)
PASS
ok  	github.com/carlosframework/platform/internal/host	0.784s
Bucket created successfully `local/gen-take`.
local/gen-take versioning is enabled
Created policy `gen-take` successfully.
Added user `gentake` successfully.
Attached Policies: [gen-take]
To User: gentake
=== RUN   TestGenerationTakeMinio
=== RUN   TestGenerationTakeMinio/take
2026/11/22 20:17:19 lease: instances/gen-1795378639876124343.shop.example.com: HA lease acquired in 5ms (first wake)
2026/11/22 20:17:19 ERROR retention enforcement failed system=store db=w.example.com.db error="enforce snapshot retention: remove ltx files: lease: invalid or changed generation binding"
2026/11/22 20:17:19 lease: instances/gen-1795378639876124343.shop.example.com: HA lease acquired in 3ms (holder terminated)
    gentake_minio_test.go:308: a second create-only copy onto instances/gen-1795378639876124343.shop.example.com/g-00000000000000000002/0000/0000000000000001-0000000000000001.ltx: <nil> (destination condition honoured: false)
2026/11/22 20:17:19 ERROR retention enforcement failed system=store db=w.example.com.db error="enforce snapshot retention: remove ltx files: lease: invalid or changed generation binding"
=== RUN   TestGenerationTakeMinio/switch-412
2026/11/22 20:17:20 lease: instances/gen-1795378640059502888.shop.example.com: HA lease acquired in 4ms (first wake)
2026/11/22 20:17:20 ERROR retention enforcement failed system=store db=seed.db error="enforce snapshot retention: remove ltx files: lease: invalid or changed generation binding"
2026/11/22 20:17:20 lease: instances/gen-1795378640059502888.shop.example.com: HA lease acquired in 2ms (clean marker)
=== RUN   TestGenerationTakeMinio/copy-version
=== RUN   TestGenerationTakeMinio/store-time
2026/11/22 20:17:20 lease: instances/gen-1795378640161278019.shop.example.com: HA lease acquired in 3ms (first wake)
2026/11/22 20:17:20 ERROR retention enforcement failed system=store db=seed.db error="enforce snapshot retention: fetch ltx files: lease: a write has waited too long to reach storage (write fence)"
2026/11/22 20:17:20 lease: instances/gen-1795378640161278019.shop.example.com: HA lease acquired in 3ms (clean marker)
2026/11/22 20:17:20 lease: instances/gen-1795378640161278019.shop.example.com: HA lease acquired in 2ms (unclean marker)
2026/11/22 20:17:20 lease: instances/gen-1795378640161278019.shop.example.com: HA lease acquired in 2ms (unclean marker)
2026/11/22 20:17:20 lease: instances/gen-1795378640161278019.shop.example.com: HA lease acquired in 2ms (unclean marker)
2026/11/22 20:17:20 lease: instances/gen-1795378640161278019.shop.example.com: HA lease acquired in 2ms (unclean marker)
=== RUN   TestGenerationTakeMinio/skew
--- PASS: TestGenerationTakeMinio (0.40s)
    --- PASS: TestGenerationTakeMinio/take (0.18s)
    --- PASS: TestGenerationTakeMinio/switch-412 (0.09s)
    --- PASS: TestGenerationTakeMinio/copy-version (0.01s)
    --- PASS: TestGenerationTakeMinio/store-time (0.10s)
    --- PASS: TestGenerationTakeMinio/skew (0.01s)
PASS
ok  	github.com/carlosframework/platform/internal/lease	0.408s
minio contract: PASS
=== staticcheck ===
go version go1.26.10 linux/arm64
go: downloading honnef.co/go/tools v0.8.2
go: downloading github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c
go: downloading golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678
go: downloading golang.org/x/sync v0.23.0
go: downloading golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa
staticcheck: clean
=== govulncheck ===
go version go1.26.10 linux/arm64
go: downloading golang.org/x/vuln v1.8.0
go: downloading golang.org/x/telemetry v0.0.0-20260908163034-4bcc4b2ee518
go: downloading golang.org/x/tools v0.50.0
govulncheck: scanned github.com/carlosframework/platform, amadan.net/carlos/platform.git/launchctx
GO-2026-6859  called  stdlib@v1.26.10, fixed in v1.26.11
    HTTP/1 server crash due to MaxBytesReader header race in net/http
    excepted until 2027-01-31 (.amadan/govulncheck-exceptions.tsv:9): net/http MaxBytesReader header race, fixed in go1.26.11. CI and releases stay on go1.26.10 because 1.26.11 deadlocks the edge's Expect: 100-continue path (#897, .amadan/go-toolchain.sh); #904 checked every production MaxBytesReader site and found it unreachable.
GO-2026-5932  required  golang.org/x/crypto@v0.58.0, fixed in v0.58.1-0.20261009181718-2f1f834330b2
    The golang.org/x/crypto/openpgp package is unmaintained, unsafe by design, and has known security issues
    not fatal: no call path to the vulnerable code
govulncheck: clean (2 finding(s), none called outside .amadan/govulncheck-exceptions.tsv)
=== code-health ===
go version go1.26.10 linux/arm64
    codehealth_test.go:42: scanned in 1m46.814s
    codehealth_test.go:107: line metrics (code lines, then physical):
          file-lines  5471  7324  internal/activator activator_test.go
          file-lines  4219  7040  internal/console server.go
          file-lines  4182  6363  . apimode.go
          file-lines  3782  7198  internal/activator activator.go
          file-lines  3530  4459  . apimode_test.go
          file-lines  3261  3864  internal/registry registry_test.go
          file-lines  3211  6362  internal/host agent.go
          file-lines  3094  3992  internal/provision reconcile_test.go
          func-lines   870   891  internal/host plan14InstalledClaimLaunch
          func-lines   811  1275  internal/provision Reconcile
          func-lines   769  1242  internal/console (*Server).handleAPIInstanceCreate
          func-lines   688  1232  internal/host runAgent
          func-lines   570   903  internal/activator (*Service).doWakeOnce
          func-lines   538   546  internal/host runServingParkPeerNamespace
          func-lines   519   712  . runRoute
          func-lines   509   569  internal/host TestPagingIsRateLimited
          func-lines   494   809  internal/release adoptHost
          func-lines   441   500  internal/host TestRootInstanceStopExecStop
          func-lines   421   436  internal/host (*ClaimWakeAssembly).Build
          func-lines   421   437  internal/team TestFixture
          func-lines   412   414  internal/console TestDemoProtectionsSourceToLimitAndTakedown
          func-lines   408   485  . TestFleetAppServesThroughTheHub
          func-lines   400   868  internal/provision rootReadArchivedChain
          func-lines   399   732  internal/release PassFilter
          func-lines   390   398  internal/host runFilesSeedPreparationWithLive
          func-lines   383   406  internal/console TestDemoSourceToLiveAndUpdate
          func-lines   379   898  internal/edge (*Edge).ServeHTTP
          func-lines   378   600  internal/console (*Server).handleAPIShip
          func-lines   374   377  internal/host plan14RequiredArtifactsRootRunner
          func-lines   371   417  internal/host TestRootEgressKernelProof
          func-lines   367   635  cmd/console serve
          func-lines   364   371  internal/host testRootMigrationBootstrap
          func-lines   360   362  internal/edge TestDemoAPIAliasBoundary
          func-lines   358   362  internal/registry (*Registry).haJournal
          func-lines   357   358  internal/registry (*Registry).dispatchRemote
          func-lines   355   372  internal/host TestRootSandboxUpdateFromOldBox
          func-lines   343   354  internal/analytics Prune
          func-lines   340   353  internal/host newColdRootHarness
          func-lines   335   557  internal/console (*Store).migrate
          func-lines   334   334  internal/host TestPlan12RecoveryRestoreSourceDatabase
          func-lines   330   371  internal/edge TestRegionalNameNeverLeavesItsRegion
          func-lines   329   471  . runDeploy
          func-lines   329   329  internal/host TestPlan12RecoveryRestoreSourceDatabase.func1
          func-lines   327   369  internal/edge TestTunnelWebSocketEndToEnd
          func-lines   325   455  internal/objstore TestDeliveredContractMinio
          func-lines   320   654  internal/appconfig SyncExecWithCallbacks
          func-lines   315   318  internal/host plan14TimerIntention
          func-lines   311   314  internal/host plan14TimerIntention.func1
          func-lines   310   315  internal/hostbox ColdHandover.Run
          func-lines   308   309  internal/host rootFilesSeedIsolatedWitness
          func-lines   305   323  internal/host hairpinKernelWitness
          func-lines   304   308  internal/console TestHAP2ProductionDoors
          func-lines   302   329  internal/host TestRootG2PoolIngress
        release-importers: . cmd/console internal/activator internal/analytics internal/appconfig internal/apperr internal/applog internal/apppolicy internal/boxid internal/boxvolumes internal/console internal/dbreads internal/dbreads/dbreadstest internal/dbverify internal/demobuild internal/domains internal/doorkey internal/edge internal/edgeproof internal/edgesfile internal/fleetapi internal/grouproll internal/grouprollaws internal/historyreadback internal/host internal/hostactors internal/hostbox internal/hostclaim internal/hostevidence internal/hostexec internal/hostfence internal/hostfiles internal/hostfloor internal/hostguard internal/hostops internal/hostrelocate internal/hostresolve internal/instancectl internal/instanceupdates internal/interactive internal/layout internal/lease internal/ledger internal/mail internal/mailer internal/mailsubmit internal/metrics internal/moves internal/objstore internal/ops internal/park internal/plans internal/provision internal/relay internal/rollout internal/rootfsimage internal/runs internal/s3fake internal/schedule internal/seeds internal/status internal/telemetry internal/usage internal/vet scripts/pathmapcheck scripts/witness-pointer
        not scanned (203 files):
          cmd/carlos-media/drill_other.go: built only for other systems or tags
          cmd/carlos-media/harden_other.go: built only for other systems or tags
          cmd/console/servelock_windows.go: built only for other systems or tags
          cmd/moveprobe/detach_windows.go: built only for other systems or tags
          cmd/rootfswitness/mmap_other.go: built only for other systems or tags
          devbox_acl_other.go: built only for other systems or tags
          devbox_envfile_darwin_test.go: built only for other systems or tags
          devbox_envfile_other.go: built only for other systems or tags
          interactive_term_darwin.go: built only for other systems or tags
          interactive_term_other.go: built only for other systems or tags
          internal/activator/claimprocess_root_other.go: built only for other systems or tags
          internal/activator/escrow_stamp_other.go: built only for other systems or tags
          internal/activator/harecord_other.go: built only for other systems or tags
          internal/activator/ownenv_other.go: built only for other systems or tags
          internal/activator/pty_other.go: built only for other systems or tags
          internal/activator/race_on_test.go: built only for other systems or tags
          internal/activator/rolelaunch_other.go: built only for other systems or tags
          internal/assetcache/statfs_other.go: built only for other systems or tags
          internal/boxself/io_other.go: built only for other systems or tags
          internal/cgroup/cleanup_other.go: built only for other systems or tags
          internal/cgroup/cleanup_other_test.go: built only for other systems or tags
          internal/cgroup/hostprocs_other.go: built only for other systems or tags
          internal/cgroup/recreate_other.go: built only for other systems or tags
          internal/cgroup/role_other.go: built only for other systems or tags
          internal/cgroup/shim_other.go: built only for other systems or tags
          internal/cgroup/strict_other.go: built only for other systems or tags
          internal/cgroup/verify_other.go: built only for other systems or tags
          internal/console/claim_sql_identity_other.go: built only for other systems or tags
          internal/console/geoipverify_other.go: built only for other systems or tags
          internal/console/hostreports_process_other.go: built only for other systems or tags
          internal/console/replicaview_other.go: built only for other systems or tags
          internal/console/restore_sim_nice_other_test.go: built only for other systems or tags
          internal/console/scalecost_other_test.go: built only for other systems or tags
          internal/console/seedscratch_windows.go: built only for other systems or tags
          internal/dbreads/worker_other.go: built only for other systems or tags
          internal/demobuild/security_other.go: built only for other systems or tags
          internal/democlaim/source_other.go: built only for other systems or tags
          internal/devbox/peer_darwin.go: built only for other systems or tags
          internal/devbox/peer_darwin_test.go: built only for other systems or tags
          internal/devbox/peer_other.go: built only for other systems or tags
          internal/devbox/socketcheck_other.go: built only for other systems or tags
          internal/edge/devboxpeer_other.go: built only for other systems or tags
          internal/edge/hairpin_other.go: built only for other systems or tags
          internal/edge/heldbudget_other.go: built only for other systems or tags
          internal/edge/purge_listen_unix.go: built only for other systems or tags
          internal/edge/purge_listen_windows.go: built only for other systems or tags
          internal/edge/race_on_test.go: built only for other systems or tags
          internal/edge/static_artifact_other.go: built only for other systems or tags
          internal/edge/static_recordlock_other.go: built only for other systems or tags
          internal/edge/static_sweep_other.go: built only for other systems or tags
          internal/execsandbox/cleanup_other.go: built only for other systems or tags
          internal/execsandbox/file_other.go: built only for other systems or tags
          internal/execsandbox/oci_other.go: built only for other systems or tags
          internal/fileacl/fileacl_darwin.go: built only for other systems or tags
          internal/fileacl/fileacl_darwin_amd64.s: built only for other systems or tags
          internal/fileacl/fileacl_darwin_arm64.s: built only for other systems or tags
          internal/fileacl/fileacl_darwin_test.go: built only for other systems or tags
          internal/grouproll/state_other.go: built only for other systems or tags
          internal/grouprollaws/pty_darwin.go: built only for other systems or tags
          internal/grouprollaws/pty_other.go: built only for other systems or tags
          internal/hairpin/native_other.go: built only for other systems or tags
          internal/host/applylock_other_test.go: built only for other systems or tags
          internal/host/bootstrapfs_other.go: built only for other systems or tags
          internal/host/boxroles_config_other.go: built only for other systems or tags
          internal/host/claimfilesseed_delegation_other.go: built only for other systems or tags
          internal/host/claimfilesseed_transport_other.go: built only for other systems or tags
          internal/host/claimjournal_containment_other.go: built only for other systems or tags
          internal/host/claimjournal_migration_other.go: built only for other systems or tags
          internal/host/claimlaunch_kernel_other.go: built only for other systems or tags
          internal/host/claimlaunch_rev2_other_test.go: built only for other systems or tags
          internal/host/claimproduction_other.go: built only for other systems or tags
          internal/host/claimready_other.go: built only for other systems or tags
          internal/host/claimroleassembly_other.go: built only for other systems or tags
          internal/host/claimservingartifact_other.go: built only for other systems or tags
          internal/host/claimservinghandover_reboot_other.go: built only for other systems or tags
          internal/host/claimservinghandover_reboot_other_test.go: built only for other systems or tags
          internal/host/claimservingpark_other.go: built only for other systems or tags
          internal/host/claimstate_other.go: built only for other systems or tags
          internal/host/claimstop_kernel_other.go: built only for other systems or tags
          internal/host/claimtoken_inventory_other.go: built only for other systems or tags
          internal/host/claimunit_dropin_other.go: built only for other systems or tags
          internal/host/claimunit_files_other.go: built only for other systems or tags
          internal/host/claimunit_migrate_other.go: built only for other systems or tags
          internal/host/claimunit_ready_other.go: built only for other systems or tags
          internal/host/claimunit_socket_migration_other.go: built only for other systems or tags
          internal/host/dbreads_other.go: built only for other systems or tags
          internal/host/egress_rail_other.go: built only for other systems or tags
          internal/host/fileowner_other.go: built only for other systems or tags
          internal/host/flock_windows.go: built only for other systems or tags
          internal/host/group_config_other.go: built only for other systems or tags
          internal/host/group_maintenance_other.go: built only for other systems or tags
          internal/host/group_maintenance_verbs_other.go: built only for other systems or tags
          internal/host/group_receipt_other.go: built only for other systems or tags
          internal/host/hadrain_call_other.go: built only for other systems or tags
          internal/host/hadrain_socket_other.go: built only for other systems or tags
          internal/host/hadrainfence_other.go: built only for other systems or tags
          internal/host/headroom_other.go: built only for other systems or tags
          internal/host/installchannel_other.go: built only for other systems or tags
          internal/host/metrics_nested_other.go: built only for other systems or tags
          internal/host/movesfloor_other.go: built only for other systems or tags
          internal/host/movesfloorgate_other.go: built only for other systems or tags
          internal/host/movesheldrelease_other.go: built only for other systems or tags
          internal/host/movesmeasure_other.go: built only for other systems or tags
          internal/host/offcloudcredentials_other.go: built only for other systems or tags
          internal/host/registrychild_exec_other.go: built only for other systems or tags
          internal/host/registrychild_other.go: built only for other systems or tags
          internal/host/registryowner_chown_other.go: built only for other systems or tags
          internal/host/registryowner_descriptor_unix.go: built only for other systems or tags
          internal/host/replicahealth_other.go: built only for other systems or tags
          internal/host/rootgeneration_census_other.go: built only for other systems or tags
          internal/host/rootgeneration_kernel_other.go: built only for other systems or tags
          internal/host/rootgeneration_payload_other.go: built only for other systems or tags
          internal/host/rootgeneration_retired_other.go: built only for other systems or tags
          internal/host/rootmigration_production_other.go: built only for other systems or tags
          internal/host/runscset_other.go: built only for other systems or tags
          internal/host/sandboxenv_other.go: built only for other systems or tags
          internal/host/statfs_windows.go: built only for other systems or tags
          internal/host/systemapply_other.go: built only for other systems or tags
          internal/hostbox/census_vendor_other.go: built only for other systems or tags
          internal/hostbox/inventory_identity_other.go: built only for other systems or tags
          internal/hostbox/journalmigration_other.go: built only for other systems or tags
          internal/hostbox/journalnamespace_other.go: built only for other systems or tags
          internal/hostbox/journaltrust_other.go: built only for other systems or tags
          internal/hostbox/migration_census_other.go: built only for other systems or tags
          internal/hostbox/typedpark_other.go: built only for other systems or tags
          internal/hostenv/group_other.go: built only for other systems or tags
          internal/hostenv/write_other.go: built only for other systems or tags
          internal/hostenv/write_other_test.go: built only for other systems or tags
          internal/hostexec/clock_other.go: built only for other systems or tags
          internal/hostexec/clock_other_test.go: built only for other systems or tags
          internal/hostexec/local_other.go: built only for other systems or tags
          internal/hostexec/pending_other.go: built only for other systems or tags
          internal/hostexec/probe_other.go: built only for other systems or tags
          internal/hostexec/rootprocess_other.go: built only for other systems or tags
          internal/hostfiles/dir_other.go: built only for other systems or tags
          internal/hostfiles/refuse_other.go: built only for other systems or tags
          internal/hostfiles/watch_other.go: built only for other systems or tags
          internal/hostfloor/controllers_other.go: built only for other systems or tags
          internal/hostfloor/image_other.go: built only for other systems or tags
          internal/hostguard/flock_other.go: built only for other systems or tags
          internal/hostguard/flock_other_test.go: built only for other systems or tags
          internal/hostguard/record_other.go: built only for other systems or tags
          internal/instancectl/claimexec_other.go: built only for other systems or tags
          internal/instancectl/claimexec_socket_other.go: built only for other systems or tags
          internal/instancectl/claimlaunch_snapshot_other.go: built only for other systems or tags
          internal/instancectl/claimnetwork_other.go: built only for other systems or tags
          internal/instancectl/demo_snapshot_other.go: built only for other systems or tags
          internal/instancectl/egress_cgroup_other.go: built only for other systems or tags
          internal/instancectl/egress_dropin_other.go: built only for other systems or tags
          internal/instancectl/gvisorprobe_other.go: built only for other systems or tags
          internal/instancectl/peer_other.go: built only for other systems or tags
          internal/instancectl/peer_tuple_other.go: built only for other systems or tags
          internal/instancectl/rootfs_identity_other.go: built only for other systems or tags
          internal/instanceexec/claimexec_other.go: built only for other systems or tags
          internal/instanceexec/exec_rootfs_other.go: built only for other systems or tags
          internal/instanceexec/probe_gvisor_other.go: built only for other systems or tags
          internal/instanceexec/probe_hardening_other.go: built only for other systems or tags
          internal/instanceexec/probe_other.go: built only for other systems or tags
          internal/instanceexec/probe_rootfs_other.go: built only for other systems or tags
          internal/instanceexec/sandbox_other.go: built only for other systems or tags
          internal/instanceexec/scope_other.go: built only for other systems or tags
          internal/instanceexec/stop_other.go: built only for other systems or tags
          internal/instanceexec/tty_other.go: built only for other systems or tags
          internal/instancefs/instancefs_other.go: built only for other systems or tags
          internal/launchd/activate_darwin.go: built only for other systems or tags
          internal/launchd/activate_darwin_amd64.s: built only for other systems or tags
          internal/launchd/activate_darwin_arm64.s: built only for other systems or tags
          internal/launchd/activate_darwin_test.go: built only for other systems or tags
          internal/layout/journal_other.go: built only for other systems or tags
          internal/layout/links_other.go: built only for other systems or tags
          internal/mailer/keys_other.go: built only for other systems or tags
          internal/maintenanceexec/run_other.go: built only for other systems or tags
          internal/mediahandler/collect_other.go: built only for other systems or tags
          internal/mediahandler/procs_other.go: built only for other systems or tags
          internal/medialocal/runner_other.go: built only for other systems or tags
          internal/moves/archive/open_other.go: built only for other systems or tags
          internal/moves/archive/sync_other.go: built only for other systems or tags
          internal/ops/flock_windows.go: built only for other systems or tags
          internal/park/local_other.go: built only for other systems or tags
          internal/privatefile/io_other.go: built only for other systems or tags
          internal/proxyproto/peek_other.go: built only for other systems or tags
          internal/relay/race_on_test.go: built only for other systems or tags
          internal/release/consumedfence_other.go: built only for other systems or tags
          internal/release/digestcache_other.go: built only for other systems or tags
          internal/rootaws/credentials_other.go: built only for other systems or tags
          internal/rootaws/open_darwin.go: built only for other systems or tags
          internal/rootfsimage/dir_other.go: built only for other systems or tags
          internal/rootstate/authoritydir_other.go: built only for other systems or tags
          internal/rootstate/authorityfile_other.go: built only for other systems or tags
          internal/rootstate/file_other.go: built only for other systems or tags
          internal/rootstate/link_other.go: built only for other systems or tags
          internal/rootstate/persistent_other.go: built only for other systems or tags
          internal/rootstate/state_other.go: built only for other systems or tags
          internal/safefile/file_other.go: built only for other systems or tags
          internal/safefile/reap_other.go: built only for other systems or tags
          internal/stopevidence/fds_other.go: built only for other systems or tags
          internal/stopevidence/fds_other_test.go: built only for other systems or tags
          internal/stopevidence/holders_other.go: built only for other systems or tags
          internal/stopevidence/reconstruct_other.go: built only for other systems or tags
          internal/team/storelock_other.go: built only for other systems or tags
          internal/team/storelock_windows.go: built only for other systems or tags
          move_offline_run_other.go: built only for other systems or tags
          system_group_other.go: built only for other systems or tags
        
    codehealth_test.go:115: fatal               1094 at  474 sites  log.Fatal*, (*log.Logger).Fatal* and os.Exit in the root package's production files
    codehealth_test.go:115: sleep               1005 at  811 sites  time.Sleep in test files
    codehealth_test.go:115: db-no-context        885 at  703 sites  database calls with no context (dbOpWithoutContext) in production files
    codehealth_test.go:115: host-context         188 at  142 sites  context.Background and context.TODO in internal/host production files
    codehealth_test.go:115: func-lines         18573 at   45 sites  functions over 300 code lines (blank and comment-only lines not counted)
    codehealth_test.go:115: file-lines         30750 at    8 sites  files over 3,000 code lines, counted the same way
    codehealth_test.go:115: release-importers     66 at    1 sites  packages whose production files import internal/release
    codehealth_test.go:119: below the record: file-lines . apimode.go -: 4182 in the code, the record allows 4184 (make code-health-record lowers it)
    codehealth_test.go:119: below the record: file-lines internal/activator activator.go -: 3782 in the code, the record allows 3783 (make code-health-record lowers it)
    codehealth_test.go:119: below the record: file-lines internal/host agent.go -: 3211 in the code, the record allows 3214 (make code-health-record lowers it)
--- PASS: TestCodeHealth (106.82s)
PASS
ok  	github.com/carlosframework/platform/internal/codehealth	107.735s
=== code-health-record ===
go version go1.26.10 linux/arm64
code-health record: comparing with the merge base 74aeb271c6852d9adaa2b224acf7bfa2c8e48fba (main is a8c0fb989a8729b733c34f1f855364c361715615)
=== 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 (13 s, from +14 s)
ok  	github.com/carlosframework/platform/internal/systemd	13.154s
=== internal_rootaws@0 (26 s, from +33 s)
ok  	github.com/carlosframework/platform/internal/rootaws	25.139s
=== internal_activator@0 (279 s, from +110 s)
ok  	github.com/carlosframework/platform/internal/activator	276.953s
=== internal_activator@1 (270 s, from +110 s)
ok  	github.com/carlosframework/platform/internal/activator	267.580s
=== internal_activator@2 (291 s, from +110 s)
ok  	github.com/carlosframework/platform/internal/activator	289.069s
=== internal_activator@3 (384 s, from +110 s)
ok  	github.com/carlosframework/platform/internal/activator	381.601s
=== internal_activator@4 (284 s, from +110 s)
ok  	github.com/carlosframework/platform/internal/activator	281.453s
=== internal_activator@5 (289 s, from +110 s)
ok  	github.com/carlosframework/platform/internal/activator	287.149s
=== internal_activator@6 (301 s, from +110 s)
ok  	github.com/carlosframework/platform/internal/activator	298.846s
=== internal_activator@7 (434 s, from +110 s)
ok  	github.com/carlosframework/platform/internal/activator	431.960s
=== internal_edge@0 (84 s, from +130 s)
ok  	github.com/carlosframework/platform/internal/edge	80.655s
=== internal_edge@1 (64 s, from +130 s)
ok  	github.com/carlosframework/platform/internal/edge	60.694s
=== internal_edge@2 (189 s, from +130 s)
ok  	github.com/carlosframework/platform/internal/edge	185.086s
=== internal_edge@3 (149 s, from +130 s)
ok  	github.com/carlosframework/platform/internal/edge	145.154s
=== internal_edge@4 (171 s, from +130 s)
ok  	github.com/carlosframework/platform/internal/edge	167.406s
=== internal_edge@5 (235 s, from +130 s)
ok  	github.com/carlosframework/platform/internal/edge	231.873s
=== internal_edge@6 (216 s, from +130 s)
ok  	github.com/carlosframework/platform/internal/edge	212.213s
=== internal_edge@7 (223 s, from +130 s)
ok  	github.com/carlosframework/platform/internal/edge	219.708s
=== internal_edge@8 (213 s, from +130 s)
ok  	github.com/carlosframework/platform/internal/edge	209.247s
=== internal_edge@9 (316 s, from +131 s)
ok  	github.com/carlosframework/platform/internal/edge	313.738s
=== internal_edge@10 (208 s, from +131 s)
ok  	github.com/carlosframework/platform/internal/edge	205.197s
=== internal_edge@11 (246 s, from +131 s)
ok  	github.com/carlosframework/platform/internal/edge	243.533s
=== internal_edge@12 (244 s, from +131 s)
ok  	github.com/carlosframework/platform/internal/edge	241.517s
=== internal_edge@13 (245 s, from +131 s)
ok  	github.com/carlosframework/platform/internal/edge	242.171s
=== internal_edge@14 (196 s, from +131 s)
ok  	github.com/carlosframework/platform/internal/edge	193.719s
=== internal_edge@15 (258 s, from +131 s)
ok  	github.com/carlosframework/platform/internal/edge	255.209s
=== internal_host@0 (15 s, from +189 s)
ok  	github.com/carlosframework/platform/internal/host	11.548s
=== internal_host@1 (9 s, from +189 s)
ok  	github.com/carlosframework/platform/internal/host	5.596s
=== lists: internal_edge 130 s, internal_activator 109 s, internal_host 188 s, internal_rootaws 33 s, internal_systemd 13 s
=== cpu: the gate used 7577 cpu-seconds in 544 s, about 13.9 of 32 cores; the machine as a whole was 43% busy
=== gitleaks ===
go version go1.26.10 linux/arm64
go: downloading github.com/zricethezav/gitleaks/v8 v8.30.1
go: downloading github.com/fatih/semgroup v1.2.0
go: downloading github.com/mholt/archives v0.1.2
go: downloading github.com/h2non/filetype v1.1.3
go: downloading github.com/Masterminds/sprig/v3 v3.3.0
go: downloading github.com/charmbracelet/lipgloss v0.5.0
go: downloading github.com/spf13/viper v1.19.0
go: downloading github.com/spf13/cobra v1.9.1
go: downloading github.com/gitleaks/go-gitdiff v0.9.1
go: downloading github.com/BobuSumisu/aho-corasick v1.0.3
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/rs/zerolog v1.33.0
go: downloading github.com/huandu/xstrings v1.5.0
go: downloading github.com/spf13/cast v1.7.1
go: downloading github.com/Masterminds/goutils v1.1.1
go: downloading github.com/mitchellh/copystructure v1.2.0
go: downloading github.com/Masterminds/semver/v3 v3.3.0
go: downloading github.com/shopspring/decimal v1.4.0
go: downloading dario.cat/mergo v1.0.1
go: downloading golang.org/x/crypto v0.35.0
go: downloading github.com/minio/minlz v1.0.0
go: downloading github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707
go: downloading github.com/klauspost/compress v1.17.11
go: downloading github.com/andybalholm/brotli v1.1.2-0.20250424173009-453214e765f3
go: downloading github.com/klauspost/pgzip v1.2.6
go: downloading github.com/bodgit/sevenzip v1.6.0
go: downloading github.com/STARRY-S/zip v0.2.1
go: downloading github.com/nwaples/rardecode/v2 v2.1.0
go: downloading github.com/pierrec/lz4/v4 v4.1.21
go: downloading github.com/sorairolake/lzip-go v0.3.5
go: downloading github.com/therootcompany/xz v1.0.1
go: downloading github.com/ulikunitz/xz v0.5.12
go: downloading golang.org/x/text v0.22.0
go: downloading github.com/lucasb-eyer/go-colorful v1.2.0
go: downloading github.com/mattn/go-runewidth v0.0.14
go: downloading github.com/muesli/reflow v0.2.1-0.20210115123740-9e1d0d53df68
go: downloading github.com/muesli/termenv v0.15.1
go: downloading golang.org/x/sync v0.11.0
go: downloading github.com/fsnotify/fsnotify v1.8.0
go: downloading github.com/mitchellh/mapstructure v1.5.0
go: downloading github.com/sagikazarmark/slog-shim v0.1.0
go: downloading github.com/spf13/afero v1.12.0
go: downloading github.com/spf13/pflag v1.0.6
go: downloading github.com/mitchellh/reflectwalk v1.0.2
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/rivo/uniseg v0.2.0
go: downloading github.com/hashicorp/golang-lru/v2 v2.0.7
go: downloading golang.org/x/sys v0.30.0
go: downloading github.com/hashicorp/errwrap v1.1.0
go: downloading github.com/aymanbagabas/go-osc52/v2 v2.0.1
go: downloading github.com/mattn/go-colorable v0.1.14
self-test: reported source file: a key
self-test: reported source file: a 64-hex key
self-test: reported source file: a census-shaped entry
self-test: reported source file: a key marked gitleaks:allow
self-test: reported source file: a test's fake value outside tests
self-test: reported allowed file: another key beside its allowed value
self-test: reported a tracked file named gitleaks-gate-sentinel.env
self-test: reported 94 near misses of the names notscanned.go lists
self-test: skipped  the 31 files notscanned.go lists
self-test: refused  a notscanned.go entry git does not track
self-test: refused  a config that does not parse
self-test: refused  a config that does not exist
self-test: refused  a missing gitleaks binary
self-test: 6 planted keys reported, 126 tracked files judged, 3 broken setups refused
gitleaks: scanned 11284 tracked files; 31 not scanned, by exact path (scripts/gitleaks-gate/notscanned.go)
gitleaks: clean
diff --git a/docs/site/cli.md b/docs/site/cli.md
index 87a51ff6f..ab0663490 100644
--- a/docs/site/cli.md
+++ b/docs/site/cli.md
@@ -2294,7 +2294,7 @@ Wq3sVh1Hq2v7m4H0eS0pR8yIEwq0vM8A 2026-11-22 10:04 UTC - deleted
3HL4kqtJlcpXroDTDmJ.rmSpXd3dIbrH 2026-11-21 18:30 UTC 4.0 MiB old
```
-`deleted` marks a delete. It holds no bytes. When there are more, the last line names the command for the next page, with `--after`.
+`deleted` marks a delete. It holds no bytes. When there are more versions, the last line gives the `--after` value for the next page. Run the same command with that value.
#### carlos store restore
@@ -2302,7 +2302,7 @@ Wq3sVh1Hq2v7m4H0eS0pR8yIEwq0vM8A 2026-11-22 10:04 UTC - deleted
carlos store restore --app hello --key uploads/a1b2.bin --version 3HL4kqtJlcpXroDTDmJ.rmSpXd3dIbrH
```
-Restore makes an old version current by copying it. The version it replaces is kept like any other. Nothing is deleted. To recover a deleted object, restore the version before the delete. Any kept version can be restored by its id, however many newer versions there are. Restore refuses a delete marker, the version that is already current, or a version larger than 5 GiB (gibibytes). It also refuses a store whose bucket isn't versioned yet, and a store that blocks uploads because its plan's storage is full.
+Restore makes an old version current by copying it. The version it replaces is kept like any other. Nothing is deleted. To recover a deleted object, restore the version before the delete. Any kept version can be restored by its id, however many newer versions there are. Restore refuses a delete marker, the version that is already current, or a version larger than 5 GiB (gibibytes). It also refuses a store whose bucket doesn't currently have versioning enabled, and a store that blocks uploads because its plan's storage is full.
#### carlos store scan
diff --git a/docs/superpowers/notes/store-versioning-copy-deck.md b/docs/superpowers/notes/store-versioning-copy-deck.md
index 62b9002a5..7eb7a33d8 100644
--- a/docs/superpowers/notes/store-versioning-copy-deck.md
+++ b/docs/superpowers/notes/store-versioning-copy-deck.md
@@ -23,7 +23,7 @@ The text lives in two maps: `storeVersioningCopy` (`store_versioning.go`, the CL
| `cli.versioning.flag_create` | keep old versions of this store's objects from the start (see carlos store versioning) |
| `cli.versioning.flag_create_kd` | days to keep old versions, from 30 to 365 (default 30); implies --versioning |
| `cli.versioning.bad_keep_days` | --keep-days must be from 30 to 365 |
-| `cli.versioning.old_console` | this console is older than store versioning, so the store was declared without it and nothing was provisioned. Ask your operator to upgrade the console, then run carlos store versioning on |
+| `cli.versioning.old_console` | this console is older than store versioning, so this command stopped before provisioning. Ask your deployment operator to upgrade it, then run this command again |
| `cli.instances.old_console` | this console is older than store versioning, so it did not turn on --store-versioning. Ask your operator to upgrade the console, then run this again |
| `cli.versioning.on` | versioning on |
| `cli.versioning.off` | versioning off |
@@ -39,7 +39,7 @@ The text lives in two maps: `storeVersioningCopy` (`store_versioning.go`, the CL
| `cli.versions.current` | current |
| `cli.versions.old` | old |
| `cli.versions.deleted` | deleted |
-| `cli.versions.more` | more: carlos store versions --key %s --after %s |
+| `cli.versions.more` | more: run the same command with --after %s |
| `cli.restore.done` | restored %s<br>from %s<br>new %s |
| `cli.versioning.unreadable` | store versioning: can't read the response: %w |
| `cli.versioning.need_key` | --key is required |
@@ -56,8 +56,8 @@ The text lives in two maps: `storeVersioningCopy` (`store_versioning.go`, the CL
| `versioning.no_bucket` | this store has no bucket yet |
| `versioning.bad_keep_days` | old versions must be kept for 30 to 365 days |
| `versioning.keep_days_lowered` | this store keeps old versions for %d days; you can't lower that setting |
-| `versioning.permanent` | versioning can't be turned off once it is on; the store keeps old versions until the store is destroyed |
-| `versioning.person_only` | only a person signed in can turn versioning on; a service credential can't |
+| `versioning.permanent` | versioning can't be turned off once it is on; old versions still expire after the store's retention period |
+| `versioning.person_only` | sign in as a person to turn versioning on; a service credential can't do it |
| `versioning.in_use_by_media` | this store is set up for media conversion or browser uploads, and both need versioning off |
| `versioning.lifecycle_in_use` | the bucket has a lifecycle rule this platform didn't write; ask your deployment operator to remove it, then run this again |
| `versioning.bucket_failed` | versioning is recorded, but the bucket wasn't changed; run the same command again |
@@ -65,12 +65,12 @@ The text lives in two maps: `storeVersioningCopy` (`store_versioning.go`, the CL
| `versions.no_key` | name the object with --key |
| `versions.bad_key` | %q isn't an object key |
| `versions.not_versioned` | this store has never had versioning on, so it keeps no old versions |
-| `restore.not_enabled` | this store's bucket isn't versioned yet; run carlos store versioning on, then try again |
-| `restore.no_version` | %s has no version %s |
+| `restore.not_enabled` | versioning isn't enabled on this store's bucket; run carlos store versioning on for this store, then try again |
+| `restore.no_version` | object %s has no version %s; list its versions with carlos store versions |
| `restore.delete_marker` | version %s marks a delete, so it holds nothing to restore |
| `restore.already_current` | version %s is already the current one |
| `restore.too_large` | version %s is larger than 5 GiB (gibibytes), so restore can't copy it |
| `restore.writes_denied` | this store refuses uploads because its plan's storage is full; you can't restore into it until space is available |
-| `restore.failed` | %s may not have been restored; run carlos store versions to check, then try again |
+| `restore.failed` | object %s may not have been restored; check its current version with carlos store versions before trying again |
| `audit.versioning_on` | turned versioning on%s, keeping old versions for %d days (cli) |
| `audit.restore` | restored %s from version %s%s (cli) |
diff --git a/docs/superpowers/reviews/CODEX-FINDINGS-store-versioning.md b/docs/superpowers/reviews/CODEX-FINDINGS-store-versioning.md
index 671bb2344..6842e39a1 100644
--- a/docs/superpowers/reviews/CODEX-FINDINGS-store-versioning.md
+++ b/docs/superpowers/reviews/CODEX-FINDINGS-store-versioning.md
@@ -106,4 +106,129 @@ Census verdicts below are limited to the recorded root-read dispositions. The fi
| `infra/modules/region-host` envelope | **approve** | Same operator-only IAM changes and exclusions as the two approved units. [main.tf:1182](/Users/paulcampbell/amadan.net/carlos/platform/.claude/worktrees/store-versioning/infra/modules/region-host/main.tf:1182). |
| `infra/modules/region-host/tests` envelope | **approve** | New file contains mock planning assertions only. [store_versioning.tftest.hcl:29](/Users/paulcampbell/amadan.net/carlos/platform/.claude/worktrees/store-versioning/infra/modules/region-host/tests/store_versioning.tftest.hcl:29). |
| `internal/objstore` envelope | **approve** | Existing name/ownership checks remain; bounded AWS client reused; policy adds denies; no new root filesystem input. [aws.go:94](/Users/paulcampbell/amadan.net/carlos/platform/.claude/worktrees/store-versioning/internal/objstore/aws.go:94), `walk.go:269`, `:292`, `:727`. Finding 1 requires storage-behavior fixes. |
-| `internal/provision` envelope | **approve** | Additive manifest field; census updates retain existing classifications. [provision.go:403](/Users/paulcampbell/amadan.net/carlos/platform/.claude/worktrees/store-versioning/internal/provision/provision.go:403), [store_versioning_census_test.go:17](/Users/paulcampbell/amadan.net/carlos/platform/.claude/worktrees/store-versioning/internal/provision/store_versioning_census_test.go:17). |
\ No newline at end of file
+| `internal/provision` envelope | **approve** | Additive manifest field; census updates retain existing classifications. [provision.go:403](/Users/paulcampbell/amadan.net/carlos/platform/.claude/worktrees/store-versioning/internal/provision/provision.go:403), [store_versioning_census_test.go:17](/Users/paulcampbell/amadan.net/carlos/platform/.claude/worktrees/store-versioning/internal/provision/store_versioning_census_test.go:17). |
+
+---
+
+# Round 2
+
+Reviewer: Astra (`gpt-6-astra`, effort high, `codex exec -s read-only`). Brief: `CODEX-REVIEW-BRIEF-store-versioning-R2.md`. Reviewed the fixes `c953103e4..1858cf224` and the whole branch `74aeb271c..1858cf224`.
+
+**Verdict: NOT READY.** One P1 and four P2s. Round 1's findings: five resolved, and one P1 partly resolved and carried forward. It approved every census unit, envelope and record-write declaration.
+
+## Stopping rule 2 applies
+
+The P1 ("valid S3 keys can still make retained versions unrecoverable": the version listings do not request `EncodingType: url`, so a key containing a control character fails to decode) is in round 1's fault family, **retained versions remain recoverable through the CLI/API**, two rounds running. Per AGENTS.md, no third fix is written in that family. **The choice goes to Paul:**
+
+1. **Refuse the case up front.** Refuse keys that are not printable UTF-8 at the API. This does not cover a key the app's own credential writes straight to S3, which can still poison a listing under the same prefix, so it is incomplete.
+2. **Cut the feature.** Drop `carlos store versions` and restore-by-listing. This loses the recovery path the ask requires.
+3. **State the invariant and enforce it in one place, with a guard test** (Astra's recommendation, and mine). Every `ListObjectVersions` call in the branch goes through one helper that sets `EncodingType: url` and URL-decodes every returned key and marker exactly once. The calls are the listing, `StatVersion`'s current lookup, `EmptyVersions` and the sizing sweep. A guard test fails on any other `ListObjectVersions` call site, and an SDK-level XML fixture holds control characters, literal `%` escapes and `+`.
+
+## The four P2s: fixed
+
+These are in other families, so they are fixed without reopening the review.
+
+1. **The next-page line lost the target and did not quote the key.** It now reads "more: run the same command with --after <cursor>", with the cursor shell-quoted (`shellQuote`, `TestShellQuote`).
+2. **Retention was validated after session resolution, and an explicit 0 slipped through.** `--keep-days` is now checked straight after flag parsing, for both `store create` and `store versioning on`, and an explicit value (0 included) must be 30 to 365. `TestKeepDaysRefusedBeforeAnySession` runs the built binary with no login.
+3. **`versioning.permanent` promised indefinite retention.** Reworded as Astra suggested.
+4. **`cli.versioning.old_console` pointed at the wrong recovery.** It now says to run the original command again.
+
+Round 2's copy table is applied in full: `versioning.permanent`, `versioning.person_only`, `restore.not_enabled`, `restore.no_version`, `restore.failed`, `cli.versioning.old_console`, `cli.versions.more`, and the two `docs/site/cli.md` sentences.
+
+## Reply, whole
+
+- **R1 P1, suspension/restore destroys history — resolved.** Suspension is removed; restore requires actual bucket status Enabled (`internal/objstore/aws_versioning.go:173`, `internal/console/apistoreversioning.go:511`).
+- **R1 P1, retained versions become unreachable — partly resolved, P1 carried forward.** Pagination and direct lookup remove the 100-version limit, but XML-invalid keys still break recovery; finding 1 below (`internal/objstore/aws_versioning.go:213`, `:270`).
+- **R1 P1, older consoles silently ignore versioning — resolved.** Create checks the response before provisioning; instances enable refuses missing acknowledgement (`store.go:265`, `instances_cli.go:128`).
+- **R1 P2, negative retention selects an unversioned create — resolved.** Versioning has a separate boolean, and negative values are refused (`store.go:196`, `:247`).
+- **R1 P2, re-create lowers retention — resolved.** Create and setter share `nextKeepDays`, preserving omitted retention and refusing decreases (`internal/console/apistore.go:510`, `internal/console/apistoreversioning.go:142`).
+- **R1 P2, create bypasses person-only policy — resolved.** A versioning request requires `PrincipalUser` before writing (`internal/console/apistore.go:414`).
+
+Reviewed `c953103e4..1858cf224` and `74aeb271c..1858cf224`, the named specifications, census material and copy. **One P1 and four P2s remain.** No files, index or branches changed; no tests were run.
+
+1. **P1 — Valid S3 keys can still make retained versions unrecoverable.**
+ **Section:** §6.4, listing and restore. **Fault family:** retained versions remain recoverable through CLI/API.
+
+ [aws_versioning.go:213](/Users/paulcampbell/amadan.net/carlos/platform/.claude/worktrees/store-versioning/internal/objstore/aws_versioning.go:213) omits `EncodingType: url`. The new current-version lookup does likewise at line 270. The API accepts control characters other than NUL (`internal/console/apistoreversioning.go:393`), while the installed SDK decodes the response as XML without automatically requesting URL encoding. AWS explicitly documents that some valid object-key characters cannot be parsed in these responses without encoding. [AWS ListObjectVersions documentation](https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectVersions.html).
+
+ **Failure:** an object named `blobs/\u0001` can have retained versions, but listing fails to decode. Even with its old version ID known, restore fails at the current-version listing after HEAD succeeds. A writer can also poison an ordinary key’s listing by adding a longer key containing such a character under the requested prefix. Exact-key filtering happens after decoding, too late to help. The same omission affects teardown and sizing (`aws_versioning.go:368`, `economicspass.go:1256`).
+
+ **Fix:** centralize version-list transport handling: request URL encoding and decode returned keys and key markers exactly once before comparisons or reuse. Cover listing, direct restore lookup, sizing and teardown with an actual SDK response fixture containing control characters, literal percent escapes and `+`; the existing typed stubs bypass XML decoding.
+
+2. **P2 — The next-page instruction loses the selected store and mishandles keys.**
+ **Section:** §10.1, CLI pagination. **Fault family:** pagination preserves the original target and key.
+
+ [store_versioning.go:376](/Users/paulcampbell/amadan.net/carlos/platform/.claude/worktrees/store-versioning/store_versioning.go:376) prints only `--key` and `--after`, interpolated without shell quoting. It discards console, account, app and environment.
+
+ **Failure:** after listing an instance’s private store, following the suggested command selects the app’s default store or fails target resolution. A key containing spaces is split; shell metacharacters can be interpreted when the instruction is pasted.
+
+ **Fix:** either render the complete original target with safely quoted arguments, or print “run the same command with `--after …`”, quoting the cursor appropriately. Check a nondefault environment and a key containing spaces/metacharacters.
+
+3. **P2 — Retention validation still happens after requests, and explicit zero bypasses the stated range.**
+ **Section:** §10.5, local validation. **Fault family:** invalid retention is rejected before target discovery or mutation.
+
+ [store.go:190](/Users/paulcampbell/amadan.net/carlos/platform/.claude/worktrees/store-versioning/store.go:190) resolves the session/account/app before reaching validation at line 247. The versioning command follows the same order (`store_versioning.go:249`, `:282`). Default resolution can call `listAccounts` (`apimode.go:579`, `:667`).
+
+ **Failure:** with no saved default, `--keep-days=-1` contacts the console and can fail authentication or account selection before reporting the invalid flag. Explicit `--keep-days=0` is accepted as omission despite the advertised 30–365 range.
+
+ **Fix:** validate immediately after flag parsing, before session/default resolution. Distinguish an omitted flag from explicit zero. Exercise the command entry points; the current helper-level test does not cover this ordering.
+
+4. **P2 — The permanent-versioning refusal promises indefinite retention.**
+ **Section:** `versioning.permanent`. **Fault family:** retention copy matches actual expiry.
+
+ [store_versioning_copy.go:17](/Users/paulcampbell/amadan.net/carlos/platform/.claude/worktrees/store-versioning/internal/console/store_versioning_copy.go:17) says old versions remain until the store is destroyed. The lifecycle rule expires them after `keep_days` (`internal/objstore/aws_versioning.go:69`).
+
+ **Failure:** a reader can reasonably conclude that old versions survive beyond their configured retention period.
+
+ **Fix:** distinguish permanent versioning from finite retention; replacement below.
+
+5. **P2 — The older-console recovery instruction does not finish provisioning.**
+ **Section:** `cli.versioning.old_console`. **Fault family:** recovery instructions complete the interrupted operation.
+
+ [store_versioning.go:53](/Users/paulcampbell/amadan.net/carlos/platform/.claude/worktrees/store-versioning/store_versioning.go:53) instructs the user to upgrade and run `store versioning on`. For a declaration without a bucket, that command records the setting and returns pending; it does not provision (`internal/console/apistoreversioning.go:180`, `:349`).
+
+ **Failure:** a user follows the instruction after a rejected create and still has no usable store.
+
+ **Fix:** instruct them to repeat the original create command after upgrading. That preserves its target and retention flags and resumes provisioning.
+
+Finding 1 repeats round 1’s retained-version recovery invariant. **Stopping rule 2 applies:** choose an upfront refusal, cut the affected feature, or enforce the invariant centrally with a guard test before another fix cycle. I recommend the centralized encoded-listing boundary described above.
+
+The other checks found no additional blocker: the production adapter only enables versioning; grants converge before minting; media eligibility rejects the block before trusting prior verification; teardown retains the record on backend failure; sizing failures mark stores unswept; and the IAM grant remains bounded by the dedicated-prefix exclusions.
+
+Static digest checks matched the three external census units, four non-root envelopes, and both record-write declarations. `git diff --check` reported only six Markdown hard-break trailing spaces in the archived round 1 findings.
+
+NOT READY
+
+Census verdicts apply to the recorded authority and dispositions at `1858cf224`, independently of the functional blockers above.
+
+| Unit or envelope | Verdict | Evidence and basis |
+|---|---|---|
+| `infra/modules/region-host/main.tf:external` | Approve | Switched policy, scoped resources and all four prefix restrictions; boundary unchanged. `main.tf:1149`, `:1165`, `:1182`. External digest matches. |
+| `infra/modules/region-host/variables.tf:external` | Approve | Default-false operator input; no runtime read. `variables.tf:309`. External digest matches. |
+| `infra/modules/region-host/tests/store_versioning.tftest.hcl:external` | Approve | `legacy / accepted-legacy` remains appropriate for mock-provider planning assertions. `store_versioning.tftest.hcl:7`, `:44`, `:56`, `:141`. Digest matches. |
+| `.` envelope | Approve | CLI response checks and pagination add no root filesystem or execution authority. `store.go:246`, `store_versioning.go:125`, `instances_cli.go:128`. Functional fixes remain required. |
+| `infra/modules/region-host` envelope | Approve | Operator-controlled IAM change with dedicated-prefix exclusions. `main.tf:1182`, `variables.tf:309`. Envelope matches. |
+| `infra/modules/region-host/tests` envelope | Approve | Mock planning tests only. `store_versioning.tftest.hcl:29`, `:106`. Envelope matches. |
+| `internal/objstore` envelope | Approve | Existing name/ownership checks remain; convergence rejects suspension; no new root filesystem input. `walk.go:269`, `:292`, `:727`; `versioning.go:151`, `:176`. Envelope matches; finding 1 remains a functional blocker. |
+| `internal/provision` envelope | Approve | Additive manifest policy field; census classifications preserved. `provision.go:403`, `store_versioning_census_test.go:19`. Envelope matches. |
+| Record-write `routeDecls` | Approve | Four routes, person-only setter, existing instance/sidecar classification unchanged. `routedecls.go:1088`; `store_versioning_census_test.go:22`. Recomputed digest matches `7cddf423…`. |
+| Record-write `linkedPolicies` | Approve | All four routes remain `linkedRefuse`; classification unchanged. `linkedpolicy.go:274`; `store_versioning_census_test.go:23`. Recomputed digest matches `864a5e59…`. |
+
+Copy replacements below preserve formatting arguments unless noted. “Keep” means no replacement.
+
+| Key | Keep/change | New text | Why |
+|---|---|---|---|
+| `versioning.permanent` | Change | `versioning can't be turned off once it is on; old versions still expire after the store's retention period` | Corrects finding 4. |
+| `versioning.person_only` | Change | `sign in as a person to turn versioning on; a service credential can't do it` | Gives the next action. |
+| `versioning.lifecycle_in_use` | Keep | — | Names the responsible operator and retry action. |
+| `restore.not_enabled` | Change | `versioning isn't enabled on this store's bucket; run carlos store versioning on for this store, then try again` | Covers an externally suspended bucket as well as initial setup. |
+| `restore.no_version` | Change | `object %s has no version %s; list its versions with carlos store versions` | Lowercase-first and actionable. |
+| `restore.failed` | Change | `object %s may not have been restored; check its current version with carlos store versions before trying again` | Preserves uncertainty and avoids implying an unconditional retry. |
+| `cli.versioning.bad_keep_days` | Keep | — | Clear range; implementation must reject explicit zero. |
+| `cli.versioning.old_console` | Change | `this console is older than store versioning, so this command stopped before provisioning. Ask your deployment operator to upgrade it, then run this command again` | Corrects finding 5 and preserves the original arguments. |
+| `cli.instances.old_console` | Keep | — | Clear refusal and upgrade/retry instruction. |
+| `cli.versioning.flag_after` | Keep | — | Explains the cursor’s source and purpose. |
+| `cli.versions.more` | Change | `more: run the same command with --after %s` | Preserves target and key; pass the safely quoted cursor as the sole argument. |
+| `docs.cli.store_versioning` | Keep | — | Correctly distinguishes permanent enablement from bounded retention. |
+| `docs.cli.store_versions` | Change | Replace the final paragraph with: “`deleted` marks a delete. It holds no bytes. When there are more versions, the last line gives the `--after` value for the next page. Run the same command with that value.” | Matches the corrected paging instruction. |
+| `docs.cli.store_restore` | Change | Replace the final sentence with: “It also refuses a store whose bucket doesn't currently have versioning enabled, and a store that blocks uploads because its plan's storage is full.” | Avoids describing every non-Enabled bucket as never enabled. |
\ No newline at end of file
diff --git a/docs/superpowers/specs/2026-11-22-store-versioning-design.md b/docs/superpowers/specs/2026-11-22-store-versioning-design.md
index 35da47643..49f8dfa0d 100644
--- a/docs/superpowers/specs/2026-11-22-store-versioning-design.md
+++ b/docs/superpowers/specs/2026-11-22-store-versioning-design.md
@@ -11,7 +11,13 @@ envelope. Findings and what was done about each:
`docs/superpowers/reviews/CODEX-FINDINGS-store-versioning.md`. The P1 in
the "history survives suspension and restore" family is answered by
cutting the feature that produced it (stopping rule 2's second option):
-there is no `off` (decision 3).
+there is no `off` (decision 3). Round 2: Astra on `1858cf224` returned NOT READY:
+one P1 and four P2s, with every census unit approved again. The P1 (version
+listings don't request URL encoding, so a key containing a control
+character breaks listing and restore) is round 1's "retained versions stay
+recoverable" family two rounds running, so stopping rule 2 applies and the
+choice is Paul's (options in the findings file; the recommendation is one
+encoded-listing helper with a guard test). The four P2s are fixed.
The census card for this branch is
`docs/superpowers/notes/census-proposal-store-versioning.md`; it needs the
same reviewer's verdict (AGENTS.md, "The census").
diff --git a/internal/console/store_versioning_copy.go b/internal/console/store_versioning_copy.go
index f3c92e267..6e1a495eb 100644
--- a/internal/console/store_versioning_copy.go
+++ b/internal/console/store_versioning_copy.go
@@ -14,8 +14,8 @@ var versioningCopy = map[string]string{
"versioning.no_bucket": "this store has no bucket yet",
"versioning.bad_keep_days": "old versions must be kept for 30 to 365 days",
"versioning.keep_days_lowered": "this store keeps old versions for %d days; you can't lower that setting",
- "versioning.permanent": "versioning can't be turned off once it is on; the store keeps old versions until the store is destroyed",
- "versioning.person_only": "only a person signed in can turn versioning on; a service credential can't",
+ "versioning.permanent": "versioning can't be turned off once it is on; old versions still expire after the store's retention period",
+ "versioning.person_only": "sign in as a person to turn versioning on; a service credential can't do it",
"versioning.in_use_by_media": "this store is set up for media conversion or browser uploads, and both need versioning off",
"versioning.lifecycle_in_use": "the bucket has a lifecycle rule this platform didn't write; ask your deployment operator to remove it, then run this again",
"versioning.bucket_failed": "versioning is recorded, but the bucket wasn't changed; run the same command again",
@@ -23,13 +23,13 @@ var versioningCopy = map[string]string{
"versions.no_key": "name the object with --key",
"versions.bad_key": "%q isn't an object key",
"versions.not_versioned": "this store has never had versioning on, so it keeps no old versions",
- "restore.not_enabled": "this store's bucket isn't versioned yet; run carlos store versioning on, then try again",
- "restore.no_version": "%s has no version %s",
+ "restore.not_enabled": "versioning isn't enabled on this store's bucket; run carlos store versioning on for this store, then try again",
+ "restore.no_version": "object %s has no version %s; list its versions with carlos store versions",
"restore.delete_marker": "version %s marks a delete, so it holds nothing to restore",
"restore.already_current": "version %s is already the current one",
"restore.too_large": "version %s is larger than 5 GiB (gibibytes), so restore can't copy it",
"restore.writes_denied": "this store refuses uploads because its plan's storage is full; you can't restore into it until space is available",
- "restore.failed": "%s may not have been restored; run carlos store versions to check, then try again",
+ "restore.failed": "object %s may not have been restored; check its current version with carlos store versions before trying again",
"audit.versioning_on": "turned versioning on%s, keeping old versions for %d days (cli)",
"audit.restore": "restored %s from version %s%s (cli)",
}
diff --git a/internal/provision/testdata/plan14-root-reads-store-versioning.tsv b/internal/provision/testdata/plan14-root-reads-store-versioning.tsv
index b07aa906a..3aa6a6edd 100644
--- a/internal/provision/testdata/plan14-root-reads-store-versioning.tsv
+++ b/internal/provision/testdata/plan14-root-reads-store-versioning.tsv
@@ -7,7 +7,7 @@
infra/modules/region-host/main.tf external legacy accepted-legacy accepted-legacy;rev3=census-ruling-console-invite-delivery;basis=tofu on an operator's machine with the operator's AWS credentials (no box unit; no binary embeds the file): main's module with one optional aws_iam_role_policy, host_console_mail, count 0 unless console_mail_from is set; it grants the host role ses:SendEmail on the one sending identity, the carlos-bab configuration set and its tenants, conditioned on ses:FromAddress equal to console_mail_from; no read is added and nothing on a box reads the file;rev3=census-ruling-sec-host-imdsv2-module;basis=aws_instance.host gains metadata_options (IMDSv2 required, hop limit 1, endpoint enabled), matching scanner-host; tofu configuration only, run on an operator's machine; no read, file or record write is added; applies in place on a running instance with no restart;rev3=census-ruling-hunt-account-root-hardening;basis=adds aws_iam_role_policy host_release_key_deny (count from deny_release_key_reads, default true): an explicit Deny on ssm:GetParameter, GetParameters and GetParameterHistory for parameter/carlos/release-key, and on GetParametersByPath for its ancestor paths; tofu only, run on an operator's machine; no read is added and nothing on a box reads the file;rev3=census-ruling-region-host-store-deny;basis=host_store policy: the explicit Deny on the deployment's own buckets drops s3:DeleteObject and keeps s3:DeleteBucket and s3:CreateBucket (lease release, retention and prune are DeleteObject); tofu only, run on an operator machine; no read is added and nothing on a box reads the file;rev3=census-ruling-region-ha-p3b;basis=Select default fixed resources through counted addresses and explicit moves; group mode selects scoped bucket/SSM policy, partition-aware ARNs and refuses fixed-only settings. Operator Terraform controls the instance role that can read boot parameters and write runtime bucket objects; release-key Deny and fixed-mode policy remain.;rev3=census-ruling-region-ha-g3-fixes;basis=Enable the fixed-host memory alarm with either alert input and use the selected topic for alarm and recovery notifications. Preserve module topic/subscription creation for alerts_email only. No new root runtime read or box authority.;rev3=census-ruling-managed-fleets-2b1;basis=managed fleets 2b-1 Task 5: aws_iam_policy.store_user_boundary is now counted when store_bucket_prefix is set or managed_fleets_enabled is true; its statements are concat of the unchanged object-storage pair (only with a store prefix, moved into local.store_boundary_statements byte for byte) and local.managed_boundary_statements (only with managed fleets: the fleet-data Allows on <managed_fleet_bucket_prefix>* buckets); name unchanged, description conditional on store prefix with lifecycle ignore_changes on description so a later feature switch never replaces the policy; tofu only, run on an operator's machine with the operator's AWS credentials; no box unit, user_data or binary reads the file; no read is added; default (both features off) plans no change;rev3=census-ruling-fixedbox-health-alarms;basis=Fixed host EC2 status-check alarms: auto-recover gains SNS alarm/ok actions (ec2:recover kept); new host_instance_check alarm (StatusCheckFailed_Instance 3 of 3 x 60 s -> ec2:reboot + SNS). tofu only, run on an operator machine; no read is added and nothing on a box reads the file.;rev3=census-ruling-fixed-host-ignore-user-data;basis=aws_instance.host lifecycle ignore_changes gains user_data (was [ami]): a user_data edit no longer plans an in-place update (stop/start) of a live fixed host; a new box still boots with the given script. tofu only, run on an operator machine; no read is added and nothing on a box reads the file.;rev3=census-ruling-w6-ingress-drain;basis=new aws_iam_role_policy.host_ingress_drain, count 1 only in fixed mode with ingress_target_group_arns non-empty: Allow elasticloadbalancing:DescribeTargetGroupAttributes and elasticloadbalancing:DescribeTargetHealth on Resource "*" (neither action takes a resource type). Read-only; no ELB write right. aws_iam_role.host's group-mode precondition gains length(var.ingress_target_group_arns) == 0, so group mode refuses the input. New AWS read right for the box role (the agent's drain reads); nothing a tenant or app can name.;rev3=census-ruling-stats-prune-400;basis=new aws_iam_role_policy for the console host role, count 1 only when enable_analytics_version_prune is true (default false, refused in group mode): s3:ListBucketVersions on the deployment bucket conditioned on s3:prefix apps/*, and s3:DeleteObjectVersion on deployment_bucket_arn/apps/*/*/analytics/*/days/* only; existing grants and denies unchanged; tofu only, run on an operator machine; no read is added and nothing on a box reads the file;rev3=census-ruling-media-conversion;basis=store_conversion (bool, default false) adds the customer-managed policy host_store_conversion attached to the host role: nine bucket-configuration actions (Get/PutBucketCORS, Get/PutLifecycleConfiguration, Get/PutBucketTagging, GetBucketPolicy, GetEncryptionConfiguration, GetBucketVersioning) on arn:aws:s3:::<store_bucket_prefix>* only, with an explicit Deny of the three writes on the deployment and data buckets; preconditions refuse it unless the prefix is a dedicated literal lower-case prefix ending in -store-, no deployment, data or sibling staging bucket starts with it, and it does not overlap a configured fleet prefix whatever managed_fleets_enabled says. The store user boundary gains s3:AbortMultipartUpload and s3:ListMultipartUploadParts only when the switch is on (off renders byte for byte as before). host_analytics_prune moves from inline to a customer-managed attached policy with identical statements and switch. Default plans no change apart from that policy's type.;rev3=census-ruling-store-versioning;basis=store_versioning (bool, default false) adds the customer-managed policy host_store_versioning attached to the host role: s3:GetBucketVersioning, PutBucketVersioning, GetLifecycleConfiguration, PutLifecycleConfiguration and ListBucketVersions on arn:aws:s3:::<store_bucket_prefix>*, and s3:DeleteObjectVersion, GetObjectVersion and PutObject on arn:aws:s3:::<store_bucket_prefix>*/*, with an explicit Deny of PutBucketVersioning and PutLifecycleConfiguration on the deployment and data buckets; the same four dedicated-prefix preconditions as store_conversion (prefix set, literal lower-case ending in -store-, no deployment, data or sibling staging bucket under it, no overlap with managed_fleet_bucket_prefix). The store user boundary does not change. Default plans no change. tofu only, run on an operator machine; no read is added and nothing on a box reads the file. The console never suspends a bucket (no off, Astra round 1); s3:PutBucketVersioning stays because enabling needs it file:external@0 59f5c5161b2301eed2692dc1a7001c4fc60bb8f2540db0c3454cd6fb4c4103a5
infra/modules/region-host/variables.tf external legacy accepted-legacy accepted-legacy;rev3=census-ruling-console-invite-delivery;basis=tofu on an operator's machine with the operator's AWS credentials (no box unit; no binary embeds the file): main's variables with console_mail_from (validated as one lowercase address) and console_mail_region, both empty by default; no read is added and nothing on a box reads the file;rev3=census-ruling-hunt-account-root-hardening;basis=adds deny_release_key_reads (bool, default true); no read is added and nothing on a box reads the file;rev3=census-ruling-region-ha-p3b;basis=Add default-fixed mode and validated group count, zones, pinned image/release/template, ingress, configuration key and transaction-open refusal. Operator-supplied Terraform values select root boot inputs; no direct box runtime read and no group activation by default.;rev3=census-ruling-region-ha-g2-fixes;basis=Add an empty-default set of additional alert topic ARNs, validating concrete SNS topic syntax and excluding wildcards/subscriptions; operator Terraform input, no box runtime read.;rev3=census-ruling-region-ha-g3-fixes;basis=Add optional alerts_topic_arn with concrete same-region SNS ARN validation and mutual exclusion with alerts_email. The caller owns the existing topic policy and subscriptions; no runtime sink is configured and no new root read is added.;rev3=census-ruling-managed-fleets-2b1;basis=managed fleets 2b-1 Task 5: five variables, managed_fleets_enabled (bool, default false, refused unless mode is fixed), managed_fleets_deployment, managed_fleets_regions (concrete ami/subnet/sg IDs, arm64 types, no ID in two regions), managed_fleet_bucket_prefix (1-24 chars, no reserved prefix, must not cover the deployment, data or staging buckets, disjoint from store_bucket_prefix) and managed_fleet_user_path (literal IAM path, disjoint from store_user_path); store_bucket_prefix and store_user_path gain a validation refusing *, ? or ${ only when managed fleets and object storage are both on; operator Terraform input only; no box runtime read and nothing on a box reads the file;rev3=census-ruling-fixedbox-health-alarms;basis=Add optional health_alerts_topic_arn (concrete same-region SNS ARN validation, empty default); enable_auto_recovery description covers both status alarms. Operator Terraform input; no box runtime read.;rev3=census-ruling-w6-ingress-drain;basis=new variable ingress_target_group_arns (list(string), default [], non-nullable) validated as distinct ELB target group ARNs (arn:aws(-x)*:elasticloadbalancing:<region>:<12 digits>:targetgroup/<name>/<16 hex>); drives the IAM policy and output above. No read added.;rev3=census-ruling-stats-prune-400;basis=new variable enable_analytics_version_prune (bool, default false) driving the policy above; operator Terraform input; no box runtime read;rev3=census-ruling-platform-mail-submission;basis=Task 8: variable "mailer", an object {ses_region, ses_account_id, deployment_bucket_region, optional deployment_bucket_kms_key_arn} defaulting to null, which creates nothing; validated (AWS region shapes, 12-digit account, KMS ARN or empty).;rev3=census-ruling-media-conversion;basis=two variables: store_conversion (bool, default false) and managed_fleets_inline_retired (bool, default false, temporary); operator Terraform input only; no box runtime read. Copy pass 5 changes only the two descriptions' text.;rev3=census-ruling-store-versioning;basis=new variable store_versioning (bool, default false) driving the policy above; operator Terraform input only; no box runtime read. The copy pass (Astra round 1) changes only its description text file:external@0 026ba7f7ac3a6f5db48c3a457e75f453b190f74f24318db377200da54bbacaa9
infra/modules/region-host/tests/store_versioning.tftest.hcl external legacy accepted-legacy accepted-legacy;rev3=census-ruling-store-versioning;basis=new plan-time test file (mock provider, no credentials) for store_versioning: off creates nothing and keeps the boundary byte for byte; on creates exactly the two Allows and one Deny; the boundary never allows a history action; each prefix precondition refuses. Read only by tofu test in CI; nothing on a box reads it file:external@0 66b53503458622d81f347ad6a53c30cc6f13a56e6bb3d730e45ded954e36dc6e
-@coverage . 528db695a3464cab43dc48f2973698e5c25889561a7235efd46242b4c75b23fb
+@coverage . 3a570159813e793927d3552ab984427b47db451cd0b01b5b2558567e18a8c5ad
@coverage infra/modules/region-host 81f0a154b0279fb272590524fe9a152900cdd198b9b6428269698ac229c9ddcf
@coverage infra/modules/region-host/tests 3d56c7f90b54be1e5f670bea1f9695ae302907e5a19ac11739b88877527503c1
@coverage internal/objstore c3d46e94f8c374ea5d0a8622ef21680b8c1199b34d04c9de7ca1de110a81f446
diff --git a/store.go b/store.go
index ac4bd9391..f1c2b05ae 100644
--- a/store.go
+++ b/store.go
@@ -181,10 +181,12 @@ func runStoreCreate(args []string) {
// Client-side gate before the server's, the same one every write verb in
// this file applies: a name the console is certain to refuse should cost
// a typo nothing.
- if name != "" {
- if err := validAppName(name); err != nil {
- log.Fatalf("store create: %v", err)
- }
+ //
+ // --keep-days is checked here too, before any session or default is
+ // resolved (Astra round 2 P2): an explicit value, 0 included, must be 30
+ // to 365, and a bad one must never reach a console.
+ if err := storeCreateFlagsValid(name, flagWasSet(fs, "keep-days"), *keepDays); err != nil {
+ log.Fatalf("store create: %v", err)
}
sess := requireStoreAPISession(*consoleFlag)
diff --git a/store_versioning.go b/store_versioning.go
index 78e786163..b994d86e1 100644
--- a/store_versioning.go
+++ b/store_versioning.go
@@ -50,7 +50,7 @@ var storeVersioningCopy = map[string]string{
"cli.versioning.flag_create": "keep old versions of this store's objects from the start (see carlos store versioning)",
"cli.versioning.flag_create_kd": "days to keep old versions, from 30 to 365 (default 30); implies --versioning",
"cli.versioning.bad_keep_days": "--keep-days must be from 30 to 365",
- "cli.versioning.old_console": "this console is older than store versioning, so the store was declared without it and nothing was provisioned. Ask your operator to upgrade the console, then run carlos store versioning on",
+ "cli.versioning.old_console": "this console is older than store versioning, so this command stopped before provisioning. Ask your deployment operator to upgrade it, then run this command again",
"cli.instances.old_console": "this console is older than store versioning, so it did not turn on --store-versioning. Ask your operator to upgrade the console, then run this again",
"cli.versioning.on": "versioning on",
"cli.versioning.off": "versioning off",
@@ -66,7 +66,7 @@ var storeVersioningCopy = map[string]string{
"cli.versions.current": "current",
"cli.versions.old": "old",
"cli.versions.deleted": "deleted",
- "cli.versions.more": "more: carlos store versions --key %s --after %s",
+ "cli.versions.more": "more: run the same command with --after %s",
"cli.restore.done": "restored %s\nfrom %s\nnew %s",
"cli.versioning.unreadable": "store versioning: can't read the response: %w",
"cli.versioning.need_key": "--key is required",
@@ -229,7 +229,11 @@ type storeVersionTarget struct {
// parseStoreVersionFlags parses args for verb with extra flags, then
// resolves the target.
-func parseStoreVersionFlags(verb string, args []string, extra func(*flag.FlagSet)) (storeVersionTarget, error) {
+//
+// check, when set, runs right after the flags are parsed and before any
+// session or default is resolved, so a bad flag is refused without
+// contacting a console (Astra round 2 P2).
+func parseStoreVersionFlags(verb string, args []string, extra func(*flag.FlagSet), check func(*flag.FlagSet) error) (storeVersionTarget, error) {
fs := flag.NewFlagSet("store "+verb, flag.ExitOnError)
app := appFlag(fs, storeVersioningText("cli.versioning.flag_app"))
env := storeEnvironmentFlag(fs, storeVersioningText("cli.versioning.flag_env"))
@@ -246,6 +250,11 @@ func parseStoreVersionFlags(verb string, args []string, extra func(*flag.FlagSet
return storeVersionTarget{}, err
}
}
+ if check != nil {
+ if err := check(fs); err != nil {
+ return storeVersionTarget{}, err
+ }
+ }
sess := requireStoreAPISession(*consoleFlag)
printUsing(stdout, sess)
acct := resolvedAccount(sess, acctRaw, acctIDRaw)
@@ -259,6 +268,11 @@ func runStoreVersioning(args []string, verb string) error {
if verb == "on" {
keepDays = fs.Int("keep-days", 0, storeVersioningText("cli.versioning.flag_keep"))
}
+ }, func(fs *flag.FlagSet) error {
+ if keepDays != nil && flagWasSet(fs, "keep-days") {
+ return keepDaysValid(*keepDays)
+ }
+ return nil
})
if err != nil {
return fmt.Errorf("store versioning %s: %w", verb, err)
@@ -279,8 +293,10 @@ func runStoreVersioningWith(ctx context.Context, t storeVersionTarget, verb stri
var err error
switch verb {
case "on":
- if keepDays != 0 && !objstore.ValidKeepDays(keepDays) {
- return errors.New(storeVersioningText("cli.versioning.bad_keep_days"))
+ if keepDays != 0 {
+ if err := keepDaysValid(keepDays); err != nil {
+ return err
+ }
}
res, err = t.sess.storeVersioningSet(ctx, t.acct, t.app, t.env, true, keepDays)
case "status":
@@ -336,7 +352,7 @@ func runStoreVersions(args []string) error {
t, err := parseStoreVersionFlags("versions", args, func(fs *flag.FlagSet) {
key = fs.String("key", "", storeVersioningText("cli.versioning.flag_key"))
after = fs.String("after", "", storeVersioningText("cli.versioning.flag_after"))
- })
+ }, nil)
if err != nil {
return fmt.Errorf("store versions: %w", err)
}
@@ -373,8 +389,48 @@ func printStoreVersions(w io.Writer, res apiVersionsReply) {
}
tw.Flush()
if res.Next != "" {
- fmt.Fprintf(w, storeVersioningText("cli.versions.more")+"\n", res.Key, res.Next)
+ fmt.Fprintf(w, storeVersioningText("cli.versions.more")+"\n", shellQuote(res.Next))
+ }
+}
+
+// keepDaysValid refuses a retention a person typed that is not 30 to 365.
+func keepDaysValid(n int) error {
+ if !objstore.ValidKeepDays(n) {
+ return errors.New(storeVersioningText("cli.versioning.bad_keep_days"))
}
+ return nil
+}
+
+// storeCreateFlagsValid is `carlos store create`'s flag check before any
+// session: the app name when one was given, and --keep-days when it was
+// set at all (an explicit 0 is refused, not read as omitted).
+func storeCreateFlagsValid(app string, keepDaysSet bool, keepDays int) error {
+ if app != "" {
+ if err := validAppName(app); err != nil {
+ return err
+ }
+ }
+ if keepDaysSet {
+ return keepDaysValid(keepDays)
+ }
+ return nil
+}
+
+// shellQuote is s as one shell word: as is when it holds only characters no
+// shell treats specially, else in single quotes with any single quote
+// escaped, so a printed command can be pasted back safely.
+func shellQuote(s string) string {
+ safe := s != ""
+ for _, c := range s {
+ if !(c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9' || strings.ContainsRune("-_.=/:+,@%", c)) {
+ safe = false
+ break
+ }
+ }
+ if safe {
+ return s
+ }
+ return "'" + strings.ReplaceAll(s, "'", `'\''`) + "'"
}
// storeVersioningEchoed checks that an instances enable asking for
@@ -392,7 +448,7 @@ func runStoreRestore(args []string) error {
t, err := parseStoreVersionFlags("restore", args, func(fs *flag.FlagSet) {
key = fs.String("key", "", storeVersioningText("cli.versioning.flag_key"))
version = fs.String("version", "", storeVersioningText("cli.versioning.flag_version"))
- })
+ }, nil)
if err != nil {
return fmt.Errorf("store restore: %w", err)
}
diff --git a/store_versioning_test.go b/store_versioning_test.go
index 125b9d33d..3a2ce8782 100644
--- a/store_versioning_test.go
+++ b/store_versioning_test.go
@@ -6,6 +6,7 @@ import (
"encoding/json"
"net/http"
"net/http/httptest"
+ "os/exec"
"strings"
"testing"
"time"
@@ -217,7 +218,7 @@ func TestPrintStoreVersions(t *testing.T) {
}
b.Reset()
printStoreVersions(&b, apiVersionsReply{Key: "k", Versions: []apiObjectVersion{{VersionID: "v1", Modified: at}}, Next: "v1"})
- if !strings.HasSuffix(b.String(), "more: carlos store versions --key k --after v1\n") {
+ if !strings.HasSuffix(b.String(), "more: run the same command with --after v1\n") {
t.Fatalf("a page with more = %q", b.String())
}
b.Reset()
@@ -226,3 +227,42 @@ func TestPrintStoreVersions(t *testing.T) {
t.Fatalf("empty = %q", b.String())
}
}
+
+// The next-page cursor is pasted back into a shell, so anything a shell
+// treats specially is quoted (Astra round 2 P2).
+func TestShellQuote(t *testing.T) {
+ for in, want := range map[string]string{
+ "3HL4kqtJlcpXroDTDmJ.rmSpXd3dIbrH": "3HL4kqtJlcpXroDTDmJ.rmSpXd3dIbrH",
+ "null": "null",
+ "a b": "'a b'",
+ "x;rm -rf ~": "'x;rm -rf ~'",
+ "it's": `'it'\''s'`,
+ "": "''",
+ } {
+ if got := shellQuote(in); got != want {
+ t.Errorf("shellQuote(%q) = %s, want %s", in, got, want)
+ }
+ }
+}
+
+// A bad --keep-days, an explicit 0 included, is refused straight after the
+// flags are parsed: no session is looked for and no console is contacted
+// (Astra round 2 P2). With no login, a check that ran later would report
+// the missing session instead.
+func TestKeepDaysRefusedBeforeAnySession(t *testing.T) {
+ bin := buildCarlos(t)
+ for _, args := range [][]string{
+ {"store", "versioning", "on", "--app", "jam", "--keep-days=-1"},
+ {"store", "versioning", "on", "--app", "jam", "--keep-days=0"},
+ {"store", "create", "--app", "jam", "--keep-days=0"},
+ {"store", "create", "--app", "jam", "--versioning", "--keep-days=400"},
+ } {
+ cmd := exec.Command(bin, args...)
+ cmd.Env = carlosTestEnv(t)
+ cmd.Dir = t.TempDir()
+ out, err := cmd.CombinedOutput()
+ if err == nil || !strings.Contains(string(out), "--keep-days must be from 30 to 365") {
+ t.Errorf("carlos %v = %v %q, want the keep-days refusal", args, err, out)
+ }
+ }
+}