oficina / equipo Public

awsjob: audit the connector, tighten the guard, refuse non-ASCII payloads

The network audit now reads the egress connector through lambdacore
GetNetworkConnector, by a version-qualified ARN that Config requires, and
fails unless that version is an ACTIVE VPC_EGRESS connector for MicroVMs
whose subnets and security groups are exactly the configured ones, with
no service-managed Elastic IP addresses.

The provider guard folds only generated test variants, known by ForTest,
so an ordinary package named like awsjob_test is judged as itself.

Launch refuses a bootstrap with any byte outside ASCII, which the SDK's
JSON encoding would otherwise change; a test sends every ASCII byte
through the real serializer and reads it back unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 03c2ba20c56f53546c36aa2b759150fd4d57387d parent 39cd8c0
9 files changed, +407 −47
  • docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md +18 −0
  • go.mod +1 −0
  • go.sum +2 −0
  • internal/isolatedjob/awsjob/live_test.go +3 −2
  • internal/isolatedjob/awsjob/network.go +46 −3
  • internal/isolatedjob/awsjob/network_test.go +102 −1
  • internal/isolatedjob/awsjob/runner.go +55 −13
  • internal/isolatedjob/awsjob/runner_test.go +82 −5
  • internal/isolatedjob/providerguard_test.go +98 −23

CI cancelled — superseded by a newer push — run details

CI log
=== prepare ===
ci-box: machine: aarch64, 32 CPUs, 62 GiB memory, kernel 7.0.0-1017-aws
ci-box: python 3.12.3; Docker version 29.1.3, build 29.1.3-0ubuntu3~24.04.2
ci-box: user namespaces allowed: 233151
ci-box: cgroup: cgroup2fs
ci-box: disk /home/ci/work/repos/oficina__equipo/wt/hosted-runners-1a: Type  Size Avail | ext4   96G   86G
ci-box: disk /home/ci/.cache/equipo-ci-box: Type  Size Avail | ext4   96G   86G
ci-box: bwrap: fetched and verified in 0.3s
ci-box: claude: fetched and verified in 1.4s
ci-box: codex: fetched and verified in 3.4s
ci-box: codex-code-mode-host: fetched and verified in 1.3s
ci-box: libwrap: fetched and verified in 0.3s
ci-box: socat: fetched and verified in 0.3s
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
ci-box: image pulled in 9.8s
ci-box: pi: installed and verified in 7.3s
ci-box: opencode: installed and verified in 1.9s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 8.7s
ci-box: clone deepened in 3.3s
ci-box: file times set from content: 2862 files, 190 directories
ci-box: ready in 16.3s
=== copy ===
EQUIPO_RELEASE_COPY_CHECK=1 CGO_ENABLED=0 go test ./internal/equipotest -run '^TestReleaseCopyReviewed$' -count=1
ok  	amadan.net/oficina/equipo/internal/equipotest	0.248s
=== compile ===
go build ./...
go: downloading github.com/aws/aws-sdk-go-v2/service/lambdacore v1.14.0
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py compile
+ go build -tags testbuild ./...
  1.1s
+ go list -export -test -tags testbuild -f  ./...
  0.8s
+ go list -export -test -tags browser,testbuild -f  ./internal/equipo ./internal/headless ./internal/idtest ./internal/plan3test ./internal/thintest
  0.3s
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -version
staticcheck 2026.1 (v0.7.0)
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 -version
Go: go1.26.11
Scanner: govulncheck@v1.8.0
DB: https://vuln.go.dev
DB updated: 2026-11-11 02:51:11 +0000 UTC

go run github.com/zricethezav/gitleaks/v8@v8.30.1 version
version is set by build process
=== check ===
--- shard 0 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-work: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadless$/^4c_rebase$|^TestHeadless$/^4b_ask$|^TestHeadless$/^4c_checks_card$|^TestHeadless$/^4_step_crash$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m22.766s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m21.098s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m21.1s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 39.05, cpu waiting 22.79%, memory waiting 0.00%, io waiting 0.50%
--- shard 1 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-review: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadless$/^4_review$|^TestHeadless$/^2b_access$|^TestHeadless$/^runner_crash$|^TestHeadless$/^2b_first_message$|^TestHeadless$/^4_checks_honest$|^TestHeadless$/^7_stream_resume$|^TestHeadless$/^2b_notebook$|^TestHeadless$/^2b_move_in$|^TestHeadless$/^2b_desk_failure$|^TestHeadless$/^cancel$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m23.72s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m21.987s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m21.99s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 39.05, cpu waiting 22.79%, memory waiting 0.00%, io waiting 0.50%
--- shard 2 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-connections: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadlessConnections$|^TestHeadlessTokenPasteEndToEnd$|^TestHeadlessTokenConnection$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m25.541s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m23.385s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m12.6s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 5.9s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 4.88s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 39.05, cpu waiting 22.44%, memory waiting 0.00%, io waiting 0.48%
--- shard 3 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-mac: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestMacWorker$|^TestHeadlessAttachments$|^TestHeadlessPrewarm$|^TestHeadless$/^1_first_token$|^TestHeadless$/^6_quick_messages$|^TestHeadless$/^8_instance_restart$|^TestHeadless$/^3_runner_offline$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m19.922s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m18.261s amadan.net/oficina/equipo/internal/headless
receipt: slow test 37.74s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 20.42s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 10.48s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
receipt: slow test 9.62s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
machine: 32 CPUs, load 38.97, cpu waiting 22.99%, memory waiting 0.00%, io waiting 0.54%
--- shard 4 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-guards: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadlessCopyRotation$|^TestHeadlessPolicyGuards$|^TestHeadlessRunnerKillLeavesNoCopies$|^TestHeadlessNewHouseRuleStartsFresh$|^TestHeadless$/^3_engineering$|^TestHeadless$/^3_step_cancel$|^TestHeadless$/^3_step_contained$|^TestHeadless$/^3_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m38.112s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m36.478s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m0.54s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 11.24s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 9.96s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 8.82s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 5.91s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
machine: 32 CPUs, load 35.43, cpu waiting 19.06%, memory waiting 0.00%, io waiting 0.39%
--- shard 5 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-rest: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^TestHeadless$/^4c_rebase$|^TestHeadless$/^4b_ask$|^TestHeadless$/^4c_checks_card$|^TestHeadless$/^4_step_crash$|^TestHeadless$/^4_review$|^TestHeadless$/^2b_access$|^TestHeadless$/^runner_crash$|^TestHeadless$/^2b_first_message$|^TestHeadless$/^4_checks_honest$|^TestHeadless$/^7_stream_resume$|^TestHeadless$/^2b_notebook$|^TestHeadless$/^2b_move_in$|^TestHeadless$/^2b_desk_failure$|^TestHeadless$/^cancel$|^TestHeadlessConnections$|^TestHeadlessTokenPasteEndToEnd$|^TestHeadlessTokenConnection$|^TestMacWorker$|^TestHeadlessAttachments$|^TestHeadlessPrewarm$|^TestHeadless$/^1_first_token$|^TestHeadless$/^6_quick_messages$|^TestHeadless$/^8_instance_restart$|^TestHeadless$/^3_runner_offline$|^TestHeadlessCopyRotation$|^TestHeadlessPolicyGuards$|^TestHeadlessRunnerKillLeavesNoCopies$|^TestHeadlessNewHouseRuleStartsFresh$|^TestHeadless$/^3_engineering$|^TestHeadless$/^3_step_cancel$|^TestHeadless$/^3_step_contained$|^TestHeadless$/^3_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

amadan: job cancelled — a newer push superseded it
--- shard 6 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane thintest: ./internal/thintest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test([^C]|C[^o]|Co[^n]|Con[^t])|^TestContract(Assistant|Outcome|Team|Handoff|HostAllowlist|HostIsPerPerson|Look|Use[A-Z]|RemoteCall|LanesRunAtOnce|NoMergeQuestionWhenGateMerges|PreviewHeldUntilPublishAnswer|PreviewNotHeldBelow19|PublishNeedsOwnerAnswer)' ./internal/thintest

receipt: test step 1.114s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 2m1.624s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 7.84s amadan.net/oficina/equipo/internal/thintest TestContractTeamJobSettledStates
receipt: slow test 6.74s amadan.net/oficina/equipo/internal/thintest TestExplorePreviewsOff
receipt: slow test 4.31s amadan.net/oficina/equipo/internal/thintest TestContractTeamUpdatePersonNeeds
receipt: slow test 3.81s amadan.net/oficina/equipo/internal/thintest TestContractPreviewHeldUntilPublishAnswer
receipt: slow test 3.52s amadan.net/oficina/equipo/internal/thintest TestContractTeamNudgePersonNeeds
machine: 32 CPUs, load 9.25, cpu waiting 0.45%, memory waiting 0.00%, io waiting 1.99%
--- shard 7 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane thintest-contract: ./internal/thintest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^Test([^C]|C[^o]|Co[^n]|Con[^t])|^TestContract(Assistant|Outcome|Team|Handoff|HostAllowlist|HostIsPerPerson|Look|Use[A-Z]|RemoteCall|LanesRunAtOnce|NoMergeQuestionWhenGateMerges|PreviewHeldUntilPublishAnswer|PreviewNotHeldBelow19|PublishNeedsOwnerAnswer)' ./internal/thintest

receipt: test step 1.047s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1m26.784s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 9.08s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 5.03s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotOffered
receipt: slow test 4.41s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
receipt: slow test 2.4s amadan.net/oficina/equipo/internal/thintest TestContractPreview
receipt: slow test 2.34s amadan.net/oficina/equipo/internal/thintest TestContractPublishNameTaken
machine: 32 CPUs, load 1.17, cpu waiting 0.45%, memory waiting 0.00%, io waiting 1.99%
--- shard 8 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-thin: ./internal/runner/thin
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./internal/runner/thin
cache miss: amadan.net/oficina/equipo/internal/runner/thin: its inputs changed

