carlos / platform Public

edge: fleet apps see the client the hub saw (#1348)

Fleet and -tunnel apps behind a hub saw the hub's address as the
client, so request.remote_ip, Rack::Attack and per-IP limits treated
every visitor as one. The hub already writes X-Forwarded-For itself for
every request it sends down a tunnel; the box's edge replaced it with
the tunnel peer.

For a request that arrived over a tunnel the box dialled, the box now
passes the hub's chain to the app when every entry is an IP address
(hubVisitor, the rule linked requests already used), and the password
gate's attempt limiter keys on the chain's last entry. Off a tunnel
nothing changes. The hub is unchanged; fleet boxes need the new build.

Docs: rootfs "The visitor's address" and a Rails guide pointer (Luna
copy pass, delegated). Astra R1 READY, refactor check READY; census
fleet-client-address-1348 approved on #280. The two gate-bucket tests
now fire their attempts concurrently, so -race cannot refill a token.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Squashed from fleet-client-address-1348 into main.
claude agent, operated by paul@keymail.dev 74aeb271c6852d9adaa2b224acf7bfa2c8e48fba parent 042e1af
15 files changed, +503 −31
  • .amadan/code-health.tsv +1 −1
  • docs/site/rails.md +4 −0
  • docs/site/rootfs.md +6 −0
  • docs/superpowers/notes/census-proposal-fleet-client-address-1348.md +19 −0
  • docs/superpowers/notes/copy-luna-brief-fleet-client-address-1348.md +18 −0
  • docs/superpowers/notes/copy-luna-fleet-client-address-1348.md +13 −0
  • docs/superpowers/reviews/CODEX-FINDINGS-fleet-client-address-1348.md +17 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-client-address-1348.md +78 −0
  • internal/edge/edge.go +31 −16
  • internal/edge/homemap.go +14 −2
  • internal/edge/linkpin_test.go +23 −9
  • internal/edge/tunnel_client_addr_test.go +268 −0
  • internal/gate/gate.go +4 −3
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −0
  • internal/provision/testdata/plan14-root-reads-fleet-client-address-1348.tsv +6 −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-FKAhgm
.amadan/test-gate.sh
go: downloading github.com/aws/aws-sdk-go-v2 v1.44.0
go: downloading github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.68.0
go: downloading github.com/aws/aws-sdk-go-v2/service/costexplorer v1.67.5
go: downloading golang.org/x/sys v0.49.0
go: downloading github.com/benbjohnson/litestream v0.5.14
go: downloading github.com/superfly/ltx v0.5.1
go: downloading golang.org/x/net v0.62.0
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/aws/aws-sdk-go-v2/config v1.32.6
go: downloading golang.org/x/crypto v0.58.0
go: downloading github.com/aws/aws-sdk-go-v2/service/acm v1.45.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ec2 v1.324.0
go: downloading github.com/aws/aws-sdk-go-v2/service/iam v1.58.2
go: downloading github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.37.0
go: downloading github.com/aws/aws-sdk-go-v2/service/route53 v1.64.1
go: downloading github.com/aws/aws-sdk-go-v2/service/sts v1.45.6
go: downloading github.com/aws/aws-sdk-go-v2/service/sns v1.43.0
go: downloading github.com/pion/logging v0.2.4
go: downloading github.com/pion/stun/v3 v3.1.5
go: downloading github.com/pion/turn/v4 v4.1.4
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.38
go: downloading github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.40
go: downloading github.com/aws/aws-sdk-go-v2/internal/ini v1.8.4
go: downloading github.com/klauspost/compress v1.20.2
go: downloading golang.org/x/text v0.43.0
go: downloading github.com/pion/randutil v0.1.0
go: downloading github.com/pion/transport/v4 v4.0.2
go: downloading github.com/pion/dtls/v3 v3.1.4
go: downloading github.com/lmittmann/tint v1.1.3
go: downloading github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.20.18
go: downloading github.com/prometheus/client_golang v1.17.0
go: downloading github.com/cespare/xxhash/v2 v2.3.0
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/prometheus/common v0.45.0
go: downloading google.golang.org/protobuf v1.36.10
go: downloading github.com/prometheus/client_model v0.5.0
go: downloading github.com/prometheus/procfs v0.12.0
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/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/wlynxg/anet v0.0.5
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/libc v1.74.1
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading modernc.org/memory v1.11.0
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/google/uuid v1.6.0
go: downloading modernc.org/mathutil v1.7.1
=== launchctx (4 s, from +0 s)
ok  	amadan.net/carlos/platform.git/launchctx	0.015s
?   	amadan.net/carlos/platform.git/launchctx/controlname	[no test files]
?   	amadan.net/carlos/platform.git/launchctx/wireid	[no test files]
=== vet (173 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/pierrec/lz4/v4 v4.1.22
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading github.com/pion/dtls/v3 v3.1.4
go: downloading github.com/wlynxg/anet v0.0.5
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/memory v1.11.0
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading github.com/google/uuid v1.6.0
go: downloading modernc.org/mathutil v1.7.1
=== vet-tags (191 s, from +0 s)
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/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
=== gofmt (1 s, from +0 s)
gofmt -l .: clean
=== rest (375 s, from +15 s)
ok  	github.com/carlosframework/platform/cmd/carlos-media	124.899s
?   	github.com/carlosframework/platform/cmd/changelog	[no test files]
ok  	github.com/carlosframework/platform/cmd/console	203.336s
ok  	github.com/carlosframework/platform/cmd/mediaimage	46.340s
ok  	github.com/carlosframework/platform/cmd/moveprobe	17.194s
ok  	github.com/carlosframework/platform/cmd/pricebook-export	0.034s
ok  	github.com/carlosframework/platform/cmd/rootfswitness	0.164s
ok  	github.com/carlosframework/platform/cmd/runsc-assets	0.169s
ok  	github.com/carlosframework/platform/cmd/zddprobe	1.118s
ok  	github.com/carlosframework/platform/internal/agentsock	0.068s
ok  	github.com/carlosframework/platform/internal/alerting	0.045s
ok  	github.com/carlosframework/platform/internal/analytics	0.431s
ok  	github.com/carlosframework/platform/internal/appconfig	46.773s
ok  	github.com/carlosframework/platform/internal/apperr	0.412s
ok  	github.com/carlosframework/platform/internal/applog	0.781s
ok  	github.com/carlosframework/platform/internal/apppolicy	2.273s
ok  	github.com/carlosframework/platform/internal/assetcache	0.632s
ok  	github.com/carlosframework/platform/internal/awsinv	0.044s
ok  	github.com/carlosframework/platform/internal/awsmanaged	0.627s
ok  	github.com/carlosframework/platform/internal/awsregiongroup	0.127s
ok  	github.com/carlosframework/platform/internal/awsterminations	0.035s
ok  	github.com/carlosframework/platform/internal/backupswords	0.021s
ok  	github.com/carlosframework/platform/internal/billing	0.081s
ok  	github.com/carlosframework/platform/internal/billing/billingtest	0.101s
ok  	github.com/carlosframework/platform/internal/billingstripe	1.932s
ok  	github.com/carlosframework/platform/internal/boxchoice	0.037s
ok  	github.com/carlosframework/platform/internal/boxid	3.413s
?   	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.023s
ok  	github.com/carlosframework/platform/internal/boxself	0.224s
ok  	github.com/carlosframework/platform/internal/boxvolumes	0.053s
ok  	github.com/carlosframework/platform/internal/caps	0.199s
ok  	github.com/carlosframework/platform/internal/certwarm	0.028s
ok  	github.com/carlosframework/platform/internal/cgroup	1.697s
ok  	github.com/carlosframework/platform/internal/changelog	3.944s
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.016s
ok  	github.com/carlosframework/platform/internal/codehealth	19.190s
ok  	github.com/carlosframework/platform/internal/compute	0.018s
?   	github.com/carlosframework/platform/internal/controlname	[no test files]
?   	github.com/carlosframework/platform/internal/controlsock	[no test files]
ok  	github.com/carlosframework/platform/internal/dbdoor	11.449s
ok  	github.com/carlosframework/platform/internal/dbdoor/dbdoortest	0.082s
ok  	github.com/carlosframework/platform/internal/dbquery	0.011s
ok  	github.com/carlosframework/platform/internal/dbreads	3.647s
?   	github.com/carlosframework/platform/internal/dbreads/dbreadstest	[no test files]
ok  	github.com/carlosframework/platform/internal/dbverify	0.051s
ok  	github.com/carlosframework/platform/internal/demo	0.005s
ok  	github.com/carlosframework/platform/internal/demobuild	3.650s
ok  	github.com/carlosframework/platform/internal/democlaim	0.589s
ok  	github.com/carlosframework/platform/internal/devbox	19.144s
ok  	github.com/carlosframework/platform/internal/dnsrec	0.031s
ok  	github.com/carlosframework/platform/internal/docsite	0.073s
ok  	github.com/carlosframework/platform/internal/domainreg	0.010s
ok  	github.com/carlosframework/platform/internal/domains	69.864s
ok  	github.com/carlosframework/platform/internal/doorkey	0.034s
ok  	github.com/carlosframework/platform/internal/economics	0.026s
ok  	github.com/carlosframework/platform/internal/edgefence	0.136s
ok  	github.com/carlosframework/platform/internal/edgeguard	0.326s
?   	github.com/carlosframework/platform/internal/edgeproof	[no test files]
ok  	github.com/carlosframework/platform/internal/edgesfile	0.108s
ok  	github.com/carlosframework/platform/internal/egressaddr	0.016s
ok  	github.com/carlosframework/platform/internal/execsandbox	103.286s
ok  	github.com/carlosframework/platform/internal/fileacl	0.011s
ok  	github.com/carlosframework/platform/internal/fleetapi	2.208s
ok  	github.com/carlosframework/platform/internal/fleetstore	0.008s
ok  	github.com/carlosframework/platform/internal/fxrate	0.027s
ok  	github.com/carlosframework/platform/internal/gate	5.667s
ok  	github.com/carlosframework/platform/internal/genselect	0.098s
ok  	github.com/carlosframework/platform/internal/geo	0.068s
ok  	github.com/carlosframework/platform/internal/geoip	0.147s
ok  	github.com/carlosframework/platform/internal/groupadmission	0.012s
ok  	github.com/carlosframework/platform/internal/grouprollaws	17.678s
ok  	github.com/carlosframework/platform/internal/hadeparture	0.006s
ok  	github.com/carlosframework/platform/internal/hafresh	0.011s
ok  	github.com/carlosframework/platform/internal/hairpin	0.196s
ok  	github.com/carlosframework/platform/internal/historyreadback	1.160s
ok  	github.com/carlosframework/platform/internal/hostactors	24.857s
ok  	github.com/carlosframework/platform/internal/hostbox	24.717s
ok  	github.com/carlosframework/platform/internal/hostclaim	3.264s
ok  	github.com/carlosframework/platform/internal/hostenv	0.102s
ok  	github.com/carlosframework/platform/internal/hostevidence	0.014s
ok  	github.com/carlosframework/platform/internal/hostexec	25.673s
ok  	github.com/carlosframework/platform/internal/hostfence	0.145s
ok  	github.com/carlosframework/platform/internal/hostfiles	29.355s
ok  	github.com/carlosframework/platform/internal/hostfloor	0.110s
ok  	github.com/carlosframework/platform/internal/hostguard	1.730s
ok  	github.com/carlosframework/platform/internal/hostops	8.699s
?   	github.com/carlosframework/platform/internal/hostops/fencerelease	[no test files]
ok  	github.com/carlosframework/platform/internal/hostops/internal/fencerelease	0.020s
ok  	github.com/carlosframework/platform/internal/hostquarantine	0.025s
ok  	github.com/carlosframework/platform/internal/hostrelocate	1.951s
ok  	github.com/carlosframework/platform/internal/hostresolve	0.974s
ok  	github.com/carlosframework/platform/internal/hostwrite	0.010s
ok  	github.com/carlosframework/platform/internal/infraview	0.044s
ok  	github.com/carlosframework/platform/internal/ingresshealth	0.009s
ok  	github.com/carlosframework/platform/internal/ingresshealth/awstg	0.019s
ok  	github.com/carlosframework/platform/internal/instancectl	56.753s
ok  	github.com/carlosframework/platform/internal/instanceexec	9.219s
ok  	github.com/carlosframework/platform/internal/instancefs	0.059s
ok  	github.com/carlosframework/platform/internal/instancekey	0.023s
ok  	github.com/carlosframework/platform/internal/instanceupdates	0.042s
ok  	github.com/carlosframework/platform/internal/interactive	0.707s
ok  	github.com/carlosframework/platform/internal/launchd	0.022s
ok  	github.com/carlosframework/platform/internal/layout	24.956s
ok  	github.com/carlosframework/platform/internal/layout/pubclass	103.703s
ok  	github.com/carlosframework/platform/internal/lbhealth	0.022s
ok  	github.com/carlosframework/platform/internal/lease	151.873s
ok  	github.com/carlosframework/platform/internal/lease/leasetest	1.952s
ok  	github.com/carlosframework/platform/internal/lease/locktest	0.019s
ok  	github.com/carlosframework/platform/internal/ledger	0.064s
ok  	github.com/carlosframework/platform/internal/mail	1.301s
ok  	github.com/carlosframework/platform/internal/mailer	1.001s
ok  	github.com/carlosframework/platform/internal/mailsubmit	1.703s
ok  	github.com/carlosframework/platform/internal/mailwire	0.009s
ok  	github.com/carlosframework/platform/internal/maintenance	0.192s
ok  	github.com/carlosframework/platform/internal/maintenanceexec	8.545s
ok  	github.com/carlosframework/platform/internal/maintenanceguard	0.301s
ok  	github.com/carlosframework/platform/internal/media	2.334s
ok  	github.com/carlosframework/platform/internal/media/mediatest	0.015s
ok  	github.com/carlosframework/platform/internal/mediaaws	65.718s
ok  	github.com/carlosframework/platform/internal/mediahandler	45.996s
ok  	github.com/carlosframework/platform/internal/mediajobs	1.547s
ok  	github.com/carlosframework/platform/internal/medialocal	9.849s
ok  	github.com/carlosframework/platform/internal/metrics	0.199s
ok  	github.com/carlosframework/platform/internal/minorunits	0.005s
ok  	github.com/carlosframework/platform/internal/moves	56.579s
ok  	github.com/carlosframework/platform/internal/moves/archive	3.817s
ok  	github.com/carlosframework/platform/internal/moves/offlinerun	0.149s
ok  	github.com/carlosframework/platform/internal/namedunits	0.036s
ok  	github.com/carlosframework/platform/internal/objstore	1.105s
ok  	github.com/carlosframework/platform/internal/ops	18.292s
ok  	github.com/carlosframework/platform/internal/pageindex	3.891s
ok  	github.com/carlosframework/platform/internal/parity	0.142s
?   	github.com/carlosframework/platform/internal/parity/cmd/parity-doc	[no test files]
ok  	github.com/carlosframework/platform/internal/park	0.933s
ok  	github.com/carlosframework/platform/internal/perf	0.208s
ok  	github.com/carlosframework/platform/internal/plans	0.112s
ok  	github.com/carlosframework/platform/internal/privatefile	0.014s
ok  	github.com/carlosframework/platform/internal/provision	238.793s
ok  	github.com/carlosframework/platform/internal/proxyproto	0.941s
ok  	github.com/carlosframework/platform/internal/publicrelease	0.073s
ok  	github.com/carlosframework/platform/internal/ratelimit	0.216s
ok  	github.com/carlosframework/platform/internal/regionlabel	0.075s
ok  	github.com/carlosframework/platform/internal/regionname	0.031s
ok  	github.com/carlosframework/platform/internal/registrar	0.009s
ok  	github.com/carlosframework/platform/internal/registrar/openprovider	0.261s
?   	github.com/carlosframework/platform/internal/registrar/registrartest	[no test files]
ok  	github.com/carlosframework/platform/internal/registry	88.072s
ok  	github.com/carlosframework/platform/internal/relay	7.863s
ok  	github.com/carlosframework/platform/internal/release	88.490s
ok  	github.com/carlosframework/platform/internal/replicagen	0.052s
ok  	github.com/carlosframework/platform/internal/replicas	0.079s
ok  	github.com/carlosframework/platform/internal/reqrec	8.780s
ok  	github.com/carlosframework/platform/internal/rollout	11.822s
ok  	github.com/carlosframework/platform/internal/rolloutwords	0.064s
ok  	github.com/carlosframework/platform/internal/rootaws	102.843s
ok  	github.com/carlosframework/platform/internal/rootfsimage	0.838s
ok  	github.com/carlosframework/platform/internal/rootparticipation	0.093s
ok  	github.com/carlosframework/platform/internal/rootstate	0.047s
ok  	github.com/carlosframework/platform/internal/runs	0.927s
ok  	github.com/carlosframework/platform/internal/s3compat	0.034s
ok  	github.com/carlosframework/platform/internal/s3fake	1.261s
ok  	github.com/carlosframework/platform/internal/safefile	0.035s
ok  	github.com/carlosframework/platform/internal/schedule	29.027s
ok  	github.com/carlosframework/platform/internal/seeds	0.026s
ok  	github.com/carlosframework/platform/internal/sim/litestreamfacts	5.119s
ok  	github.com/carlosframework/platform/internal/sim/mediajobs	51.092s
ok  	github.com/carlosframework/platform/internal/sim/regionha	27.233s
ok  	github.com/carlosframework/platform/internal/status	0.603s
ok  	github.com/carlosframework/platform/internal/steering	0.419s
ok  	github.com/carlosframework/platform/internal/stopevidence	0.685s
ok  	github.com/carlosframework/platform/internal/storecfg	0.290s
ok  	github.com/carlosframework/platform/internal/svcrole	0.021s
ok  	github.com/carlosframework/platform/internal/systemd	6.668s
?   	github.com/carlosframework/platform/internal/systemdshow	[no test files]
ok  	github.com/carlosframework/platform/internal/team	4.441s
ok  	github.com/carlosframework/platform/internal/teamcontract	0.249s
ok  	github.com/carlosframework/platform/internal/telemetry	0.032s
ok  	github.com/carlosframework/platform/internal/termfence	3.487s
ok  	github.com/carlosframework/platform/internal/timerspec	0.023s
ok  	github.com/carlosframework/platform/internal/tsidentity	4.190s
ok  	github.com/carlosframework/platform/internal/tunnelclient	0.435s
ok  	github.com/carlosframework/platform/internal/unixdial	0.025s
ok  	github.com/carlosframework/platform/internal/updatewords	0.075s
ok  	github.com/carlosframework/platform/internal/upstreamguard	0.019s
?   	github.com/carlosframework/platform/internal/upstreamguard/guardtest	[no test files]
ok  	github.com/carlosframework/platform/internal/usage	0.065s
ok  	github.com/carlosframework/platform/internal/version	0.007s
ok  	github.com/carlosframework/platform/internal/vet	3.349s
ok  	github.com/carlosframework/platform/internal/zonehost	0.017s
ok  	github.com/carlosframework/platform/internal/zonehost/route53zones	0.060s
?   	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.015s
ok  	github.com/carlosframework/platform/scripts/pathmapcheck	0.167s
ok  	github.com/carlosframework/platform/scripts/region-ha-g2/fixture	5.252s
ok  	github.com/carlosframework/platform/scripts/stateless-replicas-drill	1.203s
ok  	github.com/carlosframework/platform/scripts/witness-pointer	0.030s
=== cutover-witness (153 s, from +15 s)
ok  	github.com/carlosframework/platform	1.240s
=== internal_grouproll@0 (280 s, from +73 s)
ok  	github.com/carlosframework/platform/internal/grouproll	278.377s
=== internal_grouproll@1 (282 s, from +73 s)
ok  	github.com/carlosframework/platform/internal/grouproll	280.328s
=== internal_activator@0 (146 s, from +138 s)
ok  	github.com/carlosframework/platform/internal/activator	142.466s
=== internal_activator@1 (137 s, from +138 s)
ok  	github.com/carlosframework/platform/internal/activator	133.349s
=== internal_activator@2 (142 s, from +138 s)
ok  	github.com/carlosframework/platform/internal/activator	138.773s
=== internal_activator@3 (165 s, from +138 s)
ok  	github.com/carlosframework/platform/internal/activator	161.589s
=== root@0 (121 s, from +168 s)
ok  	github.com/carlosframework/platform	107.440s
=== root@1 (114 s, from +168 s)
ok  	github.com/carlosframework/platform	102.052s
=== root@2 (141 s, from +168 s)
ok  	github.com/carlosframework/platform	128.229s
=== root@3 (113 s, from +168 s)
ok  	github.com/carlosframework/platform	104.125s
=== root@4 (99 s, from +168 s)
ok  	github.com/carlosframework/platform	88.132s
=== internal_edge@0 (198 s, from +173 s)
ok  	github.com/carlosframework/platform/internal/edge	188.138s
=== internal_edge@1 (188 s, from +173 s)
ok  	github.com/carlosframework/platform/internal/edge	177.543s
=== internal_edge@2 (163 s, from +173 s)
ok  	github.com/carlosframework/platform/internal/edge	152.449s
=== internal_edge@3 (155 s, from +173 s)
ok  	github.com/carlosframework/platform/internal/edge	144.954s
=== internal_host@0 (135 s, from +214 s)
ok  	github.com/carlosframework/platform/internal/host	130.924s
=== internal_host@1 (146 s, from +214 s)
ok  	github.com/carlosframework/platform/internal/host	141.994s
=== internal_host@2 (278 s, from +214 s)
ok  	github.com/carlosframework/platform/internal/host	273.925s
=== internal_host@3 (196 s, from +214 s)
ok  	github.com/carlosframework/platform/internal/host	192.246s
=== internal_host@4 (201 s, from +214 s)
ok  	github.com/carlosframework/platform/internal/host	196.207s
=== internal_host@5 (179 s, from +214 s)
ok  	github.com/carlosframework/platform/internal/host	174.040s
=== internal_console@0 (186 s, from +217 s)
ok  	github.com/carlosframework/platform/internal/console	178.382s
=== internal_console@1 (196 s, from +217 s)
ok  	github.com/carlosframework/platform/internal/console	189.452s
=== internal_console@2 (194 s, from +217 s)
ok  	github.com/carlosframework/platform/internal/console	186.741s
=== internal_console@3 (243 s, from +217 s)
ok  	github.com/carlosframework/platform/internal/console	236.900s
=== internal_console@4 (183 s, from +217 s)
ok  	github.com/carlosframework/platform/internal/console	175.550s
=== internal_console@5 (200 s, from +217 s)
ok  	github.com/carlosframework/platform/internal/console	192.650s
=== internal_console@6 (198 s, from +217 s)
ok  	github.com/carlosframework/platform/internal/console	191.300s
=== internal_console@7 (196 s, from +217 s)
ok  	github.com/carlosframework/platform/internal/console	187.840s
=== internal_console@8 (203 s, from +217 s)
ok  	github.com/carlosframework/platform/internal/console	195.634s
=== internal_console@9 (207 s, from +217 s)
ok  	github.com/carlosframework/platform/internal/console	199.538s
=== internal_console@10 (212 s, from +217 s)
ok  	github.com/carlosframework/platform/internal/console	205.391s
=== internal_console@11 (223 s, from +217 s)
ok  	github.com/carlosframework/platform/internal/console	216.207s
=== internal_console@12 (272 s, from +217 s)
ok  	github.com/carlosframework/platform/internal/console	265.542s
=== internal_console@13 (197 s, from +217 s)
ok  	github.com/carlosframework/platform/internal/console	189.538s
=== internal_console@14 (193 s, from +217 s)
ok  	github.com/carlosframework/platform/internal/console	185.291s
=== internal_console@15 (242 s, from +217 s)
ok  	github.com/carlosframework/platform/internal/console	233.906s
=== internal_console@16 (222 s, from +217 s)
ok  	github.com/carlosframework/platform/internal/console	214.500s
=== internal_console@17 (199 s, from +217 s)
ok  	github.com/carlosframework/platform/internal/console	190.241s
=== internal_console@18 (202 s, from +217 s)
ok  	github.com/carlosframework/platform/internal/console	192.968s
=== internal_console@19 (203 s, from +217 s)
ok  	github.com/carlosframework/platform/internal/console	194.900s
=== internal_console@20 (193 s, from +218 s)
ok  	github.com/carlosframework/platform/internal/console	186.699s
=== internal_console@21 (219 s, from +218 s)
ok  	github.com/carlosframework/platform/internal/console	211.864s
=== internal_console@22 (212 s, from +218 s)
ok  	github.com/carlosframework/platform/internal/console	205.750s
=== internal_console@23 (213 s, from +218 s)
ok  	github.com/carlosframework/platform/internal/console	206.745s
=== lists: internal_console 217 s, internal_edge 172 s, internal_activator 137 s, internal_host 213 s, root 167 s, internal_grouproll 73 s
=== cpu: the gate used 12326 cpu-seconds in 493 s, about 25.0 of 32 cores; the machine as a whole was 84% busy
=== opentofu ===
opentofu: 35 test files in 11 suites, OpenTofu v1.13.9
  initialised in 15 s
  ok      17 s  infra/modules/box-fence-writer/tests/writer.tftest.hcl  Success! 1 passed, 0 failed.
  ok      28 s  infra/modules/deployment-buckets/tests/data_lifecycle.tftest.hcl  Success! 3 passed, 0 failed.
  ok      17 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      88 s  infra/modules/media-engine/tests/media_engine.tftest.hcl  Success! 24 passed, 0 failed.
  ok      34 s  infra/modules/pdf-host/tests/computed.tftest.hcl  Success! 2 passed, 0 failed.
  ok      72 s  infra/modules/pdf-host/tests/pdf_host.tftest.hcl  Success! 24 passed, 0 failed.
  ok      42 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      45 s  infra/modules/region-host/tests/alert_publish.tftest.hcl  Success! 18 passed, 0 failed.
  ok      43 s  infra/modules/region-host/tests/alerts_topic.tftest.hcl  Success! 16 passed, 0 failed.
  ok      13 s  infra/modules/region-host/tests/analytics_prune.tftest.hcl  Success! 2 passed, 0 failed.
  ok      17 s  infra/modules/region-host/tests/console_mail.tftest.hcl  Success! 4 passed, 0 failed.
  ok       9 s  infra/modules/region-host/tests/fixed_state_unchanged.tftest.hcl  Success! 1 passed, 0 failed.
  ok      69 s  infra/modules/region-host/tests/group.tftest.hcl  Success! 32 passed, 0 failed.
  ok      10 s  infra/modules/region-host/tests/group_alarms.tftest.hcl  Success! 4 passed, 0 failed.
  ok      11 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      34 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      27 s  infra/modules/region-host/tests/health_alarms.tftest.hcl  Success! 10 passed, 0 failed.
  ok      12 s  infra/modules/region-host/tests/ingress_drain_read.tftest.hcl  Success! 4 passed, 0 failed.
  ok       7 s  infra/modules/region-host/tests/instance_metadata.tftest.hcl  Success! 1 passed, 0 failed.
  ok      21 s  infra/modules/region-host/tests/mailer.tftest.hcl  Success! 6 passed, 0 failed.
  ok      10 s  infra/modules/region-host/tests/mailer_group.tftest.hcl  Success! 2 passed, 0 failed.
  ok      10 s  infra/modules/region-host/tests/managed_fleets/group_refusal.tftest.hcl  Success! 2 passed, 0 failed.
  ok     105 s  infra/modules/region-host/tests/managed_fleets/managed_fleets.tftest.hcl  Success! 46 passed, 0 failed.
  ok      79 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      19 s  infra/modules/region-host/tests/user_data_ignored.tftest.hcl  Success! 3 passed, 0 failed.
  ok      11 s  infra/modules/region-remote-host/tests/data_lifecycle.tftest.hcl  Success! 3 passed, 0 failed.
  ok      17 s  infra/modules/region-remote-host/tests/no_deployment_bucket.tftest.hcl  Success! 5 passed, 0 failed.
  ok      29 s  infra/modules/scanner-host/tests/scanner_host.tftest.hcl  Success! 14 passed, 0 failed.
opentofu: 35 files in 206 s
opentofu: PASS
=== cross ===
--- shard 0 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling darwin/arm64
--- shard 1 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling darwin/amd64
--- shard 2 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling linux/arm64
linux/arm64 carlos binary: 65667234 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:32161
Added `local` successfully.
Bucket created successfully `local/contract-bucket`.
Bucket created successfully `local/denied-bucket`.
Created policy `contract-only` successfully.
Added user `scopeduser` successfully.
Attached Policies: [contract-only]
To User: scopeduser
  buckets and scoped user ready
=== RUN   TestDeliveredContractMinio
=== RUN   TestDeliveredContractMinio/put
=== RUN   TestDeliveredContractMinio/get_round-trips_the_body
=== RUN   TestDeliveredContractMinio/list_shows_the_key
=== RUN   TestDeliveredContractMinio/head_and_list_agree_on_the_version
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_its_own_object
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/not_by_PutObjectTagging
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/and_not_by_x-amz-tagging_on_upload
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CreateMultipartUpload
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CopyObject_with_a_REPLACE_tagging_directive
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/but_multipart_itself_is_allowed
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_copy_itself_is_allowed
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/a_POST-policy_forged_tag_with_a_matching_version_is_still_not_a_verdict
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_an_ordinary_tagged-with-something-else_upload_is_allowed
=== RUN   TestDeliveredContractMinio/delete_removes_it
=== RUN   TestDeliveredContractMinio/cross-bucket_denial
--- PASS: TestDeliveredContractMinio (0.03s)
    --- PASS: TestDeliveredContractMinio/put (0.00s)
    --- PASS: TestDeliveredContractMinio/get_round-trips_the_body (0.00s)
    --- PASS: TestDeliveredContractMinio/list_shows_the_key (0.00s)
    --- PASS: TestDeliveredContractMinio/head_and_list_agree_on_the_version (0.00s)
    --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_its_own_object (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/not_by_PutObjectTagging (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/and_not_by_x-amz-tagging_on_upload (0.00s)
    --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route (0.02s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CreateMultipartUpload (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CopyObject_with_a_REPLACE_tagging_directive (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/but_multipart_itself_is_allowed (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_copy_itself_is_allowed (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/a_POST-policy_forged_tag_with_a_matching_version_is_still_not_a_verdict (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_an_ordinary_tagged-with-something-else_upload_is_allowed (0.00s)
    --- PASS: TestDeliveredContractMinio/delete_removes_it (0.00s)
    --- PASS: TestDeliveredContractMinio/cross-bucket_denial (0.00s)
PASS
ok  	github.com/carlosframework/platform/internal/objstore	0.036s
=== RUN   TestT4StorageProbeMinio
2026/11/22 14:34:58 moves: T4: STORE: list: operation error S3: ListObjectsV2, https response error StatusCode: 403, RequestID: 18EA64ADB4F6DE3F, HostID: c9f91cba52d61d888b72453971fbfdff5d3c30518731e76aedc60bc2d0501695, 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.042s
=== 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.042s
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.039s
=== RUN   TestEndToEndMinio
=== RUN   TestEndToEndMinio/plan
=== RUN   TestEndToEndMinio/roll
=== RUN   TestEndToEndMinio/replace
=== RUN   TestEndToEndMinio/remove
--- PASS: TestEndToEndMinio (0.47s)
    --- PASS: TestEndToEndMinio/plan (0.01s)
    --- PASS: TestEndToEndMinio/roll (0.12s)
    --- PASS: TestEndToEndMinio/replace (0.15s)
    --- PASS: TestEndToEndMinio/remove (0.15s)
PASS
ok  	github.com/carlosframework/platform/internal/grouproll	0.474s
Bucket created successfully `local/dbf-deploy`.
Bucket created successfully `local/dbf-data-ie`.
Bucket created successfully `local/dbf-data-uk`.
local/dbf-deploy versioning is enabled
Created policy `dbf-console` successfully.
Created policy `dbf-ukbox` successfully.
Added user `dbfconsole` successfully.
Added user `dbfukbox` successfully.
Attached Policies: [dbf-console]
To User: dbfconsole
Attached Policies: [dbf-ukbox]
To User: dbfukbox
=== RUN   TestDBForwardMinio
2026/11/22 14:35:04 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/22 14:35:04 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/22 14:35:04 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/22 14:35:04 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/22 14:35:04 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/22 14:35:04 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/22 14:35:04 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000003
2026/11/22 14:35:04 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000003 maxTXID=0000000000000003 size=454
2026/11/22 14:35:04 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000003
2026/11/22 14:35:04 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/22 14:35:04 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/22 14:35:04 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/22 14:35:04 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/22 14:35:04 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%3A41681: could not determine target mailbox
    agent.go:136: dbreads: dbr_6pczbpszmrppu6kesduwi7inem: planned 3 files (1544 bytes) and restored to 3 in 13ms
    agent.go:136: dbreads: dbr_6pczbpszmrppu6kesduwi7inem: output 5 bytes in 1 confirmed chunks in 1ms
2026/11/22 14:35:05 console: db read dbr_6pczbpszmrppu6kesduwi7inem: relayed 1 chunks (102 bytes) in 1.005s, ended done
    agent.go:136: dbreads: dbr_hawelodnejopfgaw7izwbaglh4: planned 1 files (720 bytes) and restored to 1 in 11ms
    agent.go:136: dbreads: dbr_hawelodnejopfgaw7izwbaglh4: output 5 bytes in 1 confirmed chunks in 1ms
2026/11/22 14:35:06 console: db read dbr_hawelodnejopfgaw7izwbaglh4: relayed 1 chunks (102 bytes) in 1.005s, ended done
    agent.go:136: dbreads: dbr_fnptw44yc5x52sdr72ngariw3q: planned 3 files (1544 bytes) and held through 3 in 13ms
    agent.go:136: dbreads: dbr_fnptw44yc5x52sdr72ngariw3q: output 1544 bytes in 1 confirmed chunks in 1ms
2026/11/22 14:35:07 console: db read dbr_fnptw44yc5x52sdr72ngariw3q: relayed 1 chunks (1641 bytes) in 1.005s, ended done
=== RUN   TestDBForwardMinio/by_disconnect
=== NAME  TestDBForwardMinio
    agent.go:136: dbreads: dbr_nkst3vzp7vzy7oas6pnqrfnsxm: planned 3 files (1544 bytes) and restored to 3 in 13ms
2026/11/22 14:35:07 console: db read dbr_nkst3vzp7vzy7oas6pnqrfnsxm: relayed 0 chunks (0 bytes) in 35ms, ended client gone
    agent.go:136: dbreads: dbr_nkst3vzp7vzy7oas6pnqrfnsxm: output 5 bytes in 1 confirmed chunks in 104ms
=== RUN   TestDBForwardMinio/by_timeout
=== NAME  TestDBForwardMinio
    agent.go:136: dbreads: dbr_ke45gbpw5halwoz3hnnn5fgmuq: planned 3 files (1544 bytes) and restored to 3 in 14ms
2026/11/22 14:35:28 console: db read dbr_ke45gbpw5halwoz3hnnn5fgmuq: relayed 0 chunks (0 bytes) in 19.949s, ended no-result
    agent.go:136: dbreads: dbr_ke45gbpw5halwoz3hnnn5fgmuq: output 5 bytes in 1 confirmed chunks in 19.922s
--- PASS: TestDBForwardMinio (23.62s)
    --- PASS: TestDBForwardMinio/by_disconnect (0.25s)
    --- PASS: TestDBForwardMinio/by_timeout (20.06s)
PASS
ok  	github.com/carlosframework/platform/internal/console	23.661s
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.06s)
PASS
ok  	github.com/carlosframework/platform/internal/mediaaws	0.068s
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.58s)
PASS
ok  	github.com/carlosframework/platform/internal/medialocal	0.591s
=== RUN   TestHeldHandoverTwoBoxMinio
2026/11/22 14:35:33 edge: mesh key: minted
2026/11/22 14:35:33 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/22 14:35:33 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/22 14:35:33 tenant admission is open. accepting tenant work
2026/11/22 14:35:33 activator: HA placement host=shop-65654f23.example.test kind=Place ref=annie reason=roomiest generation=2026-11-22T14:35:33Z lock_generation=0
2026/11/22 14:35:33 lease: t8-65654f23/shop-65654f23.example.test: HA lease acquired in 4ms (first wake)
2026/11/22 14:35:33 activator: shop-65654f23.example.test: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/11/22 14:35:33 activator: shop-65654f23.example.test: started carlos-instance@shop\x2d65654f23.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) 7ms, launch file 0s, gate 0s, root start 1ms)
2026/11/22 14:35:33 activator: shop-65654f23.example.test: carlos-instance@shop\x2d65654f23.example.test.service launched in 8ms, healthy 0s later
2026/11/22 14:35:33 activator: shop-65654f23.example.test: woke in 21ms: checks 0s, lease 5ms, restore 0s, identity 0s, protect 0s, spawn 8ms, replicate 8ms
2026/11/22 14:35:33 lease: t8-65654f23/plain-65654f23.example.test: acquired in 1ms (client 0s, lock read and write 1ms)
2026/11/22 14:35:33 activator: no replica for plain-65654f23.example.test in s3://contract-bucket/t8-65654f23/plain-65654f23.example.test — booting fresh
2026/11/22 14:35:33 activator: plain-65654f23.example.test: started carlos-instance@plain\x2d65654f23.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) 6ms, launch file 0s, gate 0s, root start 1ms)
2026/11/22 14:35:33 activator: plain-65654f23.example.test: carlos-instance@plain\x2d65654f23.example.test.service launched in 7ms, healthy 0s later
2026/11/22 14:35:33 activator: plain-65654f23.example.test: woke in 97ms: checks 0s, lease 1ms, restore 20ms, identity 0s, protect 0s, spawn 7ms, replicate 68ms
2026/11/22 14:35:33 lease: t8-65654f23/bot0.shop.bac.sidecar.internal: HA lease acquired in 4ms (first wake)
2026/11/22 14:35:33 activator: bot0.shop.bac.sidecar.internal: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/11/22 14:35:33 activator: bot0.shop.bac.sidecar.internal: woke in 70ms: checks 0s, lease 5ms, restore 0s, identity 0s, protect 0s, spawn 8ms, settle 0s, replicate 56ms
2026/11/22 14:35:33 activator: next-due probe plain-65654f23.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/22 14:35:33 activator: bot0.shop.bac.sidecar.internal: released with a marker (clean true, txid 1, files 3:debe601d0f417ceb7a6de338e5b3e01b832b28bdab560f290e66649acc5329b3) in 8ms: files 1ms, sync 4ms, record 1ms, marker 2ms
2026/11/22 14:35:33 activator: bot0.shop.bac.sidecar.internal hibernated
2026/11/22 14:35:33 activator: plain-65654f23.example.test hibernated
2026/11/22 14:35:33 activator: next-due probe shop-65654f23.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/22 14:35:33 activator: shop-65654f23.example.test: released with a marker (clean true, txid 1, files 3:d293e33268c947d28ea484c885d9756a0aaaef94e68f3b4e1643370d9254cff7) in 6ms: files 1ms, sync 2ms, record 1ms, marker 2ms
2026/11/22 14:35:33 activator: shop-65654f23.example.test hibernated
2026/11/22 14:35:33 lease: t8-65654f23/shop-65654f23.example.test: HA lease acquired in 3ms (clean marker)
2026/11/22 14:35:33 activator: shop-65654f23.example.test: restored (other-box)
2026/11/22 14:35:33 activator: shop-65654f23.example.test: started carlos-instance@shop\x2d65654f23.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 1ms, control socket 0s, key gate 0s, logs 0s) 1ms, launch file 0s, gate 0s, root start 1ms)
2026/11/22 14:35:33 activator: shop-65654f23.example.test: carlos-instance@shop\x2d65654f23.example.test.service launched in 2ms, healthy 0s later
2026/11/22 14:35:33 activator: shop-65654f23.example.test: woke in 38ms: checks 0s, lease 4ms, restore 25ms, identity 0s, protect 0s, spawn 2ms, replicate 7ms
2026/11/22 14:35:33 edge: ha-take shop-65654f23.example.test from annie (txn t8-witness, marker generation 1): holder betty, generation 2
2026/11/22 14:35:33 edge: forward shop-65654f23.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:a28fef45dd786829b36fbc981af5ceec Step:move Result:ok Reasons:[] Fence:t8-witness StartedAt:2026-11-22 14:35:33.646277488 +0000 UTC FinishedAt:2026-11-22 14:35:33.743736838 +0000 UTC Acked:[betty carol] Departed:[] Moved:[{Host:shop-65654f23.example.test Holder:betty Gen:2 Confirmed:take}] Released:[{Host:bot0.shop.bac.sidecar.internal Kind:worker Marker:true Clean:true Reason:} {Host:plain-65654f23.example.test Kind:other Marker:true Clean:true Reason:}] Unclean:[] Left:[] Holds:{LongestMS:80 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-65654f23.example.test <nil> stop bot0.shop.bac.sidecar.internal marker=true clean=true <nil> stop plain-65654f23.example.test marker=true clean=true <nil> releasing shop-65654f23.example.test <nil> stop shop-65654f23.example.test marker=true clean=true <nil> taken shop-65654f23.example.test betty <nil> end-moves]
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-65654f23/shop-65654f23.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-65654f23/bot0.shop.bac.sidecar.internal/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-65654f23/bot0.shop.bac.sidecar.internal/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: DELETE /contract-bucket/t8-65654f23/plain-65654f23.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-65654f23/shop-65654f23.example.test/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-65654f23/shop-65654f23.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-65654f23/shop-65654f23.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-65654f23/shop-65654f23.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-65654f23/shop-65654f23.example.test/head.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/generations/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0008/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0007/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0006/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0005/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0004/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0008/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0007/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0006/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0005/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0004/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-65654f23/shop-65654f23.example.test/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-65654f23/shop-65654f23.example.test/files/0/manifest.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-65654f23/shop-65654f23.example.test/files/0/objects/0000000000000001-3219a41dced96fb041905d467cfd9e6e818fdaa4cedfc0bac7ee1c35c031f14d
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-65654f23/shop-65654f23.example.test/files/0/objects/0000000000000003-a3b32d169f6284d85558734006afe47c62c3bfdaa3830725de57d57236127379
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-65654f23/shop-65654f23.example.test/0000/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-65654f23/shop-65654f23.example.test/0000/0000000000000002-0000000000000002.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-65654f23/shop-65654f23.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-65654f23/shop-65654f23.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1243: drain took 139ms; S3 calls 45 (DELETE lock=1 GET files=3 GET head=1 GET lock=3 GET replica=2 LIST replica=29 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/22 14:35:33 lease: t8-65654f23/plain-65654f23.example.test: acquired in 2ms (client 0s, lock read and write 2ms)
2026/11/22 14:35:33 activator: plain-65654f23.example.test: started carlos-instance@plain\x2d65654f23.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 0s, control socket 0s, key gate 0s, logs 0s) 0s, launch file 0s, gate 0s, root start 1ms)
2026/11/22 14:35:33 activator: plain-65654f23.example.test: carlos-instance@plain\x2d65654f23.example.test.service launched in 1ms, healthy 0s later
2026/11/22 14:35:33 lease: /tmp/carlos-minio-contract-jwdaK1/g/dw726299815/data/instances/plain-65654f23.example.test/plain-65654f23.example.test.db: continuity with the last clean close not proven; snapshot 1-0000000000000001 written before serving
2026/11/22 14:35:33 activator: plain-65654f23.example.test: woke in 8ms: checks 0s, lease 2ms, restore 0s, identity 0s, protect 1ms, spawn 2ms, replicate 4ms
2026/11/22 14:35:33 activator: next-due probe shop-65654f23.example.test: decode /api/next-due: invalid character 'b' looking for beginning of value — recording none (it sleeps until a request)
2026/11/22 14:35:33 activator: shop-65654f23.example.test: released with a marker (clean true, txid 2, files 3:d293e33268c947d28ea484c885d9756a0aaaef94e68f3b4e1643370d9254cff7) in 5ms: files 1ms, sync 0s, record 1ms, marker 3ms
2026/11/22 14:35:33 activator: shop-65654f23.example.test hibernated
2026/11/22 14:35:33 tenant admission is closed for shutdown
2026/11/22 14:35:33 activator: next-due probe plain-65654f23.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/22 14:35:33 activator: plain-65654f23.example.test hibernated
--- PASS: TestHeldHandoverTwoBoxMinio (0.57s)
=== RUN   TestHeldHandoverLostLeaseMinio
2026/11/22 14:35:33 edge: mesh key: minted
2026/11/22 14:35:33 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/22 14:35:33 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/22 14:35:33 tenant admission is open. accepting tenant work
2026/11/22 14:35:33 activator: HA placement host=shop-f9af3903.example.test kind=Place ref=annie reason=roomiest generation=2026-11-22T14:35:33Z lock_generation=0
2026/11/22 14:35:33 lease: t8-f9af3903/shop-f9af3903.example.test: HA lease acquired in 3ms (first wake)
2026/11/22 14:35:33 activator: shop-f9af3903.example.test: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/11/22 14:35:33 activator: shop-f9af3903.example.test: started carlos-instance@shop\x2df9af3903.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 6ms, control socket 0s, key gate 0s, logs 0s) 6ms, launch file 0s, gate 0s, root start 1ms)
2026/11/22 14:35:33 activator: shop-f9af3903.example.test: carlos-instance@shop\x2df9af3903.example.test.service launched in 7ms, healthy 0s later
2026/11/22 14:35:34 activator: shop-f9af3903.example.test: woke in 69ms: checks 0s, lease 4ms, restore 0s, identity 0s, protect 0s, spawn 8ms, replicate 57ms
2026/11/22 14:35:34 activator: next-due probe shop-f9af3903.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/22 14:35:34 activator: final checkpoint shop-f9af3903.example.test: lease: release marker owed for s3://contract-bucket/t8-f9af3903/shop-f9af3903.example.test/lock.json (If-Match "727109cb02493c0c34d5fc00016a1b00"): lease: write release marker: operation error S3: PutObject, https response error StatusCode: 503, RequestID: , HostID: , api error ServiceUnavailable: witness: refused
2026/11/22 14:35:34 activator: shop-f9af3903.example.test hibernated
2026/11/22 14:35:34 activator: handover of shop-f9af3903.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-f9af3903.example.test client 4 "
    hadrain_twobox_minio_linux_test.go:1486: driver calls: [begin shop-f9af3903.example.test <nil> releasing shop-f9af3903.example.test <nil> stop shop-f9af3903.example.test marker=false clean=false <nil> left shop-f9af3903.example.test released without a marker]
    hadrain_twobox_minio_linux_test.go:1487: a request after the loss: 503 "This instance cannot wake right now. Please try again shortly.\n" (Retry-After "10", holder "none", 0s, err <nil>)
