carlos / platform Public

edge: fleet claim listing names only the account's own claims

H5-M8 round 3 (option A, the cut). The store door's claim listing now
returns only the fleet account's own claims, pending included. The
round-2 collision candidates, the shared waiting fold and the shared
domains helpers are removed; the cached fold keeps the round-1 cost and
publishes its progress when a request goes away.

A fleet box no longer yields a derived name to another tenant's claim.
That is safe: fleet boxes publish no edges file and cannot write
control/edges/, so their rows never reach a platform edge, which routes
names to fleets from platform rows that read every claim.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 694169363fa8d86266f54b2f85342991e26161e8 parent fdb98b5
15 files changed, +305 −799
  • docs/superpowers/notes/census-proposal-sec-h5-m8-fleet-hostnames.md +2 −8
  • internal/console/domaincatchall.go +4 −2
  • internal/domains/aliases.go +28 −72
  • internal/domains/claims.go +12 −27
  • internal/domains/namespacealiases.go +5 −55
  • internal/domains/reconcile.go +2 −2
  • internal/edge/edge.go +1 −1
  • internal/edge/fleetapi_e2e_test.go +33 −43
  • internal/edge/hunt_H5-M8_test.go +2 −2
  • internal/edge/storedoor.go +39 −55
  • internal/edge/storedoor_claims.go +79 −300
  • internal/edge/storedoor_claims_test.go +90 −218
  • internal/edge/storedoor_test.go +2 −2
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −1
  • internal/provision/testdata/plan14-root-reads-sec-h5-m8-fleet-hostnames.tsv +5 −11

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-VTWsU2
.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/costexplorer v1.67.5
go: downloading github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.68.0
go: downloading github.com/aws/aws-sdk-go-v2/service/s3 v1.105.0
go: downloading github.com/aws/smithy-go v1.28.1
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading golang.org/x/net v0.62.0
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/prometheus/client_golang v1.17.0
go: downloading golang.org/x/sys v0.49.0
go: downloading github.com/aws/aws-sdk-go-v2/service/acm v1.45.0
go: downloading golang.org/x/sync v0.24.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ec2 v1.324.0
go: downloading golang.org/x/crypto v0.58.0
go: downloading github.com/aws/aws-sdk-go-v2/service/iam v1.58.2
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/prometheus/common v0.45.0
go: downloading github.com/prometheus/procfs v0.12.0
go: downloading google.golang.org/protobuf v1.36.10
go: downloading github.com/pion/dtls/v3 v3.1.4
go: downloading github.com/pion/transport/v4 v4.0.2
go: downloading github.com/pion/randutil v0.1.0
go: downloading github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/wlynxg/anet v0.0.5
go: downloading golang.org/x/text v0.43.0
go: downloading github.com/klauspost/compress v1.20.2
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading modernc.org/libc v1.74.1
go: downloading 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 github.com/dustin/go-humanize v1.0.1
go: downloading modernc.org/memory v1.11.0
go: downloading github.com/google/uuid v1.6.0
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec
=== 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 (171 s, from +0 s)
go: downloading github.com/klauspost/compress v1.20.2
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading modernc.org/libc v1.74.1
go: downloading 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 github.com/dustin/go-humanize v1.0.1
=== vet-tags (185 s, from +0 s)
go: downloading github.com/klauspost/compress v1.20.2
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/memory v1.11.0
go: downloading github.com/google/uuid v1.6.0
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading modernc.org/mathutil v1.7.1
=== gofmt (1 s, from +0 s)
gofmt -l .: clean
=== rest (379 s, from +15 s)
ok  	github.com/carlosframework/platform/cmd/carlos-media	126.421s
?   	github.com/carlosframework/platform/cmd/changelog	[no test files]
ok  	github.com/carlosframework/platform/cmd/console	210.502s
ok  	github.com/carlosframework/platform/cmd/mediaimage	42.276s
ok  	github.com/carlosframework/platform/cmd/moveprobe	16.262s
ok  	github.com/carlosframework/platform/cmd/pricebook-export	0.063s
ok  	github.com/carlosframework/platform/cmd/rootfswitness	0.180s
ok  	github.com/carlosframework/platform/cmd/runsc-assets	0.259s
ok  	github.com/carlosframework/platform/cmd/zddprobe	1.090s
ok  	github.com/carlosframework/platform/internal/agentsock	0.083s
ok  	github.com/carlosframework/platform/internal/alerting	0.040s
ok  	github.com/carlosframework/platform/internal/analytics	0.554s
ok  	github.com/carlosframework/platform/internal/appconfig	43.230s
ok  	github.com/carlosframework/platform/internal/apperr	0.429s
ok  	github.com/carlosframework/platform/internal/applog	3.717s
ok  	github.com/carlosframework/platform/internal/apppolicy	3.183s
ok  	github.com/carlosframework/platform/internal/assetcache	0.727s
ok  	github.com/carlosframework/platform/internal/awsinv	0.020s
ok  	github.com/carlosframework/platform/internal/awsmanaged	12.992s
ok  	github.com/carlosframework/platform/internal/awsregiongroup	0.366s
ok  	github.com/carlosframework/platform/internal/awsterminations	0.042s
ok  	github.com/carlosframework/platform/internal/backupswords	0.022s
ok  	github.com/carlosframework/platform/internal/billing	0.084s
ok  	github.com/carlosframework/platform/internal/billing/billingtest	0.066s
ok  	github.com/carlosframework/platform/internal/billingstripe	2.008s
ok  	github.com/carlosframework/platform/internal/boxchoice	0.056s
ok  	github.com/carlosframework/platform/internal/boxid	3.400s
?   	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.020s
ok  	github.com/carlosframework/platform/internal/boxself	0.290s
ok  	github.com/carlosframework/platform/internal/boxvolumes	0.094s
ok  	github.com/carlosframework/platform/internal/caps	4.745s
ok  	github.com/carlosframework/platform/internal/certwarm	0.034s
ok  	github.com/carlosframework/platform/internal/cgroup	1.564s
ok  	github.com/carlosframework/platform/internal/changelog	5.538s
ok  	github.com/carlosframework/platform/internal/clamd	0.083s
?   	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	17.024s
ok  	github.com/carlosframework/platform/internal/compute	0.043s
ok  	github.com/carlosframework/platform/internal/consolefleet	0.019s
?   	github.com/carlosframework/platform/internal/controlname	[no test files]
?   	github.com/carlosframework/platform/internal/controlsock	[no test files]
ok  	github.com/carlosframework/platform/internal/dbdoor	10.414s
ok  	github.com/carlosframework/platform/internal/dbdoor/dbdoortest	0.049s
ok  	github.com/carlosframework/platform/internal/dbquery	0.027s
ok  	github.com/carlosframework/platform/internal/dbreads	3.349s
?   	github.com/carlosframework/platform/internal/dbreads/dbreadstest	[no test files]
ok  	github.com/carlosframework/platform/internal/dbverify	0.015s
ok  	github.com/carlosframework/platform/internal/demo	0.014s
ok  	github.com/carlosframework/platform/internal/demobuild	4.801s
ok  	github.com/carlosframework/platform/internal/democlaim	0.565s
ok  	github.com/carlosframework/platform/internal/devbox	17.218s
ok  	github.com/carlosframework/platform/internal/dnsrec	0.008s
ok  	github.com/carlosframework/platform/internal/docsite	0.181s
ok  	github.com/carlosframework/platform/internal/domainreg	0.040s
ok  	github.com/carlosframework/platform/internal/domains	71.817s
ok  	github.com/carlosframework/platform/internal/doorkey	0.010s
ok  	github.com/carlosframework/platform/internal/economics	0.043s
ok  	github.com/carlosframework/platform/internal/edgefence	0.156s
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.116s
ok  	github.com/carlosframework/platform/internal/egressaddr	0.025s
ok  	github.com/carlosframework/platform/internal/execsandbox	97.033s
ok  	github.com/carlosframework/platform/internal/fileacl	0.041s
ok  	github.com/carlosframework/platform/internal/fleetapi	2.316s
ok  	github.com/carlosframework/platform/internal/fleetstore	0.027s
ok  	github.com/carlosframework/platform/internal/fxrate	0.072s
ok  	github.com/carlosframework/platform/internal/gate	5.351s
ok  	github.com/carlosframework/platform/internal/genselect	0.093s
ok  	github.com/carlosframework/platform/internal/geo	0.054s
ok  	github.com/carlosframework/platform/internal/geoip	0.148s
ok  	github.com/carlosframework/platform/internal/groupadmission	0.016s
ok  	github.com/carlosframework/platform/internal/grouprollaws	17.456s
ok  	github.com/carlosframework/platform/internal/hadeparture	0.036s
ok  	github.com/carlosframework/platform/internal/hafresh	0.024s
ok  	github.com/carlosframework/platform/internal/hairpin	0.226s
ok  	github.com/carlosframework/platform/internal/historyreadback	1.284s
ok  	github.com/carlosframework/platform/internal/hostactors	26.467s
ok  	github.com/carlosframework/platform/internal/hostbox	22.043s
ok  	github.com/carlosframework/platform/internal/hostclaim	2.316s
ok  	github.com/carlosframework/platform/internal/hostenv	0.092s
ok  	github.com/carlosframework/platform/internal/hostevidence	0.044s
ok  	github.com/carlosframework/platform/internal/hostexec	25.682s
ok  	github.com/carlosframework/platform/internal/hostfence	0.255s
ok  	github.com/carlosframework/platform/internal/hostfiles	29.184s
ok  	github.com/carlosframework/platform/internal/hostfloor	0.704s
ok  	github.com/carlosframework/platform/internal/hostguard	1.737s
ok  	github.com/carlosframework/platform/internal/hostops	9.567s
?   	github.com/carlosframework/platform/internal/hostops/fencerelease	[no test files]
ok  	github.com/carlosframework/platform/internal/hostops/internal/fencerelease	0.016s
ok  	github.com/carlosframework/platform/internal/hostquarantine	0.007s
ok  	github.com/carlosframework/platform/internal/hostrelocate	2.495s
ok  	github.com/carlosframework/platform/internal/hostresolve	0.869s
ok  	github.com/carlosframework/platform/internal/hostwrite	0.013s
ok  	github.com/carlosframework/platform/internal/infraview	0.008s
ok  	github.com/carlosframework/platform/internal/ingresshealth	0.021s
ok  	github.com/carlosframework/platform/internal/ingresshealth/awstg	0.017s
ok  	github.com/carlosframework/platform/internal/instancectl	67.178s
ok  	github.com/carlosframework/platform/internal/instanceexec	8.898s
ok  	github.com/carlosframework/platform/internal/instancefs	18.219s
ok  	github.com/carlosframework/platform/internal/instancekey	0.018s
ok  	github.com/carlosframework/platform/internal/instanceupdates	0.019s
ok  	github.com/carlosframework/platform/internal/interactive	0.635s
ok  	github.com/carlosframework/platform/internal/launchd	0.009s
ok  	github.com/carlosframework/platform/internal/layout	22.559s
ok  	github.com/carlosframework/platform/internal/layout/pubclass	98.565s
ok  	github.com/carlosframework/platform/internal/lbhealth	0.008s
ok  	github.com/carlosframework/platform/internal/lease	145.855s
ok  	github.com/carlosframework/platform/internal/lease/leasetest	1.687s
ok  	github.com/carlosframework/platform/internal/lease/locktest	0.025s
ok  	github.com/carlosframework/platform/internal/ledger	0.070s
ok  	github.com/carlosframework/platform/internal/mail	1.271s
ok  	github.com/carlosframework/platform/internal/mailer	0.892s
ok  	github.com/carlosframework/platform/internal/mailsubmit	1.725s
ok  	github.com/carlosframework/platform/internal/mailwire	0.013s
ok  	github.com/carlosframework/platform/internal/maintenance	0.254s
ok  	github.com/carlosframework/platform/internal/maintenanceexec	8.256s
ok  	github.com/carlosframework/platform/internal/maintenanceguard	0.408s
ok  	github.com/carlosframework/platform/internal/managedboot	3.498s
?   	github.com/carlosframework/platform/internal/managedboot/boottest	[no test files]
?   	github.com/carlosframework/platform/internal/managedboot/roottest	[no test files]
ok  	github.com/carlosframework/platform/internal/media	2.118s
ok  	github.com/carlosframework/platform/internal/media/mediatest	0.007s
ok  	github.com/carlosframework/platform/internal/mediaaws	62.744s
ok  	github.com/carlosframework/platform/internal/mediahandler	43.649s
ok  	github.com/carlosframework/platform/internal/mediajobs	0.761s
ok  	github.com/carlosframework/platform/internal/medialocal	10.179s
ok  	github.com/carlosframework/platform/internal/metrics	0.148s
ok  	github.com/carlosframework/platform/internal/minorunits	0.006s
ok  	github.com/carlosframework/platform/internal/moves	56.733s
ok  	github.com/carlosframework/platform/internal/moves/archive	2.600s
ok  	github.com/carlosframework/platform/internal/moves/offlinerun	0.111s
ok  	github.com/carlosframework/platform/internal/namedunits	0.056s
ok  	github.com/carlosframework/platform/internal/objstore	2.376s
ok  	github.com/carlosframework/platform/internal/ops	16.354s
ok  	github.com/carlosframework/platform/internal/pageindex	4.067s
ok  	github.com/carlosframework/platform/internal/parity	0.109s
?   	github.com/carlosframework/platform/internal/parity/cmd/parity-doc	[no test files]
ok  	github.com/carlosframework/platform/internal/park	0.684s
ok  	github.com/carlosframework/platform/internal/perf	0.175s
ok  	github.com/carlosframework/platform/internal/plans	0.132s
ok  	github.com/carlosframework/platform/internal/privatefile	0.018s
ok  	github.com/carlosframework/platform/internal/provision	234.749s
ok  	github.com/carlosframework/platform/internal/proxyproto	0.947s
ok  	github.com/carlosframework/platform/internal/publicrelease	0.045s
ok  	github.com/carlosframework/platform/internal/ratelimit	0.341s
ok  	github.com/carlosframework/platform/internal/regionlabel	0.080s
ok  	github.com/carlosframework/platform/internal/regionname	0.036s
ok  	github.com/carlosframework/platform/internal/registrar	0.008s
ok  	github.com/carlosframework/platform/internal/registrar/openprovider	0.635s
?   	github.com/carlosframework/platform/internal/registrar/registrartest	[no test files]
ok  	github.com/carlosframework/platform/internal/registry	82.517s
ok  	github.com/carlosframework/platform/internal/relay	7.545s
ok  	github.com/carlosframework/platform/internal/release	129.450s
?   	github.com/carlosframework/platform/internal/release/requestwitness	[no test files]
ok  	github.com/carlosframework/platform/internal/replicagen	0.040s
ok  	github.com/carlosframework/platform/internal/replicas	0.093s
ok  	github.com/carlosframework/platform/internal/reqrec	7.018s
ok  	github.com/carlosframework/platform/internal/rollout	11.730s
ok  	github.com/carlosframework/platform/internal/rolloutwords	0.037s
ok  	github.com/carlosframework/platform/internal/rootaws	99.373s
ok  	github.com/carlosframework/platform/internal/rootfsimage	1.089s
ok  	github.com/carlosframework/platform/internal/rootparticipation	0.112s
ok  	github.com/carlosframework/platform/internal/rootstate	0.039s
ok  	github.com/carlosframework/platform/internal/runs	1.064s
ok  	github.com/carlosframework/platform/internal/s3compat	0.019s
ok  	github.com/carlosframework/platform/internal/s3fake	1.534s
ok  	github.com/carlosframework/platform/internal/s3meter	0.740s
ok  	github.com/carlosframework/platform/internal/safefile	0.055s
ok  	github.com/carlosframework/platform/internal/schedule	22.076s
ok  	github.com/carlosframework/platform/internal/seeds	0.129s
ok  	github.com/carlosframework/platform/internal/share	0.025s
ok  	github.com/carlosframework/platform/internal/sim/litestreamfacts	4.654s
ok  	github.com/carlosframework/platform/internal/sim/mediajobs	51.168s
ok  	github.com/carlosframework/platform/internal/sim/regionha	21.388s
ok  	github.com/carlosframework/platform/internal/status	0.273s
ok  	github.com/carlosframework/platform/internal/steering	0.190s
ok  	github.com/carlosframework/platform/internal/stopevidence	0.399s
ok  	github.com/carlosframework/platform/internal/storecfg	0.300s
ok  	github.com/carlosframework/platform/internal/svcrole	0.013s
ok  	github.com/carlosframework/platform/internal/systemd	5.899s
?   	github.com/carlosframework/platform/internal/systemdshow	[no test files]
ok  	github.com/carlosframework/platform/internal/team	4.058s
ok  	github.com/carlosframework/platform/internal/teamcontract	0.152s
ok  	github.com/carlosframework/platform/internal/telemetry	0.026s
ok  	github.com/carlosframework/platform/internal/termfence	2.690s
ok  	github.com/carlosframework/platform/internal/timerspec	0.037s
ok  	github.com/carlosframework/platform/internal/tsidentity	4.206s
ok  	github.com/carlosframework/platform/internal/tunnelclient	0.431s
ok  	github.com/carlosframework/platform/internal/unixdial	0.016s
ok  	github.com/carlosframework/platform/internal/updatewords	0.072s
ok  	github.com/carlosframework/platform/internal/upstreamguard	0.031s
?   	github.com/carlosframework/platform/internal/upstreamguard/guardtest	[no test files]
ok  	github.com/carlosframework/platform/internal/usage	0.052s
ok  	github.com/carlosframework/platform/internal/version	0.009s
ok  	github.com/carlosframework/platform/internal/vet	3.235s
ok  	github.com/carlosframework/platform/internal/zonehost	0.023s
ok  	github.com/carlosframework/platform/internal/zonehost/route53zones	0.090s
?   	github.com/carlosframework/platform/internal/zonehost/zonehosttest	[no test files]
?   	github.com/carlosframework/platform/scripts/gitleaks-gate	[no test files]
ok  	github.com/carlosframework/platform/scripts/govulncheck-gate	0.023s
ok  	github.com/carlosframework/platform/scripts/pathmapcheck	0.156s
ok  	github.com/carlosframework/platform/scripts/region-ha-g2/fixture	5.202s
ok  	github.com/carlosframework/platform/scripts/stateless-replicas-drill	1.187s
ok  	github.com/carlosframework/platform/scripts/witness-pointer	0.022s
=== cutover-witness (161 s, from +15 s)
ok  	github.com/carlosframework/platform	2.642s
=== internal_grouproll@0 (271 s, from +74 s)
ok  	github.com/carlosframework/platform/internal/grouproll	269.847s
=== internal_grouproll@1 (276 s, from +74 s)
ok  	github.com/carlosframework/platform/internal/grouproll	274.632s
=== internal_activator@0 (146 s, from +141 s)
ok  	github.com/carlosframework/platform/internal/activator	142.121s
=== internal_activator@1 (130 s, from +141 s)
ok  	github.com/carlosframework/platform/internal/activator	125.529s
=== internal_activator@2 (138 s, from +141 s)
ok  	github.com/carlosframework/platform/internal/activator	133.873s
=== internal_activator@3 (168 s, from +141 s)
ok  	github.com/carlosframework/platform/internal/activator	163.536s
=== root@0 (120 s, from +170 s)
ok  	github.com/carlosframework/platform	111.324s
=== root@1 (115 s, from +170 s)
ok  	github.com/carlosframework/platform	106.856s
=== root@2 (123 s, from +170 s)
ok  	github.com/carlosframework/platform	114.073s
=== root@3 (111 s, from +170 s)
ok  	github.com/carlosframework/platform	102.480s
=== root@4 (105 s, from +170 s)
ok  	github.com/carlosframework/platform	95.430s
=== internal_edge@0 (199 s, from +174 s)
ok  	github.com/carlosframework/platform/internal/edge	190.179s
=== internal_edge@1 (184 s, from +174 s)
ok  	github.com/carlosframework/platform/internal/edge	174.861s
=== internal_edge@2 (170 s, from +174 s)
ok  	github.com/carlosframework/platform/internal/edge	160.983s
=== internal_edge@3 (158 s, from +174 s)
ok  	github.com/carlosframework/platform/internal/edge	149.340s
=== internal_host@0 (153 s, from +218 s)
ok  	github.com/carlosframework/platform/internal/host	148.327s
=== internal_host@1 (285 s, from +218 s)
ok  	github.com/carlosframework/platform/internal/host	280.134s
=== internal_host@2 (199 s, from +218 s)
ok  	github.com/carlosframework/platform/internal/host	194.206s
=== internal_host@3 (168 s, from +218 s)
ok  	github.com/carlosframework/platform/internal/host	163.396s
=== internal_host@4 (214 s, from +218 s)
ok  	github.com/carlosframework/platform/internal/host	209.261s
=== internal_host@5 (151 s, from +218 s)
ok  	github.com/carlosframework/platform/internal/host	146.594s
=== internal_console@0 (173 s, from +224 s)
ok  	github.com/carlosframework/platform/internal/console	166.348s
=== internal_console@1 (173 s, from +224 s)
ok  	github.com/carlosframework/platform/internal/console	166.441s
=== internal_console@2 (235 s, from +224 s)
ok  	github.com/carlosframework/platform/internal/console	228.372s
=== internal_console@3 (253 s, from +224 s)
ok  	github.com/carlosframework/platform/internal/console	245.843s
=== internal_console@4 (224 s, from +224 s)
ok  	github.com/carlosframework/platform/internal/console	217.343s
=== internal_console@5 (240 s, from +224 s)
ok  	github.com/carlosframework/platform/internal/console	233.416s
=== internal_console@6 (217 s, from +224 s)
ok  	github.com/carlosframework/platform/internal/console	209.823s
=== internal_console@7 (233 s, from +224 s)
ok  	github.com/carlosframework/platform/internal/console	225.489s
=== internal_console@8 (240 s, from +224 s)
ok  	github.com/carlosframework/platform/internal/console	232.482s
=== internal_console@9 (235 s, from +224 s)
ok  	github.com/carlosframework/platform/internal/console	227.224s
=== internal_console@10 (237 s, from +224 s)
ok  	github.com/carlosframework/platform/internal/console	230.233s
=== internal_console@11 (244 s, from +224 s)
ok  	github.com/carlosframework/platform/internal/console	237.046s
=== internal_console@12 (361 s, from +224 s)
ok  	github.com/carlosframework/platform/internal/console	353.132s
=== internal_console@13 (212 s, from +224 s)
ok  	github.com/carlosframework/platform/internal/console	205.145s
=== internal_console@14 (204 s, from +224 s)
ok  	github.com/carlosframework/platform/internal/console	196.499s
=== internal_console@15 (224 s, from +224 s)
ok  	github.com/carlosframework/platform/internal/console	217.114s
=== internal_console@16 (226 s, from +224 s)
ok  	github.com/carlosframework/platform/internal/console	219.006s
=== internal_console@17 (249 s, from +224 s)
ok  	github.com/carlosframework/platform/internal/console	242.313s
=== internal_console@18 (276 s, from +224 s)
ok  	github.com/carlosframework/platform/internal/console	269.757s
=== internal_console@19 (238 s, from +224 s)
ok  	github.com/carlosframework/platform/internal/console	230.899s
=== internal_console@20 (204 s, from +224 s)
ok  	github.com/carlosframework/platform/internal/console	196.741s
=== internal_console@21 (232 s, from +224 s)
ok  	github.com/carlosframework/platform/internal/console	225.823s
=== internal_console@22 (236 s, from +224 s)
ok  	github.com/carlosframework/platform/internal/console	229.237s
=== internal_console@23 (232 s, from +224 s)
ok  	github.com/carlosframework/platform/internal/console	224.394s
=== lists: internal_console 222 s, internal_edge 172 s, internal_activator 140 s, internal_host 217 s, root 168 s, internal_grouproll 73 s
=== cpu: the gate used 12863 cpu-seconds in 585 s, about 22.0 of 32 cores; the machine as a whole was 73% busy
=== opentofu ===
opentofu: 39 test files in 11 suites, OpenTofu v1.13.9
  initialised in 13 s
  ok      20 s  infra/modules/box-fence-writer/tests/writer.tftest.hcl  Success! 1 passed, 0 failed.
  ok      20 s  infra/modules/deployment-buckets/tests/console_floors.tftest.hcl  Success! 1 passed, 0 failed.
  ok      27 s  infra/modules/deployment-buckets/tests/data_lifecycle.tftest.hcl  Success! 3 passed, 0 failed.
  ok      16 s  infra/modules/deployment-buckets/tests/db_reads.tftest.hcl  Success! 1 passed, 0 failed.
  ok      18 s  infra/modules/deployment-buckets/tests/evidence.tftest.hcl  Success! 1 passed, 0 failed.
  ok      29 s  infra/modules/deployment-buckets/tests/fence_writers.tftest.hcl  Success! 3 passed, 0 failed.
  ok      26 s  infra/modules/deployment-buckets/tests/media_results.tftest.hcl  Success! 2 passed, 0 failed.
  ok      92 s  infra/modules/media-engine/tests/media_engine.tftest.hcl  Success! 24 passed, 0 failed.
  ok      27 s  infra/modules/pdf-host/tests/computed.tftest.hcl  Success! 2 passed, 0 failed.
  ok      58 s  infra/modules/pdf-host/tests/pdf_host.tftest.hcl  Success! 24 passed, 0 failed.
  ok      41 s  infra/modules/region-group-operator-document/tests/document.tftest.hcl  Success! 12 passed, 0 failed.
  ok      17 s  infra/modules/region-host/ingress/tests/fixed-targets/tests/targets.tftest.hcl  Success! 2 passed, 0 failed.
  ok      68 s  infra/modules/region-host/ingress/tests/group_ingress.tftest.hcl  Success! 30 passed, 0 failed.
  ok      47 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      12 s  infra/modules/region-host/tests/analytics_prune.tftest.hcl  Success! 2 passed, 0 failed.
  ok      16 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      73 s  infra/modules/region-host/tests/group.tftest.hcl  Success! 32 passed, 0 failed.
  ok      11 s  infra/modules/region-host/tests/group_alarms.tftest.hcl  Success! 4 passed, 0 failed.
  ok      10 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      36 s  infra/modules/region-host/tests/group_operator.tftest.hcl  Success! 13 passed, 0 failed.
  ok      10 s  infra/modules/region-host/tests/group_user_data.tftest.hcl  Success! 3 passed, 0 failed.
  ok      29 s  infra/modules/region-host/tests/health_alarms.tftest.hcl  Success! 10 passed, 0 failed.
  ok      15 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      22 s  infra/modules/region-host/tests/mailer.tftest.hcl  Success! 6 passed, 0 failed.
  ok      14 s  infra/modules/region-host/tests/mailer_group.tftest.hcl  Success! 2 passed, 0 failed.
  ok      11 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      69 s  infra/modules/region-host/tests/store_conversion.tftest.hcl  Success! 27 passed, 0 failed.
  ok      14 s  infra/modules/region-host/tests/store_scanning.tftest.hcl  Success! 4 passed, 0 failed.
  ok      29 s  infra/modules/region-host/tests/store_versioning.tftest.hcl  Success! 11 passed, 0 failed.
  ok      15 s  infra/modules/region-host/tests/store_write_credentials.tftest.hcl  Success! 4 passed, 0 failed.
  ok      16 s  infra/modules/region-host/tests/user_data_ignored.tftest.hcl  Success! 3 passed, 0 failed.
  ok      12 s  infra/modules/region-remote-host/tests/data_lifecycle.tftest.hcl  Success! 3 passed, 0 failed.
  ok      14 s  infra/modules/region-remote-host/tests/no_deployment_bucket.tftest.hcl  Success! 5 passed, 0 failed.
  ok      29 s  infra/modules/scanner-host/tests/scanner_host.tftest.hcl  Success! 14 passed, 0 failed.
