oficina / equipo Public

hostedctl: keep retrying a pending stop, bound provider launches

Review r2 of Task 11. Refresh now sends a pending stop again on every
pass whatever the restart state: after a failed Get, and for any read
that is not stopping, unknown included. Ruling R21: every provider
Launch call runs under a 60 s deadline derived from the caller's
context (ProviderLaunchTimeout), inside the 2-minute proof fence. The
concurrency tests drop their sleeps for explicit hand-offs (a held Get
and an attempt-lock wait hook) and run in parallel.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 8e2964038906c6b5c7cc946bfc673975a2eb7d9a parent ab73319
6 files changed, +263 −49
  • docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md +17 −0
  • internal/hostedctl/attemptlock.go +8 −0
  • internal/hostedctl/launch.go +5 −1
  • internal/hostedctl/refresh.go +33 −13
  • internal/hostedctl/refresh_test.go +187 −35
  • internal/hostedctl/stop_test.go +13 −0

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.2s
ci-box: claude: fetched and verified in 2.1s
ci-box: codex: fetched and verified in 3.5s
ci-box: codex-code-mode-host: fetched and verified in 1.3s
ci-box: libwrap: fetched and verified in 0.3s
ci-box: socat: fetched and verified in 0.3s
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
ci-box: image pulled in 9.9s
ci-box: pi: installed and verified in 7.6s
ci-box: opencode: installed and verified in 2.5s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 8.8s
ci-box: clone deepened in 3.8s
ci-box: file times set from content: 2881 files, 192 directories
ci-box: ready in 17.8s
=== 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.250s
=== 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  ./...
  1.0s
+ go list -export -test -tags browser,testbuild -f  ./internal/equipo ./internal/headless ./internal/idtest ./internal/plan3test ./internal/thintest
  0.3s
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -version
staticcheck 2026.1 (v0.7.0)
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 -version
Go: go1.26.11
Scanner: govulncheck@v1.8.0
DB: https://vuln.go.dev
DB updated: 2026-11-11 02:51:11 +0000 UTC

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

receipt: test step 1m22.738s 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.052s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m21.05s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 32.52, cpu waiting 21.83%, memory waiting 0.00%, io waiting 0.54%
--- 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.958s 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.214s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m22.21s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 32.52, cpu waiting 21.83%, memory waiting 0.00%, io waiting 0.54%
--- shard 2 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-connections: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadlessConnections$|^TestHeadlessTokenPasteEndToEnd$|^TestHeadlessTokenConnection$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m25.328s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m23.129s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m12.5s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 5.87s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 4.75s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 31.75, cpu waiting 21.28%, memory waiting 0.00%, io waiting 0.52%
--- 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 1m20.316s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m18.551s amadan.net/oficina/equipo/internal/headless
receipt: slow test 38s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 20.51s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 10.55s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
receipt: slow test 9.48s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
machine: 32 CPUs, load 32.52, cpu waiting 22.61%, memory waiting 0.00%, io waiting 0.58%
--- shard 4 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-guards: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadlessCopyRotation$|^TestHeadlessPolicyGuards$|^TestHeadlessRunnerKillLeavesNoCopies$|^TestHeadlessNewHouseRuleStartsFresh$|^TestHeadless$/^3_engineering$|^TestHeadless$/^3_step_cancel$|^TestHeadless$/^3_step_contained$|^TestHeadless$/^3_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m38.666s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m36.89s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m0.65s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 11.39s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 10.07s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 8.8s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 5.98s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
machine: 32 CPUs, load 29.83, cpu waiting 17.23%, memory waiting 0.00%, io waiting 0.41%
--- 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.387s 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.296s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m45.95s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistant
receipt: slow test 24.4s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 11.66s amadan.net/oficina/equipo/internal/headless TestHeadlessResearchHandoff
receipt: slow test 8.22s amadan.net/oficina/equipo/internal/headless TestHeadlessClaudeSignIn
receipt: slow test 7.38s amadan.net/oficina/equipo/internal/headless TestHeadlessTurnBatching
machine: 32 CPUs, load 8.44, cpu waiting 3.86%, memory waiting 0.00%, io waiting 0.08%
--- 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.179s 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 2.25, cpu waiting 0.92%, memory waiting 0.00%, io waiting 2.14%
--- 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.113s 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 2.25, cpu waiting 0.92%, memory waiting 0.00%, io waiting 2.14%
--- 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 4m31.747s, over the 45s its record on line 44 allows; reported only, timing fails on CI

receipt: test step 4m44.809s 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 4m31.747s amadan.net/oficina/equipo/internal/runner/thin
receipt: slow test 36.96s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeAnsweredByAnotherModel
receipt: slow test 36.92s amadan.net/oficina/equipo/internal/runner/thin TestModelsEngineeringProbesThenRunsTheStrongest
receipt: slow test 36.79s amadan.net/oficina/equipo/internal/runner/thin TestModelsUnhealthyRetriedOnDemand
receipt: slow test 18.47s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeRunsInsideTheAdmission
receipt: slow test 7s amadan.net/oficina/equipo/internal/runner/thin TestOpenCodeStepsRealOpenCode
machine: 32 CPUs, load 2.47, cpu waiting 0.77%, 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.489s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 46.357s amadan.net/oficina/equipo/internal/runner
receipt: slow test 26.33s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.02s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 36.03, cpu waiting 21.83%, memory waiting 0.00%, io waiting 0.99%
--- shard 10 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-plans: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestPlanWorkflowCandidateOrder$|^TestPlanWorkflowFeature$|^TestCoordinatorRecoveryCallRefusalKeepsServing$|^TestCoordinatorRefusalMatrix$' ./internal/runner
cache miss: amadan.net/oficina/equipo/internal/runner: its inputs changed

receipt: test step 48.085s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 46.205s amadan.net/oficina/equipo/internal/runner
receipt: slow test 36.18s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 33.19s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.41s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.61s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 36.03, cpu waiting 22.10%, memory waiting 0.00%, io waiting 0.96%
--- 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.071s 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.162s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.13s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.25s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.12s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 2.32s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 1.61s amadan.net/oficina/equipo/internal/runner TestReportPostsRetryExactRequest
machine: 32 CPUs, load 26.69, cpu waiting 15.31%, memory waiting 0.00%, io waiting 1.21%
--- 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.7%, load 21.79
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 1m5.514s 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.592s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 27.51s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 27.42s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 25.5s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 22.9s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
receipt: slow test 22.74s amadan.net/oficina/equipo/internal/equipotest TestAccountConcurrentDuplicate
machine: 32 CPUs, load 29.83, cpu waiting 18.38%, memory waiting 0.00%, io waiting 0.44%
--- 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 26.7%, load 21.79
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.372s 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 21.79, cpu waiting 12.10%, memory waiting 0.00%, io waiting 1.29%
--- 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 26.7%, load 21.79
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.949s 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.922s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 14.3s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 13.04s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 10s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 9.91s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 6.92s amadan.net/oficina/equipo/internal/equipotest TestRosterProtectsLastOwner
machine: 32 CPUs, load 26.59, cpu waiting 15.59%, memory waiting 0.00%, io waiting 0.37%
--- 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 26.7%, load 21.79
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 599ms 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.231s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 24.45s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 23.28s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 23.2s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 21.61s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsUpgrade
receipt: slow test 21.57s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsRollbackAndUnavailable
machine: 32 CPUs, load 21.79, cpu waiting 10.92%, memory waiting 0.00%, io waiting 1.34%
--- 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 26.7%, load 21.79
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 594ms 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 21.79, cpu waiting 10.92%, memory waiting 0.00%, io waiting 1.34%
--- 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 26.7%, load 21.79
test lane rest: ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/push ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/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-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/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/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/webread: 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
--- FAIL amadan.net/oficina/equipo/internal/runner/provider/codex TestCodexEmptyHomeReplay
=== RUN   TestCodexEmptyHomeReplay
--- FAIL: TestCodexEmptyHomeReplay (6.89s)