2026/11/22 14:35:34 tenant admission is closed for shutdown
2026/11/22 14:35:34 http: proxy error: context canceled
--- PASS: TestHeldHandoverLostLeaseMinio (0.33s)
PASS
ok  	github.com/carlosframework/platform/internal/host	0.944s
Bucket created successfully `local/gen-take`.
local/gen-take versioning is enabled
Created policy `gen-take` successfully.
Added user `gentake` successfully.
Attached Policies: [gen-take]
To User: gentake
=== RUN   TestGenerationTakeMinio
=== RUN   TestGenerationTakeMinio/take
2026/11/22 14:35:35 lease: instances/gen-1795358135398199119.shop.example.com: HA lease acquired in 5ms (first wake)
2026/11/22 14:35:35 lease: instances/gen-1795358135398199119.shop.example.com: HA lease acquired in 3ms (holder terminated)
    gentake_minio_test.go:308: a second create-only copy onto instances/gen-1795358135398199119.shop.example.com/g-00000000000000000002/0000/0000000000000001-0000000000000001.ltx: <nil> (destination condition honoured: false)
2026/11/22 14:35:35 ERROR retention enforcement failed system=store db=w.example.com.db error="enforce snapshot retention: remove ltx files: lease: invalid or changed generation binding"
2026/11/22 14:35:35 http: proxy error: context canceled
2026/11/22 14:35:35 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)"
2026/11/22 14:35:35 http: proxy error: context canceled
=== RUN   TestGenerationTakeMinio/switch-412
2026/11/22 14:35:35 lease: instances/gen-1795358135534506939.shop.example.com: HA lease acquired in 4ms (first wake)
2026/11/22 14:35:35 ERROR retention enforcement failed system=store db=seed.db error="enforce snapshot retention: fetch ltx files: lease: a write has waited too long to reach storage (write fence)"
2026/11/22 14:35:35 lease: instances/gen-1795358135534506939.shop.example.com: HA lease acquired in 3ms (clean marker)
=== RUN   TestGenerationTakeMinio/copy-version
=== RUN   TestGenerationTakeMinio/store-time
2026/11/22 14:35:35 lease: instances/gen-1795358135584423023.shop.example.com: HA lease acquired in 4ms (first wake)
2026/11/22 14:35:35 ERROR retention enforcement failed system=store db=seed.db error="enforce snapshot retention: fetch ltx files: lease: a write has waited too long to reach storage (write fence)"
2026/11/22 14:35:35 lease: instances/gen-1795358135584423023.shop.example.com: HA lease acquired in 3ms (clean marker)
2026/11/22 14:35:35 lease: instances/gen-1795358135584423023.shop.example.com: HA lease acquired in 3ms (unclean marker)
2026/11/22 14:35:35 lease: instances/gen-1795358135584423023.shop.example.com: HA lease acquired in 3ms (unclean marker)
2026/11/22 14:35:35 lease: instances/gen-1795358135584423023.shop.example.com: HA lease acquired in 3ms (unclean marker)
2026/11/22 14:35:35 lease: instances/gen-1795358135584423023.shop.example.com: HA lease acquired in 3ms (unclean marker)
=== RUN   TestGenerationTakeMinio/skew
--- PASS: TestGenerationTakeMinio (0.31s)
    --- PASS: TestGenerationTakeMinio/take (0.14s)
    --- PASS: TestGenerationTakeMinio/switch-412 (0.04s)
    --- 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.318s