opentofu: 39 files in 211 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: 66715810 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:35882
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.037s
=== RUN   TestT4StorageProbeMinio
2026/11/30 13:03:02 moves: T4: STORE: list: operation error S3: ListObjectsV2, https response error StatusCode: 403, RequestID: 18ECD44DF9299CED, HostID: 66ad104e9f405d71c8996ea802262b9c87de4fa7ab5055a6984a94ce8fbc0675, 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.046s
=== RUN   TestS3StoreMinioContract
=== RUN   TestS3StoreMinioContract/conditional_get_and_etag_listing
=== RUN   TestS3StoreMinioContract/bump_through_every_mutation_path
--- PASS: TestS3StoreMinioContract (0.03s)
    --- PASS: TestS3StoreMinioContract/conditional_get_and_etag_listing (0.01s)
    --- PASS: TestS3StoreMinioContract/bump_through_every_mutation_path (0.02s)
PASS
ok  	github.com/carlosframework/platform/internal/release	0.041s
Bucket created successfully `local/analytics-versions`.
local/analytics-versions versioning is enabled
Created policy `analytics-versions` successfully.
Added user `analyticsversions` successfully.
Attached Policies: [analytics-versions]
To User: analyticsversions
=== RUN   TestS3StoreMinioVersions
--- PASS: TestS3StoreMinioVersions (0.03s)
PASS
ok  	github.com/carlosframework/platform/internal/release	0.040s
Bucket created successfully `local/store-versioned`.
local/store-versioned versioning is enabled
Created policy `store-versioned` successfully.
Added user `storeversioned` successfully.
Attached Policies: [store-versioned]
To User: storeversioned
=== RUN   TestVersionedContractMinio
--- PASS: TestVersionedContractMinio (0.01s)
PASS
ok  	github.com/carlosframework/platform/internal/objstore	0.020s
Bucket created successfully `local/wc-bucket`.
Created policy `writer` successfully.
Added user `wcwriter` successfully.
Attached Policies: [writer]
To User: wcwriter
=== RUN   TestWriteCredentialContractMinio
=== RUN   TestWriteCredentialContractMinio/put_under_the_prefix
=== RUN   TestWriteCredentialContractMinio/multipart_under_the_prefix
=== RUN   TestWriteCredentialContractMinio/refused:_list
=== RUN   TestWriteCredentialContractMinio/refused:_list_uploads
=== RUN   TestWriteCredentialContractMinio/refused:_delete
=== RUN   TestWriteCredentialContractMinio/refused:_tag
=== RUN   TestWriteCredentialContractMinio/refused:_put_with_a_platform_tag
=== RUN   TestWriteCredentialContractMinio/refused:_put_outside_the_prefix
=== RUN   TestWriteCredentialContractMinio/refused:_put_to_another_bucket
=== RUN   TestWriteCredentialContractMinio/refused:_read_under_the_prefix
=== RUN   TestWriteCredentialContractMinio/refused:_read_elsewhere
=== RUN   TestWriteCredentialContractMinio/refused:_head
=== RUN   TestWriteCredentialContractMinio/refused:_put_tagged
=== RUN   TestWriteCredentialContractMinio/refused:_put_beside_the_prefix
=== RUN   TestWriteCredentialContractMinio/refused:_copy_from_the_store
=== RUN   TestWriteCredentialContractMinio/refused:_bucket_settings
--- PASS: TestWriteCredentialContractMinio (0.04s)
    --- PASS: TestWriteCredentialContractMinio/put_under_the_prefix (0.00s)
    --- PASS: TestWriteCredentialContractMinio/multipart_under_the_prefix (0.01s)
    --- PASS: TestWriteCredentialContractMinio/refused:_list (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_list_uploads (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_delete (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_tag (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_put_with_a_platform_tag (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_put_outside_the_prefix (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_put_to_another_bucket (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_read_under_the_prefix (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_read_elsewhere (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_head (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_put_tagged (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_put_beside_the_prefix (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_copy_from_the_store (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_bucket_settings (0.00s)
PASS
ok  	github.com/carlosframework/platform/internal/objstore	0.048s
=== 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.13s)
    --- PASS: TestEndToEndMinio/replace (0.15s)
    --- PASS: TestEndToEndMinio/remove (0.15s)
PASS
ok  	github.com/carlosframework/platform/internal/grouproll	0.477s
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/30 13:03:11 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/30 13:03:11 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/30 13:03:11 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/30 13:03:11 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/30 13:03:11 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/30 13:03:11 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/30 13:03:11 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000003
2026/11/30 13:03:11 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000003 maxTXID=0000000000000003 size=454
2026/11/30 13:03:11 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000003
2026/11/30 13:03:11 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/30 13:03:11 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/30 13:03:11 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/30 13:03:11 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/30 13:03:11 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%3A39803: could not determine target mailbox
    agent.go:136: dbreads: dbr_hlsl4i3buioxemztzew3cydevy: planned 1 files (720 bytes) and restored to 1 in 11ms
    agent.go:136: dbreads: dbr_hlsl4i3buioxemztzew3cydevy: output 5 bytes in 1 confirmed chunks in 1ms
2026/11/30 13:03:12 console: db read dbr_hlsl4i3buioxemztzew3cydevy: relayed 1 chunks (102 bytes) in 1.004s, ended done
    agent.go:136: dbreads: dbr_wgigq2axh6ux5dzvb4wlyjkagy: planned 3 files (1544 bytes) and restored to 3 in 13ms
    agent.go:136: dbreads: dbr_wgigq2axh6ux5dzvb4wlyjkagy: output 5 bytes in 1 confirmed chunks in 2ms
2026/11/30 13:03:13 console: db read dbr_wgigq2axh6ux5dzvb4wlyjkagy: relayed 1 chunks (102 bytes) in 1.005s, ended done
    agent.go:136: dbreads: dbr_l6ci4civzpgk6hxavedcxlzc5u: planned 3 files (1544 bytes) and held through 3 in 12ms
    agent.go:136: dbreads: dbr_l6ci4civzpgk6hxavedcxlzc5u: output 1544 bytes in 1 confirmed chunks in 1ms
2026/11/30 13:03:14 console: db read dbr_l6ci4civzpgk6hxavedcxlzc5u: relayed 1 chunks (1641 bytes) in 1.005s, ended done
=== RUN   TestDBForwardMinio/by_disconnect
=== NAME  TestDBForwardMinio
    agent.go:136: dbreads: dbr_rsce6nw7gp4oxtusceoymm7zzi: planned 3 files (1544 bytes) and restored to 3 in 17ms
2026/11/30 13:03:14 console: db read dbr_rsce6nw7gp4oxtusceoymm7zzi: relayed 0 chunks (0 bytes) in 42ms, ended client gone
    agent.go:136: dbreads: dbr_rsce6nw7gp4oxtusceoymm7zzi: output 5 bytes in 1 confirmed chunks in 104ms
=== RUN   TestDBForwardMinio/by_timeout
=== NAME  TestDBForwardMinio
    agent.go:136: dbreads: dbr_b753ncmfunlmbdqtl33zy75heu: planned 3 files (1544 bytes) and restored to 3 in 13ms
2026/11/30 13:03:34 console: db read dbr_b753ncmfunlmbdqtl33zy75heu: relayed 0 chunks (0 bytes) in 19.182s, ended no-result
    agent.go:136: dbreads: dbr_b753ncmfunlmbdqtl33zy75heu: output 5 bytes in 1 confirmed chunks in 19.161s
--- PASS: TestDBForwardMinio (22.89s)
    --- PASS: TestDBForwardMinio/by_disconnect (0.25s)
    --- PASS: TestDBForwardMinio/by_timeout (19.29s)
PASS
ok  	github.com/carlosframework/platform/internal/console	22.936s
Bucket created successfully `local/media-transfers`.
Bucket created successfully `local/media-transfer-results`.
local/media-transfer-results versioning is enabled
Created policy `media-transfers` successfully.
Added user `mediatransfers` successfully.
Attached Policies: [media-transfers]
To User: mediatransfers
=== RUN   TestMediaTransfersMinio
    upload.go:117: codec: the store already holds video.mp4
    upload.go:117: codec: the store already holds video.m3u8
    upload.go:117: codec: the store already holds poster.jpg
--- PASS: TestMediaTransfersMinio (0.07s)
PASS
ok  	github.com/carlosframework/platform/internal/mediaaws	0.074s
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.55s)
PASS
ok  	github.com/carlosframework/platform/internal/medialocal	0.551s
=== RUN   TestHeldHandoverTwoBoxMinio
2026/11/30 13:03:39 edge: mesh key: minted
2026/11/30 13:03:39 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/30 13:03:39 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/30 13:03:39 tenant admission is open. accepting tenant work
2026/11/30 13:03:39 activator: HA placement host=shop-1c36ed15.example.test kind=Place ref=annie reason=roomiest generation=2026-11-30T13:03:39Z lock_generation=0
2026/11/30 13:03:39 lease: t8-1c36ed15/shop-1c36ed15.example.test: HA lease acquired in 4ms (first wake)
2026/11/30 13:03:39 activator: shop-1c36ed15.example.test: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/11/30 13:03:39 activator: shop-1c36ed15.example.test: started carlos-instance@shop\x2d1c36ed15.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/30 13:03:39 activator: shop-1c36ed15.example.test: carlos-instance@shop\x2d1c36ed15.example.test.service launched in 7ms, healthy 0s later
2026/11/30 13:03:39 activator: shop-1c36ed15.example.test: woke in 20ms: checks 0s, lease 5ms, restore 0s, identity 0s, protect 0s, spawn 7ms, replicate 8ms
2026/11/30 13:03:39 lease: t8-1c36ed15/plain-1c36ed15.example.test: acquired in 2ms (client 0s, lock read and write 1ms)
2026/11/30 13:03:39 activator: no replica for plain-1c36ed15.example.test in s3://contract-bucket/t8-1c36ed15/plain-1c36ed15.example.test — booting fresh
2026/11/30 13:03:39 activator: plain-1c36ed15.example.test: started carlos-instance@plain\x2d1c36ed15.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 1ms, instance key 0s, env 4ms, control socket 0s, key gate 0s, logs 0s) 5ms, launch file 0s, gate 0s, root start 1ms)
2026/11/30 13:03:39 activator: plain-1c36ed15.example.test: carlos-instance@plain\x2d1c36ed15.example.test.service launched in 6ms, healthy 0s later
2026/11/30 13:03:39 activator: plain-1c36ed15.example.test: woke in 97ms: checks 0s, lease 2ms, restore 22ms, identity 0s, protect 0s, spawn 7ms, replicate 67ms
2026/11/30 13:03:39 lease: t8-1c36ed15/bot0.shop.bac.sidecar.internal: HA lease acquired in 4ms (first wake)
2026/11/30 13:03:39 activator: bot0.shop.bac.sidecar.internal: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/11/30 13:03:39 activator: bot0.shop.bac.sidecar.internal: woke in 65ms: checks 0s, lease 4ms, restore 0s, identity 0s, protect 0s, spawn 7ms, settle 0s, replicate 53ms
2026/11/30 13:03:39 activator: next-due probe plain-1c36ed15.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/30 13:03:39 activator: plain-1c36ed15.example.test hibernated
2026/11/30 13:03:39 activator: next-due probe shop-1c36ed15.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/30 13:03:39 activator: bot0.shop.bac.sidecar.internal: released with a marker (clean true, txid 1, files 3:464460d3219909a12043dafb5e17c58f59057f7112f41972bb3cb74230673bf1) in 7ms: files 1ms, sync 4ms, record 1ms, marker 2ms
2026/11/30 13:03:39 activator: bot0.shop.bac.sidecar.internal hibernated
2026/11/30 13:03:39 activator: shop-1c36ed15.example.test: released with a marker (clean true, txid 1, files 3:43c333e111116916797bd5575a18efb2f0faadba8d884ed12c33f4ed77801576) in 5ms: files 1ms, sync 2ms, record 1ms, marker 2ms
2026/11/30 13:03:39 activator: shop-1c36ed15.example.test hibernated
2026/11/30 13:03:39 lease: t8-1c36ed15/shop-1c36ed15.example.test: HA lease acquired in 3ms (clean marker)
2026/11/30 13:03:39 activator: shop-1c36ed15.example.test: restored (other-box)
2026/11/30 13:03:39 activator: shop-1c36ed15.example.test: started carlos-instance@shop\x2d1c36ed15.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/30 13:03:39 activator: shop-1c36ed15.example.test: carlos-instance@shop\x2d1c36ed15.example.test.service launched in 2ms, healthy 0s later
2026/11/30 13:03:39 activator: shop-1c36ed15.example.test: woke in 86ms: checks 0s, lease 4ms, restore 23ms, identity 0s, protect 0s, spawn 2ms, replicate 56ms
2026/11/30 13:03:39 edge: ha-take shop-1c36ed15.example.test from annie (txn t8-witness, marker generation 1): holder betty, generation 2
2026/11/30 13:03:39 edge: forward shop-1c36ed15.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:0fbda62cfbc6660974675d90e34716da Step:move Result:ok Reasons:[] Fence:t8-witness StartedAt:2026-11-30 13:03:39.485342279 +0000 UTC FinishedAt:2026-11-30 13:03:39.633419022 +0000 UTC Acked:[betty carol] Departed:[] Moved:[{Host:shop-1c36ed15.example.test Holder:betty Gen:2 Confirmed:take}] Released:[{Host:plain-1c36ed15.example.test Kind:other Marker:true Clean:true Reason:} {Host:bot0.shop.bac.sidecar.internal Kind:worker Marker:true Clean:true Reason:}] Unclean:[] Left:[] Holds:{LongestMS:127 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-1c36ed15.example.test <nil> stop plain-1c36ed15.example.test marker=true clean=true <nil> releasing shop-1c36ed15.example.test <nil> stop bot0.shop.bac.sidecar.internal marker=true clean=true <nil> stop shop-1c36ed15.example.test marker=true clean=true <nil> taken shop-1c36ed15.example.test betty <nil> end-moves]
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-1c36ed15/shop-1c36ed15.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: DELETE /contract-bucket/t8-1c36ed15/plain-1c36ed15.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-1c36ed15/bot0.shop.bac.sidecar.internal/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-1c36ed15/bot0.shop.bac.sidecar.internal/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-1c36ed15/shop-1c36ed15.example.test/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-1c36ed15/shop-1c36ed15.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-1c36ed15/shop-1c36ed15.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-1c36ed15/shop-1c36ed15.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-1c36ed15/shop-1c36ed15.example.test/head.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/generations/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0008/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0007/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0006/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0005/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0004/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0008/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0007/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0006/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0005/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0004/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-1c36ed15/shop-1c36ed15.example.test/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-1c36ed15/shop-1c36ed15.example.test/files/0/manifest.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-1c36ed15/shop-1c36ed15.example.test/files/0/objects/0000000000000001-bcafc7ab6264c1187f1f9f717f9e3e9386db6ca5023559abe9f645f1210d5aef
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-1c36ed15/shop-1c36ed15.example.test/files/0/objects/0000000000000003-b66a7bd02866ebbb50e1f556bddbb666ad42c8cb09c97b2957b7d9fe0e976043
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-1c36ed15/shop-1c36ed15.example.test/0000/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-1c36ed15/shop-1c36ed15.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-1c36ed15/shop-1c36ed15.example.test/0000/0000000000000002-0000000000000002.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-1c36ed15/shop-1c36ed15.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1243: drain took 197ms; 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/30 13:03:39 lease: t8-1c36ed15/plain-1c36ed15.example.test: acquired in 1ms (client 0s, lock read and write 1ms)
2026/11/30 13:03:39 activator: plain-1c36ed15.example.test: started carlos-instance@plain\x2d1c36ed15.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/30 13:03:39 activator: plain-1c36ed15.example.test: carlos-instance@plain\x2d1c36ed15.example.test.service launched in 1ms, healthy 0s later
2026/11/30 13:03:39 lease: /tmp/carlos-minio-contract-r4NmCn/g/dw3466141427/data/instances/plain-1c36ed15.example.test/plain-1c36ed15.example.test.db: continuity with the last clean close not proven; snapshot 1-0000000000000001 written before serving
2026/11/30 13:03:39 activator: plain-1c36ed15.example.test: woke in 7ms: checks 0s, lease 1ms, restore 0s, identity 0s, protect 0s, spawn 1ms, replicate 4ms
2026/11/30 13:03:39 activator: next-due probe shop-1c36ed15.example.test: decode /api/next-due: invalid character 'b' looking for beginning of value — recording none (it sleeps until a request)
2026/11/30 13:03:39 activator: shop-1c36ed15.example.test: released with a marker (clean true, txid 2, files 3:43c333e111116916797bd5575a18efb2f0faadba8d884ed12c33f4ed77801576) in 4ms: files 1ms, sync 0s, record 1ms, marker 2ms
2026/11/30 13:03:39 activator: shop-1c36ed15.example.test hibernated
2026/11/30 13:03:39 tenant admission is closed for shutdown
2026/11/30 13:03:39 activator: next-due probe plain-1c36ed15.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/30 13:03:39 activator: plain-1c36ed15.example.test hibernated
--- PASS: TestHeldHandoverTwoBoxMinio (0.62s)
=== RUN   TestHeldHandoverLostLeaseMinio
2026/11/30 13:03:39 edge: mesh key: minted
2026/11/30 13:03:39 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/30 13:03:39 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/30 13:03:39 tenant admission is open. accepting tenant work
2026/11/30 13:03:39 activator: HA placement host=shop-53d61abf.example.test kind=Place ref=annie reason=roomiest generation=2026-11-30T13:03:39Z lock_generation=0
2026/11/30 13:03:39 lease: t8-53d61abf/shop-53d61abf.example.test: HA lease acquired in 3ms (first wake)
2026/11/30 13:03:39 activator: shop-53d61abf.example.test: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/11/30 13:03:39 activator: shop-53d61abf.example.test: started carlos-instance@shop\x2d53d61abf.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 5ms, control socket 0s, key gate 0s, logs 0s) 5ms, launch file 0s, gate 0s, root start 1ms)
2026/11/30 13:03:39 activator: shop-53d61abf.example.test: carlos-instance@shop\x2d53d61abf.example.test.service launched in 6ms, healthy 0s later
2026/11/30 13:03:39 activator: shop-53d61abf.example.test: woke in 66ms: checks 0s, lease 4ms, restore 0s, identity 0s, protect 0s, spawn 7ms, replicate 55ms
2026/11/30 13:03:39 activator: next-due probe shop-53d61abf.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/30 13:03:39 activator: final checkpoint shop-53d61abf.example.test: lease: release marker owed for s3://contract-bucket/t8-53d61abf/shop-53d61abf.example.test/lock.json (If-Match "4e14d53d5bc60fb926e7382cb6af2662"): lease: write release marker: operation error S3: PutObject, https response error StatusCode: 503, RequestID: , HostID: , api error ServiceUnavailable: witness: refused
2026/11/30 13:03:39 activator: shop-53d61abf.example.test hibernated
2026/11/30 13:03:39 activator: handover of shop-53d61abf.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-53d61abf.example.test client 4 "
    hadrain_twobox_minio_linux_test.go:1486: driver calls: [begin shop-53d61abf.example.test <nil> releasing shop-53d61abf.example.test <nil> stop shop-53d61abf.example.test marker=false clean=false <nil> left shop-53d61abf.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/30 13:03:40 tenant admission is closed for shutdown
2026/11/30 13:03:40 http: proxy error: context canceled
--- PASS: TestHeldHandoverLostLeaseMinio (0.32s)
PASS
ok  	github.com/carlosframework/platform/internal/host	0.980s
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/30 13:03:41 lease: instances/gen-1796043821191334930.shop.example.com: HA lease acquired in 5ms (first wake)
2026/11/30 13:03:41 lease: instances/gen-1796043821191334930.shop.example.com: HA lease acquired in 3ms (holder terminated)
    gentake_minio_test.go:308: a second create-only copy onto instances/gen-1796043821191334930.shop.example.com/g-00000000000000000002/0000/0000000000000001-0000000000000001.ltx: <nil> (destination condition honoured: false)
2026/11/30 13:03:41 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/30 13:03:41 http: proxy error: context canceled
2026/11/30 13:03:41 ERROR retention enforcement failed system=store db=w.example.com.db error="enforce snapshot retention: remove ltx files: lease: a write has waited too long to reach storage (write fence)"
=== RUN   TestGenerationTakeMinio/switch-412
2026/11/30 13:03:41 lease: instances/gen-1796043821360882577.shop.example.com: HA lease acquired in 3ms (first wake)
2026/11/30 13:03:41 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/30 13:03:41 lease: instances/gen-1796043821360882577.shop.example.com: HA lease acquired in 2ms (clean marker)
=== RUN   TestGenerationTakeMinio/copy-version
=== RUN   TestGenerationTakeMinio/store-time
2026/11/30 13:03:41 lease: instances/gen-1796043821410394750.shop.example.com: HA lease acquired in 3ms (first wake)
2026/11/30 13:03:41 http: proxy error: context canceled
2026/11/30 13:03:41 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/30 13:03:41 lease: instances/gen-1796043821410394750.shop.example.com: HA lease acquired in 2ms (clean marker)
2026/11/30 13:03:41 lease: instances/gen-1796043821410394750.shop.example.com: HA lease acquired in 2ms (unclean marker)
2026/11/30 13:03:41 lease: instances/gen-1796043821410394750.shop.example.com: HA lease acquired in 2ms (unclean marker)
2026/11/30 13:03:41 lease: instances/gen-1796043821410394750.shop.example.com: HA lease acquired in 2ms (unclean marker)
2026/11/30 13:03:41 lease: instances/gen-1796043821410394750.shop.example.com: HA lease acquired in 2ms (unclean marker)
=== RUN   TestGenerationTakeMinio/skew
--- PASS: TestGenerationTakeMinio (0.34s)
    --- PASS: TestGenerationTakeMinio/take (0.17s)
    --- 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.350s
minio contract: PASS
=== staticcheck ===
go version go1.26.10 linux/arm64
go: downloading honnef.co/go/tools v0.8.2
go: downloading golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678
go: downloading github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c
go: downloading golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa
go: downloading golang.org/x/sync v0.23.0
staticcheck: clean
=== govulncheck ===
go version go1.26.10 linux/arm64
go: downloading golang.org/x/vuln v1.8.0
go: downloading golang.org/x/telemetry v0.0.0-20260908163034-4bcc4b2ee518
go: downloading golang.org/x/tools v0.50.0
govulncheck: scanned github.com/carlosframework/platform, amadan.net/carlos/platform.git/launchctx, carlos-vulnscan
GO-2026-6859  called  stdlib@v1.26.10, fixed in v1.26.11
    HTTP/1 server crash due to MaxBytesReader header race in net/http
    excepted until 2027-01-31 (.amadan/govulncheck-exceptions.tsv:9): net/http MaxBytesReader header race, fixed in go1.26.11. CI and releases stay on go1.26.10 because 1.26.11 deadlocks the edge's Expect: 100-continue path (#897, .amadan/go-toolchain.sh); #904 checked every production MaxBytesReader site and found it unreachable.
GO-2026-5932  required  golang.org/x/crypto@v0.58.0, fixed in v0.58.1-0.20261009181718-2f1f834330b2
    The golang.org/x/crypto/openpgp package is unmaintained, unsafe by design, and has known security issues
    not fatal: no call path to the vulnerable code
govulncheck: clean (2 finding(s), none called outside .amadan/govulncheck-exceptions.tsv)
=== code-health ===
go version go1.26.10 linux/arm64
    codehealth_test.go:42: scanned in 1m51.394s
    codehealth_test.go:107: line metrics (code lines, then physical):
          file-lines  5471  7324  internal/activator activator_test.go
          file-lines  4191  7043  internal/console server.go
          file-lines  4147  6311  . apimode.go
          file-lines  3785  7224  internal/activator activator.go
          file-lines  3530  4459  . apimode_test.go
          file-lines  3261  3864  internal/registry registry_test.go
          file-lines  3204  6398  internal/host agent.go
          file-lines  3094  3992  internal/provision reconcile_test.go
          func-lines   870   891  internal/host plan14InstalledClaimLaunch
          func-lines   810  1277  internal/provision Reconcile
          func-lines   769  1242  internal/console (*Server).handleAPIInstanceCreate
          func-lines   683  1238  internal/host runAgent
          func-lines   571   908  internal/activator (*Service).doWakeOnce
          func-lines   538   546  internal/host runServingParkPeerNamespace
          func-lines   519   712  . runRoute
          func-lines   509   569  internal/host TestPagingIsRateLimited
          func-lines   494   817  internal/release adoptHost
          func-lines   441   500  internal/host TestRootInstanceStopExecStop
          func-lines   421   436  internal/host (*ClaimWakeAssembly).Build
          func-lines   421   437  internal/team TestFixture
          func-lines   412   414  internal/console TestDemoProtectionsSourceToLimitAndTakedown
          func-lines   408   485  . TestFleetAppServesThroughTheHub
          func-lines   402   406  internal/registry (*Registry).haJournal
          func-lines   400   868  internal/provision rootReadArchivedChain
          func-lines   399   733  internal/release PassFilter
          func-lines   390   398  internal/host runFilesSeedPreparationWithLive
          func-lines   383   406  internal/console TestDemoSourceToLiveAndUpdate
          func-lines   374   377  internal/host plan14RequiredArtifactsRootRunner
          func-lines   371   417  internal/host TestRootEgressKernelProof
          func-lines   369   883  internal/edge (*Edge).ServeHTTP
          func-lines   367   584  internal/console (*Server).handleAPIShip
          func-lines   364   371  internal/host testRootMigrationBootstrap
          func-lines   362   631  cmd/console serve
          func-lines   360   362  internal/edge TestDemoAPIAliasBoundary
          func-lines   357   358  internal/registry (*Registry).dispatchRemote
          func-lines   355   372  internal/host TestRootSandboxUpdateFromOldBox
          func-lines   343   354  internal/analytics Prune
          func-lines   340   353  internal/host newColdRootHarness
          func-lines   335   557  internal/console (*Store).migrate
          func-lines   334   334  internal/host TestPlan12RecoveryRestoreSourceDatabase
          func-lines   330   371  internal/edge TestRegionalNameNeverLeavesItsRegion
          func-lines   329   471  . runDeploy
          func-lines   329   329  internal/host TestPlan12RecoveryRestoreSourceDatabase.func1
          func-lines   327   369  internal/edge TestTunnelWebSocketEndToEnd
          func-lines   325   455  internal/objstore TestDeliveredContractMinio
          func-lines   320   654  internal/appconfig SyncExecWithCallbacks
          func-lines   315   318  internal/host plan14TimerIntention
          func-lines   311   314  internal/host plan14TimerIntention.func1
          func-lines   310   315  internal/hostbox ColdHandover.Run
          func-lines   308   309  internal/host rootFilesSeedIsolatedWitness
          func-lines   305   323  internal/host hairpinKernelWitness
          func-lines   304   308  internal/console TestHAP2ProductionDoors
          func-lines   302   329  internal/host TestRootG2PoolIngress
        release-importers: . cmd/console internal/activator internal/analytics internal/appconfig internal/apperr internal/applog internal/apppolicy internal/boxid internal/boxvolumes internal/console internal/dbreads internal/dbreads/dbreadstest internal/dbverify internal/demobuild internal/domains internal/doorkey internal/edge internal/edgeproof internal/edgesfile internal/fleetapi internal/grouproll internal/grouprollaws internal/historyreadback internal/host internal/hostactors internal/hostbox internal/hostclaim internal/hostevidence internal/hostexec internal/hostfence internal/hostfiles internal/hostfloor internal/hostguard internal/hostops internal/hostrelocate internal/hostresolve internal/instancectl internal/instanceupdates internal/interactive internal/layout internal/lease internal/ledger internal/mail internal/mailer internal/mailsubmit internal/metrics internal/moves internal/objstore internal/ops internal/park internal/plans internal/provision internal/relay internal/rollout internal/rootfsimage internal/runs internal/s3fake internal/schedule internal/seeds internal/status internal/telemetry internal/usage internal/vet scripts/pathmapcheck scripts/witness-pointer
        not scanned (216 files):
          cmd/carlos-media/drill_other.go: built only for other systems or tags
          cmd/carlos-media/harden_other.go: built only for other systems or tags
          cmd/console/fleetsocket_other.go: built only for other systems or tags
          cmd/console/servelock_windows.go: built only for other systems or tags
          cmd/moveprobe/detach_windows.go: built only for other systems or tags
          cmd/rootfswitness/mmap_other.go: built only for other systems or tags
          devbox_acl_other.go: built only for other systems or tags
          devbox_envfile_darwin_test.go: built only for other systems or tags
          devbox_envfile_other.go: built only for other systems or tags
          domains_transfer_signals_other.go: built only for other systems or tags
          interactive_term_darwin.go: built only for other systems or tags
          interactive_term_other.go: built only for other systems or tags
          internal/activator/claimprocess_root_other.go: built only for other systems or tags
          internal/activator/escrow_stamp_other.go: built only for other systems or tags
          internal/activator/fleetreserve_other.go: built only for other systems or tags
          internal/activator/harecord_other.go: built only for other systems or tags
          internal/activator/ownenv_other.go: built only for other systems or tags
          internal/activator/pty_other.go: built only for other systems or tags
          internal/activator/race_on_test.go: built only for other systems or tags
          internal/activator/rolelaunch_other.go: built only for other systems or tags
          internal/assetcache/statfs_other.go: built only for other systems or tags
          internal/boxself/io_other.go: built only for other systems or tags
          internal/cgroup/cleanup_other.go: built only for other systems or tags
          internal/cgroup/cleanup_other_test.go: built only for other systems or tags
          internal/cgroup/hostprocs_other.go: built only for other systems or tags
          internal/cgroup/recreate_other.go: built only for other systems or tags
          internal/cgroup/role_other.go: built only for other systems or tags
          internal/cgroup/shim_other.go: built only for other systems or tags
          internal/cgroup/strict_other.go: built only for other systems or tags
          internal/cgroup/verify_other.go: built only for other systems or tags
          internal/console/claim_sql_identity_other.go: built only for other systems or tags
          internal/console/geoipverify_other.go: built only for other systems or tags
          internal/console/hostreports_process_other.go: built only for other systems or tags
          internal/console/replicaview_other.go: built only for other systems or tags
          internal/console/restore_sim_nice_other_test.go: built only for other systems or tags
          internal/console/scalecost_other_test.go: built only for other systems or tags
          internal/console/seedscratch_windows.go: built only for other systems or tags
          internal/dbreads/worker_other.go: built only for other systems or tags
          internal/demobuild/security_other.go: built only for other systems or tags
          internal/democlaim/source_other.go: built only for other systems or tags
          internal/devbox/peer_darwin.go: built only for other systems or tags
          internal/devbox/peer_darwin_test.go: built only for other systems or tags
          internal/devbox/peer_other.go: built only for other systems or tags
          internal/devbox/socketcheck_other.go: built only for other systems or tags
          internal/domains/certimport_read_portable.go: built only for other systems or tags
          internal/edge/devboxpeer_other.go: built only for other systems or tags
          internal/edge/hairpin_other.go: built only for other systems or tags
          internal/edge/heldbudget_other.go: built only for other systems or tags
          internal/edge/purge_listen_unix.go: built only for other systems or tags
          internal/edge/purge_listen_windows.go: built only for other systems or tags
          internal/edge/race_on_test.go: built only for other systems or tags
          internal/edge/replicaconsole_owner_other.go: built only for other systems or tags
          internal/edge/replicaconsole_peer_other.go: built only for other systems or tags
          internal/edge/replicaconsole_socket_other_test.go: built only for other systems or tags
          internal/edge/static_artifact_other.go: built only for other systems or tags
          internal/edge/static_recordlock_other.go: built only for other systems or tags
          internal/edge/static_sweep_other.go: built only for other systems or tags
          internal/execsandbox/cleanup_other.go: built only for other systems or tags
          internal/execsandbox/file_other.go: built only for other systems or tags
          internal/execsandbox/oci_other.go: built only for other systems or tags
          internal/fileacl/fileacl_darwin.go: built only for other systems or tags
          internal/fileacl/fileacl_darwin_amd64.s: built only for other systems or tags
          internal/fileacl/fileacl_darwin_arm64.s: built only for other systems or tags
          internal/fileacl/fileacl_darwin_test.go: built only for other systems or tags
          internal/grouproll/state_other.go: built only for other systems or tags
          internal/grouprollaws/pty_darwin.go: built only for other systems or tags
          internal/grouprollaws/pty_other.go: built only for other systems or tags
          internal/hairpin/native_other.go: built only for other systems or tags
          internal/host/applylock_other_test.go: built only for other systems or tags
          internal/host/bootstrapfs_other.go: built only for other systems or tags
          internal/host/boxroles_config_other.go: built only for other systems or tags
          internal/host/claimfilesseed_delegation_other.go: built only for other systems or tags
          internal/host/claimfilesseed_transport_other.go: built only for other systems or tags
          internal/host/claimjournal_containment_other.go: built only for other systems or tags
          internal/host/claimjournal_migration_other.go: built only for other systems or tags
          internal/host/claimlaunch_kernel_other.go: built only for other systems or tags
          internal/host/claimlaunch_rev2_other_test.go: built only for other systems or tags
          internal/host/claimproduction_other.go: built only for other systems or tags
          internal/host/claimready_other.go: built only for other systems or tags
          internal/host/claimroleassembly_other.go: built only for other systems or tags
          internal/host/claimservingartifact_other.go: built only for other systems or tags
          internal/host/claimservinghandover_reboot_other.go: built only for other systems or tags
          internal/host/claimservinghandover_reboot_other_test.go: built only for other systems or tags
          internal/host/claimservingpark_other.go: built only for other systems or tags
          internal/host/claimstate_other.go: built only for other systems or tags
          internal/host/claimstop_kernel_other.go: built only for other systems or tags
          internal/host/claimtoken_inventory_other.go: built only for other systems or tags
          internal/host/claimunit_dropin_other.go: built only for other systems or tags
          internal/host/claimunit_files_other.go: built only for other systems or tags
          internal/host/claimunit_migrate_other.go: built only for other systems or tags
          internal/host/claimunit_ready_other.go: built only for other systems or tags
          internal/host/claimunit_socket_migration_other.go: built only for other systems or tags
          internal/host/consolefleet_owner_other.go: built only for other systems or tags
          internal/host/dbreads_other.go: built only for other systems or tags
          internal/host/egress_rail_other.go: built only for other systems or tags
          internal/host/fileowner_other.go: built only for other systems or tags
          internal/host/flock_windows.go: built only for other systems or tags
          internal/host/group_config_other.go: built only for other systems or tags
          internal/host/group_maintenance_other.go: built only for other systems or tags
          internal/host/group_maintenance_verbs_other.go: built only for other systems or tags
          internal/host/group_receipt_other.go: built only for other systems or tags
          internal/host/hadrain_call_other.go: built only for other systems or tags
          internal/host/hadrain_socket_other.go: built only for other systems or tags
          internal/host/hadrainfence_other.go: built only for other systems or tags
          internal/host/headroom_other.go: built only for other systems or tags
          internal/host/installchannel_other.go: built only for other systems or tags
          internal/host/managedboot_other.go: built only for other systems or tags
          internal/host/metrics_nested_other.go: built only for other systems or tags
          internal/host/movesfloor_other.go: built only for other systems or tags
          internal/host/movesfloorgate_other.go: built only for other systems or tags
          internal/host/movesheldrelease_other.go: built only for other systems or tags
          internal/host/movesmeasure_other.go: built only for other systems or tags
          internal/host/offcloudcredentials_other.go: built only for other systems or tags
          internal/host/registrychild_exec_other.go: built only for other systems or tags
          internal/host/registrychild_other.go: built only for other systems or tags
          internal/host/registryowner_chown_other.go: built only for other systems or tags
          internal/host/registryowner_descriptor_unix.go: built only for other systems or tags
          internal/host/replicahealth_other.go: built only for other systems or tags
          internal/host/rootgeneration_census_other.go: built only for other systems or tags
          internal/host/rootgeneration_kernel_other.go: built only for other systems or tags
          internal/host/rootgeneration_payload_other.go: built only for other systems or tags
          internal/host/rootgeneration_retired_other.go: built only for other systems or tags
          internal/host/rootmigration_production_other.go: built only for other systems or tags
          internal/host/runscset_other.go: built only for other systems or tags
          internal/host/sandboxenv_other.go: built only for other systems or tags
          internal/host/statfs_windows.go: built only for other systems or tags
          internal/host/systemapply_other.go: built only for other systems or tags
          internal/hostbox/census_vendor_other.go: built only for other systems or tags
          internal/hostbox/inventory_identity_other.go: built only for other systems or tags
          internal/hostbox/journalmigration_other.go: built only for other systems or tags
          internal/hostbox/journalnamespace_other.go: built only for other systems or tags
          internal/hostbox/journaltrust_other.go: built only for other systems or tags
          internal/hostbox/migration_census_other.go: built only for other systems or tags
          internal/hostbox/typedpark_other.go: built only for other systems or tags
          internal/hostenv/group_other.go: built only for other systems or tags
          internal/hostenv/write_other.go: built only for other systems or tags
          internal/hostenv/write_other_test.go: built only for other systems or tags
          internal/hostexec/clock_other.go: built only for other systems or tags
          internal/hostexec/clock_other_test.go: built only for other systems or tags
          internal/hostexec/local_other.go: built only for other systems or tags
          internal/hostexec/pending_other.go: built only for other systems or tags
          internal/hostexec/probe_other.go: built only for other systems or tags
          internal/hostexec/rootprocess_other.go: built only for other systems or tags
          internal/hostfiles/dir_other.go: built only for other systems or tags
          internal/hostfiles/refuse_other.go: built only for other systems or tags
          internal/hostfiles/watch_other.go: built only for other systems or tags
          internal/hostfloor/controllers_other.go: built only for other systems or tags
          internal/hostfloor/image_other.go: built only for other systems or tags
          internal/hostguard/flock_other.go: built only for other systems or tags
          internal/hostguard/flock_other_test.go: built only for other systems or tags
          internal/hostguard/record_other.go: built only for other systems or tags
          internal/instancectl/claimexec_other.go: built only for other systems or tags
          internal/instancectl/claimexec_socket_other.go: built only for other systems or tags
          internal/instancectl/claimlaunch_snapshot_other.go: built only for other systems or tags
          internal/instancectl/claimnetwork_other.go: built only for other systems or tags
          internal/instancectl/demo_snapshot_other.go: built only for other systems or tags
          internal/instancectl/egress_cgroup_other.go: built only for other systems or tags
          internal/instancectl/egress_dropin_other.go: built only for other systems or tags
          internal/instancectl/fleetsize_other.go: built only for other systems or tags
          internal/instancectl/gvisorprobe_other.go: built only for other systems or tags
          internal/instancectl/peer_other.go: built only for other systems or tags
          internal/instancectl/peer_tuple_other.go: built only for other systems or tags
          internal/instancectl/rootfs_identity_other.go: built only for other systems or tags
          internal/instanceexec/claimexec_other.go: built only for other systems or tags
          internal/instanceexec/exec_rootfs_other.go: built only for other systems or tags
          internal/instanceexec/netlink_route_other.go: built only for other systems or tags
          internal/instanceexec/probe_gvisor_other.go: built only for other systems or tags
          internal/instanceexec/probe_hardening_other.go: built only for other systems or tags
          internal/instanceexec/probe_other.go: built only for other systems or tags
          internal/instanceexec/probe_rootfs_other.go: built only for other systems or tags
          internal/instanceexec/sandbox_other.go: built only for other systems or tags
          internal/instanceexec/scope_other.go: built only for other systems or tags
          internal/instanceexec/stop_other.go: built only for other systems or tags
          internal/instanceexec/tty_other.go: built only for other systems or tags
          internal/instancefs/instancefs_other.go: built only for other systems or tags
          internal/launchd/activate_darwin.go: built only for other systems or tags
          internal/launchd/activate_darwin_amd64.s: built only for other systems or tags
          internal/launchd/activate_darwin_arm64.s: built only for other systems or tags
          internal/launchd/activate_darwin_test.go: built only for other systems or tags
          internal/layout/journal_other.go: built only for other systems or tags
          internal/layout/links_other.go: built only for other systems or tags
          internal/mailer/keys_other.go: built only for other systems or tags
          internal/maintenanceexec/run_other.go: built only for other systems or tags
          internal/managedboot/admission_other.go: built only for other systems or tags
          internal/managedboot/identity_other.go: built only for other systems or tags
          internal/mediahandler/collect_other.go: built only for other systems or tags
          internal/mediahandler/procs_other.go: built only for other systems or tags
          internal/medialocal/runner_other.go: built only for other systems or tags
          internal/moves/archive/open_other.go: built only for other systems or tags
          internal/moves/archive/sync_other.go: built only for other systems or tags
          internal/ops/flock_windows.go: built only for other systems or tags
          internal/park/local_other.go: built only for other systems or tags
          internal/privatefile/io_other.go: built only for other systems or tags
          internal/proxyproto/peek_other.go: built only for other systems or tags
          internal/relay/race_on_test.go: built only for other systems or tags
          internal/release/consumedfence_other.go: built only for other systems or tags
          internal/release/digestcache_other.go: built only for other systems or tags
          internal/rootaws/credentials_other.go: built only for other systems or tags
          internal/rootaws/open_darwin.go: built only for other systems or tags
          internal/rootfsimage/dir_other.go: built only for other systems or tags
          internal/rootstate/authoritydir_other.go: built only for other systems or tags
          internal/rootstate/authorityfile_other.go: built only for other systems or tags
          internal/rootstate/file_other.go: built only for other systems or tags
          internal/rootstate/link_other.go: built only for other systems or tags
          internal/rootstate/persistent_other.go: built only for other systems or tags
          internal/rootstate/state_other.go: built only for other systems or tags
          internal/safefile/file_other.go: built only for other systems or tags
          internal/safefile/reap_other.go: built only for other systems or tags
          internal/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               1093 at  474 sites  log.Fatal*, (*log.Logger).Fatal* and os.Exit in the root package's production files
    codehealth_test.go:115: sleep               1006 at  812 sites  time.Sleep in test files
    codehealth_test.go:115: db-no-context        873 at  696 sites  database calls with no context (dbOpWithoutContext) in production files
    codehealth_test.go:115: host-context         188 at  142 sites  context.Background and context.TODO in internal/host production files
    codehealth_test.go:115: func-lines         18586 at   45 sites  functions over 300 code lines (blank and comment-only lines not counted)
    codehealth_test.go:115: file-lines         30683 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
--- PASS: TestCodeHealth (111.40s)
PASS
ok  	github.com/carlosframework/platform/internal/codehealth	112.421s
=== code-health-record ===
go version go1.26.10 linux/arm64
code-health record: comparing with the merge base 4799995f73519e17658758951f597e603a5a00df (main is 07280ebd8586221741cb516b02ca1cfdc0e519c5)
=== 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 (14 s, from +13 s)
ok  	github.com/carlosframework/platform/internal/systemd	13.330s
=== internal_rootaws@0 (26 s, from +34 s)
ok  	github.com/carlosframework/platform/internal/rootaws	25.276s
=== internal_activator@0 (278 s, from +112 s)
ok  	github.com/carlosframework/platform/internal/activator	276.010s
=== internal_activator@1 (245 s, from +112 s)
ok  	github.com/carlosframework/platform/internal/activator	243.144s
=== internal_activator@2 (271 s, from +112 s)
ok  	github.com/carlosframework/platform/internal/activator	269.467s
=== internal_activator@3 (402 s, from +112 s)
ok  	github.com/carlosframework/platform/internal/activator	400.586s
=== internal_activator@4 (286 s, from +112 s)
ok  	github.com/carlosframework/platform/internal/activator	284.315s
=== internal_activator@5 (295 s, from +112 s)
ok  	github.com/carlosframework/platform/internal/activator	293.646s
=== internal_activator@6 (321 s, from +112 s)
ok  	github.com/carlosframework/platform/internal/activator	319.583s
=== internal_activator@7 (435 s, from +112 s)
ok  	github.com/carlosframework/platform/internal/activator	433.719s
=== internal_edge@0 (85 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	81.948s
=== internal_edge@1 (147 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	143.929s
=== internal_edge@2 (199 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	196.381s
=== internal_edge@3 (150 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	147.046s
=== internal_edge@4 (160 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	157.247s
=== internal_edge@5 (241 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	238.004s
=== internal_edge@6 (190 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	187.162s
=== internal_edge@7 (227 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	224.363s
=== internal_edge@8 (219 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	215.732s
=== internal_edge@9 (271 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	268.337s
=== internal_edge@10 (262 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	258.811s
=== internal_edge@11 (215 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	211.414s
=== internal_edge@12 (251 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	248.429s
=== internal_edge@13 (278 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	274.682s
=== internal_edge@14 (195 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	192.149s
=== internal_edge@15 (248 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	245.206s
=== internal_host@0 (9 s, from +194 s)
ok  	github.com/carlosframework/platform/internal/host	5.045s
=== internal_host@1 (16 s, from +195 s)
ok  	github.com/carlosframework/platform/internal/host	13.260s
=== lists: internal_edge 133 s, internal_activator 110 s, internal_host 193 s, internal_rootaws 34 s, internal_systemd 13 s
=== cpu: the gate used 7657 cpu-seconds in 547 s, about 14.0 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/viper v1.19.0
go: downloading github.com/BobuSumisu/aho-corasick v1.0.3
go: downloading github.com/hashicorp/go-version v1.7.0
go: downloading github.com/spf13/cobra v1.9.1
go: downloading golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa
go: downloading github.com/charmbracelet/lipgloss v0.5.0
go: downloading github.com/fatih/semgroup v1.2.0
go: downloading github.com/Masterminds/sprig/v3 v3.3.0
go: downloading github.com/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/spf13/pflag v1.0.6
go: downloading github.com/huandu/xstrings v1.5.0
go: downloading github.com/mitchellh/copystructure v1.2.0
go: downloading github.com/mattn/go-colorable v0.1.14
go: downloading golang.org/x/crypto v0.35.0
go: downloading github.com/Masterminds/semver/v3 v3.3.0
go: downloading github.com/Masterminds/goutils v1.1.1
go: downloading dario.cat/mergo v1.0.1
go: downloading github.com/spf13/cast v1.7.1
go: downloading github.com/mitchellh/mapstructure v1.5.0
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading github.com/subosito/gotenv v1.6.0
go: downloading github.com/pelletier/go-toml/v2 v2.2.3
go: downloading github.com/spf13/afero v1.12.0
go: downloading github.com/shopspring/decimal v1.4.0
go: downloading github.com/sagikazarmark/slog-shim v0.1.0
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading gopkg.in/ini.v1 v1.67.0
go: downloading github.com/magiconair/properties v1.8.9
go: downloading github.com/fsnotify/fsnotify v1.8.0
go: downloading github.com/mitchellh/reflectwalk v1.0.2
go: downloading github.com/muesli/reflow v0.2.1-0.20210115123740-9e1d0d53df68
go: downloading github.com/mattn/go-runewidth v0.0.14
go: downloading github.com/lucasb-eyer/go-colorful v1.2.0
go: downloading github.com/muesli/termenv v0.15.1
go: downloading golang.org/x/sync v0.11.0
go: downloading golang.org/x/text v0.22.0
go: downloading golang.org/x/sys v0.30.0
go: downloading github.com/rivo/uniseg v0.2.0
go: downloading github.com/STARRY-S/zip v0.2.1
go: downloading github.com/bodgit/sevenzip v1.6.0
go: downloading github.com/nwaples/rardecode/v2 v2.1.0
go: downloading github.com/klauspost/compress v1.17.11
go: downloading github.com/ulikunitz/xz v0.5.12
go: downloading github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707
go: downloading github.com/sorairolake/lzip-go v0.3.5
go: downloading github.com/therootcompany/xz v1.0.1
go: downloading github.com/andybalholm/brotli v1.1.2-0.20250424173009-453214e765f3
go: downloading github.com/pierrec/lz4/v4 v4.1.21
go: downloading github.com/minio/minlz v1.0.0
go: downloading github.com/klauspost/pgzip v1.2.6
go: downloading github.com/aymanbagabas/go-osc52/v2 v2.0.1
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 100 near misses of the names notscanned.go lists
self-test: skipped  the 33 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, 134 tracked files judged, 3 broken setups refused
gitleaks: scanned 12018 tracked files; 33 not scanned, by exact path (scripts/gitleaks-gate/notscanned.go)
gitleaks: clean
diff --git a/docs/superpowers/notes/census-proposal-sec-h5-m8-fleet-hostnames.md b/docs/superpowers/notes/census-proposal-sec-h5-m8-fleet-hostnames.md
index 6774cec92..6318eaa3c 100644
--- a/docs/superpowers/notes/census-proposal-sec-h5-m8-fleet-hostnames.md
+++ b/docs/superpowers/notes/census-proposal-sec-h5-m8-fleet-hostnames.md
@@ -4,10 +4,7 @@ Ruling `census-ruling-sec-h5-m8-fleet-hostnames`. The independent reviewer appro
| unit | change | read sites | what changed |
|---|---|---|---|
-| `internal/domains/aliases.go` `deriveInstanceAliases` | body | unchanged (29) | H5-M8 refactor only: the catch-all checks move verbatim into InstanceCatchallParent (same order, same log lines) and the joined-name check into InstanceAliasName (adds the label regex the loop already applied), so the edge store door derives candidates with the same functions; no read added, derives exactly as before |
-| `internal/domains/namespacealiases.go` `deriveNamespaceAliases` | body | unchanged (35) | H5-M8 refactor only: calls namespaceDerivedName under its exported name NamespaceDerivedName (unchanged body); no read added |
-| `internal/domains/reconcile.go` `Reconcile` | body | unchanged (95) | H5-M8 refactor only: the platform apex and canary host formulas move into platformApexHost and platformCanaryHost (same strings), shared with NamespaceTwinHosts; no read added |
-| `internal/edge/storedoor.go` `storeDoor.serveListing` | body | unchanged (1) | passes the caller sqid to serveClaimListing (H5-M8: the claim listing names the fleet account own claims and another account claim only on a name its boxes could derive); no read added, no store or file reach changed |
+| `internal/edge/storedoor.go` `storeDoor.serveListing` | body | unchanged (1) | passes the caller sqid to serveClaimListing (H5-M8: the claim listing names only the fleet account own claims, pending included); no read added, no store or file reach changed |
Envelopes re-pinned: `internal/domains`, `internal/edge`.
@@ -15,11 +12,8 @@ Review: a model from the other family than the author reads the branch's diff ag
Recorded dispositions, which each change must still satisfy:
-- `internal/domains/aliases.go` `deriveInstanceAliases`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=root-route; the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): rev3=J1's body; a stale body under a retired lifetime no longer makes a label shared, and a label with a record that cannot be judged keeps its existing alias row of the catch-all's own account and app (reading that row's Account and App) only once the derived name has passed every precedence check a derived name answers to (validity, an exact claim, a local real route, a deployment route, the per-box cap), and derives no new one; a report-only conservative keep, never a new route;rev3=census-ruling-regional-domains-447;basis=#447 Task 2: an instance catch-all whose parent claim is regional is inert (logged once, continue), as one whose parent is not held is; it only narrows what derives; no read added;rev3=census-ruling-account-subdomains;basis=takes a *int budget shared with the namespace pass instead of a local counter; the same checks and cap (maxInstanceAliases, now a var so a test can lower it); names kept on a failed instance listing now take the budget too, each once (fix round 1, Astra I-2), so the cap holds on that branch; same reads; body change only; derives and keeps less, never more
-- `internal/domains/namespacealiases.go` `deriveNamespaceAliases`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-account-subdomains;basis=new: derives <prefix>.<name>.<apps> -> <prefix>.<sqid>.<apps> alias rows from the routes, alias rows and claim listing the pass already read (Provisioned or Platform, not sidecar or replica, of the name's account), writes them "pointing" (fix round 1) with UpsertAlias, and SetAliasDNSStatus("pointing") for an existing one that is not, to the box's own registry, and HA names into the in-memory AliasIngress report; no file, path or bucket read
-- `internal/domains/reconcile.go` `Reconcile`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), from its domains loop: the seeded-instances body (a trashed app's route kept while an import on its host is journaled, deleted only if the row is still the one listed); self-serve moves 1 Task 4 removes the claims-off 1d auto-purge, so a claims-off box destroys no app objects and a host-claim box only requests the claim's purge as before; the registry reads are unchanged;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 7: the whole-app trash loop keeps every forward row (keptLive = append(keptLive, rt), +whole:Route x3) ahead of DeleteIfUnchanged, so a trashed fleet app's forward row is retired by the forward phase alone. Deletes less, never more.;rev3=census-ruling-staticcheck-sa4006;basis=SA4006 dead store: the canary loop no longer keeps the app from appKeyOwner, which canaryPointer (itself built on appKeyOwner for the same key) overwrote straight away; acctOfKey and ok are unchanged. No read added, read sites unchanged (95).
- `internal/edge/storedoor.go` `storeDoor.serveListing`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=J4;basis=root-input
-Seal: `0fdff597ef83fb9966e07c70b4283001eb97f7dfa71a83a19bde92382192eb6b` → `d92e48eb2c7a5168c5d6f651f3ed678ecbaec098c3ebb47b88f5321e994b56de`.
+Seal: `0fdff597ef83fb9966e07c70b4283001eb97f7dfa71a83a19bde92382192eb6b` → `5ae2bfceedb73398af5ec267891dd7f803892d81ddc33c14d3c31c5ea606e97e`.
Overlay: `internal/provision/testdata/plan14-root-reads-sec-h5-m8-fleet-hostnames.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/internal/console/domaincatchall.go b/internal/console/domaincatchall.go
index a2e996615..9475708b0 100644
--- a/internal/console/domaincatchall.go
+++ b/internal/console/domaincatchall.go
@@ -326,8 +326,10 @@ func catchallOverForeignChildMsg(parent string, proof dnsRecord) string {
// for this star only. A name an instance catch-all or an account namespace
// derives is an exact alias row like the child's, and the edge does not
// prefer the claim between two of those: there the box's alias pass
-// yielding to the claim (from the claim listing, which the fleet store door
-// keeps for exactly those names, H5-M8) is the only guard. Otherwise the 409 says
+// yielding to the claim it reads is the only guard. A platform box reads
+// every claim; a fleet box reads only its own account's (H5-M8), and its
+// rows never reach the platform edges (serveClaimListing says why that is
+// safe). Otherwise the 409 says
// why and names that record (catchallOverForeignChildMsg), rather than the
// neutral answer that left the owner with nothing to act on. Asked only
// when there is a child to answer for, so the common case makes no lookup.
diff --git a/internal/domains/aliases.go b/internal/domains/aliases.go
index 0f13d012e..f829c3d6f 100644
--- a/internal/domains/aliases.go
+++ b/internal/domains/aliases.go
@@ -68,71 +68,6 @@ func sayInstanceCatchallOnce(host, reason string) {
}
}
-// InstanceCatchallParent reports whether c is an instance catch-all that
-// derives names this pass, and returns its parent; claimed is the claims
-// read, by Host. "" means it derives nothing, and why says so for the log
-// ("" too when c is not a catch-all at all). It is deriveInstanceAliases's
-// rule, and the edge's store door asks it as well, to know which of a fleet
-// box's catch-alls could derive a name another account has claimed (H5-M8):
-// one function, so the two cannot drift.
-//
-// The catch-all is honoured only while its parent's own claim is held by the
-// same account, not pending and not regional (AttachInstanceCatchall's door
-// rule, re-checked because the parent claim can be released afterwards), and
-// only in the shape the door writes.
-func InstanceCatchallParent(c Claim, claimed map[string]Claim) (parent, why string) {
- if !c.Instances {
- return "", ""
- }
- parent, ok := ParseInstanceCatchallHost(c.Host)
- if !ok || InstanceCatchallHost(parent) != c.Host {
- return "", "refused: not a normalised *.<parent> hostname"
- }
- if c.Route != "" || c.Wildcard || c.Catchall || len(c.Paths) > 0 {
- return "", "refused: the claim carries a route, wildcard, catchall or paths, which no door writes on a catch-all"
- }
- if strings.HasSuffix(parent, sidecarSuffix) {
- return "", "refused: reserved sidecar suffix"
- }
- // A pending parent (#215) is not held: nobody has proved they control
- // it, so it cannot lend a catch-all its names either.
- apex, held := claimed[parent]
- if !held || apex.Account != c.Account || apex.Pending {
- return "", "inert: its parent " + parent + " is not claimed by account " + c.Account
- }
- if apex.Regional() {
- // A regional parent (#447) is not held for this purpose: a name
- // under it would be served from whichever box has the instance,
- // whatever the region.
- return "", "inert: its parent " + parent + " is regional"
- }
- return parent, ""
-}
-
-// InstanceAliasName is the name an instance catch-all over parent derives
-// for an instance whose host's first label is label: "<label>.<parent>".
-// ok is false when label is not one DNS label or the joined name is not a
-// normalised alias hostname (too long once joined). Shared with the edge's
-// store door for the reason InstanceCatchallParent gives.
-func InstanceAliasName(label, parent string) (string, bool) {
- if !hostLabelRe.MatchString(label) {
- return "", false
- }
- name := label + "." + parent
- if n, ok := NormalizeAliasHost(name); !ok || n != name {
- return "", false
- }
- return name, true
-}
-
-// InstanceHosts is the hosts of account/app's instance record keys, from one
-// listing and no bodies: the deployment-wide set an instance catch-all of
-// that app could derive names from (InstanceLabelCounts counts the same keys
-// by label).
-func InstanceHosts(ctx context.Context, s release.Store, account, app string) ([]string, error) {
- return instanceHosts(ctx, s, account, app)
-}
-
// deriveInstanceAliases adds the alias rows the instance catch-alls derive
// (Claim.Instances): for each catch-all "*.<parent>", one row
// <label>.<parent> -> <instance host> per LOCAL instance route of the
@@ -207,11 +142,32 @@ func deriveInstanceAliases(claims []Claim, listed map[string]bool, routes []regi
have[a.Alias] = a
}
for _, c := range claims {
- parent, why := InstanceCatchallParent(c, claimed)
- if parent == "" {
- if why != "" {
- sayInstanceCatchallOnce(c.Host, why)
- }
+ if !c.Instances {
+ continue
+ }
+ parent, ok := ParseInstanceCatchallHost(c.Host)
+ if !ok || InstanceCatchallHost(parent) != c.Host {
+ sayInstanceCatchallOnce(c.Host, "refused: not a normalised *.<parent> hostname")
+ continue
+ }
+ if c.Route != "" || c.Wildcard || c.Catchall || len(c.Paths) > 0 {
+ sayInstanceCatchallOnce(c.Host, "refused: the claim carries a route, wildcard, catchall or paths, which no door writes on a catch-all")
+ continue
+ }
+ if strings.HasSuffix(parent, sidecarSuffix) {
+ sayInstanceCatchallOnce(c.Host, "refused: reserved sidecar suffix")
+ continue
+ }
+ // A pending parent (#215) is not held: nobody has proved they
+ // control it, so it cannot lend a catch-all its names either.
+ if apex, held := claimed[parent]; !held || apex.Account != c.Account || apex.Pending {
+ sayInstanceCatchallOnce(c.Host, "inert: its parent "+parent+" is not claimed by account "+c.Account)
+ continue
+ } else if apex.Regional() {
+ // A regional parent (#447) is not held for this purpose: a name
+ // under it would be served from whichever box has the
+ // instance, whatever the region.
+ sayInstanceCatchallOnce(c.Host, "inert: its parent "+parent+" is regional")
continue
}
var hostsOf map[string]int
@@ -251,8 +207,8 @@ func deriveInstanceAliases(claims []Claim, listed map[string]bool, routes []regi
sayInstanceCatchallOnce(c.Host, "label "+label+" is shared by "+strconv.Itoa(hostsOf[label])+" instances of "+c.App+" (its instance domain was changed); "+label+"."+parent+" serves none of them until one is deleted")
continue
}
- name, ok := InstanceAliasName(label, parent)
- if !ok {
+ name := label + "." + parent
+ if n, ok := NormalizeAliasHost(name); !ok || n != name {
continue // too long once joined to parent
}
// listed, not claimed: a claim whose body could not be read this
diff --git a/internal/domains/claims.go b/internal/domains/claims.go
index cfb1cddc3..c3ce10a0f 100644
--- a/internal/domains/claims.go
+++ b/internal/domains/claims.go
@@ -930,46 +930,31 @@ func readClaim(ctx context.Context, s release.Store, key string) (c Claim, ok, f
// readClaimDetail is readClaim plus notFound: the GET said the object does
// not exist. That is the one failure the fleet store door uses on purpose (a
-// foreign account's or a pending claim's body is a 404; since H5-M8 the
-// door's listing names a foreign claim only when it sits on a name this
-// box could derive, where the box must yield to it), so a caller that
-// reports completeness needs it apart from a store error, an unparseable
-// body or a schema this binary cannot read.
+// pending claim's body is a 404 behind a listing that shows its name; since
+// H5-M8 another account's claim is not listed at all, and its body is a 404
+// too), so a caller that reports completeness needs it apart from a store
+// error, an unparseable body or a schema this binary cannot read.
func readClaimDetail(ctx context.Context, s release.Store, key string) (c Claim, ok, firm, notFound bool) {
raw, _, err := s.Get(ctx, key)
if err != nil {
// Not-found is quiet: a claim detached between the listing and this
- // read, or, through the fleet store door, another account's claim
- // on a name this box could derive, which the door lists but whose
- // body it withholds (#215, H5-M8). The listing still counts it as
- // claimed (listWithHosts).
+ // read, or, through the fleet store door, this account's pending
+ // claim, whose NAME the door lists but whose body it withholds
+ // (#215). The listing still counts it as claimed (listWithHosts).
if !errors.Is(err, os.ErrNotExist) {
log.Printf("domains: claim %s: %v", key, err)
}
return Claim{}, false, false, errors.Is(err, os.ErrNotExist)
}
- c, decodeErr := DecodeClaim(raw)
- if decodeErr != nil {
- log.Printf("domains: claim %s: %v", key, decodeErr)
- return Claim{}, false, true, false
- }
- return c, true, true, false
-}
-
-// DecodeClaim decodes one claim body the way every claim fold reads it: a
-// body that does not parse, or of a schema this binary does not understand,
-// is refused (and readClaimDetail skips it). The edge's store door decodes
-// through it too, so it judges a fleet box's catch-alls and namespaces from
-// exactly the claims the box's own alias pass would use (H5-M8).
-func DecodeClaim(raw []byte) (Claim, error) {
- var c Claim
if err := json.Unmarshal(raw, &c); err != nil {
- return Claim{}, fmt.Errorf("unparseable: %w", err)
+ log.Printf("domains: claim %s: unparseable: %v", key, err)
+ return Claim{}, false, true, false
}
if !claimSchemaOK(c) {
- return Claim{}, fmt.Errorf("%s, skipping", claimSchemaRefusal(c))
+ log.Printf("domains: claim %s: %s, skipping", key, claimSchemaRefusal(c))
+ return Claim{}, false, true, false
}
- return c, nil
+ return c, true, true, false
}
// hostLabelRe mirrors provision.labelRe (which itself mirrors
diff --git a/internal/domains/namespacealiases.go b/internal/domains/namespacealiases.go
index d60c8bd6c..c6c0787e8 100644
--- a/internal/domains/namespacealiases.go
+++ b/internal/domains/namespacealiases.go
@@ -10,7 +10,6 @@ package domains
import (
"log"
"maps"
- "slices"
"sort"
"strconv"
"strings"
@@ -51,13 +50,11 @@ func splitUnderApps(host, appsDomain string) (prefix, label string, ok bool) {
return rest[:i], rest[i+1:], true
}
-// NamespaceDerivedName is the name a host under sqid's label derives under
+// namespaceDerivedName is the name a host under sqid's label derives under
// name: "<prefix>.<name>.<appsDomain>". ok is false when the host is not
// under sqid's label or the result is not a normalised alias hostname (too
-// long once joined). Exported because the edge's store door asks it too, to
-// tell a fleet box which other accounts' claims sit on a name the box could
-// derive (H5-M8): the two must never disagree about the name.
-func NamespaceDerivedName(host, sqid, name, appsDomain string) (string, bool) {
+// long once joined).
+func namespaceDerivedName(host, sqid, name, appsDomain string) (string, bool) {
prefix, label, ok := splitUnderApps(host, appsDomain)
if !ok || label != sqid {
return "", false
@@ -69,53 +66,6 @@ func NamespaceDerivedName(host, sqid, name, appsDomain string) (string, bool) {
return derived, true
}
-// platformApexHost is the platform domain the domains pass mints for an app
-// (<app>.<sqid>.<apps>), and platformCanaryHost the one it mints for a
-// static app's canary channel. Both are Platform routes, which the namespace
-// pass derives names from.
-func platformApexHost(app, acct, appsDomain string) string {
- return app + "." + acct + "." + appsDomain
-}
-
-func platformCanaryHost(name, app, acct, appsDomain string) string {
- return name + "." + app + "." + acct + "." + appsDomain
-}
-
-// NamespaceTwinHosts is every host a box could hold as a Provisioned or
-// Platform route of account, read from keys, a listing of "apps/<account>/":
-// each instance record's host (the provisioning pass mints a Provisioned
-// route from it), and each app's platform domain and canary channel host
-// (the domains pass mints those, platformApexHost and platformCanaryHost).
-// Those are the routes deriveNamespaceAliases derives an account
-// namespace's names from, so every name it derives is NamespaceDerivedName
-// of one of these. It is a superset (an app with nothing serving has no
-// platform domain yet), which is the safe direction for its one caller, the
-// edge's store door (H5-M8): a fleet box must be told about every other
-// account's claim on a name it could derive. Sorted, no duplicates.
-func NamespaceTwinHosts(keys []string, account, appsDomain string) []string {
- if appsDomain == "" {
- return nil
- }
- known := map[string]bool{account: true}
- seen := map[string]bool{}
- for _, key := range keys {
- acct, app, prefix, ok := appKeyOwner(key, known)
- if !ok || acct != account {
- continue
- }
- seen[platformApexHost(app, acct, appsDomain)] = true
- if rest, ok := strings.CutPrefix(key, prefix+"instances/"); ok {
- if host, ok := strings.CutSuffix(rest, ".json"); ok && host != "" && !strings.Contains(host, "/") {
- seen[host] = true
- }
- }
- if _, name, ok := canaryPointer(key, known); ok {
- seen[platformCanaryHost(name, app, acct, appsDomain)] = true
- }
- }
- return slices.Sorted(maps.Keys(seen))
-}
-
// isNamespaceDerived reports whether a is a row the namespace pass derives:
// its name sits under a held name of a's own account and it points at that
// name's sqid twin (<prefix>.<sqid>.<appsDomain> for <prefix>.<name>.<appsDomain>).
@@ -198,7 +148,7 @@ routes:
}
sqid := release.RouteAccount(rt)
for _, name := range namesOf[sqid] {
- derived, ok := NamespaceDerivedName(rt.Host, sqid, name, appsDomain)
+ derived, ok := namespaceDerivedName(rt.Host, sqid, name, appsDomain)
if !ok || !free(derived) {
continue
}
@@ -249,7 +199,7 @@ routes:
continue
}
for _, name := range namesOf[sqid] {
- derived, ok := NamespaceDerivedName(key, sqid, name, appsDomain)
+ derived, ok := namespaceDerivedName(key, sqid, name, appsDomain)
if !ok || listed[derived] || deploymentRoutes[derived] {
continue
}
diff --git a/internal/domains/reconcile.go b/internal/domains/reconcile.go
index 4c6fdb84d..6a6cd1f3a 100644
--- a/internal/domains/reconcile.go
+++ b/internal/domains/reconcile.go
@@ -324,7 +324,7 @@ func Reconcile(ctx context.Context, s release.Store, reg *registry.Registry, cfg
if hasApex[k] {
continue
}
- host := platformApexHost(k.app, k.acct, cfg.AppsDomain)
+ host := fmt.Sprintf("%s.%s.%s", k.app, k.acct, cfg.AppsDomain)
if byHost[host] {
continue // already minted — idempotent
}
@@ -392,7 +392,7 @@ func Reconcile(ctx context.Context, s release.Store, reg *registry.Registry, cfg
log.Printf("domains: canary channel %s for app %s has no host: minting one needs a per-host canary instance (carlos canary), not an alias to stable — skipping", channel, app)
continue
}
- host := platformCanaryHost(name, app, acct, cfg.AppsDomain)
+ host := fmt.Sprintf("%s.%s.%s.%s", name, app, acct, cfg.AppsDomain)
nr := mintedRoute(host, app, acct, *src)
nr.Channel = channel
nr.Canary = true
diff --git a/internal/edge/edge.go b/internal/edge/edge.go
index 6551f507b..ec59c6987 100644
--- a/internal/edge/edge.go
+++ b/internal/edge/edge.go
@@ -901,7 +901,7 @@ func (e *Edge) armStoreDoor() {
e.door = nil
return
}
- e.door = &storeDoor{hub: e.tunnels, store: e.staticStore, fleetAccount: e.fleetAccount, appsDomain: e.appsDomain}
+ e.door = &storeDoor{hub: e.tunnels, store: e.staticStore, fleetAccount: e.fleetAccount}
}
// fleetAccount resolves an authenticated fleet name to its owning account's
diff --git a/internal/edge/fleetapi_e2e_test.go b/internal/edge/fleetapi_e2e_test.go
index 9e10699ab..684251d7e 100644
--- a/internal/edge/fleetapi_e2e_test.go
+++ b/internal/edge/fleetapi_e2e_test.go
@@ -764,13 +764,18 @@ func TestFleetBoxPolicyReadsKeepTheRequestBudget(t *testing.T) {
wantRow("cart", "10.0.5.20", "large", signed)
}
-// TestFleetBoxCatchallYieldsToAnotherTenantsClaim (#215 review): the store
-// door withholds another account's claim BODY from a fleet box, but must
-// still list its NAME. An instance catch-all derives no <label>.<parent>
-// alias over a name somebody else has claimed, and ReconcileAliases decides
-// "somebody else has claimed it" from the listing; a listing narrowed to the
-// box's own account let the box shadow the other tenant's claim.
-func TestFleetBoxCatchallYieldsToAnotherTenantsClaim(t *testing.T) {
+// TestFleetBoxCatchallSeesNoOtherTenantsClaim (H5-M8; until then
+// TestFleetBoxCatchallYieldsToAnotherTenantsClaim, #215 review). The store
+// door withholds another account's claim from a fleet box, name and body
+// alike. So a fleet box's instance catch-all no longer yields a
+// <label>.<parent> name to a claim another tenant holds on it: the box
+// derives it as it derives any unclaimed name. That is the contract now,
+// and safe because a fleet box's rows never reach a platform edge, so the
+// other tenant's name is still served from its own claim everywhere the
+// platform routes it (serveClaimListing says why). This pins all three: the
+// listing omits the name, the body is the door's 404, and the box derives
+// the name beside the unclaimed control.
+func TestFleetBoxCatchallSeesNoOtherTenantsClaim(t *testing.T) {
w := newFleetDoorWorld(t)
ctx := context.Background()
const parent = "teams.example.com"
@@ -780,7 +785,7 @@ func TestFleetBoxCatchallYieldsToAnotherTenantsClaim(t *testing.T) {
if _, err := domains.AttachInstanceCatchall(ctx, w.store, parent, w.sqid, "jelly", "", ""); err != nil {
t.Fatal(err)
}
- // The other tenant's exact claim on the name the catch-all would derive.
+ // The other tenant's exact claim on the name the catch-all derives.
if _, _, err := domains.AttachClaim(ctx, w.store, domains.Claim{
Host: "beta." + parent, Account: w.other, App: "shop", Route: "shop." + w.other + ".oncarlos.com",
CreatedBy: "sam@keymail.dev",
@@ -789,18 +794,15 @@ func TestFleetBoxCatchallYieldsToAnotherTenantsClaim(t *testing.T) {
}
instance := "beta." + w.sqid + ".oncarlos.com"
w.put(t, "apps/"+w.sqid+"/jelly/instances/"+instance+".json", `{}`)
- // A second instance whose name nobody else claims: the control that
- // shows the catch-all does derive through the door.
control := "acme." + w.sqid + ".oncarlos.com"
w.put(t, "apps/"+w.sqid+"/jelly/instances/"+control+".json", `{}`)
- // The box sees the other tenant's NAME but not its claim.
keys, err := w.boxA.List(ctx, domains.ClaimsPrefix)
if err != nil {
t.Fatal(err)
}
- if !slices.Contains(keys, domains.ClaimKey("beta."+parent)) {
- t.Fatalf("listing %v omits another tenant's claimed name", keys)
+ if slices.Contains(keys, domains.ClaimKey("beta."+parent)) {
+ t.Fatalf("listing %v names another tenant's claim", keys)
}
if _, _, err := w.boxA.Get(ctx, domains.ClaimKey("beta."+parent)); !errors.Is(err, os.ErrNotExist) {
t.Fatalf("another tenant's claim body: err = %v, want not-found", err)
@@ -810,17 +812,16 @@ func TestFleetBoxCatchallYieldsToAnotherTenantsClaim(t *testing.T) {
if err != nil {
t.Fatal(err)
}
- if err := reg.Upsert(registry.Route{Host: instance, Slug: "beta", App: "jelly", Account: w.sqid, Kind: "instance", Status: "ready"}); err != nil {
- t.Fatal(err)
- }
- if err := reg.SetProvisioned(instance, true); err != nil {
- t.Fatal(err)
- }
- if err := reg.Upsert(registry.Route{Host: control, Slug: "acme", App: "jelly", Account: w.sqid, Kind: "instance", Status: "ready"}); err != nil {
- t.Fatal(err)
- }
- if err := reg.SetProvisioned(control, true); err != nil {
- t.Fatal(err)
+ for _, rt := range []registry.Route{
+ {Host: instance, Slug: "beta", App: "jelly", Account: w.sqid, Kind: "instance", Status: "ready"},
+ {Host: control, Slug: "acme", App: "jelly", Account: w.sqid, Kind: "instance", Status: "ready"},
+ } {
+ if err := reg.Upsert(rt); err != nil {
+ t.Fatal(err)
+ }
+ if err := reg.SetProvisioned(rt.Host, true); err != nil {
+ t.Fatal(err)
+ }
}
if err := domains.ReconcileAliases(ctx, w.boxA, reg, time.Now, nil, nil); err != nil {
t.Fatal(err)
@@ -829,26 +830,19 @@ func TestFleetBoxCatchallYieldsToAnotherTenantsClaim(t *testing.T) {
if err != nil {
t.Fatal(err)
}
- derived := false
+ derived := map[string]string{}
for _, a := range aliases {
- if a.Alias == "beta."+parent {
- t.Fatalf("the box derived %+v over another tenant's claim", a)
- }
- derived = derived || (a.Alias == "acme."+parent && a.Host == control)
+ derived[a.Alias] = a.Host
}
- if !derived {
- t.Fatalf("aliases = %+v, want acme.%s derived for the unclaimed name", aliases, parent)
+ if derived["acme."+parent] != control || derived["beta."+parent] != instance {
+ t.Fatalf("aliases = %+v, want acme.%s and beta.%s both derived on the fleet box", aliases, parent, parent)
}
}
// TestFleetBoxListsOnlyClaimsItMayKnow (H5-M8), through the edge and the
// box's real store client: another account's claims, verified or pending,
-// are not in a fleet box's claim listing unless they sit on a name the
-// box's account could derive (here <label>.<parent> under its active
-// instance catch-all, for an instance it has), where the box must yield to
-// them (TestFleetBoxCatchallYieldsToAnotherTenantsClaim). A sibling with no
-// instance, a deeper name, or a name under a parent without a catch-all is
-// not listed, even with proof off.
+// are never in a fleet box's claim listing, even on the very name the box's
+// own instance catch-all derives; the account's own, pending included, are.
func TestFleetBoxListsOnlyClaimsItMayKnow(t *testing.T) {
w := newFleetDoorWorld(t)
ctx := context.Background()
@@ -863,19 +857,15 @@ func TestFleetBoxListsOnlyClaimsItMayKnow(t *testing.T) {
t.Fatal(err)
}
w.put(t, "apps/"+w.sqid+"/jelly/instances/beta."+w.sqid+".oncarlos.com.json", `{}`)
- attach(domains.Claim{Host: "solo.example.com", Account: w.sqid, App: "jelly"}, true)
attach(domains.Claim{Host: "soon.example.com", Account: w.sqid, App: "jelly"}, false)
- attach(domains.Claim{Host: "beta.teams.example.com", Account: w.other, App: "shop"}, false)
- attach(domains.Claim{Host: "launch.teams.example.com", Account: w.other, App: "shop"}, true)
+ attach(domains.Claim{Host: "beta.teams.example.com", Account: w.other, App: "shop"}, true)
+ attach(domains.Claim{Host: "launch.teams.example.com", Account: w.other, App: "shop"}, false)
attach(domains.Claim{Host: "a.beta.teams.example.com", Account: w.other, App: "shop"}, true)
- attach(domains.Claim{Host: "beta.solo.example.com", Account: w.other, App: "shop"}, true)
attach(domains.Claim{Host: "secret-launch.example.org", Account: w.other, App: "shop"}, false)
attach(domains.Claim{Host: "shop.example.org", Account: w.other, App: "shop"}, true)
want := []string{
domains.ClaimKey("*.teams.example.com"),
- domains.ClaimKey("beta.teams.example.com"),
- domains.ClaimKey("solo.example.com"),
domains.ClaimKey("soon.example.com"),
domains.ClaimKey("teams.example.com"),
}
diff --git a/internal/edge/hunt_H5-M8_test.go b/internal/edge/hunt_H5-M8_test.go
index e4cdf90a9..ed073eefd 100644
--- a/internal/edge/hunt_H5-M8_test.go
+++ b/internal/edge/hunt_H5-M8_test.go
@@ -8,8 +8,8 @@ package edge
//
// This asserts the secure behaviour: a foreign account's pending hostname is
// NOT listed to this fleet token. It failed before the H5-M8 fix, which
-// confirmed the leak; it passes now that the listing names another
-// account's claim only on a name this account's boxes could derive. (The claim BODY is already protected — serveClaim 404s it — which
+// confirmed the leak; it passes now that the listing names only this
+// account's own claims. (The claim BODY is already protected — serveClaim 404s it — which
// this test also checks, so only the name enumeration is the live gap. The
// code comment on serveClaimListing calls the whole listing deliberate:
// ReconcileAliases needs it. That design note is for the report, not a
diff --git a/internal/edge/storedoor.go b/internal/edge/storedoor.go
index 92887a7d0..5892ad2bd 100644
--- a/internal/edge/storedoor.go
+++ b/internal/edge/storedoor.go
@@ -97,10 +97,6 @@ type storeDoor struct {
// its credentials can never come from two different reads of the
// registry.
fleetAccount func(fleet string) (sqid string, ok bool)
- // appsDomain is the deployment's apps domain (the edge's
- // PLATFORM_APPS_DOMAIN, the same value a box's alias pass derives
- // account namespace names under). "" derives no namespace names.
- appsDomain string
getMu sync.Mutex
gets map[storeGETIdentity]int
@@ -108,9 +104,9 @@ type storeDoor struct {
getAccounts map[string]int
getDeadlineUnsupported sync.Once
- // claims folds the claim bodies serveClaimListing scopes by, once per
- // edge for every fleet (claimFold). The zero value is ready.
- claims claimFold
+ // claims folds the claim bodies serveClaimListing scopes by
+ // (claimOwnerCache). The zero value is ready.
+ claims claimOwnerCache
}
type storeGETIdentity struct {
@@ -637,8 +633,7 @@ func canonicalPrefix(raw string) (string, bool) {
//
// domains/ is NOT here, and is served by its own two paths instead
// (serveClaim, serveClaimListing): a box lists its own account's claimed
-// hostnames and other accounts' claims only on names its boxes could derive
-// (H5-M8), and reads only its own account's verified claims, with the person who made
+// hostnames and no other account's (H5-M8), and reads only its own account's verified claims, with the person who made
// each one stripped out (#215).
//
// The fleets/<fleet>/** line is not in F3's enumeration and is not a
@@ -665,9 +660,9 @@ func canonicalPrefix(raw string) (string, bool) {
// materializes a claim whose route is a local route of the claim's own
// account, and a fleet box's routes are all its own account's, so those are
// the only bodies the door serves (serveClaim). It also needs to know which
-// of the NAMES it could derive are claimed, whoever by, since a derived name
-// yields to any claim on it; the listing was whole for that reason until
-// H5-M8 scoped it to exactly those (serveClaimListing). Write stays
+// NAMES were claimed, whoever by, since a derived name yields to any claim
+// on it; the listing was whole for that reason until H5-M8 cut it to the
+// account's own claims (serveClaimListing says why that is safe). Write stays
// console-only: aclWrite never answers true for a domains/ key.
//
// A promotion record (settings spec §4.1, release.PromotionRecordKey) is
@@ -917,8 +912,8 @@ func aclListScope(sqid, fleet, prefix string) (string, bool) {
case prefix == "domains" || prefix == "domains/":
// #151: the OTHER shared scope. Claims are keyed by hostname, not
// tenant, so there is no subtree to narrow into: serveClaimListing
- // filters per claim instead (its own account's, and others' only on
- // names its boxes could derive, H5-M8), and serveClaim withholds every body but this
+ // filters per claim instead (its own account's only, H5-M8), and
+ // serveClaim withholds every body but this
// account's verified ones (#215). ReconcileAliases always
// lists the whole prefix; a narrower ask (e.g.
// "domains/x.example.json") is refused rather than widened, matching accounts/'s deliberate refusal of
@@ -997,16 +992,8 @@ func (d *storeDoor) serveClaim(w http.ResponseWriter, r *http.Request, sqid, key
w.Write(out)
}
-// serveClaimListing lists the claim KEYS under domains/ that this fleet's
-// account may know about (H5-M8), and no others:
-//
-// - every claim of its own account, pending or not, and
-// - another account's claim only when its NAME is one this account's boxes
-// could derive: <label>.<parent> for an instance of an app whose instance
-// catch-all over the account's own verified, non-regional parent is
-// active, or <prefix>.<name>.<apps> under one of its active account
-// namespaces for a <prefix>.<sqid>.<apps> host of its own
-// (visibleClaims, claimCandidates).
+// serveClaimListing lists the claim KEYS under domains/ that are this
+// fleet's own account's, pending ones included, and no others (H5-M8).
//
// The listing was once whole, on the reasoning that a hostname alone says
// no more than DNS. It said more: names that do not resolve yet, names
@@ -1015,43 +1002,40 @@ func (d *storeDoor) serveClaim(w http.ResponseWriter, r *http.Request, sqid, key
// anyone holding a fleet token, which any account that runs its own fleet
// does.
//
-// What a box needs from other accounts' names is exactly the second rule.
-// ReconcileAliases reads the listing for one decision: a name it would
-// DERIVE yields to a claim on that name, whoever holds it (aliases.go,
-// deriveInstanceAliases and deriveNamespaceAliases). That yield is the only
-// thing that keeps a derived name off another tenant's claim: the edge
-// resolves two exact alias rows for one name by dial order, not by which is
-// the claim (edgesfile.ResolveNameAuthority; only the "*.<parent>" star of
-// a Wildcard+Catchall claim loses to an exact name there). So the door must
-// list every other account's claim a box could derive over, and it derives
-// the candidates with the box's own functions so the two cannot drift.
+// It was whole for one reason: ReconcileAliases yields a name it would
+// DERIVE (an instance catch-all's <label>.<parent>, an account namespace's
+// <prefix>.<name>.<apps>) to a claim on that name, whoever holds it, and it
+// learns of claims from this listing. A fleet box now never sees another
+// account's claim, so it may derive such a name over it. That is safe
+// because of where a fleet box's rows can be served:
//
-// Nothing here depends on proof of DNS control. Domain proof is off by
-// default (CONSOLE_DOMAIN_PROOF), so "verified" means only "not pending",
-// and a parent claim proves nothing about who owns the names below it. The
-// rule is safe without proof because it discloses only collisions with
-// names the caller could derive anyway: what a caller can still learn is
-// whether a name it could derive is taken, one name per instance or app it
-// creates.
+// - Its rows never reach a platform edge. Edges files are a platform-box
+// job, skipped on a fleet box (internal/host edgesFileLoop,
+// shouldSkipPublisherElection: CARLOS_FLEET set), and a fleet token
+// cannot write control/edges/ anyway (aclWrite). A platform edge serves
+// its own registry and the edges files under control/edges/ (Reload's
+// alias fold; homeMap's edgesPrefix), so nothing a fleet box derives is
+// among them.
+// - The platform edge sends a request to a fleet only for a name a
+// platform box's rows route there (FleetArmVerdict over its registry),
+// and a platform box's alias pass reads every claim straight from the
+// bucket (internal/host aliasPassReporting over the deploy store), so
+// those rows still yield.
+// - So a fleet box serves a name it derived over another account's claim
+// only to traffic that name's DNS sends to the fleet's own ingress, and
+// whoever controls that DNS already decides where the name goes.
//
-// A body that fails to read is judged by what it last said; one never read
-// is listed if its name is a candidate and otherwise fails the listing
-// (502), since it could be this account's own. Bodies are folded once per
-// edge for every caller (claimFold), so the steady state is one listing and
-// no GETs, plus one listing of instance or app records per listing that
-// finds another account's claim where a collision is possible. Child
-// directories: none, claims are flat.
+// A body that does not read is judged by what it last said (ownClaims):
+// another account's is left out, and one that was this account's, or was
+// never read, fails the listing (502) so the box's pass changes nothing.
+// Bodies are folded through d.claims, so the steady state is one listing
+// and no GETs. Child directories: none, claims are flat.
func (d *storeDoor) serveClaimListing(w http.ResponseWriter, r *http.Request, sqid string, dirs bool) {
out := []string{}
if !dirs {
- entries, err := d.claims.snapshot(r.Context(), d.store)
- if errors.Is(err, errClaimFoldBusy) {
- log.Printf("edge: store door: list %s: %v", domains.ClaimsPrefix, err)
- http.Error(w, "store busy", http.StatusServiceUnavailable)
- return
- }
+ entries, err := d.claims.fold(r.Context(), d.store)
if err == nil {
- out, err = d.visibleClaims(r.Context(), sqid, entries)
+ out, err = ownClaims(sqid, entries)
}
if err != nil {
d.storeFailed(w, r, "list", domains.ClaimsPrefix, err)
diff --git a/internal/edge/storedoor_claims.go b/internal/edge/storedoor_claims.go
index fe2169f56..6adb7962b 100644
--- a/internal/edge/storedoor_claims.go
+++ b/internal/edge/storedoor_claims.go
@@ -15,164 +15,93 @@ import (
"github.com/carlosframework/platform/internal/release"
)
-// claimTenancy is what serveClaimListing needs from one claim body.
-//
-// account and pending are read from the body as a generic JSON object, the
-// way serveClaim reads it, not through domains.Claim: a claim of a schema
-// newer than this edge still has an account, and refusing to judge it would
-// drop the account's own claim from its own listing during a roll. A body
-// that does not decode has no account: it is nobody's own.
-//
-// claim is the body as a box's alias pass reads it (domains.DecodeClaim),
-// nil when that refuses it. The door judges an account's catch-alls and
-// namespaces from it, so it decides from exactly the claims the account's
-// boxes would.
-type claimTenancy struct {
- key string
- account string
- pending bool
- claim *domains.Claim
-}
-
-func decodeClaimTenancy(key string, body []byte) claimTenancy {
- t := claimTenancy{key: key}
+// claimOwner is the account one claim body names, read as a generic JSON
+// object the way serveClaim reads it, not through domains.Claim: a claim of
+// a schema newer than this edge still has an account, and refusing to judge
+// it would drop the account's own claim from its own listing during a roll.
+// A body that does not decode has no account: it is nobody's own.
+func claimOwner(body []byte) string {
var obj map[string]json.RawMessage
if json.Unmarshal(body, &obj) != nil {
- return t
+ return ""
}
- _ = json.Unmarshal(obj["account"], &t.account)
- _ = json.Unmarshal(obj["pending"], &t.pending)
- if c, err := domains.DecodeClaim(body); err == nil {
- t.claim = &c
- }
- return t
+ var account string
+ _ = json.Unmarshal(obj["account"], &account)
+ return account
}
-// cachedTenancy is one claim key as the last fold left it.
+// cachedClaim is one claim key as the last fold left it.
//
-// - read: t is from a successful read, this fold's or an earlier one's.
-// - unread: this fold could not read the body (a store error, not a
-// not-found). With read, t is what the claim said when it last read; a
-// key never read has read false and only its key.
+// - read: account is from a successful read, this fold's or an earlier
+// one's. A key never read has read false.
+// - unread: the latest fold could not read the body (a store error, not a
+// not-found); account, if read, is what it said when it last read.
// - mod and settled: the stamp the body was read at, and whether that
-// stamp is old enough to trust as unchanged (the settle bound below).
-// An entry is reused without a GET only when it is read, not unread,
+// stamp is old enough to trust as unchanged (claimOwnerSettle). An
+// entry is reused without a GET only when it is read, not unread,
// settled, and its stamp is the listing's.
-type cachedTenancy struct {
+type cachedClaim struct {
mod time.Time
settled bool
read bool
unread bool
- t claimTenancy
+ account string
}
-// claimTenancySettle is domains.ClaimCache's modSettle: S3 stamps have
+// claimOwnerSettle is domains.ClaimCache's modSettle: S3 stamps have
// one-second granularity, so a claim rewritten within the second it was read
// is not trusted as unchanged.
-const claimTenancySettle = 2 * time.Second
-
-// claimFoldTimeout bounds one fold. The fold is detached from any request,
-// so this is the only thing that stops a fold stuck on a slow store.
-const claimFoldTimeout = 5 * time.Minute
-
-// claimFoldWaiters bounds the requests waiting on the edge's fold at once:
-// past it a listing is refused (503) rather than queued. A var only so a
-// test can lower it.
-var claimFoldWaiters = 256
-
-var errClaimFoldBusy = errors.New("claim fold: too many listings waiting")
-
-// claimFold is the edge's one fold of the deployment's claim bodies down to
-// their tenancy, shared by every fleet box's claim listing (H5-M8).
+const claimOwnerSettle = 2 * time.Second
+
+// claimOwnerCache folds the deployment's claim bodies down to their owning
+// account, so serveClaimListing can name a fleet's own claims and no
+// others (H5-M8). Without it every fleet box's alias pass, every few
+// seconds, would cost the edge a GET per claim in the deployment. With it
+// the steady state is one listing and no GETs: a body is read again only
+// when its stamp moves (domains.ClaimCache's rules: reuse only on an equal,
+// settled stamp; the map is replaced whole each fold, which evicts a
+// detached claim). A store that cannot answer ListMod (test fakes) is
+// folded uncached.
//
-// - One fold at a time: a listing that arrives while a fold runs waits for
-// that fold rather than starting its own, so concurrent listings cost
-// one bucket listing and one GET per changed claim between them. The
-// answer is then at most one fold older than the request, the same race
-// any listing has with a claim written while it runs.
-// - Detached: the fold runs under its own deadline (claimFoldTimeout), not
-// a request's, so a box that gives up waiting does not throw away the
-// reads made for it.
-// - Resumable: whatever a fold read is published even when it fails or is
-// cut off (foldClaims), so the next fold reads only the rest.
-// - Bounded: at most claimFoldWaiters requests wait at once.
+// Whatever a fold read is published even when it fails or its request goes
+// away (foldClaims), so a cold edge with more claims than one request can
+// read in time still converges: the next fold reads only the rest.
//
-// The steady state is one listing and no GETs: a body is read again only
-// when its stamp moves (the rules of domains.ClaimCache: an entry is reused
-// only on an equal, settled stamp, and the map is replaced whole each fold,
-// which evicts a detached claim). The map is never mutated once published,
-// so callers read it without the lock.
-type claimFold struct {
- mu sync.Mutex
- entries map[string]cachedTenancy
- inflight *claimFoldRun
- waiting int
+// The map is never mutated once published, so a fold reads the previous one
+// without holding mu across its store calls; two concurrent folds may both
+// read a changed claim, and the later one's map wins.
+type claimOwnerCache struct {
+ mu sync.Mutex
+ entries map[string]cachedClaim
}
-type claimFoldRun struct {
- done chan struct{}
- entries map[string]cachedTenancy
- err error
-}
-
-// snapshot returns the entries of a fold that was running or started when
-// it was called: the running one if there is one, otherwise a new one. ctx
-// bounds only this caller's wait.
-func (f *claimFold) snapshot(ctx context.Context, s release.Store) (map[string]cachedTenancy, error) {
- f.mu.Lock()
- if f.waiting >= claimFoldWaiters {
- f.mu.Unlock()
- return nil, errClaimFoldBusy
- }
- run := f.inflight
- if run == nil {
- run = &claimFoldRun{done: make(chan struct{})}
- f.inflight = run
- prev := f.entries
- go func() {
- fctx, cancel := context.WithTimeout(context.Background(), claimFoldTimeout)
- defer cancel()
- entries, err := foldClaims(fctx, s, prev)
- f.mu.Lock()
- if entries != nil {
- f.entries = entries
- }
- f.inflight = nil
- f.mu.Unlock()
- run.entries, run.err = entries, err
- close(run.done)
- }()
- }
- f.waiting++
- f.mu.Unlock()
- defer func() {
- f.mu.Lock()
- f.waiting--
- f.mu.Unlock()
- }()
- select {
- case <-run.done:
- if run.err != nil {
- return nil, run.err
- }
- return run.entries, nil
- case <-ctx.Done():
- return nil, ctx.Err()
- }
+// fold runs foldClaims over the published entries and publishes what it
+// read, whether or not it finished.
+func (c *claimOwnerCache) fold(ctx context.Context, s release.Store) (map[string]cachedClaim, error) {
+ c.mu.Lock()
+ prev := c.entries
+ c.mu.Unlock()
+ entries, err := foldClaims(ctx, s, prev)
+ if entries != nil {
+ c.mu.Lock()
+ c.entries = entries
+ c.mu.Unlock()
+ }
+ return entries, err
}
// foldClaims lists the claims and reads every body prev cannot vouch for.
// A claim gone between the listing and its read is left out (detached); a
// body that fails to read is kept as unread, with what an earlier read said
// of it, and the fold goes on: whether it matters is the caller's question
-// (visibleClaims), not every caller's failure.
+// (ownClaims).
//
// When ctx ends part way, the fold stops reading and returns ctx's error
// together with the entries it has: every body it read, and prev's entry
// for each listed key it did not reach (re-read next fold, since its stamp
// moved or it would have been reused). A failed listing returns nil entries,
// and the caller keeps prev.
-func foldClaims(ctx context.Context, s release.Store, prev map[string]cachedTenancy) (map[string]cachedTenancy, error) {
+func foldClaims(ctx context.Context, s release.Store, prev map[string]cachedClaim) (map[string]cachedClaim, error) {
var listed []release.KeyMod
lister, cacheable := s.(release.ModLister)
if cacheable {
@@ -182,7 +111,6 @@ func foldClaims(ctx context.Context, s release.Store, prev map[string]cachedTena
}
listed = got
} else {
- // A store that cannot answer ListMod (test fakes) is folded uncached.
keys, err := s.List(ctx, domains.ClaimsPrefix)
if err != nil {
return nil, err
@@ -192,7 +120,7 @@ func foldClaims(ctx context.Context, s release.Store, prev map[string]cachedTena
}
}
now := time.Now()
- next := make(map[string]cachedTenancy, len(listed))
+ next := make(map[string]cachedClaim, len(listed))
var stopped error
for _, km := range listed {
if _, ok := canonicalKey(km.Key); !ok || !strings.HasSuffix(km.Key, ".json") {
@@ -223,192 +151,43 @@ func foldClaims(ctx context.Context, s release.Store, prev map[string]cachedTena
}
case err != nil:
old.unread = true
- old.t.key = km.Key
next[km.Key] = old
default:
- next[km.Key] = cachedTenancy{
- mod: km.Mod, settled: cacheable && now.Sub(km.Mod) >= claimTenancySettle,
- read: true, t: decodeClaimTenancy(km.Key, body),
+ next[km.Key] = cachedClaim{
+ mod: km.Mod, settled: cacheable && now.Sub(km.Mod) >= claimOwnerSettle,
+ read: true, account: claimOwner(body),
}
}
}
return next, stopped
}
-// errClaimUnjudged is a claim body the door has never read, on a name that
-// is not one of the caller's candidates: it could be the caller's own, so a
-// listing without it could make the box drop that claim's rows, and one with
-// it could show the box another account's name.
-var errClaimUnjudged = errors.New("a claim the door has never read could be this account's")
-
-// visibleClaims is serveClaimListing's rule over a fold, sorted:
-//
-// - every claim of sqid's own (pending included; an unreadable one by what
-// it last said), and
-// - another account's claim (or one whose body does not decode) only when
-// its name is a candidate: a name one of sqid's boxes could derive
-// (claimCandidates).
-//
-// A body the door has never read is listed when its name is a candidate,
-// and otherwise fails the listing (errClaimUnjudged). One the door read
-// before and now cannot is judged by what it last said, so another
-// account's unreadable claim on a name sqid cannot derive does not fail
-// sqid's listing.
-func (d *storeDoor) visibleClaims(ctx context.Context, sqid string, entries map[string]cachedTenancy) ([]string, error) {
+// errClaimUnjudged is a claim body the door cannot read now and that could
+// be this account's: never read, or this account's when it last read. A
+// listing without it could make the box drop that claim's rows; one with it
+// could name a claim that has since passed to another account. The box's
+// pass fails and changes nothing instead, and only for the accounts it
+// could belong to.
+var errClaimUnjudged = errors.New("a claim that could be this account's cannot be read")
+
+// ownClaims is serveClaimListing's rule over a fold, sorted: every claim
+// whose body names sqid, pending ones included, and nothing else. A body
+// that does not read is judged by what it last said: another account's is
+// left out, and one that was sqid's, or was never read, fails the listing
+// (errClaimUnjudged).
+func ownClaims(sqid string, entries map[string]cachedClaim) ([]string, error) {
out := []string{}
if sqid == "" {
return out, nil
}
- var own []domains.Claim
- var others []cachedTenancy
- for _, e := range entries {
- if e.read && e.t.account == sqid {
- out = append(out, e.t.key)
- if e.t.claim != nil {
- own = append(own, *e.t.claim)
- }
- continue
- }
- others = append(others, e)
- }
- if len(others) > 0 {
- cands := d.claimCandidates(sqid, own)
- for _, e := range others {
- host := claimKeyHost(e.t.key)
- hit, err := cands.has(ctx, d.store, host)
- if err != nil {
- return nil, err
- }
- switch {
- case hit:
- out = append(out, e.t.key)
- case !e.read:
- return nil, fmt.Errorf("%s: %w", e.t.key, errClaimUnjudged)
- }
+ for key, e := range entries {
+ switch {
+ case e.unread && (!e.read || e.account == sqid):
+ return nil, fmt.Errorf("%s: %w", key, errClaimUnjudged)
+ case e.read && !e.unread && e.account == sqid:
+ out = append(out, key)
}
}
sort.Strings(out)
return out, nil
}
-
-// claimCandidates is the names sqid's boxes could derive, from its own
-// claims, asked one host at a time and read lazily: the store reads behind
-// a question are made only when a host sits where a derived name can
-// (exactly one label under an active catch-all's parent, or under an
-// active namespace), and once per listing. In the common case, nobody
-// else's claim there, a listing reads nothing more than the fold.
-//
-// The derivations are the box's own (domains.InstanceCatchallParent,
-// InstanceAliasName, AccountNamespaces, NamespaceDerivedName,
-// NamespaceTwinHosts), over the inputs the box derives from, or a superset
-// of them: every instance record of the catch-all's app, where a box uses
-// the instance routes it holds; every host a box of the account could hold
-// under its own label, for a namespace.
-type claimCandidates struct {
- sqid, appsDomain string
- catchalls map[string]string // parent -> the catch-all's app
- namespaces []string // the account's active namespace names
- instanceNames map[string]map[string]bool
- namespaceNames map[string]bool
-}
-
-func (d *storeDoor) claimCandidates(sqid string, own []domains.Claim) *claimCandidates {
- c := &claimCandidates{sqid: sqid, appsDomain: d.appsDomain, catchalls: map[string]string{}, instanceNames: map[string]map[string]bool{}}
- claimed := make(map[string]domains.Claim, len(own))
- for _, cl := range own {
- claimed[cl.Host] = cl
- }
- for _, cl := range own {
- if parent, _ := domains.InstanceCatchallParent(cl, claimed); parent != "" {
- c.catchalls[parent] = cl.App
- }
- }
- if d.appsDomain != "" {
- byName, _ := domains.AccountNamespaces(own, d.appsDomain)
- for name, holder := range byName {
- if holder == sqid {
- c.namespaces = append(c.namespaces, name)
- }
- }
- sort.Strings(c.namespaces)
- }
- return c
-}
-
-// has reports whether host is a name one of the account's boxes could
-// derive. A failed read is an error: the door cannot say.
-func (c *claimCandidates) has(ctx context.Context, s release.Store, host string) (bool, error) {
- if label, parent, ok := strings.Cut(host, "."); ok && label != "" {
- if app, active := c.catchalls[parent]; active {
- names, err := c.instanceAliasNames(ctx, s, parent, app)
- if err != nil {
- return false, err
- }
- if names[host] {
- return true, nil
- }
- }
- }
- for _, name := range c.namespaces {
- if !strings.HasSuffix(host, "."+name+"."+c.appsDomain) {
- continue
- }
- names, err := c.namespaceAliasNames(ctx, s)
- if err != nil {
- return false, err
- }
- return names[host], nil
- }
- return false, nil
-}
-
-// instanceAliasNames is every <label>.<parent> the catch-all over parent
-// could derive: one per instance record of its app (domains.InstanceHosts),
-// whichever box serves it.
-func (c *claimCandidates) instanceAliasNames(ctx context.Context, s release.Store, parent, app string) (map[string]bool, error) {
- if names, ok := c.instanceNames[parent]; ok {
- return names, nil
- }
- hosts, err := domains.InstanceHosts(ctx, s, c.sqid, app)
- if err != nil {
- return nil, fmt.Errorf("list %s/%s instances: %w", c.sqid, app, err)
- }
- names := map[string]bool{}
- for _, h := range hosts {
- label, _, _ := strings.Cut(h, ".")
- if name, ok := domains.InstanceAliasName(label, parent); ok {
- names[name] = true
- }
- }
- c.instanceNames[parent] = names
- return names, nil
-}
-
-// namespaceAliasNames is every name the account's active namespaces could
-// derive: NamespaceDerivedName of every host a box of the account could
-// hold under its own label (domains.NamespaceTwinHosts, from one listing of
-// the account's prefix).
-func (c *claimCandidates) namespaceAliasNames(ctx context.Context, s release.Store) (map[string]bool, error) {
- if c.namespaceNames != nil {
- return c.namespaceNames, nil
- }
- keys, err := s.List(ctx, "apps/"+c.sqid+"/")
- if err != nil {
- return nil, fmt.Errorf("list %s's apps: %w", c.sqid, err)
- }
- names := map[string]bool{}
- for _, twin := range domains.NamespaceTwinHosts(keys, c.sqid, c.appsDomain) {
- for _, name := range c.namespaces {
- if derived, ok := domains.NamespaceDerivedName(twin, c.sqid, name, c.appsDomain); ok {
- names[derived] = true
- }
- }
- }
- c.namespaceNames = names
- return names, nil
-}
-
-// claimKeyHost is the hostname a claim key names (domains.ClaimKey's inverse).
-func claimKeyHost(key string) string {
- return strings.TrimSuffix(strings.TrimPrefix(key, domains.ClaimsPrefix), ".json")
-}
diff --git a/internal/edge/storedoor_claims_test.go b/internal/edge/storedoor_claims_test.go
index 4455e4441..9da77a817 100644
--- a/internal/edge/storedoor_claims_test.go
+++ b/internal/edge/storedoor_claims_test.go
@@ -4,9 +4,7 @@ import (
"context"
"encoding/json"
"errors"
- "fmt"
"net/http"
- "runtime"
"strings"
"sync"
"testing"
@@ -57,125 +55,89 @@ func putInstanceRecord(t *testing.T, s release.Store, account, app, host string)
}
}
-// TestStoreDoorClaimListingNamesOnlyCollisions (H5-M8, option C): a fleet
-// token lists its own account's claims, and another account's claim only
-// when its name is one this account's boxes could derive: here
-// <label>.<parent> for an instance of an app with an active catch-all over
-// the account's own verified, non-pending parent. Not a sibling the app has
-// no instance at, not a deeper name, nothing under a parent with no
-// catch-all, a pending parent, or anything else of another account's.
-func TestStoreDoorClaimListingNamesOnlyCollisions(t *testing.T) {
+// TestStoreDoorClaimListingIsOwnOnly (H5-M8): a fleet token lists its own
+// account's claims, pending ones included, and never another account's,
+// pending or not, wherever it sits: one label under the account's own
+// instance catch-all parent (at an instance's label or not), under its
+// account namespace at any depth (at a host of its own or not), deeper, or
+// anywhere else. A body that does not decode is nobody's; one of a newer
+// schema still carries its account.
+func TestStoreDoorClaimListingIsOwnOnly(t *testing.T) {
d, store := newTestDoor(t)
+ d.fleetAccount = func(string) (string, bool) { return "bdq", true }
mine := func(host string, pending bool) domains.Claim {
- return domains.Claim{Host: host, Account: testSqid, App: "web", Pending: pending}
+ return domains.Claim{Host: host, Account: "bdq", App: "web", Pending: pending}
}
theirs := func(host string, pending bool) domains.Claim {
- return domains.Claim{Host: host, Account: "zz99", App: "shop", Pending: pending}
+ return domains.Claim{Host: host, Account: "bcd", App: "shop", Pending: pending}
}
- // An active catch-all, and two instances of its app.
+ // An active instance catch-all, with instances at beta and acme.
putClaimAs(t, store, mine("teams.example.com", false))
- putClaimAs(t, store, domains.Claim{Host: "*.teams.example.com", Account: testSqid, App: "web", Instances: true})
- putInstanceRecord(t, store, testSqid, "web", "beta."+testSqid+"."+claimTestApps)
- putInstanceRecord(t, store, testSqid, "web", "acme."+testSqid+"."+claimTestApps)
- // A verified parent with no catch-all, written with proof off.
- putClaimAs(t, store, mine("solo.example.net", false))
- // A catch-all over a pending parent derives nothing.
+ putClaimAs(t, store, domains.Claim{Host: "*.teams.example.com", Account: "bdq", App: "web", Instances: true})
+ putInstanceRecord(t, store, "bdq", "web", "beta.bdq."+claimTestApps)
+ putInstanceRecord(t, store, "bdq", "web", "acme.bdq."+claimTestApps)
+ // An active account namespace, with an instance and a canary host.
+ if _, created, err := domains.AttachAccountNamespace(context.Background(), store, "harbour", claimTestApps, "bdq", "2026-11-11T00:00:00Z", "ops@example.com"); err != nil || !created {
+ t.Fatalf("hold: %v %v", created, err)
+ }
+ putInstanceRecord(t, store, "bdq", "shop", "team.bdq."+claimTestApps)
+ if _, err := store.Put(context.Background(), release.AppPrefix("bdq", "shop")+"channels/canary/c1.json", []byte(`{}`), ""); err != nil {
+ t.Fatal(err)
+ }
putClaimAs(t, store, mine("pend.example.net", true))
- putClaimAs(t, store, domains.Claim{Host: "*.pend.example.net", Account: testSqid, App: "web", Instances: true})
+ putRawClaim(t, store, "future.example.io", `{"schema":99,"host":"future.example.io","account":"bdq"}`)
- putClaimAs(t, store, theirs("beta.teams.example.com", false)) // collision
- putClaimAs(t, store, theirs("acme.teams.example.com", true)) // collision, pending
- putClaimAs(t, store, theirs("launch.teams.example.com", true)) // sibling, no instance
- putClaimAs(t, store, theirs("a.beta.teams.example.com", false)) // deeper
- putClaimAs(t, store, theirs("beta.solo.example.net", false)) // parent has no catch-all
- putClaimAs(t, store, theirs("beta.pend.example.net", false)) // pending parent
+ putClaimAs(t, store, theirs("beta.teams.example.com", false))
+ putClaimAs(t, store, theirs("acme.teams.example.com", true))
+ putClaimAs(t, store, theirs("launch.teams.example.com", true))
+ putClaimAs(t, store, theirs("a.beta.teams.example.com", false))
+ putClaimAs(t, store, theirs("team.harbour."+claimTestApps, false))
+ putClaimAs(t, store, theirs("shop.harbour."+claimTestApps, true))
+ putClaimAs(t, store, theirs("c1.shop.harbour."+claimTestApps, false))
+ putClaimAs(t, store, theirs("x.team.harbour."+claimTestApps, false))
+ putClaimAs(t, store, theirs("x.pend.example.net", false))
putClaimAs(t, store, theirs("theirs.example.org", false))
putClaimAs(t, store, theirs("secret.example.org", true))
- putClaimAs(t, store, domains.Claim{Host: "*.theirs.example.org", Account: "zz99", App: "shop", Instances: true})
- // A body that does not decode is nobody's: listed only on a candidate.
+ putClaimAs(t, store, domains.Claim{Host: "*.theirs.example.org", Account: "bcd", App: "shop", Instances: true})
putRawClaim(t, store, "junk.teams.example.com", "not json")
- // One of a newer schema still carries its account.
- putRawClaim(t, store, "future.example.io", `{"schema":99,"host":"future.example.io","account":"`+testSqid+`"}`)
got := strings.Join(listedClaims(t, d), "\n")
want := strings.Join([]string{
- domains.ClaimKey("*.pend.example.net"),
+ domains.ClaimKey(domains.NamespaceHost("harbour", claimTestApps)),
domains.ClaimKey("*.teams.example.com"),
- domains.ClaimKey("acme.teams.example.com"),
- domains.ClaimKey("beta.teams.example.com"),
domains.ClaimKey("future.example.io"),
domains.ClaimKey("pend.example.net"),
- domains.ClaimKey("solo.example.net"),
domains.ClaimKey("teams.example.com"),
}, "\n")
if got != want {
t.Fatalf("listing:\n%s\nwant:\n%s", got, want)
}
- // Another account's fleet on the same edge sees none of it.
+ // The other account's fleet sees its own claims, and none of these.
other, _ := newTestDoor(t)
other.store = store
- other.fleetAccount = func(string) (string, bool) { return "qq77", true }
- if keys := listedClaims(t, other); len(keys) != 0 {
- t.Fatalf("an account with no claims lists %v, want nothing", keys)
- }
-}
-
-// TestStoreDoorClaimListingNamespaceCollisions (H5-M8, option C): under an
-// account's ACTIVE namespace, another account's claim is listed only when
-// it is <prefix>.<name>.<apps> for one of the account's own
-// <prefix>.<sqid>.<apps> hosts, at any prefix depth (an instance record, an
-// app's platform domain, a canary channel's host). A retired namespace
-// derives nothing, so nothing under it is listed.
-func TestStoreDoorClaimListingNamespaceCollisions(t *testing.T) {
- d, store := newTestDoor(t)
- d.appsDomain = claimTestApps
- d.fleetAccount = func(string) (string, bool) { return "bdq", true }
- if _, created, err := domains.AttachAccountNamespace(context.Background(), store, "harbour", claimTestApps, "bdq", "2026-11-11T00:00:00Z", "ops@example.com"); err != nil || !created {
- t.Fatalf("hold: %v %v", created, err)
- }
- putClaimAs(t, store, domains.Claim{Host: domains.NamespaceHost("cove", claimTestApps), Account: "bdq", AccountNamespace: true, RetiredAt: "2026-11-12T00:00:00Z"})
- putInstanceRecord(t, store, "bdq", "shop", "team.bdq."+claimTestApps)
- if _, err := store.Put(context.Background(), release.AppPrefix("bdq", "shop")+"channels/canary/c1.json", []byte(`{}`), ""); err != nil {
- t.Fatal(err)
+ other.fleetAccount = func(string) (string, bool) { return "bcd", true }
+ for _, k := range listedClaims(t, other) {
+ if strings.Contains(k, "bdq") || k == domains.ClaimKey("teams.example.com") || k == domains.ClaimKey("pend.example.net") {
+ t.Fatalf("bcd's listing names bdq's claim %s", k)
+ }
}
- theirs := func(host string) {
- putClaimAs(t, store, domains.Claim{Host: host, Account: "bcd", App: "web"})
- }
- theirs("team.harbour." + claimTestApps) // an instance's name
- theirs("shop.harbour." + claimTestApps) // the app's platform domain
- theirs("c1.shop.harbour." + claimTestApps) // a canary host: prefix depth 2
- theirs("other.harbour." + claimTestApps) // no such host of bdq's
- theirs("x.team.harbour." + claimTestApps) // deeper than any host of bdq's
- theirs("team.cove." + claimTestApps) // under the retired name
-
- got := strings.Join(listedClaims(t, d), "\n")
- want := strings.Join([]string{
- domains.ClaimKey(domains.NamespaceHost("cove", claimTestApps)),
- domains.ClaimKey(domains.NamespaceHost("harbour", claimTestApps)),
- domains.ClaimKey("c1.shop.harbour." + claimTestApps),
- domains.ClaimKey("shop.harbour." + claimTestApps),
- domains.ClaimKey("team.harbour." + claimTestApps),
- }, "\n")
- if got != want {
- t.Fatalf("listing:\n%s\nwant:\n%s", got, want)
+ if keys := listedClaims(t, other); len(keys) != 12 {
+ t.Fatalf("bcd's listing = %v, want its own 12 claims", keys)
}
}
// claimReadCounter is a ModLister over a DirStore whose stamps are fixed in
// the past (so the settle bound never applies) and moved by hand, counting
-// the claim listings and GETs that reach it and failing the GETs a test asks
-// it to. onGet, when set, runs after each claim GET is counted; gate, when
-// set, holds every listing until it is closed.
+// the claim GETs that reach it and failing the ones a test asks it to.
+// onGet, when set, runs after each claim GET is counted.
type claimReadCounter struct {
*release.DirStore
- mu sync.Mutex
- mods map[string]time.Time
- gets int
- listings int
- fails map[string]bool
- onGet func(n int)
- gate chan struct{}
+ mu sync.Mutex
+ mods map[string]time.Time
+ gets int
+ fails map[string]bool
+ onGet func(n int)
}
func newClaimReadCounter(dir *release.DirStore) *claimReadCounter {
@@ -183,13 +145,6 @@ func newClaimReadCounter(dir *release.DirStore) *claimReadCounter {
}
func (c *claimReadCounter) ListMod(ctx context.Context, prefix string) ([]release.KeyMod, error) {
- c.mu.Lock()
- gate := c.gate
- c.listings++
- c.mu.Unlock()
- if gate != nil {
- <-gate
- }
keys, err := c.DirStore.List(ctx, prefix)
if err != nil {
return nil, err
@@ -239,74 +194,70 @@ func (c *claimReadCounter) setFail(key string, fail bool) {
c.fails[key] = fail
}
-func (c *claimReadCounter) counts() (listings, gets int) {
+func (c *claimReadCounter) claimGets() int {
c.mu.Lock()
defer c.mu.Unlock()
- return c.listings, c.gets
+ return c.gets
}
// TestStoreDoorClaimListingCostAndFailure: the listing costs the edge what
// the box's own claim cache costs (one listing, and a GET only for a claim
-// whose stamp moved). A claim body the door cannot read fails the listing
-// only for a caller it could matter to: one whose candidate names include
-// it (then it is listed, never dropped) or one it could belong to (never
-// read, so its owner is unknown). Another account's claim the door has read
-// before, on a name this caller cannot derive, does not 502 it.
+// whose stamp moved). A body the door cannot read fails the listing only for
+// an account it could belong to: this account's when it last read, or never
+// read at all. Another account's, read before, is left out and fails no one.
func TestStoreDoorClaimListingCostAndFailure(t *testing.T) {
d, dir := newTestDoor(t)
store := newClaimReadCounter(dir)
d.store = store
- putClaimAs(t, dir, domains.Claim{Host: "teams.example.com", Account: testSqid, App: "web"})
- putClaimAs(t, dir, domains.Claim{Host: "*.teams.example.com", Account: testSqid, App: "web", Instances: true})
- putInstanceRecord(t, dir, testSqid, "web", "beta."+testSqid+"."+claimTestApps)
- putClaimAs(t, dir, domains.Claim{Host: "beta.teams.example.com", Account: "zz99", App: "shop"})
+ putClaimAs(t, dir, domains.Claim{Host: "own.example.com", Account: testSqid, App: "web"})
putClaimAs(t, dir, domains.Claim{Host: "theirs.example.org", Account: "zz99", App: "shop"})
- want := strings.Join([]string{
- domains.ClaimKey("*.teams.example.com"),
- domains.ClaimKey("beta.teams.example.com"),
- domains.ClaimKey("teams.example.com"),
- }, " ")
- list := func(what string, wantGets int) {
+ want := domains.ClaimKey("own.example.com")
+ list := func(what string) {
+ t.Helper()
+ if got := strings.Join(listedClaims(t, d), " "); got != want {
+ t.Fatalf("%s = %v, want %v", what, got, want)
+ }
+ }
+ fails := func(what string) {
t.Helper()
- got := strings.Join(listedClaims(t, d), " ")
- if _, gets := store.counts(); got != want || gets != wantGets {
- t.Fatalf("%s = %v after %d GETs, want %v after %d", what, got, gets, want, wantGets)
+ if w := doorDo(d, "GET", "/store/list?prefix=domains/", "", nil); w.Code != http.StatusBadGateway || strings.Contains(w.Body.String(), "domains/") {
+ t.Fatalf("%s = %d %q, want the door's 502 store error", what, w.Code, w.Body.String())
}
}
- list("first listing", 4)
- list("steady listing", 4)
+ list("first listing")
+ list("steady listing")
+ if n := store.claimGets(); n != 2 {
+ t.Fatalf("two listings cost %d claim GETs, want 2 (the first fold's)", n)
+ }
- // Another account's claim on a name this account cannot derive goes
- // unreadable: the listing is unchanged, not a 502.
+ // Another account's claim goes unreadable: left out, not a 502.
theirs := domains.ClaimKey("theirs.example.org")
store.setFail(theirs, true)
store.touch(theirs)
- list("listing with an unreadable non-candidate claim", 5)
+ list("listing with another account's unreadable claim")
- // The candidate's own body goes unreadable: still listed.
- candidate := domains.ClaimKey("beta.teams.example.com")
- store.setFail(candidate, true)
- store.touch(candidate)
- list("listing with an unreadable candidate claim", 7) // theirs is re-read too: unreadable is never cached
+ // This account's own goes unreadable: the listing fails.
+ own := domains.ClaimKey("own.example.com")
+ store.setFail(own, true)
+ store.touch(own)
+ fails("listing with this account's unreadable claim")
+ store.setFail(own, false)
+ list("listing once it reads")
- // A claim never read could be this account's own: the listing fails.
+ // A claim never read could be this account's: the listing fails.
fresh := domains.ClaimKey("fresh.example.org")
putClaimAs(t, dir, domains.Claim{Host: "fresh.example.org", Account: "zz99", App: "shop"})
store.setFail(fresh, true)
- if w := doorDo(d, "GET", "/store/list?prefix=domains/", "", nil); w.Code != http.StatusBadGateway || strings.Contains(w.Body.String(), "domains/") {
- t.Fatalf("listing with a never-read unreadable claim = %d %q, want the door's 502 store error", w.Code, w.Body.String())
- }
- // Once it reads, the listing is back; an unread body is never reused,
- // so each listing so far read all three unreadable ones again (7+3+3).
+ fails("listing with a never-read unreadable claim")
store.setFail(fresh, false)
- list("listing once it reads", 13)
+ list("listing once that reads")
}
// TestClaimFoldKeepsProgressWhenCancelled: a fold cut off part way (its
-// deadline, or the edge shutting down) still publishes every body it read,
-// so the next fold reads only the rest. Without it a cold edge with more
-// claims than one fold can read in time never converges.
+// request gone) still publishes every body it read, so the next fold reads
+// only the rest. Without it a cold edge with more claims than one request
+// can read in time never converges.
func TestClaimFoldKeepsProgressWhenCancelled(t *testing.T) {
_, dir := newTestDoor(t)
store := newClaimReadCounter(dir)
@@ -320,7 +271,8 @@ func TestClaimFoldKeepsProgressWhenCancelled(t *testing.T) {
cancel()
}
}
- entries, err := foldClaims(ctx, store, nil)
+ var cache claimOwnerCache
+ entries, err := cache.fold(ctx, store)
if !errors.Is(err, context.Canceled) {
t.Fatalf("cancelled fold: err = %v, want context.Canceled", err)
}
@@ -334,88 +286,8 @@ func TestClaimFoldKeepsProgressWhenCancelled(t *testing.T) {
t.Fatalf("cancelled fold published %d read entries (%v), want the 2 it read", read, entries)
}
store.onGet = nil
- entries, err = foldClaims(context.Background(), store, entries)
- if _, gets := store.counts(); err != nil || len(entries) != 4 || gets != 4 {
+ entries, err = cache.fold(context.Background(), store)
+ if gets := store.claimGets(); err != nil || len(entries) != 4 || gets != 4 {
t.Fatalf("resumed fold: %d entries after %d GETs, err %v; want 4 after 4 (the 2 left)", len(entries), gets, err)
}
}
-
-// TestClaimFoldCoalescesConcurrentCallers: concurrent listings share one
-// fold, the queue of waiters is bounded (past it a caller is refused rather
-// than queued), and the fold is detached from the requests: a caller that
-// goes away gets its own error, and the fold still finishes and publishes.
-func TestClaimFoldCoalescesConcurrentCallers(t *testing.T) {
- _, dir := newTestDoor(t)
- store := newClaimReadCounter(dir)
- putClaimAs(t, dir, domains.Claim{Host: "a.example.com", Account: "zz99", App: "shop"})
- defer func(n int) { claimFoldWaiters = n }(claimFoldWaiters)
- claimFoldWaiters = 4
- var fold claimFold
- waitFor := func(what string, done func() bool) {
- t.Helper()
- deadline := time.Now().Add(10 * time.Second)
- for !done() {
- if time.Now().After(deadline) {
- t.Fatalf("timed out waiting for %s", what)
- }
- runtime.Gosched()
- }
- }
- waiting := func(n int) func() bool {
- return func() bool {
- fold.mu.Lock()
- defer fold.mu.Unlock()
- return fold.waiting == n
- }
- }
-
- store.gate = make(chan struct{})
- errs := make(chan error, 4)
- for i := 0; i < 4; i++ {
- go func() {
- entries, err := fold.snapshot(context.Background(), store)
- if err == nil && len(entries) != 1 {
- err = fmt.Errorf("%d entries, want 1", len(entries))
- }
- errs <- err
- }()
- }
- waitFor("4 waiting callers", waiting(4))
- if _, err := fold.snapshot(context.Background(), store); !errors.Is(err, errClaimFoldBusy) {
- t.Fatalf("a fifth caller: err = %v, want errClaimFoldBusy", err)
- }
- close(store.gate)
- for i := 0; i < 4; i++ {
- if err := <-errs; err != nil {
- t.Fatalf("caller: %v", err)
- }
- }
- if listings, gets := store.counts(); listings != 1 || gets != 1 {
- t.Fatalf("4 concurrent callers cost %d listings and %d GETs, want 1 and 1", listings, gets)
- }
-
- // A caller that goes away mid-fold.
- store.mu.Lock()
- store.gate = make(chan struct{})
- store.mu.Unlock()
- store.touch(domains.ClaimKey("a.example.com"))
- ctx, cancel := context.WithCancel(context.Background())
- go func() {
- _, err := fold.snapshot(ctx, store)
- errs <- err
- }()
- waitFor("the caller to wait", waiting(1))
- cancel()
- if err := <-errs; !errors.Is(err, context.Canceled) {
- t.Fatalf("departed caller: err = %v, want context.Canceled", err)
- }
- close(store.gate)
- waitFor("the detached fold to finish", func() bool {
- fold.mu.Lock()
- defer fold.mu.Unlock()
- return fold.inflight == nil
- })
- if listings, gets := store.counts(); listings != 2 || gets != 2 {
- t.Fatalf("after the departed caller: %d listings, %d GETs; want the fold to have finished (2 and 2)", listings, gets)
- }
-}
diff --git a/internal/edge/storedoor_test.go b/internal/edge/storedoor_test.go
index a6c23ae55..1ad42afab 100644
--- a/internal/edge/storedoor_test.go
+++ b/internal/edge/storedoor_test.go
@@ -999,8 +999,8 @@ func TestStoreDoorOnlyOnReservedHost(t *testing.T) {
// had proved it. It now reads only its own account's verified claims,
// without created_by; every other claim body answers the door's
// byte-identical 404. The listing names its own account's claims, pending
-// ones included, and since H5-M8 no other account's except on a name its
-// boxes could derive (TestStoreDoorClaimListingNamesOnlyCollisions).
+// ones included, and since H5-M8 no other account's
+// (TestStoreDoorClaimListingIsOwnOnly).
func TestStoreDoorClaimsAreOwnAccountAndRedacted(t *testing.T) {
d, store := newTestDoor(t)
ctx := context.Background()
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index 8b325e0b4..36134bf70 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -312,4 +312,4 @@ plan14-root-reads-moved-at-floor-v0-44-1.tsv ed1957bc7d18714e39984e757b73b8c590f
plan14-root-reads-gvisor-slice2-explicit-mode.tsv ed1957bc7d18714e39984e757b73b8c590f1a2a924ca35e20e9041fc09f2ca78
plan14-root-reads-public-share.tsv ed1957bc7d18714e39984e757b73b8c590f1a2a924ca35e20e9041fc09f2ca78
plan14-root-reads-gvisor-slice3-containment.tsv 0fdff597ef83fb9966e07c70b4283001eb97f7dfa71a83a19bde92382192eb6b
-plan14-root-reads-sec-h5-m8-fleet-hostnames.tsv d92e48eb2c7a5168c5d6f651f3ed678ecbaec098c3ebb47b88f5321e994b56de
+plan14-root-reads-sec-h5-m8-fleet-hostnames.tsv 5ae2bfceedb73398af5ec267891dd7f803892d81ddc33c14d3c31c5ea606e97e
diff --git a/internal/provision/testdata/plan14-root-reads-sec-h5-m8-fleet-hostnames.tsv b/internal/provision/testdata/plan14-root-reads-sec-h5-m8-fleet-hostnames.tsv
index 8fb0eda83..6da4946b6 100644
--- a/internal/provision/testdata/plan14-root-reads-sec-h5-m8-fleet-hostnames.tsv
+++ b/internal/provision/testdata/plan14-root-reads-sec-h5-m8-fleet-hostnames.tsv
@@ -1,12 +1,6 @@
# Census overlay sec-h5-m8-fleet-hostnames, written by census-propose (#369). census-ruling-sec-h5-m8-fleet-hostnames, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-sec-h5-m8-fleet-hostnames.md.
-# 4 body, 0 sites, 2 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
-@legacy a759373aee5e01bd023c40f9111e451cd4d9bf4a7e6252f3c26beeb07cea20db internal/domains/aliases.go deriveInstanceAliases legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=root-route; the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): rev3=J1's body; a stale body under a retired lifetime no longer makes a label shared, and a label with a record that cannot be judged keeps its existing alias row of the catch-all's own account and app (reading that row's Account and App) only once the derived name has passed every precedence check a derived name answers to (validity, an exact claim, a local real route, a deployment route, the per-box cap), and derives no new one; a report-only conservative keep, never a new route;rev3=census-ruling-regional-domains-447;basis=#447 Task 2: an instance catch-all whose parent claim is regional is inert (logged once, continue), as one whose parent is not held is; it only narrows what derives; no read added;rev3=census-ruling-account-subdomains;basis=takes a *int budget shared with the namespace pass instead of a local counter; the same checks and cap (maxInstanceAliases, now a var so a test can lower it); names kept on a failed instance listing now take the budget too, each once (fix round 1, Astra I-2), so the cap holds on that branch; same reads; body change only; derives and keeps less, never more;rev3=census-ruling-sec-h5-m8-fleet-hostnames;basis=H5-M8 refactor only: the catch-all checks move verbatim into InstanceCatchallParent (same order, same log lines) and the joined-name check into InstanceAliasName (adds the label regex the loop already applied), so the edge store door derives candidates with the same functions; no read added, derives exactly as before registry:Account@1596,registry:Account@3156,registry:Account@3955,registry:Alias@1658,registry:Alias@1726,registry:Alias@1765,registry:Alias@2044,registry:Alias@574,registry:App@1622,registry:App@3182,registry:App@3981,registry:App@918,registry:Host@1075,registry:Host@3934,registry:Host@3944,registry:Host@4140,registry:Provisioned@868,registry:Replica@904,registry:Slug@1007,whole:Route@2698,whole:Route@852,whole:Route@958,whole:RouteAlias@1576,whole:RouteAlias@3138,whole:RouteAlias@3916,whole:RouteAlias@526,whole:RouteAlias@556,whole:RouteAlias@569,whole:RouteAlias@585 beb2e3e01e4a029f7685317e6175fe920c03bdf2fb9ed66031fb7e2282d1cca6
-@legacy d59d921c2dcc4fb6990b33ae84ef32ece0ff8ada39b3f64fb2be26256def1369 internal/domains/namespacealiases.go deriveNamespaceAliases legacy accepted-legacy accepted-legacy;rev3=census-ruling-account-subdomains;basis=new: derives <prefix>.<name>.<apps> -> <prefix>.<sqid>.<apps> alias rows from the routes, alias rows and claim listing the pass already read (Provisioned or Platform, not sidecar or replica, of the name's account), writes them "pointing" (fix round 1) with UpsertAlias, and SetAliasDNSStatus("pointing") for an existing one that is not, to the box's own registry, and HA names into the in-memory AliasIngress report; no file, path or bucket read;rev3=census-ruling-sec-h5-m8-fleet-hostnames;basis=H5-M8 refactor only: calls namespaceDerivedName under its exported name NamespaceDerivedName (unchanged body); no read added registry:Account@1666,registry:Account@2867,registry:Alias@760,registry:App@1687,registry:App@1696,registry:App@1812,registry:DNSStatus@2137,registry:HA@2758,registry:Host@1238,registry:Host@1645,registry:Host@1655,registry:Host@1783,registry:Host@2740,registry:Host@2849,registry:Platform@1062,registry:Provisioned@1044,registry:Replica@1096,whole:Route@1028,whole:Route@1156,whole:Route@2412,whole:Route@2494,whole:Route@2532,whole:Route@2714,whole:Route@2769,whole:Route@3107,whole:Route@3172,whole:Route@3246,whole:Route@3302,whole:Route@3326,whole:Route@919,whole:RouteAlias@1617,whole:RouteAlias@712,whole:RouteAlias@742,whole:RouteAlias@755,whole:RouteAlias@771 198407469408cf21ba7f4fbfae464924528334e98f3c5c1b7c9c4f4ff367c991
-@legacy fb4a81b06184f75c6f0b09a8b59da95c035bc341e0856d749b61eefadc5279b3 internal/domains/reconcile.go Reconcile legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), from its domains loop: the seeded-instances body (a trashed app's route kept while an import on its host is journaled, deleted only if the row is still the one listed); self-serve moves 1 Task 4 removes the claims-off 1d auto-purge, so a claims-off box destroys no app objects and a host-claim box only requests the claim's purge as before; the registry reads are unchanged;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 7: the whole-app trash loop keeps every forward row (keptLive = append(keptLive, rt), +whole:Route x3) ahead of DeleteIfUnchanged, so a trashed fleet app's forward row is retired by the forward phase alone. Deletes less, never more.;rev3=census-ruling-staticcheck-sa4006;basis=SA4006 dead store: the canary loop no longer keeps the app from appKeyOwner, which canaryPointer (itself built on appKeyOwner for the same key) overwrote straight away; acctOfKey and ok are unchanged. No read added, read sites unchanged (95).;rev3=census-ruling-sec-h5-m8-fleet-hostnames;basis=H5-M8 refactor only: the platform apex and canary host formulas move into platformApexHost and platformCanaryHost (same strings), shared with NamespaceTwinHosts; no read added registry:Account@5579,registry:Account@5775,registry:App@10407,registry:App@11734,registry:App@13965,registry:App@5380,registry:App@5528,registry:App@7482,registry:App@7539,registry:App@7740,registry:App@7953,registry:App@8191,registry:App@8381,registry:Canary@10351,registry:Canary@13012,registry:Canary@13856,registry:Channel@11789,registry:Channel@12989,registry:Channel@13887,registry:Channel@13974,registry:Channel@14277,registry:Host@10314,registry:Host@10986,registry:Host@14012,registry:Host@14097,registry:Host@14268,registry:Host@5650,registry:Host@5736,registry:Host@7589,registry:Host@7731,registry:Host@7944,registry:Host@8182,registry:Host@8372,registry:Kind@12663,registry:Platform@10335,registry:Platform@13841,whole:Route@10296,whole:Route@10402,whole:Route@10463,whole:Route@10662,whole:Route@10678,whole:Route@10804,whole:Route@10832,whole:Route@10998,whole:Route@11014,whole:Route@11022,whole:Route@11719,whole:Route@11772,whole:Route@11929,whole:Route@11945,whole:Route@12982,whole:Route@13052,whole:Route@13221,whole:Route@13237,whole:Route@13245,whole:Route@13796,whole:Route@13827,whole:Route@13960,whole:Route@14115,whole:Route@14129,whole:Route@14135,whole:Route@14307,whole:Route@14321,whole:Route@14327,whole:Route@14335,whole:Route@14344,whole:Route@5366,whole:Route@5380,whole:Route@5510,whole:Route@5528,whole:Route@5579,whole:Route@5650,whole:Route@5736,whole:Route@5775,whole:Route@7144,whole:Route@7176,whole:Route@7426,whole:Route@7444,whole:Route@7454,whole:Route@7534,whole:Route@7760,whole:Route@7778,whole:Route@7788,whole:Route@7854,whole:Route@7971,whole:Route@7989,whole:Route@7999,whole:Route@8204,whole:Route@8222,whole:Route@8232,whole:Route@8410,whole:Route@8428,whole:Route@8438,whole:Route@8448,whole:Route@8457 1883bbc2e7c04226bfb6f1cdd4b2cac224d35063a641eb20f053882012b01573
-@legacy a190393c49a3529af46662fa6d2802f5709a1f68e5e879c5b9e7dfb3dc053d53 internal/edge/storedoor.go storeDoor.serveListing legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-sec-h5-m8-fleet-hostnames;basis=passes the caller sqid to serveClaimListing (H5-M8: the claim listing names the fleet account own claims and another account claim only on a name its boxes could derive); no read added, no store or file reach changed file:Query@204 b608051f9f1a7bc5d3093c4757ecee3e215b0c69f9215ce84521a632e5b2c237
-internal/domains/aliases.go deriveInstanceAliases legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=root-route; the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos): rev3=J1's body; a stale body under a retired lifetime no longer makes a label shared, and a label with a record that cannot be judged keeps its existing alias row of the catch-all's own account and app (reading that row's Account and App) only once the derived name has passed every precedence check a derived name answers to (validity, an exact claim, a local real route, a deployment route, the per-box cap), and derives no new one; a report-only conservative keep, never a new route;rev3=census-ruling-regional-domains-447;basis=#447 Task 2: an instance catch-all whose parent claim is regional is inert (logged once, continue), as one whose parent is not held is; it only narrows what derives; no read added;rev3=census-ruling-account-subdomains;basis=takes a *int budget shared with the namespace pass instead of a local counter; the same checks and cap (maxInstanceAliases, now a var so a test can lower it); names kept on a failed instance listing now take the budget too, each once (fix round 1, Astra I-2), so the cap holds on that branch; same reads; body change only; derives and keeps less, never more;rev3=census-ruling-sec-h5-m8-fleet-hostnames;basis=H5-M8 refactor only: the catch-all checks move verbatim into InstanceCatchallParent (same order, same log lines) and the joined-name check into InstanceAliasName (adds the label regex the loop already applied), so the edge store door derives candidates with the same functions; no read added, derives exactly as before registry:Account@1596,registry:Account@3156,registry:Account@3955,registry:Alias@1658,registry:Alias@1726,registry:Alias@1765,registry:Alias@2044,registry:Alias@574,registry:App@1622,registry:App@3182,registry:App@3981,registry:App@918,registry:Host@1075,registry:Host@3934,registry:Host@3944,registry:Host@4140,registry:Provisioned@868,registry:Replica@904,registry:Slug@1007,whole:Route@2698,whole:Route@852,whole:Route@958,whole:RouteAlias@1576,whole:RouteAlias@3138,whole:RouteAlias@3916,whole:RouteAlias@526,whole:RouteAlias@556,whole:RouteAlias@569,whole:RouteAlias@585 beb2e3e01e4a029f7685317e6175fe920c03bdf2fb9ed66031fb7e2282d1cca6
-internal/domains/namespacealiases.go deriveNamespaceAliases legacy accepted-legacy accepted-legacy;rev3=census-ruling-account-subdomains;basis=new: derives <prefix>.<name>.<apps> -> <prefix>.<sqid>.<apps> alias rows from the routes, alias rows and claim listing the pass already read (Provisioned or Platform, not sidecar or replica, of the name's account), writes them "pointing" (fix round 1) with UpsertAlias, and SetAliasDNSStatus("pointing") for an existing one that is not, to the box's own registry, and HA names into the in-memory AliasIngress report; no file, path or bucket read;rev3=census-ruling-sec-h5-m8-fleet-hostnames;basis=H5-M8 refactor only: calls namespaceDerivedName under its exported name NamespaceDerivedName (unchanged body); no read added registry:Account@1666,registry:Account@2867,registry:Alias@760,registry:App@1687,registry:App@1696,registry:App@1812,registry:DNSStatus@2137,registry:HA@2758,registry:Host@1238,registry:Host@1645,registry:Host@1655,registry:Host@1783,registry:Host@2740,registry:Host@2849,registry:Platform@1062,registry:Provisioned@1044,registry:Replica@1096,whole:Route@1028,whole:Route@1156,whole:Route@2412,whole:Route@2494,whole:Route@2532,whole:Route@2714,whole:Route@2769,whole:Route@3107,whole:Route@3172,whole:Route@3246,whole:Route@3302,whole:Route@3326,whole:Route@919,whole:RouteAlias@1617,whole:RouteAlias@712,whole:RouteAlias@742,whole:RouteAlias@755,whole:RouteAlias@771 198407469408cf21ba7f4fbfae464924528334e98f3c5c1b7c9c4f4ff367c991
-internal/domains/reconcile.go Reconcile legacy accepted-legacy accepted-legacy;rev3=census-ruling-self-serve-moves-1;basis=the agent (/opt/carlos/carlos agent, carlos-edge.service, user carlos), from its domains loop: the seeded-instances body (a trashed app's route kept while an import on its host is journaled, deleted only if the row is still the one listed); self-serve moves 1 Task 4 removes the claims-off 1d auto-purge, so a claims-off box destroys no app objects and a host-claim box only requests the claim's purge as before; the registry reads are unchanged;rev3=census-ruling-fleet-public-routes;basis=fleet public routes (spec 2026-10-29 rev 4, §4.2 writer rule): Task 7: the whole-app trash loop keeps every forward row (keptLive = append(keptLive, rt), +whole:Route x3) ahead of DeleteIfUnchanged, so a trashed fleet app's forward row is retired by the forward phase alone. Deletes less, never more.;rev3=census-ruling-staticcheck-sa4006;basis=SA4006 dead store: the canary loop no longer keeps the app from appKeyOwner, which canaryPointer (itself built on appKeyOwner for the same key) overwrote straight away; acctOfKey and ok are unchanged. No read added, read sites unchanged (95).;rev3=census-ruling-sec-h5-m8-fleet-hostnames;basis=H5-M8 refactor only: the platform apex and canary host formulas move into platformApexHost and platformCanaryHost (same strings), shared with NamespaceTwinHosts; no read added registry:Account@5579,registry:Account@5775,registry:App@10407,registry:App@11734,registry:App@13965,registry:App@5380,registry:App@5528,registry:App@7482,registry:App@7539,registry:App@7740,registry:App@7953,registry:App@8191,registry:App@8381,registry:Canary@10351,registry:Canary@13012,registry:Canary@13856,registry:Channel@11789,registry:Channel@12989,registry:Channel@13887,registry:Channel@13974,registry:Channel@14277,registry:Host@10314,registry:Host@10986,registry:Host@14012,registry:Host@14097,registry:Host@14268,registry:Host@5650,registry:Host@5736,registry:Host@7589,registry:Host@7731,registry:Host@7944,registry:Host@8182,registry:Host@8372,registry:Kind@12663,registry:Platform@10335,registry:Platform@13841,whole:Route@10296,whole:Route@10402,whole:Route@10463,whole:Route@10662,whole:Route@10678,whole:Route@10804,whole:Route@10832,whole:Route@10998,whole:Route@11014,whole:Route@11022,whole:Route@11719,whole:Route@11772,whole:Route@11929,whole:Route@11945,whole:Route@12982,whole:Route@13052,whole:Route@13221,whole:Route@13237,whole:Route@13245,whole:Route@13796,whole:Route@13827,whole:Route@13960,whole:Route@14115,whole:Route@14129,whole:Route@14135,whole:Route@14307,whole:Route@14321,whole:Route@14327,whole:Route@14335,whole:Route@14344,whole:Route@5366,whole:Route@5380,whole:Route@5510,whole:Route@5528,whole:Route@5579,whole:Route@5650,whole:Route@5736,whole:Route@5775,whole:Route@7144,whole:Route@7176,whole:Route@7426,whole:Route@7444,whole:Route@7454,whole:Route@7534,whole:Route@7760,whole:Route@7778,whole:Route@7788,whole:Route@7854,whole:Route@7971,whole:Route@7989,whole:Route@7999,whole:Route@8204,whole:Route@8222,whole:Route@8232,whole:Route@8410,whole:Route@8428,whole:Route@8438,whole:Route@8448,whole:Route@8457 1883bbc2e7c04226bfb6f1cdd4b2cac224d35063a641eb20f053882012b01573
-internal/edge/storedoor.go storeDoor.serveListing legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-sec-h5-m8-fleet-hostnames;basis=passes the caller sqid to serveClaimListing (H5-M8: the claim listing names the fleet account own claims and another account claim only on a name its boxes could derive); no read added, no store or file reach changed file:Query@204 b608051f9f1a7bc5d3093c4757ecee3e215b0c69f9215ce84521a632e5b2c237
-@coverage internal/domains 2c88fb06f0e2d26c76a31abcb0cb94fc4d116f32ecec8beb835a23a9be438493
-@coverage internal/edge 952846041d0722b4215336835a5b24f764f8194b789399c7f9019cc8dcd53a29
+# 1 body, 0 sites, 2 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+@legacy ad971326434bd47776da811f37f2a414cacb280ba61e10d8ba590802b3c9f100 internal/edge/storedoor.go storeDoor.serveListing legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-sec-h5-m8-fleet-hostnames;basis=passes the caller sqid to serveClaimListing (H5-M8: the claim listing names only the fleet account own claims, pending included); no read added, no store or file reach changed file:Query@204 b608051f9f1a7bc5d3093c4757ecee3e215b0c69f9215ce84521a632e5b2c237
+internal/edge/storedoor.go storeDoor.serveListing legacy accepted-legacy accepted-legacy;rev3=J4;basis=root-input;rev3=census-ruling-sec-h5-m8-fleet-hostnames;basis=passes the caller sqid to serveClaimListing (H5-M8: the claim listing names only the fleet account own claims, pending included); no read added, no store or file reach changed file:Query@204 b608051f9f1a7bc5d3093c4757ecee3e215b0c69f9215ce84521a632e5b2c237
+@coverage internal/domains 27b73db3f2981457b7fff9ea46bb5da871fbab42aed554bbc789666c76e3d8e1
+@coverage internal/edge 1299a9e931c668351465e444a54677faa87b3a028de07b99ba4fc9bf75cc6e3f