--- FAIL amadan.net/oficina/equipo/internal/runner/provider/codex TestCodexEmptyHomeReplay/coordinate
=== RUN   TestCodexEmptyHomeReplay/coordinate
    runtime_replay_test.go:142: real coordinate Open: codex_preflight_probe: provider_identity_mismatch
    runtime_replay_test.go:189: runtime: tmp/arg0-linux d---------
    runtime_replay_test.go:189: runtime: tmp/arg0-linux/codex-arg0scF8w5 d---------
    runtime_replay_test.go:189: runtime: tmp/arg0-linux/codex-arg0scF8w5/.lock ----------
    runtime_replay_test.go:189: runtime: tmp/arg0-linux/codex-arg0scF8w5/apply_patch L---------
    runtime_replay_test.go:189: runtime: tmp/arg0-linux/codex-arg0scF8w5/applypatch L---------
    runtime_replay_test.go:189: runtime: tmp/arg0-linux/codex-arg0scF8w5/codex-linux-sandbox L---------
    runtime_replay_test.go:194: real runtime tree rejected: provider_account_containment: runtime_walk
--- FAIL: TestCodexEmptyHomeReplay/coordinate (2.51s)

--- FAIL amadan.net/oficina/equipo/internal/runner/provider/codex (package output)
FAIL
rastrillo-budget/v1 ran 12.616s
FAIL	amadan.net/oficina/equipo/internal/runner/provider/codex	13.340s

budget note: internal/equipo took 45.275s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/equipo/chat took 12.529s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/idtest took 39.84s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/release took 34.981s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/runner/containment took 40.288s, over the 15s its record on line 40 allows; reported only, timing fails on CI

receipt: test step 2m17.588s against a 60s target (the gate's other steps are not in this figure)
receipt: 12 packages ran, 52 cached, 20 without tests, 1 failed
receipt: slow package 54.308s amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow package 52.378s amadan.net/oficina/equipo/internal/runner/provider/pi
receipt: slow package 45.275s amadan.net/oficina/equipo/internal/equipo
receipt: slow package 40.288s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow package 39.84s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 22.17s amadan.net/oficina/equipo/internal/runner/provider/opencode TestOpenCodeAcceptanceHostileRepository
receipt: slow test 15.3s amadan.net/oficina/equipo/internal/runner/containment TestEngineeringOfflineGo
receipt: slow test 10.89s amadan.net/oficina/equipo/internal/idtest TestIDCallbackGuardAndPendingNonce
receipt: slow test 10.82s amadan.net/oficina/equipo/internal/equipo TestAgentReadRechecksIdentity
receipt: slow test 9.53s amadan.net/oficina/equipo/internal/runner/containment TestEngineeringMissingModuleCache
rastrillo: budget test: go test failed
exit status 1
+ go test -tags testbuild -timeout 15m -v -run '^TestCodexEmptyHomeReplay$/^coordinate$' -count=1 ./internal/runner/provider/codex   (retry, once)
##############################################################################
FLAKE ./internal/runner/provider/codex:TestCodexEmptyHomeReplay/coordinate rest 8e2964038906c6b5c7cc946bfc673975a2eb7d9a 2.51s 12.08
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 11.27, cpu waiting 5.21%, memory waiting 0.00%, io waiting 0.12%
--- 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 1m23.545s 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.945s amadan.net/oficina/equipo/internal/headless
receipt: slow test 37.55s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 15.18s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 10.76s amadan.net/oficina/equipo/internal/headless TestBrowserChat
receipt: slow test 7.93s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 6.12s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
machine: 32 CPUs, load 32.52, cpu waiting 21.83%, memory waiting 0.00%, io waiting 0.54%
--- shard 19 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-work: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m33.815s 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 1m32.239s amadan.net/oficina/equipo/internal/headless
receipt: slow test 27s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 22.66s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 14.22s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 10.27s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
receipt: slow test 8.08s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
machine: 32 CPUs, load 29.83, cpu waiting 18.38%, memory waiting 0.00%, io waiting 0.44%
--- 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.65s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m38.876s amadan.net/oficina/equipo/internal/headless
receipt: slow test 14.22s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 13.02s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 12.99s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 10.29s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
receipt: slow test 10.15s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsOpenCodeGoLimitRequired
machine: 32 CPUs, load 27.68, cpu waiting 16.66%, memory waiting 0.00%, io waiting 0.40%
--- shard 21 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-rest: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAskAfterMerge|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' ./internal/headless
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserCopyContinue
=== RUN   TestBrowserCopyContinue
time=2026-11-22T18:06:46.860Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-22T18:06:46.860Z level=INFO msg="startup phase done" phase=state_lock took=211µs
time=2026-11-22T18:06:46.860Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-22T18:06:46.860Z level=INFO msg="startup phase done" phase=claim_roots took=204µs
time=2026-11-22T18:06:46.860Z level=INFO msg="startup phase" phase=sweep
time=2026-11-22T18:06:46.908Z level=INFO msg="startup phase done" phase=sweep took=48.184ms
time=2026-11-22T18:06:46.908Z level=INFO msg="startup phase" phase=credentials
time=2026-11-22T18:06:46.908Z level=INFO msg="startup phase done" phase=credentials took=106µs
time=2026-11-22T18:06:46.908Z level=INFO msg="startup phase" phase=open_state
time=2026-11-22T18:06:46.953Z level=INFO msg="startup phase done" phase=open_state took=45.009ms
time=2026-11-22T18:06:46.954Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-22T18:06:46.955Z level=INFO msg=connecting host=127.0.0.1:35867 protocol=28
time=2026-11-22T18:06:46.956Z level=INFO msg=connected host=127.0.0.1:35867 took=1.04ms
time=2026-11-22T18:06:46.956Z level=INFO msg="capabilities gathering"
time=2026-11-22T18:06:46.956Z level=INFO msg="capabilities gathered" took=504µs tags=linux,claude,go
time=2026-11-22T18:06:46.957Z level=INFO msg="hello sent" protocol=28
time=2026-11-22T18:06:46.962Z level=INFO msg=welcome protocol=28 role=primary generation=1
    browser_copy_test.go:93: continue did not reach Checks: 0 <nil>
--- FAIL: TestBrowserCopyContinue (1.90s)

--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserEmptyExplore
=== RUN   TestBrowserEmptyExplore
time=2026-11-22T18:07:18.571Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-22T18:07:18.571Z level=INFO msg="startup phase done" phase=state_lock took=80µs
time=2026-11-22T18:07:18.571Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-22T18:07:18.571Z level=INFO msg="startup phase done" phase=claim_roots took=81µs
time=2026-11-22T18:07:18.571Z level=INFO msg="startup phase" phase=sweep
time=2026-11-22T18:07:18.599Z level=INFO msg="startup phase done" phase=sweep took=27.973ms
time=2026-11-22T18:07:18.599Z level=INFO msg="startup phase" phase=credentials
time=2026-11-22T18:07:18.599Z level=INFO msg="startup phase done" phase=credentials took=120µs
time=2026-11-22T18:07:18.599Z level=INFO msg="startup phase" phase=open_state
time=2026-11-22T18:07:18.640Z level=INFO msg="startup phase done" phase=open_state took=40.973ms
time=2026-11-22T18:07:18.641Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-22T18:07:18.641Z level=INFO msg=connecting host=127.0.0.1:35791 protocol=28
time=2026-11-22T18:07:18.643Z level=INFO msg=connected host=127.0.0.1:35791 took=1.528ms
time=2026-11-22T18:07:18.643Z level=INFO msg="capabilities gathering"
time=2026-11-22T18:07:18.643Z level=INFO msg="capabilities gathered" took=390µs tags=linux,claude,go
time=2026-11-22T18:07:18.644Z level=INFO msg="hello sent" protocol=28
time=2026-11-22T18:07:18.648Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-22T18:07:19.706Z 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.85s)

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


