host: read the replica record live on a lifetime index miss
A restarted agent's lifetime index is empty until its first reconcile scan, which waits for the moves hold and offline keep views. Every stateless wake meanwhile was refused with replicas.ErrFenced. On an index miss, replicaRecordFacts now reads the record once for the wake through cfg.Record (haRecordFacts, the judged deployment-store read the exec gate already makes). An index hit reads nothing. A failed or absent read, another instance's record or a sidecar keeps the refusal. The read never writes the index. The exec gate's fresh record read (statelessFinalRecord, R1) still decides. Config.ReplicaRecord now takes the wake's ctx. The new logic lives in replicarecord.go, and Task 1's journal maps move into wakeNotes with the refusal note in noteHeldWake, so activator.go and agent.go stay under the code-health record. Census: overlay fleet-restart-wake and its card; record-write census re-pins Service.statelessObservation. Plan: docs/superpowers/plans/2026-11-21-fleet-restart-wake.md, Task 2.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/superpowers/notes/census-proposal-fleet-restart-wake.md+35 −0internal/activator/activator.go+12 −18internal/activator/replica_reconcile_wake_test.go+1 −1internal/activator/replicabaseline_test.go+1 −1internal/activator/replicadeploy_test.go+4 −2internal/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/wakefaillog.go+24 −7internal/host/agent.go+7 −8internal/host/fleet_restart_wake_test.go+485 −0internal/host/replicarecord.go+44 −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/cloudwatch v1.68.0
go: downloading github.com/aws/aws-sdk-go-v2/service/costexplorer v1.67.5
go: downloading github.com/benbjohnson/litestream v0.5.14
go: downloading github.com/superfly/ltx v0.5.1
go: downloading golang.org/x/net v0.62.0
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/aws/aws-sdk-go-v2/service/sns v1.43.0
go: downloading github.com/aws/aws-sdk-go-v2/service/acm v1.45.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ec2 v1.324.0
go: downloading github.com/aws/aws-sdk-go-v2/service/iam v1.58.2
go: downloading github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.37.0
go: downloading github.com/aws/aws-sdk-go-v2/service/route53 v1.64.1
go: downloading golang.org/x/crypto v0.58.0
go: downloading golang.org/x/sys v0.49.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/service/internal/presigned-url v1.13.40
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/pion/transport/v4 v4.0.2
go: downloading github.com/pion/dtls/v3 v3.1.4
go: downloading golang.org/x/text v0.43.0
go: downloading github.com/pion/randutil v0.1.0
go: downloading github.com/prometheus/client_golang v1.17.0
go: downloading github.com/lmittmann/tint v1.1.3
go: downloading github.com/wlynxg/anet v0.0.5
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/prometheus/common v0.45.0
go: downloading github.com/cespare/xxhash/v2 v2.3.0
go: downloading github.com/prometheus/procfs v0.12.0
go: downloading google.golang.org/protobuf v1.36.10
go: downloading github.com/prometheus/client_model v0.5.0
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/matttproud/golang_protobuf_extensions/v2 v2.0.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading google.golang.org/protobuf v1.36.10
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/memory v1.11.0
go: downloading github.com/google/uuid v1.6.0
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading modernc.org/mathutil v1.7.1
go: downloading modernc.org/mathutil v1.7.1
=== launchctx (4 s, from +0 s)
ok amadan.net/carlos/platform.git/launchctx 0.016s
? amadan.net/carlos/platform.git/launchctx/controlname [no test files]
? amadan.net/carlos/platform.git/launchctx/wireid [no test files]
=== vet (153 s, from +0 s)
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/klauspost/compress v1.20.2
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading google.golang.org/protobuf v1.36.10
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading github.com/google/uuid v1.6.0
go: downloading modernc.org/memory v1.11.0
go: downloading github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec
=== vet-tags (176 s, from +0 s)
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/klauspost/compress v1.20.2
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/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading google.golang.org/protobuf v1.36.10
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/mathutil v1.7.1
=== gofmt (1 s, from +0 s)
gofmt -l .: clean
=== rest (364 s, from +15 s)
ok github.com/carlosframework/platform/cmd/carlos-media 104.747s
? github.com/carlosframework/platform/cmd/changelog [no test files]
ok github.com/carlosframework/platform/cmd/console 201.063s
ok github.com/carlosframework/platform/cmd/mediaimage 42.798s
ok github.com/carlosframework/platform/cmd/moveprobe 14.732s
ok github.com/carlosframework/platform/cmd/pricebook-export 0.042s
ok github.com/carlosframework/platform/cmd/rootfswitness 0.215s
ok github.com/carlosframework/platform/cmd/runsc-assets 0.181s
ok github.com/carlosframework/platform/cmd/zddprobe 1.139s
ok github.com/carlosframework/platform/internal/agentsock 0.088s
ok github.com/carlosframework/platform/internal/alerting 0.022s
ok github.com/carlosframework/platform/internal/analytics 0.481s
ok github.com/carlosframework/platform/internal/appconfig 43.980s
ok github.com/carlosframework/platform/internal/apperr 0.416s
ok github.com/carlosframework/platform/internal/applog 0.738s
ok github.com/carlosframework/platform/internal/apppolicy 2.389s
ok github.com/carlosframework/platform/internal/assetcache 0.555s
ok github.com/carlosframework/platform/internal/awsinv 0.014s
ok github.com/carlosframework/platform/internal/awsmanaged 0.627s
ok github.com/carlosframework/platform/internal/awsregiongroup 0.502s
ok github.com/carlosframework/platform/internal/awsterminations 0.019s
ok github.com/carlosframework/platform/internal/backupswords 0.006s
ok github.com/carlosframework/platform/internal/billing 0.056s
ok github.com/carlosframework/platform/internal/billing/billingtest 0.065s
ok github.com/carlosframework/platform/internal/billingstripe 1.971s
ok github.com/carlosframework/platform/internal/boxchoice 0.041s
ok github.com/carlosframework/platform/internal/boxid 3.002s
? github.com/carlosframework/platform/internal/boxid/boxidtest [no test files]
? github.com/carlosframework/platform/internal/boxid/internal/signtest [no test files]
ok github.com/carlosframework/platform/internal/boxroles 0.015s
ok github.com/carlosframework/platform/internal/boxself 0.144s
ok github.com/carlosframework/platform/internal/boxvolumes 0.066s
ok github.com/carlosframework/platform/internal/caps 0.128s
ok github.com/carlosframework/platform/internal/certwarm 0.015s
ok github.com/carlosframework/platform/internal/cgroup 1.499s
ok github.com/carlosframework/platform/internal/changelog 4.081s
ok github.com/carlosframework/platform/internal/clamd 0.089s
? github.com/carlosframework/platform/internal/cliflag [no test files]
ok github.com/carlosframework/platform/internal/clireg 0.011s
ok github.com/carlosframework/platform/internal/codehealth 16.181s
ok github.com/carlosframework/platform/internal/compute 0.010s
? 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.404s
ok github.com/carlosframework/platform/internal/dbdoor/dbdoortest 0.024s
ok github.com/carlosframework/platform/internal/dbquery 0.032s
ok github.com/carlosframework/platform/internal/dbreads 2.826s
? github.com/carlosframework/platform/internal/dbreads/dbreadstest [no test files]
ok github.com/carlosframework/platform/internal/dbverify 0.025s
ok github.com/carlosframework/platform/internal/demo 0.006s
ok github.com/carlosframework/platform/internal/demobuild 3.341s
ok github.com/carlosframework/platform/internal/democlaim 0.472s
ok github.com/carlosframework/platform/internal/devbox 16.318s
ok github.com/carlosframework/platform/internal/dnsrec 0.015s
ok github.com/carlosframework/platform/internal/docsite 0.085s
ok github.com/carlosframework/platform/internal/domainreg 0.020s
ok github.com/carlosframework/platform/internal/domains 61.374s
ok github.com/carlosframework/platform/internal/doorkey 0.017s
ok github.com/carlosframework/platform/internal/economics 0.014s
ok github.com/carlosframework/platform/internal/edgefence 0.064s
ok github.com/carlosframework/platform/internal/edgeguard 0.327s
? github.com/carlosframework/platform/internal/edgeproof [no test files]
ok github.com/carlosframework/platform/internal/edgesfile 0.145s
ok github.com/carlosframework/platform/internal/egressaddr 0.005s
ok github.com/carlosframework/platform/internal/execsandbox 98.751s
ok github.com/carlosframework/platform/internal/fileacl 0.008s
ok github.com/carlosframework/platform/internal/fleetapi 2.329s
ok github.com/carlosframework/platform/internal/fleetstore 0.042s
ok github.com/carlosframework/platform/internal/fxrate 0.035s
ok github.com/carlosframework/platform/internal/gate 4.073s
ok github.com/carlosframework/platform/internal/genselect 0.177s
ok github.com/carlosframework/platform/internal/geo 0.054s
ok github.com/carlosframework/platform/internal/geoip 0.171s
ok github.com/carlosframework/platform/internal/groupadmission 0.022s
ok github.com/carlosframework/platform/internal/grouprollaws 17.843s
ok github.com/carlosframework/platform/internal/hadeparture 0.025s
ok github.com/carlosframework/platform/internal/hafresh 0.017s
ok github.com/carlosframework/platform/internal/hairpin 0.267s
ok github.com/carlosframework/platform/internal/historyreadback 1.142s
ok github.com/carlosframework/platform/internal/hostactors 20.870s
ok github.com/carlosframework/platform/internal/hostbox 22.272s
ok github.com/carlosframework/platform/internal/hostclaim 2.843s
ok github.com/carlosframework/platform/internal/hostenv 0.032s
ok github.com/carlosframework/platform/internal/hostevidence 0.025s
ok github.com/carlosframework/platform/internal/hostexec 24.095s
ok github.com/carlosframework/platform/internal/hostfence 0.163s
ok github.com/carlosframework/platform/internal/hostfiles 25.507s
ok github.com/carlosframework/platform/internal/hostfloor 0.046s
ok github.com/carlosframework/platform/internal/hostguard 1.622s
ok github.com/carlosframework/platform/internal/hostops 6.962s
? github.com/carlosframework/platform/internal/hostops/fencerelease [no test files]
ok github.com/carlosframework/platform/internal/hostops/internal/fencerelease 0.017s
ok github.com/carlosframework/platform/internal/hostquarantine 0.006s
ok github.com/carlosframework/platform/internal/hostrelocate 1.882s
ok github.com/carlosframework/platform/internal/hostresolve 0.820s
ok github.com/carlosframework/platform/internal/hostwrite 0.017s
ok github.com/carlosframework/platform/internal/infraview 0.016s
ok github.com/carlosframework/platform/internal/ingresshealth 0.021s
ok github.com/carlosframework/platform/internal/ingresshealth/awstg 0.025s
ok github.com/carlosframework/platform/internal/instancectl 55.707s
ok github.com/carlosframework/platform/internal/instanceexec 8.174s
ok github.com/carlosframework/platform/internal/instancefs 0.036s
ok github.com/carlosframework/platform/internal/instancekey 0.013s
ok github.com/carlosframework/platform/internal/instanceupdates 0.025s
ok github.com/carlosframework/platform/internal/interactive 0.753s
ok github.com/carlosframework/platform/internal/launchd 0.014s
ok github.com/carlosframework/platform/internal/layout 21.410s
ok github.com/carlosframework/platform/internal/layout/pubclass 103.110s
ok github.com/carlosframework/platform/internal/lbhealth 0.011s
ok github.com/carlosframework/platform/internal/lease 149.210s
ok github.com/carlosframework/platform/internal/lease/leasetest 1.435s
ok github.com/carlosframework/platform/internal/lease/locktest 0.035s
ok github.com/carlosframework/platform/internal/ledger 0.040s
ok github.com/carlosframework/platform/internal/mail 0.876s
ok github.com/carlosframework/platform/internal/mailer 0.775s
ok github.com/carlosframework/platform/internal/mailsubmit 0.964s
ok github.com/carlosframework/platform/internal/mailwire 0.023s
ok github.com/carlosframework/platform/internal/maintenance 0.177s
ok github.com/carlosframework/platform/internal/maintenanceexec 7.706s
ok github.com/carlosframework/platform/internal/maintenanceguard 0.244s
ok github.com/carlosframework/platform/internal/media 1.741s
ok github.com/carlosframework/platform/internal/media/mediatest 0.009s
ok github.com/carlosframework/platform/internal/mediaaws 0.593s
ok github.com/carlosframework/platform/internal/mediahandler 41.854s
ok github.com/carlosframework/platform/internal/mediajobs 0.678s
ok github.com/carlosframework/platform/internal/medialocal 10.348s
ok github.com/carlosframework/platform/internal/metrics 0.122s
ok github.com/carlosframework/platform/internal/minorunits 0.006s
ok github.com/carlosframework/platform/internal/moves 54.262s
ok github.com/carlosframework/platform/internal/moves/archive 2.426s
ok github.com/carlosframework/platform/internal/moves/offlinerun 0.081s
ok github.com/carlosframework/platform/internal/namedunits 0.028s
ok github.com/carlosframework/platform/internal/objstore 0.863s
ok github.com/carlosframework/platform/internal/ops 15.806s
ok github.com/carlosframework/platform/internal/pageindex 3.514s
ok github.com/carlosframework/platform/internal/parity 0.115s
? github.com/carlosframework/platform/internal/parity/cmd/parity-doc [no test files]
ok github.com/carlosframework/platform/internal/park 0.624s
ok github.com/carlosframework/platform/internal/perf 0.171s
ok github.com/carlosframework/platform/internal/plans 0.061s
ok github.com/carlosframework/platform/internal/privatefile 0.012s
ok github.com/carlosframework/platform/internal/provision 236.846s
ok github.com/carlosframework/platform/internal/proxyproto 0.947s
ok github.com/carlosframework/platform/internal/publicrelease 0.039s
ok github.com/carlosframework/platform/internal/ratelimit 0.177s
ok github.com/carlosframework/platform/internal/regionlabel 0.053s
ok github.com/carlosframework/platform/internal/regionname 0.048s
ok github.com/carlosframework/platform/internal/registrar 0.016s
ok github.com/carlosframework/platform/internal/registrar/openprovider 0.197s
? github.com/carlosframework/platform/internal/registrar/registrartest [no test files]
ok github.com/carlosframework/platform/internal/registry 80.818s
ok github.com/carlosframework/platform/internal/relay 7.680s
ok github.com/carlosframework/platform/internal/release 84.141s
ok github.com/carlosframework/platform/internal/replicagen 0.045s
ok github.com/carlosframework/platform/internal/replicas 0.073s
ok github.com/carlosframework/platform/internal/reqrec 6.322s
ok github.com/carlosframework/platform/internal/rollout 12.311s
ok github.com/carlosframework/platform/internal/rolloutwords 0.018s
ok github.com/carlosframework/platform/internal/rootaws 105.530s
ok github.com/carlosframework/platform/internal/rootfsimage 0.696s
ok github.com/carlosframework/platform/internal/rootparticipation 0.133s
ok github.com/carlosframework/platform/internal/rootstate 0.068s
ok github.com/carlosframework/platform/internal/runs 0.703s
ok github.com/carlosframework/platform/internal/s3compat 0.023s
ok github.com/carlosframework/platform/internal/s3fake 1.086s
ok github.com/carlosframework/platform/internal/safefile 0.031s
ok github.com/carlosframework/platform/internal/schedule 25.299s
ok github.com/carlosframework/platform/internal/seeds 0.037s
ok github.com/carlosframework/platform/internal/sim/litestreamfacts 4.567s
ok github.com/carlosframework/platform/internal/sim/mediajobs 47.210s
ok github.com/carlosframework/platform/internal/sim/regionha 24.413s
ok github.com/carlosframework/platform/internal/status 0.648s
ok github.com/carlosframework/platform/internal/steering 0.417s
ok github.com/carlosframework/platform/internal/stopevidence 0.735s
ok github.com/carlosframework/platform/internal/storecfg 0.405s
ok github.com/carlosframework/platform/internal/svcrole 0.012s
ok github.com/carlosframework/platform/internal/systemd 6.993s
? github.com/carlosframework/platform/internal/systemdshow [no test files]
ok github.com/carlosframework/platform/internal/team 4.480s
ok github.com/carlosframework/platform/internal/teamcontract 0.194s
ok github.com/carlosframework/platform/internal/telemetry 0.056s
ok github.com/carlosframework/platform/internal/termfence 5.372s
ok github.com/carlosframework/platform/internal/timerspec 0.016s
ok github.com/carlosframework/platform/internal/tsidentity 4.173s
ok github.com/carlosframework/platform/internal/tunnelclient 0.449s
ok github.com/carlosframework/platform/internal/unixdial 0.022s
ok github.com/carlosframework/platform/internal/updatewords 0.034s
ok github.com/carlosframework/platform/internal/upstreamguard 0.017s
? github.com/carlosframework/platform/internal/upstreamguard/guardtest [no test files]
ok github.com/carlosframework/platform/internal/usage 0.024s
ok github.com/carlosframework/platform/internal/version 0.024s
ok github.com/carlosframework/platform/internal/vet 3.168s
ok github.com/carlosframework/platform/internal/zonehost 0.016s
ok github.com/carlosframework/platform/internal/zonehost/route53zones 0.084s
? 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.059s
ok github.com/carlosframework/platform/scripts/region-ha-g2/fixture 5.265s
ok github.com/carlosframework/platform/scripts/stateless-replicas-drill 1.223s
ok github.com/carlosframework/platform/scripts/witness-pointer 0.025s
=== cutover-witness (141 s, from +15 s)
ok github.com/carlosframework/platform 2.759s
=== internal_grouproll@0 (266 s, from +70 s)
ok github.com/carlosframework/platform/internal/grouproll 264.919s
=== internal_grouproll@1 (270 s, from +70 s)
ok github.com/carlosframework/platform/internal/grouproll 269.098s
=== internal_activator@0 (143 s, from +130 s)
ok github.com/carlosframework/platform/internal/activator 138.343s
=== internal_activator@1 (136 s, from +130 s)
ok github.com/carlosframework/platform/internal/activator 131.623s
=== internal_activator@2 (139 s, from +130 s)
ok github.com/carlosframework/platform/internal/activator 133.952s
=== internal_activator@3 (182 s, from +130 s)
ok github.com/carlosframework/platform/internal/activator 177.380s
=== internal_edge@0 (187 s, from +151 s)
ok github.com/carlosframework/platform/internal/edge 178.487s
=== internal_edge@1 (132 s, from +151 s)
ok github.com/carlosframework/platform/internal/edge 124.759s
=== internal_edge@2 (149 s, from +151 s)
ok github.com/carlosframework/platform/internal/edge 139.495s
=== internal_edge@3 (213 s, from +151 s)
ok github.com/carlosframework/platform/internal/edge 203.636s
=== root@0 (122 s, from +155 s)
ok github.com/carlosframework/platform 112.957s
=== root@1 (112 s, from +155 s)
ok github.com/carlosframework/platform 103.984s
=== root@2 (119 s, from +155 s)
ok github.com/carlosframework/platform 110.650s
=== root@3 (112 s, from +155 s)
ok github.com/carlosframework/platform 102.364s
=== root@4 (99 s, from +155 s)
ok github.com/carlosframework/platform 91.582s
=== internal_host@0 (295 s, from +197 s)
ok github.com/carlosframework/platform/internal/host 290.045s
=== internal_host@1 (144 s, from +197 s)
ok github.com/carlosframework/platform/internal/host 138.847s
=== internal_host@2 (202 s, from +197 s)
ok github.com/carlosframework/platform/internal/host 196.973s
=== internal_host@3 (164 s, from +197 s)
ok github.com/carlosframework/platform/internal/host 158.880s
=== internal_host@4 (154 s, from +197 s)
ok github.com/carlosframework/platform/internal/host 149.051s
=== internal_host@5 (242 s, from +197 s)
ok github.com/carlosframework/platform/internal/host 237.407s
=== internal_console@0 (192 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 184.702s
=== internal_console@1 (163 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 156.528s
=== internal_console@2 (193 s, from +202 s)
2026/11/21 09:46:47 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:46:48 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:46:48 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:46:48 console: backfilled account manifest for bab (ops)
2026/11/21 09:46:48 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:46:48 console: alert engine: took over from the alert watcher's history
2026/11/21 09:46:48 console: alert engine: unparsable alerts/boxes/box-1.json: invalid character 'n' looking for beginning of object key string
2026/11/21 09:46:48 console: alert engine: unparsable alerts/boxes/box-1.json: invalid character 'n' looking for beginning of object key string
2026/11/21 09:46:48 console: alert engine: unparsable alerts/boxes/box-1.json: invalid character 'n' looking for beginning of object key string
2026/11/21 09:46:48 console: alert engine: read alerts/boxes/box-1.json: operation error S3: GetObject, https response error StatusCode: 403, RequestID: S3FAKE0000000004, HostID: , api error AccessDenied: failed by the test hook
2026/11/21 09:46:48 console: alert engine: read alerts/boxes/box-1.json: operation error S3: GetObject, https response error StatusCode: 403, RequestID: S3FAKE0000000005, HostID: , api error AccessDenied: failed by the test hook
2026/11/21 09:46:48 console: alert engine: read alerts/boxes/box-1.json: operation error S3: GetObject, https response error StatusCode: 403, RequestID: S3FAKE0000000007, HostID: , api error AccessDenied: failed by the test hook
2026/11/21 09:46:49 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:46:49 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 09:46:49 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 09:46:49 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 09:46:49 console: alert engine: took over from the alert watcher's history
2026/11/21 09:46:49 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:46:49 console: paul@keymail.dev added slack alert connector 1
2026/11/21 09:46:49 console: alert connector 1 confirmed from its link
2026/11/21 09:46:50 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:46:50 console: backfilled account manifest for bab (ops)
2026/11/21 09:46:51 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:46:51 console: could not notify alice@keymail.dev of a CLI token issue: keymail: grant revoked or invalid
2026/11/21 09:46:51 console: api assets purge abc/shop: instance shop-2.example.com: assetFailStore: bucket unavailable
2026/11/21 09:46:52 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:46:52 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:46:52 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:46:52 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:46:52 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:46:53 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:46:53 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:46:53 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:46:54 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:46:54 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:46:54 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:46:54 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/21 09:46:54 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/21 09:46:54 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/21 09:46:54 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/21 09:46:54 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/21 09:46:54 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/21 09:46:55 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:46:55 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/21 09:46:55 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/21 09:46:55 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/21 09:46:55 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:46:55 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/21 09:46:55 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/21 09:46:55 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/21 09:46:56 console: api db bab/titogo/acme.go.tito.io: stream level 0 1-1: write tcp 127.0.0.1:35215->127.0.0.1:34094: i/o timeout
2026/11/21 09:46:56 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:46:56 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%3A40101: could not determine target mailbox
2026/11/21 09:46:56 console: db read dbr_36c5qp4fhefawlexb7oy54hdoq: relayed 0 chunks (0 bytes) in 0s, ended not-picked
2026/11/21 09:46:57 console: DEMO-CONFIG: domain claims overlap
2026/11/21 09:46:57 console: DEMO-CONFIG: domain claims overlap
2026/11/21 09:46:57 console: DEMO-CONFIG: domain claims overlap
2026/11/21 09:46:58 console: DEMO-CONFIG: domain claims key is invalid
2026/11/21 09:46:58 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:46:59 console: account audit signin: constraint failed: claim: app write not permitted (1811)
2026/11/21 09:46:59 console: plan grace bab: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 09:46:59 console: domain purchase pass: off on a host-claim console, where buying domains is off
2026/11/21 09:46:59 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:46:59 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 09:46:59 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%3A39991: could not determine target mailbox
2026/11/21 09:46:59 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%3A39991: could not determine target mailbox
2026/11/21 09:47:00 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:00 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:01 WARN request over performance budget screen="POST /api/cli/apps/{account}/{app}/domains" method=POST status=200 class=write latency_ms=598.273561 ttfb_ms=598.755846 body_read_ms=0.482285 total_ms=598.784492 budget_ms=500 spans_ms=map[] calls=map[]
2026/11/21 09:47:01 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:01 console: could not notify alice@keymail.dev of a CLI token issue: keymail: grant revoked or invalid
2026/11/21 09:47:02 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:02 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:03 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:04 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:04 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:05 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:06 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:06 console: api instance move bab/titogo/acme.go.tito.io: typed move write refused: hostops: identity mismatch
2026/11/21 09:47:06 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:06 console: api instance move bab/titogo/acme.go.tito.io: typed move write refused: hostops: identity mismatch
2026/11/21 09:47:07 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:07 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:08 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:08 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:09 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:09 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/21 09:47:09 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/21 09:47:09 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/21 09:47:09 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/21 09:47:09 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/21 09:47:09 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/21 09:47:09 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000003
2026/11/21 09:47:09 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000003 maxTXID=0000000000000003 size=454
2026/11/21 09:47:09 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000003
2026/11/21 09:47:09 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:09 console: ledger append bab/titogo/carbon: ledger: append lost 4 CAS races: ledger: append contention: dirstore: ledgers/bab/titogo/carbon/entries/20261121T094709Z-84e3add6b487.json exists: store: compare-and-swap conflict
2026/11/21 09:47:09 console: ledger publish bab/titogo: store: compare-and-swap conflict
2026/11/21 09:47:09 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:09 console: ledger append bab/titogo/carbon: AccessDenied: s3://carlos-prod-secret-bucket/ledgers request id ABC123
2026/11/21 09:47:09 console: ledger publish bab/titogo: AccessDenied: s3://carlos-prod-secret-bucket/ledgers request id ABC123
2026/11/21 09:47:09 console: ledger list bab/titogo: AccessDenied: s3://carlos-prod-secret-bucket/ledgers request id ABC123
2026/11/21 09:47:10 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:10 console: link 4400347c620d ("shop-home", account 1) unlinked by link:4400347c620d
2026/11/21 09:47:10 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:10 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:11 console: link c29937dad3a8: rotate: channel sync: link c29937dad3a8: put channel: injected put failure (linkSyncLoop retries; the old credential may still be accepted until it does)
2026/11/21 09:47:11 WARN request over performance budget screen="POST /api/link/rotate" method=POST status=200 class=write latency_ms=603.602268 ttfb_ms=603.602268 body_read_ms=0 total_ms=603.62649 budget_ms=500 spans_ms=map[] calls=map[]
2026/11/21 09:47:11 console: home link c29937dad3a8: the rotated key (revocation pending=true) was not saved, nor its flag: registry: the registry file is readable by other users, so it cannot hold a link credential: /tmp/TestRotateSaveFailureSavesNeither53901162/003/registry.db has mode 0644
2026/11/21 09:47:11 WARN request over performance budget screen="POST /api/cli/link/rotate" method=POST status=500 class=write latency_ms=618.338956 ttfb_ms=618.338956 body_read_ms=0 total_ms=618.348347 budget_ms=500 spans_ms=map[] calls=map[]
2026/11/21 09:47:11 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:11 console: link b4ee2b84dca4: publish bab/shop: the apps row is gone after the forward row was written (owner "", <nil>); removing the forward row
2026/11/21 09:47:12 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:12 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:12 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:13 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:13 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:14 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:14 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:14 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:14 console: platform byv: minted customer bac (id 2, pending create d9e81268acd4198d3ded1091d5b4bc86) into the bucket but could not record it: injected finish failure; the next platform request finishes it
2026/11/21 09:47:15 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:15 console: platform byv: minted customer bac (id 2, pending create e2f5a913e81a6d7d07ca57eb35647421) into the bucket but could not record it: injected finish failure; the next platform request finishes it
2026/11/21 09:47:15 console: materialized account bac (shop) from the bucket
2026/11/21 09:47:15 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:15 console: platform byv: minted customer bac (id 2, pending create e2f5a913e81a6d7d07ca57eb35647421) into the bucket but could not record it: injected finish failure; the next platform request finishes it
2026/11/21 09:47:15 console: platform byv: finish pending customer creates: injected finish failure
2026/11/21 09:47:15 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:15 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:15 console: relay enabled bab/titogo in eu-west-1 by alice@keymail.dev (incarnation 455fd1308fee97d7, op 1)
2026/11/21 09:47:16 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:16 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:16 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:17 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:17 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:18 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:18 console: api scan sweep bab/titogo: objstore: object scanning is disabled for this deployment (bab/titogo)
2026/11/21 09:47:18 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:19 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:19 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:19 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:20 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:20 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:21 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:21 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:22 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:22 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:22 console: api store rotate bab/titogo: dirstore: apps/bab/titogo/store.json moved on: store: compare-and-swap conflict
2026/11/21 09:47:22 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:22 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:23 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%3A33089: could not determine target mailbox
2026/11/21 09:47:23 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%3A33089: could not determine target mailbox
2026/11/21 09:47:23 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%3A33089: could not determine target mailbox
2026/11/21 09:47:23 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:23 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%3A43085: could not determine target mailbox
2026/11/21 09:47:23 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%3A43085: could not determine target mailbox
2026/11/21 09:47:23 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%3A43085: could not determine target mailbox
2026/11/21 09:47:23 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:23 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:24 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:24 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:25 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:25 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:25 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 09:47:25 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 09:47:25 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 09:47:25 console: backfilled account manifest for bab (ops)
2026/11/21 09:47:25 edges: box "ada-stargazing" 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 09:47:26 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:26 console: app placement backfill: bab/haapp left unplaced: its routes say fleet/home, but the app is born HA or changed meanwhile
2026/11/21 09:47:26 console: app placement backfill: bab/shop placed on fleet/home, from its routes
2026/11/21 09:47:26 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:27 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:27 console: backfilled account manifest for bab (ops)
2026/11/21 09:47:27 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:27 console: backfilled account manifest for bab (ops)
2026/11/21 09:47:27 console: account bac names owner "not-an-address", which is not a keymail address — nobody could sign in as it, so no membership was created. Fix it with: console member --add <address> bac --role owner
2026/11/21 09:47:27 console: materialized account bac (Typo) from the bucket
2026/11/21 09:47:27 console: accounts/bac/account.json names owner "not-an-address", which is not a keymail address — materializing the account without it; give it one with `console member --add <address> bac --role owner`
2026/11/21 09:47:28 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:28 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:28 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 09:47:28 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:28 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 09:47:29 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:29 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:29 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:29 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:30 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:30 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 09:47:30 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:30 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:30 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 09:47:30 console: billing problem opened: account "byv" subscription sub_1 reason unrecognised
2026/11/21 09:47:31 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:31 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 09:47:31 console: billing problem opened: account "byv" subscription sub_1 reason unrecognised
2026/11/21 09:47:31 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 09:47:31 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:31 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 09:47:31 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:31 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:31 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 09:47:31 console: billing discovery: account 501: billing: reading subscription sub_b: console stops here
2026/11/21 09:47:31 console: billing problem opened: account "byv" subscription sub_b reason second_subscription
2026/11/21 09:47:32 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:32 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 09:47:32 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:32 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:32 console: backfilled account manifest for bab (ops)
2026/11/21 09:47:33 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:33 console: backfilled account manifest for bab (ops)
2026/11/21 09:47:33 console: account audit signin: constraint failed: claim: app write not permitted (1811)
2026/11/21 09:47:34 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:34 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:34 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
--- FAIL: TestCopySincePathInventory (7.09s)
copysince_paths_test.go:356: whole site(s) in internal/host.replicaRecordObservation: 1, pinned 0, at
/home/ci/work/repos/carlos__platform/wt/fleet-restart-wake/internal/host/replicarecord.go:30:5
Classify each: a move close writing LastMove, a move flip of Region, a create giving a new CreatedAt, or not a copy change. If it starts a new copy that none of those covers, extend copySince (verifyaccept.go) first, then pin it here with why.
copysince_paths_test.go:367: pinned whole site(s) in internal/host.replicaRecordFacts (1) no longer found; remove the entry
2026/11/21 09:47:42 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:42 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/21 09:47:42 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/21 09:47:42 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/21 09:47:42 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:47:42 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/21 09:47:42 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/21 09:47:42 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/21 09:47:43 console: demo moved: skipping invalid notice AAAAAAAAAAAAAAAAAAAAAA
2026/11/21 09:47:44 console: demo claim readiness: refusing: keymail
2026/11/21 09:49:06 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:07 console: demo outbox pending: injected write failure
2026/11/21 09:49:08 console: demo publication UMsHYm3T_SLcRspJjwRo_M8sXjb5BY7_AZtdyUHfSDk: demo-build: starting timed out
2026/11/21 09:49:08 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:08 console: backfilled account manifest for bab (ops)
2026/11/21 09:49:09 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:09 console: backfilled account manifest for bab (ops)
2026/11/21 09:49:09 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:09 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 09:49:09 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:09 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 09:49:10 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:10 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 09:49:10 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:10 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 09:49:11 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:11 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 09:49:11 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:12 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:12 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 09:49:12 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:13 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:14 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:14 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:14 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:14 console: backfilled account manifest for bab (ops)
2026/11/21 09:49:14 console: restore tests: skipping control/verify/box-bad.json (etag afbf9d0f3560b0fd7795e81c42a0a79ee6b6fc67e064f77826aee642cad28d91): record version 1, want 2
2026/11/21 09:49:14 console: restore tests: reading control/verify/box-a.json: read refused; next try at 2026-11-12T17:25:17Z
2026/11/21 09:49:14 console: restore tests: skipping control/verify/box-fleet.json (etag 7ccfa1fbf3940e6f0c0375d87c0f9235a50514e14cb427bdfaf5077987b26ccf): record does not parse: invalid character 'o' in literal null (expecting 'u')
2026/11/21 09:49:14 console: fleet backups: skipping status/boxes/box-junk.json: unexpected end of JSON input
2026/11/21 09:49:14 console: fleet backups: skipping status/boxes/box-a.json: read refused
2026/11/21 09:49:14 console: fleet backups: skipping status/boxes/box-lost.json: read refused
2026/11/21 09:49:14 console: fleet backups: skipping status/boxes/box-uk.json: read refused
2026/11/21 09:49:14 console: restore tests: reading control/verify/box-old.json: read refused; next try at 2026-11-12T17:43:43Z
2026/11/21 09:49:14 provision: skipping record apps/bab/shop/instances/b.go.tito.io.json: unreadable: read refused
2026/11/21 09:49:14 provision: skipping record apps/bab/shop/instances/bad.go.tito.io.json: malformed: provision: invalid maintenance projection or protected fields
2026/11/21 09:49:14 provision: skipping record apps/bab/shop/instances/bad.go.tito.io.json: disagrees with its own path (host="elsewhere.go.tito.io" account="bab" app="shop")
2026/11/21 09:49:15 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:15 status: fleet: skipping status/boxes/box-old.json: read failed: injected read failure
2026/11/21 09:49:15 status: fleet: skipping status/boxes/box-old.json: read failed: injected read failure
2026/11/21 09:49:15 console: fleet pi view: deployment heartbeats: complete false, <nil>
2026/11/21 09:49:15 console: api instances create bab/shop/a.example.com: fleet pi: view incomplete (<nil>); refused
2026/11/21 09:49:15 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:15 status: fleet: 201 keys under status/boxes/, capping at 200
2026/11/21 09:49:15 status: fleet: 201 keys under status/boxes/, capping at 200
2026/11/21 09:49:15 status: fleet: 201 keys under status/boxes/, capping at 200
2026/11/21 09:49:15 status: fleet: 201 keys under status/boxes/, capping at 200
2026/11/21 09:49:15 console: fleet pi view: deployment heartbeats: complete false, <nil>
2026/11/21 09:49:15 console: api instances create bab/shop/a.example.com: fleet pi: view incomplete (<nil>); refused
2026/11/21 09:49:15 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:15 console: system: moving to 4f3c2a1 below v0.29.0 on stable with --allow-below-rootfs-floor: boxes on it may have rootfs instances that 4f3c2a1 cannot run
2026/11/21 09:49:15 console: system: moving to below v0.29.0 on stable with --allow-below-rootfs-floor: boxes on it may have rootfs instances that cannot run
2026/11/21 09:49:16 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:16 console: fleet drain pi/pi-1: draining since 2026-11-21T09:49:16.274293954Z, 2 records to move
2026/11/21 09:49:16 console: fleet relabel pi: b.example.com from pi-1 to pi-2 (drain)
2026/11/21 09:49:16 console: fleet relabel pi: a.example.com from pi-1 to pi-2 (drain)
2026/11/21 09:49:16 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:16 console: fleet page bab/acme: load heartbeats: bucket list refused
2026/11/21 09:49:16 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:16 console: geoip database bbbbbbbb expired (GeoLite2, 30 days after build) and was removed
2026/11/21 09:49:17 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:17 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:19 console: home link: registry: the registry file is readable by other users, so it cannot hold a link credential: /tmp/TestHomeStartRefusesOldServingConsole2665677895/001/registry.db has mode 0644
2026/11/21 09:49:19 console: home link: registry: the registry file is readable by other users, so it cannot hold a link credential: /tmp/TestHomeStartRefusesOldServingConsole2665677895/001/registry.db-wal has mode 0644
2026/11/21 09:49:20 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:20 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:20 console: api instance label bab/shop/a.example.com: write: injected put failure
2026/11/21 09:49:20 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:21 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:21 console: backfilled account manifest for bab (ops)
2026/11/21 09:49:21 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:21 console: could not notify alice@keymail.dev of a CLI token issue: keymail: grant revoked or invalid
2026/11/21 09:49:21 console: lifetimes: before -> draining
2026/11/21 09:49:21 console: lifetimes: draining -> on
2026/11/21 09:49:21 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:21 console: lifetimes: before -> draining
2026/11/21 09:49:21 console: lifetimes: draining -> on
2026/11/21 09:49:21 console: lifetimes: allocation f6104405b8e9185c613ed9ffd55bf57d of one.shop.example.com: write the record: the bucket did not answer (pending)
2026/11/21 09:49:21 console: api instances create bab/shop/one.shop.example.com: console: the lifetime operation is pending; recovery finishes it
2026/11/21 09:49:21 console: lifetime recovery: allocation f6104405b8e9185c613ed9ffd55bf57d of one.shop.example.com stays pending: console: lifetimes: observe bab/shop/one.shop.example.com: the bucket did not answer
2026/11/21 09:49:22 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:22 console: lifetimes: before -> draining
2026/11/21 09:49:22 console: lifetimes: draining -> on
2026/11/21 09:49:22 console: lifetimes: allocation 92a4b5e17024e42f5be9d4bbdc02608c of one.shop.example.com: write the record: the bucket did not answer (pending)
2026/11/21 09:49:22 console: api instances create bab/shop/one.shop.example.com: console: the lifetime operation is pending; recovery finishes it
2026/11/21 09:49:22 console: lifetime recovery: allocation 92a4b5e17024e42f5be9d4bbdc02608c of one.shop.example.com stays pending: console: lifetimes: observe bab/shop/one.shop.example.com: provision: host incarnation slot is malformed: control/host-incarnations/one.shop.example.com.json: unexpected end of JSON input
2026/11/21 09:49:22 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:22 console: lifetimes: before -> draining
2026/11/21 09:49:22 console: lifetimes: draining -> on
2026/11/21 09:49:22 console: lifetimes: allocation c07d08418890b8d50f4e62c872357d74 of new.shop.example.com: write the record: the bucket did not answer (pending)
2026/11/21 09:49:22 console: api instances create bab/shop/new.shop.example.com: console: the lifetime operation is pending; recovery finishes it
2026/11/21 09:49:22 console: lifetimes: allocation 928d9fa458e6e56f502bf4a3dd93c351 of two.shop.example.com: write the record: the bucket did not answer (pending)
2026/11/21 09:49:22 console: api instances create bab/shop/two.shop.example.com: console: the lifetime operation is pending; recovery finishes it
2026/11/21 09:49:22 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:22 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/21 09:49:22 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/21 09:49:22 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/21 09:49:22 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/21 09:49:22 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/21 09:49:22 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/21 09:49:22 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000003
2026/11/21 09:49:22 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000003 maxTXID=0000000000000003 size=454
2026/11/21 09:49:22 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000003
2026/11/21 09:49:22 console: lifetimes: before -> draining
2026/11/21 09:49:22 console: lifetimes: draining -> on
2026/11/21 09:49:23 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:23 console: lifetimes: before -> draining
2026/11/21 09:49:23 console: lifetimes: draining -> on
2026/11/21 09:49:23 console: lifetimes: retirement 4080e960bef65d91e5a4a1ccefb81214 (normal) of one.shop.example.com: write the tombstone: the bucket did not answer (pending)
2026/11/21 09:49:23 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:23 console: lifetimes: draining -> on
2026/11/21 09:49:23 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:23 console: lifetimes: before -> draining
2026/11/21 09:49:23 console: lifetimes: draining -> on
2026/11/21 09:49:23 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:23 console: lifetimes: before -> draining
2026/11/21 09:49:23 console: lifetimes: draining -> on
2026/11/21 09:49:24 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:24 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:28 console: account audit signin: constraint failed: claim: app write not permitted (1811)
2026/11/21 09:49:29 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:29 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:29 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:29 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:30 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:30 console: app region bab/control: us (chosen)
2026/11/21 09:49:30 console: backfilled account manifest for bab (ops)
2026/11/21 09:49:30 console: claim bab/control: set default pipeline: set pipeline: no usable release signing key
2026/11/21 09:49:30 console: app region bab/legacy: us (chosen)
2026/11/21 09:49:30 console: claim bab/legacy: set default pipeline: set pipeline: no usable release signing key
2026/11/21 09:49:30 console: app region bab/plain: us (chosen)
2026/11/21 09:49:30 console: claim bab/plain: set default pipeline: set pipeline: no usable release signing key
2026/11/21 09:49:30 console: app region bab/bornha: us (chosen)
2026/11/21 09:49:30 console: claim bab/bornha: set default pipeline: set pipeline: no usable release signing key
2026/11/21 09:49:30 console: app region bab/unenabled: us (chosen)
2026/11/21 09:49:30 console: claim bab/unenabled: set default pipeline: set pipeline: no usable release signing key
2026/11/21 09:49:30 console: app region bab/noregions: us (chosen)
2026/11/21 09:49:30 console: claim bab/noregions: set default pipeline: set pipeline: no usable release signing key
2026/11/21 09:49:30 console: app region bab/otherpool: us (chosen)
2026/11/21 09:49:30 console: claim bab/otherpool: set default pipeline: set pipeline: no usable release signing key
2026/11/21 09:49:30 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:30 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:31 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:31 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:31 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:31 console: alert engine: took over from the alert watcher's history
2026/11/21 09:49:32 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:32 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:32 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:32 console: backfilled account manifest for bab (ops)
2026/11/21 09:49:33 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:34 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:34 console: backfilled account manifest for bab (ops)
2026/11/21 09:49:34 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:34 console: app region bab/solocan: (default)
2026/11/21 09:49:34 console: backfilled account manifest for bab (ops)
2026/11/21 09:49:34 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:34 edges: box "uk-box" 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 09:49:34 edges: 1 edges file(s) under control/edges/ but no fresh box snapshot matched any of them, so automatic region placement sees the home alone (are edges and status in different buckets? see CARLOS_STATUS_BUCKET/CARLOS_STATUS_PREFIX)
2026/11/21 09:49:34 console: an incomplete read of the edges files or box snapshots (edges complete true, snapshots complete false), so no region outside the home is automatically eligible this request; said once
2026/11/21 09:49:35 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:35 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:35 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:35 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:36 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:36 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:36 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:36 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 09:49:36 console: plan grace byv: storage: no storage sweep in the last 3 days (row kept)
2026/11/21 09:49:36 console: plans: 1 launch sponsorships now include PDFs and media minutes
2026/11/21 09:49:37 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:37 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:37 console: backfilled account manifest for bab (ops)
2026/11/21 09:49:37 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:37 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:37 console: fleet protection: parse usage/edge/box-b/days/2026-11-21.json: invalid character 'n' looking for beginning of object key string
2026/11/21 09:49:37 console: fleet protection data: parse usage/edge/box-b/days/2026-11-21.json: invalid character 'n' looking for beginning of object key string
2026/11/21 09:49:38 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:38 domains: claim domains/bob.example.org.json: unparseable: invalid character 'o' in literal null (expecting 'u')
2026/11/21 09:49:38 domains: claim domains/bob.example.org.json: unparseable: invalid character 'o' in literal null (expecting 'u')
2026/11/21 09:49:38 console: regional descendant scan under dog.example.net: domains: list claims: rdStore: list refused
2026/11/21 09:49:38 console: regional descendant scan under dog.example.net: domains: list claims: rdStore: list refused
2026/11/21 09:49:38 domains: claim domains/bob.example.org.json: unparseable: invalid character 'o' in literal null (expecting 'u')
2026/11/21 09:49:38 domains: claim domains/bob.example.org.json: unparseable: invalid character 'o' in literal null (expecting 'u')
2026/11/21 09:49:38 domains: claim domains/bob.example.org.json: unparseable: invalid character 'o' in literal null (expecting 'u')
2026/11/21 09:49:38 domains: claim domains/bob.example.org.json: unparseable: invalid character 'o' in literal null (expecting 'u')
2026/11/21 09:49:38 domains: claim domains/bob.example.org.json: unparseable: invalid character 'o' in literal null (expecting 'u')
2026/11/21 09:49:38 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:38 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:39 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:39 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:39 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:39 console: api instances create bab/titogo: read app region: db gone
2026/11/21 09:49:39 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:39 status: fleet: skipping status/boxes/uk-box-2.json: read failed: read timeout
2026/11/21 09:49:39 console: api instances create bab/titogo: incomplete edges or snapshot read, region uk unconfirmed
2026/11/21 09:49:39 status: fleet: skipping status/boxes/uk-box-2.json: read failed: read timeout
2026/11/21 09:49:40 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:40 edges: could not read control/edges/uk-box-2.json for the placement join: read timeout
2026/11/21 09:49:40 console: api instances create bab/titogo: incomplete edges or snapshot read, region uk unconfirmed
2026/11/21 09:49:40 edges: could not read control/edges/uk-box-2.json for the placement join: read timeout
2026/11/21 09:49:40 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:40 edges: could not read control/edges/uk-box-2.json for the placement join: read timeout
2026/11/21 09:49:40 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:40 status: fleet: skipping status/boxes/uk-box-2.json: read failed: read timeout
2026/11/21 09:49:40 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:40 provision: minted instance route ie.shop.example.com (app "shop" acct "mtz")
2026/11/21 09:49:40 provision: minted instance route eu.shop.example.com (app "shop" acct "mtz")
2026/11/21 09:49:41 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:41 provision: minted instance route eu.shop.example.com (app "shop" acct "mtz")
2026/11/21 09:49:41 console: app region mtz/cart: uk (chosen)
2026/11/21 09:49:41 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:41 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:42 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:42 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:42 provision: minted instance route eu.shop.example.com (app "shop" acct "mtz")
2026/11/21 09:49:42 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:42 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:43 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:43 console: lifetimes: before -> draining
2026/11/21 09:49:43 console: lifetimes: draining -> on
2026/11/21 09:49:43 console: lifetimes: retirement 0028673999df08958c7ddec5c25a501f (normal) of one.shop.example.com: write the tombstone: the bucket did not answer (pending)
2026/11/21 09:49:43 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:43 console: lifetimes: draining -> on
2026/11/21 09:49:43 console: system: moving to v0.28.25 below v0.29.0 on stable with --allow-below-rootfs-floor: boxes on it may have rootfs instances that v0.28.25 cannot run
2026/11/21 09:49:43 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:43 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:44 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:44 console: scan queue rebuild: acct-bad: transient listing failure
2026/11/21 09:49:44 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:44 console: scan queue rebuild: acct-bad/shop: transient listing failure
2026/11/21 09:49:44 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:44 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:45 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:45 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:45 console: seeds pass: deleted apps/bab/shop/seeds/push.shop.example.com/sd_gdl5nf4njyqa3jv2qkirumtinu/snapshot.db
2026/11/21 09:49:45 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:45 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/21 09:49:45 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/21 09:49:45 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/21 09:49:45 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/21 09:49:45 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/21 09:49:45 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/21 09:49:45 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000003
2026/11/21 09:49:45 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000003 maxTXID=0000000000000003 size=454
2026/11/21 09:49:45 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000003
2026/11/21 09:49:45 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:45 console: seeds readiness: box "kass-2" in region "the home region" is unconfirmed: stale heartbeat, generated 2026-11-21T08:49:45Z
2026/11/21 09:49:46 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:46 console: expiry pass: bab/shop: shop can’t be moved to the trash until its fleet box has cleaned up push.shop.example.com. Delete each with carlos instances delete, then try again. Not moving it to the trash this pass.
2026/11/21 09:49:46 console: finished seed sd_5sbaz3ruj4unui4bsgfzkgxnuq of bab/shop/push.shop.example.com
2026/11/21 09:49:46 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:46 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:47 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:47 console: backfilled account manifest for bab (ops)
2026/11/21 09:49:47 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:47 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:47 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:48 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:48 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:48 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:48 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:50 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:50 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:50 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:50 console: account audit signin: constraint failed: claim: app write not permitted (1811)
2026/11/21 09:49:51 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:52 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:52 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:52 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/21 09:49:52 console: claim bab/shop: console: an earlier app's policy could not be cleared: apppolicy: delete bab/shop: AccessDenied: s3:DeleteObject denied by an explicit deny
2026/11/21 09:49:52 console: size check: placed fleet fy is not one of the account's fleets
2026/11/21 09:49:52 console: size check: placed fleet fy is not one of the account's fleets
2026/11/21 09:49:52 console: size check: placed fleet fy is not one of the account's fleets
FAIL
FAIL github.com/carlosframework/platform/internal/console 185.549s
FAIL
=== internal_console@3 (234 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 226.547s
=== internal_console@4 (181 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 173.918s
=== internal_console@5 (199 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 191.464s
=== internal_console@6 (199 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 191.212s
=== internal_console@7 (191 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 183.531s
=== internal_console@8 (213 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 205.908s
=== internal_console@9 (242 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 234.748s
=== internal_console@10 (250 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 242.666s
=== internal_console@11 (204 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 196.116s
=== internal_console@12 (305 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 296.590s
=== internal_console@13 (192 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 183.952s
=== internal_console@14 (193 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 185.930s
=== internal_console@15 (208 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 199.936s
=== internal_console@16 (196 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 188.356s
=== internal_console@17 (193 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 185.675s
=== internal_console@18 (230 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 222.196s
=== internal_console@19 (197 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 189.530s
=== internal_console@20 (198 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 189.228s
=== internal_console@21 (209 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 201.533s
=== internal_console@22 (201 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 192.522s
=== internal_console@23 (213 s, from +202 s)
ok github.com/carlosframework/platform/internal/console 206.190s
=== lists: internal_console 201 s, internal_edge 149 s, internal_activator 129 s, internal_host 196 s, root 153 s, internal_grouproll 69 s
=== cpu: the gate used 12279 cpu-seconds in 507 s, about 24.2 of 32 cores; the machine as a whole was 78% busy
Failure summary:
--- internal_console@2
--- FAIL: TestCopySincePathInventory (7.09s)
copysince_paths_test.go:356: whole site(s) in internal/host.replicaRecordObservation: 1, pinned 0, at
copysince_paths_test.go:367: pinned whole site(s) in internal/host.replicaRecordFacts (1) no longer found; remove the entry
FAIL github.com/carlosframework/platform/internal/console 185.549s
FAILED: internal_console@2
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
Intent
<task-notification> <task-id>a59f3c73e507938e2</task-id> <tool-use-id>toolu_01DDDV4swmvdcKrncxrfZ72m</tool-use-id> <output-file>/home/paulca/.cache/tmp/claude-1001/-home-paulca-amadan-net-carlos-platform/68be7e6f-7841-4936-9fa0-2041da778685/tasks/a59f3c73e507938e2.output</output-file> <status>completed</status> <summary>Agent "Re-dispatch Task 5: shared walk" finished</summary> <note>A task-notification fires each time this agent stops with no live background children of its own. The user can send it another message and resume it, so the same task-id may notify more than once.</note> <result>Status: DONE_WITH_CONCERNS. The concerns are small and listed below. The previous agent's uncommitted work was sound and I kept all of it. I saved it as a patch, merged origin/main (2f573442), re-applied it cleanly and reviewed it against the specs. On top of it I added two tests, refactored to stay inside the code-health limits, and did the census and the request budget. Commits: 128b0d54 (plan: fresh-read rules table), fe7a604d (shared walk code and tests), 93096fe3 (refactor and boot-walk rule test), 4ebe1018 (census), a736a033 (plan: measured counts and budget). Tests: all targeted runs, census tests, code-health, vet and the darwin/windows builds pass. The new tests pass with -race, and five deliberately broken builds each made a witness fail. Walks per pass (whole `apps/` listings): first pass 5 → 2, steady state 3 → 2. Record and slot reads are unchanged. Daily requests drop by a third for small, mid and big accounts; none goes up. Concerns: 1. The account set read with the listing is shared too, so an account deleted between the boot listing and the first reconcile still counts as live for one pass. 2. A record created or moved to a new key after the shared listing waits for the next pass. Every leg still reads record contents fresh. The window grows from one walk's length to the age of the arming listing (about 11 s on Tito). 3. The first-pass saving is measured on a fake store only, not on a box. 4. `GOOS=darwin go vet ./internal/host` fails on an existing test file this branch doesn't touch. 5. Git reported an old `.git/packed-refs.lock` from Nov 19 that isn't mine. I left it, and all commits landed. Report: /home/paulca/amadan.net/carlos/platform/.claude/worktrees/fleet-first-reconcile-speed/.superpowers/sdd/2026-11-15-fleet-first-reconcile/task-5-report.md. It is not committed: `.superpowers` is gitignored, and so is the claims file next to it.</result> <usage><subagent_tokens>198442</subagent_tokens><tool_uses>80</tool_uses><duration_ms>1852609</duration_ms></usage> </task-notification>
Attributed to this commit: 27.7 g CO₂e (3,483,053 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on fleet-restart-wake, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.
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..79c4d568d |
| --- /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: the body delegates to replicaRecordObservation (replicarecord.go), so its registry:App and registry:Host sites move there. An index hit is answered as before with no read. On an index miss: one judged record read through cfg.Record (haRecordFacts, the deployment store, the same read the exec gate makes) for this wake; it refuses with replicas.ErrFenced when the read fails, is absent, names another instance, or the route is a sidecar. It never writes the lifetime index. Agent (uid carlos), not root. | |
| + |
| +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 ×2, +whole:Route ×2; written legacy, accepted-legacy, frozen |
| + |
| +Seal: `8a0a9cca336d3e695b79990a9aeda17f5ee8d74908752944f7dcd129918c80fc` → `5b00311dfd1abdaacf3485e0edb8822871482111aaa41d5128ea3d4654737b2e`. |
| + |
| +Overlay: `internal/provision/testdata/plan14-root-reads-fleet-restart-wake.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`. |
diff --git a/internal/activator/activator.go b/internal/activator/activator.go| index edee3a428..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,16 +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). |
| - // fenceSeen, under it too, is each host's last replica fence refusal |
| - // said in the journal (noteReplicaFence). |
| - wakeFailMu sync.Mutex |
| - wakeFailLogged map[string]*wakeFailNote |
| - heldSeen map[string]heldSeen |
| - fenceSeen 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; |
| @@ -2278,13 +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). |
| - } else if _, held := heldBy(err); !held && replicaFenceRefusal(err) { |
| - // The replica record observation could not vouch for the |
| - // launch (a restarted agent's index before its first scan, a |
| - // record that is gone): a refusal, retried on the next |
| - // resident tick. Said once per change, with no member event. |
| - a.noteReplicaFence(e.host, err) |
| + // 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) |
| } |
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/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/wakefaillog.go b/internal/activator/wakefaillog.go| index e2a83d3c0..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 { |
| @@ -175,17 +186,19 @@ 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 held || !replicaFenceRefusal(err) { |
| - // Any other outcome ends the host's replica fence refusal |
| - // (noteReplicaFence): the next one is said again. |
| + if !fence { |
| delete(a.fenceSeen, host) |
| } |
| for h, s := range a.heldSeen { |
| @@ -196,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/host/agent.go b/internal/host/agent.go| index e5ffcaaac..dc2262688 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,12 @@ 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 |
| +// (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) { |
| + return func(ctx context.Context, rt registry.Route) (activator.RecordFacts, error) { |
| + return replicaRecordObservation(ctx, index, live, 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..1973faebc |
| --- /dev/null |
| +++ b/internal/host/fleet_restart_wake_test.go |
| @@ -0,0 +1,485 @@ |
| +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" |
| + "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, a failed read, another instance's record and a sidecar keep the |
| +// refusal. |
| +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") |
| + } |
| + failing := replicaRecordFacts(&provision.LifetimeIndex{}, func(context.Context, registry.Route) (activator.RecordFacts, error) { |
| + return activator.RecordFacts{}, errors.New("store unreachable") |
| + }) |
| + if _, err := failing(ctx, rt); !errors.Is(err, replicas.ErrFenced) { |
| + t.Fatalf("failed read: %v, want replicas.ErrFenced", 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()) |
| + } |
| +} |
| + |
| +// 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 on a |
| +// 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, the ExecBackend's instance-control and rootfs |
| +// gates are ready, the rollout is armed (it gives the activator its |
| +// release book) and the coordinator client is the box's. Only the |
| +// processes are fakes. |
| +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) |
| + // recordRead, when set, is told of every Record call (the live read's |
| + // and the exec gate's alike). |
| + recordRead func() |
| +} |
| + |
| +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()} |
| + 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, 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. It is kept |
| + // across the restart below: this witness is about the record |
| + // observation, and a fresh client would need the files store and the |
| + // sealed copy a real box has to let the escrow check pass. |
| + r.coord = newCoordinatorClient(r.store, "", "", "box", "") |
| + 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() |
| + record := func(ctx context.Context, rt registry.Route) (activator.RecordFacts, error) { |
| + if r.recordRead != nil { |
| + r.recordRead() |
| + } |
| + 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 |
| + 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) |
| + } |
| +} |
| + |
| +// TestRestartedAgentLiveReadStillMeetsTheExecGate is R1 after the live |
| +// read: the instance is deleted and created again (a new lifetime) between |
| +// the restarted agent's live record read and its exec gate. The gate's own |
| +// fresh record read refuses the launch: nothing starts, and the wake is a |
| +// refusal, not a failure. |
| +func TestRestartedAgentLiveReadStillMeetsTheExecGate(t *testing.T) { |
| + r := newRestartRig(t) |
| + r.firstLife() |
| + |
| + var recreated atomic.Bool |
| + r.be.beforeExec = func() { |
| + if !recreated.CompareAndSwap(false, true) { |
| + return |
| + } |
| + if err := provision.DeleteRecord(r.ctx, r.store, r.rec.Account, r.rec.App, r.rec.Host); err != nil { |
| + t.Error(err) |
| + return |
| + } |
| + again := r.rec |
| + again.CreatedAt = r.rec.CreatedAt.Add(time.Minute) |
| + if err := provision.CreateRecord(r.ctx, r.store, again); err != nil { |
| + t.Error(err) |
| + } |
| + } |
| + var after atomic.Int64 |
| + r.recordRead = func() { |
| + if recreated.Load() { |
| + after.Add(1) |
| + } |
| + } |
| + var reads atomic.Int64 |
| + svc := r.runtime(&provision.LifetimeIndex{}, &reads) |
| + code, _ := r.request(svc) |
| + if code != http.StatusServiceUnavailable { |
| + t.Fatalf("request across a recreated record: %d, want 503", code) |
| + } |
| + if !recreated.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 record read after the recreation: the exec gate did not decide") |
| + } |
| + select { |
| + case build := <-r.be.started: |
| + t.Fatalf("%s started across a recreated record", build) |
| + default: |
| + } |
| +} |
diff --git a/internal/host/replicarecord.go b/internal/host/replicarecord.go| new file mode 100644 |
| index 000000000..ee6de5702 |
| --- /dev/null |
| +++ b/internal/host/replicarecord.go |
| @@ -0,0 +1,44 @@ |
| +package host |
| + |
| +import ( |
| + "context" |
| + |
| + "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" |
| +) |
| + |
| +// 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. A live read that |
| +// fails, is absent (live nil), or names another instance, and any |
| +// sidecar's miss, refuse with replicas.ErrFenced, as every miss did |
| +// before. 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), rt registry.Route) (activator.RecordFacts, error) { |
| + acct := release.RouteAccount(rt) |
| + if rec, ok := index.ReplicaRecord(rt.Host); ok { |
| + if rec.Account != acct || rec.App != rt.App { |
| + return activator.RecordFacts{}, replicas.ErrFenced |
| + } |
| + return activator.RecordFactsOf(rec) |
| + } |
| + if live == nil || rt.IsSidecar() { |
| + return activator.RecordFacts{}, replicas.ErrFenced |
| + } |
| + facts, err := live(ctx, rt) |
| + if err != nil || facts.Identity.Account != acct || facts.Identity.App != rt.App || facts.Identity.Host != rt.Host { |
| + return activator.RecordFacts{}, replicas.ErrFenced |
| + } |
| + 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..f594e7626 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 5b00311dfd1abdaacf3485e0edb8822871482111aaa41d5128ea3d4654737b2e |
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..abc837b8b |
| --- /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 097dc63ee07d967fe443bf516d7b89d5eaa77b9b14e00e9c9ba83716299f2fb4 internal/host/replicarecord.go replicaRecordObservation legacy accepted-legacy accepted-legacy;rev3=census-ruling-fleet-restart-wake;basis=Fleet restart wake Task 2, new: replicaRecordFacts logic. Index hit: the reconcile pass snapshot, account and app must match, no read. Index miss: one call of live (cfg.Record, haRecordFacts: a judged read of the host record from the deployment store, the same read the exec gate makes), only for a non-sidecar route; its facts must name rt account, app and host; any error or mismatch refuses with replicas.ErrFenced. Never writes the lifetime index. Agent (uid carlos), not root; root reads nothing new. registry:App@333,registry:App@636,registry:Host@279,registry:Host@669,whole:Route@240,whole:Route@558 b2863b149e268a21ed3e68e8f5d45ce51d4558bae7e0cf3409285630645b9d71 |
| +@legacy a1cd71170eb29fe964b5d31315d7adf0831e6ca964f52abce88d5a1d2d7a7d8f 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: the body delegates to replicaRecordObservation (replicarecord.go), so its registry:App and registry:Host sites move there. An index hit is answered as before with no read. On an index miss: one judged record read through cfg.Record (haRecordFacts, the deployment store, the same read the exec gate makes) for this wake; it refuses with replicas.ErrFenced when the read fails, is absent, names another instance, or the route is a sidecar. It never writes the lifetime index. Agent (uid carlos), not root. whole:Route@340 5daf86fc8f2b8c8710934c646ae4cc5c91d52a6918ab2ced6b864b26e5da91bc |
| +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: replicaRecordFacts logic. Index hit: the reconcile pass snapshot, account and app must match, no read. Index miss: one call of live (cfg.Record, haRecordFacts: a judged read of the host record from the deployment store, the same read the exec gate makes), only for a non-sidecar route; its facts must name rt account, app and host; any error or mismatch refuses with replicas.ErrFenced. Never writes the lifetime index. Agent (uid carlos), not root; root reads nothing new. registry:App@333,registry:App@636,registry:Host@279,registry:Host@669,whole:Route@240,whole:Route@558 b2863b149e268a21ed3e68e8f5d45ce51d4558bae7e0cf3409285630645b9d71 |
| +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: the body delegates to replicaRecordObservation (replicarecord.go), so its registry:App and registry:Host sites move there. An index hit is answered as before with no read. On an index miss: one judged record read through cfg.Record (haRecordFacts, the deployment store, the same read the exec gate makes) for this wake; it refuses with replicas.ErrFenced when the read fails, is absent, names another instance, or the route is a sidecar. It never writes the lifetime index. Agent (uid carlos), not root. whole:Route@340 5daf86fc8f2b8c8710934c646ae4cc5c91d52a6918ab2ced6b864b26e5da91bc |
| +@coverage internal/activator 308c2119b959f95c330b07aa593a78395bd1d94b29e8ed2872d080bf36ccd1cf |
| +@coverage internal/host 50967c314a92e807035cca0d6df99ce41f18679dbcdaafd9cf35f784bf516469 |