gvisor slice 2: demo boxes must name their sandbox, with an alert
From the gVisor flagship plan (Fable audit F2, F7): - A demo box whose CARLOS_EXEC_SANDBOX is unset or auto refuses every start and build (EXEC-SANDBOX-UNSET) and its status says so; auto never resolves to gVisor. It must say gvisor, or systemd as a visible opt-out. - carlos system demos sandbox-intent gvisor|systemd records which sandbox demo boxes should run: ops owners only, audited in the same transaction, with a sign-in from the last 5 minutes (carried from the approval's verified gesture into the CLI token). - The demo_sandbox alert fires when a demo box runs another sandbox, is blocked or unset, or cannot be confirmed; one conditional GET per attached box, no listing. - runsc argv pins --platform=systrap --directfs=true (the pinned release's defaults). Rollout: before this reaches the flagship, its demo box's host.env gets CARLOS_EXEC_SANDBOX=systemd (runbook); on dev, set the intent to gvisor after the roll. Paul dropped the slice 4 window gate (2026-11-28). Reviews: Astra and Fable, two rounds plus P2 fixes; census approved. Copy approved by Paul. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Squashed from gvisor-slice2-explicit-mode into main.
64 files changed,
+1,831
−210
.amadan/code-health.tsv+0 −1docs/parity.md+1 −1docs/superpowers/notes/census-proposal-gvisor-slice2-explicit-mode.md+11 −0docs/superpowers/runbooks/gvisor-demos.md+30 −2docs/superpowers/specs/2026-11-08-gvisor-demos-design.md+5 −0internal/console/alertdemosandbox.go+157 −0internal/console/alertdemosandbox_test.go+494 −0internal/console/alertnotify.go+8 −0internal/console/alertpages.go+2 −1internal/console/alertsignals.go+121 −23internal/console/apidemooperator.go+1 −1internal/console/authcli.go+3 −1internal/console/authstore.go+47 −8internal/console/demo_sandbox_intent.go+132 −0internal/console/demo_sandbox_intent_test.go+292 −0internal/console/demo_store.go+3 −0internal/console/routedecls.go+3 −0internal/console/store_gate.go+1 −1internal/console/svcroutes_test.go+1 −0internal/demobuild/gvisor_test.go+2 −2internal/execsandbox/command.go+11 −1internal/execsandbox/command_test.go+1 −1internal/execsandbox/config.go+12 −10internal/execsandbox/config_fix1_test.go+11 −11internal/execsandbox/contract_test.go+8 −17internal/execsandbox/mode.go+10 −8internal/host/execsandbox_explicit_linux_test.go+156 −0internal/host/execsandboxresolver_test.go+2 −83internal/host/gvisor_hardening_rootrunner_linux_test.go+1 −1internal/host/testdata/gvisor-systemd257/README.md+19 −0internal/host/testdata/gvisor-systemd257/build-active.all.show+2 −2internal/host/testdata/gvisor-systemd257/build-active.cat+1 −1internal/host/testdata/gvisor-systemd257/build-active.show+2 −2internal/host/testdata/gvisor-systemd257/build-before.all.show+2 −2internal/host/testdata/gvisor-systemd257/build-before.cat+1 −1internal/host/testdata/gvisor-systemd257/build-before.show+2 −2internal/host/testdata/gvisor-systemd257/probe-active.all.show+2 −2internal/host/testdata/gvisor-systemd257/probe-active.cat+1 −1internal/host/testdata/gvisor-systemd257/probe-active.show+2 −2internal/host/testdata/gvisor-systemd257/probe-before.all.show+2 −2internal/host/testdata/gvisor-systemd257/probe-before.cat+1 −1internal/host/testdata/gvisor-systemd257/probe-before.show+2 −2internal/host/testdata/gvisor-systemd257/run-active.all.show+2 −2internal/host/testdata/gvisor-systemd257/run-active.cat+1 −1internal/host/testdata/gvisor-systemd257/run-active.show+2 −2internal/host/testdata/gvisor-systemd257/run-before.all.show+2 −2internal/host/testdata/gvisor-systemd257/run-before.cat+1 −1internal/host/testdata/gvisor-systemd257/run-before.show+2 −2internal/instancectl/gvisor_fix1_test.go+1 −1internal/instancectl/gvisorunit_readback_test.go+1 −1internal/instancectl/sandbox.go+3 −0internal/instancectl/sandbox_unset_test.go+63 −0internal/provision/gvisor_slice2_census_test.go+35 −0internal/provision/plan9_b8_census_test.go+1 −1internal/provision/testdata/plan14-root-reads-chain.tsv+1 −0internal/provision/testdata/plan14-root-reads-gvisor-slice2-explicit-mode.tsv+5 −0parity/cli.tsv+1 −0parity/parity.tsv+1 −1status_instances.go+8 −0status_instances_test.go+5 −3system_demos.go+48 −0system_demos_api.go+21 −0system_demos_test.go+60 −0testdata/clireg-golden.jsonl+2 −0
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-1LzaTg
.amadan/test-gate.sh
go: downloading github.com/aws/aws-sdk-go-v2 v1.44.0
go: downloading github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.68.0
go: downloading github.com/aws/aws-sdk-go-v2/service/costexplorer v1.67.5
go: downloading github.com/aws/aws-sdk-go-v2/service/s3 v1.105.0
go: downloading github.com/aws/smithy-go v1.28.1
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading golang.org/x/net v0.62.0
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/prometheus/client_golang v1.17.0
go: downloading github.com/aws/aws-sdk-go-v2/service/sns v1.43.0
go: downloading github.com/aws/aws-sdk-go-v2/config v1.32.6
go: downloading golang.org/x/crypto v0.58.0
go: downloading github.com/aws/aws-sdk-go-v2/service/acm v1.45.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ec2 v1.324.0
go: downloading github.com/aws/aws-sdk-go-v2/service/iam v1.58.2
go: downloading github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.37.0
go: downloading github.com/aws/aws-sdk-go-v2/service/route53 v1.64.1
go: downloading github.com/aws/aws-sdk-go-v2/service/sts v1.45.6
go: downloading golang.org/x/sys v0.49.0
go: downloading golang.org/x/mod v0.41.0
go: downloading github.com/pion/logging v0.2.4
go: downloading github.com/pion/turn/v4 v4.1.4
go: downloading github.com/pion/stun/v3 v3.1.5
go: downloading github.com/pierrec/lz4/v4 v4.1.22
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/pion/dtls/v3 v3.1.4
go: downloading github.com/pion/transport/v4 v4.0.2
go: downloading github.com/pion/randutil v0.1.0
go: downloading github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0
go: downloading github.com/wlynxg/anet v0.0.5
go: downloading golang.org/x/text v0.43.0
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/memory v1.11.0
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading github.com/google/uuid v1.6.0
go: downloading modernc.org/mathutil v1.7.1
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/memory v1.11.0
go: downloading github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec
=== launchctx (4 s, from +0 s)
ok amadan.net/carlos/platform.git/launchctx 0.015s
? amadan.net/carlos/platform.git/launchctx/controlname [no test files]
? amadan.net/carlos/platform.git/launchctx/wireid [no test files]
=== vet (178 s, from +0 s)
go: downloading github.com/klauspost/compress v1.20.2
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/google/uuid v1.6.0
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading modernc.org/memory v1.11.0
=== vet-tags (182 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 github.com/dustin/go-humanize v1.0.1
go: downloading github.com/google/uuid v1.6.0
go: downloading modernc.org/memory v1.11.0
go: downloading modernc.org/mathutil v1.7.1
=== gofmt (1 s, from +0 s)
gofmt -l .: clean
=== rest (386 s, from +15 s)
ok github.com/carlosframework/platform/cmd/carlos-media 124.838s
? github.com/carlosframework/platform/cmd/changelog [no test files]
ok github.com/carlosframework/platform/cmd/console 207.542s
ok github.com/carlosframework/platform/cmd/mediaimage 41.961s
ok github.com/carlosframework/platform/cmd/moveprobe 16.291s
ok github.com/carlosframework/platform/cmd/pricebook-export 0.050s
ok github.com/carlosframework/platform/cmd/rootfswitness 0.149s
ok github.com/carlosframework/platform/cmd/runsc-assets 0.214s
ok github.com/carlosframework/platform/cmd/zddprobe 0.961s
ok github.com/carlosframework/platform/internal/agentsock 0.068s
ok github.com/carlosframework/platform/internal/alerting 0.026s
ok github.com/carlosframework/platform/internal/analytics 0.576s
ok github.com/carlosframework/platform/internal/appconfig 42.842s
ok github.com/carlosframework/platform/internal/apperr 0.523s
ok github.com/carlosframework/platform/internal/applog 5.254s
ok github.com/carlosframework/platform/internal/apppolicy 3.525s
ok github.com/carlosframework/platform/internal/assetcache 0.566s
ok github.com/carlosframework/platform/internal/awsinv 0.024s
ok github.com/carlosframework/platform/internal/awsmanaged 13.003s
ok github.com/carlosframework/platform/internal/awsregiongroup 0.543s
ok github.com/carlosframework/platform/internal/awsterminations 0.036s
ok github.com/carlosframework/platform/internal/backupswords 0.010s
ok github.com/carlosframework/platform/internal/billing 0.120s
ok github.com/carlosframework/platform/internal/billing/billingtest 0.090s
ok github.com/carlosframework/platform/internal/billingstripe 2.178s
ok github.com/carlosframework/platform/internal/boxchoice 0.020s
ok github.com/carlosframework/platform/internal/boxid 4.248s
? 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.014s
ok github.com/carlosframework/platform/internal/boxself 0.164s
ok github.com/carlosframework/platform/internal/boxvolumes 0.044s
ok github.com/carlosframework/platform/internal/caps 5.025s
ok github.com/carlosframework/platform/internal/certwarm 0.013s
ok github.com/carlosframework/platform/internal/cgroup 1.609s
ok github.com/carlosframework/platform/internal/changelog 5.999s
ok github.com/carlosframework/platform/internal/clamd 0.102s
? github.com/carlosframework/platform/internal/cliflag [no test files]
ok github.com/carlosframework/platform/internal/clireg 0.042s
ok github.com/carlosframework/platform/internal/codehealth 18.102s
ok github.com/carlosframework/platform/internal/compute 0.020s
ok github.com/carlosframework/platform/internal/consolefleet 0.013s
? 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.929s
ok github.com/carlosframework/platform/internal/dbdoor/dbdoortest 0.045s
ok github.com/carlosframework/platform/internal/dbquery 0.041s
ok github.com/carlosframework/platform/internal/dbreads 3.012s
? github.com/carlosframework/platform/internal/dbreads/dbreadstest [no test files]
ok github.com/carlosframework/platform/internal/dbverify 0.046s
ok github.com/carlosframework/platform/internal/demo 0.019s
ok github.com/carlosframework/platform/internal/demobuild 5.178s
ok github.com/carlosframework/platform/internal/democlaim 0.492s
ok github.com/carlosframework/platform/internal/devbox 15.274s
ok github.com/carlosframework/platform/internal/dnsrec 0.020s
ok github.com/carlosframework/platform/internal/docsite 0.109s
ok github.com/carlosframework/platform/internal/domainreg 0.020s
ok github.com/carlosframework/platform/internal/domains 71.458s
ok github.com/carlosframework/platform/internal/doorkey 0.057s
ok github.com/carlosframework/platform/internal/economics 0.014s
ok github.com/carlosframework/platform/internal/edgefence 0.153s
ok github.com/carlosframework/platform/internal/edgeguard 0.169s
? github.com/carlosframework/platform/internal/edgeproof [no test files]
ok github.com/carlosframework/platform/internal/edgesfile 0.120s
ok github.com/carlosframework/platform/internal/egressaddr 0.012s
ok github.com/carlosframework/platform/internal/execsandbox 104.637s
ok github.com/carlosframework/platform/internal/fileacl 0.011s
ok github.com/carlosframework/platform/internal/fleetapi 2.603s
ok github.com/carlosframework/platform/internal/fleetstore 0.011s
ok github.com/carlosframework/platform/internal/fxrate 0.031s
ok github.com/carlosframework/platform/internal/gate 5.774s
ok github.com/carlosframework/platform/internal/genselect 0.092s
ok github.com/carlosframework/platform/internal/geo 0.091s
ok github.com/carlosframework/platform/internal/geoip 0.182s
ok github.com/carlosframework/platform/internal/groupadmission 0.009s
ok github.com/carlosframework/platform/internal/grouprollaws 17.011s
ok github.com/carlosframework/platform/internal/hadeparture 0.016s
ok github.com/carlosframework/platform/internal/hafresh 0.019s
ok github.com/carlosframework/platform/internal/hairpin 0.252s
ok github.com/carlosframework/platform/internal/historyreadback 1.357s
ok github.com/carlosframework/platform/internal/hostactors 25.657s
ok github.com/carlosframework/platform/internal/hostbox 22.351s
ok github.com/carlosframework/platform/internal/hostclaim 3.806s
ok github.com/carlosframework/platform/internal/hostenv 0.090s
ok github.com/carlosframework/platform/internal/hostevidence 0.012s
ok github.com/carlosframework/platform/internal/hostexec 24.585s
ok github.com/carlosframework/platform/internal/hostfence 0.270s
ok github.com/carlosframework/platform/internal/hostfiles 27.124s
ok github.com/carlosframework/platform/internal/hostfloor 0.315s
ok github.com/carlosframework/platform/internal/hostguard 1.630s
ok github.com/carlosframework/platform/internal/hostops 9.831s
? github.com/carlosframework/platform/internal/hostops/fencerelease [no test files]
ok github.com/carlosframework/platform/internal/hostops/internal/fencerelease 0.033s
ok github.com/carlosframework/platform/internal/hostquarantine 0.015s
ok github.com/carlosframework/platform/internal/hostrelocate 2.682s
ok github.com/carlosframework/platform/internal/hostresolve 0.533s
ok github.com/carlosframework/platform/internal/hostwrite 0.012s
ok github.com/carlosframework/platform/internal/infraview 0.012s
ok github.com/carlosframework/platform/internal/ingresshealth 0.010s
ok github.com/carlosframework/platform/internal/ingresshealth/awstg 0.031s
ok github.com/carlosframework/platform/internal/instancectl 66.936s
ok github.com/carlosframework/platform/internal/instanceexec 10.368s
ok github.com/carlosframework/platform/internal/instancefs 15.154s
ok github.com/carlosframework/platform/internal/instancekey 0.009s
ok github.com/carlosframework/platform/internal/instanceupdates 0.039s
ok github.com/carlosframework/platform/internal/interactive 0.691s
ok github.com/carlosframework/platform/internal/launchd 0.016s
ok github.com/carlosframework/platform/internal/layout 23.648s
ok github.com/carlosframework/platform/internal/layout/pubclass 104.252s
ok github.com/carlosframework/platform/internal/lbhealth 0.024s
ok github.com/carlosframework/platform/internal/lease 145.356s
ok github.com/carlosframework/platform/internal/lease/leasetest 1.829s
ok github.com/carlosframework/platform/internal/lease/locktest 0.030s
ok github.com/carlosframework/platform/internal/ledger 0.052s
ok github.com/carlosframework/platform/internal/mail 1.406s
ok github.com/carlosframework/platform/internal/mailer 0.896s
ok github.com/carlosframework/platform/internal/mailsubmit 1.785s
ok github.com/carlosframework/platform/internal/mailwire 0.007s
ok github.com/carlosframework/platform/internal/maintenance 0.248s
ok github.com/carlosframework/platform/internal/maintenanceexec 8.723s
ok github.com/carlosframework/platform/internal/maintenanceguard 0.331s
ok github.com/carlosframework/platform/internal/managedboot 3.812s
? 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.240s
ok github.com/carlosframework/platform/internal/media/mediatest 0.007s
ok github.com/carlosframework/platform/internal/mediaaws 60.857s
ok github.com/carlosframework/platform/internal/mediahandler 43.075s
ok github.com/carlosframework/platform/internal/mediajobs 1.524s
ok github.com/carlosframework/platform/internal/medialocal 10.036s
ok github.com/carlosframework/platform/internal/metrics 0.190s
ok github.com/carlosframework/platform/internal/minorunits 0.013s
ok github.com/carlosframework/platform/internal/moves 53.219s
ok github.com/carlosframework/platform/internal/moves/archive 3.671s
ok github.com/carlosframework/platform/internal/moves/offlinerun 0.098s
ok github.com/carlosframework/platform/internal/namedunits 0.043s
ok github.com/carlosframework/platform/internal/objstore 2.158s
ok github.com/carlosframework/platform/internal/ops 13.711s
ok github.com/carlosframework/platform/internal/pageindex 4.087s
ok github.com/carlosframework/platform/internal/parity 0.191s
? github.com/carlosframework/platform/internal/parity/cmd/parity-doc [no test files]
ok github.com/carlosframework/platform/internal/park 0.770s
ok github.com/carlosframework/platform/internal/perf 0.189s
ok github.com/carlosframework/platform/internal/plans 0.134s
ok github.com/carlosframework/platform/internal/privatefile 0.017s
ok github.com/carlosframework/platform/internal/provision 236.181s
ok github.com/carlosframework/platform/internal/proxyproto 0.939s
ok github.com/carlosframework/platform/internal/publicrelease 0.090s
ok github.com/carlosframework/platform/internal/ratelimit 0.270s
ok github.com/carlosframework/platform/internal/regionlabel 0.052s
ok github.com/carlosframework/platform/internal/regionname 0.096s
ok github.com/carlosframework/platform/internal/registrar 0.024s
ok github.com/carlosframework/platform/internal/registrar/openprovider 0.644s
? github.com/carlosframework/platform/internal/registrar/registrartest [no test files]
ok github.com/carlosframework/platform/internal/registry 81.019s
ok github.com/carlosframework/platform/internal/relay 7.640s
ok github.com/carlosframework/platform/internal/release 125.675s
? github.com/carlosframework/platform/internal/release/requestwitness [no test files]
ok github.com/carlosframework/platform/internal/replicagen 0.019s
ok github.com/carlosframework/platform/internal/replicas 0.055s
ok github.com/carlosframework/platform/internal/reqrec 6.711s
ok github.com/carlosframework/platform/internal/rollout 10.304s
ok github.com/carlosframework/platform/internal/rolloutwords 0.020s
ok github.com/carlosframework/platform/internal/rootaws 103.503s
ok github.com/carlosframework/platform/internal/rootfsimage 1.137s
ok github.com/carlosframework/platform/internal/rootparticipation 0.136s
ok github.com/carlosframework/platform/internal/rootstate 0.053s
ok github.com/carlosframework/platform/internal/runs 0.885s
ok github.com/carlosframework/platform/internal/s3compat 0.056s
ok github.com/carlosframework/platform/internal/s3fake 1.398s
ok github.com/carlosframework/platform/internal/s3meter 0.616s
ok github.com/carlosframework/platform/internal/safefile 0.086s
ok github.com/carlosframework/platform/internal/schedule 20.571s
ok github.com/carlosframework/platform/internal/seeds 0.071s
ok github.com/carlosframework/platform/internal/sim/litestreamfacts 4.723s
ok github.com/carlosframework/platform/internal/sim/mediajobs 50.458s
ok github.com/carlosframework/platform/internal/sim/regionha 21.214s
ok github.com/carlosframework/platform/internal/status 0.426s
ok github.com/carlosframework/platform/internal/steering 0.191s
ok github.com/carlosframework/platform/internal/stopevidence 0.258s
ok github.com/carlosframework/platform/internal/storecfg 0.363s
ok github.com/carlosframework/platform/internal/svcrole 0.012s
ok github.com/carlosframework/platform/internal/systemd 5.948s
? github.com/carlosframework/platform/internal/systemdshow [no test files]
ok github.com/carlosframework/platform/internal/team 3.781s
ok github.com/carlosframework/platform/internal/teamcontract 0.226s
ok github.com/carlosframework/platform/internal/telemetry 0.020s
ok github.com/carlosframework/platform/internal/termfence 3.108s
ok github.com/carlosframework/platform/internal/timerspec 0.032s
ok github.com/carlosframework/platform/internal/tsidentity 4.186s
ok github.com/carlosframework/platform/internal/tunnelclient 0.482s
ok github.com/carlosframework/platform/internal/unixdial 0.012s
ok github.com/carlosframework/platform/internal/updatewords 0.026s
ok github.com/carlosframework/platform/internal/upstreamguard 0.012s
? github.com/carlosframework/platform/internal/upstreamguard/guardtest [no test files]
ok github.com/carlosframework/platform/internal/usage 0.019s
ok github.com/carlosframework/platform/internal/version 0.014s
ok github.com/carlosframework/platform/internal/vet 3.056s
ok github.com/carlosframework/platform/internal/zonehost 0.015s
ok github.com/carlosframework/platform/internal/zonehost/route53zones 0.058s
? github.com/carlosframework/platform/internal/zonehost/zonehosttest [no test files]
? github.com/carlosframework/platform/scripts/gitleaks-gate [no test files]
ok github.com/carlosframework/platform/scripts/govulncheck-gate 0.015s
ok github.com/carlosframework/platform/scripts/pathmapcheck 0.083s
ok github.com/carlosframework/platform/scripts/region-ha-g2/fixture 5.212s
ok github.com/carlosframework/platform/scripts/stateless-replicas-drill 1.189s
ok github.com/carlosframework/platform/scripts/witness-pointer 0.018s
=== cutover-witness (163 s, from +15 s)
ok github.com/carlosframework/platform 1.736s
=== internal_grouproll@0 (268 s, from +75 s)
ok github.com/carlosframework/platform/internal/grouproll 267.608s
=== internal_grouproll@1 (275 s, from +75 s)
ok github.com/carlosframework/platform/internal/grouproll 273.728s
=== internal_activator@0 (154 s, from +148 s)
ok github.com/carlosframework/platform/internal/activator 150.459s
=== internal_activator@1 (133 s, from +148 s)
ok github.com/carlosframework/platform/internal/activator 128.844s
=== internal_activator@2 (138 s, from +148 s)
ok github.com/carlosframework/platform/internal/activator 133.104s
=== internal_activator@3 (164 s, from +148 s)
ok github.com/carlosframework/platform/internal/activator 159.486s
=== root@0 (115 s, from +176 s)
ok github.com/carlosframework/platform 107.345s
=== root@1 (113 s, from +176 s)
ok github.com/carlosframework/platform 105.195s
=== root@2 (118 s, from +176 s)
ok github.com/carlosframework/platform 109.650s
=== root@3 (109 s, from +176 s)
ok github.com/carlosframework/platform 99.685s
=== root@4 (117 s, from +176 s)
ok github.com/carlosframework/platform 108.177s
=== internal_edge@0 (249 s, from +181 s)
ok github.com/carlosframework/platform/internal/edge 240.323s
=== internal_edge@1 (130 s, from +181 s)
ok github.com/carlosframework/platform/internal/edge 120.697s
=== internal_edge@2 (164 s, from +181 s)
ok github.com/carlosframework/platform/internal/edge 154.998s
=== internal_edge@3 (148 s, from +181 s)
ok github.com/carlosframework/platform/internal/edge 139.748s
=== internal_host@0 (168 s, from +222 s)
ok github.com/carlosframework/platform/internal/host 162.707s
=== internal_host@1 (245 s, from +222 s)
ok github.com/carlosframework/platform/internal/host 240.507s
=== internal_host@2 (133 s, from +222 s)
ok github.com/carlosframework/platform/internal/host 128.362s
=== internal_host@3 (278 s, from +222 s)
ok github.com/carlosframework/platform/internal/host 272.916s
=== internal_host@4 (149 s, from +222 s)
ok github.com/carlosframework/platform/internal/host 144.157s
=== internal_host@5 (192 s, from +222 s)
ok github.com/carlosframework/platform/internal/host 187.008s
=== internal_console@0 (204 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 196.719s
=== internal_console@1 (215 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 208.267s
=== internal_console@2 (225 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 218.225s
=== internal_console@3 (287 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 279.303s
=== internal_console@4 (226 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 218.762s
=== internal_console@5 (230 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 223.177s
=== internal_console@6 (233 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 225.814s
=== internal_console@7 (225 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 218.346s
=== internal_console@8 (223 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 216.550s
=== internal_console@9 (238 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 230.167s
=== internal_console@10 (253 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 245.248s
=== internal_console@11 (230 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 222.576s
=== internal_console@12 (309 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 301.833s
=== internal_console@13 (223 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 216.638s
=== internal_console@14 (217 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 210.473s
=== internal_console@15 (222 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 214.954s
=== internal_console@16 (231 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 224.035s
=== internal_console@17 (244 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 237.601s
=== internal_console@18 (217 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 209.084s
=== internal_console@19 (208 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 201.938s
=== internal_console@20 (205 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 197.650s
=== internal_console@21 (237 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 229.660s
=== internal_console@22 (231 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 224.080s
=== internal_console@23 (267 s, from +228 s)
ok github.com/carlosframework/platform/internal/console 260.407s
=== lists: internal_console 227 s, internal_edge 179 s, internal_activator 146 s, internal_host 221 s, root 175 s, internal_grouproll 74 s
=== cpu: the gate used 13091 cpu-seconds in 538 s, about 24.3 of 32 cores; the machine as a whole was 81% busy
=== opentofu ===
opentofu: 39 test files in 11 suites, OpenTofu v1.13.9
initialised in 16 s
ok 21 s infra/modules/box-fence-writer/tests/writer.tftest.hcl Success! 1 passed, 0 failed.
ok 19 s infra/modules/deployment-buckets/tests/console_floors.tftest.hcl Success! 1 passed, 0 failed.
ok 29 s infra/modules/deployment-buckets/tests/data_lifecycle.tftest.hcl Success! 3 passed, 0 failed.
ok 25 s infra/modules/deployment-buckets/tests/db_reads.tftest.hcl Success! 1 passed, 0 failed.
ok 23 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 28 s infra/modules/deployment-buckets/tests/media_results.tftest.hcl Success! 2 passed, 0 failed.
ok 89 s infra/modules/media-engine/tests/media_engine.tftest.hcl Success! 24 passed, 0 failed.
ok 25 s infra/modules/pdf-host/tests/computed.tftest.hcl Success! 2 passed, 0 failed.
ok 55 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 16 s infra/modules/region-host/ingress/tests/fixed-targets/tests/targets.tftest.hcl Success! 2 passed, 0 failed.
ok 66 s infra/modules/region-host/ingress/tests/group_ingress.tftest.hcl Success! 30 passed, 0 failed.
ok 46 s infra/modules/region-host/tests/alert_publish.tftest.hcl Success! 18 passed, 0 failed.
ok 43 s infra/modules/region-host/tests/alerts_topic.tftest.hcl Success! 16 passed, 0 failed.
ok 12 s infra/modules/region-host/tests/analytics_prune.tftest.hcl Success! 2 passed, 0 failed.
ok 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 73 s infra/modules/region-host/tests/group.tftest.hcl Success! 32 passed, 0 failed.
ok 10 s infra/modules/region-host/tests/group_alarms.tftest.hcl Success! 4 passed, 0 failed.
ok 10 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 37 s infra/modules/region-host/tests/group_operator.tftest.hcl Success! 13 passed, 0 failed.
ok 11 s infra/modules/region-host/tests/group_user_data.tftest.hcl Success! 3 passed, 0 failed.
ok 32 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 8 s infra/modules/region-host/tests/instance_metadata.tftest.hcl Success! 1 passed, 0 failed.
ok 23 s infra/modules/region-host/tests/mailer.tftest.hcl Success! 6 passed, 0 failed.
ok 14 s infra/modules/region-host/tests/mailer_group.tftest.hcl Success! 2 passed, 0 failed.
ok 13 s infra/modules/region-host/tests/managed_fleets/group_refusal.tftest.hcl Success! 2 passed, 0 failed.
ok 107 s infra/modules/region-host/tests/managed_fleets/managed_fleets.tftest.hcl Success! 46 passed, 0 failed.
ok 71 s infra/modules/region-host/tests/store_conversion.tftest.hcl Success! 27 passed, 0 failed.
ok 16 s infra/modules/region-host/tests/store_scanning.tftest.hcl Success! 4 passed, 0 failed.
ok 29 s infra/modules/region-host/tests/store_versioning.tftest.hcl Success! 11 passed, 0 failed.
ok 15 s infra/modules/region-host/tests/store_write_credentials.tftest.hcl Success! 4 passed, 0 failed.
ok 18 s infra/modules/region-host/tests/user_data_ignored.tftest.hcl Success! 3 passed, 0 failed.
ok 12 s infra/modules/region-remote-host/tests/data_lifecycle.tftest.hcl Success! 3 passed, 0 failed.
ok 15 s infra/modules/region-remote-host/tests/no_deployment_bucket.tftest.hcl Success! 5 passed, 0 failed.
ok 27 s infra/modules/scanner-host/tests/scanner_host.tftest.hcl Success! 14 passed, 0 failed.
opentofu: 39 files in 213 s
opentofu: PASS
=== cross ===
--- shard 0 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling darwin/arm64
--- shard 1 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling darwin/amd64
--- shard 2 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling linux/arm64
linux/arm64 carlos binary: 66584738 bytes (ceiling 70000000)
--- shard 3 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling windows/amd64
--- shard 4 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling windows/arm64
=== minio-contract ===
go version go1.26.10 linux/arm64
minio contract: arm64, minio RELEASE.2025-09-07T16-13-09Z, mc RELEASE.2025-08-13T08-35-41Z
minio: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/minio/minio.linux-arm64.RELEASE.2025-09-07T16-13-09Z
minio: downloaded, digest verified
mc: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/minio/mc.linux-arm64.RELEASE.2025-08-13T08-35-41Z
mc: downloaded, digest verified
minio healthy on 127.0.0.1:21113
Added `local` successfully.
Bucket created successfully `local/contract-bucket`.
Bucket created successfully `local/denied-bucket`.
Created policy `contract-only` successfully.
Added user `scopeduser` successfully.
Attached Policies: [contract-only]
To User: scopeduser
buckets and scoped user ready
=== RUN TestDeliveredContractMinio
=== RUN TestDeliveredContractMinio/put
=== RUN TestDeliveredContractMinio/get_round-trips_the_body
=== RUN TestDeliveredContractMinio/list_shows_the_key
=== RUN TestDeliveredContractMinio/head_and_list_agree_on_the_version
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_its_own_object
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/not_by_PutObjectTagging
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/and_not_by_x-amz-tagging_on_upload
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CreateMultipartUpload
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CopyObject_with_a_REPLACE_tagging_directive
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/but_multipart_itself_is_allowed
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_copy_itself_is_allowed
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/a_POST-policy_forged_tag_with_a_matching_version_is_still_not_a_verdict
=== RUN TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_an_ordinary_tagged-with-something-else_upload_is_allowed
=== RUN TestDeliveredContractMinio/delete_removes_it
=== RUN TestDeliveredContractMinio/cross-bucket_denial
--- PASS: TestDeliveredContractMinio (0.03s)
--- PASS: TestDeliveredContractMinio/put (0.00s)
--- PASS: TestDeliveredContractMinio/get_round-trips_the_body (0.00s)
--- PASS: TestDeliveredContractMinio/list_shows_the_key (0.00s)
--- PASS: TestDeliveredContractMinio/head_and_list_agree_on_the_version (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_its_own_object (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/not_by_PutObjectTagging (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/and_not_by_x-amz-tagging_on_upload (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route (0.02s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CreateMultipartUpload (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CopyObject_with_a_REPLACE_tagging_directive (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/but_multipart_itself_is_allowed (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_copy_itself_is_allowed (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/a_POST-policy_forged_tag_with_a_matching_version_is_still_not_a_verdict (0.00s)
--- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_an_ordinary_tagged-with-something-else_upload_is_allowed (0.00s)
--- PASS: TestDeliveredContractMinio/delete_removes_it (0.00s)
--- PASS: TestDeliveredContractMinio/cross-bucket_denial (0.00s)
PASS
ok github.com/carlosframework/platform/internal/objstore 0.039s
=== RUN TestT4StorageProbeMinio
2026/11/28 23:52:50 moves: T4: STORE: list: operation error S3: ListObjectsV2, https response error StatusCode: 403, RequestID: 18EC5A9A633403A2, HostID: d40142f5301940c9325e97f5a047c41e0b3f94e844d8203184f39bfdae71430b, api error SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your key and signing method.
--- PASS: TestT4StorageProbeMinio (0.01s)
PASS
ok github.com/carlosframework/platform/internal/host 0.049s
=== RUN TestS3StoreMinioContract
=== RUN TestS3StoreMinioContract/conditional_get_and_etag_listing
=== RUN TestS3StoreMinioContract/bump_through_every_mutation_path
--- PASS: TestS3StoreMinioContract (0.04s)
--- PASS: TestS3StoreMinioContract/conditional_get_and_etag_listing (0.01s)
--- PASS: TestS3StoreMinioContract/bump_through_every_mutation_path (0.02s)
PASS
ok github.com/carlosframework/platform/internal/release 0.043s
Bucket created successfully `local/analytics-versions`.
local/analytics-versions versioning is enabled
Created policy `analytics-versions` successfully.
Added user `analyticsversions` successfully.
Attached Policies: [analytics-versions]
To User: analyticsversions
=== RUN TestS3StoreMinioVersions
--- PASS: TestS3StoreMinioVersions (0.03s)
PASS
ok github.com/carlosframework/platform/internal/release 0.041s
Bucket created successfully `local/store-versioned`.
local/store-versioned versioning is enabled
Created policy `store-versioned` successfully.
Added user `storeversioned` successfully.
Attached Policies: [store-versioned]
To User: storeversioned
=== RUN TestVersionedContractMinio
--- PASS: TestVersionedContractMinio (0.01s)
PASS
ok github.com/carlosframework/platform/internal/objstore 0.021s
Bucket created successfully `local/wc-bucket`.
Created policy `writer` successfully.
Added user `wcwriter` successfully.
Attached Policies: [writer]
To User: wcwriter
=== RUN TestWriteCredentialContractMinio
=== RUN TestWriteCredentialContractMinio/put_under_the_prefix
=== RUN TestWriteCredentialContractMinio/multipart_under_the_prefix
=== RUN TestWriteCredentialContractMinio/refused:_read_elsewhere
=== RUN TestWriteCredentialContractMinio/refused:_list
=== RUN TestWriteCredentialContractMinio/refused:_tag
=== RUN TestWriteCredentialContractMinio/refused:_put_tagged
=== RUN TestWriteCredentialContractMinio/refused:_put_beside_the_prefix
=== RUN TestWriteCredentialContractMinio/refused:_copy_from_the_store
=== RUN TestWriteCredentialContractMinio/refused:_bucket_settings
=== RUN TestWriteCredentialContractMinio/refused:_read_under_the_prefix
=== RUN TestWriteCredentialContractMinio/refused:_head
=== RUN TestWriteCredentialContractMinio/refused:_list_uploads
=== RUN TestWriteCredentialContractMinio/refused:_delete
=== RUN TestWriteCredentialContractMinio/refused:_put_with_a_platform_tag
=== RUN TestWriteCredentialContractMinio/refused:_put_outside_the_prefix
=== RUN TestWriteCredentialContractMinio/refused:_put_to_another_bucket
--- PASS: TestWriteCredentialContractMinio (0.04s)
--- PASS: TestWriteCredentialContractMinio/put_under_the_prefix (0.00s)
--- PASS: TestWriteCredentialContractMinio/multipart_under_the_prefix (0.01s)
--- PASS: TestWriteCredentialContractMinio/refused:_read_elsewhere (0.00s)
--- PASS: TestWriteCredentialContractMinio/refused:_list (0.00s)
--- PASS: TestWriteCredentialContractMinio/refused:_tag (0.00s)
--- PASS: TestWriteCredentialContractMinio/refused:_put_tagged (0.00s)
--- PASS: TestWriteCredentialContractMinio/refused:_put_beside_the_prefix (0.00s)
--- PASS: TestWriteCredentialContractMinio/refused:_copy_from_the_store (0.00s)
--- PASS: TestWriteCredentialContractMinio/refused:_bucket_settings (0.00s)
--- PASS: TestWriteCredentialContractMinio/refused:_read_under_the_prefix (0.00s)
--- PASS: TestWriteCredentialContractMinio/refused:_head (0.00s)
--- PASS: TestWriteCredentialContractMinio/refused:_list_uploads (0.00s)
--- PASS: TestWriteCredentialContractMinio/refused:_delete (0.00s)
--- PASS: TestWriteCredentialContractMinio/refused:_put_with_a_platform_tag (0.00s)
--- PASS: TestWriteCredentialContractMinio/refused:_put_outside_the_prefix (0.00s)
--- PASS: TestWriteCredentialContractMinio/refused:_put_to_another_bucket (0.00s)
PASS
ok github.com/carlosframework/platform/internal/objstore 0.050s
=== RUN TestEndToEndMinio
=== RUN TestEndToEndMinio/plan
=== RUN TestEndToEndMinio/roll
=== RUN TestEndToEndMinio/replace
=== RUN TestEndToEndMinio/remove
--- PASS: TestEndToEndMinio (0.48s)
--- PASS: TestEndToEndMinio/plan (0.01s)
--- PASS: TestEndToEndMinio/roll (0.13s)
--- PASS: TestEndToEndMinio/replace (0.15s)
--- PASS: TestEndToEndMinio/remove (0.16s)
PASS
ok github.com/carlosframework/platform/internal/grouproll 0.492s
Bucket created successfully `local/dbf-deploy`.
Bucket created successfully `local/dbf-data-ie`.
Bucket created successfully `local/dbf-data-uk`.
local/dbf-deploy versioning is enabled
Created policy `dbf-console` successfully.
Created policy `dbf-ukbox` successfully.
Added user `dbfconsole` successfully.
Added user `dbfukbox` successfully.
Attached Policies: [dbf-console]
To User: dbfconsole
Attached Policies: [dbf-ukbox]
To User: dbfukbox
=== RUN TestDBForwardMinio
2026/11/28 23:52:59 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/28 23:52:59 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/28 23:52:59 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/28 23:52:59 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/28 23:52:59 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/28 23:52:59 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/28 23:52:59 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000003
2026/11/28 23:52:59 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000003 maxTXID=0000000000000003 size=454
2026/11/28 23:52:59 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000003
2026/11/28 23:52:59 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/28 23:52:59 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/28 23:52:59 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/28 23:52:59 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/28 23:52:59 console: could not notify member@example.com of a CLI token issue: keymail: lookup member@example.com: keymail: GET /api/federation/lookup?addr=member%40example.com&from=console%40127.0.0.1%3A39715: could not determine target mailbox
agent.go:136: dbreads: dbr_yy6anzydganpkq57bxxt5z6oka: planned 3 files (1544 bytes) and restored to 3 in 13ms
agent.go:136: dbreads: dbr_yy6anzydganpkq57bxxt5z6oka: output 5 bytes in 1 confirmed chunks in 2ms
2026/11/28 23:53:00 console: db read dbr_yy6anzydganpkq57bxxt5z6oka: relayed 1 chunks (102 bytes) in 1.006s, ended done
agent.go:136: dbreads: dbr_n3j3kt2mku3pqrvt4tym7y4vdu: planned 1 files (720 bytes) and restored to 1 in 12ms
agent.go:136: dbreads: dbr_n3j3kt2mku3pqrvt4tym7y4vdu: output 5 bytes in 1 confirmed chunks in 2ms
2026/11/28 23:53:01 console: db read dbr_n3j3kt2mku3pqrvt4tym7y4vdu: relayed 1 chunks (102 bytes) in 1.006s, ended done
agent.go:136: dbreads: dbr_ilvogwhp25pjq6ujuh3im27vdi: planned 3 files (1544 bytes) and held through 3 in 13ms
agent.go:136: dbreads: dbr_ilvogwhp25pjq6ujuh3im27vdi: output 1544 bytes in 1 confirmed chunks in 1ms
2026/11/28 23:53:02 console: db read dbr_ilvogwhp25pjq6ujuh3im27vdi: relayed 1 chunks (1641 bytes) in 1.005s, ended done
=== RUN TestDBForwardMinio/by_disconnect
=== NAME TestDBForwardMinio
agent.go:136: dbreads: dbr_a53psel7g6mynvt4vsquemn54y: planned 3 files (1544 bytes) and restored to 3 in 14ms
2026/11/28 23:53:02 console: db read dbr_a53psel7g6mynvt4vsquemn54y: relayed 0 chunks (0 bytes) in 35ms, ended client gone
agent.go:136: dbreads: dbr_a53psel7g6mynvt4vsquemn54y: output 5 bytes in 1 confirmed chunks in 104ms
=== RUN TestDBForwardMinio/by_timeout
=== NAME TestDBForwardMinio
agent.go:136: dbreads: dbr_kjbz3i3joch5a5x4dbw2wprs4q: planned 3 files (1544 bytes) and restored to 3 in 13ms
2026/11/28 23:53:22 console: db read dbr_kjbz3i3joch5a5x4dbw2wprs4q: relayed 0 chunks (0 bytes) in 19.098s, ended no-result
agent.go:136: dbreads: dbr_kjbz3i3joch5a5x4dbw2wprs4q: output 5 bytes in 1 confirmed chunks in 19.071s
--- PASS: TestDBForwardMinio (22.79s)
--- PASS: TestDBForwardMinio/by_disconnect (0.25s)
--- PASS: TestDBForwardMinio/by_timeout (19.21s)
PASS
ok github.com/carlosframework/platform/internal/console 22.841s
Bucket created successfully `local/media-transfers`.
Bucket created successfully `local/media-transfer-results`.
local/media-transfer-results versioning is enabled
Created policy `media-transfers` successfully.
Added user `mediatransfers` successfully.
Attached Policies: [media-transfers]
To User: mediatransfers
=== RUN TestMediaTransfersMinio
upload.go:117: codec: the store already holds video.mp4
upload.go:117: codec: the store already holds video.m3u8
upload.go:117: codec: the store already holds poster.jpg
--- PASS: TestMediaTransfersMinio (0.07s)
PASS
ok github.com/carlosframework/platform/internal/mediaaws 0.075s
Bucket created successfully `local/media-local-store`.
Bucket created successfully `local/media-local-results`.
Created policy `media-local` successfully.
Added user `medialocal` successfully.
Attached Policies: [media-local]
To User: medialocal
=== RUN TestLocalEndToEndMinio
--- PASS: TestLocalEndToEndMinio (0.56s)
PASS
ok github.com/carlosframework/platform/internal/medialocal 0.561s
=== RUN TestHeldHandoverTwoBoxMinio
2026/11/28 23:53:27 edge: mesh key: minted
2026/11/28 23:53:27 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/28 23:53:27 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/28 23:53:27 tenant admission is open. accepting tenant work
2026/11/28 23:53:27 activator: HA placement host=shop-e5b14b03.example.test kind=Place ref=annie reason=roomiest generation=2026-11-28T23:53:27Z lock_generation=0
2026/11/28 23:53:27 lease: t8-e5b14b03/shop-e5b14b03.example.test: HA lease acquired in 4ms (first wake)
2026/11/28 23:53:27 activator: shop-e5b14b03.example.test: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/11/28 23:53:27 activator: shop-e5b14b03.example.test: started carlos-instance@shop\x2de5b14b03.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 6ms, control socket 0s, key gate 0s, logs 0s) 6ms, launch file 0s, gate 0s, root start 2ms)
2026/11/28 23:53:27 activator: shop-e5b14b03.example.test: carlos-instance@shop\x2de5b14b03.example.test.service launched in 8ms, healthy 1ms later
2026/11/28 23:53:27 activator: shop-e5b14b03.example.test: woke in 21ms: checks 0s, lease 5ms, restore 0s, identity 0s, protect 0s, spawn 9ms, replicate 6ms
2026/11/28 23:53:27 lease: t8-e5b14b03/plain-e5b14b03.example.test: acquired in 1ms (client 0s, lock read and write 1ms)
2026/11/28 23:53:27 activator: no replica for plain-e5b14b03.example.test in s3://contract-bucket/t8-e5b14b03/plain-e5b14b03.example.test — booting fresh
2026/11/28 23:53:27 activator: plain-e5b14b03.example.test: started carlos-instance@plain\x2de5b14b03.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 1ms, instance key 0s, env 4ms, control socket 0s, key gate 0s, logs 0s) 5ms, launch file 0s, gate 0s, root start 1ms)
2026/11/28 23:53:27 activator: plain-e5b14b03.example.test: carlos-instance@plain\x2de5b14b03.example.test.service launched in 7ms, healthy 0s later
2026/11/28 23:53:27 activator: plain-e5b14b03.example.test: woke in 92ms: checks 0s, lease 1ms, restore 18ms, identity 0s, protect 0s, spawn 7ms, replicate 66ms
2026/11/28 23:53:27 lease: t8-e5b14b03/bot0.shop.bac.sidecar.internal: HA lease acquired in 4ms (first wake)
2026/11/28 23:53:27 activator: bot0.shop.bac.sidecar.internal: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/11/28 23:53:27 activator: bot0.shop.bac.sidecar.internal: woke in 20ms: checks 0s, lease 5ms, restore 0s, identity 0s, protect 0s, spawn 9ms, settle 0s, replicate 6ms
2026/11/28 23:53:27 activator: next-due probe plain-e5b14b03.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/28 23:53:27 activator: plain-e5b14b03.example.test hibernated
2026/11/28 23:53:27 activator: bot0.shop.bac.sidecar.internal: released with a marker (clean true, txid 1, files 3:508e22243874e4b47b5fd33cccb268c3aa5973eb3411ebf06547fdd8b5b437b6) in 6ms: files 1ms, sync 2ms, record 1ms, marker 2ms
2026/11/28 23:53:27 activator: bot0.shop.bac.sidecar.internal hibernated
2026/11/28 23:53:27 activator: next-due probe shop-e5b14b03.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/28 23:53:27 activator: shop-e5b14b03.example.test: released with a marker (clean true, txid 1, files 3:6013c231a473f4c58bb801c2bad8fbf54b103c1836fc3d9d8d8e36db72e118de) in 8ms: files 1ms, sync 5ms, record 1ms, marker 2ms
2026/11/28 23:53:27 activator: shop-e5b14b03.example.test hibernated
2026/11/28 23:53:27 lease: t8-e5b14b03/shop-e5b14b03.example.test: HA lease acquired in 3ms (clean marker)
2026/11/28 23:53:27 activator: shop-e5b14b03.example.test: restored (other-box)
2026/11/28 23:53:27 activator: shop-e5b14b03.example.test: started carlos-instance@shop\x2de5b14b03.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 1ms, control socket 0s, key gate 0s, logs 0s) 1ms, launch file 0s, gate 0s, root start 1ms)
2026/11/28 23:53:27 activator: shop-e5b14b03.example.test: carlos-instance@shop\x2de5b14b03.example.test.service launched in 2ms, healthy 0s later
2026/11/28 23:53:27 activator: shop-e5b14b03.example.test: woke in 87ms: checks 0s, lease 4ms, restore 26ms, identity 0s, protect 0s, spawn 2ms, replicate 55ms
2026/11/28 23:53:27 edge: ha-take shop-e5b14b03.example.test from annie (txn t8-witness, marker generation 1): holder betty, generation 2
2026/11/28 23:53:27 edge: forward shop-e5b14b03.example.test: annie handed the request over to betty; sending it there (occurrence #1)
hadrain_twobox_minio_linux_test.go:1238: drain report: {V:1 Transaction:t8-witness Incarnation:e5dcd75e9914cd9d00886a8a439d3471 Step:move Result:ok Reasons:[] Fence:t8-witness StartedAt:2026-11-28 23:53:27.544143585 +0000 UTC FinishedAt:2026-11-28 23:53:27.691821399 +0000 UTC Acked:[betty carol] Departed:[] Moved:[{Host:shop-e5b14b03.example.test Holder:betty Gen:2 Confirmed:take}] Released:[{Host:plain-e5b14b03.example.test Kind:other Marker:true Clean:true Reason:} {Host:bot0.shop.bac.sidecar.internal Kind:worker Marker:true Clean:true Reason:}] Unclean:[] Left:[] Holds:{LongestMS:142 Todays:0 RefusedAtOnce:1} Closed:0 Quiet:{DrainQuiet:{Waking:0 Stopping:0 Recovering:0 Owed:0} Held:[]}}
hadrain_twobox_minio_linux_test.go:1239: driver calls: [begin shop-e5b14b03.example.test <nil> stop plain-e5b14b03.example.test marker=true clean=true <nil> stop bot0.shop.bac.sidecar.internal marker=true clean=true <nil> releasing shop-e5b14b03.example.test <nil> stop shop-e5b14b03.example.test marker=true clean=true <nil> taken shop-e5b14b03.example.test betty <nil> end-moves]
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/bot0.shop.bac.sidecar.internal/0001/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/bot0.shop.bac.sidecar.internal/0002/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/bot0.shop.bac.sidecar.internal/0003/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: DELETE /contract-bucket/t8-e5b14b03/plain-e5b14b03.example.test/lock.json
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-e5b14b03/bot0.shop.bac.sidecar.internal/0009/0000000000000001-0000000000000001.ltx
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-e5b14b03/bot0.shop.bac.sidecar.internal/lock.json
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-e5b14b03/shop-e5b14b03.example.test/0009/0000000000000001-0000000000000001.ltx
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-e5b14b03/shop-e5b14b03.example.test/lock.json
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-e5b14b03/shop-e5b14b03.example.test/lock.json
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-e5b14b03/shop-e5b14b03.example.test/lock.json
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-e5b14b03/shop-e5b14b03.example.test/head.json
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/shop-e5b14b03.example.test/generations/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/shop-e5b14b03.example.test/0009/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/shop-e5b14b03.example.test/0008/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/shop-e5b14b03.example.test/0007/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/shop-e5b14b03.example.test/0006/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/shop-e5b14b03.example.test/0005/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/shop-e5b14b03.example.test/0004/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/shop-e5b14b03.example.test/0003/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/shop-e5b14b03.example.test/0002/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/shop-e5b14b03.example.test/0001/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/shop-e5b14b03.example.test/0000/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/shop-e5b14b03.example.test/0009/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/shop-e5b14b03.example.test/0008/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/shop-e5b14b03.example.test/0007/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/shop-e5b14b03.example.test/0006/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/shop-e5b14b03.example.test/0005/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/shop-e5b14b03.example.test/0004/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/shop-e5b14b03.example.test/0003/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/shop-e5b14b03.example.test/0002/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/shop-e5b14b03.example.test/0001/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/shop-e5b14b03.example.test/0000/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-e5b14b03/shop-e5b14b03.example.test/0009/0000000000000001-0000000000000001.ltx
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-e5b14b03/shop-e5b14b03.example.test/files/0/manifest.json
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-e5b14b03/shop-e5b14b03.example.test/files/0/objects/0000000000000001-77fdc6804ba3e84b043fc0b823bbd34f3be2a719ab91d944203bb141dd6a7078
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-e5b14b03/shop-e5b14b03.example.test/files/0/objects/0000000000000003-a6daf7148bca87dd1bb33680f842efe1f8918799770879cadd33b151320059dc
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/shop-e5b14b03.example.test/0009/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/shop-e5b14b03.example.test/0000/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/shop-e5b14b03.example.test/0001/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-e5b14b03/shop-e5b14b03.example.test/0000/0000000000000001-0000000000000001.ltx
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/shop-e5b14b03.example.test/0002/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/shop-e5b14b03.example.test/0000/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-e5b14b03/shop-e5b14b03.example.test/0003/
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-e5b14b03/shop-e5b14b03.example.test/0000/0000000000000002-0000000000000002.ltx
hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-e5b14b03/shop-e5b14b03.example.test/lock.json
hadrain_twobox_minio_linux_test.go:1243: drain took 194ms; S3 calls 45 (DELETE lock=1 GET files=3 GET head=1 GET lock=2 GET replica=2 LIST replica=30 PUT lock=3 PUT replica=3); deployment store calls 20 (GET edges=14 LIST edges=4 PUT edges=2)
hadrain_twobox_minio_linux_test.go:1367: the fenced A's start gate answers 503 "This service is unavailable. Try again later.\n" (Retry-After "10")
2026/11/28 23:53:27 lease: t8-e5b14b03/plain-e5b14b03.example.test: acquired in 2ms (client 0s, lock read and write 2ms)
2026/11/28 23:53:27 activator: plain-e5b14b03.example.test: started carlos-instance@plain\x2de5b14b03.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 0s, control socket 0s, key gate 0s, logs 0s) 0s, launch file 0s, gate 0s, root start 1ms)
2026/11/28 23:53:27 activator: plain-e5b14b03.example.test: carlos-instance@plain\x2de5b14b03.example.test.service launched in 1ms, healthy 0s later
2026/11/28 23:53:27 lease: /tmp/carlos-minio-contract-kPY6Ak/g/dw609854749/data/instances/plain-e5b14b03.example.test/plain-e5b14b03.example.test.db: continuity with the last clean close not proven; snapshot 1-0000000000000001 written before serving
2026/11/28 23:53:27 activator: plain-e5b14b03.example.test: woke in 11ms: checks 0s, lease 2ms, restore 0s, identity 0s, protect 1ms, spawn 2ms, replicate 7ms
2026/11/28 23:53:27 activator: next-due probe shop-e5b14b03.example.test: decode /api/next-due: invalid character 'b' looking for beginning of value — recording none (it sleeps until a request)
2026/11/28 23:53:27 activator: shop-e5b14b03.example.test: released with a marker (clean true, txid 2, files 3:6013c231a473f4c58bb801c2bad8fbf54b103c1836fc3d9d8d8e36db72e118de) in 4ms: files 1ms, sync 0s, record 1ms, marker 2ms
2026/11/28 23:53:27 activator: shop-e5b14b03.example.test hibernated
2026/11/28 23:53:27 tenant admission is closed for shutdown
2026/11/28 23:53:27 activator: next-due probe plain-e5b14b03.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/28 23:53:27 activator: plain-e5b14b03.example.test hibernated
--- PASS: TestHeldHandoverTwoBoxMinio (0.57s)
=== RUN TestHeldHandoverLostLeaseMinio
2026/11/28 23:53:27 edge: mesh key: minted
2026/11/28 23:53:27 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/28 23:53:27 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/28 23:53:27 tenant admission is open. accepting tenant work
2026/11/28 23:53:27 activator: HA placement host=shop-207a631f.example.test kind=Place ref=annie reason=roomiest generation=2026-11-28T23:53:27Z lock_generation=0
2026/11/28 23:53:27 lease: t8-207a631f/shop-207a631f.example.test: HA lease acquired in 3ms (first wake)
2026/11/28 23:53:27 activator: shop-207a631f.example.test: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/11/28 23:53:27 activator: shop-207a631f.example.test: started carlos-instance@shop\x2d207a631f.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 6ms, control socket 0s, key gate 0s, logs 0s) 6ms, launch file 0s, gate 0s, root start 1ms)
2026/11/28 23:53:27 activator: shop-207a631f.example.test: carlos-instance@shop\x2d207a631f.example.test.service launched in 7ms, healthy 0s later
2026/11/28 23:53:27 activator: shop-207a631f.example.test: woke in 70ms: checks 0s, lease 4ms, restore 0s, identity 0s, protect 0s, spawn 7ms, replicate 58ms
2026/11/28 23:53:28 activator: next-due probe shop-207a631f.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/28 23:53:28 activator: final checkpoint shop-207a631f.example.test: lease: release marker owed for s3://contract-bucket/t8-207a631f/shop-207a631f.example.test/lock.json (If-Match "8fc16daa2d0b8aa7125455d264e7f365"): lease: write release marker: operation error S3: PutObject, https response error StatusCode: 503, RequestID: , HostID: , api error ServiceUnavailable: witness: refused
2026/11/28 23:53:28 activator: shop-207a631f.example.test hibernated
2026/11/28 23:53:28 activator: handover of shop-207a631f.example.test left: released without a marker; its held requests get today's answer
hadrain_twobox_minio_linux_test.go:1469: the held request's hold ended "shop-207a631f.example.test client 4 "
hadrain_twobox_minio_linux_test.go:1486: driver calls: [begin shop-207a631f.example.test <nil> releasing shop-207a631f.example.test <nil> stop shop-207a631f.example.test marker=false clean=false <nil> left shop-207a631f.example.test released without a marker]
hadrain_twobox_minio_linux_test.go:1487: a request after the loss: 503 "This instance cannot wake right now. Please try again shortly.\n" (Retry-After "10", holder "none", 0s, err <nil>)
2026/11/28 23:53:28 tenant admission is closed for shutdown
2026/11/28 23:53:28 http: proxy error: context canceled
--- PASS: TestHeldHandoverLostLeaseMinio (0.32s)
PASS
ok github.com/carlosframework/platform/internal/host 0.942s
Bucket created successfully `local/gen-take`.
local/gen-take versioning is enabled
Created policy `gen-take` successfully.
Added user `gentake` successfully.
Attached Policies: [gen-take]
To User: gentake
=== RUN TestGenerationTakeMinio
=== RUN TestGenerationTakeMinio/take
2026/11/28 23:53:29 lease: instances/gen-1795910009317279543.shop.example.com: HA lease acquired in 5ms (first wake)
2026/11/28 23:53:29 ERROR retention enforcement failed system=store db=w.example.com.db error="enforce snapshot retention: remove ltx files: lease: invalid or changed generation binding"
2026/11/28 23:53:29 lease: instances/gen-1795910009317279543.shop.example.com: HA lease acquired in 3ms (holder terminated)
gentake_minio_test.go:308: a second create-only copy onto instances/gen-1795910009317279543.shop.example.com/g-00000000000000000002/0009/0000000000000001-0000000000000001.ltx: <nil> (destination condition honoured: false)
2026/11/28 23:53:29 ERROR retention enforcement failed system=store db=w.example.com.db error="enforce snapshot retention: remove ltx files: lease: invalid or changed generation binding"
=== RUN TestGenerationTakeMinio/switch-412
2026/11/28 23:53:29 lease: instances/gen-1795910009500728157.shop.example.com: HA lease acquired in 3ms (first wake)
2026/11/28 23:53:29 ERROR retention enforcement failed system=store db=seed.db error="enforce snapshot retention: remove ltx files: lease: invalid or changed generation binding"
2026/11/28 23:53:29 lease: instances/gen-1795910009500728157.shop.example.com: HA lease acquired in 3ms (clean marker)
=== RUN TestGenerationTakeMinio/copy-version
=== RUN TestGenerationTakeMinio/store-time
2026/11/28 23:53:29 lease: instances/gen-1795910009607809034.shop.example.com: HA lease acquired in 4ms (first wake)
2026/11/28 23:53:29 ERROR retention enforcement failed system=store db=seed.db error="enforce snapshot retention: fetch ltx files: lease: a write has waited too long to reach storage (write fence)"
2026/11/28 23:53:29 lease: instances/gen-1795910009607809034.shop.example.com: HA lease acquired in 2ms (clean marker)
2026/11/28 23:53:29 lease: instances/gen-1795910009607809034.shop.example.com: HA lease acquired in 3ms (unclean marker)
2026/11/28 23:53:29 lease: instances/gen-1795910009607809034.shop.example.com: HA lease acquired in 3ms (unclean marker)
2026/11/28 23:53:29 lease: instances/gen-1795910009607809034.shop.example.com: HA lease acquired in 2ms (unclean marker)
2026/11/28 23:53:29 lease: instances/gen-1795910009607809034.shop.example.com: HA lease acquired in 3ms (unclean marker)
=== RUN TestGenerationTakeMinio/skew
--- PASS: TestGenerationTakeMinio (0.41s)
--- PASS: TestGenerationTakeMinio/take (0.18s)
--- PASS: TestGenerationTakeMinio/switch-412 (0.10s)
--- PASS: TestGenerationTakeMinio/copy-version (0.01s)
--- PASS: TestGenerationTakeMinio/store-time (0.11s)
--- PASS: TestGenerationTakeMinio/skew (0.01s)
PASS
ok github.com/carlosframework/platform/internal/lease 0.423s
minio contract: PASS
=== staticcheck ===
go version go1.26.10 linux/arm64
go: downloading honnef.co/go/tools v0.8.2
go: downloading github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c
go: downloading golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678
go: downloading golang.org/x/sync v0.23.0
go: downloading golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa
staticcheck: clean
=== govulncheck ===
go version go1.26.10 linux/arm64
go: downloading golang.org/x/vuln v1.8.0
go: downloading golang.org/x/telemetry v0.0.0-20260908163034-4bcc4b2ee518
go: downloading golang.org/x/tools v0.50.0
govulncheck: scanned github.com/carlosframework/platform, amadan.net/carlos/platform.git/launchctx, carlos-vulnscan
GO-2026-6859 called stdlib@v1.26.10, fixed in v1.26.11
HTTP/1 server crash due to MaxBytesReader header race in net/http
excepted until 2027-01-31 (.amadan/govulncheck-exceptions.tsv:9): net/http MaxBytesReader header race, fixed in go1.26.11. CI and releases stay on go1.26.10 because 1.26.11 deadlocks the edge's Expect: 100-continue path (#897, .amadan/go-toolchain.sh); #904 checked every production MaxBytesReader site and found it unreachable.
GO-2026-5932 required golang.org/x/crypto@v0.58.0, fixed in v0.58.1-0.20261009181718-2f1f834330b2
The golang.org/x/crypto/openpgp package is unmaintained, unsafe by design, and has known security issues
not fatal: no call path to the vulnerable code
govulncheck: clean (2 finding(s), none called outside .amadan/govulncheck-exceptions.tsv)
=== code-health ===
go version go1.26.10 linux/arm64
codehealth_test.go:42: scanned in 1m53.399s
codehealth_test.go:107: line metrics (code lines, then physical):
file-lines 5471 7324 internal/activator activator_test.go
file-lines 4190 7040 internal/console server.go
file-lines 4147 6311 . apimode.go
file-lines 3785 7224 internal/activator activator.go
file-lines 3530 4459 . apimode_test.go
file-lines 3261 3864 internal/registry registry_test.go
file-lines 3204 6398 internal/host agent.go
file-lines 3094 3992 internal/provision reconcile_test.go
func-lines 870 891 internal/host plan14InstalledClaimLaunch
func-lines 810 1277 internal/provision Reconcile
func-lines 769 1242 internal/console (*Server).handleAPIInstanceCreate
func-lines 683 1238 internal/host runAgent
func-lines 571 908 internal/activator (*Service).doWakeOnce
func-lines 538 546 internal/host runServingParkPeerNamespace
func-lines 519 712 . runRoute
func-lines 509 569 internal/host TestPagingIsRateLimited
func-lines 494 817 internal/release adoptHost
func-lines 441 500 internal/host TestRootInstanceStopExecStop
func-lines 421 436 internal/host (*ClaimWakeAssembly).Build
func-lines 421 437 internal/team TestFixture
func-lines 412 414 internal/console TestDemoProtectionsSourceToLimitAndTakedown
func-lines 408 485 . TestFleetAppServesThroughTheHub
func-lines 402 406 internal/registry (*Registry).haJournal
func-lines 400 868 internal/provision rootReadArchivedChain
func-lines 399 733 internal/release PassFilter
func-lines 390 398 internal/host runFilesSeedPreparationWithLive
func-lines 383 406 internal/console TestDemoSourceToLiveAndUpdate
func-lines 374 377 internal/host plan14RequiredArtifactsRootRunner
func-lines 371 417 internal/host TestRootEgressKernelProof
func-lines 369 883 internal/edge (*Edge).ServeHTTP
func-lines 367 584 internal/console (*Server).handleAPIShip
func-lines 364 371 internal/host testRootMigrationBootstrap
func-lines 361 630 cmd/console serve
func-lines 360 362 internal/edge TestDemoAPIAliasBoundary
func-lines 357 358 internal/registry (*Registry).dispatchRemote
func-lines 355 372 internal/host TestRootSandboxUpdateFromOldBox
func-lines 343 354 internal/analytics Prune
func-lines 340 353 internal/host newColdRootHarness
func-lines 335 557 internal/console (*Store).migrate
func-lines 334 334 internal/host TestPlan12RecoveryRestoreSourceDatabase
func-lines 330 371 internal/edge TestRegionalNameNeverLeavesItsRegion
func-lines 329 471 . runDeploy
func-lines 329 329 internal/host TestPlan12RecoveryRestoreSourceDatabase.func1
func-lines 327 369 internal/edge TestTunnelWebSocketEndToEnd
func-lines 325 455 internal/objstore TestDeliveredContractMinio
func-lines 320 654 internal/appconfig SyncExecWithCallbacks
func-lines 315 318 internal/host plan14TimerIntention
func-lines 311 314 internal/host plan14TimerIntention.func1
func-lines 310 315 internal/hostbox ColdHandover.Run
func-lines 308 309 internal/host rootFilesSeedIsolatedWitness
func-lines 305 323 internal/host hairpinKernelWitness
func-lines 304 308 internal/console TestHAP2ProductionDoors
func-lines 302 329 internal/host TestRootG2PoolIngress
release-importers: . cmd/console internal/activator internal/analytics internal/appconfig internal/apperr internal/applog internal/apppolicy internal/boxid internal/boxvolumes internal/console internal/dbreads internal/dbreads/dbreadstest internal/dbverify internal/demobuild internal/domains internal/doorkey internal/edge internal/edgeproof internal/edgesfile internal/fleetapi internal/grouproll internal/grouprollaws internal/historyreadback internal/host internal/hostactors internal/hostbox internal/hostclaim internal/hostevidence internal/hostexec internal/hostfence internal/hostfiles internal/hostfloor internal/hostguard internal/hostops internal/hostrelocate internal/hostresolve internal/instancectl internal/instanceupdates internal/interactive internal/layout internal/lease internal/ledger internal/mail internal/mailer internal/mailsubmit internal/metrics internal/moves internal/objstore internal/ops internal/park internal/plans internal/provision internal/relay internal/rollout internal/rootfsimage internal/runs internal/s3fake internal/schedule internal/seeds internal/status internal/telemetry internal/usage internal/vet scripts/pathmapcheck scripts/witness-pointer
not scanned (216 files):
cmd/carlos-media/drill_other.go: built only for other systems or tags
cmd/carlos-media/harden_other.go: built only for other systems or tags
cmd/console/fleetsocket_other.go: built only for other systems or tags
cmd/console/servelock_windows.go: built only for other systems or tags
cmd/moveprobe/detach_windows.go: built only for other systems or tags
cmd/rootfswitness/mmap_other.go: built only for other systems or tags
devbox_acl_other.go: built only for other systems or tags
devbox_envfile_darwin_test.go: built only for other systems or tags
devbox_envfile_other.go: built only for other systems or tags
domains_transfer_signals_other.go: built only for other systems or tags
interactive_term_darwin.go: built only for other systems or tags
interactive_term_other.go: built only for other systems or tags
internal/activator/claimprocess_root_other.go: built only for other systems or tags
internal/activator/escrow_stamp_other.go: built only for other systems or tags
internal/activator/fleetreserve_other.go: built only for other systems or tags
internal/activator/harecord_other.go: built only for other systems or tags
internal/activator/ownenv_other.go: built only for other systems or tags
internal/activator/pty_other.go: built only for other systems or tags
internal/activator/race_on_test.go: built only for other systems or tags
internal/activator/rolelaunch_other.go: built only for other systems or tags
internal/assetcache/statfs_other.go: built only for other systems or tags
internal/boxself/io_other.go: built only for other systems or tags
internal/cgroup/cleanup_other.go: built only for other systems or tags
internal/cgroup/cleanup_other_test.go: built only for other systems or tags
internal/cgroup/hostprocs_other.go: built only for other systems or tags
internal/cgroup/recreate_other.go: built only for other systems or tags
internal/cgroup/role_other.go: built only for other systems or tags
internal/cgroup/shim_other.go: built only for other systems or tags
internal/cgroup/strict_other.go: built only for other systems or tags
internal/cgroup/verify_other.go: built only for other systems or tags
internal/console/claim_sql_identity_other.go: built only for other systems or tags
internal/console/geoipverify_other.go: built only for other systems or tags
internal/console/hostreports_process_other.go: built only for other systems or tags
internal/console/replicaview_other.go: built only for other systems or tags
internal/console/restore_sim_nice_other_test.go: built only for other systems or tags
internal/console/scalecost_other_test.go: built only for other systems or tags
internal/console/seedscratch_windows.go: built only for other systems or tags
internal/dbreads/worker_other.go: built only for other systems or tags
internal/demobuild/security_other.go: built only for other systems or tags
internal/democlaim/source_other.go: built only for other systems or tags
internal/devbox/peer_darwin.go: built only for other systems or tags
internal/devbox/peer_darwin_test.go: built only for other systems or tags
internal/devbox/peer_other.go: built only for other systems or tags
internal/devbox/socketcheck_other.go: built only for other systems or tags
internal/domains/certimport_read_portable.go: built only for other systems or tags
internal/edge/devboxpeer_other.go: built only for other systems or tags
internal/edge/hairpin_other.go: built only for other systems or tags
internal/edge/heldbudget_other.go: built only for other systems or tags
internal/edge/purge_listen_unix.go: built only for other systems or tags
internal/edge/purge_listen_windows.go: built only for other systems or tags
internal/edge/race_on_test.go: built only for other systems or tags
internal/edge/replicaconsole_owner_other.go: built only for other systems or tags
internal/edge/replicaconsole_peer_other.go: built only for other systems or tags
internal/edge/replicaconsole_socket_other_test.go: built only for other systems or tags
internal/edge/static_artifact_other.go: built only for other systems or tags
internal/edge/static_recordlock_other.go: built only for other systems or tags
internal/edge/static_sweep_other.go: built only for other systems or tags
internal/execsandbox/cleanup_other.go: built only for other systems or tags
internal/execsandbox/file_other.go: built only for other systems or tags
internal/execsandbox/oci_other.go: built only for other systems or tags
internal/fileacl/fileacl_darwin.go: built only for other systems or tags
internal/fileacl/fileacl_darwin_amd64.s: built only for other systems or tags
internal/fileacl/fileacl_darwin_arm64.s: built only for other systems or tags
internal/fileacl/fileacl_darwin_test.go: built only for other systems or tags
internal/grouproll/state_other.go: built only for other systems or tags
internal/grouprollaws/pty_darwin.go: built only for other systems or tags
internal/grouprollaws/pty_other.go: built only for other systems or tags
internal/hairpin/native_other.go: built only for other systems or tags
internal/host/applylock_other_test.go: built only for other systems or tags
internal/host/bootstrapfs_other.go: built only for other systems or tags
internal/host/boxroles_config_other.go: built only for other systems or tags
internal/host/claimfilesseed_delegation_other.go: built only for other systems or tags
internal/host/claimfilesseed_transport_other.go: built only for other systems or tags
internal/host/claimjournal_containment_other.go: built only for other systems or tags
internal/host/claimjournal_migration_other.go: built only for other systems or tags
internal/host/claimlaunch_kernel_other.go: built only for other systems or tags
internal/host/claimlaunch_rev2_other_test.go: built only for other systems or tags
internal/host/claimproduction_other.go: built only for other systems or tags
internal/host/claimready_other.go: built only for other systems or tags
internal/host/claimroleassembly_other.go: built only for other systems or tags
internal/host/claimservingartifact_other.go: built only for other systems or tags
internal/host/claimservinghandover_reboot_other.go: built only for other systems or tags
internal/host/claimservinghandover_reboot_other_test.go: built only for other systems or tags
internal/host/claimservingpark_other.go: built only for other systems or tags
internal/host/claimstate_other.go: built only for other systems or tags
internal/host/claimstop_kernel_other.go: built only for other systems or tags
internal/host/claimtoken_inventory_other.go: built only for other systems or tags
internal/host/claimunit_dropin_other.go: built only for other systems or tags
internal/host/claimunit_files_other.go: built only for other systems or tags
internal/host/claimunit_migrate_other.go: built only for other systems or tags
internal/host/claimunit_ready_other.go: built only for other systems or tags
internal/host/claimunit_socket_migration_other.go: built only for other systems or tags
internal/host/consolefleet_owner_other.go: built only for other systems or tags
internal/host/dbreads_other.go: built only for other systems or tags
internal/host/egress_rail_other.go: built only for other systems or tags
internal/host/fileowner_other.go: built only for other systems or tags
internal/host/flock_windows.go: built only for other systems or tags
internal/host/group_config_other.go: built only for other systems or tags
internal/host/group_maintenance_other.go: built only for other systems or tags
internal/host/group_maintenance_verbs_other.go: built only for other systems or tags
internal/host/group_receipt_other.go: built only for other systems or tags
internal/host/hadrain_call_other.go: built only for other systems or tags
internal/host/hadrain_socket_other.go: built only for other systems or tags
internal/host/hadrainfence_other.go: built only for other systems or tags
internal/host/headroom_other.go: built only for other systems or tags
internal/host/installchannel_other.go: built only for other systems or tags
internal/host/managedboot_other.go: built only for other systems or tags
internal/host/metrics_nested_other.go: built only for other systems or tags
internal/host/movesfloor_other.go: built only for other systems or tags
internal/host/movesfloorgate_other.go: built only for other systems or tags
internal/host/movesheldrelease_other.go: built only for other systems or tags
internal/host/movesmeasure_other.go: built only for other systems or tags
internal/host/offcloudcredentials_other.go: built only for other systems or tags
internal/host/registrychild_exec_other.go: built only for other systems or tags
internal/host/registrychild_other.go: built only for other systems or tags
internal/host/registryowner_chown_other.go: built only for other systems or tags
internal/host/registryowner_descriptor_unix.go: built only for other systems or tags
internal/host/replicahealth_other.go: built only for other systems or tags
internal/host/rootgeneration_census_other.go: built only for other systems or tags
internal/host/rootgeneration_kernel_other.go: built only for other systems or tags
internal/host/rootgeneration_payload_other.go: built only for other systems or tags
internal/host/rootgeneration_retired_other.go: built only for other systems or tags
internal/host/rootmigration_production_other.go: built only for other systems or tags
internal/host/runscset_other.go: built only for other systems or tags
internal/host/sandboxenv_other.go: built only for other systems or tags
internal/host/statfs_windows.go: built only for other systems or tags
internal/host/systemapply_other.go: built only for other systems or tags
internal/hostbox/census_vendor_other.go: built only for other systems or tags
internal/hostbox/inventory_identity_other.go: built only for other systems or tags
internal/hostbox/journalmigration_other.go: built only for other systems or tags
internal/hostbox/journalnamespace_other.go: built only for other systems or tags
internal/hostbox/journaltrust_other.go: built only for other systems or tags
internal/hostbox/migration_census_other.go: built only for other systems or tags
internal/hostbox/typedpark_other.go: built only for other systems or tags
internal/hostenv/group_other.go: built only for other systems or tags
internal/hostenv/write_other.go: built only for other systems or tags
internal/hostenv/write_other_test.go: built only for other systems or tags
internal/hostexec/clock_other.go: built only for other systems or tags
internal/hostexec/clock_other_test.go: built only for other systems or tags
internal/hostexec/local_other.go: built only for other systems or tags
internal/hostexec/pending_other.go: built only for other systems or tags
internal/hostexec/probe_other.go: built only for other systems or tags
internal/hostexec/rootprocess_other.go: built only for other systems or tags
internal/hostfiles/dir_other.go: built only for other systems or tags
internal/hostfiles/refuse_other.go: built only for other systems or tags
internal/hostfiles/watch_other.go: built only for other systems or tags
internal/hostfloor/controllers_other.go: built only for other systems or tags
internal/hostfloor/image_other.go: built only for other systems or tags
internal/hostguard/flock_other.go: built only for other systems or tags
internal/hostguard/flock_other_test.go: built only for other systems or tags
internal/hostguard/record_other.go: built only for other systems or tags
internal/instancectl/claimexec_other.go: built only for other systems or tags
internal/instancectl/claimexec_socket_other.go: built only for other systems or tags
internal/instancectl/claimlaunch_snapshot_other.go: built only for other systems or tags
internal/instancectl/claimnetwork_other.go: built only for other systems or tags
internal/instancectl/demo_snapshot_other.go: built only for other systems or tags
internal/instancectl/egress_cgroup_other.go: built only for other systems or tags
internal/instancectl/egress_dropin_other.go: built only for other systems or tags
internal/instancectl/fleetsize_other.go: built only for other systems or tags
internal/instancectl/gvisorprobe_other.go: built only for other systems or tags
internal/instancectl/peer_other.go: built only for other systems or tags
internal/instancectl/peer_tuple_other.go: built only for other systems or tags
internal/instancectl/rootfs_identity_other.go: built only for other systems or tags
internal/instanceexec/claimexec_other.go: built only for other systems or tags
internal/instanceexec/exec_rootfs_other.go: built only for other systems or tags
internal/instanceexec/netlink_route_other.go: built only for other systems or tags
internal/instanceexec/probe_gvisor_other.go: built only for other systems or tags
internal/instanceexec/probe_hardening_other.go: built only for other systems or tags
internal/instanceexec/probe_other.go: built only for other systems or tags
internal/instanceexec/probe_rootfs_other.go: built only for other systems or tags
internal/instanceexec/sandbox_other.go: built only for other systems or tags
internal/instanceexec/scope_other.go: built only for other systems or tags
internal/instanceexec/stop_other.go: built only for other systems or tags
internal/instanceexec/tty_other.go: built only for other systems or tags
internal/instancefs/instancefs_other.go: built only for other systems or tags
internal/launchd/activate_darwin.go: built only for other systems or tags
internal/launchd/activate_darwin_amd64.s: built only for other systems or tags
internal/launchd/activate_darwin_arm64.s: built only for other systems or tags
internal/launchd/activate_darwin_test.go: built only for other systems or tags
internal/layout/journal_other.go: built only for other systems or tags
internal/layout/links_other.go: built only for other systems or tags
internal/mailer/keys_other.go: built only for other systems or tags
internal/maintenanceexec/run_other.go: built only for other systems or tags
internal/managedboot/admission_other.go: built only for other systems or tags
internal/managedboot/identity_other.go: built only for other systems or tags
internal/mediahandler/collect_other.go: built only for other systems or tags
internal/mediahandler/procs_other.go: built only for other systems or tags
internal/medialocal/runner_other.go: built only for other systems or tags
internal/moves/archive/open_other.go: built only for other systems or tags
internal/moves/archive/sync_other.go: built only for other systems or tags
internal/ops/flock_windows.go: built only for other systems or tags
internal/park/local_other.go: built only for other systems or tags
internal/privatefile/io_other.go: built only for other systems or tags
internal/proxyproto/peek_other.go: built only for other systems or tags
internal/relay/race_on_test.go: built only for other systems or tags
internal/release/consumedfence_other.go: built only for other systems or tags
internal/release/digestcache_other.go: built only for other systems or tags
internal/rootaws/credentials_other.go: built only for other systems or tags
internal/rootaws/open_darwin.go: built only for other systems or tags
internal/rootfsimage/dir_other.go: built only for other systems or tags
internal/rootstate/authoritydir_other.go: built only for other systems or tags
internal/rootstate/authorityfile_other.go: built only for other systems or tags
internal/rootstate/file_other.go: built only for other systems or tags
internal/rootstate/link_other.go: built only for other systems or tags
internal/rootstate/persistent_other.go: built only for other systems or tags
internal/rootstate/state_other.go: built only for other systems or tags
internal/safefile/file_other.go: built only for other systems or tags
internal/safefile/reap_other.go: built only for other systems or tags
internal/stopevidence/fds_other.go: built only for other systems or tags
internal/stopevidence/fds_other_test.go: built only for other systems or tags
internal/stopevidence/holders_other.go: built only for other systems or tags
internal/stopevidence/reconstruct_other.go: built only for other systems or tags
internal/team/storelock_other.go: built only for other systems or tags
internal/team/storelock_windows.go: built only for other systems or tags
move_offline_run_other.go: built only for other systems or tags
system_group_other.go: built only for other systems or tags
codehealth_test.go:115: fatal 1093 at 474 sites log.Fatal*, (*log.Logger).Fatal* and os.Exit in the root package's production files
codehealth_test.go:115: sleep 1005 at 811 sites time.Sleep in test files
codehealth_test.go:115: db-no-context 873 at 696 sites database calls with no context (dbOpWithoutContext) in production files
codehealth_test.go:115: host-context 188 at 142 sites context.Background and context.TODO in internal/host production files
codehealth_test.go:115: func-lines 18585 at 45 sites functions over 300 code lines (blank and comment-only lines not counted)
codehealth_test.go:115: file-lines 30682 at 8 sites files over 3,000 code lines, counted the same way
codehealth_test.go:115: release-importers 66 at 1 sites packages whose production files import internal/release
--- PASS: TestCodeHealth (113.40s)
PASS
ok github.com/carlosframework/platform/internal/codehealth 115.194s
=== code-health-record ===
go version go1.26.10 linux/arm64
code-health record: HEAD is on main; comparing with its parent 029fd12c813733b1e3cd877f5da0f8b73df22b34
=== RUN TestRecordAgainstBase
--- PASS: TestRecordAgainstBase (0.01s)
PASS
ok github.com/carlosframework/platform/internal/codehealth 0.008s
code-health record: no line went up without a reason
=== race ===
go version go1.26.10 linux/arm64
GATE_RACE=1 .amadan/test-gate.sh
=== internal_systemd@0 (13 s, from +14 s)
ok github.com/carlosframework/platform/internal/systemd 13.260s
=== internal_rootaws@0 (26 s, from +35 s)
ok github.com/carlosframework/platform/internal/rootaws 25.594s
=== internal_activator@0 (269 s, from +115 s)
ok github.com/carlosframework/platform/internal/activator 267.297s
=== internal_activator@1 (265 s, from +115 s)
ok github.com/carlosframework/platform/internal/activator 262.655s
=== internal_activator@2 (279 s, from +115 s)
ok github.com/carlosframework/platform/internal/activator 276.881s
=== internal_activator@3 (419 s, from +115 s)
ok github.com/carlosframework/platform/internal/activator 416.786s
=== internal_activator@4 (279 s, from +115 s)
ok github.com/carlosframework/platform/internal/activator 277.204s
=== internal_activator@5 (314 s, from +115 s)
ok github.com/carlosframework/platform/internal/activator 312.161s
=== internal_activator@6 (319 s, from +115 s)
ok github.com/carlosframework/platform/internal/activator 317.172s
=== internal_activator@7 (412 s, from +115 s)
ok github.com/carlosframework/platform/internal/activator 409.957s
=== internal_edge@0 (85 s, from +138 s)
ok github.com/carlosframework/platform/internal/edge 81.999s
=== internal_edge@1 (71 s, from +138 s)
ok github.com/carlosframework/platform/internal/edge 67.775s
=== internal_edge@2 (205 s, from +138 s)
ok github.com/carlosframework/platform/internal/edge 201.743s
=== internal_edge@3 (156 s, from +138 s)
==================
WARNING: DATA RACE
Write at 0x0000061f3350 by goroutine 164:
github.com/carlosframework/platform/internal/edge.newBackhaulSceneWith.func1()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/backhaul_e2e_test.go:579 +0x3c
testing.(*common).Cleanup.func1()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/testing/testing.go:1317 +0x124
testing.(*common).runCleanup()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/testing/testing.go:1667 +0x16c
testing.tRunner.func2()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/testing/testing.go:2030 +0x48
runtime.deferreturn()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/runtime/panic.go:668 +0x5c
testing.(*T).Run.gowrap1()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/testing/testing.go:2101 +0x34
Previous read at 0x0000061f3350 by goroutine 270:
github.com/carlosframework/platform/internal/edge.(*Edge).backhaulTransport.func1()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/edge.go:5021 +0x50
net/http.(*Transport).dial()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/net/http/transport.go:1307 +0x90
net/http.(*Transport).dialConn()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/net/http/transport.go:1815 +0xa4c
net/http.(*Transport).dialConnFor()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/net/http/transport.go:1648 +0xb0
net/http.(*Transport).startDialConnForLocked.func1()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/net/http/transport.go:1629 +0x34
Goroutine 164 (running) created at:
testing.(*T).Run()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/testing/testing.go:2101 +0x7bc
github.com/carlosframework/platform/internal/edge.TestAssetE2ECoalescedWaitersAndRefusals()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/asset_e2e_test.go:830 +0x194
testing.tRunner()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/testing/testing.go:2036 +0x164
testing.(*T).Run.gowrap1()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/testing/testing.go:2101 +0x34
Goroutine 270 (running) created at:
net/http.(*Transport).startDialConnForLocked()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/net/http/transport.go:1628 +0x1a4
net/http.(*Transport).queueForDial()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/net/http/transport.go:1601 +0x3cc
net/http.(*Transport).getConn()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/net/http/transport.go:1548 +0x4b4
net/http.(*Transport).roundTrip()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/net/http/transport.go:693 +0xee0
net/http.(*Transport).RoundTrip()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/net/http/roundtrip.go:33 +0x34
github.com/carlosframework/platform/internal/edge.backhaulHolderTransport.RoundTrip()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/backhaul_holder.go:184 +0x50
github.com/carlosframework/platform/internal/edge.(*backhaulHolderTransport).RoundTrip()
<autogenerated>:1 +0x48
net/http/httputil.(*ReverseProxy).ServeHTTP()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/net/http/httputil/reverseproxy.go:579 +0x12dc
github.com/carlosframework/platform/internal/edge.(*Edge).hopTo()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/edge.go:4942 +0x59c
github.com/carlosframework/platform/internal/edge.(*Edge).backhaulAttempt()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/backhaul_holder.go:329 +0xdcc
github.com/carlosframework/platform/internal/edge.(*Edge).backhaulRouteTo()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/pathhop.go:69 +0x33c
github.com/carlosframework/platform/internal/edge.(*Edge).backhaulTo()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/edge.go:4893 +0x2b0
github.com/carlosframework/platform/internal/edge.(*Edge).backhaul()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/edge.go:4886 +0x1dc
github.com/carlosframework/platform/internal/edge.(*Edge).farForward()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/assetcatch.go:1366 +0x104
github.com/carlosframework/platform/internal/edge.(*Edge).serveAssetFar.func4()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/assetcatch.go:1238 +0x308
github.com/carlosframework/platform/internal/edge.(*Edge).serveAssetFar()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/assetcatch.go:1268 +0x13e4
github.com/carlosframework/platform/internal/edge.(*Edge).ServeHTTP()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/edge.go:2503 +0x2b08
github.com/carlosframework/platform/internal/edge.newBackhaulEdgeWith.func1()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/backhaul_e2e_test.go:384 +0x288
net/http.HandlerFunc.ServeHTTP()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/net/http/server.go:2306 +0x48
net/http.serverHandler.ServeHTTP()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/net/http/server.go:3331 +0x268
net/http.(*conn).serve()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/net/http/server.go:2087 +0xa30
net/http.(*Server).Serve.gowrap3()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/net/http/server.go:3484 +0x40
==================
--- FAIL: TestAssetE2ECoalescedWaitersAndRefusals (3.85s)
--- FAIL: TestAssetE2ECoalescedWaitersAndRefusals/a_refusal_reaches_only_its_initiator (1.88s)
testing.go:1712: race detected during execution of test
2026/11/29 00:02:11 edge: mesh key: minted
2026/11/29 00:02:12 edge: mesh key: minted
2026/11/29 00:02:13 edge: mesh key: minted
2026/11/29 00:02:18 edge: mesh key: minted
2026/11/29 00:02:18 edge: mesh key: minted
2026/11/29 00:02:20 edge: mesh key: minted
2026/11/29 00:02:21 edge: mesh key: minted
2026/11/29 00:02:23 edge: wildcard *.go.tito.io: acme register: Get "http://127.0.0.1:39443/directory": dial tcp 127.0.0.1:39443: connect: connection refused — per-host issuance keeps covering; retrying in 1h0m0s
2026/11/29 00:02:23 certsync: mirrored entry "example.com" does not parse as a certificate (tls: failed to find any PEM data in certificate input) — skipping it
2026/11/29 00:02:23 certsync: mirrored entry "example.com" does not parse as a certificate (tls: failed to find any PEM data in certificate input) — skipping it
2026/11/29 00:02:23 edge: cert warm for a.test rate-limited by the CA — backing off 12h0m0s (the whole deployment shares one ACME account)
2026/11/29 00:02:23 edge: cert warm for b.test: connection refused — retrying in 1h0m0s
2026/11/29 00:02:23 edge: cert warm for gone.customer.test: order failed — retrying in 1h0m0s
2026/11/29 00:02:23 edge: cert warm for stays.customer.test: order failed — retrying in 1h0m0s
2026/11/29 00:02:23 edge: cert warm: cleared the outcome record for gone.customer.test (detached)
2026/11/29 00:02:23 edge: cert warm for bad.customer.test: context deadline exceeded — retrying in 1h0m0s
2026/11/29 00:02:25 edge: static cache /tmp/TestStaticSiteCompresses3662451861/004/cache: first start with the lock; sweeping from the next start
2026/11/29 00:02:25 INFO edge: static site=bab/site version=v1 bytes=172 seconds=0.001
2026/11/29 00:02:27 edge: route bright-otter-42.demos.example.com is a hibernating instance but this box has no activator, so nothing here will create /run/carlos/instances/bright-otter-42.demos.example.com/app.sock or start its process. If this box runs `carlos agent`, set CARLOS_HIBERNATE_BUCKET in /etc/carlos/host.env and restart carlos-edge; `carlos edge` on its own never runs instances. (occurrence #1)
2026/11/29 00:02:27 edge: route shadow.example.com is a hibernating instance but this box has no activator, so nothing here will create /run/carlos/instances/bright-otter-42.demos.example.com/app.sock or start its process. If this box runs `carlos agent`, set CARLOS_HIBERNATE_BUCKET in /etc/carlos/host.env and restart carlos-edge; `carlos edge` on its own never runs instances. (occurrence #1)
2026/11/29 00:02:28 http: proxy error: edge: devbox socket owner mismatch
2026/11/29 00:02:28 http: proxy error: edge: devbox socket owner mismatch
2026/11/29 00:02:37 edge: route broken.example.com: unparseable health config (invalid character 'n' looking for beginning of object key string) — serving 127.0.0.1:37795 unprobed (occurrence #1)
2026/11/29 00:02:38 edge: route shop.example.com is not served: forward row on a box that is not the hub (occurrence #1)
2026/11/29 00:02:38 edge: tunnel pi/pi-1: connected from 127.0.0.1:57206
2026/11/29 00:02:40 edge: tunnel home/box-1: connected from 127.0.0.1:55352
2026/11/29 00:02:40 edge: rate limit: refused a request for shop.example.com (backstop), client 127.0.0.1/32 (occurrence #1)
2026/11/29 00:02:42 edge: tunnel home/box-1: connected from 127.0.0.1:60530
2026/11/29 00:02:47 edge: tunnel home/box-1: ping failed (EOF) — dropping channel
2026/11/29 00:02:47 edge: geoip directory sync failed after selecting a generation; keeping the earlier ones until it succeeds
2026/11/29 00:02:47 edge: geoip database ed972738 (GeoIP2-City, built 2026-02-04) loaded
2026/11/29 00:02:47 edge: geoip directory sync failed after selecting a generation; keeping the earlier ones until it succeeds
2026/11/29 00:02:47 edge: geoip database b3760190 (GeoIP2-Country, built 2026-02-04) loaded
2026/11/29 00:02:47 edge: geoip database b3760190 (GeoIP2-Country, built 2026-02-04) loaded
2026/11/29 00:02:47 edge: geoip database ed972738 expired (GeoLite2, 30 days after build) and was removed
2026/11/29 00:02:47 edge: geoip database ed972738 expired (GeoLite2, 30 days after build) and was removed
2026/11/29 00:02:47 edge: geoip database b3760190 (GeoIP2-Country, built 2026-02-04) loaded
2026/11/29 00:02:47 edge: geoip database ed972738 expired (GeoLite2, 30 days after build) and was removed
2026/11/29 00:02:59 edge: mesh key: minted
2026/11/29 00:03:00 edge: example.com is homed on betty but no mesh key is mirrored — not dialling (the request gets the unknown-host answer until the key lands) (occurrence #1)
2026/11/29 00:03:00 edge: mesh key: minted
2026/11/29 00:03:11 edge: mesh key: minted
2026/11/29 00:03:12 edge: publishing issued certs to control/certs/* in the deployment bucket
2026/11/29 00:03:13 edge: publishing issued certs to control/certs/* in the deployment bucket
2026/11/29 00:03:14 edge: publishing issued certs to control/certs/* in the deployment bucket
2026/11/29 00:03:14 edge: forward hub.example (route tenant.example) → betty: the request body was refused before the hop (occurrence #1)
2026/11/29 00:03:19 edge: route shop.example.com is not served: replica set row on a box that is not the hub (occurrence #1)
2026/11/29 00:03:20 edge: tunnel pi/box-00: connected from 127.0.0.1:42938
2026/11/29 00:03:21 edge: tunnel pi/box-01: connected from 127.0.0.1:42946
2026/11/29 00:03:23 edge: route shop.bah.apps.example.com is not served: account "bah" does not own link 0123456789ab (occurrence #1)
2026/11/29 00:03:23 edge: tunnel link:0123456789ab/home: connected from 127.0.0.1:49642
2026/11/29 00:03:24 edge: mesh key: minted
2026/11/29 00:03:25 edge: tunnel pi/box-00: ping failed (EOF) — dropping channel
2026/11/29 00:03:26 edge: tunnel pi/box-01: ping failed (EOF) — dropping channel
2026/11/29 00:03:28 edge: tunnel link:0123456789ab/home: ping failed (EOF) — dropping channel
2026/11/29 00:03:34 edge: mesh key: minted
2026/11/29 00:03:35 edge: publishing issued certs to control/certs/* in the deployment bucket
2026/11/29 00:03:36 edge: publishing issued certs to control/certs/* in the deployment bucket
2026/11/29 00:03:37 edge: publishing issued certs to control/certs/* in the deployment bucket
2026/11/29 00:03:39 edge: tunnel home/box-1: connected from 127.0.0.1:59682
2026/11/29 00:03:39 edge: paths on hub.tunnel.example: no box publishes it as a front route of baj/hub, so its prefixes are not routed from this box (occurrence #1)
2026/11/29 00:03:39 edge: mesh key: minted
2026/11/29 00:03:40 edge: publishing issued certs to control/certs/* in the deployment bucket
2026/11/29 00:03:41 edge: publishing issued certs to control/certs/* in the deployment bucket
2026/11/29 00:03:42 edge: publishing issued certs to control/certs/* in the deployment bucket
2026/11/29 00:03:44 edge: gate login on hub.example refused: its page's prefix "acme" names tenant.example, served on another box, and the password is judged only there (occurrence #1)
2026/11/29 00:03:44 edge: gate login on hub.example refused: its page's prefix "acme" names tenant.example, served on another box, and the password is judged only there (occurrence #1)
2026/11/29 00:03:44 edge: mesh key: minted
2026/11/29 00:03:44 edge: tunnel home/box-1: ping failed (EOF) — dropping channel
2026/11/29 00:03:45 edge: publishing issued certs to control/certs/* in the deployment bucket
2026/11/29 00:03:45 edge: publishing issued certs to control/certs/* in the deployment bucket
2026/11/29 00:03:46 edge: publishing issued certs to control/certs/* in the deployment bucket
2026/11/29 00:03:47 edge: mesh key: minted
2026/11/29 00:03:48 edge: publishing issued certs to control/certs/* in the deployment bucket
2026/11/29 00:03:48 edge: publishing issued certs to control/certs/* in the deployment bucket
2026/11/29 00:03:49 edge: publishing issued certs to control/certs/* in the deployment bucket
2026/11/29 00:03:53 edge: CARLOS_DNS01_ACCOUNTS entry "not a sqid" is not an account sqid, ignored
2026/11/29 00:04:00 edge: go.tito.example declared a 8211-byte Carlos-Purge-Host (max 8192) — the whole purge declaration is ignored (occurrence #1)
2026/11/29 00:04:02 edge: wildcard *.shop.example.com loaded from cache (valid until 2027-01-28T00:04:02Z)
2026/11/29 00:04:02 domains: claim domains/shop.example.com.json: synthetic 403
2026/11/29 00:04:02 domains: 1 claim(s) listed but unreadable this pass (e.g. shop.example.com) — the pass is incomplete
2026/11/29 00:04:02 domains: claim domains/shop.example.com.json: synthetic 403
2026/11/29 00:04:02 domains: 1 claim(s) listed but unreadable this pass (e.g. shop.example.com) — the pass is incomplete
2026/11/29 00:04:02 domains: claim domains/shop.example.com.json: synthetic 403
2026/11/29 00:04:02 domains: 1 claim(s) listed but unreadable this pass (e.g. shop.example.com) — the pass is incomplete
2026/11/29 00:04:05 edge: route wrong.example.com is not served: account "bah" does not own fleet "pi" (occurrence #1)
2026/11/29 00:04:05 edge: platform alias conflict.example.com is not served: its socket is not one ready route of its own account and app (occurrence #1)
2026/11/29 00:04:05 edge: route forward.example.com is not served: replica set row on a box that is not the hub (occurrence #1)
2026/11/29 00:04:05 edge: route platform.example.com is not served: platform alias of shop.example.com, which is refused (occurrence #1)
2026/11/29 00:04:05 edge: route shop.example.com is not served: replica set row on a box that is not the hub (occurrence #1)
2026/11/29 00:04:05 edge: platform.example.com: this box's replica copy retired; its tunnel requests are refused for 2m0s so the hub serves them from another copy
2026/11/29 00:04:05 edge: shop.example.com: this box's replica copy retired; its tunnel requests are refused for 2m0s so the hub serves them from another copy
2026/11/29 00:04:05 edge: custom.example.com: this box's replica copy retired; its tunnel requests are refused for 2m0s so the hub serves them from another copy
2026/11/29 00:04:06 edge: tunnel pi/box-00: connected from 127.0.0.1:36806
2026/11/29 00:04:08 edge: static cache /tmp/TestStaticHeadersSurviveCompression1874494079/004/cache: first start with the lock; sweeping from the next start
2026/11/29 00:04:08 INFO edge: static site=bab/site version=v1 bytes=396 seconds=0.001
2026/11/29 00:04:08 edge: static cache /tmp/TestStaticPeriodicSweepSkipsAnAppMidResolve277815189/001: swept 2 entr(ies) no handler serves
2026/11/29 00:04:09 edge: static cache /tmp/TestEdgeServesStaticRouteWhenEnabled1093489798/004/cache: first start with the lock; sweeping from the next start
2026/11/29 00:04:09 INFO edge: static site=bab/site version=v1 bytes=109 seconds=0.000
2026/11/29 00:04:09 INFO edge: static site=bab/site version=v1 bytes=106 seconds=0.000
2026/11/29 00:04:09 edge: static site/canary/x: resolve channel: store unreachable — still serving cached v1
2026/11/29 00:04:09 edge: static site/canary/x: resolve channel: store unreachable — still serving cached v1
2026/11/29 00:04:09 edge: steering probe armed for edge.oncarlos.com (GET / answers 200; every other path on that host routes normally)
2026/11/29 00:04:09 edge: store door: get apps/ab12/web/channels/stable.json: unexpected EOF
2026/11/29 00:04:09 edge: store door: get apps/ab12/web/channels/stable.json: unexpected EOF
2026/11/29 00:04:09 edge: store door: get apps/ab12/web/channels/stable.json: unexpected EOF
2026/11/29 00:04:11 edge: tunnel pi/box-00: ping failed (EOF) — dropping channel
2026/11/29 00:04:12 edge: tunnel home/box-1: connected from 127.0.0.1:54280
2026/11/29 00:04:12 edge: wildcard certs off (CARLOS_DNSIMPLE_TOKEN missing) — per-host issuance continues
2026/11/29 00:04:37 edge: plan: answered *.lapsed.example with the disabled page (turned off after a lapse) for host "invented-0.lapsed.example" (occurrence #1)
FAIL
FAIL github.com/carlosframework/platform/internal/edge 152.096s
FAIL
=== internal_edge@4 (144 s, from +138 s)
ok github.com/carlosframework/platform/internal/edge 140.668s
=== internal_edge@5 (305 s, from +138 s)
ok github.com/carlosframework/platform/internal/edge 301.496s
=== internal_edge@6 (219 s, from +138 s)
ok github.com/carlosframework/platform/internal/edge 215.622s
=== internal_edge@7 (244 s, from +138 s)
ok github.com/carlosframework/platform/internal/edge 240.863s
=== internal_edge@8 (237 s, from +138 s)
ok github.com/carlosframework/platform/internal/edge 233.471s
=== internal_edge@9 (292 s, from +138 s)
ok github.com/carlosframework/platform/internal/edge 288.165s
=== internal_edge@10 (242 s, from +138 s)
ok github.com/carlosframework/platform/internal/edge 238.577s
=== internal_edge@11 (236 s, from +138 s)
ok github.com/carlosframework/platform/internal/edge 232.209s
=== internal_edge@12 (247 s, from +138 s)
ok github.com/carlosframework/platform/internal/edge 243.447s
=== internal_edge@13 (264 s, from +138 s)
ok github.com/carlosframework/platform/internal/edge 260.908s
=== internal_edge@14 (171 s, from +138 s)
ok github.com/carlosframework/platform/internal/edge 167.233s
=== internal_edge@15 (262 s, from +138 s)
ok github.com/carlosframework/platform/internal/edge 258.789s
=== internal_host@0 (9 s, from +200 s)
ok github.com/carlosframework/platform/internal/host 5.257s
=== internal_host@1 (17 s, from +200 s)
ok github.com/carlosframework/platform/internal/host 13.336s
=== lists: internal_edge 137 s, internal_activator 114 s, internal_host 200 s, internal_rootaws 34 s, internal_systemd 14 s
=== cpu: the gate used 7772 cpu-seconds in 534 s, about 14.6 of 32 cores; the machine as a whole was 45% busy
Failure summary:
--- internal_edge@3
--- FAIL: TestAssetE2ECoalescedWaitersAndRefusals (3.85s)
--- FAIL: TestAssetE2ECoalescedWaitersAndRefusals/a_refusal_reaches_only_its_initiator (1.88s)
FAIL github.com/carlosframework/platform/internal/edge 152.096s
WARNING: DATA RACE
Write at 0x0000061f3350 by goroutine 164:
github.com/carlosframework/platform/internal/edge.newBackhaulSceneWith.func1()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/backhaul_e2e_test.go:579 +0x3c
testing.(*common).Cleanup.func1()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/testing/testing.go:1317 +0x124
testing.(*common).runCleanup()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/testing/testing.go:1667 +0x16c
testing.tRunner.func2()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/testing/testing.go:2030 +0x48
runtime.deferreturn()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/runtime/panic.go:668 +0x5c
testing.(*T).Run.gowrap1()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/testing/testing.go:2101 +0x34
Previous read at 0x0000061f3350 by goroutine 270:
github.com/carlosframework/platform/internal/edge.(*Edge).backhaulTransport.func1()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/edge.go:5021 +0x50
net/http.(*Transport).dial()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/net/http/transport.go:1307 +0x90
net/http.(*Transport).dialConn()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/net/http/transport.go:1815 +0xa4c
net/http.(*Transport).dialConnFor()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/net/http/transport.go:1648 +0xb0
net/http.(*Transport).startDialConnForLocked.func1()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/net/http/transport.go:1629 +0x34
Goroutine 164 (running) created at:
testing.(*T).Run()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/testing/testing.go:2101 +0x7bc
github.com/carlosframework/platform/internal/edge.TestAssetE2ECoalescedWaitersAndRefusals()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/asset_e2e_test.go:830 +0x194
testing.tRunner()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/testing/testing.go:2036 +0x164
testing.(*T).Run.gowrap1()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/testing/testing.go:2101 +0x34
Goroutine 270 (running) created at:
net/http.(*Transport).startDialConnForLocked()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/net/http/transport.go:1628 +0x1a4
net/http.(*Transport).queueForDial()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/net/http/transport.go:1601 +0x3cc
net/http.(*Transport).getConn()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/net/http/transport.go:1548 +0x4b4
net/http.(*Transport).roundTrip()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/net/http/transport.go:693 +0xee0
net/http.(*Transport).RoundTrip()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/net/http/roundtrip.go:33 +0x34
github.com/carlosframework/platform/internal/edge.backhaulHolderTransport.RoundTrip()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/backhaul_holder.go:184 +0x50
github.com/carlosframework/platform/internal/edge.(*backhaulHolderTransport).RoundTrip()
<autogenerated>:1 +0x48
net/http/httputil.(*ReverseProxy).ServeHTTP()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/net/http/httputil/reverseproxy.go:579 +0x12dc
github.com/carlosframework/platform/internal/edge.(*Edge).hopTo()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/edge.go:4942 +0x59c
github.com/carlosframework/platform/internal/edge.(*Edge).backhaulAttempt()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/backhaul_holder.go:329 +0xdcc
github.com/carlosframework/platform/internal/edge.(*Edge).backhaulRouteTo()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/pathhop.go:69 +0x33c
github.com/carlosframework/platform/internal/edge.(*Edge).backhaulTo()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/edge.go:4893 +0x2b0
github.com/carlosframework/platform/internal/edge.(*Edge).backhaul()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/edge.go:4886 +0x1dc
github.com/carlosframework/platform/internal/edge.(*Edge).farForward()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/assetcatch.go:1366 +0x104
github.com/carlosframework/platform/internal/edge.(*Edge).serveAssetFar.func4()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/assetcatch.go:1238 +0x308
github.com/carlosframework/platform/internal/edge.(*Edge).serveAssetFar()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/assetcatch.go:1268 +0x13e4
github.com/carlosframework/platform/internal/edge.(*Edge).ServeHTTP()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/edge.go:2503 +0x2b08
github.com/carlosframework/platform/internal/edge.newBackhaulEdgeWith.func1()
/home/ci/work/repos/carlos__platform/wt/main/internal/edge/backhaul_e2e_test.go:384 +0x288
net/http.HandlerFunc.ServeHTTP()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/net/http/server.go:2306 +0x48
net/http.serverHandler.ServeHTTP()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/net/http/server.go:3331 +0x268
net/http.(*conn).serve()
/home/ci/work/repos/carlos__platform/cache/go-mod/golang.org/toolchain@v0.0.1-go1.26.10.linux-arm64/src/net/http/server.go:2087 +0xa30
FAILED: internal_edge@3
make: *** [Makefile:156: race] Error 1
amadan: step race failed: exit status 2
amadan: job failed at step race — its output is above, not at the tail of this log
diff --git a/.amadan/code-health.tsv b/.amadan/code-health.tsv| index c0ab8cbcf..e93e5ae48 100644 |
| --- a/.amadan/code-health.tsv |
| +++ b/.amadan/code-health.tsv |
| @@ -1373,7 +1373,6 @@ db-no-context internal/console (*Store).AppCount console.sqlHandle.QueryRow 1 |
| db-no-context internal/console (*Store).AppFlags console.sqlHandle.QueryRow 1 |
| db-no-context internal/console (*Store).AppNameState console.sqlHandle.QueryRow 1 |
| db-no-context internal/console (*Store).AppRows console.sqlHandle.Query 1 |
| -db-no-context internal/console (*Store).ApproveCLIAuth console.sqlHandle.Exec 1 |
| db-no-context internal/console (*Store).ApproveLinkAuth console.sqlHandle.Exec 1 |
| db-no-context internal/console (*Store).AppsFor console.sqlHandle.Query 1 |
| db-no-context internal/console (*Store).AppsIncludingTrashIn console.sqlHandle.Query 1 |
diff --git a/docs/parity.md b/docs/parity.md| index 4b2e37f8a..3b1fbb59d 100644 |
| --- a/docs/parity.md |
| +++ b/docs/parity.md |
| @@ -456,7 +456,7 @@ Discussion #1289. |
| | op-system-cutovers | operator | `system seeds-floor publish`<br>`system legacy-routes assign`<br>`system lifetimes cutover`<br>`system hosts-used status` | | One-off cutovers and floors. | |
| | op-system-roles | operator | `system box role`<br>`system group role` | | Box and group roles. | |
| | op-system-group-roll | operator | `system group plan`<br>`system group status`<br>`system group roll`<br>`system group resume`<br>`system group rollback`<br>`system group return`<br>`system group abandon`<br>`system group close-lost`<br>`system group replace`<br>`system group remove`<br>`system group cancel-drain`<br>`system group probe start`<br>`system group probe resume`<br>`system group probe status`<br>`system group probe abandon`<br>`system group probe close-lost` | | Group maintenance from an operator machine. | |
| -| op-system-demos | operator | `system demos status`<br>`system demos serving`<br>`system demos takedown`<br>`system demos takedown-status`<br>`system demos reports`<br>`system demos reports resolve` | | Demo serving, takedowns and reports. | |
| +| op-system-demos | operator | `system demos status`<br>`system demos serving`<br>`system demos takedown`<br>`system demos takedown-status`<br>`system demos sandbox-intent`<br>`system demos reports`<br>`system demos reports resolve` | | Demo serving, takedowns and reports. | |
| | op-system-managed-fleets | operator | `system managed-fleets show`<br>`system managed-fleets set` | | The managed-fleet catalog. | |
| | op-system-named-units | operator | `system named-units put`<br>`system named-units show` | | A fixed box's named-unit declarations, through its parameter. | |
| | op-link | operator | `link create`<br>`link status`<br>`link publish`<br>`link unpublish`<br>`link rotate`<br>`link remove` | | Operator only: a link speaks for the whole deployment, so its doors need a system operator (apiSystemRoller). | |
diff --git a/docs/superpowers/notes/census-proposal-gvisor-slice2-explicit-mode.md b/docs/superpowers/notes/census-proposal-gvisor-slice2-explicit-mode.md| new file mode 100644 |
| index 000000000..f908e72d5 |
| --- /dev/null |
| +++ b/docs/superpowers/notes/census-proposal-gvisor-slice2-explicit-mode.md |
| @@ -0,0 +1,11 @@ |
| +# Census approval: gvisor-slice2-explicit-mode |
| + |
| +Ruling `census-ruling-gvisor-slice2-explicit-mode`. 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/execsandbox`, `internal/instancectl`. |
| + |
| +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: `ed1957bc7d18714e39984e757b73b8c590f1a2a924ca35e20e9041fc09f2ca78` → `ed1957bc7d18714e39984e757b73b8c590f1a2a924ca35e20e9041fc09f2ca78`. |
| + |
| +Overlay: `internal/provision/testdata/plan14-root-reads-gvisor-slice2-explicit-mode.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`. |
diff --git a/docs/superpowers/runbooks/gvisor-demos.md b/docs/superpowers/runbooks/gvisor-demos.md| index 74bf6affe..6cc7b61ce 100644 |
| --- a/docs/superpowers/runbooks/gvisor-demos.md |
| +++ b/docs/superpowers/runbooks/gvisor-demos.md |
| @@ -2,8 +2,36 @@ |
| Set `CARLOS_EXEC_SANDBOX=gvisor` only on a box where `carlos status --layout` already displays the exec-sandbox line. A binary without exec-sandbox support cannot enforce this setting. A bootstrap or reimage from a release pointer that predates this change with gvisor retained is outside this rollout. Keep this setting in internal operator material. |
| -This rollout covers the dev demo box. The flagship is out of scope. `auto` still |
| -selects systemd; changing that default needs a separate change. |
| +This rollout covers the dev demo box. The flagship is out of scope. A demo box |
| +must set `CARLOS_EXEC_SANDBOX` to `gvisor` or `systemd`. Unset or `auto` admits |
| +no demos and no builds, and the box's exec-sandbox line in `carlos status |
| +--layout` reads `unset on a demo box`. |
| + |
| +## Before and after the release that requires an explicit sandbox |
| + |
| +That release still reaches the flagship, so its demo box must say `systemd` |
| +before it rolls. |
| + |
| +On the flagship demo box, through SSM and as root, before the release rolls: |
| + |
| +1. Back up the file: `cp -p /etc/carlos/host.env /etc/carlos/host.env.bak-<date>`. |
| +2. Append the line: `printf 'CARLOS_EXEC_SANDBOX=systemd\n' >> /etc/carlos/host.env`. |
| +3. Check that the line is there once and the file is still root's with mode |
| + 0600: `grep -c '^CARLOS_EXEC_SANDBOX=' /etc/carlos/host.env` prints `1`, |
| + and `stat -c '%U %a' /etc/carlos/host.env` prints `root 600`. |
| +4. Roll the box before the console. If the console rolls first, expect one |
| + demo_sandbox incident until the box reports `systemd`. |
| + |
| +On dev, right after the roll, set the intent to match the dev box, which |
| +already says `gvisor`: |
| + |
| +```sh |
| +carlos system demos sandbox-intent gvisor |
| +``` |
| + |
| +Run `carlos auth login` and approve it first: the command must run within |
| +5 minutes of the confirmation you give at that approval. Until the intent says `gvisor`, |
| +demo_sandbox fires for the dev box. |
| ## Prepare the release and approval |
diff --git a/docs/superpowers/specs/2026-11-08-gvisor-demos-design.md b/docs/superpowers/specs/2026-11-08-gvisor-demos-design.md| index c792bb660..436931f62 100644 |
| --- a/docs/superpowers/specs/2026-11-08-gvisor-demos-design.md |
| +++ b/docs/superpowers/specs/2026-11-08-gvisor-demos-design.md |
| @@ -67,6 +67,11 @@ operator asked for gVisor, so nothing runs natively. |
| ### 4.1 `auto` in this build (sequencing for the flagship rule; agreed by platform-f6, 2026-11-08) |
| +Superseded by the gVisor flagship plan's slice 2 |
| +(`docs/superpowers/plans/2026-11-16-gvisor-flagship-demos.md`): `auto` never |
| +resolves to gVisor, and a demo box whose mode is unset or `auto` refuses demo |
| +admission and builds (`EXEC-SANDBOX-UNSET`). The flip below is not built. |
| + |
| Ruling 3 says `auto` means gVisor on demo boxes. Shipped as-is, the next flagship box |
| roll would switch flagship demos to gVisor, which the go-live owners forbid. So this |
| build lands `auto` resolving to systemd everywhere, and the dev demo box gets an |
diff --git a/internal/console/alertdemosandbox.go b/internal/console/alertdemosandbox.go| new file mode 100644 |
| index 000000000..0b90ccb29 |
| --- /dev/null |
| +++ b/internal/console/alertdemosandbox.go |
| @@ -0,0 +1,157 @@ |
| +package console |
| + |
| +// demo_sandbox (gVisor flagship plan, slice 2.3): every demo box runs the |
| +// sandbox the console's intent names (demo_sandbox_intent.go), and says so |
| +// in a fresh report. |
| +// |
| +// The boxes expected are the demo fleet's (the console's CARLOS_DEMO_FLEET) |
| +// as the registry lists them, detached ones left out. Each one's report is |
| +// read by the key its label names, fleets/<fleet>/status/boxes/<label>.json, |
| +// conditionally and with no listing, so a steady pass costs one GET per |
| +// attached box; a report the mailer pass read this pass is not read again. |
| +// The registry is the authority on which boxes there are, so |
| +// a box that should report and does not is a box this alert names. Unknown |
| +// is not quiet: a registered box with no report (deleted, or never |
| +// written), a report older than three heartbeats, one with no sandbox |
| +// report, and one that could not be read all fire. So does a box whose |
| +// mode is unset, whose gVisor is blocked, or whose effective sandbox is not |
| +// the intent. When the intent or the registry cannot be read, the fleet |
| +// itself (subject fleets/<fleet>) fires, however many boxes it has, and |
| +// every box keeps its state. |
| +// |
| +// Quiet is never proof: slice 4's witness asks for a fresh positive report |
| +// of its own. |
| + |
| +import ( |
| + "context" |
| + "errors" |
| + "fmt" |
| + "os" |
| + "time" |
| + |
| + "github.com/carlosframework/platform/internal/alerting" |
| + "github.com/carlosframework/platform/internal/execsandbox" |
| + "github.com/carlosframework/platform/internal/registry" |
| + "github.com/carlosframework/platform/internal/status" |
| +) |
| + |
| +const demoSandboxRule = "demo_sandbox" |
| + |
| +// demoSandboxInputs is what one pass read for demo_sandbox. unknown is an |
| +// intent or registry read that failed; unread the attached boxes whose |
| +// report could not be read. |
| +type demoSandboxInputs struct { |
| + fleet, intent string |
| + expected []registry.FleetBox |
| + reports map[string]status.Box |
| + unread map[string]bool |
| + unknown bool |
| +} |
| + |
| +// demoSandboxPass reads the intent, the demo fleet's boxes and each |
| +// attached box's report, and adds demo_sandbox. A console with no demo |
| +// fleet adds nothing. Each failed read is logged and fails the run; a |
| +// report that is not there is not a failed read, only a box unconfirmed. |
| +// It records in keep, for the pass's forget, the attached boxes' report |
| +// keys, or, when the boxes could not be listed, the fleet's reports held. |
| +func (s *Server) demoSandboxPass(ctx context.Context, now time.Time, sig *alertSignals, keep *fleetKeep) { |
| + in := demoSandboxInputs{fleet: s.cfg.Demo.Fleet} |
| + if in.fleet == "" { |
| + return |
| + } |
| + r := &s.alertEngine.reads |
| + prefix := "fleets/" + in.fleet + "/" + alertStatusBoxesPrefix |
| + var err error |
| + if in.intent, err = s.store.DemoSandboxIntent(ctx); err != nil { |
| + alertReadFailed(ctx, fmt.Errorf("demo sandbox intent: %w", err)) |
| + in.unknown = true |
| + } |
| + if !in.unknown { |
| + var reg consoleRegistry |
| + if reg, err = s.openPassRegistry(); err == nil { |
| + in.expected, err = reg.ListFleetBoxesContext(ctx, in.fleet) |
| + } |
| + if err != nil { |
| + alertReadFailed(ctx, fmt.Errorf("list fleet %s boxes for demo_sandbox: %w", in.fleet, err)) |
| + in.unknown = true |
| + } |
| + } |
| + if in.unknown { |
| + demoSandboxSignals(in, now, sig) |
| + keep.hold(prefix) |
| + return |
| + } |
| + var keys []string |
| + in.reports, in.unread = map[string]status.Box{}, map[string]bool{} |
| + for _, b := range in.expected { |
| + if b.Status == "detached" { |
| + continue |
| + } |
| + if !registry.ValidTunnelName(b.Label) { |
| + in.unread[b.Label] = true |
| + continue |
| + } |
| + key := prefix + b.Label + ".json" |
| + keys = append(keys, key) |
| + report, err := r.boxReport(ctx, s.cfg.Releases, key) |
| + switch { |
| + case errors.Is(err, os.ErrNotExist): |
| + case err != nil: |
| + alertReadFailed(ctx, err) |
| + in.unread[b.Label] = true |
| + default: |
| + report.Label = b.Label |
| + in.reports[b.Label] = report |
| + } |
| + } |
| + demoSandboxSignals(in, now, sig) |
| + keep.read(prefix, keys) |
| +} |
| + |
| +// demoSandboxSignals adds demo_sandbox for the fleet and for each attached |
| +// box it expects, firing (value 1) or clear (value 0). |
| +func demoSandboxSignals(in demoSandboxInputs, now time.Time, sig *alertSignals) { |
| + add := func(subject string, firing bool) { |
| + value := 0.0 |
| + if firing { |
| + value = 1 |
| + } |
| + sig.add(alertSignal{Key: alertKey{alertScopeFleet, demoSandboxRule, subject}, Level: alertRuleLevel(demoSandboxRule), |
| + Firing: firing, Value: value, At: now}) |
| + } |
| + add("fleets/"+in.fleet, in.unknown) |
| + sig.cover(demoSandboxRule, nil) |
| + if in.unknown { |
| + sig.keepMissing[demoSandboxRule] = true |
| + return |
| + } |
| + for _, b := range in.expected { |
| + if b.Status == "detached" { |
| + continue |
| + } |
| + report, ok := in.reports[b.Label] |
| + confirmed := ok && !in.unread[b.Label] && demoSandboxConfirmed(report, in.intent, now) |
| + add("fleets/"+in.fleet+"/"+b.Label, !confirmed) |
| + } |
| +} |
| + |
| +// demoSandboxConfirmed is whether b is a fresh report of the intended |
| +// sandbox: a mode the box states, effective as intended, and, for gVisor, |
| +// ready. |
| +func demoSandboxConfirmed(b status.Box, intent string, now time.Time) bool { |
| + if status.BoxStale(b, now, status.SnapshotPeriod) || b.Metrics == nil || b.Metrics.Layout == nil || b.Metrics.Layout.ExecSandbox == nil { |
| + return false |
| + } |
| + e := b.Metrics.Layout.ExecSandbox |
| + if e.Configured != string(execsandbox.Systemd) && e.Configured != string(execsandbox.GVisor) { |
| + return false |
| + } |
| + if e.Effective != intent { |
| + return false |
| + } |
| + return e.Effective != string(execsandbox.EffectiveGVisor) || e.Ready |
| +} |
| + |
| +// demoSandboxLevel is the rule's level: a demo box outside its intended |
| +// sandbox runs anonymous code under the wrong guard. |
| +const demoSandboxLevel = alerting.LevelIncident |
diff --git a/internal/console/alertdemosandbox_test.go b/internal/console/alertdemosandbox_test.go| new file mode 100644 |
| index 000000000..6da9706d5 |
| --- /dev/null |
| +++ b/internal/console/alertdemosandbox_test.go |
| @@ -0,0 +1,494 @@ |
| +package console |
| + |
| +import ( |
| + "context" |
| + "encoding/json" |
| + "maps" |
| + "net/http" |
| + "os" |
| + "slices" |
| + "strings" |
| + "sync" |
| + "testing" |
| + "time" |
| + |
| + "github.com/carlosframework/platform/internal/alerting" |
| + "github.com/carlosframework/platform/internal/mailwire" |
| + "github.com/carlosframework/platform/internal/provision" |
| + "github.com/carlosframework/platform/internal/registry" |
| + "github.com/carlosframework/platform/internal/status" |
| +) |
| + |
| +func demoSandboxBox(label string, at time.Time, sandbox *status.ExecSandbox) status.Box { |
| + return status.Box{Label: label, GeneratedAt: at, Metrics: &status.BoxMetrics{Layout: &status.LayoutReport{Mode: "nested", ExecSandbox: sandbox}}} |
| +} |
| + |
| +func demoSandboxSignal(sig *alertSignals, subject string) (alertSignal, bool) { |
| + for _, sg := range sig.list { |
| + if sg.Key == (alertKey{alertScopeFleet, "demo_sandbox", subject}) { |
| + return sg, true |
| + } |
| + } |
| + return alertSignal{}, false |
| +} |
| + |
| +// TestDemoSandboxRuleRegistered: demo_sandbox is a console rule at |
| +// incident level, with its words and a place on the rules page. |
| +func TestDemoSandboxRuleRegistered(t *testing.T) { |
| + if !alertConsoleRules["demo_sandbox"] || alertRuleLevel("demo_sandbox") != alerting.LevelIncident || !slices.Contains(alertRuleOrder, "demo_sandbox") { |
| + t.Fatalf("demo_sandbox: console %v level %q ordered %v", alertConsoleRules["demo_sandbox"], alertRuleLevel("demo_sandbox"), slices.Contains(alertRuleOrder, "demo_sandbox")) |
| + } |
| + for _, key := range []string{"title", "what", "what.none", "how_long", "what_to_do"} { |
| + if alertCopy["rule.demo_sandbox."+key] == "" { |
| + t.Errorf("no rule.demo_sandbox.%s", key) |
| + } |
| + } |
| + if alertPageCopy["rules.when.demo_sandbox"] == "" { |
| + t.Error("no rules.when.demo_sandbox") |
| + } |
| +} |
| + |
| +// TestDemoSandboxSignals (gVisor flagship plan, slice 2.3): each |
| +// registered, attached demo box is judged against the intent. It fires |
| +// when its effective sandbox differs, when gVisor is blocked, when its mode |
| +// is unset, and whenever the box cannot be confirmed: no report, a stale |
| +// one, one with no sandbox report, or one that could not be read. |
| +// Detached boxes say nothing. A failed intent or |
| +// registry read fires for the fleet itself and keeps the boxes' state. |
| +func TestDemoSandboxSignals(t *testing.T) { |
| + now := alertT0 |
| + fresh, stale := now.Add(-time.Minute), now.Add(-16*time.Minute) |
| + systemd := &status.ExecSandbox{Configured: "systemd", Effective: "systemd", Ready: true} |
| + gvisor := &status.ExecSandbox{Configured: "gvisor", Effective: "gvisor", Ready: true} |
| + blocked := &status.ExecSandbox{Configured: "gvisor", Effective: "gvisor", Blocked: "EXEC-SANDBOX-RUNSC"} |
| + unset := &status.ExecSandbox{Configured: "unset", Effective: "systemd", Blocked: "EXEC-SANDBOX-UNSET"} |
| + auto := &status.ExecSandbox{Configured: "auto", Effective: "systemd", Ready: true} |
| + for _, tc := range []struct { |
| + name, intent string |
| + report *status.Box |
| + unread bool |
| + firing bool |
| + }{ |
| + {"systemd as intended", "systemd", &status.Box{}, false, false}, |
| + {"gvisor as intended", "gvisor", ptr(demoSandboxBox("box-1", fresh, gvisor)), false, false}, |
| + {"systemd where gvisor is intended", "gvisor", &status.Box{}, false, true}, |
| + {"gvisor where systemd is intended", "systemd", ptr(demoSandboxBox("box-1", fresh, gvisor)), false, true}, |
| + {"gvisor blocked", "gvisor", ptr(demoSandboxBox("box-1", fresh, blocked)), false, true}, |
| + {"unset", "systemd", ptr(demoSandboxBox("box-1", fresh, unset)), false, true}, |
| + {"auto from an older release", "systemd", ptr(demoSandboxBox("box-1", fresh, auto)), false, true}, |
| + {"no sandbox report", "systemd", ptr(demoSandboxBox("box-1", fresh, nil)), false, true}, |
| + {"stale", "systemd", ptr(demoSandboxBox("box-1", stale, systemd)), false, true}, |
| + {"no report", "systemd", nil, false, true}, |
| + {"unreadable", "systemd", nil, true, true}, |
| + } { |
| + t.Run(tc.name, func(t *testing.T) { |
| + in := demoSandboxInputs{fleet: "demo", intent: tc.intent, |
| + expected: []registry.FleetBox{{Fleet: "demo", Label: "box-1", Status: "active"}, {Fleet: "demo", Label: "box-2", Status: "detached"}}, |
| + reports: map[string]status.Box{"box-2": demoSandboxBox("box-2", fresh, gvisor)}, unread: map[string]bool{}} |
| + if tc.report != nil { |
| + b := *tc.report |
| + if b.Metrics == nil { |
| + b = demoSandboxBox("box-1", fresh, systemd) |
| + } |
| + in.reports["box-1"] = b |
| + } |
| + in.unread["box-1"] = tc.unread |
| + sig := newAlertSignals() |
| + demoSandboxSignals(in, now, sig) |
| + sg, ok := demoSandboxSignal(sig, "fleets/demo/box-1") |
| + if !ok || sg.Firing != tc.firing || sg.Level != alerting.LevelIncident { |
| + t.Fatalf("box-1: %+v (added %v); want firing %v", sg, ok, tc.firing) |
| + } |
| + if sg, ok := demoSandboxSignal(sig, "fleets/demo/box-2"); ok { |
| + t.Fatalf("detached box-2 signalled %+v", sg) |
| + } |
| + if sg, ok := demoSandboxSignal(sig, "fleets/demo"); !ok || sg.Firing { |
| + t.Fatalf("fleet: %+v (added %v); want clear", sg, ok) |
| + } |
| + if _, covered := sig.covered["demo_sandbox"]; !covered || sig.keepMissing["demo_sandbox"] { |
| + t.Fatalf("covered %v keepMissing %v", sig.covered, sig.keepMissing) |
| + } |
| + }) |
| + } |
| + t.Run("intent or registry unreadable", func(t *testing.T) { |
| + sig := newAlertSignals() |
| + demoSandboxSignals(demoSandboxInputs{fleet: "demo", unknown: true}, now, sig) |
| + if sg, ok := demoSandboxSignal(sig, "fleets/demo"); !ok || !sg.Firing { |
| + t.Fatalf("fleet: %+v (added %v); want firing", sg, ok) |
| + } |
| + if !sig.keepMissing["demo_sandbox"] { |
| + t.Fatal("open box members would go gone on an unreadable registry") |
| + } |
| + }) |
| +} |
| + |
| +// TestEnginePassDemoSandbox: through the engine, the demo fleet's box |
| +// opens an incident and mails the operator when its sandbox differs from |
| +// the intent, the incident resolves with a clear once the box reports the |
| +// intended sandbox, and it opens again, as unknown, when the box's report |
| +// is deleted. The detached box is never named. A registry that cannot be |
| +// read fires for the fleet. |
| +func TestEnginePassDemoSandbox(t *testing.T) { |
| + ef := newEngineFixture(t, nil) |
| + ef.srv.cfg.Demo = demoTestConfig(t) |
| + ef.operator(t, opA) |
| + ctx := context.Background() |
| + reg := openTestReg(t, ef.consoleFixture) |
| + if _, err := reg.CreateFleet(registry.Fleet{Name: "demo", Account: opsSqid, Bucket: "demo-bucket"}); err != nil { |
| + t.Fatal(err) |
| + } |
| + for _, label := range []string{"box-1", "box-2"} { |
| + if err := reg.AddFleetBox(registry.FleetBox{Fleet: "demo", Label: label, TokenHash: strings.Repeat("a", 63) + label[len(label)-1:], Status: "active", AddedAt: alertT0.UnixNano()}); err != nil { |
| + t.Fatal(err) |
| + } |
| + } |
| + if err := reg.SetFleetBoxStatus("demo", "box-2", "detached"); err != nil { |
| + t.Fatal(err) |
| + } |
| + beat := func(label string, at time.Time, sandbox *status.ExecSandbox) { |
| + body, err := json.Marshal(demoSandboxBox(label, at, sandbox)) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + putAlertBody(t, ef.rel, "fleets/demo/status/boxes/"+label+".json", body) |
| + } |
| + systemd := &status.ExecSandbox{Configured: "systemd", Effective: "systemd", Ready: true} |
| + gvisor := &status.ExecSandbox{Configured: "gvisor", Effective: "gvisor", Ready: true} |
| + open := func() int { |
| + return ef.count(t, `SELECT COUNT(*) FROM alert_incidents WHERE closed_at IS NULL AND rule = 'demo_sandbox'`) |
| + } |
| + |
| + // The intent is systemd and the box says systemd: quiet. |
| + beat("box-1", alertT0, systemd) |
| + beat("box-2", alertT0, nil) |
| + ef.passAt(t, 0) |
| + if n := open(); n != 0 { |
| + t.Fatalf("%d demo_sandbox incidents open with the box as intended", n) |
| + } |
| + |
| + // gVisor is intended; the box still runs systemd. |
| + if err := ef.st.SetDemoSandboxIntent(ctx, "gvisor", "owner@example.com", alertT0); err != nil { |
| + t.Fatal(err) |
| + } |
| + beat("box-1", alertT0.Add(4*time.Minute), systemd) |
| + ef.passesTo(t, time.Minute, 10*time.Minute) |
| + fire := ef.mailsTo(opA) |
| + if n := open(); n != 1 || len(fire) != 1 || !strings.Contains(fire[0], "fleets/demo/box-1") || strings.Contains(fire[0], "box-2") { |
| + t.Fatalf("%d open, mails %v; want one demo_sandbox fire naming fleets/demo/box-1 only", n, fire) |
| + } |
| + |
| + // The box reports gVisor, ready: the incident resolves, with a clear. |
| + beat("box-1", alertT0.Add(14*time.Minute), gvisor) |
| + ef.passesTo(t, 11*time.Minute, 15*time.Minute) |
| + mails := ef.mailsTo(opA) |
| + if n := open(); n != 0 || len(mails) != 2 || !strings.Contains(mails[1], "Demo sandbox mismatch has cleared on fleets/demo/box-1") { |
| + t.Fatalf("%d open, mails %v; want the incident closed with a clear", n, mails) |
| + } |
| + |
| + // The report gone: unknown is not quiet. |
| + if err := ef.rel.Delete(ctx, "fleets/demo/status/boxes/box-1.json"); err != nil { |
| + t.Fatal(err) |
| + } |
| + ef.passesTo(t, 16*time.Minute, 20*time.Minute) |
| + if n := open(); n != 1 { |
| + t.Fatalf("%d open with box-1's report deleted, want 1", n) |
| + } |
| + |
| + // The registry gone: the fleet itself is unknown, and box-1 keeps its |
| + // state. |
| + if err := os.Rename(ef.regPath, ef.regPath+".gone"); err != nil { |
| + t.Fatal(err) |
| + } |
| + ef.passesTo(t, 21*time.Minute, 25*time.Minute) |
| + var members string |
| + if err := ef.st.db.QueryRow(`SELECT members FROM alert_incidents WHERE closed_at IS NULL AND rule = 'demo_sandbox'`).Scan(&members); err != nil { |
| + t.Fatal(err) |
| + } |
| + if !strings.Contains(members, "fleets/demo/box-1") || !strings.Contains(members, `"fleets/demo"`) { |
| + t.Fatalf("members %s; want box-1 kept and the fleet unknown", members) |
| + } |
| +} |
| + |
| +// demoSandboxWire records the S3 requests the console makes for the demo |
| +// fleet's reports, as the fake bucket receives them: each GET of an object |
| +// under fleets/demo/ (with whether it was conditional) and each listing of |
| +// a prefix under fleets/. fail, when it names a key, fails that GET; |
| +// failList, when it names a prefix, fails its listing. |
| +type demoSandboxWire struct { |
| + mu sync.Mutex |
| + gets map[string]int |
| + conditional map[string]int |
| + lists []string |
| + fail string |
| + failList string |
| +} |
| + |
| +func (w *demoSandboxWire) hook(r *http.Request) (int, <-chan struct{}) { |
| + w.mu.Lock() |
| + defer w.mu.Unlock() |
| + _, key, _ := strings.Cut(strings.TrimPrefix(r.URL.Path, "/"), "/") |
| + q := r.URL.Query() |
| + if r.Method == http.MethodGet && key == "" && q.Get("list-type") == "2" && w.failList != "" && q.Get("prefix") == w.failList { |
| + return http.StatusForbidden, nil |
| + } |
| + switch { |
| + case r.Method == http.MethodGet && key == "" && q.Get("list-type") == "2" && strings.HasPrefix(q.Get("prefix"), "fleets/"): |
| + w.lists = append(w.lists, q.Get("prefix")) |
| + case r.Method == http.MethodGet && strings.HasPrefix(key, "fleets/demo/"): |
| + w.gets[key]++ |
| + if r.Header.Get("If-None-Match") != "" { |
| + w.conditional[key]++ |
| + } |
| + if key == w.fail { |
| + return http.StatusForbidden, nil |
| + } |
| + } |
| + return 0, nil |
| +} |
| + |
| +func (w *demoSandboxWire) reset() { |
| + w.mu.Lock() |
| + defer w.mu.Unlock() |
| + w.gets, w.conditional, w.lists = map[string]int{}, map[string]int{}, nil |
| +} |
| + |
| +// demoSandboxEngine is an engine fixture on the S3 fake with the demo |
| +// fleet registered: the given labels attached and box-3 detached. |
| +func demoSandboxEngine(t *testing.T, attached ...string) (*engineFixture, *demoSandboxWire) { |
| + t.Helper() |
| + ef := newEngineFixture(t, nil) |
| + ef.srv.cfg.Demo = demoTestConfig(t) |
| + ef.operator(t, opA) |
| + reg := openTestReg(t, ef.consoleFixture) |
| + if _, err := reg.CreateFleet(registry.Fleet{Name: "demo", Account: opsSqid, Bucket: "demo-bucket"}); err != nil { |
| + t.Fatal(err) |
| + } |
| + for _, label := range append(slices.Clone(attached), "box-3") { |
| + if err := reg.AddFleetBox(registry.FleetBox{Fleet: "demo", Label: label, TokenHash: strings.Repeat("a", 63) + label[len(label)-1:], Status: "active", AddedAt: alertT0.UnixNano()}); err != nil { |
| + t.Fatal(err) |
| + } |
| + } |
| + if err := reg.SetFleetBoxStatus("demo", "box-3", "detached"); err != nil { |
| + t.Fatal(err) |
| + } |
| + wire := &demoSandboxWire{} |
| + wire.reset() |
| + ef.lat.Fake().OnRequest(wire.hook) |
| + t.Cleanup(func() { ef.lat.Fake().OnRequest(nil) }) |
| + return ef, wire |
| +} |
| + |
| +// TestEnginePassDemoSandboxRequests (round 1, S3 reads): demo_sandbox |
| +// reads each attached box's report by the key the registry's label names, |
| +// with no listing, and keeps what it read across passes: in steady state a |
| +// heartbeat pass costs one conditional GET per attached box (answered |
| +// unchanged), none for a detached box, and no LIST, whatever the mailer |
| +// pass forgets of fleets/. A GET that fails is the box unknown, firing. |
| +func TestEnginePassDemoSandboxRequests(t *testing.T) { |
| + ef, wire := demoSandboxEngine(t, "box-1", "box-2") |
| + systemd := &status.ExecSandbox{Configured: "systemd", Effective: "systemd", Ready: true} |
| + for _, label := range []string{"box-1", "box-2", "box-3"} { |
| + body, err := json.Marshal(demoSandboxBox(label, alertT0, systemd)) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + putAlertBody(t, ef.rel, "fleets/demo/status/boxes/"+label+".json", body) |
| + } |
| + open := func() int { |
| + return ef.count(t, `SELECT COUNT(*) FROM alert_incidents WHERE closed_at IS NULL AND rule = 'demo_sandbox'`) |
| + } |
| + |
| + ef.passesTo(t, 0, 4*time.Minute) // one heartbeat pass, the first: reads in full |
| + wire.reset() |
| + ef.passesTo(t, 5*time.Minute, 9*time.Minute) // one heartbeat pass, steady |
| + wire.mu.Lock() |
| + gets, conditional, lists := wire.gets, wire.conditional, wire.lists |
| + wire.mu.Unlock() |
| + want := map[string]int{"fleets/demo/status/boxes/box-1.json": 1, "fleets/demo/status/boxes/box-2.json": 1} |
| + if !maps.Equal(gets, want) || !maps.Equal(conditional, want) || len(lists) != 0 { |
| + t.Fatalf("steady heartbeat pass: GETs %v, conditional %v, LISTs %v; want one conditional GET per attached box and no LIST", gets, conditional, lists) |
| + } |
| + if n := open(); n != 0 { |
| + t.Fatalf("%d demo_sandbox incidents open with every box as intended", n) |
| + } |
| + |
| + // box-1's report cannot be read: unknown, so it fires. |
| + wire.mu.Lock() |
| + wire.fail = "fleets/demo/status/boxes/box-1.json" |
| + wire.mu.Unlock() |
| + ef.passesTo(t, 10*time.Minute, 14*time.Minute) |
| + var members string |
| + if err := ef.st.db.QueryRow(`SELECT members FROM alert_incidents WHERE closed_at IS NULL AND rule = 'demo_sandbox'`).Scan(&members); err != nil { |
| + t.Fatal(err) |
| + } |
| + if !strings.Contains(members, "fleets/demo/box-1") || strings.Contains(members, "box-2") || strings.Contains(members, "box-3") { |
| + t.Fatalf("members %s; want box-1 alone", members) |
| + } |
| +} |
| + |
| +// TestEnginePassDemoSandboxEmptyFleet (round 1, unknown fleet): with no |
| +// attached box, the fleet subject still fires when the registry cannot be |
| +// read, and a detached box is quiet whether or not it can be. |
| +func TestEnginePassDemoSandboxEmptyFleet(t *testing.T) { |
| + ef, wire := demoSandboxEngine(t) |
| + gvisor := &status.ExecSandbox{Configured: "gvisor", Effective: "gvisor", Ready: true} |
| + body, err := json.Marshal(demoSandboxBox("box-3", alertT0, gvisor)) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + putAlertBody(t, ef.rel, "fleets/demo/status/boxes/box-3.json", body) |
| + ef.passAt(t, 0) |
| + if n := ef.count(t, `SELECT COUNT(*) FROM alert_incidents WHERE closed_at IS NULL AND rule = 'demo_sandbox'`); n != 0 { |
| + t.Fatalf("%d demo_sandbox incidents open for a fleet whose one box is detached", n) |
| + } |
| + wire.mu.Lock() |
| + if len(wire.gets) != 0 { |
| + t.Errorf("detached box read: %v", wire.gets) |
| + } |
| + wire.mu.Unlock() |
| + if err := os.Rename(ef.regPath, ef.regPath+".gone"); err != nil { |
| + t.Fatal(err) |
| + } |
| + ef.passesTo(t, time.Minute, 5*time.Minute) |
| + var members string |
| + if err := ef.st.db.QueryRow(`SELECT members FROM alert_incidents WHERE closed_at IS NULL AND rule = 'demo_sandbox'`).Scan(&members); err != nil { |
| + t.Fatal(err) |
| + } |
| + if !strings.Contains(members, `"fleets/demo"`) || strings.Contains(members, "box-3") { |
| + t.Fatalf("members %s; want the fleet alone", members) |
| + } |
| +} |
| + |
| +// demoSandboxSwitchApp switches the demo fleet's account's app shop to |
| +// mail submission, its route shop.example.com, so the mailer pass reads |
| +// the demo fleet's reports too. |
| +func demoSandboxSwitchApp(t *testing.T, ef *engineFixture) { |
| + t.Helper() |
| + if _, err := ef.st.CreateApp("shop", "test", alertT0); err != nil { |
| + t.Fatal(err) |
| + } |
| + b, err := json.Marshal(mailwire.SenderView{ID: mailwire.SenderAppID, Submission: &mailwire.Submission{On: true, At: alertT0}}) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + putAlertBody(t, ef.rel, mailwire.SenderKey(opsSqid, "shop", mailwire.SenderAppID), b) |
| + if err := provision.CreateRecord(context.Background(), ef.rel, provision.Record{Schema: 1, Host: "shop.example.com", Slug: "shop", |
| + App: "shop", Account: opsSqid, Channel: "stable", CreatedAt: alertT0}); err != nil { |
| + t.Fatal(err) |
| + } |
| +} |
| + |
| +// TestEnginePassDemoSandboxSharedReads (round 2, shared reads): with a |
| +// switched app on the demo fleet's account, the mailer pass lists and |
| +// reads the demo fleet's reports, and demo_sandbox takes that pass's |
| +// reads rather than read them again. A steady heartbeat pass costs one |
| +// LIST of the fleet and one conditional GET per report, and both rules |
| +// judge from it: mailer_unarmed fires for the attached unarmed boxes and |
| +// demo_sandbox is quiet. A GET that fails is read once, and is unknown to |
| +// both: demo_sandbox fires for the box and mailer_unarmed keeps it. |
| +func TestEnginePassDemoSandboxSharedReads(t *testing.T) { |
| + ef, wire := demoSandboxEngine(t, "box-1", "box-2") |
| + demoSandboxSwitchApp(t, ef) |
| + systemd := &status.ExecSandbox{Configured: "systemd", Effective: "systemd", Ready: true} |
| + beat := func(at time.Time) { |
| + for _, label := range []string{"box-1", "box-2", "box-3"} { |
| + b := demoSandboxBox(label, at, systemd) |
| + b.Metrics.RouteServing = map[string]string{"shop.example.com": "v1"} |
| + body, err := json.Marshal(b) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + putAlertBody(t, ef.rel, "fleets/demo/status/boxes/"+label+".json", body) |
| + } |
| + } |
| + members := func(rule string) string { |
| + var m string |
| + if err := ef.st.db.QueryRow(`SELECT members FROM alert_incidents WHERE closed_at IS NULL AND rule = ?`, rule).Scan(&m); err != nil { |
| + t.Fatalf("%s: %v", rule, err) |
| + } |
| + return m |
| + } |
| + |
| + beat(alertT0) |
| + ef.passesTo(t, 0, 4*time.Minute) // one heartbeat pass, the first: reads in full |
| + beat(alertT0.Add(4 * time.Minute)) |
| + wire.reset() |
| + ef.passesTo(t, 5*time.Minute, 9*time.Minute) // one heartbeat pass, steady |
| + wire.mu.Lock() |
| + gets, conditional, lists := wire.gets, wire.conditional, wire.lists |
| + wire.mu.Unlock() |
| + want := map[string]int{"fleets/demo/status/boxes/box-1.json": 1, "fleets/demo/status/boxes/box-2.json": 1, |
| + "fleets/demo/status/boxes/box-3.json": 1} |
| + if !maps.Equal(gets, want) || !maps.Equal(conditional, want) || !slices.Equal(lists, []string{"fleets/demo/status/boxes/"}) { |
| + t.Fatalf("steady heartbeat pass: GETs %v, conditional %v, LISTs %v; want one LIST of the fleet and one conditional GET per report", gets, conditional, lists) |
| + } |
| + if n := ef.count(t, `SELECT COUNT(*) FROM alert_incidents WHERE closed_at IS NULL AND rule = 'demo_sandbox'`); n != 0 { |
| + t.Fatalf("%d demo_sandbox incidents open with every box as intended", n) |
| + } |
| + if m := members("mailer_unarmed"); !strings.Contains(m, "fleets/demo/box-1") || !strings.Contains(m, "fleets/demo/box-2") || strings.Contains(m, "box-3") { |
| + t.Fatalf("mailer_unarmed members %s; want the attached unarmed boxes", m) |
| + } |
| + |
| + // box-1's report cannot be read: one GET a heartbeat pass, and both |
| + // rules have it unknown. |
| + wire.mu.Lock() |
| + wire.fail = "fleets/demo/status/boxes/box-1.json" |
| + wire.mu.Unlock() |
| + beat(alertT0.Add(9 * time.Minute)) |
| + wire.reset() |
| + ef.passesTo(t, 10*time.Minute, 14*time.Minute) |
| + wire.mu.Lock() |
| + gets = wire.gets |
| + wire.mu.Unlock() |
| + if !maps.Equal(gets, want) { |
| + t.Fatalf("heartbeat pass with box-1 failing: GETs %v; want one GET per report", gets) |
| + } |
| + if m := members("demo_sandbox"); !strings.Contains(m, "fleets/demo/box-1") || strings.Contains(m, "box-2") || strings.Contains(m, "box-3") { |
| + t.Fatalf("demo_sandbox members %s; want box-1 alone", m) |
| + } |
| + if m := members("mailer_unarmed"); !strings.Contains(m, "fleets/demo/box-1") || !strings.Contains(m, "fleets/demo/box-2") { |
| + t.Fatalf("mailer_unarmed members %s; want box-1 kept, unknown, beside box-2", m) |
| + } |
| +} |
| + |
| +// TestEnginePassDemoSandboxEvictsUnderFailedListing (round 2, bounded |
| +// cache): the platform's status/boxes/ listing failing, so that the mailer |
| +// pass reads nothing, does not keep the demo fleet's cached reports past |
| +// the registry: box A cached, then replaced by box B, is forgotten, and B, |
| +// with no report, fires. |
| +func TestEnginePassDemoSandboxEvictsUnderFailedListing(t *testing.T) { |
| + ef, wire := demoSandboxEngine(t, "box-1") |
| + systemd := &status.ExecSandbox{Configured: "systemd", Effective: "systemd", Ready: true} |
| + body, err := json.Marshal(demoSandboxBox("box-1", alertT0, systemd)) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + keyA := "fleets/demo/status/boxes/box-1.json" |
| + putAlertBody(t, ef.rel, keyA, body) |
| + ef.passAt(t, 0) |
| + if _, ok := ef.srv.alertEngine.reads.cache[keyA]; !ok { |
| + t.Fatalf("box-1's report not cached after a heartbeat pass") |
| + } |
| + |
| + wire.mu.Lock() |
| + wire.failList = alertStatusBoxesPrefix |
| + wire.mu.Unlock() |
| + reg := openTestReg(t, ef.consoleFixture) |
| + if err := reg.SetFleetBoxStatus("demo", "box-1", "detached"); err != nil { |
| + t.Fatal(err) |
| + } |
| + if err := reg.AddFleetBox(registry.FleetBox{Fleet: "demo", Label: "box-2", TokenHash: strings.Repeat("b", 64), Status: "active", AddedAt: alertT0.UnixNano()}); err != nil { |
| + t.Fatal(err) |
| + } |
| + ef.passesTo(t, time.Minute, 5*time.Minute) |
| + if _, ok := ef.srv.alertEngine.reads.cache[keyA]; ok { |
| + t.Errorf("box-1's report still cached after it left the fleet, with the platform listing failing") |
| + } |
| + var members string |
| + if err := ef.st.db.QueryRow(`SELECT members FROM alert_incidents WHERE closed_at IS NULL AND rule = 'demo_sandbox'`).Scan(&members); err != nil { |
| + t.Fatal(err) |
| + } |
| + if !strings.Contains(members, "fleets/demo/box-2") || strings.Contains(members, "box-1") { |
| + t.Fatalf("members %s; want box-2, with no report, alone", members) |
| + } |
| +} |
diff --git a/internal/console/alertnotify.go b/internal/console/alertnotify.go| index 440ab0f93..85359abf2 100644 |
| --- a/internal/console/alertnotify.go |
| +++ b/internal/console/alertnotify.go |
| @@ -257,6 +257,14 @@ var alertCopy = map[string]string{ |
| "rule.mailer_unarmed.how_long": "That app's mail fails on this server until its mailer works.", |
| "rule.mailer_unarmed.what_to_do": "Check the server's mailer: its key file, its regions and its log. The mailer runbook's arming step says how.", |
| + // Approved by Paul's copy review 2026-11-28 (gVisor flagship plan, slice 2.3). So is |
| + // rules.when.demo_sandbox in alertpages.go. |
| + "rule.demo_sandbox.title": "Demo sandbox mismatch", |
| + "rule.demo_sandbox.what": "%s can't confirm it runs demos in the intended sandbox. It runs another one, its sandbox is unset or blocked, or its report is missing or out of date.", |
| + "rule.demo_sandbox.what.none": "A demo box can't confirm it runs demos in the intended sandbox. It runs another one, its sandbox is unset or blocked, or its report is missing or out of date.", |
| + "rule.demo_sandbox.how_long": "Until it is fixed, that box may run demos outside the intended sandbox, or run none.", |
| + "rule.demo_sandbox.what_to_do": "Read the box's exec-sandbox line in carlos status --layout. Set CARLOS_EXEC_SANDBOX in its host.env to match, or change the intent with carlos system demos sandbox-intent.", |
| + |
| "rule.seal_key.title": "Connector key", |
| "rule.seal_key.what": "Slack and webhook connectors cannot send because the %s cannot open the key that protects their addresses.", |
| "rule.seal_key.what.none": "Slack and webhook connectors cannot send because the key that protects their addresses cannot be opened.", |
diff --git a/internal/console/alertpages.go b/internal/console/alertpages.go| index 8ed9eea3d..b55ef7d12 100644 |
| --- a/internal/console/alertpages.go |
| +++ b/internal/console/alertpages.go |
| @@ -109,6 +109,7 @@ var alertPageCopy = map[string]string{ |
| "rules.when.alert_delivery_broken": "A box has no place to send its own alerts.", |
| "rules.when.seal_key": "The console cannot open the key for Slack and webhook connectors, or a connector needs its URL entered again.", |
| "rules.when.mailer_unarmed": "A server hosts an app switched to mail submission and its mailer isn't working.", |
| + "rules.when.demo_sandbox": "A demo box runs a sandbox other than the intended one, or can't confirm which it runs.", |
| "rules.th.disk": "Default: 90 percent. Each box can set CARLOS_ALERT_DISK_PCT in its host.env.", |
| "rules.th.mem": "Default: 90 percent. Each box can set CARLOS_ALERT_MEM_PCT in its host.env.", |
| "rules.th.cpu": "Default: 95 percent. Each box can set CARLOS_ALERT_CPU_PCT in its host.env.", |
| @@ -224,7 +225,7 @@ const ( |
| // (TestAlertRuleOrderCoversEveryRule). |
| var alertRuleOrder = []string{"disk_eta", "disk", "mem", "cpu", "lag", "geoip", "engine_silent", "restarts", |
| "verify_failed", "verify_unverified", "verify_coverage", |
| - "box_silent", "service_down", "cert_expiring", "alert_delivery_broken", "mailer_unarmed", "seal_key"} |
| + "box_silent", "service_down", "cert_expiring", "alert_delivery_broken", "mailer_unarmed", "demo_sandbox", "seal_key"} |
| // alertThresholdBounds are the editable thresholds' whole-number bounds: |
| // box_silent in minutes, cert_expiring in days (ruling R-29). |
diff --git a/internal/console/alertsignals.go b/internal/console/alertsignals.go| index 2395973be..bca6e7280 100644 |
| --- a/internal/console/alertsignals.go |
| +++ b/internal/console/alertsignals.go |
| @@ -77,6 +77,18 @@ type engineReads struct { |
| // object has no ETag to read it conditionally under, so it is not read |
| // again until engineAbsentRecheck has passed (mailer_unarmed). |
| senderAbsent map[string]time.Time |
| + // passReports is each box report read this heartbeat pass, by key, |
| + // failure included, so that the mailer pass and demo_sandbox, which can |
| + // both need a demo box's report, read it once a pass. nil between |
| + // passes. |
| + passReports map[string]boxRead |
| +} |
| + |
| +// boxRead is one box report's read: the report, or why it could not be |
| +// read. |
| +type boxRead struct { |
| + box status.Box |
| + err error |
| } |
| // get reads key, conditionally once it has been read before: an unchanged |
| @@ -135,6 +147,37 @@ func (r *engineReads) forget(prefix string, keys []string) { |
| } |
| } |
| +// boxReport reads one box report at key conditionally and decodes it, as |
| +// boxesUnder does each it lists: an object over the size cap or that does |
| +// not parse is an error. A missing object is an os.ErrNotExist error. In a |
| +// heartbeat pass a report is read once: a second call answers the first |
| +// call's outcome, error and all. |
| +func (r *engineReads) boxReport(ctx context.Context, store release.Store, key string) (status.Box, error) { |
| + if got, ok := r.passReports[key]; ok { |
| + return got.box, got.err |
| + } |
| + b, err := r.readBoxReport(ctx, store, key) |
| + if r.passReports != nil { |
| + r.passReports[key] = boxRead{box: b, err: err} |
| + } |
| + return b, err |
| +} |
| + |
| +func (r *engineReads) readBoxReport(ctx context.Context, store release.Store, key string) (status.Box, error) { |
| + var b status.Box |
| + body, _, err := r.get(ctx, store, key) |
| + if err != nil { |
| + return b, fmt.Errorf("read %s: %w", key, err) |
| + } |
| + if len(body) > engineBoxBodyBytes { |
| + return b, fmt.Errorf("%s: body %d bytes exceeds %d", key, len(body), engineBoxBodyBytes) |
| + } |
| + if err := json.Unmarshal(body, &b); err != nil { |
| + return b, fmt.Errorf("corrupt %s: %w", key, err) |
| + } |
| + return b, nil |
| +} |
| + |
| // boxes lists status/boxes/ and reads each object conditionally, decoding |
| // as status.LoadBoxes does: objects past the horizon are not listed, an |
| // object that cannot be read, is over the size cap or does not parse is |
| @@ -172,20 +215,9 @@ func (r *engineReads) boxesUnder(ctx context.Context, store release.Store, prefi |
| unread[label] = true |
| continue |
| } |
| - body, _, err := r.get(ctx, store, key) |
| + b, err := r.boxReport(ctx, store, key) |
| if err != nil { |
| - alertReadFailed(ctx, fmt.Errorf("read %s: %w", key, err)) |
| - unread[label] = true |
| - continue |
| - } |
| - var b status.Box |
| - if len(body) > engineBoxBodyBytes { |
| - alertReadFailed(ctx, fmt.Errorf("%s: body %d bytes exceeds %d", key, len(body), engineBoxBodyBytes)) |
| - unread[label] = true |
| - continue |
| - } |
| - if err := json.Unmarshal(body, &b); err != nil { |
| - alertReadFailed(ctx, fmt.Errorf("corrupt %s: %w", key, err)) |
| + alertReadFailed(ctx, err) |
| unread[label] = true |
| continue |
| } |
| @@ -383,21 +415,86 @@ func (s *Server) boxAlertSignals(ctx context.Context, sig *alertSignals) (boxAle |
| // heartbeatSignals reads the heartbeats and fleet.json, on every 5th pass, |
| // and adds box_silent, alert_delivery_broken, cert_expiring, mailer_unarmed |
| // and service_down. A source whose read fails is logged, fails the run and |
| -// adds nothing. |
| +// adds nothing. It adds demo_sandbox from the demo fleet's own reports, |
| +// where a failed read is not nothing but unknown (alertdemosandbox.go). |
| +// A box report both the mailer pass and demo_sandbox need is read once. |
| +// The cached fleets/ reads are forgotten once, at the end, by what each |
| +// fleet's readers knew of it (fleetKeep), so neither evicts the other's |
| +// and a failure reading one fleet keeps no other's. |
| func (s *Server) heartbeatSignals(ctx context.Context, settings map[string]alertRuleSetting, now time.Time, sig *alertSignals) { |
| r := &s.alertEngine.reads |
| + r.passReports = map[string]boxRead{} |
| + defer func() { r.passReports = nil }() |
| + var keep fleetKeep |
| if boxes, err := r.boxes(ctx, s.cfg.Releases, now); err != nil { |
| alertReadFailed(ctx, fmt.Errorf("list %s: %w", alertStatusBoxesPrefix, err)) |
| } else { |
| rows := s.activeStatusRows(ctx, boxes) |
| heartbeatBoxSignals(rows, r.unreadBoxes, settings, now, sig) |
| - s.mailerUnarmedPass(ctx, rows, now, sig) |
| + s.mailerUnarmedPass(ctx, rows, now, sig, &keep) |
| } |
| if f, err := r.fleet(ctx, s.cfg.Releases); err != nil { |
| alertReadFailed(ctx, fmt.Errorf("read %s: %w", alertFleetKey, err)) |
| } else { |
| serviceSignals(f, now, sig) |
| } |
| + s.demoSandboxPass(ctx, now, sig, &keep) |
| + r.forgetFleets(keep) |
| +} |
| + |
| +// fleetKeep is what one heartbeat pass's readers knew of each fleet's |
| +// cached box reports, for the forget at its end. keys is, for each |
| +// fleets/<name>/status/boxes/ prefix some reader read the membership of |
| +// (the bucket's listing, or the registry's boxes), the report keys to |
| +// keep: every such reader's. held is each prefix a reader needed and could |
| +// not read the membership of. listed is whether the mailer pass listed |
| +// the fleets, so that a prefix no reader needed is a fleet none reads. |
| +type fleetKeep struct { |
| + keys map[string][]string |
| + held map[string]bool |
| + listed bool |
| +} |
| + |
| +// read records that prefix's membership was read, keys its reports. |
| +func (k *fleetKeep) read(prefix string, keys []string) { |
| + if k.keys == nil { |
| + k.keys = map[string][]string{} |
| + } |
| + k.keys[prefix] = append(k.keys[prefix], keys...) |
| +} |
| + |
| +// hold records that prefix was needed and its membership not read. |
| +func (k *fleetKeep) hold(prefix string) { |
| + if k.held == nil { |
| + k.held = map[string]bool{} |
| + } |
| + k.held[prefix] = true |
| +} |
| + |
| +// forgetFleets drops the cached fleets/ reads k does not keep: under a |
| +// prefix whose membership was read, every key no reader kept, whatever |
| +// another reader of it failed to read; under a prefix only held, none; |
| +// under a prefix no reader needed, all, once the fleets were listed. |
| +func (r *engineReads) forgetFleets(k fleetKeep) { |
| + for key := range r.cache { |
| + if !strings.HasPrefix(key, "fleets/") { |
| + continue |
| + } |
| + var prefix string |
| + if name, _, ok := strings.Cut(strings.TrimPrefix(key, "fleets/"), "/"+alertStatusBoxesPrefix); ok { |
| + prefix = "fleets/" + name + "/" + alertStatusBoxesPrefix |
| + } |
| + keys, known := k.keys[prefix] |
| + switch { |
| + case known: |
| + if !slices.Contains(keys, key) { |
| + delete(r.cache, key) |
| + } |
| + case k.held[prefix]: |
| + case k.listed: |
| + delete(r.cache, key) |
| + } |
| + } |
| } |
| // alertReadFailed logs one source's failed read and fails the run, unless |
| @@ -459,8 +556,10 @@ func heartbeatBoxSignals(boxes []status.Box, unread map[string]bool, settings ma |
| // is clear without a read. A fleet's boxes are read only while its account |
| // has a switched app, or the switched set is partial; they are labelled |
| // fleets/<name>/<label>. A registry that cannot be listed is logged, fails |
| -// the run, and keeps every open fleet box's incident as it is. |
| -func (s *Server) mailerUnarmedPass(ctx context.Context, rows []status.Box, now time.Time, sig *alertSignals) { |
| +// the run, and keeps every open fleet box's incident as it is. It records |
| +// in keep, for heartbeatSignals' forget, each fleet's report keys it |
| +// listed, each fleet it could not list, and whether it listed the fleets. |
| +func (s *Server) mailerUnarmedPass(ctx context.Context, rows []status.Box, now time.Time, sig *alertSignals, keep *fleetKeep) { |
| r := &s.alertEngine.reads |
| unread := maps.Clone(r.unreadBoxes) |
| if unread == nil { |
| @@ -482,6 +581,7 @@ func (s *Server) mailerUnarmedPass(ctx context.Context, rows []status.Box, now t |
| fleetsRead = false |
| } |
| } |
| + keep.listed = fleetsRead |
| var switched map[string]string |
| partial := false |
| if len(fleets) > 0 || slices.ContainsFunc(rows, func(b status.Box) bool { return mailerCouldFire(b, now) }) { |
| @@ -492,19 +592,19 @@ func (s *Server) mailerUnarmedPass(ctx context.Context, rows []status.Box, now t |
| accts[acct] = true |
| } |
| boxes, owner := slices.Clone(rows), map[string]string{} |
| - var fleetKeys []string |
| for _, f := range fleets { |
| if !partial && !accts[f.Account] { |
| continue |
| } |
| prefix := "fleets/" + f.Name + "/" + alertStatusBoxesPrefix |
| fb, keys, _, funread, err := r.boxesUnder(ctx, s.cfg.Releases, prefix, now) |
| - fleetKeys = append(fleetKeys, keys...) |
| if err != nil { |
| alertReadFailed(ctx, fmt.Errorf("list %s: %w", prefix, err)) |
| + keep.hold(prefix) |
| fleetsRead = false |
| continue |
| } |
| + keep.read(prefix, keys) |
| // A box the registry holds detached is no longer the fleet's: its |
| // report is neither signalled nor unknown, whatever it says. |
| detached, err := detachedFleetBoxes(ctx, reg, f.Name) |
| @@ -526,9 +626,6 @@ func (s *Server) mailerUnarmedPass(ctx context.Context, rows []status.Box, now t |
| unread["fleets/"+f.Name+"/"+label] = true |
| } |
| } |
| - if fleetsRead { |
| - r.forget("fleets/", fleetKeys) |
| - } |
| mailerUnarmedSignals(boxes, owner, switched, partial, unread, now, sig) |
| if !fleetsRead { |
| sig.keepMissing["mailer_unarmed"] = true |
| @@ -757,6 +854,7 @@ var alertRuleLevels = map[string]string{ |
| "alert_delivery_broken": alerting.LevelWarning, |
| "seal_key": alerting.LevelIncident, |
| "mailer_unarmed": alerting.LevelWarning, |
| + demoSandboxRule: demoSandboxLevel, |
| } |
| // alertRuleKind is a rule's kind: the rule itself, or for a per-subject |
| @@ -773,7 +871,7 @@ func alertRuleKind(rule string) string { |
| // rule is a box rule, read from the box's alert object. |
| var alertConsoleRules = map[string]bool{ |
| "box_silent": true, "service_down": true, "cert_expiring": true, "alert_delivery_broken": true, "seal_key": true, |
| - "mailer_unarmed": true, |
| + "mailer_unarmed": true, demoSandboxRule: true, |
| } |
| // alertRuleLevel is rule's level; a rule this console has not been taught |
diff --git a/internal/console/apidemooperator.go b/internal/console/apidemooperator.go| index 97d705628..f745baed0 100644 |
| --- a/internal/console/apidemooperator.go |
| +++ b/internal/console/apidemooperator.go |
| @@ -145,7 +145,7 @@ func demoOperatorPath(path string) bool { |
| return true |
| } |
| switch path { |
| - case "/api/cli/system/demos", "/api/cli/system/demos/serving", "/api/cli/system/demos/takedown": |
| + case "/api/cli/system/demos", "/api/cli/system/demos/serving", "/api/cli/system/demos/takedown", "/api/cli/system/demos/sandbox-intent": |
| return true |
| } |
| return false |
diff --git a/internal/console/authcli.go b/internal/console/authcli.go| index fa87a39a8..3354101d6 100644 |
| --- a/internal/console/authcli.go |
| +++ b/internal/console/authcli.go |
| @@ -1294,7 +1294,9 @@ func (s *Server) handleCLIApprove(w http.ResponseWriter, r *http.Request) { |
| p.LinkHome, p.LinkAccount = req.LinkName, acct.Name |
| } |
| default: |
| - err = s.store.ApproveCLIAuth(code, addr, now) |
| + // The token carries the gesture this approval's step-up |
| + // verified, for the one door that asks (demo_sandbox_intent.go). |
| + err = s.store.ApproveCLIAuthGesture(r.Context(), code, addr, s.store.cliApprovalGesture(r.Context(), raw, addr, now), now) |
| } |
| if err != nil { |
| s.cliBudgetSpend(s.cli.guessAddr, s.cli.guessIP, addr, ip, now) |
diff --git a/internal/console/authstore.go b/internal/console/authstore.go| index 64939c680..53d619f6d 100644 |
| --- a/internal/console/authstore.go |
| +++ b/internal/console/authstore.go |
| @@ -292,6 +292,12 @@ func (s *Store) migrateCLIAuth() error { |
| `ALTER TABLE cli_auth_requests ADD COLUMN purpose TEXT NOT NULL DEFAULT ''`, |
| `ALTER TABLE cli_auth_requests ADD COLUMN link_name TEXT NOT NULL DEFAULT ''`, |
| `ALTER TABLE cli_auth_requests ADD COLUMN account_id INTEGER NOT NULL DEFAULT 0`, |
| + // gesture_at is the Unix time of the authentication gesture a |
| + // person's login was approved under (ApproveCLIAuthGesture), and on |
| + // the token collected for it; 0 is none. Only the demo |
| + // sandbox-intent door reads it (demoSandboxGestureFresh). |
| + `ALTER TABLE cli_auth_requests ADD COLUMN gesture_at INTEGER NOT NULL DEFAULT 0`, |
| + `ALTER TABLE cli_tokens ADD COLUMN gesture_at INTEGER NOT NULL DEFAULT 0`, |
| } { |
| if _, err := s.db.Exec(stmt); err != nil && !strings.Contains(err.Error(), "duplicate column") { |
| return err |
| @@ -592,12 +598,45 @@ func (s *Store) cliAuthPurpose(userCode string) string { |
| // person's login only: a link request is approved by ApproveLinkAuth, with |
| // an account, and is "no such code" here. |
| func (s *Store) ApproveCLIAuth(userCode, address string, now time.Time) error { |
| - res, err := s.db.Exec(`UPDATE cli_auth_requests SET state = ?, address = ? |
| + return s.ApproveCLIAuthGesture(context.Background(), userCode, address, time.Time{}, now) |
| +} |
| + |
| +// ApproveCLIAuthGesture is ApproveCLIAuth that also records gesture, the |
| +// time of the authentication gesture the approval's step-up verified |
| +// (cliApprovalGesture), on the request. PollCLIAuth copies it onto the |
| +// token it mints, so the token carries the gesture it was approved under |
| +// (gesture_at). A zero gesture records none, and the token then proves no |
| +// gesture. |
| +func (s *Store) ApproveCLIAuthGesture(ctx context.Context, userCode, address string, gesture, now time.Time) error { |
| + var at int64 |
| + if !gesture.IsZero() { |
| + at = gesture.Unix() |
| + } |
| + res, err := s.db.ExecContext(ctx, `UPDATE cli_auth_requests SET state = ?, address = ?, gesture_at = ? |
| WHERE user_code = ? AND state = ? AND expires_at >= ? AND purpose = ''`, |
| - CLIAuthApproved, address, NormalizeUserCode(userCode), CLIAuthPending, now.Unix()) |
| + CLIAuthApproved, address, at, NormalizeUserCode(userCode), CLIAuthPending, now.Unix()) |
| return decidedOne(res, err) |
| } |
| +// cliApprovalGesture is when the person at rawSession made the |
| +// authentication gesture requireFreshAuth has just accepted for address: |
| +// the step-up's auth_time, read back, if it is still inside StepUpWindow |
| +// of now. Zero otherwise (no row, another address, too old), which an |
| +// approval records as no gesture. |
| +func (s *Store) cliApprovalGesture(ctx context.Context, rawSession, address string, now time.Time) time.Time { |
| + var authTime int64 |
| + err := s.db.QueryRowContext(ctx, `SELECT auth_time FROM step_ups WHERE session_hash = ? AND address = ?`, |
| + hashToken(rawSession), address).Scan(&authTime) |
| + if err != nil || authTime == 0 { |
| + return time.Time{} |
| + } |
| + at := time.Unix(authTime, 0) |
| + if age := now.Sub(at); age < -stepUpSkew || age > StepUpWindow { |
| + return time.Time{} |
| + } |
| + return at |
| +} |
| + |
| // ApproveLinkAuth records that address approved a LINK request for the |
| // account accountID. The caller has checked that address may create apps in |
| // that account (linkableAccounts); PollCLIAuth checks it again when it |
| @@ -686,10 +725,10 @@ func (s *Store) pollCLIAuth(deviceCode string, now time.Time) (cliPollResult, er |
| defer tx.Rollback() |
| hash := hashToken(deviceCode) |
| var storedHash, state, address, label, remote, purpose, linkName string |
| - var expires, accountID int64 |
| - err = tx.QueryRow(`SELECT code_hash, state, address, label, remote_addr, expires_at, purpose, link_name, account_id |
| + var expires, accountID, gestureAt int64 |
| + err = tx.QueryRow(`SELECT code_hash, state, address, label, remote_addr, expires_at, purpose, link_name, account_id, gesture_at |
| FROM cli_auth_requests WHERE code_hash = ?`, hash). |
| - Scan(&storedHash, &state, &address, &label, &remote, &expires, &purpose, &linkName, &accountID) |
| + Scan(&storedHash, &state, &address, &label, &remote, &expires, &purpose, &linkName, &accountID, &gestureAt) |
| if err == sql.ErrNoRows { |
| return cliPollResult{Status: CLIAuthUnknown}, nil |
| } |
| @@ -721,9 +760,9 @@ FROM cli_auth_requests WHERE code_hash = ?`, hash). |
| switch purpose { |
| case "": |
| if _, err := tx.Exec(`INSERT INTO cli_tokens |
| -(token_hash, address, label, remote_addr, created_at, expires_at) |
| -VALUES (?, ?, ?, ?, ?, ?)`, |
| - hashToken(raw), address, label, remote, now.Unix(), now.Add(CLITokenTTL).Unix()); err != nil { |
| +(token_hash, address, label, remote_addr, created_at, expires_at, gesture_at) |
| +VALUES (?, ?, ?, ?, ?, ?, ?)`, |
| + hashToken(raw), address, label, remote, now.Unix(), now.Add(CLITokenTTL).Unix(), gestureAt); err != nil { |
| return cliPollResult{}, err |
| } |
| case cliPurposeLink: |
diff --git a/internal/console/demo_sandbox_intent.go b/internal/console/demo_sandbox_intent.go| new file mode 100644 |
| index 000000000..6f2f4bc8b |
| --- /dev/null |
| +++ b/internal/console/demo_sandbox_intent.go |
| @@ -0,0 +1,132 @@ |
| +package console |
| + |
| +// The demo boxes' sandbox intent (gVisor flagship plan, slice 2.3): the |
| +// sandbox the operator means every demo box to run, systemd or gvisor. The |
| +// demo_sandbox alert (alertdemosandbox.go) fires when a box's effective |
| +// sandbox differs. The intent changes only through the ops owner's CLI |
| +// door below, never with a box's own setting: a box says what it runs, |
| +// and this says what it should. systemd until slice 4's flip sets gvisor; |
| +// a deliberate rollback sets it back. |
| + |
| +import ( |
| + "context" |
| + "errors" |
| + "log" |
| + "net/http" |
| + "time" |
| + |
| + "github.com/carlosframework/platform/internal/demo" |
| +) |
| + |
| +// demoSandboxCopy is the door's words. |
| +var demoSandboxCopy = map[string]string{ |
| + "stepup": "Changing the demo sandbox needs a sign-in from the last 5 minutes. Run carlos auth login, approve it, then run this again straight away.", |
| +} |
| + |
| +// migrateDemoSandboxIntent adds sandbox_intent to demo_settings, systemd |
| +// for every database made before it. |
| +func (s *Store) migrateDemoSandboxIntent() error { |
| + ctx := context.Background() // a migration at Open, before any request |
| + var n int |
| + if err := s.db.QueryRowContext(ctx, `SELECT count(*) FROM pragma_table_info('demo_settings') WHERE name='sandbox_intent'`).Scan(&n); err != nil || n > 0 { |
| + return err |
| + } |
| + _, err := s.db.ExecContext(ctx, `ALTER TABLE demo_settings ADD COLUMN sandbox_intent TEXT NOT NULL DEFAULT 'systemd' CHECK(sandbox_intent IN ('systemd','gvisor'))`) |
| + return err |
| +} |
| + |
| +// DemoSandboxIntent is the sandbox the demo boxes should run. |
| +func (s *Store) DemoSandboxIntent(ctx context.Context) (string, error) { |
| + var intent string |
| + err := s.db.QueryRowContext(ctx, `SELECT sandbox_intent FROM demo_settings WHERE id=1`).Scan(&intent) |
| + return intent, err |
| +} |
| + |
| +// SetDemoSandboxIntent records intent, systemd or gvisor, under the demo |
| +// writer lock, and actor's audit row for it in the same transaction: an |
| +// audit row that cannot be written leaves the intent as it was. |
| +func (s *Store) SetDemoSandboxIntent(ctx context.Context, intent, actor string, now time.Time) error { |
| + if intent != "systemd" && intent != "gvisor" { |
| + return demo.ErrConfig |
| + } |
| + tx, err := s.demoTx(ctx) |
| + if err != nil { |
| + return err |
| + } |
| + defer tx.Rollback() |
| + res, err := tx.ExecContext(ctx, `UPDATE demo_settings SET sandbox_intent=? WHERE id=1`, intent) |
| + if err != nil { |
| + return err |
| + } |
| + if n, err := res.RowsAffected(); err != nil || n != 1 { |
| + return errors.Join(demo.ErrConfig, err) |
| + } |
| + // The row auditSystem writes (RecordEvent), inside this transaction. |
| + if _, err := tx.ExecContext(ctx, `INSERT INTO audit |
| + (account_id, app, address, action, target_type, target, message, detail, created_at) |
| +VALUES (?, 'platform', ?, 'demo-sandbox-intent', '', '', '', ?, ?)`, OpsAccountID, actor, intent, now.Unix()); err != nil { |
| + return err |
| + } |
| + return tx.Commit() |
| +} |
| + |
| +// demoSandboxGestureFresh is whether raw is a person's CLI token whose |
| +// approval verified an authentication gesture within window of now. The |
| +// gesture's time is the step-up's auth_time at the `carlos auth login` |
| +// approval (requireFreshAuth), carried on the request into the token |
| +// collected for it (gesture_at); a token without it fails. |
| +// |
| +// It is this door's alone and is not a general step-up: it measures a |
| +// person's presence at a login approval, not consent to this action, and |
| +// any holder of the token inside the window passes it. It must not gate |
| +// doors that move data, money or access; those take requireFreshAuth. |
| +func (s *Store) demoSandboxGestureFresh(ctx context.Context, raw string, now time.Time, window time.Duration) bool { |
| + if raw == "" { |
| + return false |
| + } |
| + var gesture int64 |
| + var kind string |
| + err := s.db.QueryRowContext(ctx, `SELECT gesture_at, kind FROM cli_tokens WHERE token_hash=? AND revoked_at=0`, hashToken(raw)).Scan(&gesture, &kind) |
| + if err != nil || kind != cliKindUser || gesture == 0 { |
| + return false |
| + } |
| + age := now.Sub(time.Unix(gesture, 0)) |
| + return age >= -stepUpSkew && age <= window |
| +} |
| + |
| +// handleAPIDemosSandboxIntent is PUT /api/cli/system/demos/sandbox-intent |
| +// (`carlos system demos sandbox-intent gvisor|systemd`). The gates in |
| +// order: a person; an ops account owner, where everyone else, listed |
| +// system operators included, gets the demo doors' 404; a demo console; |
| +// the body; then a fresh sign-in, last. The change and its audit row are |
| +// one write. |
| +func (s *Server) handleAPIDemosSandboxIntent(w http.ResponseWriter, r *http.Request) { |
| + actor, owner, ok := s.apiSystemRoller(w, r) |
| + if !ok { |
| + return |
| + } |
| + if !owner || s.cfg.HostClaim || !s.cfg.Demo.BoxMode() { |
| + http.NotFound(w, r) |
| + return |
| + } |
| + var in struct { |
| + Intent string `json:"intent"` |
| + } |
| + if !decodeDemoOperator(r, &in) || in.Intent != "systemd" && in.Intent != "gvisor" { |
| + http.NotFound(w, r) |
| + return |
| + } |
| + now := s.now() // the operator doors' clock (opboxes.go) |
| + if !s.store.demoSandboxGestureFresh(r.Context(), bearer(r), now, StepUpWindow) { |
| + jsonError(w, http.StatusForbidden, demoSandboxCopy["stepup"]) |
| + return |
| + } |
| + if err := s.store.SetDemoSandboxIntent(r.Context(), in.Intent, actor, now); err != nil { |
| + log.Printf("console: demo sandbox intent: %v", err) |
| + jsonError(w, http.StatusServiceUnavailable, demoCopy["DEMO-BUILD"]) |
| + return |
| + } |
| + writeJSON(w, http.StatusOK, struct { |
| + Intent string `json:"intent"` |
| + }{in.Intent}) |
| +} |
diff --git a/internal/console/demo_sandbox_intent_test.go b/internal/console/demo_sandbox_intent_test.go| new file mode 100644 |
| index 000000000..4fff9805c |
| --- /dev/null |
| +++ b/internal/console/demo_sandbox_intent_test.go |
| @@ -0,0 +1,292 @@ |
| +package console |
| + |
| +import ( |
| + "context" |
| + "database/sql" |
| + "encoding/json" |
| + "net/http" |
| + "net/http/httptest" |
| + "net/url" |
| + "path/filepath" |
| + "testing" |
| + "time" |
| + |
| + "github.com/carlosframework/platform/internal/svcrole" |
| +) |
| + |
| +// TestDemoSandboxIntentMigration (gVisor flagship plan, slice 2.3): the |
| +// demo settings row carries the boxes' sandbox intent. A new database and |
| +// one from before the column both read systemd, reopening keeps a set |
| +// value, and nothing but systemd or gvisor can be stored. |
| +func TestDemoSandboxIntentMigration(t *testing.T) { |
| + ctx := context.Background() |
| + st, path := demoTestStore(t) |
| + if got, err := st.DemoSandboxIntent(ctx); err != nil || got != "systemd" { |
| + t.Fatalf("new database: %q %v; want systemd", got, err) |
| + } |
| + if err := st.SetDemoSandboxIntent(ctx, "gvisor", "owner@example.com", time.Now()); err != nil { |
| + t.Fatal(err) |
| + } |
| + again, err := Open(path) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + defer again.Close() |
| + if got, err := again.DemoSandboxIntent(ctx); err != nil || got != "gvisor" { |
| + t.Fatalf("reopened: %q %v; want gvisor", got, err) |
| + } |
| + for _, bad := range []string{"", "auto", "GVISOR", "runsc"} { |
| + if err := st.SetDemoSandboxIntent(ctx, bad, "owner@example.com", time.Now()); err == nil { |
| + t.Fatalf("stored %q", bad) |
| + } |
| + if _, err := st.db.ExecContext(ctx, `UPDATE demo_settings SET sandbox_intent=? WHERE id=1`, bad); err == nil { |
| + t.Fatalf("the column took %q", bad) |
| + } |
| + } |
| + |
| + // A database from before the column: the settings table as it was, |
| + // with its salt row, then opened by this console. |
| + old := filepath.Join(t.TempDir(), "old.db") |
| + db, err := sql.Open("sqlite", old) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + if _, err := db.ExecContext(ctx, `CREATE TABLE demo_settings (id INTEGER PRIMARY KEY CHECK(id=1), ip_salt BLOB NOT NULL CHECK(length(ip_salt)=32)); |
| +INSERT INTO demo_settings(id,ip_salt) VALUES(1,zeroblob(32));`); err != nil { |
| + t.Fatal(err) |
| + } |
| + db.Close() |
| + migrated, err := Open(old) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + defer migrated.Close() |
| + if got, err := migrated.DemoSandboxIntent(ctx); err != nil || got != "systemd" { |
| + t.Fatalf("migrated: %q %v; want systemd", got, err) |
| + } |
| +} |
| + |
| +// TestDemoSandboxIntentDoor: PUT /api/cli/system/demos/sandbox-intent sets |
| +// the intent for an ops account owner whose CLI sign-in is fresh, and |
| +// audits it. A listed system operator, a member, a service or app |
| +// credential gets the operator doors' 404; a stale sign-in gets the |
| +// step-up refusal and changes nothing; a value other than gvisor or |
| +// systemd is refused. |
| +func TestDemoSandboxIntentDoor(t *testing.T) { |
| + fx := newConsoleFixture(t) |
| + unsigned := httptest.NewRecorder() |
| + fx.srv.cliNotSignedIn(unsigned) |
| + fx.srv.cfg.Demo = demoTestConfig(t) |
| + fx.srv.cfg.SystemOperators = []string{"operator@example.com"} |
| + owner := cliToken(t, fx, "owner@example.com", "intent-owner") |
| + if err := fx.st.AddMember(OpsAccountID, "owner@example.com", RoleOwner, time.Now()); err != nil { |
| + t.Fatal(err) |
| + } |
| + listed := cliToken(t, fx, "operator@example.com", "intent-listed") |
| + member := cliToken(t, fx, "member@example.com", "intent-member") |
| + if err := fx.st.AddMember(OpsAccountID, "member@example.com", RoleMember, time.Now()); err != nil { |
| + t.Fatal(err) |
| + } |
| + svc := serviceToken(t, fx.st, OpsAccountID, "intent-admin", "shop", svcrole.Admin) |
| + app, err := fx.st.NewAppToken(OpsAccountID, "shop", "owner@example.com", "intent-app", time.Now()) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + const path = "/api/cli/system/demos/sandbox-intent" |
| + intent := func() string { |
| + t.Helper() |
| + got, err := fx.st.DemoSandboxIntent(context.Background()) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + return got |
| + } |
| + |
| + for _, token := range []string{listed, member, svc, app, "forged", ""} { |
| + st, _, body := rawReq(t, "PUT", fx.ts.URL+path, token, `{"intent":"gvisor"}`) |
| + wantStatus, want := http.StatusNotFound, "404 page not found\n" |
| + if token == "" || token == "forged" { |
| + wantStatus, want = unsigned.Code, unsigned.Body.String() |
| + } |
| + if st != wantStatus || body != want { |
| + t.Fatalf("authority: %d %q want %d %q", st, body, wantStatus, want) |
| + } |
| + } |
| + for _, body := range []string{`{"intent":"auto"}`, `{"intent":""}`, `{}`, `{"intent":"gvisor","extra":1}`} { |
| + if st, _, out := rawReq(t, "PUT", fx.ts.URL+path, owner, body); st != http.StatusNotFound { |
| + t.Fatalf("body %s: %d %s", body, st, out) |
| + } |
| + } |
| + if intent() != "systemd" { |
| + t.Fatal("a refused request changed the intent") |
| + } |
| + |
| + st, _, out := rawReq(t, "PUT", fx.ts.URL+path, owner, `{"intent":"gvisor"}`) |
| + var set struct { |
| + Intent string `json:"intent"` |
| + } |
| + if st != http.StatusOK || json.Unmarshal([]byte(out), &set) != nil || set.Intent != "gvisor" || intent() != "gvisor" { |
| + t.Fatalf("owner, fresh: %d %s; intent %s", st, out, intent()) |
| + } |
| + events, err := fx.st.Events(OpsAccountID, "platform", 10) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + audited := false |
| + for _, e := range events { |
| + audited = audited || e.Action == "demo-sandbox-intent" && e.Detail == "gvisor" && e.Address == "owner@example.com" |
| + } |
| + if !audited { |
| + t.Fatalf("no audit row for the change: %+v", events) |
| + } |
| + |
| + // The same owner's sign-in, its gesture no longer fresh: refused after |
| + // the owner check, with nothing changed. |
| + fx.srv.opNow = func() time.Time { return time.Now().Add(StepUpWindow + time.Minute) } |
| + st, _, out = rawReq(t, "PUT", fx.ts.URL+path, owner, `{"intent":"systemd"}`) |
| + fx.srv.opNow = nil |
| + if st != http.StatusForbidden || jsonErrorText(t, out) != demoSandboxCopy["stepup"] || intent() != "gvisor" { |
| + t.Fatalf("owner, stale: %d %s; intent %s", st, out, intent()) |
| + } |
| + |
| + // Off a demo console the door is not there. |
| + fx.srv.cfg.Demo.Fleet, fx.srv.cfg.Demo.Account, fx.srv.cfg.Demo.Domain = "", "", "" |
| + if st, _, out := rawReq(t, "PUT", fx.ts.URL+path, owner, `{"intent":"systemd"}`); st != http.StatusNotFound { |
| + t.Fatalf("no demo fleet: %d %s", st, out) |
| + } |
| +} |
| + |
| +// intentOwnerFixture is a demo console whose ops owner signs in at the |
| +// browser, with the door's PUT and the intent's read. |
| +func intentOwnerFixture(t *testing.T) (fx *consoleFixture, browser *http.Client, put func(token, intent string) (int, string), intent func() string) { |
| + t.Helper() |
| + fx = newConsoleFixture(t) |
| + fx.srv.cfg.Demo = demoTestConfig(t) |
| + if err := fx.st.AddMember(OpsAccountID, "owner@example.com", RoleOwner, time.Now()); err != nil { |
| + t.Fatal(err) |
| + } |
| + browser = newBrowser(t) |
| + fx.setUser("owner@example.com") |
| + signUp(t, fx, browser, "intent-gesture") |
| + put = func(token, intent string) (int, string) { |
| + t.Helper() |
| + st, _, out := rawReq(t, "PUT", fx.ts.URL+"/api/cli/system/demos/sandbox-intent", token, `{"intent":"`+intent+`"}`) |
| + return st, out |
| + } |
| + intent = func() string { |
| + t.Helper() |
| + got, err := fx.st.DemoSandboxIntent(context.Background()) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + return got |
| + } |
| + return fx, browser, put, intent |
| +} |
| + |
| +// TestDemoSandboxIntentGestureClock (round 1, step-up): the door's |
| +// freshness is the authentication gesture's, carried from the approval |
| +// that verified it into the token collected for it, not the token's |
| +// collection. A gesture almost five minutes old at the approval gives a |
| +// token that works only until five minutes after the gesture, however |
| +// soon after collection it is used; a token collected late is as old as |
| +// its gesture. |
| +func TestDemoSandboxIntentGestureClock(t *testing.T) { |
| + fx, browser, put, intent := intentOwnerFixture(t) |
| + session := sessionToken(t, fx, browser) |
| + |
| + // Production wiring: the gesture recorded 4m50s ago, approved at the |
| + // browser (requireFreshAuth passes), collected by the CLI's poll. |
| + gesture := time.Now().Add(-(StepUpWindow - 10*time.Second)) |
| + if err := fx.st.RecordStepUp(session, "owner@example.com", gesture, time.Now()); err != nil { |
| + t.Fatal(err) |
| + } |
| + _, start := postJSON(t, fx.ts.URL+"/auth/cli/start", map[string]string{"label": "test@harness"}, "") |
| + userCode, deviceCode := str(t, start, "user_code"), str(t, start, "device_code") |
| + if code, _, body := postForm(t, browser, fx.ts.URL+"/auth/cli/approve", |
| + url.Values{"code": {userCode}, "action": {"approve"}, "csrf": {csrfToken(session)}}); code != http.StatusOK { |
| + t.Fatalf("approve = %d:\n%s", code, body) |
| + } |
| + _, poll := postJSON(t, fx.ts.URL+"/auth/cli/poll", map[string]string{"device_code": deviceCode}, "") |
| + token := str(t, poll, "token") |
| + var bound int64 |
| + if err := fx.st.db.QueryRow(`SELECT gesture_at FROM cli_tokens WHERE token_hash=?`, hashToken(token)).Scan(&bound); err != nil || bound != gesture.Unix() { |
| + t.Errorf("token's gesture %d %v; want the approval's %d", bound, err, gesture.Unix()) |
| + } |
| + |
| + // Fifteen seconds after collection, but 5m05s after the gesture. |
| + fx.srv.opNow = func() time.Time { return gesture.Add(StepUpWindow + 5*time.Second) } |
| + if st, out := put(token, "gvisor"); st != http.StatusForbidden || jsonErrorText(t, out) != demoSandboxCopy["stepup"] || intent() != "systemd" { |
| + t.Errorf("past the gesture's window: %d %s; intent %s", st, out, intent()) |
| + } |
| + // Inside the gesture's window it works. |
| + fx.srv.opNow = func() time.Time { return gesture.Add(StepUpWindow - 5*time.Second) } |
| + if st, out := put(token, "gvisor"); st != http.StatusOK || intent() != "gvisor" { |
| + t.Errorf("inside the gesture's window: %d %s; intent %s", st, out, intent()) |
| + } |
| + |
| + // Delayed collection: gesture at 0, approval at 4, collection at 9, |
| + // the call at 13. The token is four minutes old; its gesture thirteen. |
| + g0 := time.Now().Add(-time.Hour) |
| + userCode, deviceCode, err := fx.st.NewCLIAuth("late@harness", "", g0) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + if err := fx.st.ApproveCLIAuthGesture(context.Background(), userCode, "owner@example.com", g0, g0.Add(4*time.Minute)); err != nil { |
| + t.Fatal(err) |
| + } |
| + status, late, _, err := fx.st.PollCLIAuth(deviceCode, g0.Add(9*time.Minute)) |
| + if err != nil || status != CLIAuthApproved { |
| + t.Fatalf("collect: %s %v", status, err) |
| + } |
| + fx.srv.opNow = func() time.Time { return g0.Add(13 * time.Minute) } |
| + if st, out := put(late, "systemd"); st != http.StatusForbidden || jsonErrorText(t, out) != demoSandboxCopy["stepup"] || intent() != "gvisor" { |
| + t.Fatalf("delayed collection: %d %s; intent %s", st, out, intent()) |
| + } |
| +} |
| + |
| +// TestDemoSandboxIntentLegacyToken: a person's token with no gesture |
| +// bound to it (one collected before the column, or approved without a |
| +// verified gesture) fails closed, even the moment it is minted. |
| +func TestDemoSandboxIntentLegacyToken(t *testing.T) { |
| + fx, _, put, intent := intentOwnerFixture(t) |
| + now := time.Now() |
| + userCode, deviceCode, err := fx.st.NewCLIAuth("legacy@harness", "", now) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + if err := fx.st.ApproveCLIAuth(userCode, "owner@example.com", now); err != nil { |
| + t.Fatal(err) |
| + } |
| + status, legacy, _, err := fx.st.PollCLIAuth(deviceCode, now) |
| + if err != nil || status != CLIAuthApproved { |
| + t.Fatalf("collect: %s %v", status, err) |
| + } |
| + if st, out := put(legacy, "gvisor"); st != http.StatusForbidden || jsonErrorText(t, out) != demoSandboxCopy["stepup"] || intent() != "systemd" { |
| + t.Fatalf("legacy token: %d %s; intent %s", st, out, intent()) |
| + } |
| +} |
| + |
| +// TestDemoSandboxIntentAuditAtomic (round 1, audit): the intent and its |
| +// audit row are one write. An audit row that cannot be written leaves the |
| +// intent as it was and the caller refused. |
| +func TestDemoSandboxIntentAuditAtomic(t *testing.T) { |
| + fx := newConsoleFixture(t) |
| + fx.srv.cfg.Demo = demoTestConfig(t) |
| + if err := fx.st.AddMember(OpsAccountID, "owner@example.com", RoleOwner, time.Now()); err != nil { |
| + t.Fatal(err) |
| + } |
| + owner := cliToken(t, fx, "owner@example.com", "intent-audit") |
| + if _, err := fx.st.db.Exec(`CREATE TRIGGER audit_refuses BEFORE INSERT ON audit WHEN NEW.action = 'demo-sandbox-intent' |
| +BEGIN SELECT RAISE(ABORT, 'audit refused'); END`); err != nil { |
| + t.Fatal(err) |
| + } |
| + st, _, out := rawReq(t, "PUT", fx.ts.URL+"/api/cli/system/demos/sandbox-intent", owner, `{"intent":"gvisor"}`) |
| + got, err := fx.st.DemoSandboxIntent(context.Background()) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + if st != http.StatusServiceUnavailable || got != "systemd" { |
| + t.Fatalf("audit refused: %d %s; intent %s, want 503 and systemd", st, out, got) |
| + } |
| +} |
diff --git a/internal/console/demo_store.go b/internal/console/demo_store.go| index d5494ac12..ddf50d339 100644 |
| --- a/internal/console/demo_store.go |
| +++ b/internal/console/demo_store.go |
| @@ -91,6 +91,9 @@ CREATE TABLE IF NOT EXISTS demo_retirements(demo_id TEXT PRIMARY KEY, wire BLOB |
| if err != nil { |
| return err |
| } |
| + if err := s.migrateDemoSandboxIntent(); err != nil { |
| + return err |
| + } |
| if err := s.migrateDemoClaimCode(); err != nil { |
| return err |
| } |
diff --git a/internal/console/routedecls.go b/internal/console/routedecls.go| index a3926687f..24a447be9 100644 |
| --- a/internal/console/routedecls.go |
| +++ b/internal/console/routedecls.go |
| @@ -1319,6 +1319,9 @@ var routeDecls = []routeDecl{ |
| // console without host claims (gateNoHostClaim), which cannot run demos. |
| {Pattern: "GET /api/cli/system/demos", Kind: kindCLI, Gate: gateNoHostClaim, Allow: svcrole.Set{}, Handler: (*Server).handleAPIDemosStatus}, |
| {Pattern: "PUT /api/cli/system/demos/serving", Kind: kindCLI, Gate: gateNoHostClaim, Allow: svcrole.Set{}, Handler: (*Server).handleAPIDemosServing}, |
| + // The demo boxes' sandbox intent (demo_sandbox_intent.go): ops owners |
| + // only, from a fresh sign-in. |
| + {Pattern: "PUT /api/cli/system/demos/sandbox-intent", Kind: kindCLI, Gate: gateNoHostClaim, Allow: svcrole.Set{}, Handler: (*Server).handleAPIDemosSandboxIntent}, |
| {Pattern: "POST /api/cli/system/demos/takedown", Kind: kindCLI, Gate: gateNoHostClaim, Allow: svcrole.Set{}, Handler: (*Server).handleAPIDemosTakedown}, |
| {Pattern: "GET /api/cli/system/demos/takedown", Kind: kindCLI, Gate: gateNoHostClaim, Allow: svcrole.Set{}, Handler: (*Server).handleAPIDemosTakedownStatus}, |
diff --git a/internal/console/store_gate.go b/internal/console/store_gate.go| index ca10127d3..692484262 100644 |
| --- a/internal/console/store_gate.go |
| +++ b/internal/console/store_gate.go |
| @@ -231,7 +231,7 @@ var claimSQLTables = map[string]claimSQLTable{ |
| "demo_apps": {Account: "account_id", App: "app", Refuse: "anonymous demos require claims mode off"}, |
| "demo_admissions": {NonApp: "anonymous attempt budget, keyed by salted IP hash and time; names no app"}, |
| "demo_spent_tokens": {NonApp: "spent credential hashes, refusal reasons and retention times only; names no app and grants no authority"}, |
| - "demo_settings": {NonApp: "deployment salt for anonymous admission; names no app"}, |
| + "demo_settings": {NonApp: "deployment salt for anonymous admission and the demo boxes' sandbox intent; names no app"}, |
| "getting_started_marks": {NonApp: "personal onboarding checklist marks keyed by account and address; grants no app authority"}, |
| "app_stars": {NonApp: "personal bookmarks keyed by account, address and app lifetime; grants no app authority"}, |
| // ---- app-scoped: gated ---- |
diff --git a/internal/console/svcroutes_test.go b/internal/console/svcroutes_test.go| index 129d70cbb..7d7fbdc11 100644 |
| --- a/internal/console/svcroutes_test.go |
| +++ b/internal/console/svcroutes_test.go |
| @@ -474,6 +474,7 @@ var demoOperatorDoors = []string{ |
| "GET /api/cli/system/demos/takedown", |
| "GET /api/cli/system/demos/reports", |
| "POST /api/cli/system/demos/reports/{id}/resolve", |
| + "PUT /api/cli/system/demos/sandbox-intent", |
| } |
| // domainBuyDoors are closed doors (in closedDoors) that a host-claim console |
diff --git a/internal/demobuild/gvisor_test.go b/internal/demobuild/gvisor_test.go| index 1376e99bc..596eecfca 100644 |
| --- a/internal/demobuild/gvisor_test.go |
| +++ b/internal/demobuild/gvisor_test.go |
| @@ -229,7 +229,7 @@ func TestGVisorBuildUnitReadback(t *testing.T) { |
| if err != nil { |
| t.Fatal(err) |
| } |
| - start := "ExecStart=" + execsandbox.RunscPath(pin) + " --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/" + l.id + " " + l.id + "\n" |
| + start := "ExecStart=" + execsandbox.RunscPath(pin) + " --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/" + l.id + " " + l.id + "\n" |
| if !strings.Contains(drop, start) { |
| t.Fatalf("changed build recipe: %s", drop) |
| } |
| @@ -265,7 +265,7 @@ func TestGVisorBuildUnitReadback(t *testing.T) { |
| } |
| }) |
| } |
| - for _, change := range [][2]string{{"--overlay2=none", "--overlay2=root:memory"}, {"--network=none", "--network=host"}, {"--bundle ", "--bundle '/"}, {"StandardOutput=append:", "StandardOutput=truncate:"}, {"/diagnostics", "/elsewhere"}, {"ExecStop=\n", "ExecStop=/bin/true\n"}} { |
| + for _, change := range [][2]string{{"--overlay2=none", "--overlay2=root:memory"}, {"--network=none", "--network=host"}, {"--platform=systrap", "--platform=kvm"}, {" --platform=systrap", ""}, {"--directfs=true", "--directfs=false"}, {" --directfs=true", ""}, {"--bundle ", "--bundle '/"}, {"StandardOutput=append:", "StandardOutput=truncate:"}, {"/diagnostics", "/elsewhere"}, {"ExecStop=\n", "ExecStop=/bin/true\n"}} { |
| if gvisorBuildSource(strings.ReplaceAll(drop, change[0], change[1]), l) == nil { |
| t.Fatal("accepted source mutation", change) |
| } |
diff --git a/internal/execsandbox/command.go b/internal/execsandbox/command.go| index 4c9d8e7b3..69a5b0f19 100644 |
| --- a/internal/execsandbox/command.go |
| +++ b/internal/execsandbox/command.go |
| @@ -1,9 +1,19 @@ |
| package execsandbox |
| +// The platform and directfs flags are written out so that a lock bump to a |
| +// runsc release with other defaults cannot change them unseen (F7). Both are |
| +// the defaults of the pinned release-20261102.0 (`runsc flags`: platform |
| +// "systrap", directfs true). The directfs value is due its own decision |
| +// (gVisor flagship plan, slice 3 step 1); until then it stays the default. |
| +const ( |
| + RunscPlatform = "--platform=systrap" |
| + RunscDirectFS = "--directfs=true" |
| +) |
| + |
| func RunscRunArgs(pin RunscPin, id string) ([]string, error) { |
| runsc := RunscPath(pin) |
| if runsc == "" || !ValidID(id) { |
| return nil, ErrRunsc |
| } |
| - return []string{runsc, "--root=/run/carlos-runsc", "--ignore-cgroups", "--network=none", "--host-uds=create", "--overlay2=none", "run", "--bundle", BundleDir(id), id}, nil |
| + return []string{runsc, "--root=/run/carlos-runsc", "--ignore-cgroups", "--network=none", "--host-uds=create", "--overlay2=none", RunscPlatform, RunscDirectFS, "run", "--bundle", BundleDir(id), id}, nil |
| } |
diff --git a/internal/execsandbox/command_test.go b/internal/execsandbox/command_test.go| index fbfe795f6..d80f2064c 100644 |
| --- a/internal/execsandbox/command_test.go |
| +++ b/internal/execsandbox/command_test.go |
| @@ -12,7 +12,7 @@ func TestRunscRunArgs(t *testing.T) { |
| } |
| for _, id := range []string{"run-demo.example", "probe", "build-job-1"} { |
| got, err := RunscRunArgs(pin, id) |
| - want := []string{RunscPath(pin), "--root=/run/carlos-runsc", "--ignore-cgroups", "--network=none", "--host-uds=create", "--overlay2=none", "run", "--bundle", "/run/carlos-control/oci/" + id, id} |
| + want := []string{RunscPath(pin), "--root=/run/carlos-runsc", "--ignore-cgroups", "--network=none", "--host-uds=create", "--overlay2=none", "--platform=systrap", "--directfs=true", "run", "--bundle", "/run/carlos-control/oci/" + id, id} |
| if err != nil || !reflect.DeepEqual(got, want) { |
| t.Fatalf("%s: %q %v; want %q", id, got, err, want) |
| } |
diff --git a/internal/execsandbox/config.go b/internal/execsandbox/config.go| index cf0e25cf5..39140b4fe 100644 |
| --- a/internal/execsandbox/config.go |
| +++ b/internal/execsandbox/config.go |
| @@ -5,20 +5,16 @@ import ( |
| "github.com/carlosframework/platform/internal/hostwrite" |
| ) |
| -// ResolveFromEnv is the common mode decision for launch, install and recovery. |
| +// ResolveFromEnv is the common mode decision for launch, install and |
| +// recovery. It does not refuse an unset mode on a demo box: the floor and |
| +// the installer read unset and auto as systemd, and only admission |
| +// (Configure) refuses them. |
| func ResolveFromEnv(getenv func(string) string) (Configured, Effective, error) { |
| - return resolveFromEnv(getenv, AutoDemoGVisor) |
| -} |
| - |
| -// The explicit rollout argument lets tests exercise the future auto decision. |
| -func resolveFromEnv(getenv func(string) string, autoDemoGVisor bool) (Configured, Effective, error) { |
| configured, err := Parse(getenv) |
| if err != nil { |
| return configured, EffectiveGVisor, err |
| } |
| - cfg, demoErr := demo.BoxConfig(getenv) |
| - // Invalid demo configuration is not a request to raise the executable floor. |
| - return configured, resolve(configured, demoErr == nil && cfg.BoxMode(), autoDemoGVisor), nil |
| + return configured, Resolve(configured), nil |
| } |
| // Configure adds launch admission to the shared mode decision. |
| @@ -27,7 +23,8 @@ func Configure(getenv func(string) string) (Configured, Effective, error) { |
| if err != nil { |
| return configured, effective, err |
| } |
| - if _, err := demo.BoxConfig(getenv); err != nil { |
| + cfg, err := demo.BoxConfig(getenv) |
| + if err != nil { |
| return configured, effective, err |
| } |
| if effective == EffectiveGVisor && hostwrite.Enabled(getenv) { |
| @@ -36,5 +33,10 @@ func Configure(getenv func(string) string) (Configured, Effective, error) { |
| if effective == EffectiveGVisor && getenv("CARLOS_DEMO_BOX") != "1" { |
| return configured, effective, ErrUnsupported |
| } |
| + // A demo box states its sandbox: gvisor, or systemd as a visible |
| + // opt-out. Unset or auto admits no demo and no build (slice 2.1). |
| + if cfg.BoxMode() && configured == Auto { |
| + return configured, effective, ErrUnset |
| + } |
| return configured, effective, nil |
| } |
diff --git a/internal/execsandbox/config_fix1_test.go b/internal/execsandbox/config_fix1_test.go| index 8d7595803..8454c0cab 100644 |
| --- a/internal/execsandbox/config_fix1_test.go |
| +++ b/internal/execsandbox/config_fix1_test.go |
| @@ -1,25 +1,25 @@ |
| package execsandbox |
| -import "testing" |
| +import ( |
| + "errors" |
| + "testing" |
| +) |
| func TestExecSandboxSharedResolver(t *testing.T) { |
| env := map[string]string{"CARLOS_DEMO_BOX": "1", "CARLOS_DEMO_ACCOUNT": "demo", "CARLOS_DEMO_FLEET": "demo", "CARLOS_DEMO_DOMAIN": "demo.example", "CARLOS_EXEC_SANDBOX": "auto"} |
| get := func(k string) string { return env[k] } |
| - for _, on := range []bool{false, true} { |
| - _, got, err := resolveFromEnv(get, on) |
| - want := EffectiveSystemd |
| - if on { |
| - want = EffectiveGVisor |
| - } |
| - if got != want || err != nil { |
| - t.Fatalf("auto=%v: %s %v", on, got, err) |
| - } |
| + // auto never resolves to gvisor; on a demo box admission refuses it. |
| + if _, got, err := ResolveFromEnv(get); got != EffectiveSystemd || err != nil { |
| + t.Fatalf("auto: %s %v", got, err) |
| + } |
| + if _, _, err := Configure(get); !errors.Is(err, ErrUnset) { |
| + t.Fatalf("auto on a demo box admitted: %v", err) |
| } |
| for _, bad := range []string{"0", "invalid", "1"} { |
| for _, configured := range []string{"", "auto", "systemd", "gvisor", "invalid"} { |
| broken := map[string]string{"CARLOS_DEMO_BOX": bad, "CARLOS_EXEC_SANDBOX": configured} |
| get := func(k string) string { return broken[k] } |
| - _, mode, err := resolveFromEnv(get, true) |
| + _, mode, err := ResolveFromEnv(get) |
| want := EffectiveSystemd |
| if configured == "gvisor" || configured == "invalid" { |
| want = EffectiveGVisor |
diff --git a/internal/execsandbox/contract_test.go b/internal/execsandbox/contract_test.go| index 33a0b9845..dfbe46146 100644 |
| --- a/internal/execsandbox/contract_test.go |
| +++ b/internal/execsandbox/contract_test.go |
| @@ -31,23 +31,14 @@ func TestParseExecSandbox(t *testing.T) { |
| } |
| func TestResolveExecSandbox(t *testing.T) { |
| - if AutoDemoGVisor { |
| - t.Fatal("auto rollout is not authorized") |
| - } |
| - for _, demo := range []bool{false, true} { |
| - for _, on := range []bool{false, true} { |
| - for _, configured := range []Configured{Auto, Systemd, GVisor} { |
| - want := EffectiveSystemd |
| - if configured == GVisor || configured == Auto && demo && on { |
| - want = EffectiveGVisor |
| - } |
| - if got := resolve(configured, demo, on); got != want { |
| - t.Errorf("%s/%v/%v: %s", configured, demo, on, got) |
| - } |
| - } |
| - } |
| - if Resolve(Auto, demo) != EffectiveSystemd { |
| - t.Fatal("shipped auto changed") |
| + // auto never means gvisor (gVisor flagship plan, slice 2): a demo box |
| + // states its mode, and Configure refuses one that does not. |
| + for _, tc := range []struct { |
| + configured Configured |
| + want Effective |
| + }{{Auto, EffectiveSystemd}, {Systemd, EffectiveSystemd}, {GVisor, EffectiveGVisor}} { |
| + if got := Resolve(tc.configured); got != tc.want { |
| + t.Errorf("%s: %s", tc.configured, got) |
| } |
| } |
| } |
diff --git a/internal/execsandbox/mode.go b/internal/execsandbox/mode.go| index 4bc4a5cbe..b7ca2d96f 100644 |
| --- a/internal/execsandbox/mode.go |
| +++ b/internal/execsandbox/mode.go |
| @@ -15,8 +15,9 @@ const ( |
| EffectiveGVisor Effective = "gvisor" |
| FamilySystemd Family = "systemd" |
| FamilyGVisor Family = "gvisor" |
| - // AutoDemoGVisor stays off until the flagship go-live window. |
| - AutoDemoGVisor = false |
| + // Unset is what root reports as configured on a demo box whose |
| + // host.env names no sandbox, or says auto. It is never parsed. |
| + Unset Configured = "unset" |
| ) |
| var ( |
| @@ -28,6 +29,7 @@ var ( |
| ErrClaims = errors.New("EXEC-SANDBOX-CLAIMS") |
| ErrRole = errors.New("EXEC-SANDBOX-ROLE") |
| ErrRootfs = errors.New("EXEC-SANDBOX-ROOTFS") |
| + ErrUnset = errors.New("EXEC-SANDBOX-UNSET") |
| ) |
| func Parse(getenv func(string) string) (Configured, error) { |
| @@ -43,12 +45,12 @@ func Parse(getenv func(string) string) (Configured, error) { |
| } |
| } |
| -func Resolve(configured Configured, demoBox bool) Effective { |
| - return resolve(configured, demoBox, AutoDemoGVisor) |
| -} |
| - |
| -func resolve(configured Configured, demoBox, autoDemoGVisor bool) Effective { |
| - if configured == GVisor || configured == Auto && demoBox && autoDemoGVisor { |
| +// Resolve is the effective mode: gvisor only when configured so. auto never |
| +// means gvisor (gVisor flagship plan, slice 2, which replaces design |
| +// §4.1's planned flip): a demo box must say gvisor or systemd, and |
| +// Configure refuses one that says neither. |
| +func Resolve(configured Configured) Effective { |
| + if configured == GVisor { |
| return EffectiveGVisor |
| } |
| return EffectiveSystemd |
diff --git a/internal/host/execsandbox_explicit_linux_test.go b/internal/host/execsandbox_explicit_linux_test.go| new file mode 100644 |
| index 000000000..7b1f5a00d |
| --- /dev/null |
| +++ b/internal/host/execsandbox_explicit_linux_test.go |
| @@ -0,0 +1,156 @@ |
| +package host |
| + |
| +import ( |
| + "bytes" |
| + "context" |
| + "crypto/sha256" |
| + "errors" |
| + "fmt" |
| + "net" |
| + "net/http/httptest" |
| + "os" |
| + "path/filepath" |
| + "strings" |
| + "testing" |
| + |
| + "github.com/carlosframework/platform/internal/execsandbox" |
| + "github.com/carlosframework/platform/internal/instancectl" |
| +) |
| + |
| +const explicitDemoHostEnv = "CARLOS_DEMO_BOX=1\nCARLOS_DEMO_ACCOUNT=demo\nCARLOS_DEMO_FLEET=demo\nCARLOS_DEMO_DOMAIN=demo.example\n" |
| + |
| +// TestDemoBoxSandboxMustBeExplicit is the gVisor flagship plan's slice 2.1 |
| +// table: a demo box × {unset, auto, systemd, gvisor} × {aware, older floor}, |
| +// each read from a real host.env through the reader root uses. |
| +// |
| +// Aware is this release's agent and control: unset and auto refuse with |
| +// EXEC-SANDBOX-UNSET, so nothing is admitted until the box states a mode. |
| +// The floor is what gates an update or a recovery onto another binary. It |
| +// still resolves unset and auto to systemd, so an older aware release (the |
| +// protocol 1 marker) passes it there and would run demos natively; an |
| +// explicit gvisor is the one value the floor holds against an unaware |
| +// binary, and the value an older aware release honours. That is why a demo |
| +// box keeps an explicit value and nothing relies on auto. |
| +func TestDemoBoxSandboxMustBeExplicit(t *testing.T) { |
| + aware := append([]byte("an aware release\n"), execsandbox.ProtocolMarker...) |
| + older := []byte("a release from before the exec-sandbox protocol\n") |
| + for _, tc := range []struct { |
| + name, line string |
| + configured execsandbox.Configured |
| + refused error |
| + effective execsandbox.Effective |
| + }{ |
| + {"unset", "", execsandbox.Auto, execsandbox.ErrUnset, execsandbox.EffectiveSystemd}, |
| + {"auto", "CARLOS_EXEC_SANDBOX=auto\n", execsandbox.Auto, execsandbox.ErrUnset, execsandbox.EffectiveSystemd}, |
| + {"systemd", "CARLOS_EXEC_SANDBOX=systemd\n", execsandbox.Systemd, nil, execsandbox.EffectiveSystemd}, |
| + {"gvisor", "CARLOS_EXEC_SANDBOX=gvisor\n", execsandbox.GVisor, nil, execsandbox.EffectiveGVisor}, |
| + } { |
| + t.Run(tc.name, func(t *testing.T) { |
| + dir := t.TempDir() |
| + path := filepath.Join(dir, "host.env") |
| + if err := os.WriteFile(path, []byte(explicitDemoHostEnv+tc.line), 0600); err != nil { |
| + t.Fatal(err) |
| + } |
| + read := func() (func(string) string, error) { return sandboxHostEnvironmentAt(path) } |
| + get, err := read() |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + |
| + t.Run("aware", func(t *testing.T) { |
| + c, e, err := execSandboxConfig(get) |
| + if c != tc.configured || e != tc.effective || !sameRefusal(err, tc.refused) { |
| + t.Fatalf("agent: %s %s %v; want %s %s %v", c, e, err, tc.configured, tc.effective, tc.refused) |
| + } |
| + control := instancectl.SandboxSettingsFromEnvironment(get) |
| + if control.Configured != tc.configured || control.Effective != tc.effective || !sameRefusal(control.Err, tc.refused) { |
| + t.Fatalf("control: %+v; want %s %s %v", control, tc.configured, tc.effective, tc.refused) |
| + } |
| + // The refusal is a sandbox state root keeps serving, not a |
| + // demo configuration control would stop for. |
| + if _, _, err := instancectl.ControlConfig(get, control); err != nil { |
| + t.Fatalf("control configuration refused: %v", err) |
| + } |
| + }) |
| + |
| + t.Run("older floor", func(t *testing.T) { |
| + a := systemApplier{sandboxEnvironment: read} |
| + floor, err := a.sandboxMode() |
| + if err != nil || floor != tc.effective { |
| + t.Fatalf("floor: %s %v; want %s", floor, err, tc.effective) |
| + } |
| + for _, bin := range []struct { |
| + name string |
| + raw []byte |
| + admit bool |
| + }{ |
| + {"aware", aware, true}, |
| + {"unaware", older, tc.effective != execsandbox.EffectiveGVisor}, |
| + } { |
| + _, err := verifiedSandboxCandidate(bytes.NewReader(bin.raw), int64(len(bin.raw)), fmt.Sprintf("%x", sha256.Sum256(bin.raw)), floor) |
| + if (err == nil) != bin.admit { |
| + t.Fatalf("%s candidate: %v; want admitted %v", bin.name, err, bin.admit) |
| + } |
| + } |
| + // Recovery onto carlos.prev: an absent one is allowed only |
| + // where no awareness floor applies. (A present prev needs |
| + // root-owned directories, so the candidate check above |
| + // stands for it: both read the same protocol marker.) |
| + if err := sandboxAllowsPrev(read, filepath.Join(dir, "absent-prev")); (err == nil) != (tc.effective != execsandbox.EffectiveGVisor) { |
| + t.Fatalf("absent prev: %v", err) |
| + } |
| + // The installer fetches the pinned runsc set only for gvisor. |
| + if required, err := runscRequired(get); err != nil || required != (tc.effective == execsandbox.EffectiveGVisor) { |
| + t.Fatalf("installer: %v %v", required, err) |
| + } |
| + // What an aware binary's own parse makes of the line. |
| + if parsed, err := execsandbox.Parse(get); err != nil || parsed != tc.configured { |
| + t.Fatalf("parse: %s %v; want %s", parsed, err, tc.configured) |
| + } |
| + }) |
| + }) |
| + } |
| +} |
| + |
| +func sameRefusal(err, want error) bool { |
| + if want == nil { |
| + return err == nil |
| + } |
| + return errors.Is(err, want) |
| +} |
| + |
| +// TestDemoBoxSandboxUnsetStatus is slice 2.1's status field, through the |
| +// production pieces: root's control server built from a demo box's |
| +// host.env with no CARLOS_EXEC_SANDBOX, the agent's root client, and the |
| +// layout report the box publishes. The box says its sandbox is unset, and is |
| +// not ready. |
| +func TestDemoBoxSandboxUnsetStatus(t *testing.T) { |
| + path := filepath.Join(t.TempDir(), "host.env") |
| + if err := os.WriteFile(path, []byte(explicitDemoHostEnv), 0600); err != nil { |
| + t.Fatal(err) |
| + } |
| + get, err := sandboxHostEnvironmentAt(path) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + settings := instancectl.SandboxSettingsFromEnvironment(get) |
| + cfg, _, err := instancectl.ControlConfig(get, settings) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + _, agentEffective, _ := execSandboxConfig(get) |
| + ctl := instancectl.NewClient("test", agentEffective) |
| + // One binary on a box: root and the agent run the same build. |
| + s := &instancectl.Server{Build: ctl.Build, SandboxConfigured: settings.Configured, SandboxEffective: settings.Effective, SandboxConfigErr: settings.Err, DemoBox: cfg.BoxMode(), DemoConfig: cfg} |
| + srv := httptest.NewServer(s.Handler()) |
| + t.Cleanup(srv.Close) |
| + ctl.Dial = func(ctx context.Context, _ string) (net.Conn, error) { |
| + return (&net.Dialer{}).DialContext(ctx, "tcp", strings.TrimPrefix(srv.URL, "http://")) |
| + } |
| + armExecSandboxStatus(ctl.SandboxStatus) |
| + t.Cleanup(func() { armedExecSandboxStatus.Store(nil) }) |
| + got := execSandboxStatusReport() |
| + if got == nil || got.Configured != string(execsandbox.Unset) || got.Ready || got.Blocked != execsandbox.ErrUnset.Error() { |
| + t.Fatalf("status %+v; want configured %q, not ready, blocked %q", got, execsandbox.Unset, execsandbox.ErrUnset) |
| + } |
| +} |
diff --git a/internal/host/execsandboxresolver_test.go b/internal/host/execsandboxresolver_test.go| index 62f633a60..96d7ccf7b 100644 |
| --- a/internal/host/execsandboxresolver_test.go |
| +++ b/internal/host/execsandboxresolver_test.go |
| @@ -1,70 +1,20 @@ |
| package host |
| import ( |
| - "bytes" |
| - "context" |
| - "crypto/sha256" |
| - "encoding/json" |
| - "fmt" |
| "go/ast" |
| "go/parser" |
| "go/token" |
| - "os" |
| - "os/exec" |
| "path/filepath" |
| "testing" |
| - |
| - "github.com/carlosframework/platform/internal/execsandbox" |
| - "github.com/carlosframework/platform/internal/instancectl" |
| ) |
| func TestExecSandboxResolverCallers(t *testing.T) { |
| - forced := os.Getenv("CARLOS_RESOLVER_TEST_CHILD") == "1" |
| - env := map[string]string{"CARLOS_DEMO_BOX": "1", "CARLOS_DEMO_ACCOUNT": "demo", "CARLOS_DEMO_FLEET": "demo", "CARLOS_DEMO_DOMAIN": "demo.example"} |
| - for _, configured := range []string{"auto", "systemd", "gvisor"} { |
| - env["CARLOS_EXEC_SANDBOX"] = configured |
| - get := func(k string) string { return env[k] } |
| - want := execsandbox.EffectiveSystemd |
| - if configured == "gvisor" || configured == "auto" && forced { |
| - want = execsandbox.EffectiveGVisor |
| - } |
| - _, agent, err := execSandboxConfig(get) |
| - if err != nil || agent != want { |
| - t.Fatalf("agent %s: %s %v", configured, agent, err) |
| - } |
| - control := instancectl.SandboxSettingsFromEnvironment(get) |
| - if control.Err != nil || control.Effective != want { |
| - t.Fatalf("control %s: %+v", configured, control) |
| - } |
| - read := func() (func(string) string, error) { return get, nil } |
| - a := systemApplier{sandboxEnvironment: read} |
| - floor, err := a.sandboxMode() |
| - if err != nil || floor != want { |
| - t.Fatalf("floor %s: %s %v", configured, floor, err) |
| - } |
| - required, err := runscRequired(get) |
| - if err != nil || required != (want == execsandbox.EffectiveGVisor) { |
| - t.Fatalf("installer %s: %v %v", configured, required, err) |
| - } |
| - // An absent prev is allowed only when no awareness floor applies. |
| - err = sandboxAllowsPrev(read, filepath.Join(t.TempDir(), "absent-prev")) |
| - if (err != nil) != (want == execsandbox.EffectiveGVisor) { |
| - t.Fatalf("recovery gate %s: %v", configured, err) |
| - } |
| - b := []byte("unaware candidate") |
| - _, err = verifiedSandboxCandidate(bytes.NewReader(b), int64(len(b)), fmt.Sprintf("%x", sha256.Sum256(b)), floor) |
| - if (err != nil) != (want == execsandbox.EffectiveGVisor) { |
| - t.Fatalf("candidate %s: %v", configured, err) |
| - } |
| - } |
| - if forced { |
| - return |
| - } |
| + // The decisions themselves are TestDemoBoxSandboxMustBeExplicit's |
| + // table; this binds the tested helpers to their production callers. |
| root, err := filepath.Abs("../..") |
| if err != nil { |
| t.Fatal(err) |
| } |
| - // Bind the tested decision helpers to their production callers. |
| for _, binding := range []struct{ file, caller, callee string }{ |
| {"internal/host/agent.go", "runAgent", "execSandboxConfig"}, |
| {"internal/host/claimstop_run.go", "RunInstanceControl", "execSandboxConfig"}, |
| @@ -110,35 +60,4 @@ func TestExecSandboxResolverCallers(t *testing.T) { |
| t.Fatalf("%s: %s no longer calls %s", binding.file, binding.caller, binding.callee) |
| } |
| } |
| - if testing.Short() { |
| - t.Log("short mode: skipping nested resolver go test") |
| - return |
| - } |
| - // Rebuild only the test dependency through the resolver's private rollout |
| - // argument. Neither the shipped constant nor the checkout is edited. |
| - config := filepath.Join(root, "internal/execsandbox/config.go") |
| - raw, err := os.ReadFile(config) |
| - if err != nil { |
| - t.Fatal(err) |
| - } |
| - hook := []byte("resolveFromEnv(getenv, AutoDemoGVisor)") |
| - if bytes.Count(raw, hook) != 1 { |
| - t.Fatal("private resolver test hook changed") |
| - } |
| - dir := t.TempDir() |
| - replacement := filepath.Join(dir, "config.go") |
| - overlay := filepath.Join(dir, "overlay.json") |
| - if err := os.WriteFile(replacement, bytes.Replace(raw, hook, []byte("resolveFromEnv(getenv, true)"), 1), 0600); err != nil { |
| - t.Fatal(err) |
| - } |
| - data, _ := json.Marshal(map[string]any{"Replace": map[string]string{config: replacement}}) |
| - if err := os.WriteFile(overlay, data, 0600); err != nil { |
| - t.Fatal(err) |
| - } |
| - cmd := exec.CommandContext(context.Background(), "go", "test", "-overlay", overlay, "./internal/host", "-short", "-run", "^TestExecSandboxResolverCallers$", "-count=1") |
| - cmd.Dir = root |
| - cmd.Env = append(os.Environ(), "CARLOS_RESOLVER_TEST_CHILD=1", "GOFLAGS=-buildvcs=false") |
| - if out, err := cmd.CombinedOutput(); err != nil { |
| - t.Fatalf("auto-demo enabled caller guard: %v\n%s", err, out) |
| - } |
| } |
diff --git a/internal/host/gvisor_hardening_rootrunner_linux_test.go b/internal/host/gvisor_hardening_rootrunner_linux_test.go| index 5352e88a7..f252d6292 100644 |
| --- a/internal/host/gvisor_hardening_rootrunner_linux_test.go |
| +++ b/internal/host/gvisor_hardening_rootrunner_linux_test.go |
| @@ -91,7 +91,7 @@ func (f *gvisorFixture) start(kind string) string { |
| } |
| debugFlags = " --debug --debug-log=" + logDir + "/ --debug-log-format=text" |
| } |
| - body := strings.Join(lines, "\n") + "\n" + gvisorCandidateHardening + "\nExecStartPre=-" + f.runtime + " --root=/run/carlos-runsc delete -force " + id + "\nExecStart=" + f.runtime + " --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none" + debugFlags + " run --bundle " + bundle + " " + id + "\n" |
| + body := strings.Join(lines, "\n") + "\n" + gvisorCandidateHardening + "\nExecStartPre=-" + f.runtime + " --root=/run/carlos-runsc delete -force " + id + "\nExecStart=" + f.runtime + " --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none " + execsandbox.RunscPlatform + " " + execsandbox.RunscDirectFS + debugFlags + " run --bundle " + bundle + " " + id + "\n" |
| if kind != "build" { |
| body += "ExecStop=-" + f.runtime + " --root=/run/carlos-runsc kill " + id + " TERM\n" |
| } |
diff --git a/internal/host/testdata/gvisor-systemd257/README.md b/internal/host/testdata/gvisor-systemd257/README.md| new file mode 100644 |
| index 000000000..ecffbee9c |
| --- /dev/null |
| +++ b/internal/host/testdata/gvisor-systemd257/README.md |
| @@ -0,0 +1,19 @@ |
| +# Derived fixtures, not captures |
| + |
| +The 18 `.show`, `.all.show` and `.cat` files here started as the systemd 257 |
| +capture that `capture.json` describes: run `20261109T074820-cf2de7`, |
| +invocation 24, linux-arm64, instance `i-058f07e6f448797bb`. |
| + |
| +Commit c6a3b2c1 (gVisor slice 2, F7) then edited every one of them by hand. |
| +It inserted `--platform=systrap --directfs=true` into the runsc argv, after |
| +`--overlay2=none`, and changed nothing else: |
| + |
| +- each `.cat` file: its `ExecStart=` line (6 lines); |
| +- each `.show` and `.all.show` file: its `ExecStart=` and `ExecStartEx=` |
| + lines (24 lines). |
| + |
| +So `capture.json`'s `bytes` and `sha256` are the original capture's, not |
| +these files'. The timestamps, PIDs and other process metadata are from a |
| +unit that ran without the two flags; they are not evidence that systemd or |
| +runsc ran with them. A fresh capture from a box running the pinned argv |
| +replaces these files and this note. |
diff --git a/internal/host/testdata/gvisor-systemd257/build-active.all.show b/internal/host/testdata/gvisor-systemd257/build-active.all.show| index 63586c4f0..f0c904499 100644 |
| --- a/internal/host/testdata/gvisor-systemd257/build-active.all.show |
| +++ b/internal/host/testdata/gvisor-systemd257/build-active.all.show |
| @@ -57,8 +57,8 @@ ExecMainCode=0 |
| ExecMainStatus=0 |
| ExecStartPre={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; ignore_errors=yes ; start_time=[Mon 2026-11-09 07:51:15 UTC] ; stop_time=[Mon 2026-11-09 07:51:15 UTC] ; pid=5383 ; code=exited ; status=0 } |
| ExecStartPreEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; flags=ignore-failure ; start_time=[Mon 2026-11-09 07:51:15 UTC] ; stop_time=[Mon 2026-11-09 07:51:15 UTC] ; pid=5383 ; code=exited ; status=0 } |
| -ExecStart={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; ignore_errors=no ; start_time=[Mon 2026-11-09 07:51:15 UTC] ; stop_time=[n/a] ; pid=5391 ; code=(null) ; status=0/0 } |
| -ExecStartEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; flags= ; start_time=[Mon 2026-11-09 07:51:15 UTC] ; stop_time=[n/a] ; pid=5391 ; code=(null) ; status=0/0 } |
| +ExecStart={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; ignore_errors=no ; start_time=[Mon 2026-11-09 07:51:15 UTC] ; stop_time=[n/a] ; pid=5391 ; code=(null) ; status=0/0 } |
| +ExecStartEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; flags= ; start_time=[Mon 2026-11-09 07:51:15 UTC] ; stop_time=[n/a] ; pid=5391 ; code=(null) ; status=0/0 } |
| ExecStopPost={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; ignore_errors=yes ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStopPostEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; flags=ignore-failure ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| Slice=carlos-demo-builds.slice |
diff --git a/internal/host/testdata/gvisor-systemd257/build-active.cat b/internal/host/testdata/gvisor-systemd257/build-active.cat| index 61a167c0e..d08a5c78e 100644 |
| --- a/internal/host/testdata/gvisor-systemd257/build-active.cat |
| +++ b/internal/host/testdata/gvisor-systemd257/build-active.cat |
| @@ -55,7 +55,7 @@ ExecCondition= |
| ExecStartPre= |
| ExecStartPre=-/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 |
| ExecStart= |
| -ExecStart=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 |
| +ExecStart=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 |
| ExecStartPost= |
| ExecReload= |
| ExecStop= |
diff --git a/internal/host/testdata/gvisor-systemd257/build-active.show b/internal/host/testdata/gvisor-systemd257/build-active.show| index 1a556155d..b809e353b 100644 |
| --- a/internal/host/testdata/gvisor-systemd257/build-active.show |
| +++ b/internal/host/testdata/gvisor-systemd257/build-active.show |
| @@ -44,8 +44,8 @@ ExecMainCode=0 |
| ExecMainStatus=0 |
| ExecStartPre={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; ignore_errors=yes ; start_time=[Mon 2026-11-09 07:51:15 UTC] ; stop_time=[Mon 2026-11-09 07:51:15 UTC] ; pid=5383 ; code=exited ; status=0 } |
| ExecStartPreEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; flags=ignore-failure ; start_time=[Mon 2026-11-09 07:51:15 UTC] ; stop_time=[Mon 2026-11-09 07:51:15 UTC] ; pid=5383 ; code=exited ; status=0 } |
| -ExecStart={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; ignore_errors=no ; start_time=[Mon 2026-11-09 07:51:15 UTC] ; stop_time=[n/a] ; pid=5391 ; code=(null) ; status=0/0 } |
| -ExecStartEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; flags= ; start_time=[Mon 2026-11-09 07:51:15 UTC] ; stop_time=[n/a] ; pid=5391 ; code=(null) ; status=0/0 } |
| +ExecStart={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; ignore_errors=no ; start_time=[Mon 2026-11-09 07:51:15 UTC] ; stop_time=[n/a] ; pid=5391 ; code=(null) ; status=0/0 } |
| +ExecStartEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; flags= ; start_time=[Mon 2026-11-09 07:51:15 UTC] ; stop_time=[n/a] ; pid=5391 ; code=(null) ; status=0/0 } |
| ExecStopPost={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; ignore_errors=yes ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStopPostEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; flags=ignore-failure ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| Slice=carlos-demo-builds.slice |
diff --git a/internal/host/testdata/gvisor-systemd257/build-before.all.show b/internal/host/testdata/gvisor-systemd257/build-before.all.show| index 216eb903c..8d41cd577 100644 |
| --- a/internal/host/testdata/gvisor-systemd257/build-before.all.show |
| +++ b/internal/host/testdata/gvisor-systemd257/build-before.all.show |
| @@ -57,8 +57,8 @@ ExecMainCode=0 |
| ExecMainStatus=0 |
| ExecStartPre={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; ignore_errors=yes ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStartPreEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; flags=ignore-failure ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| -ExecStart={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| -ExecStartEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| +ExecStart={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| +ExecStartEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStopPost={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; ignore_errors=yes ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStopPostEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; flags=ignore-failure ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| Slice=carlos-demo-builds.slice |
diff --git a/internal/host/testdata/gvisor-systemd257/build-before.cat b/internal/host/testdata/gvisor-systemd257/build-before.cat| index 61a167c0e..d08a5c78e 100644 |
| --- a/internal/host/testdata/gvisor-systemd257/build-before.cat |
| +++ b/internal/host/testdata/gvisor-systemd257/build-before.cat |
| @@ -55,7 +55,7 @@ ExecCondition= |
| ExecStartPre= |
| ExecStartPre=-/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 |
| ExecStart= |
| -ExecStart=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 |
| +ExecStart=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 |
| ExecStartPost= |
| ExecReload= |
| ExecStop= |
diff --git a/internal/host/testdata/gvisor-systemd257/build-before.show b/internal/host/testdata/gvisor-systemd257/build-before.show| index 588981335..adba49a4d 100644 |
| --- a/internal/host/testdata/gvisor-systemd257/build-before.show |
| +++ b/internal/host/testdata/gvisor-systemd257/build-before.show |
| @@ -42,8 +42,8 @@ ExecMainCode=0 |
| ExecMainStatus=0 |
| ExecStartPre={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; ignore_errors=yes ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStartPreEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; flags=ignore-failure ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| -ExecStart={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| -ExecStartEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| +ExecStart={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| +ExecStartEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStopPost={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; ignore_errors=yes ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStopPostEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force build-128b9abd4e5806edcbfd369ded6d19ab096587e3e32ddfbcf604170c4b3209a8_1 ; flags=ignore-failure ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| Slice=carlos-demo-builds.slice |
diff --git a/internal/host/testdata/gvisor-systemd257/probe-active.all.show b/internal/host/testdata/gvisor-systemd257/probe-active.all.show| index 8fb0a08e7..4ee716e78 100644 |
| --- a/internal/host/testdata/gvisor-systemd257/probe-active.all.show |
| +++ b/internal/host/testdata/gvisor-systemd257/probe-active.all.show |
| @@ -57,8 +57,8 @@ ExecMainCode=0 |
| ExecMainStatus=0 |
| ExecStartPre={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force probe ; ignore_errors=yes ; start_time=[Mon 2026-11-09 07:51:01 UTC] ; stop_time=[Mon 2026-11-09 07:51:01 UTC] ; pid=4666 ; code=exited ; status=0 } |
| ExecStartPreEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force probe ; flags=ignore-failure ; start_time=[Mon 2026-11-09 07:51:01 UTC] ; stop_time=[Mon 2026-11-09 07:51:01 UTC] ; pid=4666 ; code=exited ; status=0 } |
| -ExecStart={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/probe probe ; ignore_errors=no ; start_time=[Mon 2026-11-09 07:51:01 UTC] ; stop_time=[n/a] ; pid=4672 ; code=(null) ; status=0/0 } |
| -ExecStartEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/probe probe ; flags= ; start_time=[Mon 2026-11-09 07:51:01 UTC] ; stop_time=[n/a] ; pid=4672 ; code=(null) ; status=0/0 } |
| +ExecStart={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/probe probe ; ignore_errors=no ; start_time=[Mon 2026-11-09 07:51:01 UTC] ; stop_time=[n/a] ; pid=4672 ; code=(null) ; status=0/0 } |
| +ExecStartEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/probe probe ; flags= ; start_time=[Mon 2026-11-09 07:51:01 UTC] ; stop_time=[n/a] ; pid=4672 ; code=(null) ; status=0/0 } |
| ExecStop={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc kill probe TERM ; ignore_errors=yes ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStopEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc kill probe TERM ; flags=ignore-failure ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStopPost={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force probe ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
diff --git a/internal/host/testdata/gvisor-systemd257/probe-active.cat b/internal/host/testdata/gvisor-systemd257/probe-active.cat| index 26c6a7ae2..e618e1f5b 100644 |
| --- a/internal/host/testdata/gvisor-systemd257/probe-active.cat |
| +++ b/internal/host/testdata/gvisor-systemd257/probe-active.cat |
| @@ -49,7 +49,7 @@ StandardError=journal |
| ExecStartPre= |
| ExecStartPre=-/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force probe |
| ExecStart= |
| -ExecStart=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/probe probe |
| +ExecStart=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/probe probe |
| ExecStop= |
| ExecStop=-/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc kill probe TERM |
| ExecStopPost= |
diff --git a/internal/host/testdata/gvisor-systemd257/probe-active.show b/internal/host/testdata/gvisor-systemd257/probe-active.show| index c3514112d..7933831d0 100644 |
| --- a/internal/host/testdata/gvisor-systemd257/probe-active.show |
| +++ b/internal/host/testdata/gvisor-systemd257/probe-active.show |
| @@ -44,8 +44,8 @@ ExecMainCode=0 |
| ExecMainStatus=0 |
| ExecStartPre={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force probe ; ignore_errors=yes ; start_time=[Mon 2026-11-09 07:51:01 UTC] ; stop_time=[Mon 2026-11-09 07:51:01 UTC] ; pid=4666 ; code=exited ; status=0 } |
| ExecStartPreEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force probe ; flags=ignore-failure ; start_time=[Mon 2026-11-09 07:51:01 UTC] ; stop_time=[Mon 2026-11-09 07:51:01 UTC] ; pid=4666 ; code=exited ; status=0 } |
| -ExecStart={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/probe probe ; ignore_errors=no ; start_time=[Mon 2026-11-09 07:51:01 UTC] ; stop_time=[n/a] ; pid=4672 ; code=(null) ; status=0/0 } |
| -ExecStartEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/probe probe ; flags= ; start_time=[Mon 2026-11-09 07:51:01 UTC] ; stop_time=[n/a] ; pid=4672 ; code=(null) ; status=0/0 } |
| +ExecStart={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/probe probe ; ignore_errors=no ; start_time=[Mon 2026-11-09 07:51:01 UTC] ; stop_time=[n/a] ; pid=4672 ; code=(null) ; status=0/0 } |
| +ExecStartEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/probe probe ; flags= ; start_time=[Mon 2026-11-09 07:51:01 UTC] ; stop_time=[n/a] ; pid=4672 ; code=(null) ; status=0/0 } |
| ExecStop={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc kill probe TERM ; ignore_errors=yes ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStopEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc kill probe TERM ; flags=ignore-failure ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStopPost={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force probe ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
diff --git a/internal/host/testdata/gvisor-systemd257/probe-before.all.show b/internal/host/testdata/gvisor-systemd257/probe-before.all.show| index f1aed4237..7cb15bb9f 100644 |
| --- a/internal/host/testdata/gvisor-systemd257/probe-before.all.show |
| +++ b/internal/host/testdata/gvisor-systemd257/probe-before.all.show |
| @@ -57,8 +57,8 @@ ExecMainCode=0 |
| ExecMainStatus=0 |
| ExecStartPre={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force probe ; ignore_errors=yes ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStartPreEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force probe ; flags=ignore-failure ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| -ExecStart={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/probe probe ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| -ExecStartEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/probe probe ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| +ExecStart={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/probe probe ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| +ExecStartEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/probe probe ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStop={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc kill probe TERM ; ignore_errors=yes ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStopEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc kill probe TERM ; flags=ignore-failure ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStopPost={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force probe ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
diff --git a/internal/host/testdata/gvisor-systemd257/probe-before.cat b/internal/host/testdata/gvisor-systemd257/probe-before.cat| index 26c6a7ae2..e618e1f5b 100644 |
| --- a/internal/host/testdata/gvisor-systemd257/probe-before.cat |
| +++ b/internal/host/testdata/gvisor-systemd257/probe-before.cat |
| @@ -49,7 +49,7 @@ StandardError=journal |
| ExecStartPre= |
| ExecStartPre=-/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force probe |
| ExecStart= |
| -ExecStart=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/probe probe |
| +ExecStart=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/probe probe |
| ExecStop= |
| ExecStop=-/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc kill probe TERM |
| ExecStopPost= |
diff --git a/internal/host/testdata/gvisor-systemd257/probe-before.show b/internal/host/testdata/gvisor-systemd257/probe-before.show| index b9efc41a2..fa2226f73 100644 |
| --- a/internal/host/testdata/gvisor-systemd257/probe-before.show |
| +++ b/internal/host/testdata/gvisor-systemd257/probe-before.show |
| @@ -42,8 +42,8 @@ ExecMainCode=0 |
| ExecMainStatus=0 |
| ExecStartPre={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force probe ; ignore_errors=yes ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStartPreEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force probe ; flags=ignore-failure ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| -ExecStart={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/probe probe ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| -ExecStartEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/probe probe ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| +ExecStart={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/probe probe ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| +ExecStartEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/probe probe ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStop={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc kill probe TERM ; ignore_errors=yes ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStopEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc kill probe TERM ; flags=ignore-failure ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStopPost={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force probe ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
diff --git a/internal/host/testdata/gvisor-systemd257/run-active.all.show b/internal/host/testdata/gvisor-systemd257/run-active.all.show| index 38f24518b..c282358dd 100644 |
| --- a/internal/host/testdata/gvisor-systemd257/run-active.all.show |
| +++ b/internal/host/testdata/gvisor-systemd257/run-active.all.show |
| @@ -57,8 +57,8 @@ ExecMainCode=0 |
| ExecMainStatus=0 |
| ExecStartPre={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force run-bright-otter-42.example.com ; ignore_errors=yes ; start_time=[Mon 2026-11-09 07:51:02 UTC] ; stop_time=[Mon 2026-11-09 07:51:02 UTC] ; pid=4829 ; code=exited ; status=0 } |
| ExecStartPreEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force run-bright-otter-42.example.com ; flags=ignore-failure ; start_time=[Mon 2026-11-09 07:51:02 UTC] ; stop_time=[Mon 2026-11-09 07:51:02 UTC] ; pid=4829 ; code=exited ; status=0 } |
| -ExecStart={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/run-bright-otter-42.example.com run-bright-otter-42.example.com ; ignore_errors=no ; start_time=[Mon 2026-11-09 07:51:02 UTC] ; stop_time=[n/a] ; pid=4834 ; code=(null) ; status=0/0 } |
| -ExecStartEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/run-bright-otter-42.example.com run-bright-otter-42.example.com ; flags= ; start_time=[Mon 2026-11-09 07:51:02 UTC] ; stop_time=[n/a] ; pid=4834 ; code=(null) ; status=0/0 } |
| +ExecStart={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/run-bright-otter-42.example.com run-bright-otter-42.example.com ; ignore_errors=no ; start_time=[Mon 2026-11-09 07:51:02 UTC] ; stop_time=[n/a] ; pid=4834 ; code=(null) ; status=0/0 } |
| +ExecStartEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/run-bright-otter-42.example.com run-bright-otter-42.example.com ; flags= ; start_time=[Mon 2026-11-09 07:51:02 UTC] ; stop_time=[n/a] ; pid=4834 ; code=(null) ; status=0/0 } |
| ExecStop={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc kill run-bright-otter-42.example.com TERM ; ignore_errors=yes ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStopEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc kill run-bright-otter-42.example.com TERM ; flags=ignore-failure ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStopPost={ path=/opt/carlos/carlos ; argv[]=/opt/carlos/carlos instance-exit --sandbox=gvisor run bright-otter-42.example.com ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
diff --git a/internal/host/testdata/gvisor-systemd257/run-active.cat b/internal/host/testdata/gvisor-systemd257/run-active.cat| index 1f6dd9673..36be061f5 100644 |
| --- a/internal/host/testdata/gvisor-systemd257/run-active.cat |
| +++ b/internal/host/testdata/gvisor-systemd257/run-active.cat |
| @@ -43,7 +43,7 @@ SystemCallArchitectures=native |
| ExecStartPre= |
| ExecStartPre=-/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force run-bright-otter-42.example.com |
| ExecStart= |
| -ExecStart=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/run-bright-otter-42.example.com run-bright-otter-42.example.com |
| +ExecStart=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/run-bright-otter-42.example.com run-bright-otter-42.example.com |
| ExecStop= |
| ExecStop=-/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc kill run-bright-otter-42.example.com TERM |
| ExecStopPost= |
diff --git a/internal/host/testdata/gvisor-systemd257/run-active.show b/internal/host/testdata/gvisor-systemd257/run-active.show| index 07a35f398..98c7cfb87 100644 |
| --- a/internal/host/testdata/gvisor-systemd257/run-active.show |
| +++ b/internal/host/testdata/gvisor-systemd257/run-active.show |
| @@ -45,8 +45,8 @@ ExecMainCode=0 |
| ExecMainStatus=0 |
| ExecStartPre={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force run-bright-otter-42.example.com ; ignore_errors=yes ; start_time=[Mon 2026-11-09 07:51:02 UTC] ; stop_time=[Mon 2026-11-09 07:51:02 UTC] ; pid=4829 ; code=exited ; status=0 } |
| ExecStartPreEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force run-bright-otter-42.example.com ; flags=ignore-failure ; start_time=[Mon 2026-11-09 07:51:02 UTC] ; stop_time=[Mon 2026-11-09 07:51:02 UTC] ; pid=4829 ; code=exited ; status=0 } |
| -ExecStart={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/run-bright-otter-42.example.com run-bright-otter-42.example.com ; ignore_errors=no ; start_time=[Mon 2026-11-09 07:51:02 UTC] ; stop_time=[n/a] ; pid=4834 ; code=(null) ; status=0/0 } |
| -ExecStartEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/run-bright-otter-42.example.com run-bright-otter-42.example.com ; flags= ; start_time=[Mon 2026-11-09 07:51:02 UTC] ; stop_time=[n/a] ; pid=4834 ; code=(null) ; status=0/0 } |
| +ExecStart={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/run-bright-otter-42.example.com run-bright-otter-42.example.com ; ignore_errors=no ; start_time=[Mon 2026-11-09 07:51:02 UTC] ; stop_time=[n/a] ; pid=4834 ; code=(null) ; status=0/0 } |
| +ExecStartEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/run-bright-otter-42.example.com run-bright-otter-42.example.com ; flags= ; start_time=[Mon 2026-11-09 07:51:02 UTC] ; stop_time=[n/a] ; pid=4834 ; code=(null) ; status=0/0 } |
| ExecStop={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc kill run-bright-otter-42.example.com TERM ; ignore_errors=yes ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStopEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc kill run-bright-otter-42.example.com TERM ; flags=ignore-failure ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStopPost={ path=/opt/carlos/carlos ; argv[]=/opt/carlos/carlos instance-exit --sandbox=gvisor run bright-otter-42.example.com ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
diff --git a/internal/host/testdata/gvisor-systemd257/run-before.all.show b/internal/host/testdata/gvisor-systemd257/run-before.all.show| index e77e55e7c..7a3eeb978 100644 |
| --- a/internal/host/testdata/gvisor-systemd257/run-before.all.show |
| +++ b/internal/host/testdata/gvisor-systemd257/run-before.all.show |
| @@ -57,8 +57,8 @@ ExecMainCode=0 |
| ExecMainStatus=0 |
| ExecStartPre={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force run-bright-otter-42.example.com ; ignore_errors=yes ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStartPreEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force run-bright-otter-42.example.com ; flags=ignore-failure ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| -ExecStart={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/run-bright-otter-42.example.com run-bright-otter-42.example.com ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| -ExecStartEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/run-bright-otter-42.example.com run-bright-otter-42.example.com ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| +ExecStart={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/run-bright-otter-42.example.com run-bright-otter-42.example.com ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| +ExecStartEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/run-bright-otter-42.example.com run-bright-otter-42.example.com ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStop={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc kill run-bright-otter-42.example.com TERM ; ignore_errors=yes ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStopEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc kill run-bright-otter-42.example.com TERM ; flags=ignore-failure ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStopPost={ path=/opt/carlos/carlos ; argv[]=/opt/carlos/carlos instance-exit --sandbox=gvisor run bright-otter-42.example.com ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
diff --git a/internal/host/testdata/gvisor-systemd257/run-before.cat b/internal/host/testdata/gvisor-systemd257/run-before.cat| index 1f6dd9673..36be061f5 100644 |
| --- a/internal/host/testdata/gvisor-systemd257/run-before.cat |
| +++ b/internal/host/testdata/gvisor-systemd257/run-before.cat |
| @@ -43,7 +43,7 @@ SystemCallArchitectures=native |
| ExecStartPre= |
| ExecStartPre=-/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force run-bright-otter-42.example.com |
| ExecStart= |
| -ExecStart=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/run-bright-otter-42.example.com run-bright-otter-42.example.com |
| +ExecStart=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/run-bright-otter-42.example.com run-bright-otter-42.example.com |
| ExecStop= |
| ExecStop=-/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc kill run-bright-otter-42.example.com TERM |
| ExecStopPost= |
diff --git a/internal/host/testdata/gvisor-systemd257/run-before.show b/internal/host/testdata/gvisor-systemd257/run-before.show| index 2597270ab..a396c2f18 100644 |
| --- a/internal/host/testdata/gvisor-systemd257/run-before.show |
| +++ b/internal/host/testdata/gvisor-systemd257/run-before.show |
| @@ -43,8 +43,8 @@ ExecMainCode=0 |
| ExecMainStatus=0 |
| ExecStartPre={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force run-bright-otter-42.example.com ; ignore_errors=yes ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStartPreEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc delete -force run-bright-otter-42.example.com ; flags=ignore-failure ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| -ExecStart={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/run-bright-otter-42.example.com run-bright-otter-42.example.com ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| -ExecStartEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/run-bright-otter-42.example.com run-bright-otter-42.example.com ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| +ExecStart={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/run-bright-otter-42.example.com run-bright-otter-42.example.com ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| +ExecStartEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/run-bright-otter-42.example.com run-bright-otter-42.example.com ; flags= ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStop={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc kill run-bright-otter-42.example.com TERM ; ignore_errors=yes ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStopEx={ path=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc ; argv[]=/opt/carlos/runsc/ef62daddb0405a6f30c3a23aea89d4c9b1f2dfe38a6bf59f8e8caad76bf1ff00/runsc --root=/run/carlos-runsc kill run-bright-otter-42.example.com TERM ; flags=ignore-failure ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
| ExecStopPost={ path=/opt/carlos/carlos ; argv[]=/opt/carlos/carlos instance-exit --sandbox=gvisor run bright-otter-42.example.com ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 } |
diff --git a/internal/instancectl/gvisor_fix1_test.go b/internal/instancectl/gvisor_fix1_test.go| index 5e94374e6..950730357 100644 |
| --- a/internal/instancectl/gvisor_fix1_test.go |
| +++ b/internal/instancectl/gvisor_fix1_test.go |
| @@ -151,7 +151,7 @@ func TestGVisorFix1StaleStateRecipe(t *testing.T) { |
| t.Fatal(err) |
| } |
| want := "ExecStartPre=-" + execsandbox.RunscPath(pin) + " --root=/run/carlos-runsc delete -force " + id + "\n" |
| - start := "ExecStart=" + execsandbox.RunscPath(pin) + " --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none run --bundle /run/carlos-control/oci/" + id + " " + id + "\n" |
| + start := "ExecStart=" + execsandbox.RunscPath(pin) + " --root=/run/carlos-runsc --ignore-cgroups --network=none --host-uds=create --overlay2=none --platform=systrap --directfs=true run --bundle /run/carlos-control/oci/" + id + " " + id + "\n" |
| if !strings.Contains(source, start) { |
| t.Fatalf("changed run recipe: %s", source) |
| } |
diff --git a/internal/instancectl/gvisorunit_readback_test.go b/internal/instancectl/gvisorunit_readback_test.go| index ed72de618..80475dced 100644 |
| --- a/internal/instancectl/gvisorunit_readback_test.go |
| +++ b/internal/instancectl/gvisorunit_readback_test.go |
| @@ -68,7 +68,7 @@ func TestGVisorUnitMutations(t *testing.T) { |
| } |
| }) |
| } |
| - for _, pair := range [][2]string{{"--network=none", "--network=host"}, {"--overlay2=none", "--overlay2=self"}, {pin.SetID(), strings.Repeat("0", 64)}, {"--bundle ", "--bundle /bad "}, {"ignore_errors=no", "ignore_errors=yes"}, {" TERM", " KILL"}, {"--host-uds=create", "--host-uds=all"}} { |
| + for _, pair := range [][2]string{{"--network=none", "--network=host"}, {"--overlay2=none", "--overlay2=self"}, {pin.SetID(), strings.Repeat("0", 64)}, {"--bundle ", "--bundle /bad "}, {"ignore_errors=no", "ignore_errors=yes"}, {" TERM", " KILL"}, {"--host-uds=create", "--host-uds=all"}, {"--platform=systrap", "--platform=ptrace"}, {" --platform=systrap", ""}, {"--directfs=true", "--directfs=false"}, {" --directfs=true", ""}} { |
| if gvisorUnitShown(strings.Replace(valid, pair[0], pair[1], 1), host, role, pin) == nil { |
| t.Fatalf("accepted %v", pair) |
| } |
diff --git a/internal/instancectl/sandbox.go b/internal/instancectl/sandbox.go| index 13312be37..24419352f 100644 |
| --- a/internal/instancectl/sandbox.go |
| +++ b/internal/instancectl/sandbox.go |
| @@ -192,6 +192,9 @@ func (s *Server) withSandboxState(rep ProbeReport) ProbeReport { |
| if state.Configured == "" { |
| state.Configured = execsandbox.Auto |
| } |
| + if errors.Is(s.SandboxConfigErr, execsandbox.ErrUnset) { |
| + state.Configured = execsandbox.Unset |
| + } |
| if state.Effective == execsandbox.EffectiveGVisor { |
| if lock, err := execsandbox.LoadRunscLock(); err == nil { |
| state.RunscVersion = lock.Release |
diff --git a/internal/instancectl/sandbox_unset_test.go b/internal/instancectl/sandbox_unset_test.go| new file mode 100644 |
| index 000000000..cc74ffd35 |
| --- /dev/null |
| +++ b/internal/instancectl/sandbox_unset_test.go |
| @@ -0,0 +1,63 @@ |
| +package instancectl |
| + |
| +import ( |
| + "context" |
| + "encoding/json" |
| + "errors" |
| + "net/http" |
| + "net/http/httptest" |
| + "strings" |
| + "testing" |
| + |
| + "github.com/carlosframework/platform/internal/execsandbox" |
| +) |
| + |
| +// TestDemoBoxUnsetSandboxRefusesAdmission (gVisor flagship plan, slice |
| +// 2.1): root's control service built the way runWithClaim builds it, from a |
| +// demo box's environment that names no sandbox (or says auto), admits no |
| +// demo start and no build, and its /ready says the sandbox is unset. The |
| +// same box with an explicit systemd passes the sandbox gate. |
| +func TestDemoBoxUnsetSandboxRefusesAdmission(t *testing.T) { |
| + for _, mode := range []string{"", "auto", "systemd"} { |
| + t.Run("mode="+mode, func(t *testing.T) { |
| + env := map[string]string{"CARLOS_DEMO_BOX": "1", "CARLOS_DEMO_ACCOUNT": "demo", "CARLOS_DEMO_FLEET": "demo", "CARLOS_DEMO_DOMAIN": "demo.example", "CARLOS_EXEC_SANDBOX": mode} |
| + get := func(k string) string { return env[k] } |
| + settings := SandboxSettingsFromEnvironment(get) |
| + cfg, _, err := ControlConfig(get, settings) |
| + if err != nil { |
| + t.Fatalf("control configuration refused: %v", err) |
| + } |
| + s := &Server{SandboxConfigured: settings.Configured, SandboxEffective: settings.Effective, SandboxConfigErr: settings.Err, DemoBox: cfg.BoxMode(), DemoConfig: cfg} |
| + h := s.Handler() |
| + unset := mode != "systemd" |
| + for _, door := range []struct{ method, path string }{ |
| + {"POST", "/start?host=bright-otter-42.demo.example&role=run"}, |
| + {"POST", "/demo-build"}, |
| + {"GET", "/demo-build/ready"}, |
| + } { |
| + w := httptest.NewRecorder() |
| + h.ServeHTTP(w, httptest.NewRequest(door.method, door.path, strings.NewReader("{}"))) |
| + refused := w.Code == http.StatusServiceUnavailable && strings.Contains(w.Body.String(), execsandbox.ErrUnset.Error()) |
| + if refused != unset { |
| + t.Fatalf("%s %s: %d %q; want refused as unset %v", door.method, door.path, w.Code, w.Body, unset) |
| + } |
| + } |
| + w := httptest.NewRecorder() |
| + h.ServeHTTP(w, httptest.NewRequest("GET", "/ready", nil)) |
| + var rep ProbeReport |
| + if err := json.Unmarshal(w.Body.Bytes(), &rep); err != nil || rep.ExecSandbox == nil { |
| + t.Fatalf("/ready: %d %s %v", w.Code, w.Body, err) |
| + } |
| + if unset { |
| + if w.Code != http.StatusServiceUnavailable || rep.ExecSandbox.Configured != execsandbox.Unset || rep.ExecSandbox.Ready || rep.ExecSandbox.Blocked != execsandbox.ErrUnset.Error() { |
| + t.Fatalf("/ready: %d %+v; want not ready, configured unset", w.Code, *rep.ExecSandbox) |
| + } |
| + if _, err := s.SandboxBuildFamily(context.Background()); !errors.Is(err, execsandbox.ErrUnset) { |
| + t.Fatalf("build family: %v", err) |
| + } |
| + } else if rep.ExecSandbox.Configured != execsandbox.Systemd || rep.ExecSandbox.Blocked == execsandbox.ErrUnset.Error() { |
| + t.Fatalf("/ready: %+v; want configured systemd", *rep.ExecSandbox) |
| + } |
| + }) |
| + } |
| +} |
diff --git a/internal/provision/gvisor_slice2_census_test.go b/internal/provision/gvisor_slice2_census_test.go| new file mode 100644 |
| index 000000000..3e3d088c2 |
| --- /dev/null |
| +++ b/internal/provision/gvisor_slice2_census_test.go |
| @@ -0,0 +1,35 @@ |
| +package provision |
| + |
| +// gvisorSlice2WriteCensusInventory is the record-write census for the |
| +// gVisor flagship plan's slice 2 (branch gvisor-slice2-explicit-mode), |
| +// layered on s3Polling3WriteCensusInventory (main's newest at the merge of |
| +// origin/main e210550b; the branch was first written on |
| +// fleetUpdateHoldWriteCensusInventory, and s3-polling-3 does not touch |
| +// var routeDecls). Reviewed by the branch author against the |
| +// source. No record is written: |
| +// |
| +// - var routeDecls (re-pinned, key-site): one new door, |
| +// PUT /api/cli/system/demos/sandbox-intent (kindCLI, no service role), |
| +// which writes one column of the console's own demo_settings row. No |
| +// key site moves; class and kinds as before. |
| +func gvisorSlice2WriteCensusInventory() []censusEntry { |
| + entries := append([]censusEntry(nil), huntReleaseChainWriteCensusInventory()...) |
| + for _, r := range []censusEntry{ |
| + {"internal/console/routedecls.go", "var routeDecls", "key-site", "lit:instances,lit:sidecars", "d583c0485232784932f057a7038ff93656b633cb16dd745fcfb733cdf6de24a5"}, |
| + } { |
| + replaced := 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("gvisor-slice2 census: classification changed for " + r.File + ":" + r.Unit) |
| + } |
| + entries[i], replaced = r, true |
| + break |
| + } |
| + } |
| + if !replaced { |
| + panic("gvisor-slice2 census: re-pin of an unlisted unit " + r.File + ":" + r.Unit) |
| + } |
| + } |
| + return entries |
| +} |
diff --git a/internal/provision/plan9_b8_census_test.go b/internal/provision/plan9_b8_census_test.go| index 5604f5c2d..030309ab8 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 := huntReleaseChainWriteCensusInventory() |
| + inventory := gvisorSlice2WriteCensusInventory() |
| 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/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv| index 381fa5e3a..1c4aee039 100644 |
| --- a/internal/provision/testdata/plan14-root-reads-chain.tsv |
| +++ b/internal/provision/testdata/plan14-root-reads-chain.tsv |
| @@ -309,3 +309,4 @@ plan14-root-reads-s3-polling-3.tsv 5933c519749247288b20f5d6e2398879ac7209d1bfeff |
| plan14-root-reads-sec-console-dos.tsv 5933c519749247288b20f5d6e2398879ac7209d1bfeff2fb0d93d14b426f9e2f |
| plan14-root-reads-hunt-release-chain-integrity.tsv ed1957bc7d18714e39984e757b73b8c590f1a2a924ca35e20e9041fc09f2ca78 |
| plan14-root-reads-moved-at-floor-v0-44-1.tsv ed1957bc7d18714e39984e757b73b8c590f1a2a924ca35e20e9041fc09f2ca78 |
| +plan14-root-reads-gvisor-slice2-explicit-mode.tsv ed1957bc7d18714e39984e757b73b8c590f1a2a924ca35e20e9041fc09f2ca78 |
diff --git a/internal/provision/testdata/plan14-root-reads-gvisor-slice2-explicit-mode.tsv b/internal/provision/testdata/plan14-root-reads-gvisor-slice2-explicit-mode.tsv| new file mode 100644 |
| index 000000000..9df299a55 |
| --- /dev/null |
| +++ b/internal/provision/testdata/plan14-root-reads-gvisor-slice2-explicit-mode.tsv |
| @@ -0,0 +1,5 @@ |
| +# Census overlay gvisor-slice2-explicit-mode, written by census-propose (#369). census-ruling-gvisor-slice2-explicit-mode, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-gvisor-slice2-explicit-mode.md. |
| +# 0 body, 0 sites, 3 envelope: each changed unit re-frozen at its existing disposition with its claim appended. |
| +@coverage . a7f783a1d2b865ebf193faf9c0485bf28cb8154c4da59ae7b5c95340c39fa09f |
| +@coverage internal/execsandbox d7682308253599e7d6c90e58f30fed19aa75d5ace20aa201cd474c02a3461d2d |
| +@coverage internal/instancectl d013cec2669b0cbf7b3422df6450d96610d708d3e90b1d0f9e0c2922cc2d6295 |
diff --git a/parity/cli.tsv b/parity/cli.tsv| index ed2441888..981442156 100644 |
| --- a/parity/cli.tsv |
| +++ b/parity/cli.tsv |
| @@ -287,6 +287,7 @@ system cancel-activation operator - - - - - |
| system db-worker box-local - - - - - |
| system demos reports operator - - - - - |
| system demos reports resolve operator - - - - - |
| +system demos sandbox-intent operator - - - - - |
| system demos serving operator - - - - - |
| system demos status operator - - - - - |
| system demos takedown operator - - - - - |
diff --git a/parity/parity.tsv b/parity/parity.tsv| index 7c3a31082..a40076a32 100644 |
| --- a/parity/parity.tsv |
| +++ b/parity/parity.tsv |
| @@ -236,7 +236,7 @@ op-system-geoip operator operator system geoip publish ; system geoip status ; s |
| op-system-cutovers operator operator system seeds-floor publish ; system legacy-routes assign ; system lifetimes cutover ; system hosts-used status One-off cutovers and floors. |
| op-system-roles operator operator system box role ; system group role Box and group roles. |
| op-system-group-roll operator operator system group plan ; system group status ; system group roll ; system group resume ; system group rollback ; system group return ; system group abandon ; system group close-lost ; system group replace ; system group remove ; system group cancel-drain ; system group probe start ; system group probe resume ; system group probe status ; system group probe abandon ; system group probe close-lost Group maintenance from an operator machine. |
| -op-system-demos operator operator system demos status ; system demos serving ; system demos takedown ; system demos takedown-status ; system demos reports ; system demos reports resolve Demo serving, takedowns and reports. |
| +op-system-demos operator operator system demos status ; system demos serving ; system demos takedown ; system demos takedown-status ; system demos sandbox-intent ; system demos reports ; system demos reports resolve Demo serving, takedowns and reports. |
| op-system-managed-fleets operator operator system managed-fleets show ; system managed-fleets set The managed-fleet catalog. |
| op-system-named-units operator operator system named-units put ; system named-units show A fixed box's named-unit declarations, through its parameter. |
| op-link operator operator link create ; link status ; link publish ; link unpublish ; link rotate ; link remove Operator only: a link speaks for the whole deployment, so its doors need a system operator (apiSystemRoller). |
diff --git a/status_instances.go b/status_instances.go| index 0e12a0e5c..67a91c4ef 100644 |
| --- a/status_instances.go |
| +++ b/status_instances.go |
| @@ -395,6 +395,10 @@ func sandboxWord(value string) string { |
| return value |
| } |
| +// execSandboxUnsetLine is the exec-sandbox line of a demo box that names |
| +// no sandbox (gVisor flagship plan, slice 2.1). |
| +const execSandboxUnsetLine = "unset on a demo box" |
| + |
| func printExecSandboxStatus(w io.Writer, boxes []statusLayoutBox) { |
| sorted := append([]statusLayoutBox(nil), boxes...) |
| sort.Slice(sorted, func(i, j int) bool { return sorted[i].Box < sorted[j].Box }) |
| @@ -404,6 +408,10 @@ func printExecSandboxStatus(w io.Writer, boxes []statusLayoutBox) { |
| fmt.Fprintf(w, "%s exec-sandbox: unknown (stale report)\n", b.Box) |
| case b.ExecSandbox == nil: |
| fmt.Fprintf(w, "%s exec-sandbox: unknown\n", b.Box) |
| + case b.ExecSandbox.Configured == "unset": |
| + // Root says so only for a demo box whose host.env names no |
| + // sandbox: it admits no demos until it says gvisor or systemd. |
| + fmt.Fprintf(w, "%s exec-sandbox: %s\n", b.Box, execSandboxUnsetLine) |
| default: |
| s := b.ExecSandbox |
| fmt.Fprintf(w, "%s exec-sandbox: configured=%s effective=%s ready=%t", b.Box, sandboxWord(s.Configured), sandboxWord(s.Effective), s.Ready) |
diff --git a/status_instances_test.go b/status_instances_test.go| index 41d8ec10d..069480ea5 100644 |
| --- a/status_instances_test.go |
| +++ b/status_instances_test.go |
| @@ -303,18 +303,20 @@ func TestStatusLayoutShowsSize(t *testing.T) { |
| func TestStatusLayoutSandbox(t *testing.T) { |
| var boxes []statusLayoutBox |
| - raw := `[{"box":"fresh","exec_sandbox":{"configured":"auto","effective":"gvisor","runsc":{"version":"release-20261102.0","sha256":"pin"},"ready":false,"blocked":"probe-blocked"},"rows":[{"host":"demo.example.com","layout":"nested","size":"small","sandbox":"gvisor"},{"host":"sleep.example.com","layout":"nested"}]},{"box":"old","rows":[]},{"box":"stale","stale":true,"exec_sandbox":{"configured":"gvisor","effective":"gvisor","ready":true},"rows":[]}]` |
| + raw := `[{"box":"fresh","exec_sandbox":{"configured":"auto","effective":"gvisor","runsc":{"version":"release-20261102.0","sha256":"pin"},"ready":false,"blocked":"probe-blocked"},"rows":[{"host":"demo.example.com","layout":"nested","size":"small","sandbox":"gvisor"},{"host":"sleep.example.com","layout":"nested"}]},{"box":"old","rows":[]},{"box":"stale","stale":true,"exec_sandbox":{"configured":"gvisor","effective":"gvisor","ready":true},"rows":[]},{"box":"unset","exec_sandbox":{"configured":"unset","effective":"systemd","ready":false,"blocked":"EXEC-SANDBOX-UNSET"},"rows":[]}]` |
| if err := json.Unmarshal([]byte(raw), &boxes); err != nil { |
| t.Fatal(err) |
| } |
| var out bytes.Buffer |
| printStatusLayout(&out, boxes) |
| - for _, want := range []string{"LAYOUT INSTANCE-SANDBOX SIZE", "nested gvisor small", "nested -", "fresh exec-sandbox: configured=auto effective=gvisor ready=false runsc=release-20261102.0 sha256=pin blocked=probe-blocked", "old exec-sandbox: unknown", "stale exec-sandbox: unknown (stale report)"} { |
| + for _, want := range []string{"LAYOUT INSTANCE-SANDBOX SIZE", "nested gvisor small", "nested -", "fresh exec-sandbox: configured=auto effective=gvisor ready=false runsc=release-20261102.0 sha256=pin blocked=probe-blocked", "old exec-sandbox: unknown", "stale exec-sandbox: unknown (stale report)", |
| + // A demo box with no sandbox named (gVisor flagship plan, slice 2.1). |
| + "unset exec-sandbox: unset on a demo box\n"} { |
| if !strings.Contains(out.String(), want) { |
| t.Errorf("missing %q:\n%s", want, &out) |
| } |
| } |
| - if strings.Count(out.String(), "exec-sandbox:") != 3 { |
| + if strings.Count(out.String(), "exec-sandbox:") != 4 { |
| t.Fatalf("expected one line per box: %s", &out) |
| } |
| } |
diff --git a/system_demos.go b/system_demos.go| index 26a5c7ba9..774e06275 100644 |
| --- a/system_demos.go |
| +++ b/system_demos.go |
| @@ -17,6 +17,12 @@ import ( |
| const systemDemosHelp = "Manage anonymous demos: status, serving on or off, takedown, takedown-status, and reports. Commands use your configured console." |
| const systemDemosInvalid = "Check the command arguments. Run carlos system demos help." |
| +// The sandbox-intent leaf's words (gVisor flagship plan, slice 2.3). |
| +const ( |
| + systemDemosSandboxIntentHelp = "Usage: carlos system demos sandbox-intent gvisor|systemd [--console URL]\nSets the sandbox every demo box should run. The console alerts when a box runs another. Ops account owners only, with a sign-in from the last 5 minutes: run carlos auth login first." |
| + systemDemosSandboxIntentSet = "Demo sandbox intent: %s\n" |
| +) |
| + |
| // systemDemosCommand is `carlos system demos` (registry spec B6). Every |
| // leaf runs the manual loop below for the arguments after its word, and |
| // every error, an unknown verb included, is systemDemosInvalid with exit |
| @@ -31,6 +37,7 @@ func systemDemosCommand() *clireg.Node { |
| Audience: op, |
| Children: []*clireg.Node{ |
| verb("status"), verb("serving"), verb("takedown"), verb("takedown-status"), |
| + rawErr("sandbox-intent", op, runSystemDemosSandboxIntent), |
| { |
| Name: "reports", |
| Audience: op, |
| @@ -153,6 +160,47 @@ func runSystemDemos(verb string, rest []string) { |
| } |
| } |
| } |
| + |
| +// runSystemDemosSandboxIntent is `carlos system demos sandbox-intent |
| +// gvisor|systemd [--console URL]`: the sandbox the console expects every |
| +// demo box to run. The console's door decides who may (an ops account |
| +// owner, freshly signed in) and audits it. |
| +func runSystemDemosSandboxIntent(args []string) error { |
| + if len(args) == 1 && (args[0] == "help" || args[0] == "--help" || args[0] == "-h") { |
| + fmt.Fprintln(stdout, systemDemosSandboxIntentHelp) |
| + return nil |
| + } |
| + invalid := func() error { fmt.Fprintln(os.Stderr, systemDemosInvalid); return exitCode(2) } |
| + intent, console := "", "" |
| + for len(args) > 0 { |
| + switch { |
| + case (args[0] == "--console" || args[0] == "-console") && len(args) > 1 && console == "": |
| + console, args = args[1], args[2:] |
| + case (args[0] == "gvisor" || args[0] == "systemd") && intent == "": |
| + intent, args = args[0], args[1:] |
| + default: |
| + return invalid() |
| + } |
| + } |
| + if intent == "" { |
| + return invalid() |
| + } |
| + sess, err := resolveMode(console) |
| + if err != nil { |
| + return err |
| + } |
| + if sess == nil { |
| + fmt.Fprintln(os.Stderr, systemDemosHelp) |
| + return exitCode(1) |
| + } |
| + got, err := sess.systemDemosSandboxIntent(context.Background(), intent) |
| + if err != nil { |
| + return &exitError{code: 1, err: err} |
| + } |
| + fmt.Fprintf(stdout, systemDemosSandboxIntentSet, got) |
| + return nil |
| +} |
| + |
| func printDemoServing(d systemDemoView) { |
| desired, confirmed := "Off", "Pending" |
| if d.ServingDesired { |
diff --git a/system_demos_api.go b/system_demos_api.go| index cb5841c36..730788929 100644 |
| --- a/system_demos_api.go |
| +++ b/system_demos_api.go |
| @@ -59,6 +59,27 @@ func (s *apiSession) systemDemos(ctx context.Context, verb, host string, enabled |
| return out, err |
| } |
| +// systemDemosSandboxIntent sets the demo boxes' sandbox intent and returns |
| +// the console's record of it. |
| +func (s *apiSession) systemDemosSandboxIntent(ctx context.Context, intent string) (string, error) { |
| + code, raw, err := s.sendJSON(ctx, http.MethodPut, "/api/cli/system/demos/sandbox-intent", struct { |
| + Intent string `json:"intent"` |
| + }{intent}) |
| + if err != nil { |
| + return "", err |
| + } |
| + if code != http.StatusOK { |
| + return "", apiErrorFromBody(code, raw) |
| + } |
| + var out struct { |
| + Intent string `json:"intent"` |
| + } |
| + if err := json.Unmarshal(raw, &out); err != nil { |
| + return "", err |
| + } |
| + return out.Intent, nil |
| +} |
| + |
| type systemDemoReports struct { |
| Reports []struct { |
| ID string `json:"id"` |
diff --git a/system_demos_test.go b/system_demos_test.go| index 2f61e5b5f..f7abb99ee 100644 |
| --- a/system_demos_test.go |
| +++ b/system_demos_test.go |
| @@ -147,3 +147,63 @@ func TestSystemDemosReports(t *testing.T) { |
| } |
| } |
| } |
| + |
| +// TestSystemDemosSandboxIntent (gVisor flagship plan, slice 2.3): carlos |
| +// system demos sandbox-intent gvisor|systemd sends the intent to the |
| +// console's door and says what it is now; anything else is a usage error, |
| +// and the console's refusal is shown as it said it. |
| +func TestSystemDemosSandboxIntent(t *testing.T) { |
| + bin := buildCarlos(t) |
| + var mu sync.Mutex |
| + var requests []string |
| + status, body := 200, `{"intent":"gvisor"}` |
| + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { |
| + b, _ := io.ReadAll(r.Body) |
| + mu.Lock() |
| + defer mu.Unlock() |
| + requests = append(requests, r.Method+" "+r.URL.RequestURI()+" "+string(b)) |
| + w.WriteHeader(status) |
| + io.WriteString(w, body) |
| + })) |
| + defer ts.Close() |
| + cred := filepath.Join(t.TempDir(), "credentials") |
| + raw, _ := json.Marshal(map[string]any{"version": 1, "credentials": []any{map[string]string{"console": ts.URL, "address": "owner@example.com", "token": "tok-owner"}}}) |
| + if err := os.WriteFile(cred, raw, 0600); err != nil { |
| + t.Fatal(err) |
| + } |
| + run := func(args ...string) (string, int) { |
| + cmd := exec.Command(bin, append([]string{"system", "demos", "sandbox-intent"}, args...)...) |
| + cmd.Env = carlosTestEnv(t, "CARLOS_CREDENTIALS="+cred) |
| + cmd.Dir = t.TempDir() |
| + b, err := cmd.CombinedOutput() |
| + if err == nil { |
| + return string(b), 0 |
| + } |
| + if e, ok := err.(*exec.ExitError); ok { |
| + return string(b), e.ExitCode() |
| + } |
| + t.Fatal(err) |
| + return "", -1 |
| + } |
| + if out, code := run("help"); code != 0 || out != systemDemosSandboxIntentHelp+"\n" { |
| + t.Fatalf("help: code=%d output=%q", code, out) |
| + } |
| + out, code := run("gvisor") |
| + mu.Lock() |
| + got := requests[len(requests)-1] |
| + mu.Unlock() |
| + if code != 0 || out != "Demo sandbox intent: gvisor\n" || got != `PUT /api/cli/system/demos/sandbox-intent {"intent":"gvisor"}` { |
| + t.Fatalf("gvisor: code=%d %q; request %q", code, out, got) |
| + } |
| + for _, args := range [][]string{{}, {"auto"}, {"GVISOR"}, {"gvisor", "systemd"}, {"systemd", "--registry", "x.db"}} { |
| + if out, code := run(args...); code != 2 || !strings.Contains(out, systemDemosInvalid) { |
| + t.Fatalf("usage %v: %d %s", args, code, out) |
| + } |
| + } |
| + mu.Lock() |
| + status, body = 403, `{"error":"Changing the demo sandbox needs a fresh sign-in."}` |
| + mu.Unlock() |
| + if out, code := run("systemd"); code != 1 || !strings.Contains(out, "Changing the demo sandbox needs a fresh sign-in.") { |
| + t.Fatalf("refused: %d %s", code, out) |
| + } |
| +} |
diff --git a/testdata/clireg-golden.jsonl b/testdata/clireg-golden.jsonl| index 12907de9e..4963b0609 100644 |
| --- a/testdata/clireg-golden.jsonl |
| +++ b/testdata/clireg-golden.jsonl |
| @@ -949,6 +949,8 @@ |
| {"case":"system demos reports | bare","argv":["system","demos","reports"],"exit":1,"stdout":"","stderr":"no deployment target configured: set CARLOS_DEPLOYMENT_BUCKET (or CARLOS_DEPLOYMENT_DIR) for direct bucket access, or run carlos auth login --console <url> to work through a console\n"} |
| {"case":"system demos reports | help","argv":["system","demos","reports","help"],"exit":2,"stdout":"","stderr":"Check the command arguments. Run carlos system demos help.\n"} |
| {"case":"system demos reports | zz-unknown","argv":["system","demos","reports","zz-unknown"],"exit":2,"stdout":"","stderr":"Check the command arguments. Run carlos system demos help.\n"} |
| +{"case":"system demos sandbox-intent | --zz-unknown-flag","argv":["system","demos","sandbox-intent","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"Check the command arguments. Run carlos system demos help.\n"} |
| +{"case":"system demos sandbox-intent | -h","argv":["system","demos","sandbox-intent","-h"],"exit":0,"stdout":"Usage: carlos system demos sandbox-intent gvisor|systemd [--console URL]\nSets the sandbox every demo box should run. The console alerts when a box runs another. Ops account owners only, with a sign-in from the last 5 minutes: run carlos auth login first.\n","stderr":""} |
| {"case":"system demos serving maybe | extra","argv":["system","demos","serving","maybe"],"exit":2,"stdout":"","stderr":"Check the command arguments. Run carlos system demos help.\n"} |
| {"case":"system demos serving | --zz-unknown-flag","argv":["system","demos","serving","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"Check the command arguments. Run carlos system demos help.\n"} |
| {"case":"system demos serving | -h","argv":["system","demos","serving","-h"],"exit":2,"stdout":"","stderr":"Check the command arguments. Run carlos system demos help.\n"} |