receipt: test step 1m29.075s 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.552s amadan.net/oficina/equipo/internal/headless
receipt: slow test 15.09s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
receipt: slow test 11.24s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 10.52s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 10.5s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 8.07s amadan.net/oficina/equipo/internal/headless TestBrowserRefreshRace
exit status 1
+ go test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAskAfterMerge|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' -v -run '^TestBrowserCopyContinue$|^TestBrowserEmptyExplore$' -count=1 ./internal/headless   (retry, once)
##############################################################################
FLAKE ./internal/headless:TestBrowserCopyContinue browser-headless-rest 8e2964038906c6b5c7cc946bfc673975a2eb7d9a 1.90s 31.75
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
##############################################################################
FLAKE ./internal/headless:TestBrowserEmptyExplore browser-headless-rest 8e2964038906c6b5c7cc946bfc673975a2eb7d9a 5.85s 31.75
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 27.68, cpu waiting 17.23%, memory waiting 0.00%, io waiting 0.41%
--- 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.046s 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 810ms 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 308ms 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.157s 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 5.67, cpu waiting 2.54%, memory waiting 0.00%, io waiting 2.00%
--- 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   (52s)
ok ./internal/headless TestHeadlessConnections/A5_cancel_and_sign_out 5.28s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.34s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 9.34s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 9.81s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 24.69s
+ 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.22s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 14.52s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 20.75s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 13.38s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless   (22s)
ok ./internal/headless TestMixedVersions 19.97s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks   (1s)
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 34.58, cpu waiting 23.08%, memory waiting 0.00%, io waiting 0.75%
--- 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.439s 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.226s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 173ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 136ms 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.1s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.76s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 280ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 170ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 140ms 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.108s 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.76s 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 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryCleansScratch
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 100ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReapsOrphans
machine: 32 CPUs, load 7.06, cpu waiting 4.71%, memory waiting 0.00%, io waiting 1.81%
--- 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.7%, load 21.79
shard 25: make runner-dead-references lanes-check build vet fmt-check budget migration-check
python3 scripts/runner-dead-references.py
reference scan: 2594 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: 94 directories within budget
CGO_ENABLED=0 go test ./internal/equipo -run '^TestMigrationModels$' -count=1
ok  	amadan.net/oficina/equipo/internal/equipo	2.513s
machine: 32 CPUs, load 36.03, cpu waiting 21.83%, memory waiting 0.00%, io waiting 0.99%
--- 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 26.7%, load 21.79
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 21.79, cpu waiting 12.10%, memory waiting 0.00%, io waiting 1.29%
--- 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.7%, load 21.79
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 26.69, cpu waiting 16.38%, memory waiting 0.00%, io waiting 1.17%
--- 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.7%, load 21.79
shard 28: make gitleaks
6:06PM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
6:06PM INF 1123 commits scanned.
6:06PM INF scanned ~61812100 bytes (61.81 MB) in 14.8s
6:06PM INF no leaks found
machine: 32 CPUs, load 36.03, cpu waiting 20.28%, memory waiting 0.00%, io waiting 1.06%
=== 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.158ms, worst 1.233ms, budget 150ms
perf: GET /api/runner/protocol: median 83µs, worst 121µs, budget 150ms
perf: GET /api/v1/account-setups/{id}: median 633µs, worst 662µs, budget 150ms
perf: GET /api/v1/accounts: median 427µs, worst 436µs, budget 150ms
perf: GET /api/v1/auth/devices: median 433µs, worst 493µs, budget 150ms
perf: GET /api/v1/budgets: median 474µs, worst 523µs, budget 150ms
perf: GET /api/v1/capabilities: median 255µs, worst 267µs, budget 150ms
perf: GET /api/v1/cards/{id}: median 1.189ms, worst 1.255ms, budget 150ms
perf: GET /api/v1/connections: median 571µs, worst 610µs, budget 150ms
perf: GET /api/v1/connections/{id}: median 546µs, worst 562µs, budget 150ms
perf: GET /api/v1/conversation: median 920µs, worst 995µs, budget 150ms
perf: GET /api/v1/conversation/cards: median 1.498ms, worst 1.617ms, budget 150ms
perf: GET /api/v1/coordinator: median 1.809ms, worst 1.94ms, budget 150ms
perf: GET /api/v1/invites/{id}: median 481µs, worst 487µs, budget 150ms
perf: GET /api/v1/journey: median 7.777ms, worst 8.054ms, budget 150ms
perf: GET /api/v1/me: median 433µs, worst 467µs, budget 150ms
perf: GET /api/v1/me/settings: median 510µs, worst 596µs, budget 150ms
perf: GET /api/v1/needs-you: median 7.537ms, worst 7.721ms, budget 150ms
perf: GET /api/v1/notifications: median 1.652ms, worst 1.814ms, budget 150ms
perf: GET /api/v1/onboarding: median 393µs, worst 423µs, budget 150ms
perf: GET /api/v1/people: median 450µs, worst 461µs, budget 150ms
perf: GET /api/v1/playbooks: median 602µs, worst 625µs, budget 150ms
perf: GET /api/v1/playbooks/{id}: median 542µs, worst 590µs, budget 150ms
perf: GET /api/v1/playbooks/{id}/template-diff: median 871µs, worst 949µs, budget 150ms
perf: GET /api/v1/preferences: median 777µs, worst 853µs, budget 150ms
perf: GET /api/v1/projects/{id}: median 481µs, worst 543µs, budget 150ms
perf: GET /api/v1/projects/{id}/settings: median 600µs, worst 699µs, budget 150ms
perf: GET /api/v1/roster: median 474µs, worst 520µs, budget 150ms
perf: GET /api/v1/runners/{id}: median 436µs, worst 481µs, budget 150ms
perf: GET /api/v1/specialists: median 8.413ms, worst 8.487ms, budget 150ms
perf: GET /api/v1/specialists/{id}: median 8.048ms, worst 8.181ms, budget 150ms
perf: GET /api/v1/specialists/{id}/template-diff: median 875µs, worst 993µs, budget 150ms
perf: GET /api/v1/tasks/{id}/plan: median 1.279ms, worst 1.328ms, budget 150ms
perf: GET /api/v1/tasks/{id}/thread: median 785µs, worst 824µs, budget 150ms
perf: GET /api/v1/teams: median 475µs, worst 516µs, budget 150ms
perf: GET /api/v1/templates: median 634µs, worst 676µs, budget 150ms
perf: GET /api/v1/templates/{id}: median 480µs, worst 546µs, budget 150ms
perf: GET /auth/callback: median 86µs, worst 110µs, budget 150ms
perf: GET /auth/devices/{id}: median 3.484ms, worst 6.486ms, budget 150ms
perf: GET /auth/verify: median 83µs, worst 162µs, budget 150ms
perf: GET /connections: median 3.831ms, worst 3.941ms, budget 150ms
perf: GET /conversation: median 7.544ms, worst 7.732ms, budget 150ms
perf: GET /conversation/connections: median 246µs, worst 270µs, budget 150ms
perf: GET /conversation/notebook: median 249µs, worst 257µs, budget 150ms
perf: GET /conversation/settings: median 3.853ms, worst 4.039ms, budget 150ms
perf: GET /conversation/settings/autonomy: median 3.785ms, worst 3.965ms, budget 150ms
perf: GET /conversation/settings/connections: median 6.124ms, worst 6.561ms, budget 150ms
perf: GET /conversation/settings/connections/add: median 6.422ms, worst 6.618ms, budget 150ms
perf: GET /conversation/settings/copy: median 3.551ms, worst 3.821ms, budget 150ms
perf: GET /conversation/settings/housekeeping: median 4.396ms, worst 7.002ms, budget 150ms
perf: GET /conversation/settings/machines: median 4.826ms, worst 5.206ms, budget 150ms
perf: GET /conversation/settings/machines/add: median 4.73ms, worst 4.968ms, budget 150ms
perf: GET /conversation/settings/notebook: median 3.343ms, worst 3.438ms, budget 150ms
perf: GET /conversation/settings/thinking: median 3.983ms, worst 4.069ms, budget 150ms
perf: GET /housekeeping: median 3.741ms, worst 3.805ms, budget 150ms
perf: GET /invites/new: median 590µs, worst 629µs, budget 150ms
perf: GET /invites/{id}: median 617µs, worst 676µs, budget 150ms
perf: GET /jobs: median 3.25ms, worst 3.361ms, budget 150ms
perf: GET /jobs/{id}: median 4.417ms, worst 4.612ms, budget 150ms
perf: GET /journey: median 10.64ms, worst 14ms, budget 150ms
perf: GET /nav/rail: median 3.057ms, worst 3.18ms, budget 150ms
perf: GET /needs-you: median 10.381ms, worst 10.84ms, budget 150ms
perf: GET /onboarding: median 4.097ms, worst 4.248ms, budget 150ms
perf: GET /people: median 3.554ms, worst 3.698ms, budget 150ms
perf: GET /playbook-suggestions/{suggestion}: median 5.205ms, worst 5.434ms, budget 150ms
perf: GET /playbooks: median 4.677ms, worst 4.936ms, budget 150ms
perf: GET /playbooks/new: median 4.844ms, worst 4.953ms, budget 150ms
perf: GET /playbooks/{id}: median 4.49ms, worst 4.524ms, budget 150ms
perf: GET /playbooks/{id}/edit: median 4.57ms, worst 4.677ms, budget 150ms
perf: GET /playbooks/{id}/template-diff: median 4.005ms, worst 6.017ms, budget 150ms
perf: GET /preferences: median 4.465ms, worst 4.539ms, budget 150ms
perf: GET /preferences/sources/{source}: median 4.053ms, worst 4.201ms, budget 150ms
perf: GET /projects: median 5.285ms, worst 5.522ms, budget 150ms
perf: GET /projects/accounts: median 3.548ms, worst 3.817ms, budget 150ms
perf: GET /projects/new: median 3.473ms, worst 3.553ms, budget 150ms
perf: GET /projects/{id}: median 10.568ms, worst 10.992ms, budget 150ms
perf: GET /projects/{id}/edit: median 3.671ms, worst 3.868ms, budget 150ms
perf: GET /runners/enrol: median 4.213ms, worst 4.32ms, budget 150ms
perf: GET /settings: median 3.331ms, worst 3.391ms, budget 150ms
perf: GET /settings/coordinator: median 5.893ms, worst 8.473ms, budget 150ms
perf: GET /settings/devices: median 3.433ms, worst 3.757ms, budget 150ms
perf: GET /settings/recovery: median 3.34ms, worst 3.528ms, budget 150ms
perf: GET /settings/recovery/release: median 3.556ms, worst 3.719ms, budget 150ms
perf: GET /settings/thinking: median 241µs, worst 253µs, budget 150ms
perf: GET /signin: median 315µs, worst 336µs, budget 150ms
perf: GET /specialists/new: median 3.28ms, worst 3.395ms, budget 150ms
perf: GET /specialists/{key}: median 11.13ms, worst 11.304ms, budget 150ms
perf: GET /specialists/{key}/edit: median 3.59ms, worst 3.735ms, budget 150ms
perf: GET /specialists/{key}/template-diff: median 3.749ms, worst 3.976ms, budget 150ms
perf: GET /tasks: median 5.147ms, worst 5.341ms, budget 150ms
perf: GET /tasks/new: median 3.301ms, worst 3.476ms, budget 150ms
perf: GET /tasks/{id}: median 5.844ms, worst 5.948ms, budget 150ms
perf: GET /tasks/{id}/merge: median 4.909ms, worst 5.115ms, budget 150ms
perf: GET /tasks/{id}/move: median 4.699ms, worst 4.821ms, budget 150ms
perf: GET /tasks/{id}/plan: median 5.909ms, worst 6.145ms, budget 150ms
perf: GET /tasks/{id}/preview: median 1.56ms, worst 1.674ms, budget 150ms
perf: GET /tasks/{id}/questions/{question}: median 5.393ms, worst 5.516ms, budget 150ms
perf: GET /tasks/{id}/rendered-change: median 4.977ms, worst 5.13ms, budget 150ms
perf: GET /tasks/{id}/rendered-change/{hash}.png: median 4.314ms, worst 4.465ms, budget 150ms
perf: GET /tasks/{id}/thread: median 8.014ms, worst 8.318ms, budget 150ms
perf: GET /team/{specialist}: median 4.377ms, worst 5.899ms, budget 150ms
perf: GET /teams: median 10.288ms, worst 10.529ms, budget 150ms
perf: GET /templates: median 3.504ms, worst 3.613ms, budget 150ms
perf: GET /usage: median 4.317ms, worst 4.54ms, budget 150ms
perf: GET /work: median 3.161ms, worst 3.26ms, budget 150ms
perf: cold boot: median 265ms of [264.134184ms 264.57784ms 267.428457ms], budget 500ms

