edges: publish pre-issued DNS-01 aliases before they point (#1293)
A home box published an attached alias in control/edges/ only once its DNS sweep stamped it pointing (5-7 min), so after a DNS switch non-hub edges answered 503 "Almost ready". An alias inside the operator's DNS-01 scope (CARLOS_DNS01_ZONES + CARLOS_DNS01_ACCOUNTS) whose per-host certificate is already on the box (key and name match, in date, regular file) is now published early, marked dns_pointing false. Every edge relays it to its home box; the issuer refuses to order for such a name and the HTTP-01 warm leaves it alone. edgeAcmeDir gives the domains sweep and the edges-file writer the same certificate cache (honours -acme-cache). Astra R1 + R2 fixes in; census approved on #280. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Squashed from alias-publish-precert-1293 into main.
24 files changed,
+1,046
−43
docs/superpowers/notes/census-proposal-alias-publish-precert-1293.md+29 −0docs/superpowers/reviews/alias-publish-precert-1293/CODEX-FINDINGS-R1.md+40 −0docs/superpowers/reviews/alias-publish-precert-1293/CODEX-FINDINGS-R2-DELTA.md+20 −0docs/superpowers/reviews/alias-publish-precert-1293/CODEX-FINDINGS-R2.md+43 −0docs/superpowers/reviews/alias-publish-precert-1293/CODEX-REVIEW-BRIEF-R1.md+77 −0docs/superpowers/reviews/alias-publish-precert-1293/CODEX-REVIEW-BRIEF-R2.md+107 −0internal/domains/certusable.go+55 −0internal/domains/certusable_test.go+26 −0internal/edge/alias_prepoint_e2e_test.go+104 −0internal/edge/certsync.go+15 −0internal/edge/dns01scope.go+49 −0internal/edge/edge.go+1 −1internal/edge/homemap.go+18 −1internal/edge/homemap_dnspointing_test.go+54 −0internal/edge/precert.go+15 −21internal/edge/precert_test.go+32 −4internal/host/acmedir.go+20 −0internal/host/agent.go+3 −9internal/host/edgesfile.go+36 −5internal/host/edgesfile_precert_test.go+277 −0internal/host/fleet_secrets_key_test.go+1 −1internal/host/group_names_test.go+7 −1internal/provision/testdata/plan14-root-reads-alias-publish-precert-1293.tsv+16 −0internal/provision/testdata/plan14-root-reads-chain.tsv+1 −0
CI passed — run details
CI log
=== gate ===
go: downloading go1.26.10 (linux/arm64)
go version go1.26.10 linux/arm64
opentofu: arm64, tofu 1.13.9, aws 6.73.0, archive 2.8.1
tofu: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/tofu_1.13.9_linux_arm64.tar.gz
tofu: downloaded, digest verified
aws: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-aws_6.73.0_linux_arm64.zip
aws: downloaded, digest verified
archive: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-archive_2.8.1_linux_arm64.zip
archive: downloaded, digest verified
installed in /tmp/carlos-opentofu-Ro2MwB
.amadan/test-gate.sh
go: downloading github.com/aws/aws-sdk-go-v2 v1.44.0
go: downloading github.com/benbjohnson/litestream v0.5.14
go: downloading github.com/aws/aws-sdk-go-v2/service/route53 v1.64.1
go: downloading github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.68.0
go: downloading github.com/aws/aws-sdk-go-v2/service/sts v1.45.6
go: downloading github.com/aws/aws-sdk-go-v2/config v1.32.6
go: downloading github.com/aws/aws-sdk-go-v2/service/sns v1.43.0
go: downloading golang.org/x/crypto v0.58.0
go: downloading github.com/aws/aws-sdk-go-v2/service/acm v1.45.0
go: downloading modernc.org/sqlite v1.55.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/resourcegroupstaggingapi v1.37.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/costexplorer v1.67.5
go: downloading golang.org/x/net v0.62.0
go: downloading github.com/superfly/ltx v0.5.1
go: downloading golang.org/x/sys v0.49.0
go: downloading github.com/oschwald/maxminddb-golang v1.13.1
go: downloading github.com/aws/aws-sdk-go-v2/service/sesv2 v1.66.6
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/internal/v4a v1.4.38
go: downloading github.com/klauspost/compress v1.20.2
go: downloading golang.org/x/text v0.43.0
go: downloading github.com/prometheus/client_golang v1.17.0
go: downloading github.com/lmittmann/tint v1.1.3
go: downloading golang.org/x/sync v0.24.0
go: downloading github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.20.18
go: downloading github.com/pion/transport/v4 v4.0.2
go: downloading github.com/pion/dtls/v3 v3.1.4
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 github.com/prometheus/client_model v0.5.0
go: downloading google.golang.org/protobuf v1.36.10
go: downloading github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0
go: downloading github.com/wlynxg/anet v0.0.5
go: downloading modernc.org/sqlite v1.55.0
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/mathutil v1.7.1
=== launchctx (4 s, from +0 s)
ok amadan.net/carlos/platform.git/launchctx 0.015s
? amadan.net/carlos/platform.git/launchctx/controlname [no test files]
? amadan.net/carlos/platform.git/launchctx/wireid [no test files]
=== vet (174 s, from +0 s)
go: downloading modernc.org/sqlite v1.55.0
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading modernc.org/libc v1.74.1
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading modernc.org/mathutil v1.7.1
=== vet-tags (185 s, from +0 s)
go: downloading modernc.org/sqlite v1.55.0
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/memory v1.11.0
go: downloading github.com/google/uuid v1.6.0
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec
=== gofmt (1 s, from +0 s)
gofmt -l .: clean
=== rest (380 s, from +15 s)
ok github.com/carlosframework/platform/cmd/carlos-media 120.549s
? github.com/carlosframework/platform/cmd/changelog [no test files]
ok github.com/carlosframework/platform/cmd/console 202.296s
ok github.com/carlosframework/platform/cmd/mediaimage 44.499s
ok github.com/carlosframework/platform/cmd/moveprobe 16.058s
ok github.com/carlosframework/platform/cmd/pricebook-export 0.046s
ok github.com/carlosframework/platform/cmd/rootfswitness 0.179s
ok github.com/carlosframework/platform/cmd/runsc-assets 0.159s
ok github.com/carlosframework/platform/cmd/zddprobe 1.007s
ok github.com/carlosframework/platform/internal/agentsock 0.054s
ok github.com/carlosframework/platform/internal/alerting 0.046s
ok github.com/carlosframework/platform/internal/analytics 0.351s
ok github.com/carlosframework/platform/internal/appconfig 45.354s
ok github.com/carlosframework/platform/internal/apperr 0.437s
ok github.com/carlosframework/platform/internal/applog 0.424s
ok github.com/carlosframework/platform/internal/apppolicy 2.209s
ok github.com/carlosframework/platform/internal/assetcache 0.438s
ok github.com/carlosframework/platform/internal/awsinv 0.012s
ok github.com/carlosframework/platform/internal/awsmanaged 0.510s
ok github.com/carlosframework/platform/internal/awsregiongroup 0.200s
ok github.com/carlosframework/platform/internal/awsterminations 0.018s
ok github.com/carlosframework/platform/internal/backupswords 0.015s
ok github.com/carlosframework/platform/internal/billing 0.072s
ok github.com/carlosframework/platform/internal/billing/billingtest 0.040s
ok github.com/carlosframework/platform/internal/billingstripe 2.084s
ok github.com/carlosframework/platform/internal/boxchoice 0.034s
ok github.com/carlosframework/platform/internal/boxid 2.988s
? 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.034s
ok github.com/carlosframework/platform/internal/boxself 0.155s
ok github.com/carlosframework/platform/internal/boxvolumes 0.048s
ok github.com/carlosframework/platform/internal/caps 0.073s
ok github.com/carlosframework/platform/internal/certwarm 0.019s
ok github.com/carlosframework/platform/internal/cgroup 1.340s
ok github.com/carlosframework/platform/internal/changelog 4.388s
ok github.com/carlosframework/platform/internal/clamd 0.075s
? github.com/carlosframework/platform/internal/cliflag [no test files]
ok github.com/carlosframework/platform/internal/clireg 0.020s
ok github.com/carlosframework/platform/internal/codehealth 19.062s
ok github.com/carlosframework/platform/internal/compute 0.012s
? 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.100s
ok github.com/carlosframework/platform/internal/dbdoor/dbdoortest 0.077s
ok github.com/carlosframework/platform/internal/dbquery 0.015s
ok github.com/carlosframework/platform/internal/dbreads 3.247s
? github.com/carlosframework/platform/internal/dbreads/dbreadstest [no test files]
ok github.com/carlosframework/platform/internal/dbverify 0.031s
ok github.com/carlosframework/platform/internal/demo 0.021s
ok github.com/carlosframework/platform/internal/demobuild 3.076s
ok github.com/carlosframework/platform/internal/democlaim 0.302s
ok github.com/carlosframework/platform/internal/devbox 18.612s
ok github.com/carlosframework/platform/internal/dnsrec 0.018s
ok github.com/carlosframework/platform/internal/docsite 0.117s
ok github.com/carlosframework/platform/internal/domainreg 0.017s
ok github.com/carlosframework/platform/internal/domains 72.092s
ok github.com/carlosframework/platform/internal/doorkey 0.013s
ok github.com/carlosframework/platform/internal/economics 0.016s
ok github.com/carlosframework/platform/internal/edgefence 0.077s
ok github.com/carlosframework/platform/internal/edgeguard 0.393s
? github.com/carlosframework/platform/internal/edgeproof [no test files]
ok github.com/carlosframework/platform/internal/edgesfile 0.070s
ok github.com/carlosframework/platform/internal/egressaddr 0.020s
ok github.com/carlosframework/platform/internal/execsandbox 103.527s
ok github.com/carlosframework/platform/internal/fileacl 0.017s
ok github.com/carlosframework/platform/internal/fleetapi 2.029s
ok github.com/carlosframework/platform/internal/fleetstore 0.010s
ok github.com/carlosframework/platform/internal/fxrate 0.032s
ok github.com/carlosframework/platform/internal/gate 5.630s
ok github.com/carlosframework/platform/internal/genselect 0.101s
ok github.com/carlosframework/platform/internal/geo 0.049s
ok github.com/carlosframework/platform/internal/geoip 0.086s
ok github.com/carlosframework/platform/internal/groupadmission 0.010s
ok github.com/carlosframework/platform/internal/grouprollaws 17.533s
ok github.com/carlosframework/platform/internal/hadeparture 0.021s
ok github.com/carlosframework/platform/internal/hafresh 0.013s
ok github.com/carlosframework/platform/internal/hairpin 0.225s
ok github.com/carlosframework/platform/internal/historyreadback 1.176s
ok github.com/carlosframework/platform/internal/hostactors 24.653s
ok github.com/carlosframework/platform/internal/hostbox 24.976s
ok github.com/carlosframework/platform/internal/hostclaim 2.687s
ok github.com/carlosframework/platform/internal/hostenv 0.051s
ok github.com/carlosframework/platform/internal/hostevidence 0.023s
ok github.com/carlosframework/platform/internal/hostexec 26.612s
ok github.com/carlosframework/platform/internal/hostfence 0.150s
ok github.com/carlosframework/platform/internal/hostfiles 26.215s
ok github.com/carlosframework/platform/internal/hostfloor 0.148s
ok github.com/carlosframework/platform/internal/hostguard 1.732s
ok github.com/carlosframework/platform/internal/hostops 8.393s
? github.com/carlosframework/platform/internal/hostops/fencerelease [no test files]
ok github.com/carlosframework/platform/internal/hostops/internal/fencerelease 0.012s
ok github.com/carlosframework/platform/internal/hostquarantine 0.007s
ok github.com/carlosframework/platform/internal/hostrelocate 1.687s
ok github.com/carlosframework/platform/internal/hostresolve 0.844s
ok github.com/carlosframework/platform/internal/hostwrite 0.018s
ok github.com/carlosframework/platform/internal/infraview 0.010s
ok github.com/carlosframework/platform/internal/ingresshealth 0.008s
ok github.com/carlosframework/platform/internal/ingresshealth/awstg 0.016s
ok github.com/carlosframework/platform/internal/instancectl 56.469s
ok github.com/carlosframework/platform/internal/instanceexec 9.399s
ok github.com/carlosframework/platform/internal/instancefs 0.023s
ok github.com/carlosframework/platform/internal/instancekey 0.010s
ok github.com/carlosframework/platform/internal/instanceupdates 0.034s
ok github.com/carlosframework/platform/internal/interactive 0.657s
ok github.com/carlosframework/platform/internal/launchd 0.014s
ok github.com/carlosframework/platform/internal/layout 26.202s
ok github.com/carlosframework/platform/internal/layout/pubclass 104.134s
ok github.com/carlosframework/platform/internal/lbhealth 0.012s
ok github.com/carlosframework/platform/internal/lease 145.004s
ok github.com/carlosframework/platform/internal/lease/leasetest 1.301s
ok github.com/carlosframework/platform/internal/lease/locktest 0.018s
ok github.com/carlosframework/platform/internal/ledger 0.067s
ok github.com/carlosframework/platform/internal/mail 1.145s
ok github.com/carlosframework/platform/internal/mailer 0.807s
ok github.com/carlosframework/platform/internal/mailsubmit 1.565s
ok github.com/carlosframework/platform/internal/mailwire 0.021s
ok github.com/carlosframework/platform/internal/maintenance 0.142s
ok github.com/carlosframework/platform/internal/maintenanceexec 9.208s
ok github.com/carlosframework/platform/internal/maintenanceguard 0.341s
ok github.com/carlosframework/platform/internal/media 2.318s
ok github.com/carlosframework/platform/internal/media/mediatest 0.019s
ok github.com/carlosframework/platform/internal/mediaaws 64.341s
ok github.com/carlosframework/platform/internal/mediahandler 45.114s
ok github.com/carlosframework/platform/internal/mediajobs 1.139s
ok github.com/carlosframework/platform/internal/medialocal 9.576s
ok github.com/carlosframework/platform/internal/metrics 0.242s
ok github.com/carlosframework/platform/internal/minorunits 0.007s
ok github.com/carlosframework/platform/internal/moves 57.549s
ok github.com/carlosframework/platform/internal/moves/archive 3.610s
ok github.com/carlosframework/platform/internal/moves/offlinerun 0.142s
ok github.com/carlosframework/platform/internal/namedunits 0.030s
ok github.com/carlosframework/platform/internal/objstore 2.374s
ok github.com/carlosframework/platform/internal/ops 18.675s
ok github.com/carlosframework/platform/internal/pageindex 3.822s
ok github.com/carlosframework/platform/internal/parity 0.159s
? github.com/carlosframework/platform/internal/parity/cmd/parity-doc [no test files]
ok github.com/carlosframework/platform/internal/park 0.804s
ok github.com/carlosframework/platform/internal/perf 0.288s
ok github.com/carlosframework/platform/internal/plans 0.105s
ok github.com/carlosframework/platform/internal/privatefile 0.024s
ok github.com/carlosframework/platform/internal/provision 238.404s
ok github.com/carlosframework/platform/internal/proxyproto 0.939s
ok github.com/carlosframework/platform/internal/publicrelease 0.032s
ok github.com/carlosframework/platform/internal/ratelimit 0.199s
ok github.com/carlosframework/platform/internal/regionlabel 0.073s
ok github.com/carlosframework/platform/internal/regionname 0.056s
ok github.com/carlosframework/platform/internal/registrar 0.013s
ok github.com/carlosframework/platform/internal/registrar/openprovider 0.269s
? github.com/carlosframework/platform/internal/registrar/registrartest [no test files]
ok github.com/carlosframework/platform/internal/registry 86.995s
ok github.com/carlosframework/platform/internal/relay 7.734s
ok github.com/carlosframework/platform/internal/release 86.617s
ok github.com/carlosframework/platform/internal/replicagen 0.030s
ok github.com/carlosframework/platform/internal/replicas 0.144s
ok github.com/carlosframework/platform/internal/reqrec 6.346s
ok github.com/carlosframework/platform/internal/rollout 13.322s
ok github.com/carlosframework/platform/internal/rolloutwords 0.030s
ok github.com/carlosframework/platform/internal/rootaws 104.870s
ok github.com/carlosframework/platform/internal/rootfsimage 1.090s
ok github.com/carlosframework/platform/internal/rootparticipation 0.104s
ok github.com/carlosframework/platform/internal/rootstate 0.064s
ok github.com/carlosframework/platform/internal/runs 1.001s
ok github.com/carlosframework/platform/internal/s3compat 0.045s
ok github.com/carlosframework/platform/internal/s3fake 0.918s
ok github.com/carlosframework/platform/internal/safefile 0.023s
ok github.com/carlosframework/platform/internal/schedule 25.445s
ok github.com/carlosframework/platform/internal/seeds 0.032s
ok github.com/carlosframework/platform/internal/sim/litestreamfacts 4.755s
ok github.com/carlosframework/platform/internal/sim/mediajobs 48.940s
ok github.com/carlosframework/platform/internal/sim/regionha 25.869s
ok github.com/carlosframework/platform/internal/status 0.579s
ok github.com/carlosframework/platform/internal/steering 0.290s
ok github.com/carlosframework/platform/internal/stopevidence 0.978s
ok github.com/carlosframework/platform/internal/storecfg 0.601s
ok github.com/carlosframework/platform/internal/svcrole 0.023s
ok github.com/carlosframework/platform/internal/systemd 6.741s
? github.com/carlosframework/platform/internal/systemdshow [no test files]
ok github.com/carlosframework/platform/internal/team 5.241s
ok github.com/carlosframework/platform/internal/teamcontract 0.150s
ok github.com/carlosframework/platform/internal/telemetry 0.036s
ok github.com/carlosframework/platform/internal/termfence 4.418s
ok github.com/carlosframework/platform/internal/timerspec 0.073s
ok github.com/carlosframework/platform/internal/tsidentity 4.239s
ok github.com/carlosframework/platform/internal/tunnelclient 0.566s
ok github.com/carlosframework/platform/internal/unixdial 0.009s
ok github.com/carlosframework/platform/internal/updatewords 0.055s
ok github.com/carlosframework/platform/internal/upstreamguard 0.007s
? github.com/carlosframework/platform/internal/upstreamguard/guardtest [no test files]
ok github.com/carlosframework/platform/internal/usage 0.051s
ok github.com/carlosframework/platform/internal/version 0.027s
ok github.com/carlosframework/platform/internal/vet 3.591s
ok github.com/carlosframework/platform/internal/zonehost 0.013s
ok github.com/carlosframework/platform/internal/zonehost/route53zones 0.125s
? 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.023s
ok github.com/carlosframework/platform/scripts/pathmapcheck 0.111s
ok github.com/carlosframework/platform/scripts/region-ha-g2/fixture 5.175s
ok github.com/carlosframework/platform/scripts/stateless-replicas-drill 1.229s
ok github.com/carlosframework/platform/scripts/witness-pointer 0.026s
=== cutover-witness (159 s, from +15 s)
ok github.com/carlosframework/platform 2.018s
=== internal_grouproll@0 (279 s, from +74 s)
ok github.com/carlosframework/platform/internal/grouproll 278.054s
=== internal_grouproll@1 (284 s, from +74 s)
ok github.com/carlosframework/platform/internal/grouproll 282.692s
=== internal_activator@0 (146 s, from +143 s)
ok github.com/carlosframework/platform/internal/activator 142.665s
=== internal_activator@1 (135 s, from +143 s)
ok github.com/carlosframework/platform/internal/activator 131.884s
=== internal_activator@2 (143 s, from +143 s)
ok github.com/carlosframework/platform/internal/activator 139.131s
=== internal_activator@3 (164 s, from +143 s)
ok github.com/carlosframework/platform/internal/activator 161.069s
=== internal_edge@0 (244 s, from +172 s)
ok github.com/carlosframework/platform/internal/edge 236.012s
=== internal_edge@1 (136 s, from +172 s)
ok github.com/carlosframework/platform/internal/edge 128.466s
=== internal_edge@2 (159 s, from +173 s)
ok github.com/carlosframework/platform/internal/edge 152.011s
=== internal_edge@3 (158 s, from +173 s)
ok github.com/carlosframework/platform/internal/edge 150.231s
=== root@0 (118 s, from +176 s)
ok github.com/carlosframework/platform 106.645s
=== root@1 (105 s, from +176 s)
ok github.com/carlosframework/platform 95.114s
=== root@2 (122 s, from +176 s)
ok github.com/carlosframework/platform 112.946s
=== root@3 (124 s, from +177 s)
ok github.com/carlosframework/platform 114.445s
=== root@4 (99 s, from +177 s)
ok github.com/carlosframework/platform 89.964s
=== internal_host@0 (135 s, from +215 s)
ok github.com/carlosframework/platform/internal/host 130.523s
=== internal_host@1 (276 s, from +215 s)
ok github.com/carlosframework/platform/internal/host 271.676s
=== internal_host@2 (253 s, from +215 s)
ok github.com/carlosframework/platform/internal/host 248.443s
=== internal_host@3 (216 s, from +215 s)
ok github.com/carlosframework/platform/internal/host 211.104s
=== internal_host@4 (129 s, from +215 s)
ok github.com/carlosframework/platform/internal/host 123.721s
=== internal_host@5 (134 s, from +215 s)
ok github.com/carlosframework/platform/internal/host 128.492s
=== internal_console@0 (150 s, from +220 s)
ok github.com/carlosframework/platform/internal/console 143.047s
=== internal_console@1 (163 s, from +220 s)
ok github.com/carlosframework/platform/internal/console 155.321s
=== internal_console@2 (207 s, from +220 s)
ok github.com/carlosframework/platform/internal/console 199.068s
=== internal_console@3 (240 s, from +220 s)
ok github.com/carlosframework/platform/internal/console 232.435s
=== internal_console@4 (192 s, from +220 s)
ok github.com/carlosframework/platform/internal/console 184.679s
=== internal_console@5 (192 s, from +220 s)
ok github.com/carlosframework/platform/internal/console 185.125s
=== internal_console@6 (223 s, from +220 s)
ok github.com/carlosframework/platform/internal/console 214.214s
=== internal_console@7 (203 s, from +220 s)
ok github.com/carlosframework/platform/internal/console 194.977s
=== internal_console@8 (215 s, from +220 s)
ok github.com/carlosframework/platform/internal/console 208.091s
=== internal_console@9 (203 s, from +221 s)
ok github.com/carlosframework/platform/internal/console 195.919s
=== internal_console@10 (218 s, from +221 s)
ok github.com/carlosframework/platform/internal/console 211.936s
=== internal_console@11 (203 s, from +221 s)
ok github.com/carlosframework/platform/internal/console 196.286s
=== internal_console@12 (304 s, from +221 s)
ok github.com/carlosframework/platform/internal/console 297.283s
=== internal_console@13 (195 s, from +221 s)
ok github.com/carlosframework/platform/internal/console 189.142s
=== internal_console@14 (198 s, from +221 s)
ok github.com/carlosframework/platform/internal/console 192.621s
=== internal_console@15 (207 s, from +221 s)
ok github.com/carlosframework/platform/internal/console 201.067s
=== internal_console@16 (201 s, from +221 s)
ok github.com/carlosframework/platform/internal/console 193.927s
=== internal_console@17 (225 s, from +221 s)
ok github.com/carlosframework/platform/internal/console 217.818s
=== internal_console@18 (236 s, from +221 s)
ok github.com/carlosframework/platform/internal/console 228.789s
=== internal_console@19 (232 s, from +221 s)
ok github.com/carlosframework/platform/internal/console 224.828s
=== internal_console@20 (193 s, from +221 s)
ok github.com/carlosframework/platform/internal/console 186.594s
=== internal_console@21 (215 s, from +221 s)
ok github.com/carlosframework/platform/internal/console 208.083s
=== internal_console@22 (209 s, from +221 s)
ok github.com/carlosframework/platform/internal/console 202.014s
=== internal_console@23 (223 s, from +221 s)
ok github.com/carlosframework/platform/internal/console 216.409s
=== lists: internal_console 219 s, internal_edge 171 s, internal_activator 141 s, internal_host 214 s, root 175 s, internal_grouproll 73 s
=== cpu: the gate used 12506 cpu-seconds in 525 s, about 23.8 of 32 cores; the machine as a whole was 80% busy
=== opentofu ===
opentofu: 36 test files in 11 suites, OpenTofu v1.13.9
initialised in 14 s
ok 16 s infra/modules/box-fence-writer/tests/writer.tftest.hcl Success! 1 passed, 0 failed.
ok 28 s infra/modules/deployment-buckets/tests/data_lifecycle.tftest.hcl Success! 3 passed, 0 failed.
ok 18 s infra/modules/deployment-buckets/tests/db_reads.tftest.hcl Success! 1 passed, 0 failed.
ok 17 s infra/modules/deployment-buckets/tests/evidence.tftest.hcl Success! 1 passed, 0 failed.
ok 28 s infra/modules/deployment-buckets/tests/fence_writers.tftest.hcl Success! 3 passed, 0 failed.
ok 89 s infra/modules/media-engine/tests/media_engine.tftest.hcl Success! 24 passed, 0 failed.
ok 30 s infra/modules/pdf-host/tests/computed.tftest.hcl Success! 2 passed, 0 failed.
ok 72 s infra/modules/pdf-host/tests/pdf_host.tftest.hcl Success! 24 passed, 0 failed.
ok 46 s infra/modules/region-group-operator-document/tests/document.tftest.hcl Success! 12 passed, 0 failed.
ok 23 s infra/modules/region-host/ingress/tests/fixed-targets/tests/targets.tftest.hcl Success! 2 passed, 0 failed.
ok 69 s infra/modules/region-host/ingress/tests/group_ingress.tftest.hcl Success! 30 passed, 0 failed.
ok 49 s infra/modules/region-host/tests/alert_publish.tftest.hcl Success! 18 passed, 0 failed.
ok 47 s infra/modules/region-host/tests/alerts_topic.tftest.hcl Success! 16 passed, 0 failed.
ok 17 s infra/modules/region-host/tests/analytics_prune.tftest.hcl Success! 2 passed, 0 failed.
ok 17 s infra/modules/region-host/tests/console_mail.tftest.hcl Success! 4 passed, 0 failed.
ok 10 s infra/modules/region-host/tests/fixed_state_unchanged.tftest.hcl Success! 1 passed, 0 failed.
ok 71 s infra/modules/region-host/tests/group.tftest.hcl Success! 32 passed, 0 failed.
ok 11 s infra/modules/region-host/tests/group_alarms.tftest.hcl Success! 4 passed, 0 failed.
ok 12 s infra/modules/region-host/tests/group_iam.tftest.hcl Success! 4 passed, 0 failed.
ok 6 s infra/modules/region-host/tests/group_isolation.tftest.hcl Success! 1 passed, 0 failed.
ok 35 s infra/modules/region-host/tests/group_operator.tftest.hcl Success! 13 passed, 0 failed.
ok 9 s infra/modules/region-host/tests/group_user_data.tftest.hcl Success! 3 passed, 0 failed.
ok 28 s infra/modules/region-host/tests/health_alarms.tftest.hcl Success! 10 passed, 0 failed.
ok 11 s infra/modules/region-host/tests/ingress_drain_read.tftest.hcl Success! 4 passed, 0 failed.
ok 6 s infra/modules/region-host/tests/instance_metadata.tftest.hcl Success! 1 passed, 0 failed.
ok 23 s infra/modules/region-host/tests/mailer.tftest.hcl Success! 6 passed, 0 failed.
ok 11 s infra/modules/region-host/tests/mailer_group.tftest.hcl Success! 2 passed, 0 failed.
ok 12 s infra/modules/region-host/tests/managed_fleets/group_refusal.tftest.hcl Success! 2 passed, 0 failed.
ok 107 s infra/modules/region-host/tests/managed_fleets/managed_fleets.tftest.hcl Success! 46 passed, 0 failed.
ok 78 s infra/modules/region-host/tests/store_conversion.tftest.hcl Success! 27 passed, 0 failed.
ok 19 s infra/modules/region-host/tests/store_scanning.tftest.hcl Success! 4 passed, 0 failed.
ok 31 s infra/modules/region-host/tests/store_versioning.tftest.hcl Success! 11 passed, 0 failed.
ok 19 s infra/modules/region-host/tests/user_data_ignored.tftest.hcl Success! 3 passed, 0 failed.
ok 13 s infra/modules/region-remote-host/tests/data_lifecycle.tftest.hcl Success! 3 passed, 0 failed.
ok 16 s infra/modules/region-remote-host/tests/no_deployment_bucket.tftest.hcl Success! 5 passed, 0 failed.
ok 28 s infra/modules/scanner-host/tests/scanner_host.tftest.hcl Success! 14 passed, 0 failed.
opentofu: 36 files in 209 s
opentofu: PASS
=== cross ===
--- shard 0 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling darwin/arm64
--- shard 1 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling darwin/amd64
--- shard 2 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling linux/arm64
linux/arm64 carlos binary: 65798306 bytes (ceiling 70000000)
--- shard 3 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling windows/amd64
--- shard 4 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling windows/arm64
=== minio-contract ===
go version go1.26.10 linux/arm64
minio contract: arm64, minio RELEASE.2025-09-07T16-13-09Z, mc RELEASE.2025-08-13T08-35-41Z
minio: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/minio/minio.linux-arm64.RELEASE.2025-09-07T16-13-09Z
minio: downloaded, digest verified
mc: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/minio/mc.linux-arm64.RELEASE.2025-08-13T08-35-41Z
mc: downloaded, digest verified
minio healthy on 127.0.0.1:37391
Added `local` successfully.
Bucket created successfully `local/contract-bucket`.
Bucket created successfully `local/denied-bucket`.
Created policy `contract-only` successfully.
Added user `scopeduser` successfully.
Attached Policies: [contract-only]
To User: scopeduser
buckets and scoped user ready
=== RUN TestDeliveredContractMinio
=== RUN TestDeliveredContractMinio/put
=== RUN TestDeliveredContractMinio/get_round-trips_the_body
=== RUN TestDeliveredContractMinio/list_shows_the_key
=== RUN TestDeliveredContractMinio/head_and_list_agree_on_the_version
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_its_own_object
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/not_by_PutObjectTagging
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/and_not_by_x-amz-tagging_on_upload
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CreateMultipartUpload
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CopyObject_with_a_REPLACE_tagging_directive
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/but_multipart_itself_is_allowed
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_copy_itself_is_allowed
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/a_POST-policy_forged_tag_with_a_matching_version_is_still_not_a_verdict
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_an_ordinary_tagged-with-something-else_upload_is_allowed
=== RUN TestDeliveredContractMinio/delete_removes_it
=== RUN TestDeliveredContractMinio/cross-bucket_denial
--- PASS: TestDeliveredContractMinio (0.02s)
--- PASS: TestDeliveredContractMinio/put (0.00s)
--- PASS: TestDeliveredContractMinio/get_round-trips_the_body (0.00s)
--- PASS: TestDeliveredContractMinio/list_shows_the_key (0.00s)
--- PASS: TestDeliveredContractMinio/head_and_list_agree_on_the_version (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_its_own_object (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/not_by_PutObjectTagging (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/and_not_by_x-amz-tagging_on_upload (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route (0.01s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CreateMultipartUpload (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CopyObject_with_a_REPLACE_tagging_directive (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/but_multipart_itself_is_allowed (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_copy_itself_is_allowed (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/a_POST-policy_forged_tag_with_a_matching_version_is_still_not_a_verdict (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_an_ordinary_tagged-with-something-else_upload_is_allowed (0.00s)
--- PASS: TestDeliveredContractMinio/delete_removes_it (0.00s)
--- PASS: TestDeliveredContractMinio/cross-bucket_denial (0.00s)
PASS
ok github.com/carlosframework/platform/internal/objstore 0.036s
=== RUN TestT4StorageProbeMinio
2026/11/24 09:56:59 moves: T4: STORE: list: operation error S3: ListObjectsV2, https response error StatusCode: 403, RequestID: 18EAF2AB5B4FD951, HostID: ce959330a695dbd664588e8f50a5a8442a8127e7f942660f9d0e4976cfb76676, api error SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your key and signing method.
--- PASS: TestT4StorageProbeMinio (0.01s)
PASS
ok github.com/carlosframework/platform/internal/host 0.044s
=== RUN TestS3StoreMinioContract
=== RUN TestS3StoreMinioContract/conditional_get_and_etag_listing
=== RUN TestS3StoreMinioContract/bump_through_every_mutation_path
--- PASS: TestS3StoreMinioContract (0.03s)
--- PASS: TestS3StoreMinioContract/conditional_get_and_etag_listing (0.01s)
--- PASS: TestS3StoreMinioContract/bump_through_every_mutation_path (0.02s)
PASS
ok github.com/carlosframework/platform/internal/release 0.041s
Bucket created successfully `local/analytics-versions`.
local/analytics-versions versioning is enabled
Created policy `analytics-versions` successfully.
Added user `analyticsversions` successfully.
Attached Policies: [analytics-versions]
To User: analyticsversions
=== RUN TestS3StoreMinioVersions
--- PASS: TestS3StoreMinioVersions (0.03s)
PASS
ok github.com/carlosframework/platform/internal/release 0.040s
Bucket created successfully `local/store-versioned`.
local/store-versioned versioning is enabled
Created policy `store-versioned` successfully.
Added user `storeversioned` successfully.
Attached Policies: [store-versioned]
To User: storeversioned
=== RUN TestVersionedContractMinio
--- PASS: TestVersionedContractMinio (0.01s)
PASS
ok github.com/carlosframework/platform/internal/objstore 0.020s
=== RUN TestEndToEndMinio
=== RUN TestEndToEndMinio/plan
=== RUN TestEndToEndMinio/roll
=== RUN TestEndToEndMinio/replace
=== RUN TestEndToEndMinio/remove
--- PASS: TestEndToEndMinio (0.46s)
--- PASS: TestEndToEndMinio/plan (0.01s)
--- PASS: TestEndToEndMinio/roll (0.12s)
--- PASS: TestEndToEndMinio/replace (0.15s)
--- PASS: TestEndToEndMinio/remove (0.15s)
PASS
ok github.com/carlosframework/platform/internal/grouproll 0.472s
Bucket created successfully `local/dbf-deploy`.
Bucket created successfully `local/dbf-data-ie`.
Bucket created successfully `local/dbf-data-uk`.
local/dbf-deploy versioning is enabled
Created policy `dbf-console` successfully.
Created policy `dbf-ukbox` successfully.
Added user `dbfconsole` successfully.
Added user `dbfukbox` successfully.
Attached Policies: [dbf-console]
To User: dbfconsole
Attached Policies: [dbf-ukbox]
To User: dbfukbox
=== RUN TestDBForwardMinio
2026/11/24 09:57:06 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/24 09:57:06 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/24 09:57:06 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/24 09:57:06 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/24 09:57:06 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/24 09:57:06 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/24 09:57:06 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/24 09:57:06 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/24 09:57:06 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/24 09:57:06 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000003
2026/11/24 09:57:06 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000003 maxTXID=0000000000000003 size=454
2026/11/24 09:57:06 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000003
2026/11/24 09:57:06 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/24 09:57:06 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%3A38773: could not determine target mailbox
agent.go:136: dbreads: dbr_ma6ogaqmlei3ii7cjtbgd3kmn4: planned 3 files (1544 bytes) and restored to 3 in 13ms
agent.go:136: dbreads: dbr_ma6ogaqmlei3ii7cjtbgd3kmn4: output 5 bytes in 1 confirmed chunks in 2ms
2026/11/24 09:57:07 console: db read dbr_ma6ogaqmlei3ii7cjtbgd3kmn4: relayed 1 chunks (102 bytes) in 1.005s, ended done
agent.go:136: dbreads: dbr_vpt3qimult74mikkg3lxxvlaoq: planned 1 files (720 bytes) and restored to 1 in 11ms
agent.go:136: dbreads: dbr_vpt3qimult74mikkg3lxxvlaoq: output 5 bytes in 1 confirmed chunks in 2ms
2026/11/24 09:57:08 console: db read dbr_vpt3qimult74mikkg3lxxvlaoq: relayed 1 chunks (102 bytes) in 1.005s, ended done
agent.go:136: dbreads: dbr_y27xzd4e3iryha73deuz5n6pni: planned 3 files (1544 bytes) and held through 3 in 12ms
agent.go:136: dbreads: dbr_y27xzd4e3iryha73deuz5n6pni: output 1544 bytes in 1 confirmed chunks in 1ms
2026/11/24 09:57:09 console: db read dbr_y27xzd4e3iryha73deuz5n6pni: relayed 1 chunks (1641 bytes) in 1.005s, ended done
=== RUN TestDBForwardMinio/by_disconnect
=== NAME TestDBForwardMinio
agent.go:136: dbreads: dbr_wbobxtl3h26lty32ns3ebtuz2q: planned 3 files (1544 bytes) and restored to 3 in 13ms
2026/11/24 09:57:09 console: db read dbr_wbobxtl3h26lty32ns3ebtuz2q: relayed 0 chunks (0 bytes) in 35ms, ended client gone
agent.go:136: dbreads: dbr_wbobxtl3h26lty32ns3ebtuz2q: output 5 bytes in 1 confirmed chunks in 104ms
=== RUN TestDBForwardMinio/by_timeout
=== NAME TestDBForwardMinio
agent.go:136: dbreads: dbr_2s5i73aww2lkeiqkkckzm4zixu: planned 3 files (1544 bytes) and restored to 3 in 13ms
2026/11/24 09:57:29 console: db read dbr_2s5i73aww2lkeiqkkckzm4zixu: relayed 0 chunks (0 bytes) in 19.1s, ended no-result
agent.go:136: dbreads: dbr_2s5i73aww2lkeiqkkckzm4zixu: output 5 bytes in 1 confirmed chunks in 19.074s
--- PASS: TestDBForwardMinio (22.79s)
--- PASS: TestDBForwardMinio/by_disconnect (0.25s)
--- PASS: TestDBForwardMinio/by_timeout (19.21s)
PASS
ok github.com/carlosframework/platform/internal/console 22.829s
Bucket created successfully `local/media-transfers`.
Bucket created successfully `local/media-transfer-results`.
Created policy `media-transfers` successfully.
Added user `mediatransfers` successfully.
Attached Policies: [media-transfers]
To User: mediatransfers
=== RUN TestMediaTransfersMinio
upload.go:117: codec: the store already holds video.mp4
upload.go:117: codec: the store already holds video.m3u8
upload.go:117: codec: the store already holds poster.jpg
--- PASS: TestMediaTransfersMinio (0.05s)
PASS
ok github.com/carlosframework/platform/internal/mediaaws 0.060s
Bucket created successfully `local/media-local-store`.
Bucket created successfully `local/media-local-results`.
Created policy `media-local` successfully.
Added user `medialocal` successfully.
Attached Policies: [media-local]
To User: medialocal
=== RUN TestLocalEndToEndMinio
--- PASS: TestLocalEndToEndMinio (0.54s)
PASS
ok github.com/carlosframework/platform/internal/medialocal 0.550s
=== RUN TestHeldHandoverTwoBoxMinio
2026/11/24 09:57:33 edge: mesh key: minted
2026/11/24 09:57:34 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/24 09:57:34 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/24 09:57:34 tenant admission is open. accepting tenant work
2026/11/24 09:57:34 activator: HA placement host=shop-b5a17c49.example.test kind=Place ref=annie reason=roomiest generation=2026-11-24T09:57:34Z lock_generation=0
2026/11/24 09:57:34 lease: t8-b5a17c49/shop-b5a17c49.example.test: HA lease acquired in 4ms (first wake)
2026/11/24 09:57:34 activator: shop-b5a17c49.example.test: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/11/24 09:57:34 activator: shop-b5a17c49.example.test: started carlos-instance@shop\x2db5a17c49.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 6ms, control socket 0s, key gate 0s, logs 0s) 6ms, launch file 0s, gate 0s, root start 1ms)
2026/11/24 09:57:34 activator: shop-b5a17c49.example.test: carlos-instance@shop\x2db5a17c49.example.test.service launched in 7ms, healthy 0s later
2026/11/24 09:57:34 activator: shop-b5a17c49.example.test: woke in 19ms: checks 0s, lease 5ms, restore 0s, identity 0s, protect 0s, spawn 7ms, replicate 7ms
2026/11/24 09:57:34 lease: t8-b5a17c49/plain-b5a17c49.example.test: acquired in 1ms (client 0s, lock read and write 1ms)
2026/11/24 09:57:34 activator: no replica for plain-b5a17c49.example.test in s3://contract-bucket/t8-b5a17c49/plain-b5a17c49.example.test — booting fresh
2026/11/24 09:57:34 activator: plain-b5a17c49.example.test: started carlos-instance@plain\x2db5a17c49.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 1ms, instance key 0s, env 4ms, control socket 0s, key gate 0s, logs 0s) 5ms, launch file 0s, gate 0s, root start 1ms)
2026/11/24 09:57:34 activator: plain-b5a17c49.example.test: carlos-instance@plain\x2db5a17c49.example.test.service launched in 6ms, healthy 0s later
2026/11/24 09:57:34 activator: plain-b5a17c49.example.test: woke in 43ms: checks 0s, lease 1ms, restore 19ms, identity 0s, protect 0s, spawn 7ms, replicate 16ms
2026/11/24 09:57:34 lease: t8-b5a17c49/bot0.shop.bac.sidecar.internal: HA lease acquired in 4ms (first wake)
2026/11/24 09:57:34 activator: bot0.shop.bac.sidecar.internal: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/11/24 09:57:34 activator: bot0.shop.bac.sidecar.internal: woke in 19ms: checks 0s, lease 4ms, restore 0s, identity 0s, protect 0s, spawn 7ms, settle 0s, replicate 7ms
2026/11/24 09:57:34 activator: next-due probe plain-b5a17c49.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/24 09:57:34 activator: plain-b5a17c49.example.test hibernated
2026/11/24 09:57:34 activator: bot0.shop.bac.sidecar.internal: released with a marker (clean true, txid 1, files 3:2117556e7fbc3c4eb07faed9249a0c38d870008376133c81154f219583f52c6a) in 8ms: files 1ms, sync 5ms, record 1ms, marker 2ms
2026/11/24 09:57:34 activator: bot0.shop.bac.sidecar.internal hibernated
2026/11/24 09:57:34 activator: next-due probe shop-b5a17c49.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/24 09:57:34 activator: shop-b5a17c49.example.test: released with a marker (clean true, txid 1, files 3:6493001cf9eb93a85b841f8551e53efabe0fcff6d70e59507f21e5c5a9570d40) in 5ms: files 1ms, sync 2ms, record 1ms, marker 2ms
2026/11/24 09:57:34 activator: shop-b5a17c49.example.test hibernated
2026/11/24 09:57:34 lease: t8-b5a17c49/shop-b5a17c49.example.test: HA lease acquired in 3ms (clean marker)
2026/11/24 09:57:34 activator: shop-b5a17c49.example.test: restored (other-box)
2026/11/24 09:57:34 activator: shop-b5a17c49.example.test: started carlos-instance@shop\x2db5a17c49.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 0s, control socket 0s, key gate 0s, logs 0s) 1ms, launch file 0s, gate 0s, root start 1ms)
2026/11/24 09:57:34 activator: shop-b5a17c49.example.test: carlos-instance@shop\x2db5a17c49.example.test.service launched in 2ms, healthy 0s later
2026/11/24 09:57:34 activator: shop-b5a17c49.example.test: woke in 90ms: checks 0s, lease 4ms, restore 26ms, identity 0s, protect 0s, spawn 2ms, replicate 58ms
2026/11/24 09:57:34 edge: ha-take shop-b5a17c49.example.test from annie (txn t8-witness, marker generation 1): holder betty, generation 2
2026/11/24 09:57:34 edge: forward shop-b5a17c49.example.test: annie handed the request over to betty; sending it there (occurrence #1)
hadrain_twobox_minio_linux_test.go:1238: drain report: {V:1 Transaction:t8-witness Incarnation:62b8849ae51b860387dea65ea3f01a0f Step:move Result:ok Reasons:[] Fence:t8-witness StartedAt:2026-11-24 09:57:34.282711871 +0000 UTC FinishedAt:2026-11-24 09:57:34.430867497 +0000 UTC Acked:[betty carol] Departed:[] Moved:[{Host:shop-b5a17c49.example.test Holder:betty Gen:2 Confirmed:take}] Released:[{Host:plain-b5a17c49.example.test Kind:other Marker:true Clean:true Reason:} {Host:bot0.shop.bac.sidecar.internal Kind:worker Marker:true Clean:true Reason:}] Unclean:[] Left:[] Holds:{LongestMS:128 Todays:0 RefusedAtOnce:1} Closed:0 Quiet:{DrainQuiet:{Waking:0 Stopping:0 Recovering:0 Owed:0} Held:[]}}
hadrain_twobox_minio_linux_test.go:1239: driver calls: [begin shop-b5a17c49.example.test <nil> stop plain-b5a17c49.example.test marker=true clean=true <nil> stop bot0.shop.bac.sidecar.internal marker=true clean=true <nil> releasing shop-b5a17c49.example.test <nil> stop shop-b5a17c49.example.test marker=true clean=true <nil> taken shop-b5a17c49.example.test betty <nil> end-moves]
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/bot0.shop.bac.sidecar.internal/0001/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/bot0.shop.bac.sidecar.internal/0002/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/bot0.shop.bac.sidecar.internal/0003/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-b5a17c49/shop-b5a17c49.example.test/lock.json
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-b5a17c49/bot0.shop.bac.sidecar.internal/0009/0000000000000001-0000000000000001.ltx
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: DELETE /contract-bucket/t8-b5a17c49/plain-b5a17c49.example.test/lock.json
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-b5a17c49/bot0.shop.bac.sidecar.internal/lock.json
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-b5a17c49/shop-b5a17c49.example.test/0009/0000000000000001-0000000000000001.ltx
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-b5a17c49/shop-b5a17c49.example.test/lock.json
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-b5a17c49/shop-b5a17c49.example.test/lock.json
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-b5a17c49/shop-b5a17c49.example.test/lock.json
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-b5a17c49/shop-b5a17c49.example.test/head.json
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/generations/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0009/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0008/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0007/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0006/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0005/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0004/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0003/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0002/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0001/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0000/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0009/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0008/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0007/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0006/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0005/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0004/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0003/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0002/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0001/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0000/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-b5a17c49/shop-b5a17c49.example.test/0009/0000000000000001-0000000000000001.ltx
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-b5a17c49/shop-b5a17c49.example.test/files/0/manifest.json
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-b5a17c49/shop-b5a17c49.example.test/files/0/objects/0000000000000001-f77dce385ef87ddf17e17d70b6c6586a680e55637bfffff0426aea2d2830155f
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-b5a17c49/shop-b5a17c49.example.test/files/0/objects/0000000000000003-731454f35f19cecb5a164488f6b3247ab2193e641aceb0d9f51bc3be679bb27c
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0000/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-b5a17c49/shop-b5a17c49.example.test/0000/0000000000000001-0000000000000001.ltx
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0000/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0001/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0009/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-b5a17c49/shop-b5a17c49.example.test/0000/0000000000000002-0000000000000002.ltx
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0009/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0001/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0002/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-b5a17c49/shop-b5a17c49.example.test/0003/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-b5a17c49/shop-b5a17c49.example.test/lock.json
hadrain_twobox_minio_linux_test.go:1243: drain took 196ms; S3 calls 48 (DELETE lock=1 GET files=3 GET head=1 GET lock=3 GET replica=2 LIST replica=32 PUT lock=3 PUT replica=3); deployment store calls 20 (GET edges=14 LIST edges=4 PUT edges=2)
hadrain_twobox_minio_linux_test.go:1367: the fenced A's start gate answers 503 "This service is unavailable. Try again later.\n" (Retry-After "10")
2026/11/24 09:57:34 lease: t8-b5a17c49/plain-b5a17c49.example.test: acquired in 2ms (client 0s, lock read and write 1ms)
2026/11/24 09:57:34 activator: plain-b5a17c49.example.test: started carlos-instance@plain\x2db5a17c49.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 0s, control socket 0s, key gate 0s, logs 0s) 0s, launch file 0s, gate 0s, root start 1ms)
2026/11/24 09:57:34 activator: plain-b5a17c49.example.test: carlos-instance@plain\x2db5a17c49.example.test.service launched in 1ms, healthy 0s later
2026/11/24 09:57:34 lease: /tmp/carlos-minio-contract-RmRX5H/g/dw368170743/data/instances/plain-b5a17c49.example.test/plain-b5a17c49.example.test.db: continuity with the last clean close not proven; snapshot 1-0000000000000001 written before serving
2026/11/24 09:57:34 activator: plain-b5a17c49.example.test: woke in 8ms: checks 0s, lease 2ms, restore 0s, identity 0s, protect 0s, spawn 2ms, replicate 4ms
2026/11/24 09:57:34 activator: next-due probe shop-b5a17c49.example.test: decode /api/next-due: invalid character 'b' looking for beginning of value — recording none (it sleeps until a request)
2026/11/24 09:57:34 activator: shop-b5a17c49.example.test: released with a marker (clean true, txid 2, files 3:6493001cf9eb93a85b841f8551e53efabe0fcff6d70e59507f21e5c5a9570d40) in 4ms: files 1ms, sync 0s, record 1ms, marker 2ms
2026/11/24 09:57:34 activator: shop-b5a17c49.example.test hibernated
2026/11/24 09:57:34 tenant admission is closed for shutdown
2026/11/24 09:57:34 activator: next-due probe plain-b5a17c49.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/24 09:57:34 activator: plain-b5a17c49.example.test hibernated
--- PASS: TestHeldHandoverTwoBoxMinio (0.52s)
=== RUN TestHeldHandoverLostLeaseMinio
2026/11/24 09:57:34 edge: mesh key: minted
2026/11/24 09:57:34 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/24 09:57:34 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/24 09:57:34 tenant admission is open. accepting tenant work
2026/11/24 09:57:34 activator: HA placement host=shop-0cbf85c3.example.test kind=Place ref=annie reason=roomiest generation=2026-11-24T09:57:34Z lock_generation=0
2026/11/24 09:57:34 lease: t8-0cbf85c3/shop-0cbf85c3.example.test: HA lease acquired in 4ms (first wake)
2026/11/24 09:57:34 activator: shop-0cbf85c3.example.test: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/11/24 09:57:34 activator: shop-0cbf85c3.example.test: started carlos-instance@shop\x2d0cbf85c3.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 6ms, control socket 0s, key gate 0s, logs 0s) 6ms, launch file 0s, gate 0s, root start 1ms)
2026/11/24 09:57:34 activator: shop-0cbf85c3.example.test: carlos-instance@shop\x2d0cbf85c3.example.test.service launched in 7ms, healthy 0s later
2026/11/24 09:57:34 activator: shop-0cbf85c3.example.test: woke in 68ms: checks 0s, lease 4ms, restore 0s, identity 0s, protect 0s, spawn 7ms, replicate 56ms
2026/11/24 09:57:34 activator: next-due probe shop-0cbf85c3.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/24 09:57:34 activator: final checkpoint shop-0cbf85c3.example.test: lease: release marker owed for s3://contract-bucket/t8-0cbf85c3/shop-0cbf85c3.example.test/lock.json (If-Match "6d9a8401e01ed01403d67074e9146f21"): lease: write release marker: operation error S3: PutObject, https response error StatusCode: 503, RequestID: , HostID: , api error ServiceUnavailable: witness: refused
2026/11/24 09:57:34 activator: shop-0cbf85c3.example.test hibernated
2026/11/24 09:57:34 activator: handover of shop-0cbf85c3.example.test left: released without a marker; its held requests get today's answer
hadrain_twobox_minio_linux_test.go:1469: the held request's hold ended "shop-0cbf85c3.example.test client 4 "
hadrain_twobox_minio_linux_test.go:1486: driver calls: [begin shop-0cbf85c3.example.test <nil> releasing shop-0cbf85c3.example.test <nil> stop shop-0cbf85c3.example.test marker=false clean=false <nil> left shop-0cbf85c3.example.test released without a marker]
hadrain_twobox_minio_linux_test.go:1487: a request after the loss: 503 "This instance cannot wake right now. Please try again shortly.\n" (Retry-After "10", holder "none", 0s, err <nil>)
2026/11/24 09:57:34 tenant admission is closed for shutdown
2026/11/24 09:57:34 http: proxy error: context canceled
--- PASS: TestHeldHandoverLostLeaseMinio (0.32s)
PASS
ok github.com/carlosframework/platform/internal/host 0.877s
Bucket created successfully `local/gen-take`.
local/gen-take versioning is enabled
Created policy `gen-take` successfully.
Added user `gentake` successfully.
Attached Policies: [gen-take]
To User: gentake
=== RUN TestGenerationTakeMinio
=== RUN TestGenerationTakeMinio/take
2026/11/24 09:57:36 lease: instances/gen-1795514255990678232.shop.example.com: HA lease acquired in 5ms (first wake)
2026/11/24 09:57:36 lease: instances/gen-1795514255990678232.shop.example.com: HA lease acquired in 3ms (holder terminated)
gentake_minio_test.go:308: a second create-only copy onto instances/gen-1795514255990678232.shop.example.com/g-00000000000000000002/0000/0000000000000001-0000000000000001.ltx: <nil> (destination condition honoured: false)
2026/11/24 09:57:36 ERROR retention enforcement failed system=store db=w.example.com.db error="enforce snapshot retention: remove ltx files: lease: invalid or changed generation binding"
2026/11/24 09:57:36 http: proxy error: context canceled
2026/11/24 09:57:36 ERROR retention enforcement failed system=store db=w.example.com.db error="enforce snapshot retention: remove ltx files: lease: a write has waited too long to reach storage (write fence)"
=== RUN TestGenerationTakeMinio/switch-412
2026/11/24 09:57:36 lease: instances/gen-1795514256118261365.shop.example.com: HA lease acquired in 3ms (first wake)
2026/11/24 09:57:36 ERROR retention enforcement failed system=store db=seed.db error="enforce snapshot retention: remove ltx files: lease: invalid or changed generation binding"
2026/11/24 09:57:36 lease: instances/gen-1795514256118261365.shop.example.com: HA lease acquired in 2ms (clean marker)
=== RUN TestGenerationTakeMinio/copy-version
=== RUN TestGenerationTakeMinio/store-time
2026/11/24 09:57:36 lease: instances/gen-1795514256217601287.shop.example.com: HA lease acquired in 4ms (first wake)
2026/11/24 09:57:36 ERROR retention enforcement failed system=store db=seed.db error="enforce snapshot retention: fetch ltx files: lease: a write has waited too long to reach storage (write fence)"
2026/11/24 09:57:36 lease: instances/gen-1795514256217601287.shop.example.com: HA lease acquired in 3ms (clean marker)
2026/11/24 09:57:36 lease: instances/gen-1795514256217601287.shop.example.com: HA lease acquired in 3ms (unclean marker)
2026/11/24 09:57:36 lease: instances/gen-1795514256217601287.shop.example.com: HA lease acquired in 3ms (unclean marker)
2026/11/24 09:57:36 lease: instances/gen-1795514256217601287.shop.example.com: HA lease acquired in 2ms (unclean marker)
2026/11/24 09:57:36 lease: instances/gen-1795514256217601287.shop.example.com: HA lease acquired in 2ms (unclean marker)
=== RUN TestGenerationTakeMinio/skew
--- PASS: TestGenerationTakeMinio (0.35s)
--- PASS: TestGenerationTakeMinio/take (0.13s)
--- PASS: TestGenerationTakeMinio/switch-412 (0.09s)
--- PASS: TestGenerationTakeMinio/copy-version (0.01s)
--- PASS: TestGenerationTakeMinio/store-time (0.11s)
--- PASS: TestGenerationTakeMinio/skew (0.01s)
PASS
ok github.com/carlosframework/platform/internal/lease 0.358s
minio contract: PASS
=== staticcheck ===
go version go1.26.10 linux/arm64
go: downloading honnef.co/go/tools v0.8.2
go: downloading golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678
go: downloading github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c
go: downloading golang.org/x/sync v0.23.0
go: downloading golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa
staticcheck: clean
=== govulncheck ===
go version go1.26.10 linux/arm64
go: downloading golang.org/x/vuln v1.8.0
go: downloading golang.org/x/telemetry v0.0.0-20260908163034-4bcc4b2ee518
go: downloading golang.org/x/tools v0.50.0
govulncheck: scanned github.com/carlosframework/platform, amadan.net/carlos/platform.git/launchctx
GO-2026-6859 called stdlib@v1.26.10, fixed in v1.26.11
HTTP/1 server crash due to MaxBytesReader header race in net/http
excepted until 2027-01-31 (.amadan/govulncheck-exceptions.tsv:9): net/http MaxBytesReader header race, fixed in go1.26.11. CI and releases stay on go1.26.10 because 1.26.11 deadlocks the edge's Expect: 100-continue path (#897, .amadan/go-toolchain.sh); #904 checked every production MaxBytesReader site and found it unreachable.
GO-2026-5932 required golang.org/x/crypto@v0.58.0, fixed in v0.58.1-0.20261009181718-2f1f834330b2
The golang.org/x/crypto/openpgp package is unmaintained, unsafe by design, and has known security issues
not fatal: no call path to the vulnerable code
govulncheck: clean (2 finding(s), none called outside .amadan/govulncheck-exceptions.tsv)
=== code-health ===
go version go1.26.10 linux/arm64
codehealth_test.go:42: scanned in 1m48.239s
codehealth_test.go:107: line metrics (code lines, then physical):
file-lines 5471 7324 internal/activator activator_test.go
file-lines 4219 7040 internal/console server.go
file-lines 4182 6363 . apimode.go
file-lines 3783 7200 internal/activator activator.go
file-lines 3530 4459 . apimode_test.go
file-lines 3261 3864 internal/registry registry_test.go
file-lines 3205 6356 internal/host agent.go
file-lines 3094 3992 internal/provision reconcile_test.go
func-lines 870 891 internal/host plan14InstalledClaimLaunch
func-lines 811 1275 internal/provision Reconcile
func-lines 769 1242 internal/console (*Server).handleAPIInstanceCreate
func-lines 688 1232 internal/host runAgent
func-lines 570 903 internal/activator (*Service).doWakeOnce
func-lines 538 546 internal/host runServingParkPeerNamespace
func-lines 519 712 . runRoute
func-lines 509 569 internal/host TestPagingIsRateLimited
func-lines 494 809 internal/release adoptHost
func-lines 441 500 internal/host TestRootInstanceStopExecStop
func-lines 421 436 internal/host (*ClaimWakeAssembly).Build
func-lines 421 437 internal/team TestFixture
func-lines 412 414 internal/console TestDemoProtectionsSourceToLimitAndTakedown
func-lines 408 485 . TestFleetAppServesThroughTheHub
func-lines 402 406 internal/registry (*Registry).haJournal
func-lines 400 868 internal/provision rootReadArchivedChain
func-lines 399 732 internal/release PassFilter
func-lines 390 398 internal/host runFilesSeedPreparationWithLive
func-lines 383 406 internal/console TestDemoSourceToLiveAndUpdate
func-lines 379 898 internal/edge (*Edge).ServeHTTP
func-lines 378 600 internal/console (*Server).handleAPIShip
func-lines 374 377 internal/host plan14RequiredArtifactsRootRunner
func-lines 371 417 internal/host TestRootEgressKernelProof
func-lines 367 635 cmd/console serve
func-lines 364 371 internal/host testRootMigrationBootstrap
func-lines 360 362 internal/edge TestDemoAPIAliasBoundary
func-lines 357 358 internal/registry (*Registry).dispatchRemote
func-lines 355 372 internal/host TestRootSandboxUpdateFromOldBox
func-lines 343 354 internal/analytics Prune
func-lines 340 353 internal/host newColdRootHarness
func-lines 335 557 internal/console (*Store).migrate
func-lines 334 334 internal/host TestPlan12RecoveryRestoreSourceDatabase
func-lines 330 371 internal/edge TestRegionalNameNeverLeavesItsRegion
func-lines 329 471 . runDeploy
func-lines 329 329 internal/host TestPlan12RecoveryRestoreSourceDatabase.func1
func-lines 327 369 internal/edge TestTunnelWebSocketEndToEnd
func-lines 325 455 internal/objstore TestDeliveredContractMinio
func-lines 320 654 internal/appconfig SyncExecWithCallbacks
func-lines 315 318 internal/host plan14TimerIntention
func-lines 311 314 internal/host plan14TimerIntention.func1
func-lines 310 315 internal/hostbox ColdHandover.Run
func-lines 308 309 internal/host rootFilesSeedIsolatedWitness
func-lines 305 323 internal/host hairpinKernelWitness
func-lines 304 308 internal/console TestHAP2ProductionDoors
func-lines 302 329 internal/host TestRootG2PoolIngress
release-importers: . cmd/console internal/activator internal/analytics internal/appconfig internal/apperr internal/applog internal/apppolicy internal/boxid internal/boxvolumes internal/console internal/dbreads internal/dbreads/dbreadstest internal/dbverify internal/demobuild internal/domains internal/doorkey internal/edge internal/edgeproof internal/edgesfile internal/fleetapi internal/grouproll internal/grouprollaws internal/historyreadback internal/host internal/hostactors internal/hostbox internal/hostclaim internal/hostevidence internal/hostexec internal/hostfence internal/hostfiles internal/hostfloor internal/hostguard internal/hostops internal/hostrelocate internal/hostresolve internal/instancectl internal/instanceupdates internal/interactive internal/layout internal/lease internal/ledger internal/mail internal/mailer internal/mailsubmit internal/metrics internal/moves internal/objstore internal/ops internal/park internal/plans internal/provision internal/relay internal/rollout internal/rootfsimage internal/runs internal/s3fake internal/schedule internal/seeds internal/status internal/telemetry internal/usage internal/vet scripts/pathmapcheck scripts/witness-pointer
not scanned (205 files):
cmd/carlos-media/drill_other.go: built only for other systems or tags
cmd/carlos-media/harden_other.go: built only for other systems or tags
cmd/console/servelock_windows.go: built only for other systems or tags
cmd/moveprobe/detach_windows.go: built only for other systems or tags
cmd/rootfswitness/mmap_other.go: built only for other systems or tags
devbox_acl_other.go: built only for other systems or tags
devbox_envfile_darwin_test.go: built only for other systems or tags
devbox_envfile_other.go: built only for other systems or tags
interactive_term_darwin.go: built only for other systems or tags
interactive_term_other.go: built only for other systems or tags
internal/activator/claimprocess_root_other.go: built only for other systems or tags
internal/activator/escrow_stamp_other.go: built only for other systems or tags
internal/activator/fleetreserve_other.go: built only for other systems or tags
internal/activator/harecord_other.go: built only for other systems or tags
internal/activator/ownenv_other.go: built only for other systems or tags
internal/activator/pty_other.go: built only for other systems or tags
internal/activator/race_on_test.go: built only for other systems or tags
internal/activator/rolelaunch_other.go: built only for other systems or tags
internal/assetcache/statfs_other.go: built only for other systems or tags
internal/boxself/io_other.go: built only for other systems or tags
internal/cgroup/cleanup_other.go: built only for other systems or tags
internal/cgroup/cleanup_other_test.go: built only for other systems or tags
internal/cgroup/hostprocs_other.go: built only for other systems or tags
internal/cgroup/recreate_other.go: built only for other systems or tags
internal/cgroup/role_other.go: built only for other systems or tags
internal/cgroup/shim_other.go: built only for other systems or tags
internal/cgroup/strict_other.go: built only for other systems or tags
internal/cgroup/verify_other.go: built only for other systems or tags
internal/console/claim_sql_identity_other.go: built only for other systems or tags
internal/console/geoipverify_other.go: built only for other systems or tags
internal/console/hostreports_process_other.go: built only for other systems or tags
internal/console/replicaview_other.go: built only for other systems or tags
internal/console/restore_sim_nice_other_test.go: built only for other systems or tags
internal/console/scalecost_other_test.go: built only for other systems or tags
internal/console/seedscratch_windows.go: built only for other systems or tags
internal/dbreads/worker_other.go: built only for other systems or tags
internal/demobuild/security_other.go: built only for other systems or tags
internal/democlaim/source_other.go: built only for other systems or tags
internal/devbox/peer_darwin.go: built only for other systems or tags
internal/devbox/peer_darwin_test.go: built only for other systems or tags
internal/devbox/peer_other.go: built only for other systems or tags
internal/devbox/socketcheck_other.go: built only for other systems or tags
internal/edge/devboxpeer_other.go: built only for other systems or tags
internal/edge/hairpin_other.go: built only for other systems or tags
internal/edge/heldbudget_other.go: built only for other systems or tags
internal/edge/purge_listen_unix.go: built only for other systems or tags
internal/edge/purge_listen_windows.go: built only for other systems or tags
internal/edge/race_on_test.go: built only for other systems or tags
internal/edge/static_artifact_other.go: built only for other systems or tags
internal/edge/static_recordlock_other.go: built only for other systems or tags
internal/edge/static_sweep_other.go: built only for other systems or tags
internal/execsandbox/cleanup_other.go: built only for other systems or tags
internal/execsandbox/file_other.go: built only for other systems or tags
internal/execsandbox/oci_other.go: built only for other systems or tags
internal/fileacl/fileacl_darwin.go: built only for other systems or tags
internal/fileacl/fileacl_darwin_amd64.s: built only for other systems or tags
internal/fileacl/fileacl_darwin_arm64.s: built only for other systems or tags
internal/fileacl/fileacl_darwin_test.go: built only for other systems or tags
internal/grouproll/state_other.go: built only for other systems or tags
internal/grouprollaws/pty_darwin.go: built only for other systems or tags
internal/grouprollaws/pty_other.go: built only for other systems or tags
internal/hairpin/native_other.go: built only for other systems or tags
internal/host/applylock_other_test.go: built only for other systems or tags
internal/host/bootstrapfs_other.go: built only for other systems or tags
internal/host/boxroles_config_other.go: built only for other systems or tags
internal/host/claimfilesseed_delegation_other.go: built only for other systems or tags
internal/host/claimfilesseed_transport_other.go: built only for other systems or tags
internal/host/claimjournal_containment_other.go: built only for other systems or tags
internal/host/claimjournal_migration_other.go: built only for other systems or tags
internal/host/claimlaunch_kernel_other.go: built only for other systems or tags
internal/host/claimlaunch_rev2_other_test.go: built only for other systems or tags
internal/host/claimproduction_other.go: built only for other systems or tags
internal/host/claimready_other.go: built only for other systems or tags
internal/host/claimroleassembly_other.go: built only for other systems or tags
internal/host/claimservingartifact_other.go: built only for other systems or tags
internal/host/claimservinghandover_reboot_other.go: built only for other systems or tags
internal/host/claimservinghandover_reboot_other_test.go: built only for other systems or tags
internal/host/claimservingpark_other.go: built only for other systems or tags
internal/host/claimstate_other.go: built only for other systems or tags
internal/host/claimstop_kernel_other.go: built only for other systems or tags
internal/host/claimtoken_inventory_other.go: built only for other systems or tags
internal/host/claimunit_dropin_other.go: built only for other systems or tags
internal/host/claimunit_files_other.go: built only for other systems or tags
internal/host/claimunit_migrate_other.go: built only for other systems or tags
internal/host/claimunit_ready_other.go: built only for other systems or tags
internal/host/claimunit_socket_migration_other.go: built only for other systems or tags
internal/host/dbreads_other.go: built only for other systems or tags
internal/host/egress_rail_other.go: built only for other systems or tags
internal/host/fileowner_other.go: built only for other systems or tags
internal/host/flock_windows.go: built only for other systems or tags
internal/host/group_config_other.go: built only for other systems or tags
internal/host/group_maintenance_other.go: built only for other systems or tags
internal/host/group_maintenance_verbs_other.go: built only for other systems or tags
internal/host/group_receipt_other.go: built only for other systems or tags
internal/host/hadrain_call_other.go: built only for other systems or tags
internal/host/hadrain_socket_other.go: built only for other systems or tags
internal/host/hadrainfence_other.go: built only for other systems or tags
internal/host/headroom_other.go: built only for other systems or tags
internal/host/installchannel_other.go: built only for other systems or tags
internal/host/metrics_nested_other.go: built only for other systems or tags
internal/host/movesfloor_other.go: built only for other systems or tags
internal/host/movesfloorgate_other.go: built only for other systems or tags
internal/host/movesheldrelease_other.go: built only for other systems or tags
internal/host/movesmeasure_other.go: built only for other systems or tags
internal/host/offcloudcredentials_other.go: built only for other systems or tags
internal/host/registrychild_exec_other.go: built only for other systems or tags
internal/host/registrychild_other.go: built only for other systems or tags
internal/host/registryowner_chown_other.go: built only for other systems or tags
internal/host/registryowner_descriptor_unix.go: built only for other systems or tags
internal/host/replicahealth_other.go: built only for other systems or tags
internal/host/rootgeneration_census_other.go: built only for other systems or tags
internal/host/rootgeneration_kernel_other.go: built only for other systems or tags
internal/host/rootgeneration_payload_other.go: built only for other systems or tags
internal/host/rootgeneration_retired_other.go: built only for other systems or tags
internal/host/rootmigration_production_other.go: built only for other systems or tags
internal/host/runscset_other.go: built only for other systems or tags
internal/host/sandboxenv_other.go: built only for other systems or tags
internal/host/statfs_windows.go: built only for other systems or tags
internal/host/systemapply_other.go: built only for other systems or tags
internal/hostbox/census_vendor_other.go: built only for other systems or tags
internal/hostbox/inventory_identity_other.go: built only for other systems or tags
internal/hostbox/journalmigration_other.go: built only for other systems or tags
internal/hostbox/journalnamespace_other.go: built only for other systems or tags
internal/hostbox/journaltrust_other.go: built only for other systems or tags
internal/hostbox/migration_census_other.go: built only for other systems or tags
internal/hostbox/typedpark_other.go: built only for other systems or tags
internal/hostenv/group_other.go: built only for other systems or tags
internal/hostenv/write_other.go: built only for other systems or tags
internal/hostenv/write_other_test.go: built only for other systems or tags
internal/hostexec/clock_other.go: built only for other systems or tags
internal/hostexec/clock_other_test.go: built only for other systems or tags
internal/hostexec/local_other.go: built only for other systems or tags
internal/hostexec/pending_other.go: built only for other systems or tags
internal/hostexec/probe_other.go: built only for other systems or tags
internal/hostexec/rootprocess_other.go: built only for other systems or tags
internal/hostfiles/dir_other.go: built only for other systems or tags
internal/hostfiles/refuse_other.go: built only for other systems or tags
internal/hostfiles/watch_other.go: built only for other systems or tags
internal/hostfloor/controllers_other.go: built only for other systems or tags
internal/hostfloor/image_other.go: built only for other systems or tags
internal/hostguard/flock_other.go: built only for other systems or tags
internal/hostguard/flock_other_test.go: built only for other systems or tags
internal/hostguard/record_other.go: built only for other systems or tags
internal/instancectl/claimexec_other.go: built only for other systems or tags
internal/instancectl/claimexec_socket_other.go: built only for other systems or tags
internal/instancectl/claimlaunch_snapshot_other.go: built only for other systems or tags
internal/instancectl/claimnetwork_other.go: built only for other systems or tags
internal/instancectl/demo_snapshot_other.go: built only for other systems or tags
internal/instancectl/egress_cgroup_other.go: built only for other systems or tags
internal/instancectl/egress_dropin_other.go: built only for other systems or tags
internal/instancectl/fleetsize_other.go: built only for other systems or tags
internal/instancectl/gvisorprobe_other.go: built only for other systems or tags
internal/instancectl/peer_other.go: built only for other systems or tags
internal/instancectl/peer_tuple_other.go: built only for other systems or tags
internal/instancectl/rootfs_identity_other.go: built only for other systems or tags
internal/instanceexec/claimexec_other.go: built only for other systems or tags
internal/instanceexec/exec_rootfs_other.go: built only for other systems or tags
internal/instanceexec/probe_gvisor_other.go: built only for other systems or tags
internal/instanceexec/probe_hardening_other.go: built only for other systems or tags
internal/instanceexec/probe_other.go: built only for other systems or tags
internal/instanceexec/probe_rootfs_other.go: built only for other systems or tags
internal/instanceexec/sandbox_other.go: built only for other systems or tags
internal/instanceexec/scope_other.go: built only for other systems or tags
internal/instanceexec/stop_other.go: built only for other systems or tags
internal/instanceexec/tty_other.go: built only for other systems or tags
internal/instancefs/instancefs_other.go: built only for other systems or tags
internal/launchd/activate_darwin.go: built only for other systems or tags
internal/launchd/activate_darwin_amd64.s: built only for other systems or tags
internal/launchd/activate_darwin_arm64.s: built only for other systems or tags
internal/launchd/activate_darwin_test.go: built only for other systems or tags
internal/layout/journal_other.go: built only for other systems or tags
internal/layout/links_other.go: built only for other systems or tags
internal/mailer/keys_other.go: built only for other systems or tags
internal/maintenanceexec/run_other.go: built only for other systems or tags
internal/mediahandler/collect_other.go: built only for other systems or tags
internal/mediahandler/procs_other.go: built only for other systems or tags
internal/medialocal/runner_other.go: built only for other systems or tags
internal/moves/archive/open_other.go: built only for other systems or tags
internal/moves/archive/sync_other.go: built only for other systems or tags
internal/ops/flock_windows.go: built only for other systems or tags
internal/park/local_other.go: built only for other systems or tags
internal/privatefile/io_other.go: built only for other systems or tags
internal/proxyproto/peek_other.go: built only for other systems or tags
internal/relay/race_on_test.go: built only for other systems or tags
internal/release/consumedfence_other.go: built only for other systems or tags
internal/release/digestcache_other.go: built only for other systems or tags
internal/rootaws/credentials_other.go: built only for other systems or tags
internal/rootaws/open_darwin.go: built only for other systems or tags
internal/rootfsimage/dir_other.go: built only for other systems or tags
internal/rootstate/authoritydir_other.go: built only for other systems or tags
internal/rootstate/authorityfile_other.go: built only for other systems or tags
internal/rootstate/file_other.go: built only for other systems or tags
internal/rootstate/link_other.go: built only for other systems or tags
internal/rootstate/persistent_other.go: built only for other systems or tags
internal/rootstate/state_other.go: built only for other systems or tags
internal/safefile/file_other.go: built only for other systems or tags
internal/safefile/reap_other.go: built only for other systems or tags
internal/stopevidence/fds_other.go: built only for other systems or tags
internal/stopevidence/fds_other_test.go: built only for other systems or tags
internal/stopevidence/holders_other.go: built only for other systems or tags
internal/stopevidence/reconstruct_other.go: built only for other systems or tags
internal/team/storelock_other.go: built only for other systems or tags
internal/team/storelock_windows.go: built only for other systems or tags
move_offline_run_other.go: built only for other systems or tags
system_group_other.go: built only for other systems or tags
codehealth_test.go:115: fatal 1094 at 474 sites log.Fatal*, (*log.Logger).Fatal* and os.Exit in the root package's production files
codehealth_test.go:115: sleep 1005 at 811 sites time.Sleep in test files
codehealth_test.go:115: db-no-context 885 at 703 sites database calls with no context (dbOpWithoutContext) in production files
codehealth_test.go:115: host-context 188 at 142 sites context.Background and context.TODO in internal/host production files
codehealth_test.go:115: func-lines 18617 at 45 sites functions over 300 code lines (blank and comment-only lines not counted)
codehealth_test.go:115: file-lines 30745 at 8 sites files over 3,000 code lines, counted the same way
codehealth_test.go:115: release-importers 66 at 1 sites packages whose production files import internal/release
codehealth_test.go:119: below the record: file-lines . apimode.go -: 4182 in the code, the record allows 4184 (make code-health-record lowers it)
codehealth_test.go:119: below the record: file-lines internal/host agent.go -: 3205 in the code, the record allows 3214 (make code-health-record lowers it)
--- PASS: TestCodeHealth (108.24s)
PASS
ok github.com/carlosframework/platform/internal/codehealth 109.201s
=== code-health-record ===
go version go1.26.10 linux/arm64
code-health record: HEAD is on main; comparing with its parent 79075f0cae57a0e8354b3404ce1f6c044c78066f
=== RUN TestRecordAgainstBase
--- PASS: TestRecordAgainstBase (0.01s)
PASS
ok github.com/carlosframework/platform/internal/codehealth 0.008s
code-health record: no line went up without a reason
=== race ===
go version go1.26.10 linux/arm64
GATE_RACE=1 .amadan/test-gate.sh
=== internal_systemd@0 (13 s, from +14 s)
ok github.com/carlosframework/platform/internal/systemd 12.909s
=== internal_rootaws@0 (25 s, from +35 s)
ok github.com/carlosframework/platform/internal/rootaws 24.908s
=== internal_activator@0 (263 s, from +110 s)
ok github.com/carlosframework/platform/internal/activator 260.648s
=== internal_activator@1 (259 s, from +110 s)
ok github.com/carlosframework/platform/internal/activator 256.498s
=== internal_activator@2 (311 s, from +110 s)
ok github.com/carlosframework/platform/internal/activator 308.414s
=== internal_activator@3 (387 s, from +110 s)
ok github.com/carlosframework/platform/internal/activator 384.642s
=== internal_activator@4 (295 s, from +110 s)
ok github.com/carlosframework/platform/internal/activator 293.111s
=== internal_activator@5 (322 s, from +110 s)
ok github.com/carlosframework/platform/internal/activator 320.268s
=== internal_activator@6 (302 s, from +110 s)
ok github.com/carlosframework/platform/internal/activator 299.498s
=== internal_activator@7 (404 s, from +110 s)
ok github.com/carlosframework/platform/internal/activator 402.100s
=== internal_edge@0 (84 s, from +130 s)
ok github.com/carlosframework/platform/internal/edge 80.495s
=== internal_edge@1 (75 s, from +130 s)
ok github.com/carlosframework/platform/internal/edge 71.593s
=== internal_edge@2 (204 s, from +130 s)
ok github.com/carlosframework/platform/internal/edge 200.102s
=== internal_edge@3 (163 s, from +130 s)
ok github.com/carlosframework/platform/internal/edge 159.737s
=== internal_edge@4 (165 s, from +130 s)
ok github.com/carlosframework/platform/internal/edge 161.796s
=== internal_edge@5 (220 s, from +130 s)
ok github.com/carlosframework/platform/internal/edge 215.943s
=== internal_edge@6 (197 s, from +130 s)
ok github.com/carlosframework/platform/internal/edge 193.217s
=== internal_edge@7 (218 s, from +130 s)
ok github.com/carlosframework/platform/internal/edge 213.961s
=== internal_edge@8 (232 s, from +130 s)
ok github.com/carlosframework/platform/internal/edge 228.602s
=== internal_edge@9 (265 s, from +130 s)
ok github.com/carlosframework/platform/internal/edge 261.844s
=== internal_edge@10 (242 s, from +130 s)
ok github.com/carlosframework/platform/internal/edge 238.106s
=== internal_edge@11 (289 s, from +130 s)
ok github.com/carlosframework/platform/internal/edge 284.823s
=== internal_edge@12 (241 s, from +131 s)
ok github.com/carlosframework/platform/internal/edge 238.618s
=== internal_edge@13 (258 s, from +131 s)
ok github.com/carlosframework/platform/internal/edge 254.960s
=== internal_edge@14 (161 s, from +131 s)
ok github.com/carlosframework/platform/internal/edge 158.526s
=== internal_edge@15 (250 s, from +131 s)
ok github.com/carlosframework/platform/internal/edge 247.769s
=== internal_host@0 (14 s, from +190 s)
ok github.com/carlosframework/platform/internal/host 10.824s
=== internal_host@1 (9 s, from +190 s)
ok github.com/carlosframework/platform/internal/host 5.421s
=== lists: internal_edge 130 s, internal_activator 110 s, internal_host 189 s, internal_rootaws 33 s, internal_systemd 13 s
=== cpu: the gate used 7610 cpu-seconds in 514 s, about 14.8 of 32 cores; the machine as a whole was 46% busy
=== gitleaks ===
go version go1.26.10 linux/arm64
go: downloading github.com/zricethezav/gitleaks/v8 v8.30.1
go: downloading github.com/spf13/viper v1.19.0
go: downloading github.com/rs/zerolog v1.33.0
go: downloading github.com/spf13/cobra v1.9.1
go: downloading github.com/Masterminds/sprig/v3 v3.3.0
go: downloading github.com/BobuSumisu/aho-corasick v1.0.3
go: downloading github.com/charmbracelet/lipgloss v0.5.0
go: downloading github.com/gitleaks/go-gitdiff v0.9.1
go: downloading github.com/fatih/semgroup v1.2.0
go: downloading github.com/mholt/archives v0.1.2
go: downloading github.com/h2non/filetype v1.1.3
go: downloading golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa
go: downloading github.com/hashicorp/go-version v1.7.0
go: downloading github.com/mattn/go-colorable v0.1.14
go: downloading github.com/fsnotify/fsnotify v1.8.0
go: downloading github.com/spf13/afero v1.12.0
go: downloading github.com/subosito/gotenv v1.6.0
go: downloading github.com/mitchellh/mapstructure v1.5.0
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading github.com/spf13/pflag v1.0.6
go: downloading github.com/magiconair/properties v1.8.9
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading gopkg.in/ini.v1 v1.67.0
go: downloading github.com/sagikazarmark/slog-shim v0.1.0
go: downloading github.com/pelletier/go-toml/v2 v2.2.3
go: downloading github.com/spf13/cast v1.7.1
go: downloading golang.org/x/crypto v0.35.0
go: downloading github.com/Masterminds/semver/v3 v3.3.0
go: downloading dario.cat/mergo v1.0.1
go: downloading github.com/huandu/xstrings v1.5.0
go: downloading github.com/mitchellh/copystructure v1.2.0
go: downloading github.com/shopspring/decimal v1.4.0
go: downloading github.com/Masterminds/goutils v1.1.1
go: downloading golang.org/x/sys v0.30.0
go: downloading golang.org/x/text v0.22.0
go: downloading github.com/mitchellh/reflectwalk v1.0.2
go: downloading github.com/muesli/termenv v0.15.1
go: downloading github.com/muesli/reflow v0.2.1-0.20210115123740-9e1d0d53df68
go: downloading github.com/mattn/go-runewidth v0.0.14
go: downloading github.com/lucasb-eyer/go-colorful v1.2.0
go: downloading golang.org/x/sync v0.11.0
go: downloading github.com/rivo/uniseg v0.2.0
go: downloading github.com/ulikunitz/xz v0.5.12
go: downloading github.com/minio/minlz v1.0.0
go: downloading github.com/bodgit/sevenzip v1.6.0
go: downloading github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707
go: downloading github.com/klauspost/compress v1.17.11
go: downloading github.com/pierrec/lz4/v4 v4.1.21
go: downloading github.com/klauspost/pgzip v1.2.6
go: downloading github.com/STARRY-S/zip v0.2.1
go: downloading github.com/nwaples/rardecode/v2 v2.1.0
go: downloading github.com/therootcompany/xz v1.0.1
go: downloading github.com/sorairolake/lzip-go v0.3.5
go: downloading github.com/andybalholm/brotli v1.1.2-0.20250424173009-453214e765f3
go: downloading github.com/aymanbagabas/go-osc52/v2 v2.0.1
go: downloading github.com/bodgit/windows v1.0.1
go: downloading github.com/hashicorp/go-multierror v1.1.1
go: downloading go4.org v0.0.0-20230225012048-214862532bf5
go: downloading github.com/hashicorp/golang-lru/v2 v2.0.7
go: downloading github.com/bodgit/plumbing v1.3.0
go: downloading github.com/hashicorp/errwrap v1.1.0
self-test: reported source file: a key
self-test: reported source file: a 64-hex key
self-test: reported source file: a census-shaped entry
self-test: reported source file: a key marked gitleaks:allow
self-test: reported source file: a test's fake value outside tests
self-test: reported allowed file: another key beside its allowed value
self-test: reported a tracked file named gitleaks-gate-sentinel.env
self-test: reported 97 near misses of the names notscanned.go lists
self-test: skipped the 32 files notscanned.go lists
self-test: refused a notscanned.go entry git does not track
self-test: refused a config that does not parse
self-test: refused a config that does not exist
self-test: refused a missing gitleaks binary
self-test: 6 planted keys reported, 130 tracked files judged, 3 broken setups refused
gitleaks: scanned 11337 tracked files; 32 not scanned, by exact path (scripts/gitleaks-gate/notscanned.go)
gitleaks: clean
diff --git a/docs/superpowers/notes/census-proposal-alias-publish-precert-1293.md b/docs/superpowers/notes/census-proposal-alias-publish-precert-1293.md| new file mode 100644 |
| index 000000000..ccc8f6b14 |
| --- /dev/null |
| +++ b/docs/superpowers/notes/census-proposal-alias-publish-precert-1293.md |
| @@ -0,0 +1,29 @@ |
| +# Census approval: alias-publish-precert-1293 |
| + |
| +Ruling `census-ruling-alias-publish-precert-1293`. The independent reviewer approves or rejects every change below, 3 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26). |
| + |
| +| unit | change | read sites | what changed | |
| +|---|---|---|---| |
| +| `internal/edge/edge.go` `RunWithActivatorReady` | body | unchanged (5) | the edge process (carlos-edge.service, user carlos), not root: the pre-issuer start log now reads its zones from p.scope.Zones (the zones and accounts moved into the shared edge.DNS01Scope); no behaviour change, no read added, the existing 5 read sites unchanged. | |
| +| `internal/host/agent.go` `runAgent` | body | unchanged (8) | starts edgesFileLoop with one more argument, edgeAcmeDir(os.Getenv, peekAcmeCache(args)): the agent's own -acme-cache flag (already parsed for domainsLoop) or $CARLOS_DATA_DIR/acme; a string computed from the operator's command line and environment, no read. Same 8 read sites. | |
| +| `internal/host/edgesfile.go` `edgesFileWriteClaims` | sites | +registry:Account, +registry:Alias ×2 | the box agent (root) writing its own control/edges/<box>.json: an alias not yet stamped pointing is also published (marked dns_pointing false) when edge.DNS01Scope allows its name and account and domains.UsablePerHostCert finds a usable per-host certificate for it. New inputs: CARLOS_DNS01_ZONES and CARLOS_DNS01_ACCOUNTS from the agent environment (root-owned host.env, operator-only), and ident.AcmeDir, set once at arm by runAgent from edgeAcmeDir (the agent's own -acme-cache flag, else $CARLOS_DATA_DIR/acme, the same derivation the domains sweep uses); empty publishes nothing early. New read, via domains.UsablePerHostCert: <AcmeDir>/<alias> for an alias inside the operator scope only, where the name must pass validHostShape (lowercase DNS labels, so one file directly under acme/, no separators or dot segments); Lstat first and only a regular file under 64 KiB is opened (a symlink is not followed); the bytes are only parsed by tls.X509KeyPair and reduced to a boolean, never executed, followed or written. That directory is the edge cache (written by carlos-edge, user carlos) the agent already reads as root in domains hostCertExpiry; same read sites otherwise. | |
| + |
| +Envelopes re-pinned: `internal/domains`, `internal/edge`, `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/edge/edge.go` `RunWithActivatorReady`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-certwarm-wake;basis=registers the cert warm's nudge on OnReload and on the home map's new served-hosts wake (#386); nudge only sends on a buffered channel; no read added, same 5 sites;rev3=census-ruling-edge-roll-blip;basis=the :80/:443 (and dev) listeners are bound on the calling goroutine with net.Listen via listen()/listenAddr (same empty-address defaults as ListenAndServe) before the serve goroutines, which now call Serve/ServeTLS on them, and one log line names the bound addresses; no read added, same 5 sites;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): the inline home-map arming (newHomeMap, one boot Refresh, Store, run) moves unchanged into the new Edge.ArmHomeMap and is called here as e.ArmHomeMap(); same refresh, same timeout, same order. The reads are moved, none added.;rev3=census-ruling-agent-start-demo-1;basis=Logs the combined explicit wildcard parents through demoWildcardDomains; no new watcher or read loop.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: invoke the local admission Close before HTTP/HTTPS draining and door shutdown in both dev and normal listeners. Preserve merged main's startup behavior and its census basis; the same five read sites, no new reads.;rev3=census-ruling-stateless-replicas-3;basis=Task 1b: defer stopping and joining the edge's replica jobs at shutdown. Existing five direct read sites unchanged; no new reader or authority.;rev3=census-ruling-region-ha-p3b;basis=Wrap dev, HTTP and HTTPS listeners through ConfigureGroupHairpin before serving. Indirectly read protected root boot identity and group-ingress.json; kernel local/peer addresses mark local ingress, never HTTP headers. Agent edge uses verified public source for accounting; direct read sites unchanged and absent marker keeps original listeners. CI fix removes interface enumeration: local peer must match snapshot primary IPv4, an ingress IPv4 installed locally by root, or loopback; kernel destination must still be an ingress EIP on port 80/443. Merge 45cebde4 retains deferred stopReplicaProbes alongside group listener wrapping and shutdown admission closure.;rev3=census-ruling-demo-api-site-route;basis=Change the startup failure context from load routes to initialize because origin validation now runs during construction. Existing five read sites unchanged; no new read or runtime authority.;rev3=census-ruling-region-ha-graceful-terminate-t2;basis=Invoke the agent shutdown timestamp hook synchronously at SIGTERM/SIGINT receipt before closing admission in dev and TLS paths. No read added.;rev3=census-ruling-region-ha-held-build;basis=region HA held-requests Task 5: registers the https and http servers with the connection drain (conns.serve) so a drain can close idle keep-alive connections; no read added;rev3=census-ruling-warm-set-published-724;basis=#724: the inline cert warm construction (newCertWarm over warmSet and dnsGate, then OnReload and setServedWake registering warm.nudge) moves unchanged into the new Edge.newIssuerWarm in certwarm.go and is called here with the same apps domain, parents, perHostCert, warmResolver, edgeIPs and store; the loop still starts here. The warm set it wires now reads the published edges files through the home map (OwnServedHosts and ServedHosts, both already polled) instead of the local route table, regional names aside. It is a different source, not a subset: an attached name not yet published as pointing is no longer listed, while a name the route table has already dropped stays listed until this box's next edges file write and the home map's next poll catch up (HostPolicy still refuses an order for a name the registry no longer holds). A name published not pointing is not a warm candidate at all, whether or not its certificate is cached: the warm neither looks it up, orders it nor re-arms its renewal until its home box publishes it pointing again (a cached certificate keeps serving and re-arms on a handshake at the issuer). The warm reads the set only after the issuer gate, and the read is in memory (route table and the home map's last snapshot); it also drops a DNS-miss entry for a name that has left the set before probing it. It keeps a failure record while any box publishes the exact name (the home map DeployedHosts: every box's file, own included, pointing or not, the same in-memory snapshot) or the name is a regional route-table name, and prunes it only once no box publishes it. That retention set has no apps-domain or wildcard filter (those stay on candidacy only), so a name published not pointing, or one a wildcard parent starts covering, keeps the record that explains its backoff; the set is never a source of candidates. No read site added in this unit, same 5 sites.;rev3=census-ruling-w6-ingress-drain;basis=the two public servers are built by e.publicServers (internal/edge/ingressdrain.go): :443 as before (same handler, TLS config and ReadHeaderTimeout 10 s), :80 now wrapped by plainTracked so the ingress drain can count and close its requests (its barrier is never §25's); Serve's error test is listenerFailed(err) = err != nil && !errors.Is(err, http.ErrServerClosed) (was err != ErrServerClosed), so a graceful Shutdown by the drain is not fatal. New Edge.plain connDrain field. Same flags, addresses and listeners; read sites unchanged (5); no read added.;rev3=census-ruling-edge-ppv2;basis=Edge process (uid carlos), not root. Edge gains the proxy atomic.Pointer. Outside dev mode, before either public listener binds and before the ready hook hands the Edge to the agent, calls e.loadProxyIngress(os.Getenv, dataDir): CARLOS_INGRESS_PROXY_SOURCES from the edge's own environment (carlos-edge.service loads the root-owned 0600 host.env) through hostenv.ParseProxySources; blank leaves the edge unarmed with nothing read; a non-empty list arms it and Lstats <dataDir>/edge/trust-barrier (armProxyIngress); a value that does not parse is log.Fatal. After the hairpin configuration, wrapProxyIngress wraps both public listeners outermost (returns them untouched when unarmed); when armed it logs the armed line and starts runProxyJournal (counters to the journal, no reads). The existing 5 read sites are unchanged.;rev3=census-ruling-audit-request-path;basis=the dev-mode http.Server gains IdleTimeout: publicIdleTimeout (120 s) beside its ReadHeaderTimeout; comment updated. Same 5 read sites, no read added.;rev3=census-ruling-precert-dns01-1293;basis=the edge process (carlos-edge.service, user carlos), not root: after the cert warm starts, calls e.newPreIssuerFromEnv(certCache, mirror, wm) and, when it returns non-nil, starts its loop and logs one line. newPreIssuerFromEnv (precert.go) reads CARLOS_DNS01_ZONES and CARLOS_DNS01_ACCOUNTS from the edge environment (the root-owned host.env); either unset or invalid = nil, nothing else read. Only claims of the named accounts qualify. Armed, the loop runs only while this box holds the issuer gate: it lists domains/ claims in the deployment bucket through a ClaimCache, and for proven claims under the listed zones orders a certificate over DNS-01 through the existing DNS provider seam (dnsProviderFromEnv, same IAM-scoped _acme-challenge TXT writes the wildcard manager already makes), writing the result through the existing publishing cache (local acme dir + control/certs/<host>). No root read; the existing 5 read sites are unchanged. |
| +- `internal/host/agent.go` `runAgent`: authority, task B,C,D,F. Basis: rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): builds the box's lifetime judge once (newBoxJudge, nil with host claims on) and hands it to the seed placement, the moves and runs workers and every loop it starts; read sites unchanged, offsets moved; B,C,D,F authority retained; self-serve moves 1 Task 8: derives the box's lifetimes switch from the judge once (lifetimes := boxJudge != nil) and hands it to the edges file loop; read sites unchanged, offsets moved;rev3=census-ruling-plans-4d-lapse;basis=arms two more plans hooks from the same snapshot: e.SetPlanDisabledFor(planDisabledFor) beside SetPlanGovernedFor, and svc.SetDisabledFor(planDisabledRoute) beside SetMaxRunFor (plans 4d); the reads live in those units (plans-4d-units decision); read sites unchanged, offsets moved;rev3=census-ruling-rootfs-apps-2;basis=main's body as of the merge of origin/main 9b81d97b (with main's plan rate ceiling, edge request records, regional box names, self-serve moves plan 1, plans 4d-1 lapse and its other later changes under main's own census rulings) plus the rootfs placement wiring in the activator start: an agentRootfs built from eb.NestedOK, CARLOS_DEPLOYMENT_SINGLE_TENANT, CARLOS_POOLS, the claim flag, swapArming's answer, the control client's /ready/rootfs and, on a fleet box whose identity resolved, fleetOwnerCheck over the deploy store main already opens for the fleet label (fleetStore), then arm and armedRootfs.Store; this body reads nothing new itself; the closures it wires read later, at a rootfs wake and each status tick: GET /ready/rootfs over the control socket, NestedOK's checks, and release.FleetOwnerKey for the judged row's own account and this box's fleet from the deploy store;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Tasks 7 and 11, #329 plan 3 Task 7 and plan 1 Task 7's policy cache: the control client is built once and handed to eb.Control, to the status tick (egressStatus) and to a new egressNudgeLoop goroutine; armSizeSource(svc, "/sys/fs/cgroup") after the activator Service; armPolicyCache() after armChangeIndex; statusLoop takes egressStatus. The reads are those units' own (decision rows); this body reads nothing new: the same five sites, offsets moved, in the agent; B,C,D,F authority retained.;rev3=census-ruling-remote-instance-metrics;basis=builds the metrics loop's owners closure (metricsOwners over the agent's registry, the activator and cgm.Leftover) when an activator exists and hands it to metricsLoop; reads nothing new itself;rev3=census-ruling-edge-asset-cache-3;basis=adds file:Statfs. runAgent keeps its authority (B,C,D,F). The new site is assetcache.Statfs, an exported assetcache.FS interface value (var Statfs FS = statfsFS{}), not a function value and not a call in runAgent: the ready hook passes it to armEdgeAssetCache as the store's filesystem, and armEdgeAssetCache calls its Space method on the configured data directory (dataDir(): $CARLOS_DATA_DIR, else /data), which calls unix.Statfs there (statfsFS.Space, accepted legacy at census-ruling-edge-asset-cache-2). No request-supplied pathname reaches it.;rev3=census-ruling-remote-metrics-nested;basis=main's body (merged origin/main acfa4f80, under main's own census rulings) plus: snapshots the nested layout (snapshotNestedUnits over /sys/fs/cgroup/carlos.slice/carlos-instances.slice) once at start, before the activator, and hands the metrics loop a unitSources struct (stamped units, routeHostNames, that root and the snapshot); reads nothing new itself;rev3=census-ruling-region-ha-p1a;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): wires region HA P1a into the activator: cfg.Record = haRecordFacts(openDeployStore, boxJudge) (the box's lifetime judge this body already builds with newBoxJudge, nil with host claims on; CI fix) and cfg.Self = lease.CurrentSelf; eb.Lifetimes (the process's lifetime index), eb.Registry, eb.StartupSwept (seedSweptAtStart.Load), eb.FilesStore from newProductionFilesStore (now lease.NewFilesStore, rootaws-loaded, a log line on failure) and lease.SetObligationDir(<data>/.ha-owed) (logged on failure; HA acquires then refuse); this body reads nothing new itself, the same five sites; the reads are those units' own (haRecordFacts and lease's SetObligationDir are new rows on this card); merge of origin/main d7ae1d76: main's own later changes to this body are kept as main has them, under main's rulings (census-ruling-remote-instance-metrics: the metricsOwners closure for metricsLoop; census-ruling-edge-asset-cache-3: the +file:Statfs site, assetcache.Statfs handed to the asset ready hook); this branch's change is the same as above;rev3=census-ruling-region-ha-p1b1;basis=region HA P1b-1: builds one termfence.Confirmer (Self from lease.CurrentSelf at each call, EC2 DescribeInstances method only, client from rootaws.LoadDefaultConfig with retries off, built lazily on first use) and sets eb.OwnerTerminated; this body reads nothing new itself, the same six sites;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 7: the startup Sweep literal hands its answer to startupSwept, which logs as before and, only on a clean sweep, marks rootfs admission swept (MarkRootfsSwept); same Sweep call, no read added;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (controller ruling after branch review R1, and Paul's R2 ruling): sets svc.Fleet = fleetWakeFor(os.Getenv, identity, identErr, fleetStore) from the identity it already resolves once and the deployment store the fleet loops already opened, and logs an ERROR naming the identity error when the box is on a fleet with an invalid identity. fleetWakeFor reads CARLOS_REGION and CARLOS_FLEET from the same environment. Read sites unchanged (6). Agent, not root; a platform box is unchanged.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 12: one call more beside armRunsPass, armInteractivePass(svc, reg, rolloutSink, boxJudge), in the same activator Configure hook, handing it the same box judge; fix round 1 (Astra P2, shutdown): after svc.Shutdown(ctx), shutdownInteractive(ctx) ends and joins every interactive session under the same shutdown budget; the worker's own reads are its units' (interactive.go); this body reads nothing new, the same six sites; merge of origin/main 6f1f6ca6: main's svc.Fleet = fleetWakeFor(...) and its invalid-identity ERROR line are kept as main has them (census-ruling-managed-fleets-1b); this branch's change is the same as above; read sites unchanged (6);rev3=census-ruling-fix-set-aside-exdev;basis=set-aside EXDEV fix: one field more on the agent ExecBackend literal, RawInstanceDir: layout.RawInstanceDir (a pure path join: <dataDir>/.instances/<InstanceID(host)>), so the start rule set-aside moves a copy out through the raw directory instead of through the nosymfollow bind; this body reads nothing new, the same six sites;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 3: one more assignment beside eb.FilesStore: eb.EscrowKey = haEscrowKey(os.Getenv("CARLOS_SECRETS_KEY")), the agent's own environment parsed by appconfig.ParsePrivateKey as the moves pass parses it (unset or unparseable: a log line and nil, and HA publication refuses on the box). No path is opened or read, no read site added; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 4: one more goroutine beside configSyncLoop: go escrowLoop(agentCtx, reg, svc), the escrow sweep every 30 s over the same registry and Service. This body reads nothing new itself; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 5: one more call beside eb.EscrowKey: wireRawSecretPages(eb, PageOperator, metricsBoxLabel(os.Getenv, readMachineID())), which sets eb.OnRawSecret to page an operator (alerting.Page through PageOperator, LevelIncident) on its own goroutine with a 20 s timeout; metricsBoxLabel and readMachineID are the reads this body already makes for the moves refusal log; no new read site; the same six sites, offsets moved; B,C,D,F authority retained. Merge of origin/main 90c4d3aa: main's own later changes to this body are kept as main has them, under main's rulings; this branch's change is the same as above. Merge of origin/main 00bf5b8c (fleet set-aside EXDEV fix): main's change to this body is kept as main has it, under its own census ruling; this branch's change is unchanged.;rev3=census-ruling-probe-burst-limit;basis=two more sink wirings beside setAnalyticsSink: setProtectionSink(e.SetProtectionRecordOnly) and setAssetOwnersSource(e.AssetOwners), function values the telemetry pass calls; this body reads nothing new, the same six sites; authority B,C,D,F retained; no new root read or write kind;rev3=census-ruling-region-ha-p1b3a;basis=Arm HA placement exactly once on the existing Service before activatorStart and edges publication, wiring AwakeApps and the PageOperator callback; existing six read sites unchanged, no new root authority.;rev3=census-ruling-stateless-replicas-1;basis=Final review I3: start the concrete coordinator's renewal worker with agent setup; existing closeReplicaCoordinator shutdown cancels and joins it before release. No new read sites or credentials. Merge origin/main c59715e7: retain main's armHAPlacement(svc, PageOperator) wiring beside the existing activator setup; stateless coordinator and shutdown wiring remain. Same read sites; no new root read or credential.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): in the edge-ready callback, calls act.SetHeldWakeHook(e.HeldWake) when act is non-nil (installing the non-blocking wake callback) and stores e.HeldStreamsForStatus in heldStreamsSource. Wiring of in-memory callbacks only; no read added.;rev3=census-ruling-region-ha-p1b3b-t;basis=Wire Service.SetDutyView to the live edge DutySnapshot in the ready callback. No new read; no new loop or cloud operation. B2 wires the registry as the persistent DutyStore before service startup; no new cloud or filesystem path. B3b: arm one journal-backed termination consumer before service startup using agentCtx and the shared confirmer; expose edge tick and join at edge shutdown. No new direct read sites.;rev3=census-ruling-agent-start-demo-1;basis=Passes the existing registry, data store and hibernation prefix into the demo worker, and the existing instance-control client into the demo before-exec hook. No alternate data store or polling loop. Merge resolution against origin/main 9bd45488 retains main's HA departure controller, lifecycle and duty wiring alongside the demo data store and worker; no read site added by the resolution.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: install closed fixed admission before every launch source, bind activator/backend and edge, wire the real termination Started lifecycle and role reader after the change index; close before cancellation/child shutdown. No new external reads or cloud authority. Fix R1: move bind/lifecycle/edge-option wiring into wireAgentAdmission and worker listing into runWorkerBootPassAfterAdmission. Worker boot waits for admission before listing then uses unchanged bounded wakes and per-host serialization; whole Route read moves to the helper. No new storage, cloud, or root execution authority. Preserve merged main's agent wiring and census basis; the branch removes one whole Route use by moving worker iteration to the helper, with no added read kind.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: arms a fleet-only worker using the existing registry, activator, backend and authenticated console transport. Owned worker stops and joins at shutdown. No new bucket reader. merge of origin/main 9b8b2c50: retain HA duty/departure lifecycle, wake-slot and existing agent wiring alongside the replica placement worker; no new read introduced by resolution. merge of origin/main 6be08467: Retain main demo configuration, admission, build and expiry wiring alongside the replica worker; merge-only body change, no additional read. merge of origin/main 7920cccf: Retain main box-role/group admission wiring and boot publication beside the owned replica worker and shutdown; main moves the boot registry List into runWorkerBootPassAfterAdmission, removing its inline whole Route site. No new read introduced by conflict resolution.;rev3=census-ruling-stateless-replicas-3;basis=Task 1 fix round 1 M3: retain the private snapshot source and cancel/join ownership, but use the replica-health-specific retry loop. It logs its first failure only and retains the existing exponential backoff capped at 30 seconds; unsupported builds return nil. Existing five direct read sites unchanged; no new credentials, bucket reader or app lifecycle action. Fix round 1 Q20: publish Edge.ReplicaSnapshots as a separate in-memory status source, leaving the tenant-visible Upstreams source unchanged. No new external reader or authority.;rev3=census-ruling-region-ha-p3b;basis=Load root-written group marker/configuration, configure signed boot binding and agent receipt completer, wire cancellable admission into departure work and expose cached GroupReaderSnapshot. New indirect boot reads use protected root files; agent-owned receipt controls duplicate initial completion only, never root restart permission. Same five direct sites. Merge 45cebde4 retains the replica health socket lifecycle and setReplicaSource beside GroupReaderSnapshot; no extra read beyond main.;rev3=census-ruling-agent-start-demo-2;basis=agent.go:309-329 opens demo-traffic.db beside the operator-configured registry when a demo domain exists, closes it at shutdown and wires drain-before-purge; :1010-1019 shares the worker and write gate; :1164-1177 installs the fleet identity and closed-until-worker serving callback. One added whole Route pass; the new indirect filesystem/SQL reads are claimed in openDemoTraffic and worker/store units. No request chooses the database pathname.;rev3=census-ruling-region-ha-p1b3b-s;basis=Wire the service duty view to authoritative cached sidecar manifest placement in LifetimeIndex and the edge sidecar projection; missing policy denies duty. Existing instance duty wiring remains.;rev3=census-ruling-region-ha-g2-t3;basis=T3a: wire eb.Page = PageOperator beside OwnerTerminated before departures arm, so suspect-holder pages work if departure setup fails; no new read; existing nine sites and authority unchanged; pages through the existing sink. T3b: publish the same backend through an atomic pointer for the metrics observer, and clear it on return; no new external read or authority.;rev3=census-ruling-agent-start-demo-3;basis=Wire the claim activator and root snapshot client into the demo worker; pass moved readiness to status reporting. Census read-site delta: unchanged (9).;rev3=census-ruling-region-ha-g2-fixes;basis=Wire local pool evidence, live withdrawal activator, startup ingress scan and alias publication, and edge lookup; no new direct sites; new indirect record/claim reads use existing store/judge paths described in ingress helpers.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3: starts the existing record-view backstop loop with a departure-inventory listener (non-blocking, coalesced signal) even without an armed RecordView; it requests the existing full pass (backstopFullDue) there. Same nine read sites; no new read or authority.;rev3=census-ruling-region-ha-graceful-terminate-t2;basis=Derive one signal-time deadline with a 90-second budget; cap departure stop and startup/seed/service shutdown joins by it. No read added.;rev3=census-ruling-static-sweep-periodic;basis=in the edge-ready callback, publishes e.LargestStaticTree in staticTreeSource for the disk alert line (diskAlertFrac in the metrics loop); in-memory wiring only, no read added; read sites unchanged (9);rev3=census-ruling-edge-page-cache-1;basis=wires the exec backend's CurrentInputs into the edge cache (wireCurrentInputs) and, in the ready hook after armEdgeAssetCache (whose returned store it now keeps), calls armEdgePageCache, which does nothing unless CARLOS_PAGE_CACHE=1; read sites unchanged (9); no read added;rev3=census-ruling-gvisor-demos;basis=Capture sandbox resolution and refusal once; log errors once; gate route admission and BeforeExec before process launch. No new root read. Task 5: pass the once-captured sandbox effective mode/config error into ExecBackend, UnitBackend and the immutable Client expectation. Same startup environment/registry reads; swapArming declines gVisor before placement. Task 8: arm read-only status projection with the existing Client.SandboxStatus callback. Agent status now queries the existing root /ready endpoint; no new root authority or guest-file input. Merge2 e8a1ddde: retain main wireCurrentInputs and armEdgePageCache through the existing asset-store ready hook alongside branch once-captured sandbox mode, wake gates and root status wiring. No new direct read; main page-cache helpers retain their own census overlays.;rev3=census-ruling-region-ha-held-build;basis=wires the drain state: svc.SetDrainingSource(boxDrain.IsDraining), svc.SetPeerDrainView(e.PeerDraining), e.SetPeerDrainedHook(svc.DropHoldersNaming); in-memory only; no read added; region HA held-requests Task 5: on group members, starts the drain driver over the activator, the edge and boxDrain, and serves its root-only drain socket; no read added beyond the socket's own Branch review r1: the drain state follows the root start fence on group members (the fence reader is the existing fenceLocation.read, a root-owned fixed path); e.SetPeerUndrainedHook(svc.AllowHoldersNaming) beside the drained hook (memory only); the drain socket serves only the agent's own user. No read added.;rev3=census-ruling-security-review-mitigations;basis=Wire the cached operator flat-layout choice into the exec backend's new-resident refusal; no read source added, existing authority retained.;rev3=census-ruling-w6-ingress-drain;basis=agent (user carlos), not root. Builds the ingress drain (newIngressDrain) with arming read at ask time from os.Getenv (CARLOS_REGION_HA, CARLOS_INGRESS_TARGET_GROUPS, both from the root-owned host.env), the fixed admission and lease.CurrentSelf (existing IMDS identity); its reader is awstg.Load, the box role's credentials calling ELB DescribeTargetHealth/DescribeTargetGroupAttributes (new AWS reads, by the agent). Wires admission.closeStartsForIngressDrain, the lbhealth drain condition, ingress.setEdge, and ingress.shutdownStarted in WithShutdownStarted. The drain socket (/run/carlos/.ha-drain/drain.sock, agent-user only, existing) is now also served on a fixed box with the drain configured (was group members only), routing /v1/ingress/* to the ingress drain and the group drain verbs to 404 there. armHADepartures now takes fixtureDepartureGetenv() and MakeQueue fixtureDepartureQueue(), which in a production (non-rootrunner) build are os.Getenv and nil, as before. Read sites unchanged (9).;rev3=census-ruling-stateless-replicas-4-task1;basis=Arms the fleet-only replica swap worker next to the placement worker: same console URL and fleet token as the existing replicaCoordinatorAPI, the existing activator Service; stops and joins at shutdown. No new read site, credential or bucket reader.;rev3=census-ruling-stateless-replicas-4-task2;basis=Task 2: sets deployWorker.step to the rollout scheduler answer for the record permit (replicaStepOf over armedRollout), an in-memory callback; no read site, credential or bucket reader added.;rev3=census-ruling-stateless-replicas-4-task2-fix2;basis=Task 2 fix round 2: the swap worker step is armedReplicaStep, the same lazy scheduler lookup as before as a named function; no read site added.;rev3=census-ruling-stateless-replicas-4-merge-main;basis=Merge of main 5fac2ff1: both sides changed it. Main (01d6ca78, linked-deployments-slice1) starts linkLoop beside tunnelLoop; this branch keeps its replica coordinator wiring. Both kept as-is; no read added.;rev3=census-ruling-stateless-replicas-4-final;basis=#511 final wave item 2: wires the swap worker's drive (armedReplicaDrive, the armed rollout manager's DriveReplicaRelease); no read added;rev3=census-ruling-stateless-replicas-4-merge-main2;basis=Merge of main af871da0 (v0.34.49): both sides changed it. Main (178dcfe5, member-backups-2a) moves the inline duty-view closure into armDutyView/dutyView and starts verifyAssignLoop; its sites drop by registry:Host and whole:Route x2 as main recorded them. This branch keeps its replica coordinator, swap worker and drive wiring. Both kept as-is; no read added.;rev3=census-ruling-stateless-replicas-4-drill3;basis=drill 3 R24: makes one in-memory channel, closes it (once) inside the edge's existing shutdown-started callback after ingress.shutdownStarted, and passes it to tunnelLoop, which drains only a fleet channel name; no read added, same six sites; touches no admission, lease, ingress drain, listener or file; the agent process, no root decision;rev3=census-ruling-edge-ppv2;basis=Agent (uid carlos), not root. memwatchLoop now gets edgeProxyCounters(&demoEdge) (in-process counters, no read). The drain socket's driver is newAgentDrainSocket(ingress, e, os.Getenv), which attaches the edge trust handler only when CARLOS_INGRESS_PROXY_SOURCES in the agent's environment (from the root-owned host.env) parses to a non-empty list; the socket is served when drainSocketServed: a group member or a configured ingress drain (both as before), or a box armed for PROXY protocol (new). The socket's path and agent-user-only permissions are unchanged. Read sites unchanged (6).;rev3=census-ruling-same-box-edge-fence;basis=Agent (uid carlos), not root. One added line: armEdgeFenceStatus(ctl.EdgeFence), beside the existing armExecSandboxStatus, so the layout report can ask root's /ready for the edge fence state over the control socket client the agent already holds. No read added.;rev3=census-ruling-platform-mail-submission;basis=Task 4: sets eb.Mail = mailsubmit.SocketForwarder{} on every box, and eb.MailSwitch to a mailSwitchCache's On that opens the deploy store itself through openDeployStore, retried at most once a minute with an error line until it opens (review round 1, Task 4 P3), armed for the serial-move refresh (armedMailSwitch). Task 6: also sets the ExecBackend's ManifestOf, the same staged-manifest read as TierOf (rt.App and RouteAccount(rt), hence +registry:App and +whole:Route), for the spawn-time check of decision 10, which logs and emits an event and never refuses. Agent, not root. Fable final P2-2: eb.MailSwitch is the cache's State (three-valued: on, off, unknown) in place of On; an unreadable switch is unknown, never off. No read added.;rev3=census-ruling-fleet-drain-followups;basis=P3 (#1008 T9): one call after armChangeIndex, requestBootFullPass(v, &backstopFullDue), which stores true in the existing in-memory backstopFullDue flag only when no record view is armed, so the fast loop runs its existing full pass on its first tick instead of instancesLoop a minute later; armed boxes unchanged. No read added; read sites unchanged (8); agent, not root.;rev3=census-ruling-fleet-first-reconcile-speed;basis=Startup timing log lines only: runDuties builds a step logger (newStartupLog, which reads the in-memory agent start time) and logs one line after the wait on the activator startup latch and after each existing duty before go fastConvergeLoop. One newStartupLog().at line in the edge ready hook before go tunnelLoop. No read added; read sites unchanged (8). Agent, not root.;rev3=census-ruling-ha-1192;basis=sets the group drain driver's departed hook to armedPeerDeparted (the armed departure controller's PeerDeparted: local registry identity + departure journal); no new read;rev3=census-ruling-replica-wake-gap-r3;basis=Calls lease.SetContinuityDir(<data dir>/.continuity) beside the existing obligation store: the agent's own 0700 directory for clean records, outside every instance tree (#1290 round 3). No new read; failure is logged and every start then takes a full image.;rev3=census-ruling-fleet-restart-wake;basis=Fleet restart wake Task 2: cfg.ReplicaRecord = replicaRecordFacts(boxLifetimes, cfg.Record): hands the existing judged record read (haRecordFacts over openDeployStore and boxJudge) as the live read on a lifetime index miss. No read site added here; agent, not root. |
| +- `internal/host/edgesfile.go` `edgesFileWriteClaims`: authority, task F,J1. Basis: rev3=census-ruling-self-serve-moves-1;basis=root-route;kept=F;scope=protected-decision-only; the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): region-ha-2a's body, which with the box's lifetimes switch on also publishes each served row's lifetime pair (registry:Incarnation and registry:ServingSeq, two new sites on the rows it already lists) and an alias's or served catch-all's primary's pair, and names that primary as target_host whatever the switch; a report the edge orders unstamped entries by, not a decision; no record, /data, release or claim read added; F,J1 authority retained; self-serve moves 1 Task 8;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Task 8: takes a localAddrs reader (instancectl.LocalAddresses in production, which reads /proc/net/fib_trie and /proc/net/if_inet6 in the agent) and publishes its non-loopback entries as the edges file's addrs before the write gate (boxAddrs, no read of its own), so an address change writes once. The same 44 sites, offsets moved; no record, /data, release or claim read added; a report the console's egress grant check reads, not a root decision; F,J1 authority retained.;rev3=census-ruling-edge-asset-cache-3;basis=starts with assets = assets.active(), so a policy whose box has not opened its asset store publishes no assets blocks and reads no manifests, and copies the decision's Primary (the route host the block was decided for, drift D4) into the published assets block; read sites unchanged (44); no read added. Merged onto main's #328 body, which takes the localAddrs reader: the assets.active() line sits after that signature and the loop passes pub and instancectl.LocalAddresses;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: the claims argument (*edgesClaims) becomes addrs (AddressSource) and the applyEdgesClaims(ctx, claims, routes, hosts) call is deleted with edgesclaims.go, which is the one whole:Route site removed: no host claim is read and every served row publishes as with region HA off; the box-address publication is the same code reading addrs.BoxAddresses() instead of claims.addrs; a report the edge reads, not a root decision; no read added; merge of origin/main d7ae1d76: main's edge asset cache plan 3 body is kept (census-ruling-edge-asset-cache-3): the first line is assets = assets.active(), so a policy whose store has not opened publishes no assets blocks and reads no manifests, and edgesFileLoop passes pub (assets.active() for that tick) in the assets argument; main's claims *edgesClaims argument is this branch's addrs AddressSource, and no edgesClaims, applyEdgesClaims or hostclaim reference remains;rev3=census-ruling-alias-wake-338;basis=#338 follow-up: skips publishing a platform alias edge.PlatformAliasFold refuses (and so anything attached to it); reads the same route listing;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 6 and its fix rounds: publishes by FleetArmVerdict (via fleetRefusedFor): withheld rows left out; a forward host's path rows left out of its owner; no assets for forward rows; the alias loop replays Reload's alias fold from the served rows so a chained alias carries its root primary's owner; certRefused and parentRefused leave out a refused claim's wildcard parent (+registry:Alias x5, +registry:Host x4, +whole:Route, +whole:RouteAlias x2, +whole:RoutePath x7, +whole:WildcardDomain). Rows already read in the pass; keeps authority F,J1; publishes less, never more.;rev3=census-ruling-probe-burst-limit;basis=sets the constant BurstNotices=true on the box's own edges file (this build's edge answers probe-burst notices, so peers may send them); not from config or any read; the same 65 sites; a report other edges read, not a root decision; F,J1 authority retained; no new root read or write kind;rev3=census-ruling-region-ha-p3a;basis=Publish one injected role snapshot with box_role/admitted/drained; retain legacy route and alias rows during booting, cutting namespace withdrawal under the 2026-11-04 ruling; acknowledge the exact published tuple only after PUT; existing registry reads unchanged.;rev3=census-ruling-region-ha-p2b;basis=region HA P2b-1 T0 (Q1 ruling): before building the comparison copy and the body, a nil NamedPools on the identity becomes []string{} so the additive named_pools field is always an explicit array; the list itself is computed once at arm by edgesFileEligibility from the same provisionTickConfig(os.Getenv) parse as serves_shared_pool (CARLOS_POOLS through provision.ParseBoxPools, filtered to nonempty provision.ValidPool names, sorted, unique). A report the console reads for create admission, not a root decision; no record, /data, release or claim read added; read sites unchanged (65); F,J1 authority retained. One-off cost: the first pass after the upgrade writes once per box (seeded gate null vs []).;rev3=census-ruling-region-ha-p3b;basis=Require cached GroupReadersReady before first group publication and append additive names-2 capability even for supplied identities. Agent writes the same edges object/index with existing registry reads; known readers come from root boot configuration, snapshot from existing fold, no added GET/LIST or root authority.;rev3=census-ruling-region-ha-g2-fixes;basis=Omit non-forward, non-platform-alias rows outside local served pools from home publication; added Host/Pool field reads and local configuration use, existing registry/store operations retained.;rev3=census-ruling-edge-page-cache-1;basis=prunes the manifest cache through the new atomic pointer (assets.manifests.Load().prune(...), nil-safe); nothing else changes; read sites unchanged (67); no read added;rev3=census-ruling-region-ha-held-build;basis=writes also when DrainPublishRequired, and reports the written drain state, its ha_drain mark (transaction and publication id) and generation to DrainSource (in-memory); the file gains ha_drained and ha_drain beside the existing draining; no read added. held-requests Task 4: sets the constant ha_take=1 on the box's own file when its in-memory capabilities include region-ha-1 (this build's edge answers take requests); not from config or any read; a report other edges read, not a root decision; no read added;rev3=census-ruling-warm-set-published-724;basis=#724: the agent as carlos: reads PLATFORM_APPS_DOMAIN from the environment once per pass (the variable domainsLoop already reads) and sets an additive dns_pointing mark on each published custom name through dnsPointingMark: true on a published alias (registry:Alias, already published only when its dns_status is pointing), and on a route with a hostname outside the apps domain whether its registry:DNSStatus is pointing (registry:Host, registry:DNSStatus on rows the pass already lists). No mark under the apps domain, on a wildcard row, or with no apps domain set. A report the issuer cert warm reads to leave a not-yet-pointing custom name out of its set, not a root decision; it publishes the same names as before. No record, /data, release or claim read added; no new registry query; F,J1 authority retained. One-off cost: the first pass after the upgrade writes once on a box homing a custom name.;rev3=census-ruling-held-floor-capability;basis=held floor capability (region HA §25.9, agent manager 8a3d302, 2026-11-10): sets the constant ha_handover=1 on the box's own edges file on every pass, whatever its capabilities (this build understands the held-requests headers and the drain acknowledgement); the group roll floor reads it. Not from config or any read; ha_take unchanged; a report other tools read, not a root decision; no read added; F,J1 authority retained. One-off cost: the first pass after the upgrade writes once per box.;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 3: fleetArmInputs now returns edge.ForwardOwners (this box's fleets table and its active links, registry LinkOwners, read only where tunnels are on), passed to edge.FleetArmVerdict as before, so the hub's eligible link-placed forward rows are published for backhaul like fleet rows; same listing and verdict, no read added in the unit;rev3=census-ruling-path-routes-across-boxes;basis=#186 spec 5.1: publishes route_account, route_app, path_front, path_target (registry.PathFront/PathTarget over the route row) on exact real route rows only (never a platform alias or a '*.' row); additive omitempty fields read from the registry route rows already loaded; adds reads of Route.Host and Route.App |
| + |
| +New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff: |
| + |
| +- new `internal/domains/certusable.go:UsablePerHostCert`: reads +file:Lstat, +file:Open, +file:ReadAll; written legacy, accepted-legacy, frozen |
| +- new `internal/host/acmedir.go:edgeAcmeDir`: reads +data-literal ×2; written legacy, accepted-legacy, frozen |
| +- quiet `internal/host/agent.go:domainsTickConfig`: reads nothing now; retired while it reads nothing (or its row keeps no sites) |
| + |
| +Seal: `841361b89e20c3763149e8784cdebb037dcc4b828b24196a01d3e300ff319661` → `c25a6eac6ece70098b052b6451deff684c29ff8cfcd24ba37625f01028dedf88`. |
| + |
| +Overlay: `internal/provision/testdata/plan14-root-reads-alias-publish-precert-1293.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`. |
diff --git a/docs/superpowers/reviews/alias-publish-precert-1293/CODEX-FINDINGS-R1.md b/docs/superpowers/reviews/alias-publish-precert-1293/CODEX-FINDINGS-R1.md| new file mode 100644 |
| index 000000000..512a46cbd |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/alias-publish-precert-1293/CODEX-FINDINGS-R1.md |
| @@ -0,0 +1,40 @@ |
| +Reviewed `75964a7c6b3039c14e3e82c1fb83490f66cbc172`, diff `origin/main...HEAD`, round 1. |
| + |
| +1. **P1 — Publishing the alias also enables uncapped handshake-driven ACME orders.** |
| + |
| + The new publication at [edgesfile.go:870](/home/paulca/amadan.net/carlos/platform-alias-publish-precert-1293/internal/host/edgesfile.go:870) makes `KnownHost` true regardless of `dns_pointing`. Consequently, `deploymentHost` and [issuerHostPolicyAt:207](/home/paulca/amadan.net/carlos/platform-alias-publish-precert-1293/internal/edge/certsync.go:207) authorize issuance. |
| + |
| + **Failure scenario:** a remote-home alias has its pre-issued ECDSA certificate and still points elsewhere. After publication settles, send an RSA-only ClientHello directly to the issuer. The issuer invokes autocert before the mirror fallback ([certsync.go:1607](/home/paulca/amadan.net/carlos/platform-alias-publish-precert-1293/internal/edge/certsync.go:1607)). Autocert selects the absent `<host>+rsa` entry and creates an order ([autocert.go:292](/home/paulca/go/pkg/mod/golang.org/x/crypto@v0.52.0/acme/autocert/autocert.go:292)). These attempts bypass the pre-issuer’s hourly cap and backoff; failed state becomes retryable after one minute. A missing ECDSA cache entry opens the same path. |
| + |
| + Ordinary ECDSA handshakes also arm autocert renewal timers. Those timers bypass HostPolicy and can order when DNS-01 renewal stops supplying fresh material. The false mark protects only the warm set. |
| + |
| + **Fix:** distinguish permission to relay and serve cached certificates from permission to order. Serve these aliases through a cache-only path until pointing, without newly arming autocert renewal timers. Add issuer-side regressions for RSA-only hellos, cache misses and renewal eligibility, asserting no additional ACME orders. |
| + |
| + **Fault family:** pre-DNS publication must not bypass issuance admission and rate bounds. |
| + |
| +2. **P2 — The expiry stamp does not establish that a usable certificate covers the alias.** |
| + |
| + The new gate trusts `CertExpiresAt > now`, but [hostCertExpiry:1208](/home/paulca/amadan.net/carlos/platform-alias-publish-precert-1293/internal/domains/reconcile.go:1208) selects files by name, and `certExpiry` returns the first certificate’s `NotAfter` without checking hostname coverage or a matching private key. It also counts a wildcard file without checking whether that parent remains active in the serving wildcard manager. |
| + |
| + **Failure scenario:** a misnamed or certificate-only PEM supplies a future stamp, or a removed wildcard configuration leaves its current PEM on disk. The alias publishes even though the serving chain cannot use that material. Remote TLS/backhaul can fail; on the issuer, finding 1 permits an attempted replacement order. Deleting material also leaves the previous stamp effective until a successful health pass and subsequent publication. |
| + |
| + **Fix:** derive publication readiness from validated, currently usable certificate material: matching hostname, private key and validity, plus active wildcard coverage where applicable. Add wrong-name, missing-key, inactive-wildcard and removal regressions. |
| + |
| + **Fault family:** certificate expiry metadata must not substitute for serving readiness. |
| + |
| +No P3 findings. |
| + |
| +The routing trace otherwise preserves alias resolution, refused-primary exclusions, route precedence, hub forwarding and owner checks. The timer eventually publishes expiry changes, but certificate stamping and publication each have a separate 5–6 minute cadence. Existing tests check writer output and home-map lookup; they do not exercise the complete TLS/backhaul path with a non-pointing alias. |
| + |
| +`git diff --check` and changed-file formatting checks passed. Targeted tests could not start because the read-only sandbox prevented Go from creating its work directory. No files were edited. |
| + |
| +The census verdicts address the root-read boundary; they do not clear the issuance findings. |
| + |
| +| Census item | Verdict | Lines read and basis | |
| +|---|---|---| |
| +| `edge.go:RunWithActivatorReady` | **APPROVE** | Lines 5065–5165, especially 5156–5158. Log field access changes; no new root read or weakened root check. | |
| +| `edgesfile.go:edgesFileWriteClaims` | **APPROVE** | Lines 645–908 and 1019–1070. Additional fields come from the existing alias listing; scope comes from operator configuration. No new tenant-selected root path, command or query. Retains `authority`, task `F,J1`. | |
| +| `internal/edge` envelope | **APPROVE** | `dns01scope.go` 1–49; changed parser, constructor and candidate functions in `precert.go` 118–272; startup change and changed tests. Shared authorization retains the account-and-zone intersection; no added privileged I/O. | |
| +| `internal/host` envelope | **APPROVE** | Writer changes and `edgesfile_precert_test.go` 1–141, including reached publication and asset-policy paths. Existing destination and primary/refusal checks remain; no new root read authority. | |
| + |
| +**NOT READY** |
| \ No newline at end of file |
diff --git a/docs/superpowers/reviews/alias-publish-precert-1293/CODEX-FINDINGS-R2-DELTA.md b/docs/superpowers/reviews/alias-publish-precert-1293/CODEX-FINDINGS-R2-DELTA.md| new file mode 100644 |
| index 000000000..3fab82d65 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/alias-publish-precert-1293/CODEX-FINDINGS-R2-DELTA.md |
| @@ -0,0 +1,20 @@ |
| +**R2 fix check at `ce92e0db`: both P2s resolved. No new P1 or P2 found in the delta.** This is not a new review round. |
| + |
| +- **P2 cache directory — resolved.** Startup passes the effective cache through `edgesFileLoop` to the writer. Tests cover configured-only certificates and stale default-only certificates (`agent.go:1156,4037–4059,4584`; `edgesfile.go:866–880,1313–1338`; `edgesfile_precert_test.go:218–277`). |
| +- **P2 regression coverage — resolved.** The composed mirror/autocert test exercises ECDSA, RSA-only hellos and cache misses, checks zero accounts/orders, and checks that the cached ECDSA entry never reaches autocert’s renewal-registering load. The backhaul test verifies the served certificate and home-app response (`alias_prepoint_e2e_test.go:20–104`). |
| + |
| +Census verdicts for the requested card at `ce92e0db`; unchanged R2 approvals carry forward. Paths below are under `internal/`. |
| + |
| +| Unit or envelope | Verdict | Lines read and basis | |
| +|---|---|---| |
| +| `runAgent` | **APPROVE** | `host/agent.go:1130–1159`: passes operator-derived cache configuration; retains `authority / B,C,D,F`. | |
| +| `edgesFileWriteClaims` | **APPROVE** | `host/edgesfile.go:649–918`: configured cache replaces the hardcoded default; scope, served-primary and ownership checks remain. Retains `authority / F,J1`. | |
| +| `edgeAcmeDir` — new | **APPROVE** | `host/agent.go:4037–4059`: operator flag/environment path computation; accepts `legacy / accepted-legacy`. | |
| +| `domainsTickConfig` — quiet | **APPROVE** | `host/agent.go:4089–4148`: path literals move to `edgeAcmeDir`; no remaining direct census read sites. Quiet retirement is appropriate. | |
| +| `UsablePerHostCert` | **APPROVE** | `domains/certusable.go:26–55`; `domains/claims.go:965–979`: hostname validation and bounded certificate parsing unchanged from R2; accepts `legacy / accepted-legacy`. | |
| +| `RunWithActivatorReady` | **APPROVE** | `edge/edge.go:5060–5165`: log-field change only; existing reads and startup authority unchanged. | |
| +| `internal/domains` envelope | **APPROVE** | `certusable.go:1–55`; `certusable_test.go:1–26`; validator above. No delta since R2. | |
| +| `internal/edge` envelope | **APPROVE** | `alias_prepoint_e2e_test.go:1–104`; reached `certsync.go:210–229,1603–1642`, `backhaul_e2e_test.go:409–449,532–591`. Delta adds tests only; production authority unchanged. | |
| +| `internal/host` envelope | **APPROVE** | Agent/writer ranges above; `edgesfile_precert_test.go:218–277`; `fleet_secrets_key_test.go:306–309`. Cache wiring preserves publication guards and adds no root authority. | |
| + |
| +`git diff --check` passed. Targeted tests could not start because the read-only sandbox denied Go’s work-directory creation. No files were edited. |
| \ No newline at end of file |
diff --git a/docs/superpowers/reviews/alias-publish-precert-1293/CODEX-FINDINGS-R2.md b/docs/superpowers/reviews/alias-publish-precert-1293/CODEX-FINDINGS-R2.md| new file mode 100644 |
| index 000000000..25375b87a |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/alias-publish-precert-1293/CODEX-FINDINGS-R2.md |
| @@ -0,0 +1,43 @@ |
| +R1 P1 — **Resolved:** remote, non-pointing aliases are refused before autocert’s cache load, order creation or renewal registration. |
| +R1 P2 — **Partly resolved:** certificate contents and removal are checked, but readiness can be checked against the wrong cache directory. |
| + |
| +No new P1 findings. |
| + |
| +1. **P2 — Publication ignores the configured certificate cache.** |
| + |
| + [edgesfile.go:863](/home/paulca/amadan.net/carlos/platform-alias-publish-precert-1293/internal/host/edgesfile.go:863) always derives `$CARLOS_DATA_DIR/acme`. The edge honors `-acme-cache`, and the domain sweep explicitly receives that override at [agent.go:4571](/home/paulca/amadan.net/carlos/platform-alias-publish-precert-1293/internal/host/agent.go:4571). |
| + |
| + **Failure scenario:** a usable pre-issued certificate exists only in the configured cache. Publication still withholds its alias, preserving the original post-switch delay. Conversely, a valid certificate left in the default directory can pass readiness even when neither the active cache nor mirror can serve it. |
| + |
| + **Fix:** pass the effective serving-cache directory to the writer. Test both a certificate present only in the configured directory and stale material present only in the default directory. |
| + |
| + **Fault family:** publication readiness must reflect the certificate material actually available for serving. |
| + |
| +2. **P2 — The issuer regression does not exercise the behavior it claims to prove.** |
| + |
| + [homemap_dnspointing_test.go:148](/home/paulca/amadan.net/carlos/platform-alias-publish-precert-1293/internal/edge/homemap_dnspointing_test.go:148) calls HostPolicy directly. It creates no ClientHello, autocert manager, certificate cache or ACME order counter. The adjacent relay test checks map lookup, without sending a request. |
| + |
| + **Failure scenario:** broken mirror fallback or TLS/backhaul wiring could leave these tests green while pre-issued aliases fail handshakes or requests. The requested RSA-only, cache-miss and renewal-registration regressions remain unverified. |
| + |
| + **Fix:** exercise the composed certificate path with cached ECDSA, RSA-only and missing-cache cases; assert zero orders and no autocert cache load for refused aliases. Add a remote-to-home request using the published false-marked alias and its pre-issued certificate. |
| + |
| + **Fault family:** tests must cover the issuance and serving boundary, beyond its policy predicate. |
| + |
| +No P3 findings. |
| + |
| +The readiness invariant has findings in both R1 and R2. Under stopping rule 2, the choices are an upfront refusal for unsupported cache configurations, cutting early publication, or enforcing one shared cache/readiness source with a guard test. I recommend the shared source. This round has no P1; do not reopen review after the P2 fixes, apart from the required census and newly changed security-behavior checks. |
| + |
| +Census verdicts for `69ec96c1057aa8ff9f393beb723cb4fb0404861b`: |
| + |
| +| Item | Verdict | Lines read and basis | |
| +|---|---|---| |
| +| `domains.UsablePerHostCert` | **APPROVE** | `certusable.go` 26–54; `claims.go` 970–979; `carlos-edge.service` 41–50. Hostname-constrained, bounded certificate parsing in the agent process; no added root execution or authority. Accept `legacy / accepted-legacy`. | |
| +| `edge.RunWithActivatorReady` | **APPROVE** | `edge.go` 5060–5165, especially 5156–5158. Log-field access changes; existing read sites and startup authority remain unchanged. | |
| +| `host.edgesFileWriteClaims` | **APPROVE** | `edgesfile.go` 646–919, 1010–1168; `agent.go` 1137–1156. Retains served-primary, refusal and ownership checks. Scoped certificate inspection affects publication, without granting root authority. Retains `authority / F,J1`. | |
| +| `internal/domains` envelope | **APPROVE** | `certusable.go` 1–55; `certusable_test.go` 1–26; reached hostname validator. No additional privileged operation. | |
| +| `internal/edge` envelope | **APPROVE** | `dns01scope.go` 1–49; `precert.go` 118–272; `certsync.go` 104–229; `homemap.go` 1031–1106, 1420–1438; startup and changed tests. Account-and-zone intersection remains; the new policy narrows issuance admission. | |
| +| `internal/host` envelope | **APPROVE** | Writer ranges above; `edgesfile_precert_test.go` 1–216; reached asset-policy and scheduling paths. Existing publication destination and authority checks remain. | |
| + |
| +`git diff --check` and changed-file formatting checks passed. Targeted tests could not start: Go attempted to update `go.mod`, which the read-only sandbox refused. No files were edited, no subagents were spawned, and no full suites ran. |
| + |
| +**READY AFTER FIXES** |
| \ No newline at end of file |
diff --git a/docs/superpowers/reviews/alias-publish-precert-1293/CODEX-REVIEW-BRIEF-R1.md b/docs/superpowers/reviews/alias-publish-precert-1293/CODEX-REVIEW-BRIEF-R1.md| new file mode 100644 |
| index 000000000..27b1dc986 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/alias-publish-precert-1293/CODEX-REVIEW-BRIEF-R1.md |
| @@ -0,0 +1,77 @@ |
| +# Review brief: branch alias-publish-precert-1293 (#1293 follow-up), round 1 of 3 |
| + |
| +Repo carlos/platform, branch `alias-publish-precert-1293`, commit named in the prompt. |
| +Under review: the diff `origin/main...HEAD`. |
| +Authorities on main: `internal/host/edgesfile.go` (the edges-file writer, |
| +its alias publication bounds), `internal/edge/homemap.go` and |
| +`internal/edgesfile/edgesfile.go` (readers and the dns_pointing mark), |
| +`internal/edge/certwarm.go` (the HTTP-01 warm set), `internal/edge/precert.go` |
| +(merged 042e1af: DNS-01 pre-issue, reviewed by you in |
| +`docs/superpowers/reviews/precert-dns01-1293/`), AGENTS.md ("Stopping |
| +rules", "The census"). |
| + |
| +## The problem |
| + |
| +Tito staging rehearsal of 042e1af: a fleet app's custom domain had its |
| +pre-issued certificate on every edge, but non-hub edges answered 503 |
| +"Almost ready" for 5 to 7 minutes after the DNS switch. The home box |
| +publishes an alias to control/edges/ only once its DNS sweep stamps it |
| +"pointing" (the #287 bound: attach needs no DNS proof, so publishing |
| +every alias would let a tenant make the shared issuer order for an |
| +unbounded set of names). Until then other edges cannot relay the name. |
| + |
| +## The change |
| + |
| +The writer also publishes an alias that is not pointing when |
| +`edge.DNS01Scope` (CARLOS_DNS01_ZONES + CARLOS_DNS01_ACCOUNTS, the same |
| +operator rule the pre-issuer uses, now one exported type) allows the |
| +alias's account and name AND the alias row's cert_expires_at is in the |
| +future. It is marked dns_pointing false (explicitly, even where no apps |
| +domain would normally leave the mark off), so readers relay it and the |
| +cert warm excludes it. |
| + |
| +## Fixed: do not re-argue |
| + |
| +- The pre-issue design and its R1/R2 rulings (operator zones AND accounts). |
| +- The console's CNAME advice stays; no console change. |
| + |
| +## What to check |
| + |
| +1. Does a remote edge actually relay the name end to end before DNS |
| + points (home map, backhaul, the home box's own serving of the alias, |
| + fleet apps behind a hub), and serve the pre-issued certificate? |
| +2. Can the published-not-pointing alias make the issuer place any ACME |
| + order (warm set, HostPolicy via deploymentHost, autocert renewal |
| + timers, tls-alpn) or otherwise widen #287's amplification envelope? |
| +3. Interactions: alias collisions with routes on other boxes, aliases |
| + of withheld/refused primaries, the asset cache, regional names, |
| + steering, the domains-door state, failure records, cert sweep, |
| + the edges-file write trigger (cert_expires_at is not in the |
| + fingerprint: is the timer enough?). |
| +4. The cert_expires_at stamp: can it be current for a name whose |
| + certificate does NOT cover it, or be stale and keep a name published |
| + after its certificate is gone? Consequence if so. |
| +5. Tests prove the behaviour (writer and reader)? |
| +6. Census: card `docs/superpowers/notes/census-proposal-alias-publish-precert-1293.md`. |
| + Units `internal/edge/edge.go` `RunWithActivatorReady` and |
| + `internal/host/edgesfile.go` `edgesFileWriteClaims` (root: the box |
| + agent), envelopes `internal/edge`, `internal/host`. Verdict per |
| + AGENTS.md step 4. |
| + |
| +## Severity |
| + |
| +- **P1**: unsafe, would not compile, a test fails, or it would not work. Blocks merge. |
| +- **P2**: wrong or missing. Fixed without reopening this review. |
| +- **P3**: clarity or polish. Follow-up list only. |
| + |
| +A P1 states its failure scenario and the evidence (file:line). |
| + |
| +## Output |
| + |
| +Findings ranked P1, P2, P3 with evidence, failure scenario, fix and fault |
| +family. Then census verdicts (each unit and envelope, APPROVE or REJECT, |
| +lines read). End with exactly one verdict: READY, READY AFTER FIXES, or |
| +NOT READY. |
| + |
| +Do not edit files. Do not spawn Anthropic-model reviewers or subagents. |
| +Do not run full suites. |
diff --git a/docs/superpowers/reviews/alias-publish-precert-1293/CODEX-REVIEW-BRIEF-R2.md b/docs/superpowers/reviews/alias-publish-precert-1293/CODEX-REVIEW-BRIEF-R2.md| new file mode 100644 |
| index 000000000..89dfbfc59 |
| --- /dev/null |
| +++ b/docs/superpowers/reviews/alias-publish-precert-1293/CODEX-REVIEW-BRIEF-R2.md |
| @@ -0,0 +1,107 @@ |
| +# Review brief: branch alias-publish-precert-1293 (#1293 follow-up), round 2 of 3 |
| + |
| +Repo carlos/platform, branch `alias-publish-precert-1293`, commit named in the prompt. |
| +Under review: the diff `origin/main...HEAD`. |
| +Authorities on main: `internal/host/edgesfile.go` (the edges-file writer, |
| +its alias publication bounds), `internal/edge/homemap.go` and |
| +`internal/edgesfile/edgesfile.go` (readers and the dns_pointing mark), |
| +`internal/edge/certwarm.go` (the HTTP-01 warm set), `internal/edge/precert.go` |
| +(merged 042e1af: DNS-01 pre-issue, reviewed by you in |
| +`docs/superpowers/reviews/precert-dns01-1293/`), AGENTS.md ("Stopping |
| +rules", "The census"). |
| + |
| +## The problem |
| + |
| +Tito staging rehearsal of 042e1af: a fleet app's custom domain had its |
| +pre-issued certificate on every edge, but non-hub edges answered 503 |
| +"Almost ready" for 5 to 7 minutes after the DNS switch. The home box |
| +publishes an alias to control/edges/ only once its DNS sweep stamps it |
| +"pointing" (the #287 bound: attach needs no DNS proof, so publishing |
| +every alias would let a tenant make the shared issuer order for an |
| +unbounded set of names). Until then other edges cannot relay the name. |
| + |
| +## The change |
| + |
| +The writer also publishes an alias that is not pointing when |
| +`edge.DNS01Scope` (CARLOS_DNS01_ZONES + CARLOS_DNS01_ACCOUNTS, the same |
| +operator rule the pre-issuer uses, now one exported type) allows the |
| +alias's account and name AND the alias row's cert_expires_at is in the |
| +future. It is marked dns_pointing false (explicitly, even where no apps |
| +domain would normally leave the mark off), so readers relay it and the |
| +cert warm excludes it. |
| + |
| +## Fixed: do not re-argue |
| + |
| +- The pre-issue design and its R1/R2 rulings (operator zones AND accounts). |
| +- The console's CNAME advice stays; no console change. |
| + |
| +## What to check |
| + |
| +1. Does a remote edge actually relay the name end to end before DNS |
| + points (home map, backhaul, the home box's own serving of the alias, |
| + fleet apps behind a hub), and serve the pre-issued certificate? |
| +2. Can the published-not-pointing alias make the issuer place any ACME |
| + order (warm set, HostPolicy via deploymentHost, autocert renewal |
| + timers, tls-alpn) or otherwise widen #287's amplification envelope? |
| +3. Interactions: alias collisions with routes on other boxes, aliases |
| + of withheld/refused primaries, the asset cache, regional names, |
| + steering, the domains-door state, failure records, cert sweep, |
| + the edges-file write trigger (cert_expires_at is not in the |
| + fingerprint: is the timer enough?). |
| +4. The cert_expires_at stamp: can it be current for a name whose |
| + certificate does NOT cover it, or be stale and keep a name published |
| + after its certificate is gone? Consequence if so. |
| +5. Tests prove the behaviour (writer and reader)? |
| +6. Census: card `docs/superpowers/notes/census-proposal-alias-publish-precert-1293.md`. |
| + Units `internal/edge/edge.go` `RunWithActivatorReady` and |
| + `internal/host/edgesfile.go` `edgesFileWriteClaims` (root: the box |
| + agent), envelopes `internal/edge`, `internal/host`. Verdict per |
| + AGENTS.md step 4. |
| + |
| +## Round 2 |
| + |
| +Earlier rounds: R1 by Astra (`CODEX-FINDINGS-R1.md`, NOT READY: one P1, |
| +one P2; census items APPROVE). The fixes: |
| + |
| +- R1 P1 (published alias enables handshake-driven orders): the home map |
| + folds a `nonAlias` class and exposes `AliasNotPointing(host)` (published |
| + only as alias entries, none pointing: since before this branch an alias |
| + was only ever published pointing, this is exactly the pre-issued shape). |
| + `issuerHostPolicyAt` refuses with `errAliasNotPointing` when the name is |
| + not this box's own (`!e.Allowed`) and `AliasNotPointing`. autocert |
| + therefore never orders for it (RSA-only hellos, cache misses) and never |
| + loads it, so never arms a renewal timer; the mirror fallback serves the |
| + cached cert. Custom routes with dns_pointing false and pointing aliases |
| + are unaffected. `TestIssuerRefusesOrdersForAnAliasNotPointingYet`. |
| +- R1 P2 (stamp is not readiness): the writer no longer reads |
| + cert_expires_at; it calls `domains.UsablePerHostCert(acmeDir, alias, |
| + now)` (Lstat regular file under 64 KiB, key pair parses, leaf names the |
| + host, inside validity), read every pass, so removal unpublishes on the |
| + next pass. Tests: wrong name, cert-only, expired, symlink, missing, |
| + removal, non-host names. Wildcard files are never consulted. |
| + |
| +The census changed: new root-read unit `internal/domains/certusable.go` |
| +`UsablePerHostCert` (the agent reads the edge cache file for an |
| +operator-scoped alias), plus `edgesFileWriteClaims` and envelopes |
| +`internal/domains`, `internal/edge`, `internal/host`. Re-check them. |
| + |
| +First give one line per R1 finding: resolved, partly, or not. Then only |
| +new findings. |
| + |
| +## Severity |
| + |
| +- **P1**: unsafe, would not compile, a test fails, or it would not work. Blocks merge. |
| +- **P2**: wrong or missing. Fixed without reopening this review. |
| +- **P3**: clarity or polish. Follow-up list only. |
| + |
| +A P1 states its failure scenario and the evidence (file:line). |
| + |
| +## Output |
| + |
| +Findings ranked P1, P2, P3 with evidence, failure scenario, fix and fault |
| +family. Then census verdicts (each unit and envelope, APPROVE or REJECT, |
| +lines read). End with exactly one verdict: READY, READY AFTER FIXES, or |
| +NOT READY. |
| + |
| +Do not edit files. Do not spawn Anthropic-model reviewers or subagents. |
| +Do not run full suites. |
diff --git a/internal/domains/certusable.go b/internal/domains/certusable.go| new file mode 100644 |
| index 000000000..cb15bc445 |
| --- /dev/null |
| +++ b/internal/domains/certusable.go |
| @@ -0,0 +1,55 @@ |
| +package domains |
| + |
| +import ( |
| + "crypto/tls" |
| + "crypto/x509" |
| + "io" |
| + "os" |
| + "path/filepath" |
| + "time" |
| +) |
| + |
| +// maxCertEntry bounds one cache entry read: a key and a chain are a few KB. |
| +const maxCertEntry = 64 << 10 |
| + |
| +// UsablePerHostCert reports whether acmeDir holds a per-host certificate |
| +// entry for host that would serve right now: a regular file (a symlink is |
| +// not followed) named exactly host, whose private key matches its leaf, whose |
| +// leaf names host and is inside its validity window. It is the readiness test |
| +// for publishing an alias before its DNS points here (#1293): unlike the |
| +// cert_expires_at stamp (hostCertExpiry), which reads the first certificate |
| +// in a file by name, this proves the material is usable for the name. |
| +// |
| +// Read in the same place, and by the same process, as hostCertExpiry's |
| +// existing read of this directory; host must already have a hostname's |
| +// shape, so it names one file directly under acmeDir and nothing else. |
| +func UsablePerHostCert(acmeDir, host string, now time.Time) bool { |
| + if acmeDir == "" || !validHostShape(host) { |
| + return false |
| + } |
| + p := filepath.Join(acmeDir, host) |
| + fi, err := os.Lstat(p) |
| + if err != nil || !fi.Mode().IsRegular() || fi.Size() > maxCertEntry { |
| + return false |
| + } |
| + f, err := os.Open(p) |
| + if err != nil { |
| + return false |
| + } |
| + defer f.Close() |
| + raw, err := io.ReadAll(io.LimitReader(f, maxCertEntry)) |
| + if err != nil { |
| + return false |
| + } |
| + pair, err := tls.X509KeyPair(raw, raw) |
| + if err != nil || len(pair.Certificate) == 0 { |
| + return false |
| + } |
| + leaf := pair.Leaf |
| + if leaf == nil { |
| + if leaf, err = x509.ParseCertificate(pair.Certificate[0]); err != nil { |
| + return false |
| + } |
| + } |
| + return !now.Before(leaf.NotBefore) && now.Before(leaf.NotAfter) && leaf.VerifyHostname(host) == nil |
| +} |
diff --git a/internal/domains/certusable_test.go b/internal/domains/certusable_test.go| new file mode 100644 |
| index 000000000..48adb09d5 |
| --- /dev/null |
| +++ b/internal/domains/certusable_test.go |
| @@ -0,0 +1,26 @@ |
| +package domains |
| + |
| +import ( |
| + "os" |
| + "path/filepath" |
| + "testing" |
| + "time" |
| +) |
| + |
| +// A name that is not a hostname never becomes a path: nothing outside the |
| +// cache directory is opened, whatever sits there. |
| +func TestUsablePerHostCertRefusesNonHostNames(t *testing.T) { |
| + dir := t.TempDir() |
| + acme := filepath.Join(dir, "acme") |
| + if err := os.MkdirAll(acme, 0o700); err != nil { |
| + t.Fatal(err) |
| + } |
| + for _, h := range []string{"", "../secret", "a/b.example.com", ".", "..", "*.example.com", "Upper.Example.com"} { |
| + if UsablePerHostCert(acme, h, time.Now()) { |
| + t.Errorf("UsablePerHostCert(%q) = true", h) |
| + } |
| + } |
| + if UsablePerHostCert("", "billing.example.com", time.Now()) { |
| + t.Error("no cache directory must mean no certificate") |
| + } |
| +} |
diff --git a/internal/edge/alias_prepoint_e2e_test.go b/internal/edge/alias_prepoint_e2e_test.go| new file mode 100644 |
| index 000000000..3e1b4e7a9 |
| --- /dev/null |
| +++ b/internal/edge/alias_prepoint_e2e_test.go |
| @@ -0,0 +1,104 @@ |
| +package edge |
| + |
| +import ( |
| + "context" |
| + "crypto/tls" |
| + "net/http" |
| + "testing" |
| + |
| + "golang.org/x/crypto/acme" |
| + "golang.org/x/crypto/acme/autocert" |
| + |
| + "github.com/carlosframework/platform/internal/registry" |
| + "github.com/carlosframework/platform/internal/release" |
| +) |
| + |
| +// #1293, end to end: the home box publishes a pre-issued alias before its |
| +// DNS points here, marked dns_pointing false. A client whose DNS already |
| +// lands on ANOTHER edge gets the pre-issued certificate there and the home |
| +// app's answer through the backhaul, instead of 503 "Almost ready". |
| +func TestBackhaulE2ERelaysAnAliasNotPointingYet(t *testing.T) { |
| + const alias = "billing.prepoint.test" |
| + s := newBackhaulSceneWith(t, backhaulSceneExtra{ |
| + certs: []string{alias}, |
| + homeEntries: map[string]string{alias: `{"role":"home","alias":true,"target_host":"` + e2eHomedHost + `","dns_pointing":false}`}, |
| + }) |
| + // The home box serves the alias itself: its registry holds the row the |
| + // claim pass derives (whatever DNS says), so its edge maps the name. |
| + if err := s.a.reg.UpsertAlias(registry.RouteAlias{Alias: alias, Host: e2eHomedHost, Account: "acct", App: "app"}); err != nil { |
| + t.Fatal(err) |
| + } |
| + s.a.restart(t) |
| + s.converge(t) |
| + |
| + if s.b.edge.Allowed(alias) { |
| + t.Fatal("test bug: the sending edge must not hold the alias itself") |
| + } |
| + resp, body := s.get(t, s.b, "https://"+alias+"/", nil, true) |
| + if resp.StatusCode != http.StatusOK { |
| + t.Fatalf("status = %d, want 200 through the home edge (body %q)", resp.StatusCode, body) |
| + } |
| + if got := resp.TLS.PeerCertificates[0]; !got.Equal(s.leaf[alias]) { |
| + t.Fatalf("the sending edge served %q, want the pre-issued certificate", got.Subject.CommonName) |
| + } |
| + if seen := e2eParseApp(t, body); seen.marker != e2eHomeMarker { |
| + t.Fatalf("marker = %q, want the home edge's app", seen.marker) |
| + } |
| +} |
| + |
| +// #1293 on the issuer, through the composed handshake chain (mirror over |
| +// autocert, as RunWithActivatorReady builds it): a remote alias published |
| +// only as not pointing is served from the mirror, and no hello (ECDSA, |
| +// RSA-only, or one for a name with no certificate at all) reaches the CA or |
| +// makes autocert load the entry. |
| +func TestIssuerServesButNeverOrdersAnAliasNotPointingYet(t *testing.T) { |
| + e2eQuietLogs(t) |
| + const alias, bare = "billing.prepoint.test", "bare.prepoint.test" |
| + store := release.NewDirStore(t.TempDir()) |
| + ca := newE2ECA(t) |
| + ca.publish(t, store, alias) |
| + putJSON(t, store, "control/edges/betty.json", `{"v":1,"box":"betty","eip":"2.2.2.2","hosts":{ |
| + "app.acct.apps.test":{"role":"home","platform":true}, |
| + "`+alias+`":{"role":"home","alias":true,"target_host":"app.acct.apps.test","dns_pointing":false}, |
| + "`+bare+`":{"role":"home","alias":true,"target_host":"app.acct.apps.test","dns_pointing":false}}}`) |
| + |
| + e := testIssuerEdge("mine.example.com") |
| + e.staticStore = store |
| + e.issuer = func() (context.Context, bool) { return context.Background(), true } |
| + homes := newHomeMap(store, "annie") |
| + refreshHomeMap(t, homes) |
| + e.homes.Store(homes) |
| + |
| + local := newCountingCache(t) |
| + mirror := newCertMirror(store, local) |
| + issuing := true |
| + mirror.gated = func() bool { return !issuing } |
| + if err := mirror.Refresh(context.Background()); err != nil { |
| + t.Fatal(err) |
| + } |
| + fake := newFakeACME(t) |
| + mgr := &autocert.Manager{Prompt: autocert.AcceptTOS, Cache: local, HostPolicy: e.issuerHostPolicy(), |
| + Client: &acme.Client{DirectoryURL: fake.directoryURL()}} |
| + chain := mirror.wrapGetCertificate(mgr.GetCertificate) |
| + |
| + before := local.count(alias) |
| + if c, err := chain(ecdsaHello(alias)); err != nil || c == nil || c.Leaf.VerifyHostname(alias) != nil { |
| + t.Fatalf("ECDSA hello for %s: cert %v, err %v; want the mirrored certificate", alias, c != nil, err) |
| + } |
| + rsaOnly := &tls.ClientHelloInfo{ServerName: alias, CipherSuites: []uint16{tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256}, |
| + SignatureSchemes: []tls.SignatureScheme{tls.PKCS1WithSHA256}} |
| + _, _ = chain(rsaOnly) |
| + if _, err := chain(ecdsaHello(bare)); err == nil { |
| + t.Fatalf("a name with no certificate anywhere completed a handshake") |
| + } |
| + if accounts, orders := fake.counts(); accounts+orders != 0 { |
| + t.Fatalf("the CA saw %d accounts and %d orders; a not-pointing alias must never reach it", accounts, orders) |
| + } |
| + // The mirror's last-resort local read may look; autocert's own load (the |
| + // one that arms a renewal timer) must not. autocert reads the entry under |
| + // the bare name before anything else, so any autocert load shows here as |
| + // more reads than the mirror's own fallback makes. |
| + if got := local.count(alias) - before; got > 0 { |
| + t.Fatalf("the local cache entry for %s was read %d time(s); the mirror's snapshot should have answered", alias, got) |
| + } |
| +} |
diff --git a/internal/edge/certsync.go b/internal/edge/certsync.go| index e4bf83d5a..9bf211b97 100644 |
| --- a/internal/edge/certsync.go |
| +++ b/internal/edge/certsync.go |
| @@ -104,6 +104,12 @@ func (e *Edge) issuerGate() (context.Context, bool) { |
| // never the string, so softening it costs nothing internal. |
| var errNotIssuer = errors.New("acme: not available here") |
| +// errAliasNotPointing is issuerHostPolicy's refusal for a remote alias |
| +// published before its DNS points here (#1293). Generic text for the same |
| +// reason as errNotIssuer: autocert writes it verbatim to an unauthenticated |
| +// :80 response. |
| +var errAliasNotPointing = errors.New("acme: not available here") |
| + |
| // armCertIssuance wires cert DISTRIBUTION and the issuance GATE together, |
| // because they are one decision and not two: a box may only be told "you are |
| // not the issuer" if some other box's certificates can reach it. |
| @@ -207,6 +213,15 @@ func (e *Edge) issuerHostPolicyAt(now func() time.Time) autocert.HostPolicy { |
| if !e.deploymentHost(host) { |
| return fmt.Errorf("acme: host %q not in registry", host) |
| } |
| + // A name another box publishes only as a pre-issued alias whose DNS |
| + // has not moved (#1293) is relayed and served from the mirror, never |
| + // ordered: an HTTP-01 order cannot validate yet, and refusing here |
| + // also keeps autocert from loading the cached certificate and arming |
| + // a renewal timer that bypasses this policy. The pre-issuer renews it |
| + // over DNS-01. A name this box serves itself is unaffected. |
| + if !e.Allowed(host) && e.homes.Load().AliasNotPointing(host) { |
| + return errAliasNotPointing |
| + } |
| if _, ok := e.issuerGate(); !ok { |
| return errNotIssuer |
| } |
diff --git a/internal/edge/dns01scope.go b/internal/edge/dns01scope.go| new file mode 100644 |
| index 000000000..98ec10e05 |
| --- /dev/null |
| +++ b/internal/edge/dns01scope.go |
| @@ -0,0 +1,49 @@ |
| +package edge |
| + |
| +import ( |
| + "slices" |
| + "strings" |
| +) |
| + |
| +// DNS01Scope is the operator's authorization to act for a hostname before its |
| +// DNS points at the deployment (#1293): the zones named in CARLOS_DNS01_ZONES, |
| +// for claims of the accounts named in CARLOS_DNS01_ACCOUNTS. Two readers hold |
| +// the same rule, which is why it lives in one exported place: |
| +// |
| +// - the issuer's pre-issuer (precert.go) orders certificates over DNS-01 |
| +// only for names it allows; |
| +// - a home box's edges-file writer (internal/host) publishes an alias that |
| +// is not pointing yet, marked dns_pointing false, only for a name it |
| +// allows that already has a current certificate, so every edge can relay |
| +// it before the DNS switch. |
| +// |
| +// The zero value allows nothing. |
| +type DNS01Scope struct { |
| + Zones []string |
| + Accounts []string |
| +} |
| + |
| +// DNS01ScopeFromEnv reads both settings through getenv. Quiet: an entry that |
| +// does not parse is dropped without a log line, because the edges-file writer |
| +// reads this on every pass; the edge logs bad entries once, at start. |
| +func DNS01ScopeFromEnv(getenv func(string) string) DNS01Scope { |
| + return DNS01Scope{ |
| + Zones: parseDNS01Zones(getenv("CARLOS_DNS01_ZONES"), false), |
| + Accounts: parseDNS01Accounts(getenv("CARLOS_DNS01_ACCOUNTS"), false), |
| + } |
| +} |
| + |
| +// Allows reports whether host, claimed by account, is inside the scope: the |
| +// account is named, and host is a named zone or a name under one. |
| +func (s DNS01Scope) Allows(host, account string) bool { |
| + if account == "" || !slices.Contains(s.Accounts, account) { |
| + return false |
| + } |
| + host = strings.TrimSuffix(strings.ToLower(host), ".") |
| + for _, z := range s.Zones { |
| + if host == z || strings.HasSuffix(host, "."+z) { |
| + return true |
| + } |
| + } |
| + return false |
| +} |
diff --git a/internal/edge/edge.go b/internal/edge/edge.go| index 52501ce1c..d7c4eb441 100644 |
| --- a/internal/edge/edge.go |
| +++ b/internal/edge/edge.go |
| @@ -5155,7 +5155,7 @@ func RunWithActivatorReady(args []string, act Activator, cache *Cache, ready fun |
| // the claim, before they point here. nil = not configured. |
| if p := e.newPreIssuerFromEnv(certCache, mirror, wm); p != nil { |
| go p.run() |
| - log.Printf("edge: certificates before DNS moves on for %v (DNS-01, %s pass, issuer only)", p.zones, preIssueInterval) |
| + log.Printf("edge: certificates before DNS moves on for %v (DNS-01, %s pass, issuer only)", p.scope.Zones, preIssueInterval) |
| } |
| } |
| tlsCfg.GetCertificate = getCert |
diff --git a/internal/edge/homemap.go b/internal/edge/homemap.go| index 85c360ca9..97e6420fc 100644 |
| --- a/internal/edge/homemap.go |
| +++ b/internal/edge/homemap.go |
| @@ -283,6 +283,9 @@ type homeEntry struct { |
| // point at this deployment (edgesfile.DNSPointing, unioned across home |
| // rows like the classes). ServedHosts lists only such names (#724). |
| pointing bool |
| + // nonAlias reports whether any box publishes the name as something other |
| + // than an attached alias (a route, a catch-all, a cert-only row). |
| + nonAlias bool |
| // account and app are the owner the dial target's box published. They |
| // travel with eip and box and are never merged across entries. |
| account, app string |
| @@ -1079,6 +1082,7 @@ func foldHomes(files map[string]edgesFileView, self string, privateDial bool) (m |
| merged.platform = merged.platform || (h.Platform && !h.Alias && !h.Wildcard) |
| merged.wildcard = merged.wildcard || h.Wildcard |
| merged.pointing = merged.pointing || (h.Role == edgeRoleHome && edgesfile.DNSPointing(h.DNSPointing)) |
| + merged.nonAlias = merged.nonAlias || !h.Alias |
| hosts[host] = merged |
| } |
| } |
| @@ -1095,7 +1099,7 @@ func foldHomes(files map[string]edgesFileView, self string, privateDial bool) (m |
| } |
| h.claims = cs |
| h.routeExists = r.RouteExists |
| - h.platform, h.wildcard, h.pointing = classes.platform, classes.wildcard, classes.pointing |
| + h.platform, h.wildcard, h.pointing, h.nonAlias = classes.platform, classes.wildcard, classes.pointing, classes.nonAlias |
| hosts[name] = h |
| } |
| @@ -1413,6 +1417,19 @@ func (m *homeMap) AssetsFor(host string, now time.Time) (HostAssets, bool) { |
| // |
| // Nil-receiver-safe, like Home: the map may not be armed yet (or at all, on a |
| // box with no deployment store). |
| +// AliasNotPointing reports whether host is published only as an attached |
| +// alias that no box has seen pointing here. Until #1293 an alias was |
| +// published only once pointing, so this is exactly the shape of a pre-issued |
| +// alias whose DNS has not moved yet: every edge relays it, and the issuer must |
| +// not order for it (issuerHostPolicy). Nil-safe. |
| +func (m *homeMap) AliasNotPointing(host string) bool { |
| + if m == nil { |
| + return false |
| + } |
| + h, ok := m.snapshot().hosts[host] |
| + return ok && !h.pointing && !h.nonAlias |
| +} |
| + |
| func (m *homeMap) KnownHost(host string) bool { |
| if m == nil || strings.HasPrefix(host, "*.") { |
| return false |
diff --git a/internal/edge/homemap_dnspointing_test.go b/internal/edge/homemap_dnspointing_test.go| index b5731b0c4..3d4d97887 100644 |
| --- a/internal/edge/homemap_dnspointing_test.go |
| +++ b/internal/edge/homemap_dnspointing_test.go |
| @@ -1,6 +1,9 @@ |
| package edge |
| import ( |
| + "context" |
| + "errors" |
| + "slices" |
| "strings" |
| "sync/atomic" |
| "testing" |
| @@ -116,3 +119,54 @@ func TestHomeMapServedHostsPointingOnAnyHomeBox(t *testing.T) { |
| t.Fatalf("served hosts = %v, want shop.example.com", got) |
| } |
| } |
| + |
| +// #1293: a home box publishes a pre-issued alias before its DNS points here, |
| +// marked dns_pointing false. Every other edge must relay it to that box (the |
| +// whole point) while the cert warm still leaves it alone. |
| +func TestHomeMapRelaysAnAliasNotPointingYet(t *testing.T) { |
| + s := meshTestStore(t) |
| + putJSON(t, s, "control/edges/betty.json", `{"v":1,"box":"betty","eip":"2.2.2.2","hosts":{ |
| + "app.acct.apps.test":{"role":"home","platform":true}, |
| + "billing.example.com":{"role":"home","alias":true,"target_host":"app.acct.apps.test","dns_pointing":false}}}`) |
| + m := newHomeMap(s, "annie") |
| + refreshHomeMap(t, m) |
| + if eip, box, ok := m.Home("billing.example.com"); !ok || box != "betty" || eip != "2.2.2.2" { |
| + t.Fatalf("Home(billing.example.com) = %q, %q, %v; want betty's 2.2.2.2", eip, box, ok) |
| + } |
| + if !m.KnownHost("billing.example.com") { |
| + t.Fatal("KnownHost(billing.example.com) = false; a relayed name must be known") |
| + } |
| + if slices.Contains(m.ServedHosts(), "billing.example.com") { |
| + t.Fatal("a name not pointing yet must stay out of the cert warm's set") |
| + } |
| +} |
| + |
| +// #1293: the issuer relays and serves a remote pre-issued alias, but never |
| +// orders for it while it is published only as not pointing: an RSA-only |
| +// hello or a cache miss must not reach the CA, and refusing in HostPolicy |
| +// also keeps autocert from arming a renewal timer for it. |
| +func TestIssuerRefusesOrdersForAnAliasNotPointingYet(t *testing.T) { |
| + s := meshTestStore(t) |
| + putJSON(t, s, "control/edges/betty.json", `{"v":1,"box":"betty","eip":"2.2.2.2","hosts":{ |
| + "app.acct.apps.test":{"role":"home","platform":true}, |
| + "billing.example.com":{"role":"home","alias":true,"target_host":"app.acct.apps.test","dns_pointing":false}, |
| + "live.example.com":{"role":"home","alias":true,"target_host":"app.acct.apps.test","dns_pointing":true}, |
| + "shop.example.com":{"role":"home","platform":false,"dns_pointing":false}}}`) |
| + m := newHomeMap(s, "annie") |
| + refreshHomeMap(t, m) |
| + e := testIssuerEdge("mine.example.com") |
| + e.issuer = func() (context.Context, bool) { return context.Background(), true } |
| + e.homes.Store(m) |
| + pol := e.issuerHostPolicy() |
| + if err := pol(context.Background(), "billing.example.com"); !errors.Is(err, errAliasNotPointing) { |
| + t.Fatalf("HostPolicy(billing.example.com) = %v, want errAliasNotPointing", err) |
| + } |
| + for _, h := range []string{"live.example.com", "shop.example.com", "mine.example.com"} { |
| + if err := pol(context.Background(), h); err != nil { |
| + t.Errorf("HostPolicy(%s) = %v, want allowed as before", h, err) |
| + } |
| + } |
| + if !m.AliasNotPointing("billing.example.com") || m.AliasNotPointing("shop.example.com") || m.AliasNotPointing("live.example.com") || m.AliasNotPointing("nowhere.example.com") { |
| + t.Fatal("AliasNotPointing classified a name wrongly") |
| + } |
| +} |
diff --git a/internal/edge/precert.go b/internal/edge/precert.go| index 9198c71de..465e851b2 100644 |
| --- a/internal/edge/precert.go |
| +++ b/internal/edge/precert.go |
| @@ -115,7 +115,7 @@ func preIssueDue(leaf *x509.Certificate, now time.Time) bool { |
| // lowercased, trailing dot dropped, deduplicated. An entry that is not a |
| // hostname is dropped with a log line. nil when nothing valid is listed, |
| // which is "off". |
| -func parseDNS01Zones(raw string) []string { |
| +func parseDNS01Zones(raw string, warn bool) []string { |
| var out []string |
| for _, z := range strings.Split(raw, ",") { |
| z = strings.TrimSuffix(strings.ToLower(strings.TrimSpace(z)), ".") |
| @@ -123,7 +123,9 @@ func parseDNS01Zones(raw string) []string { |
| continue |
| } |
| if !provision.ValidHostShape(z) { |
| - log.Printf("edge: CARLOS_DNS01_ZONES entry %q is not a zone name, ignored", z) |
| + if warn { |
| + log.Printf("edge: CARLOS_DNS01_ZONES entry %q is not a zone name, ignored", z) |
| + } |
| continue |
| } |
| if !slices.Contains(out, z) { |
| @@ -136,7 +138,7 @@ func parseDNS01Zones(raw string) []string { |
| // parseDNS01Accounts reads CARLOS_DNS01_ACCOUNTS: comma-separated account |
| // sqids, as claims record them. An entry that is not a sqid is dropped with a |
| // log line. nil when none is valid, which is "off". |
| -func parseDNS01Accounts(raw string) []string { |
| +func parseDNS01Accounts(raw string, warn bool) []string { |
| var out []string |
| for _, a := range strings.Split(raw, ",") { |
| a = strings.TrimSpace(a) |
| @@ -144,7 +146,9 @@ func parseDNS01Accounts(raw string) []string { |
| continue |
| } |
| if !domains.ValidSqid(a) { |
| - log.Printf("edge: CARLOS_DNS01_ACCOUNTS entry %q is not an account sqid, ignored", a) |
| + if warn { |
| + log.Printf("edge: CARLOS_DNS01_ACCOUNTS entry %q is not an account sqid, ignored", a) |
| + } |
| continue |
| } |
| if !slices.Contains(out, a) { |
| @@ -157,9 +161,9 @@ func parseDNS01Accounts(raw string) []string { |
| // preIssuer is the pass. Every input is a field so the decisions are |
| // testable without an ACME server; newPreIssuerFromEnv wires the real ones. |
| type preIssuer struct { |
| - zones []string |
| - // accounts are the sqids whose claims qualify; nothing else does. |
| - accounts []string |
| + // scope is the operator's zones and accounts; nothing outside it |
| + // qualifies. |
| + scope DNS01Scope |
| // cache is the PUBLISHING cache (certsync.go): its Get reads this box's |
| // own disk, its Put writes the disk and then the bucket. |
| cache autocert.Cache |
| @@ -195,7 +199,7 @@ func newPreIssuer(zones, accounts []string, cache autocert.Cache, store release. |
| claims func(context.Context) ([]domains.Claim, error), published func(string) ([]byte, bool), |
| covered func(string) bool, order func(context.Context, string) (*tls.Certificate, *ecdsa.PrivateKey, error)) *preIssuer { |
| return &preIssuer{ |
| - zones: zones, accounts: accounts, cache: cache, store: store, issuer: issuer, claims: claims, |
| + scope: DNS01Scope{Zones: zones, Accounts: accounts}, cache: cache, store: store, issuer: issuer, claims: claims, |
| published: published, covered: covered, order: order, now: time.Now, |
| nextAttempt: map[string]time.Time{}, tried: map[string]time.Time{}, putAt: map[string]time.Time{}, |
| } |
| @@ -215,11 +219,11 @@ func dns01OrderFunc(cache autocert.Cache, directory string, dns dnsProvider) fun |
| // CARLOS_DNS01_ACCOUNTS or no DNS provider to publish through (logged). Called only on a box with a deployment store, so the mirror and |
| // the issuer gate exist. |
| func (e *Edge) newPreIssuerFromEnv(cache autocert.Cache, mirror *certMirror, wm *wildcardManager) *preIssuer { |
| - zones := parseDNS01Zones(os.Getenv("CARLOS_DNS01_ZONES")) |
| + zones := parseDNS01Zones(os.Getenv("CARLOS_DNS01_ZONES"), true) |
| if len(zones) == 0 || e.staticStore == nil || mirror == nil { |
| return nil |
| } |
| - accounts := parseDNS01Accounts(os.Getenv("CARLOS_DNS01_ACCOUNTS")) |
| + accounts := parseDNS01Accounts(os.Getenv("CARLOS_DNS01_ACCOUNTS"), true) |
| if len(accounts) == 0 { |
| log.Printf("edge: CARLOS_DNS01_ZONES is set but CARLOS_DNS01_ACCOUNTS names no account — certificates are not issued before DNS moves") |
| return nil |
| @@ -247,16 +251,6 @@ func (p *preIssuer) run() { |
| } |
| } |
| -// inZone reports whether host is a listed zone or a name under one. |
| -func (p *preIssuer) inZone(host string) bool { |
| - for _, z := range p.zones { |
| - if host == z || strings.HasSuffix(host, "."+z) { |
| - return true |
| - } |
| - } |
| - return false |
| -} |
| - |
| // candidates is the sorted set of hostnames the pass looks after. |
| func (p *preIssuer) candidates(claims []domains.Claim) []string { |
| var out []string |
| @@ -265,7 +259,7 @@ func (p *preIssuer) candidates(claims []domains.Claim) []string { |
| switch { |
| case c.Pending, strings.HasPrefix(host, "*."): |
| continue |
| - case !p.inZone(host), !slices.Contains(p.accounts, c.Account): |
| + case !p.scope.Allows(host, c.Account): |
| continue |
| case p.covered != nil && p.covered(host): |
| continue |
diff --git a/internal/edge/precert_test.go b/internal/edge/precert_test.go| index 3f888451f..01b892829 100644 |
| --- a/internal/edge/precert_test.go |
| +++ b/internal/edge/precert_test.go |
| @@ -298,22 +298,22 @@ func TestPreIssueCandidates(t *testing.T) { |
| } |
| func TestDNS01AccountsFromEnv(t *testing.T) { |
| - got := parseDNS01Accounts(" abc ,,not a sqid,abc,xyz") |
| + got := parseDNS01Accounts(" abc ,,not a sqid,abc,xyz", true) |
| if want := []string{"abc", "xyz"}; !slices.Equal(got, want) { |
| t.Fatalf("parseDNS01Accounts = %v, want %v", got, want) |
| } |
| - if parseDNS01Accounts("") != nil { |
| + if parseDNS01Accounts("", true) != nil { |
| t.Fatal("unset must be nil: the feature is off") |
| } |
| } |
| func TestDNS01ZonesFromEnv(t *testing.T) { |
| - got := parseDNS01Zones(" Example.com. ,,ti.example ,not a zone, example.com,*.wild.test") |
| + got := parseDNS01Zones(" Example.com. ,,ti.example ,not a zone, example.com,*.wild.test", true) |
| want := []string{"example.com", "ti.example"} |
| if !slices.Equal(got, want) { |
| t.Fatalf("parseDNS01Zones = %v, want %v", got, want) |
| } |
| - if parseDNS01Zones("") != nil { |
| + if parseDNS01Zones("", true) != nil { |
| t.Fatal("unset must be nil: the feature is off") |
| } |
| } |
| @@ -606,3 +606,31 @@ func TestSameChallengeNameOrdersDoNotCollide(t *testing.T) { |
| } |
| ca.checkFaults(t) |
| } |
| + |
| +func TestDNS01ScopeAllows(t *testing.T) { |
| + s := DNS01Scope{Zones: []string{"example.com"}, Accounts: []string{"acct"}} |
| + for _, c := range []struct { |
| + host, account string |
| + want bool |
| + }{ |
| + {"example.com", "acct", true}, |
| + {"Billing.Example.com.", "acct", true}, |
| + {"a.b.example.com", "acct", true}, |
| + {"badexample.com", "acct", false}, |
| + {"billing.example.com", "other", false}, |
| + {"billing.example.com", "", false}, |
| + {"billing.example.org", "acct", false}, |
| + } { |
| + if got := s.Allows(c.host, c.account); got != c.want { |
| + t.Errorf("Allows(%q, %q) = %v, want %v", c.host, c.account, got, c.want) |
| + } |
| + } |
| + if (DNS01Scope{}).Allows("example.com", "acct") { |
| + t.Error("the zero scope must allow nothing") |
| + } |
| + env := map[string]string{"CARLOS_DNS01_ZONES": "example.com, bad zone", "CARLOS_DNS01_ACCOUNTS": "acct,not a sqid"} |
| + got := DNS01ScopeFromEnv(func(k string) string { return env[k] }) |
| + if !slices.Equal(got.Zones, []string{"example.com"}) || !slices.Equal(got.Accounts, []string{"acct"}) { |
| + t.Errorf("DNS01ScopeFromEnv = %+v", got) |
| + } |
| +} |
diff --git a/internal/host/acmedir.go b/internal/host/acmedir.go| new file mode 100644 |
| index 000000000..273563983 |
| --- /dev/null |
| +++ b/internal/host/acmedir.go |
| @@ -0,0 +1,20 @@ |
| +package host |
| + |
| +import "path/filepath" |
| + |
| +// edgeAcmeDir is the edge's certificate cache directory: the agent's |
| +// -acme-cache flag when given (the edge honours the same flag), otherwise |
| +// $CARLOS_DATA_DIR/acme ("/data" when unset), the edge's own default. The one |
| +// derivation for every agent reader of that cache: the domains sweep's |
| +// cert_expires_at stamp and the edges-file writer's pre-issued alias check |
| +// (#1293) must read the directory the edge actually serves from. |
| +func edgeAcmeDir(getenv func(string) string, acmeCacheFlag string) string { |
| + if acmeCacheFlag != "" { |
| + return acmeCacheFlag |
| + } |
| + dd := getenv("CARLOS_DATA_DIR") |
| + if dd == "" { |
| + dd = "/data" |
| + } |
| + return filepath.Join(dd, "acme") |
| +} |
diff --git a/internal/host/agent.go b/internal/host/agent.go| index e9a823c91..b453edb7d 100644 |
| --- a/internal/host/agent.go |
| +++ b/internal/host/agent.go |
| @@ -1153,7 +1153,7 @@ func runAgent(args []string, buildClaims ClaimFactory) { |
| } |
| go retentionLoop(reg, collectBuildStates, boxJudge) |
| go registrySnapshotLoop(reg) |
| - go edgesFileLoop(reg, lifetimes, boxAssets) |
| + go edgesFileLoop(reg, lifetimes, boxAssets, edgeAcmeDir(os.Getenv, peekAcmeCache(args))) |
| // Region HA enrollment evidence (spec 1 §5.1): once, at start, and only |
| // with CARLOS_REGION_HA on. See boxrecord.go. |
| go boxRecordLoop() |
| @@ -4083,16 +4083,12 @@ func domainsTickConfig(getenv func(string) string, publicIP string) (domains.Con |
| if len(ips) == 0 && publicIP != "" { |
| ips = []string{publicIP} |
| } |
| - dd := getenv("CARLOS_DATA_DIR") |
| - if dd == "" { |
| - dd = "/data" |
| - } |
| cfg := domains.Config{ |
| AppsDomain: domain, |
| // The same default the edge's -acme-cache flag carries |
| // (edge.RunWithActivator): $CARLOS_DATA_DIR/acme. domainsLoop |
| // overrides this when the flag was given explicitly. |
| - AcmeDir: filepath.Join(dd, "acme"), |
| + AcmeDir: edgeAcmeDir(getenv, ""), |
| Now: time.Now, |
| Resolve: resolveHost, |
| } |
| @@ -4568,9 +4564,7 @@ func domainsLoop(reg *registry.Registry, acmeCacheFlag string, hostClaim bool) { |
| log.Printf("agent: domains loop disabled: PLATFORM_APPS_DOMAIN is not set") |
| return |
| } |
| - if acmeCacheFlag != "" { |
| - cfg.AcmeDir = acmeCacheFlag |
| - } |
| + cfg.AcmeDir = edgeAcmeDir(os.Getenv, acmeCacheFlag) |
| store, err := openDeployStore(ctx) |
| if err != nil { |
| log.Printf("agent: domains loop disabled: %v", err) |
diff --git a/internal/host/edgesfile.go b/internal/host/edgesfile.go| index 23cb0178f..0ab56dd44 100644 |
| --- a/internal/host/edgesfile.go |
| +++ b/internal/host/edgesfile.go |
| @@ -319,6 +319,10 @@ func awakeCount(reg *registry.Registry) int { |
| // batch-wide if it ever reached here (plan review catch, 2026-08-23). |
| // edgesFileRegion resolves the real thing. |
| type edgesFile struct { |
| + // AcmeDir is the edge's certificate cache (edgeAcmeDir), where the |
| + // writer checks a pre-issued alias's certificate (#1293). Not published. |
| + // Empty: no alias is published before it points. |
| + AcmeDir string `json:"-"` |
| RoleSource edgesRoleSource `json:"-"` |
| RolePublishRequired bool `json:"-"` |
| BoxRole boxroles.Role `json:"box_role,omitempty"` |
| @@ -814,7 +818,19 @@ func edgesFileWriteClaims(ctx context.Context, s release.Store, reg *registry.Re |
| // tenant an unbounded set of names the shared issuer will order for |
| // (#277's amplification envelope covers routes, which the platform |
| // provisions). A name that actually resolves to this deployment is |
| - // the name whose validations must be answerable everywhere; |
| + // the name whose validations must be answerable everywhere. |
| + // One exception (#1293): an alias the operator has authorized for |
| + // DNS-01 (edge.DNS01Scope: CARLOS_DNS01_ZONES for claims of |
| + // CARLOS_DNS01_ACCOUNTS) whose per-host certificate on this box's |
| + // disk would serve right now (domains.UsablePerHostCert: key, name |
| + // and validity checked, not the cert_expires_at stamp) is published |
| + // before it points, marked dns_pointing false. Every edge then |
| + // relays it to this box the moment DNS switches, instead of |
| + // answering "Almost ready" until the next sweep. The false mark |
| + // keeps it out of the issuer's HTTP-01 warm set, and the issuer's |
| + // HostPolicy refuses to order for a name published only this way |
| + // (edge homeMap.AliasNotPointing), so it adds nothing to the |
| + // envelope above; the name is the operator's, not a tenant's; |
| // - never platform-class: a customer's name derives no wildcard parent; |
| // - marked alias: the reader lets a real route on another box beat it; |
| // - no "*.parent" catch-all alias: a remote edge could dial it but has |
| @@ -847,6 +863,11 @@ func edgesFileWriteClaims(ctx context.Context, s release.Store, reg *registry.Re |
| resolve[a.Alias] = p |
| } |
| } |
| + dns01 := edge.DNS01ScopeFromEnv(os.Getenv) |
| + // The edge's certificate cache, from the one derivation the domains |
| + // sweep also uses (edgeAcmeDir); empty publishes nothing early. |
| + acmeDir := ident.AcmeDir |
| + now := time.Now() |
| for _, a := range aliases { |
| if a.Alias == "" || strings.HasPrefix(a.Alias, "*.") { |
| continue |
| @@ -855,7 +876,9 @@ func edgesFileWriteClaims(ctx context.Context, s release.Store, reg *registry.Re |
| if !served { |
| continue |
| } |
| - if a.DNSStatus != "pointing" { |
| + pointing := a.DNSStatus == "pointing" |
| + preIssued := !pointing && dns01.Allows(a.Alias, a.Account) && domains.UsablePerHostCert(acmeDir, a.Alias, now) |
| + if !pointing && !preIssued { |
| // Withheld, and said so ONCE per name per process: an alias |
| // whose DNS resolves to an address outside PLATFORM_EDGE_IPS |
| // (a region EIP missing from that list is the usual cause) is |
| @@ -881,10 +904,17 @@ func edgesFileWriteClaims(ctx context.Context, s release.Store, reg *registry.Re |
| // off), and names the primary as its target: the edge compares two |
| // aliases' pairs only for one target. |
| p := hosts[primary] |
| - // Only a pointing alias reaches here, so its mark is always true. |
| + // A pointing alias takes the ordinary mark. A pre-issued one is |
| + // always an explicit false, even where dnsPointingMark would leave |
| + // the mark off (no apps domain): absent reads as pointing. |
| + mark := dnsPointingMark(appsDomain, a.Alias, true) |
| + if preIssued { |
| + notPointing := false |
| + mark = ¬Pointing |
| + } |
| hosts[a.Alias] = edgeHost{Role: "home", Alias: true, Account: acct, App: app, Stamp: p.Stamp, |
| Incarnation: p.Incarnation, ServingSeq: p.ServingSeq, TargetHost: primary, |
| - DNSPointing: dnsPointingMark(appsDomain, a.Alias, true)} |
| + DNSPointing: mark} |
| } |
| // Replica placements (#162): a row minted from a role=replica record — |
| @@ -1280,7 +1310,7 @@ func edgesFileSecretsFP(getenv func(string) string) string { |
| // published at would advance by 20 minutes or more, or the authority clocks |
| // first became known). The policy is the edge's too: its settled snapshots, |
| // stored by this loop's passes, are what the box's own catch answers from. |
| -func edgesFileLoop(reg *registry.Registry, lifetimes bool, assets *assetPolicy) { |
| +func edgesFileLoop(reg *registry.Registry, lifetimes bool, assets *assetPolicy, acmeDir string) { |
| ctx := context.Background() |
| if shouldSkipPublisherElection(os.Getenv) { |
| log.Printf("agent: edges file loop is a platform-box job — skipped on a fleet box") |
| @@ -1305,6 +1335,7 @@ func edgesFileLoop(reg *registry.Registry, lifetimes bool, assets *assetPolicy) |
| // reconcile pass scopes by — the two vocabularies travel in one file so |
| // a reader can join them without a second source. |
| ident := edgesFile{ |
| + AcmeDir: acmeDir, |
| Box: box, |
| Region: region, |
| Placement: strings.TrimSpace(os.Getenv("CARLOS_REGION")), |
diff --git a/internal/host/edgesfile_precert_test.go b/internal/host/edgesfile_precert_test.go| new file mode 100644 |
| index 000000000..219aa2f54 |
| --- /dev/null |
| +++ b/internal/host/edgesfile_precert_test.go |
| @@ -0,0 +1,277 @@ |
| +package host |
| + |
| +import ( |
| + "bytes" |
| + "context" |
| + "crypto/ecdsa" |
| + "crypto/elliptic" |
| + "crypto/rand" |
| + "crypto/x509" |
| + "crypto/x509/pkix" |
| + "encoding/json" |
| + "encoding/pem" |
| + "math/big" |
| + "os" |
| + "path/filepath" |
| + "sync" |
| + "testing" |
| + "time" |
| + |
| + "github.com/carlosframework/platform/internal/registry" |
| + "github.com/carlosframework/platform/internal/release" |
| +) |
| + |
| +// writeCertEntry writes an autocert-format entry (key block, then the leaf) |
| +// for names into acmeDir under file, valid until notAfter; withKey false |
| +// writes the certificate alone. |
| +func writeCertEntry(t *testing.T, acmeDir, file string, names []string, notAfter time.Time, withKey bool) { |
| + t.Helper() |
| + key, err := ecdsa.GenerateKey(elliptic.P256(), rand.Reader) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + tmpl := &x509.Certificate{SerialNumber: big.NewInt(1), Subject: pkix.Name{CommonName: names[0]}, DNSNames: names, |
| + NotBefore: time.Now().Add(-time.Hour), NotAfter: notAfter} |
| + der, err := x509.CreateCertificate(rand.Reader, tmpl, tmpl, &key.PublicKey, key) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + var buf bytes.Buffer |
| + if withKey { |
| + kder, err := x509.MarshalECPrivateKey(key) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + _ = pem.Encode(&buf, &pem.Block{Type: "EC PRIVATE KEY", Bytes: kder}) |
| + } |
| + _ = pem.Encode(&buf, &pem.Block{Type: "CERTIFICATE", Bytes: der}) |
| + if err := os.MkdirAll(acmeDir, 0o700); err != nil { |
| + t.Fatal(err) |
| + } |
| + if err := os.WriteFile(filepath.Join(acmeDir, file), buf.Bytes(), 0o600); err != nil { |
| + t.Fatal(err) |
| + } |
| +} |
| + |
| +// #1293: an alias the operator has authorized for DNS-01 (CARLOS_DNS01_ZONES |
| +// and CARLOS_DNS01_ACCOUNTS) that already holds a current certificate is |
| +// published before its DNS points here, marked dns_pointing false, so every |
| +// edge relays it to this box from the moment DNS switches. Everything else |
| +// keeps waiting for the "pointing" stamp. |
| +func TestEdgesFilePublishesPreIssuedAliasesBeforeDNS(t *testing.T) { |
| + withheldAliasSaid = sync.Map{} |
| + t.Setenv("PLATFORM_APPS_DOMAIN", "apps.test") |
| + t.Setenv("CARLOS_DNS01_ZONES", "example.com") |
| + t.Setenv("CARLOS_DNS01_ACCOUNTS", "acct") |
| + s, reg := release.NewDirStore(t.TempDir()), edgesTestRegistry(t) |
| + if err := reg.Upsert(registry.Route{Host: "app.acct.apps.test", Kind: "service", Addr: "10.0.0.1:3000", Status: "ready", Platform: true}); err != nil { |
| + t.Fatal(err) |
| + } |
| + acme := filepath.Join(t.TempDir(), "acme") |
| + now := time.Now() |
| + future, past := now.Add(80*24*time.Hour), now.Add(-time.Minute) |
| + const ( |
| + good = iota |
| + none |
| + expired |
| + wrongName |
| + certOnly |
| + symlink |
| + ) |
| + for _, a := range []struct { |
| + alias, account, status string |
| + cert int |
| + }{ |
| + {"billing.example.com", "acct", "elsewhere", good}, // the case: published, not pointing |
| + {"fresh.example.com", "acct", "", good}, // no DNS record yet: same |
| + {"live.example.com", "acct", "pointing", good}, // pointing: published as before |
| + {"nocert.example.com", "acct", "elsewhere", none}, // no certificate yet |
| + {"expired.example.com", "acct", "elsewhere", expired}, // certificate expired |
| + {"wrongname.example.com", "acct", "elsewhere", wrongName}, // a file that names another host |
| + {"certonly.example.com", "acct", "elsewhere", certOnly}, // no private key |
| + {"link.example.com", "acct", "elsewhere", symlink}, // a symlink is not followed |
| + {"other.example.com", "zzz", "elsewhere", good}, // an account the operator did not name |
| + {"outside.example.org", "acct", "elsewhere", good}, // outside the zones |
| + {"badexample.com", "acct", "elsewhere", good}, // a suffix, not a subdomain |
| + } { |
| + if err := reg.UpsertAlias(registry.RouteAlias{Alias: a.alias, Host: "app.acct.apps.test", Account: a.account, App: "app", DNSStatus: a.status}); err != nil { |
| + t.Fatal(err) |
| + } |
| + switch a.cert { |
| + case good: |
| + writeCertEntry(t, acme, a.alias, []string{a.alias}, future, true) |
| + case expired: |
| + writeCertEntry(t, acme, a.alias, []string{a.alias}, past, true) |
| + case wrongName: |
| + writeCertEntry(t, acme, a.alias, []string{"someone.example.net"}, future, true) |
| + case certOnly: |
| + writeCertEntry(t, acme, a.alias, []string{a.alias}, future, false) |
| + case symlink: |
| + writeCertEntry(t, acme, "real-"+a.alias, []string{a.alias}, future, true) |
| + if err := os.Symlink(filepath.Join(acme, "real-"+a.alias), filepath.Join(acme, a.alias)); err != nil { |
| + t.Fatal(err) |
| + } |
| + } |
| + } |
| + type hostView struct { |
| + Role string `json:"role"` |
| + Alias bool `json:"alias"` |
| + TargetHost string `json:"target_host"` |
| + DNSPointing *bool `json:"dns_pointing"` |
| + } |
| + publish := func() map[string]hostView { |
| + t.Helper() |
| + var last []byte |
| + if err := edgesFilePass(context.Background(), s, reg, edgesFile{Box: "annie", AcmeDir: acme}, "1.2.3.4", &last); err != nil { |
| + t.Fatal(err) |
| + } |
| + body, _, err := s.Get(context.Background(), "control/edges/annie.json") |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + var f struct { |
| + Hosts map[string]hostView `json:"hosts"` |
| + } |
| + if err := json.Unmarshal(body, &f); err != nil { |
| + t.Fatal(err) |
| + } |
| + return f.Hosts |
| + } |
| + hosts := publish() |
| + for _, name := range []string{"billing.example.com", "fresh.example.com"} { |
| + h, ok := hosts[name] |
| + if !ok || h.Role != "home" || !h.Alias || h.DNSPointing == nil || *h.DNSPointing { |
| + t.Errorf("%s = %+v (published %v); want home, alias, dns_pointing false", name, h, ok) |
| + } |
| + } |
| + if h := hosts["live.example.com"]; h.DNSPointing == nil || !*h.DNSPointing { |
| + t.Errorf("live.example.com = %+v; want dns_pointing true", h) |
| + } |
| + for _, absent := range []string{"nocert.example.com", "expired.example.com", "wrongname.example.com", "certonly.example.com", "link.example.com", "other.example.com", "outside.example.org", "badexample.com"} { |
| + if _, ok := hosts[absent]; ok { |
| + t.Errorf("%s must not be published before it points here", absent) |
| + } |
| + } |
| + |
| + // The certificate going away takes the name back out on the next pass. |
| + if err := os.Remove(filepath.Join(acme, "billing.example.com")); err != nil { |
| + t.Fatal(err) |
| + } |
| + if _, ok := publish()["billing.example.com"]; ok { |
| + t.Error("billing.example.com still published after its certificate was removed") |
| + } |
| + writeCertEntry(t, acme, "billing.example.com", []string{"billing.example.com"}, future, true) |
| + |
| + // With the scope unset, only pointing aliases are published, as before. |
| + t.Setenv("CARLOS_DNS01_ZONES", "") |
| + hosts = publish() |
| + if _, ok := hosts["billing.example.com"]; ok { |
| + t.Error("scope off: billing.example.com must wait for the pointing stamp") |
| + } |
| + if _, ok := hosts["live.example.com"]; !ok { |
| + t.Error("scope off: a pointing alias must still be published") |
| + } |
| +} |
| + |
| +// A box with no apps domain never stamps DNS, so a pre-issued alias there must |
| +// still carry an explicit false: an absent mark reads as pointing, which |
| +// would put the name in the issuer's HTTP-01 warm set. |
| +func TestEdgesFilePreIssuedAliasMarkWithoutAppsDomain(t *testing.T) { |
| + withheldAliasSaid = sync.Map{} |
| + t.Setenv("PLATFORM_APPS_DOMAIN", "") |
| + t.Setenv("CARLOS_DNS01_ZONES", "example.com") |
| + t.Setenv("CARLOS_DNS01_ACCOUNTS", "acct") |
| + s, reg := release.NewDirStore(t.TempDir()), edgesTestRegistry(t) |
| + if err := reg.Upsert(registry.Route{Host: "app.example.net", Kind: "service", Addr: "10.0.0.1:3000", Status: "ready", Platform: true}); err != nil { |
| + t.Fatal(err) |
| + } |
| + if err := reg.UpsertAlias(registry.RouteAlias{Alias: "billing.example.com", Host: "app.example.net", Account: "acct", App: "app"}); err != nil { |
| + t.Fatal(err) |
| + } |
| + acme := filepath.Join(t.TempDir(), "acme") |
| + writeCertEntry(t, acme, "billing.example.com", []string{"billing.example.com"}, time.Now().Add(80*24*time.Hour), true) |
| + var last []byte |
| + if err := edgesFilePass(context.Background(), s, reg, edgesFile{Box: "annie", AcmeDir: acme}, "1.2.3.4", &last); err != nil { |
| + t.Fatal(err) |
| + } |
| + body, _, err := s.Get(context.Background(), "control/edges/annie.json") |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + var f struct { |
| + Hosts map[string]struct { |
| + DNSPointing *bool `json:"dns_pointing"` |
| + } `json:"hosts"` |
| + } |
| + if err := json.Unmarshal(body, &f); err != nil { |
| + t.Fatal(err) |
| + } |
| + h, ok := f.Hosts["billing.example.com"] |
| + if !ok || h.DNSPointing == nil || *h.DNSPointing { |
| + t.Fatalf("billing.example.com = %+v (published %v); want an explicit dns_pointing false", h, ok) |
| + } |
| +} |
| + |
| +// The writer reads the cache the edge actually serves from: a certificate |
| +// only in the default directory does not count when the edge was given |
| +// another, and the one in the configured directory does (Astra R2 P2). |
| +func TestEdgesFilePreIssuedAliasReadsTheConfiguredCache(t *testing.T) { |
| + withheldAliasSaid = sync.Map{} |
| + t.Setenv("PLATFORM_APPS_DOMAIN", "apps.test") |
| + t.Setenv("CARLOS_DNS01_ZONES", "example.com") |
| + t.Setenv("CARLOS_DNS01_ACCOUNTS", "acct") |
| + dataDir := t.TempDir() |
| + t.Setenv("CARLOS_DATA_DIR", dataDir) |
| + configured := filepath.Join(t.TempDir(), "edge-cache") |
| + future := time.Now().Add(80 * 24 * time.Hour) |
| + writeCertEntry(t, filepath.Join(dataDir, "acme"), "stale.example.com", []string{"stale.example.com"}, future, true) |
| + writeCertEntry(t, configured, "billing.example.com", []string{"billing.example.com"}, future, true) |
| + |
| + s, reg := release.NewDirStore(t.TempDir()), edgesTestRegistry(t) |
| + if err := reg.Upsert(registry.Route{Host: "app.acct.apps.test", Kind: "service", Addr: "10.0.0.1:3000", Status: "ready", Platform: true}); err != nil { |
| + t.Fatal(err) |
| + } |
| + for _, a := range []string{"billing.example.com", "stale.example.com"} { |
| + if err := reg.UpsertAlias(registry.RouteAlias{Alias: a, Host: "app.acct.apps.test", Account: "acct", App: "app", DNSStatus: "elsewhere"}); err != nil { |
| + t.Fatal(err) |
| + } |
| + } |
| + dir := edgeAcmeDir(os.Getenv, configured) |
| + if dir != configured { |
| + t.Fatalf("edgeAcmeDir with a flag = %q, want %q", dir, configured) |
| + } |
| + var last []byte |
| + if err := edgesFilePass(context.Background(), s, reg, edgesFile{Box: "annie", AcmeDir: dir}, "1.2.3.4", &last); err != nil { |
| + t.Fatal(err) |
| + } |
| + body, _, err := s.Get(context.Background(), "control/edges/annie.json") |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + var f struct { |
| + Hosts map[string]json.RawMessage `json:"hosts"` |
| + } |
| + if err := json.Unmarshal(body, &f); err != nil { |
| + t.Fatal(err) |
| + } |
| + if _, ok := f.Hosts["billing.example.com"]; !ok { |
| + t.Error("billing.example.com: its certificate is in the configured cache, want it published") |
| + } |
| + if _, ok := f.Hosts["stale.example.com"]; ok { |
| + t.Error("stale.example.com: its certificate is only in the default directory the edge is not using") |
| + } |
| +} |
| + |
| +// One derivation of the edge's cache for every agent reader: the domains |
| +// sweep's default and the writer's must be the same directory. |
| +func TestEdgeAcmeDirIsTheSweepsDefault(t *testing.T) { |
| + env := map[string]string{"PLATFORM_APPS_DOMAIN": "apps.test", "CARLOS_DATA_DIR": "/srv/carlos"} |
| + getenv := func(k string) string { return env[k] } |
| + cfg, _, _ := domainsTickConfig(getenv, "") |
| + if want := edgeAcmeDir(getenv, ""); cfg.AcmeDir != want || want != "/srv/carlos/acme" { |
| + t.Fatalf("sweep AcmeDir %q, edgeAcmeDir %q; want both /srv/carlos/acme", cfg.AcmeDir, want) |
| + } |
| + if got := edgeAcmeDir(func(string) string { return "" }, ""); got != "/data/acme" { |
| + t.Fatalf("edgeAcmeDir default = %q, want /data/acme", got) |
| + } |
| +} |
diff --git a/internal/host/fleet_secrets_key_test.go b/internal/host/fleet_secrets_key_test.go| index adec34b66..c94478bd7 100644 |
| --- a/internal/host/fleet_secrets_key_test.go |
| +++ b/internal/host/fleet_secrets_key_test.go |
| @@ -306,7 +306,7 @@ func TestFleetBoxWritesNoEdgesFile(t *testing.T) { |
| done := make(chan struct{}) |
| go func() { |
| defer close(done) |
| - edgesFileLoop(nil, false, nil) |
| + edgesFileLoop(nil, false, nil, "") |
| }() |
| select { |
| case <-done: |
diff --git a/internal/host/group_names_test.go b/internal/host/group_names_test.go| index e33cae1ce..bd8dfacd3 100644 |
| --- a/internal/host/group_names_test.go |
| +++ b/internal/host/group_names_test.go |
| @@ -472,6 +472,12 @@ func (p *haIngressProjection) publishAliases(names map[string]Route) { p.aliases |
| // on exact route rows only, never on an alias, platform alias or "*." |
| // row: the row's own owner and path eligibility. The hosts it publishes |
| // and their classes are unchanged. |
| +// - edgesFileWriteClaims (#1293) also publishes a plain alias before its |
| +// DNS sweep stamps it pointing, when edge.DNS01Scope allows its name and |
| +// account and the edge cache holds a usable per-host certificate for it, |
| +// marked dns_pointing false. Same class (plain alias, the same exact |
| +// name, owner and target as once pointing), published earlier; no new |
| +// name or class is derived. |
| // - Reload keeps route_paths rows whose host this box does not serve as a |
| // remote path map (buildRemotePaths) beside the hosts map, in one |
| // published snapshot. It is keyed by a claim's own exact host, skips |
| @@ -573,7 +579,7 @@ var groupNameProducerInventory = map[string]string{ |
| "claimunit_binding.go:claimUnitShape.route": "f38fd6e10aba680354ee908c255fd34e731fe2d1a22fffd41ac449e8b763dd2c", |
| "claimunit_policy.go:claimUnitShapeCheck": "45f16830e5ed834995ca573a710f1e390a504b7eb78c3c0465ac70e7f306e50c", |
| "claimunit_policy.go:rootClaimRestartShape": "1d0370516c32482b1784f4bd4ab0deb042c31120d81f4dc8c417f52b24ef76ac", |
| - "edgesfile.go:edgesFileWriteClaims": "f11d942ae79fac583a351f446f03004496343a787b6719a4f9204e1f0c256788", // held floor capability: constant ha_handover=1 on every pass; linked deployments: link forward rows published as exact forward names; path routes across boxes (#186): route owner and path_front/path_target on exact route rows only; no name or class derivation |
| + "edgesfile.go:edgesFileWriteClaims": "173797552318b6d235471c32f9b2153d6d25f7d2e1c4f7909b3fffa372d24b99", // held floor capability: constant ha_handover=1 on every pass; linked deployments: link forward rows published as exact forward names; path routes across boxes (#186): route owner and path_front/path_target on exact route rows only; pre-issued plain aliases before pointing (#1293), same class, dns_pointing false; no name or class derivation |
| "movesheldenv.go:composeHeldEnv": "17ad3714758d1c07a71375734c125496855a16ca800eb814bde58283d3a5318b", |
| "movesheldrelease_root.go:heldReleaseRoute": "10bf824edc963319a38a47b91877b865977b1dc4a27c6e7680c46704289a7df7", |
| "movesstage.go:heldReleasePublished": "edad51c04a01657b77a9fc469404db5fde51cff1f2c61e243d6a717fb6224e85", |
diff --git a/internal/provision/testdata/plan14-root-reads-alias-publish-precert-1293.tsv b/internal/provision/testdata/plan14-root-reads-alias-publish-precert-1293.tsv| new file mode 100644 |
| index 000000000..fe024b788 |
| --- /dev/null |
| +++ b/internal/provision/testdata/plan14-root-reads-alias-publish-precert-1293.tsv |
| @@ -0,0 +1,16 @@ |
| +# Census overlay alias-publish-precert-1293, written by census-propose (#369). census-ruling-alias-publish-precert-1293, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-alias-publish-precert-1293.md. |
| +# 2 body, 1 sites, 3 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +# 3 new dispositions: 0 reads re-frozen at their disposition with the claim, 2 new units frozen accepted-legacy, 1 quiet units retired while they read nothing, 0 other. |
| +@legacy 68b6a36b116b67087a57c727659810163456a951e35ec4a36f3d671912136335 internal/edge/edge.go RunWithActivatorReady legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-certwarm-wake;basis=registers the cert warm's nudge on OnReload and on the home map's new served-hosts wake (#386); nudge only sends on a buffered channel; no read added, same 5 sites;rev3=census-ruling-edge-roll-blip;basis=the :80/:443 (and dev) listeners are bound on the calling goroutine with net.Listen via listen()/listenAddr (same empty-address defaults as ListenAndServe) before the serve goroutines, which now call Serve/ServeTLS on them, and one log line names the bound addresses; no read added, same 5 sites;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): the inline home-map arming (newHomeMap, one boot Refresh, Store, run) moves unchanged into the new Edge.ArmHomeMap and is called here as e.ArmHomeMap(); same refresh, same timeout, same order. The reads are moved, none added.;rev3=census-ruling-agent-start-demo-1;basis=Logs the combined explicit wildcard parents through demoWildcardDomains; no new watcher or read loop.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: invoke the local admission Close before HTTP/HTTPS draining and door shutdown in both dev and normal listeners. Preserve merged main's startup behavior and its census basis; the same five read sites, no new reads.;rev3=census-ruling-stateless-replicas-3;basis=Task 1b: defer stopping and joining the edge's replica jobs at shutdown. Existing five direct read sites unchanged; no new reader or authority.;rev3=census-ruling-region-ha-p3b;basis=Wrap dev, HTTP and HTTPS listeners through ConfigureGroupHairpin before serving. Indirectly read protected root boot identity and group-ingress.json; kernel local/peer addresses mark local ingress, never HTTP headers. Agent edge uses verified public source for accounting; direct read sites unchanged and absent marker keeps original listeners. CI fix removes interface enumeration: local peer must match snapshot primary IPv4, an ingress IPv4 installed locally by root, or loopback; kernel destination must still be an ingress EIP on port 80/443. Merge 45cebde4 retains deferred stopReplicaProbes alongside group listener wrapping and shutdown admission closure.;rev3=census-ruling-demo-api-site-route;basis=Change the startup failure context from load routes to initialize because origin validation now runs during construction. Existing five read sites unchanged; no new read or runtime authority.;rev3=census-ruling-region-ha-graceful-terminate-t2;basis=Invoke the agent shutdown timestamp hook synchronously at SIGTERM/SIGINT receipt before closing admission in dev and TLS paths. No read added.;rev3=census-ruling-region-ha-held-build;basis=region HA held-requests Task 5: registers the https and http servers with the connection drain (conns.serve) so a drain can close idle keep-alive connections; no read added;rev3=census-ruling-warm-set-published-724;basis=#724: the inline cert warm construction (newCertWarm over warmSet and dnsGate, then OnReload and setServedWake registering warm.nudge) moves unchanged into the new Edge.newIssuerWarm in certwarm.go and is called here with the same apps domain, parents, perHostCert, warmResolver, edgeIPs and store; the loop still starts here. The warm set it wires now reads the published edges files through the home map (OwnServedHosts and ServedHosts, both already polled) instead of the local route table, regional names aside. It is a different source, not a subset: an attached name not yet published as pointing is no longer listed, while a name the route table has already dropped stays listed until this box's next edges file write and the home map's next poll catch up (HostPolicy still refuses an order for a name the registry no longer holds). A name published not pointing is not a warm candidate at all, whether or not its certificate is cached: the warm neither looks it up, orders it nor re-arms its renewal until its home box publishes it pointing again (a cached certificate keeps serving and re-arms on a handshake at the issuer). The warm reads the set only after the issuer gate, and the read is in memory (route table and the home map's last snapshot); it also drops a DNS-miss entry for a name that has left the set before probing it. It keeps a failure record while any box publishes the exact name (the home map DeployedHosts: every box's file, own included, pointing or not, the same in-memory snapshot) or the name is a regional route-table name, and prunes it only once no box publishes it. That retention set has no apps-domain or wildcard filter (those stay on candidacy only), so a name published not pointing, or one a wildcard parent starts covering, keeps the record that explains its backoff; the set is never a source of candidates. No read site added in this unit, same 5 sites.;rev3=census-ruling-w6-ingress-drain;basis=the two public servers are built by e.publicServers (internal/edge/ingressdrain.go): :443 as before (same handler, TLS config and ReadHeaderTimeout 10 s), :80 now wrapped by plainTracked so the ingress drain can count and close its requests (its barrier is never §25's); Serve's error test is listenerFailed(err) = err != nil && !errors.Is(err, http.ErrServerClosed) (was err != ErrServerClosed), so a graceful Shutdown by the drain is not fatal. New Edge.plain connDrain field. Same flags, addresses and listeners; read sites unchanged (5); no read added.;rev3=census-ruling-edge-ppv2;basis=Edge process (uid carlos), not root. Edge gains the proxy atomic.Pointer. Outside dev mode, before either public listener binds and before the ready hook hands the Edge to the agent, calls e.loadProxyIngress(os.Getenv, dataDir): CARLOS_INGRESS_PROXY_SOURCES from the edge's own environment (carlos-edge.service loads the root-owned 0600 host.env) through hostenv.ParseProxySources; blank leaves the edge unarmed with nothing read; a non-empty list arms it and Lstats <dataDir>/edge/trust-barrier (armProxyIngress); a value that does not parse is log.Fatal. After the hairpin configuration, wrapProxyIngress wraps both public listeners outermost (returns them untouched when unarmed); when armed it logs the armed line and starts runProxyJournal (counters to the journal, no reads). The existing 5 read sites are unchanged.;rev3=census-ruling-audit-request-path;basis=the dev-mode http.Server gains IdleTimeout: publicIdleTimeout (120 s) beside its ReadHeaderTimeout; comment updated. Same 5 read sites, no read added.;rev3=census-ruling-precert-dns01-1293;basis=the edge process (carlos-edge.service, user carlos), not root: after the cert warm starts, calls e.newPreIssuerFromEnv(certCache, mirror, wm) and, when it returns non-nil, starts its loop and logs one line. newPreIssuerFromEnv (precert.go) reads CARLOS_DNS01_ZONES and CARLOS_DNS01_ACCOUNTS from the edge environment (the root-owned host.env); either unset or invalid = nil, nothing else read. Only claims of the named accounts qualify. Armed, the loop runs only while this box holds the issuer gate: it lists domains/ claims in the deployment bucket through a ClaimCache, and for proven claims under the listed zones orders a certificate over DNS-01 through the existing DNS provider seam (dnsProviderFromEnv, same IAM-scoped _acme-challenge TXT writes the wildcard manager already makes), writing the result through the existing publishing cache (local acme dir + control/certs/<host>). No root read; the existing 5 read sites are unchanged.;rev3=census-ruling-alias-publish-precert-1293;basis=the edge process (carlos-edge.service, user carlos), not root: the pre-issuer start log now reads its zones from p.scope.Zones (the zones and accounts moved into the shared edge.DNS01Scope); no behaviour change, no read added, the existing 5 read sites unchanged. data-literal@129,data-literal@148,data-literal@284,data-literal@417,file:Open@1013 59e23002365aaecb99ac7b0f5719095ade566b0e5d4b965fa8671574fa6f1996 |
| +@legacy 046f72ed4a9c6af5f13a820ddf815cda09320ac5a777f348d97b2568345f1dd8 internal/domains/certusable.go UsablePerHostCert legacy accepted-legacy accepted-legacy;rev3=census-ruling-alias-publish-precert-1293;basis=new: reads <acmeDir>/<host> for the box agent edges-file writer (#1293): host must pass validHostShape (lowercase DNS labels joined by dots, so exactly one file directly under acmeDir; empty, dot segments and separators refused), Lstat first and only a regular file under 64 KiB is opened (no symlink followed), read through a 64 KiB LimitReader, parsed only by tls.X509KeyPair and reduced to a boolean (key matches leaf, leaf names host, inside its validity). acmeDir is $CARLOS_DATA_DIR/acme from the operator environment, the edge cache root already reads in hostCertExpiry. Nothing executed, followed or written. file:Lstat@177,file:Open@289,file:ReadAll@365 2457e0a19f95249ab2ff4cc0b8cb0203a7c2e05b2eba56ad5f01c2918779d267 |
| +@legacy 2bf2aeee10655ba96827962edb8bc5838f667f122666281ed08472b6f8ddd479 internal/host/acmedir.go edgeAcmeDir legacy accepted-legacy accepted-legacy;rev3=census-ruling-alias-publish-precert-1293;basis=new: (in its own file so agent.go stays inside its code-health length record) the "/data" default and the "acme" join move here unchanged from domainsTickConfig (its two data literals); returns the -acme-cache flag when given, else $CARLOS_DATA_DIR (default /data) + /acme. A path computation from operator configuration; it reads nothing. data-literal@142,data-literal@183 c69fdf6215d9a5c40fdc190c5b7699e953f4f00bbc3163094503668a02f9ebf4 |
| +internal/edge/edge.go RunWithActivatorReady legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-certwarm-wake;basis=registers the cert warm's nudge on OnReload and on the home map's new served-hosts wake (#386); nudge only sends on a buffered channel; no read added, same 5 sites;rev3=census-ruling-edge-roll-blip;basis=the :80/:443 (and dev) listeners are bound on the calling goroutine with net.Listen via listen()/listenAddr (same empty-address defaults as ListenAndServe) before the serve goroutines, which now call Serve/ServeTLS on them, and one log line names the bound addresses; no read added, same 5 sites;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): the inline home-map arming (newHomeMap, one boot Refresh, Store, run) moves unchanged into the new Edge.ArmHomeMap and is called here as e.ArmHomeMap(); same refresh, same timeout, same order. The reads are moved, none added.;rev3=census-ruling-agent-start-demo-1;basis=Logs the combined explicit wildcard parents through demoWildcardDomains; no new watcher or read loop.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: invoke the local admission Close before HTTP/HTTPS draining and door shutdown in both dev and normal listeners. Preserve merged main's startup behavior and its census basis; the same five read sites, no new reads.;rev3=census-ruling-stateless-replicas-3;basis=Task 1b: defer stopping and joining the edge's replica jobs at shutdown. Existing five direct read sites unchanged; no new reader or authority.;rev3=census-ruling-region-ha-p3b;basis=Wrap dev, HTTP and HTTPS listeners through ConfigureGroupHairpin before serving. Indirectly read protected root boot identity and group-ingress.json; kernel local/peer addresses mark local ingress, never HTTP headers. Agent edge uses verified public source for accounting; direct read sites unchanged and absent marker keeps original listeners. CI fix removes interface enumeration: local peer must match snapshot primary IPv4, an ingress IPv4 installed locally by root, or loopback; kernel destination must still be an ingress EIP on port 80/443. Merge 45cebde4 retains deferred stopReplicaProbes alongside group listener wrapping and shutdown admission closure.;rev3=census-ruling-demo-api-site-route;basis=Change the startup failure context from load routes to initialize because origin validation now runs during construction. Existing five read sites unchanged; no new read or runtime authority.;rev3=census-ruling-region-ha-graceful-terminate-t2;basis=Invoke the agent shutdown timestamp hook synchronously at SIGTERM/SIGINT receipt before closing admission in dev and TLS paths. No read added.;rev3=census-ruling-region-ha-held-build;basis=region HA held-requests Task 5: registers the https and http servers with the connection drain (conns.serve) so a drain can close idle keep-alive connections; no read added;rev3=census-ruling-warm-set-published-724;basis=#724: the inline cert warm construction (newCertWarm over warmSet and dnsGate, then OnReload and setServedWake registering warm.nudge) moves unchanged into the new Edge.newIssuerWarm in certwarm.go and is called here with the same apps domain, parents, perHostCert, warmResolver, edgeIPs and store; the loop still starts here. The warm set it wires now reads the published edges files through the home map (OwnServedHosts and ServedHosts, both already polled) instead of the local route table, regional names aside. It is a different source, not a subset: an attached name not yet published as pointing is no longer listed, while a name the route table has already dropped stays listed until this box's next edges file write and the home map's next poll catch up (HostPolicy still refuses an order for a name the registry no longer holds). A name published not pointing is not a warm candidate at all, whether or not its certificate is cached: the warm neither looks it up, orders it nor re-arms its renewal until its home box publishes it pointing again (a cached certificate keeps serving and re-arms on a handshake at the issuer). The warm reads the set only after the issuer gate, and the read is in memory (route table and the home map's last snapshot); it also drops a DNS-miss entry for a name that has left the set before probing it. It keeps a failure record while any box publishes the exact name (the home map DeployedHosts: every box's file, own included, pointing or not, the same in-memory snapshot) or the name is a regional route-table name, and prunes it only once no box publishes it. That retention set has no apps-domain or wildcard filter (those stay on candidacy only), so a name published not pointing, or one a wildcard parent starts covering, keeps the record that explains its backoff; the set is never a source of candidates. No read site added in this unit, same 5 sites.;rev3=census-ruling-w6-ingress-drain;basis=the two public servers are built by e.publicServers (internal/edge/ingressdrain.go): :443 as before (same handler, TLS config and ReadHeaderTimeout 10 s), :80 now wrapped by plainTracked so the ingress drain can count and close its requests (its barrier is never §25's); Serve's error test is listenerFailed(err) = err != nil && !errors.Is(err, http.ErrServerClosed) (was err != ErrServerClosed), so a graceful Shutdown by the drain is not fatal. New Edge.plain connDrain field. Same flags, addresses and listeners; read sites unchanged (5); no read added.;rev3=census-ruling-edge-ppv2;basis=Edge process (uid carlos), not root. Edge gains the proxy atomic.Pointer. Outside dev mode, before either public listener binds and before the ready hook hands the Edge to the agent, calls e.loadProxyIngress(os.Getenv, dataDir): CARLOS_INGRESS_PROXY_SOURCES from the edge's own environment (carlos-edge.service loads the root-owned 0600 host.env) through hostenv.ParseProxySources; blank leaves the edge unarmed with nothing read; a non-empty list arms it and Lstats <dataDir>/edge/trust-barrier (armProxyIngress); a value that does not parse is log.Fatal. After the hairpin configuration, wrapProxyIngress wraps both public listeners outermost (returns them untouched when unarmed); when armed it logs the armed line and starts runProxyJournal (counters to the journal, no reads). The existing 5 read sites are unchanged.;rev3=census-ruling-audit-request-path;basis=the dev-mode http.Server gains IdleTimeout: publicIdleTimeout (120 s) beside its ReadHeaderTimeout; comment updated. Same 5 read sites, no read added.;rev3=census-ruling-precert-dns01-1293;basis=the edge process (carlos-edge.service, user carlos), not root: after the cert warm starts, calls e.newPreIssuerFromEnv(certCache, mirror, wm) and, when it returns non-nil, starts its loop and logs one line. newPreIssuerFromEnv (precert.go) reads CARLOS_DNS01_ZONES and CARLOS_DNS01_ACCOUNTS from the edge environment (the root-owned host.env); either unset or invalid = nil, nothing else read. Only claims of the named accounts qualify. Armed, the loop runs only while this box holds the issuer gate: it lists domains/ claims in the deployment bucket through a ClaimCache, and for proven claims under the listed zones orders a certificate over DNS-01 through the existing DNS provider seam (dnsProviderFromEnv, same IAM-scoped _acme-challenge TXT writes the wildcard manager already makes), writing the result through the existing publishing cache (local acme dir + control/certs/<host>). No root read; the existing 5 read sites are unchanged.;rev3=census-ruling-alias-publish-precert-1293;basis=the edge process (carlos-edge.service, user carlos), not root: the pre-issuer start log now reads its zones from p.scope.Zones (the zones and accounts moved into the shared edge.DNS01Scope); no behaviour change, no read added, the existing 5 read sites unchanged. data-literal@129,data-literal@148,data-literal@284,data-literal@417,file:Open@1013 59e23002365aaecb99ac7b0f5719095ade566b0e5d4b965fa8671574fa6f1996 |
| +internal/host/agent.go runAgent authority B,C,D,F rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): builds the box's lifetime judge once (newBoxJudge, nil with host claims on) and hands it to the seed placement, the moves and runs workers and every loop it starts; read sites unchanged, offsets moved; B,C,D,F authority retained; self-serve moves 1 Task 8: derives the box's lifetimes switch from the judge once (lifetimes := boxJudge != nil) and hands it to the edges file loop; read sites unchanged, offsets moved;rev3=census-ruling-plans-4d-lapse;basis=arms two more plans hooks from the same snapshot: e.SetPlanDisabledFor(planDisabledFor) beside SetPlanGovernedFor, and svc.SetDisabledFor(planDisabledRoute) beside SetMaxRunFor (plans 4d); the reads live in those units (plans-4d-units decision); read sites unchanged, offsets moved;rev3=census-ruling-rootfs-apps-2;basis=main's body as of the merge of origin/main 9b81d97b (with main's plan rate ceiling, edge request records, regional box names, self-serve moves plan 1, plans 4d-1 lapse and its other later changes under main's own census rulings) plus the rootfs placement wiring in the activator start: an agentRootfs built from eb.NestedOK, CARLOS_DEPLOYMENT_SINGLE_TENANT, CARLOS_POOLS, the claim flag, swapArming's answer, the control client's /ready/rootfs and, on a fleet box whose identity resolved, fleetOwnerCheck over the deploy store main already opens for the fleet label (fleetStore), then arm and armedRootfs.Store; this body reads nothing new itself; the closures it wires read later, at a rootfs wake and each status tick: GET /ready/rootfs over the control socket, NestedOK's checks, and release.FleetOwnerKey for the judged row's own account and this box's fleet from the deploy store;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Tasks 7 and 11, #329 plan 3 Task 7 and plan 1 Task 7's policy cache: the control client is built once and handed to eb.Control, to the status tick (egressStatus) and to a new egressNudgeLoop goroutine; armSizeSource(svc, "/sys/fs/cgroup") after the activator Service; armPolicyCache() after armChangeIndex; statusLoop takes egressStatus. The reads are those units' own (decision rows); this body reads nothing new: the same five sites, offsets moved, in the agent; B,C,D,F authority retained.;rev3=census-ruling-remote-instance-metrics;basis=builds the metrics loop's owners closure (metricsOwners over the agent's registry, the activator and cgm.Leftover) when an activator exists and hands it to metricsLoop; reads nothing new itself;rev3=census-ruling-edge-asset-cache-3;basis=adds file:Statfs. runAgent keeps its authority (B,C,D,F). The new site is assetcache.Statfs, an exported assetcache.FS interface value (var Statfs FS = statfsFS{}), not a function value and not a call in runAgent: the ready hook passes it to armEdgeAssetCache as the store's filesystem, and armEdgeAssetCache calls its Space method on the configured data directory (dataDir(): $CARLOS_DATA_DIR, else /data), which calls unix.Statfs there (statfsFS.Space, accepted legacy at census-ruling-edge-asset-cache-2). No request-supplied pathname reaches it.;rev3=census-ruling-remote-metrics-nested;basis=main's body (merged origin/main acfa4f80, under main's own census rulings) plus: snapshots the nested layout (snapshotNestedUnits over /sys/fs/cgroup/carlos.slice/carlos-instances.slice) once at start, before the activator, and hands the metrics loop a unitSources struct (stamped units, routeHostNames, that root and the snapshot); reads nothing new itself;rev3=census-ruling-region-ha-p1a;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): wires region HA P1a into the activator: cfg.Record = haRecordFacts(openDeployStore, boxJudge) (the box's lifetime judge this body already builds with newBoxJudge, nil with host claims on; CI fix) and cfg.Self = lease.CurrentSelf; eb.Lifetimes (the process's lifetime index), eb.Registry, eb.StartupSwept (seedSweptAtStart.Load), eb.FilesStore from newProductionFilesStore (now lease.NewFilesStore, rootaws-loaded, a log line on failure) and lease.SetObligationDir(<data>/.ha-owed) (logged on failure; HA acquires then refuse); this body reads nothing new itself, the same five sites; the reads are those units' own (haRecordFacts and lease's SetObligationDir are new rows on this card); merge of origin/main d7ae1d76: main's own later changes to this body are kept as main has them, under main's rulings (census-ruling-remote-instance-metrics: the metricsOwners closure for metricsLoop; census-ruling-edge-asset-cache-3: the +file:Statfs site, assetcache.Statfs handed to the asset ready hook); this branch's change is the same as above;rev3=census-ruling-region-ha-p1b1;basis=region HA P1b-1: builds one termfence.Confirmer (Self from lease.CurrentSelf at each call, EC2 DescribeInstances method only, client from rootaws.LoadDefaultConfig with retries off, built lazily on first use) and sets eb.OwnerTerminated; this body reads nothing new itself, the same six sites;rev3=census-ruling-rootfs-apps-3;basis=rootfs Plan 3 Task 7: the startup Sweep literal hands its answer to startupSwept, which logs as before and, only on a clean sweep, marks rootfs admission swept (MarkRootfsSwept); same Sweep call, no read added;rev3=census-ruling-managed-fleets-1b;basis=managed fleets 1b (controller ruling after branch review R1, and Paul's R2 ruling): sets svc.Fleet = fleetWakeFor(os.Getenv, identity, identErr, fleetStore) from the identity it already resolves once and the deployment store the fleet loops already opened, and logs an ERROR naming the identity error when the box is on a fleet with an invalid identity. fleetWakeFor reads CARLOS_REGION and CARLOS_FLEET from the same environment. Read sites unchanged (6). Agent, not root; a platform box is unchanged.;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 12: one call more beside armRunsPass, armInteractivePass(svc, reg, rolloutSink, boxJudge), in the same activator Configure hook, handing it the same box judge; fix round 1 (Astra P2, shutdown): after svc.Shutdown(ctx), shutdownInteractive(ctx) ends and joins every interactive session under the same shutdown budget; the worker's own reads are its units' (interactive.go); this body reads nothing new, the same six sites; merge of origin/main 6f1f6ca6: main's svc.Fleet = fleetWakeFor(...) and its invalid-identity ERROR line are kept as main has them (census-ruling-managed-fleets-1b); this branch's change is the same as above; read sites unchanged (6);rev3=census-ruling-fix-set-aside-exdev;basis=set-aside EXDEV fix: one field more on the agent ExecBackend literal, RawInstanceDir: layout.RawInstanceDir (a pure path join: <dataDir>/.instances/<InstanceID(host)>), so the start rule set-aside moves a copy out through the raw directory instead of through the nosymfollow bind; this body reads nothing new, the same six sites;rev3=census-ruling-durability-3a-escrow;basis=durability 3a Task 3: one more assignment beside eb.FilesStore: eb.EscrowKey = haEscrowKey(os.Getenv("CARLOS_SECRETS_KEY")), the agent's own environment parsed by appconfig.ParsePrivateKey as the moves pass parses it (unset or unparseable: a log line and nil, and HA publication refuses on the box). No path is opened or read, no read site added; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 4: one more goroutine beside configSyncLoop: go escrowLoop(agentCtx, reg, svc), the escrow sweep every 30 s over the same registry and Service. This body reads nothing new itself; the same six sites, offsets moved; B,C,D,F authority retained. Durability 3a Task 5: one more call beside eb.EscrowKey: wireRawSecretPages(eb, PageOperator, metricsBoxLabel(os.Getenv, readMachineID())), which sets eb.OnRawSecret to page an operator (alerting.Page through PageOperator, LevelIncident) on its own goroutine with a 20 s timeout; metricsBoxLabel and readMachineID are the reads this body already makes for the moves refusal log; no new read site; the same six sites, offsets moved; B,C,D,F authority retained. Merge of origin/main 90c4d3aa: main's own later changes to this body are kept as main has them, under main's rulings; this branch's change is the same as above. Merge of origin/main 00bf5b8c (fleet set-aside EXDEV fix): main's change to this body is kept as main has it, under its own census ruling; this branch's change is unchanged.;rev3=census-ruling-probe-burst-limit;basis=two more sink wirings beside setAnalyticsSink: setProtectionSink(e.SetProtectionRecordOnly) and setAssetOwnersSource(e.AssetOwners), function values the telemetry pass calls; this body reads nothing new, the same six sites; authority B,C,D,F retained; no new root read or write kind;rev3=census-ruling-region-ha-p1b3a;basis=Arm HA placement exactly once on the existing Service before activatorStart and edges publication, wiring AwakeApps and the PageOperator callback; existing six read sites unchanged, no new root authority.;rev3=census-ruling-stateless-replicas-1;basis=Final review I3: start the concrete coordinator's renewal worker with agent setup; existing closeReplicaCoordinator shutdown cancels and joins it before release. No new read sites or credentials. Merge origin/main c59715e7: retain main's armHAPlacement(svc, PageOperator) wiring beside the existing activator setup; stateless coordinator and shutdown wiring remain. Same read sites; no new root read or credential.;rev3=census-ruling-edge-held-streams;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): in the edge-ready callback, calls act.SetHeldWakeHook(e.HeldWake) when act is non-nil (installing the non-blocking wake callback) and stores e.HeldStreamsForStatus in heldStreamsSource. Wiring of in-memory callbacks only; no read added.;rev3=census-ruling-region-ha-p1b3b-t;basis=Wire Service.SetDutyView to the live edge DutySnapshot in the ready callback. No new read; no new loop or cloud operation. B2 wires the registry as the persistent DutyStore before service startup; no new cloud or filesystem path. B3b: arm one journal-backed termination consumer before service startup using agentCtx and the shared confirmer; expose edge tick and join at edge shutdown. No new direct read sites.;rev3=census-ruling-agent-start-demo-1;basis=Passes the existing registry, data store and hibernation prefix into the demo worker, and the existing instance-control client into the demo before-exec hook. No alternate data store or polling loop. Merge resolution against origin/main 9bd45488 retains main's HA departure controller, lifecycle and duty wiring alongside the demo data store and worker; no read site added by the resolution.;rev3=census-ruling-region-ha-p3a;basis=P3a Task 3: install closed fixed admission before every launch source, bind activator/backend and edge, wire the real termination Started lifecycle and role reader after the change index; close before cancellation/child shutdown. No new external reads or cloud authority. Fix R1: move bind/lifecycle/edge-option wiring into wireAgentAdmission and worker listing into runWorkerBootPassAfterAdmission. Worker boot waits for admission before listing then uses unchanged bounded wakes and per-host serialization; whole Route read moves to the helper. No new storage, cloud, or root execution authority. Preserve merged main's agent wiring and census basis; the branch removes one whole Route use by moving worker iteration to the helper, with no added read kind.;rev3=census-ruling-stateless-replicas-2;basis=Slice 3b: arms a fleet-only worker using the existing registry, activator, backend and authenticated console transport. Owned worker stops and joins at shutdown. No new bucket reader. merge of origin/main 9b8b2c50: retain HA duty/departure lifecycle, wake-slot and existing agent wiring alongside the replica placement worker; no new read introduced by resolution. merge of origin/main 6be08467: Retain main demo configuration, admission, build and expiry wiring alongside the replica worker; merge-only body change, no additional read. merge of origin/main 7920cccf: Retain main box-role/group admission wiring and boot publication beside the owned replica worker and shutdown; main moves the boot registry List into runWorkerBootPassAfterAdmission, removing its inline whole Route site. No new read introduced by conflict resolution.;rev3=census-ruling-stateless-replicas-3;basis=Task 1 fix round 1 M3: retain the private snapshot source and cancel/join ownership, but use the replica-health-specific retry loop. It logs its first failure only and retains the existing exponential backoff capped at 30 seconds; unsupported builds return nil. Existing five direct read sites unchanged; no new credentials, bucket reader or app lifecycle action. Fix round 1 Q20: publish Edge.ReplicaSnapshots as a separate in-memory status source, leaving the tenant-visible Upstreams source unchanged. No new external reader or authority.;rev3=census-ruling-region-ha-p3b;basis=Load root-written group marker/configuration, configure signed boot binding and agent receipt completer, wire cancellable admission into departure work and expose cached GroupReaderSnapshot. New indirect boot reads use protected root files; agent-owned receipt controls duplicate initial completion only, never root restart permission. Same five direct sites. Merge 45cebde4 retains the replica health socket lifecycle and setReplicaSource beside GroupReaderSnapshot; no extra read beyond main.;rev3=census-ruling-agent-start-demo-2;basis=agent.go:309-329 opens demo-traffic.db beside the operator-configured registry when a demo domain exists, closes it at shutdown and wires drain-before-purge; :1010-1019 shares the worker and write gate; :1164-1177 installs the fleet identity and closed-until-worker serving callback. One added whole Route pass; the new indirect filesystem/SQL reads are claimed in openDemoTraffic and worker/store units. No request chooses the database pathname.;rev3=census-ruling-region-ha-p1b3b-s;basis=Wire the service duty view to authoritative cached sidecar manifest placement in LifetimeIndex and the edge sidecar projection; missing policy denies duty. Existing instance duty wiring remains.;rev3=census-ruling-region-ha-g2-t3;basis=T3a: wire eb.Page = PageOperator beside OwnerTerminated before departures arm, so suspect-holder pages work if departure setup fails; no new read; existing nine sites and authority unchanged; pages through the existing sink. T3b: publish the same backend through an atomic pointer for the metrics observer, and clear it on return; no new external read or authority.;rev3=census-ruling-agent-start-demo-3;basis=Wire the claim activator and root snapshot client into the demo worker; pass moved readiness to status reporting. Census read-site delta: unchanged (9).;rev3=census-ruling-region-ha-g2-fixes;basis=Wire local pool evidence, live withdrawal activator, startup ingress scan and alias publication, and edge lookup; no new direct sites; new indirect record/claim reads use existing store/judge paths described in ingress helpers.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3: starts the existing record-view backstop loop with a departure-inventory listener (non-blocking, coalesced signal) even without an armed RecordView; it requests the existing full pass (backstopFullDue) there. Same nine read sites; no new read or authority.;rev3=census-ruling-region-ha-graceful-terminate-t2;basis=Derive one signal-time deadline with a 90-second budget; cap departure stop and startup/seed/service shutdown joins by it. No read added.;rev3=census-ruling-static-sweep-periodic;basis=in the edge-ready callback, publishes e.LargestStaticTree in staticTreeSource for the disk alert line (diskAlertFrac in the metrics loop); in-memory wiring only, no read added; read sites unchanged (9);rev3=census-ruling-edge-page-cache-1;basis=wires the exec backend's CurrentInputs into the edge cache (wireCurrentInputs) and, in the ready hook after armEdgeAssetCache (whose returned store it now keeps), calls armEdgePageCache, which does nothing unless CARLOS_PAGE_CACHE=1; read sites unchanged (9); no read added;rev3=census-ruling-gvisor-demos;basis=Capture sandbox resolution and refusal once; log errors once; gate route admission and BeforeExec before process launch. No new root read. Task 5: pass the once-captured sandbox effective mode/config error into ExecBackend, UnitBackend and the immutable Client expectation. Same startup environment/registry reads; swapArming declines gVisor before placement. Task 8: arm read-only status projection with the existing Client.SandboxStatus callback. Agent status now queries the existing root /ready endpoint; no new root authority or guest-file input. Merge2 e8a1ddde: retain main wireCurrentInputs and armEdgePageCache through the existing asset-store ready hook alongside branch once-captured sandbox mode, wake gates and root status wiring. No new direct read; main page-cache helpers retain their own census overlays.;rev3=census-ruling-region-ha-held-build;basis=wires the drain state: svc.SetDrainingSource(boxDrain.IsDraining), svc.SetPeerDrainView(e.PeerDraining), e.SetPeerDrainedHook(svc.DropHoldersNaming); in-memory only; no read added; region HA held-requests Task 5: on group members, starts the drain driver over the activator, the edge and boxDrain, and serves its root-only drain socket; no read added beyond the socket's own Branch review r1: the drain state follows the root start fence on group members (the fence reader is the existing fenceLocation.read, a root-owned fixed path); e.SetPeerUndrainedHook(svc.AllowHoldersNaming) beside the drained hook (memory only); the drain socket serves only the agent's own user. No read added.;rev3=census-ruling-security-review-mitigations;basis=Wire the cached operator flat-layout choice into the exec backend's new-resident refusal; no read source added, existing authority retained.;rev3=census-ruling-w6-ingress-drain;basis=agent (user carlos), not root. Builds the ingress drain (newIngressDrain) with arming read at ask time from os.Getenv (CARLOS_REGION_HA, CARLOS_INGRESS_TARGET_GROUPS, both from the root-owned host.env), the fixed admission and lease.CurrentSelf (existing IMDS identity); its reader is awstg.Load, the box role's credentials calling ELB DescribeTargetHealth/DescribeTargetGroupAttributes (new AWS reads, by the agent). Wires admission.closeStartsForIngressDrain, the lbhealth drain condition, ingress.setEdge, and ingress.shutdownStarted in WithShutdownStarted. The drain socket (/run/carlos/.ha-drain/drain.sock, agent-user only, existing) is now also served on a fixed box with the drain configured (was group members only), routing /v1/ingress/* to the ingress drain and the group drain verbs to 404 there. armHADepartures now takes fixtureDepartureGetenv() and MakeQueue fixtureDepartureQueue(), which in a production (non-rootrunner) build are os.Getenv and nil, as before. Read sites unchanged (9).;rev3=census-ruling-stateless-replicas-4-task1;basis=Arms the fleet-only replica swap worker next to the placement worker: same console URL and fleet token as the existing replicaCoordinatorAPI, the existing activator Service; stops and joins at shutdown. No new read site, credential or bucket reader.;rev3=census-ruling-stateless-replicas-4-task2;basis=Task 2: sets deployWorker.step to the rollout scheduler answer for the record permit (replicaStepOf over armedRollout), an in-memory callback; no read site, credential or bucket reader added.;rev3=census-ruling-stateless-replicas-4-task2-fix2;basis=Task 2 fix round 2: the swap worker step is armedReplicaStep, the same lazy scheduler lookup as before as a named function; no read site added.;rev3=census-ruling-stateless-replicas-4-merge-main;basis=Merge of main 5fac2ff1: both sides changed it. Main (01d6ca78, linked-deployments-slice1) starts linkLoop beside tunnelLoop; this branch keeps its replica coordinator wiring. Both kept as-is; no read added.;rev3=census-ruling-stateless-replicas-4-final;basis=#511 final wave item 2: wires the swap worker's drive (armedReplicaDrive, the armed rollout manager's DriveReplicaRelease); no read added;rev3=census-ruling-stateless-replicas-4-merge-main2;basis=Merge of main af871da0 (v0.34.49): both sides changed it. Main (178dcfe5, member-backups-2a) moves the inline duty-view closure into armDutyView/dutyView and starts verifyAssignLoop; its sites drop by registry:Host and whole:Route x2 as main recorded them. This branch keeps its replica coordinator, swap worker and drive wiring. Both kept as-is; no read added.;rev3=census-ruling-stateless-replicas-4-drill3;basis=drill 3 R24: makes one in-memory channel, closes it (once) inside the edge's existing shutdown-started callback after ingress.shutdownStarted, and passes it to tunnelLoop, which drains only a fleet channel name; no read added, same six sites; touches no admission, lease, ingress drain, listener or file; the agent process, no root decision;rev3=census-ruling-edge-ppv2;basis=Agent (uid carlos), not root. memwatchLoop now gets edgeProxyCounters(&demoEdge) (in-process counters, no read). The drain socket's driver is newAgentDrainSocket(ingress, e, os.Getenv), which attaches the edge trust handler only when CARLOS_INGRESS_PROXY_SOURCES in the agent's environment (from the root-owned host.env) parses to a non-empty list; the socket is served when drainSocketServed: a group member or a configured ingress drain (both as before), or a box armed for PROXY protocol (new). The socket's path and agent-user-only permissions are unchanged. Read sites unchanged (6).;rev3=census-ruling-same-box-edge-fence;basis=Agent (uid carlos), not root. One added line: armEdgeFenceStatus(ctl.EdgeFence), beside the existing armExecSandboxStatus, so the layout report can ask root's /ready for the edge fence state over the control socket client the agent already holds. No read added.;rev3=census-ruling-platform-mail-submission;basis=Task 4: sets eb.Mail = mailsubmit.SocketForwarder{} on every box, and eb.MailSwitch to a mailSwitchCache's On that opens the deploy store itself through openDeployStore, retried at most once a minute with an error line until it opens (review round 1, Task 4 P3), armed for the serial-move refresh (armedMailSwitch). Task 6: also sets the ExecBackend's ManifestOf, the same staged-manifest read as TierOf (rt.App and RouteAccount(rt), hence +registry:App and +whole:Route), for the spawn-time check of decision 10, which logs and emits an event and never refuses. Agent, not root. Fable final P2-2: eb.MailSwitch is the cache's State (three-valued: on, off, unknown) in place of On; an unreadable switch is unknown, never off. No read added.;rev3=census-ruling-fleet-drain-followups;basis=P3 (#1008 T9): one call after armChangeIndex, requestBootFullPass(v, &backstopFullDue), which stores true in the existing in-memory backstopFullDue flag only when no record view is armed, so the fast loop runs its existing full pass on its first tick instead of instancesLoop a minute later; armed boxes unchanged. No read added; read sites unchanged (8); agent, not root.;rev3=census-ruling-fleet-first-reconcile-speed;basis=Startup timing log lines only: runDuties builds a step logger (newStartupLog, which reads the in-memory agent start time) and logs one line after the wait on the activator startup latch and after each existing duty before go fastConvergeLoop. One newStartupLog().at line in the edge ready hook before go tunnelLoop. No read added; read sites unchanged (8). Agent, not root.;rev3=census-ruling-ha-1192;basis=sets the group drain driver's departed hook to armedPeerDeparted (the armed departure controller's PeerDeparted: local registry identity + departure journal); no new read;rev3=census-ruling-replica-wake-gap-r3;basis=Calls lease.SetContinuityDir(<data dir>/.continuity) beside the existing obligation store: the agent's own 0700 directory for clean records, outside every instance tree (#1290 round 3). No new read; failure is logged and every start then takes a full image.;rev3=census-ruling-fleet-restart-wake;basis=Fleet restart wake Task 2: cfg.ReplicaRecord = replicaRecordFacts(boxLifetimes, cfg.Record): hands the existing judged record read (haRecordFacts over openDeployStore and boxJudge) as the live read on a lifetime index miss. No read site added here; agent, not root.;rev3=census-ruling-alias-publish-precert-1293;basis=starts edgesFileLoop with one more argument, edgeAcmeDir(os.Getenv, peekAcmeCache(args)): the agent's own -acme-cache flag (already parsed for domainsLoop) or $CARLOS_DATA_DIR/acme; a string computed from the operator's command line and environment, no read. Same 8 read sites. file:Exec@22002,file:Open@2191,file:Statfs@58453,registry:App@13299,registry:App@13677,whole:Route@13291,whole:Route@13669,whole:Route@51668 1a8ab6710ec49bfb31045fc06b89b0490d61823d2ba2db269929c76974de1c32 |
| +internal/domains/certusable.go UsablePerHostCert legacy accepted-legacy accepted-legacy;rev3=census-ruling-alias-publish-precert-1293;basis=new: reads <acmeDir>/<host> for the box agent edges-file writer (#1293): host must pass validHostShape (lowercase DNS labels joined by dots, so exactly one file directly under acmeDir; empty, dot segments and separators refused), Lstat first and only a regular file under 64 KiB is opened (no symlink followed), read through a 64 KiB LimitReader, parsed only by tls.X509KeyPair and reduced to a boolean (key matches leaf, leaf names host, inside its validity). acmeDir is $CARLOS_DATA_DIR/acme from the operator environment, the edge cache root already reads in hostCertExpiry. Nothing executed, followed or written. file:Lstat@177,file:Open@289,file:ReadAll@365 2457e0a19f95249ab2ff4cc0b8cb0203a7c2e05b2eba56ad5f01c2918779d267 |
| +internal/host/acmedir.go edgeAcmeDir legacy accepted-legacy accepted-legacy;rev3=census-ruling-alias-publish-precert-1293;basis=new: (in its own file so agent.go stays inside its code-health length record) the "/data" default and the "acme" join move here unchanged from domainsTickConfig (its two data literals); returns the -acme-cache flag when given, else $CARLOS_DATA_DIR (default /data) + /acme. A path computation from operator configuration; it reads nothing. data-literal@142,data-literal@183 c69fdf6215d9a5c40fdc190c5b7699e953f4f00bbc3163094503668a02f9ebf4 |
| +internal/host/edgesfile.go edgesFileWriteClaims authority F,J1 rev3=census-ruling-self-serve-moves-1;basis=root-route;kept=F;scope=protected-decision-only; the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): region-ha-2a's body, which with the box's lifetimes switch on also publishes each served row's lifetime pair (registry:Incarnation and registry:ServingSeq, two new sites on the rows it already lists) and an alias's or served catch-all's primary's pair, and names that primary as target_host whatever the switch; a report the edge orders unstamped entries by, not a decision; no record, /data, release or claim read added; F,J1 authority retained; self-serve moves 1 Task 8;rev3=census-ruling-instance-egress-sizes-328-329;basis=#328 plan 2 Task 8: takes a localAddrs reader (instancectl.LocalAddresses in production, which reads /proc/net/fib_trie and /proc/net/if_inet6 in the agent) and publishes its non-loopback entries as the edges file's addrs before the write gate (boxAddrs, no read of its own), so an address change writes once. The same 44 sites, offsets moved; no record, /data, release or claim read added; a report the console's egress grant check reads, not a root decision; F,J1 authority retained.;rev3=census-ruling-edge-asset-cache-3;basis=starts with assets = assets.active(), so a policy whose box has not opened its asset store publishes no assets blocks and reads no manifests, and copies the decision's Primary (the route host the block was decided for, drift D4) into the published assets block; read sites unchanged (44); no read added. Merged onto main's #328 body, which takes the localAddrs reader: the assets.active() line sits after that signature and the loop passes pub and instancectl.LocalAddresses;rev3=census-ruling-region-ha-p1a;basis=the agent as carlos: the claims argument (*edgesClaims) becomes addrs (AddressSource) and the applyEdgesClaims(ctx, claims, routes, hosts) call is deleted with edgesclaims.go, which is the one whole:Route site removed: no host claim is read and every served row publishes as with region HA off; the box-address publication is the same code reading addrs.BoxAddresses() instead of claims.addrs; a report the edge reads, not a root decision; no read added; merge of origin/main d7ae1d76: main's edge asset cache plan 3 body is kept (census-ruling-edge-asset-cache-3): the first line is assets = assets.active(), so a policy whose store has not opened publishes no assets blocks and reads no manifests, and edgesFileLoop passes pub (assets.active() for that tick) in the assets argument; main's claims *edgesClaims argument is this branch's addrs AddressSource, and no edgesClaims, applyEdgesClaims or hostclaim reference remains;rev3=census-ruling-alias-wake-338;basis=#338 follow-up: skips publishing a platform alias edge.PlatformAliasFold refuses (and so anything attached to it); reads the same route listing;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 6 and its fix rounds: publishes by FleetArmVerdict (via fleetRefusedFor): withheld rows left out; a forward host's path rows left out of its owner; no assets for forward rows; the alias loop replays Reload's alias fold from the served rows so a chained alias carries its root primary's owner; certRefused and parentRefused leave out a refused claim's wildcard parent (+registry:Alias x5, +registry:Host x4, +whole:Route, +whole:RouteAlias x2, +whole:RoutePath x7, +whole:WildcardDomain). Rows already read in the pass; keeps authority F,J1; publishes less, never more.;rev3=census-ruling-probe-burst-limit;basis=sets the constant BurstNotices=true on the box's own edges file (this build's edge answers probe-burst notices, so peers may send them); not from config or any read; the same 65 sites; a report other edges read, not a root decision; F,J1 authority retained; no new root read or write kind;rev3=census-ruling-region-ha-p3a;basis=Publish one injected role snapshot with box_role/admitted/drained; retain legacy route and alias rows during booting, cutting namespace withdrawal under the 2026-11-04 ruling; acknowledge the exact published tuple only after PUT; existing registry reads unchanged.;rev3=census-ruling-region-ha-p2b;basis=region HA P2b-1 T0 (Q1 ruling): before building the comparison copy and the body, a nil NamedPools on the identity becomes []string{} so the additive named_pools field is always an explicit array; the list itself is computed once at arm by edgesFileEligibility from the same provisionTickConfig(os.Getenv) parse as serves_shared_pool (CARLOS_POOLS through provision.ParseBoxPools, filtered to nonempty provision.ValidPool names, sorted, unique). A report the console reads for create admission, not a root decision; no record, /data, release or claim read added; read sites unchanged (65); F,J1 authority retained. One-off cost: the first pass after the upgrade writes once per box (seeded gate null vs []).;rev3=census-ruling-region-ha-p3b;basis=Require cached GroupReadersReady before first group publication and append additive names-2 capability even for supplied identities. Agent writes the same edges object/index with existing registry reads; known readers come from root boot configuration, snapshot from existing fold, no added GET/LIST or root authority.;rev3=census-ruling-region-ha-g2-fixes;basis=Omit non-forward, non-platform-alias rows outside local served pools from home publication; added Host/Pool field reads and local configuration use, existing registry/store operations retained.;rev3=census-ruling-edge-page-cache-1;basis=prunes the manifest cache through the new atomic pointer (assets.manifests.Load().prune(...), nil-safe); nothing else changes; read sites unchanged (67); no read added;rev3=census-ruling-region-ha-held-build;basis=writes also when DrainPublishRequired, and reports the written drain state, its ha_drain mark (transaction and publication id) and generation to DrainSource (in-memory); the file gains ha_drained and ha_drain beside the existing draining; no read added. held-requests Task 4: sets the constant ha_take=1 on the box's own file when its in-memory capabilities include region-ha-1 (this build's edge answers take requests); not from config or any read; a report other edges read, not a root decision; no read added;rev3=census-ruling-warm-set-published-724;basis=#724: the agent as carlos: reads PLATFORM_APPS_DOMAIN from the environment once per pass (the variable domainsLoop already reads) and sets an additive dns_pointing mark on each published custom name through dnsPointingMark: true on a published alias (registry:Alias, already published only when its dns_status is pointing), and on a route with a hostname outside the apps domain whether its registry:DNSStatus is pointing (registry:Host, registry:DNSStatus on rows the pass already lists). No mark under the apps domain, on a wildcard row, or with no apps domain set. A report the issuer cert warm reads to leave a not-yet-pointing custom name out of its set, not a root decision; it publishes the same names as before. No record, /data, release or claim read added; no new registry query; F,J1 authority retained. One-off cost: the first pass after the upgrade writes once on a box homing a custom name.;rev3=census-ruling-held-floor-capability;basis=held floor capability (region HA §25.9, agent manager 8a3d302, 2026-11-10): sets the constant ha_handover=1 on the box's own edges file on every pass, whatever its capabilities (this build understands the held-requests headers and the drain acknowledgement); the group roll floor reads it. Not from config or any read; ha_take unchanged; a report other tools read, not a root decision; no read added; F,J1 authority retained. One-off cost: the first pass after the upgrade writes once per box.;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 3: fleetArmInputs now returns edge.ForwardOwners (this box's fleets table and its active links, registry LinkOwners, read only where tunnels are on), passed to edge.FleetArmVerdict as before, so the hub's eligible link-placed forward rows are published for backhaul like fleet rows; same listing and verdict, no read added in the unit;rev3=census-ruling-path-routes-across-boxes;basis=#186 spec 5.1: publishes route_account, route_app, path_front, path_target (registry.PathFront/PathTarget over the route row) on exact real route rows only (never a platform alias or a '*.' row); additive omitempty fields read from the registry route rows already loaded; adds reads of Route.Host and Route.App;rev3=census-ruling-alias-publish-precert-1293;basis=the box agent (root) writing its own control/edges/<box>.json: an alias not yet stamped pointing is also published (marked dns_pointing false) when edge.DNS01Scope allows its name and account and domains.UsablePerHostCert finds a usable per-host certificate for it. New inputs: CARLOS_DNS01_ZONES and CARLOS_DNS01_ACCOUNTS from the agent environment (root-owned host.env, operator-only), and ident.AcmeDir, set once at arm by runAgent from edgeAcmeDir (the agent's own -acme-cache flag, else $CARLOS_DATA_DIR/acme, the same derivation the domains sweep uses); empty publishes nothing early. New read, via domains.UsablePerHostCert: <AcmeDir>/<alias> for an alias inside the operator scope only, where the name must pass validHostShape (lowercase DNS labels, so one file directly under acme/, no separators or dot segments); Lstat first and only a regular file under 64 KiB is opened (a symlink is not followed); the bytes are only parsed by tls.X509KeyPair and reduced to a boolean, never executed, followed or written. That directory is the edge cache (written by carlos-edge, user carlos) the agent already reads as root in domains hostCertExpiry; same read sites otherwise. registry:Account@11361,registry:Account@18525,registry:Alias@10737,registry:Alias@10756,registry:Alias@10855,registry:Alias@11134,registry:Alias@11169,registry:Alias@11231,registry:Alias@11352,registry:Alias@11410,registry:Alias@11752,registry:Alias@11909,registry:Alias@11979,registry:Alias@12011,registry:Alias@12915,registry:Alias@13006,registry:Alias@15998,registry:Alias@16048,registry:App@18537,registry:App@6228,registry:DNSStatus@11285,registry:DNSStatus@11918,registry:DNSStatus@5744,registry:Host@10782,registry:Host@10830,registry:Host@15901,registry:Host@15921,registry:Host@16186,registry:Host@16266,registry:Host@16301,registry:Host@16350,registry:Host@16812,registry:Host@16847,registry:Host@17955,registry:Host@4189,registry:Host@4292,registry:Host@4338,registry:Host@4397,registry:Host@5736,registry:Host@6155,registry:Host@6323,registry:Host@7293,registry:Incarnation@5943,registry:Platform@5251,registry:Pool@4252,registry:Provisioned@5265,registry:Replica@5289,registry:ServingSeq@5958,registry:Status@2953,whole:Route@1026,whole:Route@1839,whole:Route@19995,whole:Route@20820,whole:Route@20995,whole:Route@2323,whole:Route@6224,whole:Route@6284,whole:Route@6308,whole:Route@7378,whole:Route@750,whole:RouteAlias@10620,whole:RouteAlias@10702,whole:RouteAlias@11119,whole:RouteAlias@15952,whole:RouteAlias@20017,whole:RouteAlias@21010,whole:RoutePath@20010,whole:RoutePath@21003,whole:RoutePath@7162,whole:RoutePath@7194,whole:RoutePath@7241,whole:RoutePath@7269,whole:RoutePath@7307,whole:RoutePath@7327,whole:RoutePath@7339,whole:RoutePath@7393,whole:WildcardDomain@15879,whole:WildcardDomain@16255 b0273836ab317d59baed4021281a6dee9e596e83437f8fb86a57b05017e2a9ac |
| +@remove internal/host/agent.go domainsTickConfig |
| +@removed internal/host/agent.go domainsTickConfig H3 census-ruling-alias-publish-precert-1293;basis=its AcmeDir default now comes from edgeAcmeDir(getenv, "") instead of the inline /data + acme join: the same value (pinned by TestEdgeAcmeDirIsTheSweepsDefault); its two data literals moved to edgeAcmeDir, so it reads nothing now. |
| +@coverage internal/domains 9fd7172b3091016ed87059154f5c313bb0613cc93fbd0b973e20f309533610db |
| +@coverage internal/edge 08ea555047a9b3cdb042cf2d34a463e64f8fbbb5d22cf31f7137a7024f04b64a |
| +@coverage internal/host 514dbe9e8c9a2892d04fa0236270992ca19d6d0a344f987dd6cd5de88409d329 |
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv| index 1ad39c3fc..6838fe20b 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-chain.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-chain.tsv |
| @@ -285,3 +285,4 @@ plan14-root-reads-ha-departure-evidence.tsv 924ffc4037d32d7b46af1e373bad1476fc73 |
| plan14-root-reads-stateless-scale-2-fleet-sizes.tsv 00fe607a04674579005013fae1e275cb0434ce54493b1efbe678aed59a12366b |
| plan14-root-reads-store-versioning.tsv 841361b89e20c3763149e8784cdebb037dcc4b828b24196a01d3e300ff319661 |
| plan14-root-reads-parent-delegation-1383.tsv 841361b89e20c3763149e8784cdebb037dcc4b828b24196a01d3e300ff319661 |
| +plan14-root-reads-alias-publish-precert-1293.tsv c25a6eac6ece70098b052b6451deff684c29ff8cfcd24ba37625f01028dedf88 |