oficina / equipo Public

hosted controller: sign verified refusals, drain on shutdown

Review round 1 of Task 15 and ruling R25. A replay or a nonce-store
failure comes after the signature verified, so its refusal is now signed
for the request's nonce; only requests with no valid signature get the
unsigned 401. HEAD responses sign the empty body actually sent. Both
servers hand OPTIONS * to the handler. On shutdown the servers drain,
remaining request contexts are cancelled, serve waits for every handler,
and only then stops the reaper, which has its own lifetime; the store
closes after that.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 6f56b7f7d6cbae13751853bb4fb54b1ba2bc27fd parent 1812c05
5 files changed, +435 −33
  • cmd/equipo-hosted-controller/main.go +97 −20
  • cmd/equipo-hosted-controller/main_test.go +248 −0
  • docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md +26 −0
  • internal/hostedctl/http.go +32 −12
  • internal/hostedctl/http_test.go +32 −1

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.8s
ci-box: codex: fetched and verified in 4.6s
ci-box: codex-code-mode-host: fetched and verified in 1.6s
ci-box: libwrap: fetched and verified in 0.3s
ci-box: socat: fetched and verified in 0.4s
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
ci-box: image pulled in 9.9s
ci-box: pi: installed and verified in 7.4s
ci-box: opencode: installed and verified in 2.3s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 9.4s
ci-box: clone deepened in 3.5s
ci-box: file times set from content: 2896 files, 194 directories
ci-box: ready in 18.2s
=== 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/credentials v1.21.3
go: downloading github.com/aws/aws-sdk-go-v2/service/ssooidc v1.44.5
go: downloading github.com/aws/aws-sdk-go-v2/service/sso v1.39.5
go: downloading github.com/aws/aws-sdk-go-v2/service/signin v1.14.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/service/sts v1.53.0
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.808s 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 1m20.184s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m20.18s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 33.86, cpu waiting 21.98%, memory waiting 0.00%, io waiting 0.48%
--- 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.529s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m21.734s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m21.73s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 33.86, cpu waiting 21.98%, memory waiting 0.00%, io waiting 0.48%
--- 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.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 1m22.92s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m12.33s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 5.81s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 4.78s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 32.75, cpu waiting 21.49%, memory waiting 0.00%, io waiting 0.47%
--- 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.716s 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.105s amadan.net/oficina/equipo/internal/headless
receipt: slow test 37.57s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 20.47s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 10.51s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
receipt: slow test 9.56s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
machine: 32 CPUs, load 33.86, cpu waiting 22.32%, memory waiting 0.00%, io waiting 0.50%
--- 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.76s 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.116s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m0.4s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 11.01s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 9.97s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 8.86s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 5.87s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
machine: 32 CPUs, load 29.77, cpu waiting 17.92%, memory waiting 0.00%, io waiting 0.38%
--- 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 3m9.646s 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 3m7.548s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m44.45s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistant
receipt: slow test 24.36s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 11.61s amadan.net/oficina/equipo/internal/headless TestHeadlessResearchHandoff
receipt: slow test 8.18s amadan.net/oficina/equipo/internal/headless TestHeadlessClaudeSignIn
receipt: slow test 7.38s amadan.net/oficina/equipo/internal/headless TestHeadlessBatchAfterRefusedReply
machine: 32 CPUs, load 9.77, cpu waiting 3.90%, memory waiting 0.00%, io waiting 0.10%
--- 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.083s 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 1.65, cpu waiting 0.19%, memory waiting 0.00%, io waiting 1.92%
--- 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.144s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1m26.784s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 9.08s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 5.03s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotOffered
receipt: slow test 4.41s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
receipt: slow test 2.4s amadan.net/oficina/equipo/internal/thintest TestContractPreview
receipt: slow test 2.34s amadan.net/oficina/equipo/internal/thintest TestContractPublishNameTaken
machine: 32 CPUs, load 1.65, cpu waiting 0.19%, memory waiting 0.00%, io waiting 1.92%
--- 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.812s 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.68s amadan.net/oficina/equipo/internal/runner
receipt: slow test 25.65s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.03s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 31.26, cpu waiting 21.45%, memory waiting 0.00%, io waiting 0.89%
--- 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.616s 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.706s amadan.net/oficina/equipo/internal/runner
receipt: slow test 35.77s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 31.09s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.39s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.54s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 31.26, cpu waiting 21.45%, memory waiting 0.00%, io waiting 0.89%
--- 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.276s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 34.418s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.11s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.69s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.12s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 2.25s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 1.6s amadan.net/oficina/equipo/internal/runner TestCoordinatorTransientRefusalKeepsServing
machine: 32 CPUs, load 22.74, cpu waiting 14.62%, memory waiting 0.00%, io waiting 1.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.5%, load 17.67
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.296s 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.497s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 26.43s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 26.43s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 24.32s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 21.85s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
receipt: slow test 21.67s amadan.net/oficina/equipo/internal/equipotest TestAuthoritySnapshotChanges
machine: 32 CPUs, load 31.49, cpu waiting 18.50%, memory waiting 0.00%, io waiting 0.39%
--- 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.5%, load 17.67
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.362s 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 17.67, cpu waiting 11.49%, memory waiting 0.00%, io waiting 1.16%
--- shard 14 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-r started 30s late; cpu waiting 28.6%, load 17.67
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 1m16.11s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m4.171s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 14.86s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 12.96s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 9.93s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 9.9s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 6.85s amadan.net/oficina/equipo/internal/equipotest TestRosterBootstrapOnce
machine: 32 CPUs, load 25.73, cpu waiting 15.18%, memory waiting 0.00%, io waiting 0.32%
--- 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.5%, load 17.67
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 499ms 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 17.67, cpu waiting 11.49%, memory waiting 0.00%, io waiting 1.16%
--- 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 28.6%, load 17.67
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 525ms 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 17.67, cpu waiting 11.49%, memory waiting 0.00%, io waiting 1.16%
--- shard 17 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: rest started 30s late; cpu waiting 28.6%, load 17.67
test lane rest: ./cmd/equipo ./cmd/equipo-hosted-controller ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/push ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/hostedclient ./internal/hostedctl ./internal/hostedwire ./internal/idtest ./internal/isolatedjob ./internal/isolatedjob/awsjob ./internal/isolatedjob/guardfixture ./internal/isolatedjob/isolatedjobtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./cmd/equipo ./cmd/equipo-hosted-controller ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/push ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/hostedclient ./internal/hostedctl ./internal/hostedwire ./internal/idtest ./internal/isolatedjob ./internal/isolatedjob/awsjob ./internal/isolatedjob/guardfixture ./internal/isolatedjob/isolatedjobtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
cache miss: amadan.net/oficina/equipo/internal/copydesk: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/isolatedjob: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/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/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/hostedctl TestReapLoopRunsPassesUntilDone
=== RUN   TestReapLoopRunsPassesUntilDone
=== PAUSE TestReapLoopRunsPassesUntilDone
=== CONT  TestReapLoopRunsPassesUntilDone
    reaper_test.go:639: read unmatched_vms = hostedctl: begin: SQL logic error: cannot start a transaction within a transaction (1)