receipt: test step 32.09s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 90 without tests, 0 failed
receipt: slow package 8.96s amadan.net/oficina/equipo/internal/equipotest
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 package 0s amadan.net/oficina/equipo/internal/attach
receipt: slow test 8.11s amadan.net/oficina/equipo/internal/equipotest TestPerfScreens
receipt: slow test 850ms amadan.net/oficina/equipo/internal/equipotest TestPerfBoot
=== cache ===
ci-box: build cache /home/ci/work/repos/oficina__equipo/cache/go-build: 2.92 GiB in 21843 files
ci-box: module cache /home/ci/work/repos/oficina__equipo/cache/go-mod: 0.90 GiB in 32632 files
diff --git a/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md b/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md
index 6337b1ec..72c4e598 100644
--- a/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md
+++ b/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md
@@ -443,6 +443,23 @@ Changes: `attemptlock.go` (new: `func (c *Controller) lockAttempt(id string) fun
| TX4 Refresh's list inside a transaction | `^TestStopRecordsRequestBeforeProvider$` | `stop_test.go:252: provider list (call 3): a store read waited 2 s; ...` | yes, passes |
| N1, M1, M5 rechecked | `^TestStopNotFoundThenRunning$`, `^TestStopProofNeedsTerminalState$`, `^TestRestartDowntimeExceedsWallDelta$` | `stop_test.go:473: after one not-found: proof {...}; want no proof and a since time`; `stop_test.go:272: Stop while the VM is stopping = <nil>, want ErrStopPending`; `stop_test.go:778: att-1 with no age: requested {0 false} ...` | yes, passes |
+### Task 11 fix round 2 (review r2 finding 4, ruling R21, test budget)
+
+Changes: Refresh sends a pending stop again on every pass, whatever the restart state: on a failed Get when `stop_requested_t` is set (unless the third failed pass runs the elapsed_unknown stop itself), and on any read that is not `stopping` (live or unknown); shared helper `resendStop`. `ProviderLaunchTimeout = 60 * time.Second` (refresh.go): `dispatch` (launch.go) calls the provider Launch with `context.WithTimeout(ctx, ProviderLaunchTimeout)`, so the caller's own shorter deadline still holds. Tests: the sleeps in the concurrency tests are replaced by explicit synchronisation. `gatedGet` holds call 1 until released, and `attemptLocks.waiting` (a hook, nil in production) reports when a caller has to wait for an attempt lock. Timeouts remain only as 5 s watchdogs a healthy run never reaches. Every Task 11 test now calls `t.Parallel()`.
+
+- GREEN: `go test ./internal/hostedctl -run 'TestStop|TestUnknownState|TestLostStop|TestRestart|TestProviderLaunchTimeout' -count=1` ok; the same under `-race` ok.
+- Budget: the Task 11 tests alone take 1.4 to 1.6 s of wall time (5.35 s summed before, run one after another). The whole package took 7.4 to 15 s with the host's load average between 10 and 23. The other tests alone (Tasks 9, 10 and 12, 42 tests, not parallel) took 11.9 to 13.1 s in the same window; the slowest were TestSuspendNeedsCurrentAck 0.94 s, TestResumePastDeadlineRefused 0.65 s, TestSuspendAndResumeRoles 0.57 s, TestResumeRetrySameOperation 0.49 s and TestConcurrentLaunchSameAttempt 0.49 s.
+
+| Mutation | Test | Observed failure | Restored |
+| --- | --- | --- | --- |
+| P1 a failed Get does not resend a pending stop | `^TestRestartRetriesPendingStop$` | `refresh_test.go:633: provider stops = [vm-0001], want the stop sent again` | yes, passes |
+| D1 provider launch without a deadline (`WithCancel`) | `^TestProviderLaunchTimeout$` | `refresh_test.go:699: provider launch 0: deadline set true, 59m59.96706408s left; want one at most 1m0s away` | yes, passes |
+| D2 timeout longer than the fence (3 min) | `^TestProviderLaunchTimeout$` | `refresh_test.go:668: ProviderLaunchTimeout = 3m0s, want 60s and under ReflessProofDelay 2m0s` | yes, passes |
+| D3 deadline not derived from the caller (`context.Background()`) | `^TestProviderLaunchTimeout$` | `refresh_test.go:699: provider launch 2: deadline set true, 59.999997836s left; want one at most 5s away` | yes, passes |
+| F1, F2 (recheck against the hook-based test) | `^TestStopWaitsForDispatch$` | `refresh_test.go:200: Stop returned (... att-1 has no VM ref yet ...) while the launch call was in flight; it must wait for the answer` (both subtests, each) | yes, passes |
+| F3a, F3b (recheck against `overlap`) | `^TestRestartOverlappingRefresh$`, `^TestStopNotFoundRacesLiveRead$` | `refresh_test.go:468: after two overlapping passes: re-based true, stopped true; want exactly one`; `refresh_test.go:389: after a not-found and a live read: state "running" notfound_since_t {0 true}; ...` | yes, passes |
+| F10 (recheck) | `^TestRestartRetriesFailedGet$` | `refresh_test.go:512: pass 3: requested {0 false} reason { false}; want a stop for elapsed_unknown` | yes, passes |
+
## Task 12
Pause generations (Drain, Quiescent, Suspend, Reopen) and prepared resume epochs (Resume) in
diff --git a/internal/hostedctl/attemptlock.go b/internal/hostedctl/attemptlock.go
index 62cd0aa7..759918b3 100644
--- a/internal/hostedctl/attemptlock.go
+++ b/internal/hostedctl/attemptlock.go
@@ -8,6 +8,10 @@ import "sync"
type attemptLocks struct {
mu sync.Mutex
m map[string]*attemptLock
+ // waiting, when set, is called with the attempt ID each time a caller
+ // finds the lock held or awaited and is about to wait. Tests use it to
+ // see contention without sleeping; production leaves it nil.
+ waiting func(id string)
}
type attemptLock struct {
@@ -36,8 +40,12 @@ func (c *Controller) lockAttempt(id string) func() {
l.m[id] = e
}
e.users++
+ contended, hook := e.users > 1, l.waiting
l.mu.Unlock()
+ if contended && hook != nil {
+ hook(id)
+ }
e.mu.Lock()
var once sync.Once
return func() {
diff --git a/internal/hostedctl/launch.go b/internal/hostedctl/launch.go
index 4ca70816..696dfc07 100644
--- a/internal/hostedctl/launch.go
+++ b/internal/hostedctl/launch.go
@@ -469,7 +469,11 @@ func (c *Controller) dispatch(ctx context.Context, actor hostedwire.KeyID, attem
if err := c.markDispatch(ctx, attempt); err != nil {
return JobView{}, nil, err
}
- ref, perr := c.runner.Launch(ctx, spec)
+ // R21: bounded, so no launch call this process makes can outlive the
+ // Ref-less proof fence (ReflessProofDelay) that starts at its dispatch.
+ lctx, cancel := context.WithTimeout(ctx, ProviderLaunchTimeout)
+ ref, perr := c.runner.Launch(lctx, spec)
+ cancel()
// Record the answer even if the caller has gone: a VM may now exist.
view, err = c.settle(context.WithoutCancel(ctx), actor, attempt, ref, perr, replay)
return view, nil, err
diff --git a/internal/hostedctl/refresh.go b/internal/hostedctl/refresh.go
index a856afa8..278f40fd 100644
--- a/internal/hostedctl/refresh.go
+++ b/internal/hostedctl/refresh.go
@@ -17,6 +17,12 @@ import (
// reply was lost may still be landing until then.
const ReflessProofDelay = 2 * time.Minute
+// ProviderLaunchTimeout bounds every provider Launch call (Launch and
+// Replay dispatch) (ruling R21). It is shorter than ReflessProofDelay, so a
+// call that this process dispatched has returned or given up before a List
+// can prove its job has no VM.
+const ProviderLaunchTimeout = 60 * time.Second
+
// RestartGetTries is how many Refresh passes in a row may fail to read a
// pre-restart job's VM before the controller stops it as elapsed_unknown
// (R20).
@@ -87,8 +93,9 @@ func (s *rebasedSet) add(attempt string) {
// next pass; after RestartGetTries failed passes in a row it is stopped
// as elapsed_unknown too (R20), the Get error still returned;
// - an unknown state is left as it is;
-// - a job with a stop request whose VM is live and not yet stopping gets
-// the provider stop again.
+// - a job with a stop request whose VM is not known to be stopping (live,
+// unknown, or unreadable because Get failed) gets the provider stop
+// again on every pass, whatever its restart state.
//
// Each job is reconciled under its attempt lock (R18), so the restart
// check and its settling are one step, and no other operation on the job
@@ -179,10 +186,15 @@ func (c *Controller) refreshOne(ctx context.Context, attempt string) error {
return err
case gerr != nil:
err := fmt.Errorf("hostedctl: refresh %s: read VM %s: %w", attempt, ref, gerr)
- if !untrusted || c.rebased.failGet(attempt) < RestartGetTries {
- return err
+ if untrusted && c.rebased.failGet(attempt) >= RestartGetTries {
+ return errors.Join(err, c.stopElapsedUnknown(ctx, attempt))
+ }
+ if j.stopRequested.Valid {
+ // A pending stop is sent again whatever the VM read and the
+ // restart state say: the provider's Stop is idempotent.
+ return errors.Join(err, c.resendStop(ctx, j, ref, reason.String))
}
- return errors.Join(err, c.stopElapsedUnknown(ctx, attempt))
+ return err
case job.State.Terminal():
_, err := c.recordProof(rec, "", attempt, StopProof{AttemptID: attempt, VMRef: ref,
State: job.State, ObservedAt: at}, "refresh: provider reports the VM "+string(job.State))
@@ -206,19 +218,27 @@ func (c *Controller) refreshOne(ctx context.Context, attempt string) error {
}
c.rebased.add(attempt)
}
- if !job.State.Live() {
- return nil // unknown: neither proof nor a state worth saving
- }
if j.stopRequested.Valid && job.State != isolatedjob.StateStopping {
- if perr := c.runner.Stop(ctx, ref, reason.String); perr != nil && !errors.Is(perr, isolatedjob.ErrNotFound) {
- r := stopReq{attempt: attempt, account: j.account, task: j.task, ref: ref}
- aerr := c.auditStop(rec, "", r, actionStopFailed, "refresh: provider stop call failed; it is sent again on the next refresh")
- return errors.Join(fmt.Errorf("hostedctl: refresh %s: stop VM %s: %w", attempt, ref, perr), aerr)
- }
+ // Live and not yet stopping, or unknown (it may be live).
+ return c.resendStop(ctx, j, ref, reason.String)
}
return nil
}
+// resendStop sends the provider stop again for j, whose stop was asked for
+// and is not proven. A failure is audited with a fixed reason and returned;
+// the next Refresh sends it again.
+func (c *Controller) resendStop(ctx context.Context, j jobRow, ref isolatedjob.Ref, reason string) error {
+ perr := c.runner.Stop(ctx, ref, reason)
+ if perr == nil || errors.Is(perr, isolatedjob.ErrNotFound) {
+ return nil
+ }
+ r := stopReq{attempt: j.attempt, account: j.account, task: j.task, ref: ref}
+ aerr := c.auditStop(context.WithoutCancel(ctx), "", r, actionStopFailed,
+ "refresh: provider stop call failed; it is sent again on the next refresh")
+ return errors.Join(fmt.Errorf("hostedctl: refresh %s: stop VM %s: %w", j.attempt, ref, perr), aerr)
+}
+
// stopElapsedUnknown is the controller's own stop of a pre-restart job the
// provider gave no age for, or whose VM it could not read RestartGetTries
// passes in a row. The caller holds the attempt's lock. Once the request is recorded the job counts as
diff --git a/internal/hostedctl/refresh_test.go b/internal/hostedctl/refresh_test.go
index ec53afd5..55eb2846 100644
--- a/internal/hostedctl/refresh_test.go
+++ b/internal/hostedctl/refresh_test.go
@@ -49,19 +49,20 @@ func (r *slowRunner) setExtra(jobs ...isolatedjob.Job) {
}
// gatedGet wraps the fake provider's Get. Call n (counting from 1) answers
-// what answer(n) gives. Call 1 is held until call 2 begins, plus 200 ms for
-// call 2's caller to finish, or 300 ms when no call 2 comes; so two
-// overlapping callers interleave unless something serialises them.
+// what answer(n) gives. Call 1 closes entered and waits for release, so a
+// test can start a second caller while the first is inside the provider
+// call.
type gatedGet struct {
*isolatedjob.Fake
- answer func(ctx context.Context, n int, ref isolatedjob.Ref) (isolatedjob.Job, error)
- mu sync.Mutex
- n int
- second chan struct{}
+ answer func(ctx context.Context, n int, ref isolatedjob.Ref) (isolatedjob.Job, error)
+ mu sync.Mutex
+ n int
+ entered chan struct{}
+ release chan struct{}
}
func newGatedGet(f *isolatedjob.Fake, answer func(context.Context, int, isolatedjob.Ref) (isolatedjob.Job, error)) *gatedGet {
- return &gatedGet{Fake: f, answer: answer, second: make(chan struct{})}
+ return &gatedGet{Fake: f, answer: answer, entered: make(chan struct{}), release: make(chan struct{})}
}
func (g *gatedGet) Get(ctx context.Context, ref isolatedjob.Ref) (isolatedjob.Job, error) {
@@ -69,38 +70,67 @@ func (g *gatedGet) Get(ctx context.Context, ref isolatedjob.Ref) (isolatedjob.Jo
g.n++
n := g.n
g.mu.Unlock()
- switch n {
- case 1:
- select {
- case <-g.second:
- time.Sleep(200 * time.Millisecond)
- case <-time.After(300 * time.Millisecond):
- }
- case 2:
- close(g.second)
+ if n == 1 {
+ close(g.entered)
+ <-g.release
}
return g.answer(ctx, n, ref)
}
-func notFoundAnswer(ref isolatedjob.Ref) (isolatedjob.Job, error) {
- return isolatedjob.Job{}, fmt.Errorf("%w: %s (stale read)", isolatedjob.ErrNotFound, ref)
+// watchdog bounds every wait in the concurrency tests. A healthy run never
+// reaches it.
+const watchdog = 5 * time.Second
+
+// lockWaits makes e's controller report, on the returned channel, each
+// time a caller has to wait for an attempt lock.
+func lockWaits(e *launchEnv) chan string {
+ waits := make(chan string, 16)
+ e.c.attempts.waiting = func(id string) { waits <- id }
+ return waits
}
-// twice runs f twice at once and waits for both.
-func twice(f func() error) [2]error {
+// overlap runs two Refresh passes on e: the second starts while the first
+// is inside its Get (held by gg). The second then either waits for the
+// attempt lock, seen through the lock's waiting hook, or, when nothing
+// serialises the two, runs to its end; only then is the first let go.
+func overlap(t *testing.T, e *launchEnv, gg *gatedGet) [2]error {
+ t.Helper()
+ waits := lockWaits(e)
+ first, second := make(chan error, 1), make(chan error, 1)
+ go func() { first <- e.c.Refresh(e.ctx) }()
+ select {
+ case <-gg.entered:
+ case <-time.After(watchdog):
+ t.Fatal("the first Refresh never reached the provider")
+ }
+ go func() { second <- e.c.Refresh(e.ctx) }()
var out [2]error
- var wg sync.WaitGroup
- for i := range 2 {
- wg.Add(1)
- go func() {
- defer wg.Done()
- out[i] = f()
- }()
+ secondDone := false
+ select {
+ case <-waits: // serialised: the second waits for the attempt
+ case out[1] = <-second:
+ secondDone = true
+ case <-time.After(watchdog):
+ t.Fatal("the second Refresh neither waited for the attempt nor finished")
+ }
+ close(gg.release)
+ for i, ch := range []chan error{first, second} {
+ if i == 1 && secondDone {
+ break
+ }
+ select {
+ case out[i] = <-ch:
+ case <-time.After(watchdog):
+ t.Fatalf("Refresh %d did not finish", i)
+ }
}
- wg.Wait()
return out
}
+func notFoundAnswer(ref isolatedjob.Ref) (isolatedjob.Job, error) {
+ return isolatedjob.Job{}, fmt.Errorf("%w: %s (stale read)", isolatedjob.ErrNotFound, ref)
+}
+
// blockLaunch wraps the fake provider's Launch. Once armed, the next
// Launch signals entered and waits for release before reaching the fake.
type blockLaunch struct {
@@ -123,6 +153,7 @@ func (b *blockLaunch) Launch(ctx context.Context, s isolatedjob.LaunchSpec) (iso
// (R18), so proof for a job with no Ref can never be issued while a
// dispatched launch may still create its VM.
func TestStopWaitsForDispatch(t *testing.T) {
+ t.Parallel()
type result struct {
err error
}
@@ -132,6 +163,7 @@ func TestStopWaitsForDispatch(t *testing.T) {
e.run = bl
e.newController()
e.audit()
+ waits := lockWaits(e)
launched := make(chan error, 1)
if viaReplay {
@@ -163,22 +195,27 @@ func TestStopWaitsForDispatch(t *testing.T) {
stopped <- result{err}
}()
select {
+ case <-waits: // Stop waits for the attempt, as it must
case r := <-stopped:
t.Fatalf("Stop returned (%v) while the launch call was in flight; it must wait for the answer", r.err)
- case <-time.After(200 * time.Millisecond):
+ case <-time.After(watchdog):
+ t.Fatal("Stop neither waited for the attempt nor returned")
}
// However long the call takes, nothing proves the attempt stopped.
+ // Refresh has nothing to do for att-1 yet; if a broken lock let the
+ // Stop through, it waits for the attempt instead, which must not
+ // prove anything either.
e.clk.AdvanceMono(3 * time.Minute)
- // Refresh may wait for the attempt's lock; it must not prove anything
- // either way.
refreshed := make(chan error, 1)
go func() { refreshed <- e.c.Refresh(e.ctx) }()
done := false
select {
case <-refreshed:
done = true
- case <-time.After(300 * time.Millisecond):
+ case <-waits:
+ case <-time.After(watchdog):
+ t.Fatal("Refresh neither finished nor waited for the attempt")
}
close(bl.release)
if err := <-launched; viaReplay && err != nil && fault == "" {
@@ -224,6 +261,7 @@ func TestStopWaitsForDispatch(t *testing.T) {
// that proves it is judged by when it began and by every VM it shows that
// is not terminal.
func TestStopIntentWithoutRefFences(t *testing.T) {
+ t.Parallel()
stopIntent := func(t *testing.T, e *launchEnv) T {
t.Helper()
e.fake.Inject(isolatedjob.OpLaunch, isolatedjob.FaultThrottle)
@@ -298,6 +336,7 @@ func TestStopIntentWithoutRefFences(t *testing.T) {
// first not-found Get to the start of the second, so slow calls cannot
// shrink it.
func TestStopNotFoundSlowGet(t *testing.T) {
+ t.Parallel()
e := newLaunchEnv(t)
slow := &slowRunner{Fake: e.fake, clk: e.clk, getDelay: 10 * time.Second}
e.run = slow
@@ -328,6 +367,7 @@ func TestStopNotFoundSlowGet(t *testing.T) {
// TestStopNotFoundRacesLiveRead: a not-found that a Refresh read before a
// live read by another Refresh must not be saved after it (R18).
func TestStopNotFoundRacesLiveRead(t *testing.T) {
+ t.Parallel()
e := newLaunchEnv(t)
e.launchWith("att-1", 2*time.Hour)
e.fake.Tick()
@@ -340,7 +380,7 @@ func TestStopNotFoundRacesLiveRead(t *testing.T) {
e.run = gg
e.newController()
- for i, err := range twice(func() error { return e.c.Refresh(e.ctx) }) {
+ for i, err := range overlap(t, e, gg) {
if err != nil {
t.Fatalf("Refresh %d = %v", i, err)
}
@@ -354,6 +394,7 @@ func TestStopNotFoundRacesLiveRead(t *testing.T) {
// TestStopNotFoundClearedBeforeRestartStop: a live read clears a held
// not-found even when the restart handling then stops the job and returns.
func TestStopNotFoundClearedBeforeRestartStop(t *testing.T) {
+ t.Parallel()
e := newLaunchEnv(t)
flaky := &notFoundOnce{Fake: e.fake}
e.run = flaky
@@ -398,6 +439,7 @@ func TestStopNotFoundClearedBeforeRestartStop(t *testing.T) {
// pre-restart job once (R18): never both re-based and stopped. A second
// restart settles it again.
func TestRestartOverlappingRefresh(t *testing.T) {
+ t.Parallel()
e := newLaunchEnv(t)
e.launchWith("att-1", 2*time.Hour)
e.fake.Tick()
@@ -415,7 +457,7 @@ func TestRestartOverlappingRefresh(t *testing.T) {
e.up()
e.clk.AdvanceMono(time.Second)
- for i, err := range twice(func() error { return e.c.Refresh(e.ctx) }) {
+ for i, err := range overlap(t, e, gg) {
if err != nil {
t.Fatalf("Refresh %d = %v", i, err)
}
@@ -446,6 +488,7 @@ func TestRestartOverlappingRefresh(t *testing.T) {
// after RestartGetTries failed passes in a row it is stopped as
// elapsed_unknown, the stop request saved first (R20).
func TestRestartRetriesFailedGet(t *testing.T) {
+ t.Parallel()
e := newLaunchEnv(t)
ref := e.launchWith("att-1", 2*time.Hour)
e.fake.Tick()
@@ -479,6 +522,7 @@ func TestRestartRetriesFailedGet(t *testing.T) {
// TestRestartWallJump: a forward wall jump across a restart with almost no
// real downtime gives neither proof path any trusted time (R19).
func TestRestartWallJump(t *testing.T) {
+ t.Parallel()
jump := func(e *launchEnv) {
e.down()
e.clk.AdvanceMono(time.Second)
@@ -548,3 +592,111 @@ func TestRestartWallJump(t *testing.T) {
e.wireProof("att-1")
})
}
+
+// TestRestartRetriesPendingStop: once the elapsed_unknown stop is asked
+// for, Refresh sends it again on every pass, even when Get keeps failing
+// and the job already counts as settled after the restart (review r2,
+// finding 4).
+func TestRestartRetriesPendingStop(t *testing.T) {
+ t.Parallel()
+ e := newLaunchEnv(t)
+ ref := e.launchWith("att-1", 2*time.Hour)
+ e.fake.Tick()
+ e.down()
+ e.clk.AdvanceMono(10 * time.Minute)
+ e.up()
+ e.clk.AdvanceMono(time.Second)
+
+ for pass := 1; pass <= RestartGetTries; pass++ {
+ e.fake.Inject(isolatedjob.OpGet, isolatedjob.FaultThrottle)
+ if pass == RestartGetTries {
+ e.fake.Inject(isolatedjob.OpStop, isolatedjob.FaultThrottle) // the first stop call fails
+ }
+ if err := e.c.Refresh(e.ctx); !errors.Is(err, isolatedjob.ErrThrottled) {
+ t.Fatalf("pass %d: Refresh = %v, want the throttle", pass, err)
+ }
+ }
+ if s := e.stopCols("att-1"); s.reason.String != reasonElapsedUnknown {
+ t.Fatalf("after %d failed reads: reason %v, want %s requested", RestartGetTries, s.reason, reasonElapsedUnknown)
+ }
+ if e.fake.LiveByAttempt()["att-1"] != 1 || len(e.fake.StopsIssued()) != 1 {
+ t.Fatalf("after a throttled stop: live %v, stops %v; want the VM running and one stop tried",
+ e.fake.LiveByAttempt(), e.fake.StopsIssued())
+ }
+
+ // Get still fails; Stop would now work. The next pass must send it.
+ e.fake.Inject(isolatedjob.OpGet, isolatedjob.FaultThrottle)
+ if err := e.c.Refresh(e.ctx); !errors.Is(err, isolatedjob.ErrThrottled) {
+ t.Fatalf("pass %d: Refresh = %v, want the Get throttle", RestartGetTries+1, err)
+ }
+ if got := e.fake.StopsIssued(); !slices.Equal(got, []isolatedjob.Ref{ref, ref}) {
+ t.Fatalf("provider stops = %v, want the stop sent again", got)
+ }
+ vms, err := e.fake.List(e.ctx)
+ if err != nil || len(vms) != 1 || vms[0].State != isolatedjob.StateStopping {
+ t.Fatalf("VMs after the retried stop = (%v, %v), want one stopping", vms, err)
+ }
+}
+
+// deadlineLaunch wraps the fake provider's Launch and records the context
+// deadline of each call.
+type deadlineLaunch struct {
+ *isolatedjob.Fake
+ mu sync.Mutex
+ calls []launchDeadline
+}
+
+type launchDeadline struct {
+ left time.Duration // time until the deadline, at the call
+ set bool
+}
+
+func (d *deadlineLaunch) Launch(ctx context.Context, s isolatedjob.LaunchSpec) (isolatedjob.Ref, error) {
+ dl, ok := ctx.Deadline()
+ d.mu.Lock()
+ d.calls = append(d.calls, launchDeadline{left: time.Until(dl), set: ok})
+ d.mu.Unlock()
+ return d.Fake.Launch(ctx, s)
+}
+
+// TestProviderLaunchTimeout: every provider Launch call, from Launch and
+// from Replay, carries a deadline at most ProviderLaunchTimeout (60 s)
+// away, derived from the caller's context (ruling R21).
+func TestProviderLaunchTimeout(t *testing.T) {
+ t.Parallel()
+ if ProviderLaunchTimeout != 60*time.Second || ProviderLaunchTimeout >= ReflessProofDelay {
+ t.Fatalf("ProviderLaunchTimeout = %v, want 60s and under ReflessProofDelay %v", ProviderLaunchTimeout, ReflessProofDelay)
+ }
+ e := newLaunchEnv(t)
+ dl := &deadlineLaunch{Fake: e.fake}
+ e.run = dl
+ e.newController()
+ e.audit()
+
+ long, cancel := context.WithTimeout(e.ctx, time.Hour)
+ defer cancel()
+ e.fake.Inject(isolatedjob.OpLaunch, isolatedjob.FaultThrottle)
+ if _, err := e.c.Launch(long, "inst-1", instKey, request("att-1")); err != nil {
+ t.Fatalf("throttled Launch = %v", err)
+ }
+ if err := e.c.Replay(e.ctx); err != nil { // no deadline of its own
+ t.Fatalf("Replay = %v", err)
+ }
+ short, cancel2 := context.WithTimeout(e.ctx, 5*time.Second)
+ defer cancel2()
+ if _, err := e.c.Launch(short, "inst-1", instKey, request("att-2")); err != nil {
+ t.Fatalf("Launch = %v", err)
+ }
+ if len(dl.calls) != 3 {
+ t.Fatalf("provider launches = %d, want 3", len(dl.calls))
+ }
+ for i, c := range dl.calls {
+ limit := ProviderLaunchTimeout
+ if i == 2 {
+ limit = 5 * time.Second // the caller's own, shorter deadline still holds
+ }
+ if !c.set || c.left <= 0 || c.left > limit {
+ t.Fatalf("provider launch %d: deadline set %v, %v left; want one at most %v away", i, c.set, c.left, limit)
+ }
+ }
+}
diff --git a/internal/hostedctl/stop_test.go b/internal/hostedctl/stop_test.go
index 6dc470e4..74616e5a 100644
--- a/internal/hostedctl/stop_test.go
+++ b/internal/hostedctl/stop_test.go
@@ -206,6 +206,7 @@ func (p *stopProbe) join(t *testing.T) []*probeRead {
}
func TestStopRecordsRequestBeforeProvider(t *testing.T) {
+ t.Parallel()
e := newLaunchEnv(t)
probe := &stopProbe{Fake: e.fake, store: e.store}
e.run = probe
@@ -263,6 +264,7 @@ func TestStopRecordsRequestBeforeProvider(t *testing.T) {
}
func TestStopProofNeedsTerminalState(t *testing.T) {
+ t.Parallel()
e := newLaunchEnv(t)
ref := e.launchWith("att-1", 2*time.Hour)
e.fake.Tick()
@@ -315,6 +317,7 @@ func TestStopProofNeedsTerminalState(t *testing.T) {
}
func TestUnknownStateIsNeverProof(t *testing.T) {
+ t.Parallel()
e := newLaunchEnv(t)
e.launchWith("att-1", 2*time.Hour)
e.fake.Tick()
@@ -353,6 +356,7 @@ func TestUnknownStateIsNeverProof(t *testing.T) {
}
func TestLostStopReplyRetries(t *testing.T) {
+ t.Parallel()
t.Run("reply lost after the stop took effect", func(t *testing.T) {
e := newLaunchEnv(t)
ref := e.launchWith("att-1", 2*time.Hour)
@@ -405,6 +409,7 @@ func TestLostStopReplyRetries(t *testing.T) {
}
func TestStopOfGoneVMSucceeds(t *testing.T) {
+ t.Parallel()
e := newLaunchEnv(t)
ref := e.launchWith("att-1", 2*time.Hour)
e.fake.Tick()
@@ -459,6 +464,7 @@ func (p *notFoundOnce) Get(ctx context.Context, ref isolatedjob.Ref) (isolatedjo
}
func TestStopNotFoundThenRunning(t *testing.T) {
+ t.Parallel()
e := newLaunchEnv(t)
flaky := &notFoundOnce{Fake: e.fake}
e.run = flaky
@@ -509,6 +515,7 @@ func TestStopNotFoundThenRunning(t *testing.T) {
}
func TestStopIntentWithoutRef(t *testing.T) {
+ t.Parallel()
t.Run("lost launch reply left a VM", func(t *testing.T) {
e := newLaunchEnv(t)
e.fake.Inject(isolatedjob.OpLaunch, isolatedjob.FaultLostReply)
@@ -592,6 +599,7 @@ func TestStopIntentWithoutRef(t *testing.T) {
}
func TestStopRoles(t *testing.T) {
+ t.Parallel()
e := newLaunchEnv(t)
ref := e.launchWith("att-1", 2*time.Hour)
e.fake.Tick()
@@ -641,6 +649,7 @@ func TestStopRoles(t *testing.T) {
}
func TestRestartFindsVMGone(t *testing.T) {
+ t.Parallel()
e := newLaunchEnv(t)
refA := e.launchWith("att-a", 2*time.Hour)
refB := e.launchWith("att-b", 2*time.Hour)
@@ -693,6 +702,7 @@ func TestRestartFindsVMGone(t *testing.T) {
}
func TestRestartUsesProviderAge(t *testing.T) {
+ t.Parallel()
const life = 2 * time.Hour
run := func(t *testing.T, downtime, wallMove time.Duration) (old, got stopCols, want T) {
e := newLaunchEnv(t)
@@ -741,6 +751,7 @@ func TestRestartUsesProviderAge(t *testing.T) {
}
func TestRestartDowntimeExceedsWallDelta(t *testing.T) {
+ t.Parallel()
const life = 4 * time.Hour
e := newLaunchEnv(t)
ref1 := e.launchWith("att-1", life) // its age will be unknown
@@ -783,6 +794,7 @@ func TestRestartDowntimeExceedsWallDelta(t *testing.T) {
}
func TestRestartStopsWhenElapsedUnknown(t *testing.T) {
+ t.Parallel()
e := newLaunchEnv(t)
ref1 := e.launchWith("att-1", 2*time.Hour) // age unknown after the restart
e.clk.AdvanceMono(time.Minute)
@@ -838,6 +850,7 @@ func TestRestartStopsWhenElapsedUnknown(t *testing.T) {
// a job saved just before the exit can have launched_t equal to OpenedAt. It
// still existed before the restart.
func TestRestartJobAtOpenTime(t *testing.T) {
+ t.Parallel()
e := newLaunchEnv(t)
ref := e.launchWith("att-1", 2*time.Hour)
e.fake.Tick()