release: a scoped key signs for its grant's account only (hunt H3-M2)
Key grants now name one account. MintKeyGrant requires it (carlos release-keygen --scope gains --account; the console's per-request deploy grant takes the request's account). Signers refuse another account before any write, and boxes refuse a channel pointer or promotion record whose signed account is not the grant's, and one signed under a grant that names no account (ErrGrantUnbound). The write verbs still read such a head, so a repeat promote, rollback or resign repairs it; the repair listing names it. The lapsed-grant half stays open: a box cannot tell when a scoped signature was made. Options and a recommendation for Paul are in docs/superpowers/notes/2026-11-29-scoped-key-expiry.md; its hunt test is skipped pointing there. Rollout: consoles and CLIs first; remint scoped CI keys with --account; carlos channels digests REPAIR listing empty before boxes roll.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
29 files changed,
+689
−70
cli.go+6 −5docs/site/cli.md+4 −3docs/superpowers/notes/2026-11-29-scoped-key-expiry.md+80 −0docs/superpowers/notes/census-proposal-sec-h3-m2-scoped-key.md+11 −0internal/console/apicli.go+2 −2internal/console/deployscope.go+6 −5internal/console/deploysign_test.go+6 −1internal/dbreads/envelope_test.go+1 −1internal/provision/plan9_b8_census_test.go+1 −1internal/provision/sec_h3_m2_scoped_key_census_test.go+41 −0internal/provision/testdata/plan14-root-reads-chain.tsv+1 −0internal/provision/testdata/plan14-root-reads-sec-h3-m2-scoped-key.tsv+4 −0internal/release/authorize_record_test.go+1 −1internal/release/digestmarker_test.go+1 −1internal/release/digests.go+10 −4internal/release/grant.go+55 −3internal/release/grant_test.go+29 −21internal/release/hunt_H3-M2_test.go+89 −0internal/release/production_test.go+1 −1internal/release/promotion.go+3 −2internal/release/promotion_test.go+1 −1internal/release/release.go+22 −7internal/release/release_test.go+1 −1internal/release/resign.go+1 −1internal/release/scopedaccount_test.go+275 −0internal/release/scopedverify_test.go+1 −0internal/release/signer.go+10 −5internal/release/writers_test.go+1 −1scopedkeys_e2e_test.go+25 −3
CI failed — 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-9Sh7S0
.amadan/test-gate.sh
go: downloading github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.68.0
go: downloading github.com/aws/aws-sdk-go-v2/service/costexplorer v1.67.5
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading golang.org/x/net v0.62.0
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/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/sys v0.49.0
go: downloading golang.org/x/crypto v0.58.0
go: downloading golang.org/x/mod v0.41.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/pion/dtls/v3 v3.1.4
go: downloading github.com/pion/transport/v4 v4.0.2
go: downloading github.com/pion/randutil v0.1.0
go: downloading github.com/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/klauspost/compress v1.20.2
go: downloading github.com/wlynxg/anet v0.0.5
go: downloading github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0
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/pierrec/lz4/v4 v4.1.22
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/memory v1.11.0
go: downloading github.com/google/uuid v1.6.0
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading modernc.org/mathutil v1.7.1
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec
=== launchctx (4 s, from +0 s)
ok amadan.net/carlos/platform.git/launchctx 0.016s
? amadan.net/carlos/platform.git/launchctx/controlname [no test files]
? amadan.net/carlos/platform.git/launchctx/wireid [no test files]
=== vet (177 s, from +0 s)
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/mathutil v1.7.1
=== vet-tags (194 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 modernc.org/mathutil v1.7.1
=== gofmt (1 s, from +0 s)
gofmt -l .: clean
=== rest (387 s, from +15 s)
ok github.com/carlosframework/platform/cmd/carlos-media 128.202s
? github.com/carlosframework/platform/cmd/changelog [no test files]
ok github.com/carlosframework/platform/cmd/console 214.113s
ok github.com/carlosframework/platform/cmd/mediaimage 45.790s
ok github.com/carlosframework/platform/cmd/moveprobe 16.089s
ok github.com/carlosframework/platform/cmd/pricebook-export 0.064s
ok github.com/carlosframework/platform/cmd/rootfswitness 0.188s
ok github.com/carlosframework/platform/cmd/runsc-assets 0.134s
ok github.com/carlosframework/platform/cmd/zddprobe 0.999s
ok github.com/carlosframework/platform/internal/agentsock 0.069s
ok github.com/carlosframework/platform/internal/alerting 0.020s
ok github.com/carlosframework/platform/internal/analytics 0.283s
ok github.com/carlosframework/platform/internal/appconfig 46.248s
ok github.com/carlosframework/platform/internal/apperr 0.389s
ok github.com/carlosframework/platform/internal/applog 6.207s
ok github.com/carlosframework/platform/internal/apppolicy 2.637s
ok github.com/carlosframework/platform/internal/assetcache 0.791s
ok github.com/carlosframework/platform/internal/awsinv 0.014s
ok github.com/carlosframework/platform/internal/awsmanaged 8.008s
ok github.com/carlosframework/platform/internal/awsregiongroup 0.777s
ok github.com/carlosframework/platform/internal/awsterminations 0.013s
ok github.com/carlosframework/platform/internal/backupswords 0.008s
ok github.com/carlosframework/platform/internal/billing 0.127s
ok github.com/carlosframework/platform/internal/billing/billingtest 0.021s
ok github.com/carlosframework/platform/internal/billingstripe 2.506s
ok github.com/carlosframework/platform/internal/boxchoice 0.089s
ok github.com/carlosframework/platform/internal/boxid 2.000s
? 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.013s
ok github.com/carlosframework/platform/internal/boxself 0.174s
ok github.com/carlosframework/platform/internal/boxvolumes 0.044s
ok github.com/carlosframework/platform/internal/caps 5.552s
ok github.com/carlosframework/platform/internal/certwarm 0.008s
ok github.com/carlosframework/platform/internal/cgroup 1.530s
ok github.com/carlosframework/platform/internal/changelog 4.674s
ok github.com/carlosframework/platform/internal/clamd 0.060s
? github.com/carlosframework/platform/internal/cliflag [no test files]
ok github.com/carlosframework/platform/internal/clireg 0.024s
ok github.com/carlosframework/platform/internal/codehealth 18.317s
ok github.com/carlosframework/platform/internal/compute 0.018s
ok github.com/carlosframework/platform/internal/consolefleet 0.009s
? github.com/carlosframework/platform/internal/controlname [no test files]
? github.com/carlosframework/platform/internal/controlsock [no test files]
ok github.com/carlosframework/platform/internal/dbdoor 11.963s
ok github.com/carlosframework/platform/internal/dbdoor/dbdoortest 0.051s
ok github.com/carlosframework/platform/internal/dbquery 0.015s
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000003
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
--- FAIL: TestOwnerDeadlineEndsAHungRead (0.46s)
read_test.go:426: result {State:failed Code:interrupted Box:uk-1 LastSeq:0 Started:2026-11-29 22:16:35.387634079 +0000 UTC Ended:2026-11-29 22:16:35.658161296 +0000 UTC Sealed:REJSMQSC5OTZ2pFfLXIpeDPbfxpr5Yu0ReTG1OhspD7tQUGLEvl4pbCkaz4gTbpAuWtL0ZHEh5gxaUHqrq8kcJyHNyzJQrpOMnaB4m8sFB/Cus43Am8XyjjHOext++risYd5+ZOKKUYSAnKmMtjNLdGMWECZ4Wi/+BDuLIuEjAYjgrozkUlGyHk07g2Q79QUwcqC4hKHajp3xpZue6xrTc69ulat38k3KiCCjBsIaMu4S7leQx4fRN8322tV7MQPiX+3TZjvgCs7zVZWrfAROpsfspQLp+g5H9SH3K8=}
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000003 maxTXID=0000000000000003 size=454
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000003
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000003
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000003 maxTXID=0000000000000003 size=454
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000003
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000003
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000003 maxTXID=0000000000000003 size=454
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000003
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:35 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:35 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:36 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000003
2026/11/29 22:16:36 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000003 maxTXID=0000000000000003 size=454
2026/11/29 22:16:36 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000003
2026/11/29 22:16:36 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000004
2026/11/29 22:16:36 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000004 maxTXID=0000000000000004 size=537
2026/11/29 22:16:36 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000004 txid.db=0000000000000004
2026/11/29 22:16:36 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:36 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:36 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:36 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:36 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:36 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:16:36 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000003
2026/11/29 22:16:36 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000003 maxTXID=0000000000000003 size=454
2026/11/29 22:16:36 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000003
2026/11/29 22:16:36 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:16:36 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:16:36 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:16:36 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:16:36 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:16:36 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
FAIL
FAIL github.com/carlosframework/platform/internal/dbreads 3.071s
? github.com/carlosframework/platform/internal/dbreads/dbreadstest [no test files]
ok github.com/carlosframework/platform/internal/dbverify 0.023s
ok github.com/carlosframework/platform/internal/demo 0.007s
ok github.com/carlosframework/platform/internal/demobuild 5.089s
ok github.com/carlosframework/platform/internal/democlaim 0.478s
ok github.com/carlosframework/platform/internal/devbox 17.243s
ok github.com/carlosframework/platform/internal/dnsrec 0.005s
ok github.com/carlosframework/platform/internal/docsite 0.188s
ok github.com/carlosframework/platform/internal/domainreg 0.011s
ok github.com/carlosframework/platform/internal/domains 72.351s
ok github.com/carlosframework/platform/internal/doorkey 0.040s
ok github.com/carlosframework/platform/internal/economics 0.038s
ok github.com/carlosframework/platform/internal/edgefence 0.103s
ok github.com/carlosframework/platform/internal/edgeguard 0.556s
? github.com/carlosframework/platform/internal/edgeproof [no test files]
ok github.com/carlosframework/platform/internal/edgesfile 0.143s
ok github.com/carlosframework/platform/internal/egressaddr 0.009s
ok github.com/carlosframework/platform/internal/execsandbox 112.299s
ok github.com/carlosframework/platform/internal/fileacl 0.012s
ok github.com/carlosframework/platform/internal/fleetapi 2.513s
ok github.com/carlosframework/platform/internal/fleetstore 0.016s
ok github.com/carlosframework/platform/internal/fxrate 0.025s
ok github.com/carlosframework/platform/internal/gate 7.150s
ok github.com/carlosframework/platform/internal/genselect 0.104s
ok github.com/carlosframework/platform/internal/geo 0.040s
ok github.com/carlosframework/platform/internal/geoip 0.127s
ok github.com/carlosframework/platform/internal/groupadmission 0.021s
ok github.com/carlosframework/platform/internal/grouprollaws 17.510s
ok github.com/carlosframework/platform/internal/hadeparture 0.025s
ok github.com/carlosframework/platform/internal/hafresh 0.021s
ok github.com/carlosframework/platform/internal/hairpin 0.244s
ok github.com/carlosframework/platform/internal/historyreadback 1.365s
ok github.com/carlosframework/platform/internal/hostactors 24.598s
ok github.com/carlosframework/platform/internal/hostbox 22.912s
ok github.com/carlosframework/platform/internal/hostclaim 2.960s
ok github.com/carlosframework/platform/internal/hostenv 0.042s
ok github.com/carlosframework/platform/internal/hostevidence 0.038s
ok github.com/carlosframework/platform/internal/hostexec 25.858s
ok github.com/carlosframework/platform/internal/hostfence 0.315s
ok github.com/carlosframework/platform/internal/hostfiles 26.931s
ok github.com/carlosframework/platform/internal/hostfloor 0.238s
ok github.com/carlosframework/platform/internal/hostguard 1.552s
ok github.com/carlosframework/platform/internal/hostops 8.369s
? github.com/carlosframework/platform/internal/hostops/fencerelease [no test files]
ok github.com/carlosframework/platform/internal/hostops/internal/fencerelease 0.009s
ok github.com/carlosframework/platform/internal/hostquarantine 0.004s
ok github.com/carlosframework/platform/internal/hostrelocate 1.736s
ok github.com/carlosframework/platform/internal/hostresolve 0.807s
ok github.com/carlosframework/platform/internal/hostwrite 0.008s
ok github.com/carlosframework/platform/internal/infraview 0.009s
ok github.com/carlosframework/platform/internal/ingresshealth 0.008s
ok github.com/carlosframework/platform/internal/ingresshealth/awstg 0.018s
ok github.com/carlosframework/platform/internal/instancectl 67.543s
ok github.com/carlosframework/platform/internal/instanceexec 9.109s
ok github.com/carlosframework/platform/internal/instancefs 18.460s
ok github.com/carlosframework/platform/internal/instancekey 0.007s
ok github.com/carlosframework/platform/internal/instanceupdates 0.031s
ok github.com/carlosframework/platform/internal/interactive 0.658s
ok github.com/carlosframework/platform/internal/launchd 0.024s
ok github.com/carlosframework/platform/internal/layout 27.057s
ok github.com/carlosframework/platform/internal/layout/pubclass 109.773s
ok github.com/carlosframework/platform/internal/lbhealth 0.010s
ok github.com/carlosframework/platform/internal/lease 144.291s
ok github.com/carlosframework/platform/internal/lease/leasetest 1.713s
ok github.com/carlosframework/platform/internal/lease/locktest 0.019s
ok github.com/carlosframework/platform/internal/ledger 0.075s
ok github.com/carlosframework/platform/internal/mail 0.965s
ok github.com/carlosframework/platform/internal/mailer 0.895s
ok github.com/carlosframework/platform/internal/mailsubmit 1.751s
ok github.com/carlosframework/platform/internal/mailwire 0.013s
ok github.com/carlosframework/platform/internal/maintenance 0.185s
ok github.com/carlosframework/platform/internal/maintenanceexec 8.375s
ok github.com/carlosframework/platform/internal/maintenanceguard 0.404s
ok github.com/carlosframework/platform/internal/managedboot 3.760s
? 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.034s
ok github.com/carlosframework/platform/internal/media/mediatest 0.012s
ok github.com/carlosframework/platform/internal/mediaaws 64.524s
ok github.com/carlosframework/platform/internal/mediahandler 43.731s
ok github.com/carlosframework/platform/internal/mediajobs 1.249s
ok github.com/carlosframework/platform/internal/medialocal 10.087s
ok github.com/carlosframework/platform/internal/metrics 0.251s
ok github.com/carlosframework/platform/internal/minorunits 0.010s
ok github.com/carlosframework/platform/internal/moves 54.922s
ok github.com/carlosframework/platform/internal/moves/archive 3.159s
ok github.com/carlosframework/platform/internal/moves/offlinerun 0.087s
ok github.com/carlosframework/platform/internal/namedunits 0.025s
ok github.com/carlosframework/platform/internal/objstore 2.550s
ok github.com/carlosframework/platform/internal/ops 15.975s
ok github.com/carlosframework/platform/internal/pageindex 3.872s
ok github.com/carlosframework/platform/internal/parity 0.123s
? github.com/carlosframework/platform/internal/parity/cmd/parity-doc [no test files]
ok github.com/carlosframework/platform/internal/park 0.709s
ok github.com/carlosframework/platform/internal/perf 0.171s
ok github.com/carlosframework/platform/internal/plans 0.120s
ok github.com/carlosframework/platform/internal/privatefile 0.014s
ok github.com/carlosframework/platform/internal/provision 241.359s
ok github.com/carlosframework/platform/internal/proxyproto 0.934s
ok github.com/carlosframework/platform/internal/publicrelease 0.040s
ok github.com/carlosframework/platform/internal/ratelimit 0.170s
ok github.com/carlosframework/platform/internal/regionlabel 0.056s
ok github.com/carlosframework/platform/internal/regionname 0.053s
ok github.com/carlosframework/platform/internal/registrar 0.014s
ok github.com/carlosframework/platform/internal/registrar/openprovider 0.657s
? github.com/carlosframework/platform/internal/registrar/registrartest [no test files]
ok github.com/carlosframework/platform/internal/registry 82.902s
ok github.com/carlosframework/platform/internal/relay 7.653s
ok github.com/carlosframework/platform/internal/release 131.260s
? github.com/carlosframework/platform/internal/release/requestwitness [no test files]
ok github.com/carlosframework/platform/internal/replicagen 0.024s
ok github.com/carlosframework/platform/internal/replicas 0.054s
ok github.com/carlosframework/platform/internal/reqrec 9.701s
ok github.com/carlosframework/platform/internal/rollout 11.839s
ok github.com/carlosframework/platform/internal/rolloutwords 0.025s
ok github.com/carlosframework/platform/internal/rootaws 108.066s
ok github.com/carlosframework/platform/internal/rootfsimage 0.792s
ok github.com/carlosframework/platform/internal/rootparticipation 0.087s
ok github.com/carlosframework/platform/internal/rootstate 0.055s
ok github.com/carlosframework/platform/internal/runs 1.028s
ok github.com/carlosframework/platform/internal/s3compat 0.048s
ok github.com/carlosframework/platform/internal/s3fake 1.456s
ok github.com/carlosframework/platform/internal/s3meter 0.652s
ok github.com/carlosframework/platform/internal/safefile 0.049s
ok github.com/carlosframework/platform/internal/schedule 24.883s
ok github.com/carlosframework/platform/internal/seeds 0.087s
ok github.com/carlosframework/platform/internal/share 0.037s
ok github.com/carlosframework/platform/internal/sim/litestreamfacts 4.964s
ok github.com/carlosframework/platform/internal/sim/mediajobs 54.698s
ok github.com/carlosframework/platform/internal/sim/regionha 23.829s
ok github.com/carlosframework/platform/internal/status 0.468s
ok github.com/carlosframework/platform/internal/steering 0.272s
ok github.com/carlosframework/platform/internal/stopevidence 0.323s
ok github.com/carlosframework/platform/internal/storecfg 0.400s
ok github.com/carlosframework/platform/internal/svcrole 0.017s
ok github.com/carlosframework/platform/internal/systemd 6.157s
? github.com/carlosframework/platform/internal/systemdshow [no test files]
ok github.com/carlosframework/platform/internal/team 3.778s
ok github.com/carlosframework/platform/internal/teamcontract 0.221s
ok github.com/carlosframework/platform/internal/telemetry 0.021s
ok github.com/carlosframework/platform/internal/termfence 3.815s
ok github.com/carlosframework/platform/internal/timerspec 0.019s
ok github.com/carlosframework/platform/internal/tsidentity 4.238s
ok github.com/carlosframework/platform/internal/tunnelclient 0.425s
ok github.com/carlosframework/platform/internal/unixdial 0.010s
ok github.com/carlosframework/platform/internal/updatewords 0.022s
ok github.com/carlosframework/platform/internal/upstreamguard 0.014s
? github.com/carlosframework/platform/internal/upstreamguard/guardtest [no test files]
ok github.com/carlosframework/platform/internal/usage 0.023s
ok github.com/carlosframework/platform/internal/version 0.009s
ok github.com/carlosframework/platform/internal/vet 3.034s
ok github.com/carlosframework/platform/internal/zonehost 0.029s
ok github.com/carlosframework/platform/internal/zonehost/route53zones 0.164s
? 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.024s
ok github.com/carlosframework/platform/scripts/pathmapcheck 0.126s
ok github.com/carlosframework/platform/scripts/region-ha-g2/fixture 5.222s
ok github.com/carlosframework/platform/scripts/stateless-replicas-drill 1.213s
ok github.com/carlosframework/platform/scripts/witness-pointer 0.034s
FAIL
=== cutover-witness (162 s, from +15 s)
ok github.com/carlosframework/platform 1.755s
=== internal_grouproll@0 (275 s, from +74 s)
ok github.com/carlosframework/platform/internal/grouproll 273.326s
=== internal_grouproll@1 (283 s, from +74 s)
ok github.com/carlosframework/platform/internal/grouproll 281.348s
=== internal_activator@0 (153 s, from +143 s)
ok github.com/carlosframework/platform/internal/activator 147.903s
=== internal_activator@1 (135 s, from +143 s)
ok github.com/carlosframework/platform/internal/activator 128.640s
=== internal_activator@2 (144 s, from +143 s)
ok github.com/carlosframework/platform/internal/activator 138.281s
=== internal_activator@3 (163 s, from +144 s)
ok github.com/carlosframework/platform/internal/activator 158.350s
=== internal_edge@0 (258 s, from +168 s)
ok github.com/carlosframework/platform/internal/edge 248.316s
=== internal_edge@1 (137 s, from +168 s)
ok github.com/carlosframework/platform/internal/edge 126.845s
=== internal_edge@2 (177 s, from +168 s)
ok github.com/carlosframework/platform/internal/edge 167.610s
=== internal_edge@3 (154 s, from +168 s)
ok github.com/carlosframework/platform/internal/edge 143.630s
=== root@0 (119 s, from +175 s)
ok github.com/carlosframework/platform 107.654s
=== root@1 (114 s, from +175 s)
ok github.com/carlosframework/platform 102.806s
=== root@2 (122 s, from +175 s)
2026/11/29 22:17:25 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/29 22:17:25 console: delivery to paul@keymail.dev: keymail lookup unreachable, trying email: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=paul%40keymail.dev&from=console%40127.0.0.1%3A36223": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
2026/11/29 22:17:25 console: could not notify paul@keymail.dev of a CLI token issue: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=paul%40keymail.dev&from=console%40127.0.0.1%3A36223": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
2026/11/29 22:17:25 console: delivery to paul@keymail.dev: keymail lookup unreachable, trying email: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=paul%40keymail.dev&from=console%40127.0.0.1%3A36223": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
2026/11/29 22:17:25 console: could not notify paul@keymail.dev of a CLI token issue: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=paul%40keymail.dev&from=console%40127.0.0.1%3A36223": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
2026/11/29 22:17:29 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/29 22:17:29 console: delivery to paul@keymail.dev: keymail lookup unreachable, trying email: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=paul%40keymail.dev&from=console%40127.0.0.1%3A39915": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
2026/11/29 22:17:29 console: could not notify paul@keymail.dev of a CLI token issue: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=paul%40keymail.dev&from=console%40127.0.0.1%3A39915": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
--- FAIL: TestCLIGolden (7.92s)
clireg_golden_test.go:780: case "release-keygen | --zz-unknown-flag": stderr: line 4: want " --expires <duration> how long the scoped key may sign for (max 8760h) (default: 2160h0m0s)", got " --account <string> the account the scoped key signs for, and the only one"
clireg_golden_test.go:780: case "release-keygen | -h": stderr: line 3: want " --expires <duration> how long the scoped key may sign for (max 8760h) (default: 2160h0m0s)", got " --account <string> the account the scoped key signs for, and the only one"
2026/11/29 22:17:38 INFO replica sync system=store db=shop.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:17:38 INFO ltx file uploaded system=store db=shop.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=708
2026/11/29 22:17:38 INFO replica sync system=store db=shop.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:17:39 INFO replica sync system=store db=shop.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:17:39 INFO ltx file uploaded system=store db=shop.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=265
2026/11/29 22:17:39 INFO replica sync system=store db=shop.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:17:39 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/29 22:17:39 console: delivery to member@example.com: keymail lookup unreachable, trying email: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=member%40example.com&from=console%40127.0.0.1%3A40745": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
2026/11/29 22:17:39 console: could not notify member@example.com of a CLI token issue: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=member%40example.com&from=console%40127.0.0.1%3A40745": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
2026/11/29 22:18:00 console: db read dbr_elcdccvm63zydfb47u5fuhfiuq: relayed 1 chunks (101 bytes) in 21.031s, ended done
2026/11/29 22:18:20 console: db read dbr_dh2poecitis26lket3ybygbws4: relayed 1 chunks (101 bytes) in 20.03s, ended done
2026/11/29 22:18:20 INFO replica sync system=store db=shop.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:18:20 INFO ltx file uploaded system=store db=shop.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=708
2026/11/29 22:18:20 INFO replica sync system=store db=shop.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:18:21 INFO replica sync system=store db=shop.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:18:21 INFO ltx file uploaded system=store db=shop.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=265
2026/11/29 22:18:21 INFO replica sync system=store db=shop.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:18:21 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/29 22:18:21 console: delivery to member@example.com: keymail lookup unreachable, trying email: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=member%40example.com&from=console%40127.0.0.1%3A44079": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
2026/11/29 22:18:21 console: could not notify member@example.com of a CLI token issue: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=member%40example.com&from=console%40127.0.0.1%3A44079": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
2026/11/29 22:18:22 console: db read dbr_wpompwll3ta3ooaa2yhhoje5ke: relayed 1 chunks (1070 bytes) in 1.002s, ended done
2026/11/29 22:18:22 INFO replica sync system=store db=shop.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:18:22 INFO ltx file uploaded system=store db=shop.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=708
2026/11/29 22:18:22 INFO replica sync system=store db=shop.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:18:23 INFO replica sync system=store db=shop.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:18:23 INFO ltx file uploaded system=store db=shop.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=265
2026/11/29 22:18:23 INFO replica sync system=store db=shop.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:18:23 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/29 22:18:23 console: delivery to member@example.com: keymail lookup unreachable, trying email: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=member%40example.com&from=console%40127.0.0.1%3A44123": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
2026/11/29 22:18:23 console: could not notify member@example.com of a CLI token issue: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=member%40example.com&from=console%40127.0.0.1%3A44123": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
2026/11/29 22:18:23 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:18:23 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:18:23 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:18:23 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:18:23 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:18:23 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:18:23 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000003
2026/11/29 22:18:23 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000003 maxTXID=0000000000000003 size=454
2026/11/29 22:18:23 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000003
fetching a copy of shop.example.com's database from region uk.
2026/11/29 22:18:24 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/29 22:18:24 console: delivery to paul@keymail.dev: keymail lookup unreachable, trying email: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=paul%40keymail.dev&from=console%40127.0.0.1%3A45639": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
2026/11/29 22:18:24 console: could not notify paul@keymail.dev of a CLI token issue: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=paul%40keymail.dev&from=console%40127.0.0.1%3A45639": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
2026/11/29 22:18:24 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/29 22:18:24 console: delivery to paul@keymail.dev: keymail lookup unreachable, trying email: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=paul%40keymail.dev&from=console%40127.0.0.1%3A46303": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
2026/11/29 22:18:24 console: could not notify paul@keymail.dev of a CLI token issue: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=paul%40keymail.dev&from=console%40127.0.0.1%3A46303": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
2026/11/29 22:18:25 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/29 22:18:25 console: delivery to paul@keymail.dev: keymail lookup unreachable, trying email: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=paul%40keymail.dev&from=console%40127.0.0.1%3A46699": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
2026/11/29 22:18:25 console: could not notify paul@keymail.dev of a CLI token issue: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=paul%40keymail.dev&from=console%40127.0.0.1%3A46699": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
2026/11/29 22:18:27 console: delivery to paul@keymail.dev: keymail lookup unreachable, trying email: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=paul%40keymail.dev&from=console%40127.0.0.1%3A35911": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
2026/11/29 22:18:27 console: could not notify paul@keymail.dev of a CLI token issue: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=paul%40keymail.dev&from=console%40127.0.0.1%3A35911": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
2026/11/29 22:18:31 console: delivery to paul@keymail.dev: keymail lookup unreachable, trying email: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=paul%40keymail.dev&from=console%40127.0.0.1%3A34233": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
2026/11/29 22:18:31 console: could not notify paul@keymail.dev of a CLI token issue: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=paul%40keymail.dev&from=console%40127.0.0.1%3A34233": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
2026/11/29 22:18:34 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/29 22:18:34 console: delivery to paul@keymail.dev: keymail lookup unreachable, trying email: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=paul%40keymail.dev&from=console%40127.0.0.1%3A37403": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
2026/11/29 22:18:34 console: could not notify paul@keymail.dev of a CLI token issue: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=paul%40keymail.dev&from=console%40127.0.0.1%3A37403": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
2026/11/29 22:18:51 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/29 22:18:51 console: delivery to paul@keymail.dev: keymail lookup unreachable, trying email: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=paul%40keymail.dev&from=console%40127.0.0.1%3A34261": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
2026/11/29 22:18:51 console: could not notify paul@keymail.dev of a CLI token issue: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=paul%40keymail.dev&from=console%40127.0.0.1%3A34261": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
2026/11/29 22:18:51 edges: box "hedy-lockpicking" has an edges file under control/edges/ but no status snapshot at all, so no region outside the home is automatically eligible until it reports; said once
2026/11/29 22:18:51 edges: 2 edges file(s) under control/edges/ but no fresh box snapshot matched any of them, so automatic region placement sees the home alone (are edges and status in different buckets? see CARLOS_STATUS_BUCKET/CARLOS_STATUS_PREFIX)
2026/11/29 22:18:52 console: an incomplete read of the edges files or box snapshots (edges complete true, snapshots complete false), so no region outside the home is automatically eligible this request; said once
2026/11/29 22:18:52 console: app region bab/cart: ie (default)
2026/11/29 22:18:52 console: backfilled account manifest for bab (ops)
2026/11/29 22:18:52 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/29 22:18:52 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/29 22:18:52 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/29 22:18:56 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/29 22:18:56 console: delivery to paul@keymail.dev: keymail lookup unreachable, trying email: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=paul%40keymail.dev&from=console%40127.0.0.1%3A42855": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
2026/11/29 22:18:56 console: could not notify paul@keymail.dev of a CLI token issue: keymail: lookup unreachable: Get "http://keymail.invalid/api/federation/lookup?addr=paul%40keymail.dev&from=console%40127.0.0.1%3A42855": dial tcp: lookup keymail.invalid on 127.0.0.53:53: no such host
2026/11/29 22:18:56 edges: skipping control/edges/bad-box.json in the placement join: not a versioned edges file
2026/11/29 22:18:59 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/29 22:18:59 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/29 22:18:59 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/29 22:18:59 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/29 22:18:59 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/29 22:18:59 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/29 22:18:59 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000003
2026/11/29 22:18:59 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000003 maxTXID=0000000000000003 size=454
2026/11/29 22:18:59 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000003
FAIL
FAIL github.com/carlosframework/platform 110.031s
FAIL
=== root@3 (111 s, from +175 s)
ok github.com/carlosframework/platform 101.901s
=== root@4 (105 s, from +175 s)
ok github.com/carlosframework/platform 97.326s
=== internal_host@0 (158 s, from +221 s)
ok github.com/carlosframework/platform/internal/host 154.309s
=== internal_host@1 (287 s, from +221 s)
ok github.com/carlosframework/platform/internal/host 283.180s
=== internal_host@2 (209 s, from +221 s)
ok github.com/carlosframework/platform/internal/host 205.050s
=== internal_host@3 (168 s, from +221 s)
ok github.com/carlosframework/platform/internal/host 163.931s
=== internal_host@4 (227 s, from +221 s)
ok github.com/carlosframework/platform/internal/host 223.416s
=== internal_host@5 (143 s, from +221 s)
ok github.com/carlosframework/platform/internal/host 138.925s
=== internal_console@0 (171 s, from +227 s)
ok github.com/carlosframework/platform/internal/console 163.708s
=== internal_console@1 (177 s, from +227 s)
ok github.com/carlosframework/platform/internal/console 169.167s
=== internal_console@2 (239 s, from +227 s)
ok github.com/carlosframework/platform/internal/console 232.154s
=== internal_console@3 (261 s, from +227 s)
ok github.com/carlosframework/platform/internal/console 253.286s
=== internal_console@4 (228 s, from +227 s)
ok github.com/carlosframework/platform/internal/console 220.647s
=== internal_console@5 (253 s, from +227 s)
ok github.com/carlosframework/platform/internal/console 245.189s
=== internal_console@6 (218 s, from +227 s)
ok github.com/carlosframework/platform/internal/console 211.840s
=== internal_console@7 (237 s, from +227 s)
ok github.com/carlosframework/platform/internal/console 229.705s
=== internal_console@8 (243 s, from +227 s)
ok github.com/carlosframework/platform/internal/console 234.869s
=== internal_console@9 (245 s, from +227 s)
ok github.com/carlosframework/platform/internal/console 238.264s
=== internal_console@10 (243 s, from +227 s)
ok github.com/carlosframework/platform/internal/console 235.538s
=== internal_console@11 (246 s, from +227 s)
ok github.com/carlosframework/platform/internal/console 238.889s
=== internal_console@12 (369 s, from +227 s)
ok github.com/carlosframework/platform/internal/console 362.175s
=== internal_console@13 (215 s, from +227 s)
ok github.com/carlosframework/platform/internal/console 207.419s
=== internal_console@14 (207 s, from +227 s)
ok github.com/carlosframework/platform/internal/console 200.350s
=== internal_console@15 (228 s, from +227 s)
ok github.com/carlosframework/platform/internal/console 220.611s
=== internal_console@16 (232 s, from +227 s)
ok github.com/carlosframework/platform/internal/console 223.910s
=== internal_console@17 (254 s, from +227 s)
ok github.com/carlosframework/platform/internal/console 246.380s
=== internal_console@18 (281 s, from +227 s)
ok github.com/carlosframework/platform/internal/console 272.303s
=== internal_console@19 (242 s, from +227 s)
ok github.com/carlosframework/platform/internal/console 234.846s
=== internal_console@20 (210 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 202.729s
=== internal_console@21 (239 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 232.030s
=== internal_console@22 (241 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 233.688s
=== internal_console@23 (234 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 226.808s
=== lists: internal_console 225 s, internal_edge 166 s, internal_activator 142 s, internal_host 220 s, root 174 s, internal_grouproll 72 s
=== cpu: the gate used 13121 cpu-seconds in 597 s, about 22.0 of 32 cores; the machine as a whole was 73% busy
Failure summary:
--- rest
--- FAIL: TestOwnerDeadlineEndsAHungRead (0.46s)
read_test.go:426: result {State:failed Code:interrupted Box:uk-1 LastSeq:0 Started:2026-11-29 22:16:35.387634079 +0000 UTC Ended:2026-11-29 22:16:35.658161296 +0000 UTC Sealed:REJSMQSC5OTZ2pFfLXIpeDPbfxpr5Yu0ReTG1OhspD7tQUGLEvl4pbCkaz4gTbpAuWtL0ZHEh5gxaUHqrq8kcJyHNyzJQrpOMnaB4m8sFB/Cus43Am8XyjjHOext++risYd5+ZOKKUYSAnKmMtjNLdGMWECZ4Wi/+BDuLIuEjAYjgrozkUlGyHk07g2Q79QUwcqC4hKHajp3xpZue6xrTc69ulat38k3KiCCjBsIaMu4S7leQx4fRN8322tV7MQPiX+3TZjvgCs7zVZWrfAROpsfspQLp+g5H9SH3K8=}
FAIL github.com/carlosframework/platform/internal/dbreads 3.071s
--- root@2
--- FAIL: TestCLIGolden (7.92s)
clireg_golden_test.go:780: case "release-keygen | --zz-unknown-flag": stderr: line 4: want " --expires <duration> how long the scoped key may sign for (max 8760h) (default: 2160h0m0s)", got " --account <string> the account the scoped key signs for, and the only one"
clireg_golden_test.go:780: case "release-keygen | -h": stderr: line 3: want " --expires <duration> how long the scoped key may sign for (max 8760h) (default: 2160h0m0s)", got " --account <string> the account the scoped key signs for, and the only one"
FAIL github.com/carlosframework/platform 110.031s
FAILED: rest root@2
make: *** [Makefile:23: test] Error 1
=== opentofu ===
opentofu: 39 test files in 11 suites, OpenTofu v1.13.9
initialised in 16 s
ok 24 s infra/modules/box-fence-writer/tests/writer.tftest.hcl Success! 1 passed, 0 failed.
ok 23 s infra/modules/deployment-buckets/tests/console_floors.tftest.hcl Success! 1 passed, 0 failed.
ok 34 s infra/modules/deployment-buckets/tests/data_lifecycle.tftest.hcl Success! 3 passed, 0 failed.
ok 22 s infra/modules/deployment-buckets/tests/db_reads.tftest.hcl Success! 1 passed, 0 failed.
ok 21 s infra/modules/deployment-buckets/tests/evidence.tftest.hcl Success! 1 passed, 0 failed.
ok 30 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 84 s infra/modules/media-engine/tests/media_engine.tftest.hcl Success! 24 passed, 0 failed.
ok 22 s infra/modules/pdf-host/tests/computed.tftest.hcl Success! 2 passed, 0 failed.
ok 53 s infra/modules/pdf-host/tests/pdf_host.tftest.hcl Success! 24 passed, 0 failed.
ok 38 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 62 s infra/modules/region-host/ingress/tests/group_ingress.tftest.hcl Success! 30 passed, 0 failed.
ok 44 s infra/modules/region-host/tests/alert_publish.tftest.hcl Success! 18 passed, 0 failed.
ok 37 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 15 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 11 s infra/modules/region-host/tests/group_alarms.tftest.hcl Success! 4 passed, 0 failed.
ok 11 s infra/modules/region-host/tests/group_iam.tftest.hcl Success! 4 passed, 0 failed.
ok 5 s infra/modules/region-host/tests/group_isolation.tftest.hcl Success! 1 passed, 0 failed.
ok 36 s infra/modules/region-host/tests/group_operator.tftest.hcl Success! 13 passed, 0 failed.
ok 8 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 14 s infra/modules/region-host/tests/ingress_drain_read.tftest.hcl Success! 4 passed, 0 failed.
ok 5 s infra/modules/region-host/tests/instance_metadata.tftest.hcl Success! 1 passed, 0 failed.
ok 24 s infra/modules/region-host/tests/mailer.tftest.hcl Success! 6 passed, 0 failed.
ok 13 s infra/modules/region-host/tests/mailer_group.tftest.hcl Success! 2 passed, 0 failed.
ok 15 s infra/modules/region-host/tests/managed_fleets/group_refusal.tftest.hcl Success! 2 passed, 0 failed.
ok 108 s infra/modules/region-host/tests/managed_fleets/managed_fleets.tftest.hcl Success! 46 passed, 0 failed.
ok 74 s infra/modules/region-host/tests/store_conversion.tftest.hcl Success! 27 passed, 0 failed.
ok 18 s infra/modules/region-host/tests/store_scanning.tftest.hcl Success! 4 passed, 0 failed.
ok 30 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 19 s infra/modules/region-host/tests/user_data_ignored.tftest.hcl Success! 3 passed, 0 failed.
ok 13 s infra/modules/region-remote-host/tests/data_lifecycle.tftest.hcl Success! 3 passed, 0 failed.
ok 13 s infra/modules/region-remote-host/tests/no_deployment_bucket.tftest.hcl Success! 5 passed, 0 failed.
ok 31 s infra/modules/scanner-host/tests/scanner_host.tftest.hcl Success! 14 passed, 0 failed.
opentofu: 39 files in 212 s
opentofu: PASS
amadan: step gate failed: exit status 2
amadan: job failed at step gate — its output is above, not at the tail of this log
diff --git a/cli.go b/cli.go| index a3666090c..86c9e8dc4 100644 |
| --- a/cli.go |
| +++ b/cli.go |
| @@ -3891,6 +3891,7 @@ func runKeygen(args []string) { |
| fs := flag.NewFlagSet("release-keygen", flag.ExitOnError) |
| scope := fs.String("scope", "", "mint a SCOPED key for these rungs, comma separated (canary,edge,beta) — stable is never delegable") |
| name := fs.String("name", "", "label for the scoped key; it appears in every refusal it causes") |
| + account := fs.String("account", "", "the account the scoped key signs for, and the only one") |
| expires := fs.Duration("expires", defaultGrantTTL, "how long the scoped key may sign for (max 8760h)") |
| fs.Usage = flagUsage(fs, "") |
| fs.Parse(args) |
| @@ -3910,8 +3911,8 @@ func runKeygen(args []string) { |
| return |
| } |
| - if *name == "" { |
| - log.Fatal("usage: carlos release-keygen --scope <rungs> --name <label> [--expires <dur>]") |
| + if *name == "" || *account == "" { |
| + log.Fatal("usage: carlos release-keygen --scope <rungs> --name <label> --account <sqid> [--expires <dur>]") |
| } |
| if release.IsScopedSeed(os.Getenv("CARLOS_RELEASE_KEY")) { |
| log.Fatal("CARLOS_RELEASE_KEY holds a scoped key: only the ROOT key can mint a grant, which is what makes a scoped key unable to widen itself") |
| @@ -3922,12 +3923,12 @@ func runKeygen(args []string) { |
| rungs = append(rungs, r) |
| } |
| } |
| - seed, grant, err := release.MintKeyGrant(signingKey(), *name, rungs, *expires) |
| + seed, grant, err := release.MintKeyGrant(signingKey(), *account, *name, rungs, *expires) |
| if err != nil { |
| log.Fatal(err) |
| } |
| fmt.Printf("CARLOS_RELEASE_KEY=%s\nCARLOS_RELEASE_GRANT=%s\n", seed, grant) |
| - fmt.Fprintf(os.Stderr, `scoped key %q for %s, expiring %s |
| + fmt.Fprintf(os.Stderr, `scoped key %q for %s of account %s, expiring %s |
| The KEY is the secret — store it wherever the builder's secrets live. |
| The GRANT is not secret (public material only) but must travel WITH the |
| @@ -3937,7 +3938,7 @@ func runKeygen(args []string) { |
| Deploy order: fleet binaries that understand grants FIRST, this key |
| second. An older binary reads a grant-signed pointer as a bad signature, |
| which is the right way round to fail but will stop that box adopting. |
| -`, *name, strings.Join(rungs, ", "), time.Now().UTC().Add(*expires).Format(time.RFC3339)) |
| +`, *name, strings.Join(rungs, ", "), *account, time.Now().UTC().Add(*expires).Format(time.RFC3339)) |
| } |
| // statusUsage is shared between "no flag given" and "-h/--help" so an |
diff --git a/docs/site/cli.md b/docs/site/cli.md| index eb2bb5504..a7d4c80f4 100644 |
| --- a/docs/site/cli.md |
| +++ b/docs/site/cli.md |
| @@ -3381,14 +3381,15 @@ Mints the deployment's root signing key, or a scoped key that can sign only |
| certain rungs of the ladder. |
| ```sh |
| -carlos release-keygen --scope canary,edge --name builder |
| +carlos release-keygen --scope canary,edge --name builder --account <sqid> |
| ``` |
| With no flags it prints a fresh root pair: the key goes into your secret |
| manager, the public half into host config. With `--scope` it prints a key and |
| a grant. The grant carries no secret material but has to travel with the key, |
| -because a scoped key on its own signs pointers nothing will accept. Only the |
| -root key can mint a grant, which is what stops a scoped key widening itself. |
| +because a scoped key on its own signs pointers nothing will accept. A scoped |
| +key signs for the one account named by `--account`. Only the root key can mint |
| +a grant, which is what stops a scoped key widening itself. |
| ### carlos proof |
diff --git a/docs/superpowers/notes/2026-11-29-scoped-key-expiry.md b/docs/superpowers/notes/2026-11-29-scoped-key-expiry.md| new file mode 100644 |
| index 000000000..ac6bfc908 |
| --- /dev/null |
| +++ b/docs/superpowers/notes/2026-11-29-scoped-key-expiry.md |
| @@ -0,0 +1,80 @@ |
| +# Scoped release keys: expiry and revocation on boxes (hunt H3-M2, second half) |
| + |
| +Status: open, for Paul. Branch `sec-h3-m2-scoped-key` fixes the first half |
| +(a scoped key now signs for one account) and leaves this half alone. |
| + |
| +## The problem |
| + |
| +A grant's expiry is checked against the pointer's own `promoted_at` |
| +(`Grant.allowsRung`, spec §5), and the key's holder writes `promoted_at`. A box |
| +cannot tell when a signature was made. So the holder of a lapsed or leaked |
| +scoped key can still sign today a pointer dated inside the grant's old |
| +window, and it verifies on every box for good. The hunt witness is |
| +`TestHunt_H3_M2_LapsedScopedKeyStillSigns` (skipped on this branch, pointing |
| +here). |
| + |
| +What limits it today: |
| + |
| +- Since this branch, the key reaches only its own account, and never stable. |
| +- A box's floor (watermark, hunt H3-M5) refuses a pointer not newer than the |
| + one it last took. A backdated pointer has to be dated after the channel's |
| + current head, so any promote made after the grant lapsed shuts it out on |
| + boxes that saw that promote. A fresh or replaced box has no floor. |
| + |
| +What any fix has to respect: |
| + |
| +- Console deploy credentials mint a 5-minute grant per request |
| + (`deployGrantTTL`), and their pointers must keep verifying for as long as |
| + they are heads. A wall-clock expiry would take them dark after 5 minutes. |
| +- Adoption checks the head again on every pass, so a pointer that stops |
| + verifying takes running routes dark. |
| +- No new per-box polling (the S3 request-cost rule). |
| +- A bucket writer can delete or roll back anything a box does not hold a |
| + floor for. |
| + |
| +## Options |
| + |
| +**A. Wall-clock expiry plus a root re-sign.** Boxes refuse a scoped pointer |
| +or record once `now > expires_at` plus a grace period. The console re-signs |
| +every scoped head with the root key before its grant runs out. Heavy: a |
| +sweep that writes pointers, a re-sign must stamp later (strict ordering), so |
| +it moves bake and floor reasoning, and a direct-mode deployment with no |
| +console has nothing to re-sign, so its scoped heads go dark. |
| + |
| +**B. A revocation list in a root-signed object boxes already read.** Add |
| +`revoked_grants` (scoped public keys) to an object every box already |
| +verifies and holds a floor for each pass (the system pointer, say). Boxes refuse any pointer or record signed by a listed key, |
| +whatever its date. An operator verb publishes a revocation; the repair |
| +listing names heads signed by revoked keys. Expiry stays hygiene, and |
| +revocation is the tool for a lapsed or leaked key. No new reads. Old boxes |
| +ignore the field, so no floor is needed for safety, but heads under a |
| +revoked key must be repaired first or they go dark. Cost: a box sees a |
| +revocation only when its system pointer is next published, and app trust |
| +starts depending on the system channel. |
| + |
| +**C. Scoped keys stay inside the console.** Customers' CI uses deploy |
| +credentials (console service tokens with rungs, revocable in the console |
| +database and already in use since v0.24.2) instead of `release-keygen |
| +--scope` keys. Boxes then cap a grant's life on verification at a few |
| +minutes (today `maxGrantTTL` is 365 days), so only the console's per-request |
| +grants verify. Their seeds are never stored, so nobody holds a key to |
| +backdate with. Revoking a builder means deleting its credential. No new |
| +reads and no new box state. Cost: `release-keygen --scope` stops working for |
| +CI (self-hosted direct mode would sign with the root key or run a console), |
| +and heads signed by long grants need the same repair as this branch's |
| +account-less grants before boxes roll. |
| + |
| +## Recommendation |
| + |
| +C for the hosted platform: it reuses revocation that already exists, adds |
| +nothing a box has to read, and removes the long-lived secret this finding is |
| +about. If self-hosters need scoped keys without a console, add B for them |
| +later. Not implemented on this branch: each option needs a rollout and |
| +either a new publish path or retiring a CLI feature, so none is contained. |
| + |
| +## Questions for Paul |
| + |
| +1. Can customers' CI move to deploy credentials (C), or do scoped keys have |
| + to keep working outside the console? |
| +2. If they must keep working: is a revocation that lands with the next |
| + system publish (B) fast enough? |
diff --git a/docs/superpowers/notes/census-proposal-sec-h3-m2-scoped-key.md b/docs/superpowers/notes/census-proposal-sec-h3-m2-scoped-key.md| new file mode 100644 |
| index 000000000..47062b2e7 |
| --- /dev/null |
| +++ b/docs/superpowers/notes/census-proposal-sec-h3-m2-scoped-key.md |
| @@ -0,0 +1,11 @@ |
| +# Census approval: sec-h3-m2-scoped-key |
| + |
| +Ruling `census-ruling-sec-h3-m2-scoped-key`. The independent reviewer approves or rejects every change below, 0 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26). |
| + |
| +Envelopes re-pinned: `.`, `internal/release`. |
| + |
| +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. |
| + |
| +Seal: `0fdff597ef83fb9966e07c70b4283001eb97f7dfa71a83a19bde92382192eb6b` → `0fdff597ef83fb9966e07c70b4283001eb97f7dfa71a83a19bde92382192eb6b`. |
| + |
| +Overlay: `internal/provision/testdata/plan14-root-reads-sec-h3-m2-scoped-key.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`. |
diff --git a/internal/console/apicli.go b/internal/console/apicli.go| index a920db07e..5691e1ecf 100644 |
| --- a/internal/console/apicli.go |
| +++ b/internal/console/apicli.go |
| @@ -1195,7 +1195,7 @@ func (s *Server) handleAPIPromote(w http.ResponseWriter, r *http.Request) { |
| signer := release.RootSigner(s.cfg.Key) |
| var authorize func(*release.Pipeline) error |
| if p.Kind == PrincipalService && p.Role == svcrole.Deploy { |
| - sg, serr := s.deploySigner(p) |
| + sg, serr := s.deploySigner(p, acct.Sqid) |
| if serr != nil { |
| log.Printf("console: deploy signer for %s/%s: %v", acct.Sqid, app, serr) |
| jsonError(w, http.StatusServiceUnavailable, "could not prepare a signing key for this deploy credential. Nothing was promoted.") |
| @@ -1480,7 +1480,7 @@ func (s *Server) handleAPIRollback(w http.ResponseWriter, r *http.Request) { |
| signer := release.RootSigner(s.cfg.Key) |
| var authorize func(*release.Pipeline) error |
| if p.Kind == PrincipalService && p.Role == svcrole.Deploy { |
| - sg, serr := s.deploySigner(p) |
| + sg, serr := s.deploySigner(p, acct.Sqid) |
| if serr != nil { |
| log.Printf("console: deploy signer for %s/%s: %v", acct.Sqid, app, serr) |
| jsonError(w, http.StatusServiceUnavailable, "could not prepare a signing key for this deploy credential. Nothing was rolled back.") |
diff --git a/internal/console/deployscope.go b/internal/console/deployscope.go| index 0d88784a4..f77ebc007 100644 |
| --- a/internal/console/deployscope.go |
| +++ b/internal/console/deployscope.go |
| @@ -152,14 +152,15 @@ func (s *Server) writeDeployRefusal(w http.ResponseWriter, err error) { |
| const deployGrantTTL = 5 * time.Minute |
| // deploySigner mints a scoped key and a root-signed grant for exactly the |
| -// credential's rungs, for one request. Boxes then verify the rung limit as |
| -// they do for a scoped CI key today. Nothing is stored. Any failure refuses |
| -// the request: a deploy write never falls back to the root signer. |
| -func (s *Server) deploySigner(p Principal) (release.Signer, error) { |
| +// credential's rungs and the request's account, for one request. Boxes then |
| +// verify the rung limit and the account as they do for a scoped CI key |
| +// today. Nothing is stored. Any failure refuses the request: a deploy write |
| +// never falls back to the root signer. |
| +func (s *Server) deploySigner(p Principal, acct string) (release.Signer, error) { |
| if len(p.Rungs) == 0 { |
| return release.Signer{}, errors.New("deploy credential carries no rungs") |
| } |
| - seed, grant, err := release.MintKeyGrant(s.cfg.Key, "deploy."+p.Name, p.Rungs, deployGrantTTL) |
| + seed, grant, err := release.MintKeyGrant(s.cfg.Key, acct, "deploy."+p.Name, p.Rungs, deployGrantTTL) |
| if err != nil { |
| return release.Signer{}, err |
| } |
diff --git a/internal/console/deploysign_test.go b/internal/console/deploysign_test.go| index ed555b856..2f7c11ca5 100644 |
| --- a/internal/console/deploysign_test.go |
| +++ b/internal/console/deploysign_test.go |
| @@ -155,7 +155,7 @@ func TestDeployRepeatIsANoOp(t *testing.T) { |
| func TestDeploySignerRefusesWithoutTheScopeFunction(t *testing.T) { |
| fx, _, _ := deployFixture(t) |
| - sg, err := fx.srv.deploySigner(Principal{Kind: PrincipalService, Role: svcrole.Deploy, Name: "ci", App: "hello", Rungs: []string{"edge"}}) |
| + sg, err := fx.srv.deploySigner(Principal{Kind: PrincipalService, Role: svcrole.Deploy, Name: "ci", App: "hello", Rungs: []string{"edge"}}, "bab") |
| if err != nil { |
| t.Fatal(err) |
| } |
| @@ -165,6 +165,11 @@ func TestDeploySignerRefusesWithoutTheScopeFunction(t *testing.T) { |
| t.Errorf("signer promoted %s with no Authorize hook", ch) |
| } |
| } |
| + // The request's grant names the request's account (hunt H3-M2): even |
| + // on its own rung it signs for no other. |
| + if _, err := sg.PromoteOnLadder(ctx, fx.rel, "bae", "hello", "edge", "v1", release.PromoteOptions{Hotfix: true}); err == nil || !strings.Contains(err.Error(), "account bab") { |
| + t.Errorf("a deploy signer for bab promoted bae's edge: err = %v", err) |
| + } |
| } |
| func TestDeploySignerFailureFailsClosed(t *testing.T) { |
diff --git a/internal/dbreads/envelope_test.go b/internal/dbreads/envelope_test.go| index aa26621dc..b2d82a2ea 100644 |
| --- a/internal/dbreads/envelope_test.go |
| +++ b/internal/dbreads/envelope_test.go |
| @@ -99,7 +99,7 @@ func TestEnvelopeRefusesForgeryAndReplay(t *testing.T) { |
| func TestEnvelopeScopedKeyCannotSign(t *testing.T) { |
| t.Parallel() |
| rootPub, rootPriv := rootKeys(t) |
| - seed, grant, err := release.MintKeyGrant(rootPriv, "ci", []string{"canary"}, time.Hour) |
| + seed, grant, err := release.MintKeyGrant(rootPriv, "bab", "ci", []string{"canary"}, time.Hour) |
| if err != nil { |
| t.Fatal(err) |
| } |
diff --git a/internal/provision/plan9_b8_census_test.go b/internal/provision/plan9_b8_census_test.go| index b3bb922b0..d039c9ede 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 := publicShareWriteCensusInventory() |
| + inventory := secH3M2ScopedKeyWriteCensusInventory() |
| 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/sec_h3_m2_scoped_key_census_test.go b/internal/provision/sec_h3_m2_scoped_key_census_test.go| new file mode 100644 |
| index 000000000..b406658ee |
| --- /dev/null |
| +++ b/internal/provision/sec_h3_m2_scoped_key_census_test.go |
| @@ -0,0 +1,41 @@ |
| +package provision |
| + |
| +// secH3M2ScopedKeyWriteCensusInventory is the record-write census for branch |
| +// sec-h3-m2-scoped-key (hunt H3-M2: a scoped release key signs only for the |
| +// account its grant names), layered on publicShareWriteCensusInventory. |
| +// Reviewed by the branch author against the source. No record write is |
| +// added, moved or reclassified; four units are re-pinned: |
| +// |
| +// - Signer.WritePromotionRecord (promotion.go): the scope check passes the |
| +// record's account to sg.allows, so a scoped key refuses a record for |
| +// another account before its one Put of the same PromotionRecordKey. |
| +// - ReadPromotionRecord (promotion.go): a comment and the record's account |
| +// passed to the grant's scope check; the read of PromotionRecordKey is |
| +// unchanged. |
| +// - Signer.claimRawPromote and Signer.claimRawRollbackAuthorized |
| +// (release.go): the early scope check names the account; each is still |
| +// one conditional Put of the same signed channel pointer key. |
| +func secH3M2ScopedKeyWriteCensusInventory() []censusEntry { |
| + entries := append([]censusEntry(nil), publicShareWriteCensusInventory()...) |
| + repins := []censusEntry{ |
| + {"internal/release/promotion.go", "ReadPromotionRecord", "key-site", "key:PromotionRecordKey", "2ee043c72d9a76d51760849156f6698a9c66ea1a83916b132a739aee708fd0e1"}, |
| + {"internal/release/promotion.go", "Signer.WritePromotionRecord", "foreign-recordkey", "key:PromotionRecordKey,sel:Put", "23af3631344974377e4c3f2d64b93908f56a2c7a5949511da28a745e085a567c"}, |
| + {"internal/release/release.go", "Signer.claimRawPromote", "nonrecord", "sel:Put", "0c1481d9b6bb26ba3524c2fb3c9e7a5676a0bfec8225d7598ea17769379e7b52"}, |
| + {"internal/release/release.go", "Signer.claimRawRollbackAuthorized", "nonrecord", "sel:Put", "3b658b62eae3e919d801137992b96d66a818df655f2fc1e8dcf25c4d7d6b05d1"}, |
| + } |
| + for _, r := range repins { |
| + found := false |
| + for i, e := range entries { |
| + if e.File == r.File && e.Unit == r.Unit { |
| + if e.Class != r.Class || e.Kinds != r.Kinds { |
| + panic("sec-h3-m2-scoped-key re-pin changes the class or kinds of " + r.File + ":" + r.Unit) |
| + } |
| + entries[i], found = r, true |
| + } |
| + } |
| + if !found { |
| + panic("sec-h3-m2-scoped-key re-pin of an unlisted unit " + r.File + ":" + r.Unit) |
| + } |
| + } |
| + return entries |
| +} |
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv| index 6e51bfc67..302ee339a 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-chain.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-chain.tsv |
| @@ -312,3 +312,4 @@ plan14-root-reads-moved-at-floor-v0-44-1.tsv ed1957bc7d18714e39984e757b73b8c590f |
| plan14-root-reads-gvisor-slice2-explicit-mode.tsv ed1957bc7d18714e39984e757b73b8c590f1a2a924ca35e20e9041fc09f2ca78 |
| plan14-root-reads-public-share.tsv ed1957bc7d18714e39984e757b73b8c590f1a2a924ca35e20e9041fc09f2ca78 |
| plan14-root-reads-gvisor-slice3-containment.tsv 0fdff597ef83fb9966e07c70b4283001eb97f7dfa71a83a19bde92382192eb6b |
| +plan14-root-reads-sec-h3-m2-scoped-key.tsv 0fdff597ef83fb9966e07c70b4283001eb97f7dfa71a83a19bde92382192eb6b |
diff --git a/internal/provision/testdata/plan14-root-reads-sec-h3-m2-scoped-key.tsv b/internal/provision/testdata/plan14-root-reads-sec-h3-m2-scoped-key.tsv| new file mode 100644 |
| index 000000000..a6968c06a |
| --- /dev/null |
| +++ b/internal/provision/testdata/plan14-root-reads-sec-h3-m2-scoped-key.tsv |
| @@ -0,0 +1,4 @@ |
| +# Census overlay sec-h3-m2-scoped-key, written by census-propose (#369). census-ruling-sec-h3-m2-scoped-key, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-sec-h3-m2-scoped-key.md. |
| +# 0 body, 0 sites, 2 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +@coverage . 34ef9dd0595c93c1215772bf3bcc24be0c0757749972e0e22534437d633036a1 |
| +@coverage internal/release 315440a4e7eb12b8c0ba83be5f0265a5c207b8a80c5e59f89dbce992be0d0b5a |
diff --git a/internal/release/authorize_record_test.go b/internal/release/authorize_record_test.go| index 5377638e7..8eb3b49b3 100644 |
| --- a/internal/release/authorize_record_test.go |
| +++ b/internal/release/authorize_record_test.go |
| @@ -70,7 +70,7 @@ func TestAuthorizeIsRootOnly(t *testing.T) { |
| s := NewDirStore(t.TempDir()) |
| ctx := context.Background() |
| root, pub := testKeys(t) |
| - seed, grant, _ := MintKeyGrant(root, "ci", []string{"canary"}, time.Hour) |
| + seed, grant, _ := MintKeyGrant(root, "bab", "ci", []string{"canary"}, time.Hour) |
| key, _ := ParseSigningKey(seed, "test") |
| sg, err := ScopedSigner(key, grant, pub) |
| if err != nil { |
diff --git a/internal/release/digestmarker_test.go b/internal/release/digestmarker_test.go| index 3b9ed045a..1fccf0221 100644 |
| --- a/internal/release/digestmarker_test.go |
| +++ b/internal/release/digestmarker_test.go |
| @@ -52,7 +52,7 @@ func TestDigestMarkerIsRootOnly(t *testing.T) { |
| s := NewDirStore(t.TempDir()) |
| ctx := context.Background() |
| root, pub := testKeys(t) |
| - seed, grant, err := MintKeyGrant(root, "ci", []string{"canary"}, time.Hour) |
| + seed, grant, err := MintKeyGrant(root, "bab", "ci", []string{"canary"}, time.Hour) |
| if err != nil { |
| t.Fatal(err) |
| } |
diff --git a/internal/release/digests.go b/internal/release/digests.go| index 3e0c03d53..b9e5bc6f2 100644 |
| --- a/internal/release/digests.go |
| +++ b/internal/release/digests.go |
| @@ -145,8 +145,9 @@ type ChannelDigestState struct { |
| Err string `json:"error,omitempty"` |
| // Unbound is a pointer signed before the account binding: it names no |
| // account, and every box that acts on a pointer refuses it |
| - // (ErrPointerUnbound, hunt H3-M8). The line is still filled in from the |
| - // pointer, so the channel can be repaired by name. |
| + // (ErrPointerUnbound, hunt H3-M8), or it was signed under a key grant |
| + // that names no account (ErrGrantUnbound, hunt H3-M2). The line is still |
| + // filled in from the pointer, so the channel can be repaired by name. |
| Unbound bool `json:"unbound,omitempty"` |
| // NoRecord is a head that signs no digest and has no promotion record |
| // with one: a fresh or replaced box refuses to stage it, since nothing |
| @@ -249,7 +250,9 @@ func DigestReport(ctx context.Context, s Store, pub ed25519.PublicKey, acct, app |
| continue |
| } |
| st := DigestStateOf(p, marker) |
| - st.Unbound = p.Account == "" |
| + // A head signed under a grant that names no account (hunt H3-M2) |
| + // is refused like one that names none, and repaired the same way. |
| + st.Unbound = p.Account == "" || p.grantUnbound |
| if !st.HeadDigest { |
| // The record recordBinding would bind the head to: none, or |
| // one without a digest, is a repair; one that cannot be read |
| @@ -257,7 +260,10 @@ func DigestReport(ctx context.Context, s Store, pub ed25519.PublicKey, acct, app |
| rec, recErr := ReadPromotionRecord(ctx, s, pub, acct, app, p.Version) |
| switch { |
| case recErr == nil && rec.ManifestDigest != "": |
| - case recErr == nil || errors.Is(recErr, ErrNoPromotionRecord): |
| + case recErr == nil || errors.Is(recErr, ErrNoPromotionRecord) || errors.Is(recErr, ErrGrantUnbound): |
| + // A record signed under a grant that names no account binds |
| + // nothing on a box (hunt H3-M2); authorizing the version |
| + // replaces it. |
| st.NoRecord = true |
| default: |
| st.RecordErr = fmt.Sprintf("%s: promotion record for %s: %v", ChannelKey(acct, app, name), p.Version, recErr) |
diff --git a/internal/release/grant.go b/internal/release/grant.go| index 59df20a95..e1dd3e42c 100644 |
| --- a/internal/release/grant.go |
| +++ b/internal/release/grant.go |
| @@ -22,6 +22,7 @@ import ( |
| "crypto/rand" |
| "encoding/base64" |
| "encoding/json" |
| + "errors" |
| "fmt" |
| "regexp" |
| "strings" |
| @@ -58,6 +59,13 @@ func IsScopedSeed(seed string) bool { |
| type Grant struct { |
| Schema int `json:"schema"` // 1 |
| Pub string `json:"pub"` // base64 Ed25519 public key of the scoped key |
| + // Account is the one account whose channels and promotion records the |
| + // key may sign (hunt H3-M2). A grant minted before the field existed |
| + // names none, and verification refuses it on every read that acts on |
| + // what it signed (ErrGrantUnbound): without it a key minted for one |
| + // account's builder signed for every account. Old verifiers ignore the |
| + // field, so a bound grant is honoured there exactly as before. |
| + Account string `json:"account,omitempty"` |
| // Rungs uses the frozen ladder vocabulary (RungCanary, RungEdge, |
| // RungBeta). "canary" covers every canary/<branch> channel. RungStable |
| // may never appear. |
| @@ -85,10 +93,16 @@ var grantNameRe = regexp.MustCompile(`^[a-zA-Z0-9][a-zA-Z0-9._-]{0,63}$`) |
| // secret store, as CARLOS_RELEASE_KEY) and the base64 grant blob (not secret, |
| // as CARLOS_RELEASE_GRANT). The deployment's CARLOS_RELEASE_PUBKEY does not |
| // change: the fleet still trusts exactly one key, and this one chains to it. |
| -func MintKeyGrant(root ed25519.PrivateKey, name string, rungs []string, ttl time.Duration) (seed, grantB64 string, err error) { |
| +// |
| +// acct is the account the key signs for, and the only one: a grant is |
| +// minted for one account's builder. |
| +func MintKeyGrant(root ed25519.PrivateKey, acct, name string, rungs []string, ttl time.Duration) (seed, grantB64 string, err error) { |
| if len(root) != ed25519.PrivateKeySize { |
| return "", "", fmt.Errorf("mint key grant: need the root signing key") |
| } |
| + if !ValidAccount(acct) { |
| + return "", "", fmt.Errorf("mint key grant: invalid account %q", acct) |
| + } |
| if !grantNameRe.MatchString(name) { |
| return "", "", fmt.Errorf("mint key grant: invalid name %q (letters, digits, . _ - ; up to 64)", name) |
| } |
| @@ -122,6 +136,7 @@ func MintKeyGrant(root ed25519.PrivateKey, name string, rungs []string, ttl time |
| g := Grant{ |
| Schema: 1, |
| Pub: base64.StdEncoding.EncodeToString(pub), |
| + Account: acct, |
| Rungs: append([]string(nil), rungs...), |
| Name: name, |
| MintedAt: now, |
| @@ -212,6 +227,11 @@ func validateGrant(g *Grant) error { |
| if _, err := ParsePublicKey(g.Pub, "key grant pub"); err != nil { |
| return err |
| } |
| + // Absent is a grant from before the binding, refused where it is used |
| + // (allowsAccount); present must be a real account. |
| + if g.Account != "" && !ValidAccount(g.Account) { |
| + return fmt.Errorf("key grant %q names invalid account %q", g.Name, g.Account) |
| + } |
| if len(g.Rungs) == 0 { |
| return fmt.Errorf("key grant %q names no rungs", g.Name) |
| } |
| @@ -238,7 +258,37 @@ func validateGrant(g *Grant) error { |
| return nil |
| } |
| -// allows reports whether this grant covers a channel at a given moment. |
| +// ErrGrantUnbound is a key grant that names no account: minted before the |
| +// binding (hunt H3-M2), so it cannot say whose channels its key may sign. |
| +// Every read that acts on what such a key signed refuses it; the write |
| +// verbs' read of the pointer they replace accepts it, so promoting, rolling |
| +// back or resigning the channel with the root key or a bound grant repairs |
| +// it. |
| +var ErrGrantUnbound = errors.New("release: key grant names no account") |
| + |
| +// allows reports whether this grant covers a channel of an account at a |
| +// given moment: allowsAccount, then allowsRung. |
| +func (g *Grant) allows(acct, channel string, at time.Time) error { |
| + if err := g.allowsAccount(acct); err != nil { |
| + return err |
| + } |
| + return g.allowsRung(channel, at) |
| +} |
| + |
| +// allowsAccount reports whether this grant may sign for acct. acct is always |
| +// the account the SIGNED payload names, never a caller's argument. |
| +func (g *Grant) allowsAccount(acct string) error { |
| + if g.Account == "" { |
| + return fmt.Errorf("%w: key grant %q was minted before grants named an account; mint a new key for the account it builds for", |
| + ErrGrantUnbound, g.Name) |
| + } |
| + if g.Account != acct { |
| + return fmt.Errorf("key grant %q is for account %s and cannot sign for account %s", g.Name, g.Account, acct) |
| + } |
| + return nil |
| +} |
| + |
| +// allowsRung reports whether this grant covers a channel at a given moment. |
| // |
| // `at` is passed in rather than read from the clock, and that is the whole |
| // design of expiry (spec §5): at verification it is the pointer's OWN |
| @@ -251,7 +301,9 @@ func validateGrant(g *Grant) error { |
| // controls promoted_at, so it can backdate a pointer to evade its own expiry. |
| // Expiry is hygiene, not revocation. Revoking a key that is being actively |
| // misused means rotating the ROOT key, which kills every grant at once. |
| -func (g *Grant) allows(channel string, at time.Time) error { |
| +// (Hunt H3-M2's second half; the options for a box-enforced expiry or |
| +// revocation are in docs/superpowers/notes/2026-11-29-scoped-key-expiry.md.) |
| +func (g *Grant) allowsRung(channel string, at time.Time) error { |
| rung, ok := Rung(channel) |
| if !ok { |
| return fmt.Errorf("key grant %q covers rungs (%s); %q is not a rung at all — point it with the root key", |
diff --git a/internal/release/grant_test.go b/internal/release/grant_test.go| index ff762cbbe..c88230bb0 100644 |
| --- a/internal/release/grant_test.go |
| +++ b/internal/release/grant_test.go |
| @@ -10,10 +10,17 @@ import ( |
| ) |
| // mintGrant mints a scoped key + grant with the root key, failing the test on |
| -// error — the happy path most cases start from. |
| +// error — the happy path most cases start from. The grant is for account |
| +// bab, the account the scoped tests sign for. |
| func mintGrant(t *testing.T, root ed25519.PrivateKey, name string, rungs []string, ttl time.Duration) (ed25519.PrivateKey, string) { |
| t.Helper() |
| - seed, blob, err := MintKeyGrant(root, name, rungs, ttl) |
| + return mintGrantFor(t, root, "bab", name, rungs, ttl) |
| +} |
| + |
| +// mintGrantFor is mintGrant for a named account. |
| +func mintGrantFor(t *testing.T, root ed25519.PrivateKey, acct, name string, rungs []string, ttl time.Duration) (ed25519.PrivateKey, string) { |
| + t.Helper() |
| + seed, blob, err := MintKeyGrant(root, acct, name, rungs, ttl) |
| if err != nil { |
| t.Fatalf("MintKeyGrant(%v): %v", rungs, err) |
| } |
| @@ -52,6 +59,7 @@ func goodGrant(pub ed25519.PublicKey) Grant { |
| return Grant{ |
| Schema: 1, |
| Pub: base64.StdEncoding.EncodeToString(pub), |
| + Account: "bab", |
| Rungs: []string{RungCanary, RungEdge}, |
| Name: "edge-builder", |
| MintedAt: now, |
| @@ -73,7 +81,7 @@ func TestMintRefusesStable(t *testing.T) { |
| {RungEdge, RungStable}, |
| {RungCanary, RungStable, RungBeta}, |
| } { |
| - _, _, err := MintKeyGrant(root, "edge-builder", rungs, 30*24*time.Hour) |
| + _, _, err := MintKeyGrant(root, "bab", "edge-builder", rungs, 30*24*time.Hour) |
| if err == nil { |
| t.Fatalf("MintKeyGrant(%v) succeeded; stable must never be delegable", rungs) |
| } |
| @@ -121,7 +129,7 @@ func TestGrantAllowsRefusesStableChannel(t *testing.T) { |
| _, scopedPub := testKeys(t) |
| g := goodGrant(scopedPub) |
| g.Rungs = []string{RungEdge, RungStable} // as if validateGrant had let it by |
| - err := g.allows("stable", g.MintedAt) |
| + err := g.allowsRung("stable", g.MintedAt) |
| if err == nil { |
| t.Fatal("grant.allows permitted stable") |
| } |
| @@ -143,22 +151,22 @@ func TestGrantScopeMatchesTheLadderVocabulary(t *testing.T) { |
| g := goodGrant(scopedPub) // canary, edge |
| at := g.MintedAt |
| for _, ch := range []string{"canary", "canary/platform-adoption", "canary/keymail", "canary/console", "canary/rehearsal", "edge"} { |
| - if err := g.allows(ch, at); err != nil { |
| + if err := g.allowsRung(ch, at); err != nil { |
| t.Errorf("grant covering %v refused %q: %v", g.Rungs, ch, err) |
| } |
| } |
| for _, ch := range []string{"beta", "stable", "wip"} { |
| - if err := g.allows(ch, at); err == nil { |
| + if err := g.allowsRung(ch, at); err == nil { |
| t.Errorf("grant covering %v allowed %q", g.Rungs, ch) |
| } |
| } |
| // A grant that names beta reaches beta and nothing above it. |
| b := goodGrant(scopedPub) |
| b.Rungs = []string{RungBeta} |
| - if err := b.allows("beta", at); err != nil { |
| + if err := b.allowsRung("beta", at); err != nil { |
| t.Errorf("beta grant refused beta: %v", err) |
| } |
| - if err := b.allows("edge", at); err == nil { |
| + if err := b.allowsRung("edge", at); err == nil { |
| t.Error("beta-only grant allowed edge") |
| } |
| } |
| @@ -173,13 +181,13 @@ func TestGrantScopeMatchesTheLadderVocabulary(t *testing.T) { |
| func TestGrantExpiryIsComparedAgainstTheGivenMoment(t *testing.T) { |
| _, scopedPub := testKeys(t) |
| g := goodGrant(scopedPub) |
| - if err := g.allows("edge", g.ExpiresAt.Add(-time.Second)); err != nil { |
| + if err := g.allowsRung("edge", g.ExpiresAt.Add(-time.Second)); err != nil { |
| t.Errorf("grant refused a moment inside its window: %v", err) |
| } |
| - if err := g.allows("edge", g.ExpiresAt); err != nil { |
| + if err := g.allowsRung("edge", g.ExpiresAt); err != nil { |
| t.Errorf("grant refused its exact expiry instant: %v", err) |
| } |
| - err := g.allows("edge", g.ExpiresAt.Add(time.Second)) |
| + err := g.allowsRung("edge", g.ExpiresAt.Add(time.Second)) |
| if err == nil { |
| t.Fatal("grant allowed a moment past its expiry") |
| } |
| @@ -197,16 +205,16 @@ func TestGrantExpiryIsComparedAgainstTheGivenMoment(t *testing.T) { |
| // corresponding half of this test goes green when it must not. |
| func TestGrantLifetimeIsCappedAtOneYear(t *testing.T) { |
| root, rootPub := testKeys(t) |
| - if _, _, err := MintKeyGrant(root, "edge-builder", []string{RungEdge}, maxGrantTTL+time.Hour); err == nil { |
| + if _, _, err := MintKeyGrant(root, "bab", "edge-builder", []string{RungEdge}, maxGrantTTL+time.Hour); err == nil { |
| t.Error("MintKeyGrant accepted a lifetime over the cap") |
| } |
| - if _, _, err := MintKeyGrant(root, "edge-builder", []string{RungEdge}, maxGrantTTL); err != nil { |
| + if _, _, err := MintKeyGrant(root, "bab", "edge-builder", []string{RungEdge}, maxGrantTTL); err != nil { |
| t.Errorf("MintKeyGrant refused exactly the cap: %v", err) |
| } |
| - if _, _, err := MintKeyGrant(root, "edge-builder", []string{RungEdge}, 0); err == nil { |
| + if _, _, err := MintKeyGrant(root, "bab", "edge-builder", []string{RungEdge}, 0); err == nil { |
| t.Error("MintKeyGrant accepted a zero lifetime") |
| } |
| - if _, _, err := MintKeyGrant(root, "edge-builder", []string{RungEdge}, -time.Hour); err == nil { |
| + if _, _, err := MintKeyGrant(root, "bab", "edge-builder", []string{RungEdge}, -time.Hour); err == nil { |
| t.Error("MintKeyGrant accepted a negative lifetime") |
| } |
| @@ -229,10 +237,10 @@ func TestGrantLifetimeIsCappedAtOneYear(t *testing.T) { |
| // rung nothing matches, which is a scope nobody can reason about. |
| func TestGrantRejectsUnknownRungs(t *testing.T) { |
| root, rootPub := testKeys(t) |
| - if _, _, err := MintKeyGrant(root, "edge-builder", []string{"prod"}, time.Hour); err == nil { |
| + if _, _, err := MintKeyGrant(root, "bab", "edge-builder", []string{"prod"}, time.Hour); err == nil { |
| t.Error("MintKeyGrant accepted an unknown rung") |
| } |
| - if _, _, err := MintKeyGrant(root, "edge-builder", nil, time.Hour); err == nil { |
| + if _, _, err := MintKeyGrant(root, "bab", "edge-builder", nil, time.Hour); err == nil { |
| t.Error("MintKeyGrant accepted an empty rung list") |
| } |
| _, scopedPub := testKeys(t) |
| @@ -317,7 +325,7 @@ func TestMintedGrantRoundTrips(t *testing.T) { |
| if got := g.ExpiresAt.Sub(g.MintedAt); got != 30*24*time.Hour { |
| t.Fatalf("grant lifetime = %v, want 720h", got) |
| } |
| - if err := g.allows("edge", g.MintedAt); err != nil { |
| + if err := g.allowsRung("edge", g.MintedAt); err != nil { |
| t.Fatalf("minted edge grant refuses edge: %v", err) |
| } |
| } |
| @@ -332,7 +340,7 @@ func TestMintedGrantRoundTrips(t *testing.T) { |
| // promote-side "grant is missing" refusal loses the only signal it has. |
| func TestScopedSeedIsTaggedAndStillParses(t *testing.T) { |
| root, _ := testKeys(t) |
| - seed, _, err := MintKeyGrant(root, "edge-builder", []string{RungEdge}, time.Hour) |
| + seed, _, err := MintKeyGrant(root, "bab", "edge-builder", []string{RungEdge}, time.Hour) |
| if err != nil { |
| t.Fatal(err) |
| } |
| @@ -387,14 +395,14 @@ func TestGrantBlobParseErrorsNameTheSource(t *testing.T) { |
| func TestGrantRefusesAPointerPredatingTheGrant(t *testing.T) { |
| _, scopedPub := testKeys(t) |
| g := goodGrant(scopedPub) |
| - err := g.allows("edge", g.MintedAt.Add(-time.Second)) |
| + err := g.allowsRung("edge", g.MintedAt.Add(-time.Second)) |
| if err == nil { |
| t.Fatal("grant honoured a pointer dated before the grant was minted") |
| } |
| if !strings.Contains(err.Error(), "predates") { |
| t.Errorf("refusal %q does not say the pointer predates the key", err) |
| } |
| - if err := g.allows("edge", g.MintedAt); err != nil { |
| + if err := g.allowsRung("edge", g.MintedAt); err != nil { |
| t.Errorf("grant refused its own mint instant: %v", err) |
| } |
| } |
diff --git a/internal/release/hunt_H3-M2_test.go b/internal/release/hunt_H3-M2_test.go| new file mode 100644 |
| index 000000000..e0f48faf1 |
| --- /dev/null |
| +++ b/internal/release/hunt_H3-M2_test.go |
| @@ -0,0 +1,89 @@ |
| +package release |
| + |
| +import ( |
| + "bytes" |
| + "context" |
| + "crypto/ed25519" |
| + "encoding/base64" |
| + "encoding/json" |
| + "testing" |
| + "time" |
| + |
| + "github.com/carlosframework/platform/internal/registry" |
| +) |
| + |
| +// hunt H3-M2 (Opus verifier). A scoped key the operator minted for one |
| +// account's builder ("ci-for-cdf") is used against another account ("dee"). |
| +// Grant (grant.go:58) has no account or app, Grant.allows (grant.go:254) |
| +// checks rung and promoted_at only, and verifyPointer (release.go:465) checks |
| +// the payload's account against the KEY's account, which the signer chose. |
| + |
| +func TestHunt_H3_M2_ScopedKeyMovesAnotherAccountsChannel(t *testing.T) { |
| + ctx := context.Background() |
| + root, rootPub := testKeys(t) |
| + key, blob := mintGrantFor(t, root, "cdf", "ci-for-cdf", []string{RungCanary, RungEdge}, 30*24*time.Hour) |
| + sg, err := ScopedSigner(key, blob, rootPub) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + s := NewDirStore(t.TempDir()) |
| + // The victim account's build, shipped by the victim. |
| + shipRelease(t, s, "dee", "victim", "v1", adoptPlatform, []byte("dee's build")) |
| + |
| + // The production promote verb (claim_app_writes.go:31), as the CLI runs |
| + // it with CARLOS_RELEASE_KEY + CARLOS_RELEASE_GRANT. |
| + _, perr := sg.PromoteOnLadder(ctx, s, "dee", "victim", "edge", "v1", PromoteOptions{Hotfix: true, Actor: "ci-for-cdf"}) |
| + |
| + opt := t.TempDir() |
| + reg := testRegistry(t) |
| + if err := reg.Upsert(registry.Route{Host: "victim.example.com", Kind: "instance", App: "victim", Channel: "edge", Account: "dee"}); err != nil { |
| + t.Fatal(err) |
| + } |
| + var out bytes.Buffer |
| + withCapturedStdout(t, &out, func() { |
| + if err := Pass(ctx, reg, s, rootPub, opt, func(string) error { return nil }, |
| + BakeDir(t.TempDir()), WithDigestRatchet(NewDigestRatchet(t.TempDir(), nil, false))); err != nil { |
| + t.Fatalf("Pass: %v", err) |
| + } |
| + }) |
| + ptr, cerr := Channel(ctx, s, rootPub, "dee", "victim", "edge") |
| + live, _ := LiveVersion(opt, "victim.example.com") |
| + if perr == nil || (cerr == nil && ptr.Version == "v1") || live == "v1" { |
| + t.Fatalf("H3-M2: grant %q (minted for cdf) moved dee/victim edge: promote err=%v, Channel=%+v err=%v, box live=%q; pass log:\n%s", |
| + "ci-for-cdf", perr, ptr, cerr, live, out.String()) |
| + } |
| +} |
| + |
| +// Expiry is not revocation (grant.go:248-252): a key whose grant lapsed in |
| +// 2025 still signs, today, a pointer dated inside its old window. SECURE: a |
| +// lapsed key signs nothing that verifies. |
| +func TestHunt_H3_M2_LapsedScopedKeyStillSigns(t *testing.T) { |
| + // Open: a box cannot tell when a scoped signature was made, since the |
| + // signer sets promoted_at. The options are a design decision for Paul: |
| + // docs/superpowers/notes/2026-11-29-scoped-key-expiry.md. |
| + t.Skip("H3-M2 lapsed-grant half open: docs/superpowers/notes/2026-11-29-scoped-key-expiry.md") |
| + ctx := context.Background() |
| + root, rootPub := testKeys(t) |
| + _, priv, _ := ed25519.GenerateKey(nil) |
| + g := Grant{Schema: 1, Pub: base64.StdEncoding.EncodeToString(priv.Public().(ed25519.PublicKey)), |
| + Rungs: []string{RungEdge}, Name: "ci-for-cdf", |
| + MintedAt: time.Date(2025, 1, 1, 0, 0, 0, 0, time.UTC), |
| + ExpiresAt: time.Date(2025, 2, 1, 0, 0, 0, 0, time.UTC)} |
| + sub := forgeGrantSub(t, root, g) // the operator's genuine 2025 grant |
| + |
| + s := NewDirStore(t.TempDir()) |
| + shipRelease(t, s, "dee", "victim", "v9", adoptPlatform, []byte("dee's build")) |
| + p := ChannelPointer{Schema: 1, Account: "dee", App: "victim", Channel: "edge", Version: "v9", |
| + PromotedAt: time.Date(2025, 1, 15, 0, 0, 0, 0, time.UTC)} |
| + payload, _ := json.MarshalIndent(p, "", " ") |
| + b64 := base64.StdEncoding.EncodeToString(payload) |
| + wire, _ := json.MarshalIndent(signedWrapper{Payload: b64, |
| + Sig: base64.StdEncoding.EncodeToString(ed25519.Sign(priv, []byte(b64))), Grant: sub}, "", " ") |
| + if _, err := s.Put(ctx, ChannelKey("dee", "victim", "edge"), wire, ""); err != nil { |
| + t.Fatal(err) |
| + } |
| + if got, err := Channel(ctx, s, rootPub, "dee", "victim", "edge"); err == nil { |
| + t.Fatalf("H3-M2: a grant that expired %s signed, today, a pointer for dee/victim edge -> %s that verifies", |
| + g.ExpiresAt.Format(time.RFC3339), got.Version) |
| + } |
| +} |
diff --git a/internal/release/production_test.go b/internal/release/production_test.go| index e1a0959f6..f5986e08a 100644 |
| --- a/internal/release/production_test.go |
| +++ b/internal/release/production_test.go |
| @@ -93,7 +93,7 @@ func TestProductionFlagRefusesScopedAndForeignKeys(t *testing.T) { |
| // A wrapper WITH a grant is refused outright — even a grant the root |
| // really signed. Mint a real scoped key and have it sign the flag. |
| - seed, grantB64, err := MintKeyGrant(priv, "builder", []string{RungEdge}, maxGrantTTL) |
| + seed, grantB64, err := MintKeyGrant(priv, "bab", "builder", []string{RungEdge}, maxGrantTTL) |
| if err != nil { |
| t.Fatal(err) |
| } |
diff --git a/internal/release/promotion.go b/internal/release/promotion.go| index 25bdc721e..0eeac987b 100644 |
| --- a/internal/release/promotion.go |
| +++ b/internal/release/promotion.go |
| @@ -84,7 +84,7 @@ func (sg Signer) WritePromotionRecord(ctx context.Context, s Store, rec Promotio |
| if sg.scope != nil { |
| return fmt.Errorf("promotion record: an authorization needs the deployment's root key") |
| } |
| - } else if err := sg.allows(rec.Channel, rec.At); err != nil { |
| + } else if err := sg.allows(rec.Account, rec.Channel, rec.At); err != nil { |
| return fmt.Errorf("promotion record: %w", err) |
| } |
| key := PromotionRecordKey(rec.Account, rec.App, rec.Version) |
| @@ -163,7 +163,8 @@ func ReadPromotionRecord(ctx context.Context, s Store, pub ed25519.PublicKey, ac |
| if rec.Channel == "" || rec.Authorized { |
| return nil, fmt.Errorf("promotion record %s/%s: an authorization signed by a scoped key", app, version) |
| } |
| - if err := scope.allows(rec.Channel, rec.At); err != nil { |
| + // rec.Account is the signed payload's, matched to acct above. |
| + if err := scope.allows(rec.Account, rec.Channel, rec.At); err != nil { |
| return nil, fmt.Errorf("promotion record %s/%s: %w", app, version, err) |
| } |
| } |
diff --git a/internal/release/promotion_test.go b/internal/release/promotion_test.go| index 525b74276..8faf2c034 100644 |
| --- a/internal/release/promotion_test.go |
| +++ b/internal/release/promotion_test.go |
| @@ -98,7 +98,7 @@ func TestScopedRecordsFollowTheGrant(t *testing.T) { |
| s := NewDirStore(t.TempDir()) |
| ctx := context.Background() |
| root, pub := testKeys(t) |
| - seed, grant, err := MintKeyGrant(root, "ci", []string{"canary"}, time.Hour) |
| + seed, grant, err := MintKeyGrant(root, "bab", "ci", []string{"canary"}, time.Hour) |
| if err != nil { |
| t.Fatal(err) |
| } |
diff --git a/internal/release/release.go b/internal/release/release.go| index 20041aacc..b330d7002 100644 |
| --- a/internal/release/release.go |
| +++ b/internal/release/release.go |
| @@ -255,6 +255,10 @@ type ChannelPointer struct { |
| // verified from (signedIdentity), set by the one parse site and nowhere |
| // else: PointerIdentity. A pointer built in memory has none. |
| identity string |
| + // grantUnbound says the pointer was signed under a key grant that names |
| + // no account (ErrGrantUnbound). Only verifyPredecessor returns such a |
| + // pointer; the repair listing reads it from here. |
| + grantUnbound bool |
| } |
| // Promotion is one entry in a channel pointer's audit trail. It rides inside |
| @@ -548,7 +552,7 @@ func signPointer(sg Signer, p *ChannelPointer) ([]byte, error) { |
| if err := validatePointer(p, p.Account, p.App, p.Channel); err != nil { |
| return nil, err |
| } |
| - if err := sg.allows(p.Channel, p.PromotedAt); err != nil { |
| + if err := sg.allows(p.Account, p.Channel, p.PromotedAt); err != nil { |
| return nil, err |
| } |
| if p.FastTrack && sg.scope != nil { |
| @@ -674,11 +678,20 @@ func verifyPointerBinding(pub ed25519.PublicKey, wrapper []byte, wantAcct, wantA |
| return nil, fmt.Errorf("channel pointer %s/%s: fast_track is root-key-only — a scoped key cannot waive the bake window", p.App, p.Channel) |
| } |
| if scope != nil { |
| + // The account the SIGNED payload names, which validatePointer has |
| + // just matched to the key's (hunt H3-M2). A grant that names no |
| + // account is refused like a pointer that names none, and accepted |
| + // only by the write verbs' read of the head they replace. |
| + err := scope.allowsAccount(p.Account) |
| + p.grantUnbound = errors.Is(err, ErrGrantUnbound) |
| + if err != nil && !(acceptUnbound && p.grantUnbound) { |
| + return nil, fmt.Errorf("channel pointer %s/%s: %w", p.App, p.Channel, err) |
| + } |
| // promoted_at, not the wall clock: adoption re-verifies every pass, so |
| // comparing expiry against now would make an expired grant take a |
| // running route's channel resolution dark long after the promotion it |
| // was meant to gate (spec §5). |
| - if err := scope.allows(p.Channel, p.PromotedAt); err != nil { |
| + if err := scope.allowsRung(p.Channel, p.PromotedAt); err != nil { |
| return nil, fmt.Errorf("channel pointer %s/%s: %w", p.App, p.Channel, err) |
| } |
| } |
| @@ -961,7 +974,7 @@ func (sg Signer) claimRawPromote(ctx context.Context, s Store, acct, app, channe |
| // above all no write. The ladder refuses in the same style, and for the |
| // same reason — an operator finding out from a verifier three machines |
| // away has already been told the wrong thing about what happened. |
| - if err := sg.allows(channel, time.Now().UTC()); err != nil { |
| + if err := sg.allows(acct, channel, time.Now().UTC()); err != nil { |
| return fmt.Errorf("promote: %w", err) |
| } |
| // A channel only ever points at a version that was actually shipped. The |
| @@ -1268,7 +1281,7 @@ func (sg Signer) claimRawPromoteOnLadder(ctx context.Context, s Store, acct, app |
| } |
| // Before the no-op read, before the prefix listing, before anything: a key |
| // that may not sign this channel is told so without touching the bucket. |
| - if err := sg.allows(channel, time.Now().UTC()); err != nil { |
| + if err := sg.allows(acct, channel, time.Now().UTC()); err != nil { |
| return res, fmt.Errorf("promote: %w", err) |
| } |
| // The target, named: its RUNG when the channel is one of the frozen |
| @@ -1304,8 +1317,10 @@ func (sg Signer) claimRawPromoteOnLadder(ctx context.Context, s Store, acct, app |
| // A repeat onto a pointer from before the account binding is not |
| // a no-op: nothing that acts on the pointer reads it any more |
| // (hunt H3-M8), the ladder included, so this re-signs it bound, |
| - // as a retry renews it. It is the repair such a channel gets. |
| - if opt.Retry || p.Account == "" { |
| + // as a retry renews it. It is the repair such a channel gets. A |
| + // pointer signed under a grant that names no account is the same |
| + // (hunt H3-M2). |
| + if opt.Retry || p.Account == "" || p.grantUnbound { |
| res.From = res.To |
| var rec []Promotion |
| if opt.Retry { |
| @@ -1490,7 +1505,7 @@ func (sg Signer) claimRawRollbackAuthorized(ctx context.Context, s Store, acct, |
| if !ValidApp(app) || !ValidChannel(channel) { |
| return fmt.Errorf("rollback: invalid app/channel %s/%s", app, channel) |
| } |
| - if err := sg.allows(channel, time.Now().UTC()); err != nil { |
| + if err := sg.allows(acct, channel, time.Now().UTC()); err != nil { |
| return fmt.Errorf("rollback: %w", err) |
| } |
| pub := sg.verifyPub() |
diff --git a/internal/release/release_test.go b/internal/release/release_test.go| index d5e6a5995..f7f9a4786 100644 |
| --- a/internal/release/release_test.go |
| +++ b/internal/release/release_test.go |
| @@ -718,7 +718,7 @@ func TestFastTrackIsRootOnly(t *testing.T) { |
| if err := Promote(ctx, s, priv, "bab", "kass", "edge", "v1"); err != nil { |
| t.Fatal(err) |
| } |
| - seed, grantB64, err := MintKeyGrant(priv, "builder", []string{RungEdge}, maxGrantTTL) |
| + seed, grantB64, err := MintKeyGrant(priv, "bab", "builder", []string{RungEdge}, maxGrantTTL) |
| if err != nil { |
| t.Fatal(err) |
| } |
diff --git a/internal/release/resign.go b/internal/release/resign.go| index 1b976c9e5..62e950c45 100644 |
| --- a/internal/release/resign.go |
| +++ b/internal/release/resign.go |
| @@ -33,7 +33,7 @@ func (sg Signer) PlanResign(ctx context.Context, s Store, acct, app, channel str |
| if !ValidAccount(acct) || !ValidApp(app) || !ValidChannel(channel) { |
| return nil, fmt.Errorf("resign: invalid %s/%s/%s", acct, app, channel) |
| } |
| - if err := sg.allows(channel, time.Now().UTC()); err != nil { |
| + if err := sg.allows(acct, channel, time.Now().UTC()); err != nil { |
| return nil, fmt.Errorf("resign: %w", err) |
| } |
| if err := resignMarker(ctx, s, sg, acct); err != nil { |
diff --git a/internal/release/scopedaccount_test.go b/internal/release/scopedaccount_test.go| new file mode 100644 |
| index 000000000..6ba404169 |
| --- /dev/null |
| +++ b/internal/release/scopedaccount_test.go |
| @@ -0,0 +1,275 @@ |
| +package release |
| + |
| +import ( |
| + "bytes" |
| + "context" |
| + "crypto/ed25519" |
| + "encoding/base64" |
| + "encoding/json" |
| + "errors" |
| + "strings" |
| + "testing" |
| + "time" |
| + |
| + "github.com/carlosframework/platform/internal/registry" |
| +) |
| + |
| +// A scoped key signs for the one account its grant names (hunt H3-M2). These |
| +// tests put on the bucket what a key HOLDER can sign, not what signPointer |
| +// would write, so they witness the box's refusal rather than the signer's |
| +// politeness. |
| + |
| +// accountlessGrant is a genuine root-signed grant from before grants named |
| +// an account, valid now: the shape every scoped key minted before the |
| +// binding carries. |
| +func accountlessGrant(t *testing.T, root ed25519.PrivateKey) (ed25519.PrivateKey, *signedGrant) { |
| + t.Helper() |
| + pub, priv, err := ed25519.GenerateKey(nil) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + now := time.Now().UTC().Truncate(time.Second) |
| + return priv, forgeGrantSub(t, root, Grant{Schema: 1, Pub: base64.StdEncoding.EncodeToString(pub), |
| + Rungs: []string{RungCanary, RungEdge}, Name: "old-ci", MintedAt: now.Add(-time.Hour), ExpiresAt: now.Add(24 * time.Hour)}) |
| +} |
| + |
| +// boundGrant is a grant minted today for acct. |
| +func boundGrant(t *testing.T, root ed25519.PrivateKey, acct string) (ed25519.PrivateKey, *signedGrant) { |
| + t.Helper() |
| + key, blob := mintGrantFor(t, root, acct, "ci-for-"+acct, []string{RungCanary, RungEdge}, 30*24*time.Hour) |
| + sub, err := parseGrantBlob(blob, "test") |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + return key, sub |
| +} |
| + |
| +// holderSigned wraps v as the key's holder can: any payload, signed by the |
| +// scoped key, with its grant attached. |
| +func holderSigned(t *testing.T, key ed25519.PrivateKey, sub *signedGrant, v any) []byte { |
| + t.Helper() |
| + payload, err := json.MarshalIndent(v, "", " ") |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + b64 := base64.StdEncoding.EncodeToString(payload) |
| + return mustJSON(t, signedWrapper{Payload: b64, Sig: base64.StdEncoding.EncodeToString(ed25519.Sign(key, []byte(b64))), Grant: sub}) |
| +} |
| + |
| +// plantEdgeHead ships bab/web v1 and puts an edge pointer to it signed by |
| +// key under sub. The pointer carries v1's digest, so the only thing a box |
| +// can refuse it for is who signed it. |
| +func plantEdgeHead(t *testing.T, s Store, key ed25519.PrivateKey, sub *signedGrant) { |
| + t.Helper() |
| + ctx := context.Background() |
| + shipRelease(t, s, "bab", "web", "v1", adoptPlatform, []byte("bab's build")) |
| + raw, _, err := s.Get(ctx, ManifestKey("bab", "web", "v1")) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + p := ChannelPointer{Schema: 1, Account: "bab", App: "web", Channel: "edge", Version: "v1", |
| + PromotedAt: time.Now().UTC().Truncate(pointerStampGrain), Digest: ManifestDigest(raw)} |
| + if _, err := s.Put(ctx, ChannelKey("bab", "web", "edge"), holderSigned(t, key, sub, p), ""); err != nil { |
| + t.Fatal(err) |
| + } |
| +} |
| + |
| +// boxAdopts runs a production adoption pass over a box routing bab/web edge |
| +// and reports the version it went live on ("" for none) and the pass log. |
| +func boxAdopts(t *testing.T, s Store, rootPub ed25519.PublicKey) (string, string) { |
| + t.Helper() |
| + opt := t.TempDir() |
| + reg := testRegistry(t) |
| + if err := reg.Upsert(registry.Route{Host: "web.example.com", Kind: "instance", App: "web", Channel: "edge", Account: "bab"}); err != nil { |
| + t.Fatal(err) |
| + } |
| + var out bytes.Buffer |
| + withCapturedStdout(t, &out, func() { |
| + if err := Pass(context.Background(), reg, s, rootPub, opt, func(string) error { return nil }, |
| + BakeDir(t.TempDir()), WithDigestRatchet(NewDigestRatchet(t.TempDir(), nil, false))); err != nil { |
| + t.Fatalf("Pass: %v", err) |
| + } |
| + }) |
| + live, _ := LiveVersion(opt, "web.example.com") |
| + return live, out.String() |
| +} |
| + |
| +// The box half: a pointer for bab signed under a grant for bab is adopted; |
| +// the same pointer signed under a grant for another account, or under a |
| +// grant that names none, is refused by Channel and never goes live. |
| +// |
| +// Mutation-mindedness: drop the allowsAccount call from verifyPointerBinding |
| +// and both refusals go live as v1. |
| +func TestBoxesRefuseAScopedPointerOutsideItsGrantsAccount(t *testing.T) { |
| + ctx := context.Background() |
| + for _, tc := range []struct { |
| + name string |
| + grant func(t *testing.T, root ed25519.PrivateKey) (ed25519.PrivateKey, *signedGrant) |
| + refusal string // "" adopts |
| + unbound bool |
| + }{ |
| + {"the grant's own account", func(t *testing.T, root ed25519.PrivateKey) (ed25519.PrivateKey, *signedGrant) { |
| + return boundGrant(t, root, "bab") |
| + }, "", false}, |
| + {"another account's grant", func(t *testing.T, root ed25519.PrivateKey) (ed25519.PrivateKey, *signedGrant) { |
| + return boundGrant(t, root, "cdf") |
| + }, "is for account cdf and cannot sign for account bab", false}, |
| + {"a grant that names no account", accountlessGrant, "minted before grants named an account", true}, |
| + } { |
| + t.Run(tc.name, func(t *testing.T) { |
| + root, rootPub := testKeys(t) |
| + s := NewDirStore(t.TempDir()) |
| + key, sub := tc.grant(t, root) |
| + plantEdgeHead(t, s, key, sub) |
| + |
| + _, cerr := Channel(ctx, s, rootPub, "bab", "web", "edge") |
| + live, log := boxAdopts(t, s, rootPub) |
| + if tc.refusal == "" { |
| + if cerr != nil || live != "v1" { |
| + t.Fatalf("in-account scoped pointer: Channel err = %v, live = %q; pass log:\n%s", cerr, live, log) |
| + } |
| + return |
| + } |
| + if cerr == nil || !strings.Contains(cerr.Error(), tc.refusal) { |
| + t.Fatalf("Channel err = %v, want it to say %q", cerr, tc.refusal) |
| + } |
| + if errors.Is(cerr, ErrGrantUnbound) != tc.unbound { |
| + t.Fatalf("Channel err = %v; errors.Is(ErrGrantUnbound) = %v, want %v", cerr, !tc.unbound, tc.unbound) |
| + } |
| + if live != "" { |
| + t.Fatalf("box went live on %q; pass log:\n%s", live, log) |
| + } |
| + }) |
| + } |
| +} |
| + |
| +// A head under a grant that names no account is a repair, not a mystery: |
| +// the listing names it, and promoting the same version again with the root |
| +// key re-signs it (the write verbs read the head they replace with |
| +// verifyPredecessor, which accepts it), after which boxes adopt it. |
| +func TestAccountlessGrantHeadIsListedAndRepaired(t *testing.T) { |
| + ctx := context.Background() |
| + root, rootPub := testKeys(t) |
| + s := NewDirStore(t.TempDir()) |
| + key, sub := accountlessGrant(t, root) |
| + plantEdgeHead(t, s, key, sub) |
| + |
| + report, _, err := DigestReport(ctx, s, rootPub, "bab", "web") |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + if len(report) != 1 || report[0].Err != "" || !report[0].Unbound || !report[0].NeedsRepair() { |
| + t.Fatalf("report = %+v, want edge listed as an unbound head to repair", report) |
| + } |
| + |
| + // The account signs digests, as every deployment's does since #253, so |
| + // the re-signed head keeps the digest that binds its bytes. |
| + if err := WriteDigestMarker(ctx, s, RootSigner(root), "bab", "op"); err != nil { |
| + t.Fatal(err) |
| + } |
| + res, err := RootSigner(root).PromoteOnLadder(ctx, s, "bab", "web", "edge", "v1", PromoteOptions{Hotfix: true, Actor: "op"}) |
| + if err != nil || res.NoOp { |
| + t.Fatalf("repeat root promote = %+v, %v; want a re-sign", res, err) |
| + } |
| + if p, err := Channel(ctx, s, rootPub, "bab", "web", "edge"); err != nil || p.Version != "v1" { |
| + t.Fatalf("after the repair Channel = %+v, %v", p, err) |
| + } |
| + if live, log := boxAdopts(t, s, rootPub); live != "v1" { |
| + t.Fatalf("after the repair the box is on %q; pass log:\n%s", live, log) |
| + } |
| +} |
| + |
| +// The signer half: a bound key refuses another account before writing, and |
| +// a key whose grant names no account cannot be loaded at all. |
| +func TestScopedSignerKeepsToItsAccount(t *testing.T) { |
| + ctx := context.Background() |
| + root, rootPub := testKeys(t) |
| + key, blob := mintGrantFor(t, root, "cdf", "ci-for-cdf", []string{RungEdge}, time.Hour) |
| + sg, err := ScopedSigner(key, blob, rootPub) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + s := NewDirStore(t.TempDir()) |
| + shipRelease(t, s, "bab", "web", "v1", adoptPlatform, []byte("bab's build")) |
| + if _, err := sg.PromoteOnLadder(ctx, s, "bab", "web", "edge", "v1", PromoteOptions{Hotfix: true}); err == nil { |
| + t.Fatal("a key for cdf promoted bab's edge") |
| + } |
| + if _, _, err := s.Get(ctx, ChannelKey("bab", "web", "edge")); err == nil { |
| + t.Fatal("a refused cross-account promote wrote a pointer") |
| + } |
| + if _, err := signPointer(sg, &ChannelPointer{Account: "bab", App: "web", Channel: "edge", Version: "v1"}); err == nil { |
| + t.Fatal("signPointer signed for another account") |
| + } |
| + |
| + oldKey, oldSub := accountlessGrant(t, root) |
| + oldBlob := base64.StdEncoding.EncodeToString(mustJSON(t, oldSub)) |
| + if _, err := ScopedSigner(oldKey, oldBlob, rootPub); !errors.Is(err, ErrGrantUnbound) { |
| + t.Fatalf("ScopedSigner over a grant naming no account = %v, want ErrGrantUnbound", err) |
| + } |
| + |
| + if _, _, err := MintKeyGrant(root, "", "ci", []string{RungEdge}, time.Hour); err == nil { |
| + t.Fatal("MintKeyGrant minted a grant for no account") |
| + } |
| + if _, _, err := MintKeyGrant(root, "../x", "ci", []string{RungEdge}, time.Hour); err == nil { |
| + t.Fatal("MintKeyGrant minted a grant for an invalid account") |
| + } |
| + pub, _, _ := ed25519.GenerateKey(nil) |
| + bad := Grant{Schema: 1, Pub: base64.StdEncoding.EncodeToString(pub), Account: "../x", Rungs: []string{RungEdge}, Name: "ci", |
| + MintedAt: time.Now().UTC(), ExpiresAt: time.Now().UTC().Add(time.Hour)} |
| + if err := validateGrant(&bad); err == nil { |
| + t.Fatal("validateGrant accepted an invalid account") |
| + } |
| +} |
| + |
| +// The second kind a scoped key signs, the promotion record, follows the |
| +// same rule on every reader: a record for bab under a grant for cdf, or |
| +// under one that names none, does not verify, and neither reads as absent. |
| +// A record binds a digestless head's bytes (hunt H3-M1), so a foreign one |
| +// would choose what a box stages. |
| +func TestPromotionRecordsKeepToTheGrantsAccount(t *testing.T) { |
| + ctx := context.Background() |
| + root, rootPub := testKeys(t) |
| + s := NewDirStore(t.TempDir()) |
| + shipRelease(t, s, "bab", "web", "v1", adoptPlatform, []byte("bab's build")) |
| + raw, _, _ := s.Get(ctx, ManifestKey("bab", "web", "v1")) |
| + rec := PromotionRecord{Schema: 1, Account: "bab", App: "web", Version: "v1", ManifestDigest: ManifestDigest(raw), |
| + Channel: "edge", At: time.Now().UTC().Truncate(time.Second)} |
| + |
| + own, ownSub := boundGrant(t, root, "bab") |
| + foreign, foreignSub := boundGrant(t, root, "cdf") |
| + old, oldSub := accountlessGrant(t, root) |
| + for _, tc := range []struct { |
| + name string |
| + key ed25519.PrivateKey |
| + sub *signedGrant |
| + ok bool |
| + unbound bool |
| + }{ |
| + {"own account", own, ownSub, true, false}, |
| + {"another account's grant", foreign, foreignSub, false, false}, |
| + {"a grant that names no account", old, oldSub, false, true}, |
| + } { |
| + _, etag, _ := s.Get(ctx, PromotionRecordKey("bab", "web", "v1")) |
| + if _, err := s.Put(ctx, PromotionRecordKey("bab", "web", "v1"), holderSigned(t, tc.key, tc.sub, rec), etag); err != nil { |
| + t.Fatal(err) |
| + } |
| + _, err := ReadPromotionRecord(ctx, s, rootPub, "bab", "web", "v1") |
| + switch { |
| + case tc.ok && err != nil: |
| + t.Errorf("%s: %v", tc.name, err) |
| + case !tc.ok && (err == nil || errors.Is(err, ErrNoPromotionRecord)): |
| + t.Errorf("%s: record read = %v, want a refusal that is not 'absent'", tc.name, err) |
| + case !tc.ok && errors.Is(err, ErrGrantUnbound) != tc.unbound: |
| + t.Errorf("%s: %v; errors.Is(ErrGrantUnbound) want %v", tc.name, err, tc.unbound) |
| + } |
| + } |
| + |
| + key, blob := mintGrantFor(t, root, "cdf", "ci-for-cdf", []string{RungEdge}, time.Hour) |
| + sg, err := ScopedSigner(key, blob, rootPub) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + if err := sg.WritePromotionRecord(ctx, s, PromotionRecord{Account: "bab", App: "web", Version: "v1", ManifestDigest: rec.ManifestDigest, Channel: "edge"}); err == nil { |
| + t.Fatal("a key for cdf wrote a record for bab") |
| + } |
| +} |
diff --git a/internal/release/scopedverify_test.go b/internal/release/scopedverify_test.go| index e6cb64d0d..58f57e40c 100644 |
| --- a/internal/release/scopedverify_test.go |
| +++ b/internal/release/scopedverify_test.go |
| @@ -215,6 +215,7 @@ func TestExpiryGatesPromotionNotAdoption(t *testing.T) { |
| g := Grant{ |
| Schema: 1, |
| Pub: base64.StdEncoding.EncodeToString(pub), |
| + Account: "bab", |
| Rungs: []string{RungEdge}, |
| Name: "edge-builder", |
| MintedAt: time.Date(2025, 1, 1, 0, 0, 0, 0, time.UTC), |
diff --git a/internal/release/signer.go b/internal/release/signer.go| index 9c411f711..4243e5e2b 100644 |
| --- a/internal/release/signer.go |
| +++ b/internal/release/signer.go |
| @@ -58,6 +58,11 @@ func ScopedSigner(key ed25519.PrivateKey, grantB64 string, root ed25519.PublicKe |
| if g.Pub != base64.StdEncoding.EncodeToString(pub) { |
| return Signer{}, fmt.Errorf("key grant %q is for a different key than CARLOS_RELEASE_KEY holds", g.Name) |
| } |
| + // Refused here as boxes refuse it, so a builder holding a pre-binding |
| + // grant learns at the first command, not from pointers no box adopts. |
| + if g.Account == "" { |
| + return Signer{}, fmt.Errorf("%w: key grant %q was minted before grants named an account; mint a new key with carlos release-keygen --scope ... --account <sqid>", ErrGrantUnbound, g.Name) |
| + } |
| return Signer{key: key, grant: sg, scope: g, root: root}, nil |
| } |
| @@ -65,14 +70,14 @@ func ScopedSigner(key ed25519.PrivateKey, grantB64 string, root ed25519.PublicKe |
| // root public key, whether this signer is the root or a delegate of it. |
| func (s Signer) verifyPub() ed25519.PublicKey { return s.root } |
| -// allows reports whether this signer may sign for a channel at a moment. A |
| -// root signer may sign anything, which is the property scoped keys exist to |
| -// take away from everything else. |
| -func (s Signer) allows(channel string, at time.Time) error { |
| +// allows reports whether this signer may sign for a channel of an account |
| +// at a moment. A root signer may sign anything, which is the property scoped |
| +// keys exist to take away from everything else. |
| +func (s Signer) allows(acct, channel string, at time.Time) error { |
| if s.scope == nil { |
| return nil |
| } |
| - return s.scope.allows(channel, at) |
| + return s.scope.allows(acct, channel, at) |
| } |
| // usable rejects a zero Signer before it reaches ed25519.Sign, which panics |
diff --git a/internal/release/writers_test.go b/internal/release/writers_test.go| index ea88ae196..248f30418 100644 |
| --- a/internal/release/writers_test.go |
| +++ b/internal/release/writers_test.go |
| @@ -145,7 +145,7 @@ func TestScopedPromoteCarriesDigests(t *testing.T) { |
| ctx := context.Background() |
| root, pub := testKeys(t) |
| markerOn(t, s, root, "bab") |
| - seed, grant, err := MintKeyGrant(root, "ci", []string{"canary"}, time.Hour) |
| + seed, grant, err := MintKeyGrant(root, "bab", "ci", []string{"canary"}, time.Hour) |
| if err != nil { |
| t.Fatal(err) |
| } |
diff --git a/scopedkeys_e2e_test.go b/scopedkeys_e2e_test.go| index cb9cdf358..1dcc1272d 100644 |
| --- a/scopedkeys_e2e_test.go |
| +++ b/scopedkeys_e2e_test.go |
| @@ -96,7 +96,12 @@ func TestScopedKeysCLI(t *testing.T) { |
| } |
| // -- scoped keygen --------------------------------------------------- |
| - out, err = run(rootEnv, "release-keygen", "-scope", "canary,edge", "-name", "edge-builder") |
| + // A scoped key signs for one account (hunt H3-M2), so minting one |
| + // without naming it is refused. |
| + if out, err := run(rootEnv, "release-keygen", "-scope", "canary,edge", "-name", "edge-builder"); err == nil { |
| + t.Fatalf("release-keygen --scope without --account minted a key:\n%s", out) |
| + } |
| + out, err = run(rootEnv, "release-keygen", "-scope", "canary,edge", "-name", "edge-builder", "-account", release.OpsAccount) |
| if err != nil { |
| t.Fatalf("release-keygen --scope: %v\n%s", err, out) |
| } |
| @@ -120,7 +125,7 @@ func TestScopedKeysCLI(t *testing.T) { |
| } |
| // stable is refused at mint, by the verb, naming stable. |
| - if out, err := run(rootEnv, "release-keygen", "-scope", "edge,stable", "-name", "bad"); err == nil { |
| + if out, err := run(rootEnv, "release-keygen", "-scope", "edge,stable", "-name", "bad", "-account", release.OpsAccount); err == nil { |
| t.Fatalf("release-keygen --scope edge,stable succeeded:\n%s", out) |
| } else if !strings.Contains(out, "stable") { |
| t.Fatalf("refusal does not name stable:\n%s", out) |
| @@ -128,7 +133,7 @@ func TestScopedKeysCLI(t *testing.T) { |
| // Minting needs the ROOT key: a scoped key cannot widen itself. |
| scopedOnly := []string{"CARLOS_RELEASE_KEY=" + scopedKey, "CARLOS_RELEASE_PUBKEY=" + rootPub} |
| - if out, err := run(scopedOnly, "release-keygen", "-scope", "beta", "-name", "wider"); err == nil { |
| + if out, err := run(scopedOnly, "release-keygen", "-scope", "beta", "-name", "wider", "-account", release.OpsAccount); err == nil { |
| t.Fatalf("a scoped key minted a grant:\n%s", out) |
| } |
| @@ -173,6 +178,23 @@ func TestScopedKeysCLI(t *testing.T) { |
| t.Fatalf("a stable pointer exists after a refused promote (stat err = %v)", err) |
| } |
| + // A key minted for another account signs nothing in this one, and |
| + // nothing is written (hunt H3-M2). |
| + out, err = run(rootEnv, "release-keygen", "-scope", "canary,edge", "-name", "other-builder", "-account", "bae") |
| + if err != nil { |
| + t.Fatalf("release-keygen --account bae: %v\n%s", err, out) |
| + } |
| + otherEnv := []string{"CARLOS_RELEASE_KEY=" + envValue(t, out, "CARLOS_RELEASE_KEY"), "CARLOS_RELEASE_PUBKEY=" + rootPub, |
| + "CARLOS_RELEASE_GRANT=" + envValue(t, out, "CARLOS_RELEASE_GRANT")} |
| + if out, err := run(otherEnv, "promote", "-app", "kass", "9f3c1ad", "canary/x"); err == nil { |
| + t.Fatalf("a key minted for account bae promoted in %s:\n%s", release.OpsAccount, out) |
| + } else if !strings.Contains(out, "other-builder") || !strings.Contains(out, "bae") { |
| + t.Errorf("cross-account refusal does not name the key and its account:\n%s", out) |
| + } |
| + if _, err := os.Stat(filepath.Join(bucket, filepath.FromSlash(release.ChannelKey(release.OpsAccount, "kass", "canary/x")))); !os.IsNotExist(err) { |
| + t.Fatalf("a canary pointer exists after a refused cross-account promote (stat err = %v)", err) |
| + } |
| + |
| // -hotfix bypasses the ladder, never the grant. |
| if out, err := run(scopedEnv, "promote", "-app", "kass", "-hotfix", "9f3c1ad", "stable"); err == nil { |
| t.Fatalf("--hotfix let the edge key reach stable:\n%s", out) |