amadan: job cancelled — a newer push superseded it
--- shard 9 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-bug: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestDirectBugWorkflow$|^TestEnrolKeepsTheRole$' ./internal/runner
cache miss: amadan.net/oficina/equipo/internal/runner: its inputs changed

receipt: test step 47.415s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 46.276s amadan.net/oficina/equipo/internal/runner
receipt: slow test 26.25s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.02s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 37.73, cpu waiting 21.97%, memory waiting 0.00%, io waiting 0.92%
--- shard 10 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-plans: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestPlanWorkflowCandidateOrder$|^TestPlanWorkflowFeature$|^TestCoordinatorRecoveryCallRefusalKeepsServing$|^TestCoordinatorRefusalMatrix$' ./internal/runner
cache miss: amadan.net/oficina/equipo/internal/runner: its inputs changed

receipt: test step 48.225s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 46.331s amadan.net/oficina/equipo/internal/runner
receipt: slow test 36.45s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 31.7s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.37s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.49s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 37.73, cpu waiting 21.97%, memory waiting 0.00%, io waiting 0.92%
--- shard 11 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-rest: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^TestDirectBugWorkflow$|^TestEnrolKeepsTheRole$|^TestPlanWorkflowCandidateOrder$|^TestPlanWorkflowFeature$|^TestCoordinatorRecoveryCallRefusalKeepsServing$|^TestCoordinatorRefusalMatrix$' ./internal/runner
cache miss: amadan.net/oficina/equipo/internal/runner: its inputs changed

receipt: test step 35.091s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 34.236s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.12s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.15s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.12s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 2.55s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 1.61s amadan.net/oficina/equipo/internal/runner TestReportPostsRetryExactRequest
machine: 32 CPUs, load 27.37, cpu waiting 15.43%, memory waiting 0.00%, io waiting 1.13%
--- shard 12 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-a started 30s late; cpu waiting 28.2%, load 23.22
test lane equipotest-a: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test[A-D]|^TestQ' ./internal/equipotest
cache miss: amadan.net/oficina/equipo/internal/equipotest: its inputs changed

receipt: test step 1m3.529s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m1.848s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 26s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 25.84s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 23.99s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 21.63s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
receipt: slow test 21.29s amadan.net/oficina/equipo/internal/equipotest TestAuthorityRejectsMismatchedTarget
machine: 32 CPUs, load 37.64, cpu waiting 20.23%, memory waiting 0.00%, io waiting 0.42%
--- shard 13 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-e started 30s late; cpu waiting 28.2%, load 23.22
test lane equipotest-e: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test[E-P]' ./internal/equipotest

receipt: test step 1.307s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1m12.399s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 19.2s amadan.net/oficina/equipo/internal/equipotest TestProjectWritesRequireCurrentOwner
receipt: slow test 19.12s amadan.net/oficina/equipo/internal/equipotest TestProjectOwnersAreMembers
receipt: slow test 19.11s amadan.net/oficina/equipo/internal/equipotest TestProjectsReopen
receipt: slow test 19.11s amadan.net/oficina/equipo/internal/equipotest TestProjectRetryAndRevision
receipt: slow test 19.08s amadan.net/oficina/equipo/internal/equipotest TestProjectsFailuresRollBack
machine: 32 CPUs, load 27.37, cpu waiting 12.08%, memory waiting 0.00%, io waiting 1.20%
--- shard 14 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-r started 30s late; cpu waiting 28.2%, load 23.22
test lane equipotest-r: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestR' ./internal/equipotest
cache miss: amadan.net/oficina/equipo/internal/equipotest: its inputs changed

receipt: test step 1m15.857s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m3.828s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 15.15s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 12.55s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 9.48s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 9.43s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 6.41s amadan.net/oficina/equipo/internal/equipotest TestRosterAuditFailureRollsBack
machine: 32 CPUs, load 32.91, cpu waiting 16.71%, memory waiting 0.00%, io waiting 0.34%
--- shard 15 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-rest started 30s late; cpu waiting 30.1%, load 23.22
test lane equipotest-rest: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^Test[A-D]|^TestQ|^Test[E-P]|^TestR' ./internal/equipotest
cache miss: amadan.net/oficina/equipo/internal/equipotest: its inputs changed

receipt: test step 1m6.436s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m4.549s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 24.4s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 23.38s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 23.27s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 21.71s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsRollbackAndUnavailable
receipt: slow test 21.61s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsUpgrade
machine: 32 CPUs, load 35.43, cpu waiting 19.06%, memory waiting 0.00%, io waiting 0.39%
--- shard 16 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: plan3test started 30s late; cpu waiting 30.1%, load 23.22
test lane plan3test: ./internal/plan3test
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./internal/plan3test

receipt: test step 546ms against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 48.756s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 3.61s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 3.41s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 1.5s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.47s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3A
receipt: slow test 1.21s amadan.net/oficina/equipo/internal/plan3test TestPlanMigrationUpgrade
machine: 32 CPUs, load 27.37, cpu waiting 12.08%, memory waiting 0.00%, io waiting 1.20%
--- shard 17 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: rest started 30s late; cpu waiting 28.2%, load 23.22
test lane rest: ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/push ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/hostedwire ./internal/idtest ./internal/isolatedjob ./internal/isolatedjob/awsjob ./internal/isolatedjob/guardfixture ./internal/isolatedjob/isolatedjobtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/push ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/hostedwire ./internal/idtest ./internal/isolatedjob ./internal/isolatedjob/awsjob ./internal/isolatedjob/guardfixture ./internal/isolatedjob/isolatedjobtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
cache miss: amadan.net/oficina/equipo/internal/copydesk: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/webread: its inputs changed
cache miss: amadan.net/oficina/equipo/cmd/equipo-runner: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/opencode: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/forge: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/equipo/team: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runnerproto: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/workspace: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/claude: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/codex: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/checks: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/containment: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/pi: its inputs changed
budget note: internal/equipo took 45.275s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/equipo/chat took 12.529s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/idtest took 39.84s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/release took 34.981s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/runner/containment took 39.658s, over the 15s its record on line 40 allows; reported only, timing fails on CI