minio contract: PASS
=== staticcheck ===
go version go1.26.10 linux/arm64
go: downloading honnef.co/go/tools v0.8.2
go: downloading github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c
go: downloading golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678
go: downloading golang.org/x/sync v0.23.0
go: downloading golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa
staticcheck: clean
=== govulncheck ===
go version go1.26.10 linux/arm64
go: downloading golang.org/x/vuln v1.8.0
go: downloading golang.org/x/telemetry v0.0.0-20260908163034-4bcc4b2ee518
go: downloading golang.org/x/tools v0.50.0
govulncheck: scanned github.com/carlosframework/platform, amadan.net/carlos/platform.git/launchctx
GO-2026-6859  called  stdlib@v1.26.10, fixed in v1.26.11
    HTTP/1 server crash due to MaxBytesReader header race in net/http
    excepted until 2027-01-31 (.amadan/govulncheck-exceptions.tsv:9): net/http MaxBytesReader header race, fixed in go1.26.11. CI and releases stay on go1.26.10 because 1.26.11 deadlocks the edge's Expect: 100-continue path (#897, .amadan/go-toolchain.sh); #904 checked every production MaxBytesReader site and found it unreachable.
GO-2026-5932  required  golang.org/x/crypto@v0.58.0, fixed in v0.58.1-0.20261009181718-2f1f834330b2
    The golang.org/x/crypto/openpgp package is unmaintained, unsafe by design, and has known security issues
    not fatal: no call path to the vulnerable code
