Stage: new instances installed first; stage asks not lost (#1582)
A new instance of a build the box already had waited ~40 s: the agent's stage request touched a marker systemd ignores while a root pass runs, retried only every 15 s, and root's pass did the box-wide work first. The stage relay now runs on every box and re-touches per unstaged head at 2 s, doubling to 15 s; root's -stage-only first runs PassFilter over the registry's new exec instances (no Backing, Unit or Version) under the full pass's options and adoptPassAround, then the rest. No new root read; census approved (Astra, #280). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Squashed from stage-spool-1582 into main.
11 files changed,
+638
−59
.amadan/code-health.tsv+1 −1docs/superpowers/notes/census-proposal-stage-spool-1582.md+28 −0internal/host/adopt_passsetup.go+101 −0internal/host/agent.go+28 −38internal/host/plan14_constructors_test.go+3 −1internal/host/stagenew.go+59 −0internal/host/stagenew_test.go+301 −0internal/host/stagerelay.go+97 −16internal/host/stagerelay_test.go+7 −3internal/provision/testdata/plan14-root-reads-chain.tsv+1 −0internal/provision/testdata/plan14-root-reads-stage-spool-1582.tsv+12 −0
CI passed — run details
CI log
=== gate ===
go: downloading go1.26.10 (linux/arm64)
go version go1.26.10 linux/arm64
opentofu: arm64, tofu 1.13.9, aws 6.73.0, archive 2.8.1
tofu: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/tofu_1.13.9_linux_arm64.tar.gz
tofu: downloaded, digest verified
aws: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-aws_6.73.0_linux_arm64.zip
aws: downloaded, digest verified
archive: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-archive_2.8.1_linux_arm64.zip
archive: downloaded, digest verified
installed in /tmp/carlos-opentofu-NloWBU
.amadan/test-gate.sh
go: downloading github.com/aws/aws-sdk-go-v2 v1.44.0
go: downloading github.com/aws/smithy-go v1.28.1
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 golang.org/x/crypto v0.58.0
go: downloading github.com/aws/aws-sdk-go-v2/service/acm v1.45.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ec2 v1.324.0
go: downloading github.com/aws/aws-sdk-go-v2/service/iam v1.58.2
go: downloading github.com/aws/aws-sdk-go-v2/service/route53 v1.64.1
go: downloading github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.37.0
go: downloading github.com/prometheus/client_golang v1.17.0
go: downloading modernc.org/sqlite v1.55.0
go: downloading golang.org/x/sys v0.49.0
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading golang.org/x/net v0.62.0
go: downloading github.com/lmittmann/tint v1.1.3
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/pion/dtls/v3 v3.1.4
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 github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.40
go: downloading github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.40
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/wlynxg/anet v0.0.5
go: downloading github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.40
go: downloading github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0
go: downloading golang.org/x/text v0.43.0
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/memory v1.11.0
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading github.com/google/uuid v1.6.0
go: downloading modernc.org/mathutil v1.7.1
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
=== launchctx (4 s, from +0 s)
ok amadan.net/carlos/platform.git/launchctx 0.016s
? amadan.net/carlos/platform.git/launchctx/controlname [no test files]
? amadan.net/carlos/platform.git/launchctx/wireid [no test files]
=== vet (172 s, from +0 s)
go: downloading github.com/klauspost/compress v1.20.2
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading modernc.org/libc v1.74.1
go: downloading github.com/dustin/go-humanize v1.0.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
=== vet-tags (186 s, from +0 s)
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading modernc.org/libc v1.74.1
go: downloading github.com/dustin/go-humanize v1.0.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/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec
=== gofmt (1 s, from +0 s)
gofmt -l .: clean
=== rest (388 s, from +15 s)
ok github.com/carlosframework/platform/cmd/carlos-media 122.509s
? github.com/carlosframework/platform/cmd/changelog [no test files]
ok github.com/carlosframework/platform/cmd/console 215.125s
ok github.com/carlosframework/platform/cmd/mediaimage 40.242s
ok github.com/carlosframework/platform/cmd/moveprobe 14.721s
ok github.com/carlosframework/platform/cmd/pricebook-export 0.049s
ok github.com/carlosframework/platform/cmd/rootfswitness 0.184s
ok github.com/carlosframework/platform/cmd/runsc-assets 0.193s
ok github.com/carlosframework/platform/cmd/zddprobe 0.940s
ok github.com/carlosframework/platform/internal/agentsock 0.063s
ok github.com/carlosframework/platform/internal/alerting 0.024s
ok github.com/carlosframework/platform/internal/analytics 0.299s
ok github.com/carlosframework/platform/internal/appconfig 41.632s
ok github.com/carlosframework/platform/internal/apperr 0.409s
ok github.com/carlosframework/platform/internal/applog 3.510s
ok github.com/carlosframework/platform/internal/apppolicy 2.846s
ok github.com/carlosframework/platform/internal/assetcache 0.597s
ok github.com/carlosframework/platform/internal/awsinv 0.015s
ok github.com/carlosframework/platform/internal/awsmanaged 11.242s
ok github.com/carlosframework/platform/internal/awsregiongroup 0.302s
ok github.com/carlosframework/platform/internal/awsterminations 0.027s
ok github.com/carlosframework/platform/internal/backupswords 0.015s
ok github.com/carlosframework/platform/internal/billing 0.087s
ok github.com/carlosframework/platform/internal/billing/billingtest 0.052s
ok github.com/carlosframework/platform/internal/billingstripe 1.968s
ok github.com/carlosframework/platform/internal/boxchoice 0.027s
ok github.com/carlosframework/platform/internal/boxid 2.348s
? 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.014s
ok github.com/carlosframework/platform/internal/boxself 0.176s
ok github.com/carlosframework/platform/internal/boxvolumes 0.035s
ok github.com/carlosframework/platform/internal/caps 4.037s
ok github.com/carlosframework/platform/internal/certwarm 0.011s
ok github.com/carlosframework/platform/internal/cgroup 1.449s
ok github.com/carlosframework/platform/internal/changelog 4.623s
ok github.com/carlosframework/platform/internal/clamd 0.093s
? github.com/carlosframework/platform/internal/cliflag [no test files]
ok github.com/carlosframework/platform/internal/clireg 0.013s
ok github.com/carlosframework/platform/internal/codehealth 15.348s
ok github.com/carlosframework/platform/internal/compute 0.021s
ok github.com/carlosframework/platform/internal/consolefleet 0.008s
? github.com/carlosframework/platform/internal/controlname [no test files]
? github.com/carlosframework/platform/internal/controlsock [no test files]
ok github.com/carlosframework/platform/internal/dbdoor 11.234s
ok github.com/carlosframework/platform/internal/dbdoor/dbdoortest 0.055s
ok github.com/carlosframework/platform/internal/dbquery 0.024s
ok github.com/carlosframework/platform/internal/dbreads 2.952s
? github.com/carlosframework/platform/internal/dbreads/dbreadstest [no test files]
ok github.com/carlosframework/platform/internal/dbverify 0.017s
ok github.com/carlosframework/platform/internal/demo 0.011s
ok github.com/carlosframework/platform/internal/demobuild 4.711s
ok github.com/carlosframework/platform/internal/democlaim 0.436s
ok github.com/carlosframework/platform/internal/devbox 16.548s
ok github.com/carlosframework/platform/internal/dnsrec 0.009s
ok github.com/carlosframework/platform/internal/docsite 0.151s
ok github.com/carlosframework/platform/internal/domainreg 0.015s
ok github.com/carlosframework/platform/internal/domains 71.658s
ok github.com/carlosframework/platform/internal/doorkey 0.022s
ok github.com/carlosframework/platform/internal/economics 0.033s
ok github.com/carlosframework/platform/internal/edgefence 0.176s
ok github.com/carlosframework/platform/internal/edgeguard 0.297s
? github.com/carlosframework/platform/internal/edgeproof [no test files]
ok github.com/carlosframework/platform/internal/edgesfile 0.162s
ok github.com/carlosframework/platform/internal/egressaddr 0.007s
ok github.com/carlosframework/platform/internal/execsandbox 102.191s
ok github.com/carlosframework/platform/internal/fileacl 0.009s
ok github.com/carlosframework/platform/internal/fleetapi 1.486s
ok github.com/carlosframework/platform/internal/fleetstore 0.011s
ok github.com/carlosframework/platform/internal/fxrate 0.032s
ok github.com/carlosframework/platform/internal/gate 4.043s
ok github.com/carlosframework/platform/internal/genselect 0.115s
ok github.com/carlosframework/platform/internal/geo 0.053s
ok github.com/carlosframework/platform/internal/geoip 0.090s
ok github.com/carlosframework/platform/internal/groupadmission 0.013s
ok github.com/carlosframework/platform/internal/grouprollaws 16.930s
ok github.com/carlosframework/platform/internal/hadeparture 0.018s
ok github.com/carlosframework/platform/internal/hafresh 0.009s
ok github.com/carlosframework/platform/internal/hairpin 0.207s
ok github.com/carlosframework/platform/internal/historyreadback 1.009s
ok github.com/carlosframework/platform/internal/hostactors 22.021s
ok github.com/carlosframework/platform/internal/hostbox 21.986s
ok github.com/carlosframework/platform/internal/hostclaim 2.297s
ok github.com/carlosframework/platform/internal/hostenv 0.054s
ok github.com/carlosframework/platform/internal/hostevidence 0.046s
ok github.com/carlosframework/platform/internal/hostexec 23.597s
ok github.com/carlosframework/platform/internal/hostfence 0.189s
ok github.com/carlosframework/platform/internal/hostfiles 25.807s
ok github.com/carlosframework/platform/internal/hostfloor 0.716s
ok github.com/carlosframework/platform/internal/hostguard 1.518s
ok github.com/carlosframework/platform/internal/hostops 5.359s
? github.com/carlosframework/platform/internal/hostops/fencerelease [no test files]
ok github.com/carlosframework/platform/internal/hostops/internal/fencerelease 0.011s
ok github.com/carlosframework/platform/internal/hostquarantine 0.016s
ok github.com/carlosframework/platform/internal/hostrelocate 1.732s
ok github.com/carlosframework/platform/internal/hostresolve 0.843s
ok github.com/carlosframework/platform/internal/hostwrite 0.007s
ok github.com/carlosframework/platform/internal/identity 0.006s
ok github.com/carlosframework/platform/internal/infraview 0.013s
ok github.com/carlosframework/platform/internal/ingresshealth 0.017s
ok github.com/carlosframework/platform/internal/ingresshealth/awstg 0.018s
ok github.com/carlosframework/platform/internal/instancectl 67.013s
ok github.com/carlosframework/platform/internal/instanceexec 9.617s
ok github.com/carlosframework/platform/internal/instancefs 14.422s
ok github.com/carlosframework/platform/internal/instancekey 0.006s
ok github.com/carlosframework/platform/internal/instanceupdates 0.044s
ok github.com/carlosframework/platform/internal/interactive 0.632s
ok github.com/carlosframework/platform/internal/launchd 0.008s
ok github.com/carlosframework/platform/internal/layout 22.991s
ok github.com/carlosframework/platform/internal/layout/pubclass 99.794s
ok github.com/carlosframework/platform/internal/lbhealth 0.011s
ok github.com/carlosframework/platform/internal/lease 144.557s
ok github.com/carlosframework/platform/internal/lease/leasetest 1.461s
ok github.com/carlosframework/platform/internal/lease/locktest 0.015s
ok github.com/carlosframework/platform/internal/ledger 0.074s
ok github.com/carlosframework/platform/internal/mail 0.940s
ok github.com/carlosframework/platform/internal/mailer 0.915s
ok github.com/carlosframework/platform/internal/mailsubmit 1.230s
ok github.com/carlosframework/platform/internal/mailwire 0.024s
ok github.com/carlosframework/platform/internal/maintenance 0.218s
ok github.com/carlosframework/platform/internal/maintenanceexec 9.638s
ok github.com/carlosframework/platform/internal/maintenanceguard 0.253s
ok github.com/carlosframework/platform/internal/managedboot 3.362s
? github.com/carlosframework/platform/internal/managedboot/boottest [no test files]
? github.com/carlosframework/platform/internal/managedboot/roottest [no test files]
ok github.com/carlosframework/platform/internal/media 1.691s
ok github.com/carlosframework/platform/internal/media/mediatest 0.007s
ok github.com/carlosframework/platform/internal/mediaaws 61.747s
ok github.com/carlosframework/platform/internal/mediahandler 41.737s
ok github.com/carlosframework/platform/internal/mediajobs 0.815s
ok github.com/carlosframework/platform/internal/medialocal 10.073s
ok github.com/carlosframework/platform/internal/metrics 0.145s
ok github.com/carlosframework/platform/internal/minorunits 0.009s
ok github.com/carlosframework/platform/internal/moves 53.884s
ok github.com/carlosframework/platform/internal/moves/archive 2.968s
ok github.com/carlosframework/platform/internal/moves/offlinerun 0.104s
ok github.com/carlosframework/platform/internal/namedunits 0.051s
ok github.com/carlosframework/platform/internal/objstore 1.840s
ok github.com/carlosframework/platform/internal/ops 16.053s
ok github.com/carlosframework/platform/internal/pageindex 3.826s
ok github.com/carlosframework/platform/internal/parity 0.099s
? github.com/carlosframework/platform/internal/parity/cmd/parity-doc [no test files]
ok github.com/carlosframework/platform/internal/park 0.459s
ok github.com/carlosframework/platform/internal/perf 0.179s
ok github.com/carlosframework/platform/internal/plans 0.088s
ok github.com/carlosframework/platform/internal/privatefile 0.033s
ok github.com/carlosframework/platform/internal/provision 238.927s
ok github.com/carlosframework/platform/internal/proxyproto 0.943s
ok github.com/carlosframework/platform/internal/publicrelease 0.062s
ok github.com/carlosframework/platform/internal/ratelimit 0.215s
ok github.com/carlosframework/platform/internal/regionlabel 0.098s
ok github.com/carlosframework/platform/internal/regionname 0.048s
ok github.com/carlosframework/platform/internal/registrar 0.022s
ok github.com/carlosframework/platform/internal/registrar/openprovider 0.688s
? github.com/carlosframework/platform/internal/registrar/registrartest [no test files]
ok github.com/carlosframework/platform/internal/registry 85.035s
ok github.com/carlosframework/platform/internal/relay 7.539s
ok github.com/carlosframework/platform/internal/release 136.639s
? github.com/carlosframework/platform/internal/release/requestwitness [no test files]
ok github.com/carlosframework/platform/internal/replicagen 0.030s
ok github.com/carlosframework/platform/internal/replicas 0.058s
ok github.com/carlosframework/platform/internal/reqrec 9.634s
ok github.com/carlosframework/platform/internal/rollout 11.531s
ok github.com/carlosframework/platform/internal/rolloutwords 0.019s
ok github.com/carlosframework/platform/internal/rootaws 98.061s
ok github.com/carlosframework/platform/internal/rootfsimage 1.087s
ok github.com/carlosframework/platform/internal/rootparticipation 0.105s
ok github.com/carlosframework/platform/internal/rootstate 0.044s
ok github.com/carlosframework/platform/internal/runs 1.186s
ok github.com/carlosframework/platform/internal/s3compat 0.042s
ok github.com/carlosframework/platform/internal/s3fake 1.148s
ok github.com/carlosframework/platform/internal/s3meter 0.447s
ok github.com/carlosframework/platform/internal/safefile 0.050s
ok github.com/carlosframework/platform/internal/schedule 22.206s
ok github.com/carlosframework/platform/internal/seeds 0.144s
ok github.com/carlosframework/platform/internal/share 0.024s
ok github.com/carlosframework/platform/internal/sim/litestreamfacts 4.848s
ok github.com/carlosframework/platform/internal/sim/mediajobs 50.495s
ok github.com/carlosframework/platform/internal/sim/regionha 21.065s
ok github.com/carlosframework/platform/internal/status 0.390s
ok github.com/carlosframework/platform/internal/steering 0.226s
ok github.com/carlosframework/platform/internal/stopevidence 0.311s
ok github.com/carlosframework/platform/internal/storecfg 0.401s
ok github.com/carlosframework/platform/internal/svcrole 0.010s
ok github.com/carlosframework/platform/internal/systemd 6.492s
? github.com/carlosframework/platform/internal/systemdshow [no test files]
ok github.com/carlosframework/platform/internal/team 2.935s
ok github.com/carlosframework/platform/internal/teamcontract 0.190s
ok github.com/carlosframework/platform/internal/telemetry 0.041s
ok github.com/carlosframework/platform/internal/termfence 3.115s
ok github.com/carlosframework/platform/internal/timerspec 0.027s
ok github.com/carlosframework/platform/internal/tsidentity 4.183s
ok github.com/carlosframework/platform/internal/tunnelclient 0.428s
ok github.com/carlosframework/platform/internal/unixdial 0.012s
ok github.com/carlosframework/platform/internal/updatewords 0.036s
ok github.com/carlosframework/platform/internal/upstreamguard 0.011s
? github.com/carlosframework/platform/internal/upstreamguard/guardtest [no test files]
ok github.com/carlosframework/platform/internal/usage 0.153s
ok github.com/carlosframework/platform/internal/version 0.020s
ok github.com/carlosframework/platform/internal/vet 2.926s
ok github.com/carlosframework/platform/internal/zonehost 0.020s
ok github.com/carlosframework/platform/internal/zonehost/route53zones 0.070s
? 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.025s
ok github.com/carlosframework/platform/scripts/pathmapcheck 0.088s
ok github.com/carlosframework/platform/scripts/region-ha-g2/fixture 5.278s
ok github.com/carlosframework/platform/scripts/stateless-replicas-drill 1.213s
ok github.com/carlosframework/platform/scripts/witness-pointer 0.037s
=== cutover-witness (160 s, from +15 s)
ok github.com/carlosframework/platform 1.831s
=== internal_grouproll@0 (266 s, from +74 s)
ok github.com/carlosframework/platform/internal/grouproll 265.224s
=== internal_grouproll@1 (280 s, from +74 s)
ok github.com/carlosframework/platform/internal/grouproll 279.743s
=== internal_activator@0 (152 s, from +143 s)
ok github.com/carlosframework/platform/internal/activator 146.539s
=== internal_activator@1 (133 s, from +143 s)
ok github.com/carlosframework/platform/internal/activator 127.983s
=== internal_activator@2 (138 s, from +143 s)
ok github.com/carlosframework/platform/internal/activator 133.024s
=== internal_activator@3 (164 s, from +143 s)
ok github.com/carlosframework/platform/internal/activator 158.738s
=== root@0 (143 s, from +167 s)
ok github.com/carlosframework/platform 131.913s
=== root@1 (112 s, from +167 s)
ok github.com/carlosframework/platform 101.449s
=== root@2 (129 s, from +167 s)
ok github.com/carlosframework/platform 116.879s
=== root@3 (121 s, from +167 s)
ok github.com/carlosframework/platform 108.807s
=== root@4 (115 s, from +167 s)
ok github.com/carlosframework/platform 103.589s
=== internal_edge@0 (206 s, from +170 s)
ok github.com/carlosframework/platform/internal/edge 197.508s
=== internal_edge@1 (198 s, from +170 s)
ok github.com/carlosframework/platform/internal/edge 188.780s
=== internal_edge@2 (163 s, from +170 s)
ok github.com/carlosframework/platform/internal/edge 153.497s
=== internal_edge@3 (157 s, from +170 s)
ok github.com/carlosframework/platform/internal/edge 147.615s
=== internal_host@0 (150 s, from +220 s)
ok github.com/carlosframework/platform/internal/host 144.720s
=== internal_host@1 (263 s, from +220 s)
ok github.com/carlosframework/platform/internal/host 258.257s
=== internal_host@2 (228 s, from +220 s)
ok github.com/carlosframework/platform/internal/host 223.475s
=== internal_host@3 (169 s, from +220 s)
ok github.com/carlosframework/platform/internal/host 164.406s
=== internal_host@4 (240 s, from +220 s)
ok github.com/carlosframework/platform/internal/host 235.036s
=== internal_host@5 (138 s, from +220 s)
ok github.com/carlosframework/platform/internal/host 133.379s
=== internal_console@0 (176 s, from +226 s)
ok github.com/carlosframework/platform/internal/console 169.476s
=== internal_console@1 (227 s, from +226 s)
ok github.com/carlosframework/platform/internal/console 220.690s
=== internal_console@2 (206 s, from +226 s)
ok github.com/carlosframework/platform/internal/console 199.574s
=== internal_console@3 (258 s, from +226 s)
ok github.com/carlosframework/platform/internal/console 251.051s
=== internal_console@4 (223 s, from +226 s)
ok github.com/carlosframework/platform/internal/console 215.526s
=== internal_console@5 (233 s, from +226 s)
ok github.com/carlosframework/platform/internal/console 226.116s
=== internal_console@6 (221 s, from +226 s)
ok github.com/carlosframework/platform/internal/console 214.365s
=== internal_console@7 (241 s, from +226 s)
ok github.com/carlosframework/platform/internal/console 233.657s
=== internal_console@8 (249 s, from +226 s)
ok github.com/carlosframework/platform/internal/console 243.381s
=== internal_console@9 (234 s, from +226 s)
ok github.com/carlosframework/platform/internal/console 226.614s
=== internal_console@10 (226 s, from +226 s)
ok github.com/carlosframework/platform/internal/console 219.243s
=== internal_console@11 (253 s, from +226 s)
ok github.com/carlosframework/platform/internal/console 246.241s
=== internal_console@12 (342 s, from +226 s)
ok github.com/carlosframework/platform/internal/console 336.301s
=== internal_console@13 (239 s, from +226 s)
ok github.com/carlosframework/platform/internal/console 231.795s
=== internal_console@14 (225 s, from +226 s)
ok github.com/carlosframework/platform/internal/console 217.509s
=== internal_console@15 (253 s, from +226 s)
ok github.com/carlosframework/platform/internal/console 246.245s
=== internal_console@16 (229 s, from +226 s)
ok github.com/carlosframework/platform/internal/console 221.993s
=== internal_console@17 (263 s, from +226 s)
ok github.com/carlosframework/platform/internal/console 256.283s
=== internal_console@18 (217 s, from +226 s)
ok github.com/carlosframework/platform/internal/console 210.336s
=== internal_console@19 (254 s, from +226 s)
ok github.com/carlosframework/platform/internal/console 247.202s
=== internal_console@20 (215 s, from +226 s)
ok github.com/carlosframework/platform/internal/console 207.742s
=== internal_console@21 (244 s, from +226 s)
ok github.com/carlosframework/platform/internal/console 238.291s
=== internal_console@22 (235 s, from +226 s)
ok github.com/carlosframework/platform/internal/console 229.311s
=== internal_console@23 (237 s, from +226 s)
ok github.com/carlosframework/platform/internal/console 229.853s
=== lists: internal_console 225 s, internal_edge 166 s, internal_activator 142 s, internal_host 219 s, root 166 s, internal_grouproll 73 s
=== cpu: the gate used 13074 cpu-seconds in 569 s, about 23.0 of 32 cores; the machine as a whole was 77% busy
=== opentofu ===
opentofu: 40 test files in 11 suites, OpenTofu v1.13.9
initialised in 15 s
ok 22 s infra/modules/box-fence-writer/tests/writer.tftest.hcl Success! 1 passed, 0 failed.
ok 20 s infra/modules/deployment-buckets/tests/console_floors.tftest.hcl Success! 1 passed, 0 failed.
ok 32 s infra/modules/deployment-buckets/tests/data_lifecycle.tftest.hcl Success! 3 passed, 0 failed.
ok 21 s infra/modules/deployment-buckets/tests/db_reads.tftest.hcl Success! 1 passed, 0 failed.
ok 20 s infra/modules/deployment-buckets/tests/evidence.tftest.hcl Success! 1 passed, 0 failed.
ok 29 s infra/modules/deployment-buckets/tests/fence_writers.tftest.hcl Success! 3 passed, 0 failed.
ok 27 s infra/modules/deployment-buckets/tests/media_results.tftest.hcl Success! 2 passed, 0 failed.
ok 31 s infra/modules/deployment-buckets/tests/published_floors.tftest.hcl Success! 3 passed, 0 failed.
ok 79 s infra/modules/media-engine/tests/media_engine.tftest.hcl Success! 24 passed, 0 failed.
ok 25 s infra/modules/pdf-host/tests/computed.tftest.hcl Success! 2 passed, 0 failed.
ok 56 s infra/modules/pdf-host/tests/pdf_host.tftest.hcl Success! 24 passed, 0 failed.
ok 39 s infra/modules/region-group-operator-document/tests/document.tftest.hcl Success! 12 passed, 0 failed.
ok 17 s infra/modules/region-host/ingress/tests/fixed-targets/tests/targets.tftest.hcl Success! 2 passed, 0 failed.
ok 60 s infra/modules/region-host/ingress/tests/group_ingress.tftest.hcl Success! 30 passed, 0 failed.
ok 44 s infra/modules/region-host/tests/alert_publish.tftest.hcl Success! 18 passed, 0 failed.
ok 41 s infra/modules/region-host/tests/alerts_topic.tftest.hcl Success! 16 passed, 0 failed.
ok 13 s infra/modules/region-host/tests/analytics_prune.tftest.hcl Success! 2 passed, 0 failed.
ok 14 s infra/modules/region-host/tests/console_mail.tftest.hcl Success! 4 passed, 0 failed.
ok 4 s infra/modules/region-host/tests/fixed_state_unchanged.tftest.hcl Success! 1 passed, 0 failed.
ok 71 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 12 s infra/modules/region-host/tests/group_iam.tftest.hcl Success! 4 passed, 0 failed.
ok 5 s infra/modules/region-host/tests/group_isolation.tftest.hcl Success! 1 passed, 0 failed.
ok 36 s infra/modules/region-host/tests/group_operator.tftest.hcl Success! 13 passed, 0 failed.
ok 10 s infra/modules/region-host/tests/group_user_data.tftest.hcl Success! 3 passed, 0 failed.
ok 30 s infra/modules/region-host/tests/health_alarms.tftest.hcl Success! 10 passed, 0 failed.
ok 12 s infra/modules/region-host/tests/ingress_drain_read.tftest.hcl Success! 4 passed, 0 failed.
ok 7 s infra/modules/region-host/tests/instance_metadata.tftest.hcl Success! 1 passed, 0 failed.
ok 24 s infra/modules/region-host/tests/mailer.tftest.hcl Success! 6 passed, 0 failed.
ok 13 s infra/modules/region-host/tests/mailer_group.tftest.hcl Success! 2 passed, 0 failed.
ok 15 s infra/modules/region-host/tests/managed_fleets/group_refusal.tftest.hcl Success! 2 passed, 0 failed.
ok 108 s infra/modules/region-host/tests/managed_fleets/managed_fleets.tftest.hcl Success! 46 passed, 0 failed.
ok 69 s infra/modules/region-host/tests/store_conversion.tftest.hcl Success! 27 passed, 0 failed.
ok 15 s infra/modules/region-host/tests/store_scanning.tftest.hcl Success! 4 passed, 0 failed.
ok 29 s infra/modules/region-host/tests/store_versioning.tftest.hcl Success! 11 passed, 0 failed.
ok 15 s infra/modules/region-host/tests/store_write_credentials.tftest.hcl Success! 4 passed, 0 failed.
ok 18 s infra/modules/region-host/tests/user_data_ignored.tftest.hcl Success! 3 passed, 0 failed.
ok 12 s infra/modules/region-remote-host/tests/data_lifecycle.tftest.hcl Success! 3 passed, 0 failed.
ok 14 s infra/modules/region-remote-host/tests/no_deployment_bucket.tftest.hcl Success! 5 passed, 0 failed.
ok 28 s infra/modules/scanner-host/tests/scanner_host.tftest.hcl Success! 14 passed, 0 failed.
opentofu: 40 files in 212 s
opentofu: PASS
=== cross ===
--- shard 0 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling darwin/arm64
--- shard 1 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling darwin/amd64
--- shard 2 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling linux/arm64
linux/arm64 carlos binary: 66912418 bytes (ceiling 70000000)
--- shard 3 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling windows/amd64
--- shard 4 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling windows/arm64
=== minio-contract ===
go version go1.26.10 linux/arm64
minio contract: arm64, minio RELEASE.2025-09-07T16-13-09Z, mc RELEASE.2025-08-13T08-35-41Z
minio: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/minio/minio.linux-arm64.RELEASE.2025-09-07T16-13-09Z
minio: downloaded, digest verified
mc: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/minio/mc.linux-arm64.RELEASE.2025-08-13T08-35-41Z
mc: downloaded, digest verified
minio healthy on 127.0.0.1:38288
Added `local` successfully.
Bucket created successfully `local/contract-bucket`.
Bucket created successfully `local/denied-bucket`.
Created policy `contract-only` successfully.
Added user `scopeduser` successfully.
Attached Policies: [contract-only]
To User: scopeduser
buckets and scoped user ready
=== RUN TestDeliveredContractMinio
=== RUN TestDeliveredContractMinio/put
=== RUN TestDeliveredContractMinio/get_round-trips_the_body
=== RUN TestDeliveredContractMinio/list_shows_the_key
=== RUN TestDeliveredContractMinio/head_and_list_agree_on_the_version
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_its_own_object
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/not_by_PutObjectTagging
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/and_not_by_x-amz-tagging_on_upload
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CreateMultipartUpload
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CopyObject_with_a_REPLACE_tagging_directive
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/but_multipart_itself_is_allowed
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_copy_itself_is_allowed
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/a_POST-policy_forged_tag_with_a_matching_version_is_still_not_a_verdict
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_an_ordinary_tagged-with-something-else_upload_is_allowed
=== RUN TestDeliveredContractMinio/delete_removes_it
=== RUN TestDeliveredContractMinio/cross-bucket_denial
--- PASS: TestDeliveredContractMinio (0.03s)
--- PASS: TestDeliveredContractMinio/put (0.00s)
--- PASS: TestDeliveredContractMinio/get_round-trips_the_body (0.00s)
--- PASS: TestDeliveredContractMinio/list_shows_the_key (0.00s)
--- PASS: TestDeliveredContractMinio/head_and_list_agree_on_the_version (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_its_own_object (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/not_by_PutObjectTagging (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/and_not_by_x-amz-tagging_on_upload (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route (0.01s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CreateMultipartUpload (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CopyObject_with_a_REPLACE_tagging_directive (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/but_multipart_itself_is_allowed (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_copy_itself_is_allowed (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/a_POST-policy_forged_tag_with_a_matching_version_is_still_not_a_verdict (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_an_ordinary_tagged-with-something-else_upload_is_allowed (0.00s)
--- PASS: TestDeliveredContractMinio/delete_removes_it (0.00s)
--- PASS: TestDeliveredContractMinio/cross-bucket_denial (0.00s)
PASS
ok github.com/carlosframework/platform/internal/objstore 0.038s
=== RUN TestT4StorageProbeMinio
2026/12/01 05:24:11 moves: T4: STORE: list: operation error S3: ListObjectsV2, https response error StatusCode: 403, RequestID: 18ED09D868C147A0, HostID: eb1f06f0d1b4bd5c100567ffc77d9bfbcd0bfb773b800cb54bb9e7d72cbfb71a, 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.047s
=== 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.043s
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.020s
Bucket created successfully `local/wc-bucket`.
Created policy `writer` successfully.
Added user `wcwriter` successfully.
Attached Policies: [writer]
To User: wcwriter
=== RUN TestWriteCredentialContractMinio
=== RUN TestWriteCredentialContractMinio/put_under_the_prefix
=== RUN TestWriteCredentialContractMinio/multipart_under_the_prefix
=== RUN TestWriteCredentialContractMinio/refused:_read_elsewhere
=== RUN TestWriteCredentialContractMinio/refused:_head
=== RUN TestWriteCredentialContractMinio/refused:_delete
=== RUN TestWriteCredentialContractMinio/refused:_put_with_a_platform_tag
=== RUN TestWriteCredentialContractMinio/refused:_put_outside_the_prefix
=== RUN TestWriteCredentialContractMinio/refused:_copy_from_the_store
=== RUN TestWriteCredentialContractMinio/refused:_bucket_settings
=== RUN TestWriteCredentialContractMinio/refused:_read_under_the_prefix
=== RUN TestWriteCredentialContractMinio/refused:_list
=== RUN TestWriteCredentialContractMinio/refused:_list_uploads
=== RUN TestWriteCredentialContractMinio/refused:_tag
=== RUN TestWriteCredentialContractMinio/refused:_put_tagged
=== RUN TestWriteCredentialContractMinio/refused:_put_beside_the_prefix
=== RUN TestWriteCredentialContractMinio/refused:_put_to_another_bucket
--- PASS: TestWriteCredentialContractMinio (0.04s)
--- PASS: TestWriteCredentialContractMinio/put_under_the_prefix (0.00s)
--- PASS: TestWriteCredentialContractMinio/multipart_under_the_prefix (0.01s)
--- PASS: TestWriteCredentialContractMinio/refused:_read_elsewhere (0.00s)
--- PASS: TestWriteCredentialContractMinio/refused:_head (0.00s)
--- PASS: TestWriteCredentialContractMinio/refused:_delete (0.00s)
--- PASS: TestWriteCredentialContractMinio/refused:_put_with_a_platform_tag (0.00s)
--- PASS: TestWriteCredentialContractMinio/refused:_put_outside_the_prefix (0.00s)
--- PASS: TestWriteCredentialContractMinio/refused:_copy_from_the_store (0.00s)
--- PASS: TestWriteCredentialContractMinio/refused:_bucket_settings (0.00s)
--- PASS: TestWriteCredentialContractMinio/refused:_read_under_the_prefix (0.00s)
--- PASS: TestWriteCredentialContractMinio/refused:_list (0.00s)
--- PASS: TestWriteCredentialContractMinio/refused:_list_uploads (0.00s)
--- PASS: TestWriteCredentialContractMinio/refused:_tag (0.00s)
--- PASS: TestWriteCredentialContractMinio/refused:_put_tagged (0.00s)
--- PASS: TestWriteCredentialContractMinio/refused:_put_beside_the_prefix (0.00s)
--- PASS: TestWriteCredentialContractMinio/refused:_put_to_another_bucket (0.00s)
PASS
ok github.com/carlosframework/platform/internal/objstore 0.049s
=== RUN TestEndToEndMinio
=== RUN TestEndToEndMinio/plan
=== RUN TestEndToEndMinio/roll
=== RUN TestEndToEndMinio/replace
=== RUN TestEndToEndMinio/remove
--- PASS: TestEndToEndMinio (0.49s)
--- PASS: TestEndToEndMinio/plan (0.01s)
--- PASS: TestEndToEndMinio/roll (0.13s)
--- PASS: TestEndToEndMinio/replace (0.16s)
--- PASS: TestEndToEndMinio/remove (0.16s)
PASS
ok github.com/carlosframework/platform/internal/grouproll 0.502s
Bucket created successfully `local/dbf-deploy`.
Bucket created successfully `local/dbf-data-ie`.
Bucket created successfully `local/dbf-data-uk`.
local/dbf-deploy versioning is enabled
Created policy `dbf-console` successfully.
Created policy `dbf-ukbox` successfully.
Added user `dbfconsole` successfully.
Added user `dbfukbox` successfully.
Attached Policies: [dbf-console]
To User: dbfconsole
Attached Policies: [dbf-ukbox]
To User: dbfukbox
=== RUN TestDBForwardMinio
2026/12/01 05:24:20 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/12/01 05:24:20 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/12/01 05:24:20 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/12/01 05:24:20 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/12/01 05:24:20 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/12/01 05:24:20 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/12/01 05:24:20 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/12/01 05:24:20 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/12/01 05:24:20 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/12/01 05:24:20 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000003
2026/12/01 05:24:20 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000003 maxTXID=0000000000000003 size=454
2026/12/01 05:24:20 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000003
2026/12/01 05:24:20 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/12/01 05:24:20 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%3A34533: could not determine target mailbox
agent.go:136: dbreads: dbr_thzyp3hptbfggz2x5tsednyhni: planned 3 files (1544 bytes) and restored to 3 in 13ms
agent.go:136: dbreads: dbr_thzyp3hptbfggz2x5tsednyhni: output 5 bytes in 1 confirmed chunks in 2ms
2026/12/01 05:24:21 console: db read dbr_thzyp3hptbfggz2x5tsednyhni: relayed 1 chunks (102 bytes) in 1.005s, ended done
agent.go:136: dbreads: dbr_fce6hf6deb2rln2loivc2ouoay: planned 1 files (720 bytes) and restored to 1 in 11ms
agent.go:136: dbreads: dbr_fce6hf6deb2rln2loivc2ouoay: output 5 bytes in 1 confirmed chunks in 1ms
2026/12/01 05:24:22 console: db read dbr_fce6hf6deb2rln2loivc2ouoay: relayed 1 chunks (102 bytes) in 1.005s, ended done
agent.go:136: dbreads: dbr_guypqhccbaoeudkc6xnbrzjite: planned 3 files (1544 bytes) and held through 3 in 11ms
agent.go:136: dbreads: dbr_guypqhccbaoeudkc6xnbrzjite: output 1544 bytes in 1 confirmed chunks in 1ms
2026/12/01 05:24:23 console: db read dbr_guypqhccbaoeudkc6xnbrzjite: relayed 1 chunks (1641 bytes) in 1.005s, ended done
=== RUN TestDBForwardMinio/by_disconnect
=== NAME TestDBForwardMinio
agent.go:136: dbreads: dbr_4xx26dksqrjdqpuisu3u2mypey: planned 3 files (1544 bytes) and restored to 3 in 13ms
2026/12/01 05:24:23 console: db read dbr_4xx26dksqrjdqpuisu3u2mypey: relayed 0 chunks (0 bytes) in 33ms, ended client gone
agent.go:136: dbreads: dbr_4xx26dksqrjdqpuisu3u2mypey: output 5 bytes in 1 confirmed chunks in 105ms
=== RUN TestDBForwardMinio/by_timeout
=== NAME TestDBForwardMinio
agent.go:136: dbreads: dbr_w4lhqrck5dxb6k2glfprxilesy: planned 3 files (1544 bytes) and restored to 3 in 14ms
2026/12/01 05:24:43 console: db read dbr_w4lhqrck5dxb6k2glfprxilesy: relayed 0 chunks (0 bytes) in 19.347s, ended no-result
agent.go:136: dbreads: dbr_w4lhqrck5dxb6k2glfprxilesy: output 5 bytes in 1 confirmed chunks in 19.319s
--- PASS: TestDBForwardMinio (23.04s)
--- PASS: TestDBForwardMinio/by_disconnect (0.24s)
--- PASS: TestDBForwardMinio/by_timeout (19.46s)
PASS
ok github.com/carlosframework/platform/internal/console 23.088s
Bucket created successfully `local/media-transfers`.
Bucket created successfully `local/media-transfer-results`.
local/media-transfer-results versioning is enabled
Created policy `media-transfers` successfully.
Added user `mediatransfers` successfully.
Attached Policies: [media-transfers]
To User: mediatransfers
=== RUN TestMediaTransfersMinio
upload.go:117: codec: the store already holds video.mp4
upload.go:117: codec: the store already holds video.m3u8
upload.go:117: codec: the store already holds poster.jpg
--- PASS: TestMediaTransfersMinio (0.07s)
PASS
ok github.com/carlosframework/platform/internal/mediaaws 0.078s
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.57s)
PASS
ok github.com/carlosframework/platform/internal/medialocal 0.573s
=== RUN TestHeldHandoverTwoBoxMinio
2026/12/01 05:24:48 edge: mesh key: minted
2026/12/01 05:24:48 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/12/01 05:24:48 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/12/01 05:24:48 tenant admission is open. accepting tenant work
2026/12/01 05:24:48 activator: HA placement host=shop-85bb0cdc.example.test kind=Place ref=annie reason=roomiest generation=2026-12-01T05:24:48Z lock_generation=0
2026/12/01 05:24:48 lease: t8-85bb0cdc/shop-85bb0cdc.example.test: HA lease acquired in 4ms (first wake)
2026/12/01 05:24:48 activator: shop-85bb0cdc.example.test: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/12/01 05:24:48 activator: shop-85bb0cdc.example.test: started carlos-instance@shop\x2d85bb0cdc.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 6ms, control socket 0s, key gate 0s, logs 0s) 6ms, launch file 0s, gate 0s, root start 1ms)
2026/12/01 05:24:48 activator: shop-85bb0cdc.example.test: carlos-instance@shop\x2d85bb0cdc.example.test.service launched in 8ms, healthy 0s later
2026/12/01 05:24:48 activator: shop-85bb0cdc.example.test: woke in 22ms: checks 0s, lease 5ms, restore 0s, identity 0s, protect 0s, spawn 8ms, replicate 9ms
2026/12/01 05:24:48 lease: t8-85bb0cdc/plain-85bb0cdc.example.test: acquired in 2ms (client 0s, lock read and write 1ms)
2026/12/01 05:24:48 activator: no replica for plain-85bb0cdc.example.test in s3://contract-bucket/t8-85bb0cdc/plain-85bb0cdc.example.test — booting fresh
2026/12/01 05:24:48 activator: plain-85bb0cdc.example.test: started carlos-instance@plain\x2d85bb0cdc.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/12/01 05:24:48 activator: plain-85bb0cdc.example.test: carlos-instance@plain\x2d85bb0cdc.example.test.service launched in 7ms, healthy 0s later
2026/12/01 05:24:48 activator: plain-85bb0cdc.example.test: woke in 89ms: checks 0s, lease 2ms, restore 18ms, identity 0s, protect 0s, spawn 7ms, replicate 63ms
2026/12/01 05:24:48 lease: t8-85bb0cdc/bot0.shop.bac.sidecar.internal: HA lease acquired in 4ms (first wake)
2026/12/01 05:24:48 activator: bot0.shop.bac.sidecar.internal: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/12/01 05:24:48 activator: bot0.shop.bac.sidecar.internal: woke in 68ms: checks 0s, lease 4ms, restore 0s, identity 0s, protect 0s, spawn 7ms, settle 0s, replicate 56ms
2026/12/01 05:24:48 activator: next-due probe plain-85bb0cdc.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/12/01 05:24:48 activator: plain-85bb0cdc.example.test hibernated
2026/12/01 05:24:48 activator: next-due probe shop-85bb0cdc.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/12/01 05:24:48 activator: bot0.shop.bac.sidecar.internal: released with a marker (clean true, txid 1, files 3:0e109a5a59acc8cfc2cdebeb7f13eb75d56dca76ff34f259f0c0a6110e763c0a) in 8ms: files 1ms, sync 5ms, record 1ms, marker 2ms
2026/12/01 05:24:48 activator: bot0.shop.bac.sidecar.internal hibernated
2026/12/01 05:24:48 activator: shop-85bb0cdc.example.test: released with a marker (clean true, txid 1, files 3:5e3ecd98698d4bc06d87cf0304231c0c5663ac11aa748131d4d18a6f85519e33) in 6ms: files 1ms, sync 2ms, record 1ms, marker 2ms
2026/12/01 05:24:48 activator: shop-85bb0cdc.example.test hibernated
2026/12/01 05:24:48 lease: t8-85bb0cdc/shop-85bb0cdc.example.test: HA lease acquired in 3ms (clean marker)
2026/12/01 05:24:48 activator: shop-85bb0cdc.example.test: restored (other-box)
2026/12/01 05:24:48 activator: shop-85bb0cdc.example.test: started carlos-instance@shop\x2d85bb0cdc.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 1ms, control socket 0s, key gate 0s, logs 0s) 1ms, launch file 0s, gate 0s, root start 1ms)
2026/12/01 05:24:48 activator: shop-85bb0cdc.example.test: carlos-instance@shop\x2d85bb0cdc.example.test.service launched in 2ms, healthy 0s later
2026/12/01 05:24:48 activator: shop-85bb0cdc.example.test: woke in 87ms: checks 0s, lease 4ms, restore 24ms, identity 0s, protect 0s, spawn 2ms, replicate 56ms
2026/12/01 05:24:48 edge: ha-take shop-85bb0cdc.example.test from annie (txn t8-witness, marker generation 1): holder betty, generation 2
2026/12/01 05:24:48 edge: forward shop-85bb0cdc.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:05b8fc71c9cf9c7e4b150d0f4e321857 Step:move Result:ok Reasons:[] Fence:t8-witness StartedAt:2026-12-01 05:24:48.691746174 +0000 UTC FinishedAt:2026-12-01 05:24:48.840125595 +0000 UTC Acked:[betty carol] Departed:[] Moved:[{Host:shop-85bb0cdc.example.test Holder:betty Gen:2 Confirmed:take}] Released:[{Host:plain-85bb0cdc.example.test Kind:other Marker:true Clean:true Reason:} {Host:bot0.shop.bac.sidecar.internal Kind:worker Marker:true Clean:true Reason:}] Unclean:[] Left:[] Holds:{LongestMS:129 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-85bb0cdc.example.test <nil> stop plain-85bb0cdc.example.test marker=true clean=true <nil> releasing shop-85bb0cdc.example.test <nil> stop bot0.shop.bac.sidecar.internal marker=true clean=true <nil> stop shop-85bb0cdc.example.test marker=true clean=true <nil> taken shop-85bb0cdc.example.test betty <nil> end-moves]
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-85bb0cdc/shop-85bb0cdc.example.test/lock.json
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: DELETE /contract-bucket/t8-85bb0cdc/plain-85bb0cdc.example.test/lock.json
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-85bb0cdc/bot0.shop.bac.sidecar.internal/0009/0000000000000001-0000000000000001.ltx
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-85bb0cdc/bot0.shop.bac.sidecar.internal/lock.json
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-85bb0cdc/shop-85bb0cdc.example.test/0009/0000000000000001-0000000000000001.ltx
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-85bb0cdc/shop-85bb0cdc.example.test/lock.json
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-85bb0cdc/shop-85bb0cdc.example.test/lock.json
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-85bb0cdc/shop-85bb0cdc.example.test/lock.json
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-85bb0cdc/shop-85bb0cdc.example.test/head.json
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/generations/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/0009/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/0008/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/0007/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/0006/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/0005/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/0004/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/0003/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/0002/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/0001/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/0000/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/0009/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/0008/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/0007/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/0006/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/0005/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/0004/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/0003/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/0002/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/0001/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/0000/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-85bb0cdc/shop-85bb0cdc.example.test/0009/0000000000000001-0000000000000001.ltx
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-85bb0cdc/shop-85bb0cdc.example.test/files/0/manifest.json
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-85bb0cdc/shop-85bb0cdc.example.test/files/0/objects/0000000000000001-9c05507050cde1a5f2cde33af40d491d87c269428c29be604ad1e179ce30b25a
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-85bb0cdc/shop-85bb0cdc.example.test/files/0/objects/0000000000000003-61a28b3147eb7c1157f6aec8680b49e455e36edb1761de7722b0cb53aee5e85d
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/0000/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-85bb0cdc/shop-85bb0cdc.example.test/0000/0000000000000001-0000000000000001.ltx
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/0009/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/0000/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/0009/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/0001/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/0002/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-85bb0cdc/shop-85bb0cdc.example.test/0003/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-85bb0cdc/shop-85bb0cdc.example.test/0000/0000000000000002-0000000000000002.ltx
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-85bb0cdc/shop-85bb0cdc.example.test/lock.json
hadrain_twobox_minio_linux_test.go:1243: drain took 197ms; S3 calls 44 (DELETE lock=1 GET files=3 GET head=1 GET lock=3 GET replica=2 LIST replica=28 PUT lock=3 PUT replica=3); deployment store calls 20 (GET edges=14 LIST edges=4 PUT edges=2)
hadrain_twobox_minio_linux_test.go:1367: the fenced A's start gate answers 503 "This service is unavailable. Try again later.\n" (Retry-After "10")
2026/12/01 05:24:48 lease: t8-85bb0cdc/plain-85bb0cdc.example.test: acquired in 2ms (client 0s, lock read and write 2ms)
2026/12/01 05:24:48 activator: plain-85bb0cdc.example.test: started carlos-instance@plain\x2d85bb0cdc.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 0s, control socket 0s, key gate 0s, logs 0s) 0s, launch file 0s, gate 0s, root start 1ms)
2026/12/01 05:24:48 activator: plain-85bb0cdc.example.test: carlos-instance@plain\x2d85bb0cdc.example.test.service launched in 1ms, healthy 0s later
2026/12/01 05:24:48 lease: /tmp/carlos-minio-contract-kBsexY/g/dw2571744258/data/instances/plain-85bb0cdc.example.test/plain-85bb0cdc.example.test.db: continuity with the last clean close not proven; snapshot 1-0000000000000001 written before serving
2026/12/01 05:24:48 activator: plain-85bb0cdc.example.test: woke in 10ms: checks 0s, lease 2ms, restore 0s, identity 0s, protect 1ms, spawn 2ms, replicate 6ms
2026/12/01 05:24:48 activator: next-due probe shop-85bb0cdc.example.test: decode /api/next-due: invalid character 'b' looking for beginning of value — recording none (it sleeps until a request)
2026/12/01 05:24:48 activator: shop-85bb0cdc.example.test: released with a marker (clean true, txid 2, files 3:5e3ecd98698d4bc06d87cf0304231c0c5663ac11aa748131d4d18a6f85519e33) in 4ms: files 1ms, sync 0s, record 1ms, marker 2ms
2026/12/01 05:24:48 activator: shop-85bb0cdc.example.test hibernated
2026/12/01 05:24:48 tenant admission is closed for shutdown
2026/12/01 05:24:48 activator: next-due probe plain-85bb0cdc.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/12/01 05:24:48 activator: plain-85bb0cdc.example.test hibernated
--- PASS: TestHeldHandoverTwoBoxMinio (0.62s)
=== RUN TestHeldHandoverLostLeaseMinio
2026/12/01 05:24:48 edge: mesh key: minted
2026/12/01 05:24:48 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/12/01 05:24:49 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/12/01 05:24:49 tenant admission is open. accepting tenant work
2026/12/01 05:24:49 activator: HA placement host=shop-c1b7c0fd.example.test kind=Place ref=annie reason=roomiest generation=2026-12-01T05:24:49Z lock_generation=0
2026/12/01 05:24:49 lease: t8-c1b7c0fd/shop-c1b7c0fd.example.test: HA lease acquired in 3ms (first wake)
2026/12/01 05:24:49 activator: shop-c1b7c0fd.example.test: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/12/01 05:24:49 activator: shop-c1b7c0fd.example.test: started carlos-instance@shop\x2dc1b7c0fd.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 6ms, control socket 0s, key gate 0s, logs 0s) 6ms, launch file 0s, gate 0s, root start 1ms)
2026/12/01 05:24:49 activator: shop-c1b7c0fd.example.test: carlos-instance@shop\x2dc1b7c0fd.example.test.service launched in 7ms, healthy 0s later
2026/12/01 05:24:49 activator: shop-c1b7c0fd.example.test: woke in 66ms: checks 0s, lease 4ms, restore 0s, identity 0s, protect 0s, spawn 7ms, replicate 54ms
2026/12/01 05:24:49 activator: next-due probe shop-c1b7c0fd.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/12/01 05:24:49 activator: final checkpoint shop-c1b7c0fd.example.test: lease: release marker owed for s3://contract-bucket/t8-c1b7c0fd/shop-c1b7c0fd.example.test/lock.json (If-Match "d599357289b779076592cc5cb315b337"): lease: write release marker: operation error S3: PutObject, https response error StatusCode: 503, RequestID: , HostID: , api error ServiceUnavailable: witness: refused
2026/12/01 05:24:49 activator: shop-c1b7c0fd.example.test hibernated
2026/12/01 05:24:49 activator: handover of shop-c1b7c0fd.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-c1b7c0fd.example.test client 4 "
hadrain_twobox_minio_linux_test.go:1486: driver calls: [begin shop-c1b7c0fd.example.test <nil> releasing shop-c1b7c0fd.example.test <nil> stop shop-c1b7c0fd.example.test marker=false clean=false <nil> left shop-c1b7c0fd.example.test released without a marker]
hadrain_twobox_minio_linux_test.go:1487: a request after the loss: 503 "This instance cannot wake right now. Please try again shortly.\n" (Retry-After "10", holder "none", 0s, err <nil>)
2026/12/01 05:24:49 tenant admission is closed for shutdown
2026/12/01 05:24:49 http: proxy error: context canceled
--- PASS: TestHeldHandoverLostLeaseMinio (0.32s)
PASS
ok github.com/carlosframework/platform/internal/host 0.993s
Bucket created successfully `local/gen-take`.
local/gen-take versioning is enabled
Created policy `gen-take` successfully.
Added user `gentake` successfully.
Attached Policies: [gen-take]
To User: gentake
=== RUN TestGenerationTakeMinio
=== RUN TestGenerationTakeMinio/take
2026/12/01 05:24:50 lease: instances/gen-1796102690468269620.shop.example.com: HA lease acquired in 5ms (first wake)
2026/12/01 05:24:50 lease: instances/gen-1796102690468269620.shop.example.com: HA lease acquired in 3ms (holder terminated)
gentake_minio_test.go:308: a second create-only copy onto instances/gen-1796102690468269620.shop.example.com/g-00000000000000000002/0000/0000000000000001-0000000000000001.ltx: <nil> (destination condition honoured: false)
2026/12/01 05:24:50 ERROR retention enforcement failed system=store db=w.example.com.db error="enforce snapshot retention: remove ltx files: lease: invalid or changed generation binding"
2026/12/01 05:24:50 ERROR retention enforcement failed system=store db=w.example.com.db error="enforce snapshot retention: remove ltx files: lease: a write has waited too long to reach storage (write fence)"
=== RUN TestGenerationTakeMinio/switch-412
2026/12/01 05:24:50 lease: instances/gen-1796102690595115147.shop.example.com: HA lease acquired in 3ms (first wake)
2026/12/01 05:24:50 ERROR retention enforcement failed system=store db=seed.db error="enforce snapshot retention: fetch ltx files: lease: a write has waited too long to reach storage (write fence)"
2026/12/01 05:24:50 lease: instances/gen-1796102690595115147.shop.example.com: HA lease acquired in 2ms (clean marker)
=== RUN TestGenerationTakeMinio/copy-version
=== RUN TestGenerationTakeMinio/store-time
2026/12/01 05:24:50 lease: instances/gen-1796102690647415994.shop.example.com: HA lease acquired in 3ms (first wake)
2026/12/01 05:24:50 ERROR retention enforcement failed system=store db=seed.db error="enforce snapshot retention: remove ltx files: lease: invalid or changed generation binding"
2026/12/01 05:24:50 lease: instances/gen-1796102690647415994.shop.example.com: HA lease acquired in 3ms (clean marker)
2026/12/01 05:24:50 lease: instances/gen-1796102690647415994.shop.example.com: HA lease acquired in 2ms (unclean marker)
2026/12/01 05:24:50 lease: instances/gen-1796102690647415994.shop.example.com: HA lease acquired in 2ms (unclean marker)
2026/12/01 05:24:50 lease: instances/gen-1796102690647415994.shop.example.com: HA lease acquired in 2ms (unclean marker)
2026/12/01 05:24:50 lease: instances/gen-1796102690647415994.shop.example.com: HA lease acquired in 3ms (unclean marker)
=== RUN TestGenerationTakeMinio/skew
--- PASS: TestGenerationTakeMinio (0.35s)
--- PASS: TestGenerationTakeMinio/take (0.13s)
--- PASS: TestGenerationTakeMinio/switch-412 (0.04s)
--- PASS: TestGenerationTakeMinio/copy-version (0.01s)
--- PASS: TestGenerationTakeMinio/store-time (0.16s)
--- PASS: TestGenerationTakeMinio/skew (0.01s)
PASS
ok github.com/carlosframework/platform/internal/lease 0.358s
minio contract: PASS
=== staticcheck ===
go version go1.26.10 linux/arm64
go: downloading honnef.co/go/tools v0.8.2
go: downloading github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c
go: downloading golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678
go: downloading golang.org/x/sync v0.23.0
go: downloading golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa
staticcheck: clean
=== govulncheck ===
go version go1.26.10 linux/arm64
go: downloading golang.org/x/vuln v1.8.0
go: downloading golang.org/x/telemetry v0.0.0-20260908163034-4bcc4b2ee518
go: downloading golang.org/x/tools v0.50.0
govulncheck: scanned github.com/carlosframework/platform, amadan.net/carlos/platform.git/launchctx, carlos-vulnscan
GO-2026-6859 called stdlib@v1.26.10, fixed in v1.26.11
HTTP/1 server crash due to MaxBytesReader header race in net/http
excepted until 2027-01-31 (.amadan/govulncheck-exceptions.tsv:9): net/http MaxBytesReader header race, fixed in go1.26.11. CI and releases stay on go1.26.10 because 1.26.11 deadlocks the edge's Expect: 100-continue path (#897, .amadan/go-toolchain.sh); #904 checked every production MaxBytesReader site and found it unreachable.
GO-2026-5932 required golang.org/x/crypto@v0.58.0, fixed in v0.58.1-0.20261009181718-2f1f834330b2
The golang.org/x/crypto/openpgp package is unmaintained, unsafe by design, and has known security issues
not fatal: no call path to the vulnerable code
govulncheck: clean (2 finding(s), none called outside .amadan/govulncheck-exceptions.tsv)
=== code-health ===
go version go1.26.10 linux/arm64
codehealth_test.go:42: scanned in 1m55.727s
codehealth_test.go:107: line metrics (code lines, then physical):
file-lines 5471 7324 internal/activator activator_test.go
file-lines 4160 6981 internal/console server.go
file-lines 4120 6283 . apimode.go
file-lines 3785 7224 internal/activator activator.go
file-lines 3530 4459 . apimode_test.go
file-lines 3261 3864 internal/registry registry_test.go
file-lines 3157 6338 internal/host agent.go
file-lines 3094 3992 internal/provision reconcile_test.go
func-lines 870 891 internal/host plan14InstalledClaimLaunch
func-lines 810 1277 internal/provision Reconcile
func-lines 769 1242 internal/console (*Server).handleAPIInstanceCreate
func-lines 683 1240 internal/host runAgent
func-lines 571 908 internal/activator (*Service).doWakeOnce
func-lines 538 546 internal/host runServingParkPeerNamespace
func-lines 519 712 . runRoute
func-lines 509 569 internal/host TestPagingIsRateLimited
func-lines 494 817 internal/release adoptHost
func-lines 441 500 internal/host TestRootInstanceStopExecStop
func-lines 421 436 internal/host (*ClaimWakeAssembly).Build
func-lines 421 437 internal/team TestFixture
func-lines 412 414 internal/console TestDemoProtectionsSourceToLimitAndTakedown
func-lines 408 485 . TestFleetAppServesThroughTheHub
func-lines 402 406 internal/registry (*Registry).haJournal
func-lines 400 868 internal/provision rootReadArchivedChain
func-lines 399 733 internal/release PassFilter
func-lines 390 398 internal/host runFilesSeedPreparationWithLive
func-lines 383 406 internal/console TestDemoSourceToLiveAndUpdate
func-lines 374 377 internal/host plan14RequiredArtifactsRootRunner
func-lines 371 417 internal/host TestRootEgressKernelProof
func-lines 369 883 internal/edge (*Edge).ServeHTTP
func-lines 367 584 internal/console (*Server).handleAPIShip
func-lines 364 371 internal/host testRootMigrationBootstrap
func-lines 360 362 internal/edge TestDemoAPIAliasBoundary
func-lines 358 628 cmd/console serve
func-lines 357 358 internal/registry (*Registry).dispatchRemote
func-lines 355 372 internal/host TestRootSandboxUpdateFromOldBox
func-lines 343 354 internal/analytics Prune
func-lines 340 353 internal/host newColdRootHarness
func-lines 335 557 internal/console (*Store).migrate
func-lines 334 334 internal/host TestPlan12RecoveryRestoreSourceDatabase
func-lines 330 371 internal/edge TestRegionalNameNeverLeavesItsRegion
func-lines 329 471 . runDeploy
func-lines 329 329 internal/host TestPlan12RecoveryRestoreSourceDatabase.func1
func-lines 327 369 internal/edge TestTunnelWebSocketEndToEnd
func-lines 325 455 internal/objstore TestDeliveredContractMinio
func-lines 320 654 internal/appconfig SyncExecWithCallbacks
func-lines 315 318 internal/host plan14TimerIntention
func-lines 311 314 internal/host plan14TimerIntention.func1
func-lines 310 315 internal/hostbox ColdHandover.Run
func-lines 308 309 internal/host rootFilesSeedIsolatedWitness
func-lines 305 323 internal/host hairpinKernelWitness
func-lines 304 308 internal/console TestHAP2ProductionDoors
func-lines 302 329 internal/host TestRootG2PoolIngress
release-importers: . cmd/console internal/activator internal/analytics internal/appconfig internal/apperr internal/applog internal/apppolicy internal/boxid internal/boxvolumes internal/console internal/dbreads internal/dbreads/dbreadstest internal/dbverify internal/demobuild internal/domains internal/doorkey internal/edge internal/edgeproof internal/edgesfile internal/fleetapi internal/grouproll internal/grouprollaws internal/historyreadback internal/host internal/hostactors internal/hostbox internal/hostclaim internal/hostevidence internal/hostexec internal/hostfence internal/hostfiles internal/hostfloor internal/hostguard internal/hostops internal/hostrelocate internal/hostresolve internal/instancectl internal/instanceupdates internal/interactive internal/layout internal/lease internal/ledger internal/mail internal/mailer internal/mailsubmit internal/metrics internal/moves internal/objstore internal/ops internal/park internal/plans internal/provision internal/relay internal/rollout internal/rootfsimage internal/runs internal/s3fake internal/schedule internal/seeds internal/status internal/telemetry internal/usage internal/vet scripts/pathmapcheck scripts/witness-pointer
not scanned (217 files):
cmd/carlos-media/drill_other.go: built only for other systems or tags
cmd/carlos-media/harden_other.go: built only for other systems or tags
cmd/console/fleetsocket_other.go: built only for other systems or tags
cmd/console/servelock_windows.go: built only for other systems or tags
cmd/moveprobe/detach_windows.go: built only for other systems or tags
cmd/rootfswitness/mmap_other.go: built only for other systems or tags
devbox_acl_other.go: built only for other systems or tags
devbox_envfile_darwin_test.go: built only for other systems or tags
devbox_envfile_other.go: built only for other systems or tags
domains_transfer_signals_other.go: built only for other systems or tags
interactive_term_darwin.go: built only for other systems or tags
interactive_term_other.go: built only for other systems or tags
internal/activator/claimprocess_root_other.go: built only for other systems or tags
internal/activator/escrow_stamp_other.go: built only for other systems or tags
internal/activator/fleetreserve_other.go: built only for other systems or tags
internal/activator/harecord_other.go: built only for other systems or tags
internal/activator/ownenv_other.go: built only for other systems or tags
internal/activator/pty_other.go: built only for other systems or tags
internal/activator/race_on_test.go: built only for other systems or tags
internal/activator/rolelaunch_other.go: built only for other systems or tags
internal/assetcache/statfs_other.go: built only for other systems or tags
internal/boxself/io_other.go: built only for other systems or tags
internal/cgroup/cleanup_other.go: built only for other systems or tags
internal/cgroup/cleanup_other_test.go: built only for other systems or tags
internal/cgroup/hostprocs_other.go: built only for other systems or tags
internal/cgroup/recreate_other.go: built only for other systems or tags
internal/cgroup/role_other.go: built only for other systems or tags
internal/cgroup/shim_other.go: built only for other systems or tags
internal/cgroup/strict_other.go: built only for other systems or tags
internal/cgroup/verify_other.go: built only for other systems or tags
internal/console/claim_sql_identity_other.go: built only for other systems or tags
internal/console/geoipverify_other.go: built only for other systems or tags
internal/console/hostreports_process_other.go: built only for other systems or tags
internal/console/replicaview_other.go: built only for other systems or tags
internal/console/restore_sim_nice_other_test.go: built only for other systems or tags
internal/console/scalecost_other_test.go: built only for other systems or tags
internal/console/seedscratch_windows.go: built only for other systems or tags
internal/dbreads/worker_other.go: built only for other systems or tags
internal/demobuild/security_other.go: built only for other systems or tags
internal/democlaim/source_other.go: built only for other systems or tags
internal/devbox/peer_darwin.go: built only for other systems or tags
internal/devbox/peer_darwin_test.go: built only for other systems or tags
internal/devbox/peer_other.go: built only for other systems or tags
internal/devbox/socketcheck_other.go: built only for other systems or tags
internal/domains/certimport_read_portable.go: built only for other systems or tags
internal/edge/devboxpeer_other.go: built only for other systems or tags
internal/edge/hairpin_other.go: built only for other systems or tags
internal/edge/heldbudget_other.go: built only for other systems or tags
internal/edge/purge_listen_unix.go: built only for other systems or tags
internal/edge/purge_listen_windows.go: built only for other systems or tags
internal/edge/race_on_test.go: built only for other systems or tags
internal/edge/replicaconsole_owner_other.go: built only for other systems or tags
internal/edge/replicaconsole_peer_other.go: built only for other systems or tags
internal/edge/replicaconsole_socket_other_test.go: built only for other systems or tags
internal/edge/static_artifact_other.go: built only for other systems or tags
internal/edge/static_recordlock_other.go: built only for other systems or tags
internal/edge/static_sweep_other.go: built only for other systems or tags
internal/execsandbox/cleanup_other.go: built only for other systems or tags
internal/execsandbox/file_other.go: built only for other systems or tags
internal/execsandbox/oci_other.go: built only for other systems or tags
internal/fileacl/fileacl_darwin.go: built only for other systems or tags
internal/fileacl/fileacl_darwin_amd64.s: built only for other systems or tags
internal/fileacl/fileacl_darwin_arm64.s: built only for other systems or tags
internal/fileacl/fileacl_darwin_test.go: built only for other systems or tags
internal/grouproll/state_other.go: built only for other systems or tags
internal/grouprollaws/pty_darwin.go: built only for other systems or tags
internal/grouprollaws/pty_other.go: built only for other systems or tags
internal/hairpin/native_other.go: built only for other systems or tags
internal/host/applylock_other_test.go: built only for other systems or tags
internal/host/bootstrapfs_other.go: built only for other systems or tags
internal/host/boxroles_config_other.go: built only for other systems or tags
internal/host/claimfilesseed_delegation_other.go: built only for other systems or tags
internal/host/claimfilesseed_transport_other.go: built only for other systems or tags
internal/host/claimjournal_containment_other.go: built only for other systems or tags
internal/host/claimjournal_migration_other.go: built only for other systems or tags
internal/host/claimlaunch_kernel_other.go: built only for other systems or tags
internal/host/claimlaunch_rev2_other_test.go: built only for other systems or tags
internal/host/claimproduction_other.go: built only for other systems or tags
internal/host/claimready_other.go: built only for other systems or tags
internal/host/claimroleassembly_other.go: built only for other systems or tags
internal/host/claimservingartifact_other.go: built only for other systems or tags
internal/host/claimservinghandover_reboot_other.go: built only for other systems or tags
internal/host/claimservinghandover_reboot_other_test.go: built only for other systems or tags
internal/host/claimservingpark_other.go: built only for other systems or tags
internal/host/claimstate_other.go: built only for other systems or tags
internal/host/claimstop_kernel_other.go: built only for other systems or tags
internal/host/claimtoken_inventory_other.go: built only for other systems or tags
internal/host/claimunit_dropin_other.go: built only for other systems or tags
internal/host/claimunit_files_other.go: built only for other systems or tags
internal/host/claimunit_migrate_other.go: built only for other systems or tags
internal/host/claimunit_ready_other.go: built only for other systems or tags
internal/host/claimunit_socket_migration_other.go: built only for other systems or tags
internal/host/consolefleet_owner_other.go: built only for other systems or tags
internal/host/dbreads_other.go: built only for other systems or tags
internal/host/egress_rail_other.go: built only for other systems or tags
internal/host/fileowner_other.go: built only for other systems or tags
internal/host/flock_windows.go: built only for other systems or tags
internal/host/group_config_other.go: built only for other systems or tags
internal/host/group_maintenance_other.go: built only for other systems or tags
internal/host/group_maintenance_verbs_other.go: built only for other systems or tags
internal/host/group_receipt_other.go: built only for other systems or tags
internal/host/hadrain_call_other.go: built only for other systems or tags
internal/host/hadrain_socket_other.go: built only for other systems or tags
internal/host/hadrainfence_other.go: built only for other systems or tags
internal/host/headroom_other.go: built only for other systems or tags
internal/host/installchannel_other.go: built only for other systems or tags
internal/host/managedboot_other.go: built only for other systems or tags
internal/host/metrics_nested_other.go: built only for other systems or tags
internal/host/movesfloor_other.go: built only for other systems or tags
internal/host/movesfloorgate_other.go: built only for other systems or tags
internal/host/movesheldrelease_other.go: built only for other systems or tags
internal/host/movesmeasure_other.go: built only for other systems or tags
internal/host/offcloudcredentials_other.go: built only for other systems or tags
internal/host/registrychild_exec_other.go: built only for other systems or tags
internal/host/registrychild_other.go: built only for other systems or tags
internal/host/registryowner_chown_other.go: built only for other systems or tags
internal/host/registryowner_descriptor_unix.go: built only for other systems or tags
internal/host/replicahealth_other.go: built only for other systems or tags
internal/host/rootgeneration_census_other.go: built only for other systems or tags
internal/host/rootgeneration_kernel_other.go: built only for other systems or tags
internal/host/rootgeneration_payload_other.go: built only for other systems or tags
internal/host/rootgeneration_retired_other.go: built only for other systems or tags
internal/host/rootmigration_production_other.go: built only for other systems or tags
internal/host/runscset_other.go: built only for other systems or tags
internal/host/sandboxenv_other.go: built only for other systems or tags
internal/host/statfs_windows.go: built only for other systems or tags
internal/host/systemapply_other.go: built only for other systems or tags
internal/hostbox/census_vendor_other.go: built only for other systems or tags
internal/hostbox/inventory_identity_other.go: built only for other systems or tags
internal/hostbox/journalmigration_other.go: built only for other systems or tags
internal/hostbox/journalnamespace_other.go: built only for other systems or tags
internal/hostbox/journaltrust_other.go: built only for other systems or tags
internal/hostbox/migration_census_other.go: built only for other systems or tags
internal/hostbox/typedpark_other.go: built only for other systems or tags
internal/hostenv/group_other.go: built only for other systems or tags
internal/hostenv/write_other.go: built only for other systems or tags
internal/hostenv/write_other_test.go: built only for other systems or tags
internal/hostexec/clock_other.go: built only for other systems or tags
internal/hostexec/clock_other_test.go: built only for other systems or tags
internal/hostexec/local_other.go: built only for other systems or tags
internal/hostexec/pending_other.go: built only for other systems or tags
internal/hostexec/probe_other.go: built only for other systems or tags
internal/hostexec/rootprocess_other.go: built only for other systems or tags
internal/hostfiles/dir_other.go: built only for other systems or tags
internal/hostfiles/refuse_other.go: built only for other systems or tags
internal/hostfiles/watch_other.go: built only for other systems or tags
internal/hostfloor/controllers_other.go: built only for other systems or tags
internal/hostfloor/image_other.go: built only for other systems or tags
internal/hostguard/flock_other.go: built only for other systems or tags
internal/hostguard/flock_other_test.go: built only for other systems or tags
internal/hostguard/record_other.go: built only for other systems or tags
internal/instancectl/claimexec_other.go: built only for other systems or tags
internal/instancectl/claimexec_socket_other.go: built only for other systems or tags
internal/instancectl/claimlaunch_snapshot_other.go: built only for other systems or tags
internal/instancectl/claimnetwork_other.go: built only for other systems or tags
internal/instancectl/demo_snapshot_other.go: built only for other systems or tags
internal/instancectl/egress_cgroup_other.go: built only for other systems or tags
internal/instancectl/egress_dropin_other.go: built only for other systems or tags
internal/instancectl/fleetsize_other.go: built only for other systems or tags
internal/instancectl/gvisorprobe_other.go: built only for other systems or tags
internal/instancectl/peer_other.go: built only for other systems or tags
internal/instancectl/peer_tuple_other.go: built only for other systems or tags
internal/instancectl/rootfs_identity_other.go: built only for other systems or tags
internal/instanceexec/claimexec_other.go: built only for other systems or tags
internal/instanceexec/exec_rootfs_other.go: built only for other systems or tags
internal/instanceexec/netlink_route_other.go: built only for other systems or tags
internal/instanceexec/probe_gvisor_other.go: built only for other systems or tags
internal/instanceexec/probe_hardening_other.go: built only for other systems or tags
internal/instanceexec/probe_other.go: built only for other systems or tags
internal/instanceexec/probe_rootfs_other.go: built only for other systems or tags
internal/instanceexec/sandbox_other.go: built only for other systems or tags
internal/instanceexec/scope_other.go: built only for other systems or tags
internal/instanceexec/stop_other.go: built only for other systems or tags
internal/instanceexec/tty_other.go: built only for other systems or tags
internal/instancefs/instancefs_other.go: built only for other systems or tags
internal/launchd/activate_darwin.go: built only for other systems or tags
internal/launchd/activate_darwin_amd64.s: built only for other systems or tags
internal/launchd/activate_darwin_arm64.s: built only for other systems or tags
internal/launchd/activate_darwin_test.go: built only for other systems or tags
internal/layout/journal_other.go: built only for other systems or tags
internal/layout/links_other.go: built only for other systems or tags
internal/mailer/keys_other.go: built only for other systems or tags
internal/maintenanceexec/run_other.go: built only for other systems or tags
internal/managedboot/admission_other.go: built only for other systems or tags
internal/managedboot/identity_other.go: built only for other systems or tags
internal/mediahandler/collect_other.go: built only for other systems or tags
internal/mediahandler/procs_other.go: built only for other systems or tags
internal/medialocal/runner_other.go: built only for other systems or tags
internal/moves/archive/open_other.go: built only for other systems or tags
internal/moves/archive/sync_other.go: built only for other systems or tags
internal/ops/flock_windows.go: built only for other systems or tags
internal/park/local_other.go: built only for other systems or tags
internal/privatefile/io_other.go: built only for other systems or tags
internal/proxyproto/peek_other.go: built only for other systems or tags
internal/relay/race_on_test.go: built only for other systems or tags
internal/release/consumedfence_other.go: built only for other systems or tags
internal/release/digestcache_other.go: built only for other systems or tags
internal/rootaws/credentials_other.go: built only for other systems or tags
internal/rootaws/open_darwin.go: built only for other systems or tags
internal/rootfsimage/dir_other.go: built only for other systems or tags
internal/rootstate/authoritydir_other.go: built only for other systems or tags
internal/rootstate/authorityfile_other.go: built only for other systems or tags
internal/rootstate/file_other.go: built only for other systems or tags
internal/rootstate/link_other.go: built only for other systems or tags
internal/rootstate/persistent_other.go: built only for other systems or tags
internal/rootstate/state_other.go: built only for other systems or tags
internal/safefile/file_other.go: built only for other systems or tags
internal/safefile/reap_other.go: built only for other systems or tags
internal/schedule/envfile_other.go: built only for other systems or tags
internal/stopevidence/fds_other.go: built only for other systems or tags
internal/stopevidence/fds_other_test.go: built only for other systems or tags
internal/stopevidence/holders_other.go: built only for other systems or tags
internal/stopevidence/reconstruct_other.go: built only for other systems or tags
internal/team/storelock_other.go: built only for other systems or tags
internal/team/storelock_windows.go: built only for other systems or tags
move_offline_run_other.go: built only for other systems or tags
system_group_other.go: built only for other systems or tags
codehealth_test.go:115: fatal 1090 at 473 sites log.Fatal*, (*log.Logger).Fatal* and os.Exit in the root package's production files
codehealth_test.go:115: sleep 1006 at 812 sites time.Sleep in test files
codehealth_test.go:115: db-no-context 873 at 696 sites database calls with no context (dbOpWithoutContext) in production files
codehealth_test.go:115: host-context 188 at 142 sites context.Background and context.TODO in internal/host production files
codehealth_test.go:115: func-lines 18582 at 45 sites functions over 300 code lines (blank and comment-only lines not counted)
codehealth_test.go:115: file-lines 30578 at 8 sites files over 3,000 code lines, counted the same way
codehealth_test.go:115: release-importers 66 at 1 sites packages whose production files import internal/release
codehealth_test.go:119: below the record: func-lines cmd/console serve -: 358 in the code, the record allows 362 (make code-health-record lowers it)
codehealth_test.go:119: below the record: file-lines . apimode.go -: 4120 in the code, the record allows 4147 (make code-health-record lowers it)
codehealth_test.go:119: below the record: file-lines internal/console server.go -: 4160 in the code, the record allows 4191 (make code-health-record lowers it)
--- PASS: TestCodeHealth (115.73s)
PASS
ok github.com/carlosframework/platform/internal/codehealth 117.107s
=== code-health-record ===
go version go1.26.10 linux/arm64
code-health record: HEAD is on main; comparing with its parent 7635c7d885f00c06c1def60362b6f3bf54f31bbc
=== 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 +15 s)
ok github.com/carlosframework/platform/internal/systemd 13.328s
=== internal_rootaws@0 (26 s, from +35 s)
ok github.com/carlosframework/platform/internal/rootaws 25.692s
=== internal_activator@0 (255 s, from +114 s)
ok github.com/carlosframework/platform/internal/activator 253.026s
=== internal_activator@1 (283 s, from +114 s)
ok github.com/carlosframework/platform/internal/activator 280.994s
=== internal_activator@2 (300 s, from +114 s)
ok github.com/carlosframework/platform/internal/activator 298.234s
=== internal_activator@3 (368 s, from +114 s)
ok github.com/carlosframework/platform/internal/activator 365.662s
=== internal_activator@4 (315 s, from +114 s)
ok github.com/carlosframework/platform/internal/activator 313.367s
=== internal_activator@5 (308 s, from +114 s)
ok github.com/carlosframework/platform/internal/activator 305.923s
=== internal_activator@6 (309 s, from +114 s)
ok github.com/carlosframework/platform/internal/activator 307.651s
=== internal_activator@7 (408 s, from +114 s)
ok github.com/carlosframework/platform/internal/activator 406.049s
=== internal_edge@0 (84 s, from +137 s)
ok github.com/carlosframework/platform/internal/edge 80.322s
=== internal_edge@1 (93 s, from +137 s)
ok github.com/carlosframework/platform/internal/edge 89.848s
=== internal_edge@2 (216 s, from +137 s)
ok github.com/carlosframework/platform/internal/edge 212.656s
=== internal_edge@3 (141 s, from +137 s)
ok github.com/carlosframework/platform/internal/edge 137.803s
=== internal_edge@4 (170 s, from +137 s)
ok github.com/carlosframework/platform/internal/edge 166.756s
=== internal_edge@5 (233 s, from +137 s)
ok github.com/carlosframework/platform/internal/edge 229.123s
=== internal_edge@6 (217 s, from +137 s)
ok github.com/carlosframework/platform/internal/edge 213.361s
=== internal_edge@7 (220 s, from +137 s)
ok github.com/carlosframework/platform/internal/edge 216.503s
=== internal_edge@8 (217 s, from +137 s)
ok github.com/carlosframework/platform/internal/edge 213.438s
=== internal_edge@9 (370 s, from +137 s)
ok github.com/carlosframework/platform/internal/edge 366.920s
=== internal_edge@10 (245 s, from +137 s)
ok github.com/carlosframework/platform/internal/edge 241.716s
=== internal_edge@11 (225 s, from +137 s)
ok github.com/carlosframework/platform/internal/edge 222.036s
=== internal_edge@12 (227 s, from +137 s)
ok github.com/carlosframework/platform/internal/edge 223.375s
=== internal_edge@13 (262 s, from +137 s)
ok github.com/carlosframework/platform/internal/edge 258.478s
=== internal_edge@14 (185 s, from +137 s)
ok github.com/carlosframework/platform/internal/edge 181.432s
=== internal_edge@15 (248 s, from +137 s)
ok github.com/carlosframework/platform/internal/edge 244.869s
=== internal_host@0 (15 s, from +199 s)
ok github.com/carlosframework/platform/internal/host 11.969s
=== internal_host@1 (9 s, from +199 s)
ok github.com/carlosframework/platform/internal/host 5.596s
=== lists: internal_edge 136 s, internal_activator 113 s, internal_host 198 s, internal_rootaws 34 s, internal_systemd 14 s
=== cpu: the gate used 7676 cpu-seconds in 522 s, about 14.7 of 32 cores; the machine as a whole was 45% busy
=== gitleaks ===
go version go1.26.10 linux/arm64
go: downloading github.com/zricethezav/gitleaks/v8 v8.30.1
go: downloading github.com/spf13/cobra v1.9.1
go: downloading github.com/rs/zerolog v1.33.0
go: downloading github.com/spf13/viper v1.19.0
go: downloading github.com/BobuSumisu/aho-corasick v1.0.3
go: downloading github.com/hashicorp/go-version v1.7.0
go: downloading golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa
go: downloading github.com/charmbracelet/lipgloss v0.5.0
go: downloading github.com/fatih/semgroup v1.2.0
go: downloading github.com/Masterminds/sprig/v3 v3.3.0
go: downloading github.com/h2non/filetype v1.1.3
go: downloading github.com/gitleaks/go-gitdiff v0.9.1
go: downloading github.com/mholt/archives v0.1.2
go: downloading dario.cat/mergo v1.0.1
go: downloading github.com/Masterminds/goutils v1.1.1
go: downloading github.com/spf13/pflag v1.0.6
go: downloading golang.org/x/crypto v0.35.0
go: downloading github.com/spf13/cast v1.7.1
go: downloading github.com/huandu/xstrings v1.5.0
go: downloading github.com/Masterminds/semver/v3 v3.3.0
go: downloading github.com/mitchellh/copystructure v1.2.0
go: downloading github.com/shopspring/decimal v1.4.0
go: downloading github.com/mattn/go-colorable v0.1.14
go: downloading github.com/mitchellh/reflectwalk v1.0.2
go: downloading golang.org/x/sys v0.30.0
go: downloading github.com/fsnotify/fsnotify v1.8.0
go: downloading github.com/mitchellh/mapstructure v1.5.0
go: downloading github.com/spf13/afero v1.12.0
go: downloading github.com/magiconair/properties v1.8.9
go: downloading gopkg.in/ini.v1 v1.67.0
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading github.com/sagikazarmark/slog-shim v0.1.0
go: downloading github.com/pelletier/go-toml/v2 v2.2.3
go: downloading github.com/subosito/gotenv v1.6.0
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading golang.org/x/text v0.22.0
go: downloading github.com/lucasb-eyer/go-colorful v1.2.0
go: downloading github.com/muesli/reflow v0.2.1-0.20210115123740-9e1d0d53df68
go: downloading github.com/muesli/termenv v0.15.1
go: downloading github.com/mattn/go-runewidth v0.0.14
go: downloading golang.org/x/sync v0.11.0
go: downloading github.com/klauspost/pgzip v1.2.6
go: downloading github.com/klauspost/compress v1.17.11
go: downloading github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707
go: downloading github.com/STARRY-S/zip v0.2.1
go: downloading github.com/bodgit/sevenzip v1.6.0
go: downloading github.com/andybalholm/brotli v1.1.2-0.20250424173009-453214e765f3
go: downloading github.com/minio/minlz v1.0.0
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 github.com/rivo/uniseg v0.2.0
go: downloading github.com/bodgit/windows v1.0.1
go: downloading github.com/bodgit/plumbing v1.3.0
go: downloading github.com/hashicorp/go-multierror v1.1.1
go: downloading github.com/hashicorp/golang-lru/v2 v2.0.7
go: downloading go4.org v0.0.0-20230225012048-214862532bf5
go: downloading github.com/aymanbagabas/go-osc52/v2 v2.0.1
go: downloading github.com/hashicorp/errwrap v1.1.0
self-test: reported source file: a key
self-test: reported source file: a 64-hex key
self-test: reported source file: a census-shaped entry
self-test: reported source file: a key marked gitleaks:allow
self-test: reported source file: a test's fake value outside tests
self-test: reported allowed file: another key beside its allowed value
self-test: reported a tracked file named gitleaks-gate-sentinel.env
self-test: reported 103 near misses of the names notscanned.go lists
self-test: skipped the 34 files notscanned.go lists
self-test: refused a notscanned.go entry git does not track
self-test: refused a config that does not parse
self-test: refused a config that does not exist
self-test: refused a missing gitleaks binary
self-test: 6 planted keys reported, 138 tracked files judged, 3 broken setups refused
gitleaks: scanned 12184 tracked files; 34 not scanned, by exact path (scripts/gitleaks-gate/notscanned.go)
gitleaks: clean
diff --git a/.amadan/code-health.tsv b/.amadan/code-health.tsv| index 6fe3b2863..5cc0cb67a 100644 |
| --- a/.amadan/code-health.tsv |
| +++ b/.amadan/code-health.tsv |
| @@ -2216,7 +2216,7 @@ file-lines . apimode_test.go - 3530 # raised: fdc912b (batch 2, #1123) landed be |
| file-lines internal/activator activator.go - 3785 # raised: the Service.ConfigBeforeWake field and doWakeOnce's one call to it (the body lives in configbeforewake.go); before it, #1290 step 2c |
| file-lines internal/activator activator_test.go - 5471 |
| file-lines internal/console server.go - 4191 # raised: public shares, Config.Shares (one field; the settings type and every share function live in shares.go) |
| -file-lines internal/host agent.go - 3204 |
| +file-lines internal/host agent.go - 3157 |
| file-lines internal/provision reconcile_test.go - 3094 |
| file-lines internal/registry registry_test.go - 3261 |
| release-importers internal/release - - 66 # raised: scripts/pathmapcheck reads claims and edges files from the store (#186 pre-roll check) |
diff --git a/docs/superpowers/notes/census-proposal-stage-spool-1582.md b/docs/superpowers/notes/census-proposal-stage-spool-1582.md| new file mode 100644 |
| index 000000000..47ddff172 |
| --- /dev/null |
| +++ b/docs/superpowers/notes/census-proposal-stage-spool-1582.md |
| @@ -0,0 +1,28 @@ |
| +# Census approval: stage-spool-1582 |
| + |
| +Ruling `census-ruling-stage-spool-1582`. The independent reviewer approves or rejects every change below, 2 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26). |
| + |
| +| unit | change | read sites | what changed | |
| +|---|---|---|---| |
| +| `internal/host/agent.go` `runAdoptUnderRootRelease` | body | unchanged (4) | #1582: on -stage-only (not -config-only), after ParsePublicKey and before adoptConfigSync, the restart-request floor and capabilityPass, calls stageNewFirst with reg.List (the registry this pass already reads) and a builder of its own setup; its narrowed PassFilter runs under the same adoptPassAround demo admission and pending-output cleanup as the full pass. The full pass's option block moved unchanged into buildRootPass (adopt_passsetup.go); the full pass builds its own fresh setup at the same place as before, logs a configureRootProof error and returns a rootAdoptionOptions error exactly as before, and setup.pr.around/adoptPassAround/release.Pass use it. Nothing built for the early pass reaches the full pass. No read of any agent-writable path added; read sites unchanged | |
| +| `internal/host/agent.go` `runAgent` | body | unchanged (8) | #1582: the agent (uid carlos, carlos-edge.service) arms through armRolloutAndStageRelay (stagerelay.go): armRolloutAndRelay, which no longer arms the relay, then the stage relay on every box; root never runs this; read sites unchanged | |
| +| `internal/host/stagerelay.go` `stageRelay.tick` | body | unchanged (4) | #1582: agent-side only (carlos-edge.service, never root): paces each pending head (first ask 2 s after the note, waits doubling to stageRequestEvery; touches at least 2 s and the shortest due wait apart, so stuck heads together touch at most once per stageRequestEvery) and reads a head's row and refusal record only when due; accepted outcomes unchanged; still only touches the existing marker <data>/stage-requested; read sites unchanged | |
| + |
| +Envelopes re-pinned: `internal/host`. |
| + |
| +Review: a model from the other family than the author reads the branch's diff against main on the amadan.net remote (`origin` or `amadan`, whichever points at amadan.net) and gives a verdict for every unit and every re-pinned envelope above. For a unit, compare the change with its recorded disposition and basis below; for an envelope, read every changed function in the package and what it reaches. Reject if the change lets root open, run, query or follow anything it did not before from a path or input a tenant, an app or a box agent can create, write or name; if it weakens a check, refusal, validation, argument or environment the basis relies on; or if the diff cannot settle either. Otherwise approve. Record each verdict on #280 with the tip. A rejected unit goes back to the author to correct; nothing escalates to the census owner. |
| + |
| +Recorded dispositions, which each change must still satisfy: |
| + |
| +- `internal/host/agent.go` `runAdoptUnderRootRelease`: authority, task B3,E1,E2,E3. Basis: rev3=census-ruling-self-serve-moves-1;basis=root claim/adopt/update controller uid 0: builds root's lifetime judge once from the host-claim switch and hands it to both productionRestartRequestPass calls; read sites unchanged, offsets moved; the preceding B3,E1,E2,E3 classification retained;rev3=census-ruling-claims-cleanup-r1;basis=claims cleanup R1: the claims shutdown timeout is the host constant claimsShutdownLimit (120s) instead of hostbox.RequestLimit (120s); no read added or changed;rev3=census-ruling-named-unit-delivery-114;basis=config sync is appconfig.SyncUnits with productionUnitOps (drop-in root /etc/systemd/system, base dir /etc/carlos/units, the declaration file /etc/carlos/named-units.json, systemctl probe/reload/restart, the config flock); no proof binding and no bucket read for delivery (Paul's ruling on #114: a root-owned declaration decides); the comment at the restart callback rewritten; read sites unchanged;rev3=census-ruling-sr-followups;basis=#966 census fix: the SyncUnits ack callback is configAckRootFunc(ctx, store) instead of configAckFunc(ctx, store, "adopt"). configAckRootFunc (new, agent.go): on a box with a bucket or dir (doorFleet empty: no fleet identity, or CARLOS_DEPLOYMENT_BUCKET or CARLOS_DEPLOYMENT_DIR set in the process environment) it returns configAckFunc(ctx, store, "adopt"), the same callback as before #966 (platform-root key, read-then-CAS). On a door box it writes each ack through appconfig.ReplaceConfigAckBlind (new, configack.go) under NewPrefixStore(store, "fleets/<fleet>/"): s.Delete(key) then a create-only s.Put(key, body, ""), returning only errors, which are logged. THE ROOT PASS NO LONGER READS THE FLEET CORNER: it sends exactly DELETE and PUT for fleets/<F>/control/config-ack/<label>/<host>.json and no GET, Open or HEAD of any fleet key; it inspects no body, ETag or listing. Reads only the process environment (doorFleet, BoxLabel), as configAckFunc did. Read sites unchanged;rev3=census-ruling-named-units-param-114;basis=named-units-param-114 Task 4/5: after the restart-only return, calls runNamedUnitsStep, which runs adoptNamedUnitsStep (root reads its own IMDSv2 identity; ssm:GetParameter of /carlos/host/named-units/<instance-id> in that region, operator-written, box role read-only; trusted rootstate reads of /etc/carlos/named-units.json, the console guard marker, root's rollback journal and root history; installs under the config-sync flock), logs, and writes writeNamedUnitsStatus (public root store /var/lib/carlos-named-units), all before ParsePublicKey; config sync moved into adoptConfigSync with a second status write; no input a tenant, app or box agent can write selects the parameter or authorises the install; read sites unchanged;rev3=census-ruling-console-addr-from-install;basis=calls adoptConsoleFleetStep after the named-units step, never fatal (spec §4); no read added here;rev3=census-ruling-managed-fleets-2b2;basis=builds managedRootGate("/") (root's RootAdmission: identity + root 0700 admission files, re-verified) and wraps the round-1 start/selected-restart/rollback callbacks, SyncUnits' UnitOps.Restart and named-unit recovery with it; BYO answers admitted, so nothing changes there; merge of origin/main 65951fbb: main's configAckRootFunc ack, the named-units step (runNamedUnitsStep) with adoptConfigSync, and adoptConsoleFleetStep, not this branch; resolution: adoptConfigSync is handed managedGatedUnitOps(managedGate, productionUnitOps(...)), so SyncUnits' UnitOps.Restart keeps root's gate;rev3=census-ruling-demo-disk-slice1-retention;basis=demo disk bound slice 1, fix round 3: release.Pass runs inside adoptPassAround(ctx, configOnly, restartOnly, stageOnly, passLockErr, productionDemoRetentionFor(reg, generationPins), pass), still inside pr.around and under the adopt pass lock taken at the top; pass now receives two demo options, release.WithRouteAdmission(admitRoute) and release.WithBeforeStage(beforeStage). adoptPassRetention composes mode and lock (nil on -config-only/-restart-only, which also return before this line; locked = passLockErr == nil; hourly = !stageOnly). Witnessed through adoptPassAround around a real release.Pass (TestAdoptPassAroundGatesDemoAdoptionOnTheLock). No read added in this unit; read sites unchanged |
| +- `internal/host/agent.go` `runAgent`: authority, task B,C,D,F. Basis: rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): builds the box's lifetime judge once (newBoxJudge, nil with host claims on) and hands it to the seed placement, the moves and runs workers and every loop it starts; read sites unchanged, offsets moved; B,C,D,F authority retained; self-serve moves 1 Task 8: derives the box's lifetimes switch from the judge once (lifetimes := boxJudge != nil) and hands it to the edges file loop; read sites unchanged, offsets moved;rev3=census-ruling-plans-4d-lapse;basis=arms two more plans hooks from the same snapshot: e.SetPlanDisabledFor(planDisabledFor) beside SetPlanGovernedFor, and svc.SetDisabledFor(planDisabledRoute) beside SetMaxRunFor (plans 4d); the reads live in those units (plans-4d-units decision); read sites unchanged, offsets moved;rev3=census-ruling-rootfs-apps-2;basis=main's body as of the merge of origin/main 9b81d97b (with main's plan rate ceiling, edge request records, regional box names, self-serve moves plan 1, plans 4d-1 lapse and its other later changes under main's own census rulings) plus the rootfs placement wiring in the activator start: an agentRootfs built from eb.NestedOK, CARLOS_DEPLOYMENT_SINGLE_TENANT, CARLOS_POOLS, the claim flag, swapArming's answer, the control client's /ready/rootfs and, on a fleet box whose identity resolved, fleetOwnerCheck over the deploy store main already opens for the fleet label (fleetStore), then arm and armedRootfs.Store; this body reads nothing new itself; the closures it wires read later, at a rootfs wake and each status tick: GET /ready/rootfs over the control socket, NestedOK's checks, and release.FleetOwnerKey for the judged row's own account and this box's fleet from the deploy store;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Tasks 7 and 11, #329 plan 3 Task 7 and plan 1 Task 7's policy cache: the control client is built once and handed to eb.Control, to the status tick (egressStatus) and to a new egressNudgeLoop goroutine; armSizeSource(svc, "/sys/fs/cgroup") after the activator Service; armPolicyCache() after armChangeIndex; statusLoop takes egressStatus. The reads are those units' own (decision rows); this body reads nothing new: the same five sites, offsets moved, in the agent; B,C,D,F authority retained.;rev3=census-ruling-remote-instance-metrics;basis=builds the metrics loop's owners closure (metricsOwners over the agent's registry, the activator and cgm.Leftover) when an activator exists and hands it to metricsLoop; reads nothing new itself;rev3=census-ruling-edge-asset-cache-3;basis=adds file:Statfs. runAgent keeps its authority (B,C,D,F). The new site is assetcache.Statfs, an exported assetcache.FS interface value (var Statfs FS = statfsFS{}), not a function value and not a call in runAgent: the ready hook passes it to armEdgeAssetCache as the store's filesystem, and armEdgeAssetCache calls its Space method on the configured data directory (dataDir(): $CARLOS_DATA_DIR, else /data), which calls unix.Statfs there (statfsFS.Space, accepted legacy at census-ruling-edge-asset-cache-2). No request-supplied pathname reaches it.;rev3=census-ruling-remote-metrics-nested;basis=main's body (merged origin/main acfa4f80, under main's own census rulings) plus: snapshots the nested layout (snapshotNestedUnits over /sys/fs/cgroup/carlos.slice/carlos-instances.slice) once at start, before the activator, and hands the metrics loop a unitSources struct (stamped units, routeHostNames, that root and the snapshot); reads nothing new itself;rev3=census-ruling-region-ha-p1a;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): wires region HA P1a into the activator: cfg.Record = haRecordFacts(openDeployStore, boxJudge) (the box's lifetime judge this body already builds with newBoxJudge, nil with host claims on; CI fix) and cfg.Self = lease.CurrentSelf; eb.Lifetimes (the process's lifetime index), eb.Registry, eb.StartupSwept (seedSweptAtStart.Load), eb.FilesStore from newProductionFilesStore (now lease.NewFilesStore, rootaws-loaded, a log line on failure) and lease.SetObligationDir(<data>/.ha-owed) (logged on failure; HA acquires then refuse); this body reads nothing new itself, the same five sites; the reads are those units' own (haRecordFacts and lease's SetObligationDir are new rows on this card); merge of origin/main d7ae1d76: main's own later changes to this body are kept as main has them, under main's rulings (census-ruling-remote-instance-metrics: the metricsOwners closure for metricsLoop; census-ruling-edge-asset-cache-3: the +file:Statfs site, assetcache.Statfs handed to the asset ready hook); this branch's change is the same as above;rev3=census-ruling-region-ha-p1b1;basis=region HA P1b-1: builds one termfence.Confirmer (Self from lease.CurrentSelf at each call, EC2 DescribeInstances method only, client from rootaws.LoadDefaultConfig with retries off, built lazily on first use) and sets eb.OwnerTerminated; this body reads nothing new itself, the same six sites;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 7: the startup Sweep literal hands its answer to startupSwept, which logs as before and, only on a clean sweep, marks rootfs admission swept (MarkRootfsSwept); same Sweep call, no read added;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (controller ruling after branch review R1, and Paul's R2 ruling): sets svc.Fleet = fleetWakeFor(os.Getenv, identity, identErr, fleetStore) from the identity it already resolves once and the deployment store the fleet loops already opened, and logs an ERROR naming the identity error when the box is on a fleet with an invalid identity. fleetWakeFor reads CARLOS_REGION and CARLOS_FLEET from the same environment. Read sites unchanged (6). Agent, not root; a platform box is unchanged.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 12: one call more beside armRunsPass, armInteractivePass(svc, reg, rolloutSink, boxJudge), in the same activator Configure hook, handing it the same box judge; fix round 1 (Astra P2, shutdown): after svc.Shutdown(ctx), shutdownInteractive(ctx) ends and joins every interactive session under the same shutdown budget; the worker's own reads are its units' (interactive.go); this body reads nothing new, the same six sites; merge of origin/main 6f1f6ca6: main's svc.Fleet = fleetWakeFor(...) and its invalid-identity ERROR line are kept as main has them (census-ruling-managed-fleets-1b); this branch's change is the same as above; read sites unchanged (6);rev3=census-ruling-fix-set-aside-exdev;basis=set-aside EXDEV fix: one field more on the agent ExecBackend literal, RawInstanceDir: layout.RawInstanceDir (a pure path join: <dataDir>/.instances/<InstanceID(host)>), so the start rule set-aside moves a copy out through the raw directory instead of through the nosymfollow bind; this body reads nothing new, the same six sites;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 3: one more assignment beside eb.FilesStore: eb.EscrowKey = haEscrowKey(os.Getenv("CARLOS_SECRETS_KEY")), the agent's own environment parsed by appconfig.ParsePrivateKey as the moves pass parses it (unset or unparseable: a log line and nil, and HA publication refuses on the box). No path is opened or read, no read site added; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 4: one more goroutine beside configSyncLoop: go escrowLoop(agentCtx, reg, svc), the escrow sweep every 30 s over the same registry and Service. This body reads nothing new itself; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 5: one more call beside eb.EscrowKey: wireRawSecretPages(eb, PageOperator, metricsBoxLabel(os.Getenv, readMachineID())), which sets eb.OnRawSecret to page an operator (alerting.Page through PageOperator, LevelIncident) on its own goroutine with a 20 s timeout; metricsBoxLabel and readMachineID are the reads this body already makes for the moves refusal log; no new read site; the same six sites, offsets moved; B,C,D,F authority retained. Merge of origin/main 90c4d3aa: main's own later changes to this body are kept as main has them, under main's rulings; this branch's change is the same as above. Merge of origin/main 00bf5b8c (fleet set-aside EXDEV fix): main's change to this body is kept as main has it, under its own census ruling; this branch's change is unchanged.;rev3=census-ruling-probe-burst-limit;basis=two more sink wirings beside setAnalyticsSink: setProtectionSink(e.SetProtectionRecordOnly) and setAssetOwnersSource(e.AssetOwners), function values the telemetry pass calls; this body reads nothing new, the same six sites; authority B,C,D,F retained; no new root read or write kind;rev3=census-ruling-region-ha-p1b3a;basis=Arm HA placement exactly once on the existing Service before activatorStart and edges publication, wiring AwakeApps and the PageOperator callback; existing six read sites unchanged, no new root authority.;rev3=census-ruling-stateless-replicas-1;basis=Final review I3: start the concrete coordinator's renewal worker with agent setup; existing closeReplicaCoordinator shutdown cancels and joins it before release. No new read sites or credentials. Merge origin/main c59715e7: retain main's armHAPlacement(svc, PageOperator) wiring beside the existing activator setup; stateless coordinator and shutdown wiring remain. Same read sites; no new root read or credential.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): in the edge-ready callback, calls act.SetHeldWakeHook(e.HeldWake) when act is non-nil (installing the non-blocking wake callback) and stores e.HeldStreamsForStatus in heldStreamsSource. Wiring of in-memory callbacks only; no read added.;rev3=census-ruling-region-ha-p1b3b-t;basis=Wire Service.SetDutyView to the live edge DutySnapshot in the ready callback. No new read; no new loop or cloud operation. B2 wires the registry as the persistent DutyStore before service startup; no new cloud or filesystem path. B3b: arm one journal-backed termination consumer before service startup using agentCtx and the shared confirmer; expose edge tick and join at edge shutdown. No new direct read sites.;rev3=census-ruling-agent-start-demo-1;basis=Passes the existing registry, data store and hibernation prefix into the demo worker, and the existing instance-control client into the demo before-exec hook. No alternate data store or polling loop. Merge resolution against origin/main 9bd45488 retains main's HA departure controller, lifecycle and duty wiring alongside the demo data store and worker; no read site added by the resolution.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: install closed fixed admission before every launch source, bind activator/backend and edge, wire the real termination Started lifecycle and role reader after the change index; close before cancellation/child shutdown. No new external reads or cloud authority. Fix R1: move bind/lifecycle/edge-option wiring into wireAgentAdmission and worker listing into runWorkerBootPassAfterAdmission. Worker boot waits for admission before listing then uses unchanged bounded wakes and per-host serialization; whole Route read moves to the helper. No new storage, cloud, or root execution authority. Preserve merged main's agent wiring and census basis; the branch removes one whole Route use by moving worker iteration to the helper, with no added read kind.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: arms a fleet-only worker using the existing registry, activator, backend and authenticated console transport. Owned worker stops and joins at shutdown. No new bucket reader. merge of origin/main 9b8b2c50: retain HA duty/departure lifecycle, wake-slot and existing agent wiring alongside the replica placement worker; no new read introduced by resolution. merge of origin/main 6be08467: Retain main demo configuration, admission, build and expiry wiring alongside the replica worker; merge-only body change, no additional read. merge of origin/main 7920cccf: Retain main box-role/group admission wiring and boot publication beside the owned replica worker and shutdown; main moves the boot registry List into runWorkerBootPassAfterAdmission, removing its inline whole Route site. No new read introduced by conflict resolution.;rev3=census-ruling-stateless-replicas-3;basis=Task 1 fix round 1 M3: retain the private snapshot source and cancel/join ownership, but use the replica-health-specific retry loop. It logs its first failure only and retains the existing exponential backoff capped at 30 seconds; unsupported builds return nil. Existing five direct read sites unchanged; no new credentials, bucket reader or app lifecycle action. Fix round 1 Q20: publish Edge.ReplicaSnapshots as a separate in-memory status source, leaving the tenant-visible Upstreams source unchanged. No new external reader or authority.;rev3=census-ruling-region-ha-p3b;basis=Load root-written group marker/configuration, configure signed boot binding and agent receipt completer, wire cancellable admission into departure work and expose cached GroupReaderSnapshot. New indirect boot reads use protected root files; agent-owned receipt controls duplicate initial completion only, never root restart permission. Same five direct sites. Merge 45cebde4 retains the replica health socket lifecycle and setReplicaSource beside GroupReaderSnapshot; no extra read beyond main.;rev3=census-ruling-agent-start-demo-2;basis=agent.go:309-329 opens demo-traffic.db beside the operator-configured registry when a demo domain exists, closes it at shutdown and wires drain-before-purge; :1010-1019 shares the worker and write gate; :1164-1177 installs the fleet identity and closed-until-worker serving callback. One added whole Route pass; the new indirect filesystem/SQL reads are claimed in openDemoTraffic and worker/store units. No request chooses the database pathname.;rev3=census-ruling-region-ha-p1b3b-s;basis=Wire the service duty view to authoritative cached sidecar manifest placement in LifetimeIndex and the edge sidecar projection; missing policy denies duty. Existing instance duty wiring remains.;rev3=census-ruling-region-ha-g2-t3;basis=T3a: wire eb.Page = PageOperator beside OwnerTerminated before departures arm, so suspect-holder pages work if departure setup fails; no new read; existing nine sites and authority unchanged; pages through the existing sink. T3b: publish the same backend through an atomic pointer for the metrics observer, and clear it on return; no new external read or authority.;rev3=census-ruling-agent-start-demo-3;basis=Wire the claim activator and root snapshot client into the demo worker; pass moved readiness to status reporting. Census read-site delta: unchanged (9).;rev3=census-ruling-region-ha-g2-fixes;basis=Wire local pool evidence, live withdrawal activator, startup ingress scan and alias publication, and edge lookup; no new direct sites; new indirect record/claim reads use existing store/judge paths described in ingress helpers.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3: starts the existing record-view backstop loop with a departure-inventory listener (non-blocking, coalesced signal) even without an armed RecordView; it requests the existing full pass (backstopFullDue) there. Same nine read sites; no new read or authority.;rev3=census-ruling-region-ha-graceful-terminate-t2;basis=Derive one signal-time deadline with a 90-second budget; cap departure stop and startup/seed/service shutdown joins by it. No read added.;rev3=census-ruling-static-sweep-periodic;basis=in the edge-ready callback, publishes e.LargestStaticTree in staticTreeSource for the disk alert line (diskAlertFrac in the metrics loop); in-memory wiring only, no read added; read sites unchanged (9);rev3=census-ruling-edge-page-cache-1;basis=wires the exec backend's CurrentInputs into the edge cache (wireCurrentInputs) and, in the ready hook after armEdgeAssetCache (whose returned store it now keeps), calls armEdgePageCache, which does nothing unless CARLOS_PAGE_CACHE=1; read sites unchanged (9); no read added;rev3=census-ruling-gvisor-demos;basis=Capture sandbox resolution and refusal once; log errors once; gate route admission and BeforeExec before process launch. No new root read. Task 5: pass the once-captured sandbox effective mode/config error into ExecBackend, UnitBackend and the immutable Client expectation. Same startup environment/registry reads; swapArming declines gVisor before placement. Task 8: arm read-only status projection with the existing Client.SandboxStatus callback. Agent status now queries the existing root /ready endpoint; no new root authority or guest-file input. Merge2 e8a1ddde: retain main wireCurrentInputs and armEdgePageCache through the existing asset-store ready hook alongside branch once-captured sandbox mode, wake gates and root status wiring. No new direct read; main page-cache helpers retain their own census overlays.;rev3=census-ruling-region-ha-held-build;basis=wires the drain state: svc.SetDrainingSource(boxDrain.IsDraining), svc.SetPeerDrainView(e.PeerDraining), e.SetPeerDrainedHook(svc.DropHoldersNaming); in-memory only; no read added; region HA held-requests Task 5: on group members, starts the drain driver over the activator, the edge and boxDrain, and serves its root-only drain socket; no read added beyond the socket's own Branch review r1: the drain state follows the root start fence on group members (the fence reader is the existing fenceLocation.read, a root-owned fixed path); e.SetPeerUndrainedHook(svc.AllowHoldersNaming) beside the drained hook (memory only); the drain socket serves only the agent's own user. No read added.;rev3=census-ruling-security-review-mitigations;basis=Wire the cached operator flat-layout choice into the exec backend's new-resident refusal; no read source added, existing authority retained.;rev3=census-ruling-w6-ingress-drain;basis=agent (user carlos), not root. Builds the ingress drain (newIngressDrain) with arming read at ask time from os.Getenv (CARLOS_REGION_HA, CARLOS_INGRESS_TARGET_GROUPS, both from the root-owned host.env), the fixed admission and lease.CurrentSelf (existing IMDS identity); its reader is awstg.Load, the box role's credentials calling ELB DescribeTargetHealth/DescribeTargetGroupAttributes (new AWS reads, by the agent). Wires admission.closeStartsForIngressDrain, the lbhealth drain condition, ingress.setEdge, and ingress.shutdownStarted in WithShutdownStarted. The drain socket (/run/carlos/.ha-drain/drain.sock, agent-user only, existing) is now also served on a fixed box with the drain configured (was group members only), routing /v1/ingress/* to the ingress drain and the group drain verbs to 404 there. armHADepartures now takes fixtureDepartureGetenv() and MakeQueue fixtureDepartureQueue(), which in a production (non-rootrunner) build are os.Getenv and nil, as before. Read sites unchanged (9).;rev3=census-ruling-stateless-replicas-4-task1;basis=Arms the fleet-only replica swap worker next to the placement worker: same console URL and fleet token as the existing replicaCoordinatorAPI, the existing activator Service; stops and joins at shutdown. No new read site, credential or bucket reader.;rev3=census-ruling-stateless-replicas-4-task2;basis=Task 2: sets deployWorker.step to the rollout scheduler answer for the record permit (replicaStepOf over armedRollout), an in-memory callback; no read site, credential or bucket reader added.;rev3=census-ruling-stateless-replicas-4-task2-fix2;basis=Task 2 fix round 2: the swap worker step is armedReplicaStep, the same lazy scheduler lookup as before as a named function; no read site added.;rev3=census-ruling-stateless-replicas-4-merge-main;basis=Merge of main 5fac2ff1: both sides changed it. Main (01d6ca78, linked-deployments-slice1) starts linkLoop beside tunnelLoop; this branch keeps its replica coordinator wiring. Both kept as-is; no read added.;rev3=census-ruling-stateless-replicas-4-final;basis=#511 final wave item 2: wires the swap worker's drive (armedReplicaDrive, the armed rollout manager's DriveReplicaRelease); no read added;rev3=census-ruling-stateless-replicas-4-merge-main2;basis=Merge of main af871da0 (v0.34.49): both sides changed it. Main (178dcfe5, member-backups-2a) moves the inline duty-view closure into armDutyView/dutyView and starts verifyAssignLoop; its sites drop by registry:Host and whole:Route x2 as main recorded them. This branch keeps its replica coordinator, swap worker and drive wiring. Both kept as-is; no read added.;rev3=census-ruling-stateless-replicas-4-drill3;basis=drill 3 R24: makes one in-memory channel, closes it (once) inside the edge's existing shutdown-started callback after ingress.shutdownStarted, and passes it to tunnelLoop, which drains only a fleet channel name; no read added, same six sites; touches no admission, lease, ingress drain, listener or file; the agent process, no root decision;rev3=census-ruling-edge-ppv2;basis=Agent (uid carlos), not root. memwatchLoop now gets edgeProxyCounters(&demoEdge) (in-process counters, no read). The drain socket's driver is newAgentDrainSocket(ingress, e, os.Getenv), which attaches the edge trust handler only when CARLOS_INGRESS_PROXY_SOURCES in the agent's environment (from the root-owned host.env) parses to a non-empty list; the socket is served when drainSocketServed: a group member or a configured ingress drain (both as before), or a box armed for PROXY protocol (new). The socket's path and agent-user-only permissions are unchanged. Read sites unchanged (6).;rev3=census-ruling-same-box-edge-fence;basis=Agent (uid carlos), not root. One added line: armEdgeFenceStatus(ctl.EdgeFence), beside the existing armExecSandboxStatus, so the layout report can ask root's /ready for the edge fence state over the control socket client the agent already holds. No read added.;rev3=census-ruling-platform-mail-submission;basis=Task 4: sets eb.Mail = mailsubmit.SocketForwarder{} on every box, and eb.MailSwitch to a mailSwitchCache's On that opens the deploy store itself through openDeployStore, retried at most once a minute with an error line until it opens (review round 1, Task 4 P3), armed for the serial-move refresh (armedMailSwitch). Task 6: also sets the ExecBackend's ManifestOf, the same staged-manifest read as TierOf (rt.App and RouteAccount(rt), hence +registry:App and +whole:Route), for the spawn-time check of decision 10, which logs and emits an event and never refuses. Agent, not root. Fable final P2-2: eb.MailSwitch is the cache's State (three-valued: on, off, unknown) in place of On; an unreadable switch is unknown, never off. No read added.;rev3=census-ruling-fleet-drain-followups;basis=P3 (#1008 T9): one call after armChangeIndex, requestBootFullPass(v, &backstopFullDue), which stores true in the existing in-memory backstopFullDue flag only when no record view is armed, so the fast loop runs its existing full pass on its first tick instead of instancesLoop a minute later; armed boxes unchanged. No read added; read sites unchanged (8); agent, not root.;rev3=census-ruling-fleet-first-reconcile-speed;basis=Startup timing log lines only: runDuties builds a step logger (newStartupLog, which reads the in-memory agent start time) and logs one line after the wait on the activator startup latch and after each existing duty before go fastConvergeLoop. One newStartupLog().at line in the edge ready hook before go tunnelLoop. No read added; read sites unchanged (8). Agent, not root.;rev3=census-ruling-ha-1192;basis=sets the group drain driver's departed hook to armedPeerDeparted (the armed departure controller's PeerDeparted: local registry identity + departure journal); no new read;rev3=census-ruling-replica-wake-gap-r3;basis=Calls lease.SetContinuityDir(<data dir>/.continuity) beside the existing obligation store: the agent's own 0700 directory for clean records, outside every instance tree (#1290 round 3). No new read; failure is logged and every start then takes a full image.;rev3=census-ruling-fleet-restart-wake;basis=Fleet restart wake Task 2: cfg.ReplicaRecord = replicaRecordFacts(boxLifetimes, cfg.Record): hands the existing judged record read (haRecordFacts over openDeployStore and boxJudge) as the live read on a lifetime index miss. No read site added here; agent, not root.;rev3=census-ruling-alias-publish-precert-1293;basis=starts edgesFileLoop with one more argument, edgeAcmeDir(os.Getenv, peekAcmeCache(args)): the agent's own -acme-cache flag (already parsed for domainsLoop) or $CARLOS_DATA_DIR/acme; a string computed from the operator's command line and environment, no read. Same 8 read sites.;rev3=census-ruling-console-addr-from-install;basis=publishes the running edge to consoleFleetEdgeSource for the heartbeat; no read added;rev3=census-ruling-instance-ready-before-wake;basis=the agent as carlos: sets svc.ConfigBeforeWake = configBeforeWake(reg, dd, claims.Writes) beside BeforeExec, before Start. Read sites unchanged, offsets moved.;rev3=census-ruling-managed-fleets-2b2;basis=takes RunAgent's one managed/BYO startup decision (decideAgentStartup, made before any fatal group preflight): a managed box gets its join (refused on an identity error or any group configuration: every admission predicate closed, edge/status/probes running, no Fatalf), never reads group configuration and never builds fixedAdmission; a BYO box reads and validates group configuration exactly as on main; binds the join as activator/exec/edge admission; ReconcileConfig.Joining on both provisioning loops; the worker boot pass runs once, at admission; Task 5: appends managedProbeOption(join) to the edge options when it is non-nil (a managed box with a valid root identity); BYO boxes unchanged; no read added; final wave: when runAgent makes the startup decision itself it also arms it (armedAgentStartup), as RunAgent does, so later group-configuration consumers follow it; no read added; merge of origin/main 173c7033: main's edge page cache arming, gVisor demos sandbox capture, region HA drain wiring and the flat-layout refusal wiring, not this branch; merge of origin/main 65951fbb: main's W6 ingress drain, linkLoop, duty view (armDutyView), replica swap worker, PPv2 drain socket, edge fence status, mail forwarder and switch, boot full pass, startup timing, peer departed hook, continuity dir, replica record facts, edges file ACME dir, console fleet edge source and ConfigBeforeWake, not this branch; code-health split: the startup decision fallback, BYO group configuration read and fixed admission build moved to agentAdmissionAtStart, the join binding to managedAdmissionOr, the boot pass branch to agentBootPass and the probe option to appendManagedProbe (managedagent.go), same calls in the same order, no read added;rev3=census-ruling-s3-polling-3;basis=The log and error shipping goroutines move unchanged into startLogLoops (internal/host/logloops.go), which also starts s3meter.LogEvery on the agent's context: an hourly log line of the process's in-memory S3 request counts. Same sinks, same label; adds no read.;rev3=census-ruling-instance-usage;basis=builds the usage meter through newUsageMeter(os.Getenv) (internal/host/instance_usage.go), which reads the env var CARLOS_INSTANCE_USAGE once (the same host.env the agent already reads) and, when it is off, calls m.DisableInstances and logs; runAgent then starts usageLoop with instances=!off so the usage loop arms the per-instance flusher (internal/host/instance_usage.go). The flusher adds one store read (spec section 12): (1) what is read: the box's own count objects usage/instances/<box>/<date>/<account>/<app>.json in the deployment bucket (or a fleet's rebased prefix), by the agent's usage flush, before each conditional write; (2) who writes them: the agent processes of the same box label through this flush; the bucket's * grant lets any platform box write any key, the same exposure as usage/edge/; tenants, apps and their credentials cannot write there, and a fleet box's store door confines it to its fleet's prefix; (3) what is checked: the body parses as v1 and its box, date, account and app match the key (usage.DecodeInstanceDay); anything else stops that object's write, is logged, and leaves the batch queued until the 24h drop horizon; (4) what it decides: only whether a batch is already merged (applied[writer]) and the totals the merge adds to; a forged object can cause an undercount or false totals, and can open, run or follow nothing |
| +- `internal/host/stagerelay.go` `stageRelay.tick`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J1;basis=root-route |
| + |
| +New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff: |
| + |
| +- new `internal/host/stagenew.go:stageNew`: reads +registry:Backing, +registry:Unit, +registry:Version, +whole:Route ×2; written legacy, accepted-legacy, frozen |
| +- new `internal/host/stagenew.go:stageNewFirst`: reads +whole:Route; written legacy, accepted-legacy, frozen |
| + |
| +Seal: `0586b6f6d50249a42fbf72bb02545476c042d1c8a357c91d75432315997ae7a3` → `d57c8e17fe2db097089c9dad5cf108c10d9bd4bf749831a6e32b3f057355b3d9`. |
| + |
| +Overlay: `internal/provision/testdata/plan14-root-reads-stage-spool-1582.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`. |
diff --git a/internal/host/adopt_passsetup.go b/internal/host/adopt_passsetup.go| new file mode 100644 |
| index 000000000..650a59e3d |
| --- /dev/null |
| +++ b/internal/host/adopt_passsetup.go |
| @@ -0,0 +1,101 @@ |
| +package host |
| + |
| +import ( |
| + "crypto/ed25519" |
| + "log" |
| + "os" |
| + |
| + "github.com/carlosframework/platform/internal/caps" |
| + "github.com/carlosframework/platform/internal/hostwrite" |
| + "github.com/carlosframework/platform/internal/registry" |
| + "github.com/carlosframework/platform/internal/release" |
| +) |
| + |
| +// rootPassSetup is what the root adoption pass builds for its release pass: |
| +// D3's proof root (proofroot.go), the root history it opened, and the |
| +// pass's options. Each release pass builds its own, at its own start, and |
| +// closes it after: the stage pass's early pass over new exec instances |
| +// (#1582, stageNewFirst) and the full pass, which builds it where it always |
| +// has, after the capability converge. Nothing built for one is used by the |
| +// other, so each decides its root history requirement when it starts. |
| +type rootPassSetup struct { |
| + pr proofRoot |
| + history *release.RootHistoryPass |
| + // historyErr is configureRootProof's error (the root census unreadable, |
| + // or root history that would not open): logged, as the full pass has |
| + // always logged it before going on. The early pass refuses a setup |
| + // that has one (stageNewFirst). |
| + historyErr error |
| + opts []release.PassOption |
| +} |
| + |
| +// close closes the root history the setup opened, if any. |
| +func (s *rootPassSetup) close() { |
| + if s != nil && s.history != nil { |
| + s.history.History.Store.Close() |
| + } |
| +} |
| + |
| +// rootPassParts are the root pass's own pieces the setup is built from. |
| +type rootPassParts struct { |
| + observer proofObserver |
| + reg *registry.Registry |
| + store release.Store |
| + pub ed25519.PublicKey |
| + hourly bool // carlos-adopt.service: the canary nag, and proofRoot.hourly |
| + checks rootRestartChecks |
| + pins release.PinSource |
| + settled func(registry.Route) error |
| + gate func() error |
| + writes hostwrite.Config |
| + updates []release.RootUpdateOpener |
| +} |
| + |
| +// buildRootPass is RunAdopt's setup, moved here unchanged from its body |
| +// (#1582) so the stage pass's early pass builds the very options and gates |
| +// the full pass does. An error is the root adoption options' (the root |
| +// census unreadable), which ends the full pass, as it always has. |
| +func buildRootPass(p rootPassParts) (*rootPassSetup, error) { |
| + s := &rootPassSetup{pr: proofRoot{ |
| + obs: p.observer, reg: p.reg, store: p.store, bakeDir: dataDir(), |
| + healthyDir: release.RootHealthyDir, policyPath: release.ProofPolicyPath, |
| + readKey: readProvingKey, hourly: p.hourly, logf: log.Printf, |
| + }} |
| + history, err := configureRootProof(&s.pr, p.checks, func() (*release.RootHistoryPass, error) { |
| + return openRootHistory(p.store, release.OptDir()) |
| + }) |
| + if err != nil { |
| + log.Printf("adopt: %v", err) |
| + s.historyErr = err |
| + } else if history != nil { |
| + s.history = history |
| + linkRootHistory(history, p.checks, release.OptDir(), os.Getenv) |
| + } |
| + recovery := productionNamedUnitRecovery(p.store, p.pub, release.OptDir(), p.writes) |
| + recovery.gate = p.gate |
| + opts := []release.PassOption{release.WithRootGenerationPins(p.pins), release.WithCapabilities(productionClaimCapsOps(caps.Ops{}, p.checks.allowLegacy)), release.BakeDir(dataDir()), release.WithRestartAttemptSettled(p.checks.finish), |
| + release.WithRunningVersion(p.checks.runningVersion), |
| + release.WithSelectedRestarts( |
| + managedGateCallback(p.gate, rootSelectedRestart(p.reg, systemdUnits{}, release.OptDir(), os.Getenv, p.settled, p.checks, false)), |
| + managedGateCallback(p.gate, rootSelectedRestart(p.reg, systemdUnits{}, release.OptDir(), os.Getenv, nil, p.checks, true))), |
| + release.WithStartUnit(managedGateErr(p.gate, rootStartRoute(p.reg, release.OptDir(), p.checks))), release.WithHostWrites(p.writes), |
| + release.WithDigestRatchet(pointerRatchet(true, release.OptDir(), dataDir(), os.Getenv)), |
| + release.WithRollbackRestart(managedGateErr(p.gate, rollbackUnitRestart(p.reg, systemdUnits{}, release.OptDir(), os.Getenv, p.checks))), |
| + // D3's gate: a fresh gate per root pass, so the policy file is read |
| + // at the start of this pass (BeginPass) like every other. Healthy |
| + // history is root-owned; diagnostic refusals still use BakeDir. |
| + release.WithProofGate(release.NewRootProofGate(release.ProofPolicyPath, dataDir())), |
| + // Settings spec §4.3: root alone resolves install requests and |
| + // writes /opt/carlos/consumed/<host>, before it stages. |
| + updatesPassOption(dataDir(), true, p.updates...)} |
| + opts, err = rootAdoptionOptions(opts, p.checks, history, func() release.PassOption { return recovery.passOption(p.reg, p.checks, os.Getenv) }) |
| + if err != nil { |
| + s.close() |
| + return nil, err |
| + } |
| + if p.hourly { |
| + opts = append(opts, release.NagExpiredCanaries(os.Stdout)) |
| + } |
| + s.opts = opts |
| + return s, nil |
| +} |
diff --git a/internal/host/agent.go b/internal/host/agent.go| index 9af6cbe4a..9af566614 100644 |
| --- a/internal/host/agent.go |
| +++ b/internal/host/agent.go |
| @@ -876,7 +876,9 @@ func runAgent(args []string, buildClaims ClaimFactory) { |
| if logSink != nil { // a typed nil in the interface would not be nil |
| rolloutSink = logSink |
| } |
| - armRolloutAndRelay(agentCtx, os.Getenv, svc, reg, dd, rolloutSink, openDeployStore) |
| + // With the stage relay on every box (#1582): a stage |
| + // request lost to a running root pass is asked again. |
| + armRolloutAndStageRelay(agentCtx, os.Getenv, svc, reg, dd, rolloutSink, openDeployStore) |
| // The residence-move machinery (issue #331), armed with the |
| // activator: the staging-fallback restore needs a same-region |
| // mirror client, and the move worker needs the service's quiesce |
| @@ -6171,6 +6173,24 @@ func runAdoptUnderRootRelease(args []string, buildClaims ClaimFactory, ensureUni |
| log.Fatalf("adopt: %v", err) |
| } |
| } |
| + // #1582: the stage pass installs and stamps the new exec instances the |
| + // registry has (stageNewFirst: no Backing, no Unit, no Version) before |
| + // the box-wide work below, through a release pass with its own setup, |
| + // the full pass's options built afresh and closed after it. The full |
| + // pass below builds its own, and still follows. |
| + parts := rootPassParts{observer: observer, reg: reg, store: store, pub: pub, hourly: !*stageOnly, checks: restartChecks, |
| + pins: generationPins, settled: settled, gate: managedGate, writes: claims.Writes, updates: updateProviders} |
| + if *stageOnly && !*configOnly { |
| + stageNewFirst(ctx, reg.List, func() (*rootPassSetup, error) { return buildRootPass(parts) }, |
| + func(ctx context.Context, extra func(registry.Route) bool, opts []release.PassOption) error { |
| + // Under the demo admission and pending-output cleanup the |
| + // full pass runs under (adoptPassAround), so a demo app's new |
| + // instance is admitted and staged exactly as it is there. |
| + return adoptPassAround(ctx, *configOnly, *restartOnly, *stageOnly, passLockErr, productionDemoRetentionFor(reg, generationPins), func(demo ...release.PassOption) error { |
| + return release.PassFilter(ctx, reg, store, pub, release.OptDir(), restart, extra, append(slices.Clone(opts), demo...)...) |
| + })() |
| + }, log.Printf) |
| + } |
| // Config sync is optional — inert until CARLOS_SECRETS_KEY is set, the |
| // same convention every other optional loop in this package follows. It |
| // runs before release adoption so a newly adopted route's very first |
| @@ -6230,6 +6250,9 @@ func runAdoptUnderRootRelease(args []string, buildClaims ClaimFactory, ensureUni |
| log.Printf("adopt: capability pass: %v", err) |
| } |
| + // buildRootPass (adopt_passsetup.go) holds the options; these notes are |
| + // about them and still hold. |
| + // |
| // NagExpiredCanaries(os.Stdout) is set HERE ONLY (2026-08-03 review) — the |
| // canary-TTL nag (spec §5) belongs to the hourly root pass |
| // (carlos-adopt.service, this verb's ExecStart), the same split PR #9's |
| @@ -6265,44 +6288,11 @@ func runAdoptUnderRootRelease(args []string, buildClaims ClaimFactory, ensureUni |
| // no-ops on the stopped unit, exits 0, and stamps a build that has never |
| // run). -stage-only keeps it for the same reason it keeps the converge: |
| // a relayed stage is exactly the request that performs such a restart. |
| - pr := proofRoot{ |
| - obs: observer, reg: reg, store: store, bakeDir: dataDir(), |
| - healthyDir: release.RootHealthyDir, policyPath: release.ProofPolicyPath, |
| - readKey: readProvingKey, hourly: !*stageOnly, logf: log.Printf, |
| - } |
| - history, err := configureRootProof(&pr, restartChecks, func() (*release.RootHistoryPass, error) { |
| - return openRootHistory(store, release.OptDir()) |
| - }) |
| - if err != nil { |
| - log.Printf("adopt: %v", err) |
| - } else if history != nil { |
| - defer history.History.Store.Close() |
| - linkRootHistory(history, restartChecks, release.OptDir(), os.Getenv) |
| - } |
| - recovery := productionNamedUnitRecovery(store, pub, release.OptDir(), claims.Writes) |
| - recovery.gate = managedGate |
| - passOpts := []release.PassOption{release.WithRootGenerationPins(generationPins), release.WithCapabilities(productionClaimCapsOps(caps.Ops{}, restartChecks.allowLegacy)), release.BakeDir(dataDir()), release.WithRestartAttemptSettled(restartChecks.finish), |
| - release.WithRunningVersion(restartChecks.runningVersion), |
| - release.WithSelectedRestarts( |
| - managedGateCallback(managedGate, rootSelectedRestart(reg, systemdUnits{}, release.OptDir(), os.Getenv, settled, restartChecks, false)), |
| - managedGateCallback(managedGate, rootSelectedRestart(reg, systemdUnits{}, release.OptDir(), os.Getenv, nil, restartChecks, true))), |
| - release.WithStartUnit(managedGateErr(managedGate, rootStartRoute(reg, release.OptDir(), restartChecks))), release.WithHostWrites(claims.Writes), |
| - release.WithDigestRatchet(pointerRatchet(true, release.OptDir(), dataDir(), os.Getenv)), |
| - release.WithRollbackRestart(managedGateErr(managedGate, rollbackUnitRestart(reg, systemdUnits{}, release.OptDir(), os.Getenv, restartChecks))), |
| - // D3's gate: a fresh gate per root pass, so the policy file is read |
| - // at the start of this pass (BeginPass) like every other. Healthy |
| - // history is root-owned; diagnostic refusals still use BakeDir. |
| - release.WithProofGate(release.NewRootProofGate(release.ProofPolicyPath, dataDir())), |
| - // Settings spec §4.3: root alone resolves install requests and |
| - // writes /opt/carlos/consumed/<host>, before it stages. |
| - updatesPassOption(dataDir(), true, updateProviders...)} |
| - passOpts, err = rootAdoptionOptions(passOpts, restartChecks, history, func() release.PassOption { return recovery.passOption(reg, restartChecks, os.Getenv) }) |
| + setup, err := buildRootPass(parts) |
| if err != nil { |
| return err |
| } |
| - if !*stageOnly { |
| - passOpts = append(passOpts, release.NagExpiredCanaries(os.Stdout)) |
| - } |
| + defer setup.close() |
| // D3 (proofroot.go) wraps the pass. Before it, record every named-unit |
| // route's live build that has run well as healthy, so the build live when |
| // a requirement is switched on is in the history before this pass can |
| @@ -6313,8 +6303,8 @@ func runAdoptUnderRootRelease(args []string, buildClaims ClaimFactory, ensureUni |
| // pending-output cleanup before a demo app's new output is staged, and |
| // retention after a pass that adopted a demo version, or on the hourly |
| // pass. Both only under this pass's lock, held until the pass returns. |
| - passErr := pr.around(ctx, adoptPassAround(ctx, *configOnly, *restartOnly, *stageOnly, passLockErr, productionDemoRetentionFor(reg, generationPins), func(demo ...release.PassOption) error { |
| - return release.Pass(ctx, reg, store, pub, release.OptDir(), restart, append(passOpts, demo...)...) |
| + passErr := setup.pr.around(ctx, adoptPassAround(ctx, *configOnly, *restartOnly, *stageOnly, passLockErr, productionDemoRetentionFor(reg, generationPins), func(demo ...release.PassOption) error { |
| + return release.Pass(ctx, reg, store, pub, release.OptDir(), restart, append(setup.opts, demo...)...) |
| })) |
| if passErr != nil { |
| log.Printf("adopt: %v", passErr) |
diff --git a/internal/host/plan14_constructors_test.go b/internal/host/plan14_constructors_test.go| index 955c4f3ba..7cc7b0353 100644 |
| --- a/internal/host/plan14_constructors_test.go |
| +++ b/internal/host/plan14_constructors_test.go |
| @@ -68,7 +68,9 @@ func TestPlan14ProductionProofConstructors(t *testing.T) { |
| return true |
| }) |
| } |
| - for _, name := range []string{"agent.go", "proofask.go", "heldstage.go", "movespass.go"} { |
| + // adopt_passsetup.go holds the root pass's gate since #1582 split the |
| + // pass options out of agent.go (buildRootPass). |
| + for _, name := range []string{"adopt_passsetup.go", "proofask.go", "heldstage.go", "movespass.go"} { |
| if found[name] != 1 { |
| t.Errorf("%s: trusted constructors = %d", name, found[name]) |
| } |
diff --git a/internal/host/stagenew.go b/internal/host/stagenew.go| new file mode 100644 |
| index 000000000..77d6abd85 |
| --- /dev/null |
| +++ b/internal/host/stagenew.go |
| @@ -0,0 +1,59 @@ |
| +package host |
| + |
| +import ( |
| + "context" |
| + "fmt" |
| + "slices" |
| + |
| + "github.com/carlosframework/platform/internal/registry" |
| + "github.com/carlosframework/platform/internal/release" |
| +) |
| + |
| +// stageNew picks the rows root's stage pass installs before its box-wide |
| +// work (#1582): new instances whose process the activator owns. An |
| +// adoptable instance with no Backing and no Unit (so never a capability |
| +// route) that has no installed Version yet. A unit-backed route keeps the |
| +// full pass's order, config sync before release adoption, so its first |
| +// start sees its env file; an exec route's config is the agent's |
| +// (configBeforeWake). The rows are the registry's, which the full pass |
| +// reads anyway; nothing the agent names elsewhere chooses them. |
| +func stageNew(rt registry.Route) bool { |
| + return release.Adoptable(rt) && rt.Backing == "" && rt.Unit == "" && !release.CapabilityRoute(rt) && rt.Version == "" |
| +} |
| + |
| +// stageNewFirst runs a release pass narrowed to stageNew's rows when the |
| +// registry has any, so a new instance of a build the box already has is |
| +// stamped installed seconds after its record instead of after config sync, |
| +// the restart floor and the capability converge. The pass is PassFilter with |
| +// stageNew as its extra predicate, which PassFilter applies to each route as |
| +// root resolves it, under every gate the full pass applies. |
| +// |
| +// The pass builds its own setup at its start and closes it at its end; |
| +// nothing of it reaches the full pass, which builds its own. A setup that |
| +// fails, or whose root history could not be set up (historyErr, which the |
| +// full pass logs and goes on from, as it always has), runs no early pass. |
| +// Every failure is a line: the full pass follows whatever happens here. |
| +func stageNewFirst(ctx context.Context, list func() ([]registry.Route, error), build func() (*rootPassSetup, error), |
| + pass func(ctx context.Context, extra func(registry.Route) bool, opts []release.PassOption) error, logf func(string, ...any)) { |
| + rows, err := list() |
| + if err != nil { |
| + logf("adopt: new instances first: list routes: %v", err) |
| + return |
| + } |
| + if !slices.ContainsFunc(rows, stageNew) { |
| + return |
| + } |
| + setup, err := build() |
| + if err == nil && setup.historyErr != nil { |
| + err = fmt.Errorf("root history: %w", setup.historyErr) |
| + } |
| + if err != nil { |
| + setup.close() |
| + logf("adopt: new instances first: not run: %v", err) |
| + return |
| + } |
| + defer setup.close() |
| + if err := pass(ctx, stageNew, setup.opts); err != nil { |
| + logf("adopt: new instances first: %v", err) |
| + } |
| +} |
diff --git a/internal/host/stagenew_test.go b/internal/host/stagenew_test.go| new file mode 100644 |
| index 000000000..e4275a0de |
| --- /dev/null |
| +++ b/internal/host/stagenew_test.go |
| @@ -0,0 +1,301 @@ |
| +package host |
| + |
| +import ( |
| + "context" |
| + "errors" |
| + "reflect" |
| + "runtime" |
| + "sort" |
| + "strings" |
| + "testing" |
| + "time" |
| + |
| + "github.com/carlosframework/platform/internal/registry" |
| + "github.com/carlosframework/platform/internal/release" |
| +) |
| + |
| +// pacedRelay is the production pacing on a clock the test moves. |
| +func pacedRelay(now *time.Time, rows map[string]*registry.Route, reads *int, touches *[]time.Time) *stageRelay { |
| + return &stageRelay{pending: map[string]pendingHead{}, |
| + get: func(h string) (*registry.Route, error) { *reads++; return rows[h], nil }, |
| + refused: noRefusal, |
| + touch: func() { *touches = append(*touches, *now) }, |
| + now: func() time.Time { return *now }, |
| + logf: func(string, ...any) {}, |
| + first: relayFirstWait, most: stageRequestEvery, gap: relayFirstWait} |
| +} |
| + |
| +// #1582: a head the agent could not stage is asked for again 2 s after it |
| +// was noted, then after waits that double up to stageRequestEvery, so a |
| +// touch carlos-stage.path dropped while a pass ran is resent seconds after |
| +// that pass, not fifteen. Noting the head again (a loop blocked every tick) |
| +// never holds the asking off, and a head not yet due costs no read. |
| +func TestTheRelayBacksOffPerHead(t *testing.T) { |
| + t.Parallel() |
| + t0 := time.Date(2026, 12, 1, 9, 0, 0, 0, time.UTC) |
| + now := t0 |
| + rows := map[string]*registry.Route{"new.example.com": {Host: "new.example.com"}} |
| + reads := 0 |
| + var touches []time.Time |
| + r := pacedRelay(&now, rows, &reads, &touches) |
| + r.note("new.example.com", "v1") |
| + var want []time.Duration |
| + tickReads := 0 |
| + for s := 0; s <= 60; s++ { |
| + now = t0.Add(time.Duration(s) * time.Second) |
| + r.note("new.example.com", "v1") |
| + before := reads |
| + if !r.tick() { |
| + t.Fatalf("at +%ds the head is not outstanding", s) |
| + } |
| + tickReads += reads - before |
| + } |
| + for _, at := range touches { |
| + want = append(want, at.Sub(t0)) |
| + } |
| + if got := []time.Duration{2 * time.Second, 6 * time.Second, 14 * time.Second, 29 * time.Second, 44 * time.Second, 59 * time.Second}; !reflect.DeepEqual(want, got) { |
| + t.Fatalf("touched at %v, want %v", want, got) |
| + } |
| + if tickReads != len(touches) { |
| + t.Fatalf("%d row reads for %d asks: a head not due was read", tickReads, len(touches)) |
| + } |
| + // Root stamps it: dropped, and never asked for again. |
| + rows["new.example.com"].Version = "v1" |
| + now = now.Add(time.Minute) |
| + if r.tick() || len(touches) != 6 { |
| + t.Fatalf("asked for a head root installed (touches %d)", len(touches)) |
| + } |
| +} |
| + |
| +// However many heads are outstanding, two touches are relayFirstWait apart |
| +// at least, and a due head the gap held back is asked at the next tick it |
| +// may be: held, never dropped. |
| +func TestTheRelayKeepsAGapBetweenTouches(t *testing.T) { |
| + t.Parallel() |
| + t0 := time.Date(2026, 12, 1, 9, 0, 0, 0, time.UTC) |
| + now := t0 |
| + rows := map[string]*registry.Route{"a.example.com": {Host: "a.example.com"}, "b.example.com": {Host: "b.example.com"}} |
| + reads := 0 |
| + var touches []time.Time |
| + r := pacedRelay(&now, rows, &reads, &touches) |
| + r.note("a.example.com", "v1") |
| + now = t0.Add(time.Second) |
| + r.note("b.example.com", "v1") |
| + for s := 0; s <= 5; s++ { |
| + now = t0.Add(time.Duration(s) * time.Second) |
| + r.tick() |
| + } |
| + var at []time.Duration |
| + for _, x := range touches { |
| + at = append(at, x.Sub(t0)) |
| + } |
| + // a due at +2; b due at +3 but held by the gap to +4. |
| + if want := []time.Duration{2 * time.Second, 4 * time.Second}; !reflect.DeepEqual(at, want) { |
| + t.Fatalf("touched at %v, want %v", at, want) |
| + } |
| +} |
| + |
| +// The agent arms the relay on every box, not only with CARLOS_SWAP, with the |
| +// production pacing and a loop that ticks every second. |
| +func TestTheAgentArmsTheStageRelayOnEveryBox(t *testing.T) { |
| + t.Parallel() |
| + body := funcSource(t, "agent.go", "runAgent") |
| + if n := strings.Count(body, "armRolloutAndStageRelay(agentCtx,"); n != 1 || strings.Contains(body, "armRolloutAndRelay(") { |
| + t.Fatalf("runAgent arms through armRolloutAndStageRelay %d times, want once and nothing else", n) |
| + } |
| + arm := funcSource(t, "stagerelay.go", "armRolloutAndStageRelay") |
| + at := sourceAt(t, "armRolloutAndStageRelay", arm) |
| + if !(at("armRolloutAndRelay(") < at("armStageRelay(ctx, reg, dd)")) || strings.Contains(arm, "if ") { |
| + t.Fatalf("armRolloutAndStageRelay must arm the rollout, then the relay, unconditionally: %s", arm) |
| + } |
| + r := newStageRelay(nil, t.TempDir()) |
| + if r.first != relayFirstWait || r.most != stageRequestEvery || r.gap != relayFirstWait || relayFirstWait != 2*time.Second { |
| + t.Fatalf("pacing first %v most %v gap %v, want 2s, %v, 2s", r.first, r.most, r.gap, stageRequestEvery) |
| + } |
| + src := funcSource(t, "stagerelay.go", "armStageRelay") |
| + if !strings.Contains(src, "r.run(ctx, relayTick)") || relayTick != time.Second { |
| + t.Fatalf("armStageRelay does not tick every second: %s", src) |
| + } |
| +} |
| + |
| +// stageNew is the early pass's choice: new instances the activator runs. |
| +func TestStageNewPicksUnstampedExecInstances(t *testing.T) { |
| + t.Parallel() |
| + for _, c := range []struct { |
| + rt registry.Route |
| + want bool |
| + }{ |
| + {registry.Route{Host: "a", Kind: "instance", App: "x"}, true}, |
| + {registry.Route{Host: "a", Kind: "instance", App: "x", Status: "ready", Hibernate: true}, true}, |
| + {registry.Route{Host: "a", Kind: "instance", App: "x", Version: "v1"}, false}, |
| + {registry.Route{Host: "a", Kind: "instance", App: "x", Backing: registry.BackingUnit}, false}, |
| + {registry.Route{Host: "a", Kind: "instance", App: "x", Unit: "console.service"}, false}, |
| + {registry.Route{Host: "a", Kind: "instance", App: "x", Platform: true}, false}, |
| + {registry.Route{Host: "a", Kind: "instance", App: "x", Status: "provisioning"}, false}, |
| + {registry.Route{Host: "a", Kind: "instance"}, false}, |
| + {registry.Route{Host: "a", Kind: "sidecar", App: "x"}, false}, |
| + } { |
| + if got := stageNew(c.rt); got != c.want { |
| + t.Errorf("stageNew(%+v) = %v, want %v", c.rt, got, c.want) |
| + } |
| + } |
| +} |
| + |
| +// stageNewFirst builds a setup only when the registry has a new exec |
| +// instance, runs one pass with stageNew and that setup's options, closes |
| +// it, and runs nothing on a setup that failed or whose root history did. |
| +func TestStageNewFirstBuildsItsOwnSetup(t *testing.T) { |
| + t.Parallel() |
| + rows := []registry.Route{ |
| + {Host: "new.example.com", Kind: "instance", App: "x"}, |
| + {Host: "old.example.com", Kind: "instance", App: "x", Version: "v1"}, |
| + {Host: "unit.example.com", Kind: "instance", App: "x", Backing: registry.BackingUnit}, |
| + } |
| + list := func() ([]registry.Route, error) { return rows, nil } |
| + opt := release.BakeDir("marker") |
| + builds, passes := 0, 0 |
| + var admitted []string |
| + pass := func(_ context.Context, extra func(registry.Route) bool, opts []release.PassOption) error { |
| + passes++ |
| + if len(opts) != 1 || reflect.ValueOf(opts[0]).Pointer() != reflect.ValueOf(opt).Pointer() { |
| + t.Fatalf("the pass got options %v, not its own setup's", opts) |
| + } |
| + for _, rt := range rows { |
| + if extra(rt) { |
| + admitted = append(admitted, rt.Host) |
| + } |
| + } |
| + return errors.New("a failed restart") |
| + } |
| + var lines []string |
| + logf := func(f string, a ...any) { lines = append(lines, f) } |
| + build := func(s *rootPassSetup, err error) func() (*rootPassSetup, error) { |
| + return func() (*rootPassSetup, error) { builds++; return s, err } |
| + } |
| + |
| + stageNewFirst(context.Background(), list, build(&rootPassSetup{opts: []release.PassOption{opt}}, nil), pass, logf) |
| + sort.Strings(admitted) |
| + if builds != 1 || passes != 1 || !reflect.DeepEqual(admitted, []string{"new.example.com"}) || len(lines) != 1 { |
| + t.Fatalf("builds %d passes %d admitted %v lines %v", builds, passes, admitted, lines) |
| + } |
| + |
| + stageNewFirst(context.Background(), func() ([]registry.Route, error) { return rows[1:], nil }, build(&rootPassSetup{}, nil), pass, logf) |
| + if builds != 1 || passes != 1 { |
| + t.Fatal("a setup was built or a pass run with no new exec instance") |
| + } |
| + |
| + stageNewFirst(context.Background(), list, build(nil, errors.New("census unreadable")), pass, logf) |
| + stageNewFirst(context.Background(), list, build(&rootPassSetup{historyErr: errors.New("history"), opts: []release.PassOption{opt}}, nil), pass, logf) |
| + if builds != 3 || passes != 1 || len(lines) != 3 { |
| + t.Fatalf("a failed setup ran a pass: builds %d passes %d lines %v", builds, passes, lines) |
| + } |
| +} |
| + |
| +// End to end over a real release pass: the new exec instance is installed |
| +// and stamped; an exec instance already stamped and a new unit-backed one |
| +// are left to the full pass. |
| +func TestStageNewFirstStampsTheNewInstance(t *testing.T) { |
| + env := newFastFixture(t) |
| + ctx := context.Background() |
| + plat := runtime.GOOS + "-" + runtime.GOARCH |
| + for _, v := range []string{"n0", "n1"} { |
| + m := release.Manifest{App: "newapp", Version: v, Kind: "binary", Artifacts: map[string]release.Artifact{plat: {}}} |
| + if err := release.Ship(ctx, env.store, "bab", m, map[string][]byte{plat: []byte("build " + v)}); err != nil { |
| + t.Fatalf("Ship: %v", err) |
| + } |
| + } |
| + if err := release.Promote(ctx, env.store, env.priv, "bab", "newapp", "edge", "n1"); err != nil { |
| + t.Fatalf("Promote: %v", err) |
| + } |
| + for _, rt := range []registry.Route{ |
| + {Host: "new.newapp.test", Kind: "instance", App: "newapp", Account: "bab", Channel: "edge", Status: "ready"}, |
| + {Host: "old.newapp.test", Kind: "instance", App: "newapp", Account: "bab", Channel: "edge", Status: "ready", Version: "n0"}, |
| + {Host: "unit.newapp.test", Kind: "instance", App: "newapp", Account: "bab", Channel: "edge", Status: "ready", Backing: registry.BackingUnit}, |
| + } { |
| + if err := env.reg.Upsert(rt); err != nil { |
| + t.Fatalf("Upsert %s: %v", rt.Host, err) |
| + } |
| + } |
| + stageNewFirst(ctx, env.reg.List, func() (*rootPassSetup, error) { return &rootPassSetup{}, nil }, |
| + func(ctx context.Context, extra func(registry.Route) bool, opts []release.PassOption) error { |
| + return release.PassFilter(ctx, env.reg, env.store, env.pub, env.optDir, nil, extra, opts...) |
| + }, t.Logf) |
| + for host, want := range map[string]string{"new.newapp.test": "n1", "old.newapp.test": "n0", "unit.newapp.test": ""} { |
| + if rt, err := env.reg.Get(host); err != nil || rt == nil || rt.Version != want { |
| + t.Errorf("%s: row = %+v, %v; want Version %q", host, rt, err, want) |
| + } |
| + } |
| +} |
| + |
| +// The order is #1582's point, and each pass has its own setup: the stage |
| +// pass runs stageNewFirst after the release key is parsed and before config |
| +// sync, the restart floor and the capability converge; the full pass builds |
| +// its own setup after them, as it always did, and is the one around wraps. |
| +func TestStagePassServesNewInstancesFirst(t *testing.T) { |
| + t.Parallel() |
| + body := funcSource(t, "agent.go", "runAdoptUnderRootRelease") |
| + at := sourceAt(t, "runAdoptUnderRootRelease", body) |
| + for s, want := range map[string]int{"stageNewFirst(": 1, "buildRootPass(parts)": 2, "setup, err := buildRootPass(parts)": 1, "setup.opts": 1} { |
| + if n := strings.Count(body, s); n != want { |
| + t.Fatalf("%s appears %d times in runAdoptUnderRootRelease, want %d", s, n, want) |
| + } |
| + } |
| + pub, first := at("release.ParsePublicKey("), at("stageNewFirst(") |
| + sync, caps := at("adoptConfigSync("), at("capabilityPass(") |
| + restart := strings.LastIndex(body, "productionRestartRequestPass(") |
| + full, around := at("setup, err := buildRootPass(parts)"), at("setup.pr.around(") |
| + if !(pub < first && first < sync && first < restart && first < caps && caps < full && full < around) { |
| + t.Fatalf("order: pub %d, first %d, config sync %d, restart floor %d, caps %d, full setup %d, around %d", |
| + pub, first, sync, restart, caps, full, around) |
| + } |
| +} |
| + |
| +// Heads root keeps not answering do not add up: once their waits have grown |
| +// to stageRequestEvery, however many there are, they are asked together at |
| +// most once per stageRequestEvery, as the relay held them before #1582. A |
| +// fresh head is still asked after its own short wait. |
| +func TestStuckHeadsAskTogetherAtMostOncePerWindow(t *testing.T) { |
| + t.Parallel() |
| + t0 := time.Date(2026, 12, 1, 9, 0, 0, 0, time.UTC) |
| + now := t0 |
| + rows := map[string]*registry.Route{} |
| + reads := 0 |
| + var touches []time.Time |
| + r := pacedRelay(&now, rows, &reads, &touches) |
| + for i, h := range []string{"a", "b", "c", "d", "e"} { |
| + now = t0.Add(time.Duration(i*3) * time.Second) |
| + rows[h] = ®istry.Route{Host: h} |
| + r.note(h, "v1") |
| + } |
| + for s := 0; s <= 600; s++ { |
| + now = t0.Add(time.Duration(s) * time.Second) |
| + r.tick() |
| + } |
| + late := 0 |
| + for i := 1; i < len(touches); i++ { |
| + if gap := touches[i].Sub(touches[i-1]); gap < relayFirstWait { |
| + t.Fatalf("touches %v and %v are %v apart", touches[i-1], touches[i], gap) |
| + } |
| + if touches[i].After(t0.Add(2 * time.Minute)) { |
| + if gap := touches[i].Sub(touches[i-1]); gap < stageRequestEvery { |
| + t.Fatalf("stuck heads touched %v apart at %v, want at least %v", gap, touches[i].Sub(t0), stageRequestEvery) |
| + } |
| + late++ |
| + } |
| + } |
| + if late == 0 { |
| + t.Fatal("stuck heads stopped being asked for") |
| + } |
| + // A fresh head among them is asked after its own short wait. |
| + n := len(touches) |
| + rows["f"] = ®istry.Route{Host: "f"} |
| + r.note("f", "v1") |
| + start := now |
| + for s := 1; s <= 3; s++ { |
| + now = start.Add(time.Duration(s) * time.Second) |
| + r.tick() |
| + } |
| + if len(touches) != n+1 { |
| + t.Fatalf("a fresh head among stuck ones was not asked within 3 s (touches %d → %d)", n, len(touches)) |
| + } |
| +} |
diff --git a/internal/host/stagerelay.go b/internal/host/stagerelay.go| index dd37bb6b9..8324309e5 100644 |
| --- a/internal/host/stagerelay.go |
| +++ b/internal/host/stagerelay.go |
| @@ -24,9 +24,18 @@ const relayGiveUp = time.Hour |
| // stageRelay retransmits the stage request (spec §7.7). carlos-stage.path |
| // does not act on a change made while carlos-stage.service is running, so a |
| -// touch that lands mid-pass is lost; this asks again every stageRequestEvery |
| -// until root has recorded an outcome for the head: its stamp shows the head |
| -// installed, or its refusal record names it. Armed only with the flag on. |
| +// touch that lands mid-pass is lost; this asks again until root has recorded |
| +// an outcome for the head: its stamp shows the head installed, or its |
| +// refusal record names it. |
| +// |
| +// Since #1582 it is armed on every box, not only with CARLOS_SWAP, and paces |
| +// each head on its own: first relayFirstWait after the head was noted, then |
| +// each wait twice the last, up to stageRequestEvery, so a touch lost to a |
| +// running pass is asked again a few seconds after the pass ends rather than |
| +// up to fifteen seconds later. Two touches are never closer than |
| +// relayFirstWait whatever the heads, and the old guards stay: heads whose |
| +// waits have grown are asked, together, at most once per stageRequestEvery |
| +// (mayTouch), dropped at root's refusal, and given up on after relayGiveUp. |
| type stageRelay struct { |
| mu sync.Mutex |
| pending map[string]pendingHead // host -> the channel head a pass could not stage |
| @@ -39,8 +48,20 @@ type stageRelay struct { |
| // log.Printf. They are seams for the give-up. |
| now func() time.Time |
| logf func(format string, args ...any) |
| + // first, most and gap pace the asking (#1582): a head is first due |
| + // first after it is noted, each later wait doubles up to most, and two |
| + // touches are at least gap apart. All zero (a relay built without |
| + // them) asks for every outstanding head at every tick. |
| + first, most, gap time.Duration |
| + lastTouch time.Time // guarded by mu |
| } |
| +// The production pacing (newStageRelay) and the loop's tick. |
| +const ( |
| + relayFirstWait = 2 * time.Second |
| + relayTick = time.Second |
| +) |
| + |
| func (r *stageRelay) clock() time.Time { |
| if r.now != nil { |
| return r.now() |
| @@ -68,6 +89,11 @@ type pendingHead struct { |
| // since is when the relay first noted this head: relayGiveUp counts |
| // from it. A head noted again keeps it; a newer head starts its own. |
| since time.Time |
| + // next is when the head is next due to be asked for, and wait the |
| + // last wait (#1582). A head noted again keeps both, so a loop that |
| + // notes it every tick cannot hold its asking off. |
| + next time.Time |
| + wait time.Duration |
| } |
| // installed is the host's installed Version as of now: ok is false when the |
| @@ -99,7 +125,8 @@ func (r *stageRelay) note(host, ver string) { |
| } |
| return |
| } |
| - r.pending[host] = pendingHead{ver: ver, base: base, baseSet: ok, since: r.clock()} |
| + now := r.clock() |
| + r.pending[host] = pendingHead{ver: ver, base: base, baseSet: ok, since: now, next: now.Add(r.first), wait: r.first} |
| } |
| // tick touches the marker once if any head is still outstanding. A head is |
| @@ -119,7 +146,9 @@ func (r *stageRelay) tick() bool { |
| snap[h] = p |
| } |
| r.mu.Unlock() |
| + now := r.clock() |
| outstanding := false |
| + var due []string // outstanding heads whose wait is over |
| for host, p := range snap { |
| if waited := r.clock().Sub(p.since); waited >= relayGiveUp { |
| r.mu.Lock() |
| @@ -134,9 +163,16 @@ func (r *stageRelay) tick() bool { |
| } |
| continue |
| } |
| + if now.Before(p.next) { |
| + // Not due: asked recently enough. No outcome is read for it |
| + // until it is, so a head waiting costs nothing. |
| + outstanding = true |
| + continue |
| + } |
| rt, err := r.get(host) |
| if err != nil { |
| outstanding = true |
| + due = append(due, host) |
| continue |
| } |
| done := rt == nil || rt.Version == p.ver |
| @@ -156,6 +192,7 @@ func (r *stageRelay) tick() bool { |
| rec, rerr := r.refused(host) |
| if rerr != nil { |
| outstanding = true |
| + due = append(due, host) |
| continue |
| } |
| done = rec != nil && rec.Version == p.ver |
| @@ -169,13 +206,51 @@ func (r *stageRelay) tick() bool { |
| continue |
| } |
| outstanding = true |
| + due = append(due, host) |
| } |
| - if outstanding { |
| + if len(due) > 0 && r.mayTouch(now, due, snap) { |
| r.touch() |
| + r.asked(due, snap, now) |
| } |
| return outstanding |
| } |
| +// mayTouch reports whether a touch may go now, and if so counts it. Since |
| +// the last touch, at least gap must have passed, and at least the shortest |
| +// wait among the due heads: one fresh head is asked again after its own |
| +// short wait, while heads root keeps not answering, whose waits have grown |
| +// to stageRequestEvery, start no more than one root pass in that window |
| +// together, as the relay always held them to. |
| +func (r *stageRelay) mayTouch(now time.Time, due []string, snap map[string]pendingHead) bool { |
| + need := snap[due[0]].wait |
| + for _, host := range due[1:] { |
| + need = min(need, snap[host].wait) |
| + } |
| + r.mu.Lock() |
| + defer r.mu.Unlock() |
| + if !r.lastTouch.IsZero() && now.Sub(r.lastTouch) < max(r.gap, need) { |
| + return false |
| + } |
| + r.lastTouch = now |
| + return true |
| +} |
| + |
| +// asked moves each due head's next ask on by twice its last wait, up to |
| +// most. A head replaced or dropped since the snapshot is left as it is. |
| +func (r *stageRelay) asked(due []string, snap map[string]pendingHead, now time.Time) { |
| + r.mu.Lock() |
| + defer r.mu.Unlock() |
| + for _, host := range due { |
| + cur, ok := r.pending[host] |
| + if !ok || cur.ver != snap[host].ver || !cur.since.Equal(snap[host].since) { |
| + continue |
| + } |
| + cur.wait = min(2*cur.wait, r.most) |
| + cur.next = now.Add(cur.wait) |
| + r.pending[host] = cur |
| + } |
| +} |
| + |
| // run ticks every interval until ctx ends. It is its own goroutine's body, so |
| // a slow registry read delays the next retransmission and nothing else. |
| func (r *stageRelay) run(ctx context.Context, every time.Duration) { |
| @@ -191,8 +266,9 @@ func (r *stageRelay) run(ctx context.Context, every time.Duration) { |
| } |
| } |
| -// armedStageRelay is the relay stageRequester feeds; nil while the rollout |
| -// is not armed, which leaves stageRequester exactly as it was. |
| +// armedStageRelay is the relay stageRequester feeds; nil until the agent |
| +// arms it with its activator (#1582: on every box), and nil in tests that |
| +// do not arm one, which leaves stageRequester exactly as it was. |
| var armedStageRelay atomic.Pointer[stageRelay] |
| // newStageRelay is the relay over root's real records: the registry's stamp |
| @@ -200,20 +276,28 @@ var armedStageRelay atomic.Pointer[stageRelay] |
| func newStageRelay(reg *registry.Registry, dd string) *stageRelay { |
| return &stageRelay{pending: map[string]pendingHead{}, get: reg.Get, |
| refused: func(host string) (*release.Refusal, error) { return release.ReadRefusal(dd, host) }, |
| - touch: func() { touchStageMarker(dd) }} |
| + touch: func() { touchStageMarker(dd) }, |
| + first: relayFirstWait, most: stageRequestEvery, gap: relayFirstWait} |
| } |
| // armStageRelay starts the retransmission loop; it ends with ctx. |
| func armStageRelay(ctx context.Context, reg *registry.Registry, dd string) { |
| r := newStageRelay(reg, dd) |
| armedStageRelay.Store(r) |
| - go r.run(ctx, stageRequestEvery) |
| + go r.run(ctx, relayTick) |
| } |
| -// armRolloutAndRelay arms the scheduler and, only when it armed, the stage |
| -// relay (spec §7.7): a stage touch lost to a running root pass is asked |
| -// again. With CARLOS_SWAP off armedStageRelay stays nil and the stage path is |
| -// byte-for-byte what it was. |
| +// armRolloutAndStageRelay is the agent's arming (runAgent): the scheduler |
| +// through armRolloutAndRelay, then the stage relay, on every box (#1582). |
| +func armRolloutAndStageRelay(ctx context.Context, getenv func(string) string, svc *activator.Service, reg *registry.Registry, dd string, |
| + sink activator.EventSink, openStore func(context.Context) (release.Store, error)) { |
| + armRolloutAndRelay(ctx, getenv, svc, reg, dd, sink, openStore) |
| + armStageRelay(ctx, reg, dd) |
| +} |
| + |
| +// armRolloutAndRelay arms the scheduler. The stage relay (spec §7.7), which |
| +// it also armed when the scheduler armed, is armed on every box since #1582 |
| +// by armRolloutAndStageRelay, after this; this arms no relay. |
| func armRolloutAndRelay(ctx context.Context, getenv func(string) string, svc *activator.Service, reg *registry.Registry, dd string, |
| sink activator.EventSink, openStore func(context.Context) (release.Store, error)) *rollout.Manager { |
| m := armRollout(ctx, getenv, svc, reg, dd, sink, openStore) |
| @@ -223,8 +307,5 @@ func armRolloutAndRelay(ctx context.Context, getenv func(string) string, svc *ac |
| svc.MarkReplicaRelease, svc.ReplicaReleaseMark = book.MarkReplicaRelease, book.ReplicaReleaseMark |
| } |
| } |
| - if m != nil { |
| - armStageRelay(ctx, reg, dd) |
| - } |
| return m |
| } |
diff --git a/internal/host/stagerelay_test.go b/internal/host/stagerelay_test.go| index 01ea7e545..8ce9c63e9 100644 |
| --- a/internal/host/stagerelay_test.go |
| +++ b/internal/host/stagerelay_test.go |
| @@ -229,7 +229,10 @@ func TestArmStageRelayReadsRootsRecords(t *testing.T) { |
| t.Fatalf("seed a route: %v", err) |
| } |
| r := newStageRelay(reg, dd) |
| + now := time.Date(2026, 12, 1, 9, 0, 0, 0, time.UTC) |
| + r.now = func() time.Time { return now } |
| r.note("a.example.com", "v2") |
| + now = now.Add(relayFirstWait) // #1582: first due relayFirstWait after the note |
| if !r.tick() { |
| t.Fatal("an uninstalled, unrefused head must be outstanding") |
| } |
| @@ -239,6 +242,7 @@ func TestArmStageRelayReadsRootsRecords(t *testing.T) { |
| if err := release.WriteRefusal(dd, release.Refusal{Schema: 1, Host: "a.example.com", Version: "v2", Kind: release.RefusalNotProven}); err != nil { |
| t.Fatal(err) |
| } |
| + now = now.Add(stageRequestEvery) // past the next wait, so the head is read again |
| if r.tick() { |
| t.Fatal("kept asking after root wrote a refusal for the head") |
| } |
| @@ -261,9 +265,9 @@ func TestTheMovesRequesterDoesNotFeedTheRelay(t *testing.T) { |
| } |
| } |
| -// The flag-off guarantee lives on armedStageRelay staying nil: runAgent arms |
| -// the relay through armRolloutAndRelay, and with CARLOS_SWAP unset it must |
| -// leave nothing armed. |
| +// armRolloutAndRelay arms no relay with CARLOS_SWAP unset (nor set, since |
| +// #1582): the agent arms the relay itself on every box |
| +// (TestTheAgentArmsTheStageRelayOnEveryBox). |
| func TestTheFlagOffLeavesTheStageRelayUnarmed(t *testing.T) { |
| armedStageRelay.Store(nil) |
| svc, reg, dd := rolloutFixture(t, false) |
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv| index f02987cbd..04d0d9566 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-chain.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-chain.tsv |
| @@ -324,3 +324,4 @@ plan14-root-reads-sec-h3-m6-leftover-host.tsv 8e42c8ece77bba4ec895af4d7cae0aa80a |
| plan14-root-reads-sec-h2-flat-tier.tsv 161480ee42d34728c5aed23cb86d36aa5651ed915b43d28eb659f84d7702e897 |
| plan14-root-reads-demo-disk-slice1-retention.tsv 0586b6f6d50249a42fbf72bb02545476c042d1c8a357c91d75432315997ae7a3 |
| plan14-root-reads-edge-miss-refresh.tsv 0586b6f6d50249a42fbf72bb02545476c042d1c8a357c91d75432315997ae7a3 |
| +plan14-root-reads-stage-spool-1582.tsv d57c8e17fe2db097089c9dad5cf108c10d9bd4bf749831a6e32b3f057355b3d9 |
diff --git a/internal/provision/testdata/plan14-root-reads-stage-spool-1582.tsv b/internal/provision/testdata/plan14-root-reads-stage-spool-1582.tsv| new file mode 100644 |
| index 000000000..dc7e1ec97 |
| --- /dev/null |
| +++ b/internal/provision/testdata/plan14-root-reads-stage-spool-1582.tsv |
| @@ -0,0 +1,12 @@ |
| +# Census overlay stage-spool-1582, written by census-propose (#369). census-ruling-stage-spool-1582, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-stage-spool-1582.md. |
| +# 3 body, 0 sites, 1 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +# 2 new dispositions: 0 reads re-frozen at their disposition with the claim, 2 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other. |
| +@legacy 3886e6ee70e6136c03310a757eb8b5ac2fa435315469874463ec480f8c0d3500 internal/host/stagerelay.go stageRelay.tick legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-stage-spool-1582;basis=#1582: agent-side only (carlos-edge.service, never root): paces each pending head (first ask 2 s after the note, waits doubling to stageRequestEvery; touches at least 2 s and the shortest due wait apart, so stuck heads together touch at most once per stageRequestEvery) and reads a head's row and refusal record only when due; accepted outcomes unchanged; still only touches the existing marker <data>/stage-requested; read sites unchanged registry:Version@1097,registry:Version@1332,registry:Version@1427,whole:Route@1084 b8fed6c6714bfc3677f20d59a20f35f28d056e3d6f4b9caa8194691f3bd2eca7 |
| +@legacy 00859f7271e76b1a6db0f926c2d155fa463aaea140ac0f4b91269a9b516c0ab5 internal/host/stagenew.go stageNew legacy accepted-legacy accepted-legacy;rev3=census-ruling-stage-spool-1582;basis=#1582: new, root's -stage-only pass: a predicate over the registry Route it is handed (Adoptable, Backing, Unit, CapabilityRoute, Version): new exec instances; no file, bucket or command input registry:Backing@73,registry:Unit@93,registry:Version@142,whole:Route@135,whole:Route@66 40295eff3e607602ca0b84940f51ee8291f7360498c3489ae7cd0858edd3d664 |
| +@legacy d47563584c5c29de914b3c8baf1c78f075b4075d264e222b9091c250a5924157 internal/host/stagenew.go stageNewFirst legacy accepted-legacy accepted-legacy;rev3=census-ruling-stage-spool-1582;basis=#1582: new, root's -stage-only pass: lists the registry root already reads (reg.List), and only when a stageNew row exists builds its own pass setup (buildRootPass, the full pass's options), refuses to run on a setup or root-history error, and runs release.PassFilter with stageNew as the extra predicate, under every gate the full pass applies; closes its setup; no read of any agent-writable path whole:Route@379 bdf1297cb6a7e0e2c78ba42ed52c13a1924f416b5e7fab78c0016137f5973ba6 |
| +internal/host/agent.go runAdoptUnderRootRelease authority B3,E1,E2,E3 rev3=census-ruling-self-serve-moves-1;basis=root claim/adopt/update controller uid 0: builds root's lifetime judge once from the host-claim switch and hands it to both productionRestartRequestPass calls; read sites unchanged, offsets moved; the preceding B3,E1,E2,E3 classification retained;rev3=census-ruling-claims-cleanup-r1;basis=claims cleanup R1: the claims shutdown timeout is the host constant claimsShutdownLimit (120s) instead of hostbox.RequestLimit (120s); no read added or changed;rev3=census-ruling-named-unit-delivery-114;basis=config sync is appconfig.SyncUnits with productionUnitOps (drop-in root /etc/systemd/system, base dir /etc/carlos/units, the declaration file /etc/carlos/named-units.json, systemctl probe/reload/restart, the config flock); no proof binding and no bucket read for delivery (Paul's ruling on #114: a root-owned declaration decides); the comment at the restart callback rewritten; read sites unchanged;rev3=census-ruling-sr-followups;basis=#966 census fix: the SyncUnits ack callback is configAckRootFunc(ctx, store) instead of configAckFunc(ctx, store, "adopt"). configAckRootFunc (new, agent.go): on a box with a bucket or dir (doorFleet empty: no fleet identity, or CARLOS_DEPLOYMENT_BUCKET or CARLOS_DEPLOYMENT_DIR set in the process environment) it returns configAckFunc(ctx, store, "adopt"), the same callback as before #966 (platform-root key, read-then-CAS). On a door box it writes each ack through appconfig.ReplaceConfigAckBlind (new, configack.go) under NewPrefixStore(store, "fleets/<fleet>/"): s.Delete(key) then a create-only s.Put(key, body, ""), returning only errors, which are logged. THE ROOT PASS NO LONGER READS THE FLEET CORNER: it sends exactly DELETE and PUT for fleets/<F>/control/config-ack/<label>/<host>.json and no GET, Open or HEAD of any fleet key; it inspects no body, ETag or listing. Reads only the process environment (doorFleet, BoxLabel), as configAckFunc did. Read sites unchanged;rev3=census-ruling-named-units-param-114;basis=named-units-param-114 Task 4/5: after the restart-only return, calls runNamedUnitsStep, which runs adoptNamedUnitsStep (root reads its own IMDSv2 identity; ssm:GetParameter of /carlos/host/named-units/<instance-id> in that region, operator-written, box role read-only; trusted rootstate reads of /etc/carlos/named-units.json, the console guard marker, root's rollback journal and root history; installs under the config-sync flock), logs, and writes writeNamedUnitsStatus (public root store /var/lib/carlos-named-units), all before ParsePublicKey; config sync moved into adoptConfigSync with a second status write; no input a tenant, app or box agent can write selects the parameter or authorises the install; read sites unchanged;rev3=census-ruling-console-addr-from-install;basis=calls adoptConsoleFleetStep after the named-units step, never fatal (spec §4); no read added here;rev3=census-ruling-managed-fleets-2b2;basis=builds managedRootGate("/") (root's RootAdmission: identity + root 0700 admission files, re-verified) and wraps the round-1 start/selected-restart/rollback callbacks, SyncUnits' UnitOps.Restart and named-unit recovery with it; BYO answers admitted, so nothing changes there; merge of origin/main 65951fbb: main's configAckRootFunc ack, the named-units step (runNamedUnitsStep) with adoptConfigSync, and adoptConsoleFleetStep, not this branch; resolution: adoptConfigSync is handed managedGatedUnitOps(managedGate, productionUnitOps(...)), so SyncUnits' UnitOps.Restart keeps root's gate;rev3=census-ruling-demo-disk-slice1-retention;basis=demo disk bound slice 1, fix round 3: release.Pass runs inside adoptPassAround(ctx, configOnly, restartOnly, stageOnly, passLockErr, productionDemoRetentionFor(reg, generationPins), pass), still inside pr.around and under the adopt pass lock taken at the top; pass now receives two demo options, release.WithRouteAdmission(admitRoute) and release.WithBeforeStage(beforeStage). adoptPassRetention composes mode and lock (nil on -config-only/-restart-only, which also return before this line; locked = passLockErr == nil; hourly = !stageOnly). Witnessed through adoptPassAround around a real release.Pass (TestAdoptPassAroundGatesDemoAdoptionOnTheLock). No read added in this unit; read sites unchanged;rev3=census-ruling-stage-spool-1582;basis=#1582: on -stage-only (not -config-only), after ParsePublicKey and before adoptConfigSync, the restart-request floor and capabilityPass, calls stageNewFirst with reg.List (the registry this pass already reads) and a builder of its own setup; its narrowed PassFilter runs under the same adoptPassAround demo admission and pending-output cleanup as the full pass. The full pass's option block moved unchanged into buildRootPass (adopt_passsetup.go); the full pass builds its own fresh setup at the same place as before, logs a configureRootProof error and returns a rootAdoptionOptions error exactly as before, and setup.pr.around/adoptPassAround/release.Pass use it. Nothing built for the early pass reaches the full pass. No read of any agent-writable path added; read sites unchanged whole:Route@13906,whole:Route@19576,whole:Route@19612,whole:Route@8743 f5012dfd98521da366331d64c9b02355c62c9f45bffb6607330929573622e8d0 |
| +internal/host/agent.go runAgent authority B,C,D,F rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): builds the box's lifetime judge once (newBoxJudge, nil with host claims on) and hands it to the seed placement, the moves and runs workers and every loop it starts; read sites unchanged, offsets moved; B,C,D,F authority retained; self-serve moves 1 Task 8: derives the box's lifetimes switch from the judge once (lifetimes := boxJudge != nil) and hands it to the edges file loop; read sites unchanged, offsets moved;rev3=census-ruling-plans-4d-lapse;basis=arms two more plans hooks from the same snapshot: e.SetPlanDisabledFor(planDisabledFor) beside SetPlanGovernedFor, and svc.SetDisabledFor(planDisabledRoute) beside SetMaxRunFor (plans 4d); the reads live in those units (plans-4d-units decision); read sites unchanged, offsets moved;rev3=census-ruling-rootfs-apps-2;basis=main's body as of the merge of origin/main 9b81d97b (with main's plan rate ceiling, edge request records, regional box names, self-serve moves plan 1, plans 4d-1 lapse and its other later changes under main's own census rulings) plus the rootfs placement wiring in the activator start: an agentRootfs built from eb.NestedOK, CARLOS_DEPLOYMENT_SINGLE_TENANT, CARLOS_POOLS, the claim flag, swapArming's answer, the control client's /ready/rootfs and, on a fleet box whose identity resolved, fleetOwnerCheck over the deploy store main already opens for the fleet label (fleetStore), then arm and armedRootfs.Store; this body reads nothing new itself; the closures it wires read later, at a rootfs wake and each status tick: GET /ready/rootfs over the control socket, NestedOK's checks, and release.FleetOwnerKey for the judged row's own account and this box's fleet from the deploy store;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Tasks 7 and 11, #329 plan 3 Task 7 and plan 1 Task 7's policy cache: the control client is built once and handed to eb.Control, to the status tick (egressStatus) and to a new egressNudgeLoop goroutine; armSizeSource(svc, "/sys/fs/cgroup") after the activator Service; armPolicyCache() after armChangeIndex; statusLoop takes egressStatus. The reads are those units' own (decision rows); this body reads nothing new: the same five sites, offsets moved, in the agent; B,C,D,F authority retained.;rev3=census-ruling-remote-instance-metrics;basis=builds the metrics loop's owners closure (metricsOwners over the agent's registry, the activator and cgm.Leftover) when an activator exists and hands it to metricsLoop; reads nothing new itself;rev3=census-ruling-edge-asset-cache-3;basis=adds file:Statfs. runAgent keeps its authority (B,C,D,F). The new site is assetcache.Statfs, an exported assetcache.FS interface value (var Statfs FS = statfsFS{}), not a function value and not a call in runAgent: the ready hook passes it to armEdgeAssetCache as the store's filesystem, and armEdgeAssetCache calls its Space method on the configured data directory (dataDir(): $CARLOS_DATA_DIR, else /data), which calls unix.Statfs there (statfsFS.Space, accepted legacy at census-ruling-edge-asset-cache-2). No request-supplied pathname reaches it.;rev3=census-ruling-remote-metrics-nested;basis=main's body (merged origin/main acfa4f80, under main's own census rulings) plus: snapshots the nested layout (snapshotNestedUnits over /sys/fs/cgroup/carlos.slice/carlos-instances.slice) once at start, before the activator, and hands the metrics loop a unitSources struct (stamped units, routeHostNames, that root and the snapshot); reads nothing new itself;rev3=census-ruling-region-ha-p1a;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): wires region HA P1a into the activator: cfg.Record = haRecordFacts(openDeployStore, boxJudge) (the box's lifetime judge this body already builds with newBoxJudge, nil with host claims on; CI fix) and cfg.Self = lease.CurrentSelf; eb.Lifetimes (the process's lifetime index), eb.Registry, eb.StartupSwept (seedSweptAtStart.Load), eb.FilesStore from newProductionFilesStore (now lease.NewFilesStore, rootaws-loaded, a log line on failure) and lease.SetObligationDir(<data>/.ha-owed) (logged on failure; HA acquires then refuse); this body reads nothing new itself, the same five sites; the reads are those units' own (haRecordFacts and lease's SetObligationDir are new rows on this card); merge of origin/main d7ae1d76: main's own later changes to this body are kept as main has them, under main's rulings (census-ruling-remote-instance-metrics: the metricsOwners closure for metricsLoop; census-ruling-edge-asset-cache-3: the +file:Statfs site, assetcache.Statfs handed to the asset ready hook); this branch's change is the same as above;rev3=census-ruling-region-ha-p1b1;basis=region HA P1b-1: builds one termfence.Confirmer (Self from lease.CurrentSelf at each call, EC2 DescribeInstances method only, client from rootaws.LoadDefaultConfig with retries off, built lazily on first use) and sets eb.OwnerTerminated; this body reads nothing new itself, the same six sites;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 7: the startup Sweep literal hands its answer to startupSwept, which logs as before and, only on a clean sweep, marks rootfs admission swept (MarkRootfsSwept); same Sweep call, no read added;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (controller ruling after branch review R1, and Paul's R2 ruling): sets svc.Fleet = fleetWakeFor(os.Getenv, identity, identErr, fleetStore) from the identity it already resolves once and the deployment store the fleet loops already opened, and logs an ERROR naming the identity error when the box is on a fleet with an invalid identity. fleetWakeFor reads CARLOS_REGION and CARLOS_FLEET from the same environment. Read sites unchanged (6). Agent, not root; a platform box is unchanged.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 12: one call more beside armRunsPass, armInteractivePass(svc, reg, rolloutSink, boxJudge), in the same activator Configure hook, handing it the same box judge; fix round 1 (Astra P2, shutdown): after svc.Shutdown(ctx), shutdownInteractive(ctx) ends and joins every interactive session under the same shutdown budget; the worker's own reads are its units' (interactive.go); this body reads nothing new, the same six sites; merge of origin/main 6f1f6ca6: main's svc.Fleet = fleetWakeFor(...) and its invalid-identity ERROR line are kept as main has them (census-ruling-managed-fleets-1b); this branch's change is the same as above; read sites unchanged (6);rev3=census-ruling-fix-set-aside-exdev;basis=set-aside EXDEV fix: one field more on the agent ExecBackend literal, RawInstanceDir: layout.RawInstanceDir (a pure path join: <dataDir>/.instances/<InstanceID(host)>), so the start rule set-aside moves a copy out through the raw directory instead of through the nosymfollow bind; this body reads nothing new, the same six sites;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 3: one more assignment beside eb.FilesStore: eb.EscrowKey = haEscrowKey(os.Getenv("CARLOS_SECRETS_KEY")), the agent's own environment parsed by appconfig.ParsePrivateKey as the moves pass parses it (unset or unparseable: a log line and nil, and HA publication refuses on the box). No path is opened or read, no read site added; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 4: one more goroutine beside configSyncLoop: go escrowLoop(agentCtx, reg, svc), the escrow sweep every 30 s over the same registry and Service. This body reads nothing new itself; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 5: one more call beside eb.EscrowKey: wireRawSecretPages(eb, PageOperator, metricsBoxLabel(os.Getenv, readMachineID())), which sets eb.OnRawSecret to page an operator (alerting.Page through PageOperator, LevelIncident) on its own goroutine with a 20 s timeout; metricsBoxLabel and readMachineID are the reads this body already makes for the moves refusal log; no new read site; the same six sites, offsets moved; B,C,D,F authority retained. Merge of origin/main 90c4d3aa: main's own later changes to this body are kept as main has them, under main's rulings; this branch's change is the same as above. Merge of origin/main 00bf5b8c (fleet set-aside EXDEV fix): main's change to this body is kept as main has it, under its own census ruling; this branch's change is unchanged.;rev3=census-ruling-probe-burst-limit;basis=two more sink wirings beside setAnalyticsSink: setProtectionSink(e.SetProtectionRecordOnly) and setAssetOwnersSource(e.AssetOwners), function values the telemetry pass calls; this body reads nothing new, the same six sites; authority B,C,D,F retained; no new root read or write kind;rev3=census-ruling-region-ha-p1b3a;basis=Arm HA placement exactly once on the existing Service before activatorStart and edges publication, wiring AwakeApps and the PageOperator callback; existing six read sites unchanged, no new root authority.;rev3=census-ruling-stateless-replicas-1;basis=Final review I3: start the concrete coordinator's renewal worker with agent setup; existing closeReplicaCoordinator shutdown cancels and joins it before release. No new read sites or credentials. Merge origin/main c59715e7: retain main's armHAPlacement(svc, PageOperator) wiring beside the existing activator setup; stateless coordinator and shutdown wiring remain. Same read sites; no new root read or credential.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): in the edge-ready callback, calls act.SetHeldWakeHook(e.HeldWake) when act is non-nil (installing the non-blocking wake callback) and stores e.HeldStreamsForStatus in heldStreamsSource. Wiring of in-memory callbacks only; no read added.;rev3=census-ruling-region-ha-p1b3b-t;basis=Wire Service.SetDutyView to the live edge DutySnapshot in the ready callback. No new read; no new loop or cloud operation. B2 wires the registry as the persistent DutyStore before service startup; no new cloud or filesystem path. B3b: arm one journal-backed termination consumer before service startup using agentCtx and the shared confirmer; expose edge tick and join at edge shutdown. No new direct read sites.;rev3=census-ruling-agent-start-demo-1;basis=Passes the existing registry, data store and hibernation prefix into the demo worker, and the existing instance-control client into the demo before-exec hook. No alternate data store or polling loop. Merge resolution against origin/main 9bd45488 retains main's HA departure controller, lifecycle and duty wiring alongside the demo data store and worker; no read site added by the resolution.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: install closed fixed admission before every launch source, bind activator/backend and edge, wire the real termination Started lifecycle and role reader after the change index; close before cancellation/child shutdown. No new external reads or cloud authority. Fix R1: move bind/lifecycle/edge-option wiring into wireAgentAdmission and worker listing into runWorkerBootPassAfterAdmission. Worker boot waits for admission before listing then uses unchanged bounded wakes and per-host serialization; whole Route read moves to the helper. No new storage, cloud, or root execution authority. Preserve merged main's agent wiring and census basis; the branch removes one whole Route use by moving worker iteration to the helper, with no added read kind.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: arms a fleet-only worker using the existing registry, activator, backend and authenticated console transport. Owned worker stops and joins at shutdown. No new bucket reader. merge of origin/main 9b8b2c50: retain HA duty/departure lifecycle, wake-slot and existing agent wiring alongside the replica placement worker; no new read introduced by resolution. merge of origin/main 6be08467: Retain main demo configuration, admission, build and expiry wiring alongside the replica worker; merge-only body change, no additional read. merge of origin/main 7920cccf: Retain main box-role/group admission wiring and boot publication beside the owned replica worker and shutdown; main moves the boot registry List into runWorkerBootPassAfterAdmission, removing its inline whole Route site. No new read introduced by conflict resolution.;rev3=census-ruling-stateless-replicas-3;basis=Task 1 fix round 1 M3: retain the private snapshot source and cancel/join ownership, but use the replica-health-specific retry loop. It logs its first failure only and retains the existing exponential backoff capped at 30 seconds; unsupported builds return nil. Existing five direct read sites unchanged; no new credentials, bucket reader or app lifecycle action. Fix round 1 Q20: publish Edge.ReplicaSnapshots as a separate in-memory status source, leaving the tenant-visible Upstreams source unchanged. No new external reader or authority.;rev3=census-ruling-region-ha-p3b;basis=Load root-written group marker/configuration, configure signed boot binding and agent receipt completer, wire cancellable admission into departure work and expose cached GroupReaderSnapshot. New indirect boot reads use protected root files; agent-owned receipt controls duplicate initial completion only, never root restart permission. Same five direct sites. Merge 45cebde4 retains the replica health socket lifecycle and setReplicaSource beside GroupReaderSnapshot; no extra read beyond main.;rev3=census-ruling-agent-start-demo-2;basis=agent.go:309-329 opens demo-traffic.db beside the operator-configured registry when a demo domain exists, closes it at shutdown and wires drain-before-purge; :1010-1019 shares the worker and write gate; :1164-1177 installs the fleet identity and closed-until-worker serving callback. One added whole Route pass; the new indirect filesystem/SQL reads are claimed in openDemoTraffic and worker/store units. No request chooses the database pathname.;rev3=census-ruling-region-ha-p1b3b-s;basis=Wire the service duty view to authoritative cached sidecar manifest placement in LifetimeIndex and the edge sidecar projection; missing policy denies duty. Existing instance duty wiring remains.;rev3=census-ruling-region-ha-g2-t3;basis=T3a: wire eb.Page = PageOperator beside OwnerTerminated before departures arm, so suspect-holder pages work if departure setup fails; no new read; existing nine sites and authority unchanged; pages through the existing sink. T3b: publish the same backend through an atomic pointer for the metrics observer, and clear it on return; no new external read or authority.;rev3=census-ruling-agent-start-demo-3;basis=Wire the claim activator and root snapshot client into the demo worker; pass moved readiness to status reporting. Census read-site delta: unchanged (9).;rev3=census-ruling-region-ha-g2-fixes;basis=Wire local pool evidence, live withdrawal activator, startup ingress scan and alias publication, and edge lookup; no new direct sites; new indirect record/claim reads use existing store/judge paths described in ingress helpers.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3: starts the existing record-view backstop loop with a departure-inventory listener (non-blocking, coalesced signal) even without an armed RecordView; it requests the existing full pass (backstopFullDue) there. Same nine read sites; no new read or authority.;rev3=census-ruling-region-ha-graceful-terminate-t2;basis=Derive one signal-time deadline with a 90-second budget; cap departure stop and startup/seed/service shutdown joins by it. No read added.;rev3=census-ruling-static-sweep-periodic;basis=in the edge-ready callback, publishes e.LargestStaticTree in staticTreeSource for the disk alert line (diskAlertFrac in the metrics loop); in-memory wiring only, no read added; read sites unchanged (9);rev3=census-ruling-edge-page-cache-1;basis=wires the exec backend's CurrentInputs into the edge cache (wireCurrentInputs) and, in the ready hook after armEdgeAssetCache (whose returned store it now keeps), calls armEdgePageCache, which does nothing unless CARLOS_PAGE_CACHE=1; read sites unchanged (9); no read added;rev3=census-ruling-gvisor-demos;basis=Capture sandbox resolution and refusal once; log errors once; gate route admission and BeforeExec before process launch. No new root read. Task 5: pass the once-captured sandbox effective mode/config error into ExecBackend, UnitBackend and the immutable Client expectation. Same startup environment/registry reads; swapArming declines gVisor before placement. Task 8: arm read-only status projection with the existing Client.SandboxStatus callback. Agent status now queries the existing root /ready endpoint; no new root authority or guest-file input. Merge2 e8a1ddde: retain main wireCurrentInputs and armEdgePageCache through the existing asset-store ready hook alongside branch once-captured sandbox mode, wake gates and root status wiring. No new direct read; main page-cache helpers retain their own census overlays.;rev3=census-ruling-region-ha-held-build;basis=wires the drain state: svc.SetDrainingSource(boxDrain.IsDraining), svc.SetPeerDrainView(e.PeerDraining), e.SetPeerDrainedHook(svc.DropHoldersNaming); in-memory only; no read added; region HA held-requests Task 5: on group members, starts the drain driver over the activator, the edge and boxDrain, and serves its root-only drain socket; no read added beyond the socket's own Branch review r1: the drain state follows the root start fence on group members (the fence reader is the existing fenceLocation.read, a root-owned fixed path); e.SetPeerUndrainedHook(svc.AllowHoldersNaming) beside the drained hook (memory only); the drain socket serves only the agent's own user. No read added.;rev3=census-ruling-security-review-mitigations;basis=Wire the cached operator flat-layout choice into the exec backend's new-resident refusal; no read source added, existing authority retained.;rev3=census-ruling-w6-ingress-drain;basis=agent (user carlos), not root. Builds the ingress drain (newIngressDrain) with arming read at ask time from os.Getenv (CARLOS_REGION_HA, CARLOS_INGRESS_TARGET_GROUPS, both from the root-owned host.env), the fixed admission and lease.CurrentSelf (existing IMDS identity); its reader is awstg.Load, the box role's credentials calling ELB DescribeTargetHealth/DescribeTargetGroupAttributes (new AWS reads, by the agent). Wires admission.closeStartsForIngressDrain, the lbhealth drain condition, ingress.setEdge, and ingress.shutdownStarted in WithShutdownStarted. The drain socket (/run/carlos/.ha-drain/drain.sock, agent-user only, existing) is now also served on a fixed box with the drain configured (was group members only), routing /v1/ingress/* to the ingress drain and the group drain verbs to 404 there. armHADepartures now takes fixtureDepartureGetenv() and MakeQueue fixtureDepartureQueue(), which in a production (non-rootrunner) build are os.Getenv and nil, as before. Read sites unchanged (9).;rev3=census-ruling-stateless-replicas-4-task1;basis=Arms the fleet-only replica swap worker next to the placement worker: same console URL and fleet token as the existing replicaCoordinatorAPI, the existing activator Service; stops and joins at shutdown. No new read site, credential or bucket reader.;rev3=census-ruling-stateless-replicas-4-task2;basis=Task 2: sets deployWorker.step to the rollout scheduler answer for the record permit (replicaStepOf over armedRollout), an in-memory callback; no read site, credential or bucket reader added.;rev3=census-ruling-stateless-replicas-4-task2-fix2;basis=Task 2 fix round 2: the swap worker step is armedReplicaStep, the same lazy scheduler lookup as before as a named function; no read site added.;rev3=census-ruling-stateless-replicas-4-merge-main;basis=Merge of main 5fac2ff1: both sides changed it. Main (01d6ca78, linked-deployments-slice1) starts linkLoop beside tunnelLoop; this branch keeps its replica coordinator wiring. Both kept as-is; no read added.;rev3=census-ruling-stateless-replicas-4-final;basis=#511 final wave item 2: wires the swap worker's drive (armedReplicaDrive, the armed rollout manager's DriveReplicaRelease); no read added;rev3=census-ruling-stateless-replicas-4-merge-main2;basis=Merge of main af871da0 (v0.34.49): both sides changed it. Main (178dcfe5, member-backups-2a) moves the inline duty-view closure into armDutyView/dutyView and starts verifyAssignLoop; its sites drop by registry:Host and whole:Route x2 as main recorded them. This branch keeps its replica coordinator, swap worker and drive wiring. Both kept as-is; no read added.;rev3=census-ruling-stateless-replicas-4-drill3;basis=drill 3 R24: makes one in-memory channel, closes it (once) inside the edge's existing shutdown-started callback after ingress.shutdownStarted, and passes it to tunnelLoop, which drains only a fleet channel name; no read added, same six sites; touches no admission, lease, ingress drain, listener or file; the agent process, no root decision;rev3=census-ruling-edge-ppv2;basis=Agent (uid carlos), not root. memwatchLoop now gets edgeProxyCounters(&demoEdge) (in-process counters, no read). The drain socket's driver is newAgentDrainSocket(ingress, e, os.Getenv), which attaches the edge trust handler only when CARLOS_INGRESS_PROXY_SOURCES in the agent's environment (from the root-owned host.env) parses to a non-empty list; the socket is served when drainSocketServed: a group member or a configured ingress drain (both as before), or a box armed for PROXY protocol (new). The socket's path and agent-user-only permissions are unchanged. Read sites unchanged (6).;rev3=census-ruling-same-box-edge-fence;basis=Agent (uid carlos), not root. One added line: armEdgeFenceStatus(ctl.EdgeFence), beside the existing armExecSandboxStatus, so the layout report can ask root's /ready for the edge fence state over the control socket client the agent already holds. No read added.;rev3=census-ruling-platform-mail-submission;basis=Task 4: sets eb.Mail = mailsubmit.SocketForwarder{} on every box, and eb.MailSwitch to a mailSwitchCache's On that opens the deploy store itself through openDeployStore, retried at most once a minute with an error line until it opens (review round 1, Task 4 P3), armed for the serial-move refresh (armedMailSwitch). Task 6: also sets the ExecBackend's ManifestOf, the same staged-manifest read as TierOf (rt.App and RouteAccount(rt), hence +registry:App and +whole:Route), for the spawn-time check of decision 10, which logs and emits an event and never refuses. Agent, not root. Fable final P2-2: eb.MailSwitch is the cache's State (three-valued: on, off, unknown) in place of On; an unreadable switch is unknown, never off. No read added.;rev3=census-ruling-fleet-drain-followups;basis=P3 (#1008 T9): one call after armChangeIndex, requestBootFullPass(v, &backstopFullDue), which stores true in the existing in-memory backstopFullDue flag only when no record view is armed, so the fast loop runs its existing full pass on its first tick instead of instancesLoop a minute later; armed boxes unchanged. No read added; read sites unchanged (8); agent, not root.;rev3=census-ruling-fleet-first-reconcile-speed;basis=Startup timing log lines only: runDuties builds a step logger (newStartupLog, which reads the in-memory agent start time) and logs one line after the wait on the activator startup latch and after each existing duty before go fastConvergeLoop. One newStartupLog().at line in the edge ready hook before go tunnelLoop. No read added; read sites unchanged (8). Agent, not root.;rev3=census-ruling-ha-1192;basis=sets the group drain driver's departed hook to armedPeerDeparted (the armed departure controller's PeerDeparted: local registry identity + departure journal); no new read;rev3=census-ruling-replica-wake-gap-r3;basis=Calls lease.SetContinuityDir(<data dir>/.continuity) beside the existing obligation store: the agent's own 0700 directory for clean records, outside every instance tree (#1290 round 3). No new read; failure is logged and every start then takes a full image.;rev3=census-ruling-fleet-restart-wake;basis=Fleet restart wake Task 2: cfg.ReplicaRecord = replicaRecordFacts(boxLifetimes, cfg.Record): hands the existing judged record read (haRecordFacts over openDeployStore and boxJudge) as the live read on a lifetime index miss. No read site added here; agent, not root.;rev3=census-ruling-alias-publish-precert-1293;basis=starts edgesFileLoop with one more argument, edgeAcmeDir(os.Getenv, peekAcmeCache(args)): the agent's own -acme-cache flag (already parsed for domainsLoop) or $CARLOS_DATA_DIR/acme; a string computed from the operator's command line and environment, no read. Same 8 read sites.;rev3=census-ruling-console-addr-from-install;basis=publishes the running edge to consoleFleetEdgeSource for the heartbeat; no read added;rev3=census-ruling-instance-ready-before-wake;basis=the agent as carlos: sets svc.ConfigBeforeWake = configBeforeWake(reg, dd, claims.Writes) beside BeforeExec, before Start. Read sites unchanged, offsets moved.;rev3=census-ruling-managed-fleets-2b2;basis=takes RunAgent's one managed/BYO startup decision (decideAgentStartup, made before any fatal group preflight): a managed box gets its join (refused on an identity error or any group configuration: every admission predicate closed, edge/status/probes running, no Fatalf), never reads group configuration and never builds fixedAdmission; a BYO box reads and validates group configuration exactly as on main; binds the join as activator/exec/edge admission; ReconcileConfig.Joining on both provisioning loops; the worker boot pass runs once, at admission; Task 5: appends managedProbeOption(join) to the edge options when it is non-nil (a managed box with a valid root identity); BYO boxes unchanged; no read added; final wave: when runAgent makes the startup decision itself it also arms it (armedAgentStartup), as RunAgent does, so later group-configuration consumers follow it; no read added; merge of origin/main 173c7033: main's edge page cache arming, gVisor demos sandbox capture, region HA drain wiring and the flat-layout refusal wiring, not this branch; merge of origin/main 65951fbb: main's W6 ingress drain, linkLoop, duty view (armDutyView), replica swap worker, PPv2 drain socket, edge fence status, mail forwarder and switch, boot full pass, startup timing, peer departed hook, continuity dir, replica record facts, edges file ACME dir, console fleet edge source and ConfigBeforeWake, not this branch; code-health split: the startup decision fallback, BYO group configuration read and fixed admission build moved to agentAdmissionAtStart, the join binding to managedAdmissionOr, the boot pass branch to agentBootPass and the probe option to appendManagedProbe (managedagent.go), same calls in the same order, no read added;rev3=census-ruling-s3-polling-3;basis=The log and error shipping goroutines move unchanged into startLogLoops (internal/host/logloops.go), which also starts s3meter.LogEvery on the agent's context: an hourly log line of the process's in-memory S3 request counts. Same sinks, same label; adds no read.;rev3=census-ruling-instance-usage;basis=builds the usage meter through newUsageMeter(os.Getenv) (internal/host/instance_usage.go), which reads the env var CARLOS_INSTANCE_USAGE once (the same host.env the agent already reads) and, when it is off, calls m.DisableInstances and logs; runAgent then starts usageLoop with instances=!off so the usage loop arms the per-instance flusher (internal/host/instance_usage.go). The flusher adds one store read (spec section 12): (1) what is read: the box's own count objects usage/instances/<box>/<date>/<account>/<app>.json in the deployment bucket (or a fleet's rebased prefix), by the agent's usage flush, before each conditional write; (2) who writes them: the agent processes of the same box label through this flush; the bucket's * grant lets any platform box write any key, the same exposure as usage/edge/; tenants, apps and their credentials cannot write there, and a fleet box's store door confines it to its fleet's prefix; (3) what is checked: the body parses as v1 and its box, date, account and app match the key (usage.DecodeInstanceDay); anything else stops that object's write, is logged, and leaves the batch queued until the 24h drop horizon; (4) what it decides: only whether a batch is already merged (applied[writer]) and the totals the merge adds to; a forged object can cause an undercount or false totals, and can open, run or follow nothing;rev3=census-ruling-stage-spool-1582;basis=#1582: the agent (uid carlos, carlos-edge.service) arms through armRolloutAndStageRelay (stagerelay.go): armRolloutAndRelay, which no longer arms the relay, then the stage relay on every box; root never runs this; read sites unchanged file:Exec@22105,file:Open@2294,file:Statfs@59297,registry:App@13402,registry:App@13780,whole:Route@13394,whole:Route@13772,whole:Route@52360 a108976028134b68cd67929822d3941bb5ab83ed9fb79f4dd90bcfe7cb5d66f0 |
| +internal/host/stagerelay.go stageRelay.tick legacy accepted-legacy accepted-legacy;rev3=J1;basis=root-route;rev3=census-ruling-stage-spool-1582;basis=#1582: agent-side only (carlos-edge.service, never root): paces each pending head (first ask 2 s after the note, waits doubling to stageRequestEvery; touches at least 2 s and the shortest due wait apart, so stuck heads together touch at most once per stageRequestEvery) and reads a head's row and refusal record only when due; accepted outcomes unchanged; still only touches the existing marker <data>/stage-requested; read sites unchanged registry:Version@1097,registry:Version@1332,registry:Version@1427,whole:Route@1084 b8fed6c6714bfc3677f20d59a20f35f28d056e3d6f4b9caa8194691f3bd2eca7 |
| +internal/host/stagenew.go stageNew legacy accepted-legacy accepted-legacy;rev3=census-ruling-stage-spool-1582;basis=#1582: new, root's -stage-only pass: a predicate over the registry Route it is handed (Adoptable, Backing, Unit, CapabilityRoute, Version): new exec instances; no file, bucket or command input registry:Backing@73,registry:Unit@93,registry:Version@142,whole:Route@135,whole:Route@66 40295eff3e607602ca0b84940f51ee8291f7360498c3489ae7cd0858edd3d664 |
| +internal/host/stagenew.go stageNewFirst legacy accepted-legacy accepted-legacy;rev3=census-ruling-stage-spool-1582;basis=#1582: new, root's -stage-only pass: lists the registry root already reads (reg.List), and only when a stageNew row exists builds its own pass setup (buildRootPass, the full pass's options), refuses to run on a setup or root-history error, and runs release.PassFilter with stageNew as the extra predicate, under every gate the full pass applies; closes its setup; no read of any agent-writable path whole:Route@379 bdf1297cb6a7e0e2c78ba42ed52c13a1924f416b5e7fab78c0016137f5973ba6 |
| +@coverage internal/host e77853e3755b4f15105395f28c20a9f07ab05bab2ba38fb0e1f177ac85b9234c |