receipt: test step 2m16.798s against a 60s target (the gate's other steps are not in this figure)
receipt: 16 packages ran, 48 cached, 20 without tests, 0 failed
receipt: slow package 53.668s amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow package 51.151s amadan.net/oficina/equipo/internal/runner/provider/pi
receipt: slow package 45.275s amadan.net/oficina/equipo/internal/equipo
receipt: slow package 39.84s amadan.net/oficina/equipo/internal/idtest
receipt: slow package 39.658s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 21.66s amadan.net/oficina/equipo/internal/runner/provider/opencode TestOpenCodeAcceptanceHostileRepository
receipt: slow test 14.84s amadan.net/oficina/equipo/internal/runner/containment TestEngineeringOfflineGo
receipt: slow test 10.89s amadan.net/oficina/equipo/internal/idtest TestIDCallbackGuardAndPendingNonce
receipt: slow test 10.82s amadan.net/oficina/equipo/internal/equipo TestAgentReadRechecksIdentity
receipt: slow test 9.52s amadan.net/oficina/equipo/internal/runner/containment TestEngineeringMissingModuleCache
machine: 32 CPUs, load 13.13, cpu waiting 5.97%, memory waiting 0.00%, io waiting 0.11%
--- shard 18 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-chat: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m22.936s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m21.455s amadan.net/oficina/equipo/internal/headless
receipt: slow test 37.31s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 15.21s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 10.64s amadan.net/oficina/equipo/internal/headless TestBrowserChat
receipt: slow test 7.71s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 5.95s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
machine: 32 CPUs, load 39.05, cpu waiting 22.79%, memory waiting 0.00%, io waiting 0.50%
--- shard 19 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-work: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m33.625s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m31.894s amadan.net/oficina/equipo/internal/headless
receipt: slow test 26.75s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 22.82s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 14.25s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 10.31s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
receipt: slow test 7.89s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
machine: 32 CPUs, load 37.64, cpu waiting 19.67%, memory waiting 0.00%, io waiting 0.41%
--- shard 20 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-connections: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m40.045s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m38.55s amadan.net/oficina/equipo/internal/headless
receipt: slow test 14.08s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 12.97s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 12.93s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 10.2s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
receipt: slow test 10.2s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsOpenCodeGoLimitRequired
machine: 32 CPUs, load 32.91, cpu waiting 17.83%, memory waiting 0.00%, io waiting 0.37%
--- shard 21 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-rest: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAskAfterMerge|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' ./internal/headless
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserCopyContinue
=== RUN   TestBrowserCopyContinue
time=2026-11-22T16:39:12.613Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-22T16:39:12.613Z level=INFO msg="startup phase done" phase=state_lock took=148µs
time=2026-11-22T16:39:12.613Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-22T16:39:12.613Z level=INFO msg="startup phase done" phase=claim_roots took=142µs
time=2026-11-22T16:39:12.613Z level=INFO msg="startup phase" phase=sweep
time=2026-11-22T16:39:12.645Z level=INFO msg="startup phase done" phase=sweep took=32.506ms
time=2026-11-22T16:39:12.646Z level=INFO msg="startup phase" phase=credentials
time=2026-11-22T16:39:12.646Z level=INFO msg="startup phase done" phase=credentials took=236µs
time=2026-11-22T16:39:12.646Z level=INFO msg="startup phase" phase=open_state
time=2026-11-22T16:39:12.693Z level=INFO msg="startup phase done" phase=open_state took=46.628ms
time=2026-11-22T16:39:12.693Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-22T16:39:12.694Z level=INFO msg=connecting host=127.0.0.1:43007 protocol=28
time=2026-11-22T16:39:12.695Z level=INFO msg=connected host=127.0.0.1:43007 took=1.084ms
time=2026-11-22T16:39:12.695Z level=INFO msg="capabilities gathering"
time=2026-11-22T16:39:12.696Z level=INFO msg="capabilities gathered" took=374µs tags=linux,claude,go
time=2026-11-22T16:39:12.697Z level=INFO msg="hello sent" protocol=28
time=2026-11-22T16:39:12.702Z level=INFO msg=welcome protocol=28 role=primary generation=1
    browser_copy_test.go:93: continue did not reach Checks: 0 <nil>
--- FAIL: TestBrowserCopyContinue (1.90s)

--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserEmptyExplore
=== RUN   TestBrowserEmptyExplore
time=2026-11-22T16:39:43.742Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-22T16:39:43.742Z level=INFO msg="startup phase done" phase=state_lock took=61µs
time=2026-11-22T16:39:43.742Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-22T16:39:43.742Z level=INFO msg="startup phase done" phase=claim_roots took=110µs
time=2026-11-22T16:39:43.742Z level=INFO msg="startup phase" phase=sweep
time=2026-11-22T16:39:43.772Z level=INFO msg="startup phase done" phase=sweep took=30.738ms
time=2026-11-22T16:39:43.772Z level=INFO msg="startup phase" phase=credentials
time=2026-11-22T16:39:43.773Z level=INFO msg="startup phase done" phase=credentials took=118µs
time=2026-11-22T16:39:43.773Z level=INFO msg="startup phase" phase=open_state
time=2026-11-22T16:39:43.817Z level=INFO msg="startup phase done" phase=open_state took=44.374ms
time=2026-11-22T16:39:43.817Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-22T16:39:43.818Z level=INFO msg=connecting host=127.0.0.1:43949 protocol=28
time=2026-11-22T16:39:43.820Z level=INFO msg=connected host=127.0.0.1:43949 took=1.449ms
time=2026-11-22T16:39:43.820Z level=INFO msg="capabilities gathering"
time=2026-11-22T16:39:43.822Z level=INFO msg="capabilities gathered" took=1.605ms tags=linux,claude,go
time=2026-11-22T16:39:43.822Z level=INFO msg="hello sent" protocol=28
time=2026-11-22T16:39:43.826Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-22T16:39:44.844Z level=INFO msg="connection checked" connection=claude-1 state=healthy
    browser_receipts_test.go:169: waiting for [...document.querySelectorAll('[equipo-markdown]:not([data-stream-text])')].some(e=>e.textContent.includes("I'm your coordinator")): context deadline exceeded (last evaluation: context deadline exceeded)
--- FAIL: TestBrowserEmptyExplore (5.82s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m27.88s
FAIL	amadan.net/oficina/equipo/internal/headless	88.159s


receipt: test step 1m29.194s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 0 cached, 0 without tests, 1 failed
receipt: slow package 1m27.88s amadan.net/oficina/equipo/internal/headless
receipt: slow test 15.25s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
receipt: slow test 11.64s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 10.61s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 10.42s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 8.08s amadan.net/oficina/equipo/internal/headless TestBrowserRefreshRace
exit status 1
+ go test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAskAfterMerge|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' -v -run '^TestBrowserCopyContinue$|^TestBrowserEmptyExplore$' -count=1 ./internal/headless   (retry, once)
##############################################################################
FLAKE ./internal/headless:TestBrowserCopyContinue browser-headless-rest 03c2ba20c56f53546c36aa2b759150fd4d57387d 1.90s 37.53
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
##############################################################################
FLAKE ./internal/headless:TestBrowserEmptyExplore browser-headless-rest 03c2ba20c56f53546c36aa2b759150fd4d57387d 5.82s 37.53
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 32.91, cpu waiting 17.83%, memory waiting 0.00%, io waiting 0.37%
--- shard 22 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-rest: ./internal/equipo
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserPreviewBlocksNavigation)$' ./internal/equipo

receipt: test step 1.035s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 573ms amadan.net/oficina/equipo/internal/equipo
receipt: slow test 570ms amadan.net/oficina/equipo/internal/equipo TestBrowserPreviewBlocksNavigation
browser lane browser-rest: ./internal/idtest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserOficinaIDDoor)$' ./internal/idtest

receipt: test step 825ms against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1.673s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 1.67s amadan.net/oficina/equipo/internal/idtest TestBrowserOficinaIDDoor
browser lane browser-rest: ./internal/plan3test
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestTeamsHierarchyBrowser)$' ./internal/plan3test

receipt: test step 199ms against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1.856s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 1.86s amadan.net/oficina/equipo/internal/plan3test TestTeamsHierarchyBrowser
browser lane browser-rest: ./internal/thintest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAccessEmojiByline|TestBrowserAccessFinalOutcomes|TestBrowserAccessRequest|TestBrowserAccessReview|TestBrowserActivitySubjects|TestBrowserAutonomySettings|TestBrowserCoordinatorQueue|TestBrowserEmptyConversation|TestBrowserEndedNoteStaysGone|TestBrowserHousekeeping|TestBrowserInnerGallery|TestBrowserInnerScreens|TestBrowserInstantThinking|TestBrowserInstantThinkingQueued|TestBrowserMachines|TestBrowserPhoneIndex|TestBrowserPlacementQuestionAndPending|TestBrowserProjectPlacement|TestBrowserProjectsList|TestBrowserReportActionFeedback|TestBrowserReportNextSteps|TestBrowserReportThread|TestBrowserRollup|TestBrowserRosterAlignment|TestBrowserRosterDecisionStates|TestBrowserRosterQuietDay|TestBrowserRosterReports|TestBrowserRosterSetAside|TestBrowserRosterSubchat|TestBrowserRosterThinking|TestBrowserRosterVisual|TestBrowserSettingsHousekeepingGroups|TestBrowserSettingsMenu|TestBrowserSettingsRail|TestBrowserSettingsSaveBar|TestBrowserSettingsShots|TestBrowserSettingsStayOnPage|TestBrowserSettingsTeams|TestBrowserShipsButtons|TestBrowserSpecialistRows|TestBrowserSpendFollowsAnswers|TestBrowserTaskRows|TestBrowserTeamPanel|TestBrowserThinkingCycles|TestBrowserThinkingLinesClear|TestBrowserThinkingSteady|TestBrowserThinkingWords|TestBrowserTokenRowEmail|TestBrowserTrackPulse|TestBrowserTrackStarCentre|TestBrowserTryAgain)$' ./internal/thintest

