oficina / equipo Public

plans: Task 17 live plan, review round 2

Astra round 2 F1-F6 and R39: every lookup checked before use; exact
guarded reconciliation per creation kind; contract classified from
go test -json per subtest; spend from provider startedAt; orphan
deadline on every poll; one detached-script mechanism for long blocks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev a11cf43b2f609506e1e0e367cd865edd26b5535f parent 2af4676
1 file changed, +358 −134
  • docs/superpowers/plans/2026-11-23-hosted-1a-task17-live-plan.md +358 −134

CI passed — 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.3s
ci-box: codex: fetched and verified in 3.6s
ci-box: codex-code-mode-host: fetched and verified in 1.4s
ci-box: libwrap: fetched and verified in 0.3s
ci-box: socat: fetched and verified in 0.4s
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
ci-box: image pulled in 9.9s
ci-box: pi: installed and verified in 7.2s
ci-box: opencode: installed and verified in 2.3s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 9.5s
ci-box: clone deepened in 4.0s
ci-box: file times set from content: 2908 files, 194 directories
ci-box: ready in 17.4s
=== 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 ./...
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py compile
+ go build -tags testbuild ./...
  1.2s
+ go list -export -test -tags testbuild -f  ./...
  0.6s
+ 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 1m21.203s 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 1m19.606s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m19.61s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 36.88, cpu waiting 21.92%, memory waiting 0.00%, io waiting 0.73%
--- 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.29s 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.645s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m21.64s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 36.88, cpu waiting 21.53%, memory waiting 0.00%, io waiting 0.71%
--- 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 1m24.621s 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 1m22.455s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m11.97s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 5.73s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 4.75s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 36.88, cpu waiting 20.99%, memory waiting 0.00%, io waiting 0.68%
--- 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 1m35.546s 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 1m33.853s amadan.net/oficina/equipo/internal/headless
receipt: slow test 37.6s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 36.13s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 10.56s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
receipt: slow test 9.56s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
machine: 32 CPUs, load 31.82, cpu waiting 17.55%, memory waiting 0.00%, io waiting 0.56%
--- 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 1m37.413s 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 1m35.632s amadan.net/oficina/equipo/internal/headless
receipt: slow test 59.85s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 11.01s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 10.07s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 8.78s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 5.92s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
machine: 32 CPUs, load 31.82, cpu waiting 17.55%, memory waiting 0.00%, io waiting 0.56%
--- 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

receipt: test step 3m10.592s 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 3m8.539s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m45.99s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistant
receipt: slow test 24.2s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 11.59s amadan.net/oficina/equipo/internal/headless TestHeadlessResearchHandoff
receipt: slow test 8.13s amadan.net/oficina/equipo/internal/headless TestHeadlessClaudeSignIn
receipt: slow test 7.37s amadan.net/oficina/equipo/internal/headless TestHeadlessTurnBatching
machine: 32 CPUs, load 8.47, cpu waiting 3.71%, memory waiting 0.00%, io waiting 0.11%
--- 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.155s 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 6.24, cpu waiting 1.63%, memory waiting 0.00%, io waiting 2.71%
--- 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.151s 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 6.24, cpu waiting 0.33%, memory waiting 0.00%, io waiting 2.80%
--- 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
budget note: internal/runner/thin took 4m30.115s, over the 45s its record on line 44 allows; reported only, timing fails on CI

receipt: test step 4m43.188s 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 4m30.115s amadan.net/oficina/equipo/internal/runner/thin
receipt: slow test 36.97s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeAnsweredByAnotherModel
receipt: slow test 36.9s amadan.net/oficina/equipo/internal/runner/thin TestModelsEngineeringProbesThenRunsTheStrongest
receipt: slow test 36.82s amadan.net/oficina/equipo/internal/runner/thin TestModelsUnhealthyRetriedOnDemand
receipt: slow test 18.49s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeRunsInsideTheAdmission
receipt: slow test 6.85s amadan.net/oficina/equipo/internal/runner/thin TestOpenCodeStepsRealOpenCode
machine: 32 CPUs, load 2.56, cpu waiting 0.79%, memory waiting 0.00%, io waiting 0.01%
--- 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.021s 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 45.958s amadan.net/oficina/equipo/internal/runner
receipt: slow test 25.93s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.02s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 34.21, cpu waiting 21.31%, memory waiting 0.00%, io waiting 1.30%
--- 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 47.3s 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 45.356s amadan.net/oficina/equipo/internal/runner
receipt: slow test 35.38s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 30.37s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.38s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.58s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 34.21, cpu waiting 21.31%, memory waiting 0.00%, io waiting 1.30%
--- 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.003s 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.011s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.12s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.29s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.12s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 2.39s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 1.61s amadan.net/oficina/equipo/internal/runner TestReportPostsRetryExactRequest
machine: 32 CPUs, load 25.04, cpu waiting 14.57%, memory waiting 0.00%, io waiting 1.59%
--- 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 26.4%, load 20.51
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 1m4.276s 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 1m2.461s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 26.61s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 26.46s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 24.52s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 22.13s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
receipt: slow test 21.96s amadan.net/oficina/equipo/internal/equipotest TestAuthorityProjectOwnershipIsLocal
machine: 32 CPUs, load 33.98, cpu waiting 18.11%, memory waiting 0.00%, io waiting 0.58%
--- 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 27.3%, load 20.51
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.256s 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 25.04, cpu waiting 11.40%, memory waiting 0.00%, io waiting 1.70%
--- 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 27.3%, load 20.51
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.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 1m3.806s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 14.9s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 12.78s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 9.77s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 9.72s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 6.65s amadan.net/oficina/equipo/internal/equipotest TestRosterProtectsLastOwner
machine: 32 CPUs, load 27.31, cpu waiting 14.92%, memory waiting 0.00%, io waiting 0.47%
--- 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 27.3%, load 25.04
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

receipt: test step 457ms 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 1m4.903s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 24.52s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 23.66s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 23.64s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 22.02s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsRollbackAndUnavailable
receipt: slow test 21.99s amadan.net/oficina/equipo/internal/equipotest TestSigninBackgroundSweep
machine: 32 CPUs, load 25.04, cpu waiting 11.40%, memory waiting 0.00%, io waiting 1.70%
--- 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 27.3%, load 20.51
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 597ms 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 25.04, cpu waiting 11.40%, memory waiting 0.00%, io waiting 1.70%
--- 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 27.3%, load 20.51
test lane rest: ./cmd/equipo ./cmd/equipo-hosted-controller ./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/hostedclient ./internal/hostedctl ./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-hosted-controller ./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/hostedclient ./internal/hostedctl ./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/isolatedjob: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/webread: 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/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/hostedctl took 15.452s, 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 38.991s, over the 15s its record on line 40 allows; reported only, timing fails on CI