govulncheck: clean (2 finding(s), none called outside .amadan/govulncheck-exceptions.tsv)
=== code-health ===
go version go1.26.10 linux/arm64
    codehealth_test.go:42: scanned in 1m45.894s
    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  4184  6365  . apimode.go
          file-lines  3782  7198  internal/activator activator.go
          file-lines  3530  4459  . apimode_test.go
          file-lines  3261  3864  internal/registry registry_test.go
          file-lines  3211  6362  internal/host agent.go
          file-lines  3094  3992  internal/provision reconcile_test.go
          func-lines   870   891  internal/host plan14InstalledClaimLaunch
          func-lines   811  1275  internal/provision Reconcile
          func-lines   769  1242  internal/console (*Server).handleAPIInstanceCreate
          func-lines   688  1232  internal/host runAgent
          func-lines   570   903  internal/activator (*Service).doWakeOnce
          func-lines   538   546  internal/host runServingParkPeerNamespace
          func-lines   519   712  . runRoute
          func-lines   509   569  internal/host TestPagingIsRateLimited
          func-lines   494   809  internal/release adoptHost
          func-lines   441   500  internal/host TestRootInstanceStopExecStop
          func-lines   421   436  internal/host (*ClaimWakeAssembly).Build
          func-lines   421   437  internal/team TestFixture
          func-lines   412   414  internal/console TestDemoProtectionsSourceToLimitAndTakedown
          func-lines   408   485  . TestFleetAppServesThroughTheHub
          func-lines   400   868  internal/provision rootReadArchivedChain
          func-lines   399   732  internal/release PassFilter
          func-lines   390   398  internal/host runFilesSeedPreparationWithLive
          func-lines   383   406  internal/console TestDemoSourceToLiveAndUpdate
          func-lines   379   898  internal/edge (*Edge).ServeHTTP
          func-lines   378   600  internal/console (*Server).handleAPIShip
          func-lines   374   377  internal/host plan14RequiredArtifactsRootRunner
          func-lines   371   417  internal/host TestRootEgressKernelProof
          func-lines   367   635  cmd/console serve
          func-lines   364   371  internal/host testRootMigrationBootstrap
          func-lines   360   362  internal/edge TestDemoAPIAliasBoundary
          func-lines   358   362  internal/registry (*Registry).haJournal
          func-lines   357   358  internal/registry (*Registry).dispatchRemote
          func-lines   355   372  internal/host TestRootSandboxUpdateFromOldBox
          func-lines   343   354  internal/analytics Prune
          func-lines   340   353  internal/host newColdRootHarness
          func-lines   335   557  internal/console (*Store).migrate
          func-lines   334   334  internal/host TestPlan12RecoveryRestoreSourceDatabase
          func-lines   330   371  internal/edge TestRegionalNameNeverLeavesItsRegion
          func-lines   329   471  . runDeploy
          func-lines   329   329  internal/host TestPlan12RecoveryRestoreSourceDatabase.func1
          func-lines   327   369  internal/edge TestTunnelWebSocketEndToEnd
          func-lines   325   455  internal/objstore TestDeliveredContractMinio
          func-lines   320   654  internal/appconfig SyncExecWithCallbacks
          func-lines   315   318  internal/host plan14TimerIntention
          func-lines   311   314  internal/host plan14TimerIntention.func1
          func-lines   310   315  internal/hostbox ColdHandover.Run
          func-lines   308   309  internal/host rootFilesSeedIsolatedWitness
          func-lines   305   323  internal/host hairpinKernelWitness
          func-lines   304   308  internal/console TestHAP2ProductionDoors
          func-lines   302   329  internal/host TestRootG2PoolIngress
        release-importers: . cmd/console internal/activator internal/analytics internal/appconfig internal/apperr internal/applog internal/apppolicy internal/boxid internal/boxvolumes internal/console internal/dbreads internal/dbreads/dbreadstest internal/dbverify internal/demobuild internal/domains internal/doorkey internal/edge internal/edgeproof internal/edgesfile internal/fleetapi internal/grouproll internal/grouprollaws internal/historyreadback internal/host internal/hostactors internal/hostbox internal/hostclaim internal/hostevidence internal/hostexec internal/hostfence internal/hostfiles internal/hostfloor internal/hostguard internal/hostops internal/hostrelocate internal/hostresolve internal/instancectl internal/instanceupdates internal/interactive internal/layout internal/lease internal/ledger internal/mail internal/mailer internal/mailsubmit internal/metrics internal/moves internal/objstore internal/ops internal/park internal/plans internal/provision internal/relay internal/rollout internal/rootfsimage internal/runs internal/s3fake internal/schedule internal/seeds internal/status internal/telemetry internal/usage internal/vet scripts/pathmapcheck scripts/witness-pointer
        not scanned (203 files):
          cmd/carlos-media/drill_other.go: built only for other systems or tags
          cmd/carlos-media/harden_other.go: built only for other systems or tags
          cmd/console/servelock_windows.go: built only for other systems or tags
          cmd/moveprobe/detach_windows.go: built only for other systems or tags
          cmd/rootfswitness/mmap_other.go: built only for other systems or tags
          devbox_acl_other.go: built only for other systems or tags
          devbox_envfile_darwin_test.go: built only for other systems or tags
          devbox_envfile_other.go: built only for other systems or tags
          interactive_term_darwin.go: built only for other systems or tags
          interactive_term_other.go: built only for other systems or tags
          internal/activator/claimprocess_root_other.go: built only for other systems or tags
          internal/activator/escrow_stamp_other.go: built only for other systems or tags
          internal/activator/harecord_other.go: built only for other systems or tags
          internal/activator/ownenv_other.go: built only for other systems or tags
          internal/activator/pty_other.go: built only for other systems or tags
          internal/activator/race_on_test.go: built only for other systems or tags
          internal/activator/rolelaunch_other.go: built only for other systems or tags
          internal/assetcache/statfs_other.go: built only for other systems or tags
          internal/boxself/io_other.go: built only for other systems or tags
          internal/cgroup/cleanup_other.go: built only for other systems or tags
          internal/cgroup/cleanup_other_test.go: built only for other systems or tags
          internal/cgroup/hostprocs_other.go: built only for other systems or tags
          internal/cgroup/recreate_other.go: built only for other systems or tags
          internal/cgroup/role_other.go: built only for other systems or tags
          internal/cgroup/shim_other.go: built only for other systems or tags
          internal/cgroup/strict_other.go: built only for other systems or tags
          internal/cgroup/verify_other.go: built only for other systems or tags
          internal/console/claim_sql_identity_other.go: built only for other systems or tags
          internal/console/geoipverify_other.go: built only for other systems or tags
          internal/console/hostreports_process_other.go: built only for other systems or tags
          internal/console/replicaview_other.go: built only for other systems or tags
          internal/console/restore_sim_nice_other_test.go: built only for other systems or tags
          internal/console/scalecost_other_test.go: built only for other systems or tags
          internal/console/seedscratch_windows.go: built only for other systems or tags
          internal/dbreads/worker_other.go: built only for other systems or tags
          internal/demobuild/security_other.go: built only for other systems or tags
          internal/democlaim/source_other.go: built only for other systems or tags
          internal/devbox/peer_darwin.go: built only for other systems or tags
          internal/devbox/peer_darwin_test.go: built only for other systems or tags
          internal/devbox/peer_other.go: built only for other systems or tags
          internal/devbox/socketcheck_other.go: built only for other systems or tags
          internal/edge/devboxpeer_other.go: built only for other systems or tags
          internal/edge/hairpin_other.go: built only for other systems or tags
          internal/edge/heldbudget_other.go: built only for other systems or tags
          internal/edge/purge_listen_unix.go: built only for other systems or tags
          internal/edge/purge_listen_windows.go: built only for other systems or tags
          internal/edge/race_on_test.go: built only for other systems or tags
          internal/edge/static_artifact_other.go: built only for other systems or tags
          internal/edge/static_recordlock_other.go: built only for other systems or tags
          internal/edge/static_sweep_other.go: built only for other systems or tags
          internal/execsandbox/cleanup_other.go: built only for other systems or tags
          internal/execsandbox/file_other.go: built only for other systems or tags
          internal/execsandbox/oci_other.go: built only for other systems or tags
          internal/fileacl/fileacl_darwin.go: built only for other systems or tags
          internal/fileacl/fileacl_darwin_amd64.s: built only for other systems or tags
          internal/fileacl/fileacl_darwin_arm64.s: built only for other systems or tags
          internal/fileacl/fileacl_darwin_test.go: built only for other systems or tags
          internal/grouproll/state_other.go: built only for other systems or tags
          internal/grouprollaws/pty_darwin.go: built only for other systems or tags
          internal/grouprollaws/pty_other.go: built only for other systems or tags
          internal/hairpin/native_other.go: built only for other systems or tags
          internal/host/applylock_other_test.go: built only for other systems or tags
          internal/host/bootstrapfs_other.go: built only for other systems or tags
          internal/host/boxroles_config_other.go: built only for other systems or tags
          internal/host/claimfilesseed_delegation_other.go: built only for other systems or tags
          internal/host/claimfilesseed_transport_other.go: built only for other systems or tags
          internal/host/claimjournal_containment_other.go: built only for other systems or tags
          internal/host/claimjournal_migration_other.go: built only for other systems or tags
          internal/host/claimlaunch_kernel_other.go: built only for other systems or tags
          internal/host/claimlaunch_rev2_other_test.go: built only for other systems or tags
          internal/host/claimproduction_other.go: built only for other systems or tags
          internal/host/claimready_other.go: built only for other systems or tags
          internal/host/claimroleassembly_other.go: built only for other systems or tags
          internal/host/claimservingartifact_other.go: built only for other systems or tags
          internal/host/claimservinghandover_reboot_other.go: built only for other systems or tags
          internal/host/claimservinghandover_reboot_other_test.go: built only for other systems or tags
          internal/host/claimservingpark_other.go: built only for other systems or tags
          internal/host/claimstate_other.go: built only for other systems or tags
          internal/host/claimstop_kernel_other.go: built only for other systems or tags
          internal/host/claimtoken_inventory_other.go: built only for other systems or tags
          internal/host/claimunit_dropin_other.go: built only for other systems or tags
          internal/host/claimunit_files_other.go: built only for other systems or tags
          internal/host/claimunit_migrate_other.go: built only for other systems or tags
          internal/host/claimunit_ready_other.go: built only for other systems or tags
          internal/host/claimunit_socket_migration_other.go: built only for other systems or tags
          internal/host/dbreads_other.go: built only for other systems or tags
          internal/host/egress_rail_other.go: built only for other systems or tags
          internal/host/fileowner_other.go: built only for other systems or tags
          internal/host/flock_windows.go: built only for other systems or tags
          internal/host/group_config_other.go: built only for other systems or tags
          internal/host/group_maintenance_other.go: built only for other systems or tags
          internal/host/group_maintenance_verbs_other.go: built only for other systems or tags
          internal/host/group_receipt_other.go: built only for other systems or tags
          internal/host/hadrain_call_other.go: built only for other systems or tags
          internal/host/hadrain_socket_other.go: built only for other systems or tags
          internal/host/hadrainfence_other.go: built only for other systems or tags
          internal/host/headroom_other.go: built only for other systems or tags
          internal/host/installchannel_other.go: built only for other systems or tags
          internal/host/metrics_nested_other.go: built only for other systems or tags
          internal/host/movesfloor_other.go: built only for other systems or tags
          internal/host/movesfloorgate_other.go: built only for other systems or tags
          internal/host/movesheldrelease_other.go: built only for other systems or tags
          internal/host/movesmeasure_other.go: built only for other systems or tags
          internal/host/offcloudcredentials_other.go: built only for other systems or tags
          internal/host/registrychild_exec_other.go: built only for other systems or tags
          internal/host/registrychild_other.go: built only for other systems or tags
          internal/host/registryowner_chown_other.go: built only for other systems or tags
          internal/host/registryowner_descriptor_unix.go: built only for other systems or tags
          internal/host/replicahealth_other.go: built only for other systems or tags
          internal/host/rootgeneration_census_other.go: built only for other systems or tags
          internal/host/rootgeneration_kernel_other.go: built only for other systems or tags
          internal/host/rootgeneration_payload_other.go: built only for other systems or tags
          internal/host/rootgeneration_retired_other.go: built only for other systems or tags
          internal/host/rootmigration_production_other.go: built only for other systems or tags
          internal/host/runscset_other.go: built only for other systems or tags
          internal/host/sandboxenv_other.go: built only for other systems or tags
          internal/host/statfs_windows.go: built only for other systems or tags
          internal/host/systemapply_other.go: built only for other systems or tags
          internal/hostbox/census_vendor_other.go: built only for other systems or tags
          internal/hostbox/inventory_identity_other.go: built only for other systems or tags
          internal/hostbox/journalmigration_other.go: built only for other systems or tags
          internal/hostbox/journalnamespace_other.go: built only for other systems or tags
          internal/hostbox/journaltrust_other.go: built only for other systems or tags
          internal/hostbox/migration_census_other.go: built only for other systems or tags
          internal/hostbox/typedpark_other.go: built only for other systems or tags
          internal/hostenv/group_other.go: built only for other systems or tags
          internal/hostenv/write_other.go: built only for other systems or tags
          internal/hostenv/write_other_test.go: built only for other systems or tags
          internal/hostexec/clock_other.go: built only for other systems or tags
          internal/hostexec/clock_other_test.go: built only for other systems or tags
          internal/hostexec/local_other.go: built only for other systems or tags
          internal/hostexec/pending_other.go: built only for other systems or tags
          internal/hostexec/probe_other.go: built only for other systems or tags
          internal/hostexec/rootprocess_other.go: built only for other systems or tags
          internal/hostfiles/dir_other.go: built only for other systems or tags
          internal/hostfiles/refuse_other.go: built only for other systems or tags
          internal/hostfiles/watch_other.go: built only for other systems or tags
          internal/hostfloor/controllers_other.go: built only for other systems or tags
          internal/hostfloor/image_other.go: built only for other systems or tags
          internal/hostguard/flock_other.go: built only for other systems or tags
          internal/hostguard/flock_other_test.go: built only for other systems or tags
          internal/hostguard/record_other.go: built only for other systems or tags
          internal/instancectl/claimexec_other.go: built only for other systems or tags
          internal/instancectl/claimexec_socket_other.go: built only for other systems or tags
          internal/instancectl/claimlaunch_snapshot_other.go: built only for other systems or tags
          internal/instancectl/claimnetwork_other.go: built only for other systems or tags
          internal/instancectl/demo_snapshot_other.go: built only for other systems or tags
          internal/instancectl/egress_cgroup_other.go: built only for other systems or tags
          internal/instancectl/egress_dropin_other.go: built only for other systems or tags
          internal/instancectl/gvisorprobe_other.go: built only for other systems or tags
          internal/instancectl/peer_other.go: built only for other systems or tags
          internal/instancectl/peer_tuple_other.go: built only for other systems or tags
          internal/instancectl/rootfs_identity_other.go: built only for other systems or tags
          internal/instanceexec/claimexec_other.go: built only for other systems or tags
          internal/instanceexec/exec_rootfs_other.go: built only for other systems or tags
          internal/instanceexec/probe_gvisor_other.go: built only for other systems or tags
          internal/instanceexec/probe_hardening_other.go: built only for other systems or tags
          internal/instanceexec/probe_other.go: built only for other systems or tags
          internal/instanceexec/probe_rootfs_other.go: built only for other systems or tags
          internal/instanceexec/sandbox_other.go: built only for other systems or tags
          internal/instanceexec/scope_other.go: built only for other systems or tags
          internal/instanceexec/stop_other.go: built only for other systems or tags
          internal/instanceexec/tty_other.go: built only for other systems or tags
          internal/instancefs/instancefs_other.go: built only for other systems or tags
          internal/launchd/activate_darwin.go: built only for other systems or tags
          internal/launchd/activate_darwin_amd64.s: built only for other systems or tags
          internal/launchd/activate_darwin_arm64.s: built only for other systems or tags
          internal/launchd/activate_darwin_test.go: built only for other systems or tags
          internal/layout/journal_other.go: built only for other systems or tags
          internal/layout/links_other.go: built only for other systems or tags
          internal/mailer/keys_other.go: built only for other systems or tags
          internal/maintenanceexec/run_other.go: built only for other systems or tags
          internal/mediahandler/collect_other.go: built only for other systems or tags
          internal/mediahandler/procs_other.go: built only for other systems or tags
          internal/medialocal/runner_other.go: built only for other systems or tags
          internal/moves/archive/open_other.go: built only for other systems or tags
          internal/moves/archive/sync_other.go: built only for other systems or tags
          internal/ops/flock_windows.go: built only for other systems or tags
          internal/park/local_other.go: built only for other systems or tags
          internal/privatefile/io_other.go: built only for other systems or tags
          internal/proxyproto/peek_other.go: built only for other systems or tags
          internal/relay/race_on_test.go: built only for other systems or tags
          internal/release/consumedfence_other.go: built only for other systems or tags
          internal/release/digestcache_other.go: built only for other systems or tags
          internal/rootaws/credentials_other.go: built only for other systems or tags
          internal/rootaws/open_darwin.go: built only for other systems or tags
          internal/rootfsimage/dir_other.go: built only for other systems or tags
          internal/rootstate/authoritydir_other.go: built only for other systems or tags
          internal/rootstate/authorityfile_other.go: built only for other systems or tags
          internal/rootstate/file_other.go: built only for other systems or tags
          internal/rootstate/link_other.go: built only for other systems or tags
          internal/rootstate/persistent_other.go: built only for other systems or tags
          internal/rootstate/state_other.go: built only for other systems or tags
          internal/safefile/file_other.go: built only for other systems or tags
          internal/safefile/reap_other.go: built only for other systems or tags
          internal/stopevidence/fds_other.go: built only for other systems or tags
          internal/stopevidence/fds_other_test.go: built only for other systems or tags
          internal/stopevidence/holders_other.go: built only for other systems or tags
          internal/stopevidence/reconstruct_other.go: built only for other systems or tags
          internal/team/storelock_other.go: built only for other systems or tags
          internal/team/storelock_windows.go: built only for other systems or tags
          move_offline_run_other.go: built only for other systems or tags
          system_group_other.go: built only for other systems or tags
        
    codehealth_test.go:115: fatal               1094 at  474 sites  log.Fatal*, (*log.Logger).Fatal* and os.Exit in the root package's production files
    codehealth_test.go:115: sleep               1005 at  811 sites  time.Sleep in test files
    codehealth_test.go:115: db-no-context        885 at  703 sites  database calls with no context (dbOpWithoutContext) in production files
    codehealth_test.go:115: host-context         188 at  142 sites  context.Background and context.TODO in internal/host production files
    codehealth_test.go:115: func-lines         18573 at   45 sites  functions over 300 code lines (blank and comment-only lines not counted)
    codehealth_test.go:115: file-lines         30752 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 internal/activator activator.go -: 3782 in the code, the record allows 3783 (make code-health-record lowers it)
    codehealth_test.go:119: below the record: file-lines internal/host agent.go -: 3211 in the code, the record allows 3214 (make code-health-record lowers it)