receipt: test step 1.084s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 3m20.199s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 17.52s amadan.net/oficina/equipo/internal/thintest TestBrowserAccessRequest
receipt: slow test 14.35s amadan.net/oficina/equipo/internal/thintest TestBrowserSettingsTeams
receipt: slow test 12.02s amadan.net/oficina/equipo/internal/thintest TestBrowserThinkingCycles
receipt: slow test 10.55s amadan.net/oficina/equipo/internal/thintest TestBrowserPlacementQuestionAndPending
receipt: slow test 7.93s amadan.net/oficina/equipo/internal/thintest TestBrowserInnerScreens
machine: 32 CPUs, load 9.25, cpu waiting 1.90%, memory waiting 0.00%, io waiting 1.86%
--- shard 23 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
shard 23: make test-quarantine
python3 scripts/ci-test.py quarantine
quarantine: 12 tests from scripts/ci-quarantine.txt; a failure is retried once, and a pass on the retry is reported as a flake
+ go test -tags testbuild -timeout 15m -v -run '^TestHeadlessConnections$/^A5_cancel_and_sign_out$|^TestHeadlessConnections$/^C4_claude_sign_in$|^TestHeadlessConnections$/^C5_engineering_failover$|^TestHeadlessConnections$/^C5_engineering_to_codex$|^TestHeadlessConnections$/^C5_engineering_waits$' ./internal/headless   (53s)
ok ./internal/headless TestHeadlessConnections/A5_cancel_and_sign_out 5.48s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.31s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 9.46s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 10.22s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 25.02s
+ go test -tags testbuild -timeout 15m -v -run '^TestHeadlessConnections$/^C5_review_auth$|^TestHeadlessConnections$/^C5_review_failover$|^TestHeadlessConnections$/^C5_review_on_codex$|^TestHeadlessConnections$/^C5_review_other_family_first$' ./internal/headless   (56s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 15.67s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 12.79s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 11.19s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 13.80s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless   (22s)
ok ./internal/headless TestMixedVersions 20.76s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks   (2s)
ok ./internal/runner/checks TestCheckSandboxDeniedPathsTampering 0.76s
+ go test -tags testbuild -timeout 15m -v -run '^TestRunnerCancelAndSupersede$' ./internal/runner/thin   (1s)
ok ./internal/runner/thin TestRunnerCancelAndSupersede 0.05s
quarantine: 0 flaked (passed on the retry), 0 failed
machine: 32 CPUs, load 36.12, cpu waiting 22.92%, memory waiting 0.00%, io waiting 0.78%
--- shard 24 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
shard 24: make runner-host
python3 scripts/runner-prerequisites.py
CGO_ENABLED=0 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks

receipt: test step 8.349s against a 60s target (the gate's other steps are not in this figure)
receipt: 4 packages ran, 0 cached, 3 without tests, 0 failed
receipt: slow package 7.185s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 159ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 84ms amadan.net/oficina/equipo/internal/runner/provider/codex
receipt: slow package 3ms amadan.net/oficina/equipo/internal/runner/provider
receipt: slow package 0s amadan.net/oficina/equipo/internal/runner/provider/gotoolchain
receipt: slow test 5.18s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.63s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 280ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 160ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 80ms amadan.net/oficina/equipo/internal/runner/provider/codex TestDirectJournalAdapterBarrier
CGO_ENABLED=0 EQUIPO_REQUIRE_USER_SESSION=1 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run '^TestNamespace' -count=1 ./internal/runner/containment
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run '^TestNamespace' -count=1 ./internal/runner/containment

receipt: test step 3.103s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 2.792s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 290ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 180ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof
receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryCleansScratch
receipt: slow test 90ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicy
machine: 32 CPUs, load 16.94, cpu waiting 4.36%, memory waiting 0.00%, io waiting 1.68%
--- shard 25 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: runner-dead-references started 30s late; cpu waiting 28.2%, load 23.22
shard 25: make runner-dead-references lanes-check build vet fmt-check budget migration-check
python3 scripts/runner-dead-references.py
reference scan: 2575 text files, 2854 matches, 0 failures
python3 scripts/ci-test.py check
lanes: 18 lanes and 5 browser lanes run every test once; 20-check@29
CGO_ENABLED=0 go build ./...
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o /dev/null ./cmd/equipo-runner
go vet ./...
go vet -tags testbuild ./internal/runner/thin ./internal/headless
GOOS=darwin GOARCH=arm64 go vet ./cmd/equipo-runner/... ./internal/runner/... ./internal/wire/... ./internal/release/...
go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget size
budget size: 93 directories within budget
CGO_ENABLED=0 go test ./internal/equipo -run '^TestMigrationModels$' -count=1
ok  	amadan.net/oficina/equipo/internal/equipo	2.520s
machine: 32 CPUs, load 35.45, cpu waiting 21.32%, memory waiting 0.00%, io waiting 0.95%
--- shard 26 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: staticcheck started 30s late; cpu waiting 30.1%, load 23.22
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 27.37, cpu waiting 15.43%, memory waiting 0.00%, io waiting 1.13%
--- shard 27 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: govulncheck started 30s late; cpu waiting 28.2%, load 23.22
shard 27: make govulncheck
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 ./...
=== Symbol Results ===

No vulnerabilities found.

Your code is affected by 0 vulnerabilities.
This scan also found 0 vulnerabilities in packages you import and 5
vulnerabilities in modules you require, but your code doesn't appear to call
these vulnerabilities.
Use '-show verbose' for more details.
machine: 32 CPUs, load 30.78, cpu waiting 16.59%, memory waiting 0.00%, io waiting 1.09%
--- shard 28 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: gitleaks started 30s late; cpu waiting 28.2%, load 23.22
shard 28: make gitleaks
4:39PM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
4:39PM INF 1111 commits scanned.
4:39PM INF scanned ~61462007 bytes (61.46 MB) in 14s
4:39PM INF no leaks found
machine: 32 CPUs, load 35.45, cpu waiting 20.62%, memory waiting 0.00%, io waiting 0.98%
diff --git a/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md b/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md
index 55b24bd0..255df626 100644
--- a/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md
+++ b/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md
@@ -162,6 +162,24 @@ Fix round 1 (review r1). `Vanish(ref)` makes the fake provider forget a VM: Get,
| guard: `guardModule + "/internal/isolatedjob/guardfixture"` added to `providerAllowed` | same | `providerguard_test.go:35: providerAllowed holds amadan.net/oficina/equipo/internal/isolatedjob/guardfixture; only cmd/ composition points may depend on the AWS SDK or awsjob` | yes, passes |
| extra: guard sees test-only imports (scratch `guardfixture/leak_test.go` importing `github.com/aws/smithy-go`, then removed) | same | `providerguard_test.go:84: ... guardfixture (via github.com/aws/smithy-go)` | yes, file removed, passes |
+
+### Task 7 fix round 1
+
+The audit now reads the pinned egress connector through lambdacore `GetNetworkConnector`. `Config.ConnectorID` must be a version-qualified ARN. The guard judges test variants by `ForTest`, and Launch refuses a non-ASCII bootstrap. Rows were applied by the same kind of scratch script. The first try at the connector-ARN row panicked (index out of range), so it was redone as below; every recorded row failed by assertion.
+
+| Mutation | Command | Observed failure | Restored |
+| --- | --- | --- | --- |
+| audit ignores the connector's subnet (`if false && !slices.Equal(c.SubnetIds, ...)`) | `go test ./internal/isolatedjob/awsjob -run '^TestAuditNetwork$' -count=1` | `network_test.go:437: AuditNetwork = {ResolverDisabled:true IngressClosed:true RouteOutAbsent:true EgressOnly:[10.0.1.10:3128 10.0.1.11:443]}, nil; want an error` in `connector_in_another_subnet`, `connector_with_an_extra_subnet` | yes, passes |
+| audit ignores an extra group (`if false && !slices.Equal(c.SecurityGroupIds, ...)`) | same | same line, in `connector_with_another_group`, `connector_with_an_extra_group` | yes, passes |
+| extra: audit skips the connector (`...checkConnector(ctx); false && err != nil {`) | same | same line, in all 12 connector rows | yes, passes |
+| extra: audit ignores the connector version (`false && got != id`) | same | same line, in `connector_answers_for_another_version`, `connector_answers_unqualified` | yes, passes |
+| extra: audit ignores service-managed Elastic IPs (`false && e != nil && ...`) | same | same line, in `connector_with_service-managed_Elastic_IPs` | yes, passes |
+| extra: unqualified connector accepted (`if !strings.HasPrefix(c.ConnectorID, "arn:") {` in place of `qualifiedConnector`) | `go test ./internal/isolatedjob/awsjob -run '^TestNew$' -count=1` | `runner_test.go:241: New = <nil>, want ErrInvalid` in `connector_unqualified`, `connector_version_not_a_number`, `connector_in_another_region`, `connector_of_another_service` | yes, passes |
+| ASCII check removed (`if false && b >= 0x80 {`) | `go test ./internal/isolatedjob/awsjob -run '^TestRunRequestShape$' -count=1` | `runner_test.go:367: Launch = ("vm-1", <nil>), want ErrInvalid` in `bootstrap_with_invalid_UTF-8`, `bootstrap_with_valid_non-ASCII_UTF-8` | yes, passes |
+| guard strips _test again (`basePackage` returns `strings.TrimSuffix(path, "_test")` for any path) | `go test ./internal/isolatedjob -run '^TestProviderGuardClassifies$' -count=1` | `providerguard_test.go:185: offenders = .../internal/hostedctl (via ...) .../awsjobx (via ...) want .../internal/isolatedjob/awsjob_test (via github.com/aws/aws-sdk-go-v2/aws) ...` | yes, passes |
+| extra: guard skips every path ending _test (`strings.HasSuffix(plainPath(p.ImportPath), "_test") \|\| ...` on the test-main skip) | same | `providerguard_test.go:182: offenders = .../awsjobx (via ...) want .../awsjob_test (via github.com/aws/aws-sdk-go-v2/aws) .../internal/hostedctl (via ...)` | yes, passes |
+| regression: scratch ordinary package `internal/isolatedjob/awsjob_test/doc.go` importing `github.com/aws/aws-sdk-go-v2/aws` (`go build` succeeded), then removed | `go test ./internal/isolatedjob -run '^TestProviderTypesStayInAdapter$' -count=1` | `providerguard_test.go:64: packages outside .../awsjob depend on the AWS SDK or the adapter: amadan.net/oficina/equipo/internal/isolatedjob/awsjob_test (via github.com/aws/aws-sdk-go-v2/aws)` | yes, directory removed, passes |
+
## Task 8
`internal/hostedwire`: ed25519-signed requests (headers `Equipo-Key-Id`, `Equipo-Timestamp`, `Equipo-Nonce`, `Equipo-Signature`, each exactly once, matched without regard to case) and responses (`Equipo-Signature`, bound to status, the request's nonce and the body hash), plus strict JSON wire types for every Task 15 route and `DecodeStrict`. Verify order: strict headers, key lookup (a public key shared by two IDs is refused, since the key ID is not in the signed message), skew (60 s either way, against `Verifier.Now`), body size, signature, then `Remember(r.Context(), id, nonce, now+10min)`; a held nonce is a replay and a store error denies. `DecodeStrict` reads at most `MaxBody`, needs exactly one object, and refuses unknown fields, keys not lower-case snake_case, and a key repeated in one object. RED was taken against stubs (signing real, verification and decoding naive): every test but `TestSignatureCoversEveryField`, `TestSignRequestRefusesBadInput`, `TestNewNonce` and `TestWireNames` failed by assertion; the first is shown red by the body-hash mutation below.
diff --git a/go.mod b/go.mod
index 19bc1a43..4ee99b64 100644
--- a/go.mod
+++ b/go.mod
@@ -22,6 +22,7 @@ require (
github.com/aws/aws-sdk-go-v2 v1.48.0
github.com/aws/aws-sdk-go-v2/config v1.33.21
github.com/aws/aws-sdk-go-v2/service/ec2 v1.350.0
+ github.com/aws/aws-sdk-go-v2/service/lambdacore v1.14.0
github.com/aws/aws-sdk-go-v2/service/lambdamicrovms v1.13.0
github.com/aws/aws-sdk-go-v2/service/sns v1.48.0
github.com/aws/smithy-go v1.28.9
diff --git a/go.sum b/go.sum
index a6f14dbe..6d9095ac 100644
--- a/go.sum
+++ b/go.sum
@@ -65,6 +65,8 @@ github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.25 h1:rKwkY3
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.25/go.mod h1:dBuAadQKd1F4Q4ZOg8gnFmuSHMRE40Pe3IfFwbtC4lE=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.14.12 h1:wzAqMZ2O4+ij9HQqIrk+P9PBGacE0wOTuWB7Mo97//I=
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.14.12/go.mod h1:/0TfyruByHsOlphzP26xDTRe2DKD0J1I1Uyy2TyP8EI=
+github.com/aws/aws-sdk-go-v2/service/lambdacore v1.14.0 h1:HFdu2C3ZGuz55WTvSLepGCSHFFCZ/E3BVqbq9bPTp8g=
+github.com/aws/aws-sdk-go-v2/service/lambdacore v1.14.0/go.mod h1:IN/6SlTd5+2FwwqzpuTLBJdYS3K2lE7BP3hD44VyBKM=
github.com/aws/aws-sdk-go-v2/service/lambdamicrovms v1.13.0 h1:fDJjTeLNm1xh1Nwq+pPO/D9RbMbO1F+Kp1q8KJdPmqA=
github.com/aws/aws-sdk-go-v2/service/lambdamicrovms v1.13.0/go.mod h1:GEnG9FBOraRH3j7GPz/wQmuBLI7d+yjDje4IriTgQ7o=
github.com/aws/aws-sdk-go-v2/service/signin v1.14.0 h1:bIEk1HfTd3MGzvDa5YOQUodGr96D9+UTnmBLBB8ZJ10=
diff --git a/internal/isolatedjob/awsjob/live_test.go b/internal/isolatedjob/awsjob/live_test.go
index 1d118506..abb688d4 100644
--- a/internal/isolatedjob/awsjob/live_test.go
+++ b/internal/isolatedjob/awsjob/live_test.go
@@ -16,6 +16,7 @@ import (
"amadan.net/oficina/equipo/internal/isolatedjob/isolatedjobtest"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/service/ec2"
+ "github.com/aws/aws-sdk-go-v2/service/lambdacore"
vms "github.com/aws/aws-sdk-go-v2/service/lambdamicrovms"
)
@@ -23,7 +24,7 @@ import (
// come from the usual AWS environment (AWS_PROFILE and the rest).
type liveConfig struct {
Region string `json:"region"`
- ConnectorID string `json:"connector_id"`
+ ConnectorID string `json:"connector_id"` // version-qualified ARN
VPCID string `json:"vpc_id"`
VMSubnetID string `json:"vm_subnet_id"`
VMSecurityGroupID string `json:"vm_security_group_id"`
@@ -70,7 +71,7 @@ func TestLiveContract(t *testing.T) {
if err != nil {
t.Fatalf("AWS config: %v", err)
}
- r, err := New(cfg, NewAPI(vms.NewFromConfig(awsCfg), ec2.NewFromConfig(awsCfg)))
+ r, err := New(cfg, NewAPI(vms.NewFromConfig(awsCfg), ec2.NewFromConfig(awsCfg), lambdacore.NewFromConfig(awsCfg)))
if err != nil {
t.Fatalf("New: %v", err)
}
diff --git a/internal/isolatedjob/awsjob/network.go b/internal/isolatedjob/awsjob/network.go
index bc35c80f..5efeaf82 100644
--- a/internal/isolatedjob/awsjob/network.go
+++ b/internal/isolatedjob/awsjob/network.go
@@ -10,10 +10,16 @@ import (
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/ec2"
ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
+ "github.com/aws/aws-sdk-go-v2/service/lambdacore"
+ coretypes "github.com/aws/aws-sdk-go-v2/service/lambdacore/types"
)
-// AuditNetwork reads the configured VPC, subnet and security group as they
-// are now:
+// AuditNetwork reads the egress connector and the configured VPC, subnet and
+// security group as they are now. First the connector, by its pinned
+// version, must be an ACTIVE VPC_EGRESS connector for MicroVMs at that
+// version, without service-managed Elastic IP addresses, whose subnets and
+// security groups are exactly VMSubnetID and VMSecurityGroupID; so the
+// resources audited below are the ones VM traffic uses. Then:
//
// - ResolverDisabled: the VPC has both enableDnsSupport and
// enableDnsHostnames read as false.
@@ -25,7 +31,7 @@ import (
// allow. It equals Config.Egress when the group is right.
//
// It returns an error, and the zero audit in which every property has
-// failed, when a read fails, an ID is missing or outside the VPC, or an
+// failed, when the connector check fails, a read fails, an ID is missing or outside the VPC, or an
// outbound rule allows more than single TCP hosts and ports (a network, a
// port range, another protocol, a prefix list or a group): what it cannot
// establish is never assumed.
@@ -39,6 +45,9 @@ func (r *Runner) AuditNetwork(ctx context.Context) (isolatedjob.NetworkAudit, er
func (r *Runner) audit(ctx context.Context) (isolatedjob.NetworkAudit, error) {
var a isolatedjob.NetworkAudit
+ if err := r.checkConnector(ctx); err != nil {
+ return a, err
+ }
support, err := r.vpcAttribute(ctx, ec2types.VpcAttributeNameEnableDnsSupport)
if err != nil {
return a, err
@@ -78,6 +87,40 @@ func (r *Runner) audit(ctx context.Context) (isolatedjob.NetworkAudit, error) {
return a, nil
}
+// checkConnector establishes that the pinned connector version sends VM
+// traffic through exactly the configured subnet and security group.
+func (r *Runner) checkConnector(ctx context.Context) error {
+ id := r.cfg.ConnectorID
+ out, err := r.api.GetNetworkConnector(ctx, &lambdacore.GetNetworkConnectorInput{Identifier: aws.String(id)})
+ if err != nil {
+ return fmt.Errorf("get network connector %s: %w", id, err)
+ }
+ if got := aws.ToString(out.VersionArn); got != id {
+ return fmt.Errorf("network connector %s answered for version %q, not the pinned one", id, got)
+ }
+ if out.State != coretypes.NetworkConnectorStateActive {
+ return fmt.Errorf("network connector %s is %s, not ACTIVE", id, out.State)
+ }
+ vpc, ok := out.Configuration.(*coretypes.NetworkConnectorConfigurationMemberVpcEgressConfiguration)
+ if !ok {
+ return fmt.Errorf("network connector %s is not a VPC egress connector (%T)", id, out.Configuration)
+ }
+ c := vpc.Value
+ if !slices.Equal(c.AssociatedComputeResourceTypes, []coretypes.ComputeResourceType{coretypes.ComputeResourceTypeMicroVm}) {
+ return fmt.Errorf("network connector %s serves %v, want MicroVm only", id, c.AssociatedComputeResourceTypes)
+ }
+ if !slices.Equal(c.SubnetIds, []string{r.cfg.VMSubnetID}) {
+ return fmt.Errorf("network connector %s uses subnets %q, want only %s", id, c.SubnetIds, r.cfg.VMSubnetID)
+ }
+ if !slices.Equal(c.SecurityGroupIds, []string{r.cfg.VMSecurityGroupID}) {
+ return fmt.Errorf("network connector %s uses security groups %q, want only %s", id, c.SecurityGroupIds, r.cfg.VMSecurityGroupID)
+ }
+ if e := c.ElasticIpConfiguration; e != nil && e.Type != coretypes.ElasticIpTypeNone {
+ return fmt.Errorf("network connector %s gives its interfaces %s Elastic IP addresses", id, e.Type)
+ }
+ return nil
+}
+
// vpcAttribute reads one boolean VPC attribute; nil means AWS gave no value.
func (r *Runner) vpcAttribute(ctx context.Context, name ec2types.VpcAttributeName) (*bool, error) {
out, err := r.api.DescribeVpcAttribute(ctx, &ec2.DescribeVpcAttributeInput{VpcId: aws.String(r.cfg.VPCID), Attribute: name})
diff --git a/internal/isolatedjob/awsjob/network_test.go b/internal/isolatedjob/awsjob/network_test.go
index ab08f829..be187a02 100644
--- a/internal/isolatedjob/awsjob/network_test.go
+++ b/internal/isolatedjob/awsjob/network_test.go
@@ -12,6 +12,8 @@ import (
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/ec2"
ec2types "github.com/aws/aws-sdk-go-v2/service/ec2/types"
+ "github.com/aws/aws-sdk-go-v2/service/lambdacore"
+ coretypes "github.com/aws/aws-sdk-go-v2/service/lambdacore/types"
)
// The EC2 half of stub. A nil func field answers with the network
@@ -52,6 +54,30 @@ func (s *stub) DescribeSecurityGroups(_ context.Context, in *ec2.DescribeSecurit
return &ec2.DescribeSecurityGroupsOutput{SecurityGroups: []ec2types.SecurityGroup{goodGroup()}}, nil
}
+func (s *stub) GetNetworkConnector(_ context.Context, in *lambdacore.GetNetworkConnectorInput, _ ...func(*lambdacore.Options)) (*lambdacore.GetNetworkConnectorOutput, error) {
+ s.record("GetNetworkConnector")
+ if s.connector != nil {
+ return s.connector(in)
+ }
+ return goodConnector(), nil
+}
+
+// goodConnector is the pinned connector version as testConfig expects it.
+func goodConnector() *lambdacore.GetNetworkConnectorOutput {
+ return &lambdacore.GetNetworkConnectorOutput{
+ Arn: aws.String("arn:aws:lambda:eu-west-1:123456789012:network-connector:nc-1"),
+ VersionArn: aws.String(testConnector),
+ Version: aws.Int64(3),
+ State: coretypes.NetworkConnectorStateActive,
+ Configuration: &coretypes.NetworkConnectorConfigurationMemberVpcEgressConfiguration{Value: coretypes.NetworkConnectorVpcEgressConfiguration{
+ AssociatedComputeResourceTypes: []coretypes.ComputeResourceType{coretypes.ComputeResourceTypeMicroVm},
+ SubnetIds: []string{"subnet-1"},
+ SecurityGroupIds: []string{"sg-1"},
+ NetworkProtocol: coretypes.NetworkProtocolIPv4,
+ }},
+ }
+}
+
func vpcAttr(in *ec2.DescribeVpcAttributeInput, support, hostnames bool) *ec2.DescribeVpcAttributeOutput {
out := &ec2.DescribeVpcAttributeOutput{VpcId: in.VpcId}
switch in.Attribute {
@@ -118,6 +144,20 @@ func TestAuditNetwork(t *testing.T) {
return &ec2.DescribeRouteTablesOutput{RouteTables: []ec2types.RouteTable{rt}}, nil
}
}
+ withConnector := func(change func(*coretypes.NetworkConnectorVpcEgressConfiguration)) func(*lambdacore.GetNetworkConnectorInput) (*lambdacore.GetNetworkConnectorOutput, error) {
+ return func(*lambdacore.GetNetworkConnectorInput) (*lambdacore.GetNetworkConnectorOutput, error) {
+ out := goodConnector()
+ change(&out.Configuration.(*coretypes.NetworkConnectorConfigurationMemberVpcEgressConfiguration).Value)
+ return out, nil
+ }
+ }
+ withConnectorOut := func(change func(*lambdacore.GetNetworkConnectorOutput)) func(*lambdacore.GetNetworkConnectorInput) (*lambdacore.GetNetworkConnectorOutput, error) {
+ return func(*lambdacore.GetNetworkConnectorInput) (*lambdacore.GetNetworkConnectorOutput, error) {
+ out := goodConnector()
+ change(out)
+ return out, nil
+ }
+ }
good := isolatedjob.NetworkAudit{ResolverDisabled: true, IngressClosed: true, RouteOutAbsent: true, EgressOnly: want}
rows := []struct {
@@ -158,6 +198,11 @@ func TestAuditNetwork(t *testing.T) {
{"local route with a second target", func(s *stub) {
s.routeTables = withRoutes(ec2types.Route{DestinationCidrBlock: aws.String("10.9.0.0/16"), GatewayId: aws.String("local"), TransitGatewayId: aws.String("tgw-1")})
}, isolatedjob.NetworkAudit{ResolverDisabled: true, IngressClosed: true, EgressOnly: want}},
+ {"connector with Elastic IP type None", func(s *stub) {
+ s.connector = withConnector(func(c *coretypes.NetworkConnectorVpcEgressConfiguration) {
+ c.ElasticIpConfiguration = &coretypes.ElasticIpConfiguration{Type: coretypes.ElasticIpTypeNone}
+ })
+ }, good},
{"main table when no explicit association", func(s *stub) {
s.routeTables = func(in *ec2.DescribeRouteTablesInput) (*ec2.DescribeRouteTablesOutput, error) {
if filterValue(in.Filters, "association.main") == "true" && filterValue(in.Filters, "vpc-id") == "vpc-1" {
@@ -207,7 +252,7 @@ func TestAuditNetwork(t *testing.T) {
if !reflect.DeepEqual(got, row.want) {
t.Errorf("AuditNetwork = %+v, want %+v", got, row.want)
}
- if passes := got.OK(want) == nil; passes != (row.name == "all good" || row.name == "main table when no explicit association") {
+ if passes := got.OK(want) == nil; passes != reflect.DeepEqual(row.want, good) {
t.Errorf("OK(want) passes = %v for %s", passes, row.name)
}
})
@@ -216,6 +261,12 @@ func TestAuditNetwork(t *testing.T) {
t.Run("reads the configured ids", func(t *testing.T) {
var attrs []ec2types.VpcAttributeName
s := &stub{
+ connector: func(in *lambdacore.GetNetworkConnectorInput) (*lambdacore.GetNetworkConnectorOutput, error) {
+ if aws.ToString(in.Identifier) != testConnector {
+ t.Errorf("GetNetworkConnector identifier = %q, want the pinned %q", aws.ToString(in.Identifier), testConnector)
+ }
+ return goodConnector(), nil
+ },
vpcAttr: func(in *ec2.DescribeVpcAttributeInput) (*ec2.DescribeVpcAttributeOutput, error) {
if aws.ToString(in.VpcId) != "vpc-1" {
t.Errorf("DescribeVpcAttribute vpc = %q, want vpc-1", aws.ToString(in.VpcId))
@@ -246,6 +297,56 @@ func TestAuditNetwork(t *testing.T) {
})
refusals := map[string]func(*stub){
+ "connector read fails": func(s *stub) {
+ s.connector = func(*lambdacore.GetNetworkConnectorInput) (*lambdacore.GetNetworkConnectorOutput, error) {
+ return nil, errors.New("denied")
+ }
+ },
+ "connector answers for another version": func(s *stub) {
+ s.connector = withConnectorOut(func(o *lambdacore.GetNetworkConnectorOutput) {
+ o.VersionArn = aws.String("arn:aws:lambda:eu-west-1:123456789012:network-connector:nc-1:4")
+ })
+ },
+ "connector answers unqualified": func(s *stub) {
+ s.connector = withConnectorOut(func(o *lambdacore.GetNetworkConnectorOutput) { o.VersionArn = nil })
+ },
+ "connector not active": func(s *stub) {
+ s.connector = withConnectorOut(func(o *lambdacore.GetNetworkConnectorOutput) { o.State = coretypes.NetworkConnectorStateFailed })
+ },
+ "connector of an unknown type": func(s *stub) {
+ s.connector = withConnectorOut(func(o *lambdacore.GetNetworkConnectorOutput) {
+ o.Configuration = &coretypes.UnknownUnionMember{Tag: "SomethingNew"}
+ })
+ },
+ "connector with no configuration": func(s *stub) {
+ s.connector = withConnectorOut(func(o *lambdacore.GetNetworkConnectorOutput) { o.Configuration = nil })
+ },
+ "connector for functions": func(s *stub) {
+ s.connector = withConnector(func(c *coretypes.NetworkConnectorVpcEgressConfiguration) {
+ c.AssociatedComputeResourceTypes = []coretypes.ComputeResourceType{coretypes.ComputeResourceTypeWebFunction}
+ })
+ },
+ "connector in another subnet": func(s *stub) {
+ s.connector = withConnector(func(c *coretypes.NetworkConnectorVpcEgressConfiguration) { c.SubnetIds = []string{"subnet-9"} })
+ },
+ "connector with an extra subnet": func(s *stub) {
+ s.connector = withConnector(func(c *coretypes.NetworkConnectorVpcEgressConfiguration) {
+ c.SubnetIds = []string{"subnet-1", "subnet-9"}
+ })
+ },
+ "connector with another group": func(s *stub) {
+ s.connector = withConnector(func(c *coretypes.NetworkConnectorVpcEgressConfiguration) { c.SecurityGroupIds = []string{"sg-9"} })
+ },
+ "connector with an extra group": func(s *stub) {
+ s.connector = withConnector(func(c *coretypes.NetworkConnectorVpcEgressConfiguration) {
+ c.SecurityGroupIds = []string{"sg-1", "sg-open"}
+ })
+ },
+ "connector with service-managed Elastic IPs": func(s *stub) {
+ s.connector = withConnector(func(c *coretypes.NetworkConnectorVpcEgressConfiguration) {
+ c.ElasticIpConfiguration = &coretypes.ElasticIpConfiguration{Type: coretypes.ElasticIpTypeServiceManaged}
+ })
+ },
"vpc attribute read fails": func(s *stub) {
s.vpcAttr = func(*ec2.DescribeVpcAttributeInput) (*ec2.DescribeVpcAttributeOutput, error) {
return nil, errors.New("denied")
diff --git a/internal/isolatedjob/awsjob/runner.go b/internal/isolatedjob/awsjob/runner.go
index 9c3a350d..720d9f4a 100644
--- a/internal/isolatedjob/awsjob/runner.go
+++ b/internal/isolatedjob/awsjob/runner.go
@@ -14,6 +14,7 @@ import (
"github.com/aws/aws-sdk-go-v2/aws"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/service/ec2"
+ "github.com/aws/aws-sdk-go-v2/service/lambdacore"
vms "github.com/aws/aws-sdk-go-v2/service/lambdamicrovms"
"github.com/aws/aws-sdk-go-v2/service/lambdamicrovms/types"
"github.com/aws/smithy-go/middleware"
@@ -40,21 +41,30 @@ type EC2API interface {
DescribeSecurityGroups(context.Context, *ec2.DescribeSecurityGroupsInput, ...func(*ec2.Options)) (*ec2.DescribeSecurityGroupsOutput, error)
}
+// ConnectorAPI is the part of the Lambda core client the network audit
+// calls to read the egress connector. *lambdacore.Client satisfies it.
+type ConnectorAPI interface {
+ GetNetworkConnector(context.Context, *lambdacore.GetNetworkConnectorInput, ...func(*lambdacore.Options)) (*lambdacore.GetNetworkConnectorOutput, error)
+}
+
// API is every provider call the runner makes.
type API interface {
MicroVMAPI
EC2API
+ ConnectorAPI
}
-// NewAPI joins the two clients into an API, for example
-// NewAPI(lambdamicrovms.NewFromConfig(cfg), ec2.NewFromConfig(cfg)).
-func NewAPI(m MicroVMAPI, e EC2API) API {
- return clients{m, e}
+// NewAPI joins the three clients into an API, for example
+// NewAPI(lambdamicrovms.NewFromConfig(cfg), ec2.NewFromConfig(cfg),
+// lambdacore.NewFromConfig(cfg)).
+func NewAPI(m MicroVMAPI, e EC2API, c ConnectorAPI) API {
+ return clients{m, e, c}
}
type clients struct {
MicroVMAPI
EC2API
+ ConnectorAPI
}
// Image is one certified base image: its MicroVM image ARN and the image
@@ -68,11 +78,16 @@ type Image struct {
// Config is where hosted VMs launch and what they may reach.
type Config struct {
- Region string
- ConnectorID string // ARN of the VPC_EGRESS network connector, the VMs' only egress
- VPCID string // the VPC the connector's subnet is in
- VMSubnetID string // the subnet the connector places VMs' traffic in
- VMSecurityGroupID string // the security group on that traffic
+ Region string
+ // ConnectorID is the version-qualified ARN of the VPC_EGRESS network
+ // connector, the VMs' only egress:
+ // arn:aws:lambda:REGION:ACCOUNT:network-connector:ID:VERSION. The
+ // version pins the connector's subnets and groups, so an update to the
+ // connector cannot change what launched VMs use without a config change.
+ ConnectorID string
+ VPCID string // the VPC of the connector's subnet
+ VMSubnetID string // the connector's only subnet
+ VMSecurityGroupID string // the connector's only security group
Images map[isolatedjob.ImageDigest]Image
// Egress is every destination the security group should let VMs
// reach: the shared proxies.
@@ -115,8 +130,8 @@ func (c Config) check() error {
return fmt.Errorf("%s is empty", name)
}
}
- if !strings.HasPrefix(c.ConnectorID, "arn:") {
- return fmt.Errorf("connector %q is not an ARN", c.ConnectorID)
+ if !qualifiedConnector(c.ConnectorID, c.Region) {
+ return fmt.Errorf("connector %q is not a version-qualified network connector ARN in %s", c.ConnectorID, c.Region)
}
if len(c.Images) == 0 {
return errors.New("no images")
@@ -142,6 +157,23 @@ func (c Config) check() error {
return nil
}
+// qualifiedConnector reports whether arn has the form
+// arn:PARTITION:lambda:region:ACCOUNT:network-connector:ID:VERSION with a
+// numeric version.
+func qualifiedConnector(arn, region string) bool {
+ f := strings.Split(arn, ":")
+ if len(f) != 8 || f[0] != "arn" || f[1] == "" || f[2] != "lambda" || f[3] != region || f[4] == "" ||
+ f[5] != "network-connector" || f[6] == "" || f[7] == "" {
+ return false
+ }
+ for _, c := range f[7] {
+ if c < '0' || c > '9' {
+ return false
+ }
+ }
+ return true
+}
+
// NoIngressConnectorARN is the Lambda-provided NO_INGRESS connector in
// region, in the form the developer guide prints for the managed ingress
// connectors (doc.go, Connectors). The guide does not print this one; the
@@ -165,12 +197,22 @@ func (r *Runner) Limits() isolatedjob.Limits {
// egress, no execution role, no idle policy, the spec's lifetime as the
// maximum duration and the attempt ID as the client token. It refuses with
// isolatedjob.ErrInvalid, before any run call, a spec that fails Validate,
-// an image or size with no configured version, and an image version that is
-// not x86_64 with all OS capabilities and the size's memory.
+// a bootstrap that is not ASCII, an image or size with no configured
+// version, and an image version that is not x86_64 with all OS capabilities
+// and the size's memory.
func (r *Runner) Launch(ctx context.Context, s isolatedjob.LaunchSpec) (isolatedjob.Ref, error) {
if err := s.Validate(r.Limits()); err != nil {
return "", err
}
+ // runHookPayload is a JSON string: the SDK would turn invalid UTF-8
+ // into U+FFFD, and AWS does not say whether its limit counts bytes or
+ // characters. The bootstrap is an enrolment code, so ASCII is enough
+ // and every ASCII byte survives JSON unchanged.
+ for i, b := range s.Bootstrap {
+ if b >= 0x80 {
+ return "", fmt.Errorf("%w: bootstrap byte %d is 0x%02x; only ASCII survives the run hook payload unchanged", isolatedjob.ErrInvalid, i, b)
+ }
+ }
img, ok := r.cfg.Images[s.Image]
if !ok {
return "", fmt.Errorf("%w: image %s is not configured", isolatedjob.ErrInvalid, s.Image)
diff --git a/internal/isolatedjob/awsjob/runner_test.go b/internal/isolatedjob/awsjob/runner_test.go
index 66cc9639..a6754d0c 100644
--- a/internal/isolatedjob/awsjob/runner_test.go
+++ b/internal/isolatedjob/awsjob/runner_test.go
@@ -3,6 +3,7 @@ package awsjob
import (
"bytes"
"context"
+ "encoding/json"
"errors"
"io"
"net/http"
@@ -19,6 +20,7 @@ import (
"github.com/aws/aws-sdk-go-v2/aws"
awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware"
"github.com/aws/aws-sdk-go-v2/service/ec2"
+ "github.com/aws/aws-sdk-go-v2/service/lambdacore"
vms "github.com/aws/aws-sdk-go-v2/service/lambdamicrovms"
"github.com/aws/aws-sdk-go-v2/service/lambdamicrovms/types"
"github.com/aws/aws-sdk-go-v2/service/sns"
@@ -32,7 +34,7 @@ const (
testDigest = isolatedjob.ImageDigest("sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef")
otherDigest = isolatedjob.ImageDigest("sha256:fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210")
testImageARN = "arn:aws:lambda:eu-west-1:123456789012:microvm-image:runner"
- testConnector = "arn:aws:lambda:eu-west-1:123456789012:network-connector:egress"
+ testConnector = "arn:aws:lambda:eu-west-1:123456789012:network-connector:nc-1:3"
smallVersion = "3"
largeVersion = "4"
)
@@ -95,6 +97,7 @@ type stub struct {
subnets func(*ec2.DescribeSubnetsInput) (*ec2.DescribeSubnetsOutput, error)
routeTables func(*ec2.DescribeRouteTablesInput) (*ec2.DescribeRouteTablesOutput, error)
securityGroups func(*ec2.DescribeSecurityGroupsInput) (*ec2.DescribeSecurityGroupsOutput, error)
+ connector func(*lambdacore.GetNetworkConnectorInput) (*lambdacore.GetNetworkConnectorOutput, error)
}
func (s *stub) record(op string) {
@@ -203,10 +206,22 @@ func TestNew(t *testing.T) {
"no region": func(c *Config) { c.Region = "" },
"no connector": func(c *Config) { c.ConnectorID = "" },
"connector not an ARN": func(c *Config) { c.ConnectorID = "egress" },
- "no vpc": func(c *Config) { c.VPCID = "" },
- "no subnet": func(c *Config) { c.VMSubnetID = "" },
- "no security group": func(c *Config) { c.VMSecurityGroupID = "" },
- "no images": func(c *Config) { c.Images = nil },
+ "connector unqualified": func(c *Config) {
+ c.ConnectorID = "arn:aws:lambda:eu-west-1:123456789012:network-connector:nc-1"
+ },
+ "connector version not a number": func(c *Config) {
+ c.ConnectorID = "arn:aws:lambda:eu-west-1:123456789012:network-connector:nc-1:latest"
+ },
+ "connector in another region": func(c *Config) {
+ c.ConnectorID = "arn:aws:lambda:us-east-1:123456789012:network-connector:nc-1:3"
+ },
+ "connector of another service": func(c *Config) {
+ c.ConnectorID = "arn:aws:ec2:eu-west-1:123456789012:network-connector:nc-1:3"
+ },
+ "no vpc": func(c *Config) { c.VPCID = "" },
+ "no subnet": func(c *Config) { c.VMSubnetID = "" },
+ "no security group": func(c *Config) { c.VMSecurityGroupID = "" },
+ "no images": func(c *Config) { c.Images = nil },
"image without ARN": func(c *Config) {
c.Images[testDigest] = Image{Versions: map[isolatedjob.Size]string{isolatedjob.SizeSmall: "1"}}
},
@@ -330,6 +345,12 @@ func TestRunRequestShape(t *testing.T) {
delete(c.Images[testDigest].Versions, isolatedjob.SizeLarge)
},
"spec invalid": func(s *isolatedjob.LaunchSpec, _ *Config) { s.AttemptID = "" },
+ "bootstrap with invalid UTF-8": func(s *isolatedjob.LaunchSpec, _ *Config) {
+ s.Bootstrap = []byte("code-\xff-end")
+ },
+ "bootstrap with valid non-ASCII UTF-8": func(s *isolatedjob.LaunchSpec, _ *Config) {
+ s.Bootstrap = []byte("code-é")
+ },
} {
t.Run(name, func(t *testing.T) {
s := &stub{}
@@ -371,6 +392,62 @@ func TestRunRequestShape(t *testing.T) {
})
}
+// TestPayloadThroughSDK sends a bootstrap holding every ASCII byte through
+// the real lambdamicrovms serializer, over a transport that never leaves
+// the process, and checks the JSON body AWS would receive carries it byte
+// for byte, with the attempt as client token.
+func TestPayloadThroughSDK(t *testing.T) {
+ var body []byte
+ client := vms.New(vms.Options{
+ Region: "eu-west-1",
+ Credentials: aws.AnonymousCredentials{},
+ HTTPClient: doFunc(func(r *http.Request) (*http.Response, error) {
+ reply := `{"additionalOsCapabilities":["ALL"],"cpuConfigurations":[{"architecture":"X86_64"}],"resources":[{"minimumMemoryInMiB":2048}]}`
+ if r.Method == http.MethodPost && strings.HasSuffix(r.URL.Path, "/microvms") {
+ b, err := io.ReadAll(r.Body)
+ if err != nil {
+ return nil, err
+ }
+ body = b
+ reply = `{"microvmId":"vm-sdk","state":"PENDING"}`
+ }
+ h := http.Header{}
+ h.Set("Content-Type", "application/json")
+ return &http.Response{StatusCode: 200, Header: h, Body: io.NopCloser(strings.NewReader(reply)), Request: r}, nil
+ }),
+ })
+ r, err := New(testConfig(), NewAPI(client, &stub{}, &stub{}))
+ if err != nil {
+ t.Fatalf("New = %v", err)
+ }
+ spec := testSpec()
+ spec.Bootstrap = make([]byte, 0x80)
+ for i := range spec.Bootstrap {
+ spec.Bootstrap[i] = byte(i)
+ }
+ ref, err := r.Launch(context.Background(), spec)
+ if err != nil || ref != "vm-sdk" {
+ t.Fatalf("Launch = %q, %v; want vm-sdk", ref, err)
+ }
+ var sent struct {
+ ClientToken string `json:"clientToken"`
+ RunHookPayload string `json:"runHookPayload"`
+ }
+ if err := json.Unmarshal(body, &sent); err != nil {
+ t.Fatalf("run request body %q: %v", body, err)
+ }
+ if !bytes.Equal([]byte(sent.RunHookPayload), spec.Bootstrap) {
+ t.Errorf("runHookPayload on the wire = %q, want %q byte for byte", sent.RunHookPayload, spec.Bootstrap)
+ }
+ if sent.ClientToken != spec.AttemptID {
+ t.Errorf("clientToken on the wire = %q, want %q", sent.ClientToken, spec.AttemptID)
+ }
+}
+
+type doFunc func(*http.Request) (*http.Response, error)
+
+func (f doFunc) Do(r *http.Request) (*http.Response, error) { return f(r) }
+
func TestImageVersionChecked(t *testing.T) {
rows := []struct {
name string
diff --git a/internal/isolatedjob/providerguard_test.go b/internal/isolatedjob/providerguard_test.go
index c9bedfa4..e92cd24f 100644
--- a/internal/isolatedjob/providerguard_test.go
+++ b/internal/isolatedjob/providerguard_test.go
@@ -1,6 +1,7 @@
package isolatedjob
import (
+ "bytes"
"encoding/json"
"errors"
"io"
@@ -38,7 +39,7 @@ func TestProviderTypesStayInAdapter(t *testing.T) {
// go list reads every package in the tree, which go test cannot see,
// so declare the whole tree: a new or edited package reruns the guard.
testci.RepoFiles(t)
- out, err := exec.Command("go", "list", "-test", "-json=ImportPath,Deps,Module", guardModule+"/...").Output()
+ out, err := exec.Command("go", "list", "-test", "-json=ImportPath,ForTest,Deps,Module", guardModule+"/...").Output()
if err != nil {
var exit *exec.ExitError
if errors.As(err, &exit) {
@@ -47,32 +48,63 @@ func TestProviderTypesStayInAdapter(t *testing.T) {
t.Fatalf("go list: %v", err)
}
- var offenders []string
- adapterSeen := false
- dec := json.NewDecoder(strings.NewReader(string(out)))
+ var pkgs []listedPackage
+ dec := json.NewDecoder(bytes.NewReader(out))
for {
- var p struct {
- ImportPath string
- Deps []string
- Module *struct{ Path string }
- }
+ var p listedPackage
if err := dec.Decode(&p); err == io.EOF {
break
} else if err != nil {
t.Fatalf("go list output: %v", err)
}
+ pkgs = append(pkgs, p)
+ }
+ offenders, adapterSeen := providerOffenders(pkgs, providerAllowed)
+ if len(offenders) > 0 {
+ t.Errorf("packages outside %s depend on the AWS SDK or the adapter:\n %s", providerAdapter, strings.Join(offenders, "\n "))
+ }
+ if !adapterSeen {
+ t.Errorf("go list showed no %s package depending on github.com/aws/; the guard is not seeing the adapter", providerAdapter)
+ }
+}
+
+// listedPackage is what the guard reads of one go list -test entry.
+type listedPackage struct {
+ ImportPath string
+ ForTest string // set on test variants: the package under test
+ Deps []string
+ Module *struct{ Path string }
+}
+
+// providerOffenders returns each module package outside the adapter and
+// allowed that depends on the AWS SDK or the adapter, with the dependency
+// that pulled it in, and whether any adapter package depends on the SDK.
+// Generated test variants are judged as the package under test; an
+// ordinary package keeps its own path, whatever its name ends with.
+func providerOffenders(pkgs []listedPackage, allowed []string) (offenders []string, adapterSeen bool) {
+ testMains := map[string]bool{}
+ for _, p := range pkgs {
+ if p.ForTest != "" {
+ testMains[p.ForTest+".test"] = true
+ }
+ }
+ for _, p := range pkgs {
if p.Module == nil || p.Module.Path != guardModule {
continue
}
- base := basePackage(p.ImportPath)
+ // A generated test main imports only its variants, listed too.
+ if p.ForTest == "" && testMains[p.ImportPath] {
+ continue
+ }
+ base := basePackage(p)
pulled := providerDep(p.Deps)
if inAdapter(base) {
- if pulled != "" {
+ if strings.HasPrefix(pulled, "github.com/aws/") {
adapterSeen = true
}
continue
}
- if pulled == "" || slices.Contains(providerAllowed, base) {
+ if pulled == "" || slices.Contains(allowed, base) {
continue
}
line := base + " (via " + pulled + ")"
@@ -80,20 +112,24 @@ func TestProviderTypesStayInAdapter(t *testing.T) {
offenders = append(offenders, line)
}
}
- if len(offenders) > 0 {
- t.Errorf("packages outside %s depend on the AWS SDK or the adapter:\n %s", providerAdapter, strings.Join(offenders, "\n "))
- }
- if !adapterSeen {
- t.Errorf("go list showed no %s package depending on github.com/aws/; the guard is not seeing the adapter", providerAdapter)
+ return offenders, adapterSeen
+}
+
+// basePackage names the package an entry belongs to. A test variant
+// "q [p.test]" is q, and the external test package "p_test [p.test]" is p,
+// known by its ForTest; a plain entry is its own import path.
+func basePackage(p listedPackage) string {
+ path := plainPath(p.ImportPath)
+ if p.ForTest != "" && path == p.ForTest+"_test" {
+ return p.ForTest
}
+ return path
}
-// basePackage strips the test decorations go list -test adds: "p [p.test]",
-// "p.test" and an external test package "p_test".
-func basePackage(path string) string {
+// plainPath drops the " [p.test]" go list adds to a test variant.
+func plainPath(path string) string {
path, _, _ = strings.Cut(path, " ")
- path = strings.TrimSuffix(path, ".test")
- return strings.TrimSuffix(path, "_test")
+ return path
}
func inAdapter(path string) bool {
@@ -104,9 +140,48 @@ func inAdapter(path string) bool {
// adapter, or "" when there is none.
func providerDep(deps []string) string {
for _, d := range deps {
- if strings.HasPrefix(d, "github.com/aws/") || inAdapter(d) {
+ if strings.HasPrefix(d, "github.com/aws/") || inAdapter(plainPath(d)) {
return d
}
}
return ""
}
+
+// TestProviderGuardClassifies runs the guard's judgement on a made-up go
+// list answer, so the cases a real tree may not hold are covered: an
+// ordinary package whose name ends in _test beside the adapter, an
+// external test package that imports the adapter, and a generated test main.
+func TestProviderGuardClassifies(t *testing.T) {
+ mod := &struct{ Path string }{guardModule}
+ other := &struct{ Path string }{"example.com/other"}
+ sdk := "github.com/aws/aws-sdk-go-v2/aws"
+ adapter := providerAdapter
+ sibling := guardModule + "/internal/isolatedjob/awsjob_test"
+ ctl := guardModule + "/internal/hostedctl"
+ controller := guardModule + "/cmd/equipo-hosted-controller"
+ pkgs := []listedPackage{
+ {ImportPath: adapter, Deps: []string{sdk}, Module: mod},
+ {ImportPath: adapter + " [" + adapter + ".test]", ForTest: adapter, Deps: []string{sdk}, Module: mod},
+ {ImportPath: adapter + "_test [" + adapter + ".test]", ForTest: adapter, Deps: []string{sdk, adapter + " [" + adapter + ".test]"}, Module: mod},
+ {ImportPath: adapter + ".test", Deps: []string{sdk}, Module: mod},
+ {ImportPath: sibling, Deps: []string{sdk}, Module: mod},
+ {ImportPath: sibling + " [" + sibling + ".test]", ForTest: sibling, Deps: []string{sdk}, Module: mod},
+ {ImportPath: ctl, Deps: []string{"fmt"}, Module: mod},
+ {ImportPath: ctl + "_test [" + ctl + ".test]", ForTest: ctl, Deps: []string{adapter + " [" + ctl + ".test]"}, Module: mod},
+ {ImportPath: guardModule + "/internal/isolatedjob/awsjobx", Deps: []string{adapter}, Module: mod},
+ {ImportPath: controller, Deps: []string{sdk, adapter}, Module: mod},
+ {ImportPath: "example.com/other/aws", Deps: []string{sdk}, Module: other},
+ }
+ got, seen := providerOffenders(pkgs, []string{controller})
+ want := []string{
+ sibling + " (via " + sdk + ")",
+ ctl + " (via " + adapter + " [" + ctl + ".test])",
+ guardModule + "/internal/isolatedjob/awsjobx (via " + adapter + ")",
+ }
+ if !slices.Equal(got, want) {
+ t.Errorf("offenders =\n %s\nwant\n %s", strings.Join(got, "\n "), strings.Join(want, "\n "))
+ }
+ if !seen {
+ t.Errorf("adapterSeen = false, want true")
+ }
+}