receipt: test step 2m17.168s against a 60s target (the gate's other steps are not in this figure)
receipt: 12 packages ran, 55 cached, 20 without tests, 0 failed
receipt: slow package 52.558s amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow package 51.473s 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 38.991s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 32.06s amadan.net/oficina/equipo/cmd/equipo-runner TestReleaseRunnerHasNoFakeWorker
receipt: slow test 21.51s amadan.net/oficina/equipo/internal/runner/provider/opencode TestOpenCodeAcceptanceHostileRepository
receipt: slow test 15.08s amadan.net/oficina/equipo/internal/runner/containment TestEngineeringOfflineGo
receipt: slow test 13.95s amadan.net/oficina/equipo/internal/hostedctl TestLifecycleSimulation
receipt: slow test 10.89s amadan.net/oficina/equipo/internal/idtest TestIDCallbackGuardAndPendingNonce
machine: 32 CPUs, load 11.33, cpu waiting 5.35%, memory waiting 0.00%, io waiting 0.16%
--- 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.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.255s amadan.net/oficina/equipo/internal/headless
receipt: slow test 37.27s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 15.28s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 10.6s amadan.net/oficina/equipo/internal/headless TestBrowserChat
receipt: slow test 7.9s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 5.73s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
machine: 32 CPUs, load 36.88, cpu waiting 20.99%, memory waiting 0.00%, io waiting 0.68%
--- 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 1m32.849s 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.155s amadan.net/oficina/equipo/internal/headless
receipt: slow test 26.2s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 22.68s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 14.11s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 10.24s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
receipt: slow test 8.06s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
machine: 32 CPUs, load 33.98, cpu waiting 18.11%, memory waiting 0.00%, io waiting 0.58%
--- 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.872s 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 1m39.296s amadan.net/oficina/equipo/internal/headless
receipt: slow test 14.21s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 13.47s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 13.09s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 10.2s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsOpenCodeGoLimitRequired
receipt: slow test 10.18s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
machine: 32 CPUs, load 29.43, cpu waiting 15.91%, memory waiting 0.00%, io waiting 0.50%
--- 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 TestBrowserEmptyExplore
=== RUN   TestBrowserEmptyExplore
time=2026-11-23T10:54:24.111Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-23T10:54:24.111Z level=INFO msg="startup phase done" phase=state_lock took=66µs
time=2026-11-23T10:54:24.111Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-23T10:54:24.111Z level=INFO msg="startup phase done" phase=claim_roots took=87µs
time=2026-11-23T10:54:24.111Z level=INFO msg="startup phase" phase=sweep
time=2026-11-23T10:54:24.141Z level=INFO msg="startup phase done" phase=sweep took=29.809ms
time=2026-11-23T10:54:24.141Z level=INFO msg="startup phase" phase=credentials
time=2026-11-23T10:54:24.141Z level=INFO msg="startup phase done" phase=credentials took=103µs
time=2026-11-23T10:54:24.141Z level=INFO msg="startup phase" phase=open_state
time=2026-11-23T10:54:24.182Z level=INFO msg="startup phase done" phase=open_state took=41.247ms
time=2026-11-23T10:54:24.182Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-23T10:54:24.183Z level=INFO msg=connecting host=127.0.0.1:38103 protocol=28
time=2026-11-23T10:54:24.184Z level=INFO msg=connected host=127.0.0.1:38103 took=808µs
time=2026-11-23T10:54:24.185Z level=INFO msg="capabilities gathering"
time=2026-11-23T10:54:24.185Z level=INFO msg="capabilities gathered" took=454µs tags=linux,claude,go
time=2026-11-23T10:54:24.187Z level=INFO msg="hello sent" protocol=28
time=2026-11-23T10:54:24.191Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-23T10:54:25.222Z 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.151s
FAIL	amadan.net/oficina/equipo/internal/headless	87.461s


receipt: test step 1m28.686s 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.151s amadan.net/oficina/equipo/internal/headless
receipt: slow test 15.1s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
receipt: slow test 11.22s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 10.5s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 10.32s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 7.88s 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 '^TestBrowserEmptyExplore$' -count=1 ./internal/headless   (retry, once)
##############################################################################
FLAKE ./internal/headless:TestBrowserEmptyExplore browser-headless-rest a11cf43b2f609506e1e0e367cd865edd26b5535f 5.82s 35.37
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 31.82, cpu waiting 17.00%, memory waiting 0.00%, io waiting 0.54%
--- 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.066s 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 856ms 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 177ms 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.132s 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 6.24, cpu waiting 2.13%, memory waiting 0.00%, io waiting 2.62%
--- 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.34s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.38s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 9.43s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 9.75s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 24.77s
+ 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   (64s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 13.01s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 14.46s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 20.67s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 13.36s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless   (22s)
ok ./internal/headless TestMixedVersions 19.91s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks   (2s)
ok ./internal/runner/checks TestCheckSandboxDeniedPathsTampering 0.78s
+ 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 35.79, cpu waiting 22.58%, memory waiting 0.00%, io waiting 0.96%
--- 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.487s 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.17s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 167ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 91ms amadan.net/oficina/equipo/internal/runner/provider/codex
receipt: slow package 1ms amadan.net/oficina/equipo/internal/runner/provider
receipt: slow package 0s amadan.net/oficina/equipo/internal/runner/provider/gotoolchain
receipt: slow test 5.05s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.71s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 300ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 170ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 90ms 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.097s 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.774s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 270ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 180ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof
receipt: slow test 130ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryCleansScratch
receipt: slow test 100ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicy
machine: 32 CPUs, load 11.82, cpu waiting 5.18%, memory waiting 0.00%, io waiting 2.29%
--- 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 26.4%, load 20.51
shard 25: make runner-dead-references lanes-check build vet fmt-check budget migration-check
python3 scripts/runner-dead-references.py
reference scan: 2621 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: 96 directories within budget
CGO_ENABLED=0 go test ./internal/equipo -run '^TestMigrationModels$' -count=1
ok  	amadan.net/oficina/equipo/internal/equipo	2.497s
machine: 32 CPUs, load 34.21, cpu waiting 21.31%, memory waiting 0.00%, io waiting 1.30%
--- 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 27.3%, load 20.51
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 25.04, cpu waiting 12.76%, memory waiting 0.00%, io waiting 1.64%
--- 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 26.4%, load 20.51
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 27.84, cpu waiting 17.26%, memory waiting 0.00%, io waiting 1.48%
--- 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 26.4%, load 20.51
shard 28: make gitleaks
10:53AM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
10:53AM INF 1156 commits scanned.
10:53AM INF scanned ~62502613 bytes (62.50 MB) in 14.4s
10:53AM INF no leaks found
machine: 32 CPUs, load 32.57, cpu waiting 20.61%, memory waiting 0.00%, io waiting 1.34%
=== perf ===
go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -require TestPerfScreens,TestPerfBoot -tags perf -count=1 -p 1 -parallel 1 -run '^TestPerf' ./...
perf: GET /: median 1.059ms, worst 1.164ms, budget 150ms
perf: GET /api/runner/protocol: median 80µs, worst 103µs, budget 150ms
perf: GET /api/v1/account-setups/{id}: median 634µs, worst 743µs, budget 150ms
perf: GET /api/v1/accounts: median 414µs, worst 463µs, budget 150ms
perf: GET /api/v1/auth/devices: median 441µs, worst 484µs, budget 150ms
perf: GET /api/v1/budgets: median 496µs, worst 520µs, budget 150ms
perf: GET /api/v1/capabilities: median 258µs, worst 272µs, budget 150ms
perf: GET /api/v1/cards/{id}: median 1.24ms, worst 1.337ms, budget 150ms
perf: GET /api/v1/connections: median 579µs, worst 614µs, budget 150ms
perf: GET /api/v1/connections/{id}: median 559µs, worst 703µs, budget 150ms
perf: GET /api/v1/conversation: median 938µs, worst 957µs, budget 150ms
perf: GET /api/v1/conversation/cards: median 1.426ms, worst 1.552ms, budget 150ms
perf: GET /api/v1/coordinator: median 1.793ms, worst 1.886ms, budget 150ms
perf: GET /api/v1/invites/{id}: median 472µs, worst 495µs, budget 150ms
perf: GET /api/v1/journey: median 7.759ms, worst 11.073ms, budget 150ms
perf: GET /api/v1/me: median 464µs, worst 505µs, budget 150ms
perf: GET /api/v1/me/settings: median 521µs, worst 572µs, budget 150ms
perf: GET /api/v1/needs-you: median 7.279ms, worst 7.936ms, budget 150ms
perf: GET /api/v1/notifications: median 1.687ms, worst 1.765ms, budget 150ms
perf: GET /api/v1/onboarding: median 383µs, worst 410µs, budget 150ms
perf: GET /api/v1/people: median 436µs, worst 492µs, budget 150ms
perf: GET /api/v1/playbooks: median 553µs, worst 594µs, budget 150ms
perf: GET /api/v1/playbooks/{id}: median 525µs, worst 585µs, budget 150ms
perf: GET /api/v1/playbooks/{id}/template-diff: median 817µs, worst 898µs, budget 150ms
perf: GET /api/v1/preferences: median 758µs, worst 805µs, budget 150ms
perf: GET /api/v1/projects/{id}: median 444µs, worst 495µs, budget 150ms
perf: GET /api/v1/projects/{id}/settings: median 585µs, worst 614µs, budget 150ms
perf: GET /api/v1/roster: median 453µs, worst 475µs, budget 150ms
perf: GET /api/v1/runners/{id}: median 430µs, worst 454µs, budget 150ms
perf: GET /api/v1/specialists: median 7.898ms, worst 8.003ms, budget 150ms
perf: GET /api/v1/specialists/{id}: median 7.888ms, worst 7.92ms, budget 150ms
perf: GET /api/v1/specialists/{id}/template-diff: median 822µs, worst 853µs, budget 150ms
perf: GET /api/v1/tasks/{id}/plan: median 1.12ms, worst 1.154ms, budget 150ms
perf: GET /api/v1/tasks/{id}/thread: median 695µs, worst 755µs, budget 150ms
perf: GET /api/v1/teams: median 424µs, worst 467µs, budget 150ms
perf: GET /api/v1/templates: median 609µs, worst 633µs, budget 150ms
perf: GET /api/v1/templates/{id}: median 456µs, worst 472µs, budget 150ms
perf: GET /auth/callback: median 76µs, worst 108µs, budget 150ms
perf: GET /auth/devices/{id}: median 3.283ms, worst 3.347ms, budget 150ms
perf: GET /auth/verify: median 77µs, worst 105µs, budget 150ms
perf: GET /connections: median 3.571ms, worst 3.608ms, budget 150ms
perf: GET /conversation: median 7.408ms, worst 7.54ms, budget 150ms
perf: GET /conversation/connections: median 255µs, worst 278µs, budget 150ms
perf: GET /conversation/notebook: median 246µs, worst 305µs, budget 150ms
perf: GET /conversation/settings: median 4.175ms, worst 6.305ms, budget 150ms
perf: GET /conversation/settings/autonomy: median 3.648ms, worst 3.702ms, budget 150ms
perf: GET /conversation/settings/connections: median 6.162ms, worst 6.453ms, budget 150ms
perf: GET /conversation/settings/connections/add: median 6.388ms, worst 6.588ms, budget 150ms
perf: GET /conversation/settings/copy: median 3.694ms, worst 3.786ms, budget 150ms
perf: GET /conversation/settings/housekeeping: median 4.014ms, worst 4.138ms, budget 150ms
perf: GET /conversation/settings/machines: median 4.29ms, worst 4.457ms, budget 150ms
perf: GET /conversation/settings/machines/add: median 4.272ms, worst 4.401ms, budget 150ms
perf: GET /conversation/settings/notebook: median 3.455ms, worst 3.54ms, budget 150ms
perf: GET /conversation/settings/thinking: median 4.002ms, worst 5.595ms, budget 150ms
perf: GET /housekeeping: median 3.68ms, worst 3.934ms, budget 150ms
perf: GET /invites/new: median 577µs, worst 651µs, budget 150ms
perf: GET /invites/{id}: median 619µs, worst 650µs, budget 150ms
perf: GET /jobs: median 3.243ms, worst 3.326ms, budget 150ms
perf: GET /jobs/{id}: median 4.369ms, worst 4.471ms, budget 150ms
perf: GET /journey: median 9.944ms, worst 10.055ms, budget 150ms
perf: GET /nav/rail: median 2.773ms, worst 2.942ms, budget 150ms
perf: GET /needs-you: median 9.728ms, worst 10.05ms, budget 150ms
perf: GET /onboarding: median 3.937ms, worst 6.933ms, budget 150ms
perf: GET /people: median 3.348ms, worst 3.42ms, budget 150ms
perf: GET /playbook-suggestions/{suggestion}: median 5.12ms, worst 5.269ms, budget 150ms
perf: GET /playbooks: median 4.562ms, worst 4.75ms, budget 150ms
perf: GET /playbooks/new: median 4.821ms, worst 4.883ms, budget 150ms
perf: GET /playbooks/{id}: median 4.433ms, worst 4.57ms, budget 150ms
perf: GET /playbooks/{id}/edit: median 4.443ms, worst 4.576ms, budget 150ms
perf: GET /playbooks/{id}/template-diff: median 3.588ms, worst 3.648ms, budget 150ms
perf: GET /preferences: median 3.963ms, worst 4.159ms, budget 150ms
perf: GET /preferences/sources/{source}: median 3.874ms, worst 4.006ms, budget 150ms
perf: GET /projects: median 5.002ms, worst 5.145ms, budget 150ms
perf: GET /projects/accounts: median 3.598ms, worst 3.777ms, budget 150ms
perf: GET /projects/new: median 3.654ms, worst 3.849ms, budget 150ms
perf: GET /projects/{id}: median 10.372ms, worst 10.622ms, budget 150ms
perf: GET /projects/{id}/edit: median 3.753ms, worst 3.856ms, budget 150ms
perf: GET /runners/enrol: median 4.379ms, worst 4.595ms, budget 150ms
perf: GET /settings: median 3.338ms, worst 3.38ms, budget 150ms
perf: GET /settings/coordinator: median 5.2ms, worst 5.312ms, budget 150ms
perf: GET /settings/devices: median 3.13ms, worst 3.17ms, budget 150ms
perf: GET /settings/recovery: median 3.247ms, worst 3.334ms, budget 150ms
perf: GET /settings/recovery/release: median 3.308ms, worst 3.356ms, budget 150ms
perf: GET /settings/thinking: median 250µs, worst 304µs, budget 150ms
perf: GET /signin: median 322µs, worst 364µs, budget 150ms
perf: GET /specialists/new: median 3.25ms, worst 3.274ms, budget 150ms
perf: GET /specialists/{key}: median 10.803ms, worst 11.269ms, budget 150ms
perf: GET /specialists/{key}/edit: median 3.541ms, worst 3.576ms, budget 150ms
perf: GET /specialists/{key}/template-diff: median 3.598ms, worst 3.788ms, budget 150ms
perf: GET /tasks: median 5.03ms, worst 5.187ms, budget 150ms
perf: GET /tasks/new: median 3.076ms, worst 3.239ms, budget 150ms
perf: GET /tasks/{id}: median 5.363ms, worst 5.521ms, budget 150ms
perf: GET /tasks/{id}/merge: median 4.708ms, worst 4.818ms, budget 150ms
perf: GET /tasks/{id}/move: median 4.476ms, worst 4.528ms, budget 150ms
perf: GET /tasks/{id}/plan: median 5.625ms, worst 8.794ms, budget 150ms
perf: GET /tasks/{id}/preview: median 1.543ms, worst 1.598ms, budget 150ms
perf: GET /tasks/{id}/questions/{question}: median 5.135ms, worst 5.393ms, budget 150ms
perf: GET /tasks/{id}/rendered-change: median 4.556ms, worst 4.584ms, budget 150ms
perf: GET /tasks/{id}/rendered-change/{hash}.png: median 4.056ms, worst 4.226ms, budget 150ms
perf: GET /tasks/{id}/thread: median 7.648ms, worst 7.781ms, budget 150ms
perf: GET /team/{specialist}: median 4.143ms, worst 4.187ms, budget 150ms
perf: GET /teams: median 9.648ms, worst 9.774ms, budget 150ms
perf: GET /templates: median 3.289ms, worst 3.4ms, budget 150ms
perf: GET /usage: median 4.037ms, worst 6.622ms, budget 150ms
perf: GET /work: median 3.01ms, worst 3.167ms, budget 150ms
perf: cold boot: median 264ms of [262.840816ms 263.616035ms 265.478826ms], budget 500ms

receipt: test step 31.604s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 92 without tests, 0 failed
receipt: slow package 8.798s amadan.net/oficina/equipo/internal/equipotest
receipt: slow package 0s amadan.net/oficina/equipo/cmd/equipo-hosted-controller
receipt: slow package 0s amadan.net/oficina/equipo/cmd/equipo-runner
receipt: slow package 0s amadan.net/oficina/equipo/cmd/equipo-tool-proxy
receipt: slow package 0s amadan.net/oficina/equipo/internal/advice
receipt: slow test 7.95s amadan.net/oficina/equipo/internal/equipotest TestPerfScreens
receipt: slow test 840ms amadan.net/oficina/equipo/internal/equipotest TestPerfBoot
=== cache ===
ci-box: build cache /home/ci/work/repos/oficina__equipo/cache/go-build: 2.95 GiB in 22325 files
ci-box: module cache /home/ci/work/repos/oficina__equipo/cache/go-mod: 0.91 GiB in 33199 files
diff --git a/docs/superpowers/plans/2026-11-23-hosted-1a-task17-live-plan.md b/docs/superpowers/plans/2026-11-23-hosted-1a-task17-live-plan.md
index d4e2faa3..30788605 100644
--- a/docs/superpowers/plans/2026-11-23-hosted-1a-task17-live-plan.md
+++ b/docs/superpowers/plans/2026-11-23-hosted-1a-task17-live-plan.md
@@ -14,7 +14,7 @@ command or SDK call of any kind was made while writing it.
spend is estimated from rates and the recorded lifetimes of what the run created, and Paul reads
the bill himself. IAM is global, with no regional endpoint, so the IAM calls for the two roles
(the image build role and the connector's network-interface role: create, attach inline policy,
- read back, delete) are the one exception to eu-west-1-only. They run behind the same `kass`
+ read back, tag during S.2 reconciliation if needed, delete) are the one exception to eu-west-1-only. They run behind the same `kass`
account check as every other call, and Paul's one approval covers them.
- **Tags (R34).** Every taggable resource gets `purpose=equipo-hosted-dev` and `run=<RUN>` (a
random run ID chosen in 0.2): the VPC, its default security group (and that group's two default
@@ -33,10 +33,12 @@ command or SDK call of any kind was made while writing it.
scan, reads only VMs of the configured image ARN, which is this run's image, named with the run
ID. It cannot see or stop other people's MicroVMs in `kass`. Account-wide VM counts in 0.4 are
observations only.
-- **Spend.** Expected about $0.55. Worst case across every approved branch, failed cleanup
- included, about $7.70 (section 11). **$10 is the approval ceiling**, not a guaranteed maximum. The
- operational stop rule: the run's own estimate (section 11.2) is computed at the end of every
- section; at $5, or when any VM is live outside its step, the agent runs the safe stop.
+- **Spend.** Expected about $0.55. Worst case about $9.90: every approved branch at its bound at
+ once, VMs that fail to stop included (each ends at its AWS maximum duration). Retained storage
+ after an abort is separate and not in that figure: the image costs about $0.50 to $5.40 a month
+ until teardown (S.4). **$10 is the approval ceiling**, not a guaranteed maximum. The operational
+ stop rule: the run's own estimate (section 11.2), computed at the end of every section from each
+ VM's provider start time, reaching $5, or any VM live outside its step, means the safe stop.
- **Deviations.** Any changed command, any extra AWS call, any result outside a step's expected
branches: safe stop, then ask.
@@ -74,12 +76,49 @@ and Elastic IP setting, which the installed CLI cannot show, are checked before
MicroVM ID that appears anywhere is added to the VM ledger with `vmrec`. A deletion is recorded
with `deleted` only after a direct read shows it gone. Teardown and the safe stop work only from
these records; nothing is ever adopted or deleted because its name looks right.
-- **Long blocks.** Blocks that can run past the Bash tool's 10-minute foreground limit (2.3, 3.8,
- 3.9, 6.1, 7.2, 7.4, 7.5, 8.2, 9.A, 9.C, 10.1, 10.2) are started with the tool's background
- option and read when they exit. The block itself does not depend on that option.
+- **Long blocks, one mechanism.** These blocks can run past the Bash tool's 10-minute limit for one
+ call: 2.3, 3.8, 3.9, 6.1, 7.2, 7.3, 7.4, 8.2, 9.A, 9.C, 10.1 and 10.2 (bounds below). Each is
+ written to a script file and run detached from a sandbox-off shell, and its exit status is read
+ from a status file. Every one of them starts with the sandbox-off header, so it runs the same way
+ detached. The agent never uses another background mechanism.
+ 1. Write the block's text, exactly as printed here with only the `<T17 printed by 0.2>` path filled
+ in, to `$T17/blocks/<block>.sh` (for example `$T17/blocks/6.1.sh`).
+ 2. Start it (one sandbox-off call):
+
+ ```sh
+ set -euo pipefail; T17='<T17 printed by 0.2>'; B='<block>'
+ d="$T17/blocks"; [ -s "$d/$B.sh" ] || { echo "ABORT: no $d/$B.sh"; exit 1; }
+ [ ! -e "$d/$B.status" ] && [ ! -e "$d/$B.pid" ] || { echo "ABORT: block $B was already started"; exit 1; }
+ bash -n "$d/$B.sh"
+ date +%s > "$d/$B.start"
+ setsid nohup bash -c 'bash "$0" > "$1" 2>&1; echo $? > "$2"' "$d/$B.sh" "$d/$B.out" "$d/$B.status" </dev/null >/dev/null 2>&1 &
+ echo $! > "$d/$B.pid"; echo "block $B started, PID $(cat "$d/$B.pid")"
+ ```
+
+ 3. Wait (repeat this sandbox-off call until it prints an exit status; each call is bounded at
+ 9 minutes; `MAXMIN` is the block's bound from the table):
+
+ ```sh
+ set -euo pipefail; T17='<T17 printed by 0.2>'; B='<block>'; MAXMIN='<bound>'
+ d="$T17/blocks"; [ -s "$d/$B.start" ] || { echo "ABORT: block $B was not started"; exit 1; }
+ for i in $(seq 1 108); do [ -s "$d/$B.status" ] && break; sleep 5; done
+ tail -n 60 "$d/$B.out" || true
+ if [ -s "$d/$B.status" ]; then s=$(cat "$d/$B.status"); echo "block $B exit status $s"; [ "$s" = 0 ] || exit 1; exit 0; fi
+ el=$(( ($(date +%s) - $(cat "$d/$B.start")) / 60 ))
+ if [ "$el" -ge "$MAXMIN" ]; then
+ p=$(cat "$d/$B.pid"); kill -TERM -- "-$p" 2>/dev/null || true
+ echo "ABORT: block $B ran past its $MAXMIN-minute bound; its process group was stopped"; exit 1
+ fi
+ echo "block $B still running after $el minutes"
+ ```
+
+ An exit status other than 0, or the bound passing, is an abort (safe stop). Bounds in minutes:
+ 2.3: 20; 3.8: 25; 3.9: 25; 6.1: 75; 7.2: 40; 7.3: 15; 7.4: 25; 8.2: 25; 9.A: 15; 9.C: 15;
+ 10.1: 30; 10.2: 60.
- **The controller, with the sandbox off (R37).** A sandboxed Bash call kills its child processes
when it returns, so every block that starts, checks or stops the controller runs with the agent's
- sandbox OFF: 5.6, 6.1, 7.1, 7.2, 7.3, 7.4, 8.1, 8.2, 9.A, 9.G, 10.1, 10.9, S.1 and S.3. Outside
+ sandbox OFF: 5.6, 6.1, 7.1, 7.2, 7.3, 7.4, 8.1, 8.2, 9.A, 9.G, 10.1, 10.9, S.1 and S.3, plus
+ the other long blocks (2.3, 3.8, 3.9, 9.C, 10.2), which run detached. Outside
the sandbox `$TMPDIR` is different, so those blocks set `T17` explicitly to the path 0.2 printed;
their first line reads `set -euo pipefail; T17='<T17 printed by 0.2>'; . "$T17/env.sh"`, and that
path is the only text the agent fills in. `start_ctl` starts the controller with `setsid nohup`,
@@ -136,7 +175,7 @@ set -euo pipefail
: "${TMPDIR:?TMPDIR is unset}"
[ ! -e "$TMPDIR/equipo-t17" ] || { echo "ABORT: $TMPDIR/equipo-t17 already exists"; exit 1; }
mkdir -m 700 "$TMPDIR/equipo-t17"
-mkdir -m 700 "$TMPDIR/equipo-t17"/{out,image,iam,keys,bin}
+mkdir -m 700 "$TMPDIR/equipo-t17"/{out,image,iam,keys,bin,blocks}
cat > "$TMPDIR/equipo-t17/env.sh" <<'ENVEOF'
# env.sh: sourced by every block, after `set -euo pipefail`. Task 17 only.
: "${TMPDIR:?TMPDIR is unset}"
@@ -194,6 +233,8 @@ try() {
}
# must: after try, the call must have succeeded.
must() { [ "$RC" = 0 ] || die "call failed (rc $RC, ${ECODE:-no code}): $ERR"; }
+# get VAR CMD...: run a read; abort unless it succeeded; only then store its output in VAR.
+get() { local __v=$1; shift; try "$@"; must; printf -v "$__v" '%s' "$OUT"; }
# code_in CODE...: after try, 0 if the call failed with one of CODE.
code_in() { local c; [ "$RC" != 0 ] || return 1; for c; do [ "$ECODE" = "$c" ] && return 0; done; return 1; }
# expect_err CODE...: after try, the call must have failed with one of CODE (an expected-failure branch).
@@ -218,8 +259,18 @@ poll() {
}
# --- MicroVMs: recorded by ID (they have no tags), found by the image-scoped List ---
-vmrec() { grep -q "^$1 " "$VMS" 2>/dev/null || { printf '%s\t%s\t%s\n' "$1" "$2" "$(date -u +%FT%TZ)" >> "$VMS" || die "VM ledger write failed"; jw "VM $1 $2"; }; }
-vm_ids() { [ -f "$VMS" ] && cut -f1 "$VMS" | sort -u || true; }
+# vmrec ID SOURCE START: one VM ledger line per (ID, source, start). START is the provider's
+# startedAt, or "phase:<time>" (the start of the phase that found it) when only that is known.
+vmrec() {
+ [ $# = 3 ] && [ -n "$3" ] && [ "$3" != phase: ] || die "vmrec $1: no start time"
+ [ -f "$VMS" ] || die "no VM ledger"
+ local key; printf -v key '%s\t%s\t%s\t' "$1" "$2" "$3"
+ grep -qF "$key" "$VMS" && return 0
+ printf '%s%s\n' "$key" "$(date -u +%FT%T.%3NZ)" >> "$VMS" || die "VM ledger write failed"
+ jw "VM $1 $2 $3"
+}
+# vm_ids: sets VIDS to every recorded VM ID.
+vm_ids() { [ -f "$VMS" ] || die "no VM ledger"; VIDS=$(cut -f1 "$VMS" | sort -u) || die "VM ledger unreadable"; }
# scan: one image-scoped List, every page, every state; records every ID; writes last_scan.tsv.
scan() {
need IMAGE_ARN
@@ -227,10 +278,12 @@ scan() {
printf '%s' "$OUT" | jq -e '.items | type == "array"' >/dev/null || die "list reply has no items array"
printf '%s' "$OUT" | jq -e --arg a "$IMAGE_ARN" 'all(.items[]; .imageArn == $a)' >/dev/null || die "list returned a VM of another image"
printf '%s' "$OUT" | jq -r '.items[] | [.microvmId, .state, .startedAt] | @tsv' > "$T17/last_scan.tsv"
- local id; for id in $(cut -f1 "$T17/last_scan.tsv"); do vmrec "$id" scan; done
+ local id st started
+ while IFS=$'\t' read -r id st started; do [ -n "$id" ] && vmrec "$id" scan "$started"; done < "$T17/last_scan.tsv"
+ LIVE=$(awk -F'\t' '$2 != "TERMINATED" {print $1}' "$T17/last_scan.tsv") || die "scan output unreadable"
cat "$T17/last_scan.tsv"
}
-live_ids() { awk -F'\t' '$2 != "TERMINATED" {print $1}' "$T17/last_scan.tsv"; }
+# After scan, LIVE holds the IDs of this image's VMs that are not TERMINATED.
# vm_get ID: sets VST to the state, NOTFOUND, or ERROR:<code>.
vm_get() {
try aws lambda-microvms get-microvm --microvm-identifier "$1" --query state --output text
@@ -261,15 +314,17 @@ settle_all() {
need IMAGE_ARN; local round i clean id
for round in 1 2 3; do
scan >/dev/null
- for id in $(live_ids); do vm_end "$id"; done
- for id in $(vm_ids); do grep -q "VMGONE $id " "$JOURNAL" || vm_end "$id"; done
+ for id in $LIVE; do vm_end "$id"; done
+ vm_ids
+ for id in $VIDS; do grep -q "VMGONE $id " "$JOURNAL" || vm_end "$id"; done
clean=0
for i in 1 2 3; do
scan >/dev/null
- [ -n "$(live_ids)" ] && break
+ [ -n "$LIVE" ] && break
clean=$((clean + 1)); [ "$i" -lt 3 ] && sleep 30
done
- [ "$clean" = 3 ] && { jw "SETTLED $(vm_ids | wc -l) recorded"; echo "settled: $(vm_ids | wc -l) VMs recorded, none live in three scans"; return 0; }
+ vm_ids
+ [ "$clean" = 3 ] && { jw "SETTLED $(wc -w <<<"$VIDS") recorded"; echo "settled: $(wc -w <<<"$VIDS") VMs recorded, none live in three scans"; return 0; }
done
die "VMs still live after three settle rounds"
}
@@ -277,6 +332,7 @@ settle_all() {
launch() {
need IMAGE_ARN VER_SMALL CONN_QARN; [ -f "$4" ] || die "no payload file $4"
intent vm "$1" "token=$2" "max=$3"
+ local t0; t0=$(date -u +%FT%T.%3NZ)
try aws lambda-microvms run-microvm --image-identifier "$IMAGE_ARN" --image-version "$VER_SMALL" --client-token "$2" \
--ingress-network-connectors "$NO_INGRESS" --egress-network-connectors "$CONN_QARN" \
--maximum-duration-in-seconds "$3" --run-hook-payload "file://$4" --output json
@@ -285,12 +341,19 @@ launch() {
if [ "$RC" = 0 ]; then
L_ID=$(printf '%s' "$OUT" | jq -r '.microvmId // empty')
[ -n "$L_ID" ] || die "launch $1 succeeded with no microvmId"
- vmrec "$L_ID" "$1"
+ local st; st=$(printf '%s' "$OUT" | jq -r '.startedAt // empty')
+ vmrec "$L_ID" "$1" "${st:-phase:$t0}"
fi
echo "launch $1: rc=$L_RC code=${L_CODE:-none} id=${L_ID:-none}"
}
-# harvest LOG SOURCE: record every MicroVM ID a test or controller log names.
-harvest() { local id; for id in $(grep -oE 'mvm-[0-9A-Za-z-]+' "$1" | sort -u); do vmrec "$id" "$2"; done; }
+# harvest LOG SOURCE PHASESTART: record every MicroVM ID a log names, with the phase start as its
+# conservative start (scans add the provider's startedAt later).
+harvest() {
+ [ -f "$1" ] && [ -n "${3:-}" ] || die "harvest: no log $1 or no phase start"
+ local ids id; ids=$(grep -oE 'mvm-[0-9A-Za-z-]+' "$1" | sort -u || true)
+ for id in $ids; do vmrec "$id" "$2" "phase:$3"; done
+}
+harvest_ctl() { local t; t=$(cat "$T17/controller.start") || die "no controller start time"; harvest "$T17/controller.log" controller "$t"; }
# --- the controller process ---
ctl_pid() { [ -s "$T17/controller.pid" ] && cat "$T17/controller.pid"; }
@@ -300,14 +363,16 @@ ctl_alive() {
[ -d "/proc/$p" ] || return 1
tr '\0' ' ' < "/proc/$p/cmdline" | grep -qF "$T17/bin/controller" || die "PID $p is alive but is not this run's controller"
}
-listeners() { ss -ltnH '( sport = :18443 or sport = :18444 )' | awk '{print $4}' | sort -u | tr '\n' ' '; }
+# listeners: sets LST to the addresses listening on 18443 or 18444 (empty if none); aborts if ss fails.
+listeners() { local o; o=$(ss -ltnH '( sport = :18443 or sport = :18444 )') || die "ss failed"; LST=$(printf '%s\n' "$o" | awk 'NF {print $4}' | sort -u | tr '\n' ' '); }
# start_ctl BINARY LABEL [VAR=VALUE...]: start in its own session; PID and exit status go to files.
start_ctl() {
local bin=$1 label=$2; shift 2
[ -x "$bin" ] || die "no binary $bin"
! ctl_alive || die "a controller is already running"
- [ -z "$(listeners)" ] || die "ports 18443 or 18444 are in use: $(listeners)"
+ listeners; [ -z "$LST" ] || die "ports 18443 or 18444 are in use: $LST"
rm -f "$T17/controller.pid" "$T17/controller.exit"
+ date -u +%FT%T.%3NZ > "$T17/controller.start" || die "cannot write controller.start"
jw "CONTROLLER start $label $bin $*"
setsid nohup env -u EQUIPO_HOSTED_CRASH_AFTER_LAUNCH -u EQUIPO_HOSTED_ENABLED "$@" bash -c \
'"$0" -config "$1" >>"$2" 2>&1 & echo $! >"$3"; wait $!; echo $? >"$4"' \
@@ -329,8 +394,9 @@ _ctl_ready() {
# ctl_ready: within 240 s the audit has passed and a reaper pass has finished cleanly; listeners are 127.0.0.1 only.
ctl_ready() {
poll 240 5 "controller ready" _ctl_ready
- [ "$(listeners)" = "127.0.0.1:18443 127.0.0.1:18444 " ] || die "listeners are [$(listeners)], want 127.0.0.1:18443 and :18444 only"
- echo "controller ready: $(curl -fsS "http://$METRICS/metrics" | grep -E '^equipo_hosted_(network_audit_passing|reap_last_error|reap_last_age_seconds|store_readable) ' | tr '\n' ' ')"
+ listeners; [ "$LST" = "127.0.0.1:18443 127.0.0.1:18444 " ] || die "listeners are [$LST], want 127.0.0.1:18443 and :18444 only"
+ local m; m=$(curl -fsS "http://$METRICS/metrics") || die "metrics unreadable"
+ echo "controller ready:"; printf '%s\n' "$m" | grep -E '^equipo_hosted_(network_audit_passing|reap_last_error|reap_last_age_seconds|store_readable) ' || die "readiness metrics missing"
}
# stop_ctl: SIGTERM, then SIGKILL after 45 s if still alive; ports must close.
stop_ctl() {
@@ -342,7 +408,7 @@ stop_ctl() {
! ctl_alive || die "the controller is still alive"
fi
for i in $(seq 1 10); do [ -s "$T17/controller.exit" ] && break; sleep 1; done
- [ -z "$(listeners)" ] || die "a listener is still open: $(listeners)"
+ listeners; [ -z "$LST" ] || die "a listener is still open: $LST"
jw "CONTROLLER exited $(cat "$T17/controller.exit" 2>/dev/null || echo unknown)"
echo "controller stopped; exit status $(cat "$T17/controller.exit" 2>/dev/null || echo unknown)"
}
@@ -357,10 +423,12 @@ for r in con.execute(sys.argv[2]): print("\t".join("" if c is None else str(c) f
}
# gotest LOG ARGS...: run go test with output to LOG; record VM IDs it names; return its status.
gotest() {
- local log=$1 rc had=0; shift; case $- in *e*) had=1;; esac
+ local log=$1 rc had=0 t0; shift; case $- in *e*) had=1;; esac
+ t0=$(date -u +%FT%T.%3NZ); jw "PHASE $(basename "$log") start $t0"
set +e; (cd "$REPO" && CGO_ENABLED=0 go test "$@") > "$log" 2>&1; rc=$?; [ "$had" = 1 ] && set -e
- harvest "$log" "$(basename "$log")"
- grep -E '^(=== RUN|--- (PASS|FAIL|SKIP)|PASS|FAIL|ok|panic)' "$log" | tail -n 40
+ jw "PHASE $(basename "$log") end rc=$rc"
+ harvest "$log" "$(basename "$log")" "$t0"
+ grep -E '^(=== RUN|--- (PASS|FAIL|SKIP)|PASS|FAIL|ok|panic)' "$log" | tail -n 40 || true
return "$rc"
}
true
@@ -440,18 +508,18 @@ rec VPC "$(jq -r .Vpc.VpcId "$T17/out/1.1-vpc.json")"
aws ec2 wait vpc-available --vpc-ids "$VPC"
aws ec2 modify-vpc-attribute --vpc-id "$VPC" --enable-dns-hostnames '{"Value":false}'
aws ec2 modify-vpc-attribute --vpc-id "$VPC" --enable-dns-support '{"Value":false}'
-v=$(aws ec2 describe-vpc-attribute --vpc-id "$VPC" --attribute enableDnsSupport --query EnableDnsSupport.Value --output text); [ "$v" = False ] || die "enableDnsSupport is $v"
-v=$(aws ec2 describe-vpc-attribute --vpc-id "$VPC" --attribute enableDnsHostnames --query EnableDnsHostnames.Value --output text); [ "$v" = False ] || die "enableDnsHostnames is $v"
-DEF=$(aws ec2 describe-security-groups --filters Name=vpc-id,Values="$VPC" Name=group-name,Values=default --query 'SecurityGroups[].GroupId' --output text)
+get v aws ec2 describe-vpc-attribute --vpc-id "$VPC" --attribute enableDnsSupport --query EnableDnsSupport.Value --output text; [ "$v" = False ] || die "enableDnsSupport is $v"
+get v aws ec2 describe-vpc-attribute --vpc-id "$VPC" --attribute enableDnsHostnames --query EnableDnsHostnames.Value --output text; [ "$v" = False ] || die "enableDnsHostnames is $v"
+get DEF aws ec2 describe-security-groups --filters Name=vpc-id,Values="$VPC" Name=group-name,Values=default --query 'SecurityGroups[].GroupId' --output text
[ "$(wc -w <<<"$DEF")" = 1 ] || die "default groups: [$DEF]"; rec DEF_SG "$DEF"
-DEF=$(aws ec2 describe-route-tables --filters Name=vpc-id,Values="$VPC" Name=association.main,Values=true --query 'RouteTables[].RouteTableId' --output text)
+get DEF aws ec2 describe-route-tables --filters Name=vpc-id,Values="$VPC" Name=association.main,Values=true --query 'RouteTables[].RouteTableId' --output text
[ "$(wc -w <<<"$DEF")" = 1 ] || die "main route tables: [$DEF]"; rec MAIN_RTB "$DEF"
-DEF=$(aws ec2 describe-network-acls --filters Name=vpc-id,Values="$VPC" Name=default,Values=true --query 'NetworkAcls[].NetworkAclId' --output text)
+get DEF aws ec2 describe-network-acls --filters Name=vpc-id,Values="$VPC" Name=default,Values=true --query 'NetworkAcls[].NetworkAclId' --output text
[ "$(wc -w <<<"$DEF")" = 1 ] || die "default network ACLs: [$DEF]"; rec DEF_ACL "$DEF"
-DEF=$(aws ec2 describe-security-group-rules --filters Name=group-id,Values="$DEF_SG" --query 'SecurityGroupRules[].SecurityGroupRuleId' --output text)
+get DEF aws ec2 describe-security-group-rules --filters Name=group-id,Values="$DEF_SG" --query 'SecurityGroupRules[].SecurityGroupRuleId' --output text
[ -n "$DEF" ] || die "the default group has no rules to tag"; rec DEF_SG_RULES "$DEF"
aws ec2 create-tags --resources "$DEF_SG" "$MAIN_RTB" "$DEF_ACL" $DEF_SG_RULES --tags $TAGS_EC2
-n=$(aws ec2 describe-tags --filters Name=resource-id,Values="$VPC,$DEF_SG,$MAIN_RTB,$DEF_ACL,$(tr '\t ' ',,' <<<"$DEF_SG_RULES")" Name=key,Values=purpose --query 'length(Tags)' --output text)
+get n aws ec2 describe-tags --filters Name=resource-id,Values="$VPC,$DEF_SG,$MAIN_RTB,$DEF_ACL,$(tr '\t ' ',,' <<<"$DEF_SG_RULES")" Name=key,Values=purpose --query 'length(Tags)' --output text
[ "$n" = $(( 4 + $(wc -w <<<"$DEF_SG_RULES") )) ] || die "purpose tag on $n resources"
echo "VPC $VPC: DNS support and hostnames off; defaults tagged: $DEF_SG $MAIN_RTB $DEF_ACL $DEF_SG_RULES"
```
@@ -470,7 +538,7 @@ try aws ec2 create-subnet --vpc-id "$VPC" --cidr-block 10.177.1.0/24 --availabil
printf '%s\n' "$OUT" > "$T17/out/1.2-subnet.json"
rec SUBNET "$(jq -r .Subnet.SubnetId "$T17/out/1.2-subnet.json")"
aws ec2 wait subnet-available --subnet-ids "$SUBNET"
-got=$(aws ec2 describe-subnets --subnet-ids "$SUBNET" --query 'Subnets[0].[VpcId,CidrBlock,AvailabilityZone,MapPublicIpOnLaunch]' --output text)
+get got aws ec2 describe-subnets --subnet-ids "$SUBNET" --query 'Subnets[0].[VpcId,CidrBlock,AvailabilityZone,MapPublicIpOnLaunch]' --output text
[ "$got" = "$VPC 10.177.1.0/24 eu-west-1a False" ] || die "subnet is [$got]"
echo "subnet $SUBNET ok"
```
@@ -487,11 +555,12 @@ try aws ec2 create-route-table --vpc-id "$VPC" \
--tag-specifications "ResourceType=route-table,Tags=[{Key=purpose,Value=$TAGV},{Key=run,Value=$RUN},{Key=Name,Value=$NAME-vm}]" --output json; must
printf '%s\n' "$OUT" > "$T17/out/1.3-rtb.json"
rec RTB "$(jq -r .RouteTable.RouteTableId "$T17/out/1.3-rtb.json")"
-intent route-table-association "$RTB/$SUBNET"
-rec RTB_ASSOC "$(aws ec2 associate-route-table --route-table-id "$RTB" --subnet-id "$SUBNET" --query AssociationId --output text)"
-got=$(aws ec2 describe-route-tables --route-table-ids "$RTB" --query 'RouteTables[0].Routes[].[DestinationCidrBlock,GatewayId,State]' --output text)
+intent route-table-association "" "$RTB/$SUBNET"
+try aws ec2 associate-route-table --route-table-id "$RTB" --subnet-id "$SUBNET" --query AssociationId --output text; must
+rec RTB_ASSOC "$OUT"
+get got aws ec2 describe-route-tables --route-table-ids "$RTB" --query 'RouteTables[0].Routes[].[DestinationCidrBlock,GatewayId,State]' --output text
[ "$got" = "10.177.0.0/16 local active" ] || die "routes are [$got]"
-got=$(aws ec2 describe-route-tables --filters Name=association.subnet-id,Values="$SUBNET" --query 'RouteTables[].RouteTableId' --output text)
+get got aws ec2 describe-route-tables --filters Name=association.subnet-id,Values="$SUBNET" --query 'RouteTables[].RouteTableId' --output text
[ "$got" = "$RTB" ] || die "the subnet uses [$got]"
echo "route table $RTB: local route only, associated"
```
@@ -511,10 +580,10 @@ jq -e '[.SecurityGroupRules[] | select(.IsEgress)] | length == 1' "$T17/out/1.4-
jq -e '.SecurityGroupRules[] | select(.IsEgress) | .IpProtocol == "-1" and .CidrIpv4 == "0.0.0.0/0"' "$T17/out/1.4-rules.json" >/dev/null || die "the default egress rule is not all traffic to 0.0.0.0/0"
jq -e '[.SecurityGroupRules[] | select(.IsEgress | not)] | length == 0' "$T17/out/1.4-rules.json" >/dev/null || die "the new group has inbound rules"
rule=$(jq -r '.SecurityGroupRules[] | select(.IsEgress) | .SecurityGroupRuleId' "$T17/out/1.4-rules.json")
-[ "$(aws ec2 revoke-security-group-egress --group-id "$SG" --security-group-rule-ids "$rule" --query Return --output text)" = True ] || die "revoke failed"
-got=$(aws ec2 describe-security-groups --group-ids "$SG" --query 'SecurityGroups[0].[length(IpPermissions),length(IpPermissionsEgress)]' --output text)
+get _v aws ec2 revoke-security-group-egress --group-id "$SG" --security-group-rule-ids "$rule" --query Return --output text; [ "$_v" = True ] || die "revoke failed"
+get got aws ec2 describe-security-groups --group-ids "$SG" --query 'SecurityGroups[0].[length(IpPermissions),length(IpPermissionsEgress)]' --output text
[ "$got" = "0 0" ] || die "rules left: [$got]"
-[ "$(aws ec2 describe-security-group-rules --filters Name=group-id,Values="$SG" --query 'length(SecurityGroupRules)' --output text)" = 0 ] || die "rule list not empty"
+get _v aws ec2 describe-security-group-rules --filters Name=group-id,Values="$SG" --query 'length(SecurityGroupRules)' --output text; [ "$_v" = 0 ] || die "rule list not empty"
echo "security group $SG: no rules"
```
@@ -562,8 +631,8 @@ try aws iam create-role --role-name "$OPERATOR_ROLE" --description "Task 17 conn
arn_ok "$OUT"; rec OPERATOR_ROLE_ARN "$OUT"
aws iam put-role-policy --role-name "$OPERATOR_ROLE" --policy-name t17-connector-eni --policy-document "file://$T17/iam/operator.json"
aws iam wait role-exists --role-name "$OPERATOR_ROLE"
-[ "$(aws iam list-role-policies --role-name "$OPERATOR_ROLE" --query 'PolicyNames' --output text)" = t17-connector-eni ] || die "inline policy missing"
-[ "$(aws iam list-attached-role-policies --role-name "$OPERATOR_ROLE" --query 'length(AttachedPolicies)' --output text)" = 0 ] || die "managed policy attached"
+get _v aws iam list-role-policies --role-name "$OPERATOR_ROLE" --query 'PolicyNames' --output text; [ "$_v" = t17-connector-eni ] || die "inline policy missing"
+get _v aws iam list-attached-role-policies --role-name "$OPERATOR_ROLE" --query 'length(AttachedPolicies)' --output text; [ "$_v" = 0 ] || die "managed policy attached"
sleep 15
echo "operator role $OPERATOR_ROLE_ARN ready"
```
@@ -593,7 +662,7 @@ jq '{Arn,Id,State}' "$T17/out/2.2-connector.json"
### 2.3 Wait for ACTIVE (spike: about 4.5 min; bound 15 min)
```sh
-set -euo pipefail; . "${TMPDIR:?}/equipo-t17/env.sh"; guard
+set -euo pipefail; T17='<T17 printed by 0.2>'; . "$T17/env.sh"; guard
need CONN_ARN
_conn() { try aws lambda-core get-network-connector --identifier "$CONN_ARN" --query '[State,StateReasonCode,StateReason]' --output text
[ "$RC" = 0 ] || return 3; echo "$(date -u +%T) $OUT"; case "$OUT" in ACTIVE*) return 0;; PENDING*) return 1;; esac; return 2; }
@@ -608,7 +677,7 @@ jw "TIMING connector-active"
```sh
set -euo pipefail; . "${TMPDIR:?}/equipo-t17/env.sh"; guard
need CONN_ARN CONN_ID SUBNET SG VPC
-v=$(aws lambda-core get-network-connector --identifier "$CONN_ARN" --query Version --output text)
+get v aws lambda-core get-network-connector --identifier "$CONN_ARN" --query Version --output text
case "$v" in ''|*[!0-9]*) die "connector version is [$v]";; esac
rec CONN_VERSION "$v"; rec CONN_QARN "$CONN_ARN:$CONN_VERSION"
aws lambda-core get-network-connector --identifier "$CONN_QARN" --output json > "$T17/out/2.4-qualified.json"
@@ -647,7 +716,7 @@ try aws s3api create-bucket --bucket "$BUCKET" --create-bucket-configuration Loc
rec BUCKET_CREATED "$BUCKET"
aws s3api put-public-access-block --bucket "$BUCKET" --public-access-block-configuration BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true
aws s3api put-bucket-tagging --bucket "$BUCKET" --tagging "TagSet=[{Key=purpose,Value=$TAGV},{Key=run,Value=$RUN}]"
-[ "$(aws s3api get-bucket-tagging --bucket "$BUCKET" --query "TagSet[?Key=='run'].Value" --output text)" = "$RUN" ] || die "bucket tags missing"
+get _v aws s3api get-bucket-tagging --bucket "$BUCKET" --query "TagSet[?Key=='run'].Value" --output text; [ "$_v" = "$RUN" ] || die "bucket tags missing"
echo "bucket $BUCKET ok"
```
@@ -660,7 +729,7 @@ intent log-group "$LOG_GROUP"
try aws logs create-log-group --log-group-name "$LOG_GROUP" --tags purpose=$TAGV,run=$RUN; must
rec LOG_GROUP_CREATED "$LOG_GROUP"
aws logs put-retention-policy --log-group-name "$LOG_GROUP" --retention-in-days 1
-[ "$(aws logs describe-log-groups --log-group-name-prefix "$LOG_GROUP" --query 'logGroups[].[logGroupName,retentionInDays]' --output text)" = "$LOG_GROUP 1" ] || die "log group readback differs"
+get _v aws logs describe-log-groups --log-group-name-prefix "$LOG_GROUP" --query 'logGroups[].[logGroupName,retentionInDays]' --output text; [ "$_v" = "$LOG_GROUP 1" ] || die "log group readback differs"
```
### 3.3 Build role (least privilege)
@@ -687,7 +756,7 @@ try aws iam create-role --role-name "$BUILD_ROLE" --description "Task 17 MicroVM
arn_ok "$OUT"; rec BUILD_ROLE_ARN "$OUT"
aws iam put-role-policy --role-name "$BUILD_ROLE" --policy-name t17-build --policy-document "file://$T17/iam/build.json"
aws iam wait role-exists --role-name "$BUILD_ROLE"
-[ "$(aws iam list-role-policies --role-name "$BUILD_ROLE" --query 'PolicyNames' --output text)" = t17-build ] || die "inline policy missing"
+get _v aws iam list-role-policies --role-name "$BUILD_ROLE" --query 'PolicyNames' --output text; [ "$_v" = t17-build ] || die "inline policy missing"
sleep 15
```
@@ -748,13 +817,14 @@ need BUCKET RUN
cd "$T17/image"
rec DIGEST "sha256:$(sha256sum app.zip | cut -d' ' -f1)"
B64=$(openssl dgst -sha256 -binary app.zip | base64)
+rec ARTIFACT_B64 "$B64"
intent s3-object "s3://$BUCKET/t17/app.zip"
try aws s3api put-object --bucket "$BUCKET" --key t17/app.zip --body app.zip --checksum-algorithm SHA256 \
--checksum-sha256 "$B64" --tagging "purpose=$TAGV&run=$RUN" --query ChecksumSHA256 --output text; must
[ "$OUT" = "$B64" ] || die "put-object checksum [$OUT]"
rec ARTIFACT "s3://$BUCKET/t17/app.zip"
-[ "$(aws s3api head-object --bucket "$BUCKET" --key t17/app.zip --checksum-mode ENABLED --query ChecksumSHA256 --output text)" = "$B64" ] || die "S3 checksum differs"
-[ "$(aws s3api get-object-tagging --bucket "$BUCKET" --key t17/app.zip --query "TagSet[?Key=='run'].Value" --output text)" = "$RUN" ] || die "object tags missing"
+get _v aws s3api head-object --bucket "$BUCKET" --key t17/app.zip --checksum-mode ENABLED --query ChecksumSHA256 --output text; [ "$_v" = "$B64" ] || die "S3 checksum differs"
+get _v aws s3api get-object-tagging --bucket "$BUCKET" --key t17/app.zip --query "TagSet[?Key=='run'].Value" --output text; [ "$_v" = "$RUN" ] || die "object tags missing"
echo "artifact $ARTIFACT digest $DIGEST"
```
@@ -762,11 +832,12 @@ echo "artifact $ARTIFACT digest $DIGEST"
```sh
set -euo pipefail; . "${TMPDIR:?}/equipo-t17/env.sh"; guard
-base=$(aws lambda-microvms list-managed-microvm-images --query "items[?imageArn=='arn:aws:lambda:eu-west-1:aws:microvm-image:al2023-1'].imageArn | [0]" --output text)
+get base aws lambda-microvms list-managed-microvm-images --query "items[?imageArn=='arn:aws:lambda:eu-west-1:aws:microvm-image:al2023-1'].imageArn | [0]" --output text
[ "$base" = arn:aws:lambda:eu-west-1:aws:microvm-image:al2023-1 ] || die "no al2023-1 base image: [$base]"
rec BASE_ARN "$base"
aws lambda-microvms list-managed-microvm-image-versions --image-identifier "$BASE_ARN" --query 'items[].[imageVersion,createdAt]' --output text
-v=$(aws lambda-microvms list-managed-microvm-image-versions --image-identifier "$BASE_ARN" --query 'items[].imageVersion' --output text | tr '\t' '\n' | sort -V | tail -n 1)
+get vs aws lambda-microvms list-managed-microvm-image-versions --image-identifier "$BASE_ARN" --query 'items[].imageVersion' --output text
+v=$(tr '\t' '\n' <<<"$vs" | sort -V | tail -n 1)
case "${v%%.*}" in ''|*[!0-9]*) die "base version [$v]";; esac
[ "${v%%.*}" -ge 3 ] || die "newest base version $v is below 3 (x86_64 needs 3 or later)"
rec BASE_VER "$v"
@@ -801,7 +872,7 @@ rec IMAGE_ARN "$(jq -r .imageArn "$T17/out/3.7-image.json")"; rec VER_SMALL "$(j
### 3.8 Wait for the Small version and check it (bound 20 min)
```sh
-set -euo pipefail; . "${TMPDIR:?}/equipo-t17/env.sh"; guard
+set -euo pipefail; T17='<T17 printed by 0.2>'; . "$T17/env.sh"; guard
need IMAGE_ARN VER_SMALL ARTIFACT LOG_GROUP
_ver() { try aws lambda-microvms get-microvm-image-version --image-identifier "$IMAGE_ARN" --image-version "$1" --query '[state,status]' --output text
[ "$RC" = 0 ] || return 3; echo "$(date -u +%T) $1 $OUT"; case "$OUT" in "SUCCESSFUL ACTIVE") return 0;; PENDING*|IN_PROGRESS*) return 1;; esac; return 2; }
@@ -821,7 +892,7 @@ jw "TIMING image-small-built"
### 3.9 Large version by one update, then both versions checked
```sh
-set -euo pipefail; . "${TMPDIR:?}/equipo-t17/env.sh"; guard
+set -euo pipefail; T17='<T17 printed by 0.2>'; . "$T17/env.sh"; guard
need IMAGE_ARN IMAGE_NAME ARTIFACT BASE_ARN BASE_VER BUILD_ROLE_ARN LOG_GROUP VER_SMALL RUN
intent microvm-image-version "$IMAGE_NAME" "token=$IMAGE_NAME-update-1"
try aws lambda-microvms update-microvm-image --image-identifier "$IMAGE_ARN" --description "Task 17 minimal hook image, large, run $RUN" \
@@ -838,9 +909,9 @@ _ver() { try aws lambda-microvms get-microvm-image-version --image-identifier "$
poll 1200 15 "image version $VER_LARGE" _ver "$VER_LARGE"
aws lambda-microvms get-microvm-image-version --image-identifier "$IMAGE_ARN" --image-version "$VER_LARGE" --output json > "$T17/out/3.9-large.json"
jq -e '[.cpuConfigurations[].architecture] == ["X86_64"] and [.resources[].minimumMemoryInMiB] == [4096] and .additionalOsCapabilities == ["ALL"]' "$T17/out/3.9-large.json" >/dev/null || die "the Large version differs"
-[ "$(aws lambda-microvms get-microvm-image-version --image-identifier "$IMAGE_ARN" --image-version "$VER_SMALL" --query '[state,status]' --output text)" = "SUCCESSFUL ACTIVE" ] || die "the Small version is no longer SUCCESSFUL ACTIVE (U14)"
-st=$(aws lambda-microvms get-microvm-image --image-identifier "$IMAGE_ARN" --query state --output text); case "$st" in CREATED|UPDATED) ;; *) die "image state $st";; esac
-[ "$(aws lambda-microvms list-tags --resource "$IMAGE_ARN" --query 'Tags.run' --output text)" = "$RUN" ] || die "image tags missing"
+get _v aws lambda-microvms get-microvm-image-version --image-identifier "$IMAGE_ARN" --image-version "$VER_SMALL" --query '[state,status]' --output text; [ "$_v" = "SUCCESSFUL ACTIVE" ] || die "the Small version is no longer SUCCESSFUL ACTIVE (U14)"
+get st aws lambda-microvms get-microvm-image --image-identifier "$IMAGE_ARN" --query state --output text; case "$st" in CREATED|UPDATED) ;; *) die "image state $st";; esac
+get _v aws lambda-microvms list-tags --resource "$IMAGE_ARN" --query 'Tags.run' --output text; [ "$_v" = "$RUN" ] || die "image tags missing"
aws lambda-microvms list-microvm-image-versions --image-identifier "$IMAGE_ARN" --query 'items[].[imageVersion,state,status,resources[0].minimumMemoryInMiB]' --output text
```
@@ -862,8 +933,8 @@ intent sns-topic "$TOPIC_NAME"
try aws sns create-topic --name "$TOPIC_NAME" --tags Key=purpose,Value=$TAGV Key=run,Value=$RUN --query TopicArn --output text; must
[ "$OUT" = "arn:aws:sns:eu-west-1:$ACCOUNT:$TOPIC_NAME" ] || die "topic ARN [$OUT]"
rec TOPIC_ARN "$OUT"
-[ "$(aws sns list-tags-for-resource --resource-arn "$TOPIC_ARN" --query "Tags[?Key=='run'].Value" --output text)" = "$RUN" ] || die "topic tags missing"
-[ "$(aws sns list-subscriptions-by-topic --topic-arn "$TOPIC_ARN" --query 'length(Subscriptions)' --output text)" = 0 ] || die "the new topic has subscriptions"
+get _v aws sns list-tags-for-resource --resource-arn "$TOPIC_ARN" --query "Tags[?Key=='run'].Value" --output text; [ "$_v" = "$RUN" ] || die "topic tags missing"
+get _v aws sns list-subscriptions-by-topic --topic-arn "$TOPIC_ARN" --query 'length(Subscriptions)' --output text; [ "$_v" = 0 ] || die "the new topic has subscriptions"
```
- 0.4 proved the name did not exist, so `create-topic`'s idempotent return cannot be someone else's
@@ -890,7 +961,7 @@ jq -r '.[] | [.id, .role] | @tsv' "$T17/keys/verify_keys.json"
```sh
set -euo pipefail; . "${TMPDIR:?}/equipo-t17/env.sh"
-[ -z "$(listeners)" ] || die "in use: $(listeners)"; echo "ports 18443 and 18444 free"
+listeners; [ -z "$LST" ] || die "in use: $LST"; echo "ports 18443 and 18444 free"
```
### 5.3 Controller config and live contract config
@@ -1007,39 +1078,62 @@ Runs after 9.A to 9.F (client-token behaviour known, facts VMs settled).
### 6.1 Run it, then settle every VM it made
+The test runs with `go test -json`, so each line of output carries the subtest it belongs to. A
+passing run is handled first. A failing run is accepted only if every failed subtest is one of the
+two approved exceptions and its own output holds exactly the approved failure; nothing outside the
+subtest's output (such as 9.A's result) is used to classify it.
+
```sh
set -euo pipefail; T17='<T17 printed by 0.2>'; . "$T17/env.sh"; guard
-need A3_RESULT IMAGE_ARN
+need IMAGE_ARN
! ctl_alive || die "the controller is running"
-scan >/dev/null; [ -z "$(live_ids)" ] || die "live VMs of this image before the contract: $(live_ids)"
-jw "PHASE contract start"
+scan >/dev/null; [ -z "$LIVE" ] || die "live VMs of this image before the contract: $LIVE"
export EQUIPO_HOSTED_LIVE_CONFIG="$T17/live.json"
-if gotest "$T17/out/6-contract.log" -tags hostedlive ./internal/isolatedjob/awsjob -run TestLiveContract -count=1 -v -timeout 60m; then rc=0; else rc=$?; fi
-jw "PHASE contract end rc=$rc"
+J="$T17/out/6-contract.json"
+if gotest "$J" -tags hostedlive ./internal/isolatedjob/awsjob -run TestLiveContract -count=1 -v -json -timeout 60m; then rc=0; else rc=$?; fi
settle_all
+[ -s "$J" ] || die "no test output"
+jq -R -r 'fromjson? | select(.Action == "output") | .Output' "$J" > "$T17/out/6-contract.log"
! grep -E "microvm id is missing or malformed|microvm id is malformed|empty or malformed ref" "$T17/out/6-contract.log" || die "the adapter refused a MicroVM ID as malformed (R36): stop and ask"
grep -E 'visibility: Get showed new VM |list lag: List showed running VM ' "$T17/out/6-contract.log" || die "the contract logged no visibility or list-lag lines"
-fails=$(grep -oE -- '--- FAIL: TestLiveContract/[A-Za-z]+' "$T17/out/6-contract.log" | sed 's|.*/||' | sort -u | tr '\n' ' ')
-echo "rc=$rc failed subtests: [$fails]"
-if [ "$rc" = 0 ]; then echo "contract PASS"; exit 0; fi
+top=$(jq -R -r 'fromjson? | select(.Test == "TestLiveContract" and (.Action == "pass" or .Action == "fail")) | .Action' "$J")
+if [ "$rc" = 0 ]; then
+ [ "$top" = pass ] || die "go test exited 0 but TestLiveContract did not pass ([$top])"
+ jw "CONTRACT pass"; echo "contract PASS"; exit 0
+fi
+[ "$top" = fail ] || die "go test failed (rc $rc) outside TestLiveContract ([$top]): build error, panic or timeout"
+fails=$(jq -R -r 'fromjson? | select(.Action == "fail" and (.Test // "" | startswith("TestLiveContract/"))) | .Test' "$J" | sort -u)
+[ -n "$fails" ] || die "TestLiveContract failed with no failed subtest"
+sub_out() { jq -R -r --arg t "$1" 'fromjson? | select(.Test == $t and .Action == "output") | .Output' "$J" | grep -E '^\s+contract\.go:[0-9]+: ' | grep -vE 'contract\.go:[0-9]+: (visibility|list lag): ' || true; }
for f in $fails; do
+ msgs=$(sub_out "$f"); n=$(grep -c . <<<"$msgs" || true)
+ echo "$f: $msgs"
case "$f" in
- StopUnknownRef) grep -A8 -- "--- FAIL: TestLiveContract/StopUnknownRef" "$T17/out/6-contract.log" | grep -q ValidationException || die "StopUnknownRef failed without a ValidationException";;
- ChangedSpecConflicts) case "$A3_RESULT" in refused:*|same-vm) ;; *) die "ChangedSpecConflicts failed and 9.A found $A3_RESULT";; esac;;
+ TestLiveContract/StopUnknownRef)
+ [ "$n" = 1 ] && grep -qE 'Stop\(contract-never-launched-[0-9a-f]+\) of a ref the provider never held = .*ValidationException.*, want nil$' <<<"$msgs" \
+ || die "StopUnknownRef failed for a reason other than the approved ValidationException";;
+ TestLiveContract/ChangedSpecConflicts)
+ [ "$n" = 1 ] && grep -qE 'Launch with the same attempt and a new bootstrap = \("", .*(ConflictException|ValidationException).*\), want ErrConflict$' <<<"$msgs" \
+ || die "ChangedSpecConflicts failed for a reason other than an unmapped Conflict or Validation refusal with no VM";;
*) die "contract subtest $f failed";;
esac
done
-jw "FINDING contract failures within the approved exceptions: $fails"
+jw "FINDING contract failures within the approved exceptions: $(tr '\n' ' ' <<<"$fails")"
echo "contract: approved exceptions only: $fails"
```
- Expected: `contract PASS`, and `settled: N VMs recorded` (about 7 contract VMs, each with a
15-minute maximum duration). The `visibility: Get showed new VM ...` and `list lag: List showed
running VM ...` lines are the measured delays (the pre-flight's 60 s and 30 s are guesses).
-- Approved exceptions, recorded as findings for an adapter fix after the run (not a pass):
- `StopUnknownRef` failing with a `ValidationException` (U11); `ChangedSpecConflicts` failing only
- on error mapping when 9.A showed a changed request was refused or answered with the same VM.
-- Abort if: any other failure, or `settle_all` cannot settle.
+- Approved exceptions, recorded as findings for an adapter fix after the run (not a pass), each
+ only with exactly one failure line in its own output:
+ - `StopUnknownRef`: `Stop(contract-never-launched-<hex>) of a ref the provider never held = <error
+ naming ValidationException>, want nil` (U11).
+ - `ChangedSpecConflicts`: `Launch with the same attempt and a new bootstrap = ("", <error naming
+ ConflictException or ValidationException>), want ErrConflict`: AWS refused the changed request
+ and no VM was returned, but the adapter did not map the refusal to `ErrConflict`.
+- Abort if: any other failure (another subtest, another message, a second VM, a throttling or other
+ provider error, a build error, panic or timeout), or `settle_all` cannot settle.
---
@@ -1049,7 +1143,7 @@ echo "contract: approved exceptions only: $fails"
```sh
set -euo pipefail; T17='<T17 printed by 0.2>'; . "$T17/env.sh"; guard
-scan >/dev/null; [ -z "$(live_ids)" ] || die "live VMs of this image: $(live_ids)"
+scan >/dev/null; [ -z "$LIVE" ] || die "live VMs of this image: $LIVE"
start_ctl "$T17/bin/controller" sequence EQUIPO_HOSTED_ENABLED=1
ctl_ready
grep -F 'launches enabled: true' "$T17/controller.log" || die "launches are not enabled"
@@ -1065,7 +1159,7 @@ jw "PHASE sequence start"
if gotest "$T17/out/7.2-sequence.log" -tags hostedlive ./internal/hostedclient -run 'TestLiveControllerSequence$' -count=1 -v -timeout 30m; then rc=0; else rc=$?; fi
jw "PHASE sequence end rc=$rc"
grep -E 'attempt |launch:|running:|pause:|suspended:|resume:|stop:|timings:' "$T17/out/7.2-sequence.log" || true
-harvest "$T17/controller.log" controller
+harvest_ctl
stop_ctl
settle_all
! grep -hE "microvm id is missing or malformed|microvm id is malformed|empty or malformed ref" "$T17/out/7.2-sequence.log" "$T17/controller.log" || die "a MicroVM ID was refused as malformed (R36): stop and ask"
@@ -1096,8 +1190,8 @@ if gotest "$T17/out/7.3-launch.log" -tags hostedlive ./internal/hostedclient -ru
_exited() { [ -s "$T17/controller.exit" ] && return 0; return 1; }
poll 60 2 "crash-build controller exit" _exited
[ "$(cat "$T17/controller.exit")" = 137 ] || die "exit status $(cat "$T17/controller.exit"), want 137"
-[ -z "$(listeners)" ] || die "listeners still open"
-harvest "$T17/controller.log" controller
+listeners; [ -z "$LST" ] || die "listeners still open: $LST"
+harvest_ctl
vm=$(grep -oE "provider launched mvm-[0-9A-Za-z-]+ for $CRASH_ATTEMPT" "$T17/controller.log" | tail -n 1 | cut -d' ' -f3)
rec CRASH_VM "$vm"
vm_get "$CRASH_VM"; echo "crash VM $CRASH_VM: $VST"
@@ -1129,7 +1223,7 @@ export EQUIPO_HOSTED_LIVE_ATTEMPT="$CRASH_ATTEMPT" EQUIPO_HOSTED_LIVE_CRASH_STEP
EQUIPO_HOSTED_LIVE_OPERATOR_KEY_ID=task17-operator EQUIPO_HOSTED_LIVE_OPERATOR_KEY_FILE="$T17/keys/operator.key"
if gotest "$T17/out/7.4-recover.log" -tags hostedlive ./internal/hostedclient -run 'TestLiveCrashRecovery$' -count=1 -v -timeout 15m; then rc=0; else rc=$?; fi
grep -E 'recover:|listed vm|stop:' "$T17/out/7.4-recover.log" || true
-harvest "$T17/controller.log" controller
+harvest_ctl
stop_ctl
settle_all
[ "$rc" = 0 ] || die "the recover step failed"
@@ -1155,7 +1249,7 @@ dbread "select action, reason from audit where attempt_id='$CRASH_ATTEMPT' order
```sh
set -euo pipefail; T17='<T17 printed by 0.2>'; . "$T17/env.sh"; guard
-scan >/dev/null; [ -z "$(live_ids)" ] || die "live VMs of this image: $(live_ids)"
+scan >/dev/null; [ -z "$LIVE" ] || die "live VMs of this image: $LIVE"
start_ctl "$T17/bin/controller" orphan
ctl_ready
metrics | grep -E '^equipo_hosted_jobs\{state="waiting"\} 0$' || die "a waiting intent exists, so R22 would defer the orphan"
@@ -1181,13 +1275,14 @@ set -euo pipefail; T17='<T17 printed by 0.2>'; . "$T17/env.sh"; guard
need ORPHAN_VM ORPHAN_PLANTED
P=$(date -d "$ORPHAN_PLANTED" +%s)
while :; do
+ now=$(date +%s)
+ [ $(( now - P )) -lt 900 ] || die "no stop seen by P+15:00 (last state ${VST:-none})"
ctl_alive || die "the controller stopped"
- now=$(date +%s); vm_get "$ORPHAN_VM"
+ vm_get "$ORPHAN_VM"
echo "P+$(( (now - P) / 60 )):$(printf %02d $(( (now - P) % 60 ))) $VST"
case "$VST" in
- PENDING|RUNNING) [ $(( now - P )) -lt 900 ] || die "the orphan is still live at P+15:00";;
+ PENDING|RUNNING|ERROR:ThrottlingException) ;;
TERMINATING|TERMINATED|NOTFOUND) break;;
- ERROR:ThrottlingException) ;;
*) die "orphan state $VST";;
esac
sleep 20
@@ -1207,7 +1302,9 @@ n=$(dbread "select count(*) from audit where action='orphan_stopped' and reason
- Expected: `RUNNING` until about P+11:00 to P+12:30; then the alert metric, the controller's log
line `hosted controller: orphan VM stopped` naming the VM (no deferral line), one `orphan_seen` and one `orphan_stopped` audit row for it; the VM ends.
-- Abort if: stopped before P+10:00, still live at P+15:00, or any evidence check fails.
+- Abort if: stopped before P+10:00; no stop seen by P+15:00, whatever the reads returned (the
+ deadline is checked first on every iteration, so repeated throttling cannot extend it); or any
+ evidence check fails.
---
@@ -1224,7 +1321,7 @@ count as results; any other error aborts.
```sh
set -euo pipefail; T17='<T17 printed by 0.2>'; . "$T17/env.sh"; guard
! ctl_alive || die "the controller is running"
-scan >/dev/null; [ -z "$(live_ids)" ] || die "live VMs of this image: $(live_ids)"
+scan >/dev/null; [ -z "$LIVE" ] || die "live VMs of this image: $LIVE"
printf 'task17-a' > "$T17/out/payload-a"; printf 'task17-b' > "$T17/out/payload-b"
rec TOKEN_A "t17-token-$RUN"
rec A1_BEFORE "$(date -u +%FT%T.%3NZ)"
@@ -1285,7 +1382,7 @@ done
### 9.C Resume on RUNNING; suspend on SUSPENDED; a second resume
```sh
-set -euo pipefail; . "${TMPDIR:?}/equipo-t17/env.sh"; guard
+set -euo pipefail; T17='<T17 printed by 0.2>'; . "$T17/env.sh"; guard
need VM_A
r() { try aws lambda-microvms "$1" --microvm-identifier "$VM_A"; echo "$1: rc=$RC code=${ECODE:-none} ${ERR}"; }
r resume-microvm
@@ -1416,7 +1513,7 @@ printf '%s' "$OUT" | jq -e --arg a "$IMAGE_ARN" '[.items[] | select(.imageArn ==
### 10.2 Connector, then its network interfaces
```sh
-set -euo pipefail; . "${TMPDIR:?}/equipo-t17/env.sh"; guard
+set -euo pipefail; T17='<T17 printed by 0.2>'; . "$T17/env.sh"; guard
need CONN_ARN VPC
try aws lambda-core delete-network-connector --identifier "$CONN_ARN"; must
_conn() { try aws lambda-core get-network-connector --identifier "$CONN_ARN" --query State --output text
@@ -1424,7 +1521,8 @@ _conn() { try aws lambda-core get-network-connector --identifier "$CONN_ARN" --q
[ "$ECODE" = ResourceNotFoundException ] && return 0; return 3; }
poll 900 15 "connector deleted" _conn
deleted connector "$CONN_ARN"
-_enis() { local n; n=$(aws ec2 describe-network-interfaces --filters Name=vpc-id,Values="$VPC" --query 'length(NetworkInterfaces)' --output text) || return 3; echo "$(date -u +%T) interfaces in VPC: $n"; [ "$n" = 0 ]; }
+_enis() { try aws ec2 describe-network-interfaces --filters Name=vpc-id,Values="$VPC" --query 'length(NetworkInterfaces)' --output text
+ [ "$RC" = 0 ] || return 3; echo "$(date -u +%T) interfaces in VPC: $OUT"; [ "$OUT" = 0 ] && return 0; return 1; }
poll 2400 30 "connector interfaces gone" _enis
for e in $(awk -F'\t' '$2 ~ /^SERVICE-ENI / {split($2, a, " "); print a[2]}' "$JOURNAL"); do
try aws ec2 describe-network-interfaces --network-interface-ids "$e"; expect_err InvalidNetworkInterfaceID.NotFound
@@ -1440,7 +1538,7 @@ done
```sh
set -euo pipefail; . "${TMPDIR:?}/equipo-t17/env.sh"; guard
need SG RTB RTB_ASSOC SUBNET VPC DEF_SG MAIN_RTB DEF_ACL
-[ "$(aws ec2 delete-security-group --group-id "$SG" --query Return --output text)" = True ] || die "delete group"
+get _v aws ec2 delete-security-group --group-id "$SG" --query Return --output text; [ "$_v" = True ] || die "delete group"
try aws ec2 describe-security-groups --group-ids "$SG"; expect_err InvalidGroup.NotFound; deleted security-group "$SG"
aws ec2 disassociate-route-table --association-id "$RTB_ASSOC"; deleted route-table-association "$RTB_ASSOC"
aws ec2 delete-route-table --route-table-id "$RTB"
@@ -1461,10 +1559,10 @@ try aws ec2 describe-network-acls --network-acl-ids "$DEF_ACL"; expect_err Inval
```sh
set -euo pipefail; . "${TMPDIR:?}/equipo-t17/env.sh"; guard
need OPERATOR_ROLE BUILD_ROLE
-aws iam delete-role-policy --role-name "$OPERATOR_ROLE" --policy-name t17-connector-eni
+try aws iam delete-role-policy --role-name "$OPERATOR_ROLE" --policy-name t17-connector-eni; [ "$RC" = 0 ] || expect_err NoSuchEntity
aws iam delete-role --role-name "$OPERATOR_ROLE"
try aws iam get-role --role-name "$OPERATOR_ROLE"; expect_err NoSuchEntity; deleted iam-role "$OPERATOR_ROLE"
-aws iam delete-role-policy --role-name "$BUILD_ROLE" --policy-name t17-build
+try aws iam delete-role-policy --role-name "$BUILD_ROLE" --policy-name t17-build; [ "$RC" = 0 ] || expect_err NoSuchEntity
aws iam delete-role --role-name "$BUILD_ROLE"
try aws iam get-role --role-name "$BUILD_ROLE"; expect_err NoSuchEntity; deleted iam-role "$BUILD_ROLE"
```
@@ -1476,7 +1574,8 @@ set -euo pipefail; . "${TMPDIR:?}/equipo-t17/env.sh"; guard
need BUCKET
aws s3api delete-object --bucket "$BUCKET" --key t17/app.zip
try aws s3api head-object --bucket "$BUCKET" --key t17/app.zip; expect_err 404; deleted s3-object "s3://$BUCKET/t17/app.zip"
-[ "$(aws s3api list-object-versions --bucket "$BUCKET" --output json | jq '((.Versions // []) + (.DeleteMarkers // [])) | length')" = 0 ] || die "objects left in the bucket"
+get _v aws s3api list-object-versions --bucket "$BUCKET" --output json
+[ "$(jq '((.Versions // []) + (.DeleteMarkers // [])) | length' <<<"$_v")" = 0 ] || die "objects left in the bucket"
aws s3api delete-bucket --bucket "$BUCKET"
try aws s3api head-bucket --bucket "$BUCKET"; expect_err 404; deleted s3-bucket "$BUCKET"
```
@@ -1486,10 +1585,11 @@ try aws s3api head-bucket --bucket "$BUCKET"; expect_err 404; deleted s3-bucket
```sh
set -euo pipefail; . "${TMPDIR:?}/equipo-t17/env.sh"; guard
need LOG_GROUP
-got=$(aws logs describe-log-groups --log-group-name-prefix "$LOG_GROUP" --query 'logGroups[].logGroupName' --output text)
+get got aws logs describe-log-groups --log-group-name-prefix "$LOG_GROUP" --query 'logGroups[].logGroupName' --output text
[ "$got" = "$LOG_GROUP" ] || die "log groups under the prefix: [$got]; any group the run did not create goes to Paul"
aws logs delete-log-group --log-group-name "$LOG_GROUP"
-[ -z "$(aws logs describe-log-groups --log-group-name-prefix "$LOG_GROUP" --query 'logGroups[].logGroupName' --output text)" ] || die "log group still listed"
+get got aws logs describe-log-groups --log-group-name-prefix "$LOG_GROUP" --query 'logGroups[].logGroupName' --output text
+[ -z "$got" ] || die "log group still listed: [$got]"
deleted log-group "$LOG_GROUP"
```
@@ -1510,8 +1610,9 @@ need RUN IMAGE_ARN
echo "== confirmed creations without a confirmed deletion:"
awk -F'\t' '$2 ~ /^DELETED / {split($2, a, " "); d[a[3]] = 1} $2 ~ /^CONFIRMED / {split($2, a, " "); c[a[3]] = a[2]} END {for (k in c) if (!(k in d)) print c[k], k}' "$JOURNAL" | sort
echo "== VMs: recorded, and how each ended:"
-for id in $(vm_ids); do grep -q "VMGONE $id " "$JOURNAL" || die "VM $id has no confirmed end"; done
-echo "$(vm_ids | wc -l) VMs recorded, every one confirmed ended"
+vm_ids
+for id in $VIDS; do grep -q "VMGONE $id " "$JOURNAL" || die "VM $id has no confirmed end"; done
+echo "$(wc -w <<<"$VIDS") VMs recorded, every one confirmed ended"
echo "== intents without a confirmation:"
awk -F'\t' '$2 ~ /^INTENT /' "$JOURNAL"
echo "== tag index (lags; direct reads above decide):"
@@ -1530,7 +1631,7 @@ for k in run purpose; do v=$([ "$k" = run ] && echo "$RUN" || echo "$TAGV")
```sh
set -euo pipefail; T17='<T17 printed by 0.2>'; . "$T17/env.sh"
-! ctl_alive || die "the controller is running"; [ -z "$(listeners)" ] || die "listeners open"
+! ctl_alive || die "the controller is running"; listeners; [ -z "$LST" ] || die "listeners open: $LST"
cut -f2- "$JOURNAL" | grep -vE '^(INTENT|CONTROLLER) ' > "$T17/journal-for-progress.txt"
wc -l "$T17/journal-for-progress.txt" "$VMS"
```
@@ -1559,29 +1660,135 @@ If `stop_ctl` aborts because the PID belongs to another process, or a port stays
hides the process, stop here and ask Paul: nothing is signalled that is not proven to be this run's
controller.
-**S.2 Reconcile uncertain creations.** For each `INTENT` without a `CONFIRMED` line, look the
-resource up by the run-specific name or `run` tag it was created with, and record it only if found
-that way. A resource is adopted only when its name carries this run's random ID (and 0.4 showed the
-name free) and, where taggable, it carries `run=<RUN>`.
+**S.2 Reconcile uncertain creations (R39).** For each creation whose `INTENT` has no `CONFIRMED`
+record, one direct, guarded read decides. A resource created with a run-unique name (the run ID,
+proved absent by 0.4) and found by that exact name is ours: it is recorded, tagged if a separate
+tagging call never ran, and torn down. The unnamed EC2 resources carried their tags in the create
+call (`TagSpecifications`) and are found by a direct `describe` filtered on the `run` tag and their
+`Name` tag, never through the tag index. Each read has exactly three outcomes: success (record),
+an approved not-found code (`NOTCREATED`), or anything else (`UNRESOLVED`: that resource's
+reconciliation stops and it goes to Paul with its cost in S.4). The MicroVM intents are reconciled
+by S.3.
```sh
set -euo pipefail; . "${TMPDIR:?}/equipo-t17/env.sh"; guard
-awk -F'\t' '$2 ~ /^INTENT /' "$JOURNAL"
-for t in vpc subnet route-table security-group; do
- case $t in vpc) q='Vpcs[].VpcId'; c=describe-vpcs;; subnet) q='Subnets[].SubnetId'; c=describe-subnets;;
- route-table) q='RouteTables[].RouteTableId'; c=describe-route-tables;; security-group) q='SecurityGroups[].GroupId'; c=describe-security-groups;; esac
- echo "$t with run=$RUN: $(aws ec2 $c --filters Name=tag:run,Values=$RUN --query "$q" --output text)"
+need RUN NAME SG_NAME OPERATOR_ROLE BUILD_ROLE CONN_NAME IMAGE_NAME BUCKET LOG_GROUP TOPIC_NAME TAGS_EC2
+UNRES=""
+unresolved() { jw "UNRESOLVED $*"; UNRES="$UNRES|$*"; echo "UNRESOLVED: $*"; }
+absent() { jw "NOTCREATED $*"; echo "not created: $*"; }
+pending() { awk -F'\t' -v k="INTENT $1 $2" 'index($2, k) == 1 {f = 1} END {exit !f}' "$JOURNAL" && [ -z "${!3:-}" ]; }
+# one_ec2 KIND VAR CMD...: a describe that must list 0 or 1 IDs.
+one_ec2() { local kind=$1 var=$2; shift 2; try "$@"
+ if [ "$RC" != 0 ]; then unresolved "$kind lookup failed: ${ECODE:-rc$RC}"; return; fi
+ case "$(wc -w <<<"$OUT")" in 0) absent "$kind";; 1) rec "$var" "$OUT";; *) unresolved "$kind: several match: $OUT";; esac; }
+# one_def KIND VAR CMD...: a VPC default resource; it exists whenever the VPC does, so only exactly one is an answer.
+one_def() { local kind=$1 var=$2; shift 2; try "$@"
+ if [ "$RC" = 0 ] && [ "$(wc -w <<<"$OUT")" = 1 ]; then rec "$var" "$OUT"; else unresolved "$kind: rc $RC ${ECODE:-} [$OUT]"; fi; }
+
+if pending vpc "tag:run=$RUN" VPC; then one_ec2 vpc VPC aws ec2 describe-vpcs --filters Name=tag:run,Values="$RUN" Name=tag:Name,Values="$NAME" --query 'Vpcs[].VpcId' --output text; fi
+if [ -n "${VPC:-}" ] && [ -z "${DEF_SG_RULES:-}" ]; then
+ [ -n "${DEF_SG:-}" ] || one_def vpc-default-security-group DEF_SG aws ec2 describe-security-groups --filters Name=vpc-id,Values="$VPC" Name=group-name,Values=default --query 'SecurityGroups[].GroupId' --output text
+ [ -n "${MAIN_RTB:-}" ] || one_def vpc-main-route-table MAIN_RTB aws ec2 describe-route-tables --filters Name=vpc-id,Values="$VPC" Name=association.main,Values=true --query 'RouteTables[].RouteTableId' --output text
+ [ -n "${DEF_ACL:-}" ] || one_def vpc-default-network-acl DEF_ACL aws ec2 describe-network-acls --filters Name=vpc-id,Values="$VPC" Name=default,Values=true --query 'NetworkAcls[].NetworkAclId' --output text
+ if [ -n "${DEF_SG:-}" ] && [ -n "${MAIN_RTB:-}" ] && [ -n "${DEF_ACL:-}" ]; then
+ try aws ec2 describe-security-group-rules --filters Name=group-id,Values="$DEF_SG" --query 'SecurityGroupRules[].SecurityGroupRuleId' --output text
+ if [ "$RC" = 0 ] && [ -n "$OUT" ]; then rec DEF_SG_RULES "$OUT"
+ try aws ec2 create-tags --resources "$DEF_SG" "$MAIN_RTB" "$DEF_ACL" $DEF_SG_RULES --tags $TAGS_EC2
+ [ "$RC" = 0 ] || unresolved "vpc defaults: tagging failed: ${ECODE:-rc$RC}"
+ else unresolved "vpc default security group rules: ${ECODE:-rc$RC}"; fi
+ fi
+fi
+if pending subnet "tag:run=$RUN" SUBNET; then one_ec2 subnet SUBNET aws ec2 describe-subnets --filters Name=tag:run,Values="$RUN" Name=tag:Name,Values="$NAME-vm" --query 'Subnets[].SubnetId' --output text; fi
+if pending route-table "tag:run=$RUN" RTB; then one_ec2 route-table RTB aws ec2 describe-route-tables --filters Name=tag:run,Values="$RUN" Name=tag:Name,Values="$NAME-vm" --query 'RouteTables[].RouteTableId' --output text; fi
+if pending route-table-association "" RTB_ASSOC && [ -n "${RTB:-}" ] && [ -n "${SUBNET:-}" ]; then
+ one_ec2 route-table-association RTB_ASSOC aws ec2 describe-route-tables --route-table-ids "$RTB" --query "RouteTables[0].Associations[?SubnetId=='$SUBNET'].RouteTableAssociationId" --output text; fi
+if pending security-group "$SG_NAME" SG; then one_ec2 security-group SG aws ec2 describe-security-groups --filters Name=tag:run,Values="$RUN" Name=group-name,Values="$SG_NAME" --query 'SecurityGroups[].GroupId' --output text; fi
+for pair in "$OPERATOR_ROLE:OPERATOR_ROLE_ARN" "$BUILD_ROLE:BUILD_ROLE_ARN"; do
+ r=${pair%%:*}; v=${pair#*:}
+ pending iam-role "$r" "$v" || continue
+ try aws iam get-role --role-name "$r" --output json
+ if [ "$RC" = 0 ]; then arn=$(jq -r .Role.Arn <<<"$OUT"); arn_ok "$arn"; rec "$v" "$arn"
+ if ! jq -e --arg r "$RUN" 'any(.Role.Tags[]?; .Key == "run" and .Value == $r)' <<<"$OUT" >/dev/null; then
+ try aws iam tag-role --role-name "$r" --tags Key=purpose,Value=$TAGV Key=run,Value=$RUN; [ "$RC" = 0 ] || unresolved "iam-role $r: tagging failed: ${ECODE:-rc$RC}"; fi
+ elif code_in NoSuchEntity; then absent "iam-role $r"
+ else unresolved "iam-role $r: ${ECODE:-rc$RC}"; fi
+done
+if pending connector "$CONN_NAME" CONN_ARN; then
+ try aws lambda-core get-network-connector --identifier "$CONN_NAME" --output json
+ if [ "$RC" = 0 ] && [ "$(jq -r .Name <<<"$OUT")" = "$CONN_NAME" ]; then arn=$(jq -r .Arn <<<"$OUT"); arn_ok "$arn"; rec CONN_ARN "$arn"; rec CONN_ID "$(jq -r .Id <<<"$OUT")"
+ elif code_in ResourceNotFoundException; then absent "connector $CONN_NAME"
+ else unresolved "connector $CONN_NAME: ${ECODE:-rc$RC}"; fi
+fi
+if pending s3-bucket "$BUCKET" BUCKET_CREATED; then
+ try aws s3api head-bucket --bucket "$BUCKET"
+ if [ "$RC" = 0 ]; then rec BUCKET_CREATED "$BUCKET"
+ try aws s3api get-bucket-tagging --bucket "$BUCKET" --query "TagSet[?Key=='run'].Value" --output text
+ if [ "$RC" = 0 ] && [ "$OUT" = "$RUN" ]; then :
+ elif [ "$RC" = 0 ] || code_in NoSuchTagSet; then
+ try aws s3api put-public-access-block --bucket "$BUCKET" --public-access-block-configuration BlockPublicAcls=true,IgnorePublicAcls=true,BlockPublicPolicy=true,RestrictPublicBuckets=true
+ [ "$RC" = 0 ] || unresolved "s3-bucket $BUCKET: public access block failed: ${ECODE:-rc$RC}"
+ try aws s3api put-bucket-tagging --bucket "$BUCKET" --tagging "TagSet=[{Key=purpose,Value=$TAGV},{Key=run,Value=$RUN}]"
+ [ "$RC" = 0 ] || unresolved "s3-bucket $BUCKET: tagging failed: ${ECODE:-rc$RC}"
+ else unresolved "s3-bucket $BUCKET: tags unreadable: ${ECODE:-rc$RC}"; fi
+ elif code_in 404; then absent "s3-bucket $BUCKET"
+ else unresolved "s3-bucket $BUCKET: ${ECODE:-rc$RC}"; fi
+fi
+if pending log-group "$LOG_GROUP" LOG_GROUP_CREATED; then
+ try aws logs describe-log-groups --log-group-name-prefix "$LOG_GROUP" --query 'logGroups[].logGroupName' --output text
+ if [ "$RC" != 0 ]; then unresolved "log-group: ${ECODE:-rc$RC}"
+ elif [ "$OUT" = "$LOG_GROUP" ]; then rec LOG_GROUP_CREATED "$LOG_GROUP"
+ elif [ -z "$OUT" ]; then absent "log-group $LOG_GROUP"
+ else unresolved "log-group: unexpected groups [$OUT]"; fi
+fi
+if pending s3-object "s3://$BUCKET/t17/app.zip" ARTIFACT; then
+ need ARTIFACT_B64
+ try aws s3api head-object --bucket "$BUCKET" --key t17/app.zip --checksum-mode ENABLED --query ChecksumSHA256 --output text
+ if [ "$RC" = 0 ] && [ "$OUT" = "$ARTIFACT_B64" ]; then rec ARTIFACT "s3://$BUCKET/t17/app.zip"
+ try aws s3api get-object-tagging --bucket "$BUCKET" --key t17/app.zip --query "TagSet[?Key=='run'].Value" --output text
+ if [ "$RC" = 0 ] && [ "$OUT" != "$RUN" ]; then
+ try aws s3api put-object-tagging --bucket "$BUCKET" --key t17/app.zip --tagging "TagSet=[{Key=purpose,Value=$TAGV},{Key=run,Value=$RUN}]"
+ [ "$RC" = 0 ] || unresolved "s3-object: tagging failed: ${ECODE:-rc$RC}"
+ elif [ "$RC" != 0 ]; then unresolved "s3-object: tags unreadable: ${ECODE:-rc$RC}"; fi
+ elif [ "$RC" = 0 ]; then unresolved "s3-object: checksum $OUT is not $ARTIFACT_B64"
+ elif code_in 404; then absent "s3-object"
+ else unresolved "s3-object: ${ECODE:-rc$RC}"; fi
+fi
+if pending microvm-image "$IMAGE_NAME" IMAGE_ARN; then
+ try aws lambda-microvms get-microvm-image --image-identifier "$IMAGE_NAME" --output json
+ if [ "$RC" = 0 ]; then arn=$(jq -r .imageArn <<<"$OUT")
+ [ "$arn" = "arn:aws:lambda:eu-west-1:$ACCOUNT:microvm-image:$IMAGE_NAME" ] || die "image ARN [$arn]"
+ rec IMAGE_ARN "$arn"
+ try aws lambda-microvms list-tags --resource "$IMAGE_ARN" --query 'Tags.run' --output text
+ if [ "$RC" = 0 ] && [ "$OUT" != "$RUN" ]; then
+ try aws lambda-microvms tag-resource --resource "$IMAGE_ARN" --tags purpose=$TAGV,run=$RUN; [ "$RC" = 0 ] || unresolved "microvm-image: tagging failed: ${ECODE:-rc$RC}"
+ elif [ "$RC" != 0 ]; then unresolved "microvm-image: tags unreadable: ${ECODE:-rc$RC}"; fi
+ elif code_in ResourceNotFoundException; then absent "microvm-image $IMAGE_NAME"
+ else unresolved "microvm-image $IMAGE_NAME: ${ECODE:-rc$RC}"; fi
+fi
+for pair in "2048:VER_SMALL" "4096:VER_LARGE"; do
+ mem=${pair%%:*}; v=${pair#*:}
+ [ -n "${IMAGE_ARN:-}" ] && [ -z "${!v:-}" ] || continue
+ try aws lambda-microvms list-microvm-image-versions --image-identifier "$IMAGE_ARN" --output json
+ if [ "$RC" != 0 ]; then unresolved "image version $mem MiB: ${ECODE:-rc$RC}"; continue; fi
+ vs=$(jq -r --argjson m "$mem" '[.items[] | select(.resources[0].minimumMemoryInMiB == $m) | .imageVersion] | join(" ")' <<<"$OUT")
+ case "$(wc -w <<<"$vs")" in 0) absent "image version $mem MiB";; 1) rec "$v" "$vs";; *) unresolved "image version $mem MiB: several: $vs";; esac
done
-for r in "$OPERATOR_ROLE" "$BUILD_ROLE"; do try aws iam get-role --role-name "$r" --query Role.Arn --output text; echo "role $r: ${OUT:-$ECODE}"; done
-try aws lambda-core get-network-connector --identifier "$CONN_NAME" --query '[Arn,State]' --output text; echo "connector: ${OUT:-$ECODE}"
-try aws lambda-microvms get-microvm-image --image-identifier "$IMAGE_NAME" --query '[imageArn,state]' --output text; echo "image: ${OUT:-$ECODE}"
-try aws s3api head-bucket --bucket "$BUCKET"; echo "bucket: rc=$RC ${ECODE:-}"
-echo "log group: $(aws logs describe-log-groups --log-group-name-prefix "$LOG_GROUP" --query 'logGroups[].logGroupName' --output text)"
-try aws sns get-topic-attributes --topic-arn "arn:aws:sns:eu-west-1:$ACCOUNT:$TOPIC_NAME" --query 'Attributes.TopicArn' --output text; echo "topic: ${OUT:-$ECODE}"
+if pending sns-topic "$TOPIC_NAME" TOPIC_ARN; then
+ t="arn:aws:sns:eu-west-1:$ACCOUNT:$TOPIC_NAME"
+ try aws sns get-topic-attributes --topic-arn "$t" --query 'Attributes.TopicArn' --output text
+ if [ "$RC" = 0 ] && [ "$OUT" = "$t" ]; then rec TOPIC_ARN "$t"
+ try aws sns list-tags-for-resource --resource-arn "$t" --query "Tags[?Key=='run'].Value" --output text
+ if [ "$RC" = 0 ] && [ "$OUT" != "$RUN" ]; then
+ try aws sns tag-resource --resource-arn "$t" --tags Key=purpose,Value=$TAGV Key=run,Value=$RUN; [ "$RC" = 0 ] || unresolved "sns-topic: tagging failed: ${ECODE:-rc$RC}"
+ elif [ "$RC" != 0 ]; then unresolved "sns-topic: tags unreadable: ${ECODE:-rc$RC}"; fi
+ elif code_in NotFound NotFoundException; then absent "sns-topic $TOPIC_NAME"
+ else unresolved "sns-topic: ${ECODE:-rc$RC}"; fi
+fi
+[ -z "$UNRES" ] && echo "reconciliation complete: nothing unresolved" || { echo "unresolved, for Paul (S.4):"; tr '|' '\n' <<<"$UNRES"; }
```
-The agent then runs `rec <VAR> <ID>` for each resource found this way whose intent was unconfirmed
-(variable names as in the creating step), and records nothing else.
+The extra IAM call here (`tag-role`, only when a role exists without its tags) is one of the role
+calls R37 covers.
**S.3 VMs.** If the image was never created (no `IMAGE_ARN` and S.2 found no image), no VM can
exist and this part is skipped. Otherwise:
@@ -1612,8 +1819,9 @@ the ledger and this exposure:
| Connector, VPC, subnet, route table, group, defaults | no listed charge (no NAT, gateway or Elastic IP) |
| IAM roles, log group (1-day retention), SNS topic | none |
| S3 bucket and one object under 10 MB | under $0.01 a month |
+| Anything S.2 marked `UNRESOLVED` | its row above; an unresolved image is the only one with a cost (storage), an unresolved MicroVM intent is covered by S.3's scans |
-Teardown (section 10) then runs only on Paul's word.
+Teardown (section 10) then runs only on Paul's word, for the recorded resources only.
---
@@ -1639,7 +1847,7 @@ connectors; the worst case still allows for builds billed as VM time.
| Image storage | 2 versions, assumed 3 GB each, one-week minimum | $0.11 | 68 GB, one-week minimum, x1.2: $1.51 |
| Image builds | 2 builds, a few minutes | $0.05 | 2 builds of 20 min at 4 GB: $0.21 |
| S3, CloudWatch Logs, SNS, data transfer | tiny object, under 1 MB of logs, a few publishes, no route out | $0.02 | $0.05 |
-| **Total** | | **about $0.50 to $0.55** | **about $9.90** |
+| **Total** | | **about $0.55** | **about $9.90** |
The worst case is the sum of every bound at once (every VM at its maximum, at 4x, with the largest
snapshots), which cannot all happen in one run; it is still under the $10 approval ceiling.
@@ -1648,31 +1856,46 @@ $5.40 a month until teardown (S.4).
### 11.2 The run's own estimate (stop rule)
-Computed from the journal at the end of every section, with no billing call: each VM counts from
-the time it was recorded to the time its end was confirmed (an upper bound on its life).
+Computed from the VM ledger and the journal at the end of every section, with no billing call. Each
+VM's life starts at the provider's `startedAt` (from the launch reply or any image-scoped scan);
+for a VM known only from a log, at the start of the phase that found it, which is earlier than its
+real start. It ends at the time its end was confirmed (`VMGONE`), which is later than its real end,
+or now if it has not ended. Both ends err on the long side, so the figure is an upper bound on VM
+time at baseline. A VM whose only start is a phase start is counted and listed as such.
```sh
set -euo pipefail; . "${TMPDIR:?}/equipo-t17/env.sh"
-python3 -I - "$JOURNAL" <<'EOF'
+python3 -I - "$VMS" "$JOURNAL" <<'EOF'
import sys, datetime as dt
-t = lambda s: dt.datetime.strptime(s, "%Y-%m-%dT%H:%M:%S.%fZ")
-start, end, now = {}, {}, dt.datetime.utcnow()
+p = lambda x: dt.datetime.fromisoformat(x.replace("Z", "+00:00"))
+now = dt.datetime.now(dt.timezone.utc)
+prov, phase, end = {}, {}, {}
for line in open(sys.argv[1]):
+ vid, src, start, _ = line.rstrip("\n").split("\t")
+ if start.startswith("phase:"):
+ t = p(start[6:]); phase[vid] = min(t, phase.get(vid, t))
+ else:
+ t = p(start); prov[vid] = min(t, prov.get(vid, t))
+for line in open(sys.argv[2]):
ts, msg = line.rstrip("\n").split("\t", 1)
w = msg.split(" ")
- if w[0] == "VM" and w[1] not in start: start[w[1]] = t(ts)
- if w[0] == "VMGONE": end[w[1]] = t(ts)
-hours = sum(((end.get(v, now)) - s).total_seconds() for v, s in start.items()) / 3600
-live = [v for v in start if v not in end]
+ if w[0] == "VMGONE": end[w[1]] = p(ts)
+hours, phase_only = 0.0, []
+for vid in set(prov) | set(phase):
+ start = prov.get(vid) or phase[vid]
+ if vid not in prov: phase_only.append(vid)
+ hours += max(0.0, (end.get(vid, now) - start).total_seconds()) / 3600
+live = [v for v in set(prov) | set(phase) if v not in end]
est = hours * 0.155 + 0.11 + 0.05 + 0.02 + 0.0057 * 2 * 3
-print(f"VMs {len(start)}, not yet ended {len(live)}, VM-hours {hours:.2f}, estimate ${est:.2f}")
+print(f"VMs {len(prov) + len([v for v in phase if v not in prov])}, not yet ended {len(live)}, "
+ f"started from phase only {len(phase_only)} {phase_only}, VM-hours {hours:.2f}, estimate ${est:.2f} "
+ f"(baseline compute plus image storage, builds, small items and three pause cycles; retained storage after an abort is separate)")
sys.exit(3 if est >= 5 else 0)
EOF
```
-- Stop rule: an exit status of 3 (estimate at $5 or more), or a VM live outside its step, means the
- safe stop. The estimate is compute at baseline plus fixed allowances; Paul reads the real bill
- himself (R33).
+- Stop rule: exit status 3 (estimate $5 or more), or a VM live outside its step, means the safe
+ stop. Paul reads the real bill himself (R33).
**Wall-clock:** about 4.5 to 5 hours from 0.1 to 10.9.
@@ -1724,7 +1947,8 @@ EOF
one outside R36's form is a stop.
14. **U18. Error codes** used in expected-failure branches that are taken from models or
convention, not observed: `404` for `head-bucket` and `head-object`, `NotFound` (or
- `NotFoundException`) for SNS, `ResourceNotFoundException` for Lambda reads, and the
+ `NotFoundException`) for SNS, `NoSuchTagSet` for an untagged bucket and `NoSuchEntity` for IAM in S.2,
+ `ResourceNotFoundException` for Lambda reads, and the
`An error occurred (<code>)` text the `try` helper parses. A different code aborts.
15. **U19. Image version tags:** whether versions carry the image's tags; recorded as read in 3.8,
not required.