--- PASS: TestCodeHealth (105.90s)
PASS
ok  	github.com/carlosframework/platform/internal/codehealth	106.819s
=== code-health-record ===
go version go1.26.10 linux/arm64
code-health record: HEAD is on main; comparing with its parent 042e1af6b8acad6a7b0f050584c0951544fef962
=== 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.673s
=== internal_rootaws@0 (26 s, from +33 s)
ok  	github.com/carlosframework/platform/internal/rootaws	24.935s
=== internal_activator@0 (278 s, from +109 s)
ok  	github.com/carlosframework/platform/internal/activator	276.093s
=== internal_activator@1 (269 s, from +109 s)
ok  	github.com/carlosframework/platform/internal/activator	266.877s
=== internal_activator@2 (290 s, from +109 s)
ok  	github.com/carlosframework/platform/internal/activator	287.375s
=== internal_activator@3 (383 s, from +109 s)
ok  	github.com/carlosframework/platform/internal/activator	380.729s
=== internal_activator@4 (284 s, from +109 s)
ok  	github.com/carlosframework/platform/internal/activator	281.340s
=== internal_activator@5 (290 s, from +109 s)
ok  	github.com/carlosframework/platform/internal/activator	287.707s
=== internal_activator@6 (299 s, from +109 s)
ok  	github.com/carlosframework/platform/internal/activator	296.803s
=== internal_activator@7 (432 s, from +109 s)
ok  	github.com/carlosframework/platform/internal/activator	429.878s
=== internal_edge@0 (84 s, from +129 s)
ok  	github.com/carlosframework/platform/internal/edge	80.588s
=== internal_edge@1 (64 s, from +129 s)
ok  	github.com/carlosframework/platform/internal/edge	60.100s
=== internal_edge@2 (188 s, from +129 s)
ok  	github.com/carlosframework/platform/internal/edge	184.347s
=== internal_edge@3 (149 s, from +129 s)
ok  	github.com/carlosframework/platform/internal/edge	145.856s
=== internal_edge@4 (170 s, from +129 s)
ok  	github.com/carlosframework/platform/internal/edge	166.789s
=== internal_edge@5 (235 s, from +129 s)
ok  	github.com/carlosframework/platform/internal/edge	231.453s
=== internal_edge@6 (216 s, from +129 s)
ok  	github.com/carlosframework/platform/internal/edge	212.827s
=== internal_edge@7 (223 s, from +129 s)
ok  	github.com/carlosframework/platform/internal/edge	219.626s
=== internal_edge@8 (213 s, from +129 s)
ok  	github.com/carlosframework/platform/internal/edge	209.148s
=== internal_edge@9 (317 s, from +129 s)
ok  	github.com/carlosframework/platform/internal/edge	313.777s
=== internal_edge@10 (208 s, from +129 s)
ok  	github.com/carlosframework/platform/internal/edge	204.644s
=== internal_edge@11 (247 s, from +129 s)
ok  	github.com/carlosframework/platform/internal/edge	243.873s
=== internal_edge@12 (245 s, from +129 s)
ok  	github.com/carlosframework/platform/internal/edge	241.267s
=== internal_edge@13 (245 s, from +129 s)
ok  	github.com/carlosframework/platform/internal/edge	241.182s
=== internal_edge@14 (197 s, from +129 s)
ok  	github.com/carlosframework/platform/internal/edge	193.035s
=== internal_edge@15 (262 s, from +129 s)
ok  	github.com/carlosframework/platform/internal/edge	258.398s
=== internal_host@0 (15 s, from +188 s)
ok  	github.com/carlosframework/platform/internal/host	11.304s
=== internal_host@1 (9 s, from +188 s)
ok  	github.com/carlosframework/platform/internal/host	5.410s
=== lists: internal_edge 129 s, internal_activator 108 s, internal_host 187 s, internal_rootaws 33 s, internal_systemd 13 s
=== cpu: the gate used 7542 cpu-seconds in 541 s, about 13.9 of 32 cores; the machine as a whole was 43% busy
=== gitleaks ===
go version go1.26.10 linux/arm64
go: downloading github.com/zricethezav/gitleaks/v8 v8.30.1
go: downloading github.com/rs/zerolog v1.33.0
go: downloading github.com/spf13/cobra v1.9.1
go: downloading github.com/charmbracelet/lipgloss v0.5.0
go: downloading github.com/fatih/semgroup v1.2.0
go: downloading github.com/BobuSumisu/aho-corasick v1.0.3
go: downloading github.com/hashicorp/go-version v1.7.0
go: downloading golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa
go: downloading github.com/spf13/viper v1.19.0
go: downloading github.com/gitleaks/go-gitdiff v0.9.1
go: downloading github.com/h2non/filetype v1.1.3
go: downloading github.com/mholt/archives v0.1.2
go: downloading github.com/Masterminds/sprig/v3 v3.3.0
go: downloading github.com/muesli/termenv v0.15.1
go: downloading github.com/mattn/go-runewidth v0.0.14
go: downloading github.com/muesli/reflow v0.2.1-0.20210115123740-9e1d0d53df68
go: downloading github.com/lucasb-eyer/go-colorful v1.2.0
go: downloading github.com/mattn/go-colorable v0.1.14
go: downloading dario.cat/mergo v1.0.1
go: downloading github.com/Masterminds/semver/v3 v3.3.0
go: downloading github.com/shopspring/decimal v1.4.0
go: downloading github.com/mitchellh/copystructure v1.2.0
go: downloading golang.org/x/crypto v0.35.0
go: downloading github.com/spf13/cast v1.7.1
go: downloading github.com/Masterminds/goutils v1.1.1
go: downloading github.com/huandu/xstrings v1.5.0
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading github.com/mitchellh/mapstructure v1.5.0
go: downloading github.com/spf13/afero v1.12.0
go: downloading github.com/spf13/pflag v1.0.6
go: downloading github.com/sagikazarmark/slog-shim v0.1.0
go: downloading github.com/fsnotify/fsnotify v1.8.0
go: downloading github.com/subosito/gotenv v1.6.0
go: downloading gopkg.in/ini.v1 v1.67.0
go: downloading github.com/magiconair/properties v1.8.9
go: downloading github.com/pelletier/go-toml/v2 v2.2.3
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading github.com/rivo/uniseg v0.2.0
go: downloading github.com/mitchellh/reflectwalk v1.0.2
go: downloading github.com/aymanbagabas/go-osc52/v2 v2.0.1
go: downloading golang.org/x/sys v0.30.0
go: downloading golang.org/x/text v0.22.0
go: downloading golang.org/x/sync v0.11.0
go: downloading github.com/klauspost/compress v1.17.11
go: downloading github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707
go: downloading github.com/klauspost/pgzip v1.2.6
go: downloading github.com/bodgit/sevenzip v1.6.0
go: downloading github.com/ulikunitz/xz v0.5.12
go: downloading github.com/sorairolake/lzip-go v0.3.5
go: downloading github.com/therootcompany/xz v1.0.1
go: downloading github.com/minio/minlz v1.0.0
go: downloading github.com/nwaples/rardecode/v2 v2.1.0
go: downloading github.com/pierrec/lz4/v4 v4.1.21
go: downloading github.com/STARRY-S/zip v0.2.1
go: downloading github.com/andybalholm/brotli v1.1.2-0.20250424173009-453214e765f3
go: downloading github.com/bodgit/plumbing v1.3.0
go: downloading github.com/bodgit/windows v1.0.1
go: downloading github.com/hashicorp/go-multierror v1.1.1
go: downloading go4.org v0.0.0-20230225012048-214862532bf5
go: downloading github.com/hashicorp/golang-lru/v2 v2.0.7
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 94 near misses of the names notscanned.go lists
self-test: skipped  the 31 files notscanned.go lists
self-test: refused  a notscanned.go entry git does not track
self-test: refused  a config that does not parse
self-test: refused  a config that does not exist
self-test: refused  a missing gitleaks binary
self-test: 6 planted keys reported, 126 tracked files judged, 3 broken setups refused
gitleaks: scanned 11258 tracked files; 31 not scanned, by exact path (scripts/gitleaks-gate/notscanned.go)
gitleaks: clean
diff --git a/.amadan/code-health.tsv b/.amadan/code-health.tsv
index 7b99e06ea..653e5c781 100644
--- a/.amadan/code-health.tsv
+++ b/.amadan/code-health.tsv
@@ -2186,7 +2186,7 @@ func-lines internal/console (*Store).migrate - 335
func-lines internal/console TestDemoProtectionsSourceToLimitAndTakedown - 412
func-lines internal/console TestDemoSourceToLiveAndUpdate - 383
func-lines internal/console TestHAP2ProductionDoors - 304
-func-lines internal/edge (*Edge).ServeHTTP - 384
+func-lines internal/edge (*Edge).ServeHTTP - 379
func-lines internal/edge TestDemoAPIAliasBoundary - 360
func-lines internal/edge TestRegionalNameNeverLeavesItsRegion - 330
func-lines internal/edge TestTunnelWebSocketEndToEnd - 327
diff --git a/docs/site/rails.md b/docs/site/rails.md
index 9a53ffa1e..80cbd2005 100644
--- a/docs/site/rails.md
+++ b/docs/site/rails.md
@@ -87,6 +87,10 @@ Then set config.active_storage.service = :carlos in production.rb, and add the a
Instances run with memory that cannot be written and executed at once, unless the release is shipped with carlos ship --jit, so YJIT cannot start without it. Rails 7.2 and later turn YJIT on by default. This app turns it off in production.rb with config.yjit = false. To keep YJIT, ship with --jit instead.
+### The visitor's address
+
+Rails request.remote_ip and Rack::Attack see the visitor's address without configuring which proxies to trust. [The visitor's address](/docs/rootfs#the-visitor-s-address) explains where it comes from.
+
## The image
Build the image for arm64, which is what the boxes run. buildx does that on any machine, an Intel laptop included. When the image runs, its root filesystem is read-only, and only /tmp and the directory CARLOS_DB is in can be written.
diff --git a/docs/site/rootfs.md b/docs/site/rootfs.md
index d1b4aa9a6..c01f2f9d9 100644
--- a/docs/site/rootfs.md
+++ b/docs/site/rootfs.md
@@ -75,6 +75,12 @@ carlos ship --check warns when a process runs Node, Bun or Deno and the release
An instance can reach public addresses, such as an object store or a managed database's public endpoint. It cannot reach a private address unless a system operator allows it for the app with carlos apps set --egress-allow, and it never reaches the box it runs on or the cloud's metadata service.
+## The visitor's address
+
+Requests reach the web process with the visitor's address as the last entry of X-Forwarded-For. The platform writes that header itself and removes anything the visitor sent, so the last entry is always the address the platform saw. This also holds on a fleet box, where the request came in through the hub.
+
+Rails request.remote_ip and Rack::Request#ip, which Rack::Attack uses, both return it with no setup.
+
## Commands and consoles
carlos run runs a one-off command on an instance: a data fix, a rake task, an artisan or manage.py command. It runs inside the instance's image, in web's working_dir, with web's environment and the same database. Its output comes back to your terminal, and carlos exits with the command's own status.
diff --git a/docs/superpowers/notes/census-proposal-fleet-client-address-1348.md b/docs/superpowers/notes/census-proposal-fleet-client-address-1348.md
new file mode 100644
index 000000000..117e168cb
--- /dev/null
+++ b/docs/superpowers/notes/census-proposal-fleet-client-address-1348.md
@@ -0,0 +1,19 @@
+# Census approval: fleet-client-address-1348
+
+Ruling `census-ruling-fleet-client-address-1348`. The independent reviewer approves or rejects every change below, 0 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` `Edge.ServeHTTP` | body | unchanged (53) | hop acceptance moved into acceptIngress (pinned: dropHopHeaders; else acceptHop), which then, for a request a tunnel delivered (tunnelclient mark) whose X-Forwarded-For hubVisitor accepts (every entry an IP), carries its last entry as the gate attempt key (gate.WithClientAddr), as ServeLinked does (#1348); a context value on the request, memory only, no read, dial or store access added; no check weakened |
+
+Envelopes re-pinned: `internal/edge`, `internal/gate`.
+
+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` `Edge.ServeHTTP`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-seeded-instances;basis=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body with the import gate checked after the door's scope and a gated row left out of the response cache; serving only;rev3=census-ruling-edge-request-records;basis=one more call in the observer defer, observeRecords(up.route, ...), passing on the route the defer already holds; no new kind of read;rev3=census-ruling-design-edge-rate-limit-358;basis=calls rateAdmit twice, and an admitted request holds a slot on both paths: on the upgrade path before the activator or proxy (the handshake holds its slot through slotWriter, given back at the first final answer or at the reverse proxy's hijack on a 101, so an open WebSocket is not counted; released by a defer), and on the ordinary path after the response-cache check and before the activator and proxy (an admitted request holds a slot through slotWriter, released by a defer); a refusal is a 429 written there and returns; the upgrade path's comment now names slotWriter as its one wrapper; one comment on the door mark reworded; read sites unchanged (22: main's 21 plus edge-request-records' observeRecords pass of the route), offsets moved; no read added;rev3=census-ruling-plans-4c-box-throttle;basis=calls planThrottleAdmit before the response cache, and on an upgrade trackUpgrade then planUpgradeAdmit (plans 4c, Astra findings 1 and 2); the new reads live in those units (plans-4c-units decision). The same read sites here.;rev3=census-ruling-plans-4d-lapse;basis=calls planDisabledAdmit right after the import gate, passing the final upstream's route and the request host; a turned-off route gets the fixed disabled page before the meter, gate, cache and activator (plans 4d). The new read lives in that unit (plans-4d-units decision); one more whole-row pass here.;rev3=census-ruling-edge-protection-2;basis=runs the guard, a pure in-memory matcher on r.URL.Path and RawQuery (internal/edgeguard), once per request after the meter and observer defer and before the password gate, the upgrade branch, the cache and the activator, for a request that is not a door call, a backhauled door hop or a tunnel delivery; a matched block answers a 404 itself through guardDecide; the two new sites are one expression, up.route.Kind == "static" (a static route this box serves checks only the hard tier here and leaves the probe tier to serveTree), a read of the route row the edge already resolved; no new kind of read;rev3=census-ruling-edge-asset-cache-3;basis=the asset cache's three hooks (asset cache plan 3): the request's reserved asset headers are deleted at entry (the fill assertion kept only beside a verified hop); on the exact-remote and lookup-miss branches the far catch (serveAssetFar) is tried before backhaulTo and backhaul; after the observer defer and main's hard and probe checks, a verified hop with a valid fill assertion is answered by serveAssetFillForHop; after the upgrade branch and before gzip and the shared cache, the local catch (serveAssetLocal); the observer defer skips only the usage meter for an acknowledged home fill (out.unbilled); the new reads live in the new units of the edge-asset-cache-3-decisions overlay; the same route row and read sites (25); no read added;rev3=census-ruling-regional-domains-447;basis=#447 Task 5: straight after lookupUpstreamPath it calls regionalGate (regional.go), which for an entry built from a regional_domains row answers 503 to a hop or a deny entry before any arm that can leave the box (the exact-home backhaul, the far asset catch, the door dial, the miss backhaul), and lets a star match through only to the exact-home arm when ExactHome names another box for that distinct exact name; after the exact-home arm a regional deny entry the arm did not answer is refused (regionalRefuse, 503); refusals only, on the route map the edge already holds; read sites unchanged (25);rev3=census-ruling-static-headers;basis=the shared response cache is no longer looked up or filled for a static-kind route: one more read of the route row the edge already resolved (up.route.Kind == "static") in the cacheable expression; a refusal only, nothing new opened or followed;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2 (N-HA10): one call, frontForwardHA, right after the route lookup's !ok block and before the login POST; same reads;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 4: loginPost and cacheable treat a forward row as not this box's to answer (IsForward(), +whole:Route x2): no login form and no shared cache for a forward host. Serving only.;rev3=census-ruling-tunnel-websockets;basis=Deletes the Carlos-Upgrade marker header from incoming requests and puts the upgrade admission (host, path, the entry tenancy, all in hand) on a tunnel arm request. For a login POST on an ungated ArmTunnel row it reads the visitor request body (bounded by gate.MaxFormBody, 413 past it; a request body, not a file) and resolves next against the entry Reload built (Gate, Route); the bytes pass on only when loginPassesThrough holds (spec 7, Tasks 3, 5 and 6).;rev3=census-ruling-console-protection-tab;basis=one more call in the observer defer, observeGuardCount(up.route, out), beside the observeRecords call that files the guard Match: it passes on the route row the defer already holds (+whole:Route) and the request outcome to the usage meter, which counts the check in memory. Called whether or not the request was unbilled, as observeRecords is. Nothing is opened, read or followed; no new kind of read; no check, refusal or serving decision changes.;rev3=census-ruling-probe-burst-limit;basis=answers a probe-burst notice POST (serveBurstNotice) ahead of every route for a non-door caller; builds the guard state for up.route and stamps its account and app (RouteAccount, App) for the cool-down's this-app/other-app label; for a catalogue match on a non-static or tunnelled route, offers the burst rule (in-memory limiter, burstDecide: 429 or a watch verdict, never a block for a fleet or forward row); the observer defer calls noteBurst(up.route, ...); the added sites are the route value already in hand (+registry:App, +whole:Route x5); no new root read or write kind;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): parses the request's query once (stripHoldMarker) to record the carlos_hold=1 mark in the request context; calls classifyHold on the upstream already resolved from the loaded map (the +whole:Route is that in-memory Route), including a second pass for a login POST; gives a marked request on a door-refused route the plain 404; adds the hold branch (planThrottleAdmit, rateAdmit, serveHeld) after the gate; and excludes marked requests from the shared cache. Reads only the request and the already-loaded upstream map; no registry or bucket read added.;rev3=census-ruling-region-ha-p3a;basis=Complete the P3a cut: an exact peer name with no dial target answers the approved admission 503 before local wildcard dispatch or asset serving. ExactHome and lookupHome stop fallback at a present non-dial entry; backhaulTo refuses an empty target before signing or dialing. Retain Task 3 local admission and fixed platform/unit exemptions. Two added whole Route uses feed the local in-memory admission predicate; existing Route values and store/path reads are unchanged.;rev3=census-ruling-stateless-coordinator-route;basis=P24/P25: POST only, exact /api/fleet/replicas/ prefix on the reserved tunnel host calls the existing local console proxy only for an unescaped, already-clean path; malformed forms remain on the hub. No new read sites relative to origin/main. Merge with main 3487d6f6 retains its region HA admission checks before routing and after login target lookup, its empty-home refusal, and their two existing whole:Route reads; these change this unit's digest relative to the previously approved branch tip 92b24a7d.;rev3=census-ruling-stateless-replicas-3;basis=Task 1a: pass the already-resolved Route to the reserved replica-probe handler after acceptHop and existing admissionRefuses, requiring tunnel context plus private marker and refusing door/backhaul ingress. Added whole Route use only; scrub marker before forwarding; HA calls remain unchanged.;rev3=census-ruling-region-ha-p3b;basis=Resolve local aliases/catch-alls with cached peer name ownership before serving. Add registry Account/App/ClaimStamp/Host/Incarnation/ServingSeq and six whole Route references for NameClaim; inputs are agent registry rows/edges publications used by unprivileged edge, not root permits. Closed owners retain names and return 503; aware remote owner cannot fall through on missing transport, while legacy hop/door behavior remains. Merge 45cebde4 retains authenticated replica probes after local admission and before ordinary name resolution; probe authentication still requires the tunnel context.;rev3=census-ruling-agent-start-demo-2;basis=edge.go:1901 enters the protected demo path before ordinary exits; :2012-2015 rechecks the selected marked Route after lookup. Added whole Route use routes demos through serving checks, counters and policy; no new registry query or file open in this unit.;rev3=census-ruling-demo-api-site-route;basis=Reserve the configured site API namespace after hop verification and control-header scrubbing, before ordinary static, cache, billing and tenant dispatch. Validate hop field shape and delegate only allowlisted operations to the dedicated console path with verified client attribution and console admission. The alias helper enables HTTP/1.1 full duplex so an early console refusal does not wait for upload EOF. Existing 56 read sites unchanged; no new registry, bucket or file read.;rev3=census-ruling-region-ha-g2-fixes;basis=Consult HA ingress after region admission and before miss/alias backhaul; no new direct read; routing-only metadata does not create an upstream.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3/W4: backhaul and door calls pass the owner the door checked into backhaulTo; the §6.5 holder follow (once, GET/HEAD or an unswitched upgrade, no body) and one connect-failure fallback dial only boxes in the holder region's view (same Region/Placement/DataBucket, HomeEligible, fresh) for that owner. Holder name comes only from the TLS-verified signed hop answer; app-set X-Carlos-Holder stays stripped. Routing only; the receiving box still re-checks the lease. No new read site.;rev3=census-ruling-edge-page-cache-1;basis=attaches an in-memory page mark holder to every request to an instance route (the +registry:Kind check of up.route.Kind), wraps the hold and upgrade branches in pageDiagnostics, asks servePage after the plan throttle (a hit answered from the page index over the asset store), keeps an opted-in instance out of the LRU (pagesOptedIn), wraps the response in the page writer, and wraps the proxy's writer in assetInformationalScrub on the remaining arms; the page reads are in the new pagecache.go units;rev3=census-ruling-region-ha-held-build;basis=first branch: a request for the reserved control paths /.carlos/ha-drain and /.carlos/ha-take goes to serveHAControl and returns (refused unless a signed ask); no request on those paths reaches a route, a forward or an app; no read added here. region HA held-requests Task 2: X-Carlos-Replayable is read from verified hops only and deleted from every request; just before frontForwardHA, moveGate runs for an HA hibernating route (route HA, Host and the whole Route passed in memory) and can only hold, refuse with an existing answer or front-forward to the confirmed holder; ReleaseMoveTicket before serveHeld; no store or filesystem read added; region HA held-requests Task 5: after the HA control-path branch, every request is counted by the connection drain (conns.track: a cancellable request context, and Connection: close only while draining); memory only; no read added; Task 5 fix 1: after the drain's final barrier a new request is refused at once through handoverExit with the existing answerHolderUnreachable, never forwarded; the tracked request also carries its connection (from ConnContext) so the drain can close it at its bound; memory only; no read added;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 3: the inbound strip also deletes tunnelclient.LinkAppHeader (Carlos-Link-App) from every client request, beside Carlos-Tunnel-Upgrade; a header delete, no read added; linked deployments slice 1 Task 8: a request carrying a link pin (ServeLinked, set only by the home agent's link handler from its own registry's published set) skips the edge's own handlers (HA control, demo handling, the steering probe, the tunnel hub, hop acceptance, the burst notice, the demo API alias, the replica probe), takes its upstream from selectUpstream (the pinned exact entry or a 502), never enters the alias/catch-all backhaul block, the HA front forward, the local asset catch, the page cache or the response LRU; the two lookupUpstreamPath calls become selectUpstream; no read added;rev3=census-ruling-stateless-replicas-4-r28;basis=R28 (#511): for a request whose host has no entry (the lookup miss), after the replica-probe branch, calls refuseRetiredCopy(r, host): within the grace of a host whose replica copy this box retired, the fleet tunnel stream is refused with REFUSED_STREAM (tunnelclient.Refuse) and nothing is written; any other miss gets the unknown-host answer as before; memory only, a refusal only, no read added;rev3=census-ruling-static-site-geo-962;basis=discussion #962: after planDisabledAdmit and before the page mark holder and the observer, a request whose cleaned path is /.carlos/geo (not a linked request) is answered by serveGeoAnswer from the request's geo answer already on the context (decideGeo), 200 JSON no-store or 405, and returns; merged with main (no new read);rev3=census-ruling-fleet-unrouted-503;basis=a request the hub tunnel delivered (tunnelclient mark, not a link channel) for a host this box neither routes nor backhauls answers 503 Retry-After 2 instead of the unknown-host 404; no new read, dial or store access; unmarked requests unchanged (#1008);rev3=census-ruling-fleet-unrouted-503-fix1;basis=a request the hub delivered over this fleet box's channel (MarkFleetChannel, set by the box's own tunnel loop for a "<fleet>/<label>" channel, plus the tunnel client mark) for a host this box neither routes nor backhauls, and not under a platform domain, answers 503 Retry-After 2 instead of the unknown-host 404; fixed log key; no new read, dial or store access; every other request unchanged (#1008);rev3=census-ruling-fix-dbforward-reuse-1032;basis=the drain tracking call now takes withDeclaredBodyEnd(r) instead of r: an HTTP/1 request with a declared Content-Length is served from there on with a body that answers EOF itself after those bytes (#1032), so a proxy transport's confirming read after sending the body upstream no longer lands on the server's closed request body and tears down the upstream connection; HTTP/2 requests are left as they are (Astra r1 P2); memory only, no read, dial or store access added;rev3=census-ruling-fleet-seeded-create-2;basis=The hub's door routing asks boxConsolePath(r) instead of the inline /api/fleet/replicas/ test, so POST /api/fleet/seeds/ goes to the local console by the same rule (POST only, clean path, no RawPath) as the replica doors. Serving only; no read of a path a tenant names; the same 65 read sites.;rev3=census-ruling-path-routes-across-boxes;basis=#186: selection returns requestSelection; a Remote selection is dispatched by servePathRemote (one signed hop, never from a verified hop, door call or pin); the ownership block moved to serveNameOwner/nameOwnerVerdict (pathhop.go), so its route reads left; login re-selection via loginLookupPath plus refuseLoginAcross; LRU also requires pathLRUAllowed; no read added
+
+Seal: `b2f039a12bb284c9a36b391339e25e3f77ec94a3d4e38389ec9ef75261d7873f` → `9fb6041c2fe2f33edf7cc2a0fb6dc05092015414b89cab3610ebcfc04c21d5b0`.
+
+Overlay: `internal/provision/testdata/plan14-root-reads-fleet-client-address-1348.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/docs/superpowers/notes/copy-luna-brief-fleet-client-address-1348.md b/docs/superpowers/notes/copy-luna-brief-fleet-client-address-1348.md
new file mode 100644
index 000000000..3b9b15aba
--- /dev/null
+++ b/docs/superpowers/notes/copy-luna-brief-fleet-client-address-1348.md
@@ -0,0 +1,18 @@
+You are the copy-review gate itself for this set. Paul delegated copy review to you on 2026-10-25; your verdicts ARE the review. Do NOT run the copy-review skill or start any server. You are writing a review report.
+
+House rules (Paul's): plain, direct, short sentences; no jargon left undefined; no em dashes or en dashes; curly quotes are not needed in Markdown docs; no throat-clearing; second person ("you") is fine; facts must stay exactly as given (do not add or drop technical claims). Code identifiers (request.remote_ip, X-Forwarded-For, Rack::Attack) stay as written.
+
+Context: CARLOS platform docs. A fleet box serves apps behind a hub that faces the internet. The platform's edge proxy reaches the app's web process on a unix socket and writes X-Forwarded-For itself, removing anything the client sent; the last entry is the client address the platform saw. This was just fixed for fleet boxes (before, fleet apps saw the hub's address). Rails request.remote_ip and Rack::Request#ip return that entry with default settings (verified against the source).
+
+Strings (key: text):
+
+S1 (docs/site/rootfs.md, new section "## The visitor's address", paragraph 1):
+Requests reach web with the visitor's address as the last entry of X-Forwarded-For. The platform writes that header itself and drops whatever the visitor sent, so the last entry is always the address the platform saw. That holds on a fleet box too, where the request came in through the hub.
+
+S2 (same section, paragraph 2):
+Most frameworks read it with no setup. Rails' request.remote_ip and Rack's request.ip, which Rack::Attack uses, both return it.
+
+S3 (docs/site/rails.md, new subsection "### The visitor's address"; the bracketed text is a link to S1's section):
+request.remote_ip and Rack::Attack see the visitor's address with no trusted-proxy setup. [The visitor's address](/docs/rootfs#the-visitor-s-address) says where it comes from.
+
+Answer ONLY with a Markdown table: key | verdict (keep/change) | new text (full, if changed) | why. Then a "Flags" list for any fact conflict or unclear term (or "none").
diff --git a/docs/superpowers/notes/copy-luna-fleet-client-address-1348.md b/docs/superpowers/notes/copy-luna-fleet-client-address-1348.md
new file mode 100644
index 000000000..5170c3ffb
--- /dev/null
+++ b/docs/superpowers/notes/copy-luna-fleet-client-address-1348.md
@@ -0,0 +1,13 @@
+# Luna copy pass, #1348 (delegated review, Paul 2026-10-25)
+
+| key | verdict (keep/change) | new text (full, if changed) | why |
+|---|---|---|---|
+| S1 | change | Requests reach the web process with the visitor's address as the last entry of X-Forwarded-For. The platform writes that header itself and removes anything the visitor sent, so the last entry is always the address the platform saw. This also holds on a fleet box, where the request came in through the hub. | “Web” is unclear. “Removes” is plainer than “drops,” and the final sentence reads more directly. |
+| S2 | change | Most frameworks read it with no setup. Rails request.remote_ip and Rack::Request#ip, which Rack::Attack uses, both return it. | Uses the exact Rack identifier and avoids the ambiguous “Rack's request.ip.” |
+| S3 | change | Rails request.remote_ip and Rack::Attack see the visitor's address without configuring which proxies to trust. [The visitor's address](/docs/rootfs#the-visitor-s-address) explains where it comes from. | Names Rails explicitly and explains “trusted-proxy setup” in plain language. |
+
+Flags
+
+- S2: “Most frameworks” is broader than the specific framework behavior established in the brief.
+- none
+Applied verbatim except S2: per Luna's flag, "Most frameworks read it with no setup." was dropped and "with no setup" moved onto the Rails/Rack sentence, which the source check supports.
diff --git a/docs/superpowers/reviews/CODEX-FINDINGS-fleet-client-address-1348.md b/docs/superpowers/reviews/CODEX-FINDINGS-fleet-client-address-1348.md
new file mode 100644
index 000000000..0cd28377a
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-FINDINGS-fleet-client-address-1348.md
@@ -0,0 +1,17 @@
+Reviewed `origin/main...69f84d5c`, round 1.
+
+No P1, P2, or P3 findings.
+
+The tunnel senders reconstruct forwarding headers before dispatch. The box preserves validated chains through its app proxies and onward mesh hop; `signForwarded` signs the final outbound chain. Gate-key assignment follows hop acceptance and leaves linked requests’ existing key intact. The test’s `fromTunnel` override is restored during cleanup and does not overlap parallel tests.
+
+Census verdicts:
+
+| Unit or envelope | Verdict | Evidence |
+|---|---|---|
+| `Edge.ServeHTTP` | **Approve** | `internal/edge/edge.go:2265–2276`: validated request metadata becomes an in-memory gate key; no new filesystem, registry, or storage access. |
+| `internal/edge` | **Approve** | `edge.go:1954–1993`, `homemap.go:1714–1759`: transport-scoped header trust, malformed-chain fallback, and final-chain signing preserve the existing checks. |
+| `internal/gate` | **Approve** | `internal/gate/gate.go:212–219`: documentation change only; executable behavior unchanged. |
+
+Validation limits: targeted Go tests could not start because the sandbox forbids filesystem writes. The amadan discussions were inaccessible because networking was blocked; I used the brief and local specs. `git diff --check` passed. No files changed.
+
+**READY**
\ No newline at end of file
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-client-address-1348.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-client-address-1348.md
new file mode 100644
index 000000000..e353a8735
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-fleet-client-address-1348.md
@@ -0,0 +1,78 @@
+# Review brief: branch fleet-client-address-1348 (#1348), round 1 of 3
+
+Repo carlos/platform, branch `fleet-client-address-1348`, commit 387a5e379d2f82a45fc5259b13e24181379a189f.
+Under review: the diff `origin/main...fleet-client-address-1348` (base d3266e8e).
+Authorities: amadan discussion #1348 (the ask and the design note posted there), #476 (the earlier
+trust sketch), and the linked deployments behaviour already on main (internal/edge/edge.go
+ServeLinked, docs/site/linked-deployments.md).
+
+You are an independent reviewer. Read the diff, then the code it touches and the code around it,
+and check every claim against that code.
+
+## The change
+
+Fleet and -tunnel apps behind a hub saw the hub's address as the client. The box's edge, for a
+request that arrived over a tunnel it dialled (tunnelclient's context mark), now passes the hub's
+X-Forwarded-For chain to the app when every entry is an IP (hubVisitor, formerly linkVisitor), and
+keys the password gate's attempt limiter on the chain's last entry. Off a tunnel nothing changes.
+Docs: docs/site/rootfs.md "The visitor's address", docs/site/rails.md pointer.
+
+## Fixed: do not re-argue
+
+- Trust rule (#476, #1348 design note): a request on a tunnel this box dialled to its configured
+ hub is the hub's; on a plaintext tunnel URL an on-path attacker can already inject any request
+ (geoip spec D2 makes the same call for geo headers).
+- Scope: the box only; the hub is unchanged. The platform's own analytics, rate limit, guard and
+ request records skip tunnelled requests on the box and stay that way.
+
+## What to check
+
+1. Trust boundary: can a request reach the box edge's setForwarded or the new gate-key code with
+ fromTunnel true but an X-Forwarded-For the hub did not write? Check every hub-to-channel sender
+ (tunnelRewrite users, linkProxy, replica proxy/replicaRoundTrip, the replica prober, upgrades via
+ roundTripUpgrade, the -tunnel login pass-through) and anything on the box that serves tunnelled
+ requests outside ServeHTTP's normal path. Could a client-sent XFF survive into a hub's outbound
+ tunnel request on any path?
+2. Hub chain correctness: does the hub's outbound chain always end with the client it saw (PPv2
+ listener, hairpin, verified hop, door call, devbox front)? Any case where the box now shows the
+ app an address that is worse than the hub's address (e.g. a platform-internal address)?
+3. Box onward paths: a tunnelled request the box then backhauls to a sibling (mesh hop), proxies via
+ the activator, serves via genproxy/multiProxy, or that is a linked request (pinned) - is the chain
+ right in each, and is the forwarded-for proof (signForwarded) still signing what is sent?
+4. setForwarded ordering: link pin, door, tunnel, hop. Any case where a request is both tunnelled
+ and a verified hop or door call, and the new branch changes the answer wrongly?
+5. The gate key in ServeHTTP: placed after acceptHop; is any gate attempt reachable earlier, or does
+ a linked request get keyed twice differently?
+6. Tests: internal/edge/tunnel_client_addr_test.go - do they prove the end-to-end property (real
+ tunnelclient loop, hub edge, box edge) and the fallbacks? The fromTunnel override is a package
+ var; is the test safe under the package's parallelism?
+7. Docs accuracy (rootfs.md, rails.md): "the last entry is always the address the platform saw",
+ "This also holds on a fleet box". True on every path to a rootfs app's web process? Rails
+ request.remote_ip / Rack::Request#ip claims were checked against Puma 8 / actionpack 8.1 / rack
+ 3.2 source: rightmost non-trusted entry; REMOTE_ADDR on a unix socket is blank or loopback.
+8. Census: docs/superpowers/notes/census-proposal-fleet-client-address-1348.md. Give a verdict for
+ the Edge.ServeHTTP unit and for the internal/edge and internal/gate envelopes: reject if root now
+ opens, runs, queries or follows anything new from a path or input a tenant, app or box agent can
+ create, write or name, or if a check the basis relies on is weakened.
+
+## 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; never a reason for another round.
+
+A P1 states its failure scenario and the evidence (file:line). Do not raise a P2 to P1 to keep the
+review open.
+
+## Output
+
+Findings ranked P1, P2, P3. Each gives the area, the problem, the evidence (file:line, verified),
+the failure scenario, a concrete fix and the invariant or trust boundary it breaks. Then the census
+verdicts (approve/reject per unit and envelope). End with exactly one verdict:
+
+- **READY**: no P1 and no P2.
+- **READY AFTER FIXES**: no P1. The listed P2s are fixed without another round.
+- **NOT READY**: one or more P1s, listed.
+
+Do not edit files. Do not spawn Anthropic-model reviewers or subagents of your own. Do not run the
+full test suites; targeted `go test ./internal/edge/ -run <pattern>` is fine (leave GOCACHE unset).
diff --git a/internal/edge/edge.go b/internal/edge/edge.go
index d204ab19e..52501ce1c 100644
--- a/internal/edge/edge.go
+++ b/internal/edge/edge.go
@@ -1937,7 +1937,7 @@ func linkedRequest(ctx context.Context) bool {
// Host and X-Forwarded-Host want.PublicHost with X-Forwarded-Proto
// https (linkedBackend, setForwarded).
// - The visitor: when the hub's X-Forwarded-For is well formed
-// (linkVisitor: every entry an IP), the chain goes to the app
+// (hubVisitor: every entry an IP), the chain goes to the app
// (setForwarded) and the gate's attempt limiter keys on its last entry,
// the client the hub observed (gate.WithClientAddr), not on the
// tunnel's address every visitor shares. A malformed or missing header
@@ -1953,7 +1953,7 @@ func linkedRequest(ctx context.Context) bool {
// the request.
func (e *Edge) ServeLinked(w http.ResponseWriter, r *http.Request, want LinkedTarget) {
ctx := gate.WithPublicHost(withLinkPin(r.Context(), want), want.PublicHost)
- if visitor, _, ok := linkVisitor(r.Header); ok {
+ if visitor, _, ok := hubVisitor(r.Header); ok {
ctx = gate.WithClientAddr(ctx, visitor)
}
r = r.WithContext(ctx)
@@ -1961,16 +1961,38 @@ func (e *Edge) ServeLinked(w http.ResponseWriter, r *http.Request, want LinkedTa
e.ServeHTTP(w, r)
}
-// linkVisitor is a linked request's visitor: the last X-Forwarded-For entry,
-// the client address the hub observed and appended (the hub never passes a
-// client's own X-Forwarded-For on), and the whole chain, normalized. Only a
-// linked request is read this way (ServeLinked, setForwarded): on every
-// other ingress the header is the client's to forge. It accepts the header
+// acceptIngress is ServeHTTP's hop acceptance and its tunnel visitor. A
+// linked request (pinned) is never a hop: its hop vocabulary is dropped
+// unread, as acceptHop drops a client's. Any other request goes through
+// acceptHop. Then a request a tunnel delivered is keyed by the gate's
+// attempt limiter on the client the hub observed, not on the tunnel's
+// address every visitor shares (#1348), as ServeLinked keys a linked one.
+func (e *Edge) acceptIngress(r *http.Request, host string, pinned bool) (*http.Request, bool) {
+ if pinned {
+ dropHopHeaders(r)
+ return r, false
+ }
+ r, hopped := e.acceptHop(r, host)
+ if fromTunnel(r.Context()) {
+ if visitor, _, ok := hubVisitor(r.Header); ok {
+ r = r.WithContext(gate.WithClientAddr(r.Context(), visitor))
+ }
+ }
+ return r, hopped
+}
+
+// hubVisitor is the visitor of a request a hub delivered over a tunnel, a
+// linked one included: the last X-Forwarded-For entry, the client address
+// the hub observed (the hub writes the chain itself in tunnelRewrite and
+// never passes a client's own X-Forwarded-For on), and the whole chain,
+// normalized. Only a tunnelled request is read this way (ServeLinked,
+// ServeHTTP's gate key, setForwarded; #1348): on every other ingress the
+// header is the client's to forge. It accepts the header
// only when every entry, on every line, is an IP address; anything else
// (no header, an empty one, an empty or malformed entry anywhere) is false,
// and the request keeps the connection peer as its client, as any request
// does.
-func linkVisitor(h http.Header) (visitor, chain string, ok bool) {
+func hubVisitor(h http.Header) (visitor, chain string, ok bool) {
lines := h.Values("X-Forwarded-For")
if len(lines) == 0 {
return "", "", false
@@ -2255,14 +2277,7 @@ func (e *Edge) ServeHTTP(w http.ResponseWriter, r *http.Request) {
demoHopPresent = len(markers) != 0 || len(proofs) != 0
demoHopWellFormed = !demoHopPresent || (len(markers) == 1 && markers[0] == "1" && len(proofs) == 1 && proofs[0] != "")
}
- // A linked request is never a hop: its hop vocabulary is dropped
- // unread, as acceptHop drops a client's.
- hopped := false
- if pinned {
- dropHopHeaders(r)
- } else {
- r, hopped = e.acceptHop(r, host)
- }
+ r, hopped := e.acceptIngress(r, host, pinned)
// A probe-burst notice from another edge (burst_notice.go) is answered
// here, ahead of every route, so it never reaches a tenant's app. Only a
// POST to its path carrying its header is one: anything else, that path
diff --git a/internal/edge/homemap.go b/internal/edge/homemap.go
index faa6375b9..85c360ca9 100644
--- a/internal/edge/homemap.go
+++ b/internal/edge/homemap.go
@@ -1719,12 +1719,12 @@ func setForwarded(pr *httputil.ProxyRequest) {
// A linked request (ServeLinked) reaches its app as the visitor sent it
// to the serving side: the public host (linkedBackend has already made
// it pr.In.Host, so Host and the proof agree) over https, and, when
- // linkVisitor accepts it, the hub's X-Forwarded-For chain (normalized),
+ // hubVisitor accepts it, the hub's X-Forwarded-For chain (normalized),
// whose last entry is the client the hub observed. A chain it refuses
// never reaches the app: SetXForwarded's value, the connection peer,
// stays. It is never a door call or a hop.
if want, pinned := linkPinFrom(pr.In.Context()); pinned {
- if _, chain, ok := linkVisitor(pr.In.Header); ok {
+ if _, chain, ok := hubVisitor(pr.In.Header); ok {
pr.Out.Header.Set("X-Forwarded-For", chain)
}
pr.Out.Header.Set("X-Forwarded-Host", want.PublicHost)
@@ -1739,6 +1739,18 @@ func setForwarded(pr *httputil.ProxyRequest) {
pr.Out.Header.Set("X-Forwarded-Proto", "https")
return
}
+ // A request a tunnel delivered (#1348) came from the hub this box
+ // dialled, whose own setForwarded wrote the chain (tunnelRewrite): its
+ // last entry is the client the hub observed, and the tunnel's peer, the
+ // hub, is nobody's client. So the app gets the hub's chain, as a linked
+ // request's app does, when hubVisitor accepts it; a chain it refuses
+ // leaves SetXForwarded's value, the peer. Upgrades ride this proxy too.
+ if fromTunnel(pr.In.Context()) {
+ if _, chain, ok := hubVisitor(pr.In.Header); ok {
+ pr.Out.Header.Set("X-Forwarded-For", chain)
+ }
+ return
+ }
if !hopVerified(pr.In.Context()) {
return
}
diff --git a/internal/edge/linkpin_test.go b/internal/edge/linkpin_test.go
index c1775ae79..fd3758fd4 100644
--- a/internal/edge/linkpin_test.go
+++ b/internal/edge/linkpin_test.go
@@ -471,15 +471,29 @@ func TestLinkPinForwardedFallback(t *testing.T) {
}
wrong := url.Values{"password": {"nope-nope-nope"}, "next": {"/"}}.Encode()
login := func(chain string) int { return serve("POST", gate.LoginPath, chain, wrong).Code }
- // Ten malformed or missing chains from one peer share the peer's bucket.
- bad := []string{"198.51.100.7, invalid", "", "-", "x", "invalid, 198.51.100.8"}
- for i := 0; i < 10; i++ {
- if code := login(bad[i%len(bad)]); code != http.StatusUnauthorized {
- t.Fatalf("attempt %d: %d, want 401", i+1, code)
- }
- }
- if code := login("198.51.100.7, also-invalid"); code != http.StatusTooManyRequests {
- t.Fatalf("an 11th malformed attempt from the peer: %d, want 429 (the peer's bucket)", code)
+ // Eleven malformed or missing chains from one peer share the peer's
+ // bucket of ten: exactly one is refused. They run at once: the bucket
+ // refills a token every six seconds, and eleven bcrypts in a row under
+ // -race take long enough to refill one (#1348). The bucket is spent
+ // before bcrypt runs, so concurrent attempts reach it together.
+ bad := []string{"198.51.100.7, invalid", "", "-", "x", "invalid, 198.51.100.8", "198.51.100.7, also-invalid"}
+ codes := make(chan int, 11)
+ var wg sync.WaitGroup
+ for i := 0; i < 11; i++ {
+ wg.Add(1)
+ go func() {
+ defer wg.Done()
+ codes <- login(bad[i%len(bad)])
+ }()
+ }
+ wg.Wait()
+ close(codes)
+ count := map[int]int{}
+ for c := range codes {
+ count[c]++
+ }
+ if count[http.StatusUnauthorized] != 10 || count[http.StatusTooManyRequests] != 1 {
+ t.Fatalf("eleven malformed attempts from the peer answered %v, want ten 401s and one 429 (the peer's bucket)", count)
}
if code := login("198.51.100.9"); code != http.StatusUnauthorized {
t.Fatalf("a well-formed visitor through the same peer: %d, want its own 401", code)
diff --git a/internal/edge/tunnel_client_addr_test.go b/internal/edge/tunnel_client_addr_test.go
new file mode 100644
index 000000000..45ed50545
--- /dev/null
+++ b/internal/edge/tunnel_client_addr_test.go
@@ -0,0 +1,268 @@
+package edge
+
+import (
+ "bufio"
+ "context"
+ "fmt"
+ "io"
+ "net"
+ "net/http"
+ "net/http/httptest"
+ "net/url"
+ "strings"
+ "sync"
+ "testing"
+
+ "github.com/carlosframework/platform/internal/gate"
+ "github.com/carlosframework/platform/internal/registry"
+)
+
+// #1348: an app behind a tunnel sees the client the hub saw, as a shared-box
+// app sees its own client. The hub writes X-Forwarded-For fresh for every
+// request it sends down a tunnel (tunnelRewrite); the box passes that chain
+// to the app instead of the tunnel's peer, which is the hub.
+
+// hubSeenClient is the address the hub's listener reports for a visitor in
+// these tests: on loopback, the visitor, the hub and the tunnel's peer are
+// all 127.0.0.1, so the hub is told a distinct one, as the PPv2 listener
+// would tell it the real client's.
+const hubSeenClient = "198.51.100.7"
+
+// tunnelAddrScene is a hub edge serving demo.example over a real
+// tunnelclient connection to a box whose own Edge proxies to a TCP app.
+// wrap is applied to the box's edge as the box's agent would apply its
+// channel handler. It returns the hub's URL and what the app saw.
+func tunnelAddrScene(t *testing.T, wrap func(http.Handler) http.Handler) (hubURL string, seen func() []string) {
+ t.Helper()
+ var mu sync.Mutex
+ var xff []string
+ app := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ got := strings.Join(r.Header.Values("X-Forwarded-For"), ", ")
+ mu.Lock()
+ xff = append(xff, got)
+ mu.Unlock()
+ if r.Header.Get("Upgrade") == "websocket" {
+ conn, rw, err := http.NewResponseController(w).Hijack()
+ if err != nil {
+ t.Errorf("hijack: %v", err)
+ return
+ }
+ defer conn.Close()
+ fmt.Fprintf(rw, "HTTP/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nX-Seen-For: %s\r\n\r\n", got)
+ rw.Flush()
+ return
+ }
+ io.WriteString(w, "app")
+ }))
+ t.Cleanup(app.Close)
+ boxReg := openReg(t)
+ if err := boxReg.Upsert(registry.Route{Host: "demo.example", Kind: "service", Addr: app.Listener.Addr().String(), Status: "ready"}); err != nil {
+ t.Fatal(err)
+ }
+ box, err := New(boxReg, nil)
+ if err != nil {
+ t.Fatal(err)
+ }
+ t.Cleanup(box.probers.Stop)
+
+ hubReg := tunnelRoute(t, registry.Route{Host: "demo.example", Kind: "instance", Status: "ready", Tunnel: "pi-box"})
+ hub, err := New(hubReg, nil)
+ if err != nil {
+ t.Fatal(err)
+ }
+ t.Cleanup(hub.probers.Stop)
+ srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ if r.Host == "demo.example" {
+ r.RemoteAddr = net.JoinHostPort(hubSeenClient, "40000")
+ }
+ hub.ServeHTTP(w, r)
+ }))
+ t.Cleanup(srv.Close)
+ u, _ := url.Parse(srv.URL)
+ th := NewTunnelHub(u.Hostname(), map[string]string{"pi-box": "sekrit"})
+ hub.EnableTunnels(th)
+ if err := hub.Reload(); err != nil {
+ t.Fatal(err)
+ }
+ t.Cleanup(startFakeRemoteHost(t, srv.URL, "pi-box", "sekrit", wrap(box)))
+ waitForTunnelState(t, th, "pi-box", "connected", e2eReconnectBound)
+ return srv.URL, func() []string {
+ mu.Lock()
+ defer mu.Unlock()
+ return append([]string(nil), xff...)
+ }
+}
+
+func TestTunnelledAppSeesTheClientTheHubSaw(t *testing.T) {
+ for _, c := range []struct {
+ name string
+ wrap func(http.Handler) http.Handler
+ }{
+ {"static channel", func(h http.Handler) http.Handler { return h }},
+ {"fleet channel", MarkFleetChannel},
+ } {
+ t.Run(c.name, func(t *testing.T) {
+ hubURL, seen := tunnelAddrScene(t, c.wrap)
+ req, _ := http.NewRequest("GET", hubURL+"/", nil)
+ req.Host = "demo.example"
+ req.Header.Set("X-Forwarded-For", "6.6.6.6") // a visitor's forgery at the hub
+ resp, err := http.DefaultClient.Do(req)
+ if err != nil {
+ t.Fatal(err)
+ }
+ io.Copy(io.Discard, resp.Body)
+ resp.Body.Close()
+ if resp.StatusCode != 200 {
+ t.Fatalf("through the tunnel: %d", resp.StatusCode)
+ }
+ if got := seen(); len(got) != 1 || got[0] != hubSeenClient {
+ t.Fatalf("the app saw X-Forwarded-For %q, want exactly %q (the client the hub saw)", got, hubSeenClient)
+ }
+ })
+ }
+}
+
+// A WebSocket upgrade rides the same proxy on the box, so it carries the
+// same address (#471's upgrades, #1348).
+func TestTunnelledUpgradeSeesTheClientTheHubSaw(t *testing.T) {
+ hubURL, _ := tunnelAddrScene(t, MarkFleetChannel)
+ u, _ := url.Parse(hubURL)
+ conn, err := net.Dial("tcp", u.Host)
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer conn.Close()
+ fmt.Fprintf(conn, "GET /cable HTTP/1.1\r\nHost: demo.example\r\nConnection: Upgrade\r\nUpgrade: websocket\r\n"+
+ "Sec-WebSocket-Version: 13\r\nSec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==\r\nX-Forwarded-For: 6.6.6.6\r\n\r\n")
+ resp, err := http.ReadResponse(bufio.NewReader(conn), nil)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if resp.StatusCode != http.StatusSwitchingProtocols {
+ t.Fatalf("upgrade through the tunnel: %d", resp.StatusCode)
+ }
+ if got := resp.Header.Get("X-Seen-For"); got != hubSeenClient {
+ t.Fatalf("the app saw X-Forwarded-For %q on the upgrade, want %q", got, hubSeenClient)
+ }
+}
+
+// What the box believes of the hub's chain, and what the gate keys on: a
+// well-formed chain goes to the app whole and its last entry is the
+// visitor; anything else falls back to the connection's peer, as for any
+// request. Off a tunnel the chain is the client's and is never believed.
+func TestTunnelledForwardedFallback(t *testing.T) {
+ var mu sync.Mutex
+ var xff []string
+ app := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ mu.Lock()
+ xff = append(xff, strings.Join(r.Header.Values("X-Forwarded-For"), ", "))
+ mu.Unlock()
+ io.WriteString(w, "app")
+ }))
+ t.Cleanup(app.Close)
+ const host = "demo.example"
+ reg := openReg(t)
+ if err := reg.Upsert(registry.Route{Host: host, Kind: "service", Addr: app.Listener.Addr().String(), Status: "ready"}); err != nil {
+ t.Fatal(err)
+ }
+ e, err := New(reg, nil)
+ if err != nil {
+ t.Fatal(err)
+ }
+ t.Cleanup(e.probers.Stop)
+ tunnelled := true
+ saved := fromTunnel
+ fromTunnel = func(context.Context) bool { return tunnelled }
+ t.Cleanup(func() { fromTunnel = saved })
+
+ const peer = "192.0.2.10"
+ serve := func(method, path, chain, body string) *httptest.ResponseRecorder {
+ req := httptest.NewRequest(method, "http://"+host+path, strings.NewReader(body))
+ req.RemoteAddr = peer + ":40000"
+ if chain != "-" {
+ req.Header.Set("X-Forwarded-For", chain)
+ }
+ if body != "" {
+ req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
+ }
+ rec := httptest.NewRecorder()
+ e.ServeHTTP(rec, req)
+ return rec
+ }
+ cases := []struct {
+ tunnelled bool
+ chain, app string
+ }{
+ {true, "198.51.100.7", "198.51.100.7"},
+ {true, "203.0.113.5, 198.51.100.7", "203.0.113.5, 198.51.100.7"},
+ {true, " 198.51.100.7 ", "198.51.100.7"},
+ {true, "2001:db8::1", "2001:db8::1"},
+ {true, "198.51.100.7, invalid", peer},
+ {true, "invalid, 198.51.100.7", peer},
+ {true, "", peer},
+ {true, "-", peer},
+ {true, "198.51.100.7,", peer},
+ {false, "198.51.100.7", peer},
+ }
+ for _, c := range cases {
+ tunnelled = c.tunnelled
+ mu.Lock()
+ xff = nil
+ mu.Unlock()
+ if rec := serve("GET", "/", c.chain, ""); rec.Code != 200 {
+ t.Fatalf("tunnelled=%v X-Forwarded-For %q: %d", c.tunnelled, c.chain, rec.Code)
+ }
+ mu.Lock()
+ got := strings.Join(xff, "|")
+ mu.Unlock()
+ if got != c.app {
+ t.Errorf("tunnelled=%v X-Forwarded-For %q: the app saw %q, want %q", c.tunnelled, c.chain, got, c.app)
+ }
+ }
+
+ tunnelled = true
+ hash, err := gate.Hash("shop-password")
+ if err != nil {
+ t.Fatal(err)
+ }
+ if err := reg.SetGate(host, hash); err != nil {
+ t.Fatal(err)
+ }
+ if err := e.Reload(); err != nil {
+ t.Fatal(err)
+ }
+ wrong := url.Values{"password": {"nope-nope-nope"}, "next": {"/"}}.Encode()
+ login := func(chain string) int { return serve("POST", gate.LoginPath, chain, wrong).Code }
+ // Eleven attempts from one visitor the hub saw share that visitor's
+ // bucket of ten: exactly one is refused. They run at once because the
+ // bucket refills a token every six seconds and each refused password
+ // costs a bcrypt, which under -race takes long enough to refill; the
+ // bucket is spent before bcrypt runs (gate.Admit), so concurrent
+ // attempts reach it within milliseconds.
+ codes := make(chan int, 11)
+ var wg sync.WaitGroup
+ for i := 0; i < 11; i++ {
+ wg.Add(1)
+ go func() {
+ defer wg.Done()
+ codes <- login("198.51.100.7")
+ }()
+ }
+ wg.Wait()
+ close(codes)
+ count := map[int]int{}
+ for c := range codes {
+ count[c]++
+ }
+ if count[http.StatusUnauthorized] != 10 || count[http.StatusTooManyRequests] != 1 {
+ t.Fatalf("eleven attempts from one visitor answered %v, want ten 401s and one 429", count)
+ }
+ // Another visitor through the same hub has its own bucket.
+ if code := login("198.51.100.9"); code != http.StatusUnauthorized {
+ t.Fatalf("another visitor through the same hub: %d, want its own 401", code)
+ }
+ // A malformed chain is keyed on the peer, which nobody has spent.
+ if code := login("x"); code != http.StatusUnauthorized {
+ t.Fatalf("a malformed chain: %d, want 401 in the peer's bucket", code)
+ }
+}
diff --git a/internal/gate/gate.go b/internal/gate/gate.go
index 5d9c9e474..39334aa23 100644
--- a/internal/gate/gate.go
+++ b/internal/gate/gate.go
@@ -211,9 +211,10 @@ type clientAddrKey struct{}
// WithClientAddr marks ctx's request as one from the visitor at addr,
// whatever its RemoteAddr says, for the attempt limiter. The edge sets it
-// only for a request a linked deployment's hub delivered (linked
-// deployments spec §6.2), whose RemoteAddr is the tunnel's, shared by every
-// visitor: addr is the client address the hub observed.
+// only for a request a hub delivered over a tunnel, a linked deployment's
+// included (linked deployments spec §6.2, #1348), whose RemoteAddr is the
+// tunnel's, shared by every visitor: addr is the client address the hub
+// observed.
func WithClientAddr(ctx context.Context, addr string) context.Context {
return context.WithValue(ctx, clientAddrKey{}, addr)
}
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index dc67c94ce..721bc6e11 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -277,3 +277,4 @@ plan14-root-reads-headers-security-allowlist.tsv f959a3626e83650aaad1880eecc3fed
plan14-root-reads-stateless-scale-1-memory-env.tsv 47ebd73418bcbe1bdf9cf34a2b94e3393a1279aea58f9ee0aca3f0cfe42b9132
plan14-root-reads-group-revoke-readback-1255.tsv 47ebd73418bcbe1bdf9cf34a2b94e3393a1279aea58f9ee0aca3f0cfe42b9132
plan14-root-reads-precert-dns01-1293.tsv b2f039a12bb284c9a36b391339e25e3f77ec94a3d4e38389ec9ef75261d7873f
+plan14-root-reads-fleet-client-address-1348.tsv 9fb6041c2fe2f33edf7cc2a0fb6dc05092015414b89cab3610ebcfc04c21d5b0
diff --git a/internal/provision/testdata/plan14-root-reads-fleet-client-address-1348.tsv b/internal/provision/testdata/plan14-root-reads-fleet-client-address-1348.tsv
new file mode 100644
index 000000000..6683186c4
--- /dev/null
+++ b/internal/provision/testdata/plan14-root-reads-fleet-client-address-1348.tsv
@@ -0,0 +1,6 @@
+# Census overlay fleet-client-address-1348, written by census-propose (#369). census-ruling-fleet-client-address-1348, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-fleet-client-address-1348.md.
+# 1 body, 0 sites, 2 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+@legacy 19e4b3a3e14be4028f087fd216f52fb871bf0d59bcd9ba1c6efd5934897d5a67 internal/edge/edge.go Edge.ServeHTTP legacy accepted-legacy accepted-legacy;rev3=census-ruling-seeded-instances;basis=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body with the import gate checked after the door's scope and a gated row left out of the response cache; serving only;rev3=census-ruling-edge-request-records;basis=one more call in the observer defer, observeRecords(up.route, ...), passing on the route the defer already holds; no new kind of read;rev3=census-ruling-design-edge-rate-limit-358;basis=calls rateAdmit twice, and an admitted request holds a slot on both paths: on the upgrade path before the activator or proxy (the handshake holds its slot through slotWriter, given back at the first final answer or at the reverse proxy's hijack on a 101, so an open WebSocket is not counted; released by a defer), and on the ordinary path after the response-cache check and before the activator and proxy (an admitted request holds a slot through slotWriter, released by a defer); a refusal is a 429 written there and returns; the upgrade path's comment now names slotWriter as its one wrapper; one comment on the door mark reworded; read sites unchanged (22: main's 21 plus edge-request-records' observeRecords pass of the route), offsets moved; no read added;rev3=census-ruling-plans-4c-box-throttle;basis=calls planThrottleAdmit before the response cache, and on an upgrade trackUpgrade then planUpgradeAdmit (plans 4c, Astra findings 1 and 2); the new reads live in those units (plans-4c-units decision). The same read sites here.;rev3=census-ruling-plans-4d-lapse;basis=calls planDisabledAdmit right after the import gate, passing the final upstream's route and the request host; a turned-off route gets the fixed disabled page before the meter, gate, cache and activator (plans 4d). The new read lives in that unit (plans-4d-units decision); one more whole-row pass here.;rev3=census-ruling-edge-protection-2;basis=runs the guard, a pure in-memory matcher on r.URL.Path and RawQuery (internal/edgeguard), once per request after the meter and observer defer and before the password gate, the upgrade branch, the cache and the activator, for a request that is not a door call, a backhauled door hop or a tunnel delivery; a matched block answers a 404 itself through guardDecide; the two new sites are one expression, up.route.Kind == "static" (a static route this box serves checks only the hard tier here and leaves the probe tier to serveTree), a read of the route row the edge already resolved; no new kind of read;rev3=census-ruling-edge-asset-cache-3;basis=the asset cache's three hooks (asset cache plan 3): the request's reserved asset headers are deleted at entry (the fill assertion kept only beside a verified hop); on the exact-remote and lookup-miss branches the far catch (serveAssetFar) is tried before backhaulTo and backhaul; after the observer defer and main's hard and probe checks, a verified hop with a valid fill assertion is answered by serveAssetFillForHop; after the upgrade branch and before gzip and the shared cache, the local catch (serveAssetLocal); the observer defer skips only the usage meter for an acknowledged home fill (out.unbilled); the new reads live in the new units of the edge-asset-cache-3-decisions overlay; the same route row and read sites (25); no read added;rev3=census-ruling-regional-domains-447;basis=#447 Task 5: straight after lookupUpstreamPath it calls regionalGate (regional.go), which for an entry built from a regional_domains row answers 503 to a hop or a deny entry before any arm that can leave the box (the exact-home backhaul, the far asset catch, the door dial, the miss backhaul), and lets a star match through only to the exact-home arm when ExactHome names another box for that distinct exact name; after the exact-home arm a regional deny entry the arm did not answer is refused (regionalRefuse, 503); refusals only, on the route map the edge already holds; read sites unchanged (25);rev3=census-ruling-static-headers;basis=the shared response cache is no longer looked up or filled for a static-kind route: one more read of the route row the edge already resolved (up.route.Kind == "static") in the cacheable expression; a refusal only, nothing new opened or followed;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2 (N-HA10): one call, frontForwardHA, right after the route lookup's !ok block and before the login POST; same reads;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 4: loginPost and cacheable treat a forward row as not this box's to answer (IsForward(), +whole:Route x2): no login form and no shared cache for a forward host. Serving only.;rev3=census-ruling-tunnel-websockets;basis=Deletes the Carlos-Upgrade marker header from incoming requests and puts the upgrade admission (host, path, the entry tenancy, all in hand) on a tunnel arm request. For a login POST on an ungated ArmTunnel row it reads the visitor request body (bounded by gate.MaxFormBody, 413 past it; a request body, not a file) and resolves next against the entry Reload built (Gate, Route); the bytes pass on only when loginPassesThrough holds (spec 7, Tasks 3, 5 and 6).;rev3=census-ruling-console-protection-tab;basis=one more call in the observer defer, observeGuardCount(up.route, out), beside the observeRecords call that files the guard Match: it passes on the route row the defer already holds (+whole:Route) and the request outcome to the usage meter, which counts the check in memory. Called whether or not the request was unbilled, as observeRecords is. Nothing is opened, read or followed; no new kind of read; no check, refusal or serving decision changes.;rev3=census-ruling-probe-burst-limit;basis=answers a probe-burst notice POST (serveBurstNotice) ahead of every route for a non-door caller; builds the guard state for up.route and stamps its account and app (RouteAccount, App) for the cool-down's this-app/other-app label; for a catalogue match on a non-static or tunnelled route, offers the burst rule (in-memory limiter, burstDecide: 429 or a watch verdict, never a block for a fleet or forward row); the observer defer calls noteBurst(up.route, ...); the added sites are the route value already in hand (+registry:App, +whole:Route x5); no new root read or write kind;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): parses the request's query once (stripHoldMarker) to record the carlos_hold=1 mark in the request context; calls classifyHold on the upstream already resolved from the loaded map (the +whole:Route is that in-memory Route), including a second pass for a login POST; gives a marked request on a door-refused route the plain 404; adds the hold branch (planThrottleAdmit, rateAdmit, serveHeld) after the gate; and excludes marked requests from the shared cache. Reads only the request and the already-loaded upstream map; no registry or bucket read added.;rev3=census-ruling-region-ha-p3a;basis=Complete the P3a cut: an exact peer name with no dial target answers the approved admission 503 before local wildcard dispatch or asset serving. ExactHome and lookupHome stop fallback at a present non-dial entry; backhaulTo refuses an empty target before signing or dialing. Retain Task 3 local admission and fixed platform/unit exemptions. Two added whole Route uses feed the local in-memory admission predicate; existing Route values and store/path reads are unchanged.;rev3=census-ruling-stateless-coordinator-route;basis=P24/P25: POST only, exact /api/fleet/replicas/ prefix on the reserved tunnel host calls the existing local console proxy only for an unescaped, already-clean path; malformed forms remain on the hub. No new read sites relative to origin/main. Merge with main 3487d6f6 retains its region HA admission checks before routing and after login target lookup, its empty-home refusal, and their two existing whole:Route reads; these change this unit's digest relative to the previously approved branch tip 92b24a7d.;rev3=census-ruling-stateless-replicas-3;basis=Task 1a: pass the already-resolved Route to the reserved replica-probe handler after acceptHop and existing admissionRefuses, requiring tunnel context plus private marker and refusing door/backhaul ingress. Added whole Route use only; scrub marker before forwarding; HA calls remain unchanged.;rev3=census-ruling-region-ha-p3b;basis=Resolve local aliases/catch-alls with cached peer name ownership before serving. Add registry Account/App/ClaimStamp/Host/Incarnation/ServingSeq and six whole Route references for NameClaim; inputs are agent registry rows/edges publications used by unprivileged edge, not root permits. Closed owners retain names and return 503; aware remote owner cannot fall through on missing transport, while legacy hop/door behavior remains. Merge 45cebde4 retains authenticated replica probes after local admission and before ordinary name resolution; probe authentication still requires the tunnel context.;rev3=census-ruling-agent-start-demo-2;basis=edge.go:1901 enters the protected demo path before ordinary exits; :2012-2015 rechecks the selected marked Route after lookup. Added whole Route use routes demos through serving checks, counters and policy; no new registry query or file open in this unit.;rev3=census-ruling-demo-api-site-route;basis=Reserve the configured site API namespace after hop verification and control-header scrubbing, before ordinary static, cache, billing and tenant dispatch. Validate hop field shape and delegate only allowlisted operations to the dedicated console path with verified client attribution and console admission. The alias helper enables HTTP/1.1 full duplex so an early console refusal does not wait for upload EOF. Existing 56 read sites unchanged; no new registry, bucket or file read.;rev3=census-ruling-region-ha-g2-fixes;basis=Consult HA ingress after region admission and before miss/alias backhaul; no new direct read; routing-only metadata does not create an upstream.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3/W4: backhaul and door calls pass the owner the door checked into backhaulTo; the §6.5 holder follow (once, GET/HEAD or an unswitched upgrade, no body) and one connect-failure fallback dial only boxes in the holder region's view (same Region/Placement/DataBucket, HomeEligible, fresh) for that owner. Holder name comes only from the TLS-verified signed hop answer; app-set X-Carlos-Holder stays stripped. Routing only; the receiving box still re-checks the lease. No new read site.;rev3=census-ruling-edge-page-cache-1;basis=attaches an in-memory page mark holder to every request to an instance route (the +registry:Kind check of up.route.Kind), wraps the hold and upgrade branches in pageDiagnostics, asks servePage after the plan throttle (a hit answered from the page index over the asset store), keeps an opted-in instance out of the LRU (pagesOptedIn), wraps the response in the page writer, and wraps the proxy's writer in assetInformationalScrub on the remaining arms; the page reads are in the new pagecache.go units;rev3=census-ruling-region-ha-held-build;basis=first branch: a request for the reserved control paths /.carlos/ha-drain and /.carlos/ha-take goes to serveHAControl and returns (refused unless a signed ask); no request on those paths reaches a route, a forward or an app; no read added here. region HA held-requests Task 2: X-Carlos-Replayable is read from verified hops only and deleted from every request; just before frontForwardHA, moveGate runs for an HA hibernating route (route HA, Host and the whole Route passed in memory) and can only hold, refuse with an existing answer or front-forward to the confirmed holder; ReleaseMoveTicket before serveHeld; no store or filesystem read added; region HA held-requests Task 5: after the HA control-path branch, every request is counted by the connection drain (conns.track: a cancellable request context, and Connection: close only while draining); memory only; no read added; Task 5 fix 1: after the drain's final barrier a new request is refused at once through handoverExit with the existing answerHolderUnreachable, never forwarded; the tracked request also carries its connection (from ConnContext) so the drain can close it at its bound; memory only; no read added;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 3: the inbound strip also deletes tunnelclient.LinkAppHeader (Carlos-Link-App) from every client request, beside Carlos-Tunnel-Upgrade; a header delete, no read added; linked deployments slice 1 Task 8: a request carrying a link pin (ServeLinked, set only by the home agent's link handler from its own registry's published set) skips the edge's own handlers (HA control, demo handling, the steering probe, the tunnel hub, hop acceptance, the burst notice, the demo API alias, the replica probe), takes its upstream from selectUpstream (the pinned exact entry or a 502), never enters the alias/catch-all backhaul block, the HA front forward, the local asset catch, the page cache or the response LRU; the two lookupUpstreamPath calls become selectUpstream; no read added;rev3=census-ruling-stateless-replicas-4-r28;basis=R28 (#511): for a request whose host has no entry (the lookup miss), after the replica-probe branch, calls refuseRetiredCopy(r, host): within the grace of a host whose replica copy this box retired, the fleet tunnel stream is refused with REFUSED_STREAM (tunnelclient.Refuse) and nothing is written; any other miss gets the unknown-host answer as before; memory only, a refusal only, no read added;rev3=census-ruling-static-site-geo-962;basis=discussion #962: after planDisabledAdmit and before the page mark holder and the observer, a request whose cleaned path is /.carlos/geo (not a linked request) is answered by serveGeoAnswer from the request's geo answer already on the context (decideGeo), 200 JSON no-store or 405, and returns; merged with main (no new read);rev3=census-ruling-fleet-unrouted-503;basis=a request the hub tunnel delivered (tunnelclient mark, not a link channel) for a host this box neither routes nor backhauls answers 503 Retry-After 2 instead of the unknown-host 404; no new read, dial or store access; unmarked requests unchanged (#1008);rev3=census-ruling-fleet-unrouted-503-fix1;basis=a request the hub delivered over this fleet box's channel (MarkFleetChannel, set by the box's own tunnel loop for a "<fleet>/<label>" channel, plus the tunnel client mark) for a host this box neither routes nor backhauls, and not under a platform domain, answers 503 Retry-After 2 instead of the unknown-host 404; fixed log key; no new read, dial or store access; every other request unchanged (#1008);rev3=census-ruling-fix-dbforward-reuse-1032;basis=the drain tracking call now takes withDeclaredBodyEnd(r) instead of r: an HTTP/1 request with a declared Content-Length is served from there on with a body that answers EOF itself after those bytes (#1032), so a proxy transport's confirming read after sending the body upstream no longer lands on the server's closed request body and tears down the upstream connection; HTTP/2 requests are left as they are (Astra r1 P2); memory only, no read, dial or store access added;rev3=census-ruling-fleet-seeded-create-2;basis=The hub's door routing asks boxConsolePath(r) instead of the inline /api/fleet/replicas/ test, so POST /api/fleet/seeds/ goes to the local console by the same rule (POST only, clean path, no RawPath) as the replica doors. Serving only; no read of a path a tenant names; the same 65 read sites.;rev3=census-ruling-path-routes-across-boxes;basis=#186: selection returns requestSelection; a Remote selection is dispatched by servePathRemote (one signed hop, never from a verified hop, door call or pin); the ownership block moved to serveNameOwner/nameOwnerVerdict (pathhop.go), so its route reads left; login re-selection via loginLookupPath plus refuseLoginAcross; LRU also requires pathLRUAllowed; no read added;rev3=census-ruling-fleet-client-address-1348;basis=hop acceptance moved into acceptIngress (pinned: dropHopHeaders; else acceptHop), which then, for a request a tunnel delivered (tunnelclient mark) whose X-Forwarded-For hubVisitor accepts (every entry an IP), carries its last entry as the gate attempt key (gate.WithClientAddr), as ServeLinked does (#1348); a context value on the request, memory only, no read, dial or store access added; no check weakened file:ReadAll@19091,registry:App@26368,registry:Gate@18065,registry:Gate@30759,registry:Gate@30819,registry:Gate@30877,registry:HA@13809,registry:HA@14151,registry:Host@14190,registry:Host@30862,registry:ImportGate@39754,registry:Kind@23402,registry:Kind@25230,registry:Kind@28668,registry:Kind@39696,registry:Kind@39725,whole:Route@13812,whole:Route@13906,whole:Route@14154,whole:Route@14193,whole:Route@17960,whole:Route@18071,whole:Route@20370,whole:Route@21154,whole:Route@21612,whole:Route@21804,whole:Route@23405,whole:Route@25233,whole:Route@26294,whole:Route@26360,whole:Route@26371,whole:Route@26624,whole:Route@26719,whole:Route@26795,whole:Route@26839,whole:Route@27141,whole:Route@27171,whole:Route@28671,whole:Route@28956,whole:Route@30762,whole:Route@30822,whole:Route@30865,whole:Route@30880,whole:Route@32091,whole:Route@34379,whole:Route@39699,whole:Route@39728,whole:Route@39757,whole:Route@39789,whole:Route@42256,whole:Route@8405,whole:Route@8504,whole:Route@8610 3b450b21a2e2b49ccac127eb9917fdc5a2dfdec1c490ccf89151f443f8b37825
+internal/edge/edge.go Edge.ServeHTTP legacy accepted-legacy accepted-legacy;rev3=census-ruling-seeded-instances;basis=the edge inside the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): main's body with the import gate checked after the door's scope and a gated row left out of the response cache; serving only;rev3=census-ruling-edge-request-records;basis=one more call in the observer defer, observeRecords(up.route, ...), passing on the route the defer already holds; no new kind of read;rev3=census-ruling-design-edge-rate-limit-358;basis=calls rateAdmit twice, and an admitted request holds a slot on both paths: on the upgrade path before the activator or proxy (the handshake holds its slot through slotWriter, given back at the first final answer or at the reverse proxy's hijack on a 101, so an open WebSocket is not counted; released by a defer), and on the ordinary path after the response-cache check and before the activator and proxy (an admitted request holds a slot through slotWriter, released by a defer); a refusal is a 429 written there and returns; the upgrade path's comment now names slotWriter as its one wrapper; one comment on the door mark reworded; read sites unchanged (22: main's 21 plus edge-request-records' observeRecords pass of the route), offsets moved; no read added;rev3=census-ruling-plans-4c-box-throttle;basis=calls planThrottleAdmit before the response cache, and on an upgrade trackUpgrade then planUpgradeAdmit (plans 4c, Astra findings 1 and 2); the new reads live in those units (plans-4c-units decision). The same read sites here.;rev3=census-ruling-plans-4d-lapse;basis=calls planDisabledAdmit right after the import gate, passing the final upstream's route and the request host; a turned-off route gets the fixed disabled page before the meter, gate, cache and activator (plans 4d). The new read lives in that unit (plans-4d-units decision); one more whole-row pass here.;rev3=census-ruling-edge-protection-2;basis=runs the guard, a pure in-memory matcher on r.URL.Path and RawQuery (internal/edgeguard), once per request after the meter and observer defer and before the password gate, the upgrade branch, the cache and the activator, for a request that is not a door call, a backhauled door hop or a tunnel delivery; a matched block answers a 404 itself through guardDecide; the two new sites are one expression, up.route.Kind == "static" (a static route this box serves checks only the hard tier here and leaves the probe tier to serveTree), a read of the route row the edge already resolved; no new kind of read;rev3=census-ruling-edge-asset-cache-3;basis=the asset cache's three hooks (asset cache plan 3): the request's reserved asset headers are deleted at entry (the fill assertion kept only beside a verified hop); on the exact-remote and lookup-miss branches the far catch (serveAssetFar) is tried before backhaulTo and backhaul; after the observer defer and main's hard and probe checks, a verified hop with a valid fill assertion is answered by serveAssetFillForHop; after the upgrade branch and before gzip and the shared cache, the local catch (serveAssetLocal); the observer defer skips only the usage meter for an acknowledged home fill (out.unbilled); the new reads live in the new units of the edge-asset-cache-3-decisions overlay; the same route row and read sites (25); no read added;rev3=census-ruling-regional-domains-447;basis=#447 Task 5: straight after lookupUpstreamPath it calls regionalGate (regional.go), which for an entry built from a regional_domains row answers 503 to a hop or a deny entry before any arm that can leave the box (the exact-home backhaul, the far asset catch, the door dial, the miss backhaul), and lets a star match through only to the exact-home arm when ExactHome names another box for that distinct exact name; after the exact-home arm a regional deny entry the arm did not answer is refused (regionalRefuse, 503); refusals only, on the route map the edge already holds; read sites unchanged (25);rev3=census-ruling-static-headers;basis=the shared response cache is no longer looked up or filled for a static-kind route: one more read of the route row the edge already resolved (up.route.Kind == "static") in the cacheable expression; a refusal only, nothing new opened or followed;rev3=census-ruling-region-ha-p1b2;basis=region HA P1b-2 (N-HA10): one call, frontForwardHA, right after the route lookup's !ok block and before the login POST; same reads;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 4: loginPost and cacheable treat a forward row as not this box's to answer (IsForward(), +whole:Route x2): no login form and no shared cache for a forward host. Serving only.;rev3=census-ruling-tunnel-websockets;basis=Deletes the Carlos-Upgrade marker header from incoming requests and puts the upgrade admission (host, path, the entry tenancy, all in hand) on a tunnel arm request. For a login POST on an ungated ArmTunnel row it reads the visitor request body (bounded by gate.MaxFormBody, 413 past it; a request body, not a file) and resolves next against the entry Reload built (Gate, Route); the bytes pass on only when loginPassesThrough holds (spec 7, Tasks 3, 5 and 6).;rev3=census-ruling-console-protection-tab;basis=one more call in the observer defer, observeGuardCount(up.route, out), beside the observeRecords call that files the guard Match: it passes on the route row the defer already holds (+whole:Route) and the request outcome to the usage meter, which counts the check in memory. Called whether or not the request was unbilled, as observeRecords is. Nothing is opened, read or followed; no new kind of read; no check, refusal or serving decision changes.;rev3=census-ruling-probe-burst-limit;basis=answers a probe-burst notice POST (serveBurstNotice) ahead of every route for a non-door caller; builds the guard state for up.route and stamps its account and app (RouteAccount, App) for the cool-down's this-app/other-app label; for a catalogue match on a non-static or tunnelled route, offers the burst rule (in-memory limiter, burstDecide: 429 or a watch verdict, never a block for a fleet or forward row); the observer defer calls noteBurst(up.route, ...); the added sites are the route value already in hand (+registry:App, +whole:Route x5); no new root read or write kind;rev3=census-ruling-edge-held-streams;basis=the edge in the agent (carlos-edge.service, user carlos): parses the request's query once (stripHoldMarker) to record the carlos_hold=1 mark in the request context; calls classifyHold on the upstream already resolved from the loaded map (the +whole:Route is that in-memory Route), including a second pass for a login POST; gives a marked request on a door-refused route the plain 404; adds the hold branch (planThrottleAdmit, rateAdmit, serveHeld) after the gate; and excludes marked requests from the shared cache. Reads only the request and the already-loaded upstream map; no registry or bucket read added.;rev3=census-ruling-region-ha-p3a;basis=Complete the P3a cut: an exact peer name with no dial target answers the approved admission 503 before local wildcard dispatch or asset serving. ExactHome and lookupHome stop fallback at a present non-dial entry; backhaulTo refuses an empty target before signing or dialing. Retain Task 3 local admission and fixed platform/unit exemptions. Two added whole Route uses feed the local in-memory admission predicate; existing Route values and store/path reads are unchanged.;rev3=census-ruling-stateless-coordinator-route;basis=P24/P25: POST only, exact /api/fleet/replicas/ prefix on the reserved tunnel host calls the existing local console proxy only for an unescaped, already-clean path; malformed forms remain on the hub. No new read sites relative to origin/main. Merge with main 3487d6f6 retains its region HA admission checks before routing and after login target lookup, its empty-home refusal, and their two existing whole:Route reads; these change this unit's digest relative to the previously approved branch tip 92b24a7d.;rev3=census-ruling-stateless-replicas-3;basis=Task 1a: pass the already-resolved Route to the reserved replica-probe handler after acceptHop and existing admissionRefuses, requiring tunnel context plus private marker and refusing door/backhaul ingress. Added whole Route use only; scrub marker before forwarding; HA calls remain unchanged.;rev3=census-ruling-region-ha-p3b;basis=Resolve local aliases/catch-alls with cached peer name ownership before serving. Add registry Account/App/ClaimStamp/Host/Incarnation/ServingSeq and six whole Route references for NameClaim; inputs are agent registry rows/edges publications used by unprivileged edge, not root permits. Closed owners retain names and return 503; aware remote owner cannot fall through on missing transport, while legacy hop/door behavior remains. Merge 45cebde4 retains authenticated replica probes after local admission and before ordinary name resolution; probe authentication still requires the tunnel context.;rev3=census-ruling-agent-start-demo-2;basis=edge.go:1901 enters the protected demo path before ordinary exits; :2012-2015 rechecks the selected marked Route after lookup. Added whole Route use routes demos through serving checks, counters and policy; no new registry query or file open in this unit.;rev3=census-ruling-demo-api-site-route;basis=Reserve the configured site API namespace after hop verification and control-header scrubbing, before ordinary static, cache, billing and tenant dispatch. Validate hop field shape and delegate only allowlisted operations to the dedicated console path with verified client attribution and console admission. The alias helper enables HTTP/1.1 full duplex so an early console refusal does not wait for upload EOF. Existing 56 read sites unchanged; no new registry, bucket or file read.;rev3=census-ruling-region-ha-g2-fixes;basis=Consult HA ingress after region admission and before miss/alias backhaul; no new direct read; routing-only metadata does not create an upstream.;rev3=census-ruling-region-ha-g2r-fixes;basis=W3/W4: backhaul and door calls pass the owner the door checked into backhaulTo; the §6.5 holder follow (once, GET/HEAD or an unswitched upgrade, no body) and one connect-failure fallback dial only boxes in the holder region's view (same Region/Placement/DataBucket, HomeEligible, fresh) for that owner. Holder name comes only from the TLS-verified signed hop answer; app-set X-Carlos-Holder stays stripped. Routing only; the receiving box still re-checks the lease. No new read site.;rev3=census-ruling-edge-page-cache-1;basis=attaches an in-memory page mark holder to every request to an instance route (the +registry:Kind check of up.route.Kind), wraps the hold and upgrade branches in pageDiagnostics, asks servePage after the plan throttle (a hit answered from the page index over the asset store), keeps an opted-in instance out of the LRU (pagesOptedIn), wraps the response in the page writer, and wraps the proxy's writer in assetInformationalScrub on the remaining arms; the page reads are in the new pagecache.go units;rev3=census-ruling-region-ha-held-build;basis=first branch: a request for the reserved control paths /.carlos/ha-drain and /.carlos/ha-take goes to serveHAControl and returns (refused unless a signed ask); no request on those paths reaches a route, a forward or an app; no read added here. region HA held-requests Task 2: X-Carlos-Replayable is read from verified hops only and deleted from every request; just before frontForwardHA, moveGate runs for an HA hibernating route (route HA, Host and the whole Route passed in memory) and can only hold, refuse with an existing answer or front-forward to the confirmed holder; ReleaseMoveTicket before serveHeld; no store or filesystem read added; region HA held-requests Task 5: after the HA control-path branch, every request is counted by the connection drain (conns.track: a cancellable request context, and Connection: close only while draining); memory only; no read added; Task 5 fix 1: after the drain's final barrier a new request is refused at once through handoverExit with the existing answerHolderUnreachable, never forwarded; the tracked request also carries its connection (from ConnContext) so the drain can close it at its bound; memory only; no read added;rev3=census-ruling-linked-deployments-slice1;basis=linked deployments slice 1 Task 3: the inbound strip also deletes tunnelclient.LinkAppHeader (Carlos-Link-App) from every client request, beside Carlos-Tunnel-Upgrade; a header delete, no read added; linked deployments slice 1 Task 8: a request carrying a link pin (ServeLinked, set only by the home agent's link handler from its own registry's published set) skips the edge's own handlers (HA control, demo handling, the steering probe, the tunnel hub, hop acceptance, the burst notice, the demo API alias, the replica probe), takes its upstream from selectUpstream (the pinned exact entry or a 502), never enters the alias/catch-all backhaul block, the HA front forward, the local asset catch, the page cache or the response LRU; the two lookupUpstreamPath calls become selectUpstream; no read added;rev3=census-ruling-stateless-replicas-4-r28;basis=R28 (#511): for a request whose host has no entry (the lookup miss), after the replica-probe branch, calls refuseRetiredCopy(r, host): within the grace of a host whose replica copy this box retired, the fleet tunnel stream is refused with REFUSED_STREAM (tunnelclient.Refuse) and nothing is written; any other miss gets the unknown-host answer as before; memory only, a refusal only, no read added;rev3=census-ruling-static-site-geo-962;basis=discussion #962: after planDisabledAdmit and before the page mark holder and the observer, a request whose cleaned path is /.carlos/geo (not a linked request) is answered by serveGeoAnswer from the request's geo answer already on the context (decideGeo), 200 JSON no-store or 405, and returns; merged with main (no new read);rev3=census-ruling-fleet-unrouted-503;basis=a request the hub tunnel delivered (tunnelclient mark, not a link channel) for a host this box neither routes nor backhauls answers 503 Retry-After 2 instead of the unknown-host 404; no new read, dial or store access; unmarked requests unchanged (#1008);rev3=census-ruling-fleet-unrouted-503-fix1;basis=a request the hub delivered over this fleet box's channel (MarkFleetChannel, set by the box's own tunnel loop for a "<fleet>/<label>" channel, plus the tunnel client mark) for a host this box neither routes nor backhauls, and not under a platform domain, answers 503 Retry-After 2 instead of the unknown-host 404; fixed log key; no new read, dial or store access; every other request unchanged (#1008);rev3=census-ruling-fix-dbforward-reuse-1032;basis=the drain tracking call now takes withDeclaredBodyEnd(r) instead of r: an HTTP/1 request with a declared Content-Length is served from there on with a body that answers EOF itself after those bytes (#1032), so a proxy transport's confirming read after sending the body upstream no longer lands on the server's closed request body and tears down the upstream connection; HTTP/2 requests are left as they are (Astra r1 P2); memory only, no read, dial or store access added;rev3=census-ruling-fleet-seeded-create-2;basis=The hub's door routing asks boxConsolePath(r) instead of the inline /api/fleet/replicas/ test, so POST /api/fleet/seeds/ goes to the local console by the same rule (POST only, clean path, no RawPath) as the replica doors. Serving only; no read of a path a tenant names; the same 65 read sites.;rev3=census-ruling-path-routes-across-boxes;basis=#186: selection returns requestSelection; a Remote selection is dispatched by servePathRemote (one signed hop, never from a verified hop, door call or pin); the ownership block moved to serveNameOwner/nameOwnerVerdict (pathhop.go), so its route reads left; login re-selection via loginLookupPath plus refuseLoginAcross; LRU also requires pathLRUAllowed; no read added;rev3=census-ruling-fleet-client-address-1348;basis=hop acceptance moved into acceptIngress (pinned: dropHopHeaders; else acceptHop), which then, for a request a tunnel delivered (tunnelclient mark) whose X-Forwarded-For hubVisitor accepts (every entry an IP), carries its last entry as the gate attempt key (gate.WithClientAddr), as ServeLinked does (#1348); a context value on the request, memory only, no read, dial or store access added; no check weakened file:ReadAll@19091,registry:App@26368,registry:Gate@18065,registry:Gate@30759,registry:Gate@30819,registry:Gate@30877,registry:HA@13809,registry:HA@14151,registry:Host@14190,registry:Host@30862,registry:ImportGate@39754,registry:Kind@23402,registry:Kind@25230,registry:Kind@28668,registry:Kind@39696,registry:Kind@39725,whole:Route@13812,whole:Route@13906,whole:Route@14154,whole:Route@14193,whole:Route@17960,whole:Route@18071,whole:Route@20370,whole:Route@21154,whole:Route@21612,whole:Route@21804,whole:Route@23405,whole:Route@25233,whole:Route@26294,whole:Route@26360,whole:Route@26371,whole:Route@26624,whole:Route@26719,whole:Route@26795,whole:Route@26839,whole:Route@27141,whole:Route@27171,whole:Route@28671,whole:Route@28956,whole:Route@30762,whole:Route@30822,whole:Route@30865,whole:Route@30880,whole:Route@32091,whole:Route@34379,whole:Route@39699,whole:Route@39728,whole:Route@39757,whole:Route@39789,whole:Route@42256,whole:Route@8405,whole:Route@8504,whole:Route@8610 3b450b21a2e2b49ccac127eb9917fdc5a2dfdec1c490ccf89151f443f8b37825
+@coverage internal/edge 13acd10c5bca7a338a898c90d1677fcddd35b4a5d0f58d64d9b18a59f27d15c3
+@coverage internal/gate 7b140d60ca2a8c62fa47279c0a747c076bc755595680c97037736f555ae40fbf