hostedclient: verify before redirects, pin the error contract
Review r1 of Task 16. The client sends with one RoundTrip on the HTTP client's transport, with its Timeout as a context deadline, so no 3xx is parsed or followed before the answer is verified; the unverified error no longer names the status. hostedctl.ErrorCodes lists the handler's status and code pairs, and the client test requires each to map to a typed kind. One signed-success case per guard. The go list guard declares cmd/equipo's source through testci.GoCommand and runs under a deadline.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 files changed,
+241
−33
docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md+40 −0internal/hostedclient/client.go+35 −20internal/hostedclient/client_test.go+144 −13internal/hostedctl/http.go+22 −0
CI cancelled — superseded by a newer push — run details
CI log
=== prepare ===
ci-box: machine: aarch64, 32 CPUs, 62 GiB memory, kernel 7.0.0-1017-aws
ci-box: python 3.12.3; Docker version 29.1.3, build 29.1.3-0ubuntu3~24.04.2
ci-box: user namespaces allowed: 233151
ci-box: cgroup: cgroup2fs
ci-box: disk /home/ci/work/repos/oficina__equipo/wt/hosted-runners-1a: Type Size Avail | ext4 96G 85G
ci-box: disk /home/ci/.cache/equipo-ci-box: Type Size Avail | ext4 96G 85G
ci-box: bwrap: fetched and verified in 0.3s
ci-box: claude: fetched and verified in 1.4s
ci-box: codex: fetched and verified in 3.5s
ci-box: codex-code-mode-host: fetched and verified in 1.4s
ci-box: libwrap: fetched and verified in 0.3s
ci-box: socat: fetched and verified in 0.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.5s
ci-box: opencode: installed and verified in 2.3s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 8.8s
ci-box: clone deepened in 3.8s
ci-box: file times set from content: 2896 files, 194 directories
ci-box: ready in 17.3s
=== copy ===
EQUIPO_RELEASE_COPY_CHECK=1 CGO_ENABLED=0 go test ./internal/equipotest -run '^TestReleaseCopyReviewed$' -count=1
ok amadan.net/oficina/equipo/internal/equipotest 0.250s
=== compile ===
go build ./...
go: downloading github.com/aws/aws-sdk-go-v2/config v1.33.21
go: downloading github.com/aws/aws-sdk-go-v2/service/ssooidc v1.44.5
go: downloading github.com/aws/aws-sdk-go-v2/service/signin v1.14.0
go: downloading github.com/aws/aws-sdk-go-v2/service/sso v1.39.5
go: downloading github.com/aws/aws-sdk-go-v2/credentials v1.21.3
go: downloading github.com/aws/aws-sdk-go-v2/service/sts v1.53.0
go: downloading github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.20.9
go: downloading github.com/aws/aws-sdk-go-v2/internal/v4a v1.5.12
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.3s
+ go list -export -test -tags browser,testbuild -f ./internal/equipo ./internal/headless ./internal/idtest ./internal/plan3test ./internal/thintest
0.3s
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -version
staticcheck 2026.1 (v0.7.0)
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 -version
Go: go1.26.11
Scanner: govulncheck@v1.8.0
DB: https://vuln.go.dev
DB updated: 2026-11-11 02:51:11 +0000 UTC
go run github.com/zricethezav/gitleaks/v8@v8.30.1 version
version is set by build process
=== check ===
--- shard 0 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-work: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadless$/^4c_rebase$|^TestHeadless$/^4b_ask$|^TestHeadless$/^4c_checks_card$|^TestHeadless$/^4_step_crash$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed
receipt: test step 1m21.299s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m19.702s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m19.7s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 33.14, cpu waiting 21.92%, memory waiting 0.00%, io waiting 0.96%
--- 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.135s 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.551s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m21.55s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 33.14, cpu waiting 21.53%, memory waiting 0.00%, io waiting 0.93%
--- shard 2 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-connections: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadlessConnections$|^TestHeadlessTokenPasteEndToEnd$|^TestHeadlessTokenConnection$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed
receipt: test step 1m24.907s 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.754s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m12.09s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 5.86s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 4.8s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 33.14, cpu waiting 21.02%, memory waiting 0.00%, io waiting 0.90%
--- shard 3 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-mac: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestMacWorker$|^TestHeadlessAttachments$|^TestHeadlessPrewarm$|^TestHeadless$/^1_first_token$|^TestHeadless$/^6_quick_messages$|^TestHeadless$/^8_instance_restart$|^TestHeadless$/^3_runner_offline$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed
receipt: test step 1m19.718s 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 1m17.97s amadan.net/oficina/equipo/internal/headless
receipt: slow test 37.37s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 20.47s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 10.64s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
receipt: slow test 9.49s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
machine: 32 CPUs, load 34.11, cpu waiting 22.22%, memory waiting 0.00%, io waiting 1.00%
--- shard 4 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-guards: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadlessCopyRotation$|^TestHeadlessPolicyGuards$|^TestHeadlessRunnerKillLeavesNoCopies$|^TestHeadlessNewHouseRuleStartsFresh$|^TestHeadless$/^3_engineering$|^TestHeadless$/^3_step_cancel$|^TestHeadless$/^3_step_contained$|^TestHeadless$/^3_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed
receipt: test step 1m37.68s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m35.909s amadan.net/oficina/equipo/internal/headless
receipt: slow test 59.62s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 11.56s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 10.11s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 8.8s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 5.81s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
machine: 32 CPUs, load 28.15, cpu waiting 17.54%, memory waiting 0.00%, io waiting 0.74%
--- shard 5 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-rest: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^TestHeadless$/^4c_rebase$|^TestHeadless$/^4b_ask$|^TestHeadless$/^4c_checks_card$|^TestHeadless$/^4_step_crash$|^TestHeadless$/^4_review$|^TestHeadless$/^2b_access$|^TestHeadless$/^runner_crash$|^TestHeadless$/^2b_first_message$|^TestHeadless$/^4_checks_honest$|^TestHeadless$/^7_stream_resume$|^TestHeadless$/^2b_notebook$|^TestHeadless$/^2b_move_in$|^TestHeadless$/^2b_desk_failure$|^TestHeadless$/^cancel$|^TestHeadlessConnections$|^TestHeadlessTokenPasteEndToEnd$|^TestHeadlessTokenConnection$|^TestMacWorker$|^TestHeadlessAttachments$|^TestHeadlessPrewarm$|^TestHeadless$/^1_first_token$|^TestHeadless$/^6_quick_messages$|^TestHeadless$/^8_instance_restart$|^TestHeadless$/^3_runner_offline$|^TestHeadlessCopyRotation$|^TestHeadlessPolicyGuards$|^TestHeadlessRunnerKillLeavesNoCopies$|^TestHeadlessNewHouseRuleStartsFresh$|^TestHeadless$/^3_engineering$|^TestHeadless$/^3_step_cancel$|^TestHeadless$/^3_step_contained$|^TestHeadless$/^3_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed
amadan: job cancelled — a newer push superseded it
--- shard 6 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane thintest: ./internal/thintest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test([^C]|C[^o]|Co[^n]|Con[^t])|^TestContract(Assistant|Outcome|Team|Handoff|HostAllowlist|HostIsPerPerson|Look|Use[A-Z]|RemoteCall|LanesRunAtOnce|NoMergeQuestionWhenGateMerges|PreviewHeldUntilPublishAnswer|PreviewNotHeldBelow19|PublishNeedsOwnerAnswer)' ./internal/thintest
receipt: test step 1.1s 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 7.90, cpu waiting 0.68%, memory waiting 0.00%, io waiting 3.68%
--- 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.111s 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 7.90, cpu waiting 0.68%, memory waiting 0.00%, io waiting 3.68%
--- shard 8 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-thin: ./internal/runner/thin
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./internal/runner/thin
cache miss: amadan.net/oficina/equipo/internal/runner/thin: its inputs changed
amadan: job cancelled — a newer push superseded it
--- shard 9 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-bug: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestDirectBugWorkflow$|^TestEnrolKeepsTheRole$' ./internal/runner
cache miss: amadan.net/oficina/equipo/internal/runner: its inputs changed
receipt: test step 46.935s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 45.889s amadan.net/oficina/equipo/internal/runner
receipt: slow test 25.86s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.02s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 34.02, cpu waiting 21.20%, memory waiting 0.00%, io waiting 1.77%
--- shard 10 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-plans: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestPlanWorkflowCandidateOrder$|^TestPlanWorkflowFeature$|^TestCoordinatorRecoveryCallRefusalKeepsServing$|^TestCoordinatorRefusalMatrix$' ./internal/runner
cache miss: amadan.net/oficina/equipo/internal/runner: its inputs changed
receipt: test step 47.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 45.219s amadan.net/oficina/equipo/internal/runner
receipt: slow test 35.26s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 29.93s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.39s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.55s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 34.02, cpu waiting 21.62%, memory waiting 0.00%, io waiting 1.71%
--- 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.298s 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.425s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.12s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.51s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.12s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 2.41s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 1.61s amadan.net/oficina/equipo/internal/runner TestReportPostsRetryExactRequest
machine: 32 CPUs, load 27.12, cpu waiting 15.28%, memory waiting 0.00%, io waiting 2.09%
--- shard 12 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-a started 30s late; cpu waiting 26.4%, load 21.13
test lane equipotest-a: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test[A-D]|^TestQ' ./internal/equipotest
cache miss: amadan.net/oficina/equipo/internal/equipotest: its inputs changed
receipt: test step 1m4.237s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m2.297s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 26.25s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 26.2s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 24.29s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 21.93s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
receipt: slow test 21.67s amadan.net/oficina/equipo/internal/equipotest TestAuthorityRejectsMismatchedTarget
machine: 32 CPUs, load 29.90, cpu waiting 18.13%, memory waiting 0.00%, io waiting 0.76%
--- 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.4%, load 21.13
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.236s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1m12.399s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 19.2s amadan.net/oficina/equipo/internal/equipotest TestProjectWritesRequireCurrentOwner
receipt: slow test 19.12s amadan.net/oficina/equipo/internal/equipotest TestProjectOwnersAreMembers
receipt: slow test 19.11s amadan.net/oficina/equipo/internal/equipotest TestProjectsReopen
receipt: slow test 19.11s amadan.net/oficina/equipo/internal/equipotest TestProjectRetryAndRevision
receipt: slow test 19.08s amadan.net/oficina/equipo/internal/equipotest TestProjectsFailuresRollBack
machine: 32 CPUs, load 27.12, cpu waiting 11.76%, memory waiting 0.00%, io waiting 2.23%
--- 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.4%, load 21.13
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.734s 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.669s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 14.79s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 12.66s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 9.63s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 9.53s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 6.55s amadan.net/oficina/equipo/internal/equipotest TestRosterBootstrapOnce
machine: 32 CPUs, load 26.05, cpu waiting 15.35%, memory waiting 0.00%, io waiting 0.64%
--- 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.4%, load 21.13
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 429ms 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.13, cpu waiting 11.76%, memory waiting 0.00%, io waiting 2.23%
--- 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.4%, load 21.13
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 552ms against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 48.756s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 3.61s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 3.41s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 1.5s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.47s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3A
receipt: slow test 1.21s amadan.net/oficina/equipo/internal/plan3test TestPlanMigrationUpgrade
machine: 32 CPUs, load 27.12, cpu waiting 11.76%, memory waiting 0.00%, io waiting 2.23%
--- 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.4%, load 21.13
test lane rest: ./cmd/equipo ./cmd/equipo-hosted-controller ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/push ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/hostedclient ./internal/hostedctl ./internal/hostedwire ./internal/idtest ./internal/isolatedjob ./internal/isolatedjob/awsjob ./internal/isolatedjob/guardfixture ./internal/isolatedjob/isolatedjobtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./cmd/equipo ./cmd/equipo-hosted-controller ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/push ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/hostedclient ./internal/hostedctl ./internal/hostedwire ./internal/idtest ./internal/isolatedjob ./internal/isolatedjob/awsjob ./internal/isolatedjob/guardfixture ./internal/isolatedjob/isolatedjobtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
cache miss: amadan.net/oficina/equipo/internal/copydesk: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/isolatedjob: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/equipo/team: 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/runner/webread: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/claude: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/workspace: 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/webread TestTimeouts
=== RUN TestTimeouts
fetch_test.go:537: s1: {Source:s1 Origin:paul Parent: URL:https://shop.example.com/slow-body Hops:[{URL:https://shop.example.com/slow-body Address:151.101.1.1 Status:200}] Address:151.101.1.1 Status:200 Type:text/plain Bytes:5 SHA256:2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 Millis:301 Reason: File:s001.txt}
--- FAIL: TestTimeouts (0.61s)
--- FAIL amadan.net/oficina/equipo/internal/runner/webread (package output)
FAIL
rastrillo-budget/v1 ran 1.103s
FAIL amadan.net/oficina/equipo/internal/runner/webread 1.109s
budget note: internal/equipo took 45.275s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/equipo/chat took 12.529s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/hostedctl took 12.779s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/idtest took 39.84s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/release took 34.981s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/runner/containment took 39.215s, over the 15s its record on line 40 allows; reported only, timing fails on CI
receipt: test step 2m18.332s against a 60s target (the gate's other steps are not in this figure)
receipt: 14 packages ran, 52 cached, 20 without tests, 1 failed
receipt: slow package 52.766s amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow package 51.427s amadan.net/oficina/equipo/internal/runner/provider/pi
receipt: slow package 45.275s amadan.net/oficina/equipo/internal/equipo
receipt: slow package 39.84s amadan.net/oficina/equipo/internal/idtest
receipt: slow package 39.215s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 21.76s amadan.net/oficina/equipo/internal/runner/provider/opencode TestOpenCodeAcceptanceHostileRepository
receipt: slow test 15.38s amadan.net/oficina/equipo/internal/runner/containment TestEngineeringOfflineGo
receipt: slow test 11.52s amadan.net/oficina/equipo/internal/hostedctl TestLifecycleSimulation
receipt: slow test 10.89s amadan.net/oficina/equipo/internal/idtest TestIDCallbackGuardAndPendingNonce
receipt: slow test 10.82s amadan.net/oficina/equipo/internal/equipo TestAgentReadRechecksIdentity
rastrillo: budget test: go test failed
exit status 1
+ go test -tags testbuild -timeout 15m -v -run '^TestTimeouts$' -count=1 ./internal/runner/webread (retry, once)
##############################################################################
FLAKE ./internal/runner/webread:TestTimeouts rest 8bf464710db1832c2b0643c543143b12b7197527 0.61s 10.32
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 10.32, cpu waiting 5.33%, memory waiting 0.00%, io waiting 0.21%
--- 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.257s 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.65s amadan.net/oficina/equipo/internal/headless
receipt: slow test 37.39s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 15.1s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 10.67s amadan.net/oficina/equipo/internal/headless TestBrowserChat
receipt: slow test 7.95s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 6.02s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
machine: 32 CPUs, load 33.14, cpu waiting 21.53%, memory waiting 0.00%, io waiting 0.93%
--- shard 19 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-work: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed
receipt: test step 1m32.969s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m31.258s amadan.net/oficina/equipo/internal/headless
receipt: slow test 26.25s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 22.78s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 13.96s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 10.24s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
receipt: slow test 8.19s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
machine: 32 CPUs, load 29.90, cpu waiting 18.68%, memory waiting 0.00%, io waiting 0.79%
--- 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.542s 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.961s amadan.net/oficina/equipo/internal/headless
receipt: slow test 14.18s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 13.33s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 13.11s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 10.25s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
receipt: slow test 10.12s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsOpenCodeGoLimitRequired
machine: 32 CPUs, load 26.05, cpu waiting 16.41%, memory waiting 0.00%, io waiting 0.69%
--- shard 21 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-rest: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAskAfterMerge|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' ./internal/headless
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserEmptyExplore
=== RUN TestBrowserEmptyExplore
time=2026-11-22T20:04:11.447Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-22T20:04:11.447Z level=INFO msg="startup phase done" phase=state_lock took=62µs
time=2026-11-22T20:04:11.447Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-22T20:04:11.447Z level=INFO msg="startup phase done" phase=claim_roots took=100µs
time=2026-11-22T20:04:11.447Z level=INFO msg="startup phase" phase=sweep
time=2026-11-22T20:04:11.487Z level=INFO msg="startup phase done" phase=sweep took=39.643ms
time=2026-11-22T20:04:11.487Z level=INFO msg="startup phase" phase=credentials
time=2026-11-22T20:04:11.487Z level=INFO msg="startup phase done" phase=credentials took=158µs
time=2026-11-22T20:04:11.487Z level=INFO msg="startup phase" phase=open_state
time=2026-11-22T20:04:11.532Z level=INFO msg="startup phase done" phase=open_state took=44.242ms
time=2026-11-22T20:04:11.532Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-22T20:04:11.533Z level=INFO msg=connecting host=127.0.0.1:45671 protocol=28
time=2026-11-22T20:04:11.535Z level=INFO msg=connected host=127.0.0.1:45671 took=1.373ms
time=2026-11-22T20:04:11.535Z level=INFO msg="capabilities gathering"
time=2026-11-22T20:04:11.536Z level=INFO msg="capabilities gathered" took=435µs tags=linux,claude,go
time=2026-11-22T20:04:11.536Z level=INFO msg="hello sent" protocol=28
time=2026-11-22T20:04:11.540Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-22T20:04:12.581Z 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.88s)
--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m27.248s
FAIL amadan.net/oficina/equipo/internal/headless 87.533s
receipt: test step 1m28.645s 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.248s amadan.net/oficina/equipo/internal/headless
receipt: slow test 15.23s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
receipt: slow test 11.33s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 10.43s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 10.29s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 8.09s amadan.net/oficina/equipo/internal/headless TestBrowserRefreshRace
exit status 1
+ go test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAskAfterMerge|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' -v -run '^TestBrowserEmptyExplore$' -count=1 ./internal/headless (retry, once)
##############################################################################
FLAKE ./internal/headless:TestBrowserEmptyExplore browser-headless-rest 8bf464710db1832c2b0643c543143b12b7197527 5.88s 31.37
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 28.15, cpu waiting 16.97%, memory waiting 0.00%, io waiting 0.71%
--- 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.039s 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 852ms 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 198ms 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.098s 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 7.90, cpu waiting 1.51%, memory waiting 0.00%, io waiting 3.56%
--- 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.30s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.36s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 9.41s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 9.76s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 24.60s
+ 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 (63s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 12.64s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 14.91s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 20.63s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 13.14s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless (22s)
ok ./internal/headless TestMixedVersions 20.03s
+ 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 36.04, cpu waiting 22.50%, memory waiting 0.00%, io waiting 1.31%
--- 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.294s 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.021s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 154ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 66ms amadan.net/oficina/equipo/internal/runner/provider/codex
receipt: slow package 2ms amadan.net/oficina/equipo/internal/runner/provider
receipt: slow package 0s amadan.net/oficina/equipo/internal/runner/provider/gotoolchain
receipt: slow test 5.05s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.61s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 280ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 150ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 70ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxToolchain
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.14s 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.833s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 270ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 170ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof
receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryReusedPID
receipt: slow test 100ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryCleansScratch
machine: 32 CPUs, load 14.27, cpu waiting 4.55%, memory waiting 0.00%, io waiting 3.12%
--- shard 25 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: runner-dead-references started 30s late; cpu waiting 26.4%, load 21.13
shard 25: make runner-dead-references lanes-check build vet fmt-check budget migration-check
python3 scripts/runner-dead-references.py
reference scan: 2609 text files, 2854 matches, 0 failures
python3 scripts/ci-test.py check
lanes: 18 lanes and 5 browser lanes run every test once; 20-check@29
CGO_ENABLED=0 go build ./...
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o /dev/null ./cmd/equipo-runner
go vet ./...
go vet -tags testbuild ./internal/runner/thin ./internal/headless
GOOS=darwin GOARCH=arm64 go vet ./cmd/equipo-runner/... ./internal/runner/... ./internal/wire/... ./internal/release/...
go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget size
budget size: 96 directories within budget
CGO_ENABLED=0 go test ./internal/equipo -run '^TestMigrationModels$' -count=1
ok amadan.net/oficina/equipo/internal/equipo 2.500s
machine: 32 CPUs, load 33.93, cpu waiting 20.09%, memory waiting 0.00%, io waiting 1.83%
--- 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.4%, load 21.13
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 27.12, cpu waiting 13.53%, memory waiting 0.00%, io waiting 2.16%
--- shard 27 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: govulncheck started 30s late; cpu waiting 26.4%, load 21.13
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 31.84, cpu waiting 16.65%, memory waiting 0.00%, io waiting 2.02%
--- shard 28 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: gitleaks started 30s late; cpu waiting 26.4%, load 21.13
shard 28: make gitleaks
[90m8:03PM[0m [32mINF[0m [1mUnknown SCM platform. Use --platform to include links in findings.[0m [36mhost=[0mamadan.net
[90m8:03PM[0m [32mINF[0m [1m1134 commits scanned.[0m
[90m8:03PM[0m [32mINF[0m [1mscanned ~62139300 bytes (62.14 MB) in 14.9s[0m
[90m8:03PM[0m [32mINF[0m [1mno leaks found[0m
machine: 32 CPUs, load 33.93, cpu waiting 21.20%, memory waiting 0.00%, io waiting 1.77%
diff --git a/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md b/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md| index 749780cf..7f918fd5 100644 |
| --- a/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md |
| +++ b/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md |
| @@ -841,3 +841,43 @@ followed. No edit to hostedctl; the test builds the handler from hostedctl's pub |
| | Map by code alone (status check dropped) | `go test ./internal/hostedclient -run '^TestSignedAnswersMapToKinds$' -count=1` | `client_test.go:345: code and status disagree: ... controller answered 409 "disabled"; want ... unexpected answer` | yes, passes | |
| | Stop proof check off | same | `client_test.go:359: Stop answered with proof {AttemptID:a9 ...} = {AttemptID:a9 ...}, <nil>; want nothing and ErrBadResponse` | yes, passes | |
| | cmd/equipo imports hostedclient (temporary `cmd/equipo/zz_mut.go`) | `go test ./internal/hostedclient -run '^TestInstanceDoesNotCallHostedClient$' -count=1` | `client_test.go:444: amadan.net/oficina/equipo/cmd/equipo depends on internal/hostedclient; ...` | yes, file deleted, passes | |
| + |
| +### Task 16 fix round 1 (review r1) |
| + |
| +- Redirects: the client no longer calls `http.Client.Do`. It sends with one `RoundTrip` on |
| + `HTTP.Transport` (`http.DefaultTransport` when nil), with `HTTP.Timeout` applied as a context |
| + deadline over the whole call, body read included. A 3xx is never parsed or followed before it is |
| + verified. The unverified-answer error no longer names the status. |
| +- Contract: `hostedctl.ErrorCodes()` (new, read-only: every status and code pair of `apiErrors` and |
| + `errInternal`). `TestClientMatchesHandlerErrorCodes` requires every handler pair to map to a typed |
| + kind and the client to know no code the handler does not send. |
| +- Guards: `TestSignedSuccessMustFit` has one signed 200 case per success guard. |
| +- Dependency guard: `testci.GoCommand` declares cmd/equipo's source as test inputs; the `go list` runs |
| + under `exec.CommandContext` (8 s) and prints its stderr on failure. |
| +- Cache check, normal command `go test ./internal/hostedclient` (no -count): `ok 0.815s`, then |
| + `ok (cached)`; add `cmd/equipo/zz_mut.go` importing hostedclient: `client_test.go:575: |
| + amadan.net/oficina/equipo/cmd/equipo depends on internal/hostedclient; ...` FAIL; file deleted, |
| + `ok 0.740s`. Control with the `testci.GoCommand` line disabled: after the same import, `ok (cached)`. |
| +- `go test ./internal/hostedclient -count=1` ok 0.72 s (10 tests); `go test ./internal/hostedctl |
| + -run 'TestRoutes|TestResponsesSigned' -count=1` ok; gofmt, vet, staticcheck v0.7.0 clean on both |
| + packages; `ci-test.py check` ok; dead-reference scan 0 failures. |
| + |
| +| Mutation | Command | Observed failure | Restored | |
| +| --- | --- | --- | --- | |
| +| Back to `http.Client.Do` with `CheckRedirect` | `go test ./internal/hostedclient -run '^TestClientRefusesUnsignedResponse$' -count=1` | `client_test.go:333: redirect to %, signed false: Launch = hostedclient: launch: Post "https://127.0.0.1:44573/v1/jobs": failed to parse Location header "%": ... want hostedclient: the response could not be verified after 1` | yes, passes | |
| +| HTTP timeout not applied | `... -run '^TestClientHonoursTimeoutAndCancel$' ...` | `client_test.go:359: Get past the HTTP timeout = hostedclient: the response could not be verified: ... after 3.0025s, want context.DeadlineExceeded within 2 s` | yes, passes | |
| +| Status back in the unverified error | `... -run '^TestClientRefusesUnsignedResponse$' ...` | `client_test.go:337: unsigned redirect error "hostedclient: the response could not be verified: launch (unverified status 307): ..." holds text from the answer` | yes, passes | |
| +| Handler code renamed (`network_audit` to `audit_stale`, http.go) | `... -run '^TestClientMatchesHandlerErrorCodes$' ...` | `client_test.go:417: handler refusal 503 "audit_stale" maps to ... unexpected answer ..., want a typed kind` and `client_test.go:425: client maps 503 "network_audit", which the handler does not send` | yes, passes | |
| +| Handler status changed (`past_deadline` 410 to 409, http.go) | same | `client_test.go:417: handler refusal 409 "past_deadline" maps to ... unexpected answer ...` and `client_test.go:425: client maps 410 "past_deadline", which the handler does not send` | yes, passes | |
| +| Client entry `network_audit` removed | same | `client_test.go:417: handler refusal 503 "network_audit" maps to ... unexpected answer ..., want a typed kind` | yes, passes | |
| +| Launch attempt check off | `... -run '^TestSignedSuccessMustFit$' ...` | `client_test.go:466: launch view for another attempt: = {AttemptID:a9 ...}, <nil>; want ErrBadResponse` | yes, passes | |
| +| Get attempt check off | same | `client_test.go:466: get view for another attempt: = {AttemptID:a9 ...}, <nil>; want ErrBadResponse` | yes, passes | |
| +| `DecodeStrict` to `json.Unmarshal` for successes | same | `client_test.go:466: get view with an unknown field: = {AttemptID:a1 ...}, <nil>; want ErrBadResponse` | yes, passes | |
| +| Stop proof: attempt half removed | same | `client_test.go:466: stop proof for another attempt: = {AttemptID:a9 ... State:stopped ...}, <nil>; want ErrBadResponse` | yes, passes | |
| +| Stop proof: terminal half removed | same | `client_test.go:466: stop proof not terminal: = {AttemptID:a1 ... State:running ...}, <nil>; want ErrBadResponse` | yes, passes | |
| +| Drain generation >= 1 off | same | `client_test.go:466: drain generation 0: = 0, <nil>; want ErrBadResponse` | yes, passes | |
| +| Generation echo off (`generationCall`) | same | `client_test.go:466: quiescent for another generation: = <nil>, <nil>; want ErrBadResponse` (and suspend, reopen) | yes, passes | |
| +| Resume epoch >= 1 off | same | `client_test.go:466: resume epoch 0: = 0, <nil>; want ErrBadResponse` | yes, passes | |
| +| Skip response verification (rerun) | `... -run '^TestClientRefusesUnsignedResponse$' ...` | `client_test.go:274: unsigned: Get = {AttemptID:a1 ... VMRef:vm-1 ...}, <nil>; want nothing and ErrUnverified` | yes, passes | |
| + |
| +The round 0 rows above give line numbers from before this round. |
diff --git a/internal/hostedclient/client.go b/internal/hostedclient/client.go| index 2c3287c3..9f4fe7d8 100644 |
| --- a/internal/hostedclient/client.go |
| +++ b/internal/hostedclient/client.go |
| @@ -134,20 +134,24 @@ type Config struct { |
| // ControllerKey is the controller's public key; responses must be |
| // signed by it. |
| ControllerKey ed25519.PublicKey |
| - // HTTP sends the requests. It carries the TLS settings and timeout for |
| - // the deployment; New refuses nil rather than guess them. The client |
| - // uses a copy that never follows redirects. |
| + // HTTP carries the deployment's TLS settings (in its Transport) and |
| + // timeout; New refuses nil rather than guess them. The client sends |
| + // through HTTP.Transport (http.DefaultTransport when nil) itself, not |
| + // through HTTP.Do, so no redirect is ever followed or even parsed before |
| + // the response is verified; Jar and CheckRedirect are not used. Timeout, |
| + // when set, bounds each whole call, reading the body included. |
| HTTP *http.Client |
| } |
| // Client calls the controller's instance routes. It is safe for concurrent |
| // use. |
| type Client struct { |
| - origin string |
| - keyID hostedwire.KeyID |
| - key ed25519.PrivateKey |
| - ctl ed25519.PublicKey |
| - http *http.Client |
| + origin string |
| + keyID hostedwire.KeyID |
| + key ed25519.PrivateKey |
| + ctl ed25519.PublicKey |
| + rt http.RoundTripper |
| + timeout time.Duration |
| } |
| // String names the controller and nothing else, so a client printed in a |
| @@ -179,16 +183,17 @@ func New(cfg Config) (*Client, error) { |
| case cfg.HTTP == nil: |
| return nil, errors.New("hostedclient: no HTTP client") |
| } |
| - hc := *cfg.HTTP |
| - // A followed redirect would resend the signed request somewhere else. |
| - // The 3xx comes back instead, unsigned, and is refused as unverified. |
| - hc.CheckRedirect = func(*http.Request, []*http.Request) error { return http.ErrUseLastResponse } |
| + rt := cfg.HTTP.Transport |
| + if rt == nil { |
| + rt = http.DefaultTransport |
| + } |
| return &Client{ |
| - origin: "https://" + u.Host, |
| - keyID: cfg.KeyID, |
| - key: bytes.Clone(cfg.Key), |
| - ctl: bytes.Clone(cfg.ControllerKey), |
| - http: &hc, |
| + origin: "https://" + u.Host, |
| + keyID: cfg.KeyID, |
| + key: bytes.Clone(cfg.Key), |
| + ctl: bytes.Clone(cfg.ControllerKey), |
| + rt: rt, |
| + timeout: cfg.HTTP.Timeout, |
| }, nil |
| } |
| @@ -324,12 +329,19 @@ func jobPath(attempt, action string) (string, error) { |
| // call sends one signed request and reads its answer into out. In order: |
| // |
| // 1. Marshal body (nil sends an empty body), sign it with a fresh nonce. |
| -// 2. Send, and read at most hostedwire.MaxBody+1 bytes of the answer. |
| +// 2. Send with one RoundTrip, so a 3xx is never followed or parsed, and |
| +// read at most hostedwire.MaxBody+1 bytes of the answer. The context, |
| +// with the HTTP client's Timeout when set, bounds both. |
| // 3. Verify the answer against this request's nonce and the controller |
| // key. Nothing about an answer that fails, status included, is used. |
| // 4. A 200 is decoded into out with hostedwire.DecodeStrict; anything else |
| // must be a strict ErrorResponse and becomes an *APIError. |
| func (c *Client) call(ctx context.Context, op, method, path string, body, out any) error { |
| + if c.timeout > 0 { |
| + var cancel context.CancelFunc |
| + ctx, cancel = context.WithTimeout(ctx, c.timeout) |
| + defer cancel() |
| + } |
| var raw []byte |
| if body != nil { |
| var err error |
| @@ -351,7 +363,10 @@ func (c *Client) call(ctx context.Context, op, method, path string, body, out an |
| if err := hostedwire.SignRequest(req, raw, c.keyID, c.key, time.Now(), nonce); err != nil { |
| return fmt.Errorf("hostedclient: %s: sign request: %w", op, err) |
| } |
| - resp, err := c.http.Do(req) |
| + // A followed redirect would resend the signed request elsewhere, and |
| + // http.Client parses Location before any redirect policy runs, so the |
| + // client never goes through http.Client.Do. |
| + resp, err := c.rt.RoundTrip(req) |
| if err != nil { |
| return fmt.Errorf("hostedclient: %s: %w", op, err) |
| } |
| @@ -361,7 +376,7 @@ func (c *Client) call(ctx context.Context, op, method, path string, body, out an |
| return fmt.Errorf("%w: %s: reading the body: %w", ErrUnverified, op, err) |
| } |
| if err := hostedwire.VerifyResponse(resp, got, nonce, c.ctl); err != nil { |
| - return fmt.Errorf("%w: %s (unverified status %d): %w", ErrUnverified, op, resp.StatusCode, err) |
| + return fmt.Errorf("%w: %s: %w", ErrUnverified, op, err) |
| } |
| if resp.StatusCode == http.StatusOK { |
| if err := hostedwire.DecodeStrict(bytes.NewReader(got), out); err != nil { |
diff --git a/internal/hostedclient/client_test.go b/internal/hostedclient/client_test.go| index bbb695df..5387dd6c 100644 |
| --- a/internal/hostedclient/client_test.go |
| +++ b/internal/hostedclient/client_test.go |
| @@ -22,6 +22,7 @@ import ( |
| "amadan.net/oficina/equipo/internal/hostedwire" |
| "amadan.net/oficina/equipo/internal/isolatedjob" |
| "amadan.net/oficina/equipo/internal/isolatedjob/isolatedjobtest" |
| + "amadan.net/oficina/equipo/internal/testci" |
| "amadan.net/rastrillo/rastrillo/budget" |
| ) |
| @@ -308,6 +309,61 @@ func TestClientRefusesUnsignedResponse(t *testing.T) { |
| if _, err := redirect.Launch(context.Background(), launchReq("a1")); !errors.Is(err, ErrUnverified) || hits.Load() != 0 { |
| t.Fatalf("launch answered by a redirect = %v with %d hits elsewhere, want ErrUnverified and none", err, hits.Load()) |
| } |
| + |
| + // A redirect whose Location does not parse is still verified first: |
| + // unsigned, it is ErrUnverified with nothing of the answer in the error, |
| + // and only one request is sent. Signed, it is an unexpected answer. |
| + for _, signed := range []bool{false, true} { |
| + var sent atomic.Int32 |
| + bad := newClient(t, fakeCtl(t, func(w http.ResponseWriter, nonce string) { |
| + sent.Add(1) |
| + w.Header().Set("Location", "%") |
| + if signed { |
| + signedAnswer(w, http.StatusTemporaryRedirect, nil, nonce, keyCtl) |
| + return |
| + } |
| + w.WriteHeader(http.StatusTemporaryRedirect) |
| + }), keyInst, ctlPublic()) |
| + _, err := bad.Launch(context.Background(), launchReq("a1")) |
| + want := ErrUnverified |
| + if signed { |
| + want = ErrUnexpected |
| + } |
| + if !errors.Is(err, want) || sent.Load() != 1 { |
| + t.Fatalf("redirect to %%, signed %v: Launch = %v after %d requests, want %v after 1", signed, err, sent.Load(), want) |
| + } |
| + if msg := err.Error(); !signed && (strings.Contains(msg, "%") || strings.Contains(msg, "307") || |
| + strings.Contains(msg, "redirect") || strings.Contains(msg, "Location")) { |
| + t.Fatalf("unsigned redirect error %q holds text from the answer", msg) |
| + } |
| + } |
| +} |
| + |
| +// TestClientHonoursTimeoutAndCancel: the HTTP client's Timeout and the |
| +// caller's context both bound a call to a controller that never answers. |
| +func TestClientHonoursTimeoutAndCancel(t *testing.T) { |
| + srv := serveTLS(t, http.HandlerFunc(func(_ http.ResponseWriter, r *http.Request) { |
| + select { |
| + case <-r.Context().Done(): |
| + case <-time.After(3 * time.Second): |
| + } |
| + })) |
| + t.Setenv(FlagEnv, "1") |
| + slow, err := New(Config{BaseURL: srv.URL, KeyID: idInst, Key: keyInst, ControllerKey: ctlPublic(), |
| + HTTP: &http.Client{Transport: srv.Client().Transport, Timeout: 100 * time.Millisecond}}) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + start := time.Now() |
| + if _, err := slow.Get(context.Background(), "a1"); !errors.Is(err, context.DeadlineExceeded) || time.Since(start) > 2*time.Second { |
| + t.Fatalf("Get past the HTTP timeout = %v after %v, want context.DeadlineExceeded within 2 s", err, time.Since(start)) |
| + } |
| + ctx, cancel := context.WithCancel(context.Background()) |
| + time.AfterFunc(100*time.Millisecond, cancel) |
| + start = time.Now() |
| + if _, err := newClient(t, srv, keyInst, ctlPublic()).Get(ctx, "a1"); !errors.Is(err, context.Canceled) || time.Since(start) > 2*time.Second { |
| + t.Fatalf("Get with a cancelled context = %v after %v, want context.Canceled within 2 s", err, time.Since(start)) |
| + } |
| } |
| // TestSignedAnswersMapToKinds: a signed refusal is the controller's word and |
| @@ -318,7 +374,6 @@ func TestSignedAnswersMapToKinds(t *testing.T) { |
| b, _ := json.Marshal(hostedwire.ErrorResponse{Code: code, Message: "fixed text"}) |
| return b |
| } |
| - other, _ := json.Marshal(hostedwire.JobView{AttemptID: "a9", State: "running", VMRef: "vm-9"}) |
| for _, c := range []struct { |
| name string |
| status int |
| @@ -334,8 +389,6 @@ func TestSignedAnswersMapToKinds(t *testing.T) { |
| {"code and status disagree", http.StatusConflict, refusal("disabled"), ErrUnexpected}, |
| {"unknown code", http.StatusTeapot, refusal("teapot"), ErrUnexpected}, |
| {"refusal body not strict", http.StatusConflict, []byte(`{"code":"conflict","message":"x","extra":1}`), ErrUnexpected}, |
| - {"success body not strict", http.StatusOK, []byte(`{"attempt_id":"a1","bogus":true}`), ErrBadResponse}, |
| - {"success for another attempt", http.StatusOK, other, ErrBadResponse}, |
| } { |
| cl := newClient(t, fakeCtl(t, func(w http.ResponseWriter, nonce string) { |
| signedAnswer(w, c.status, c.body, nonce, keyCtl) |
| @@ -345,18 +398,87 @@ func TestSignedAnswersMapToKinds(t *testing.T) { |
| t.Fatalf("%s: Get = %+v, %v; want nothing and %v", c.name, v, err, c.want) |
| } |
| } |
| +} |
| + |
| +// TestClientMatchesHandlerErrorCodes holds the client to the handler's own |
| +// list of refusals: every status and code the handler can send maps to a |
| +// typed kind, and the client knows no code the handler does not send. |
| +func TestClientMatchesHandlerErrorCodes(t *testing.T) { |
| + handler := map[string]int{} |
| + for _, ec := range hostedctl.ErrorCodes() { |
| + if s, dup := handler[ec.Code]; dup { |
| + t.Fatalf("handler code %q has statuses %d and %d", ec.Code, s, ec.Status) |
| + } |
| + handler[ec.Code] = ec.Status |
| + body, _ := json.Marshal(hostedwire.ErrorResponse{Code: ec.Code, Message: "m"}) |
| + err := refusal("get", ec.Status, body) |
| + var api *APIError |
| + if !errors.As(err, &api) || api.Kind == nil || errors.Is(err, ErrUnexpected) { |
| + t.Errorf("handler refusal %d %q maps to %v, want a typed kind", ec.Status, ec.Code, err) |
| + } |
| + } |
| + if len(handler) < 20 { |
| + t.Fatalf("hostedctl.ErrorCodes lists %d codes; the handler has more", len(handler)) |
| + } |
| + for code, r := range refusals { |
| + if s, ok := handler[code]; !ok || s != r.status { |
| + t.Errorf("client maps %d %q, which the handler does not send", r.status, code) |
| + } |
| + } |
| +} |
| - // A signed stop proof must be for the attempt asked about and terminal. |
| - for _, p := range []hostedwire.StopProof{ |
| - {AttemptID: "a9", VMRef: "vm-1", State: isolatedjob.StateStopped}, |
| - {AttemptID: "a1", VMRef: "vm-1", State: isolatedjob.StateRunning}, |
| +// TestSignedSuccessMustFit: a signed 200 that is not the route's strict |
| +// JSON, or does not answer the request asked, is ErrBadResponse. One case |
| +// per guard. |
| +func TestSignedSuccessMustFit(t *testing.T) { |
| + ctx := context.Background() |
| + for _, c := range []struct { |
| + name string |
| + body string |
| + call func(cl *Client) (any, error) |
| + }{ |
| + {"launch view for another attempt", `{"attempt_id":"a9","state":"starting","vm_ref":"vm-1"}`, |
| + func(cl *Client) (any, error) { return cl.Launch(ctx, launchReq("a1")) }}, |
| + {"get view for another attempt", `{"attempt_id":"a9","state":"running"}`, |
| + func(cl *Client) (any, error) { return cl.Get(ctx, "a1") }}, |
| + {"get view with an unknown field", `{"attempt_id":"a1","bogus":true}`, |
| + func(cl *Client) (any, error) { return cl.Get(ctx, "a1") }}, |
| + {"stop proof for another attempt", `{"attempt_id":"a9","vm_ref":"vm-1","state":"stopped","observed_at_ns":1}`, |
| + func(cl *Client) (any, error) { return cl.Stop(ctx, "a1", "done") }}, |
| + {"stop proof not terminal", `{"attempt_id":"a1","vm_ref":"vm-1","state":"running","observed_at_ns":1}`, |
| + func(cl *Client) (any, error) { return cl.Stop(ctx, "a1", "done") }}, |
| + {"drain generation 0", `{"generation":0}`, |
| + func(cl *Client) (any, error) { return cl.Drain(ctx, "a1") }}, |
| + {"quiescent for another generation", `{"generation":7}`, |
| + func(cl *Client) (any, error) { return nil, cl.Quiescent(ctx, "a1", 1) }}, |
| + {"suspend for another generation", `{"generation":7}`, |
| + func(cl *Client) (any, error) { return nil, cl.Suspend(ctx, "a1", 1) }}, |
| + {"reopen for another generation", `{"generation":7}`, |
| + func(cl *Client) (any, error) { return nil, cl.Reopen(ctx, "a1", 1) }}, |
| + {"resume epoch 0", `{"epoch":0}`, |
| + func(cl *Client) (any, error) { return cl.Resume(ctx, "a1", "op-1") }}, |
| } { |
| - body, _ := json.Marshal(p) |
| cl := newClient(t, fakeCtl(t, func(w http.ResponseWriter, nonce string) { |
| - signedAnswer(w, http.StatusOK, body, nonce, keyCtl) |
| + signedAnswer(w, http.StatusOK, []byte(c.body), nonce, keyCtl) |
| }), keyInst, ctlPublic()) |
| - if got, err := cl.Stop(context.Background(), "a1", "done"); !errors.Is(err, ErrBadResponse) || got != (hostedwire.StopProof{}) { |
| - t.Fatalf("Stop answered with proof %+v = %+v, %v; want nothing and ErrBadResponse", p, got, err) |
| + got, err := c.call(cl) |
| + if !errors.Is(err, ErrBadResponse) { |
| + t.Errorf("%s: = %+v, %v; want ErrBadResponse", c.name, got, err) |
| + continue |
| + } |
| + switch v := got.(type) { |
| + case hostedwire.JobView: |
| + if v != (hostedwire.JobView{}) { |
| + t.Errorf("%s: returned %+v with the error, want nothing", c.name, v) |
| + } |
| + case hostedwire.StopProof: |
| + if v != (hostedwire.StopProof{}) { |
| + t.Errorf("%s: returned %+v with the error, want nothing", c.name, v) |
| + } |
| + case int64: |
| + if v != 0 { |
| + t.Errorf("%s: returned %d with the error, want 0", c.name, v) |
| + } |
| } |
| } |
| } |
| @@ -433,9 +555,18 @@ func TestInstanceDoesNotCallHostedClient(t *testing.T) { |
| t.Fatalf("go not on PATH: %v", err) |
| } |
| const instance = "amadan.net/oficina/equipo/cmd/equipo" |
| - out, err := exec.Command(gobin, "list", "-deps", instance).Output() |
| + ctx, cancel := context.WithTimeout(context.Background(), 8*time.Second) |
| + defer cancel() |
| + cmd := exec.CommandContext(ctx, gobin, "list", "-deps", instance) |
| + // The child reads cmd/equipo's source, which go test does not see: |
| + // declare it, so adding the import reruns this test instead of |
| + // replaying a cached pass. |
| + testci.GoCommand(t, cmd) |
| + var stderr bytes.Buffer |
| + cmd.Stderr = &stderr |
| + out, err := cmd.Output() |
| if err != nil { |
| - t.Fatalf("go list -deps %s: %v", instance, err) |
| + t.Fatalf("go list -deps %s: %v\n%s", instance, err, stderr.Bytes()) |
| } |
| deps := strings.Fields(string(out)) |
| var self bool |
diff --git a/internal/hostedctl/http.go b/internal/hostedctl/http.go| index 89586691..9e0790bb 100644 |
| --- a/internal/hostedctl/http.go |
| +++ b/internal/hostedctl/http.go |
| @@ -100,6 +100,28 @@ var apiErrors = []apiError{ |
| // errInternal answers every error apiErrors does not name. |
| var errInternal = apiError{status: http.StatusInternalServerError, code: "internal", msg: "The controller failed. Try again later."} |
| +// ErrorCode is one status and code pair the API may answer a refusal with. |
| +type ErrorCode struct { |
| + Status int |
| + Code string |
| +} |
| + |
| +// ErrorCodes lists every status and code pair of apiErrors and |
| +// errInternal, each once, in table order. It returns a new slice, so |
| +// clients can test their own mapping against the handler's. |
| +func ErrorCodes() []ErrorCode { |
| + var out []ErrorCode |
| + seen := map[ErrorCode]bool{} |
| + for _, a := range append(apiErrors[:len(apiErrors):len(apiErrors)], errInternal) { |
| + ec := ErrorCode{Status: a.status, Code: a.code} |
| + if !seen[ec] { |
| + seen[ec] = true |
| + out = append(out, ec) |
| + } |
| + } |
| + return out |
| +} |
| + |
| // lookupError returns how err is answered. |
| func lookupError(err error) apiError { |
| for _, a := range apiErrors { |