--- FAIL: TestReapLoopRunsPassesUntilDone (0.13s)

--- FAIL amadan.net/oficina/equipo/internal/hostedctl (package output)
FAIL
rastrillo-budget/v1 ran 13.438s
FAIL	amadan.net/oficina/equipo/internal/hostedctl	13.458s

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 38.905s, over the 15s its record on line 40 allows; reported only, timing fails on CI

receipt: test step 2m15.996s 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.903s amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow package 51.471s amadan.net/oficina/equipo/internal/runner/provider/pi
receipt: slow package 45.275s amadan.net/oficina/equipo/internal/equipo
receipt: slow package 39.84s amadan.net/oficina/equipo/internal/idtest
receipt: slow package 38.905s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 21.95s amadan.net/oficina/equipo/internal/runner/provider/opencode TestOpenCodeAcceptanceHostileRepository
rastrillo: budget test: go test failed
receipt: slow test 14.96s amadan.net/oficina/equipo/internal/runner/containment TestEngineeringOfflineGo
receipt: slow test 12.15s 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
exit status 1
+ go test -tags testbuild -timeout 15m -v -run '^TestReapLoopRunsPassesUntilDone$' -count=1 ./internal/hostedctl   (retry, once)
##############################################################################
FLAKE ./internal/hostedctl:TestReapLoopRunsPassesUntilDone rest 6f56b7f7d6cbae13751853bb4fb54b1ba2bc27fd 0.13s 11.51
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 11.51, cpu waiting 5.63%, memory waiting 0.00%, io waiting 0.11%
--- shard 18 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-chat: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m22.74s 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.347s amadan.net/oficina/equipo/internal/headless
receipt: slow test 37.38s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 15.32s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 10.6s amadan.net/oficina/equipo/internal/headless TestBrowserChat
receipt: slow test 7.76s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 5.78s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
machine: 32 CPUs, load 32.75, cpu waiting 21.49%, memory waiting 0.00%, io waiting 0.47%
--- 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.465s 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.747s amadan.net/oficina/equipo/internal/headless
receipt: slow test 26.59s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 22.8s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 14.23s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 10.26s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
receipt: slow test 8.06s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
machine: 32 CPUs, load 29.77, cpu waiting 18.50%, memory waiting 0.00%, io waiting 0.39%
--- 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.236s 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.665s amadan.net/oficina/equipo/internal/headless
receipt: slow test 14.01s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 13.16s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 13.02s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 10.34s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
receipt: slow test 10.06s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsOpenCodeGoLimitRequired
machine: 32 CPUs, load 27.71, cpu waiting 16.77%, memory waiting 0.00%, io waiting 0.36%
--- 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
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserEmptyExplore
=== RUN   TestBrowserEmptyExplore
time=2026-11-22T19:56:06.493Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-22T19:56:06.493Z level=INFO msg="startup phase done" phase=state_lock took=60µs
time=2026-11-22T19:56:06.493Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-22T19:56:06.493Z level=INFO msg="startup phase done" phase=claim_roots took=102µs
time=2026-11-22T19:56:06.493Z level=INFO msg="startup phase" phase=sweep
time=2026-11-22T19:56:06.522Z level=INFO msg="startup phase done" phase=sweep took=28.853ms
time=2026-11-22T19:56:06.522Z level=INFO msg="startup phase" phase=credentials
time=2026-11-22T19:56:06.522Z level=INFO msg="startup phase done" phase=credentials took=128µs
time=2026-11-22T19:56:06.522Z level=INFO msg="startup phase" phase=open_state
time=2026-11-22T19:56:06.564Z level=INFO msg="startup phase done" phase=open_state took=41.868ms
time=2026-11-22T19:56:06.564Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-22T19:56:06.566Z level=INFO msg=connecting host=127.0.0.1:45531 protocol=28
time=2026-11-22T19:56:06.567Z level=INFO msg=connected host=127.0.0.1:45531 took=1.017ms
time=2026-11-22T19:56:06.568Z level=INFO msg="capabilities gathering"
time=2026-11-22T19:56:06.568Z level=INFO msg="capabilities gathered" took=441µs tags=linux,claude,go
time=2026-11-22T19:56:06.569Z level=INFO msg="hello sent" protocol=28
time=2026-11-22T19:56:06.586Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-22T19:56:07.616Z 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: <nil>)
--- FAIL: TestBrowserEmptyExplore (5.88s)

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


