activator, host: restart wake without the index wait or false backoff
A single-copy always-on instance on a fleet box was down 33 s across its agent's restart (Tito production v0.40.2 roll, 2026-11-21), against the 5 to 11 s the instance-control probe needs. - A replica fence (replicas.ErrFenced) is a refusal to every classifier, retried on the next 2 s resident tick, not a build failure with 1 to 16 s backoff. A shared-secrets wait keeps its member event; a genuine build failure still backs off. - On a lifetime-index miss (a restarted agent before its first reconcile scan) the agent reads the record live instead of refusing. The exec gate's fresh record read still decides (R1); the read never writes the index; a store error backs off as an outage; an absent or foreign record is read at most once per host per 30 s. Estimated restart gap about 7 to 14 s. Paul approved both fixes. Astra and Fable reviewed; census approved on #280. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Squashed from fleet-restart-wake into main.
28 files changed,
+1,303
−52
docs/superpowers/notes/census-proposal-fleet-restart-wake.md+35 −0docs/superpowers/plans/2026-11-21-fleet-restart-wake.md+46 −0internal/activator/activator.go+14 −11internal/activator/maintenance.go+24 −0internal/activator/replica_fence_refusal_test.go+211 −0internal/activator/replica_reconcile_wake_test.go+1 −1internal/activator/replicabaseline_test.go+1 −1internal/activator/replicadeploy_test.go+4 −2internal/activator/rootfs_service.go+3 −2internal/activator/rootfsrelease.go+1 −1internal/activator/stateless.go+1 −1internal/activator/stateless_fix1_test.go+1 −1internal/activator/stateless_heldlog_test.go+2 −1internal/activator/stateless_holdwake_test.go+1 −1internal/activator/stateless_test.go+6 −4internal/activator/swap.go+7 −2internal/activator/wakefaillog.go+57 −6internal/console/copysince_paths_test.go+1 −1internal/host/agent.go+8 −8internal/host/fleet_restart_wake_test.go+678 −0internal/host/replicarecord.go+137 −0internal/host/stateless_failed_release_test.go+1 −1internal/host/stateless_runtime_test.go+7 −6internal/host/stateless_switch_test.go+1 −1internal/provision/fleet_restart_wake_census_test.go+35 −0internal/provision/plan9_b8_census_test.go+1 −1internal/provision/testdata/plan14-root-reads-chain.tsv+1 −0internal/provision/testdata/plan14-root-reads-fleet-restart-wake.tsv+18 −0
CI failed — run details
CI log
=== gate ===
go: downloading go1.26.10 (linux/arm64)
go version go1.26.10 linux/arm64
.amadan/test-gate.sh
go: downloading github.com/aws/aws-sdk-go-v2 v1.44.0
go: downloading github.com/aws/aws-sdk-go-v2/service/s3 v1.105.0
go: downloading github.com/benbjohnson/litestream v0.5.14
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 golang.org/x/net v0.62.0
go: downloading modernc.org/sqlite v1.55.0
go: downloading golang.org/x/crypto v0.58.0
go: downloading github.com/aws/aws-sdk-go-v2/config v1.32.6
go: downloading github.com/aws/aws-sdk-go-v2/service/acm v1.45.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ec2 v1.324.0
go: downloading github.com/aws/aws-sdk-go-v2/service/iam v1.58.2
go: downloading github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.37.0
go: downloading github.com/aws/aws-sdk-go-v2/service/route53 v1.64.1
go: downloading github.com/aws/aws-sdk-go-v2/service/sts v1.45.6
go: downloading github.com/oschwald/maxminddb-golang v1.13.1
go: downloading github.com/aws/aws-sdk-go-v2/credentials v1.19.6
go: downloading github.com/aws/aws-sdk-go-v2/service/sns v1.43.0
go: downloading github.com/pion/logging v0.2.4
go: downloading github.com/pion/stun/v3 v3.1.5
go: downloading github.com/pion/turn/v4 v4.1.4
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.14
go: downloading github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.40
go: downloading github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.38
go: downloading github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.23
go: downloading github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.40
go: downloading github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.31
go: downloading golang.org/x/text v0.43.0
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/aws/aws-sdk-go-v2/service/signin v1.0.4
go: downloading github.com/prometheus/client_golang v1.17.0
go: downloading golang.org/x/sync v0.24.0
go: downloading github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.20.18
go: downloading github.com/lmittmann/tint v1.1.3
go: downloading github.com/cespare/xxhash/v2 v2.3.0
go: downloading github.com/prometheus/client_model v0.5.0
go: downloading github.com/prometheus/common v0.45.0
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/prometheus/procfs v0.12.0
go: downloading google.golang.org/protobuf v1.36.10
go: downloading github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0
go: downloading github.com/pion/dtls/v3 v3.1.4
go: downloading github.com/pion/transport/v4 v4.0.2
go: downloading github.com/pion/randutil v0.1.0
go: downloading github.com/wlynxg/anet v0.0.5
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 golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/pion/dtls/v3 v3.1.4
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/mathutil v1.7.1
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec
=== launchctx (4 s, from +0 s)
ok amadan.net/carlos/platform.git/launchctx 0.015s
? amadan.net/carlos/platform.git/launchctx/controlname [no test files]
? amadan.net/carlos/platform.git/launchctx/wireid [no test files]
=== vet (158 s, from +0 s)
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
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/mathutil v1.7.1
go: downloading modernc.org/memory v1.11.0
go: downloading github.com/google/uuid v1.6.0
=== vet-tags (167 s, from +0 s)
go: downloading github.com/klauspost/compress v1.20.2
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading modernc.org/libc v1.74.1
=== gofmt (1 s, from +0 s)
gofmt -l .: clean
=== rest (362 s, from +14 s)
ok github.com/carlosframework/platform/cmd/carlos-media 102.001s
? github.com/carlosframework/platform/cmd/changelog [no test files]
ok github.com/carlosframework/platform/cmd/console 205.404s
ok github.com/carlosframework/platform/cmd/mediaimage 42.251s
ok github.com/carlosframework/platform/cmd/moveprobe 16.258s
ok github.com/carlosframework/platform/cmd/pricebook-export 0.038s
ok github.com/carlosframework/platform/cmd/rootfswitness 0.158s
ok github.com/carlosframework/platform/cmd/runsc-assets 0.089s
ok github.com/carlosframework/platform/cmd/zddprobe 0.979s
ok github.com/carlosframework/platform/internal/agentsock 0.049s
ok github.com/carlosframework/platform/internal/alerting 0.013s
ok github.com/carlosframework/platform/internal/analytics 0.222s
ok github.com/carlosframework/platform/internal/appconfig 40.874s
ok github.com/carlosframework/platform/internal/apperr 0.346s
ok github.com/carlosframework/platform/internal/applog 0.607s
ok github.com/carlosframework/platform/internal/apppolicy 2.425s
ok github.com/carlosframework/platform/internal/assetcache 0.613s
ok github.com/carlosframework/platform/internal/awsinv 0.019s
ok github.com/carlosframework/platform/internal/awsmanaged 0.625s
ok github.com/carlosframework/platform/internal/awsregiongroup 0.765s
ok github.com/carlosframework/platform/internal/awsterminations 0.021s
ok github.com/carlosframework/platform/internal/backupswords 0.013s
ok github.com/carlosframework/platform/internal/billing 0.113s
ok github.com/carlosframework/platform/internal/billing/billingtest 0.049s
ok github.com/carlosframework/platform/internal/billingstripe 2.152s
ok github.com/carlosframework/platform/internal/boxchoice 0.018s
ok github.com/carlosframework/platform/internal/boxid 2.553s
? 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.006s
ok github.com/carlosframework/platform/internal/boxself 0.201s
ok github.com/carlosframework/platform/internal/boxvolumes 0.023s
ok github.com/carlosframework/platform/internal/caps 0.040s
ok github.com/carlosframework/platform/internal/certwarm 0.009s
ok github.com/carlosframework/platform/internal/cgroup 1.351s
ok github.com/carlosframework/platform/internal/changelog 5.332s
ok github.com/carlosframework/platform/internal/clamd 0.072s
? github.com/carlosframework/platform/internal/cliflag [no test files]
ok github.com/carlosframework/platform/internal/clireg 0.016s
ok github.com/carlosframework/platform/internal/codehealth 18.777s
ok github.com/carlosframework/platform/internal/compute 0.013s
? github.com/carlosframework/platform/internal/controlname [no test files]
? github.com/carlosframework/platform/internal/controlsock [no test files]
ok github.com/carlosframework/platform/internal/dbdoor 10.473s
ok github.com/carlosframework/platform/internal/dbdoor/dbdoortest 0.047s
ok github.com/carlosframework/platform/internal/dbquery 0.029s
ok github.com/carlosframework/platform/internal/dbreads 3.361s
? github.com/carlosframework/platform/internal/dbreads/dbreadstest [no test files]
ok github.com/carlosframework/platform/internal/dbverify 0.024s
ok github.com/carlosframework/platform/internal/demo 0.005s
ok github.com/carlosframework/platform/internal/demobuild 3.928s
ok github.com/carlosframework/platform/internal/democlaim 0.314s
ok github.com/carlosframework/platform/internal/devbox 18.119s
ok github.com/carlosframework/platform/internal/dnsrec 0.008s
ok github.com/carlosframework/platform/internal/docsite 0.088s
ok github.com/carlosframework/platform/internal/domainreg 0.017s
ok github.com/carlosframework/platform/internal/domains 63.678s
ok github.com/carlosframework/platform/internal/doorkey 0.018s
ok github.com/carlosframework/platform/internal/economics 0.019s
ok github.com/carlosframework/platform/internal/edgefence 0.161s
ok github.com/carlosframework/platform/internal/edgeguard 0.175s
? github.com/carlosframework/platform/internal/edgeproof [no test files]
ok github.com/carlosframework/platform/internal/edgesfile 0.084s
ok github.com/carlosframework/platform/internal/egressaddr 0.006s
ok github.com/carlosframework/platform/internal/execsandbox 100.460s
ok github.com/carlosframework/platform/internal/fileacl 0.008s
ok github.com/carlosframework/platform/internal/fleetapi 2.569s
ok github.com/carlosframework/platform/internal/fleetstore 0.012s
ok github.com/carlosframework/platform/internal/fxrate 0.022s
ok github.com/carlosframework/platform/internal/gate 4.666s
ok github.com/carlosframework/platform/internal/genselect 0.103s
ok github.com/carlosframework/platform/internal/geo 0.036s
ok github.com/carlosframework/platform/internal/geoip 0.085s
ok github.com/carlosframework/platform/internal/groupadmission 0.007s
ok github.com/carlosframework/platform/internal/grouprollaws 16.952s
ok github.com/carlosframework/platform/internal/hadeparture 0.026s
ok github.com/carlosframework/platform/internal/hafresh 0.017s
ok github.com/carlosframework/platform/internal/hairpin 0.229s
ok github.com/carlosframework/platform/internal/historyreadback 1.083s
ok github.com/carlosframework/platform/internal/hostactors 25.507s
ok github.com/carlosframework/platform/internal/hostbox 22.835s
ok github.com/carlosframework/platform/internal/hostclaim 3.345s
ok github.com/carlosframework/platform/internal/hostenv 0.087s
ok github.com/carlosframework/platform/internal/hostevidence 0.021s
ok github.com/carlosframework/platform/internal/hostexec 23.663s
ok github.com/carlosframework/platform/internal/hostfence 0.139s
ok github.com/carlosframework/platform/internal/hostfiles 27.827s
ok github.com/carlosframework/platform/internal/hostfloor 0.110s
ok github.com/carlosframework/platform/internal/hostguard 1.605s
ok github.com/carlosframework/platform/internal/hostops 10.356s
? github.com/carlosframework/platform/internal/hostops/fencerelease [no test files]
ok github.com/carlosframework/platform/internal/hostops/internal/fencerelease 0.023s
ok github.com/carlosframework/platform/internal/hostquarantine 0.018s
ok github.com/carlosframework/platform/internal/hostrelocate 2.619s
ok github.com/carlosframework/platform/internal/hostresolve 0.744s
ok github.com/carlosframework/platform/internal/hostwrite 0.006s
ok github.com/carlosframework/platform/internal/infraview 0.013s
ok github.com/carlosframework/platform/internal/ingresshealth 0.021s
ok github.com/carlosframework/platform/internal/ingresshealth/awstg 0.019s
ok github.com/carlosframework/platform/internal/instancectl 54.502s
ok github.com/carlosframework/platform/internal/instanceexec 9.135s
ok github.com/carlosframework/platform/internal/instancefs 0.034s
ok github.com/carlosframework/platform/internal/instancekey 0.011s
ok github.com/carlosframework/platform/internal/instanceupdates 0.029s
ok github.com/carlosframework/platform/internal/interactive 0.677s
ok github.com/carlosframework/platform/internal/launchd 0.012s
ok github.com/carlosframework/platform/internal/layout 24.748s
ok github.com/carlosframework/platform/internal/layout/pubclass 97.835s
ok github.com/carlosframework/platform/internal/lbhealth 0.011s
ok github.com/carlosframework/platform/internal/lease 144.297s
ok github.com/carlosframework/platform/internal/lease/leasetest 1.869s
ok github.com/carlosframework/platform/internal/lease/locktest 0.021s
ok github.com/carlosframework/platform/internal/ledger 0.061s
ok github.com/carlosframework/platform/internal/mail 1.524s
ok github.com/carlosframework/platform/internal/mailer 1.113s
ok github.com/carlosframework/platform/internal/mailsubmit 2.111s
ok github.com/carlosframework/platform/internal/mailwire 0.011s
ok github.com/carlosframework/platform/internal/maintenance 0.114s
ok github.com/carlosframework/platform/internal/maintenanceexec 8.277s
ok github.com/carlosframework/platform/internal/maintenanceguard 0.283s
ok github.com/carlosframework/platform/internal/media 2.225s
ok github.com/carlosframework/platform/internal/media/mediatest 0.006s
ok github.com/carlosframework/platform/internal/mediaaws 0.925s
ok github.com/carlosframework/platform/internal/mediahandler 42.170s
ok github.com/carlosframework/platform/internal/mediajobs 1.093s
ok github.com/carlosframework/platform/internal/medialocal 9.422s
ok github.com/carlosframework/platform/internal/metrics 0.179s
ok github.com/carlosframework/platform/internal/minorunits 0.018s
ok github.com/carlosframework/platform/internal/moves 52.005s
ok github.com/carlosframework/platform/internal/moves/archive 3.772s
ok github.com/carlosframework/platform/internal/moves/offlinerun 0.134s
ok github.com/carlosframework/platform/internal/namedunits 0.042s
ok github.com/carlosframework/platform/internal/objstore 0.782s
ok github.com/carlosframework/platform/internal/ops 15.078s
ok github.com/carlosframework/platform/internal/pageindex 3.929s
ok github.com/carlosframework/platform/internal/parity 0.193s
? github.com/carlosframework/platform/internal/parity/cmd/parity-doc [no test files]
ok github.com/carlosframework/platform/internal/park 0.672s
ok github.com/carlosframework/platform/internal/perf 0.205s
ok github.com/carlosframework/platform/internal/plans 0.069s
ok github.com/carlosframework/platform/internal/privatefile 0.006s
ok github.com/carlosframework/platform/internal/provision 237.796s
ok github.com/carlosframework/platform/internal/proxyproto 0.937s
ok github.com/carlosframework/platform/internal/publicrelease 0.035s
ok github.com/carlosframework/platform/internal/ratelimit 0.242s
ok github.com/carlosframework/platform/internal/regionlabel 0.061s
ok github.com/carlosframework/platform/internal/regionname 0.040s
ok github.com/carlosframework/platform/internal/registrar 0.008s
ok github.com/carlosframework/platform/internal/registrar/openprovider 0.287s
? github.com/carlosframework/platform/internal/registrar/registrartest [no test files]
ok github.com/carlosframework/platform/internal/registry 80.727s
ok github.com/carlosframework/platform/internal/relay 7.589s
ok github.com/carlosframework/platform/internal/release 81.279s
ok github.com/carlosframework/platform/internal/replicagen 0.054s
ok github.com/carlosframework/platform/internal/replicas 0.139s
ok github.com/carlosframework/platform/internal/reqrec 6.691s
ok github.com/carlosframework/platform/internal/rollout 13.406s
ok github.com/carlosframework/platform/internal/rolloutwords 0.041s
ok github.com/carlosframework/platform/internal/rootaws 98.626s
ok github.com/carlosframework/platform/internal/rootfsimage 0.833s
ok github.com/carlosframework/platform/internal/rootparticipation 0.115s
ok github.com/carlosframework/platform/internal/rootstate 0.040s
ok github.com/carlosframework/platform/internal/runs 0.785s
ok github.com/carlosframework/platform/internal/s3compat 0.042s
ok github.com/carlosframework/platform/internal/s3fake 1.041s
ok github.com/carlosframework/platform/internal/safefile 0.044s
ok github.com/carlosframework/platform/internal/schedule 23.139s
ok github.com/carlosframework/platform/internal/seeds 0.053s
ok github.com/carlosframework/platform/internal/sim/litestreamfacts 5.696s
ok github.com/carlosframework/platform/internal/sim/mediajobs 45.491s
ok github.com/carlosframework/platform/internal/sim/regionha 23.906s
ok github.com/carlosframework/platform/internal/status 0.294s
ok github.com/carlosframework/platform/internal/steering 0.445s
ok github.com/carlosframework/platform/internal/stopevidence 0.667s
ok github.com/carlosframework/platform/internal/storecfg 0.488s
ok github.com/carlosframework/platform/internal/svcrole 0.019s
ok github.com/carlosframework/platform/internal/systemd 7.520s
? github.com/carlosframework/platform/internal/systemdshow [no test files]
ok github.com/carlosframework/platform/internal/team 5.496s
ok github.com/carlosframework/platform/internal/teamcontract 0.544s
ok github.com/carlosframework/platform/internal/telemetry 0.059s
ok github.com/carlosframework/platform/internal/termfence 5.183s
ok github.com/carlosframework/platform/internal/timerspec 0.035s
ok github.com/carlosframework/platform/internal/tsidentity 4.242s
ok github.com/carlosframework/platform/internal/tunnelclient 0.447s
ok github.com/carlosframework/platform/internal/unixdial 0.013s
ok github.com/carlosframework/platform/internal/updatewords 0.039s
ok github.com/carlosframework/platform/internal/upstreamguard 0.021s
? github.com/carlosframework/platform/internal/upstreamguard/guardtest [no test files]
ok github.com/carlosframework/platform/internal/usage 0.023s
ok github.com/carlosframework/platform/internal/version 0.005s
ok github.com/carlosframework/platform/internal/vet 3.280s
ok github.com/carlosframework/platform/internal/zonehost 0.018s
ok github.com/carlosframework/platform/internal/zonehost/route53zones 0.072s
? 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.028s
ok github.com/carlosframework/platform/scripts/region-ha-g2/fixture 5.196s
ok github.com/carlosframework/platform/scripts/stateless-replicas-drill 1.223s
ok github.com/carlosframework/platform/scripts/witness-pointer 0.017s
=== cutover-witness (147 s, from +14 s)
ok github.com/carlosframework/platform 2.627s
=== internal_grouproll@0 (266 s, from +69 s)
ok github.com/carlosframework/platform/internal/grouproll 264.557s
=== internal_grouproll@1 (273 s, from +69 s)
ok github.com/carlosframework/platform/internal/grouproll 272.190s
=== internal_activator@0 (142 s, from +130 s)
ok github.com/carlosframework/platform/internal/activator 136.649s
=== internal_activator@1 (139 s, from +130 s)
ok github.com/carlosframework/platform/internal/activator 133.582s
=== internal_activator@2 (138 s, from +130 s)
ok github.com/carlosframework/platform/internal/activator 132.519s
=== internal_activator@3 (166 s, from +130 s)
ok github.com/carlosframework/platform/internal/activator 160.584s
=== root@0 (116 s, from +159 s)
ok github.com/carlosframework/platform 106.703s
=== root@1 (107 s, from +159 s)
ok github.com/carlosframework/platform 96.980s
=== root@2 (131 s, from +160 s)
ok github.com/carlosframework/platform 122.733s
=== root@3 (106 s, from +160 s)
ok github.com/carlosframework/platform 98.467s
=== root@4 (94 s, from +160 s)
ok github.com/carlosframework/platform 85.370s
=== internal_edge@0 (189 s, from +161 s)
ok github.com/carlosframework/platform/internal/edge 180.919s
=== internal_edge@1 (124 s, from +161 s)
ok github.com/carlosframework/platform/internal/edge 115.889s
=== internal_edge@2 (151 s, from +161 s)
ok github.com/carlosframework/platform/internal/edge 141.853s
=== internal_edge@3 (200 s, from +161 s)
ok github.com/carlosframework/platform/internal/edge 192.142s
=== internal_host@0 (246 s, from +196 s)
ok github.com/carlosframework/platform/internal/host 240.779s
=== internal_host@1 (194 s, from +196 s)
ok github.com/carlosframework/platform/internal/host 188.372s
=== internal_host@2 (250 s, from +196 s)
ok github.com/carlosframework/platform/internal/host 245.080s
=== internal_host@3 (164 s, from +196 s)
ok github.com/carlosframework/platform/internal/host 158.491s
=== internal_host@4 (149 s, from +196 s)
ok github.com/carlosframework/platform/internal/host 142.700s
=== internal_host@5 (205 s, from +197 s)
ok github.com/carlosframework/platform/internal/host 200.740s
=== internal_console@0 (188 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 180.261s
=== internal_console@1 (164 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 156.701s
=== internal_console@2 (193 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 185.788s
=== internal_console@3 (230 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 222.419s
=== internal_console@4 (181 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 173.369s
=== internal_console@5 (196 s, from +202 s)
2026/11/21 10:58:11 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:11 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 10:58:11 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:12 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:12 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 10:58:12 console: backfilled account manifest for byv (acct)
2026/11/21 10:58:12 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:12 console: link d8cdd60aa986 published bab/shop
2026/11/21 10:58:12 console: linked deployments bab: apps of d8cdd60aa986: injected apps read failure
2026/11/21 10:58:12 console: linked deployments bab: apps of d8cdd60aa986: injected apps read failure
2026/11/21 10:58:13 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:13 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:13 console: alert engine: took over from the alert watcher's history
2026/11/21 10:58:13 console: alert engine: list fleets for mailer_unarmed: registry /tmp/TestEnginePassMailerUnarmedFleetBox1331343601/001/registry.db: stat /tmp/TestEnginePassMailerUnarmedFleetBox1331343601/001/registry.db: no such file or directory
2026/11/21 10:58:14 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:14 console: paul@keymail.dev queued a new confirm link for alert connector 1
2026/11/21 10:58:14 console: paul@keymail.dev queued a new confirm link for alert connector 1
2026/11/21 10:58:14 console: paul@keymail.dev queued a new confirm link for alert connector 1
2026/11/21 10:58:14 console: paul@keymail.dev queued a new confirm link for alert connector 1
2026/11/21 10:58:14 console: paul@keymail.dev queued a new confirm link for alert connector 1
2026/11/21 10:58:14 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:14 console: app region bab/shop: (default)
2026/11/21 10:58:14 console: backfilled account manifest for bab (ops)
2026/11/21 10:58:14 console: create bab/shop: analytics setting: hookStore: put refused
2026/11/21 10:58:15 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:16 console: could not notify paul@keymail.dev of a CLI token issue: Post "http://127.0.0.1:34935/api/app/send": dial tcp 127.0.0.1:34935: connect: connection refused
2026/11/21 10:58:18 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:18 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/21 10:58:18 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/21 10:58:18 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/21 10:58:18 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/21 10:58:18 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/21 10:58:18 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/21 10:58:18 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/21 10:58:18 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/21 10:58:18 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/21 10:58:18 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:19 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:19 console: app region bab/control: us (chosen)
2026/11/21 10:58:19 console: backfilled account manifest for bab (ops)
2026/11/21 10:58:19 console: claim bab/control: set default pipeline: set pipeline: no usable release signing key
2026/11/21 10:58:19 console: app region bab/shop: us (chosen)
2026/11/21 10:58:19 console: claim bab/shop: set default pipeline: set pipeline: no usable release signing key
2026/11/21 10:58:19 console: app region bab/svcha: us (chosen)
2026/11/21 10:58:19 console: claim bab/svcha: set default pipeline: set pipeline: no usable release signing key
2026/11/21 10:58:19 console: app region bab/placed: us (chosen)
2026/11/21 10:58:19 console: claim bab/placed: set default pipeline: set pipeline: no usable release signing key
2026/11/21 10:58:19 console: app region bab/adopted: us (chosen)
2026/11/21 10:58:19 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:20 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:20 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:20 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:21 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:21 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/21 10:58:21 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/21 10:58:21 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/21 10:58:21 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/21 10:58:21 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/21 10:58:21 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/21 10:58:21 console: api db bab/titogo/acme.go.tito.io: is generation g-00000000000000000001 retired: head.json: decode instances/acme.go.tito.io/head.json: unexpected end of JSON input
2026/11/21 10:58:21 console: api db bab/titogo/acme.go.tito.io: is generation g-00000000000000000001 retired: head.json: decode instances/acme.go.tito.io/head.json: unexpected end of JSON input
2026/11/21 10:58:21 console: api db bab/titogo/acme.go.tito.io: is generation g-00000000000000000001 retired: head.json: decode instances/acme.go.tito.io/head.json: unexpected end of JSON input
2026/11/21 10:58:21 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:21 console: api instances create bab/titogo: refused: acme.go.tito.io still holds replica data from a deleted record (#199); purge it to free the host
2026/11/21 10:58:21 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:21 console: api sidecars create bab/titogo: refused: bot.titogo.bab.sidecar.internal still holds replica data from a deleted record (#199); purge it to free the host
2026/11/21 10:58:22 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:22 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:22 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%3A46409: could not determine target mailbox
2026/11/21 10:58:22 console: db read dbr_pcxp4cnx74fucqdhxmrtdpfday: relayed 2 chunks (198 bytes) in 52ms, ended done
2026/11/21 10:58:23 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:23 console: could not notify alice@keymail.dev of a CLI token issue: keymail: grant revoked or invalid
2026/11/21 10:58:24 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:24 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:24 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:25 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:25 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:26 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:26 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:26 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:26 console: offline move acme.shop.example.com: ignoring control/offline-moves/acme.shop.example.com/mv_p7kqpkjgkhnjhcd3ujiv3t6zky/seal.json: not the seal of this move
2026/11/21 10:58:26 console: offline move acme.shop.example.com: ignoring control/offline-moves/acme.shop.example.com/mv_p7kqpkjgkhnjhcd3ujiv3t6zky/seal.json: not the seal of this move
2026/11/21 10:58:27 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:27 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:27 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:28 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:28 console: api instances create bab/shop/a.example.com: fleet pi: manifest v1 cannot be verified (release: manifest does not hash to the digest its signer recorded: shop/v1 hashes to 74a160e7379f, the pointer signed 4e7461e89c35); refused
2026/11/21 10:58:28 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:28 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:28 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/21 10:58:28 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/21 10:58:28 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/21 10:58:28 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/21 10:58:28 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/21 10:58:28 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/21 10:58:28 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000003
2026/11/21 10:58:28 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000003 maxTXID=0000000000000003 size=454
2026/11/21 10:58:28 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000003
2026/11/21 10:58:28 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000004
2026/11/21 10:58:28 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000004 maxTXID=0000000000000004 size=537
2026/11/21 10:58:28 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000004 txid.db=0000000000000004
2026/11/21 10:58:28 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000004 txid.db=0000000000000005
2026/11/21 10:58:28 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000005 maxTXID=0000000000000005 size=621
2026/11/21 10:58:28 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000005 txid.db=0000000000000005
2026/11/21 10:58:29 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:29 console: could not notify alice@keymail.dev of a CLI token issue: keymail: grant revoked or invalid
2026/11/21 10:58:29 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:29 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:29 console: link 133cdf9954c6: first channel sync: link 133cdf9954c6: put channel: injected registry failure (linkSyncLoop retries)
2026/11/21 10:58:29 console: link door GET /api/link: link 133cdf9954c6: put channel: injected registry failure
2026/11/21 10:58:30 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:30 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:30 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:31 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:31 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:31 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:32 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:32 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:32 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:33 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:33 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:33 console: api domain placements shop.example.com: overlap read of example.com: rdStore: get refused
2026/11/21 10:58:33 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:34 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:34 console: plan grace bac: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 10:58:34 console: delivery to ownerbyv@example.com: no keymail mailbox, trying email
2026/11/21 10:58:34 console: plan grace bac: notice to ownerbyv@example.com: console: no email sender is configured
2026/11/21 10:58:34 console: plan grace bac: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 10:58:34 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:34 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:34 console: relay enabled bab/titogo in eu-west-1 by alice@keymail.dev (incarnation 9e5c100f6b7a8d90, op 1)
2026/11/21 10:58:34 console: relay disabled bab/titogo by alice@keymail.dev (op 2)
2026/11/21 10:58:35 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:35 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:35 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:35 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:36 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:36 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:36 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:37 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:37 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:37 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:37 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:38 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:38 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:38 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:39 WARN request over performance budget screen="GET /api/cli/apps/{account}/{app}/store/scan/object" method=GET status=200 class=warm latency_ms=301.265008 ttfb_ms=301.265008 body_read_ms=0 total_ms=301.292879 budget_ms=150 spans_ms=map[] calls=map[]
2026/11/21 10:58:39 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:39 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:39 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:39 console: could not notify paul@keymail.dev of a CLI token issue: keymail: lookup paul@keymail.dev: Get "http://127.0.0.1:33491/api/federation/lookup?addr=paul%40keymail.dev&from=console%40127.0.0.1%3A43429": dial tcp 127.0.0.1:33491: connect: connection refused
2026/11/21 10:58:40 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:40 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:40 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:41 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:41 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:41 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:42 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:42 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:42 console: could not notify owner@example.com of a CLI token issue: keymail: lookup owner@example.com: keymail: GET /api/federation/lookup?addr=owner%40example.com&from=console%40127.0.0.1%3A35045: could not determine target mailbox
2026/11/21 10:58:42 console: could not notify ops@example.com of a CLI token issue: keymail: lookup ops@example.com: keymail: GET /api/federation/lookup?addr=ops%40example.com&from=console%40127.0.0.1%3A35045: could not determine target mailbox
2026/11/21 10:58:42 console: could not notify bdq@example.com of a CLI token issue: keymail: lookup bdq@example.com: keymail: GET /api/federation/lookup?addr=bdq%40example.com&from=console%40127.0.0.1%3A35045: could not determine target mailbox
2026/11/21 10:58:42 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:42 console: could not notify alice@keymail.dev of a CLI token issue: Post "http://127.0.0.1:39637/api/app/send": dial tcp 127.0.0.1:39637: connect: connection refused
2026/11/21 10:58:43 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:43 console: geoip upload: unexpected EOF
2026/11/21 10:58:43 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:43 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:43 console: api updates bab/km/a.example.com: enable refused, not every box applies update settings: ie-1: runs a binary that does not apply update settings
2026/11/21 10:58:44 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:44 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:44 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:45 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:45 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:46 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:46 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:47 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:47 console: backfilled account manifest for bab (ops)
2026/11/21 10:58:47 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:47 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:48 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:48 console: billing: account byw: customer create customer:byw:1 not resent (window)
2026/11/21 10:58:48 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:48 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 10:58:48 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 10:58:48 console: billing problem opened: account "byv" subscription sub_1 reason operation_unresolved
2026/11/21 10:58:48 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:48 console: billing money pass: charge ch_live is in the other mode; not recorded
2026/11/21 10:58:49 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:49 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:49 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 10:58:49 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 10:58:50 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:50 console: billing discovery: account 501: billing: reading subscription sub_b: timeout
2026/11/21 10:58:50 console: billing discovery: account 501: billing: reading subscription sub_b: timeout
2026/11/21 10:58:50 console: billing discovery: account 501: billing: reading subscription sub_b: timeout
2026/11/21 10:58:50 console: billing discovery: account 501: billing: reading subscription sub_b: timeout
2026/11/21 10:58:50 console: billing discovery: account 501: billing: reading subscription sub_b: timeout
2026/11/21 10:58:50 console: billing discovery: account 501: billing: reading subscription sub_b: timeout
2026/11/21 10:58:50 console: billing discovery: account 501: billing: reading subscription sub_b: timeout
2026/11/21 10:58:50 console: billing discovery: account 501: billing: reading subscription sub_b: timeout
2026/11/21 10:58:50 console: billing discovery: account 501: billing: reading subscription sub_b: timeout
2026/11/21 10:58:50 console: billing discovery: account 501: billing: reading subscription sub_b: timeout
2026/11/21 10:58:50 console: billing discovery: account 501: billing: reading subscription sub_b: timeout
2026/11/21 10:58:50 console: billing discovery: account 501: billing: reading subscription sub_b: timeout
2026/11/21 10:58:50 console: billing discovery: account 501: billing: reading subscription sub_b: timeout
2026/11/21 10:58:50 console: billing discovery: account 501: billing: reading subscription sub_b: timeout
2026/11/21 10:58:50 console: billing discovery: account 501: billing: reading subscription sub_b: timeout
2026/11/21 10:58:50 console: billing discovery: account 501: billing: reading subscription sub_b: timeout
2026/11/21 10:58:50 console: billing discovery: account 501: billing: reading subscription sub_b: timeout
2026/11/21 10:58:50 console: billing discovery: account 501: billing: reading subscription sub_b: timeout
2026/11/21 10:58:50 console: billing discovery: account 501: billing: reading subscription sub_b: timeout
2026/11/21 10:58:50 console: billing discovery: account 501: billing: reading subscription sub_b: timeout
2026/11/21 10:58:50 console: billing discovery: account 501: billing: reading subscription sub_b: timeout
2026/11/21 10:58:50 console: billing discovery: account 501: billing: reading subscription sub_b: timeout
2026/11/21 10:58:50 console: billing discovery: account 501: billing: reading subscription sub_b: timeout
2026/11/21 10:58:50 console: billing discovery: account 501: billing: reading subscription sub_b: timeout
2026/11/21 10:58:50 console: billing problem opened: account "byv" subscription reason discovery_failing
2026/11/21 10:58:50 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 10:58:50 console: billing discovery: account 501: constraint failed: injected (1811)
2026/11/21 10:58:50 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:50 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 10:58:50 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:50 console: billing discovery: account 501: customer cus_1 has more subscriptions than one list may read; nothing changed
2026/11/21 10:58:50 console: billing discovery: account 501: customer cus_1 has more subscriptions than one list may read; nothing changed
2026/11/21 10:58:51 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:51 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:51 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 10:58:51 console: billing problem opened: account "byv" subscription sub_1 reason subscription_missing
2026/11/21 10:58:51 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 10:58:52 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:52 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 10:58:52 console: billing problem opened: account "byv" subscription sub_1 reason subscription_missing
2026/11/21 10:58:52 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 10:58:52 console: billing problem 1 closed by ops@keymail.dev
2026/11/21 10:58:52 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 10:58:52 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:52 console: backfilled account manifest for bab (ops)
2026/11/21 10:58:52 edges: box "-" has a fresh status snapshot but no edges file under control/edges/, so no region outside the home is automatically eligible until it publishes one; said once
2026/11/21 10:58:52 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:52 console: backfilled account manifest for bab (ops)
2026/11/21 10:58:53 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:53 console: backfilled account manifest for bab (ops)
2026/11/21 10:58:53 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:54 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:54 console: account audit signin: constraint failed: claim: app write not permitted (1811)
2026/11/21 10:58:55 console: account audit signin: constraint failed: claim: app write not permitted (1811)
2026/11/21 10:58:56 console: account audit signin: constraint failed: claim: app write not permitted (1811)
2026/11/21 10:58:57 console: account audit signin: constraint failed: claim: app write not permitted (1811)
2026/11/21 10:58:58 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:59 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:58:59 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:59:00 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:59:00 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:59:01 console: account audit signin: constraint failed: claim: app write not permitted (1811)
2026/11/21 10:59:02 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:59:02 console: could not notify eve@keymail.dev of a CLI token issue: Post "http://127.0.0.1:38453/api/app/send": EOF
2026/11/21 10:59:02 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 10:59:02 console: bab/kass has no trash marker and still has objects; restoring it here
2026/11/21 10:59:03 console: edge proof: first signed request from the edge — X-Forwarded-For from loopback now needs a proof
2026/11/21 10:59:05 console: finished seed sd_us4b3q3uxqkbdoadwazruothaa of byv/happy-lily-82/happy-lily-82.byv.apps.example.com
2026/11/21 10:59:07 console: demo job "Yu4ltVCElebI5gTXRLNi7Y0kE_gQ47H_cwxCA8vsmho": invalid spool ""; failed or pending publication settlement
2026/11/21 10:59:45 edge: tunnel demo/box: connected from 127.0.0.1:37726
2026/11/21 10:59:45 edge: tunnel demo/box: connected from 127.0.0.1:34130
2026/11/21 10:59:56 provision: minted instance route merry-heron-34.demo.example.com (app "tmp-demo-merry-heron-34" acct "bbw")
2026/11/21 10:59:56 provision: forward merry-heron-34.demo.example.com: minted (app "tmp-demo-merry-heron-34" acct "bbw" region "fleet/demo")
--- FAIL: TestDemoProtectionsSourceToLimitAndTakedown (48.49s)
demo_protections_e2e_test.go:403: Get "/state": unsupported protocol scheme ""
demo_protections_e2e_test.go:166: worker log:
2026/11/21 10:59:59 console: demo publication RjpHoSM-qkY5AHctQ5Uzd1ddIxfCkCFmJr0lq3AlWM8: demo-build: settling failed publication
2026/11/21 10:59:59 console: demo restore readiness RjpHoSM-qkY5AHctQ5Uzd1ddIxfCkCFmJr0lq3AlWM8: Get "https://lunar-dove-79.demo.example.com/": context deadline exceeded
2026/11/21 11:00:00 edge: tunnel demo/box: ping failed (EOF) — dropping channel
2026/11/21 11:00:00 edge: tunnel demo/box: ping failed (EOF) — dropping channel
2026/11/21 11:00:04 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:04 console: backfilled account manifest for bab (ops)
2026/11/21 11:00:05 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:05 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:06 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:07 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:07 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 11:00:07 console: domain purchase pass: off on a host-claim console, where buying domains is off
2026/11/21 11:00:07 console: could not notify ownerbyv@example.com of a CLI token issue: keymail: lookup ownerbyv@example.com: keymail: GET /api/federation/lookup?addr=ownerbyv%40example.com&from=console%40127.0.0.1%3A37833: could not determine target mailbox
2026/11/21 11:00:07 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:07 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 11:00:08 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:08 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 11:00:08 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:08 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 11:00:08 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:08 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 11:00:08 console: domain purchase: account=byv domain=shop.com purchase=dp_056d273eb83a80fe reason=registering
2026/11/21 11:00:09 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:09 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:10 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:10 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:10 console: load economics: fleet meters unavailable: console: fleet meters: registry /tmp/TestLoadEconomicsDegradesWithoutRegistry2865929399/003/nonexistent-registry.db: stat /tmp/TestLoadEconomicsDegradesWithoutRegistry2865929399/003/nonexistent-registry.db: no such file or directory
2026/11/21 11:00:10 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:11 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:11 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:11 console: app metrics kass: console: no deployment bucket, so no metrics to read
2026/11/21 11:00:11 console: app metrics kass: console: no deployment bucket, so no metrics to read
2026/11/21 11:00:11 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:11 console: backfilled account manifest for bab (ops)
2026/11/21 11:00:12 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:12 console: expiry pass: early purge bab/tmp-a: release: bab/tmp-a was trashed at 2026-11-21T10:00:12Z, not 2026-11-18T11:00:12Z: release: the trash marker is not the one the purge was decided for
2026/11/21 11:00:12 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:12 console: bab/tmp-a is in the trash in the bucket; marking it trashed here
2026/11/21 11:00:12 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:12 provision: skipping record apps/bab/kass/instances/bad.go.tito.io.json: malformed: provision: invalid maintenance projection or protected fields
2026/11/21 11:00:12 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:12 provision: skipping record apps/bab/kass/instances/bad.go.tito.io.json: disagrees with its own path (host="elsewhere.go.tito.io" account="bab" app="kass")
2026/11/21 11:00:13 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:13 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:13 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:14 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:14 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:14 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:14 console: fleet relabel pi: a.example.com from pi-2 to pi-1 (lost)
2026/11/21 11:00:14 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:14 console: fleet relabel pi: a.example.com from pi-2 to pi-1 (lost)
2026/11/21 11:00:15 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:15 console: fleet relabel pi: a.example.com from pi-1 to pi-3 (lost)
2026/11/21 11:00:15 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:15 console: fleet drain pi/pi-1: draining since 2026-11-21T11:00:15.499544662Z, 1 records to move
2026/11/21 11:00:15 console: fleet relabel pi: a.example.com from pi-1 to pi-3 (drain)
2026/11/21 11:00:15 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:15 console: fleet relabel pi: a.example.com from pi-1 to pi-2 (lost)
2026/11/21 11:00:16 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:16 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:18 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:19 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:20 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:20 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:20 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:21 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:21 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:21 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:22 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:22 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:22 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:23 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:23 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:23 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:24 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:24 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:24 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:25 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:25 console: home link 0123456789ab: published bab/shop as shop
2026/11/21 11:00:25 console: home link 0123456789ab: unpublished shop
2026/11/21 11:00:25 console: home link 0123456789ab: unpublished shop
2026/11/21 11:00:25 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:25 console: lifetimes: before -> draining
2026/11/21 11:00:25 console: lifetimes: draining -> on
2026/11/21 11:00:25 console: lifetimes: allocation 3044c3bc9f5ba9a51273225f7bee6eb0 of one.shop.example.com: write the record: the bucket did not answer (pending)
2026/11/21 11:00:25 console: api instances create bab/shop/one.shop.example.com: console: the lifetime operation is pending; recovery finishes it
2026/11/21 11:00:25 console: the hostname history is invalidated: a pending create for one.shop.example.com would publish a record the history does not cover
2026/11/21 11:00:25 alerting: page not delivered, no sink configured (set CARLOS_ALERT_SNS_TOPIC_ARN or CARLOS_ALERT_WEBHOOK): the hostname history is invalidated: a pending create for one.shop.example.com would publish a reco
2026/11/21 11:00:25 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:25 console: lifetimes: before -> draining
2026/11/21 11:00:25 console: lifetimes: draining -> on
2026/11/21 11:00:25 console: lifetimes: allocation fd12c65389a4744935f30ea7954bd83d of one.shop.example.com: remove the stale record: the bucket did not answer (pending)
2026/11/21 11:00:25 console: api instances create bab/shop/one.shop.example.com: console: the lifetime operation is pending; recovery finishes it
2026/11/21 11:00:25 console: the hostname history is invalidated: a pending create for one.shop.example.com would publish a record the history does not cover
2026/11/21 11:00:25 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:26 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:26 console: lifetimes: before -> draining
2026/11/21 11:00:26 console: lifetimes: draining -> on
2026/11/21 11:00:26 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:26 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:26 console: lifetimes: before -> draining
2026/11/21 11:00:26 console: lifetimes: draining -> on
2026/11/21 11:00:27 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:27 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:27 console: lifetimes: before -> draining
2026/11/21 11:00:27 console: lifetimes: draining -> on
2026/11/21 11:00:27 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:27 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:27 console: lifetimes: before -> draining
2026/11/21 11:00:27 console: lifetimes: draining -> on
2026/11/21 11:00:28 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:28 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:28 console: lifetimes: before -> draining
2026/11/21 11:00:28 console: lifetimes: draining -> on
2026/11/21 11:00:28 console: lifetimes: box ie-box regressed below the lifetimes floor
2026/11/21 11:00:28 console: lifetimes: box uk-box regressed below the lifetimes floor
2026/11/21 11:00:28 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:28 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/21 11:00:28 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/21 11:00:28 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/21 11:00:28 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/21 11:00:28 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/21 11:00:28 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/21 11:00:28 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000003
2026/11/21 11:00:28 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000003 maxTXID=0000000000000003 size=454
2026/11/21 11:00:28 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000003
2026/11/21 11:00:29 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:29 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/21 11:00:29 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/21 11:00:29 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/21 11:00:29 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/21 11:00:29 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/21 11:00:29 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/21 11:00:29 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000003
2026/11/21 11:00:29 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000003 maxTXID=0000000000000003 size=454
2026/11/21 11:00:29 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000003
2026/11/21 11:00:29 console: lifetimes: before -> draining
2026/11/21 11:00:29 console: lifetimes: draining -> on
2026/11/21 11:00:29 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:29 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:29 console: lifetimes: before -> draining
2026/11/21 11:00:29 console: lifetimes: draining -> on
2026/11/21 11:00:30 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:30 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:30 console: lifetimes: before -> draining
2026/11/21 11:00:30 console: lifetimes: draining -> on
2026/11/21 11:00:30 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:31 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:31 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:31 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:31 console: backfilled account manifest for bab (ops)
2026/11/21 11:00:32 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:32 console: could not notify alice@keymail.dev of a CLI token issue: keymail: grant revoked or invalid
2026/11/21 11:00:32 console: lifetimes: before -> draining
2026/11/21 11:00:32 console: lifetimes: draining -> on
2026/11/21 11:00:32 console: lifetimes: allocation 0798ddf6d89c03cba37d48cb370fb90d of one.shop.example.com: write the record: the bucket did not answer (pending)
2026/11/21 11:00:32 console: api instances create bab/shop/one.shop.example.com: console: the lifetime operation is pending; recovery finishes it
2026/11/21 11:00:32 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:32 console: lifetimes: the cutover marker is written (by paul@keymail.dev); admission is closed to legacy work
2026/11/21 11:00:32 console: lifetimes: draining -> on
2026/11/21 11:00:33 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:33 console: lifetimes: before -> draining
2026/11/21 11:00:33 console: lifetimes: draining -> on
2026/11/21 11:00:33 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:33 console: lifetimes: before -> draining
2026/11/21 11:00:33 console: lifetimes: draining -> on
2026/11/21 11:00:34 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:34 console: lifetimes: before -> draining
2026/11/21 11:00:34 console: lifetimes: draining -> on
2026/11/21 11:00:34 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:34 console: lifetimes: before -> draining
2026/11/21 11:00:34 console: lifetimes: draining -> on
2026/11/21 11:00:34 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:34 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:39 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:39 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:40 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:40 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:40 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:41 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:41 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:41 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:41 console: alert engine: took over from the alert watcher's history
2026/11/21 11:00:41 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:42 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:42 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:42 console: backfilled account manifest for bab (ops)
2026/11/21 11:00:42 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:45 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:45 console: app region bab/settle: (default)
2026/11/21 11:00:45 console: backfilled account manifest for bab (ops)
2026/11/21 11:00:46 console: claim SQL receipt database moved from instance i-original to i-clone; it has a new database ID, and effects bound to the old one stay unsettled
2026/11/21 11:00:47 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:47 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:47 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:47 console: plan grace bab: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 11:00:47 console: billing problem opened: account "byv" subscription sub_other reason unknown_customer
2026/11/21 11:00:48 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:48 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:48 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 11:00:48 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 11:00:48 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 11:00:48 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 11:00:48 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 11:00:48 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 11:00:48 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:49 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:49 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:49 console: backfilled account manifest for bab (ops)
2026/11/21 11:00:49 console: app protection bab/shop: parse usage/edge/box-b/days/2026-11-21.json: invalid character 'n' looking for beginning of object key string
2026/11/21 11:00:49 console: app protection data bab/shop: parse usage/edge/box-b/days/2026-11-21.json: invalid character 'n' looking for beginning of object key string
2026/11/21 11:00:49 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:50 WARN request over performance budget screen="GET /a/{sqid}/apps/{app}/logs/data" method=GET status=200 class=warm latency_ms=264.245346 ttfb_ms=264.245346 body_read_ms=0 total_ms=264.300064 budget_ms=150 spans_ms=map[db:0.319939] calls=map[]
2026/11/21 11:00:51 WARN request over performance budget screen="GET /api/cli/apps/{account}/{app}/logs" method=GET status=200 class=warm latency_ms=279.629523 ttfb_ms=279.629523 body_read_ms=0 total_ms=279.718484 budget_ms=150 spans_ms=map[] calls=map[]
2026/11/21 11:00:51 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:51 edges: could not read control/edges/uk-box-2.json for the placement join: read timeout
2026/11/21 11:00:51 console: an incomplete read of the edges files or box snapshots (edges complete false, snapshots complete false), so no region outside the home is automatically eligible this request; said once
2026/11/21 11:00:51 status: fleet: skipping status/boxes/uk-box-2.json: read failed: read timeout
2026/11/21 11:00:51 edges: box "uk-box-2" has an edges file under control/edges/ but no status snapshot at all, so no region outside the home is automatically eligible until it reports; said once
2026/11/21 11:00:51 status: fleet: skipping status/boxes/uk-box-2.json: corrupt snapshot: invalid character 'n' looking for beginning of object key string
2026/11/21 11:00:51 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:51 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:52 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:52 console: backfilled account manifest for bab (ops)
2026/11/21 11:00:52 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:52 console: backfilled account manifest for bab (ops)
2026/11/21 11:00:52 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:52 console: backfilled account manifest for bab (ops)
2026/11/21 11:00:52 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:53 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:53 console: relay enabled bab/titogo in eu-west-1 by alice@keymail.dev (incarnation b0a605166195429e, op 1)
2026/11/21 11:00:53 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:53 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:54 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:54 provision: minted instance route eu.shop.example.com (app "shop" acct "mtz")
2026/11/21 11:00:54 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:54 console: could not notify paul@keymail.dev of a CLI token issue: keymail: grant revoked or invalid
2026/11/21 11:00:54 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:54 console: could not notify paul@keymail.dev of a CLI token issue: keymail: grant revoked or invalid
2026/11/21 11:00:54 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:54 console: could not notify paul@keymail.dev of a CLI token issue: keymail: grant revoked or invalid
2026/11/21 11:00:55 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:55 console: could not notify paul@keymail.dev of a CLI token issue: keymail: grant revoked or invalid
2026/11/21 11:00:55 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:55 console: could not notify paul@keymail.dev of a CLI token issue: keymail: grant revoked or invalid
2026/11/21 11:00:55 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:55 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:57 WARN request over performance budget screen="POST /api/cli/apps/{account}/{app}/promote" method=POST status=200 class=write latency_ms=997.415148 ttfb_ms=997.98751 body_read_ms=0.572362 total_ms=998.012951 budget_ms=500 spans_ms=map[] calls=map[]
2026/11/21 11:00:58 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:58 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:58 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:59 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:59 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:59 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:00:59 console: fleet drain pi/pi-2: draining since 2026-11-21T11:00:59.868989474Z, 0 records to move
2026/11/21 11:01:00 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:00 console: fleet drain pi/pi-2: draining since 2026-11-21T11:01:00.175897405Z, 0 records to move
2026/11/21 11:01:00 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:00 console: could not notify alice@keymail.dev of a CLI token issue: keymail: grant revoked or invalid
2026/11/21 11:01:00 console: lifetimes: before -> draining
2026/11/21 11:01:00 console: lifetimes: draining -> on
2026/11/21 11:01:00 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:00 console: could not notify alice@keymail.dev of a CLI token issue: keymail: grant revoked or invalid
2026/11/21 11:01:00 console: lifetimes: before -> draining
2026/11/21 11:01:00 console: lifetimes: draining -> on
2026/11/21 11:01:00 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:01 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:01 console: backfilled account manifest for bab (ops)
2026/11/21 11:01:01 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:01 console: rootfs head bab/shop: read the app's kind: injected read failure
2026/11/21 11:01:01 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:02 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:02 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:02 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:02 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:03 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:03 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:03 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:03 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:04 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:04 console: run sweep: list records: provision: list accounts: context deadline exceeded
2026/11/21 11:01:04 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:04 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:05 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:05 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:05 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:05 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/21 11:01:05 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/21 11:01:05 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/21 11:01:05 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/21 11:01:05 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/21 11:01:05 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/21 11:01:05 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000003
2026/11/21 11:01:05 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000003 maxTXID=0000000000000003 size=454
2026/11/21 11:01:05 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000003
2026/11/21 11:01:05 console: finish seed sd_2aptpkwp5s4ts2gysinmky4jpq of canary.shop.example.com: deleted 3 replica objects under instances/canary.shop.example.com/
2026/11/21 11:01:05 console: finished seed sd_2aptpkwp5s4ts2gysinmky4jpq of bab/shop/canary.shop.example.com
2026/11/21 11:01:05 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:06 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:06 console: seeds floor: published floor has no usable min_release ""
2026/11/21 11:01:06 console: seeds floor: published floor has no usable min_release ""
2026/11/21 11:01:06 console: seeds floor: published floor has no usable min_release "next"
2026/11/21 11:01:06 console: seeds floor: seeds: parse floor: invalid character 'o' in literal null (expecting 'u')
2026/11/21 11:01:06 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:06 console: seeds pass: list fleet seed snapshots: fleet pi: bab/shop: listing unavailable (no fleet seed's snapshot swept this pass)
2026/11/21 11:01:06 console: seeds pass: deleted seeds/region.other.example.com/sd_qsrubk37yx7dvfv2lwoq4k2xty/snapshot.db
2026/11/21 11:01:06 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:06 console: seeds pass: abandoned seed sd_j2fttdzwc3qixyaygh4zy4cl2u of bab/shop/stale.shop.example.com (reserving since 2026-11-21T09:01:06Z)
2026/11/21 11:01:06 console: finished seed sd_2uv2sgj3klohl3mjl3nfa7czb4 of bab/shop/done.shop.example.com
2026/11/21 11:01:06 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:07 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:07 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:07 console: backfilled account manifest for bab (ops)
2026/11/21 11:01:07 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:07 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:08 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:08 console: ses events: recording Send for bab/docs/app -> SQL logic error: no such table: mail_sender_counts (1)
2026/11/21 11:01:08 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:08 console: materialized account bac (Testco) from the bucket
2026/11/21 11:01:08 console: bac/perm is in the trash in the bucket — marking it trashed here
2026/11/21 11:01:08 console: bac/tmp-a is in the trash in the bucket — marking it trashed here
2026/11/21 11:01:08 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:09 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:09 console: refused: no eligible box in ie
2026/11/21 11:01:09 console: claim request refused: no eligible box in ie: hostops: region has no box that can take this
2026/11/21 11:01:09 alerting: page not delivered, no sink configured (set CARLOS_ALERT_SNS_TOPIC_ARN or CARLOS_ALERT_WEBHOOK): No box in ie has room
2026/11/21 11:01:09 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:10 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:10 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:11 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:11 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:11 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:15 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:15 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:16 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:16 console: could not notify alice@keymail.dev of a CLI token issue: keymail: grant revoked or invalid
2026/11/21 11:01:16 console: lifetimes: before -> draining
2026/11/21 11:01:16 console: lifetimes: draining -> on
2026/11/21 11:01:16 console: lifetimes: allocation 4fd95145ca17cfe92a05fddc30433657 of shop.harbour.oncarlos.com: write the record: the bucket did not answer (pending)
2026/11/21 11:01:16 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:16 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:17 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:17 console: could not notify alice@keymail.dev of a CLI token issue: keymail: grant revoked or invalid
2026/11/21 11:01:17 console: lifetimes: before -> draining
2026/11/21 11:01:17 console: lifetimes: draining -> on
2026/11/21 11:01:17 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:17 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:18 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:18 console: backfilled account manifest for bab (ops)
2026/11/21 11:01:18 console: restore tests: listing control/verify/: throttled; next try at 2026-11-12T17:49:06Z
2026/11/21 11:01:18 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 11:01:18 console: app region bab/kass: (default)
2026/11/21 11:01:18 console: backfilled account manifest for bab (ops)
FAIL
FAIL github.com/carlosframework/platform/internal/console 188.341s
FAIL
=== internal_console@6 (198 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 190.405s
=== internal_console@7 (193 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 185.204s
=== internal_console@8 (212 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 204.730s
=== internal_console@9 (238 s, from +203 s)
ok github.com/carlosframework/platform/internal/console 232.208s
=== internal_console@10 (250 s, from +203 s)
ok github.com/carlosframework/platform/internal/console 242.313s
=== internal_console@11 (203 s, from +203 s)
ok github.com/carlosframework/platform/internal/console 196.362s
=== internal_console@12 (303 s, from +203 s)
ok github.com/carlosframework/platform/internal/console 296.164s
=== internal_console@13 (192 s, from +203 s)
ok github.com/carlosframework/platform/internal/console 184.661s
=== internal_console@14 (193 s, from +203 s)
ok github.com/carlosframework/platform/internal/console 187.101s
=== internal_console@15 (203 s, from +203 s)
ok github.com/carlosframework/platform/internal/console 196.618s
=== internal_console@16 (194 s, from +203 s)
ok github.com/carlosframework/platform/internal/console 187.511s
=== internal_console@17 (190 s, from +203 s)
ok github.com/carlosframework/platform/internal/console 183.921s
=== internal_console@18 (226 s, from +203 s)
ok github.com/carlosframework/platform/internal/console 219.794s
=== internal_console@19 (194 s, from +203 s)
ok github.com/carlosframework/platform/internal/console 186.560s
=== internal_console@20 (197 s, from +203 s)
ok github.com/carlosframework/platform/internal/console 191.261s
=== internal_console@21 (210 s, from +203 s)
ok github.com/carlosframework/platform/internal/console 203.528s
=== internal_console@22 (202 s, from +203 s)
ok github.com/carlosframework/platform/internal/console 195.139s
=== internal_console@23 (216 s, from +203 s)
ok github.com/carlosframework/platform/internal/console 208.736s
=== lists: internal_console 201 s, internal_edge 159 s, internal_activator 129 s, internal_host 195 s, root 158 s, internal_grouproll 68 s
=== cpu: the gate used 12346 cpu-seconds in 507 s, about 24.4 of 32 cores; the machine as a whole was 78% busy
Failure summary:
--- internal_console@5
--- FAIL: TestDemoProtectionsSourceToLimitAndTakedown (48.49s)
demo_protections_e2e_test.go:403: Get "/state": unsupported protocol scheme ""
demo_protections_e2e_test.go:166: worker log:
FAIL github.com/carlosframework/platform/internal/console 188.341s
FAILED: internal_console@5
make: *** [Makefile:23: test] Error 1
amadan: step gate failed: exit status 2
amadan: job failed at step gate — its output is above, not at the tail of this log
diff --git a/docs/superpowers/notes/census-proposal-fleet-restart-wake.md b/docs/superpowers/notes/census-proposal-fleet-restart-wake.md| new file mode 100644 |
| index 000000000..967fb1463 |
| --- /dev/null |
| +++ b/docs/superpowers/notes/census-proposal-fleet-restart-wake.md |
| @@ -0,0 +1,35 @@ |
| +# Census approval: fleet-restart-wake |
| + |
| +Ruling `census-ruling-fleet-restart-wake`. The independent reviewer approves or rejects every change below, 1 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26). |
| + |
| +| unit | change | read sites | what changed | |
| +|---|---|---|---| |
| +| `internal/activator/activator.go` `Service.serve` | body | unchanged (18) | Fleet restart wake Task 1: the sidecar request path answers the maintenance 503 for fenceRefusal (the activator ErrFenced or replicas.ErrFenced, bare or wrapped) where it named ErrFenced. No read added; agent, not root. | |
| +| `internal/activator/activator.go` `Service.serveWakeError` | body | unchanged (5) | Fleet restart wake Task 1: the fence case is fenceRefusal, so a replicas.ErrFenced refusal answers the maintenance 503 as ErrFenced does, not wake-failed. No read added; agent, not root. | |
| +| `internal/activator/activator.go` `Service.wake` | body | unchanged (16) | Fleet restart wake Task 1: comment only. The said-already branch now also covers a replica fence refusal, which noteHeldWake journals once per change (noteReplicaFence) with no member event. No read added. | |
| +| `internal/activator/activator.go` `type Service` | body | unchanged (0) | Fleet restart wake Task 1: the per-host journal note maps (wakeFailLogged, heldSeen) move into the embedded wakeNotes struct in wakefaillog.go, which adds fenceSeen. In-memory only; no read added. | |
| +| `internal/activator/stateless.go` `Service.statelessObservation` | body | unchanged (6) | Fleet restart wake Task 2: passes the wake ctx to cfg.ReplicaRecord, whose signature now takes a ctx. Same reads; the exec gate fresh record read (statelessFinalRecord, R1) is unchanged and still decides. | |
| +| `internal/host/agent.go` `runAgent` | body | unchanged (8) | 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. | |
| +| `internal/host/agent.go` `replicaRecordFacts` | sites | -registry:App, -registry:Host | Fleet restart wake Task 2 and review round 1 P2-1: the body makes one in-memory replicaMissMemo per closure and delegates to replicaRecordObservation (replicarecord.go), so its registry:App and registry:Host sites moved there. An index hit is answered as before with no read. Agent (uid carlos), not root; no read added here. | |
| + |
| +Envelopes re-pinned: `internal/activator`, `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/activator/activator.go` `Service.serve`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-hotfix281;basis=Startup repeats the existing Kind and Hibernate checks; error logging moved to serveWakeError. A request held through startup re-reads its own route's Socket and Addr and can only refuse (wake-timeout 503) when recovery moved them; agent-side, deny-only, no root decision.;rev3=census-ruling-edge-request-records;basis=passes the member request r to begin's new req parameter; no read added;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 5: the activator-managed test is Route.ActivatorOwned instead of Kind and Hibernate inline, so a resident rootfs instance is the activator's; same deploy-safety for binary rows;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: a verified HA hop this box cannot serve gets the holder diagnostic; two new whole:Route sites pass the route to answerForwarded/noteNoHolder; no new kind of read;rev3=census-ruling-region-ha-g2-fixes;basis=Refuse latched HA lease loss before startup wait or proxy accounting, and schedule bounded recovery; reads supplied route, no new external read here.;rev3=census-ruling-region-ha-held-build;basis=region HA held-requests Task 2: after begin succeeds, edge.ReleaseMoveTicket(r) ends the request's in-memory admission ticket; on the sidecar path the same after BeginSidecarRequest; no read added;rev3=census-ruling-held-move-speed;basis=after begin succeeds, wraps r with an edge.StreamEnd (a cancellable child context) and tracks it under rt.Host in the in-memory moveStreams until the request ends (+registry:Host: the supplied route's Host as the map key); no new kind of read, no root decision;rev3=census-ruling-retry-after-503;basis=the sidecar-asleep 503 is written through edge.Unavailable (Retry-After 5 unchanged, adds answer/box headers); no read added;rev3=census-ruling-stateless-replicas-4-drill3;basis=review round 1 (R27): its four refusals before the proxy runs (HA lease refusal, awaitStartup, the near-startup recheck, begin) call serveWakeErrorBeforeApp instead of serveWakeError; no read added, same 18 sites; the activator in the agent, no root decision |
| +- `internal/activator/activator.go` `Service.serveWakeError`: diagnostic, task C,J4. Basis: rev3=PROPOSED-seed; incarnation-keyed missing-files diagnostics and indexed retry results; throttles output only and grants no retry, stop or launch;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: one more case, errLeaseRefused (a born-HA host outside the nested layout or an HA acquire's refusal): logged at most once per diagnostic window (allowFilesDiagnostic(rt.Host, ...)) and answered 503 with Retry-After: 10; the other cases unchanged; +registry:Host x2 are rt.Host in that call and the log line; it only answers;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: two new answers, a resident inside its backoff gets 503 with Retry-After (RFS-3-C16), and a rootfs row refused before the lease (errRootfsNotAdmitted) gets the existing wake-failed 503; no read added;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: for a verified HA hop, a held lease answers 503 Retry-After 1 with X-Carlos-Holder (answerForwarded) and every other refusal adds X-Carlos-Holder: none (noteNoHolder); legacy routes and cancellation unchanged; same reads;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: neutral admission 503 with Retry-After before forwarded-holder diagnostics; no new read, no holder identity. Fix R1: distinguish startup from drain/shutdown using the same admission state; retain 503, Retry-After, no-store and removal of holder identity. Read sites unchanged.;rev3=census-ruling-region-ha-g2-fixes;basis=Answer latched HA loss and pool refusal with the shared unavailable response; no new read.;rev3=census-ruling-region-ha-shutting-down-retry;basis=Task 0: errShuttingDown (a request met by Shutdown, #292) is answered with the existing admission unavailable 503 (Retry-After: 10, no-store, holder removed), before answerForwarded, instead of the default wake-failed 503 with no Retry-After and a wake log line; no new read, read sites unchanged.;rev3=census-ruling-retry-after-503;basis=every case answers through edge.Unavailable with its own site name; Retry-After values unchanged; rootfs-not-admitted and the default wake-failed answer now carry Retry-After 5 (#421); no read added |
| +- `internal/activator/activator.go` `Service.wake`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-carlos-run;basis=Re-digested at the pre-land merge: the body includes main's own change under census ruling 292, with no further change from this branch. the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body; the stop now carries its reason for a run it interrupts (beginStopLocked's why argument); read sites unchanged, offsets moved;rev3=census-ruling-wake-latency-1;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=logs that timer's breakdown to the journal after a successful wake (w.steps.String(), e.host, w.wakeTook); no read added;rev3=census-ruling-plans-4d-lapse;basis=cancels a wake whose row the turned-off hook names, like a fence, unless it is a move's active probe (plans 4d). One more whole-row read: the row handed to the hook (a.disabled). Only refuses.;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: a refusal before the lease is reported once per change (noteRootfsRefusal) instead of a wake-failure event; the proc, generation and replica are installed through installProcLocked (which puts a resident under its lease watch before the fence); residency notes the outcome (noteResidentWakeLocked); same generation values;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R [pf R3.5]: the wake's context ceiling is wakeCeilingFor(e.route): the old 5 minutes for a binary row, 5 minutes plus runs.MaxTimeout for a rootfs row (room for a release inside the wake); new site +whole:Route (e.route to wakeCeilingFor, which reads Runtime only); no other change;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (branch review R1 P1-1): the wake's context is also cancelled before doWake when RetireExcept has marked the entry retired (e.retired, in memory under a.mu), as it is for a fence or a shutdown. Read sites unchanged (13). Agent, not root; it only refuses more.;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Carry successful hold preparation into its wake, preserve actual mode in the generation and OnWake projection, and project serving version/mode through the narrow registry writer before releasing wake waiters. Final review I1: SetServingMode only for non-worker successful wakes with a nonempty spawned version and either a stateless generation or a mode transition from the route. Ordinary stateful wakes leave rollout status and the wake critical path unchanged.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds a.cancelHeldLegsLocked(e, 0) on the failed-wake path before the entry is deleted, and after close(e.ready) on success calls a.noteHeldAdmissible(e.host), the non-blocking held wake callback, outside a.mu. No read added.;rev3=census-ruling-wake-storm-cap;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): waits for a box-wide wake slot (acquireWakeSlot, an in-memory buffered channel) before doWake; the fence/shutdown/retired/disabled refusals move into refuseWakeLocked and are asked again after admission (one fewer direct whole-Route read here: a.disabled(e.route) now runs inside refuseWakeLocked, same value); e.wakeStart is set at admission and e.admitted marks it. Only waits and refuses more; no new read.;rev3=census-ruling-region-ha-p1b3b-t;basis=Install the successful-acquire observer and restrict due, worker and resident starts before doWake, off a.mu. Add a whole-route argument to restriction; refused work has known-no-start evidence.;rev3=census-ruling-region-ha-g2-fixes;basis=Bind recovery wakes to the service lifetime; no new read.;rev3=census-ruling-edge-page-cache-1;basis=the generation-current call is now noteCurrent(e) instead of noteCurrent(e.host, e.gen.N), so the new noteCurrent can also publish the process's page cache launch inputs; read sites unchanged (16); no read added;rev3=census-ruling-fix-silent-start-kill-861;basis=#861: a failed wake that journalledWakeFailure counts as a real failure is logged through logWakeFailure (rate-limited per host, in memory); a successful wake calls clearWakeFailure. Agent, not root; reads the error already in hand; no read added;rev3=census-ruling-stateless-replicas-4-task5;basis=Task 5 first commit (#511 F11 log dedupe): before a failed wake's member event, noteHeldWake (in-memory, per host, under the leaf wakeFailMu) tells whether the failure is held by a release attempt with no backoff and is the same (attempt ID, error class) as the host's last one; a repeat writes no event, a first or changed one writes one journal line and the event. Reads only the error in hand; no read site added.;rev3=census-ruling-stateless-replicas-4-merge-main;basis=Merge of main 5fac2ff1: both sides changed it. Main (27d3f501, activator-settle-wait) adds the background counter increment and deferred decrement at entry; this branch (Task 5) keeps its own changes. Both kept as-is; no read added.;rev3=census-ruling-g6-fence;basis=G6 F-C Task 3, the agent as carlos: a wakeReturned test seam (nil in production) after doWake; on a failed wake of an entry the write fence marked (e.writeFenced, in memory) e.err wraps ErrHALeaseUnavailable; at the awake transition a marked entry begins the existing StopLeaseLost stop before e.ready closes. Only refuses and stops more; no read added; no kill, no root call.;rev3=census-ruling-drain-quiesce-1062;basis=#1062: the failed-wake cleanup calls endHARecoveryLocked(e) as it removes the entry (in-memory, under a.mu); read sites unchanged, no read added |
| +- `internal/activator/activator.go` `type Service`: authority, task B,C,D,F,J4. Basis: rev3=PROPOSED-seed; existing activator lifecycle and due-wake state plus owned seed exclusion and incarnation-keyed diagnostics; normal refusal and preparation ordering remain authoritative; PROPOSED-plans-2-box-limits adds the idleFor hook field, which only narrows idle windows;rev3=census-ruling-plans-4c-box-throttle;basis=gains the maxRunFor hook field beside idleFor (plans 4c). No read added.;rev3=census-ruling-plans-4d-lapse;basis=gains the disabledFor hook field beside maxRunFor (plans 4d). No read added.;rev3=census-ruling-remote-instance-metrics;basis=gains tenancySeq, hostTenants and hostMixed, in-memory fields for Tenancies; no read added;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: one more field, markers (markerRetry: an atomic running flag and the last log time) for retryOwedMarkers; no read added; merge of origin/main d7ae1d76: main's fields are kept as main has them (census-ruling-remote-instance-metrics: tenancySeq, hostTenants, hostMixed); this branch's change is the same as above;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: new fields for rootfs admission (rootfsArmed, rootfsSwept), the per-host gate ask and refusal memo, and residency state (lister, backoff, start ceiling, cursor, test seam); no read;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R: one new field, releaseOps (host to the in-memory release record, under a.mu); no read;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W: one new field, leaseNow (a clock seam for a worker start's headroom against the lease deadline, nil is the real clock); no read;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: gains the holder cache and its single-flight state; no read;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (controller ruling after branch review R1, and Paul's R2 ruling): one field, Fleet (activator.FleetWake: the box's fleet state, not on a fleet by default, on a fleet with a known label and a record reader, or on a fleet with an invalid identity), set by the agent before Start and read only by routeCurrentUnderLease. No read in the declaration. Agent, not root.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a fix round 1: one field, drainBudget (time.Duration), which New copies from residentDrainBudget and a rootfs entry's lease watch reads in its place, so a test's change of the package var never races a watch goroutine; declaration only, reads nothing; merge of origin/main 6f1f6ca6: main's one field, Fleet (activator.FleetWake), is kept as main has it (census-ruling-managed-fleets-1b); this branch's change is the same as above;rev3=census-ruling-region-ha-p1b3a;basis=Add bounded placement peer and diagnostic state and the over-capacity callback; no read in this declaration and no new root authority.;rev3=census-ruling-stateless-replicas-1;basis=Add coordinator, existing-record observation callback and per-host preparation locks; no read in the declaration. Task 3a: Add optional canonical storage-selection and durable deploy-ID callbacks; declaration only, no read or authority in these fields.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds the heldLegs map to actEntry (legs by id, under a.mu) and heldWakeHook (atomic pointer to a callback) and heldLegSeq (atomic counter) to Service. State only, in memory; no read of tenant, app or box-agent-writable input.;rev3=census-ruling-wake-storm-cap;basis=the agent as carlos: one field, wakeSlots (chan struct{}, the wake semaphore made by New from Config.WakeSlots, default 4); declaration only, no read.;rev3=census-ruling-region-ha-p1b3b-t;basis=Add the B2 DutyStore interface field and process-local duty view, suppression and invalidation state. No read added. B2 adds the verified-successor identity callback; no read in the declaration. B3b adds a nonblocking departure-suspicion callback, invoked only after an accepted holder-forward failure and after cache locks release; it cannot authorize a take.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: immutable callbacks installed before Start for tenant admission, local start permission, fixed route exemptions and shutdown closure; nil callbacks preserve switch-off behavior; no new reads. Fix R1: add an immutable startup-phase callback for response copy, set before service startup. No new read or execution authority.;rev3=census-ruling-region-ha-g2-fixes;basis=Add in-memory HA loss state and pool withdrawal jobs; no new read.;rev3=census-ruling-region-ha-held-build;basis=region HA held-requests Task 1: one new field, drain (drainSources: two atomic func pointers for this box's and peers' drain state); no read added. region HA held-requests Task 2: one new field, moves (moveTable: per-host move state, hold counts and admission tickets in memory, under mu); no read added;rev3=census-ruling-held-move-speed;basis=the agent as carlos: one new field, moveStreams (per-host in-memory set of edge.StreamEnd for requests in flight, own mutex), for the move's early stream cut; actEntry gains drainRelease (bool, under a.mu), set by DrainStop; declarations only, no read added;rev3=census-ruling-fix-silent-start-kill-861;basis=#861: two fields, wakeFailMu and wakeFailLogged (per-host in-memory note of the last journalled wake failure); declaration only, no read;rev3=census-ruling-w6-ingress-drain;basis=new field TenantStartsClosed func() bool; when it answers true tenantStartRefusal refuses every start, exempt routes included. Wired only by fixedAdmission.bind to the ingress drain's closed flag. Struct field only; no read added.;rev3=census-ruling-stateless-replicas-4-task2;basis=Task 2: one field, replicaPolicies (host to the newest observed replica deploy and this box label, under mu), set only by SetReplicaDeploy; declaration only, no read.;rev3=census-ruling-stateless-replicas-4-task2-fix1;basis=Task 2 fix round 1: one more in-memory field, replicaFailed (host to the permit whose successor failed here, under mu), so that step only proves what it kept; declaration only, no read.;rev3=census-ruling-stateless-replicas-4-task3f;basis=Task 3F fix round 3 (#511 F11): two hook fields, MarkReplicaRelease and ReplicaReleaseMark (the failure book's per-host release mark on this box's disk). No read site.;rev3=census-ruling-stateless-replicas-4-task5;basis=Task 5 first commit (#511 F11): one in-memory field, heldSeen (host to the last held release attempt, error class and when it was met), under the existing wakeFailMu. Declaration only, no read.;rev3=census-ruling-stateless-replicas-4-merge-main;basis=Merge of main 5fac2ff1: both sides changed it. Main (27d3f501) adds the background atomic.Int64 field that tests wait on; this branch keeps its replica fields. Both kept as-is; no read added.;rev3=census-ruling-stateless-replicas-4-final;basis=#511 final wave item 3: adds replicaSwitched, an in-memory map of the permit each set row switched under (host -> permit key, time, resident flag); no read added; #511 micro-fix P1b: adds replicaNoGen, an in-memory map (host -> permit key and when first seen) that is only the bound's clock for a restarted permit holder with no generation; no read added;rev3=census-ruling-stateless-replicas-4-drill1;basis=#511 drill 1 R20 bound (round 1: clock with start and last seen): one in-memory field, releaseConfigWaits (per host, a stateless release's config wait), under mu; no read;rev3=census-ruling-stateless-replicas-4-r28;basis=R28 review round 2 (#511): one field, retiringCopy, an atomic pointer to the edge's in-memory retired-copy check, handed over by edge.New (SetRetiringCopy); no read, no root decision;rev3=census-ruling-g6-fence;basis=G6 F-C Task 3, the agent as carlos: four fields, fenceWatchers (sync.WaitGroup of running write-fence watchers) and three test seams nil in production (fenceWatchStarted, retainDB, wakeReturned). Declaration only, no read.;rev3=census-ruling-fleet-record-labels-m1;basis=fleet record labels R1/R2: actEntry gains checkpoint state (busy while CloseProven runs, unproven, named-once flag for C45), in-memory under a.mu; the worker gains fence pacing apart from crash backoff; Service gains test seams nil in production; declarations only, no read;rev3=census-ruling-race-activator-1249;basis=adds two test-only fields: leaseWork (a WaitGroup counting lease watches and the one-shot stops a short lease starts) and leaseWatchStop (a channel, nil in production, that a test closes to end every lease watch); no read added and production never waits on or closes either |
| +- `internal/activator/stateless.go` `Service.statelessObservation`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Carry the current attempt record facts and canonical target into the existing immutable observation carrier. Reuse a matching carrier, never lifetime-index or process-global release evidence. Fix 3a round 1 I2: obtain preparation facts from the existing reconcile snapshot, not another bucket read. Freeze the observation for this attempt; no snapshot grants launch permission. The final backend gate freshly validates record placement, identity and released deploy. |
| +- `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. |
| +- `internal/host/agent.go` `replicaRecordFacts`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Fix 3a round 1 I2: read existing in-memory reconcile snapshot for release preparation, require account/app/host match, derive RecordFacts. Missing snapshot refuses until reconciliation; fresh final record check still required. |
| + |
| +New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff: |
| + |
| +- new `internal/host/replicarecord.go:replicaRecordObservation`: reads +registry:App ×2, +registry:Host ×7, +whole:Route ×2; written legacy, accepted-legacy, frozen |
| + |
| +Seal: `8a0a9cca336d3e695b79990a9aeda17f5ee8d74908752944f7dcd129918c80fc` → `2967f0ba9722910621cedcfafc270cea3268a6de55738667574a20e67fd7f4e5`. |
| + |
| +Overlay: `internal/provision/testdata/plan14-root-reads-fleet-restart-wake.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`. |
diff --git a/docs/superpowers/plans/2026-11-21-fleet-restart-wake.md b/docs/superpowers/plans/2026-11-21-fleet-restart-wake.md| new file mode 100644 |
| index 000000000..2e5542510 |
| --- /dev/null |
| +++ b/docs/superpowers/plans/2026-11-21-fleet-restart-wake.md |
| @@ -0,0 +1,46 @@ |
| +# Fleet box restart: wake a single-copy instance without the index wait and the false backoff |
| + |
| +Source: the 2026-11-21 Tito production v0.40.2 roll. A single-copy rootfs instance on a fleet box was down for 33 s across its box's agent restart, against about 5 to 11 s that the instance-control probe needs. Paul said go on 2026-11-21, relayed by Tito's session, for fixes (1) and (2) below. No spec change: this is a latency fix under existing rules. The investigation was read from code at v0.40.2; check every citation against this branch (main fe854a4e) before relying on it. |
| + |
| +Binding rules the fix must keep: |
| +- the lease; |
| +- the R1 stale-wake fence: the fresh record read at the exec gate (stateless.go statelessFinalRecord, cfg.Record); |
| +- R2 restore-required; |
| +- the maintenance fence and the instance-control readiness gate (no nested or rootfs start on an unproven box); |
| +- the moves hold view rule (moves spec §9.4); |
| +- region HA rules (spec §25 and §7.5; CI runs the grouproll tests and the region_ha boundary test). |
| + |
| +Review round limit: three; AGENTS.md stopping rules apply. |
| + |
| +## What happened (code at v0.40.2) |
| + |
| +1. The wake took the stateless launch path (activator.go doStatelessWake → prepareStateless → statelessObservation, stateless.go about line 316), because the build or its staged manifest declares stateless mode. |
| +2. An ordinary wake carries no replica-observation carrier, so it falls back to `a.cfg.ReplicaRecord(rt)` (stateless.go about 324). In the agent that is `replicaRecordFacts(boxLifetimes)` (internal/host/agent.go about 515 and 4351-4358), which returns bare `replicas.ErrFenced` on an index miss. `boxLifetimes` lives in memory, and only the reconcile pass's record scan fills it (reconcile.go about 1493-1498). After a restart it is empty until the first pass's scan, which starts only after the moves hold and offline keep views are built (fastboot.go). |
| +3. The always-on starter counts bare `replicas.ErrFenced` as a build failure (rootfs_service.go residentFailure / verdictOf about 486-501, 1155-1156; swap.go about 274-299), so it backs off 1, 2, 4, 8, 16 s with jitter (about 393-407). Request wakes meanwhile get a quiet 503 resident-backoff. |
| + |
| +## Global constraints |
| + |
| +- No new store reads on a timer. A live record read on an index miss is one read per wake attempt that would otherwise have failed; it must not run when the index answers. |
| +- A refusal never counts as a build failure. A build failure still backs off as today. |
| +- Targeted tests only (`-run`), never a full suite locally. Socket-binding packages need `TMPDIR=/tmp/g` with the sandbox off. |
| +- No tenant names in code, tests or comments. |
| + |
| +## Task 1: a fenced refusal is retried on the next tick, not backed off |
| + |
| +1. Find where the always-on (resident) starter and any other wake classifier decide refusal against failure (residentFailure, verdictOf, and the request path that answers resident-backoff). Make `replicas.ErrFenced`, bare or wrapped, a refusal everywhere the activator's own `ErrFenced` already is. List every classifier you checked in the report. |
| +2. A refusal sets the next attempt to the next resident tick (`residentPoll`, 2 s) and logs as a refusal (only when its text changes, as the other refusals do), never as "wake failed". |
| +3. Tests, deterministic with a fake clock or the existing seams: a resident instance whose launch returns bare `replicas.ErrFenced` three times, then succeeds, starts on the tick after the refusal stops, with no backoff growth; a genuine build failure still backs off as before. |
| + |
| +## Task 2: an index miss reads the record live |
| + |
| +1. In the agent's `ReplicaRecord` wiring (replicaRecordFacts), on a lifetime-index miss read the record from the store with the existing record-facts reader (haRecordFacts or whatever this branch has) instead of returning `replicas.ErrFenced`. An index hit stays as it is, with no read. A failed or absent live read keeps today's refusal. |
| +2. Do not populate or overwrite the shared index from this read: the index stays the reconcile scan's observation (lifetimeindex.go). Say in the report why that is safe. |
| +3. Show the R1 fence still decides: the exec gate's fresh record read still runs after this and still refuses a stale wake (a record whose box or incarnation changed between the live read and the gate). Name the test that proves it, existing or new. |
| +4. Tests, deterministic: a restarted agent (empty index) whose instance-control gate is ready starts an always-on single-copy instance without waiting for the first reconcile scan (block the scan on a barrier; the start must still happen); an absent record keeps the refusal; a record moved to another box is refused at the gate. |
| +5. Census: `make census-card`, CLAIMS file, `make census-propose NAME=fleet-restart-wake`; the controller gets it approved. |
| + |
| +## Out of scope |
| + |
| +- The instance-control probe's timing (a safety gate). |
| +- Fewer record walks per pass (#964, branch fleet-shared-walk). |
| +- Why the app's build declares stateless mode (Tito's to check). |
diff --git a/internal/activator/activator.go b/internal/activator/activator.go| index 7b330bf4b..325f54a8d 100644 |
| --- a/internal/activator/activator.go |
| +++ b/internal/activator/activator.go |
| @@ -118,7 +118,11 @@ type Config struct { |
| // and only the row and the index say a host is HA. |
| Record func(ctx context.Context, rt registry.Route) (RecordFacts, error) |
| // ReplicaRecord supplies observations from the existing reconcile pass. |
| - ReplicaRecord func(rt registry.Route) (RecordFacts, error) |
| + // ctx is the wake's: the host may read the record on an index miss |
| + // (replicaRecordFacts), bounded by the wake. An error refuses the |
| + // launch; the exec gate's own fresh record read (Record, through |
| + // statelessFinalRecord) still decides every launch it allows. |
| + ReplicaRecord func(ctx context.Context, rt registry.Route) (RecordFacts, error) |
| // Self is this box's lease identity, asked at each HA wake (so an |
| // instance id that arrives late is picked up), for the keep decision. |
| // Nil: lease.CurrentSelf, the identity every lock this box writes names. |
| @@ -1562,13 +1566,10 @@ type Service struct { |
| rootfsGateMu sync.Mutex |
| rootfsGateRuns map[string]*rootfsGateRun |
| rootfsRefusedSeen map[string]string |
| - // wakeFailMu guards wakeFailLogged, the journal's rate limit on failed |
| - // wakes per host (logWakeFailure). A leaf lock, like rootfsGateMu. |
| - // heldSeen, under the same lock, is each host's last failed wake held |
| - // by a release attempt with no backoff (noteHeldWake, #511 F11). |
| - wakeFailMu sync.Mutex |
| - wakeFailLogged map[string]*wakeFailNote |
| - heldSeen map[string]heldSeen |
| + // wakeFailMu guards wakeNotes (wakefaillog.go), the journal's notes of |
| + // failed and refused wakes per host. A leaf lock, like rootfsGateMu. |
| + wakeFailMu sync.Mutex |
| + wakeNotes |
| // Residency (Plan 3 Task 8, rootfs_service.go). residentLister is the |
| // DueStore read as a ResidentLister at New (nil: no residents). |
| // residents is each listed resident's backoff and reservation, by host; |
| @@ -2275,7 +2276,9 @@ func (a *Service) wake(e *actEntry) { |
| a.noteRootfsRefusal(e.route, err) |
| } else if !said { |
| // The same held release attempt as this host's last failed |
| - // wake, with the same class: said once already (#511 F11). |
| + // wake, with the same class: said once already (#511 F11). Or |
| + // a replica fence refusal, journalled by noteReplicaFence and |
| + // never a member event. |
| } else if msg, ok := a.wakeFailureEvent(e, err); ok && !errors.Is(err, ErrDutyDeferred) { |
| emitEvent(a.Logs, e.route, "error", msg) |
| } |
| @@ -6964,7 +6967,7 @@ func (a *Service) serve(w http.ResponseWriter, r *http.Request, rt registry.Rout |
| if err := a.BeginSidecarRequest(r.Context(), rt); err != nil { |
| // A forwarded request's answer says none (haforward.go). |
| noteNoHolder(w, r, rt, err) |
| - if errors.Is(err, ErrFenced) { |
| + if fenceRefusal(err) { |
| maintenanceResponse(w, r) |
| return true |
| } |
| @@ -7096,7 +7099,7 @@ func (a *Service) serveWakeError(w http.ResponseWriter, r *http.Request, rt regi |
| var backoff *errResidentBackoff |
| var leaseRefused *errLeaseRefused |
| switch { |
| - case errors.Is(err, ErrFenced): |
| + case fenceRefusal(err): |
| maintenanceResponse(w, r) |
| case errors.As(err, &backoff): |
| // A resident inside its backoff (Plan 3 Task 8): the tick starts it |
diff --git a/internal/activator/maintenance.go b/internal/activator/maintenance.go| index a475a7804..89b0c5175 100644 |
| --- a/internal/activator/maintenance.go |
| +++ b/internal/activator/maintenance.go |
| @@ -10,6 +10,7 @@ import ( |
| "github.com/carlosframework/platform/internal/controlname" |
| "github.com/carlosframework/platform/internal/edge" |
| "github.com/carlosframework/platform/internal/registry" |
| + "github.com/carlosframework/platform/internal/replicas" |
| ) |
| var ( |
| @@ -20,6 +21,29 @@ var ( |
| ErrFenceHeld = errors.New("activator: another maintenance fence is held") |
| ) |
| +// fenceRefusal reports whether err is a fence refusal: the activator's own |
| +// ErrFenced, or replicas.ErrFenced, bare or wrapped. The replica record |
| +// observation answers replicas.ErrFenced when it cannot vouch for a |
| +// stateless launch (an agent's lifetime index miss, a coordinator that |
| +// refuses the term). Nothing of the build ran, so every classifier reads |
| +// it as it reads the activator's fence: never the build's failure, and an |
| +// always-on instance is tried again on the next resident tick, not after a |
| +// backoff (fleet restart wake, 2026-11-21). |
| +func fenceRefusal(err error) bool { |
| + return errors.Is(err, ErrFenced) || errors.Is(err, replicas.ErrFenced) |
| +} |
| + |
| +// replicaFenceRefusal reports whether err is the replica record |
| +// observation's refusal (replicas.ErrFenced) and not the activator's own |
| +// fence: a wake it ends is journalled once per change of its text |
| +// (noteReplicaFence), with no member event. A wait for the instance's |
| +// shared secrets (errStatelessSecretsWaiting) that wraps one is not: the |
| +// member is told of that wait, and of its end past the bound (R21b), as |
| +// before (fleet restart wake, review round 1 P2-2). |
| +func replicaFenceRefusal(err error) bool { |
| + return errors.Is(err, replicas.ErrFenced) && !errors.Is(err, ErrFenced) && !errors.Is(err, errStatelessSecretsWaiting) |
| +} |
| + |
| // StopEvidence records local process and replica closure. It grants no lease, |
| // cgroup, database or resume authority. |
| type StopEvidence struct { |
diff --git a/internal/activator/replica_fence_refusal_test.go b/internal/activator/replica_fence_refusal_test.go| new file mode 100644 |
| index 000000000..9ce8180fb |
| --- /dev/null |
| +++ b/internal/activator/replica_fence_refusal_test.go |
| @@ -0,0 +1,211 @@ |
| +package activator |
| + |
| +// Fleet box restart (plan 2026-11-21-fleet-restart-wake, Task 1): the |
| +// replica record observation's refusal (replicas.ErrFenced, bare or |
| +// wrapped) is a refusal to every classifier, as the activator's own |
| +// ErrFenced is. An always-on instance it refuses is tried again on the |
| +// next resident tick with no backoff, and the refusal is journalled once |
| +// per change of its text, never as a failed wake. |
| + |
| +import ( |
| + "context" |
| + "errors" |
| + "fmt" |
| + "net/http" |
| + "net/http/httptest" |
| + "strings" |
| + "testing" |
| + "time" |
| + |
| + "github.com/carlosframework/platform/internal/replicas" |
| +) |
| + |
| +// Every classifier reads a replica fence, bare or wrapped, as it reads the |
| +// activator's own ErrFenced. |
| +func TestReplicaFenceClassifiedAsTheActivatorsFence(t *testing.T) { |
| + for _, err := range []error{replicas.ErrFenced, fmt.Errorf("replica record: %w", replicas.ErrFenced)} { |
| + if got, want := residentFailure(err), residentFailure(ErrFenced); got != want || got { |
| + t.Errorf("residentFailure(%v) = %v, want %v", err, got, want) |
| + } |
| + if got, want := verdictOf(err), verdictOf(ErrFenced); got != want { |
| + t.Errorf("verdictOf(%v) = %v, want %v", err, got, want) |
| + } |
| + if got, want := classifyStep(context.TODO(), err), classifyStep(context.TODO(), ErrFenced); got != want { |
| + t.Errorf("classifyStep(%v) = %v, want %v", err, got, want) |
| + } |
| + for _, open := range []bool{false, true} { |
| + if got, want := classifyRelease(err, open), classifyRelease(ErrFenced, open); got != want { |
| + t.Errorf("classifyRelease(%v, %v) = %v, want %v", err, open, got, want) |
| + } |
| + } |
| + if journalledWakeFailure(err) { |
| + t.Errorf("%v is journalled as a failed wake", err) |
| + } |
| + if !replicaFenceRefusal(err) { |
| + t.Errorf("%v is not a replica fence refusal", err) |
| + } |
| + } |
| + if replicaFenceRefusal(ErrFenced) || replicaFenceRefusal(errors.New("store unreachable")) { |
| + t.Error("a replica fence refusal matched an error that is not one") |
| + } |
| +} |
| + |
| +// An always-on instance whose launch is refused with replicas.ErrFenced |
| +// three times (twice bare, once wrapped) is tried on every resident tick |
| +// with no backoff growth; the tick after the refusal stops starts it. A |
| +// request meanwhile is answered as under a fence, not with the resident |
| +// backoff. The refusal is journalled once, never as "wake failed", and the |
| +// member gets no failed-wake event for it. |
| +func TestResidentReplicaFenceRefusalRetriesEveryTick(t *testing.T) { |
| + host := "shop.example.com" |
| + rt := residentRoute(host) |
| + a, b, clk, _, sink, _ := residentService(t, time.Hour, rt) |
| + logs := captureLog(t) |
| + refusals := []error{replicas.ErrFenced, fmt.Errorf("replica record: %w", replicas.ErrFenced), replicas.ErrFenced} |
| + for i, refusal := range refusals { |
| + b.mu.Lock() |
| + b.acquireErr = refusal |
| + b.mu.Unlock() |
| + acquires := b.acquireCount() |
| + tickSettled(t, a) |
| + if b.acquireCount() != acquires+1 { |
| + t.Fatalf("tick %d: acquires %d, want %d: the tick did not try the start", i+1, b.acquireCount(), acquires+1) |
| + } |
| + if a.hasEntry(host) || b.startCount() != 0 { |
| + t.Fatalf("tick %d: started under a refusal", i+1) |
| + } |
| + st, _ := a.residentOf(host) |
| + if st.failures != 0 { |
| + t.Fatalf("tick %d: %d failures counted for a refusal", i+1, st.failures) |
| + } |
| + if d := retryIn(a, clk, host); d > 0 { |
| + t.Fatalf("tick %d: retry held back %s by a refusal", i+1, d) |
| + } |
| + if i == 0 { |
| + rec := httptest.NewRecorder() |
| + a.ServeHTTP(rec, httptest.NewRequest(http.MethodGet, "http://"+host+"/", nil), rt, okHandler()) |
| + if rec.Code != http.StatusServiceUnavailable || strings.Contains(rec.Body.String(), "restarting") { |
| + t.Fatalf("request under a refusal: %d %q, want the fence's 503", rec.Code, rec.Body.String()) |
| + } |
| + if st, _ := a.residentOf(host); st.failures != 0 || retryIn(a, clk, host) > 0 { |
| + t.Fatalf("a request's refused wake started a backoff: %+v", st) |
| + } |
| + } |
| + clk.advance(residentPoll) |
| + } |
| + b.mu.Lock() |
| + b.acquireErr = nil |
| + b.mu.Unlock() |
| + startResident(t, a, host) |
| + if b.startCount() != 1 { |
| + t.Fatalf("starts = %d, want 1", b.startCount()) |
| + } |
| + if st, _ := a.residentOf(host); st.failures != 0 { |
| + t.Fatalf("state %+v after the start, want no failures", st) |
| + } |
| + out := logs.String() |
| + if strings.Contains(out, "wake failed") { |
| + t.Fatalf("a refusal was journalled as a failed wake:\n%s", out) |
| + } |
| + // Bare and wrapped differ in text, so each change is said once: the |
| + // bare text, the wrapped text, the bare text again. |
| + if n := strings.Count(out, "not started, refused: "+replicas.ErrFenced.Error()); n != 2 { |
| + t.Fatalf("bare refusal said %d times, want 2:\n%s", n, out) |
| + } |
| + if n := strings.Count(out, "not started, refused: replica record: "); n != 1 { |
| + t.Fatalf("wrapped refusal said %d times, want 1:\n%s", n, out) |
| + } |
| + for _, msg := range sink.msgs() { |
| + if strings.Contains(msg, replicas.ErrFenced.Error()) { |
| + t.Fatalf("member event for a refusal: %q", msg) |
| + } |
| + } |
| +} |
| + |
| +// The same refusal repeated is said once, and a start in between makes the |
| +// next one said again. |
| +func TestResidentReplicaFenceRefusalSaidOncePerChange(t *testing.T) { |
| + host := "shop.example.com" |
| + a, b, clk, _, _, _ := residentService(t, time.Hour, residentRoute(host)) |
| + logs := captureLog(t) |
| + refuse := func(n int) { |
| + t.Helper() |
| + b.mu.Lock() |
| + b.acquireErr = replicas.ErrFenced |
| + b.mu.Unlock() |
| + for i := 0; i < n; i++ { |
| + tickSettled(t, a) |
| + clk.advance(residentPoll) |
| + } |
| + } |
| + refuse(4) |
| + if n := strings.Count(logs.String(), "not started, refused: "); n != 1 { |
| + t.Fatalf("four identical refusals said %d times, want 1:\n%s", n, logs.String()) |
| + } |
| + b.mu.Lock() |
| + b.acquireErr = nil |
| + b.mu.Unlock() |
| + startResident(t, a, host) |
| + crashResident(t, a, b, host) |
| + clk.advance(residentBackoff(1, 0)) |
| + refuse(1) |
| + if n := strings.Count(logs.String(), "not started, refused: "); n != 2 { |
| + t.Fatalf("a refusal after a start said %d times in all, want 2:\n%s", n, logs.String()) |
| + } |
| +} |
| + |
| +// A genuine failure still backs off as before: an unclassified launch |
| +// error (a store outage at the lease) counts, 1 s then 2 s, and no start |
| +// is tried inside the backoff. |
| +func TestResidentGenuineLaunchFailureStillBacksOff(t *testing.T) { |
| + host := "shop.example.com" |
| + a, b, clk, _, _, _ := residentService(t, time.Hour, residentRoute(host)) |
| + captureLog(t) |
| + b.mu.Lock() |
| + b.acquireErr = errors.New("store unreachable") |
| + b.mu.Unlock() |
| + for i, want := range []time.Duration{time.Second, 2 * time.Second} { |
| + tickSettled(t, a) |
| + if st, _ := a.residentOf(host); st.failures != i+1 { |
| + t.Fatalf("failure %d: counted %d", i+1, st.failures) |
| + } |
| + if got := retryIn(a, clk, host); got != want { |
| + t.Fatalf("failure %d: retry in %s, want %s", i+1, got, want) |
| + } |
| + acquires := b.acquireCount() |
| + clk.advance(want - time.Nanosecond) |
| + tickSettled(t, a) |
| + if b.acquireCount() != acquires { |
| + t.Fatalf("failure %d: a start inside the backoff", i+1) |
| + } |
| + clk.advance(time.Nanosecond) |
| + } |
| +} |
| + |
| +// A wait for the instance's shared secrets that wraps a replica fence (the |
| +// console refused the coordinator outright, escrow_authority.go) keeps its |
| +// member event: it is not a replica fence refusal, so noteHeldWake tells |
| +// the caller to report it, and the member reads the wait's own words |
| +// (review round 1 P2-2). It is still no failure of the build. |
| +func TestSecretsWaitWrappingAReplicaFenceKeepsItsMemberEvent(t *testing.T) { |
| + err := fmt.Errorf("%w: %w", errStatelessSecretsWaiting, replicas.ErrFenced) |
| + if replicaFenceRefusal(err) { |
| + t.Fatal("a secrets wait is read as a replica fence refusal") |
| + } |
| + if residentFailure(err) { |
| + t.Fatal("a secrets wait counts as a failure") |
| + } |
| + a := &Service{now: time.Now} |
| + logs := captureLog(t) |
| + for i := 0; i < 2; i++ { |
| + if !a.noteHeldWake("shop.example.com", err) { |
| + t.Fatalf("wake %d: the caller is told not to report a secrets wait", i+1) |
| + } |
| + } |
| + if strings.Contains(logs.String(), "not started, refused") { |
| + t.Fatalf("a secrets wait was journalled as a replica fence refusal:\n%s", logs.String()) |
| + } |
| + if got := memberSafeWakeReason(err); got != errStatelessSecretsWaiting.Error() { |
| + t.Fatalf("member event %q, want the secrets wait's words", got) |
| + } |
| +} |
diff --git a/internal/activator/replica_reconcile_wake_test.go b/internal/activator/replica_reconcile_wake_test.go| index f7ee5ed1c..0c71535f4 100644 |
| --- a/internal/activator/replica_reconcile_wake_test.go |
| +++ b/internal/activator/replica_reconcile_wake_test.go |
| @@ -147,7 +147,7 @@ func TestReplicaReconcileMemberWakeVerifiesGeneration(t *testing.T) { |
| selection, err := release.CanonicalRuntimeSelection(ctx, store, rt.Account, rt.App, id.Version, id.StagedPath, rt.Stateless) |
| return selection.Stateless, selection.ManifestDigest, err |
| } |
| - r.a.cfg.ReplicaRecord = func(rt registry.Route) (RecordFacts, error) { |
| + r.a.cfg.ReplicaRecord = func(_ context.Context, rt registry.Route) (RecordFacts, error) { |
| current, ok := index.ReplicaRecord(rt.Host) |
| if !ok { |
| return RecordFacts{}, ErrFenced |
diff --git a/internal/activator/replicabaseline_test.go b/internal/activator/replicabaseline_test.go| index 6d02a713c..2123b4baf 100644 |
| --- a/internal/activator/replicabaseline_test.go |
| +++ b/internal/activator/replicabaseline_test.go |
| @@ -148,7 +148,7 @@ func TestReplicaRetryKeepsPerBoxBaseline(t *testing.T) { |
| }) |
| t.Run("final launch gate", func(t *testing.T) { |
| r := newReplicaSetRig(t, "b", state) |
| - facts, err := r.a.cfg.ReplicaRecord(r.rt) |
| + facts, err := r.a.cfg.ReplicaRecord(context.Background(), r.rt) |
| if err != nil { |
| t.Fatal(err) |
| } |
diff --git a/internal/activator/replicadeploy_test.go b/internal/activator/replicadeploy_test.go| index bc7379766..14ba1c27d 100644 |
| --- a/internal/activator/replicadeploy_test.go |
| +++ b/internal/activator/replicadeploy_test.go |
| @@ -73,8 +73,10 @@ func newReplicaSetRigOn(t *testing.T, label string, shared *replicaReleaseStore, |
| current := record() |
| return ¤t, nil |
| }} |
| - r.a.cfg.ReplicaRecord = func(registry.Route) (RecordFacts, error) { return RecordFactsOf(record()) } |
| - r.a.cfg.Record = func(_ context.Context, rt registry.Route) (RecordFacts, error) { return r.a.cfg.ReplicaRecord(rt) } |
| + r.a.cfg.ReplicaRecord = func(context.Context, registry.Route) (RecordFacts, error) { return RecordFactsOf(record()) } |
| + r.a.cfg.Record = func(ctx context.Context, rt registry.Route) (RecordFacts, error) { |
| + return r.a.cfg.ReplicaRecord(ctx, rt) |
| + } |
| if d := state(inc); d != nil { |
| store.d = d |
| r.a.SetReplicaDeploy(r.rt.Host, *d, label) |
diff --git a/internal/activator/rootfs_service.go b/internal/activator/rootfs_service.go| index 563ace82d..3bac14859 100644 |
| --- a/internal/activator/rootfs_service.go |
| +++ b/internal/activator/rootfs_service.go |
| @@ -464,7 +464,8 @@ func retryAfterSeconds(d time.Duration) int { |
| // residentFailure reports whether a resident's failed wake counts toward its |
| // backoff. Never for an ownership end or a refusal (INV-4): a fence |
| -// (ErrFenced), the agent shutting down, a cancelled wake, anything verdictOf |
| +// (ErrFenced, or the replica record observation's replicas.ErrFenced: |
| +// fenceRefusal), the agent shutting down, a cancelled wake, anything verdictOf |
| // reads as gateNoOwnership or superseded (every rootfs refusal, a lost |
| // lease), another generation operation in flight (errSwapBusy), or a host |
| // latched by an unproven earlier wake (errWakeUnproven, which holds the host |
| @@ -489,7 +490,7 @@ func residentFailure(err error) bool { |
| return false |
| case isReleaseResult(err): |
| return classifyRelease(err, false) == releaseFailed |
| - case errors.Is(err, ErrFenced), errors.Is(err, errShuttingDown), errors.Is(err, context.Canceled), |
| + case fenceRefusal(err), errors.Is(err, errShuttingDown), errors.Is(err, context.Canceled), |
| errors.Is(err, errSwapBusy), errors.Is(err, errWakeUnproven), errors.Is(err, errBuildNotInstalled): |
| return false |
| } |
diff --git a/internal/activator/rootfsrelease.go b/internal/activator/rootfsrelease.go| index d064282e4..3970a1a6f 100644 |
| --- a/internal/activator/rootfsrelease.go |
| +++ b/internal/activator/rootfsrelease.go |
| @@ -270,7 +270,7 @@ func classifyRelease(err error, recordOpen bool) releaseOutcome { |
| case errors.As(err, &rerr): |
| return releaseFailed |
| case errors.Is(err, errSwapLeaseLost), errors.Is(err, context.Canceled), errors.Is(err, context.DeadlineExceeded), |
| - errors.Is(err, ErrFenced), errors.Is(err, errReleaseVanished), errors.Is(err, errReleaseNoExit): |
| + fenceRefusal(err), errors.Is(err, errReleaseVanished), errors.Is(err, errReleaseNoExit): |
| return releaseCancelled |
| case errors.Is(err, errRootfsRefused), errors.Is(err, errStagedBuildNotPublished), errors.As(err, &refused): |
| return releaseRefused |
diff --git a/internal/activator/stateless.go b/internal/activator/stateless.go| index b6be68678..22cddd9ac 100644 |
| --- a/internal/activator/stateless.go |
| +++ b/internal/activator/stateless.go |
| @@ -321,7 +321,7 @@ func (a *Service) statelessObservation(ctx context.Context, rt registry.Route, i |
| if a.cfg.ReplicaRecord == nil { |
| return ctx, ErrFenced |
| } |
| - facts, err := a.cfg.ReplicaRecord(rt) |
| + facts, err := a.cfg.ReplicaRecord(ctx, rt) |
| if err != nil { |
| return ctx, err |
| } |
diff --git a/internal/activator/stateless_fix1_test.go b/internal/activator/stateless_fix1_test.go| index 56a780d44..bdabd62e2 100644 |
| --- a/internal/activator/stateless_fix1_test.go |
| +++ b/internal/activator/stateless_fix1_test.go |
| @@ -295,7 +295,7 @@ func TestStatelessFinalRecordRunsAfterPendingWrite(t *testing.T) { |
| t.Fatal(err) |
| } |
| a := &Service{Routes: startupRoutes{rt.Host: rt}} |
| - a.cfg.ReplicaRecord = func(registry.Route) (RecordFacts, error) { return facts, nil } |
| + a.cfg.ReplicaRecord = func(context.Context, registry.Route) (RecordFacts, error) { return facts, nil } |
| wrote, reads := false, 0 |
| a.cfg.Record = func(context.Context, registry.Route) (RecordFacts, error) { |
| reads++ |
diff --git a/internal/activator/stateless_heldlog_test.go b/internal/activator/stateless_heldlog_test.go| index 0b8d1d7f4..7214867ab 100644 |
| --- a/internal/activator/stateless_heldlog_test.go |
| +++ b/internal/activator/stateless_heldlog_test.go |
| @@ -1,6 +1,7 @@ |
| package activator |
| import ( |
| + "context" |
| "strings" |
| "testing" |
| @@ -36,7 +37,7 @@ func TestReplicaHeldAttemptLogsOncePerChange(t *testing.T) { |
| r.setPlan(WakePlan{Boot: r.next, Mode: ModeOverlap, FirstWake: true, Token: 1}) |
| r.a.residentLister = residentRows{r.routes} |
| r.a.residentJitter = func() float64 { return 0 } |
| - facts, err := r.a.cfg.ReplicaRecord(r.rt) |
| + facts, err := r.a.cfg.ReplicaRecord(context.Background(), r.rt) |
| if err != nil { |
| t.Fatal(err) |
| } |
diff --git a/internal/activator/stateless_holdwake_test.go b/internal/activator/stateless_holdwake_test.go| index 7b116fb1b..591d0720d 100644 |
| --- a/internal/activator/stateless_holdwake_test.go |
| +++ b/internal/activator/stateless_holdwake_test.go |
| @@ -32,7 +32,7 @@ func TestStatelessHoldWakeRebasesPreparation(t *testing.T) { |
| t.Helper() |
| a := &Service{Routes: startupRoutes{began.Host: began}} |
| t.Cleanup(func() { waitBackground(t, a) }) |
| - a.cfg.ReplicaRecord = func(registry.Route) (RecordFacts, error) { return facts, nil } |
| + a.cfg.ReplicaRecord = func(context.Context, registry.Route) (RecordFacts, error) { return facts, nil } |
| observed, err := a.statelessObservation(context.Background(), began, id, "canonical") |
| if err != nil { |
| t.Fatal(err) |
diff --git a/internal/activator/stateless_test.go b/internal/activator/stateless_test.go| index 6a32cb68b..85ea0bc63 100644 |
| --- a/internal/activator/stateless_test.go |
| +++ b/internal/activator/stateless_test.go |
| @@ -88,7 +88,7 @@ func TestStatelessCurrentRequiresFreshEvidence(t *testing.T) { |
| a := &Service{Routes: startupRoutes{rt.Host: rt}} |
| reads := 0 |
| a.cfg.Record = func(context.Context, registry.Route) (RecordFacts, error) { reads++; return facts, nil } |
| - a.cfg.ReplicaRecord = func(registry.Route) (RecordFacts, error) { return facts, nil } |
| + a.cfg.ReplicaRecord = func(context.Context, registry.Route) (RecordFacts, error) { return facts, nil } |
| id := release.StagedIdentity{Version: "v1"} |
| ctx, err := a.statelessObservation(context.Background(), rt, id, "canonical") |
| if err != nil { |
| @@ -155,12 +155,14 @@ func wireStatelessRig(r *wakeRelRig) *replicaReleaseStore { |
| r.a.StorageDeclaration = func(context.Context, registry.Route, release.StagedIdentity) (bool, string, error) { |
| return true, "canonical", nil |
| } |
| - r.a.cfg.ReplicaRecord = func(registry.Route) (RecordFacts, error) { |
| + r.a.cfg.ReplicaRecord = func(context.Context, registry.Route) (RecordFacts, error) { |
| facts, err := RecordFactsOf(provision.Record{Account: r.rt.Account, App: r.rt.App, Host: r.rt.Host, CreatedAt: time.Unix(1, 0)}) |
| facts.ReplicaDeploy = store.snapshot() |
| return facts, err |
| } |
| - r.a.cfg.Record = func(_ context.Context, rt registry.Route) (RecordFacts, error) { return r.a.cfg.ReplicaRecord(rt) } |
| + r.a.cfg.Record = func(ctx context.Context, rt registry.Route) (RecordFacts, error) { |
| + return r.a.cfg.ReplicaRecord(ctx, rt) |
| + } |
| return store |
| } |
| @@ -756,7 +758,7 @@ func TestStatelessObservedUnknownReleaseIsHeld(t *testing.T) { |
| if err := waitErr(t, r.wake(r.a)); err != nil { |
| t.Fatal(err) |
| } |
| - facts, err := r.a.cfg.ReplicaRecord(r.rt) |
| + facts, err := r.a.cfg.ReplicaRecord(context.Background(), r.rt) |
| if err != nil { |
| t.Fatal(err) |
| } |
diff --git a/internal/activator/swap.go b/internal/activator/swap.go| index bd3323e54..9b99498e0 100644 |
| --- a/internal/activator/swap.go |
| +++ b/internal/activator/swap.go |
| @@ -167,7 +167,7 @@ func classifyStep(lifecycle context.Context, err error) stepOutcome { |
| case err == nil: |
| return stepOK |
| case lifecycle != nil && lifecycle.Err() != nil, |
| - errors.Is(err, context.Canceled), errors.Is(err, errSwapStopped), errors.Is(err, ErrFenced): |
| + errors.Is(err, context.Canceled), errors.Is(err, errSwapStopped), fenceRefusal(err): |
| return stepCancelled |
| case verdictOf(err) != gateProceed: |
| // The attempt gate's own refusal, wherever it surfaced: at Step 3a, |
| @@ -268,6 +268,11 @@ const ( |
| // so it is never the build's failure, and a resident's backoff does not |
| // grow. |
| // |
| +// A fence is NoOwnership whichever fence it is (fenceRefusal): the |
| +// activator's own ErrFenced, or the replica record observation's |
| +// replicas.ErrFenced (a stateless launch its record could not vouch for), |
| +// bare or wrapped. Nothing of the build ran under either. |
| +// |
| // errSwapStopped (the barrier's cancel, from memberCurrentLocked) is |
| // NoOwnership too: the entry is stopping, so nothing may spawn for it. |
| // classifyStep reads it as stepCancelled before it asks this. |
| @@ -278,7 +283,7 @@ func verdictOf(err error) gateVerdict { |
| case errors.Is(err, errSwapSuperseded): |
| return gateSuperseded |
| case errors.Is(err, errSwapNotAwake), errors.Is(err, errSwapLeaseLost), errors.Is(err, errSwapFenced), |
| - errors.Is(err, errSwapShutdown), errors.Is(err, errSwapStopped), errors.Is(err, ErrFenced), |
| + errors.Is(err, errSwapShutdown), errors.Is(err, errSwapStopped), fenceRefusal(err), |
| errors.Is(err, hostguard.ErrStampMismatch), errors.Is(err, hostguard.ErrFenced), |
| errors.Is(err, hostguard.ErrInactive), errors.Is(err, hostguard.ErrRetiredStamp), |
| errors.Is(err, hostguard.ErrOldStamp), errors.Is(err, hostguard.ErrClaimIncarnation), |
diff --git a/internal/activator/wakefaillog.go b/internal/activator/wakefaillog.go| index f2a6fd947..858862d52 100644 |
| --- a/internal/activator/wakefaillog.go |
| +++ b/internal/activator/wakefaillog.go |
| @@ -18,6 +18,17 @@ const wakeFailureLogEvery = time.Minute |
| // again or stay in the registry (Astra R1 2). |
| const wakeFailureForget = 10 * wakeFailureLogEvery |
| +// wakeNotes are the journal's notes of failed and refused wakes, by host, |
| +// under Service.wakeFailMu: wakeFailLogged is the rate limit on failed |
| +// wakes (logWakeFailure); heldSeen is the last failed wake held by a |
| +// release attempt with no backoff (noteHeldWake, #511 F11); fenceSeen is |
| +// the last replica fence refusal said (noteReplicaFence). |
| +type wakeNotes struct { |
| + wakeFailLogged map[string]*wakeFailNote |
| + heldSeen map[string]heldSeen |
| + fenceSeen map[string]heldSeen |
| +} |
| + |
| // wakeFailNote is one host's last journalled failure and the failures |
| // since that were not logged. |
| type wakeFailNote struct { |
| @@ -81,15 +92,44 @@ func (a *Service) logWakeFailure(host string, err error) { |
| log.Printf("activator: %s: wake failed: %v", host, err) |
| } |
| -// clearWakeFailure forgets host's failure and held notes after a wake |
| -// that worked, so its next failure is logged at once. |
| +// clearWakeFailure forgets host's failure, held and fence notes after a |
| +// wake that worked, so its next failure or refusal is logged at once. |
| func (a *Service) clearWakeFailure(host string) { |
| a.wakeFailMu.Lock() |
| delete(a.wakeFailLogged, host) |
| delete(a.heldSeen, host) |
| + delete(a.fenceSeen, host) |
| a.wakeFailMu.Unlock() |
| } |
| +// noteReplicaFence journals a wake the replica record observation refused |
| +// (replicaFenceRefusal) once per change of its text for the host, as the |
| +// rootfs admission's refusals are (noteRootfsRefusal): an always-on |
| +// instance is tried again every resident tick while it lasts, and a |
| +// request storm meets it too. It is not a failed wake, so it has no |
| +// "wake failed" line and no member event. A note no wake has met for |
| +// wakeFailureForget is dropped. |
| +func (a *Service) noteReplicaFence(host string, err error) { |
| + msg := err.Error() |
| + now := a.now() |
| + a.wakeFailMu.Lock() |
| + for h, s := range a.fenceSeen { |
| + if now.Sub(s.at) >= wakeFailureForget { |
| + delete(a.fenceSeen, h) |
| + } |
| + } |
| + if a.fenceSeen == nil { |
| + a.fenceSeen = map[string]heldSeen{} |
| + } |
| + last, seen := a.fenceSeen[host] |
| + a.fenceSeen[host] = heldSeen{note: heldNote{class: msg}, at: now} |
| + a.wakeFailMu.Unlock() |
| + if seen && last.note.class == msg { |
| + return |
| + } |
| + log.Printf("activator: %s: not started, refused: %v; tried again on the next tick, said again only when it changes", host, err) |
| +} |
| + |
| // attemptError is a stateless preparation's failure with the release |
| // attempt it acted on (prepareStateless), so a failed wake can tell one |
| // held attempt from the next. Its text is the error's own. |
| @@ -146,14 +186,21 @@ func heldBy(err error) (heldNote, bool) { |
| // (#511 F11): an always-on start held by one attempt is retried every |
| // tick with no backoff, so its journal line and member event are written |
| // for the first wake of each (attempt, class) on a host and not for the |
| -// repeats. It returns whether the caller still reports err: false only |
| -// for a repeat. Any other failure forgets the host's note, as a wake that |
| -// worked does (clearWakeFailure), so a later hold is said again. A note |
| -// no wake has met for wakeFailureForget is dropped. |
| +// repeats. It returns whether the caller still reports err: false for a |
| +// repeat, and for a replica fence refusal (replicaFenceRefusal), which it |
| +// journals itself once per change (noteReplicaFence) and which is never a |
| +// member event. Any other failure forgets the host's note, as a wake that |
| +// worked does (clearWakeFailure), so a later hold is said again; anything |
| +// but a replica fence refusal forgets that note too. A note no wake has |
| +// met for wakeFailureForget is dropped. |
| func (a *Service) noteHeldWake(host string, err error) bool { |
| n, held := heldBy(err) |
| + fence := !held && replicaFenceRefusal(err) |
| now := a.now() |
| a.wakeFailMu.Lock() |
| + if !fence { |
| + delete(a.fenceSeen, host) |
| + } |
| for h, s := range a.heldSeen { |
| if now.Sub(s.at) >= wakeFailureForget { |
| delete(a.heldSeen, h) |
| @@ -162,6 +209,10 @@ func (a *Service) noteHeldWake(host string, err error) bool { |
| if !held { |
| delete(a.heldSeen, host) |
| a.wakeFailMu.Unlock() |
| + if fence { |
| + a.noteReplicaFence(host, err) |
| + return false |
| + } |
| return true |
| } |
| last, seen := a.heldSeen[host] |
diff --git a/internal/console/copysince_paths_test.go b/internal/console/copysince_paths_test.go| index 21442c079..9cce0ed31 100644 |
| --- a/internal/console/copysince_paths_test.go |
| +++ b/internal/console/copysince_paths_test.go |
| @@ -530,7 +530,7 @@ var copyInventory = map[string]map[string]int{ |
| "internal/console.decideMoveRecovery": 1, |
| "internal/console.targetFenceStep": 1, |
| "internal/host.observedMove": 1, |
| - "internal/host.replicaRecordFacts": 1, |
| + "internal/host.replicaRecordObservation": 1, |
| "internal/provision.Reconcile": 2, |
| "internal/provision.SeedPublishDemoClaim": 1, |
| "internal/provision.importRow": 1, |
diff --git a/internal/host/agent.go b/internal/host/agent.go| index e5ffcaaac..81206e544 100644 |
| --- a/internal/host/agent.go |
| +++ b/internal/host/agent.go |
| @@ -512,7 +512,7 @@ func runAgent(args []string, buildClaims ClaimFactory) { |
| // lifetime index miss, and the box identity the keep decision |
| // compares, set before the backend copies cfg. |
| cfg.Record = haRecordFacts(openDeployStore, boxJudge) |
| - cfg.ReplicaRecord = replicaRecordFacts(boxLifetimes) |
| + cfg.ReplicaRecord = replicaRecordFacts(boxLifetimes, cfg.Record) |
| cfg.Self = lease.CurrentSelf |
| // Exec children and carlos-app@ unit tenants share one state machine; |
| // the split backend dispatches per route on Backing. Note the arming |
| @@ -4354,13 +4354,13 @@ func haRecordFacts(open func(context.Context) (release.Store, error), judge *pro |
| } |
| } |
| -func replicaRecordFacts(index *provision.LifetimeIndex) func(registry.Route) (activator.RecordFacts, error) { |
| - return func(rt registry.Route) (activator.RecordFacts, error) { |
| - rec, ok := index.ReplicaRecord(rt.Host) |
| - if !ok || rec.Account != release.RouteAccount(rt) || rec.App != rt.App { |
| - return activator.RecordFacts{}, replicas.ErrFenced |
| - } |
| - return activator.RecordFactsOf(rec) |
| +// replicaRecordFacts is activator.Config.ReplicaRecord on this box: the |
| +// box's lifetime index, and live (Record) on an index miss, paced per host |
| +// while it finds nothing (replicaRecordObservation, replicarecord.go). |
| +func replicaRecordFacts(index *provision.LifetimeIndex, live func(context.Context, registry.Route) (activator.RecordFacts, error)) func(context.Context, registry.Route) (activator.RecordFacts, error) { |
| + memo := &replicaMissMemo{} |
| + return func(ctx context.Context, rt registry.Route) (activator.RecordFacts, error) { |
| + return replicaRecordObservation(ctx, index, live, memo, rt) |
| } |
| } |
diff --git a/internal/host/fleet_restart_wake_test.go b/internal/host/fleet_restart_wake_test.go| new file mode 100644 |
| index 000000000..80d25b9e4 |
| --- /dev/null |
| +++ b/internal/host/fleet_restart_wake_test.go |
| @@ -0,0 +1,678 @@ |
| +package host |
| + |
| +// Fleet box restart (plan 2026-11-21-fleet-restart-wake, Task 2): a |
| +// restarted agent's lifetime index is empty until its first reconcile |
| +// scan. A stateless launch's record observation (replicaRecordFacts) reads |
| +// the record live on an index miss instead of refusing, never writes the |
| +// index, and the exec gate's fresh record read (R1) still decides. |
| + |
| +import ( |
| + "context" |
| + "encoding/json" |
| + "errors" |
| + "fmt" |
| + "net/http" |
| + "net/http/httptest" |
| + "os" |
| + "path/filepath" |
| + "strings" |
| + "sync" |
| + "sync/atomic" |
| + "testing" |
| + "time" |
| + |
| + "github.com/carlosframework/platform/internal/activator" |
| + "github.com/carlosframework/platform/internal/provision" |
| + "github.com/carlosframework/platform/internal/registry" |
| + "github.com/carlosframework/platform/internal/release" |
| + "github.com/carlosframework/platform/internal/replicas" |
| +) |
| + |
| +// countedFacts counts the live record reads a replicaRecordFacts makes. |
| +func countedFacts(n *atomic.Int64, read func(context.Context, registry.Route) (activator.RecordFacts, error)) func(context.Context, registry.Route) (activator.RecordFacts, error) { |
| + return func(ctx context.Context, rt registry.Route) (activator.RecordFacts, error) { |
| + n.Add(1) |
| + return read(ctx, rt) |
| + } |
| +} |
| + |
| +// The observation: an index hit answers with no read; a miss reads the |
| +// record once, as Record does, and leaves the index as it was; an absent |
| +// record, another instance's record and a sidecar keep the refusal; a |
| +// failed read is the store's own error, not a refusal (review round 1 |
| +// P2-1), so an always-on instance backs off as for any store outage. |
| +func TestReplicaRecordFactsReadsLiveOnIndexMiss(t *testing.T) { |
| + ctx := context.Background() |
| + store := release.NewDirStore(t.TempDir()) |
| + rec := provision.Record{Schema: 1, Account: "bab", App: "shop", Host: "shop.example.com", Channel: "edge", Runtime: registry.RuntimeRootfsV1, CreatedAt: time.Unix(1700000000, 0).UTC()} |
| + if err := provision.CreateRecord(ctx, store, rec); err != nil { |
| + t.Fatal(err) |
| + } |
| + open := func(context.Context) (release.Store, error) { return store, nil } |
| + var reads atomic.Int64 |
| + index := &provision.LifetimeIndex{} |
| + read := replicaRecordFacts(index, countedFacts(&reads, haRecordFacts(open, nil))) |
| + rt := registry.Route{Account: rec.Account, App: rec.App, Host: rec.Host, Kind: "instance"} |
| + |
| + stored, err := provision.GetRecord(ctx, store, rec.Account, rec.App, rec.Host) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + want, err := activator.RecordFactsOf(*stored) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + got, err := read(ctx, rt) |
| + if err != nil || got.Identity != want.Identity || got.ID != want.ID { |
| + t.Fatalf("index miss: %+v %v, want the record's facts %+v", got, err, want) |
| + } |
| + if reads.Load() != 1 { |
| + t.Fatalf("index miss: %d live reads, want 1", reads.Load()) |
| + } |
| + if _, ok := index.ReplicaRecord(rec.Host); ok { |
| + t.Fatal("the live read wrote the index") |
| + } |
| + if _, ok := index.Lookup(rec.Host); ok { |
| + t.Fatal("the live read wrote a lifetime entry") |
| + } |
| + |
| + index.Merge(map[string]provision.Record{rec.Host: *stored}) |
| + if got, err := read(ctx, rt); err != nil || got.Identity != want.Identity { |
| + t.Fatalf("index hit: %+v %v", got, err) |
| + } |
| + other := rt |
| + other.App = "other" |
| + if _, err := read(ctx, other); !errors.Is(err, replicas.ErrFenced) { |
| + t.Fatalf("index hit for another app: %v, want replicas.ErrFenced", err) |
| + } |
| + if reads.Load() != 1 { |
| + t.Fatalf("an index hit read the record: %d live reads", reads.Load()) |
| + } |
| + |
| + absent := rt |
| + absent.Host = "blog.example.com" |
| + if _, err := read(ctx, absent); !errors.Is(err, replicas.ErrFenced) { |
| + t.Fatalf("absent record: %v, want replicas.ErrFenced", err) |
| + } |
| + if _, ok := index.ReplicaRecord(absent.Host); ok { |
| + t.Fatal("an absent record's read wrote the index") |
| + } |
| + unreachable := errors.New("store unreachable") |
| + failing := replicaRecordFacts(&provision.LifetimeIndex{}, func(context.Context, registry.Route) (activator.RecordFacts, error) { |
| + return activator.RecordFacts{}, unreachable |
| + }) |
| + if _, err := failing(ctx, rt); !errors.Is(err, unreachable) || errors.Is(err, replicas.ErrFenced) { |
| + t.Fatalf("failed read: %v, want the store's error and no refusal", err) |
| + } |
| + foreign := replicaRecordFacts(&provision.LifetimeIndex{}, func(context.Context, registry.Route) (activator.RecordFacts, error) { |
| + f := want |
| + f.Identity.Account = "other" |
| + return f, nil |
| + }) |
| + if _, err := foreign(ctx, rt); !errors.Is(err, replicas.ErrFenced) { |
| + t.Fatalf("another instance's record: %v, want replicas.ErrFenced", err) |
| + } |
| + var sidecarReads atomic.Int64 |
| + sidecar := registry.Route{Account: rec.Account, App: rec.App, Host: "mail.shop.bab.example.com", Kind: "sidecar"} |
| + if _, err := replicaRecordFacts(&provision.LifetimeIndex{}, countedFacts(&sidecarReads, haRecordFacts(open, nil)))(ctx, sidecar); !errors.Is(err, replicas.ErrFenced) || sidecarReads.Load() != 0 { |
| + t.Fatalf("sidecar: %v after %d reads, want replicas.ErrFenced with none", err, sidecarReads.Load()) |
| + } |
| +} |
| + |
| +// A record that stays absent is read at most once per replicaMissPace for |
| +// its host, however many wakes (resident ticks and requests alike, which |
| +// share the closure) ask meanwhile; another host is not held by it; an |
| +// index answer clears the memo, and a store error is never memoised. |
| +func TestReplicaRecordMissIsPacedPerHost(t *testing.T) { |
| + ctx := context.Background() |
| + now := time.Unix(1700000000, 0) |
| + memo := &replicaMissMemo{now: func() time.Time { return now }} |
| + index := &provision.LifetimeIndex{} |
| + var reads atomic.Int64 |
| + var storeDown atomic.Bool |
| + live := func(_ context.Context, rt registry.Route) (activator.RecordFacts, error) { |
| + reads.Add(1) |
| + if storeDown.Load() { |
| + return activator.RecordFacts{}, errors.New("store unreachable") |
| + } |
| + return activator.RecordFacts{}, fmt.Errorf("dirstore: %s: %w", rt.Host, os.ErrNotExist) |
| + } |
| + rt := registry.Route{Account: "bab", App: "shop", Host: "shop.example.com", Kind: "instance"} |
| + // 15 ticks 2 s apart (30 s), each with a request wake beside it. |
| + for i := 0; i < 15; i++ { |
| + for j := 0; j < 2; j++ { |
| + if _, err := replicaRecordObservation(ctx, index, live, memo, rt); !errors.Is(err, replicas.ErrFenced) { |
| + t.Fatalf("tick %d: %v, want the refusal", i, err) |
| + } |
| + } |
| + if i < 14 { |
| + now = now.Add(2 * time.Second) |
| + } |
| + } |
| + if reads.Load() != 1 { |
| + t.Fatalf("an absent record read %d times in one window, want 1", reads.Load()) |
| + } |
| + other := rt |
| + other.Host = "blog.example.com" |
| + replicaRecordObservation(ctx, index, live, memo, other) |
| + if reads.Load() != 2 { |
| + t.Fatalf("another host held by this one's memo: %d reads", reads.Load()) |
| + } |
| + now = now.Add(2 * time.Second) // 30 s since the first read |
| + replicaRecordObservation(ctx, index, live, memo, rt) |
| + if reads.Load() != 3 { |
| + t.Fatalf("no read once the window passed: %d reads", reads.Load()) |
| + } |
| + rec := provision.Record{Account: rt.Account, App: rt.App, Host: rt.Host, CreatedAt: now} |
| + index.Merge(map[string]provision.Record{rt.Host: rec}) |
| + if _, err := replicaRecordObservation(ctx, index, live, memo, rt); err != nil { |
| + t.Fatalf("index hit: %v", err) |
| + } |
| + if memo.held(rt.Host) { |
| + t.Fatal("an index answer left the host memoised") |
| + } |
| + index.Replace(nil) |
| + storeDown.Store(true) |
| + for i := 0; i < 3; i++ { |
| + if _, err := replicaRecordObservation(ctx, index, live, memo, rt); err == nil || errors.Is(err, replicas.ErrFenced) { |
| + t.Fatalf("store error %d: %v, want the error, not a refusal", i, err) |
| + } |
| + } |
| + if reads.Load() != 6 || memo.held(rt.Host) { |
| + t.Fatalf("a store error was memoised: %d reads, held %v", reads.Load(), memo.held(rt.Host)) |
| + } |
| +} |
| + |
| +// barrierStore holds every call of the reconcile pass it serves until |
| +// release closes or the call's context ends. entered closes on the first. |
| +type barrierStore struct { |
| + release.Store |
| + once sync.Once |
| + entered chan struct{} |
| + release chan struct{} |
| +} |
| + |
| +func (s *barrierStore) wait(ctx context.Context) error { |
| + s.once.Do(func() { close(s.entered) }) |
| + select { |
| + case <-s.release: |
| + return nil |
| + case <-ctx.Done(): |
| + return ctx.Err() |
| + } |
| +} |
| + |
| +func (s *barrierStore) Get(ctx context.Context, key string) ([]byte, string, error) { |
| + if err := s.wait(ctx); err != nil { |
| + return nil, "", err |
| + } |
| + return s.Store.Get(ctx, key) |
| +} |
| + |
| +func (s *barrierStore) Put(ctx context.Context, key string, body []byte, ifMatch string) (string, error) { |
| + if err := s.wait(ctx); err != nil { |
| + return "", err |
| + } |
| + return s.Store.Put(ctx, key, body, ifMatch) |
| +} |
| + |
| +func (s *barrierStore) List(ctx context.Context, prefix string) ([]string, error) { |
| + if err := s.wait(ctx); err != nil { |
| + return nil, err |
| + } |
| + return s.Store.List(ctx, prefix) |
| +} |
| + |
| +func (s *barrierStore) ListDirs(ctx context.Context, prefix string) ([]string, error) { |
| + if err := s.wait(ctx); err != nil { |
| + return nil, err |
| + } |
| + return s.Store.ListDirs(ctx, prefix) |
| +} |
| + |
| +func (s *barrierStore) Delete(ctx context.Context, key string) error { |
| + if err := s.wait(ctx); err != nil { |
| + return err |
| + } |
| + return s.Store.Delete(ctx, key) |
| +} |
| + |
| +// restartBackend is failedReleaseBackend that runs beforeExec just before |
| +// a generation's exec seam (the gate StartStaged asks) and says on started |
| +// each build whose generation started. |
| +type restartBackend struct { |
| + *failedReleaseBackend |
| + beforeExec func() |
| + started chan string |
| +} |
| + |
| +func (b *restartBackend) StartStaged(ctx context.Context, rt registry.Route, g activator.Gen) (activator.Gen, activator.Proc, error) { |
| + if b.beforeExec != nil { |
| + b.beforeExec() |
| + } |
| + g, p, err := b.failedReleaseBackend.StartStaged(ctx, rt, g) |
| + if err == nil { |
| + b.started <- g.Build |
| + } |
| + return g, p, err |
| +} |
| + |
| +func (b *restartBackend) StartGenExe(ctx context.Context, rt registry.Route, n uint64, stateless bool, id release.StagedIdentity) (activator.Proc, activator.Gen, error) { |
| + g, p, err := b.StartStaged(ctx, rt, activator.Gen{N: n, Build: id.Version, StagedPath: id.StagedPath, Digest: id.Digest}) |
| + return p, g, err |
| +} |
| + |
| +// restartRig is a single-copy, always-on, stateless rootfs instance |
| +// assigned to box "box" of fleet "pi", on that box, wired as the agent |
| +// wires it (agent.go): Record is haRecordFacts, ReplicaRecord is |
| +// replicaRecordFacts over the box's lifetime index with Record as its live |
| +// read, Fleet is fleetWakeFor's for a valid identity (so the exec gate |
| +// reads the record through Fleet.Record and checks its box label), the |
| +// ExecBackend's instance-control and rootfs gates are ready, and the |
| +// rollout is armed (it gives the activator its release book). Stand-ins: |
| +// the processes are fakes, and the coordinator client is one for the |
| +// whole test, kept across the restart (newRestartRig says why). |
| +type restartRig struct { |
| + t *testing.T |
| + ctx context.Context |
| + dir string |
| + store release.Store |
| + rec provision.Record |
| + rt registry.Route |
| + reg *registry.Registry |
| + facts func(context.Context, registry.Route) (activator.RecordFacts, error) |
| + eb *activator.ExecBackend |
| + be *restartBackend |
| + coord *activator.CoordinationClient |
| + pub string |
| + events *failedReleaseEvents |
| + open func(context.Context) (release.Store, error) |
| + // gateRead, when set, is told of every Fleet.Record read (the exec |
| + // gate's fresh record read on a fleet box). |
| + gateRead func() |
| + // liveErr, when set before runtime, is what every Record call answers |
| + // (a deployment store that cannot be read). |
| + liveErr error |
| +} |
| + |
| +// rigFleet and rigLabel are the fleet and the box the rig's instance is |
| +// assigned to, and rigAssigned the assignment its record and row carry. |
| +const ( |
| + rigFleet = "pi" |
| + rigLabel = "box" |
| + rigAssigned = "assignment-1" |
| +) |
| + |
| +func newRestartRig(t *testing.T) *restartRig { |
| + prev := activator.GenerationsEnabled() |
| + activator.SetGenerations(true) |
| + t.Cleanup(func() { activator.SetGenerations(prev) }) |
| + resetRollout(t) |
| + ctx, cancel := context.WithTimeout(context.Background(), 90*time.Second) |
| + t.Cleanup(cancel) |
| + r := &restartRig{t: t, ctx: ctx, dir: t.TempDir()} |
| + opt := filepath.Join(r.dir, "opt") |
| + t.Setenv("CARLOS_OPT_DIR", opt) |
| + reg, err := registry.Open(filepath.Join(r.dir, "registry.db")) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + t.Cleanup(func() { reg.Close() }) |
| + r.reg = reg |
| + r.store = release.NewDirStore(filepath.Join(r.dir, "store")) |
| + hibernate := false |
| + r.rec = provision.Record{Hibernate: &hibernate, Schema: 1, Account: "bab", App: "shop", Host: "shop.example.com", Channel: "edge", Runtime: registry.RuntimeRootfsV1, CreatedAt: time.Now().UTC(), |
| + FleetBox: rigLabel, FleetBoxAt: rigAssigned} |
| + if err := provision.CreateRecord(ctx, r.store, r.rec); err != nil { |
| + t.Fatal(err) |
| + } |
| + r.open = func(context.Context) (release.Store, error) { return r.store, nil } |
| + r.facts = haRecordFacts(r.open, nil) |
| + r.eb = &activator.ExecBackend{ServedPools: testSharedPoolEvidence, DataDir: r.dir, OptDir: opt, RunDirOverride: filepath.Join(r.dir, "run"), Control: &rootfsWireControl{}, NestedOK: func() error { return nil }, RootfsOK: func(context.Context) error { return nil }, RootfsPlacement: func(context.Context, registry.Route) error { return nil }} |
| + r.be = &restartBackend{failedReleaseBackend: &failedReleaseBackend{plannedBackend: &plannedBackend{socket: healthySocket(t)}, failedReleaseGates: failedReleaseGates{r.eb}}, started: make(chan string, 16)} |
| + r.rt = registry.Route{Host: r.rec.Host, Account: r.rec.Account, App: r.rec.App, Kind: "instance", Status: "ready", Channel: r.rec.Channel, Runtime: r.rec.Runtime, CreatedAt: r.rec.CreatedAt.Unix(), Version: "A", Stateless: true, Assigned: rigAssigned, DBPath: provision.NestedDBPath(r.dir, r.rec.Host), Socket: filepath.Join(r.eb.RunDirOverride, "instances", provision.InstanceID(r.rec.Host), "app.sock")} |
| + data := []byte("rootfs A") |
| + if err := release.StageArtifact(opt, r.rec.Account, "A", r.rec.App, data); err != nil { |
| + t.Fatal(err) |
| + } |
| + path := release.VersionPath(opt, r.rec.Account, "A", r.rec.App) |
| + digest, err := release.FileSHA256(path) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + manifest := release.Manifest{Schema: 1, App: r.rec.App, Version: "A", Kind: "binary", Stateless: true, Artifacts: map[string]release.Artifact{release.BoxPlatform(): {File: "image.squashfs", SHA256: digest}}} |
| + raw, err := json.Marshal(manifest) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + if _, err := r.store.Put(ctx, release.ManifestKey(r.rec.Account, r.rec.App, "A"), raw, ""); err != nil { |
| + t.Fatal(err) |
| + } |
| + if err := os.WriteFile(path+".manifest.json", raw, 0600); err != nil { |
| + t.Fatal(err) |
| + } |
| + if err := reg.Upsert(r.rt); err != nil { |
| + t.Fatal(err) |
| + } |
| + if err := os.MkdirAll(filepath.Dir(r.rt.Socket), 0755); err != nil { |
| + t.Fatal(err) |
| + } |
| + // The box's coordinator client, renewed by its own worker and shared |
| + // with the backend's escrow check, as the agent wires it. A stand-in |
| + // across the restart: one client is kept for both lives, where a real |
| + // restart makes a fresh one. This witness is about the record |
| + // observation, and a fresh client would need the files store and the |
| + // complete sealed copy a real box has to let the escrow check |
| + // (prepareStatelessEscrow) pass. The first real roll witnesses a fresh |
| + // client. |
| + r.coord = newCoordinatorClient(r.store, "", "", rigLabel, "") |
| + t.Cleanup(func() { closeReplicaCoordinator(r.coord) }) |
| + r.coord.Start(ctx) |
| + r.eb.Coordination = r.coord |
| + _, r.pub, err = release.GenerateKey() |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + r.events = &failedReleaseEvents{t: t} |
| + return r |
| +} |
| + |
| +// runtime is one agent life: a Service over index, wired as the agent |
| +// wires it, with its rollout armed. Both are stopped at the test's end. |
| +func (r *restartRig) runtime(index *provision.LifetimeIndex, reads *atomic.Int64) *activator.Service { |
| + r.t.Helper() |
| + liveErr := r.liveErr |
| + record := func(ctx context.Context, rt registry.Route) (activator.RecordFacts, error) { |
| + if liveErr != nil { |
| + return activator.RecordFacts{}, liveErr |
| + } |
| + return r.facts(ctx, rt) |
| + } |
| + cfg := activator.Config{Bucket: "test", Idle: time.Hour, Record: record} |
| + cfg.ReplicaRecord = replicaRecordFacts(index, countedFacts(reads, cfg.Record)) |
| + r.eb.Cfg = cfg |
| + svc := activator.New(cfg, r.be, r.reg) |
| + svc.Routes = r.reg |
| + fleet := fleetWakeFor(func(string) string { return "" }, FleetIdentity{Fleet: rigFleet, Label: rigLabel}, nil, r.store) |
| + gate := fleet.Record |
| + fleet.Record = func(ctx context.Context, rt registry.Route) (*provision.Record, error) { |
| + if r.gateRead != nil { |
| + r.gateRead() |
| + } |
| + return gate(ctx, rt) |
| + } |
| + svc.Fleet = fleet |
| + svc.MarkRootfsSwept() |
| + svc.Coordinator = r.coord |
| + svc.ObserveReplicaRelease = activator.ObservedReplicaRelease |
| + svc.StorageDeclaration = storageDeclaration(r.open) |
| + svc.Logs = r.events |
| + m := armRollout(r.ctx, overlapEnv(r.pub), svc, r.reg, r.dir, r.events, r.open) |
| + if m == nil { |
| + r.t.Fatal("rollout did not arm") |
| + } |
| + r.t.Cleanup(func() { |
| + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) |
| + defer cancel() |
| + svc.Shutdown(ctx) |
| + m.Close(ctx) |
| + }) |
| + return svc |
| +} |
| + |
| +// request is one request to the instance through svc; it answers the |
| +// code and the build that served it. |
| +func (r *restartRig) request(svc *activator.Service) (int, string) { |
| + row, err := r.reg.Get(r.rt.Host) |
| + if err != nil || row == nil { |
| + r.t.Fatalf("route: %v", err) |
| + } |
| + w := httptest.NewRecorder() |
| + req := httptest.NewRequest(http.MethodGet, "http://"+r.rt.Host+"/", nil).WithContext(r.ctx) |
| + svc.ServeHTTP(w, req, *row, http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) { |
| + builds := r.be.builds() |
| + if len(builds) == 0 { |
| + http.Error(w, "no serving process", http.StatusBadGateway) |
| + return |
| + } |
| + fmt.Fprint(w, builds[len(builds)-1]) |
| + })) |
| + return w.Code, w.Body.String() |
| +} |
| + |
| +// awaitStart waits for the next generation start, or fails after bound. |
| +func (r *restartRig) awaitStart(what string, bound time.Duration) string { |
| + r.t.Helper() |
| + select { |
| + case build := <-r.be.started: |
| + return build |
| + case <-time.After(bound): |
| + r.t.Fatalf("%s: no start within %s; builds=%v", what, bound, r.be.builds()) |
| + return "" |
| + } |
| +} |
| + |
| +// firstLife runs the agent before its restart: its index holds the record |
| +// (an earlier scan), a request wakes A, and the agent then stops. |
| +func (r *restartRig) firstLife() { |
| + r.t.Helper() |
| + index := &provision.LifetimeIndex{} |
| + cur, err := provision.GetRecord(r.ctx, r.store, r.rec.Account, r.rec.App, r.rec.Host) |
| + if err != nil { |
| + r.t.Fatal(err) |
| + } |
| + index.Replace(map[string]provision.Record{r.rec.Host: *cur}) |
| + var reads atomic.Int64 |
| + svc := r.runtime(index, &reads) |
| + if code, body := r.request(svc); code != 200 || body != "A" { |
| + r.t.Fatalf("first life: %d %s", code, body) |
| + } |
| + r.awaitStart("first life", time.Second) |
| + if reads.Load() != 0 { |
| + r.t.Fatalf("first life: %d live reads with the index filled", reads.Load()) |
| + } |
| + ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) |
| + defer cancel() |
| + svc.Shutdown(ctx) |
| +} |
| + |
| +// TestRestartedAgentStartsAlwaysOnBeforeFirstScan is the 2026-11-21 |
| +// restart: the agent restarts with an empty lifetime index, and its first |
| +// reconcile pass is held at a barrier inside its record scan for the whole |
| +// test. The always-on single-copy instance is started by the first |
| +// resident tick all the same, from one live record read, and the index is |
| +// still empty when it runs: the scan was not waited for, and the live read |
| +// wrote nothing into it. |
| +func TestRestartedAgentStartsAlwaysOnBeforeFirstScan(t *testing.T) { |
| + r := newRestartRig(t) |
| + r.firstLife() |
| + |
| + index := &provision.LifetimeIndex{} |
| + barrier := &barrierStore{Store: r.store, entered: make(chan struct{}), release: make(chan struct{})} |
| + scanCtx, stopScan := context.WithCancel(r.ctx) |
| + scanDone := make(chan error, 1) |
| + go func() { |
| + scanDone <- provision.Reconcile(scanCtx, barrier, r.reg, provision.ReconcileConfig{DataDir: t.TempDir(), Lifetimes: index}) |
| + }() |
| + t.Cleanup(func() { |
| + stopScan() |
| + <-scanDone |
| + }) |
| + select { |
| + case <-barrier.entered: |
| + case <-time.After(10 * time.Second): |
| + t.Fatal("the first reconcile pass never reached the store") |
| + } |
| + |
| + var reads atomic.Int64 |
| + svc := r.runtime(index, &reads) |
| + svc.Start() |
| + // The first resident tick is residentPoll (2 s) after Start. |
| + if build := r.awaitStart("restarted agent", 15*time.Second); build != "A" { |
| + t.Fatalf("started %s, want A", build) |
| + } |
| + select { |
| + case err := <-scanDone: |
| + t.Fatalf("the first scan finished before the start: %v", err) |
| + default: |
| + } |
| + if _, ok := index.ReplicaRecord(r.rec.Host); ok { |
| + t.Fatal("the index holds the record: the start waited for, or wrote, the scan's observation") |
| + } |
| + if n := reads.Load(); n != 1 { |
| + t.Fatalf("live record reads = %d, want 1 (one per wake attempt)", n) |
| + } |
| + if code, body := r.request(svc); code != 200 || body != "A" { |
| + t.Fatalf("request after the start: %d %s", code, body) |
| + } |
| +} |
| + |
| +// notBackingOff fails the test if a request now is answered with the |
| +// resident backoff: the wake just refused counted as a failure. |
| +func (r *restartRig) notBackingOff(svc *activator.Service, what string) { |
| + r.t.Helper() |
| + if code, body := r.request(svc); code == http.StatusServiceUnavailable && strings.Contains(body, "instance is restarting") { |
| + r.t.Fatalf("%s: the next request meets the resident backoff: the refusal counted as a failure", what) |
| + } |
| +} |
| + |
| +// R1 after the live read, on a fleet box: between the restarted agent's |
| +// live record read and its exec gate, the record changes under it. The |
| +// gate's own fresh read (through Fleet.Record) refuses the launch and |
| +// nothing starts (review round 1 P2-3). |
| +// |
| +// The refusal's class (P2-4): a recreated record is the stateless final |
| +// check's ErrFenced, a refusal, so the next request meets no backoff. A |
| +// record labelled for another box is currentWakeRoute's |
| +// errRouteChangedUnderLease, which residentFailure counts as a failure on |
| +// main as before this branch (refusal false below); that classification |
| +// is not this change's, and is reported to the controller. |
| +func TestRestartedAgentLiveReadStillMeetsTheExecGate(t *testing.T) { |
| + for _, tc := range []struct { |
| + name string |
| + refusal bool |
| + change func(r *restartRig) error |
| + }{ |
| + {"recreated", true, func(r *restartRig) error { |
| + // Deleted and created again: a new lifetime, still this box's. |
| + if err := provision.DeleteRecord(r.ctx, r.store, r.rec.Account, r.rec.App, r.rec.Host); err != nil { |
| + return err |
| + } |
| + again := r.rec |
| + again.CreatedAt = r.rec.CreatedAt.Add(time.Minute) |
| + return provision.CreateRecord(r.ctx, r.store, again) |
| + }}, |
| + {"moved to another box", false, func(r *restartRig) error { |
| + cur, etag, err := provision.GetRecordETag(r.ctx, r.store, r.rec.Account, r.rec.App, r.rec.Host) |
| + if err != nil { |
| + return err |
| + } |
| + cur.FleetBox, cur.FleetBoxAt = "other-box", "assignment-2" |
| + return provision.UpdateRecord(r.ctx, r.store, *cur, etag) |
| + }}, |
| + } { |
| + t.Run(tc.name, func(t *testing.T) { |
| + r := newRestartRig(t) |
| + r.firstLife() |
| + var changed atomic.Bool |
| + r.be.beforeExec = func() { |
| + if !changed.CompareAndSwap(false, true) { |
| + return |
| + } |
| + if err := tc.change(r); err != nil { |
| + t.Error(err) |
| + } |
| + } |
| + var after atomic.Int64 |
| + r.gateRead = func() { |
| + if changed.Load() { |
| + after.Add(1) |
| + } |
| + } |
| + var reads atomic.Int64 |
| + svc := r.runtime(&provision.LifetimeIndex{}, &reads) |
| + if code, _ := r.request(svc); code != http.StatusServiceUnavailable { |
| + t.Fatalf("request across the change: %d, want 503", code) |
| + } |
| + if !changed.Load() { |
| + t.Fatal("the wake never reached its exec seam") |
| + } |
| + if reads.Load() != 1 { |
| + t.Fatalf("live record reads = %d, want 1", reads.Load()) |
| + } |
| + if after.Load() == 0 { |
| + t.Fatal("no Fleet.Record read after the change: the exec gate did not decide") |
| + } |
| + select { |
| + case build := <-r.be.started: |
| + t.Fatalf("%s started across the change", build) |
| + default: |
| + } |
| + if tc.refusal { |
| + r.notBackingOff(svc, tc.name) |
| + } |
| + }) |
| + } |
| +} |
| + |
| +// A restarted agent whose instance record is absent (an index miss the |
| +// live read cannot fill) is refused with one live read for many request |
| +// wakes, with no backoff; one whose deployment store cannot be read backs |
| +// off: the next request meets the resident backoff, and no read is made |
| +// for it (review round 1 P2-1). |
| +func TestRestartedAgentLiveReadMissPacedStoreErrorBacksOff(t *testing.T) { |
| + t.Run("absent record", func(t *testing.T) { |
| + r := newRestartRig(t) |
| + r.firstLife() |
| + if err := provision.DeleteRecord(r.ctx, r.store, r.rec.Account, r.rec.App, r.rec.Host); err != nil { |
| + t.Fatal(err) |
| + } |
| + var reads atomic.Int64 |
| + svc := r.runtime(&provision.LifetimeIndex{}, &reads) |
| + for i := 0; i < 5; i++ { |
| + code, body := r.request(svc) |
| + if code != http.StatusServiceUnavailable || strings.Contains(body, "instance is restarting") { |
| + t.Fatalf("request %d: %d %q, want the fence's 503", i+1, code, body) |
| + } |
| + } |
| + if reads.Load() != 1 { |
| + t.Fatalf("live record reads = %d for five wakes, want 1", reads.Load()) |
| + } |
| + }) |
| + t.Run("store error", func(t *testing.T) { |
| + r := newRestartRig(t) |
| + r.firstLife() |
| + r.liveErr = errors.New("deployment store: unreachable") |
| + var reads atomic.Int64 |
| + svc := r.runtime(&provision.LifetimeIndex{}, &reads) |
| + if code, _ := r.request(svc); code != http.StatusServiceUnavailable { |
| + t.Fatalf("first request: %d, want 503", code) |
| + } |
| + code, body := r.request(svc) |
| + if code != http.StatusServiceUnavailable || !strings.Contains(body, "instance is restarting") { |
| + t.Fatalf("second request: %d %q, want the resident backoff", code, body) |
| + } |
| + if reads.Load() != 1 { |
| + t.Fatalf("live record reads = %d, want 1 (none inside the backoff)", reads.Load()) |
| + } |
| + }) |
| +} |
| + |
| +// The memo holds only hosts missed in the last window: many hosts miss |
| +// once (rows the reconcile pass later removes), the window passes, and one |
| +// more miss leaves that one entry alone (fix check P2). |
| +func TestReplicaMissMemoForgetsExpiredHosts(t *testing.T) { |
| + now := time.Unix(1700000000, 0) |
| + memo := &replicaMissMemo{now: func() time.Time { return now }} |
| + for i := 0; i < 100; i++ { |
| + memo.miss(fmt.Sprintf("host-%d.example.com", i)) |
| + } |
| + if memo.size() != 100 { |
| + t.Fatalf("memo holds %d hosts, want 100", memo.size()) |
| + } |
| + now = now.Add(replicaMissPace) |
| + memo.miss("shop.example.com") |
| + if memo.size() != 1 || !memo.held("shop.example.com") { |
| + t.Fatalf("memo holds %d hosts after the window, want only the live entry", memo.size()) |
| + } |
| +} |
diff --git a/internal/host/replicarecord.go b/internal/host/replicarecord.go| new file mode 100644 |
| index 000000000..07da4a642 |
| --- /dev/null |
| +++ b/internal/host/replicarecord.go |
| @@ -0,0 +1,137 @@ |
| +package host |
| + |
| +import ( |
| + "context" |
| + "errors" |
| + "fmt" |
| + "os" |
| + "sync" |
| + "time" |
| + |
| + "github.com/carlosframework/platform/internal/activator" |
| + "github.com/carlosframework/platform/internal/provision" |
| + "github.com/carlosframework/platform/internal/registry" |
| + "github.com/carlosframework/platform/internal/release" |
| + "github.com/carlosframework/platform/internal/replicas" |
| +) |
| + |
| +// replicaMissPace is how long a host whose live record read found no |
| +// record it may use (absent, judged stale, corrupt, or another instance's) |
| +// is refused with no read again (replicaMissMemo): its record is not |
| +// read more than once per window, by resident ticks and request wakes |
| +// together (fleet restart wake, review round 1 P2-1). |
| +const replicaMissPace = 30 * time.Second |
| + |
| +// replicaMissMemo is the agent's per-host negative memo of live record |
| +// reads that found nothing usable, by host: when the last one was. Cleared |
| +// for a host when the index answers for it or a live read succeeds. now |
| +// is time.Now when nil. |
| +type replicaMissMemo struct { |
| + mu sync.Mutex |
| + at map[string]time.Time |
| + now func() time.Time |
| + pace time.Duration |
| +} |
| + |
| +func (m *replicaMissMemo) clock() time.Time { |
| + if m.now != nil { |
| + return m.now() |
| + } |
| + return time.Now() |
| +} |
| + |
| +func (m *replicaMissMemo) window() time.Duration { |
| + if m.pace == 0 { |
| + return replicaMissPace |
| + } |
| + return m.pace |
| +} |
| + |
| +// held reports whether host missed within the pace window. |
| +func (m *replicaMissMemo) held(host string) bool { |
| + m.mu.Lock() |
| + defer m.mu.Unlock() |
| + at, ok := m.at[host] |
| + return ok && m.clock().Sub(at) < m.window() |
| +} |
| + |
| +// miss memoises host's miss now. Every insert first drops the entries |
| +// whose window has passed, so the memo holds only hosts missed in the |
| +// last window: a host the reconcile pass removed is forgotten at the next |
| +// miss of any host, with no timer. |
| +func (m *replicaMissMemo) miss(host string) { |
| + m.mu.Lock() |
| + defer m.mu.Unlock() |
| + now := m.clock() |
| + for h, at := range m.at { |
| + if now.Sub(at) >= m.window() { |
| + delete(m.at, h) |
| + } |
| + } |
| + if m.at == nil { |
| + m.at = map[string]time.Time{} |
| + } |
| + m.at[host] = now |
| +} |
| + |
| +// size is how many hosts the memo holds. |
| +func (m *replicaMissMemo) size() int { |
| + m.mu.Lock() |
| + defer m.mu.Unlock() |
| + return len(m.at) |
| +} |
| + |
| +func (m *replicaMissMemo) forget(host string) { |
| + m.mu.Lock() |
| + defer m.mu.Unlock() |
| + delete(m.at, host) |
| +} |
| + |
| +// replicaRecordObservation is a stateless launch's record observation for |
| +// rt (replicaRecordFacts). The reconcile pass's lifetime index answers it |
| +// with no read. On an index miss (a restarted agent before its first scan, |
| +// which waits for the moves hold and offline keep views: fastboot.go) live |
| +// reads the record once for this wake, as Record does (haRecordFacts), so |
| +// the wake does not wait for the scan (fleet restart wake, 2026-11-21). |
| +// |
| +// The live read never writes the index: the index stays the scan's |
| +// observation, and the next scan replaces it whole. What the live read |
| +// finds decides the answer: |
| +// - the record, for rt's own account, app and host: its facts; |
| +// - no record it may use (absent or judged stale: os.ErrNotExist; |
| +// corrupt; another instance's facts): a refusal, replicas.ErrFenced, |
| +// as every miss was before, and memo holds the host for |
| +// replicaMissPace, refused with no read; |
| +// - any other error (the store unreachable, a lifetime it could not |
| +// judge): that error, which is not a refusal, so an always-on |
| +// instance backs off as for any store outage (residentFailure). |
| +// |
| +// A sidecar's miss, and a box with no live read (live nil), refuse with no |
| +// read. An index hit for another instance refuses with no read. Whatever |
| +// this observes, the exec gate reads the record again |
| +// (statelessFinalRecord, R1) and refuses a launch whose record moved or |
| +// was recreated since. |
| +func replicaRecordObservation(ctx context.Context, index *provision.LifetimeIndex, live func(context.Context, registry.Route) (activator.RecordFacts, error), memo *replicaMissMemo, rt registry.Route) (activator.RecordFacts, error) { |
| + acct := release.RouteAccount(rt) |
| + if rec, ok := index.ReplicaRecord(rt.Host); ok { |
| + memo.forget(rt.Host) |
| + if rec.Account != acct || rec.App != rt.App { |
| + return activator.RecordFacts{}, replicas.ErrFenced |
| + } |
| + return activator.RecordFactsOf(rec) |
| + } |
| + if live == nil || rt.IsSidecar() || memo.held(rt.Host) { |
| + return activator.RecordFacts{}, replicas.ErrFenced |
| + } |
| + facts, err := live(ctx, rt) |
| + switch { |
| + case errors.Is(err, os.ErrNotExist), errors.Is(err, provision.ErrRecordCorrupt), |
| + err == nil && (facts.Identity.Account != acct || facts.Identity.App != rt.App || facts.Identity.Host != rt.Host): |
| + memo.miss(rt.Host) |
| + return activator.RecordFacts{}, replicas.ErrFenced |
| + case err != nil: |
| + return activator.RecordFacts{}, fmt.Errorf("%s: read the record on a lifetime index miss: %w", rt.Host, err) |
| + } |
| + memo.forget(rt.Host) |
| + return facts, nil |
| +} |
diff --git a/internal/host/stateless_failed_release_test.go b/internal/host/stateless_failed_release_test.go| index 2c745ddfb..b9c40a41e 100644 |
| --- a/internal/host/stateless_failed_release_test.go |
| +++ b/internal/host/stateless_failed_release_test.go |
| @@ -129,7 +129,7 @@ func statelessReleaseHeldProductionWiring(t *testing.T, unknown bool) { |
| } |
| open := func(context.Context) (release.Store, error) { return store, nil } |
| facts := haRecordFacts(open, nil) |
| - cfg := activator.Config{Bucket: "test", Idle: time.Hour, Record: facts, ReplicaRecord: func(rt registry.Route) (activator.RecordFacts, error) { return facts(ctx, rt) }} |
| + cfg := activator.Config{Bucket: "test", Idle: time.Hour, Record: facts, ReplicaRecord: func(ctx context.Context, rt registry.Route) (activator.RecordFacts, error) { return facts(ctx, rt) }} |
| eb := &activator.ExecBackend{ServedPools: testSharedPoolEvidence, Cfg: cfg, DataDir: dir, OptDir: opt, RunDirOverride: filepath.Join(dir, "run"), Control: &rootfsWireControl{}, NestedOK: func() error { return nil }, RootfsOK: func(context.Context) error { return nil }, RootfsPlacement: func(context.Context, registry.Route) error { return nil }} |
| be := &failedReleaseBackend{plannedBackend: &plannedBackend{socket: healthySocket(t)}, failedReleaseGates: failedReleaseGates{eb}, unknown: unknown} |
| rt := registry.Route{Host: rec.Host, Account: rec.Account, App: rec.App, Kind: "instance", Status: "ready", Channel: rec.Channel, Runtime: rec.Runtime, CreatedAt: rec.CreatedAt.Unix(), Version: "A", Stateless: true, DBPath: provision.NestedDBPath(dir, rec.Host), Socket: filepath.Join(eb.RunDirOverride, "instances", provision.InstanceID(rec.Host), "app.sock")} |
diff --git a/internal/host/stateless_runtime_test.go b/internal/host/stateless_runtime_test.go| index cfdaca558..686f30c91 100644 |
| --- a/internal/host/stateless_runtime_test.go |
| +++ b/internal/host/stateless_runtime_test.go |
| @@ -94,31 +94,32 @@ func TestStatelessStorageDeclarationRetriesOpeningStore(t *testing.T) { |
| func TestStatelessPreparationUsesReconcileObservation(t *testing.T) { |
| index := &provision.LifetimeIndex{} |
| - read := replicaRecordFacts(index) |
| + read := replicaRecordFacts(index, nil) |
| + ctx := context.Background() |
| rt := registry.Route{Account: "bab", App: "shop", Host: "shop.example.com"} |
| - if _, err := read(rt); err == nil { |
| + if _, err := read(ctx, rt); err == nil { |
| t.Fatal("missing reconcile observation accepted") |
| } |
| rec := provision.Record{Account: rt.Account, App: rt.App, Host: rt.Host, CreatedAt: time.Unix(1, 0), ReplicaDeploy: &replicas.Deploy{ID: "deploy", Phase: "released", Swap: replicas.Swap{Order: []string{"a"}}}} |
| index.Merge(map[string]provision.Record{rt.Host: rec}) |
| rec.ReplicaDeploy.Phase = "failed" |
| rec.ReplicaDeploy.Swap.Order[0] = "changed" |
| - first, err := read(rt) |
| + first, err := read(ctx, rt) |
| if err != nil || first.ReplicaDeploy.Phase != "released" || first.ReplicaDeploy.Swap.Order[0] != "a" { |
| t.Fatalf("observation=%+v err=%v", first, err) |
| } |
| first.ReplicaDeploy.Phase = "unknown" |
| - second, err := read(rt) |
| + second, err := read(ctx, rt) |
| if err != nil || second.ReplicaDeploy.Phase != "released" { |
| t.Fatalf("caller changed shared observation: %+v %v", second, err) |
| } |
| wrong := rt |
| wrong.App = "other" |
| - if _, err := read(wrong); err == nil { |
| + if _, err := read(ctx, wrong); err == nil { |
| t.Fatal("wrong app accepted") |
| } |
| index.Replace(nil) |
| - if _, err := read(rt); err == nil { |
| + if _, err := read(ctx, rt); err == nil { |
| t.Fatal("removed observation retained") |
| } |
| } |
diff --git a/internal/host/stateless_switch_test.go b/internal/host/stateless_switch_test.go| index 99e0eb10f..0219f850d 100644 |
| --- a/internal/host/stateless_switch_test.go |
| +++ b/internal/host/stateless_switch_test.go |
| @@ -120,7 +120,7 @@ func statefulToStatelessSwitch(t *testing.T, fail bool) { |
| index.Replace(map[string]provision.Record{rec.Host: *cur}) |
| } |
| reconcile() |
| - cfg := activator.Config{Bucket: "test", Idle: time.Hour, Record: facts, ReplicaRecord: replicaRecordFacts(index)} |
| + cfg := activator.Config{Bucket: "test", Idle: time.Hour, Record: facts, ReplicaRecord: replicaRecordFacts(index, facts)} |
| eb := &activator.ExecBackend{ServedPools: testSharedPoolEvidence, Cfg: cfg, DataDir: dir, OptDir: opt, RunDirOverride: filepath.Join(dir, "run"), Control: &rootfsWireControl{}, NestedOK: func() error { return nil }, RootfsOK: func(context.Context) error { return nil }, RootfsPlacement: func(context.Context, registry.Route) error { return nil }} |
| be := switchBackend{&failedReleaseBackend{plannedBackend: &plannedBackend{socket: healthySocket(t)}, failedReleaseGates: failedReleaseGates{eb}}} |
| rt := registry.Route{Host: rec.Host, Account: rec.Account, App: rec.App, Kind: "instance", Status: "ready", Channel: rec.Channel, Runtime: rec.Runtime, CreatedAt: rec.CreatedAt.Unix(), Version: "A", DBPath: provision.NestedDBPath(dir, rec.Host), Socket: filepath.Join(eb.RunDirOverride, "instances", provision.InstanceID(rec.Host), "app.sock")} |
diff --git a/internal/provision/fleet_restart_wake_census_test.go b/internal/provision/fleet_restart_wake_census_test.go| new file mode 100644 |
| index 000000000..d74cf7174 |
| --- /dev/null |
| +++ b/internal/provision/fleet_restart_wake_census_test.go |
| @@ -0,0 +1,35 @@ |
| +package provision |
| + |
| +// fleetRestartWakeWriteCensusInventory is the record-write census for the |
| +// fleet box restart wake (branch fleet-restart-wake, plan |
| +// 2026-11-21-fleet-restart-wake), layered on |
| +// fleetSeededCreate3WriteCensusInventory (main's newest at fe854a4e). |
| +// Reviewed by the branch author against the source. No class or site kind |
| +// changes; one unit is re-pinned: |
| +// |
| +// - Service.statelessObservation (internal/activator/stateless.go): |
| +// passes the wake's ctx to cfg.ReplicaRecord, whose signature now |
| +// takes one so the agent can read the record live on a lifetime index |
| +// miss (internal/host replicaRecordObservation). It writes no record; |
| +// its reference to statelessRecordKey (a context key) is unchanged. |
| +func fleetRestartWakeWriteCensusInventory() []censusEntry { |
| + entries := append([]censusEntry(nil), fleetSeededCreate3WriteCensusInventory()...) |
| + for _, r := range []censusEntry{ |
| + {"internal/activator/stateless.go", "Service.statelessObservation", "reference", "key:statelessRecordKey", "54934202bd46b45496ee4aa7ed1e401d39f636411356f3567e4ac5613fdc18a5"}, |
| + } { |
| + replaced := false |
| + for i, e := range entries { |
| + if e.File == r.File && e.Unit == r.Unit { |
| + if e.Class != r.Class || e.Kinds != r.Kinds { |
| + panic("fleet-restart-wake census: classification changed for " + r.File + ":" + r.Unit) |
| + } |
| + entries[i], replaced = r, true |
| + break |
| + } |
| + } |
| + if !replaced { |
| + panic("fleet-restart-wake census: re-pin of an unlisted unit " + r.File + ":" + r.Unit) |
| + } |
| + } |
| + return entries |
| +} |
diff --git a/internal/provision/plan9_b8_census_test.go b/internal/provision/plan9_b8_census_test.go| index f91fcf000..f267413cc 100644 |
| --- a/internal/provision/plan9_b8_census_test.go |
| +++ b/internal/provision/plan9_b8_census_test.go |
| @@ -366,7 +366,7 @@ func TestPlan9B8RecordWriteCensus(t *testing.T) { |
| if len(got) < 100 { |
| t.Fatalf("census found only %d units under %s; the walk is broken", len(got), root) |
| } |
| - inventory := fleetSeededCreate3WriteCensusInventory() |
| + inventory := fleetRestartWakeWriteCensusInventory() |
| problems := append(censusDiff(inventory, got), censusPolicy(inventory)...) |
| if len(problems) > 0 { |
| t.Fatalf("record-write census rejected %d site(s); update the explicit inventory only after reviewing the source:\n %s", len(problems), strings.Join(problems, "\n ")) |
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv| index 15eb27557..bebca095b 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-chain.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-chain.tsv |
| @@ -268,3 +268,4 @@ plan14-root-reads-edge-held-cap.tsv f06c832e5595b5a0c256639131d094a94da4505d0e64 |
| plan14-root-reads-fleet-seeded-create-1.tsv 5ce0990b80e0447439484d36a7a87af70708aa5ce113491aecc09d87167277f0 |
| plan14-root-reads-fleet-seeded-create-2.tsv 8a0a9cca336d3e695b79990a9aeda17f5ee8d74908752944f7dcd129918c80fc |
| plan14-root-reads-fleet-seeded-create-3.tsv 8a0a9cca336d3e695b79990a9aeda17f5ee8d74908752944f7dcd129918c80fc |
| +plan14-root-reads-fleet-restart-wake.tsv 2967f0ba9722910621cedcfafc270cea3268a6de55738667574a20e67fd7f4e5 |
diff --git a/internal/provision/testdata/plan14-root-reads-fleet-restart-wake.tsv b/internal/provision/testdata/plan14-root-reads-fleet-restart-wake.tsv| new file mode 100644 |
| index 000000000..5b32a4218 |
| --- /dev/null |
| +++ b/internal/provision/testdata/plan14-root-reads-fleet-restart-wake.tsv |
| @@ -0,0 +1,18 @@ |
| +# Census overlay fleet-restart-wake, written by census-propose (#369). census-ruling-fleet-restart-wake, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-fleet-restart-wake.md. |
| +# 6 body, 1 sites, 2 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +# 1 new dispositions: 0 reads re-frozen at their disposition with the claim, 1 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other. |
| +@legacy 00223a60a908c79facee202b0efc314afc04e90e0cf3b386697af290312e9077 internal/activator/activator.go Service.serve legacy accepted-legacy accepted-legacy;rev3=census-ruling-hotfix281;basis=Startup repeats the existing Kind and Hibernate checks; error logging moved to serveWakeError. A request held through startup re-reads its own route's Socket and Addr and can only refuse (wake-timeout 503) when recovery moved them; agent-side, deny-only, no root decision.;rev3=census-ruling-edge-request-records;basis=passes the member request r to begin's new req parameter; no read added;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 5: the activator-managed test is Route.ActivatorOwned instead of Kind and Hibernate inline, so a resident rootfs instance is the activator's; same deploy-safety for binary rows;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: a verified HA hop this box cannot serve gets the holder diagnostic; two new whole:Route sites pass the route to answerForwarded/noteNoHolder; no new kind of read;rev3=census-ruling-region-ha-g2-fixes;basis=Refuse latched HA lease loss before startup wait or proxy accounting, and schedule bounded recovery; reads supplied route, no new external read here.;rev3=census-ruling-region-ha-held-build;basis=region HA held-requests Task 2: after begin succeeds, edge.ReleaseMoveTicket(r) ends the request's in-memory admission ticket; on the sidecar path the same after BeginSidecarRequest; no read added;rev3=census-ruling-held-move-speed;basis=after begin succeeds, wraps r with an edge.StreamEnd (a cancellable child context) and tracks it under rt.Host in the in-memory moveStreams until the request ends (+registry:Host: the supplied route's Host as the map key); no new kind of read, no root decision;rev3=census-ruling-retry-after-503;basis=the sidecar-asleep 503 is written through edge.Unavailable (Retry-After 5 unchanged, adds answer/box headers); no read added;rev3=census-ruling-stateless-replicas-4-drill3;basis=review round 1 (R27): its four refusals before the proxy runs (HA lease refusal, awaitStartup, the near-startup recheck, begin) call serveWakeErrorBeforeApp instead of serveWakeError; no read added, same 18 sites; the activator in the agent, no root decision;rev3=census-ruling-fleet-restart-wake;basis=Fleet restart wake Task 1: the sidecar request path answers the maintenance 503 for fenceRefusal (the activator ErrFenced or replicas.ErrFenced, bare or wrapped) where it named ErrFenced. No read added; agent, not root. registry:Addr@1149,registry:Addr@1163,registry:Host@1074,registry:Host@1283,registry:Host@3988,registry:Socket@1120,registry:Socket@1136,whole:Route@1099,whole:Route@1217,whole:Route@1351,whole:Route@198,whole:Route@261,whole:Route@2900,whole:Route@3001,whole:Route@307,whole:Route@3765,whole:Route@3837,whole:Route@544 d4ebd01b6ab7df47ebfc7141db4411afdf0c4139bd98239229a1594a7dcd5fcd |
| +@legacy 1751711c51118973ae1a6adb45d4916b2e86ec6503c1978c92fd56ec19157ffd internal/activator/activator.go Service.wake legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=Re-digested at the pre-land merge: the body includes main's own change under census ruling 292, with no further change from this branch. the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body; the stop now carries its reason for a run it interrupts (beginStopLocked's why argument); read sites unchanged, offsets moved;rev3=census-ruling-wake-latency-1;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=logs that timer's breakdown to the journal after a successful wake (w.steps.String(), e.host, w.wakeTook); no read added;rev3=census-ruling-plans-4d-lapse;basis=cancels a wake whose row the turned-off hook names, like a fence, unless it is a move's active probe (plans 4d). One more whole-row read: the row handed to the hook (a.disabled). Only refuses.;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: a refusal before the lease is reported once per change (noteRootfsRefusal) instead of a wake-failure event; the proc, generation and replica are installed through installProcLocked (which puts a resident under its lease watch before the fence); residency notes the outcome (noteResidentWakeLocked); same generation values;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R [pf R3.5]: the wake's context ceiling is wakeCeilingFor(e.route): the old 5 minutes for a binary row, 5 minutes plus runs.MaxTimeout for a rootfs row (room for a release inside the wake); new site +whole:Route (e.route to wakeCeilingFor, which reads Runtime only); no other change;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (branch review R1 P1-1): the wake's context is also cancelled before doWake when RetireExcept has marked the entry retired (e.retired, in memory under a.mu), as it is for a fence or a shutdown. Read sites unchanged (13). Agent, not root; it only refuses more.;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Carry successful hold preparation into its wake, preserve actual mode in the generation and OnWake projection, and project serving version/mode through the narrow registry writer before releasing wake waiters. Final review I1: SetServingMode only for non-worker successful wakes with a nonempty spawned version and either a stateless generation or a mode transition from the route. Ordinary stateful wakes leave rollout status and the wake critical path unchanged.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds a.cancelHeldLegsLocked(e, 0) on the failed-wake path before the entry is deleted, and after close(e.ready) on success calls a.noteHeldAdmissible(e.host), the non-blocking held wake callback, outside a.mu. No read added.;rev3=census-ruling-wake-storm-cap;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): waits for a box-wide wake slot (acquireWakeSlot, an in-memory buffered channel) before doWake; the fence/shutdown/retired/disabled refusals move into refuseWakeLocked and are asked again after admission (one fewer direct whole-Route read here: a.disabled(e.route) now runs inside refuseWakeLocked, same value); e.wakeStart is set at admission and e.admitted marks it. Only waits and refuses more; no new read.;rev3=census-ruling-region-ha-p1b3b-t;basis=Install the successful-acquire observer and restrict due, worker and resident starts before doWake, off a.mu. Add a whole-route argument to restriction; refused work has known-no-start evidence.;rev3=census-ruling-region-ha-g2-fixes;basis=Bind recovery wakes to the service lifetime; no new read.;rev3=census-ruling-edge-page-cache-1;basis=the generation-current call is now noteCurrent(e) instead of noteCurrent(e.host, e.gen.N), so the new noteCurrent can also publish the process's page cache launch inputs; read sites unchanged (16); no read added;rev3=census-ruling-fix-silent-start-kill-861;basis=#861: a failed wake that journalledWakeFailure counts as a real failure is logged through logWakeFailure (rate-limited per host, in memory); a successful wake calls clearWakeFailure. Agent, not root; reads the error already in hand; no read added;rev3=census-ruling-stateless-replicas-4-task5;basis=Task 5 first commit (#511 F11 log dedupe): before a failed wake's member event, noteHeldWake (in-memory, per host, under the leaf wakeFailMu) tells whether the failure is held by a release attempt with no backoff and is the same (attempt ID, error class) as the host's last one; a repeat writes no event, a first or changed one writes one journal line and the event. Reads only the error in hand; no read site added.;rev3=census-ruling-stateless-replicas-4-merge-main;basis=Merge of main 5fac2ff1: both sides changed it. Main (27d3f501, activator-settle-wait) adds the background counter increment and deferred decrement at entry; this branch (Task 5) keeps its own changes. Both kept as-is; no read added.;rev3=census-ruling-g6-fence;basis=G6 F-C Task 3, the agent as carlos: a wakeReturned test seam (nil in production) after doWake; on a failed wake of an entry the write fence marked (e.writeFenced, in memory) e.err wraps ErrHALeaseUnavailable; at the awake transition a marked entry begins the existing StopLeaseLost stop before e.ready closes. Only refuses and stops more; no read added; no kill, no root call.;rev3=census-ruling-drain-quiesce-1062;basis=#1062: the failed-wake cleanup calls endHARecoveryLocked(e) as it removes the entry (in-memory, under a.mu); read sites unchanged, no read added;rev3=census-ruling-fleet-restart-wake;basis=Fleet restart wake Task 1: comment only. The said-already branch now also covers a replica fence refusal, which noteHeldWake journals once per change (noteReplicaFence) with no member event. No read added. registry:Socket@9337,registry:Socket@9498,registry:Stateless@11206,registry:Stateless@11954,whole:Route@11197,whole:Route@11252,whole:Route@11956,whole:Route@1811,whole:Route@3420,whole:Route@3790,whole:Route@3947,whole:Route@515,whole:Route@7599,whole:Route@9290,whole:Route@9339,whole:Route@9500 3ae7d593248c291799430f4788a56e2f541cb1f6f8aa124bb414c37ba3ababc8 |
| +@legacy ba2a893b6c00d0202948b53ed25284230051fe2b873e2eb517a965d0874e8b7c internal/activator/stateless.go Service.statelessObservation legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Carry the current attempt record facts and canonical target into the existing immutable observation carrier. Reuse a matching carrier, never lifetime-index or process-global release evidence. Fix 3a round 1 I2: obtain preparation facts from the existing reconcile snapshot, not another bucket read. Freeze the observation for this attempt; no snapshot grants launch permission. The final backend gate freshly validates record placement, identity and released deploy.;rev3=census-ruling-fleet-restart-wake;basis=Fleet restart wake Task 2: passes the wake ctx to cfg.ReplicaRecord, whose signature now takes a ctx. Same reads; the exec gate fresh record read (statelessFinalRecord, R1) is unchanged and still decides. whole:Route@201,whole:Route@337,whole:Route@389,whole:Route@496,whole:Route@714,whole:Route@765 54934202bd46b45496ee4aa7ed1e401d39f636411356f3567e4ac5613fdc18a5 |
| +@legacy 8733d016dfa8cffeffb1fe4caf09cf5c6327422447bd6c5975c16bb3adc2c98c internal/host/replicarecord.go replicaRecordObservation legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-restart-wake;basis=Fleet restart wake Task 2, new; review round 1 P2-1. Index hit: the reconcile pass snapshot, account and app must match, no read, and the host memo is cleared. Index miss on a non-sidecar route not held by the memo: one call of live (cfg.Record, haRecordFacts: the judged read of the host record from the deployment store, the same read the exec gate makes). Its facts must name rt account, app and host. Absent, judged stale, corrupt or foreign: refuses with replicas.ErrFenced and memoises the host for 30 s (rt.Host keys an in-memory map: the added registry:Host sites), so no further read for it in that window. Any other read error is returned wrapped, not as a refusal, so an always-on instance backs off. Never writes the lifetime index. Agent (uid carlos), not root; root reads nothing new. registry:App@379,registry:App@795,registry:Host@1027,registry:Host@1057,registry:Host@302,registry:Host@331,registry:Host@534,registry:Host@828,registry:Host@850,whole:Route@263,whole:Route@626 417d767a42111287e35a2bced6d5af57cb072841eeb9c1bad417e91452c63fc5 |
| +@legacy e529c655081a82e9f84567d1d3172ab3a5f07796def72f19e3b720e930f7cb17 internal/host/agent.go replicaRecordFacts legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Fix 3a round 1 I2: read existing in-memory reconcile snapshot for release preparation, require account/app/host match, derive RecordFacts. Missing snapshot refuses until reconciliation; fresh final record check still required.;rev3=census-ruling-fleet-restart-wake;basis=Fleet restart wake Task 2 and review round 1 P2-1: the body makes one in-memory replicaMissMemo per closure and delegates to replicaRecordObservation (replicarecord.go), so its registry:App and registry:Host sites moved there. An index hit is answered as before with no read. Agent (uid carlos), not root; no read added here. whole:Route@374 9dfbeb4f8231b6d15c937ad237dacf0d2dccb58b5229989a983da91af020348a |
| +internal/activator/activator.go Service.serve legacy accepted-legacy accepted-legacy;rev3=census-ruling-hotfix281;basis=Startup repeats the existing Kind and Hibernate checks; error logging moved to serveWakeError. A request held through startup re-reads its own route's Socket and Addr and can only refuse (wake-timeout 503) when recovery moved them; agent-side, deny-only, no root decision.;rev3=census-ruling-edge-request-records;basis=passes the member request r to begin's new req parameter; no read added;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 5: the activator-managed test is Route.ActivatorOwned instead of Kind and Hibernate inline, so a resident rootfs instance is the activator's; same deploy-safety for binary rows;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: a verified HA hop this box cannot serve gets the holder diagnostic; two new whole:Route sites pass the route to answerForwarded/noteNoHolder; no new kind of read;rev3=census-ruling-region-ha-g2-fixes;basis=Refuse latched HA lease loss before startup wait or proxy accounting, and schedule bounded recovery; reads supplied route, no new external read here.;rev3=census-ruling-region-ha-held-build;basis=region HA held-requests Task 2: after begin succeeds, edge.ReleaseMoveTicket(r) ends the request's in-memory admission ticket; on the sidecar path the same after BeginSidecarRequest; no read added;rev3=census-ruling-held-move-speed;basis=after begin succeeds, wraps r with an edge.StreamEnd (a cancellable child context) and tracks it under rt.Host in the in-memory moveStreams until the request ends (+registry:Host: the supplied route's Host as the map key); no new kind of read, no root decision;rev3=census-ruling-retry-after-503;basis=the sidecar-asleep 503 is written through edge.Unavailable (Retry-After 5 unchanged, adds answer/box headers); no read added;rev3=census-ruling-stateless-replicas-4-drill3;basis=review round 1 (R27): its four refusals before the proxy runs (HA lease refusal, awaitStartup, the near-startup recheck, begin) call serveWakeErrorBeforeApp instead of serveWakeError; no read added, same 18 sites; the activator in the agent, no root decision;rev3=census-ruling-fleet-restart-wake;basis=Fleet restart wake Task 1: the sidecar request path answers the maintenance 503 for fenceRefusal (the activator ErrFenced or replicas.ErrFenced, bare or wrapped) where it named ErrFenced. No read added; agent, not root. registry:Addr@1149,registry:Addr@1163,registry:Host@1074,registry:Host@1283,registry:Host@3988,registry:Socket@1120,registry:Socket@1136,whole:Route@1099,whole:Route@1217,whole:Route@1351,whole:Route@198,whole:Route@261,whole:Route@2900,whole:Route@3001,whole:Route@307,whole:Route@3765,whole:Route@3837,whole:Route@544 d4ebd01b6ab7df47ebfc7141db4411afdf0c4139bd98239229a1594a7dcd5fcd |
| +internal/activator/activator.go Service.serveWakeError diagnostic C,J4 rev3=PROPOSED-seed; incarnation-keyed missing-files diagnostics and indexed retry results; throttles output only and grants no retry, stop or launch;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: one more case, errLeaseRefused (a born-HA host outside the nested layout or an HA acquire's refusal): logged at most once per diagnostic window (allowFilesDiagnostic(rt.Host, ...)) and answered 503 with Retry-After: 10; the other cases unchanged; +registry:Host x2 are rt.Host in that call and the log line; it only answers;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: two new answers, a resident inside its backoff gets 503 with Retry-After (RFS-3-C16), and a rootfs row refused before the lease (errRootfsNotAdmitted) gets the existing wake-failed 503; no read added;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: for a verified HA hop, a held lease answers 503 Retry-After 1 with X-Carlos-Holder (answerForwarded) and every other refusal adds X-Carlos-Holder: none (noteNoHolder); legacy routes and cancellation unchanged; same reads;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: neutral admission 503 with Retry-After before forwarded-holder diagnostics; no new read, no holder identity. Fix R1: distinguish startup from drain/shutdown using the same admission state; retain 503, Retry-After, no-store and removal of holder identity. Read sites unchanged.;rev3=census-ruling-region-ha-g2-fixes;basis=Answer latched HA loss and pool refusal with the shared unavailable response; no new read.;rev3=census-ruling-region-ha-shutting-down-retry;basis=Task 0: errShuttingDown (a request met by Shutdown, #292) is answered with the existing admission unavailable 503 (Retry-After: 10, no-store, holder removed), before answerForwarded, instead of the default wake-failed 503 with no Retry-After and a wake log line; no new read, read sites unchanged.;rev3=census-ruling-retry-after-503;basis=every case answers through edge.Unavailable with its own site name; Retry-After values unchanged; rootfs-not-admitted and the default wake-failed answer now carry Retry-After 5 (#421); no read added;rev3=census-ruling-fleet-restart-wake;basis=Fleet restart wake Task 1: the fence case is fenceRefusal, so a replicas.ErrFenced refusal answers the maintenance 503 as ErrFenced does, not wake-failed. No read added; agent, not root. registry:Host@1918,registry:Host@1982,registry:Host@3484,registry:Host@3548,whole:Route@1111 ab4c2b11294a91e1de128ad0bf38d98ee3b20d89ee7b8b3ec205f4ae05229d94 |
| +internal/activator/activator.go Service.wake legacy accepted-legacy accepted-legacy;rev3=census-ruling-carlos-run;basis=Re-digested at the pre-land merge: the body includes main's own change under census ruling 292, with no further change from this branch. the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body; the stop now carries its reason for a run it interrupts (beginStopLocked's why argument); read sites unchanged, offsets moved;rev3=census-ruling-wake-latency-1;identity=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos);basis=logs that timer's breakdown to the journal after a successful wake (w.steps.String(), e.host, w.wakeTook); no read added;rev3=census-ruling-plans-4d-lapse;basis=cancels a wake whose row the turned-off hook names, like a fence, unless it is a move's active probe (plans 4d). One more whole-row read: the row handed to the hook (a.disabled). Only refuses.;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: a refusal before the lease is reported once per change (noteRootfsRefusal) instead of a wake-failure event; the proc, generation and replica are installed through installProcLocked (which puts a resident under its lease watch before the fence); residency notes the outcome (noteResidentWakeLocked); same generation values;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R [pf R3.5]: the wake's context ceiling is wakeCeilingFor(e.route): the old 5 minutes for a binary row, 5 minutes plus runs.MaxTimeout for a rootfs row (room for a release inside the wake); new site +whole:Route (e.route to wakeCeilingFor, which reads Runtime only); no other change;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (branch review R1 P1-1): the wake's context is also cancelled before doWake when RetireExcept has marked the entry retired (e.retired, in memory under a.mu), as it is for a fence or a shutdown. Read sites unchanged (13). Agent, not root; it only refuses more.;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Carry successful hold preparation into its wake, preserve actual mode in the generation and OnWake projection, and project serving version/mode through the narrow registry writer before releasing wake waiters. Final review I1: SetServingMode only for non-worker successful wakes with a nonempty spawned version and either a stateless generation or a mode transition from the route. Ordinary stateful wakes leave rollout status and the wake critical path unchanged.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds a.cancelHeldLegsLocked(e, 0) on the failed-wake path before the entry is deleted, and after close(e.ready) on success calls a.noteHeldAdmissible(e.host), the non-blocking held wake callback, outside a.mu. No read added.;rev3=census-ruling-wake-storm-cap;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): waits for a box-wide wake slot (acquireWakeSlot, an in-memory buffered channel) before doWake; the fence/shutdown/retired/disabled refusals move into refuseWakeLocked and are asked again after admission (one fewer direct whole-Route read here: a.disabled(e.route) now runs inside refuseWakeLocked, same value); e.wakeStart is set at admission and e.admitted marks it. Only waits and refuses more; no new read.;rev3=census-ruling-region-ha-p1b3b-t;basis=Install the successful-acquire observer and restrict due, worker and resident starts before doWake, off a.mu. Add a whole-route argument to restriction; refused work has known-no-start evidence.;rev3=census-ruling-region-ha-g2-fixes;basis=Bind recovery wakes to the service lifetime; no new read.;rev3=census-ruling-edge-page-cache-1;basis=the generation-current call is now noteCurrent(e) instead of noteCurrent(e.host, e.gen.N), so the new noteCurrent can also publish the process's page cache launch inputs; read sites unchanged (16); no read added;rev3=census-ruling-fix-silent-start-kill-861;basis=#861: a failed wake that journalledWakeFailure counts as a real failure is logged through logWakeFailure (rate-limited per host, in memory); a successful wake calls clearWakeFailure. Agent, not root; reads the error already in hand; no read added;rev3=census-ruling-stateless-replicas-4-task5;basis=Task 5 first commit (#511 F11 log dedupe): before a failed wake's member event, noteHeldWake (in-memory, per host, under the leaf wakeFailMu) tells whether the failure is held by a release attempt with no backoff and is the same (attempt ID, error class) as the host's last one; a repeat writes no event, a first or changed one writes one journal line and the event. Reads only the error in hand; no read site added.;rev3=census-ruling-stateless-replicas-4-merge-main;basis=Merge of main 5fac2ff1: both sides changed it. Main (27d3f501, activator-settle-wait) adds the background counter increment and deferred decrement at entry; this branch (Task 5) keeps its own changes. Both kept as-is; no read added.;rev3=census-ruling-g6-fence;basis=G6 F-C Task 3, the agent as carlos: a wakeReturned test seam (nil in production) after doWake; on a failed wake of an entry the write fence marked (e.writeFenced, in memory) e.err wraps ErrHALeaseUnavailable; at the awake transition a marked entry begins the existing StopLeaseLost stop before e.ready closes. Only refuses and stops more; no read added; no kill, no root call.;rev3=census-ruling-drain-quiesce-1062;basis=#1062: the failed-wake cleanup calls endHARecoveryLocked(e) as it removes the entry (in-memory, under a.mu); read sites unchanged, no read added;rev3=census-ruling-fleet-restart-wake;basis=Fleet restart wake Task 1: comment only. The said-already branch now also covers a replica fence refusal, which noteHeldWake journals once per change (noteReplicaFence) with no member event. No read added. registry:Socket@9337,registry:Socket@9498,registry:Stateless@11206,registry:Stateless@11954,whole:Route@11197,whole:Route@11252,whole:Route@11956,whole:Route@1811,whole:Route@3420,whole:Route@3790,whole:Route@3947,whole:Route@515,whole:Route@7599,whole:Route@9290,whole:Route@9339,whole:Route@9500 3ae7d593248c291799430f4788a56e2f541cb1f6f8aa124bb414c37ba3ababc8 |
| +internal/activator/activator.go type Service authority B,C,D,F,J4 rev3=PROPOSED-seed; existing activator lifecycle and due-wake state plus owned seed exclusion and incarnation-keyed diagnostics; normal refusal and preparation ordering remain authoritative; PROPOSED-plans-2-box-limits adds the idleFor hook field, which only narrows idle windows;rev3=census-ruling-plans-4c-box-throttle;basis=gains the maxRunFor hook field beside idleFor (plans 4c). No read added.;rev3=census-ruling-plans-4d-lapse;basis=gains the disabledFor hook field beside maxRunFor (plans 4d). No read added.;rev3=census-ruling-remote-instance-metrics;basis=gains tenancySeq, hostTenants and hostMixed, in-memory fields for Tenancies; no read added;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: one more field, markers (markerRetry: an atomic running flag and the last log time) for retryOwedMarkers; no read added; merge of origin/main d7ae1d76: main's fields are kept as main has them (census-ruling-remote-instance-metrics: tenancySeq, hostTenants, hostMixed); this branch's change is the same as above;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Tasks 7 and 8: new fields for rootfs admission (rootfsArmed, rootfsSwept), the per-host gate ask and refusal memo, and residency state (lister, backoff, start ceiling, cursor, test seam); no read;rev3=census-ruling-rootfs-apps-3-release;basis=rootfs Plan 3 Group R: one new field, releaseOps (host to the in-memory release record, under a.mu); no read;rev3=census-ruling-rootfs-apps-3-workers;basis=rootfs Plan 3 Group W: one new field, leaseNow (a clock seam for a worker start's headroom against the lease deadline, nil is the real clock); no read;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2: gains the holder cache and its single-flight state; no read;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (controller ruling after branch review R1, and Paul's R2 ruling): one field, Fleet (activator.FleetWake: the box's fleet state, not on a fleet by default, on a fleet with a known label and a record reader, or on a fleet with an invalid identity), set by the agent before Start and read only by routeCurrentUnderLease. No read in the declaration. Agent, not root.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 7a fix round 1: one field, drainBudget (time.Duration), which New copies from residentDrainBudget and a rootfs entry's lease watch reads in its place, so a test's change of the package var never races a watch goroutine; declaration only, reads nothing; merge of origin/main 6f1f6ca6: main's one field, Fleet (activator.FleetWake), is kept as main has it (census-ruling-managed-fleets-1b); this branch's change is the same as above;rev3=census-ruling-region-ha-p1b3a;basis=Add bounded placement peer and diagnostic state and the over-capacity callback; no read in this declaration and no new root authority.;rev3=census-ruling-stateless-replicas-1;basis=Add coordinator, existing-record observation callback and per-host preparation locks; no read in the declaration. Task 3a: Add optional canonical storage-selection and durable deploy-ID callbacks; declaration only, no read or authority in these fields.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): adds the heldLegs map to actEntry (legs by id, under a.mu) and heldWakeHook (atomic pointer to a callback) and heldLegSeq (atomic counter) to Service. State only, in memory; no read of tenant, app or box-agent-writable input.;rev3=census-ruling-wake-storm-cap;basis=the agent as carlos: one field, wakeSlots (chan struct{}, the wake semaphore made by New from Config.WakeSlots, default 4); declaration only, no read.;rev3=census-ruling-region-ha-p1b3b-t;basis=Add the B2 DutyStore interface field and process-local duty view, suppression and invalidation state. No read added. B2 adds the verified-successor identity callback; no read in the declaration. B3b adds a nonblocking departure-suspicion callback, invoked only after an accepted holder-forward failure and after cache locks release; it cannot authorize a take.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: immutable callbacks installed before Start for tenant admission, local start permission, fixed route exemptions and shutdown closure; nil callbacks preserve switch-off behavior; no new reads. Fix R1: add an immutable startup-phase callback for response copy, set before service startup. No new read or execution authority.;rev3=census-ruling-region-ha-g2-fixes;basis=Add in-memory HA loss state and pool withdrawal jobs; no new read.;rev3=census-ruling-region-ha-held-build;basis=region HA held-requests Task 1: one new field, drain (drainSources: two atomic func pointers for this box's and peers' drain state); no read added. region HA held-requests Task 2: one new field, moves (moveTable: per-host move state, hold counts and admission tickets in memory, under mu); no read added;rev3=census-ruling-held-move-speed;basis=the agent as carlos: one new field, moveStreams (per-host in-memory set of edge.StreamEnd for requests in flight, own mutex), for the move's early stream cut; actEntry gains drainRelease (bool, under a.mu), set by DrainStop; declarations only, no read added;rev3=census-ruling-fix-silent-start-kill-861;basis=#861: two fields, wakeFailMu and wakeFailLogged (per-host in-memory note of the last journalled wake failure); declaration only, no read;rev3=census-ruling-w6-ingress-drain;basis=new field TenantStartsClosed func() bool; when it answers true tenantStartRefusal refuses every start, exempt routes included. Wired only by fixedAdmission.bind to the ingress drain's closed flag. Struct field only; no read added.;rev3=census-ruling-stateless-replicas-4-task2;basis=Task 2: one field, replicaPolicies (host to the newest observed replica deploy and this box label, under mu), set only by SetReplicaDeploy; declaration only, no read.;rev3=census-ruling-stateless-replicas-4-task2-fix1;basis=Task 2 fix round 1: one more in-memory field, replicaFailed (host to the permit whose successor failed here, under mu), so that step only proves what it kept; declaration only, no read.;rev3=census-ruling-stateless-replicas-4-task3f;basis=Task 3F fix round 3 (#511 F11): two hook fields, MarkReplicaRelease and ReplicaReleaseMark (the failure book's per-host release mark on this box's disk). No read site.;rev3=census-ruling-stateless-replicas-4-task5;basis=Task 5 first commit (#511 F11): one in-memory field, heldSeen (host to the last held release attempt, error class and when it was met), under the existing wakeFailMu. Declaration only, no read.;rev3=census-ruling-stateless-replicas-4-merge-main;basis=Merge of main 5fac2ff1: both sides changed it. Main (27d3f501) adds the background atomic.Int64 field that tests wait on; this branch keeps its replica fields. Both kept as-is; no read added.;rev3=census-ruling-stateless-replicas-4-final;basis=#511 final wave item 3: adds replicaSwitched, an in-memory map of the permit each set row switched under (host -> permit key, time, resident flag); no read added; #511 micro-fix P1b: adds replicaNoGen, an in-memory map (host -> permit key and when first seen) that is only the bound's clock for a restarted permit holder with no generation; no read added;rev3=census-ruling-stateless-replicas-4-drill1;basis=#511 drill 1 R20 bound (round 1: clock with start and last seen): one in-memory field, releaseConfigWaits (per host, a stateless release's config wait), under mu; no read;rev3=census-ruling-stateless-replicas-4-r28;basis=R28 review round 2 (#511): one field, retiringCopy, an atomic pointer to the edge's in-memory retired-copy check, handed over by edge.New (SetRetiringCopy); no read, no root decision;rev3=census-ruling-g6-fence;basis=G6 F-C Task 3, the agent as carlos: four fields, fenceWatchers (sync.WaitGroup of running write-fence watchers) and three test seams nil in production (fenceWatchStarted, retainDB, wakeReturned). Declaration only, no read.;rev3=census-ruling-fleet-record-labels-m1;basis=fleet record labels R1/R2: actEntry gains checkpoint state (busy while CloseProven runs, unproven, named-once flag for C45), in-memory under a.mu; the worker gains fence pacing apart from crash backoff; Service gains test seams nil in production; declarations only, no read;rev3=census-ruling-race-activator-1249;basis=adds two test-only fields: leaseWork (a WaitGroup counting lease watches and the one-shot stops a short lease starts) and leaseWatchStop (a channel, nil in production, that a test closes to end every lease watch); no read added and production never waits on or closes either;rev3=census-ruling-fleet-restart-wake;basis=Fleet restart wake Task 1: the per-host journal note maps (wakeFailLogged, heldSeen) move into the embedded wakeNotes struct in wakefaillog.go, which adds fenceSeen. In-memory only; no read added. 2f41351769081ca1f2c6b43f864d8ed6aa373adb556dc4a84b193e236b6e92f5 |
| +internal/activator/stateless.go Service.statelessObservation legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Task 3a: Carry the current attempt record facts and canonical target into the existing immutable observation carrier. Reuse a matching carrier, never lifetime-index or process-global release evidence. Fix 3a round 1 I2: obtain preparation facts from the existing reconcile snapshot, not another bucket read. Freeze the observation for this attempt; no snapshot grants launch permission. The final backend gate freshly validates record placement, identity and released deploy.;rev3=census-ruling-fleet-restart-wake;basis=Fleet restart wake Task 2: passes the wake ctx to cfg.ReplicaRecord, whose signature now takes a ctx. Same reads; the exec gate fresh record read (statelessFinalRecord, R1) is unchanged and still decides. whole:Route@201,whole:Route@337,whole:Route@389,whole:Route@496,whole:Route@714,whole:Route@765 54934202bd46b45496ee4aa7ed1e401d39f636411356f3567e4ac5613fdc18a5 |
| +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. file:Exec@22002,file:Open@2191,file:Statfs@58408,registry:App@13299,registry:App@13677,whole:Route@13291,whole:Route@13669,whole:Route@51623 044f4950ae4a50748a44d3a624e251bcb0a9ec7fa627b84f92b6423ec983a101 |
| +internal/host/replicarecord.go replicaRecordObservation legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-restart-wake;basis=Fleet restart wake Task 2, new; review round 1 P2-1. Index hit: the reconcile pass snapshot, account and app must match, no read, and the host memo is cleared. Index miss on a non-sidecar route not held by the memo: one call of live (cfg.Record, haRecordFacts: the judged read of the host record from the deployment store, the same read the exec gate makes). Its facts must name rt account, app and host. Absent, judged stale, corrupt or foreign: refuses with replicas.ErrFenced and memoises the host for 30 s (rt.Host keys an in-memory map: the added registry:Host sites), so no further read for it in that window. Any other read error is returned wrapped, not as a refusal, so an always-on instance backs off. Never writes the lifetime index. Agent (uid carlos), not root; root reads nothing new. registry:App@379,registry:App@795,registry:Host@1027,registry:Host@1057,registry:Host@302,registry:Host@331,registry:Host@534,registry:Host@828,registry:Host@850,whole:Route@263,whole:Route@626 417d767a42111287e35a2bced6d5af57cb072841eeb9c1bad417e91452c63fc5 |
| +internal/host/agent.go replicaRecordFacts legacy accepted-legacy accepted-legacy;rev3=census-ruling-stateless-replicas-1;basis=Fix 3a round 1 I2: read existing in-memory reconcile snapshot for release preparation, require account/app/host match, derive RecordFacts. Missing snapshot refuses until reconciliation; fresh final record check still required.;rev3=census-ruling-fleet-restart-wake;basis=Fleet restart wake Task 2 and review round 1 P2-1: the body makes one in-memory replicaMissMemo per closure and delegates to replicaRecordObservation (replicarecord.go), so its registry:App and registry:Host sites moved there. An index hit is answered as before with no read. Agent (uid carlos), not root; no read added here. whole:Route@374 9dfbeb4f8231b6d15c937ad237dacf0d2dccb58b5229989a983da91af020348a |
| +@coverage internal/activator 43c349e6eb9f1021503897baa360e2d2bc553894a3fc6c84b38629a3b1d36a7e |
| +@coverage internal/host 91631af4a86a3e43e9d2533a65f997e861d8a428796b5b43c3c40a6dc1da8c9c |