carlos / platform Public

provision: record-view walk survives unparsable apps/ keys (#1652)

An apps/ key with an empty segment (apps/<a>//...) made the armed
record-view walk dereference a nil listing on a forEach worker, ending
carlos-edge whenever CARLOS_CHANGE_INDEX=read was set (production
v0.44.1 roll, 2026-12-02; v0.43.11 rollback panicked the same way).

- The walk skips, records and logs any apps/ prefix that is not
  apps/<a>/<b>/; it never becomes a scope.
- forEach raises a worker panic on the caller's goroutine.
- A panic reading one app (walk or refresh) fails that scope and holds
  it as unknown, never absent; any other panic in Refresh, Rebuild or
  the HA ingress read becomes an error, so box and console fall back to
  the bucket walk as an unarmed binary does.
- Census overlay (internal/provision, internal/host haingress units)
  and a record-write census layer, approved by Astra on #280.

Reviewed by Astra and Fable, round 1: READY AFTER FIXES, no P1; fixes
applied and checked by Astra (READY).

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

Squashed from fix/recordview-walk-strays into main.
claude agent, operated by paul@keymail.dev b66d2b76590cc92f8e40bb535805fc7c638e46b4 parent acbeb89
14 files changed, +721 −23
  • docs/superpowers/notes/census-proposal-recordview-walk-strays.md +23 −0
  • docs/superpowers/reviews/CODEX-REVIEW-BRIEF-recordview-walk-strays.md +101 −0
  • docs/superpowers/reviews/CODEX-REVIEW-FINDINGS-recordview-walk-strays-R1.md +42 −0
  • docs/superpowers/reviews/FABLE-REVIEW-FINDINGS-recordview-walk-strays-R1.md +12 −0
  • internal/host/changeindex_test.go +41 −0
  • internal/host/haingress.go +17 −1
  • internal/provision/plan9_b8_census_test.go +1 −1
  • internal/provision/reconcile.go +46 −2
  • internal/provision/recordview.go +121 −14
  • internal/provision/recordview_store.go +7 −5
  • internal/provision/recordview_strays_test.go +267 −0
  • internal/provision/recordview_walk_strays_census_test.go +33 −0
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −0
  • internal/provision/testdata/plan14-root-reads-recordview-walk-strays.tsv +9 −0

CI passed — run details

CI log
=== gate ===
go: downloading go1.26.10 (linux/arm64)
go version go1.26.10 linux/arm64
opentofu: arm64, tofu 1.13.9, aws 6.73.0, archive 2.8.1
  tofu: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/tofu_1.13.9_linux_arm64.tar.gz
  tofu: downloaded, digest verified
  aws: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-aws_6.73.0_linux_arm64.zip
  aws: downloaded, digest verified
  archive: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-archive_2.8.1_linux_arm64.zip
  archive: downloaded, digest verified
  installed in /tmp/carlos-opentofu-1tb1Ls
.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 golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading golang.org/x/net v0.62.0
go: downloading github.com/aws/smithy-go v1.28.1
go: downloading github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.68.0
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/aws/aws-sdk-go-v2/service/s3 v1.105.0
go: downloading github.com/aws/aws-sdk-go-v2/service/sns v1.43.0
go: downloading github.com/aws/aws-sdk-go-v2/service/acm v1.45.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ec2 v1.324.0
go: downloading github.com/aws/aws-sdk-go-v2/service/iam v1.58.2
go: downloading github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.37.0
go: downloading github.com/aws/aws-sdk-go-v2/service/route53 v1.64.1
go: downloading golang.org/x/crypto v0.58.0
go: downloading golang.org/x/sys v0.49.0
go: downloading github.com/prometheus/client_golang v1.17.0
go: downloading github.com/oschwald/maxminddb-golang v1.13.1
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/cespare/xxhash/v2 v2.3.0
go: downloading github.com/prometheus/client_model v0.5.0
go: downloading github.com/prometheus/common v0.45.0
go: downloading github.com/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/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 modernc.org/sqlite v1.55.0
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading 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/mathutil v1.7.1
go: downloading github.com/google/uuid v1.6.0
go: downloading modernc.org/memory v1.11.0
go: downloading modernc.org/mathutil v1.7.1
=== launchctx (4 s, from +0 s)
ok  	amadan.net/carlos/platform.git/launchctx	0.015s
?   	amadan.net/carlos/platform.git/launchctx/controlname	[no test files]
?   	amadan.net/carlos/platform.git/launchctx/wireid	[no test files]
=== vet (178 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/mathutil v1.7.1
=== vet-tags (174 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 github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
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 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
=== gofmt (1 s, from +0 s)
gofmt -l .: clean
=== rest (380 s, from +15 s)
ok  	github.com/carlosframework/platform/cmd/carlos-media	125.033s
?   	github.com/carlosframework/platform/cmd/changelog	[no test files]
ok  	github.com/carlosframework/platform/cmd/console	212.123s
ok  	github.com/carlosframework/platform/cmd/mediaimage	41.725s
ok  	github.com/carlosframework/platform/cmd/moveprobe	15.540s
ok  	github.com/carlosframework/platform/cmd/pricebook-export	0.035s
ok  	github.com/carlosframework/platform/cmd/rootfswitness	0.194s
ok  	github.com/carlosframework/platform/cmd/runsc-assets	0.111s
ok  	github.com/carlosframework/platform/cmd/zddprobe	1.019s
ok  	github.com/carlosframework/platform/internal/agentsock	0.042s
ok  	github.com/carlosframework/platform/internal/alerting	0.016s
ok  	github.com/carlosframework/platform/internal/analytics	0.332s
ok  	github.com/carlosframework/platform/internal/appconfig	41.710s
ok  	github.com/carlosframework/platform/internal/apperr	0.302s
ok  	github.com/carlosframework/platform/internal/applog	5.764s
ok  	github.com/carlosframework/platform/internal/apppolicy	3.148s
ok  	github.com/carlosframework/platform/internal/assetcache	0.830s
ok  	github.com/carlosframework/platform/internal/awsinv	0.026s
ok  	github.com/carlosframework/platform/internal/awsmanaged	10.402s
ok  	github.com/carlosframework/platform/internal/awsregiongroup	0.393s
ok  	github.com/carlosframework/platform/internal/awsterminations	0.014s
ok  	github.com/carlosframework/platform/internal/backupswords	0.009s
ok  	github.com/carlosframework/platform/internal/billing	0.041s
ok  	github.com/carlosframework/platform/internal/billing/billingtest	0.079s
ok  	github.com/carlosframework/platform/internal/billingstripe	2.080s
ok  	github.com/carlosframework/platform/internal/boxchoice	0.022s
ok  	github.com/carlosframework/platform/internal/boxid	1.921s
?   	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.017s
ok  	github.com/carlosframework/platform/internal/boxself	0.148s
ok  	github.com/carlosframework/platform/internal/boxvolumes	0.065s
ok  	github.com/carlosframework/platform/internal/caps	5.121s
ok  	github.com/carlosframework/platform/internal/certwarm	0.019s
ok  	github.com/carlosframework/platform/internal/cgroup	1.561s
ok  	github.com/carlosframework/platform/internal/changelog	6.121s
ok  	github.com/carlosframework/platform/internal/clamd	0.065s
?   	github.com/carlosframework/platform/internal/cliflag	[no test files]
ok  	github.com/carlosframework/platform/internal/clireg	0.004s
ok  	github.com/carlosframework/platform/internal/codehealth	17.617s
ok  	github.com/carlosframework/platform/internal/compute	0.047s
ok  	github.com/carlosframework/platform/internal/consolefleet	0.011s
?   	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	12.016s
ok  	github.com/carlosframework/platform/internal/dbdoor/dbdoortest	0.086s
ok  	github.com/carlosframework/platform/internal/dbquery	0.074s
ok  	github.com/carlosframework/platform/internal/dbreads	3.332s
?   	github.com/carlosframework/platform/internal/dbreads/dbreadstest	[no test files]
ok  	github.com/carlosframework/platform/internal/dbverify	0.016s
ok  	github.com/carlosframework/platform/internal/demo	0.007s
ok  	github.com/carlosframework/platform/internal/demobuild	5.276s
ok  	github.com/carlosframework/platform/internal/democlaim	0.316s
ok  	github.com/carlosframework/platform/internal/devbox	18.232s
ok  	github.com/carlosframework/platform/internal/dnsrec	0.005s
ok  	github.com/carlosframework/platform/internal/docsite	0.194s
ok  	github.com/carlosframework/platform/internal/domainreg	0.033s
ok  	github.com/carlosframework/platform/internal/domains	68.467s
ok  	github.com/carlosframework/platform/internal/doorkey	0.024s
ok  	github.com/carlosframework/platform/internal/economics	0.021s
ok  	github.com/carlosframework/platform/internal/edgefence	0.181s
ok  	github.com/carlosframework/platform/internal/edgeguard	0.594s
?   	github.com/carlosframework/platform/internal/edgeproof	[no test files]
ok  	github.com/carlosframework/platform/internal/edgesfile	0.102s
ok  	github.com/carlosframework/platform/internal/egressaddr	0.018s
ok  	github.com/carlosframework/platform/internal/execsandbox	99.497s
ok  	github.com/carlosframework/platform/internal/fileacl	0.009s
ok  	github.com/carlosframework/platform/internal/fleetapi	2.401s
ok  	github.com/carlosframework/platform/internal/fleetstore	0.004s
ok  	github.com/carlosframework/platform/internal/fxrate	0.020s
ok  	github.com/carlosframework/platform/internal/gate	7.804s
ok  	github.com/carlosframework/platform/internal/genselect	0.084s
ok  	github.com/carlosframework/platform/internal/geo	0.045s
ok  	github.com/carlosframework/platform/internal/geoip	0.178s
ok  	github.com/carlosframework/platform/internal/groupadmission	0.005s
ok  	github.com/carlosframework/platform/internal/grouprollaws	16.998s
ok  	github.com/carlosframework/platform/internal/hadeparture	0.033s
ok  	github.com/carlosframework/platform/internal/hafresh	0.017s
ok  	github.com/carlosframework/platform/internal/hairpin	0.277s
ok  	github.com/carlosframework/platform/internal/historyreadback	1.466s
ok  	github.com/carlosframework/platform/internal/hostactors	21.844s
ok  	github.com/carlosframework/platform/internal/hostbox	22.525s
ok  	github.com/carlosframework/platform/internal/hostclaim	3.544s
ok  	github.com/carlosframework/platform/internal/hostenv	0.036s
ok  	github.com/carlosframework/platform/internal/hostevidence	0.016s
ok  	github.com/carlosframework/platform/internal/hostexec	22.110s
ok  	github.com/carlosframework/platform/internal/hostfence	0.241s
ok  	github.com/carlosframework/platform/internal/hostfiles	29.547s
ok  	github.com/carlosframework/platform/internal/hostfloor	0.387s
ok  	github.com/carlosframework/platform/internal/hostguard	1.627s
ok  	github.com/carlosframework/platform/internal/hostops	8.548s
?   	github.com/carlosframework/platform/internal/hostops/fencerelease	[no test files]
ok  	github.com/carlosframework/platform/internal/hostops/internal/fencerelease	0.019s
ok  	github.com/carlosframework/platform/internal/hostquarantine	0.027s
ok  	github.com/carlosframework/platform/internal/hostrelocate	2.436s
ok  	github.com/carlosframework/platform/internal/hostresolve	0.740s
ok  	github.com/carlosframework/platform/internal/hostwrite	0.013s
ok  	github.com/carlosframework/platform/internal/identity	0.014s
ok  	github.com/carlosframework/platform/internal/infraview	0.019s
ok  	github.com/carlosframework/platform/internal/ingresshealth	0.010s
ok  	github.com/carlosframework/platform/internal/ingresshealth/awstg	0.011s
ok  	github.com/carlosframework/platform/internal/instancectl	66.051s
ok  	github.com/carlosframework/platform/internal/instanceexec	9.685s
ok  	github.com/carlosframework/platform/internal/instancefs	16.639s
ok  	github.com/carlosframework/platform/internal/instancekey	0.011s
ok  	github.com/carlosframework/platform/internal/instanceupdates	0.085s
ok  	github.com/carlosframework/platform/internal/interactive	0.698s
ok  	github.com/carlosframework/platform/internal/launchd	0.026s
ok  	github.com/carlosframework/platform/internal/layout	23.004s
ok  	github.com/carlosframework/platform/internal/layout/pubclass	98.551s
ok  	github.com/carlosframework/platform/internal/lbhealth	0.019s
ok  	github.com/carlosframework/platform/internal/lease	143.063s
ok  	github.com/carlosframework/platform/internal/lease/leasetest	1.595s
ok  	github.com/carlosframework/platform/internal/lease/locktest	0.028s
ok  	github.com/carlosframework/platform/internal/ledger	0.054s
ok  	github.com/carlosframework/platform/internal/mail	4.236s
ok  	github.com/carlosframework/platform/internal/mailer	1.056s
ok  	github.com/carlosframework/platform/internal/mailsubmit	2.288s
ok  	github.com/carlosframework/platform/internal/mailwire	0.019s
ok  	github.com/carlosframework/platform/internal/maintenance	0.236s
ok  	github.com/carlosframework/platform/internal/maintenanceexec	8.933s
ok  	github.com/carlosframework/platform/internal/maintenanceguard	0.426s
ok  	github.com/carlosframework/platform/internal/managedboot	4.018s
?   	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.296s
ok  	github.com/carlosframework/platform/internal/media/mediatest	0.010s
ok  	github.com/carlosframework/platform/internal/mediaaws	60.203s
ok  	github.com/carlosframework/platform/internal/mediahandler	39.094s
ok  	github.com/carlosframework/platform/internal/mediajobs	1.204s
ok  	github.com/carlosframework/platform/internal/medialocal	10.192s
ok  	github.com/carlosframework/platform/internal/metrics	0.167s
ok  	github.com/carlosframework/platform/internal/minorunits	0.008s
ok  	github.com/carlosframework/platform/internal/moves	51.610s
ok  	github.com/carlosframework/platform/internal/moves/archive	2.614s
ok  	github.com/carlosframework/platform/internal/moves/offlinerun	0.128s
ok  	github.com/carlosframework/platform/internal/namedunits	0.049s
ok  	github.com/carlosframework/platform/internal/objstore	2.390s
ok  	github.com/carlosframework/platform/internal/ops	14.064s
ok  	github.com/carlosframework/platform/internal/pageindex	3.847s
ok  	github.com/carlosframework/platform/internal/parity	0.107s
?   	github.com/carlosframework/platform/internal/parity/cmd/parity-doc	[no test files]
ok  	github.com/carlosframework/platform/internal/park	0.953s
ok  	github.com/carlosframework/platform/internal/perf	0.192s
ok  	github.com/carlosframework/platform/internal/plans	0.099s
ok  	github.com/carlosframework/platform/internal/privatefile	0.013s
ok  	github.com/carlosframework/platform/internal/provision	230.191s
ok  	github.com/carlosframework/platform/internal/proxyproto	0.949s
ok  	github.com/carlosframework/platform/internal/publicrelease	0.068s
ok  	github.com/carlosframework/platform/internal/ratelimit	0.272s
ok  	github.com/carlosframework/platform/internal/regionlabel	0.047s
ok  	github.com/carlosframework/platform/internal/regionname	0.034s
ok  	github.com/carlosframework/platform/internal/registrar	0.028s
ok  	github.com/carlosframework/platform/internal/registrar/openprovider	0.457s
?   	github.com/carlosframework/platform/internal/registrar/registrartest	[no test files]
ok  	github.com/carlosframework/platform/internal/registry	78.906s
ok  	github.com/carlosframework/platform/internal/relay	7.488s
ok  	github.com/carlosframework/platform/internal/release	124.050s
?   	github.com/carlosframework/platform/internal/release/requestwitness	[no test files]
ok  	github.com/carlosframework/platform/internal/replicagen	0.012s
ok  	github.com/carlosframework/platform/internal/replicas	0.060s
ok  	github.com/carlosframework/platform/internal/reqrec	6.252s
ok  	github.com/carlosframework/platform/internal/rollout	11.686s
ok  	github.com/carlosframework/platform/internal/rolloutwords	0.022s
ok  	github.com/carlosframework/platform/internal/rootaws	99.284s
ok  	github.com/carlosframework/platform/internal/rootfsimage	0.998s
ok  	github.com/carlosframework/platform/internal/rootparticipation	0.121s
ok  	github.com/carlosframework/platform/internal/rootstate	0.048s
ok  	github.com/carlosframework/platform/internal/runs	0.826s
ok  	github.com/carlosframework/platform/internal/s3compat	0.081s
ok  	github.com/carlosframework/platform/internal/s3fake	1.300s
ok  	github.com/carlosframework/platform/internal/s3meter	0.487s
ok  	github.com/carlosframework/platform/internal/safefile	0.051s
ok  	github.com/carlosframework/platform/internal/schedule	24.040s
ok  	github.com/carlosframework/platform/internal/seeds	0.068s
ok  	github.com/carlosframework/platform/internal/share	0.032s
ok  	github.com/carlosframework/platform/internal/sim/litestreamfacts	5.585s
ok  	github.com/carlosframework/platform/internal/sim/mediajobs	48.293s
ok  	github.com/carlosframework/platform/internal/sim/regionha	21.049s
ok  	github.com/carlosframework/platform/internal/status	0.296s
ok  	github.com/carlosframework/platform/internal/steering	0.224s
ok  	github.com/carlosframework/platform/internal/stopevidence	0.477s
ok  	github.com/carlosframework/platform/internal/storecfg	0.289s
ok  	github.com/carlosframework/platform/internal/svcrole	0.005s
ok  	github.com/carlosframework/platform/internal/systemd	5.263s
?   	github.com/carlosframework/platform/internal/systemdshow	[no test files]
ok  	github.com/carlosframework/platform/internal/team	3.050s
ok  	github.com/carlosframework/platform/internal/teamcontract	0.117s
ok  	github.com/carlosframework/platform/internal/telemetry	0.020s
ok  	github.com/carlosframework/platform/internal/termfence	2.489s
ok  	github.com/carlosframework/platform/internal/timerspec	0.012s
ok  	github.com/carlosframework/platform/internal/tsidentity	4.193s
ok  	github.com/carlosframework/platform/internal/tunnelclient	0.456s
ok  	github.com/carlosframework/platform/internal/unixdial	0.025s
ok  	github.com/carlosframework/platform/internal/updatewords	0.045s
ok  	github.com/carlosframework/platform/internal/upstreamguard	0.010s
?   	github.com/carlosframework/platform/internal/upstreamguard/guardtest	[no test files]
ok  	github.com/carlosframework/platform/internal/usage	0.129s
ok  	github.com/carlosframework/platform/internal/version	0.009s
ok  	github.com/carlosframework/platform/internal/vet	2.747s
ok  	github.com/carlosframework/platform/internal/zonehost	0.013s
ok  	github.com/carlosframework/platform/internal/zonehost/route53zones	0.115s
?   	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.025s
ok  	github.com/carlosframework/platform/scripts/pathmapcheck	0.089s
ok  	github.com/carlosframework/platform/scripts/region-ha-g2/fixture	5.145s
ok  	github.com/carlosframework/platform/scripts/stateless-replicas-drill	1.166s
ok  	github.com/carlosframework/platform/scripts/witness-pointer	0.018s
=== cutover-witness (164 s, from +15 s)
ok  	github.com/carlosframework/platform	2.165s
=== internal_grouproll@0 (270 s, from +75 s)
ok  	github.com/carlosframework/platform/internal/grouproll	268.238s
=== internal_grouproll@1 (274 s, from +75 s)
ok  	github.com/carlosframework/platform/internal/grouproll	272.627s
=== internal_activator@0 (149 s, from +149 s)
ok  	github.com/carlosframework/platform/internal/activator	143.493s
=== internal_activator@1 (134 s, from +149 s)
ok  	github.com/carlosframework/platform/internal/activator	128.353s
=== internal_activator@2 (137 s, from +149 s)
ok  	github.com/carlosframework/platform/internal/activator	132.389s
=== internal_activator@3 (164 s, from +149 s)
ok  	github.com/carlosframework/platform/internal/activator	159.453s
=== root@0 (113 s, from +176 s)
ok  	github.com/carlosframework/platform	102.550s
=== root@1 (113 s, from +176 s)
ok  	github.com/carlosframework/platform	104.042s
=== root@2 (139 s, from +176 s)
ok  	github.com/carlosframework/platform	129.816s
=== root@3 (113 s, from +176 s)
ok  	github.com/carlosframework/platform	104.520s
=== root@4 (101 s, from +176 s)
ok  	github.com/carlosframework/platform	89.299s
=== internal_edge@0 (241 s, from +180 s)
ok  	github.com/carlosframework/platform/internal/edge	232.387s
=== internal_edge@1 (127 s, from +180 s)
ok  	github.com/carlosframework/platform/internal/edge	117.219s
=== internal_edge@2 (162 s, from +180 s)
ok  	github.com/carlosframework/platform/internal/edge	152.283s
=== internal_edge@3 (157 s, from +180 s)
ok  	github.com/carlosframework/platform/internal/edge	147.434s
=== internal_host@0 (148 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/host	143.694s
=== internal_host@1 (261 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/host	256.441s
=== internal_host@2 (231 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/host	226.062s
=== internal_host@3 (165 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/host	160.986s
=== internal_host@4 (253 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/host	248.931s
=== internal_host@5 (146 s, from +221 s)
ok  	github.com/carlosframework/platform/internal/host	142.046s
=== internal_console@0 (213 s, from +226 s)
ok  	github.com/carlosframework/platform/internal/console	205.502s
=== internal_console@1 (212 s, from +226 s)
ok  	github.com/carlosframework/platform/internal/console	203.718s
=== internal_console@2 (212 s, from +226 s)
ok  	github.com/carlosframework/platform/internal/console	203.845s
=== internal_console@3 (261 s, from +226 s)
ok  	github.com/carlosframework/platform/internal/console	254.508s
=== internal_console@4 (216 s, from +226 s)
ok  	github.com/carlosframework/platform/internal/console	209.398s
=== internal_console@5 (254 s, from +226 s)
ok  	github.com/carlosframework/platform/internal/console	247.135s
=== internal_console@6 (227 s, from +226 s)
ok  	github.com/carlosframework/platform/internal/console	219.487s
=== internal_console@7 (218 s, from +226 s)
ok  	github.com/carlosframework/platform/internal/console	211.142s
=== internal_console@8 (224 s, from +226 s)
ok  	github.com/carlosframework/platform/internal/console	216.972s
=== internal_console@9 (227 s, from +226 s)
ok  	github.com/carlosframework/platform/internal/console	220.256s
=== internal_console@10 (275 s, from +226 s)
ok  	github.com/carlosframework/platform/internal/console	268.106s
=== internal_console@11 (253 s, from +226 s)
ok  	github.com/carlosframework/platform/internal/console	245.134s
=== internal_console@12 (313 s, from +226 s)
ok  	github.com/carlosframework/platform/internal/console	306.565s
=== internal_console@13 (221 s, from +226 s)
ok  	github.com/carlosframework/platform/internal/console	214.329s
=== internal_console@14 (215 s, from +226 s)
ok  	github.com/carlosframework/platform/internal/console	207.566s
=== internal_console@15 (244 s, from +226 s)
ok  	github.com/carlosframework/platform/internal/console	235.599s
=== internal_console@16 (218 s, from +226 s)
ok  	github.com/carlosframework/platform/internal/console	211.510s
=== internal_console@17 (209 s, from +226 s)
ok  	github.com/carlosframework/platform/internal/console	201.258s
=== internal_console@18 (256 s, from +226 s)
ok  	github.com/carlosframework/platform/internal/console	249.272s
=== internal_console@19 (220 s, from +226 s)
ok  	github.com/carlosframework/platform/internal/console	213.204s
=== internal_console@20 (230 s, from +226 s)
ok  	github.com/carlosframework/platform/internal/console	220.870s
=== internal_console@21 (255 s, from +226 s)
ok  	github.com/carlosframework/platform/internal/console	248.279s
=== internal_console@22 (236 s, from +226 s)
ok  	github.com/carlosframework/platform/internal/console	228.111s
=== internal_console@23 (271 s, from +226 s)
ok  	github.com/carlosframework/platform/internal/console	263.642s
=== lists: internal_console 224 s, internal_edge 179 s, internal_activator 148 s, internal_host 219 s, root 175 s, internal_grouproll 75 s
=== cpu: the gate used 13115 cpu-seconds in 540 s, about 24.3 of 32 cores; the machine as a whole was 81% busy
=== opentofu ===
opentofu: 40 test files in 11 suites, OpenTofu v1.13.9
  initialised in 15 s
  ok      18 s  infra/modules/box-fence-writer/tests/writer.tftest.hcl  Success! 1 passed, 0 failed.
  ok      15 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      18 s  infra/modules/deployment-buckets/tests/db_reads.tftest.hcl  Success! 1 passed, 0 failed.
  ok      15 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      25 s  infra/modules/deployment-buckets/tests/media_results.tftest.hcl  Success! 2 passed, 0 failed.
  ok      32 s  infra/modules/deployment-buckets/tests/published_floors.tftest.hcl  Success! 3 passed, 0 failed.
  ok      85 s  infra/modules/media-engine/tests/media_engine.tftest.hcl  Success! 24 passed, 0 failed.
  ok      28 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      43 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      64 s  infra/modules/region-host/ingress/tests/group_ingress.tftest.hcl  Success! 30 passed, 0 failed.
  ok      45 s  infra/modules/region-host/tests/alert_publish.tftest.hcl  Success! 18 passed, 0 failed.
  ok      42 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       6 s  infra/modules/region-host/tests/fixed_state_unchanged.tftest.hcl  Success! 1 passed, 0 failed.
  ok      70 s  infra/modules/region-host/tests/group.tftest.hcl  Success! 32 passed, 0 failed.
  ok      12 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      34 s  infra/modules/region-host/tests/group_operator.tftest.hcl  Success! 13 passed, 0 failed.
  ok      11 s  infra/modules/region-host/tests/group_user_data.tftest.hcl  Success! 3 passed, 0 failed.
  ok      30 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      21 s  infra/modules/region-host/tests/mailer.tftest.hcl  Success! 6 passed, 0 failed.
  ok      11 s  infra/modules/region-host/tests/mailer_group.tftest.hcl  Success! 2 passed, 0 failed.
  ok      13 s  infra/modules/region-host/tests/managed_fleets/group_refusal.tftest.hcl  Success! 2 passed, 0 failed.
  ok     104 s  infra/modules/region-host/tests/managed_fleets/managed_fleets.tftest.hcl  Success! 46 passed, 0 failed.
  ok      71 s  infra/modules/region-host/tests/store_conversion.tftest.hcl  Success! 27 passed, 0 failed.
  ok      15 s  infra/modules/region-host/tests/store_scanning.tftest.hcl  Success! 4 passed, 0 failed.
  ok      28 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      18 s  infra/modules/region-host/tests/user_data_ignored.tftest.hcl  Success! 3 passed, 0 failed.
  ok      11 s  infra/modules/region-remote-host/tests/data_lifecycle.tftest.hcl  Success! 3 passed, 0 failed.
  ok      15 s  infra/modules/region-remote-host/tests/no_deployment_bucket.tftest.hcl  Success! 5 passed, 0 failed.
  ok      32 s  infra/modules/scanner-host/tests/scanner_host.tftest.hcl  Success! 14 passed, 0 failed.
opentofu: 40 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: 66912418 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:22393
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.01s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CreateMultipartUpload (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CopyObject_with_a_REPLACE_tagging_directive (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/but_multipart_itself_is_allowed (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_copy_itself_is_allowed (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/a_POST-policy_forged_tag_with_a_matching_version_is_still_not_a_verdict (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_an_ordinary_tagged-with-something-else_upload_is_allowed (0.00s)
    --- PASS: TestDeliveredContractMinio/delete_removes_it (0.00s)
    --- PASS: TestDeliveredContractMinio/cross-bucket_denial (0.00s)
PASS
ok  	github.com/carlosframework/platform/internal/objstore	0.036s
=== RUN   TestT4StorageProbeMinio
2026/12/02 04:01:35 moves: T4: STORE: list: operation error S3: ListObjectsV2, https response error StatusCode: 403, RequestID: 18ED53EB1B5C162F, HostID: d8114435e8bbb03b50702647f3d5e422f9731b0c1200d5b61601b8f278068776, 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.047s
=== RUN   TestS3StoreMinioContract
=== RUN   TestS3StoreMinioContract/conditional_get_and_etag_listing
=== RUN   TestS3StoreMinioContract/bump_through_every_mutation_path
--- PASS: TestS3StoreMinioContract (0.03s)
    --- PASS: TestS3StoreMinioContract/conditional_get_and_etag_listing (0.01s)
    --- PASS: TestS3StoreMinioContract/bump_through_every_mutation_path (0.02s)
PASS
ok  	github.com/carlosframework/platform/internal/release	0.042s
Bucket created successfully `local/analytics-versions`.
local/analytics-versions versioning is enabled
Created policy `analytics-versions` successfully.
Added user `analyticsversions` successfully.
Attached Policies: [analytics-versions]
To User: analyticsversions
=== RUN   TestS3StoreMinioVersions
--- PASS: TestS3StoreMinioVersions (0.03s)
PASS
ok  	github.com/carlosframework/platform/internal/release	0.041s
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.019s
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:_read_under_the_prefix
=== RUN   TestWriteCredentialContractMinio/refused:_head
=== RUN   TestWriteCredentialContractMinio/refused:_list
=== RUN   TestWriteCredentialContractMinio/refused:_list_uploads
=== RUN   TestWriteCredentialContractMinio/refused:_delete
=== RUN   TestWriteCredentialContractMinio/refused:_tag
=== RUN   TestWriteCredentialContractMinio/refused:_put_outside_the_prefix
=== RUN   TestWriteCredentialContractMinio/refused:_put_to_another_bucket
=== RUN   TestWriteCredentialContractMinio/refused:_read_elsewhere
=== RUN   TestWriteCredentialContractMinio/refused:_put_tagged
=== RUN   TestWriteCredentialContractMinio/refused:_put_with_a_platform_tag
=== 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:_read_under_the_prefix (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_head (0.00s)
    --- 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_outside_the_prefix (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_put_to_another_bucket (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_read_elsewhere (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_put_tagged (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_put_with_a_platform_tag (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.046s
=== RUN   TestEndToEndMinio
=== RUN   TestEndToEndMinio/plan
=== RUN   TestEndToEndMinio/roll
=== RUN   TestEndToEndMinio/replace
=== RUN   TestEndToEndMinio/remove
--- PASS: TestEndToEndMinio (0.46s)
    --- PASS: TestEndToEndMinio/plan (0.01s)
    --- PASS: TestEndToEndMinio/roll (0.12s)
    --- PASS: TestEndToEndMinio/replace (0.15s)
    --- PASS: TestEndToEndMinio/remove (0.15s)
PASS
ok  	github.com/carlosframework/platform/internal/grouproll	0.466s
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/12/02 04:01:44 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/12/02 04:01:44 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/12/02 04:01:44 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/12/02 04:01:44 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/12/02 04:01:44 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/12/02 04:01:44 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/12/02 04:01:44 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000003
2026/12/02 04:01:44 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000003 maxTXID=0000000000000003 size=454
2026/12/02 04:01:44 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000003
2026/12/02 04:01:44 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/12/02 04:01:44 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/12/02 04:01:44 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/12/02 04:01:44 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/12/02 04:01:44 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%3A36459: could not determine target mailbox
    agent.go:136: dbreads: dbr_7ro4i6lic4cvz4qtbadp3ics2a: planned 1 files (720 bytes) and restored to 1 in 15ms
    agent.go:136: dbreads: dbr_7ro4i6lic4cvz4qtbadp3ics2a: output 5 bytes in 1 confirmed chunks in 2ms
2026/12/02 04:01:45 console: db read dbr_7ro4i6lic4cvz4qtbadp3ics2a: relayed 1 chunks (102 bytes) in 1.006s, ended done
    agent.go:136: dbreads: dbr_x2xecnbhptpqs4n5txhepxcztu: planned 3 files (1544 bytes) and restored to 3 in 14ms
    agent.go:136: dbreads: dbr_x2xecnbhptpqs4n5txhepxcztu: output 5 bytes in 1 confirmed chunks in 1ms
2026/12/02 04:01:45 console: db read dbr_x2xecnbhptpqs4n5txhepxcztu: relayed 1 chunks (102 bytes) in 49ms, ended done
    agent.go:136: dbreads: dbr_4twdvvap6qi5di3yfoinjmgvbi: planned 3 files (1544 bytes) and held through 3 in 14ms
    agent.go:136: dbreads: dbr_4twdvvap6qi5di3yfoinjmgvbi: output 1544 bytes in 1 confirmed chunks in 1ms
2026/12/02 04:01:46 console: db read dbr_4twdvvap6qi5di3yfoinjmgvbi: relayed 1 chunks (1641 bytes) in 1.005s, ended done
=== RUN   TestDBForwardMinio/by_disconnect
=== NAME  TestDBForwardMinio
    agent.go:136: dbreads: dbr_jd7a7nlrl5dnhrkubo6ibg7ybm: planned 3 files (1544 bytes) and restored to 3 in 12ms
2026/12/02 04:01:46 console: db read dbr_jd7a7nlrl5dnhrkubo6ibg7ybm: relayed 0 chunks (0 bytes) in 27ms, ended client gone
    agent.go:136: dbreads: dbr_jd7a7nlrl5dnhrkubo6ibg7ybm: output 5 bytes in 1 confirmed chunks in 104ms
=== RUN   TestDBForwardMinio/by_timeout
=== NAME  TestDBForwardMinio
    agent.go:136: dbreads: dbr_srdywuhdz7rlmuopuwewu536qy: planned 3 files (1544 bytes) and restored to 3 in 12ms
2026/12/02 04:02:06 console: db read dbr_srdywuhdz7rlmuopuwewu536qy: relayed 0 chunks (0 bytes) in 19.326s, ended no-result
    agent.go:136: dbreads: dbr_srdywuhdz7rlmuopuwewu536qy: output 5 bytes in 1 confirmed chunks in 19.3s
--- PASS: TestDBForwardMinio (22.05s)
    --- PASS: TestDBForwardMinio/by_disconnect (0.24s)
    --- PASS: TestDBForwardMinio/by_timeout (19.44s)
PASS
ok  	github.com/carlosframework/platform/internal/console	22.095s
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.073s
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.558s
=== RUN   TestHeldHandoverTwoBoxMinio
2026/12/02 04:02:11 edge: mesh key: minted
2026/12/02 04:02:11 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/12/02 04:02:11 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/12/02 04:02:11 tenant admission is open. accepting tenant work
2026/12/02 04:02:11 activator: HA placement host=shop-074252cc.example.test kind=Place ref=annie reason=roomiest generation=2026-12-02T04:02:11Z lock_generation=0
2026/12/02 04:02:11 lease: t8-074252cc/shop-074252cc.example.test: HA lease acquired in 4ms (first wake)
2026/12/02 04:02:11 activator: shop-074252cc.example.test: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/12/02 04:02:11 activator: shop-074252cc.example.test: started carlos-instance@shop\x2d074252cc.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/12/02 04:02:11 activator: shop-074252cc.example.test: carlos-instance@shop\x2d074252cc.example.test.service launched in 7ms, healthy 0s later
2026/12/02 04:02:11 activator: shop-074252cc.example.test: woke in 20ms: checks 0s, lease 5ms, restore 0s, identity 0s, protect 0s, spawn 8ms, replicate 8ms
2026/12/02 04:02:11 lease: t8-074252cc/plain-074252cc.example.test: acquired in 2ms (client 0s, lock read and write 1ms)
2026/12/02 04:02:11 activator: no replica for plain-074252cc.example.test in s3://contract-bucket/t8-074252cc/plain-074252cc.example.test — booting fresh
2026/12/02 04:02:11 activator: plain-074252cc.example.test: started carlos-instance@plain\x2d074252cc.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/12/02 04:02:11 activator: plain-074252cc.example.test: carlos-instance@plain\x2d074252cc.example.test.service launched in 6ms, healthy 0s later
2026/12/02 04:02:11 activator: plain-074252cc.example.test: woke in 97ms: checks 0s, lease 2ms, restore 18ms, identity 0s, protect 0s, spawn 7ms, replicate 71ms
2026/12/02 04:02:11 lease: t8-074252cc/bot0.shop.bac.sidecar.internal: HA lease acquired in 4ms (first wake)
2026/12/02 04:02:11 activator: bot0.shop.bac.sidecar.internal: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/12/02 04:02:11 activator: bot0.shop.bac.sidecar.internal: woke in 20ms: checks 0s, lease 4ms, restore 0s, identity 0s, protect 0s, spawn 8ms, settle 0s, replicate 7ms
2026/12/02 04:02:11 activator: next-due probe plain-074252cc.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/12/02 04:02:11 activator: plain-074252cc.example.test hibernated
2026/12/02 04:02:11 activator: bot0.shop.bac.sidecar.internal: released with a marker (clean true, txid 1, files 3:e08f33427f11134b06aa3c75900bd2146c1732ce58682dffcc280d4e21f33e9c) in 7ms: files 1ms, sync 3ms, record 1ms, marker 2ms
2026/12/02 04:02:11 activator: bot0.shop.bac.sidecar.internal hibernated
2026/12/02 04:02:11 activator: next-due probe shop-074252cc.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/12/02 04:02:11 activator: shop-074252cc.example.test: released with a marker (clean true, txid 1, files 3:bf42bfe4a07a065188c91584b3063ce6e3a0b23b80862183f06ec4b45bd78d80) in 6ms: files 1ms, sync 3ms, record 1ms, marker 2ms
2026/12/02 04:02:11 activator: shop-074252cc.example.test hibernated
2026/12/02 04:02:11 lease: t8-074252cc/shop-074252cc.example.test: HA lease acquired in 3ms (clean marker)
2026/12/02 04:02:11 activator: shop-074252cc.example.test: restored (other-box)
2026/12/02 04:02:11 activator: shop-074252cc.example.test: started carlos-instance@shop\x2d074252cc.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 0s, control socket 0s, key gate 0s, logs 0s) 1ms, launch file 0s, gate 0s, root start 1ms)
2026/12/02 04:02:11 activator: shop-074252cc.example.test: carlos-instance@shop\x2d074252cc.example.test.service launched in 1ms, healthy 0s later
2026/12/02 04:02:11 activator: shop-074252cc.example.test: woke in 36ms: checks 0s, lease 3ms, restore 24ms, identity 0s, protect 0s, spawn 2ms, replicate 6ms
2026/12/02 04:02:11 edge: ha-take shop-074252cc.example.test from annie (txn t8-witness, marker generation 1): holder betty, generation 2
2026/12/02 04:02:11 edge: forward shop-074252cc.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:28603397a561a23a1ee0e4370ffdfa36 Step:move Result:ok Reasons:[] Fence:t8-witness StartedAt:2026-12-02 04:02:11.520320259 +0000 UTC FinishedAt:2026-12-02 04:02:11.618220761 +0000 UTC Acked:[betty carol] Departed:[] Moved:[{Host:shop-074252cc.example.test Holder:betty Gen:2 Confirmed:take}] Released:[{Host:plain-074252cc.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:68 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-074252cc.example.test <nil> stop plain-074252cc.example.test marker=true clean=true <nil> stop bot0.shop.bac.sidecar.internal marker=true clean=true <nil> releasing shop-074252cc.example.test <nil> stop shop-074252cc.example.test marker=true clean=true <nil> taken shop-074252cc.example.test betty <nil> end-moves]
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/bot0.shop.bac.sidecar.internal/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/bot0.shop.bac.sidecar.internal/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/bot0.shop.bac.sidecar.internal/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/bot0.shop.bac.sidecar.internal/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-074252cc/shop-074252cc.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: DELETE /contract-bucket/t8-074252cc/plain-074252cc.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-074252cc/bot0.shop.bac.sidecar.internal/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-074252cc/bot0.shop.bac.sidecar.internal/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-074252cc/shop-074252cc.example.test/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-074252cc/shop-074252cc.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-074252cc/shop-074252cc.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-074252cc/shop-074252cc.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-074252cc/shop-074252cc.example.test/head.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/generations/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0008/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0007/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0006/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0005/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0004/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0008/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0007/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0006/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0005/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0004/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-074252cc/shop-074252cc.example.test/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-074252cc/shop-074252cc.example.test/files/0/manifest.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-074252cc/shop-074252cc.example.test/files/0/objects/0000000000000001-933ea510b476f67a90a9af16f693c5f0c6e83ea45dded813a5778c3e958fbd51
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-074252cc/shop-074252cc.example.test/files/0/objects/0000000000000003-c3a4679693838ed7892638e5ec69419d1400c2ccf45389965c41a328f1332bf6
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-074252cc/shop-074252cc.example.test/0000/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-074252cc/shop-074252cc.example.test/0000/0000000000000002-0000000000000002.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-074252cc/shop-074252cc.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-074252cc/shop-074252cc.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1243: drain took 140ms; S3 calls 50 (DELETE lock=1 GET files=3 GET head=1 GET lock=3 GET replica=2 LIST replica=34 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/12/02 04:02:11 lease: t8-074252cc/plain-074252cc.example.test: acquired in 2ms (client 0s, lock read and write 1ms)
2026/12/02 04:02:11 activator: plain-074252cc.example.test: started carlos-instance@plain\x2d074252cc.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/12/02 04:02:11 activator: plain-074252cc.example.test: carlos-instance@plain\x2d074252cc.example.test.service launched in 1ms, healthy 0s later
2026/12/02 04:02:11 lease: /tmp/carlos-minio-contract-bVetKC/g/dw316070816/data/instances/plain-074252cc.example.test/plain-074252cc.example.test.db: continuity with the last clean close not proven; snapshot 1-0000000000000001 written before serving
2026/12/02 04:02:11 activator: plain-074252cc.example.test: woke in 8ms: checks 0s, lease 2ms, restore 0s, identity 0s, protect 0s, spawn 1ms, replicate 4ms
2026/12/02 04:02:11 activator: next-due probe shop-074252cc.example.test: decode /api/next-due: invalid character 'b' looking for beginning of value — recording none (it sleeps until a request)
2026/12/02 04:02:11 activator: shop-074252cc.example.test: released with a marker (clean true, txid 2, files 3:bf42bfe4a07a065188c91584b3063ce6e3a0b23b80862183f06ec4b45bd78d80) in 4ms: files 1ms, sync 0s, record 1ms, marker 2ms
2026/12/02 04:02:11 activator: shop-074252cc.example.test hibernated
2026/12/02 04:02:11 tenant admission is closed for shutdown
2026/12/02 04:02:11 activator: next-due probe plain-074252cc.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/12/02 04:02:11 activator: plain-074252cc.example.test hibernated
--- PASS: TestHeldHandoverTwoBoxMinio (0.52s)
=== RUN   TestHeldHandoverLostLeaseMinio
2026/12/02 04:02:11 edge: mesh key: minted
2026/12/02 04:02:11 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/12/02 04:02:11 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/12/02 04:02:11 tenant admission is open. accepting tenant work
2026/12/02 04:02:11 activator: HA placement host=shop-ed9c1eb6.example.test kind=Place ref=annie reason=roomiest generation=2026-12-02T04:02:11Z lock_generation=0
2026/12/02 04:02:11 lease: t8-ed9c1eb6/shop-ed9c1eb6.example.test: HA lease acquired in 3ms (first wake)
2026/12/02 04:02:11 activator: shop-ed9c1eb6.example.test: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/12/02 04:02:11 activator: shop-ed9c1eb6.example.test: started carlos-instance@shop\x2ded9c1eb6.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) 6ms, launch file 0s, gate 0s, root start 1ms)
2026/12/02 04:02:11 activator: shop-ed9c1eb6.example.test: carlos-instance@shop\x2ded9c1eb6.example.test.service launched in 7ms, healthy 0s later
2026/12/02 04:02:11 activator: shop-ed9c1eb6.example.test: woke in 18ms: checks 0s, lease 4ms, restore 0s, identity 0s, protect 0s, spawn 7ms, replicate 7ms
2026/12/02 04:02:11 activator: next-due probe shop-ed9c1eb6.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/12/02 04:02:11 activator: final checkpoint shop-ed9c1eb6.example.test: lease: release marker owed for s3://contract-bucket/t8-ed9c1eb6/shop-ed9c1eb6.example.test/lock.json (If-Match "40215c945d0ccff8289863508edbcc41"): lease: write release marker: operation error S3: PutObject, https response error StatusCode: 503, RequestID: , HostID: , api error ServiceUnavailable: witness: refused
2026/12/02 04:02:11 activator: shop-ed9c1eb6.example.test hibernated
2026/12/02 04:02:11 activator: handover of shop-ed9c1eb6.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-ed9c1eb6.example.test client 4 "
    hadrain_twobox_minio_linux_test.go:1486: driver calls: [begin shop-ed9c1eb6.example.test <nil> releasing shop-ed9c1eb6.example.test <nil> stop shop-ed9c1eb6.example.test marker=false clean=false <nil> left shop-ed9c1eb6.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/12/02 04:02:11 tenant admission is closed for shutdown
2026/12/02 04:02:11 http: proxy error: context canceled
--- PASS: TestHeldHandoverLostLeaseMinio (0.27s)
PASS
ok  	github.com/carlosframework/platform/internal/host	0.834s
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/12/02 04:02:13 lease: instances/gen-1796184133160105060.shop.example.com: HA lease acquired in 5ms (first wake)
2026/12/02 04:02:13 lease: instances/gen-1796184133160105060.shop.example.com: HA lease acquired in 3ms (holder terminated)
    gentake_minio_test.go:308: a second create-only copy onto instances/gen-1796184133160105060.shop.example.com/g-00000000000000000002/0000/0000000000000001-0000000000000001.ltx: <nil> (destination condition honoured: false)
2026/12/02 04:02:13 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/12/02 04:02:13 ERROR enforce L0 time retention system=store db=w.example.com.db error="fetch l1 files: lease: a write has waited too long to reach storage (write fence)"
2026/12/02 04:02:13 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/12/02 04:02:13 lease: instances/gen-1796184133284926591.shop.example.com: HA lease acquired in 4ms (first wake)
2026/12/02 04:02:13 ERROR retention enforcement failed system=store db=seed.db error="enforce snapshot retention: remove ltx files: lease: invalid or changed generation binding"
2026/12/02 04:02:13 lease: instances/gen-1796184133284926591.shop.example.com: HA lease acquired in 3ms (clean marker)
=== RUN   TestGenerationTakeMinio/copy-version
=== RUN   TestGenerationTakeMinio/store-time
2026/12/02 04:02:13 lease: instances/gen-1796184133334659545.shop.example.com: HA lease acquired in 3ms (first wake)
2026/12/02 04:02:13 ERROR retention enforcement failed system=store db=seed.db error="enforce snapshot retention: remove ltx files: lease: invalid or changed generation binding"
2026/12/02 04:02:13 lease: instances/gen-1796184133334659545.shop.example.com: HA lease acquired in 3ms (clean marker)
2026/12/02 04:02:13 lease: instances/gen-1796184133334659545.shop.example.com: HA lease acquired in 2ms (unclean marker)
2026/12/02 04:02:13 lease: instances/gen-1796184133334659545.shop.example.com: HA lease acquired in 3ms (unclean marker)
2026/12/02 04:02:13 lease: instances/gen-1796184133334659545.shop.example.com: HA lease acquired in 2ms (unclean marker)
2026/12/02 04:02:13 lease: instances/gen-1796184133334659545.shop.example.com: HA lease acquired in 3ms (unclean marker)
=== RUN   TestGenerationTakeMinio/skew
--- PASS: TestGenerationTakeMinio (0.34s)
    --- PASS: TestGenerationTakeMinio/take (0.12s)
    --- PASS: TestGenerationTakeMinio/switch-412 (0.04s)
    --- PASS: TestGenerationTakeMinio/copy-version (0.01s)
    --- PASS: TestGenerationTakeMinio/store-time (0.15s)
    --- PASS: TestGenerationTakeMinio/skew (0.01s)
PASS
ok  	github.com/carlosframework/platform/internal/lease	0.349s
minio contract: PASS
=== staticcheck ===
go version go1.26.10 linux/arm64
go: downloading honnef.co/go/tools v0.8.2
go: downloading golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678
go: downloading github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c
go: downloading golang.org/x/sync v0.23.0
go: downloading golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa
staticcheck: clean
=== govulncheck ===
go version go1.26.10 linux/arm64
go: downloading golang.org/x/vuln v1.8.0
go: downloading golang.org/x/telemetry v0.0.0-20260908163034-4bcc4b2ee518
go: downloading golang.org/x/tools v0.50.0
govulncheck: scanned github.com/carlosframework/platform, amadan.net/carlos/platform.git/launchctx, 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 1m53.105s
    codehealth_test.go:107: line metrics (code lines, then physical):
          file-lines  5471  7324  internal/activator activator_test.go
          file-lines  4120  6283  . apimode.go
          file-lines  4051  6843  internal/console server.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  3157  6338  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  1240  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   360   362  internal/edge TestDemoAPIAliasBoundary
          func-lines   358   628  cmd/console serve
          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 (217 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/schedule/envfile_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               1089 at  473 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         18582 at   45 sites  functions over 300 code lines (blank and comment-only lines not counted)
    codehealth_test.go:115: file-lines         30469 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 (113.11s)
PASS
ok  	github.com/carlosframework/platform/internal/codehealth	114.496s
=== code-health-record ===
go version go1.26.10 linux/arm64
code-health record: HEAD is on main; comparing with its parent acbeb894f1eea8813477366488666adf9b468bcb
=== 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 +14 s)
ok  	github.com/carlosframework/platform/internal/systemd	13.366s
=== internal_rootaws@0 (26 s, from +33 s)
ok  	github.com/carlosframework/platform/internal/rootaws	25.528s
=== internal_activator@0 (254 s, from +112 s)
ok  	github.com/carlosframework/platform/internal/activator	251.396s
=== internal_activator@1 (280 s, from +112 s)
ok  	github.com/carlosframework/platform/internal/activator	277.746s
=== internal_activator@2 (300 s, from +112 s)
ok  	github.com/carlosframework/platform/internal/activator	298.367s
=== internal_activator@3 (370 s, from +112 s)
ok  	github.com/carlosframework/platform/internal/activator	367.937s
=== internal_activator@4 (314 s, from +112 s)
ok  	github.com/carlosframework/platform/internal/activator	312.181s
=== internal_activator@5 (305 s, from +112 s)
ok  	github.com/carlosframework/platform/internal/activator	302.660s
=== internal_activator@6 (308 s, from +112 s)
ok  	github.com/carlosframework/platform/internal/activator	305.577s
=== internal_activator@7 (407 s, from +112 s)
ok  	github.com/carlosframework/platform/internal/activator	404.745s
=== internal_edge@0 (84 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	80.907s
=== internal_edge@1 (83 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	79.063s
=== internal_edge@2 (215 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	211.562s
=== internal_edge@3 (144 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	139.910s
=== internal_edge@4 (178 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	174.145s
=== internal_edge@5 (236 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	232.829s
=== internal_edge@6 (196 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	192.404s
=== internal_edge@7 (229 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	224.948s
=== internal_edge@8 (219 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	215.858s
=== internal_edge@9 (246 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	241.945s
=== internal_edge@10 (333 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	328.909s
=== internal_edge@11 (228 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	223.962s
=== internal_edge@12 (248 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	244.381s
=== internal_edge@13 (264 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	260.731s
=== internal_edge@14 (190 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	186.790s
=== internal_edge@15 (242 s, from +135 s)
ok  	github.com/carlosframework/platform/internal/edge	238.836s
=== internal_host@0 (16 s, from +195 s)
ok  	github.com/carlosframework/platform/internal/host	11.676s
=== internal_host@1 (10 s, from +195 s)
ok  	github.com/carlosframework/platform/internal/host	5.677s
=== lists: internal_edge 134 s, internal_activator 111 s, internal_host 195 s, internal_rootaws 33 s, internal_systemd 13 s
=== cpu: the gate used 7638 cpu-seconds in 519 s, about 14.7 of 32 cores; the machine as a whole was 45% busy
=== gitleaks ===
go version go1.26.10 linux/arm64
go: downloading github.com/zricethezav/gitleaks/v8 v8.30.1
go: downloading github.com/spf13/viper v1.19.0
go: downloading github.com/rs/zerolog v1.33.0
go: downloading github.com/spf13/cobra v1.9.1
go: downloading github.com/BobuSumisu/aho-corasick v1.0.3
go: downloading github.com/fatih/semgroup v1.2.0
go: downloading github.com/Masterminds/sprig/v3 v3.3.0
go: downloading golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa
go: downloading github.com/hashicorp/go-version v1.7.0
go: downloading github.com/charmbracelet/lipgloss v0.5.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/sagikazarmark/slog-shim v0.1.0
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading github.com/spf13/cast v1.7.1
go: downloading gopkg.in/ini.v1 v1.67.0
go: downloading github.com/subosito/gotenv v1.6.0
go: downloading github.com/pelletier/go-toml/v2 v2.2.3
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading github.com/mitchellh/mapstructure v1.5.0
go: downloading github.com/spf13/afero v1.12.0
go: downloading github.com/fsnotify/fsnotify v1.8.0
go: downloading github.com/magiconair/properties v1.8.9
go: downloading golang.org/x/text v0.22.0
go: downloading golang.org/x/sys v0.30.0
go: downloading dario.cat/mergo v1.0.1
go: downloading github.com/Masterminds/goutils v1.1.1
go: downloading golang.org/x/crypto v0.35.0
go: downloading github.com/huandu/xstrings v1.5.0
go: downloading github.com/shopspring/decimal v1.4.0
go: downloading github.com/Masterminds/semver/v3 v3.3.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/sync v0.11.0
go: downloading github.com/andybalholm/brotli v1.1.2-0.20250424173009-453214e765f3
go: downloading github.com/klauspost/compress v1.17.11
go: downloading github.com/nwaples/rardecode/v2 v2.1.0
go: downloading github.com/klauspost/pgzip v1.2.6
go: downloading github.com/STARRY-S/zip v0.2.1
go: downloading github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707
go: downloading github.com/minio/minlz v1.0.0
go: downloading github.com/bodgit/sevenzip v1.6.0
go: downloading github.com/pierrec/lz4/v4 v4.1.21
go: downloading github.com/sorairolake/lzip-go v0.3.5
go: downloading github.com/therootcompany/xz v1.0.1
go: downloading github.com/ulikunitz/xz v0.5.12
go: downloading github.com/mitchellh/reflectwalk v1.0.2
go: downloading github.com/lucasb-eyer/go-colorful v1.2.0
go: downloading github.com/mattn/go-runewidth v0.0.14
go: downloading github.com/muesli/reflow v0.2.1-0.20210115123740-9e1d0d53df68
go: downloading github.com/muesli/termenv v0.15.1
go: downloading github.com/rivo/uniseg v0.2.0
go: downloading github.com/bodgit/plumbing v1.3.0
go: downloading github.com/hashicorp/go-multierror v1.1.1
go: downloading github.com/bodgit/windows v1.0.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/aymanbagabas/go-osc52/v2 v2.0.1
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 103 near misses of the names notscanned.go lists
self-test: skipped  the 34 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, 138 tracked files judged, 3 broken setups refused
gitleaks: scanned 12247 tracked files; 34 not scanned, by exact path (scripts/gitleaks-gate/notscanned.go)
gitleaks: clean
diff --git a/docs/superpowers/notes/census-proposal-recordview-walk-strays.md b/docs/superpowers/notes/census-proposal-recordview-walk-strays.md
new file mode 100644
index 000000000..8ca79371f
--- /dev/null
+++ b/docs/superpowers/notes/census-proposal-recordview-walk-strays.md
@@ -0,0 +1,23 @@
+# Census approval: recordview-walk-strays
+
+Ruling `census-ruling-recordview-walk-strays`. The independent reviewer approves or rejects every change below, 1 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26).
+
+| unit | change | read sites | what changed |
+|---|---|---|---|
+| `internal/host/haingress.go` `publishHAIngressSnapshot` | body | unchanged (1) | calls the new haIngressRoutesOf, which runs sn.HAIngressRoutes unchanged under a recover that turns a panic into the publication error; no new read |
+
+Envelopes re-pinned: `internal/host`, `internal/provision`.
+
+Review: a model from the other family than the author reads the branch's diff against main on the amadan.net remote (`origin` or `amadan`, whichever points at amadan.net) and gives a verdict for every unit and every re-pinned envelope above. For a unit, compare the change with its recorded disposition and basis below; for an envelope, read every changed function in the package and what it reaches. Reject if the change lets root open, run, query or follow anything it did not before from a path or input a tenant, an app or a box agent can create, write or name; if it weakens a check, refusal, validation, argument or environment the basis relies on; or if the diff cannot settle either. Otherwise approve. Record each verdict on #280 with the tip. A rejected unit goes back to the author to correct; nothing escalates to the census owner.
+
+Recorded dispositions, which each change must still satisfy:
+
+- `internal/host/haingress.go` `publishHAIngressSnapshot`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-region-ha-g2-fixes;basis=Ignore older snapshot epochs and publish the complete cached record view for the configured region; new indirect cached record/manifest reads, no live fallback.
+
+New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff:
+
+- new `internal/host/haingress.go:haIngressRoutesOf`: reads +whole:Route; written legacy, accepted-legacy, frozen
+
+Seal: `c566f93a6751a5c801787d2b0c6d965301af68fcf6d3a288d762f08be90f3248` → `594b9e8f940d929bc1d03df932952bde791955b8a8f9dde37ee9c7cd7b2a0042`.
+
+Overlay: `internal/provision/testdata/plan14-root-reads-recordview-walk-strays.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-recordview-walk-strays.md b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-recordview-walk-strays.md
new file mode 100644
index 000000000..689250dde
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-BRIEF-recordview-walk-strays.md
@@ -0,0 +1,101 @@
+# Review brief: branch fix/recordview-walk-strays, round 1 of 3
+
+Repo carlos/platform, branch `fix/recordview-walk-strays`, commit named in
+the reviewer's prompt. Under review: the diff `origin/main..HEAD`.
+Authorities: the S3 change-index design as built on main
+(`internal/provision/recordview.go`, `internal/host/changeindex.go`,
+`internal/console/recordview.go`), AGENTS.md (census section),
+discussion #1652.
+
+You are an independent reviewer. Read the diff, then the code it names,
+and check every claim against that code.
+
+## Background
+
+On 2026-12-02 a production roll armed `CARLOS_CHANGE_INDEX=read`.
+carlos-edge panicked about a second after start, on both v0.44.1 and the
+v0.43.11 rollback target, at `(*RecordView).walk.func3` (the forEach
+closure). The deployment bucket holds one key with an empty app segment,
+`apps/<acct>//errors/<box>/<hour>/<seq>-<size>.jsonl.gz`, written on
+2026-09-22 by a pre-v0.28.0 box agent for an app-less route (the writer
+was fixed in e8e961dd4, v0.28.0: `applog.ErrBadKeySegment`). In the
+bucket-shaped walk, `ListDirs("apps/<acct>/")` yields `apps/<acct>//`, a
+`found[(acct,"")]` entry was created, its scope `apps/<acct>/` failed
+`ScopeApp`, the lookup returned nil and the closure dereferenced it on a
+worker goroutine, ending the process.
+
+## What the branch does
+
+1. The walk treats every apps/ prefix that does not parse as
+ `apps/<a>/<b>/` (bucket-shaped and flat branches) as a stray: skipped,
+ recorded in `ViewSnapshot.appStrays`, logged once per walk; it never
+ becomes a scope. An empty account (`apps//`) is not added to the
+ account set either.
+2. `forEach` catches a worker panic and raises it again on the caller's
+ goroutine after all workers finish (`forEachPanic`).
+3. The walk's per-app closure recovers and fails only that scope.
+4. `Refresh` and `Rebuild` recover any panic into the call's error, set
+ `rebuildDue`, and republish the previous snapshot with `walkErr` so it
+ is not Complete. Callers (`viewStore` on the box, `recordWalkStore` on
+ the console) already read the bucket on any refresh error.
+5. Census overlay for the re-pinned `internal/provision` envelope.
+
+## What to check
+
+1. Correctness: can any apps/ listing shape still produce a scope whose
+ listings are nil, or a nil dereference anywhere in RecordView,
+ ViewSnapshot or the snapshot store? Does skipping strays change what a
+ record consumer reads over the snapshot versus the bucket in any case
+ that matters (Reconcile, ListAllRecords*, removal authority: a record
+ under a stray prefix must never let the view answer "absent" for a
+ record the bucket walk would see and act on)?
+2. The panic nets: is re-raising in forEach safe for every other forEach
+ caller in internal/provision (no deadlock, no lost semaphore slot, no
+ change in behaviour on the non-panicking path)? Does recoverLocked
+ leave RecordView's state (applied, pending, rebuildDue, epoch) such
+ that the next Refresh walks and nothing is published Complete wrongly?
+ Is anything in RecordView or release.ChangeWatch still able to panic on
+ a goroutine the nets do not cover?
+3. Fallback: confirm that with this branch a binary whose view errors or
+ panics behaves as an unarmed one (reads the live bucket), on the box
+ and on the console.
+4. Security question (from the incident coordinator): can anything
+ tenant-controlled create a key under the deployment bucket's apps/
+ that the walk cannot parse? Look at app and account name validation
+ (release.ValidApp/ValidAccount, console doors), error/log/analytics/
+ usage shipping (internal/applog, internal/apperr, internal/analytics,
+ internal/host logship/errship/usage), the edge store door
+ (internal/edge/storedoor.go canonicalKey, aclWrite), fleet boxes, and
+ the CLI. If yes, it is a security finding: rate it and say whether this
+ branch closes it.
+5. Census: the overlay re-pins the internal/provision envelope only.
+ Approve or reject per AGENTS.md "The census" (does the change let root
+ open, run, query or follow anything new from tenant/app/agent input,
+ or weaken a check root relies on?).
+
+## Severity
+
+- **P1**: unsafe, would not compile, a test fails, or it would not work.
+ Blocks merge.
+- **P2**: wrong or missing. Fixed without reopening this review.
+- **P3**: clarity or polish. Follow-up list; never a reason for another
+ round.
+
+A P1 states its failure scenario and the evidence (file:line). Do not
+raise a P2 to P1 to keep the review open.
+
+## Output
+
+Findings ranked P1, P2, P3. Each gives the problem, the evidence
+(file:line, verified), the failure scenario, a concrete fix and the
+invariant or trust boundary it breaks. Then the security answer (item 4)
+and the census verdict (item 5). End with exactly one verdict:
+
+- **READY**: no P1 and no P2.
+- **READY AFTER FIXES**: no P1. The listed P2s are fixed without another
+ round.
+- **NOT READY**: one or more P1s, listed.
+
+Do not edit files. Do not spawn reviewers or subagents of your own. Do
+not run the full test suites; targeted `go test ./internal/provision -run
+<name>` runs are fine.
diff --git a/docs/superpowers/reviews/CODEX-REVIEW-FINDINGS-recordview-walk-strays-R1.md b/docs/superpowers/reviews/CODEX-REVIEW-FINDINGS-recordview-walk-strays-R1.md
new file mode 100644
index 000000000..9ff8f1b67
--- /dev/null
+++ b/docs/superpowers/reviews/CODEX-REVIEW-FINDINGS-recordview-walk-strays-R1.md
@@ -0,0 +1,42 @@
+Reviewed `origin/main..HEAD` at `41d511059f5e1edea47e327ab09f0f68a9f0c18f`, round 1. No P1 findings. One P2; no P3 findings.
+
+**P2 — Preserve the read failure in the snapshot when an app panics.**
+
+At [recordview.go:615](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/recordview-walk-strays/internal/provision/recordview.go:615), recovery sets `e = nil`. The following condition therefore omits the app from `sn.apps`; only `RecordView.pending` remembers its failure.
+
+Failure scenario: during the first rebuild, reading an existing app’s record panics. `Rebuild` returns nil and publishes an incomplete snapshot, but:
+
+- `ListDirs` over that snapshot omits the app.
+- `ListAllRecordsStrict` consequently returns a shortened record set without an error.
+- `ListAllRecordsTolerant` can report `complete=true`.
+- Direct cached record reads report absence through [recordview_store.go:214](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/recordview-walk-strays/internal/provision/recordview_store.go:214).
+
+**Broken invariant:** an unsuccessful scope read must remain unknown, rather than become authoritative absence through the snapshot store. Existing tests explicitly require strict readers to fail and tolerant readers to report incompleteness after scope failures ([recordview_test.go:614](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/recordview-walk-strays/internal/provision/recordview_test.go:614)).
+
+**Fix:** retain an app entry carrying the recovered error in both record listings and the cached manifest/tombstone reads. Keep the scope pending. Extend the panic test to assert strict-reader failure, tolerant-reader incompleteness, and read errors rather than `os.ErrNotExist`.
+
+This is P2 because the current host and console entry points check `Complete` and fall back to the bucket; I found no production removal path bypassing those protections.
+
+**Other correctness and panic checks**
+
+The stray filtering closes the reported nil-listing dereference. Empty-account prefixes cannot represent known accounts, and both record parsers already reject empty app segments. I found no actionable record that the new filtering hides from a complete snapshot.
+
+`forEach` releases its semaphore slot and completes its wait-group entry after recovery, then re-raises only after all workers finish. Its callers retain their normal-path behavior. `recoverLocked` forces the next refresh to rebuild; publication remains incomplete, and the successful rebuild replaces `applied` and `pending`. I found no additional worker goroutine launched by `RecordView` or `ChangeWatch` outside the covered helper.
+
+Both [host viewStore](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/recordview-walk-strays/internal/host/changeindex.go:128) and [console recordWalkStore](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/recordview-walk-strays/internal/console/recordview.go:36) return the live store after refresh errors or incomplete snapshots.
+
+**Security answer**
+
+I found no current tenant-controlled path among the inspected doors that can create the malformed account/app prefixes responsible for this crash:
+
+- Account/app validators reject empty segments and slashes ([names.go:10](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/recordview-walk-strays/launchctx/controlname/names.go:10)). Console creation validates app names; CLI API writes resolve an authorized existing app, and release shipping validates account and manifest names.
+- Log/error/analytics key builders share `CheckApp`; their shippers refuse invalid keys before writing ([chunk.go:60](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/recordview-walk-strays/internal/applog/chunk.go:60)). Usage objects are written under `usage/`.
+- Fleet writes pass [canonicalKey](/home/paulca/amadan.net/carlos/platform/.claude/worktrees/recordview-walk-strays/internal/edge/storedoor.go:574), which rejects empty path segments before authorization. `aclWriteAppFamily` restricts writes to the authenticated account’s nonempty app segment and allowed telemetry families.
+
+Privileged deployment-bucket writers can still create malformed objects. This branch handles the historical malformed prefix; it does not change write authorization. No current tenant-triggerable security finding was established.
+
+**Census verdict: APPROVE** the `internal/provision` envelope at the reviewed commit. The changed functions introduce no new root read destination or authority and preserve the production completeness gates. The record-write census classification of `RecordView.walk` remains appropriate: it reads and writes nothing to storage. Apply the P2 fix and perform the required census check within this round, without reopening review.
+
+Validation limits: targeted tests could not start because the read-only sandbox blocked Go’s build directory. Discussion #1652 was inaccessible because networking was blocked. The committed diff passes `git diff --check`. I wrote nothing; concurrent uncommitted edits appeared during review and are excluded from this verdict.
+
+**READY AFTER FIXES**
\ No newline at end of file
diff --git a/docs/superpowers/reviews/FABLE-REVIEW-FINDINGS-recordview-walk-strays-R1.md b/docs/superpowers/reviews/FABLE-REVIEW-FINDINGS-recordview-walk-strays-R1.md
new file mode 100644
index 000000000..0fcc360fe
--- /dev/null
+++ b/docs/superpowers/reviews/FABLE-REVIEW-FINDINGS-recordview-walk-strays-R1.md
@@ -0,0 +1,12 @@
+# Fable review, round 1: fix/recordview-walk-strays at 41d51105
+
+Verdict: READY AFTER FIXES. No P1.
+
+- P2-1: publishHAIngressSnapshot runs sn.HAIngressRoutes (ListAllRecordsStrict, getEach, forEach) after Refresh/Rebuild returned, outside every net; with forEach re-raising, a panic there still ends the armed agent. Fix: recover there and publish the error. FIXED (internal/host/haingress.go haIngressRoutesOf).
+- P2-2: the per-scope recover and recoverLocked log only %v, dropping the stack. FIXED (panicStack: the worker's stack for a forEachPanic, else debug.Stack()).
+- P3: forEachPanic.Error embedded the whole stack. FIXED (one line).
+- P3: a deterministic panic in one scope alternated full walks with panicking refreshes. FIXED (per-scope net in readScope, holding the scope as unknown via failedApp).
+- P3: stray() quadratic on a flat store. FIXED (set).
+- P3 (follow-up, not changed): reconcileMu sites in internal/host (replicaplacement.go, movesoffline.go, movesoffline_land.go) unlock without defer; a panic recovered above them would leave the mutex held. None calls forEach between lock and unlock; the risk predates this branch.
+
+Security: no tenant-controlled path to an unparsable apps/ prefix found (store door canonicalKey and aclWriteAppFamily, applog.CheckApp builders); release.appPrefix and ~30 builders rely on callers validating names, not each door audited. Adjacent, pre-existing, low: aclWriteAppFamily does not require ValidApp, so a fleet box can create arbitrarily named but parsable app directories (walk cost only).
diff --git a/internal/host/changeindex_test.go b/internal/host/changeindex_test.go
index 7797d2d2a..9abd45636 100644
--- a/internal/host/changeindex_test.go
+++ b/internal/host/changeindex_test.go
@@ -857,3 +857,44 @@ func readConfigEnv(t *testing.T, dd string, rt registry.Route) string {
}
return string(b)
}
+
+// panicOnGetStore panics on reading one key while boom is set, as a bug
+// below the record view would.
+type panicOnGetStore struct {
+ *ciCountingStore
+ key string
+ boom atomic.Bool
+}
+
+func (s *panicOnGetStore) Get(ctx context.Context, key string) ([]byte, string, error) {
+ if s.boom.Load() && key == s.key {
+ panic("read of " + key)
+ }
+ return s.ciCountingStore.Get(ctx, key)
+}
+
+func (s *panicOnGetStore) GetIfChanged(ctx context.Context, key, etag string) ([]byte, string, bool, error) {
+ if s.boom.Load() && key == s.key {
+ panic("read of " + key)
+ }
+ return s.ciCountingStore.GetIfChanged(ctx, key, etag)
+}
+
+// A record view that panics is a view that cannot vouch (the 2026-12-02
+// roll: an armed walk panicked on a worker goroutine and took carlos-edge
+// down). viewStore hands back live, so the pass walks the bucket as an
+// unarmed box does, and uses the view again once it reads cleanly.
+func TestViewStoreFallsBackWhenTheViewPanics(t *testing.T) {
+ disarmView(t)
+ w := newCIWorld(t)
+ live := &panicOnGetStore{ciCountingStore: w.live, key: "accounts/" + w.acct + "/account.json"}
+ armView(t, live)
+ live.boom.Store(true)
+ if s, _, ok := viewStore(context.Background(), live); ok || s != release.Store(live) {
+ t.Fatal("viewStore used a view whose refresh panicked")
+ }
+ live.boom.Store(false)
+ if _, _, ok := viewStore(context.Background(), live); !ok {
+ t.Fatal("viewStore did not use the view once it read cleanly")
+ }
+}
diff --git a/internal/host/haingress.go b/internal/host/haingress.go
index f50e89cf4..46c733e63 100644
--- a/internal/host/haingress.go
+++ b/internal/host/haingress.go
@@ -3,8 +3,10 @@ package host
import (
"context"
"errors"
+ "fmt"
"log"
"os"
+ "runtime/debug"
"strings"
"sync"
"sync/atomic"
@@ -122,10 +124,24 @@ func publishHAIngressSnapshot(sn *provision.ViewSnapshot, err error) {
boxHAIngress.publish(nil, err)
return
}
- routes, err := sn.HAIngressRoutes(provisionTickConfig(os.Getenv).Region)
+ routes, err := haIngressRoutesOf(sn, provisionTickConfig(os.Getenv).Region)
boxHAIngress.publish(routes, err)
}
+// haIngressRoutesOf is sn.HAIngressRoutes with a net: it runs only on an
+// armed box, after the view's own Refresh or Rebuild has returned, so a
+// panic in it (forEach raises a worker's here) would end the process that
+// an unarmed box keeps. It becomes the publication's error instead.
+func haIngressRoutesOf(sn *provision.ViewSnapshot, region string) (routes map[string]registry.Route, err error) {
+ defer func() {
+ if r := recover(); r != nil {
+ log.Printf("agent: HA ingress: reading the record view panicked: %v\n%s", r, debug.Stack())
+ routes, err = nil, fmt.Errorf("agent: HA ingress: reading the record view panicked: %v", r)
+ }
+ }()
+ return sn.HAIngressRoutes(region)
+}
+
func wireHAIngressScan(ctx context.Context, s release.Store, cfg *provision.ReconcileConfig) {
cfg.HAIngress = func(records []provision.Record, err error) {
if err != nil {
diff --git a/internal/provision/plan9_b8_census_test.go b/internal/provision/plan9_b8_census_test.go
index 775de88d0..423a51ced 100644
--- a/internal/provision/plan9_b8_census_test.go
+++ b/internal/provision/plan9_b8_census_test.go
@@ -366,7 +366,7 @@ func TestPlan9B8RecordWriteCensus(t *testing.T) {
if len(got) < 100 {
t.Fatalf("census found only %d units under %s; the walk is broken", len(got), root)
}
- inventory := canaryRetire1634WriteCensusInventory()
+ inventory := recordviewWalkStraysWriteCensusInventory()
problems := append(censusDiff(inventory, got), censusPolicy(inventory)...)
if len(problems) > 0 {
t.Fatalf("record-write census rejected %d site(s); update the explicit inventory only after reviewing the source:\n %s", len(problems), strings.Join(problems, "\n "))
diff --git a/internal/provision/reconcile.go b/internal/provision/reconcile.go
index a407ab9d3..eb5bdba5f 100644
--- a/internal/provision/reconcile.go
+++ b/internal/provision/reconcile.go
@@ -19,6 +19,7 @@ import (
"log"
"net"
"os"
+ "runtime/debug"
"slices"
"strings"
"sync"
@@ -3537,10 +3538,19 @@ func getEach(ctx context.Context, s release.Store, keys []string) map[string]fet
}
// forEach runs f over items, listWalkers at a time, and returns when all
-// have finished.
+// have finished. A panic in f is caught on its worker and raised again on
+// the caller's goroutine once every worker has finished (a forEachPanic
+// carrying the worker's stack), so a caller can recover it as it would a
+// panic in sequential code. Left on the worker, it would end the process
+// before any caller could: the 2026-12-02 record-view walk panic took
+// carlos-edge down that way.
func forEach(items []string, f func(string)) {
const listWalkers = 8
- var wg sync.WaitGroup
+ var (
+ wg sync.WaitGroup
+ mu sync.Mutex
+ panicky *forEachPanic
+ )
sem := make(chan struct{}, listWalkers)
for _, it := range items {
wg.Add(1)
@@ -3548,10 +3558,44 @@ func forEach(items []string, f func(string)) {
go func(it string) {
defer wg.Done()
defer func() { <-sem }()
+ defer func() {
+ if r := recover(); r != nil {
+ mu.Lock()
+ if panicky == nil {
+ panicky = &forEachPanic{Item: it, Value: r, Stack: debug.Stack()}
+ }
+ mu.Unlock()
+ }
+ }()
f(it)
}(it)
}
wg.Wait()
+ if panicky != nil {
+ panic(panicky)
+ }
+}
+
+// forEachPanic is a forEach worker's panic, raised again on the caller's
+// goroutine: the item it was working on, the value it panicked with and the
+// worker's stack.
+type forEachPanic struct {
+ Item string
+ Value any
+ Stack []byte
+}
+
+// Error is one line; the stack is logged once, by whoever recovers it
+// (panicStack).
+func (p *forEachPanic) Error() string { return fmt.Sprintf("panic over %q: %v", p.Item, p.Value) }
+
+// panicStack is the stack to log for a recovered value: a forEach worker's
+// own, or the recovering goroutine's.
+func panicStack(r any) []byte {
+ if p, ok := r.(*forEachPanic); ok {
+ return p.Stack
+ }
+ return debug.Stack()
}
// SharedPoolToken is the CARLOS_POOLS token for the shared "" pool, so a
diff --git a/internal/provision/recordview.go b/internal/provision/recordview.go
index 2d660fbf6..03af7f47b 100644
--- a/internal/provision/recordview.go
+++ b/internal/provision/recordview.go
@@ -126,9 +126,10 @@ func viewScope(scope string) bool {
// (see Rebuild). Either way, no snapshot stays published as Complete once the
// view knows it is behind: consumers decide on Complete, and a strict reader
// over the snapshot fails where it would fail on the bucket.
-func (v *RecordView) Refresh(ctx context.Context) error {
+func (v *RecordView) Refresh(ctx context.Context) (err error) {
v.mu.Lock()
defer v.mu.Unlock()
+ defer v.recoverLocked(&err)
prev := v.snap.Load()
if prev == nil || v.rebuildDue {
return v.rebuildLocked(ctx, true)
@@ -216,12 +217,35 @@ func (v *RecordView) Refresh(ctx context.Context) error {
// walk's failure, so knownAccounts, Reconcile and the strict readers fail over
// it exactly as they fail on the bucket, and it is not Complete. The next
// Refresh walks again. A view that never published stays unpublished.
-func (v *RecordView) Rebuild(ctx context.Context) error {
+func (v *RecordView) Rebuild(ctx context.Context) (err error) {
v.mu.Lock()
defer v.mu.Unlock()
+ defer v.recoverLocked(&err)
return v.rebuildLocked(ctx, true)
}
+// recoverLocked is Refresh's and Rebuild's last-resort net, deferred under
+// mu: a panic anywhere in a refresh or a walk (a forEach worker's included,
+// which forEach raises again here) becomes the call's error, the next
+// Refresh walks again, and a published snapshot is replaced by one that is
+// not Complete. The callers already answer a refresh error by reading the
+// bucket as an unarmed binary does (viewStore, recordWalkStore), so a view
+// that cannot serve falls back to the walk instead of ending the process.
+func (v *RecordView) recoverLocked(err *error) {
+ r := recover()
+ if r == nil {
+ return
+ }
+ *err = fmt.Errorf("provision: record view: panicked: %v", r)
+ log.Printf("%v: reading the bucket until the next walk succeeds\n%s", *err, panicStack(r))
+ v.rebuildDue = true
+ if prev := v.snap.Load(); prev != nil {
+ failedSn := prev.clone()
+ failedSn.walkErr = *err
+ v.publish(failedSn)
+ }
+}
+
// poll is one index poll, bounded by pollTimeout inside ctx: it runs under
// mu, and the callers' contexts are long-lived, so a stalled index GET must
// not hold the view (and with it every reconcile pass) or the watch's shared
@@ -316,7 +340,21 @@ type scopeRead struct {
ok bool
}
-func (v *RecordView) readScope(ctx context.Context, prev *ViewSnapshot, scope string) scopeRead {
+func (v *RecordView) readScope(ctx context.Context, prev *ViewSnapshot, scope string) (r scopeRead) {
+ defer func() {
+ // The per-scope net, as in the walk: a panic re-reading one scope
+ // fails that scope, which stays pending, and the refresh goes on.
+ if p := recover(); p != nil {
+ log.Printf("provision: record view: re-reading %s panicked: %v: the scope is failed\n%s", scope, p, panicStack(p))
+ err := fmt.Errorf("provision: record view: re-reading %s panicked: %v", scope, p)
+ if _, ok := scopeAccount(scope); ok {
+ r = scopeRead{acct: &acctEntry{listErr: err, manifest: object{err: err}}}
+ } else {
+ a, b, _ := ScopeApp(scope)
+ r = scopeRead{app: failedApp(a, b, err)}
+ }
+ }
+ }()
if a, ok := scopeAccount(scope); ok {
e, ok := v.readAccount(ctx, a, prev.accounts[a])
return scopeRead{acct: e, ok: ok}
@@ -391,6 +429,17 @@ func (v *RecordView) readApp(ctx context.Context, a, b string, prev *appEntry, i
return e, ok
}
+// failedApp is the entry of an app whose read panicked: both listings and
+// all three per-app objects answer err, so the snapshot holds the app as
+// unknown, as a failed listing does, never as absent.
+func failedApp(a, b string, err error) *appEntry {
+ e := &appEntry{instErr: err, sideErr: err, objs: map[string]object{}}
+ for _, key := range []string{ManifestKey(a, b), SidecarManifestKey(a, b), release.AppTombstoneKey(a, b)} {
+ e.objs[key] = object{err: err}
+ }
+ return e
+}
+
// fetch reads key unless prev already holds the body the listing's ETag
// names.
func (v *RecordView) fetch(ctx context.Context, key, listed string, prev *object) object {
@@ -467,7 +516,9 @@ func (v *RecordView) walk(ctx context.Context, prev *ViewSnapshot) (*ViewSnapsho
return nil, nil, fmt.Errorf("list apps: %w", err)
}
for _, d := range dirs {
- every[strings.TrimSuffix(strings.TrimPrefix(d, "apps/"), "/")] = true
+ if a, ok := walkAccountDir(d); ok {
+ every[a] = true
+ }
}
}
for _, sub := range []string{"instances/", "sidecars/"} {
@@ -516,9 +567,25 @@ func (v *RecordView) walk(ctx context.Context, prev *ViewSnapshot) (*ViewSnapsho
}
return found[k]
}
+ // An apps/ prefix that does not parse as apps/<a>/<b> (an empty segment,
+ // which S3 holds happily: apps/<a>//x lists the common prefix apps/<a>//)
+ // is a stray. It is skipped and counted, never read, and never becomes a
+ // scope: every scope below parses with ScopeApp, so the per-app reads
+ // always find their listings.
+ strays := map[string]bool{}
+ stray := func(prefix string) {
+ if !strays[prefix] {
+ strays[prefix] = true
+ sn.appStrays = append(sn.appStrays, prefix)
+ }
+ }
if bucket {
for _, d := range w.dirs["apps/"].dirs {
- a := strings.TrimSuffix(strings.TrimPrefix(d, "apps/"), "/")
+ a, ok := walkAccountDir(d)
+ if !ok {
+ stray(d)
+ continue
+ }
ad, ok := w.dirs[d]
if !ok {
continue
@@ -528,7 +595,11 @@ func (v *RecordView) walk(ctx context.Context, prev *ViewSnapshot) (*ViewSnapsho
continue
}
for _, p := range ad.dirs {
- b := strings.TrimSuffix(strings.TrimPrefix(p, d), "/")
+ b, ok := strings.CutSuffix(strings.TrimPrefix(p, d), "/")
+ if _, _, valid := ScopeApp("apps/" + a + "/" + b); !ok || !valid {
+ stray(p)
+ continue
+ }
l := at(a, b)
l.inst, l.side = w.lists[p+"instances/"], w.lists[p+"sidecars/"]
}
@@ -536,7 +607,11 @@ func (v *RecordView) walk(ctx context.Context, prev *ViewSnapshot) (*ViewSnapsho
} else {
for _, ke := range w.lists["apps/"].kes {
parts := strings.SplitN(ke.Key, "/", 4)
- if len(parts) < 4 || parts[1] == "" || parts[2] == "" {
+ if len(parts) < 4 {
+ continue
+ }
+ if _, _, ok := ScopeApp("apps/" + parts[1] + "/" + parts[2]); !ok {
+ stray("apps/" + parts[1] + "/" + parts[2] + "/")
continue
}
l := at(parts[1], parts[2])
@@ -548,25 +623,57 @@ func (v *RecordView) walk(ctx context.Context, prev *ViewSnapshot) (*ViewSnapsho
}
}
}
+ if len(sn.appStrays) > 0 {
+ slices.Sort(sn.appStrays)
+ log.Printf("provision: record view: walk skipped %d apps/ prefix(es) that are not apps/<account>/<app>/ (first %q): no app is read there", len(sn.appStrays), sn.appStrays[0])
+ }
ids := make([]string, 0, len(found))
for k := range found {
ids = append(ids, "apps/"+k[0]+"/"+k[1])
}
var mu sync.Mutex
forEach(ids, func(scope string) {
+ var e *appEntry
+ ok := false
+ defer func() {
+ // The last-resort net: a panic reading one app fails that scope,
+ // never the walk or the process. Every scope parses and has its
+ // listings, so nothing above is meant to reach it.
+ if r := recover(); r != nil {
+ log.Printf("provision: record view: reading %s panicked: %v: the scope is failed and re-read on the next refresh\n%s", scope, r, panicStack(r))
+ a, b, _ := ScopeApp(scope)
+ e, ok = failedApp(a, b, fmt.Errorf("provision: record view: reading %s panicked: %v", scope, r)), false
+ }
+ mu.Lock()
+ defer mu.Unlock()
+ if a, b, valid := ScopeApp(scope); valid && e != nil {
+ sn.setApp(a, b, e)
+ }
+ if !ok {
+ failed[scope] = true
+ }
+ }()
a, b, _ := ScopeApp(scope)
l := found[[2]string{a, b}]
- e, ok := v.readApp(ctx, a, b, prev.app(a, b), l.inst, l.side)
- mu.Lock()
- defer mu.Unlock()
- sn.setApp(a, b, e)
- if !ok {
- failed[scope] = true
- }
+ e, ok = v.readApp(ctx, a, b, prev.app(a, b), l.inst, l.side)
})
return sn, failed, nil
}
+// walkAccountDir parses one ListDirs("apps/") entry, apps/<a>/, refusing an
+// empty or nested account segment.
+func walkAccountDir(d string) (string, bool) {
+ a, ok := strings.CutPrefix(d, "apps/")
+ if !ok {
+ return "", false
+ }
+ a, ok = strings.CutSuffix(a, "/")
+ if !ok || a == "" || strings.Contains(a, "/") {
+ return "", false
+ }
+ return a, true
+}
+
// walkStore is the live store as the backstop walk sees it: every listing
// carries ETags and every read is conditional on what the previous snapshot
// held, and both are kept for the snapshot the walk builds. Each listing is
diff --git a/internal/provision/recordview_store.go b/internal/provision/recordview_store.go
index 23056c588..697d3e5fd 100644
--- a/internal/provision/recordview_store.go
+++ b/internal/provision/recordview_store.go
@@ -27,11 +27,12 @@ type ViewSnapshot struct {
Epoch uint64
Complete bool
- accounts map[string]*acctEntry // sqid -> accounts/<sqid>/
- strays []string // keys under accounts/ outside every account scope, from the last walk
- apps map[string]map[string]*appEntry // acct -> app -> apps/<acct>/<app>/
- dirErrs map[string]error // acct -> why the last walk could not list apps/<acct>/
- walkErr error // the last walk failed at the top: accounts/ and apps/ answer it
+ accounts map[string]*acctEntry // sqid -> accounts/<sqid>/
+ strays []string // keys under accounts/ outside every account scope, from the last walk
+ apps map[string]map[string]*appEntry // acct -> app -> apps/<acct>/<app>/
+ appStrays []string // apps/ prefixes the last walk could not parse as apps/<a>/<b>, skipped
+ dirErrs map[string]error // acct -> why the last walk could not list apps/<acct>/
+ walkErr error // the last walk failed at the top: accounts/ and apps/ answer it
// retired is the report's retirement confirmations for this snapshot
// (lifetime_report_cache.go): never copied by clone, so a new snapshot
@@ -131,6 +132,7 @@ func (sn *ViewSnapshot) clone() *ViewSnapshot {
strays: sn.strays,
apps: make(map[string]map[string]*appEntry, len(sn.apps)),
dirErrs: sn.dirErrs,
+ appStrays: sn.appStrays,
walkErr: sn.walkErr,
}
for a, inner := range sn.apps {
diff --git a/internal/provision/recordview_strays_test.go b/internal/provision/recordview_strays_test.go
new file mode 100644
index 000000000..e6a7327d0
--- /dev/null
+++ b/internal/provision/recordview_strays_test.go
@@ -0,0 +1,267 @@
+package provision
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "os"
+ "reflect"
+ "slices"
+ "strings"
+ "sync"
+ "testing"
+
+ "github.com/carlosframework/platform/internal/release"
+)
+
+// strayKeyStore lists keys an S3 bucket can hold and a directory cannot: an
+// apps/ key with an empty segment. ListDirs answers as S3 does with a "/"
+// delimiter, so apps/<a>//x yields the common prefix apps/<a>//, and apps//b/x
+// yields apps// under apps/. Reading a stray answers not-found.
+type strayKeyStore struct {
+ *viewCountingStore
+ strays []string
+}
+
+func (s *strayKeyStore) under(prefix string) []string {
+ var out []string
+ for _, k := range s.strays {
+ if strings.HasPrefix(k, prefix) {
+ out = append(out, k)
+ }
+ }
+ return out
+}
+
+func (s *strayKeyStore) List(ctx context.Context, prefix string) ([]string, error) {
+ keys, err := s.viewCountingStore.List(ctx, prefix)
+ if err != nil {
+ return nil, err
+ }
+ keys = append(keys, s.under(prefix)...)
+ slices.Sort(keys)
+ return keys, nil
+}
+
+func (s *strayKeyStore) ListETags(ctx context.Context, prefix string) ([]release.KeyETag, error) {
+ kes, err := s.viewCountingStore.ListETags(ctx, prefix)
+ if err != nil {
+ return nil, err
+ }
+ for _, k := range s.under(prefix) {
+ kes = append(kes, release.KeyETag{Key: k, ETag: "stray"})
+ }
+ slices.SortFunc(kes, func(x, y release.KeyETag) int { return strings.Compare(x.Key, y.Key) })
+ return kes, nil
+}
+
+func (s *strayKeyStore) ListDirs(ctx context.Context, prefix string) ([]string, error) {
+ dirs, err := s.viewCountingStore.ListDirs(ctx, prefix)
+ if err != nil {
+ return nil, err
+ }
+ for _, k := range s.under(prefix) {
+ if i := strings.Index(k[len(prefix):], "/"); i >= 0 {
+ if d := k[:len(prefix)+i+1]; !slices.Contains(dirs, d) {
+ dirs = append(dirs, d)
+ }
+ }
+ }
+ slices.Sort(dirs)
+ return dirs, nil
+}
+
+func (s *strayKeyStore) isStray(key string) bool { return slices.Contains(s.strays, key) }
+
+func (s *strayKeyStore) Get(ctx context.Context, key string) ([]byte, string, error) {
+ if s.isStray(key) {
+ return nil, "", os.ErrNotExist
+ }
+ return s.viewCountingStore.Get(ctx, key)
+}
+
+func (s *strayKeyStore) GetIfChanged(ctx context.Context, key, etag string) ([]byte, string, bool, error) {
+ if s.isStray(key) {
+ return nil, "", false, os.ErrNotExist
+ }
+ return s.viewCountingStore.GetIfChanged(ctx, key, etag)
+}
+
+// An apps/ key the walk cannot parse (an empty account or app segment, as an
+// S3 bucket can hold and a 2026-12-02 production roll met) is a stray: the
+// walk skips and counts it, the snapshot is complete and answers what the
+// bucket does, and nothing panics. Before the fix the bucket-shaped walk
+// dereferenced a nil listing for the scope apps/<a>/ and took the process
+// down.
+func TestViewWalkSkipsStrayAppKeys(t *testing.T) {
+ t.Parallel()
+ for _, bucket := range []bool{false, true} {
+ t.Run(fmt.Sprintf("bucket=%v", bucket), func(t *testing.T) {
+ t.Parallel()
+ f := newViewFixture(t, bucket, true)
+ a := f.acct[0]
+ strays := []string{
+ "apps/" + a + "//errors/box-1/2026-09-22-01/0001-219.jsonl.gz",
+ "apps//shop/errors/box-1/2026-09-22-01/0001-219.jsonl.gz",
+ }
+ s := &strayKeyStore{viewCountingStore: f.live, strays: strays}
+ v := NewRecordView(s, release.NewChangeWatch(s))
+
+ sn := mustRebuild(t, v)
+ if !sn.Complete {
+ t.Fatal("a stray key made the walk incomplete")
+ }
+ if len(sn.appStrays) != 2 {
+ t.Fatalf("strays counted %v, want the two stray prefixes", sn.appStrays)
+ }
+ if got, want := readWalk(t, sn.Store(s), f), readWalk(t, s, f); !reflect.DeepEqual(got.Records, want.Records) {
+ t.Fatalf("records over the snapshot %v, over the bucket %v", got.Records, want.Records)
+ }
+ // A later change still refreshes.
+ f.record(t, s, f.acct[1], "docs", "two")
+ sn2 := mustRefresh(t, v)
+ if !sn2.Complete || len(viewHosts(t, sn2.Store(s))) != 6 {
+ t.Fatalf("refresh after a stray: complete %v hosts %v", sn2.Complete, viewHosts(t, sn2.Store(s)))
+ }
+ })
+ }
+}
+
+// panickyStore panics on reading one key, as a bug below the view would.
+type panickyStore struct {
+ *viewCountingStore
+ mu sync.Mutex
+ key string
+}
+
+func (s *panickyStore) set(k string) { s.mu.Lock(); s.key = k; s.mu.Unlock() }
+
+func (s *panickyStore) check(key string) {
+ s.mu.Lock()
+ k := s.key
+ s.mu.Unlock()
+ if key == k {
+ panic("read of " + key)
+ }
+}
+
+func (s *panickyStore) Get(ctx context.Context, key string) ([]byte, string, error) {
+ s.check(key)
+ return s.viewCountingStore.Get(ctx, key)
+}
+
+func (s *panickyStore) GetIfChanged(ctx context.Context, key, etag string) ([]byte, string, bool, error) {
+ s.check(key)
+ return s.viewCountingStore.GetIfChanged(ctx, key, etag)
+}
+
+// A panic on a walk or refresh worker never leaves the view's goroutines: a
+// panic reading one app fails that scope, a panic anywhere else fails the
+// call, and either way the snapshot stops vouching (not Complete), so every
+// caller reads the bucket as an unarmed binary does. Once the panic stops,
+// the next Refresh serves again.
+func TestViewPanicFailsTheScopeNotTheProcess(t *testing.T) {
+ t.Parallel()
+ for _, bucket := range []bool{false, true} {
+ t.Run(fmt.Sprintf("bucket=%v", bucket), func(t *testing.T) {
+ t.Parallel()
+ f := newViewFixture(t, bucket, true)
+ s := &panickyStore{viewCountingStore: f.live}
+ v := NewRecordView(s, release.NewChangeWatch(s))
+ a := f.acct[0]
+
+ // One app's record: that scope fails, the walk does not.
+ s.set(RecordKey(a, "shop", viewRecord(a, "shop", "one").Host))
+ if err := v.Rebuild(ctx); err != nil {
+ t.Fatalf("a panic in one app failed the walk: %v", err)
+ }
+ if sn := v.Snapshot(); sn == nil || sn.Complete {
+ t.Fatal("a scope that panicked was published as complete")
+ }
+ assertPanickedAppUnknown(t, v.Snapshot().Store(s), a, "shop")
+
+ // An account manifest, read outside any app scope: the call fails.
+ s.set(accountManifestKey(f.acct[1]))
+ if err := v.Rebuild(ctx); err == nil || !strings.Contains(err.Error(), "panicked") {
+ t.Fatalf("Rebuild over a panicking read: %v", err)
+ }
+ if sn := v.Snapshot(); sn == nil || sn.Complete {
+ t.Fatal("a walk that panicked left a complete snapshot published")
+ }
+ if err := v.Refresh(ctx); err == nil {
+ t.Fatal("Refresh walked over the panicking read without an error")
+ }
+
+ s.set("")
+ if sn := mustRefresh(t, v); !sn.Complete {
+ t.Fatal("the view did not recover once the panic stopped")
+ }
+ assertMatchesWalk(t, f, v.Snapshot())
+
+ // A panic re-reading one moved scope on Refresh fails that scope
+ // only: the refresh returns, the snapshot is not Complete, and the
+ // app answers a failure rather than absent.
+ f.record(t, s, f.acct[1], "docs", "two")
+ s.set(RecordKey(f.acct[1], "docs", viewRecord(f.acct[1], "docs", "two").Host))
+ if err := v.Refresh(ctx); err != nil {
+ t.Fatalf("a panic in one scope failed the refresh: %v", err)
+ }
+ sn := v.Snapshot()
+ if sn.Complete {
+ t.Fatal("a scope that panicked on refresh was published as complete")
+ }
+ assertPanickedAppUnknown(t, sn.Store(s), f.acct[1], "docs")
+ s.set("")
+ if sn := mustRefresh(t, v); !sn.Complete {
+ t.Fatal("the scope was not re-read once the panic stopped")
+ }
+ assertMatchesWalk(t, f, v.Snapshot())
+ })
+ }
+}
+
+// forEach raises a worker's panic again on the caller's goroutine, after
+// every worker has finished, so the caller can recover it.
+func TestForEachRaisesWorkerPanicOnCaller(t *testing.T) {
+ t.Parallel()
+ var done sync.Map
+ got := func() (r any) {
+ defer func() { r = recover() }()
+ forEach([]string{"a", "b", "c", "d"}, func(it string) {
+ defer done.Store(it, true)
+ if it == "c" {
+ panic("boom")
+ }
+ })
+ return nil
+ }()
+ p, ok := got.(*forEachPanic)
+ if !ok || p.Item != "c" || p.Value != "boom" || len(p.Stack) == 0 {
+ t.Fatalf("recovered %#v, want the worker's panic over c", got)
+ }
+ for _, it := range []string{"a", "b", "c", "d"} {
+ if _, ok := done.Load(it); !ok {
+ t.Fatalf("forEach raised before %s finished", it)
+ }
+ }
+}
+
+// assertPanickedAppUnknown checks that an app whose read panicked is held as
+// unknown over the snapshot, never as absent: a strict reader fails, a
+// tolerant one reports incomplete, and its manifests and records answer an
+// error rather than not-found.
+func assertPanickedAppUnknown(t *testing.T, s release.Store, acct, app string) {
+ t.Helper()
+ if _, _, err := ListAllRecordsStrict(ctx, s); err == nil {
+ t.Fatal("a strict read over the panicked app succeeded")
+ }
+ if _, complete, err := ListAllRecordsTolerant(ctx, s); err == nil && complete {
+ t.Fatal("a tolerant read over the panicked app reported complete")
+ }
+ if _, err := GetManifest(ctx, s, acct, app); err == nil || errors.Is(err, os.ErrNotExist) {
+ t.Fatalf("the panicked app's manifest answered %v, want a read failure", err)
+ }
+ if _, _, err := s.Get(ctx, RecordKey(acct, app, viewRecord(acct, app, "one").Host)); err == nil || errors.Is(err, os.ErrNotExist) {
+ t.Fatalf("a record of the panicked app answered %v, want a read failure", err)
+ }
+}
diff --git a/internal/provision/recordview_walk_strays_census_test.go b/internal/provision/recordview_walk_strays_census_test.go
new file mode 100644
index 000000000..61a519f5a
--- /dev/null
+++ b/internal/provision/recordview_walk_strays_census_test.go
@@ -0,0 +1,33 @@
+package provision
+
+// recordviewWalkStraysWriteCensusInventory is the record-view walk fix's
+// review of the record-write census (discussion #1652). RecordView.walk now
+// skips any apps/ prefix that does not parse as apps/<a>/<b>/ (an empty
+// segment), records it in the snapshot's appStrays and logs it once per
+// walk, and fails only one scope when reading an app panics (readScope
+// likewise), holding it as unknown through failedApp. It reads
+// listings and record bodies exactly as before and writes nothing: kinds and
+// class unchanged, only the digest moves.
+func recordviewWalkStraysWriteCensusInventory() []censusEntry {
+ entries := append([]censusEntry(nil), canaryRetire1634WriteCensusInventory()...)
+ reviewed := []censusEntry{
+ // readScope gains the per-scope net; failedApp names the three per-app
+ // keys only to cache a failure under them in memory. Neither writes.
+ {"internal/provision/recordview.go", "RecordView.readScope", "key-site", "lit:instances,lit:sidecars", "f314650a8244afeec4999ae438fceeb996f046e50e2e1bbfc553e9c711fb1702"},
+ {"internal/provision/recordview.go", "failedApp", "key-site", "key:SidecarManifestKey", "074739a9461953690506bfea1f0d37a33fb70fcee21702b60d82836b6a7e276a"},
+ {"internal/provision/recordview.go", "RecordView.walk", "key-site", "lit:instances,lit:sidecars", "18c4fb4f6d17ac03b3dd9d8f1c4b444163adaf87a9cc57937242e5caf0c26b6d"},
+ }
+ for _, r := range reviewed {
+ replaced := false
+ for i, e := range entries {
+ if e.File == r.File && e.Unit == r.Unit {
+ entries[i], replaced = r, true
+ break
+ }
+ }
+ if !replaced {
+ entries = append(entries, r)
+ }
+ }
+ return entries
+}
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index 4a18ae616..5173628de 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -328,3 +328,4 @@ plan14-root-reads-stage-spool-1582.tsv d57c8e17fe2db097089c9dad5cf108c10d9bd4bf7
plan14-root-reads-instance-senders-1.tsv d57c8e17fe2db097089c9dad5cf108c10d9bd4bf749831a6e32b3f057355b3d9
plan14-root-reads-canary-retire-cli-1634.tsv d57c8e17fe2db097089c9dad5cf108c10d9bd4bf749831a6e32b3f057355b3d9
plan14-root-reads-precert-cname-1441.tsv c566f93a6751a5c801787d2b0c6d965301af68fcf6d3a288d762f08be90f3248
+plan14-root-reads-recordview-walk-strays.tsv 594b9e8f940d929bc1d03df932952bde791955b8a8f9dde37ee9c7cd7b2a0042
diff --git a/internal/provision/testdata/plan14-root-reads-recordview-walk-strays.tsv b/internal/provision/testdata/plan14-root-reads-recordview-walk-strays.tsv
new file mode 100644
index 000000000..4db1d3e01
--- /dev/null
+++ b/internal/provision/testdata/plan14-root-reads-recordview-walk-strays.tsv
@@ -0,0 +1,9 @@
+# Census overlay recordview-walk-strays, written by census-propose (#369). census-ruling-recordview-walk-strays, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-recordview-walk-strays.md.
+# 1 body, 0 sites, 2 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+# 1 new dispositions: 0 reads re-frozen at their disposition with the claim, 1 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other.
+@legacy 865a08f999f5e86fbc6a39347c859422b02b7e9cbf4b8b166da3cd638124d1b4 internal/host/haingress.go publishHAIngressSnapshot legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-g2-fixes;basis=Ignore older snapshot epochs and publish the complete cached record view for the configured region; new indirect cached record/manifest reads, no live fallback.;rev3=census-ruling-recordview-walk-strays;basis=calls the new haIngressRoutesOf, which runs sn.HAIngressRoutes unchanged under a recover that turns a panic into the publication error; no new read whole:Route@390 19cf7ed0fc94eaec10a68c19a5584190bdc33107dab2e34cb86f2d0a892fdc26
+@legacy 5c0fa8d2b9d644e3fa41add82c673cd73f806b55ae5cb27f51dad102db4267cf internal/host/haingress.go haIngressRoutesOf legacy accepted-legacy accepted-legacy;rev3=census-ruling-recordview-walk-strays;basis=new: sn.HAIngressRoutes under a recover; reads only the record view snapshot, as before whole:Route@260 5ed45076ab9d4b3ae58e6180a730d5f40fed738889e12452fa448d6635870896
+internal/host/haingress.go publishHAIngressSnapshot legacy accepted-legacy accepted-legacy;rev3=census-ruling-region-ha-g2-fixes;basis=Ignore older snapshot epochs and publish the complete cached record view for the configured region; new indirect cached record/manifest reads, no live fallback.;rev3=census-ruling-recordview-walk-strays;basis=calls the new haIngressRoutesOf, which runs sn.HAIngressRoutes unchanged under a recover that turns a panic into the publication error; no new read whole:Route@390 19cf7ed0fc94eaec10a68c19a5584190bdc33107dab2e34cb86f2d0a892fdc26
+internal/host/haingress.go haIngressRoutesOf legacy accepted-legacy accepted-legacy;rev3=census-ruling-recordview-walk-strays;basis=new: sn.HAIngressRoutes under a recover; reads only the record view snapshot, as before whole:Route@260 5ed45076ab9d4b3ae58e6180a730d5f40fed738889e12452fa448d6635870896
+@coverage internal/host 300e688b3e19922b04a8f19860203cd89943e0da7e0d97d1cc703d83d9800c05
+@coverage internal/provision 9cad2657c1e972e14f71613067af7c89d51439ae4d4e7e385952ac7a7d0eb787