receipt: test step 1m28.953s 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.496s amadan.net/oficina/equipo/internal/headless
receipt: slow test 15.13s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
receipt: slow test 11.75s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 10.42s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 10.41s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 8s amadan.net/oficina/equipo/internal/headless TestBrowserRefreshRace
rastrillo: budget test: go test failed
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 6f56b7f7d6cbae13751853bb4fb54b1ba2bc27fd 5.88s 31.49
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 27.71, cpu waiting 17.34%, memory waiting 0.00%, io waiting 0.37%
--- shard 22 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-rest: ./internal/equipo
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserPreviewBlocksNavigation)$' ./internal/equipo

receipt: test step 1.019s 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 839ms 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 201ms 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.045s 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 4.24, cpu waiting 1.77%, memory waiting 0.00%, io waiting 1.80%
--- 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.29s
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.85s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 24.71s
+ 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 13.00s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 14.48s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 20.52s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 13.26s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless   (22s)
ok ./internal/headless TestMixedVersions 20.10s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks   (1s)
ok ./internal/runner/checks TestCheckSandboxDeniedPathsTampering 0.77s
+ 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 33.77, cpu waiting 22.81%, memory waiting 0.00%, io waiting 0.66%
--- 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.493s 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.252s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 152ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 81ms amadan.net/oficina/equipo/internal/runner/provider/codex
receipt: slow package 2ms amadan.net/oficina/equipo/internal/runner/provider
receipt: slow package 1ms amadan.net/oficina/equipo/internal/runner/provider/gotoolchain
receipt: slow test 5.14s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.72s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 290ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 150ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 90ms 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 2.954s 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.645s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 280ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 170ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 100ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryCleansScratch
receipt: slow test 90ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceExitStatus
machine: 32 CPUs, load 5.27, cpu waiting 4.27%, memory waiting 0.00%, io waiting 1.63%
--- shard 25 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: runner-dead-references started 30s late; cpu waiting 28.6%, load 17.67
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.515s
machine: 32 CPUs, load 31.26, cpu waiting 20.72%, memory waiting 0.00%, io waiting 0.92%
--- 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.5%, load 17.67
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 17.67, cpu waiting 12.85%, memory waiting 0.00%, io waiting 1.12%
--- 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.5%, load 17.67
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 22.74, cpu waiting 16.14%, memory waiting 0.00%, io waiting 1.05%
--- 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.5%, load 17.67
shard 28: make gitleaks
7:55PM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
7:55PM INF 1132 commits scanned.
7:55PM INF scanned ~62118745 bytes (62.12 MB) in 14.2s
7:55PM INF no leaks found
machine: 32 CPUs, load 29.89, cpu waiting 20.72%, memory waiting 0.00%, io waiting 0.92%
diff --git a/cmd/equipo-hosted-controller/main.go b/cmd/equipo-hosted-controller/main.go
index f47ae9a5..27e77e22 100644
--- a/cmd/equipo-hosted-controller/main.go
+++ b/cmd/equipo-hosted-controller/main.go
@@ -20,6 +20,7 @@ import (
"net/http"
"os"
"os/signal"
+ "sync"
"syscall"
"time"
@@ -103,26 +104,52 @@ func run(path string) error {
if err != nil {
return err
}
- apiSrv := &http.Server{
- Handler: api,
- TLSConfig: &tls.Config{MinVersion: tls.VersionTLS12, Certificates: []tls.Certificate{cert}},
- ReadHeaderTimeout: 10 * time.Second, ReadTimeout: 30 * time.Second,
+ log.Printf("equipo-hosted-controller: API on %s, metrics on %s, launches enabled: %v", cfg.listen, cfg.metricsListen, cfg.ctl.Enabled)
+ return serve(ctx, c, newAPIServer(api, cert), apiLn, newMetricsServer(metrics.Handler(c)), metricsLn, shutdownTimeout)
+}
+
+// newAPIServer is the HTTPS API server. DisableGeneralOptionsHandler hands
+// "OPTIONS *" to the API handler, which verifies it like any request,
+// instead of Go answering it unsigned.
+func newAPIServer(api http.Handler, cert tls.Certificate) *http.Server {
+ return &http.Server{
+ Handler: api,
+ DisableGeneralOptionsHandler: true,
+ TLSConfig: &tls.Config{MinVersion: tls.VersionTLS12, Certificates: []tls.Certificate{cert}},
+ ReadHeaderTimeout: 10 * time.Second, ReadTimeout: 30 * time.Second,
// A launch or stop waits on the provider (up to
// hostedctl.ProviderLaunchTimeout), so writes get longer.
WriteTimeout: 2 * time.Minute, IdleTimeout: 2 * time.Minute, MaxHeaderBytes: 64 << 10,
}
- metricsSrv := &http.Server{Handler: metrics.Handler(c),
+}
+
+func newMetricsServer(h http.Handler) *http.Server {
+ return &http.Server{Handler: h, DisableGeneralOptionsHandler: true,
ReadHeaderTimeout: 10 * time.Second, ReadTimeout: 10 * time.Second, WriteTimeout: 30 * time.Second}
- log.Printf("equipo-hosted-controller: API on %s, metrics on %s, launches enabled: %v", cfg.listen, cfg.metricsListen, cfg.ctl.Enabled)
- return serve(ctx, c, apiSrv, apiLn, metricsSrv, metricsLn)
}
-// serve runs the reaper loop and both servers until ctx ends or a server
-// fails, then shuts the servers down and waits for the loop.
-func serve(ctx context.Context, c *hostedctl.Controller, apiSrv *http.Server, apiLn net.Listener, metricsSrv *http.Server, metricsLn net.Listener) error {
- loopCtx, stopLoop := context.WithCancel(ctx)
- loopDone := make(chan error, 1)
- go func() { loopDone <- c.Loop(loopCtx, hostedctl.ReapInterval) }()
+// serve runs the reaper loop and both servers until ctx ends (a signal) or
+// a server fails. Then, in order: the servers stop accepting and get drain
+// to finish their requests; any request still running has its context
+// cancelled, and serve waits for every handler to return; only then is the
+// reaper, which has a lifetime of its own, stopped and joined. The caller
+// closes the store after serve returns, so no request or reaper pass ever
+// runs on a closed store. A handler that ignores its cancelled context holds
+// shutdown until it returns.
+func serve(ctx context.Context, c *hostedctl.Controller, apiSrv *http.Server, apiLn net.Listener,
+ metricsSrv *http.Server, metricsLn net.Listener, drain time.Duration) error {
+ reqCtx, cancelRequests := context.WithCancel(context.Background())
+ defer cancelRequests()
+ var active handlers
+ for _, srv := range []*http.Server{apiSrv, metricsSrv} {
+ srv.BaseContext = func(net.Listener) context.Context { return reqCtx }
+ srv.Handler = active.wrap(srv.Handler)
+ }
+
+ reapCtx, stopReaper := context.WithCancel(context.Background())
+ defer stopReaper()
+ reaperDone := make(chan error, 1)
+ go func() { reaperDone <- c.Loop(reapCtx, hostedctl.ReapInterval) }()
failed := make(chan error, 2)
go func() { failed <- fmt.Errorf("API server: %w", apiSrv.ServeTLS(apiLn, "", "")) }()
@@ -133,12 +160,62 @@ func serve(ctx context.Context, c *hostedctl.Controller, apiSrv *http.Server, ap
case <-ctx.Done():
case runErr = <-failed:
}
- shutCtx, cancel := context.WithTimeout(context.Background(), shutdownTimeout)
- defer cancel()
- err := errors.Join(apiSrv.Shutdown(shutCtx), metricsSrv.Shutdown(shutCtx))
- stopLoop()
- if lerr := <-loopDone; lerr != nil {
- log.Printf("equipo-hosted-controller: last reaper pass: %v", lerr)
+ drainCtx, cancel := context.WithTimeout(context.Background(), drain)
+ if err := errors.Join(apiSrv.Shutdown(drainCtx), metricsSrv.Shutdown(drainCtx)); err != nil {
+ log.Printf("equipo-hosted-controller: requests still running after %v; cancelling them: %v", drain, err)
+ }
+ cancel()
+ cancelRequests()
+ active.closeAndWait()
+ stopReaper()
+ if err := <-reaperDone; err != nil {
+ log.Printf("equipo-hosted-controller: last reaper pass: %v", err)
+ }
+ return runErr
+}
+
+// handlers counts running request handlers. After closeAndWait begins, a
+// request that still reaches a handler (a race with Shutdown) gets an
+// unsigned 503 and never touches the controller.
+type handlers struct {
+ mu sync.Mutex
+ n int
+ closed bool
+ idle chan struct{} // closed when closed and n is 0
+}
+
+func (a *handlers) wrap(next http.Handler) http.Handler {
+ return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ a.mu.Lock()
+ if a.closed {
+ a.mu.Unlock()
+ w.WriteHeader(http.StatusServiceUnavailable)
+ return
+ }
+ a.n++
+ a.mu.Unlock()
+ defer a.leave()
+ next.ServeHTTP(w, r)
+ })
+}
+
+func (a *handlers) leave() {
+ a.mu.Lock()
+ defer a.mu.Unlock()
+ a.n--
+ if a.closed && a.n == 0 {
+ close(a.idle)
+ }
+}
+
+// closeAndWait refuses new handlers and waits for the running ones.
+func (a *handlers) closeAndWait() {
+ a.mu.Lock()
+ a.closed, a.idle = true, make(chan struct{})
+ if a.n == 0 {
+ close(a.idle)
}
- return errors.Join(runErr, err)
+ idle := a.idle
+ a.mu.Unlock()
+ <-idle
}
diff --git a/cmd/equipo-hosted-controller/main_test.go b/cmd/equipo-hosted-controller/main_test.go
new file mode 100644
index 00000000..0e943374
--- /dev/null
+++ b/cmd/equipo-hosted-controller/main_test.go
@@ -0,0 +1,248 @@
+package main
+
+import (
+ "bytes"
+ "context"
+ "crypto/ed25519"
+ "crypto/rand"
+ "crypto/tls"
+ "crypto/x509"
+ "encoding/json"
+ "io"
+ "math/big"
+ "net"
+ "net/http"
+ "path/filepath"
+ "sync"
+ "sync/atomic"
+ "testing"
+ "time"
+
+ "amadan.net/oficina/equipo/internal/hostedctl"
+ "amadan.net/oficina/equipo/internal/hostedwire"
+ "amadan.net/oficina/equipo/internal/isolatedjob"
+ "amadan.net/oficina/equipo/internal/isolatedjob/isolatedjobtest"
+)
+
+var (
+ instKey = ed25519.NewKeyFromSeed(bytes.Repeat([]byte{1}, ed25519.SeedSize))
+ ctlKey = ed25519.NewKeyFromSeed(bytes.Repeat([]byte{4}, ed25519.SeedSize))
+)
+
+const instID hostedwire.KeyID = "inst-1"
+
+// testCtl is a controller over a fresh store and the isolatedjob Fake, with
+// a passing network audit and its API handler.
+type testCtl struct {
+ c *hostedctl.Controller
+ store *hostedctl.Store
+ api http.Handler
+ clk *isolatedjobtest.FakeClock
+}
+
+type nopAlerter struct{}
+
+func (nopAlerter) Alert(context.Context, hostedctl.Alert) error { return nil }
+
+// newTestCtl builds the controller; wrap, when set, wraps the Fake as the
+// runner the controller calls.
+func newTestCtl(t *testing.T, wrap func(*isolatedjob.Fake) isolatedjob.Runner) *testCtl {
+ t.Helper()
+ ctx := context.Background()
+ clk := isolatedjobtest.NewFakeClock(time.Date(2026, 11, 22, 12, 0, 0, 0, time.UTC))
+ fake := isolatedjob.NewFake(clk, isolatedjob.SpikeLimits())
+ var run isolatedjob.Runner = fake
+ if wrap != nil {
+ run = wrap(fake)
+ }
+ store, err := hostedctl.Open(ctx, filepath.Join(t.TempDir(), "hosted.db"), clk)
+ if err != nil {
+ t.Fatal(err)
+ }
+ t.Cleanup(func() { _ = store.Close() })
+ c, err := hostedctl.New(hostedctl.Config{Enabled: true, Images: map[isolatedjob.ImageDigest]bool{testDigest: true}},
+ hostedctl.Deps{Store: store, Runner: run, Auditor: fake, Alerter: nopAlerter{}})
+ if err != nil {
+ t.Fatal(err)
+ }
+ if err := c.RunAudit(ctx); err != nil {
+ t.Fatal(err)
+ }
+ keys := map[hostedwire.KeyID]hostedwire.VerifyKey{instID: {Public: instKey.Public().(ed25519.PublicKey), Role: hostedwire.RoleInstance}}
+ api, err := c.Handler(hostedctl.HandlerConfig{Keys: keys, Signing: ctlKey, Wall: clk.Wall})
+ if err != nil {
+ t.Fatal(err)
+ }
+ return &testCtl{c: c, store: store, api: api, clk: clk}
+}
+
+// testTLS returns a certificate for 127.0.0.1 and a client that trusts it.
+func testTLS(t *testing.T) (tls.Certificate, *http.Client) {
+ t.Helper()
+ pub, priv, err := ed25519.GenerateKey(rand.Reader)
+ if err != nil {
+ t.Fatal(err)
+ }
+ tmpl := &x509.Certificate{SerialNumber: big.NewInt(1), NotBefore: time.Now().Add(-time.Hour),
+ NotAfter: time.Now().Add(time.Hour), IPAddresses: []net.IP{net.IPv4(127, 0, 0, 1)}}
+ der, err := x509.CreateCertificate(rand.Reader, tmpl, tmpl, pub, priv)
+ if err != nil {
+ t.Fatal(err)
+ }
+ leaf, err := x509.ParseCertificate(der)
+ if err != nil {
+ t.Fatal(err)
+ }
+ pool := x509.NewCertPool()
+ pool.AddCert(leaf)
+ client := &http.Client{Timeout: 10 * time.Second, Transport: &http.Transport{TLSClientConfig: &tls.Config{RootCAs: pool}}}
+ return tls.Certificate{Certificate: [][]byte{der}, PrivateKey: priv}, client
+}
+
+func listen(t *testing.T) net.Listener {
+ t.Helper()
+ ln, err := net.Listen("tcp", "127.0.0.1:0")
+ if err != nil {
+ t.Fatal(err)
+ }
+ return ln
+}
+
+var nonceSeq atomic.Int64
+
+// sign signs req for body as instKey at the controller's wall time and
+// returns the nonce.
+func (tc *testCtl) sign(t *testing.T, req *http.Request, body []byte) string {
+ t.Helper()
+ nonce := "main-test-nonce-" + time.Now().Format("150405") + "-" + big.NewInt(nonceSeq.Add(1)).String()
+ if err := hostedwire.SignRequest(req, body, instID, instKey, tc.clk.Wall(), nonce); err != nil {
+ t.Fatal(err)
+ }
+ return nonce
+}
+
+func readAll(t *testing.T, resp *http.Response) []byte {
+ t.Helper()
+ defer resp.Body.Close()
+ b, err := io.ReadAll(resp.Body)
+ if err != nil {
+ t.Fatal(err)
+ }
+ return b
+}
+
+// TestOptionsStarVerified: the API server hands OPTIONS * to the signed
+// handler, not to Go's built-in answer.
+func TestOptionsStarVerified(t *testing.T) {
+ t.Parallel()
+ tc := newTestCtl(t, nil)
+ cert, client := testTLS(t)
+ srv := newAPIServer(tc.api, cert)
+ ln := listen(t)
+ go func() { _ = srv.ServeTLS(ln, "", "") }()
+ t.Cleanup(func() { _ = srv.Close() })
+ base := "https://" + ln.Addr().String()
+
+ star := func() *http.Request {
+ req, err := http.NewRequest(http.MethodOptions, base, nil)
+ if err != nil {
+ t.Fatal(err)
+ }
+ req.URL.Path = "*"
+ return req
+ }
+ resp, err := client.Do(star())
+ if err != nil {
+ t.Fatal(err)
+ }
+ body := readAll(t, resp)
+ if resp.StatusCode != http.StatusUnauthorized || resp.Header.Get(hostedwire.HeaderSignature) != "" {
+ t.Fatalf("unsigned OPTIONS * = %d %q (signature %q), want an unsigned 401", resp.StatusCode, body, resp.Header.Get(hostedwire.HeaderSignature))
+ }
+
+ req := star()
+ nonce := tc.sign(t, req, nil)
+ resp, err = client.Do(req)
+ if err != nil {
+ t.Fatal(err)
+ }
+ body = readAll(t, resp)
+ if resp.StatusCode != http.StatusNotFound ||
+ hostedwire.VerifyResponse(resp, body, nonce, ctlKey.Public().(ed25519.PublicKey)) != nil {
+ t.Fatalf("signed OPTIONS * = %d %q, want a signed 404", resp.StatusCode, body)
+ }
+}
+
+// blockingRunner holds every Launch until its context ends, then takes a
+// while more to return, like a provider call settling.
+type blockingRunner struct {
+ *isolatedjob.Fake
+ once sync.Once
+ entered chan struct{}
+}
+
+func (b *blockingRunner) Launch(ctx context.Context, _ isolatedjob.LaunchSpec) (isolatedjob.Ref, error) {
+ b.once.Do(func() { close(b.entered) })
+ <-ctx.Done()
+ time.Sleep(300 * time.Millisecond)
+ return "", ctx.Err()
+}
+
+// TestShutdownDrainsRequests: on a signal serve stops accepting, gives
+// requests the drain time, cancels the ones left, and returns only after
+// every handler has finished, so the store is never closed under one.
+func TestShutdownDrainsRequests(t *testing.T) {
+ t.Parallel()
+ br := &blockingRunner{entered: make(chan struct{})}
+ tc := newTestCtl(t, func(f *isolatedjob.Fake) isolatedjob.Runner { br.Fake = f; return br })
+ var finished atomic.Bool
+ api := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ tc.api.ServeHTTP(w, r)
+ finished.Store(true)
+ })
+ cert, client := testTLS(t)
+ apiLn, metricsLn := listen(t), listen(t)
+ m := hostedctl.NewMetrics()
+ ctx, signal := context.WithCancel(context.Background())
+ defer signal()
+ served := make(chan error, 1)
+ go func() {
+ served <- serve(ctx, tc.c, newAPIServer(api, cert), apiLn, newMetricsServer(m.Handler(tc.c)), metricsLn, 100*time.Millisecond)
+ }()
+
+ body, _ := json.Marshal(hostedwire.LaunchRequest{AttemptID: "a1", TaskID: "t1", Account: "acct", Image: testDigest,
+ Size: isolatedjob.SizeSmall, MaxLifetimeMS: (2 * time.Hour).Milliseconds(), InstanceCode: "code-1"})
+ req, err := http.NewRequest(http.MethodPost, "https://"+apiLn.Addr().String()+"/v1/jobs", bytes.NewReader(body))
+ if err != nil {
+ t.Fatal(err)
+ }
+ tc.sign(t, req, body)
+ go func() {
+ if resp, err := client.Do(req); err == nil {
+ _ = resp.Body.Close()
+ }
+ }()
+ select {
+ case <-br.entered:
+ case <-time.After(10 * time.Second):
+ t.Fatal("the launch never reached the provider")
+ }
+
+ signal()
+ select {
+ case <-served:
+ case <-time.After(10 * time.Second):
+ t.Fatal("serve did not return after the signal")
+ }
+ if !finished.Load() {
+ t.Fatal("serve returned while a request handler was still running")
+ }
+ // The store is still whole: the intent waits for replay, and Close works.
+ v, err := tc.c.Get(context.Background(), instID, "a1")
+ if err != nil || v.State != hostedctl.JobWaiting {
+ t.Fatalf("Get(a1) after shutdown = %+v, %v; want the intent waiting", v, err)
+ }
+ if err := tc.store.Close(); err != nil {
+ t.Fatalf("store Close after shutdown = %v", err)
+ }
+}
diff --git a/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md b/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md
index ea8cd25a..74176a35 100644
--- a/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md
+++ b/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md
@@ -759,6 +759,32 @@ saved copy; the test passes again after each.
| Error text in responses (message from `err.Error()`) | `go test ./internal/hostedctl -run '^TestRoutesEnforceRoles$' -count=1` | `http_test.go:232: operator GET /v1/jobs/a1 = 403 {"code":"forbidden","message":"hostedctl: this key may not do that: route get needs the instance role"}, want 403 {"code":"forbidden","message":"This key may not do that."}` | yes, passes |
| Enabled from any non-empty env value (`!= ""` for `== "1"`) | `go test ./cmd/equipo-hosted-controller -run '^TestConfigEnabledOnlyFromEnv$' -count=1` | `config_test.go:181: EQUIPO_HOSTED_ENABLED="true": Enabled true, want false` | yes, passes |
+### Task 15 fix round 1
+
+Review r1 findings 1 to 4 and ruling R25. Tests were written first: RED was
+`TestResponsesSignedForHead` (`HEAD /v1/jobs/a1 = 405 "", signed false`), `TestResponsesSigned`
+(`no API error with code "replay"`), and the command's build failure (`undefined: newAPIServer`,
+`undefined: newMetricsServer`, `too many arguments in call to serve`).
+
+- R25: a replay (new code `replay`) and a nonce-store failure come after the signature verified,
+ so their refusals are signed bound to the request's nonce; missing or malformed headers, unknown
+ key, skew and bad signature stay unsigned. hostedwire unchanged.
+- HEAD: the signature covers the empty body actually sent; the status is kept.
+- `OPTIONS *`: `DisableGeneralOptionsHandler` on both servers; the API handler verifies it.
+- Shutdown: the reaper has its own lifetime; on a signal the servers drain (30 s), then remaining
+ request contexts are cancelled, serve waits for every handler, then stops and joins the reaper;
+ the store closes after serve returns.
+- GREEN: `go test ./internal/hostedctl ./cmd/equipo-hosted-controller -run 'TestRoutes|TestInstanceKey|TestUnknownFields|TestResponsesSigned|TestConfig|TestDisabled|TestMetrics|TestOptionsStar|TestShutdown' -count=1`
+ ok (0.46 s, 0.52 s); `make build vet` ok; Task 7 guard ok; `make budget` ok; staticcheck clean;
+ command package ok under `-race`.
+
+| Mutation | Command | Observed failure | Restored |
+| --- | --- | --- | --- |
+| `DisableGeneralOptionsHandler` off on the API server | `go test ./cmd/equipo-hosted-controller -run '^TestOptionsStarVerified$' -count=1` | `main_test.go:160: unsigned OPTIONS * = 200 "" (signature ""), want an unsigned 401` | yes, passes |
+| HEAD signs the body it never sends (`body = nil` for HEAD removed) | `go test ./internal/hostedctl -run '^TestResponsesSignedForHead$' -count=1` | `http_test.go:430: HEAD /v1/jobs/a1 = 405 "", signed false; want a signed 405 with no body` | yes, passes |
+| serve does not wait for running handlers (`active.closeAndWait()` removed) | `go test ./cmd/equipo-hosted-controller -run '^TestShutdownDrainsRequests$' -count=1` | `main_test.go:238: serve returned while a request handler was still running` | yes, passes |
+| Verified refusals unsigned (`signedNonce` always "") | `go test ./internal/hostedctl -run '^TestResponsesSigned$' -count=1` | `http_test.go:395: replay = 401 {"code":"replay",...}, signed false; want a signed 401 {"code":"replay",...}` | yes, passes |
+
## Task 16
Instance-side client `internal/hostedclient` (`client.go`, `client_test.go`). New refuses unless
diff --git a/internal/hostedctl/http.go b/internal/hostedctl/http.go
index ea531b08..89586691 100644
--- a/internal/hostedctl/http.go
+++ b/internal/hostedctl/http.go
@@ -70,7 +70,7 @@ var apiErrors = []apiError{
{hostedwire.ErrUnknownKey, http.StatusUnauthorized, "unauthorized", "The request is not signed by a known key."},
{hostedwire.ErrSkew, http.StatusUnauthorized, "unauthorized", "The request is not signed by a known key."},
{hostedwire.ErrBadSignature, http.StatusUnauthorized, "unauthorized", "The request is not signed by a known key."},
- {hostedwire.ErrReplay, http.StatusUnauthorized, "unauthorized", "The request is not signed by a known key."},
+ {hostedwire.ErrReplay, http.StatusUnauthorized, "replay", "This request was already used. Sign a new one."},
{errRead, http.StatusBadRequest, "unreadable", "The request body could not be read."},
{errQuery, http.StatusBadRequest, "query", "Routes take no query string."},
{hostedwire.ErrBadJSON, http.StatusBadRequest, "bad_json", "The body is not the JSON object this route takes."},
@@ -189,11 +189,13 @@ func matchRoute(r *http.Request) (route, string, error) {
// empty body), then call the controller, which checks that the key
// created the attempt and audits its own refusals.
//
-// A request that fails at step 1 or 2 is answered unsigned with a fixed
-// body: its nonce is not yet verified, and signing a response bound to a
-// nonce anyone may choose would hand out controller-signed refusals. Every
-// later response, refusals included, is signed with hostedwire.SignResponse
-// bound to the request's nonce. Every error is answered from apiErrors with a
+// A request with no valid signature (step 1, or a step 2 failure before the
+// signature verified: missing or malformed headers, unknown key, skew, bad
+// signature) is answered unsigned with a fixed body. Every other response,
+// refusals included, is signed with hostedwire.SignResponse bound to the
+// request's nonce; that covers a replay and a nonce-store failure, which
+// come after the signature verified (ruling R25). For HEAD the signature
+// covers the empty body actually sent. Every error is answered from apiErrors with a
// fixed code and message, never the error's own text.
func (c *Controller) Handler(hc HandlerConfig) (http.Handler, error) {
if err := CheckVerifyKeys(hc.Keys); err != nil {
@@ -281,7 +283,7 @@ func (h *apiHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
if err != nil {
a := lookupError(err)
h.m.apiError("unverified", a.code)
- h.write(w, a.status, errorBody(a), "")
+ h.write(w, r, a.status, errorBody(a), signedNonce(r, err))
return
}
nonce := headerValue(r.Header, hostedwire.HeaderNonce)
@@ -309,23 +311,41 @@ func (h *apiHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
if rt.name == routeLaunch.name {
h.m.launch(a.code)
}
- h.write(w, a.status, errorBody(a), nonce)
+ h.write(w, r, a.status, errorBody(a), nonce)
return
}
resp, err := json.Marshal(out)
if err != nil {
h.m.apiError(name, errInternal.code)
- h.write(w, errInternal.status, errorBody(errInternal), nonce)
+ h.write(w, r, errInternal.status, errorBody(errInternal), nonce)
return
}
if v, ok := out.(hostedwire.JobView); ok && rt.name == routeLaunch.name {
h.m.launch(v.State)
}
- h.write(w, http.StatusOK, resp, nonce)
+ h.write(w, r, http.StatusOK, resp, nonce)
}
-// write sends body with status, signed for nonce unless nonce is empty.
-func (h *apiHandler) write(w http.ResponseWriter, status int, body []byte, nonce string) {
+// signedNonce returns the nonce to sign a verification failure for, or ""
+// to leave it unsigned. Verify checks the signature before it records the
+// nonce, so a replay or a nonce-store failure comes from a request whose
+// signature verified (ruling R25): its refusal is signed, bound to its
+// nonce. Every other failure has no valid signature and goes unsigned.
+func signedNonce(r *http.Request, err error) string {
+ if errors.Is(err, hostedwire.ErrReplay) || errors.Is(err, hostedwire.ErrNonceStore) {
+ return headerValue(r.Header, hostedwire.HeaderNonce)
+ }
+ return ""
+}
+
+// write sends body with status, signed for nonce unless nonce is empty. A
+// HEAD response carries no body (HTTP forbids one, and Go drops it), so for
+// HEAD the signature covers the empty body the client receives, with the
+// status unchanged.
+func (h *apiHandler) write(w http.ResponseWriter, r *http.Request, status int, body []byte, nonce string) {
+ if r.Method == http.MethodHead {
+ body = nil
+ }
hdr := w.Header()
hdr.Set("Content-Type", "application/json")
hdr.Set("Cache-Control", "no-store")
diff --git a/internal/hostedctl/http_test.go b/internal/hostedctl/http_test.go
index befc71ac..333b55c9 100644
--- a/internal/hostedctl/http_test.go
+++ b/internal/hostedctl/http_test.go
@@ -388,7 +388,12 @@ func TestResponsesSigned(t *testing.T) {
if r := e.send(req, nonce); r.status != http.StatusOK || !r.signed() {
t.Fatalf("first send = %d %s", r.status, r.body)
}
- check("replay", e.send(again, nonce), http.StatusUnauthorized, unauth)
+ // A replay carries a valid signature, so its refusal is signed, bound to
+ // the replayed nonce (ruling R25).
+ r = e.send(again, nonce)
+ if r.status != http.StatusUnauthorized || string(r.body) != fixedBody(t, "replay") || !r.signed() {
+ t.Fatalf("replay = %d %s, signed %v; want a signed 401 %s", r.status, r.body, r.signed(), fixedBody(t, "replay"))
+ }
req, nonce = e.newRequest("GET", "/v1/jobs/a1", nil, idInstA, keyInstA)
e.clk.SetWall(testWall.Add(hostedwire.MaxSkew + time.Second))
@@ -399,6 +404,32 @@ func TestResponsesSigned(t *testing.T) {
req, nonce = e.newRequest("POST", "/v1/jobs", nil, idInstA, keyInstA)
req.Body, req.ContentLength = io.NopCloser(bytes.NewReader(big)), int64(len(big))
check("too large", e.send(req, nonce), http.StatusRequestEntityTooLarge, fixedBody(t, "too_large"))
+
+ // A nonce-store failure comes after the signature verified: signed 503
+ // (the closed store reports store_lost, first in the table).
+ if err := e.store.Close(); err != nil {
+ t.Fatal(err)
+ }
+ req, nonce = e.newRequest("GET", "/v1/jobs/a1", nil, idInstA, keyInstA)
+ r = e.send(req, nonce)
+ if r.status != http.StatusServiceUnavailable || string(r.body) != fixedBody(t, "store_lost") || !r.signed() {
+ t.Fatalf("nonce store down = %d %s, signed %v; want a signed 503 %s", r.status, r.body, r.signed(), fixedBody(t, "store_lost"))
+ }
+}
+
+// TestResponsesSignedForHead: Go never sends a HEAD response's body, so the
+// signature must cover the empty body the client receives.
+func TestResponsesSignedForHead(t *testing.T) {
+ t.Parallel()
+ e := newAPIEnv(t, true)
+ e.launch("a1")
+ for path, want := range map[string]int{"/v1/jobs/a1": http.StatusMethodNotAllowed, "/v1/nothing": http.StatusNotFound} {
+ req, nonce := e.newRequest("HEAD", path, nil, idInstA, keyInstA)
+ r := e.send(req, nonce)
+ if r.status != want || len(r.body) != 0 || !r.signed() {
+ t.Fatalf("HEAD %s = %d %q, signed %v; want a signed %d with no body", path, r.status, r.body, r.signed(), want)
+ }
+ }
}
func mustJSON(t *testing.T, v any) []byte {