runner: bound hosted renewals by cutoff and deadline, link test
Task 14 review round 1. Each renewal try starts only before the job deadline and its cutoff, its requests end at the earlier of the two, and the clock is read again before the answer is checked and installed; past the deadline the job ends quietly. The real thin.Link now runs through certificate rotation and bearer renewal (Link.ReconnectWait, thin record 35839), and hostile 200 answers (another epoch, past the deadline, another runner) are refused.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7 files changed,
+597
−91
.rastrillo/budgets.txt+1 −1docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md+40 −0internal/hostedproxy/proxytest/harness.go+14 −0internal/runner/hosted/export_test.go+12 −0internal/runner/hosted/renew.go+135 −71internal/runner/hosted/renew_test.go+386 −18internal/runner/thin/link.go+9 −1
CI failed — 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-2: 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.6s
ci-box: codex: fetched and verified in 3.4s
ci-box: codex-code-mode-host: fetched and verified in 1.3s
ci-box: libwrap: fetched and verified in 0.3s
ci-box: socat: fetched and verified in 0.3s
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
ci-box: image pulled in 9.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 8.8s
ci-box: clone deepened in 5.4s
ci-box: file times set from content: 3870 files, 269 directories
ci-box: ready in 19.0s
=== copy ===
EQUIPO_RELEASE_COPY_CHECK=1 CGO_ENABLED=0 go test ./internal/equipotest -run '^TestReleaseCopyReviewed$' -count=1
ok amadan.net/oficina/equipo/internal/equipotest 0.248s
=== compile ===
go build ./...
go: downloading github.com/aws/aws-sdk-go-v2/service/s3 v1.105.0
go: downloading github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.31
go: downloading github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.14
go: downloading github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.23
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py compile
+ go build -tags testbuild ./...
6.9s
+ go list -export -test -tags testbuild -f ./...
7.1s
+ go list -export -test -tags browser,testbuild -f ./internal/equipo ./internal/equipotest ./internal/headless ./internal/idtest ./internal/plan3test ./internal/thintest
4.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-24 15:56:00 +0000 UTC
go run github.com/zricethezav/gitleaks/v8@v8.30.1 version
version is set by build process
=== hosted-image ===
go run github.com/zricethezav/gitleaks/v8@v8.30.1 dir --no-banner --redact --config .gitleaks.toml infra/hosted/image
[90m3:57AM[0m [32mINF[0m [1mscanned ~2761 bytes (2.76 KB) in 3.96ms[0m
[90m3:57AM[0m [32mINF[0m [1mno leaks found[0m
CGO_ENABLED=0 go test ./internal/hostedimage -run '^(TestManifestPinsEverything|TestBuildReproducible|TestBuildChecksPins|TestImageInputsHaveNoSecrets|TestBuildScansPayload|TestScanAllowExact|TestBuildNeedsGitleaksConfig|TestImageLayoutMatchesContainmentSuite|TestScanIgnoresGitleaksAllowances|TestScanRPMScriptlets|TestScanNestedArchives|TestScanPathRules|TestScanV7Tar|TestRPMExpansionBudget)$' -count=1
ok amadan.net/oficina/equipo/internal/hostedimage 0.263s
=== 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
receipt: test step 1m24.736s 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.961s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m21.96s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 86.99, cpu waiting 47.71%, memory waiting 0.00%, io waiting 0.30%
--- 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
receipt: test step 1m22.99s 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.074s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m20.07s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 86.99, cpu waiting 47.57%, memory waiting 0.00%, io waiting 0.32%
--- 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
receipt: test step 1m27.578s 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 1m24.406s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m13.44s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 5.87s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 5.09s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 87.79, cpu waiting 48.15%, memory waiting 0.00%, io waiting 0.29%
--- 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
receipt: test step 2m52.624s 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 2m49.528s amadan.net/oficina/equipo/internal/headless
receipt: slow test 2m14.93s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 15.97s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.5s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
receipt: slow test 9.13s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
machine: 32 CPUs, load 42.19, cpu waiting 19.46%, memory waiting 0.00%, io waiting 0.06%
--- 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_step_refused$|^TestHeadless$/^3_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless
receipt: test step 1m45.527s 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 1m42.75s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m11.3s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.92s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 8.58s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 7.77s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 5.18s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
machine: 32 CPUs, load 86.00, cpu waiting 47.38%, memory waiting 0.00%, io waiting 0.21%
--- 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_step_refused$|^TestHeadless$/^3_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless
receipt: test step 3m39.673s 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 3m36.624s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m49.12s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistant
receipt: slow test 24.27s amadan.net/oficina/equipo/internal/headless TestMacMixedVersions
receipt: slow test 21.43s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.7s amadan.net/oficina/equipo/internal/headless TestHeadlessResearchHandoff
receipt: slow test 7.49s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistantAttachments
machine: 32 CPUs, load 22.54, cpu waiting 9.05%, memory waiting 0.00%, io waiting 0.02%
--- 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 3m34.338s 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 3m31.734s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 15.68s amadan.net/oficina/equipo/internal/thintest TestTasklessHoldResumes
receipt: slow test 11.51s amadan.net/oficina/equipo/internal/thintest TestContractTeamJobSettledStates
receipt: slow test 6.71s amadan.net/oficina/equipo/internal/thintest TestExplorePreviewsOff
receipt: slow test 5.46s amadan.net/oficina/equipo/internal/thintest TestNudgeResumesHeldJob
receipt: slow test 5.44s amadan.net/oficina/equipo/internal/thintest TestAbilityHoldResumes
machine: 32 CPUs, load 24.24, cpu waiting 9.67%, memory waiting 0.00%, io waiting 0.02%
--- 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 2m28.496s 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 2m26.113s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 9.64s amadan.net/oficina/equipo/internal/thintest TestContractRetryPreviewUnverifiedMerge
receipt: slow test 9.07s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 4.98s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotOffered
receipt: slow test 4.92s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
receipt: slow test 3.07s amadan.net/oficina/equipo/internal/thintest TestContractPausedJob
machine: 32 CPUs, load 56.61, cpu waiting 28.00%, memory waiting 0.00%, io waiting 0.10%
--- 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
budget note: internal/runner/thin took 7m45.674s, over the 45s its record on line 45 allows; reported only, timing fails on CI
receipt: test step 7m52.746s 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 7m45.674s amadan.net/oficina/equipo/internal/runner/thin
receipt: slow test 37.12s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeAnsweredByAnotherModel
receipt: slow test 36.95s amadan.net/oficina/equipo/internal/runner/thin TestModelsEngineeringProbesThenRunsTheStrongest
receipt: slow test 36.93s amadan.net/oficina/equipo/internal/runner/thin TestModelsUnhealthyRetriedOnDemand
receipt: slow test 33.26s amadan.net/oficina/equipo/internal/runner/thin TestWorkerHelloConnections
receipt: slow test 18.55s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeRunsInsideTheAdmission
machine: 32 CPUs, load 1.62, cpu waiting 0.12%, memory waiting 0.00%, io waiting 0.00%
--- 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
receipt: test step 51.914s 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 50.865s amadan.net/oficina/equipo/internal/runner
receipt: slow test 30.83s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.03s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 69.53, cpu waiting 34.17%, memory waiting 0.00%, io waiting 0.53%
--- 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
receipt: test step 1m2.461s 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 1m0.852s amadan.net/oficina/equipo/internal/runner
receipt: slow test 50.8s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 44.33s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.4s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.62s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 82.50, cpu waiting 40.85%, memory waiting 0.00%, io waiting 0.45%
--- 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
receipt: test step 42.506s 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 41.581s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.13s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 5.01s amadan.net/oficina/equipo/internal/runner TestEnrolCommitsTheCredentialLast
receipt: slow test 3.57s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.4s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 3.14s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
machine: 32 CPUs, load 56.16, cpu waiting 26.94%, memory waiting 0.00%, io waiting 0.63%
--- 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 38.4%, load 35.33
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
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/equipotest TestDirectDeadReferencesRepository
=== RUN TestDirectDeadReferencesRepository
direct_cutover_test.go:221: repository reference inventory: exit status 1
cmd/equipo-hosted-image/main_test.go:75:33: unclassified equipo-runner
cmd/equipo-hosted-image/main_test.go:97:48: unclassified equipo-runner
cmd/equipo-hosted-image/main_test.go:125:37: unclassified equipo-runner
cmd/equipo-runner/hosted.go:25:31: unclassified equipo-runner
cmd/equipo-runner/hosted_certify_other.go:15:21: unclassified equipo-runner
cmd/equipo-vm-init/main.go:57:49: unclassified equipo-runner
docs/superpowers/plans/2026-11-30-hosted-runners-slice-2.md:9:210: unclassified equipo-runner
docs/superpowers/plans/2026-11-30-hosted-runners-slice-2.md:236:744: unclassified equipo-runner
docs/superpowers/plans/2026-11-30-hosted-runners-slice-2.md:236:783: unclassified equipo-runner
docs/superpowers/plans/2026-11-30-hosted-runners-slice-2.md:287:60: unclassified equipo-runner
docs/superpowers/plans/2026-11-30-hosted-runners-slice-2.md:296:119: unclassified equipo-runner
docs/superpowers/plans/2026-11-30-hosted-runners-slice-2.md:318:225: unclassified equipo-runner
docs/superpowers/plans/2026-11-30-hosted-runners-slice-2.md:382:97: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:336:204: unclassified node
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:338:12: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:513:124: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:550:117: unclassified npm
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:601:200: unclassified node
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:603:204: unclassified node
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:654:49: unclassified node
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:783:8: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:786:68: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:792:18: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:793:58: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:826:106: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:827:21: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:932:1504: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:937:205: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:954:145: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:1004:505: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:1008:150: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:1017:82: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:1039:165: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:1062:392: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:1116:82: unclassified equipo-runner
infra/hosted/image/Dockerfile.tmpl:19:40: unclassified equipo-runner
internal/hostedcert/probe_linux_test.go:377:88: unclassified equipo-runner
internal/hostedcert/probe_linux_test.go:378:50: unclassified equipo-runner
internal/hostedcert/probe_linux_test.go:392:75: unclassified equipo-runner
internal/hostedimage/build_test.go:35:4: unclassified equipo-runner
internal/hostedimage/build_test.go:60:8: unclassified equipo-runner
internal/hostedimage/build_test.go:177:10: unclassified equipo-runner
internal/hostedimage/build_test.go:218:38: unclassified equipo-runner
internal/hostedimage/build_test.go:260:117: unclassified npm
internal/hostedimage/build_test.go:305:80: unclassified equipo-runner
internal/hostedimage/manifest.go:45:45: unclassified equipo-runner
internal/hostedimage/manifest.go:87:31: unclassified equipo-runner
internal/hostedimage/manifest.go:100:25: unclassified equipo-runner
internal/hostedimage/manifest.go:117:5: unclassified equipo-runner
internal/hostedimage/manifest.go:117:28: unclassified equipo-runner
internal/hostedimage/manifest_test.go:22:27: unclassified equipo-runner
internal/hostedimage/scan.go:48:4: unclassified npm
internal/hostedimage/scan.go:49:166: unclassified npm
internal/hostedimage/scan_test.go:46:20: unclassified equipo-runner
internal/hostedimage/scan_test.go:47:7: unclassified equipo-runner
internal/hostedimage/scan_test.go:253:18: unclassified node
internal/hostedimage/scan_test.go:266:87: unclassified node
internal/hostedproxy/policy_test.go:404:24: unclassified Node
internal/hostedproxy/policy_test.go:425:29: unclassified Node
internal/hostedproxy/policy_test.go:443:29: unclassified Node
internal/runner/thin/run.go:109:12: unclassified equipo-runner
internal/vminit/init.go:46:21: unclassified equipo-runner
internal/vminit/init_test.go:128:28: unclassified equipo-runner
internal/vminit/init_test.go:813:33: unclassified node
internal/vminit/init_test.go:1299:64: unclassified equipo-runner
internal/vminit/mounts_linux.go:37:70: unclassified node
internal/vminit/mounts_linux.go:140:107: unclassified NODE
reference scan: 3582 text files, 4051 matches, 67 failures
--- FAIL: TestDirectDeadReferencesRepository (2.88s)
--- FAIL amadan.net/oficina/equipo/internal/equipotest TestCIGateSteps
=== RUN TestCIGateSteps
foundation_test.go:194: make ci targets = [budget build copy-release-check fmt-check gitleaks govulncheck hosted-image-check lanes-check migration-check perf runner-dead-references runner-host spacing staticcheck test test-quarantine vet], want [budget build copy-release-check fmt-check gitleaks govulncheck lanes-check migration-check perf runner-dead-references runner-host spacing staticcheck test test-quarantine vet]
foundation_test.go:258: CI step targets = [budget build copy-release-check fmt-check gitleaks govulncheck hosted-image-check lanes-check migration-check perf runner-dead-references runner-host spacing staticcheck test test-quarantine vet], want [budget build copy-release-check fmt-check gitleaks govulncheck lanes-check migration-check perf runner-dead-references runner-host spacing staticcheck test test-quarantine vet]
--- FAIL: TestCIGateSteps (0.87s)
--- FAIL amadan.net/oficina/equipo/internal/equipotest (package output)
FAIL
rastrillo-budget/v1 ran 1m14.445s
FAIL amadan.net/oficina/equipo/internal/equipotest 74.683s
receipt: test step 1m16.566s 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 1m14.445s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 33.69s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 33.6s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 30.63s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 27.2s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
receipt: slow test 27.03s amadan.net/oficina/equipo/internal/equipotest TestAuthorityProjectOwnershipIsLocal
exit status 1
+ go test -tags testbuild -timeout 15m -run '^Test[A-D]|^TestQ' -v -run '^TestCIGateSteps$|^TestDirectDeadReferencesRepository$' -count=1 ./internal/equipotest (retry, once)
FAILED TWICE ./internal/equipotest:TestCIGateSteps equipotest-a
FAILED TWICE ./internal/equipotest:TestDirectDeadReferencesRepository equipotest-a
=== RUN TestDirectDeadReferencesRepository
direct_cutover_test.go:221: repository reference inventory: exit status 1
cmd/equipo-hosted-image/main_test.go:75:33: unclassified equipo-runner
cmd/equipo-hosted-image/main_test.go:97:48: unclassified equipo-runner
cmd/equipo-hosted-image/main_test.go:125:37: unclassified equipo-runner
cmd/equipo-runner/hosted.go:25:31: unclassified equipo-runner
cmd/equipo-runner/hosted_certify_other.go:15:21: unclassified equipo-runner
cmd/equipo-vm-init/main.go:57:49: unclassified equipo-runner
docs/superpowers/plans/2026-11-30-hosted-runners-slice-2.md:9:210: unclassified equipo-runner
docs/superpowers/plans/2026-11-30-hosted-runners-slice-2.md:236:744: unclassified equipo-runner
docs/superpowers/plans/2026-11-30-hosted-runners-slice-2.md:236:783: unclassified equipo-runner
docs/superpowers/plans/2026-11-30-hosted-runners-slice-2.md:287:60: unclassified equipo-runner
docs/superpowers/plans/2026-11-30-hosted-runners-slice-2.md:296:119: unclassified equipo-runner
docs/superpowers/plans/2026-11-30-hosted-runners-slice-2.md:318:225: unclassified equipo-runner
docs/superpowers/plans/2026-11-30-hosted-runners-slice-2.md:382:97: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:336:204: unclassified node
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:338:12: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:513:124: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:550:117: unclassified npm
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:601:200: unclassified node
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:603:204: unclassified node
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:654:49: unclassified node
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:783:8: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:786:68: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:792:18: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:793:58: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:826:106: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:827:21: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:932:1504: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:937:205: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:954:145: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:1004:505: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:1008:150: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:1017:82: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:1039:165: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:1062:392: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:1116:82: unclassified equipo-runner
infra/hosted/image/Dockerfile.tmpl:19:40: unclassified equipo-runner
internal/hostedcert/probe_linux_test.go:377:88: unclassified equipo-runner
internal/hostedcert/probe_linux_test.go:378:50: unclassified equipo-runner
internal/hostedcert/probe_linux_test.go:392:75: unclassified equipo-runner
internal/hostedimage/build_test.go:35:4: unclassified equipo-runner
internal/hostedimage/build_test.go:60:8: unclassified equipo-runner
internal/hostedimage/build_test.go:177:10: unclassified equipo-runner
internal/hostedimage/build_test.go:218:38: unclassified equipo-runner
internal/hostedimage/build_test.go:260:117: unclassified npm
internal/hostedimage/build_test.go:305:80: unclassified equipo-runner
internal/hostedimage/manifest.go:45:45: unclassified equipo-runner
internal/hostedimage/manifest.go:87:31: unclassified equipo-runner
internal/hostedimage/manifest.go:100:25: unclassified equipo-runner
internal/hostedimage/manifest.go:117:5: unclassified equipo-runner
internal/hostedimage/manifest.go:117:28: unclassified equipo-runner
internal/hostedimage/manifest_test.go:22:27: unclassified equipo-runner
internal/hostedimage/scan.go:48:4: unclassified npm
internal/hostedimage/scan.go:49:166: unclassified npm
internal/hostedimage/scan_test.go:46:20: unclassified equipo-runner
internal/hostedimage/scan_test.go:47:7: unclassified equipo-runner
internal/hostedimage/scan_test.go:253:18: unclassified node
internal/hostedimage/scan_test.go:266:87: unclassified node
internal/hostedproxy/policy_test.go:404:24: unclassified Node
internal/hostedproxy/policy_test.go:425:29: unclassified Node
internal/hostedproxy/policy_test.go:443:29: unclassified Node
internal/runner/thin/run.go:109:12: unclassified equipo-runner
internal/vminit/init.go:46:21: unclassified equipo-runner
internal/vminit/init_test.go:128:28: unclassified equipo-runner
internal/vminit/init_test.go:813:33: unclassified node
internal/vminit/init_test.go:1299:64: unclassified equipo-runner
internal/vminit/mounts_linux.go:37:70: unclassified node
internal/vminit/mounts_linux.go:140:107: unclassified NODE
reference scan: 3582 text files, 4051 matches, 67 failures
--- FAIL: TestDirectDeadReferencesRepository (2.83s)
=== RUN TestCIGateSteps
foundation_test.go:194: make ci targets = [budget build copy-release-check fmt-check gitleaks govulncheck hosted-image-check lanes-check migration-check perf runner-dead-references runner-host spacing staticcheck test test-quarantine vet], want [budget build copy-release-check fmt-check gitleaks govulncheck lanes-check migration-check perf runner-dead-references runner-host spacing staticcheck test test-quarantine vet]
foundation_test.go:258: CI step targets = [budget build copy-release-check fmt-check gitleaks govulncheck hosted-image-check lanes-check migration-check perf runner-dead-references runner-host spacing staticcheck test test-quarantine vet], want [budget build copy-release-check fmt-check gitleaks govulncheck lanes-check migration-check perf runner-dead-references runner-host spacing staticcheck test test-quarantine vet]
--- FAIL: TestCIGateSteps (0.66s)
FAIL
rastrillo-budget/v1 ran 3.502s
FAIL amadan.net/oficina/equipo/internal/equipotest 3.726s
FAIL
machine: 32 CPUs, load 86.24, cpu waiting 46.98%, memory waiting 0.00%, io waiting 0.19%
make: *** [Makefile:113: ci-shard] Error 1
amadan: step check shard 12 of 29 failed: exit status 2
--- 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 37.1%, load 35.33
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 2m25.526s 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 2m23.16s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 23.53s amadan.net/oficina/equipo/internal/equipotest TestProjectWritesRequireCurrentOwner
receipt: slow test 23.5s amadan.net/oficina/equipo/internal/equipotest TestProjectsSharedAndGrouped
receipt: slow test 23.44s amadan.net/oficina/equipo/internal/equipotest TestProjectConcurrentRetry
receipt: slow test 23.43s amadan.net/oficina/equipo/internal/equipotest TestProjectsFailuresRollBack
receipt: slow test 23.42s amadan.net/oficina/equipo/internal/equipotest TestProjectOwnersAreMembers
machine: 32 CPUs, load 42.19, cpu waiting 18.82%, memory waiting 0.00%, io waiting 0.06%
--- 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 38.4%, load 44.51
test lane equipotest-r: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestR' ./internal/equipotest
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/equipotest TestRecoveryReleaseMissingHistoryCharge
=== RUN TestRecoveryReleaseMissingHistoryCharge
recovery_test.go:310: charge lost or fabricated receipt: {Reserved:{Calls:0 InputTokens:0 OutputTokens:0 Seconds:0} Spent:{Calls:0 InputTokens:0 OutputTokens:0 Seconds:0}}
--- FAIL: TestRecoveryReleaseMissingHistoryCharge (1.43s)
--- FAIL amadan.net/oficina/equipo/internal/equipotest (package output)
FAIL
rastrillo-budget/v1 ran 5m45.807s
FAIL amadan.net/oficina/equipo/internal/equipotest 346.143s
receipt: test step 5m48.115s 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 5m45.807s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 4m48.64s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 14.06s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 11.07s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 11.02s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 7.97s amadan.net/oficina/equipo/internal/equipotest TestRosterBootstrapOnce
exit status 1
+ go test -tags testbuild -timeout 15m -run '^TestR' -v -run '^TestRecoveryReleaseMissingHistoryCharge$' -count=1 ./internal/equipotest (retry, once)
FAILED TWICE ./internal/equipotest:TestRecoveryReleaseMissingHistoryCharge equipotest-r
=== RUN TestRecoveryReleaseMissingHistoryCharge
recovery_test.go:310: charge lost or fabricated receipt: {Reserved:{Calls:0 InputTokens:0 OutputTokens:0 Seconds:0} Spent:{Calls:0 InputTokens:0 OutputTokens:0 Seconds:0}}
--- FAIL: TestRecoveryReleaseMissingHistoryCharge (1.30s)
FAIL
rastrillo-budget/v1 ran 1.297s
FAIL amadan.net/oficina/equipo/internal/equipotest 1.459s
FAIL
machine: 32 CPUs, load 5.74, cpu waiting 0.58%, memory waiting 0.00%, io waiting 0.00%
make: *** [Makefile:113: ci-shard] Error 1
amadan: step check shard 14 of 29 failed: exit status 2
--- 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 38.4%, load 35.33
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 1m14.445s 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 1m12.223s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 30.69s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 30.29s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 30.28s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 27.8s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsUpgrade
receipt: slow test 27.71s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedAuditRollback
machine: 32 CPUs, load 87.31, cpu waiting 47.77%, memory waiting 0.00%, io waiting 0.21%
--- 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 37.1%, load 35.33
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 1m1.726s 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 59.21s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 4.53s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 3.61s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 1.75s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.57s amadan.net/oficina/equipo/internal/plan3test TestPlanMigrationUpgrade
receipt: slow test 1.54s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3A
machine: 32 CPUs, load 91.73, cpu waiting 48.88%, memory waiting 0.00%, io waiting 0.27%
--- 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 38.4%, load 44.51
test lane rest: ./cmd/equipo ./cmd/equipo-hosted-certify ./cmd/equipo-hosted-controller ./cmd/equipo-hosted-image ./cmd/equipo-hosted-proxy ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./cmd/equipo-vm-init ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/diffscan ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/door ./internal/equipo/github ./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/pause ./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/hostedcert ./internal/hostedclient ./internal/hostedctl ./internal/hostedctl/ctlcert ./internal/hostedctl/ctlcert/ctlcerttest ./internal/hostedctl/ctlegress ./internal/hostedctl/ctlops ./internal/hostedctl/ctlproxy ./internal/hostedctl/ctlproxy/ctlproxytest ./internal/hostedimage ./internal/hostedimage/hostedimagetest ./internal/hostedproxy ./internal/hostedproxy/proxytest ./internal/hostedwire ./internal/idtest ./internal/isolatedjob ./internal/isolatedjob/awsjob ./internal/isolatedjob/awsjob/awsctl ./internal/isolatedjob/awsjob/imageaws ./internal/isolatedjob/guardfixture ./internal/isolatedjob/isolatedjobtest ./internal/ownermodetest ./internal/release ./internal/release/renderertest ./internal/runner/checkrun ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/designstep ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/gate ./internal/runner/heartbeat ./internal/runner/hosted ./internal/runner/mac ./internal/runner/mac/creds ./internal/runner/mac/denylist ./internal/runner/mac/fprobe ./internal/runner/mac/proc ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/pause ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/claude/realcli ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/render ./internal/runner/renderpage ./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/teamprobe ./internal/testci ./internal/toolproxy ./internal/vminit ./internal/websearch ./internal/websearch/websearchtest ./internal/websource ./internal/websource/guard ./internal/websource/hostaddrs ./internal/wire ./internal/wire/forgekey ./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-certify ./cmd/equipo-hosted-controller ./cmd/equipo-hosted-image ./cmd/equipo-hosted-proxy ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./cmd/equipo-vm-init ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/diffscan ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/door ./internal/equipo/github ./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/pause ./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/hostedcert ./internal/hostedclient ./internal/hostedctl ./internal/hostedctl/ctlcert ./internal/hostedctl/ctlcert/ctlcerttest ./internal/hostedctl/ctlegress ./internal/hostedctl/ctlops ./internal/hostedctl/ctlproxy ./internal/hostedctl/ctlproxy/ctlproxytest ./internal/hostedimage ./internal/hostedimage/hostedimagetest ./internal/hostedproxy ./internal/hostedproxy/proxytest ./internal/hostedwire ./internal/idtest ./internal/isolatedjob ./internal/isolatedjob/awsjob ./internal/isolatedjob/awsjob/awsctl ./internal/isolatedjob/awsjob/imageaws ./internal/isolatedjob/guardfixture ./internal/isolatedjob/isolatedjobtest ./internal/ownermodetest ./internal/release ./internal/release/renderertest ./internal/runner/checkrun ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/designstep ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/gate ./internal/runner/heartbeat ./internal/runner/hosted ./internal/runner/mac ./internal/runner/mac/creds ./internal/runner/mac/denylist ./internal/runner/mac/fprobe ./internal/runner/mac/proc ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/pause ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/claude/realcli ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/render ./internal/runner/renderpage ./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/teamprobe ./internal/testci ./internal/toolproxy ./internal/vminit ./internal/websearch ./internal/websearch/websearchtest ./internal/websource ./internal/websource/guard ./internal/websource/hostaddrs ./internal/wire ./internal/wire/forgekey ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
cache miss: amadan.net/oficina/equipo/internal/copydesk: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/forge: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/claude/realcli: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/webread: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/workspace: its inputs changed
--- FAIL amadan.net/oficina/equipo/internal/runner/checkrun TestChecksRunBaseChecksSHAOnlyOnBasePass
=== RUN TestChecksRunBaseChecksSHAOnlyOnBasePass
run_test.go:156: uncertified {Checks:passed BaseChecks: Reason: Output:Uncertified candidate gate diagnostic:
make[1]: Entering directory '/tmp/TestChecksRunBaseChecksSHAOnlyOnBasePass670372394/004/tree'
hi
make[1]: Leaving directory '/tmp/TestChecksRunBaseChecksSHAOnlyOnBasePass670372394/004/tree' BaseChecksSHA: Sandbox:bubblewrap Evidence:0x611215aa0150 State:done Terminated:true Gate:make ci LogTail:Uncertified candidate gate diagnostic:
make[1]: Entering directory '/tmp/TestChecksRunBaseChecksSHAOnlyOnBasePass670372394/004/tree'
hi
make[1]: Leaving directory '/tmp/TestChecksRunBaseChecksSHAOnlyOnBasePass670372394/004/tree' ExitCode:0x611215a24380}
--- FAIL: TestChecksRunBaseChecksSHAOnlyOnBasePass (0.30s)
--- FAIL amadan.net/oficina/equipo/internal/runner/checkrun (package output)
FAIL
FAIL amadan.net/oficina/equipo/internal/runner/checkrun 1.104s
--- FAIL amadan.net/oficina/equipo/internal/runner/hosted TestStepPastFifteenMinutesAndAnHour
=== RUN TestStepPastFifteenMinutesAndAnHour
2026/12/01 03:58:01 equipo-hosted-proxy: feed: hostedproxy: no usable answer from the controller: GET /v1/proxy/feed: sending failed
renew_test.go:479: at 30m0s the Link presented "bearer-1", the session holds "bearer-2"
--- FAIL: TestStepPastFifteenMinutesAndAnHour (1.91s)
--- FAIL amadan.net/oficina/equipo/internal/runner/hosted (package output)
FAIL
rastrillo-budget/v1 ran 9.644s
FAIL amadan.net/oficina/equipo/internal/runner/hosted 9.721s
--- FAIL amadan.net/oficina/equipo/internal/testci TestBudgetRecordsAreShort
=== RUN TestBudgetRecordsAreShort
budgets_file_test.go:37: .rastrillo/budgets.txt:18: reason is 268 bytes, over 200
budgets_file_test.go:33: .rastrillo/budgets.txt:42: record is 792 bytes, over 500: keep the reason to the measured value and a short why
budgets_file_test.go:33: .rastrillo/budgets.txt:87: record is 3298 bytes, over 500: keep the reason to the measured value and a short why
--- FAIL: TestBudgetRecordsAreShort (0.00s)
--- FAIL amadan.net/oficina/equipo/internal/testci (package output)
FAIL
rastrillo-budget/v1 ran 2.203s
FAIL amadan.net/oficina/equipo/internal/testci 2.211s
budget: amadan.net/oficina/equipo/internal/hostedctl/ctlproxy ran tests but printed no time: add func TestMain(m *testing.M) { os.Exit(budget.Main(m)) }
budget: amadan.net/oficina/equipo/internal/runner/gate ran tests but printed no time: add func TestMain(m *testing.M) { os.Exit(budget.Main(m)) }
budget note: cmd/equipo-runner took 1m28.534s, over the 1m0s its record on line 74 allows; reported only, timing fails on CI
budget note: internal/equipo took 3m4.154s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/equipo/chat took 50.372s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/equipo/github took 42.909s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/equipo/setup took 12.009s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/hostedctl took 36.215s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/idtest took 2m19.818s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/release took 1m9.343s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/runner/containment took 1m13.41s, over the 15s its record on line 41 allows; reported only, timing fails on CI
budget note: internal/runner/forge took 30.23s, over the 20s its record on line 36 allows; reported only, timing fails on CI
budget note: internal/runner/mac took 46.185s, over the 45s its record on line 44 allows; reported only, timing fails on CI
budget note: internal/runner/mac/fprobe took 13.584s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/runner/provider/claude/realcli took 14.02s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/runner/provider/pi took 1m15.726s, over the 1m0s its record on line 28 allows; reported only, timing fails on CI
budget note: internal/runner/render took 1m27.679s, over the 10s the default allows; reported only, timing fails on CI
receipt: test step 3m10.74s against a 60s target (the gate's other steps are not in this figure)
receipt: 72 packages ran, 26 cached, 27 without tests, 3 failed
receipt: slow package 3m4.154s amadan.net/oficina/equipo/internal/equipo
receipt: slow package 2m19.818s amadan.net/oficina/equipo/internal/idtest
receipt: slow package 1m28.534s amadan.net/oficina/equipo/cmd/equipo-runner
receipt: slow package 1m27.679s amadan.net/oficina/equipo/internal/runner/render
receipt: slow package 1m15.726s amadan.net/oficina/equipo/internal/runner/provider/pi
receipt: slow test 1m20.66s amadan.net/oficina/equipo/cmd/equipo-runner TestReleaseRunnerHasNoFakeWorker
receipt: slow test 1m0.5s amadan.net/oficina/equipo/internal/idtest TestDoorRemembersOficinaID
receipt: slow test 53.37s amadan.net/oficina/equipo/internal/idtest TestDoorNeverJudgesANativeSession
rastrillo: budget test: go test failed
receipt: slow test 52.7s amadan.net/oficina/equipo/internal/idtest TestDoorStepUpIsLocal
receipt: slow test 52.53s amadan.net/oficina/equipo/internal/idtest TestDoorOficinaSettingsUnreadableIsNoLoop
exit status 1
+ go test -tags testbuild -timeout 15m -v -run '^TestChecksRunBaseChecksSHAOnlyOnBasePass$' -count=1 ./internal/runner/checkrun (retry, once)
FAILED TWICE ./internal/runner/checkrun:TestChecksRunBaseChecksSHAOnlyOnBasePass rest
=== RUN TestChecksRunBaseChecksSHAOnlyOnBasePass
run_test.go:156: uncertified {Checks:passed BaseChecks: Reason: Output:Uncertified candidate gate diagnostic:
make[1]: Entering directory '/tmp/TestChecksRunBaseChecksSHAOnlyOnBasePass3046817973/004/tree'
hi
make[1]: Leaving directory '/tmp/TestChecksRunBaseChecksSHAOnlyOnBasePass3046817973/004/tree' BaseChecksSHA: Sandbox:bubblewrap Evidence:0xae7943a8000 State:done Terminated:true Gate:make ci LogTail:Uncertified candidate gate diagnostic:
make[1]: Entering directory '/tmp/TestChecksRunBaseChecksSHAOnlyOnBasePass3046817973/004/tree'
hi
make[1]: Leaving directory '/tmp/TestChecksRunBaseChecksSHAOnlyOnBasePass3046817973/004/tree' ExitCode:0xae79413c190}
--- FAIL: TestChecksRunBaseChecksSHAOnlyOnBasePass (0.06s)
FAIL
FAIL amadan.net/oficina/equipo/internal/runner/checkrun 0.061s
FAIL
+ go test -tags testbuild -timeout 15m -v -run '^TestStepPastFifteenMinutesAndAnHour$' -count=1 ./internal/runner/hosted (retry, once)
##############################################################################
FLAKE ./internal/runner/hosted:TestStepPastFifteenMinutesAndAnHour rest 3fd8e43f2761d4ab11dfdf8c823b376c1cc79b73 1.91s 20.89
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
+ go test -tags testbuild -timeout 15m -v -run '^TestBudgetRecordsAreShort$' -count=1 ./internal/testci (retry, once)
FAILED TWICE ./internal/testci:TestBudgetRecordsAreShort rest
=== RUN TestBudgetRecordsAreShort
budgets_file_test.go:37: .rastrillo/budgets.txt:18: reason is 268 bytes, over 200
budgets_file_test.go:33: .rastrillo/budgets.txt:42: record is 792 bytes, over 500: keep the reason to the measured value and a short why
budgets_file_test.go:33: .rastrillo/budgets.txt:87: record is 3298 bytes, over 500: keep the reason to the measured value and a short why
--- FAIL: TestBudgetRecordsAreShort (0.00s)
FAIL
rastrillo-budget/v1 ran 0s
FAIL amadan.net/oficina/equipo/internal/testci 0.004s
FAIL
machine: 32 CPUs, load 20.89, cpu waiting 8.19%, memory waiting 0.00%, io waiting 0.02%
make: *** [Makefile:113: ci-shard] Error 1
amadan: step check shard 17 of 29 failed: exit status 2
--- 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
receipt: test step 1m26.574s 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 1m24.689s amadan.net/oficina/equipo/internal/headless
receipt: slow test 38.92s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 14.77s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 10.78s amadan.net/oficina/equipo/internal/headless TestBrowserChat
receipt: slow test 7.69s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 6.95s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
machine: 32 CPUs, load 87.79, cpu waiting 48.53%, memory waiting 0.00%, io waiting 0.28%
--- 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
receipt: test step 1m41.51s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m39.416s amadan.net/oficina/equipo/internal/headless
receipt: slow test 28.99s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 25.69s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 13.52s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 11.37s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
receipt: slow test 10.61s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
machine: 32 CPUs, load 87.31, cpu waiting 48.30%, memory waiting 0.00%, io waiting 0.22%
--- 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
receipt: test step 1m59.417s 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 1m56.952s amadan.net/oficina/equipo/internal/headless
receipt: slow test 15.16s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 13.62s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 13.58s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 11.64s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsSignInEmail
receipt: slow test 11.41s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
machine: 32 CPUs, load 82.46, cpu waiting 42.93%, memory waiting 0.00%, io waiting 0.16%
--- 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|TestBrowserCardAnswerSettlesAtBottom|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInEmail|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 TestBrowserCopyContinue
=== RUN TestBrowserCopyContinue
time=2026-12-01T03:58:01.036Z level=INFO msg="startup phase" phase=state_lock
time=2026-12-01T03:58:01.037Z level=INFO msg="startup phase done" phase=state_lock took=307µs
time=2026-12-01T03:58:01.037Z level=INFO msg="startup phase" phase=claim_roots
time=2026-12-01T03:58:01.037Z level=INFO msg="startup phase done" phase=claim_roots took=120µs
time=2026-12-01T03:58:01.037Z level=INFO msg="startup phase" phase=sweep
time=2026-12-01T03:58:01.091Z level=INFO msg="startup phase done" phase=sweep took=54.745ms
time=2026-12-01T03:58:01.092Z level=INFO msg="startup phase" phase=credentials
time=2026-12-01T03:58:01.092Z level=INFO msg="startup phase done" phase=credentials took=213µs
time=2026-12-01T03:58:01.092Z level=INFO msg="startup phase" phase=open_state
time=2026-12-01T03:58:01.170Z level=INFO msg="startup phase done" phase=open_state took=77.953ms
time=2026-12-01T03:58:01.171Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-12-01T03:58:01.176Z level=INFO msg=connecting host=127.0.0.1:39107 protocol=39
time=2026-12-01T03:58:01.179Z level=INFO msg=connected host=127.0.0.1:39107 took=2.009ms
time=2026-12-01T03:58:01.179Z level=INFO msg="capabilities gathering"
time=2026-12-01T03:58:01.181Z level=INFO msg="capabilities gathered" took=1.555ms tags=linux,claude,go
time=2026-12-01T03:58:01.183Z level=INFO msg="hello sent" protocol=39
time=2026-12-01T03:58:01.199Z level=INFO msg=welcome protocol=39 role=primary generation=1
browser_copy_test.go:90: waiting for !document.querySelector('[data-copy-continue]'): context deadline exceeded (last evaluation: context deadline exceeded)
--- FAIL: TestBrowserCopyContinue (6.82s)
--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m47.719s
FAIL amadan.net/oficina/equipo/internal/headless 107.976s
receipt: test step 1m49.657s 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 1m47.719s amadan.net/oficina/equipo/internal/headless
receipt: slow test 15.21s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
receipt: slow test 13.53s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 11.43s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 10.18s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 7.79s amadan.net/oficina/equipo/internal/headless TestBrowserNotebookLook
rastrillo: budget test: go test failed
exit status 1
+ go test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAskAfterMerge|TestBrowserCardAnswerSettlesAtBottom|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInEmail|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' -v -run '^TestBrowserCopyContinue$' -count=1 ./internal/headless (retry, once)
##############################################################################
FLAKE ./internal/headless:TestBrowserCopyContinue browser-headless-rest 3fd8e43f2761d4ab11dfdf8c823b376c1cc79b73 6.82s 86.24
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 82.46, cpu waiting 45.26%, memory waiting 0.00%, io waiting 0.17%
--- 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|TestBrowserPreviewPassExchange)$' ./internal/equipo
receipt: test step 4.703s 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.555s amadan.net/oficina/equipo/internal/equipo
receipt: slow test 1.95s amadan.net/oficina/equipo/internal/equipo TestBrowserPreviewPassExchange
receipt: slow test 610ms amadan.net/oficina/equipo/internal/equipo TestBrowserPreviewBlocksNavigation
browser lane browser-rest: ./internal/equipotest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserGitHubManifestCSP)$' ./internal/equipotest
receipt: test step 7.998s 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 6.391s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 6.39s amadan.net/oficina/equipo/internal/equipotest TestBrowserGitHubManifestCSP
browser lane browser-rest: ./internal/idtest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserOficinaIDDoor|TestBrowserSmartDoor)$' ./internal/idtest
budget note: internal/idtest took 11.417s, over the 10s the default allows; reported only, timing fails on CI
receipt: test step 13.117s 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 11.417s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 9.13s amadan.net/oficina/equipo/internal/idtest TestBrowserSmartDoor
receipt: slow test 2.29s 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 4.587s 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.747s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 2.75s 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|TestBrowserAskMacOffline|TestBrowserAutonomySettings|TestBrowserCoordinatorQueue|TestBrowserEmptyConversation|TestBrowserEndedNoteStaysGone|TestBrowserHousekeeping|TestBrowserInnerGallery|TestBrowserInnerScreens|TestBrowserInstantThinking|TestBrowserInstantThinkingQueued|TestBrowserMachines|TestBrowserPausedWork|TestBrowserPhoneIndex|TestBrowserPlacementQuestionAndPending|TestBrowserProjectPlacement|TestBrowserProjectsList|TestBrowserReportActionFeedback|TestBrowserReportNextSteps|TestBrowserReportThread|TestBrowserRhythm|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 3m49.111s 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 3m46.323s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 26.86s amadan.net/oficina/equipo/internal/thintest TestBrowserAccessRequest
receipt: slow test 14.43s amadan.net/oficina/equipo/internal/thintest TestBrowserSettingsTeams
receipt: slow test 12.1s amadan.net/oficina/equipo/internal/thintest TestBrowserThinkingCycles
receipt: slow test 10.93s amadan.net/oficina/equipo/internal/thintest TestBrowserPlacementQuestionAndPending
receipt: slow test 9.49s amadan.net/oficina/equipo/internal/thintest TestBrowserRhythm
machine: 32 CPUs, load 11.52, cpu waiting 4.35%, memory waiting 0.00%, io waiting 0.00%
--- shard 23 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
shard 23: make test-quarantine
python3 scripts/ci-test.py quarantine
quarantine: 12 tests from scripts/ci-quarantine.txt; a failure is retried once, and a pass on the retry is reported as a flake
+ go test -tags testbuild -timeout 15m -v -run '^TestHeadlessConnections$/^A5_cancel_and_sign_out$|^TestHeadlessConnections$/^C4_claude_sign_in$|^TestHeadlessConnections$/^C5_engineering_failover$|^TestHeadlessConnections$/^C5_engineering_to_codex$|^TestHeadlessConnections$/^C5_engineering_waits$' ./internal/headless (54s)
ok ./internal/headless TestHeadlessConnections/A5_cancel_and_sign_out 4.92s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.31s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 9.12s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 9.10s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 27.01s
+ 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 (71s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 16.35s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 14.65s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 19.93s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 17.62s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless (22s)
ok ./internal/headless TestMixedVersions 18.95s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks (2s)
ok ./internal/runner/checks TestCheckSandboxDeniedPathsTampering 0.82s
+ go test -tags testbuild -timeout 15m -v -run '^TestRunnerCancelAndSupersede$' ./internal/runner/thin (2s)
ok ./internal/runner/thin TestRunnerCancelAndSupersede 0.06s
quarantine: 0 flaked (passed on the retry), 0 failed
machine: 32 CPUs, load 88.32, cpu waiting 45.52%, memory waiting 0.00%, io waiting 0.37%
--- 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 13.67s against a 60s target (the gate's other steps are not in this figure)
receipt: 4 packages ran, 0 cached, 4 without tests, 0 failed
receipt: slow package 7.454s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 191ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 103ms 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/opencode
receipt: slow test 5.27s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.74s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 340ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 190ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 100ms amadan.net/oficina/equipo/internal/runner/provider/codex TestDirectJournalAdapterBarrier
CGO_ENABLED=0 EQUIPO_REQUIRE_USER_SESSION=1 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run '^TestNamespace' -count=1 ./internal/runner/containment
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run '^TestNamespace' -count=1 ./internal/runner/containment
receipt: test step 4.341s 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 3.279s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 330ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 200ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof
receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryCleansScratch
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryMalformedRecord
machine: 32 CPUs, load 27.99, cpu waiting 11.97%, memory waiting 0.00%, io waiting 0.94%
--- 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 38.4%, load 35.33
shard 25: make runner-dead-references lanes-check build vet fmt-check spacing budget migration-check
python3 scripts/runner-dead-references.py
cmd/equipo-hosted-image/main_test.go:75:33: unclassified equipo-runner
cmd/equipo-hosted-image/main_test.go:97:48: unclassified equipo-runner
cmd/equipo-hosted-image/main_test.go:125:37: unclassified equipo-runner
cmd/equipo-runner/hosted.go:25:31: unclassified equipo-runner
cmd/equipo-runner/hosted_certify_other.go:15:21: unclassified equipo-runner
cmd/equipo-vm-init/main.go:57:49: unclassified equipo-runner
docs/superpowers/plans/2026-11-30-hosted-runners-slice-2.md:9:210: unclassified equipo-runner
docs/superpowers/plans/2026-11-30-hosted-runners-slice-2.md:236:744: unclassified equipo-runner
docs/superpowers/plans/2026-11-30-hosted-runners-slice-2.md:236:783: unclassified equipo-runner
docs/superpowers/plans/2026-11-30-hosted-runners-slice-2.md:287:60: unclassified equipo-runner
docs/superpowers/plans/2026-11-30-hosted-runners-slice-2.md:296:119: unclassified equipo-runner
docs/superpowers/plans/2026-11-30-hosted-runners-slice-2.md:318:225: unclassified equipo-runner
docs/superpowers/plans/2026-11-30-hosted-runners-slice-2.md:382:97: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:336:204: unclassified node
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:338:12: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:513:124: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:550:117: unclassified npm
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:601:200: unclassified node
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:603:204: unclassified node
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:654:49: unclassified node
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:783:8: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:786:68: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:792:18: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:793:58: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:826:106: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:827:21: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:932:1504: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:937:205: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:954:145: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:1004:505: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:1008:150: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:1017:82: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:1039:165: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:1062:392: unclassified equipo-runner
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md:1116:82: unclassified equipo-runner
infra/hosted/image/Dockerfile.tmpl:19:40: unclassified equipo-runner
reference scan: 3582 text files, 4051 matches, 67 failures
internal/hostedcert/probe_linux_test.go:377:88: unclassified equipo-runner
internal/hostedcert/probe_linux_test.go:378:50: unclassified equipo-runner
internal/hostedcert/probe_linux_test.go:392:75: unclassified equipo-runner
internal/hostedimage/build_test.go:35:4: unclassified equipo-runner
internal/hostedimage/build_test.go:60:8: unclassified equipo-runner
internal/hostedimage/build_test.go:177:10: unclassified equipo-runner
internal/hostedimage/build_test.go:218:38: unclassified equipo-runner
internal/hostedimage/build_test.go:260:117: unclassified npm
internal/hostedimage/build_test.go:305:80: unclassified equipo-runner
internal/hostedimage/manifest.go:45:45: unclassified equipo-runner
internal/hostedimage/manifest.go:87:31: unclassified equipo-runner
internal/hostedimage/manifest.go:100:25: unclassified equipo-runner
internal/hostedimage/manifest.go:117:5: unclassified equipo-runner
internal/hostedimage/manifest.go:117:28: unclassified equipo-runner
internal/hostedimage/manifest_test.go:22:27: unclassified equipo-runner
internal/hostedimage/scan.go:48:4: unclassified npm
internal/hostedimage/scan.go:49:166: unclassified npm
internal/hostedimage/scan_test.go:46:20: unclassified equipo-runner
internal/hostedimage/scan_test.go:47:7: unclassified equipo-runner
internal/hostedimage/scan_test.go:253:18: unclassified node
internal/hostedimage/scan_test.go:266:87: unclassified node
internal/hostedproxy/policy_test.go:404:24: unclassified Node
internal/hostedproxy/policy_test.go:425:29: unclassified Node
internal/hostedproxy/policy_test.go:443:29: unclassified Node
internal/runner/thin/run.go:109:12: unclassified equipo-runner
internal/vminit/init.go:46:21: unclassified equipo-runner
internal/vminit/init_test.go:128:28: unclassified equipo-runner
internal/vminit/init_test.go:813:33: unclassified node
internal/vminit/init_test.go:1299:64: unclassified equipo-runner
internal/vminit/mounts_linux.go:37:70: unclassified node
internal/vminit/mounts_linux.go:140:107: unclassified NODE
make[1]: *** [Makefile:251: runner-dead-references] Error 1
machine: 32 CPUs, load 44.51, cpu waiting 18.68%, memory waiting 0.00%, io waiting 0.74%
make: *** [Makefile:113: ci-shard] Error 2
amadan: step check shard 25 of 29 failed: exit status 2
--- 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 37.1%, load 35.33
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 82.50, cpu waiting 42.23%, memory waiting 0.00%, io waiting 0.43%
--- 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 38.4%, load 35.33
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 1 vulnerability in packages you import and 10
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 88.32, cpu waiting 45.10%, memory waiting 0.00%, io waiting 0.39%
--- 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 37.1%, load 35.33
shard 28: make gitleaks
[90m3:57AM[0m [32mINF[0m [1mUnknown SCM platform. Use --platform to include links in findings.[0m [36mhost=[0mamadan.net
[90m3:58AM[0m [32mINF[0m [1m1380 commits scanned.[0m
[90m3:58AM[0m [32mINF[0m [1mscanned ~76787848 bytes (76.79 MB) in 27.2s[0m
[90m3:58AM[0m [33mWRN[0m [1mleaks found: 1[0m
exit status 1
make[1]: *** [Makefile:214: gitleaks] Error 1
machine: 32 CPUs, load 74.45, cpu waiting 36.60%, memory waiting 0.00%, io waiting 0.49%
make: *** [Makefile:113: ci-shard] Error 2
amadan: step check shard 28 of 29 failed: exit status 2
amadan: job failed at step check shards 12, 14, 17, 25, 28 of 29 — its output is above, not at the tail of this log
diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt| index 4cf6b999..4da5293c 100644 |
| --- a/.rastrillo/budgets.txt |
| +++ b/.rastrillo/budgets.txt |
| @@ -39,7 +39,7 @@ time internal/runner/provider 15s Plan 3 CI repair measured 10.346s for the full |
| perf GET /releases/* skip Verified runner release file downloads, not browser GET screens. |
| perf GET /install.sh skip Mac runners: the one-line bootstrap a terminal pipes to sh, not a browser screen. |
| time internal/runner/containment 15s Plan 3 loaded CI measured 10.817s; |
| -size internal/runner/thin 35831 35453 Protocols 31-35, merge credential, publication guards, kept work, scans, 36 lookups; Mac pin, Engineering, asks, F probes, D1, P2, held reports; 38 Design step, renderer; hosted slice 2 Task 11 moved the base-gate checks to checkrun (source down) and pinned the primary and Mac behaviour with tests (test up), and its round 1 fixes added the worker step-engine wiring test; Task 12 added Link.TokenSource and Link.HTTPClient (a hosted runner's bearer is read at each dial and its dial goes through the proxy) and their two tests; 35831/35453. |
| +size internal/runner/thin 35839 35453 Protocols 31-35, merge credential, publication guards, kept work, scans, 36 lookups; Mac pin, Engineering, asks, F probes, D1, P2, held reports; 38 Design step, renderer; hosted slice 2 Task 11 moved the base-gate checks to checkrun (source down) and pinned the primary and Mac behaviour with tests (test up), and its round 1 fixes added the worker step-engine wiring test; Task 12 added Link.TokenSource and Link.HTTPClient (a hosted runner's bearer is read at each dial and its dial goes through the proxy) and their two tests; 35831/35453. Task 14 review round 1 added Link.ReconnectWait (the wait between connections, a fake clock's in the hosted renewal tests, which drive the real Link through certificate rotation and bearer renewal); 35839/35453. |
| time internal/thintest 240s Thin contract and page tests, the Assistant's and the models' included, share one harness. Measured 202s on a shared 16 CPU box (2026-11-13); CI runs two lanes. |
| time internal/runner/mac 45s Real processes killed and proven gone: groups, sessions, the runner-user sweep, turns, restarts; probes end to end. Measured 29.3s locally. |
| time internal/runner/thin 45s Thin v1 slice 4 review: real git repositories for the merge and squash checks, a stalled fetch, and a 16 MiB candidate streamed through the review diff and the checks pack (about 5s). |
diff --git a/docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md b/docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md| index f3a634eb..8a38b24e 100644 |
| --- a/docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md |
| +++ b/docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md |
| @@ -1091,3 +1091,43 @@ Mutation checks (as before: exact unique string replaced by a script, `-count=1 |
| 144. Keep working after the final failure (the work contexts not cancelled). `-run TestRenewalFailureStopsWork`: FAIL `renew_test.go:429: the work context still runs after the failed renewal` (both). Restored. |
| 145. Keep running after the final bearer failure (`return s.fail(...)` replaced by `bearer.due = false`). Same test: FAIL `renew_test.go:424: at 58m0s after the refusal Run has returned false with <nil>, want ErrRenewal`. Restored. |
| 146. Renew past the deadline (the `renewAt` deadline check replaced by `if false`). `-run TestNoRenewalPastDeadline`: FAIL `renew_test.go:539: 2 certificate and 1 bearer renewals, want 1 and 0`. Restored. |
| + |
| +### Task 14 review round 1 (t14-r1.md: four Important findings, all fixed) |
| + |
| +1. **Time read again after each request; the cutoff bounds requests in flight.** `Run` now runs each due renewal through `step`. A try starts only before the job's deadline and its cutoff (2 minutes before the credential expires). Its requests, every bootstrap listener included, run in a context `bound` ends at the earlier of the two (the timer is `renewBound`, a fake clock's in tests). The clock is read again when the try is over, and the answer is checked at that time (`renewCert` and `renewBearer` take the clock and return the installation, so the check and the install both happen after the answer is in). A failure is tried again at `min(now + wait, cutoff)`. At the cutoff the job fails without a new try. A success that comes at or past the cutoff is a failure. (The extra "stop the failover once ctx ends" check I first wrote was removed: with the bound context ended, `http.Client.Do` returns before dialling, so the check was redundant and its mutation, 150, survived; the bound enforces it, as 147 shows.) |
| +2. **The job deadline at execution time.** Before a try, and again after it, a clock past the deadline ends that credential's renewals with the job: no request, no failure, no report (`over`). Requests are bounded by the deadline as well as the cutoff, and a renewed certificate past the session's deadline is still refused. |
| +3. **The real Link across renewals.** `thin.Link` gains `ReconnectWait` (nil: `time.After`; thin's record raised to 35839, with the reason). `TestStepPastFifteenMinutesAndAnHour` now runs the real Link on the session's token source and client, with an immediate reconnect wait. Each simulated minute, after the step's call, the test drops the stream and waits for the next handshake. That handshake must present the session's current bearer, and every handshake, including the ones a renewal causes by ending the tunnel over the old certificate, must present a bearer the instance issued and that is unexpired on the fake clock. The proxy judges certificates on the same clock and refuses a replaced serial once the feed carries it. A race in the test's stream (a socket accepted but not yet registered escaped a drop, and the Link then waited 15 s for a welcome) was fixed: registration and drop share one lock. |
| +4. **Hostile 200 answers.** `proxytest.FakeController.RenewAs` lets a test make the controller issue a renewed certificate for a changed launch. `TestRenewRefusesHostileAnswers`: a certificate for another epoch, a certificate past the session's deadline (the launch's deadline removed), and a bearer for runner r-2. Each is refused and not installed (`hosted.CurrentCert` and `Session.Token` unchanged), tried again, and the job fails at the cutoff. |
| + |
| +New tests: `TestRenewalCutoffInFlight` covers the certificate with two bootstrap listeners, both dials held, and the bearer with its last try before 58m held at the instance. In both, Run is still running a second before the cutoff and fails at the cutoff; the second listener is never dialled after the cutoff and no renewal reaches the controller. `TestRenewValidatesAtInstallation`: an answer expiring at 30m30s that arrives at 30m40s is refused and retried at 30m45s, and bearer-3 is installed then. `TestNoRenewalPastDeadline` gains "a clock jump across the deadline" (a single Advance from 0 to 21m: nil, no request, no report) and "a request in flight across the deadline" (dial held at 7m30s, clock jumped to 21m30s: nil, no report). `TestRenewalFailureStopsWork`'s bearer tries now end at 57m15s, the last start before the 58m cutoff. |
| + |
| +Red, the new tests against e0286524's renew.go, with the test seams in place: |
| +- `TestNoRenewalPastDeadline/a_clock_jump_across_the_deadline`: `renew_test.go:762: Run past the deadline returned true with ... remote error: tls: expired certificate, 1 reports; want nil and none`. |
| +- `a_request_in_flight_across_the_deadline`, both `TestRenewalCutoffInFlight` subtests: `Run neither set a timer nor returned` (no bound). |
| +- `TestRenewValidatesAtInstallation`: `renew_test.go:873: Run returned false (<nil>) and the session holds "bearer-2", want bearer-1 kept and a retry`. |
| +- `TestRenewalFailureStopsWork/the_bearer`: a try at 58m0s. |
| +- `TestStepPastFifteenMinutesAndAnHour` with the real Link also failed then (`at 53m0s the Link did not dial again`), but that was the test's own drop race, fixed above, not the old code. |
| +- The hostile-answer tests passed on the old code: its guards existed. The mutations 153-155 show the tests now cover them. |
| + |
| +Green: |
| +- The brief's command: ok. |
| +- The whole package, three runs: ok, about 5 s each. `TestStepPastFifteenMinutesAndAnHour` ten runs: about 1 s each. |
| +- `go test ./internal/runner/hosted ./internal/hostedproxy/... -count=1 -race`: ok. |
| +- `./internal/hostedctl/ctlcert`, `./internal/runner/thin -run TestLink`, `./cmd/equipo-runner`: ok. |
| +- `make budget build vet`: exit 0. gofmt and `git diff --check`: clean. |
| + |
| +Mutation checks (exact unique string replaced by a script, `-count=1 -timeout 120s`, restored from a copy and checked with `cmp`): |
| + |
| +147. Requests not bounded (`bound(...)` replaced by `context.WithCancel(ctx)`). `-run TestRenewalCutoffInFlight`: FAIL both subtests, `renew_test.go:838`, `:862: Run neither set a timer nor returned`. Restored. |
| +148. The clock not read again after a try (`now = clock()` after the try removed). `-run 'TestRenewalCutoffInFlight|TestRenewValidates|TestNoRenewalPastDeadline'`: FAIL `renew_test.go:795: Run with its request crossing the deadline returned false with <nil>` and `renew_test.go:840: at the cutoff Run returned false with <nil>, want ErrRenewal`. Restored. |
| +149. The bearer checked at another time than installation (`acceptCredential(out, s.epoch, time.Time{}, ...)`, standing for the request's start). `-run TestRenewValidatesAtInstallation`: FAIL `renew_test.go:886: Run returned false (<nil>) and the session holds "bearer-2", want bearer-1 kept and a retry`. Restored. |
| +150. The failover loop's own `ctx.Err()` check removed. `-run TestRenewalCutoffInFlight`: ok, it **survived**. The check was redundant (the ended bound context stops `Do` before it dials) and was removed from the code. |
| +151. No deadline check before a try (the first `s.over(now)` removed). `-run TestNoRenewalPastDeadline`: FAIL `renew_test.go:776: Run past the deadline returned true with ... proxy certificate: no try before the cutoff, 1 reports; want nil and none`. Restored. |
| +152. No deadline check after a try (`case s.over(now):` after the try removed). Same test: FAIL `renew_test.go:795: Run with its request crossing the deadline returned true with ... context canceled, 1 reports; want nil and none`. Restored. |
| +153. A renewed certificate for another epoch accepted (`case epoch != s.epoch:` → `case false:`). `-run TestRenewRefusesHostileAnswers`: FAIL `renew_test.go:912: the session installed serial ea49870c...` (another epoch). Restored. |
| +154. A renewed certificate past the deadline accepted. Same test: FAIL `renew_test.go:912: the session installed serial 386eae50...` (past the deadline). Restored. |
| +155. A renewed bearer for another runner accepted. Same test: FAIL `renew_test.go:934: 1 renewals; the session holds "bearer-2"; ... want bearer-1 kept and a retry`. Restored. |
| +156. The Link keeps the original bearer (link.go: the first `TokenSource()` kept in `l.Token` and sent on every dial). `-run TestStepPast`: FAIL `renew_test.go:479: at 30m0s the Link presented "bearer-1", the session holds "bearer-2"`. Restored. |
| +157. No retry (a failure fails at once). `-run TestRenewalRetries`: FAIL `renew_test.go:712: certificate renewals answered [502], want ...`, `renew_test.go:725: bearer renewals asked at [30m0s], want [30m0s 30m5s 30m15s]`. Restored. |
| +158. Renew past the deadline (the `renewAt` deadline check → `if false`). `-run TestNoRenewalPastDeadline`: FAIL `renew_test.go:749: 2 certificate and 1 bearer renewals, want 1 and 0`. Restored. |
| +159. Keep working after the final failure (work contexts not cancelled). `-run TestRenewalFailureStopsWork`: FAIL `renew_test.go:640: the work context still runs after the failed renewal` (both). Restored. |
diff --git a/internal/hostedproxy/proxytest/harness.go b/internal/hostedproxy/proxytest/harness.go| index f15d15f7..014877f6 100644 |
| --- a/internal/hostedproxy/proxytest/harness.go |
| +++ b/internal/hostedproxy/proxytest/harness.go |
| @@ -279,6 +279,7 @@ type FakeController struct { |
| reports []Report |
| reported map[string]bool // launch -> a report was accepted |
| received []Received |
| + renewAs func(Launch) Launch |
| } |
| // identityHeaders are header names a request to the controller may carry: |
| @@ -369,6 +370,15 @@ func (c *FakeController) Revoke(serial string) { |
| } |
| } |
| +// RenewAs makes every renewal the controller grants issue its |
| +// certificate for as(launch) instead: a hostile or broken controller's |
| +// answer (another epoch, no deadline). nil restores the launch's own. |
| +func (c *FakeController) RenewAs(as func(Launch) Launch) { |
| + c.mu.Lock() |
| + defer c.mu.Unlock() |
| + c.renewAs = as |
| +} |
| + |
| // Reports are the certification reports accepted. |
| func (c *FakeController) Reports() []Report { |
| c.mu.Lock() |
| @@ -547,6 +557,10 @@ func (c *FakeController) route(r *http.Request, body []byte) (any, error) { |
| return nil, err |
| } |
| old.renewed, old.revoked = true, true |
| + if c.renewAs != nil { |
| + as := c.renewAs(*l) |
| + l = &as |
| + } |
| return c.answer(l, pub) |
| case "POST /v1/proxy/cert-report": |
| var q hostedwire.CertReport |
diff --git a/internal/runner/hosted/export_test.go b/internal/runner/hosted/export_test.go| index 00c372c0..8418969b 100644 |
| --- a/internal/runner/hosted/export_test.go |
| +++ b/internal/runner/hosted/export_test.go |
| @@ -2,6 +2,7 @@ package hosted |
| import ( |
| "context" |
| + "crypto/x509" |
| "net" |
| "testing" |
| "time" |
| @@ -30,3 +31,14 @@ func SetAfter(t testing.TB, after func(time.Duration) <-chan time.Time) { |
| renewAfter = after |
| t.Cleanup(func() { renewAfter = a }) |
| } |
| + |
| +// SetBoundTimer replaces the timer that ends a renewal's requests at its |
| +// cutoff or the job's deadline (time.After), for one test. |
| +func SetBoundTimer(t testing.TB, after func(time.Duration) <-chan time.Time) { |
| + a := renewBound |
| + renewBound = after |
| + t.Cleanup(func() { renewBound = a }) |
| +} |
| + |
| +// CurrentCert is the session's installed proxy certificate. |
| +func CurrentCert(s *Session) *x509.Certificate { return s.cert.Load().Leaf } |
diff --git a/internal/runner/hosted/renew.go b/internal/runner/hosted/renew.go| index c63a06c4..372d34b8 100644 |
| --- a/internal/runner/hosted/renew.go |
| +++ b/internal/runner/hosted/renew.go |
| @@ -3,7 +3,6 @@ package hosted |
| import ( |
| "context" |
| "crypto/ed25519" |
| - "crypto/tls" |
| "encoding/json" |
| "errors" |
| "fmt" |
| @@ -38,8 +37,12 @@ var ErrRenewal = errors.New("hosted: credential renewal failed") |
| // errRefused is a renewal's answer the session would not install. |
| var errRefused = errors.New("refused") |
| -// renewAfter is the timer Run waits on; tests use a fake clock's. |
| -var renewAfter = time.After |
| +// renewAfter is the timer Run waits on, and renewBound the one that |
| +// ends a renewal's requests; tests use a fake clock's. |
| +var ( |
| + renewAfter = time.After |
| + renewBound = time.After |
| +) |
| // deadlineSlack: a credential expiring within this of the job's deadline |
| // is not renewed. Certificate times are whole seconds, so one capped at |
| @@ -107,11 +110,12 @@ func (s *Session) fail(err error) error { |
| // (a certification launch has none) is renewed at half its remaining |
| // lifetime and installed at once, so the next connection and the next |
| // dial use it; one that already expires at the job's deadline is left to |
| -// expire with the job. A failed renewal is tried again (retry) until |
| -// renewMargin before that credential expires. Run returns nil when ctx |
| -// ends or nothing is left to renew. When a renewal has failed at the |
| -// margin it cancels the work (Work), sends the report (OnRenewalFailed) |
| -// and returns ErrRenewal. |
| +// expire with the job. A failed renewal is tried again (step) while a try |
| +// can start before its cutoff, renewMargin before the credential expires. |
| +// Run returns nil when ctx ends, the job's deadline passes, or nothing is |
| +// left to renew. When a renewal has not succeeded by its cutoff it |
| +// cancels the work (Work), sends the report (OnRenewalFailed) and returns |
| +// ErrRenewal. |
| func (s *Session) Run(ctx context.Context, clock func() time.Time) error { |
| now := clock() |
| var cert, bearer renewal |
| @@ -129,41 +133,16 @@ func (s *Session) Run(ctx context.Context, clock func() time.Time) error { |
| return nil |
| case <-renewAfter(next.Sub(clock())): |
| } |
| - now = clock() |
| // The certificate first: the bearer's renewal goes through the |
| // proxy on it. |
| - if cert.due && !now.Before(cert.at) { |
| - old := s.cert.Load().Leaf.NotAfter |
| - c, err := s.renewCert(ctx, now) |
| - switch { |
| - case ctx.Err() != nil: |
| - return nil |
| - case err != nil && !cert.retry(now, old): |
| - return s.fail(fmt.Errorf("proxy certificate: %w", err)) |
| - case err == nil: |
| - s.cert.Store(&c) |
| - s.client.CloseIdleConnections() // they carry the old certificate |
| - cert = renewal{} |
| - cert.at, cert.due = s.renewAt(c.Leaf.NotAfter, now) |
| - // Its issuer's cap reached (the job's deadline, which a |
| - // certification launch's session does not know): a renewal |
| - // that does not extend a credential is its last. |
| - cert.due = cert.due && c.Leaf.NotAfter.After(old) |
| + if cert.due { |
| + if stop, err := s.step(ctx, clock, &cert, s.cert.Load().Leaf.NotAfter, "proxy certificate", s.renewCert); stop { |
| + return err |
| } |
| } |
| - if bearer.due && !now.Before(bearer.at) { |
| - old := s.bearer.Load().ExpiresAt |
| - r, err := s.renewBearer(ctx, now) |
| - switch { |
| - case ctx.Err() != nil: |
| - return nil |
| - case err != nil && !bearer.retry(now, old): |
| - return s.fail(fmt.Errorf("bearer: %w", err)) |
| - case err == nil: |
| - s.bearer.Store(&r.Credential) |
| - bearer = renewal{} |
| - bearer.at, bearer.due = s.renewAt(r.Credential.ExpiresAt, now) |
| - bearer.due = bearer.due && r.Credential.ExpiresAt.After(old) |
| + if bearer.due { |
| + if stop, err := s.step(ctx, clock, &bearer, s.bearer.Load().ExpiresAt, "bearer", s.renewBearer); stop { |
| + return err |
| } |
| } |
| } |
| @@ -171,36 +150,108 @@ func (s *Session) Run(ctx context.Context, clock func() time.Time) error { |
| } |
| // A failed renewal is tried again after retryFirst, the wait doubling to |
| -// retryMax, until renewMargin before the credential expires: a last try |
| -// then, and the job fails if it fails too. |
| +// retryMax, while a try can start before its cutoff, renewMargin before |
| +// the credential expires; at the cutoff the job fails. |
| const ( |
| retryFirst = 5 * time.Second |
| retryMax = time.Minute |
| renewMargin = 2 * time.Minute |
| ) |
| -// renewal is one credential's next renewal: due at at, and the wait |
| -// before the next retry after a failure (0 before any). |
| +// renewal is one credential's next renewal: due at at, the wait before |
| +// the next retry after a failure (0 before any), and the last failure. |
| type renewal struct { |
| due bool |
| at time.Time |
| wait time.Duration |
| + last error |
| } |
| -// retry schedules the next try after a failure at now of the renewal of |
| -// a credential expiring at expiry, and reports whether there is one: none |
| -// from renewMargin before its expiry. |
| -func (r *renewal) retry(now, expiry time.Time) bool { |
| - last := expiry.Add(-renewMargin) |
| - if !now.Before(last) { |
| - return false |
| +// attempt is one try at a renewal, its requests within ctx: it returns |
| +// the new credential's installation and expiry, the credential checked |
| +// at clock's time once the answer is in. |
| +type attempt func(ctx context.Context, clock func() time.Time) (install func(), expiry time.Time, err error) |
| + |
| +// step runs r's renewal, of a credential expiring at expiry, if it is due |
| +// on clock. A try starts only before the job's deadline and the cutoff, |
| +// its requests end at the earlier of the two, and the clock is read again |
| +// once it is over: past the deadline the job is over (no renewal, no |
| +// failure); an answer at or past the cutoff is a failure. A success is |
| +// installed and the next renewal scheduled; a failure is tried again, |
| +// unless the cutoff has come. stop is true when Run returns err. |
| +func (s *Session) step(ctx context.Context, clock func() time.Time, r *renewal, expiry time.Time, what string, |
| + try attempt) (stop bool, err error) { |
| + now := clock() |
| + if now.Before(r.at) { |
| + return false, nil |
| } |
| - r.wait = min(max(2*r.wait, retryFirst), retryMax) |
| - r.at = now.Add(r.wait) |
| - if r.at.After(last) { |
| - r.at = last |
| + if s.over(now) { |
| + r.due = false |
| + return false, nil |
| } |
| - return true |
| + cutoff := expiry.Add(-renewMargin) |
| + if !now.Before(cutoff) { |
| + if r.last == nil { |
| + r.last = errors.New("no try before the cutoff") |
| + } |
| + return true, s.fail(fmt.Errorf("%s: %w", what, r.last)) |
| + } |
| + end := cutoff |
| + if !s.deadline.IsZero() && s.deadline.Before(end) { |
| + end = s.deadline |
| + } |
| + tctx, cancel := bound(ctx, end.Sub(now)) |
| + install, next, err := try(tctx, clock) |
| + cancel() |
| + now = clock() |
| + switch { |
| + case ctx.Err() != nil: |
| + return true, nil |
| + case s.over(now): |
| + r.due = false |
| + return false, nil |
| + case err == nil && !now.Before(cutoff): |
| + err = errors.New("the answer came after the cutoff") |
| + } |
| + if err != nil { |
| + r.last = err |
| + if !now.Before(cutoff) { |
| + return true, s.fail(fmt.Errorf("%s: %w", what, err)) |
| + } |
| + r.wait = min(max(2*r.wait, retryFirst), retryMax) |
| + r.at = now.Add(r.wait) |
| + if r.at.After(cutoff) { |
| + r.at = cutoff |
| + } |
| + return false, nil |
| + } |
| + install() |
| + *r = renewal{} |
| + r.at, r.due = s.renewAt(next, now) |
| + // Its issuer's cap reached (the job's deadline, which a certification |
| + // launch's session does not know): a renewal that does not extend a |
| + // credential is its last. |
| + r.due = r.due && next.After(expiry) |
| + return false, nil |
| +} |
| + |
| +// over: the job's deadline has passed at now. |
| +func (s *Session) over(now time.Time) bool { |
| + return !s.deadline.IsZero() && !now.Before(s.deadline) |
| +} |
| + |
| +// bound is ctx, also ended d from now on the renewal clock. |
| +func bound(ctx context.Context, d time.Duration) (context.Context, context.CancelFunc) { |
| + ctx, cancel := context.WithCancel(ctx) |
| + end := renewBound(d) |
| + go func() { |
| + select { |
| + case <-end: |
| + cancel() |
| + case <-ctx.Done(): |
| + } |
| + }() |
| + return ctx, cancel |
| } |
| // renewAt is when a credential expiring at expiry, seen at now, is |
| @@ -215,17 +266,19 @@ func (s *Session) renewAt(expiry, now time.Time) (time.Time, bool) { |
| // renewCert renews the proxy certificate at a bootstrap listener, over the |
| // current certificate, for the same key: each listener in turn while one |
| -// is unreachable or cannot reach the controller (5xx). The answer must |
| -// name the same launch, VM and epoch, and end by the job's deadline. |
| -func (s *Session) renewCert(ctx context.Context, now time.Time) (tls.Certificate, error) { |
| +// is unreachable or cannot reach the controller (5xx); once ctx ends, no |
| +// listener is dialled. |
| +// The answer must name the same launch, VM and epoch, be valid at |
| +// clock's time once it is in, and end by the job's deadline. |
| +func (s *Session) renewCert(ctx context.Context, clock func() time.Time) (func(), time.Time, error) { |
| defer s.boot.CloseIdleConnections() // the next renewal goes over the next certificate |
| csr, err := csrFor(s.proxyKey) |
| if err != nil { |
| - return tls.Certificate{}, err |
| + return nil, time.Time{}, err |
| } |
| body, err := json.Marshal(hostedwire.RenewCertRequest{Serial: s.cert.Load().Leaf.SerialNumber.Text(16), CSR: csr}) |
| if err != nil { |
| - return tls.Certificate{}, err |
| + return nil, time.Time{}, err |
| } |
| last := errors.New("no bootstrap listener") |
| for _, boot := range s.launch.ProxyBoot { |
| @@ -235,32 +288,43 @@ func (s *Session) renewCert(ctx context.Context, now time.Time) (tls.Certificate |
| continue |
| } |
| if status == http.StatusOK { |
| - c, epoch, err := acceptCert(out, s.launch, s.vm, s.proxyKey, now, errRefused) |
| + c, epoch, err := acceptCert(out, s.launch, s.vm, s.proxyKey, clock(), errRefused) |
| switch { |
| case err != nil: |
| - return c, err |
| + return nil, time.Time{}, err |
| case epoch != s.epoch: |
| - return tls.Certificate{}, fmt.Errorf("the certificate is for epoch %d, the session's is %d", epoch, s.epoch) |
| + return nil, time.Time{}, fmt.Errorf("the certificate is for epoch %d, the session's is %d", epoch, s.epoch) |
| case !s.deadline.IsZero() && c.Leaf.NotAfter.After(s.deadline): |
| - return tls.Certificate{}, errors.New("the certificate outlives the job's deadline") |
| + return nil, time.Time{}, errors.New("the certificate outlives the job's deadline") |
| } |
| - return c, nil |
| + return func() { |
| + s.cert.Store(&c) |
| + s.client.CloseIdleConnections() // they carry the old certificate |
| + }, c.Leaf.NotAfter, nil |
| } |
| var e hostedwire.ErrorResponse |
| _ = json.Unmarshal(out, &e) |
| last = fmt.Errorf("bootstrap listener %s answered %d %q", boot, status, e.Code) |
| if status < 500 { |
| - return tls.Certificate{}, last |
| + return nil, time.Time{}, last |
| } |
| } |
| - return tls.Certificate{}, last |
| + return nil, time.Time{}, last |
| } |
| // renewBearer asks the instance for a challenge under the current bearer, |
| // signs it with the machine key, and trades it for the next bearer: a |
| -// worker credential for the same runner and epoch, expiring by the job's |
| -// deadline. |
| -func (s *Session) renewBearer(ctx context.Context, now time.Time) (runnerproto.HostedEnrolResponse, error) { |
| +// worker credential for the same runner and epoch, valid at clock's time |
| +// once the answer is in, expiring by the job's deadline. |
| +func (s *Session) renewBearer(ctx context.Context, clock func() time.Time) (func(), time.Time, error) { |
| + r, err := s.nextBearer(ctx, clock) |
| + if err != nil { |
| + return nil, time.Time{}, err |
| + } |
| + return func() { s.bearer.Store(&r.Credential) }, r.Credential.ExpiresAt, nil |
| +} |
| + |
| +func (s *Session) nextBearer(ctx context.Context, clock func() time.Time) (runnerproto.HostedEnrolResponse, error) { |
| var none runnerproto.HostedEnrolResponse |
| cur := s.bearer.Load() |
| status, out, err := postInstance(ctx, s.client, s.origin+challengePath, cur.Token, nil) |
| @@ -283,7 +347,7 @@ func (s *Session) renewBearer(ctx context.Context, now time.Time) (runnerproto.H |
| if status != http.StatusOK { |
| return none, fmt.Errorf("the instance answered the renewal %d", status) |
| } |
| - r, err := acceptCredential(out, s.epoch, now, errRefused) |
| + r, err := acceptCredential(out, s.epoch, clock(), errRefused) |
| switch { |
| case err != nil: |
| return none, err |
diff --git a/internal/runner/hosted/renew_test.go b/internal/runner/hosted/renew_test.go| index 7c4941d5..2f8e5b17 100644 |
| --- a/internal/runner/hosted/renew_test.go |
| +++ b/internal/runner/hosted/renew_test.go |
| @@ -8,7 +8,10 @@ import ( |
| "errors" |
| "fmt" |
| "io" |
| + "log/slog" |
| + "net" |
| "net/http" |
| + "net/netip" |
| "slices" |
| "strings" |
| "sync" |
| @@ -19,8 +22,10 @@ import ( |
| "amadan.net/oficina/equipo/internal/hostedproxy/proxytest" |
| "amadan.net/oficina/equipo/internal/hostedwire" |
| "amadan.net/oficina/equipo/internal/runner/hosted" |
| + "amadan.net/oficina/equipo/internal/runner/thin" |
| "amadan.net/oficina/equipo/internal/runnerproto" |
| "amadan.net/oficina/equipo/internal/wire" |
| + "github.com/coder/websocket" |
| ) |
| // bearerLife is the instance's bearer lifetime (Task 22): an hour, never |
| @@ -46,10 +51,20 @@ type fakeInstance struct { |
| tries []time.Time |
| lavish bool // issue renewed bearers for an hour, naming that as the deadline |
| stale []string |
| + |
| + // A renewal asked at holdFrom or later is held (signalled on held) |
| + // until release is closed. The next bearer issued expires at |
| + // fixedExpiry when it is set; otherRunner issues renewals for r-2. |
| + holdFrom time.Time |
| + held chan struct{} |
| + release chan struct{} |
| + fixedExpiry time.Time |
| + otherRunner bool |
| } |
| func instanceOn(h *proxytest.Harness, deadline time.Time) *fakeInstance { |
| - f := &fakeInstance{h: h, deadline: deadline, tokens: map[string]time.Time{}, nonces: map[string]bool{}} |
| + f := &fakeInstance{h: h, deadline: deadline, tokens: map[string]time.Time{}, nonces: map[string]bool{}, |
| + held: make(chan struct{}, 1), release: make(chan struct{})} |
| reply := func(w http.ResponseWriter, v any) { |
| w.Header().Set("Content-Type", "application/json") |
| _ = json.NewEncoder(w).Encode(v) |
| @@ -85,6 +100,17 @@ func instanceOn(h *proxytest.Harness, deadline time.Time) *fakeInstance { |
| return |
| } |
| f.mu.Lock() |
| + hold := !f.holdFrom.IsZero() && !h.Clock.Wall().Before(f.holdFrom) |
| + f.mu.Unlock() |
| + if hold { |
| + f.held <- struct{}{} |
| + select { |
| + case <-f.release: |
| + case <-r.Context().Done(): |
| + return |
| + } |
| + } |
| + f.mu.Lock() |
| defer f.mu.Unlock() |
| if !f.currentLocked(r, "renew") { |
| http.Error(w, "unauthorized", http.StatusUnauthorized) |
| @@ -144,9 +170,16 @@ func (f *fakeInstance) issueLocked(lavish bool) runnerproto.HostedEnrolResponse |
| case deadline.Before(end): |
| end = deadline |
| } |
| + if !f.fixedExpiry.IsZero() { |
| + end, f.fixedExpiry = f.fixedExpiry, time.Time{} |
| + } |
| + runner := "r-1" |
| + if f.otherRunner && f.issued > 1 { |
| + runner = "r-2" |
| + } |
| f.tokens[tok] = end |
| return runnerproto.HostedEnrolResponse{Epoch: proxytest.Epoch, Deadline: deadline, |
| - Credential: runnerproto.RunnerCredential{Version: 1, Token: tok, TokenType: "Bearer", RunnerID: "r-1", |
| + Credential: runnerproto.RunnerCredential{Version: 1, Token: tok, TokenType: "Bearer", RunnerID: runner, |
| CredentialID: fmt.Sprintf("c-%d", f.issued), Person: "person@example.com", ExpiresAt: end, Role: wire.RoleWorker}} |
| } |
| @@ -183,24 +216,31 @@ type renewRig struct { |
| f *fakeInstance |
| s *hosted.Session |
| start time.Time // the fake wall clock at enrolment |
| + boot []netip.AddrPort |
| waits chan time.Duration |
| done chan error |
| due time.Time // when Run's timer fires; zero when it set none |
| ended bool // Run returned err |
| err error |
| - wakes int // timers Run has set |
| - cut bool // the proxy is cut from the controller: no polls |
| + wakes int // timers Run has set |
| + cut bool // the proxy is cut from the controller: no polls |
| + drops int64 // the Link's handshakes awaited (handshake) |
| } |
| func newRenewRig(t *testing.T, life time.Duration) *renewRig { |
| t.Helper() |
| - return newRenewRigFor(t, life, hostedwire.PurposeChecks) |
| + return newRenewRigWith(t, life, nil) |
| } |
| -// newRenewRigFor is newRenewRig for a launch of purpose: a certification |
| -// launch's session does not enrol, so it has no bearer and no deadline. |
| -func newRenewRigFor(t *testing.T, life time.Duration, purpose string) *renewRig { |
| +// certification makes a rig's launch a certification launch, whose |
| +// session does not enrol: no bearer and no deadline. |
| +func certification(_ *proxytest.Harness, b *hostedwire.BootstrapV2) { |
| + b.Purpose, b.InstanceCode = hostedwire.PurposeCertification, "" |
| +} |
| + |
| +// newRenewRigWith is newRenewRig with the bootstrap changed by mod. |
| +func newRenewRigWith(t *testing.T, life time.Duration, mod func(*proxytest.Harness, *hostedwire.BootstrapV2)) *renewRig { |
| t.Helper() |
| h := proxytest.New(t) |
| begin := h.Clock.Wall() |
| @@ -209,22 +249,76 @@ func newRenewRigFor(t *testing.T, life time.Duration, purpose string) *renewRig |
| Epoch: proxytest.Epoch, Code: proxytest.ProxyCode, Deadline: deadline, Services: bootstrap(h).Services}) |
| f := instanceOn(h, deadline) |
| b := bootstrap(h) |
| - if b.Purpose = purpose; purpose == hostedwire.PurposeCertification { |
| - b.InstanceCode = "" |
| + if mod != nil { |
| + mod(h, &b) |
| } |
| s, err := start(t, b, t.TempDir()) |
| if err != nil { |
| t.Fatalf("Start: %v", err) |
| } |
| - r := &renewRig{t: t, h: h, f: f, s: s, start: begin, waits: make(chan time.Duration, 64), done: make(chan error, 1)} |
| + r := &renewRig{t: t, h: h, f: f, s: s, start: begin, boot: b.ProxyBoot, waits: make(chan time.Duration, 64), done: make(chan error, 1)} |
| hosted.SetAfter(t, func(d time.Duration) <-chan time.Time { |
| ch := h.Clock.After(d) |
| r.waits <- d |
| return ch |
| }) |
| + hosted.SetBoundTimer(t, h.Clock.After) |
| return r |
| } |
| +// busy moves the fake clock by d, polls the feed, and waits for held: Run |
| +// is then inside a request, setting no timer. |
| +func (r *renewRig) busy(d time.Duration, held <-chan struct{}) { |
| + r.t.Helper() |
| + r.step(d) |
| + select { |
| + case <-held: |
| + r.due = time.Time{} |
| + case <-time.After(20 * time.Second): |
| + r.t.Fatalf("at %v no request was held", r.h.Clock.Wall().Sub(r.start)) |
| + } |
| +} |
| + |
| +// step moves the fake clock by d and polls the proxy's feed, while Run is |
| +// inside a request. |
| +func (r *renewRig) step(d time.Duration) { |
| + r.t.Helper() |
| + r.h.Clock.Advance(d) |
| + if err := r.h.Proxy.Poll(context.Background()); err != nil { |
| + r.t.Fatalf("Poll: %v", err) |
| + } |
| +} |
| + |
| +// running fails the test if Run has returned. |
| +func (r *renewRig) running(what string) { |
| + r.t.Helper() |
| + select { |
| + case r.err = <-r.done: |
| + r.ended = true |
| + r.t.Fatalf("%s at %v: Run returned %v", what, r.h.Clock.Wall().Sub(r.start), r.err) |
| + default: |
| + } |
| +} |
| + |
| +// holdBoot holds every dial to a bootstrap listener in boot until the test |
| +// ends or the dial's context does, signalling each on the returned |
| +// channel. |
| +func holdBoot(t *testing.T, boot ...netip.AddrPort) <-chan struct{} { |
| + held := make(chan struct{}, 16) |
| + hosted.SetDial(t, func(ctx context.Context, network, addr string) (net.Conn, error) { |
| + for _, b := range boot { |
| + if addr == b.String() { |
| + held <- struct{}{} |
| + <-ctx.Done() |
| + return nil, ctx.Err() |
| + } |
| + } |
| + var d net.Dialer |
| + return d.DialContext(ctx, network, addr) |
| + }) |
| + return held |
| +} |
| + |
| // run starts Run and waits for its first move. |
| func (r *renewRig) run() { |
| r.t.Helper() |
| @@ -360,12 +454,19 @@ func TestRenewAtHalfLife(t *testing.T) { |
| } |
| // A step that runs past 15 minutes (the first proxy certificate's life) |
| -// and an hour (the first bearer's) keeps calling the instance on renewed |
| -// credentials: the proxy, judging certificates on the fake clock, lets |
| -// every call through, and the instance never sees an expired bearer. |
| +// and an hour (the first bearer's) keeps working on renewed credentials. |
| +// Each minute the step calls the instance on a new connection, and the |
| +// real Link's stream is dropped and dialled again (its reconnect wait is |
| +// immediate): the proxy, judging certificates on the fake clock and |
| +// refusing each replaced serial once the feed has it, lets every |
| +// connection through, and every handshake presents the session's current |
| +// bearer, unexpired. Renewing the certificate also ends the Link's |
| +// tunnel over the old one, and it dials again on the new. |
| func TestStepPastFifteenMinutesAndAnHour(t *testing.T) { |
| r := newRenewRig(t, 2*time.Hour) |
| r.run() |
| + dials, drop := linkOn(t, r) |
| + r.handshake(dials) |
| for m := 1; m <= 75; m++ { |
| r.advanceTo(r.start.Add(time.Duration(m) * time.Minute)) |
| if r.ended { |
| @@ -374,6 +475,8 @@ func TestStepPastFifteenMinutesAndAnHour(t *testing.T) { |
| if status, body, err := stepCall(r.s); err != nil || status != http.StatusOK || body != "ok" { |
| t.Fatalf("minute %d: the step's call = %d %q, %v", m, status, body, err) |
| } |
| + drop() |
| + r.handshake(dials) |
| } |
| certs, bearers := r.renewed() |
| if certs != 10 || bearers != 2 { |
| @@ -384,9 +487,117 @@ func TestStepPastFifteenMinutesAndAnHour(t *testing.T) { |
| } |
| } |
| +// dial is one handshake on the fake instance's runner stream. |
| +type dial struct { |
| + token string |
| + ok bool // the bearer is one the instance issued, unexpired |
| + at time.Time |
| + drops int64 // drops before it |
| +} |
| + |
| +// linkOn runs the real thin.Link on r's session (its token source and its |
| +// client), dialling again at once after each ending. The instance's |
| +// stream checks each handshake's bearer on the fake clock, sends it on |
| +// dials, and holds the socket until drop closes it. |
| +func linkOn(t *testing.T, r *renewRig) (dials <-chan dial, drop func()) { |
| + t.Helper() |
| + ch := make(chan dial, 1024) |
| + var mu sync.Mutex |
| + var drops int64 |
| + conns := map[*websocket.Conn]bool{} |
| + r.h.Handle(wire.StreamPath, func(w http.ResponseWriter, req *http.Request) { |
| + r.f.mu.Lock() |
| + ok := r.f.currentLocked(req, "stream") |
| + r.f.mu.Unlock() |
| + d := dial{token: strings.TrimPrefix(req.Header.Get("Authorization"), "Bearer "), ok: ok, at: r.h.Clock.Wall()} |
| + if !ok { |
| + mu.Lock() |
| + d.drops = drops |
| + mu.Unlock() |
| + ch <- d |
| + http.Error(w, "unauthorized", http.StatusUnauthorized) |
| + return |
| + } |
| + c, err := websocket.Accept(w, req, nil) |
| + if err != nil { |
| + return |
| + } |
| + // Registered and counted under the lock drop takes: a socket is |
| + // either closed by a drop or counted after it. |
| + mu.Lock() |
| + d.drops = drops |
| + conns[c] = true |
| + mu.Unlock() |
| + ch <- d |
| + defer func() { |
| + mu.Lock() |
| + delete(conns, c) |
| + mu.Unlock() |
| + c.CloseNow() |
| + }() |
| + for { |
| + if _, _, err := c.Read(req.Context()); err != nil { |
| + return |
| + } |
| + } |
| + }) |
| + ctx, cancel := context.WithCancel(context.Background()) |
| + state, err := thin.OpenState(ctx, t.TempDir()) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + link := &thin.Link{Origin: r.s.Origin(), TokenSource: r.s.Token, HTTPClient: r.s.HTTPClient(), State: state, Role: wire.RoleWorker, |
| + Logger: slog.New(slog.NewTextHandler(io.Discard, nil)), |
| + Hello: func() wire.Hello { |
| + return wire.Hello{Repos: []string{}, CreateIn: []string{}, Catalog: []wire.RepoInfo{}, Versions: map[string]string{"runner": "test"}} |
| + }, |
| + ReconnectWait: func(time.Duration) <-chan time.Time { |
| + now := make(chan time.Time, 1) |
| + now <- time.Time{} |
| + return now |
| + }} |
| + done := make(chan struct{}) |
| + go func() { defer close(done); _ = link.Run(ctx) }() |
| + t.Cleanup(func() { cancel(); <-done; state.Close() }) |
| + return ch, func() { |
| + mu.Lock() |
| + defer mu.Unlock() |
| + drops++ |
| + for c := range conns { |
| + c.CloseNow() |
| + } |
| + } |
| +} |
| + |
| +// handshake waits for the Link's first handshake after the last drop |
| +// (Run then waits, its renewals installed): it presented the session's |
| +// current bearer, and it and every handshake before it (a tunnel ended by |
| +// a renewal) presented one the instance issued, unexpired. |
| +func (r *renewRig) handshake(dials <-chan dial) { |
| + r.t.Helper() |
| + now := r.h.Clock.Wall() |
| + r.drops++ |
| + for { |
| + select { |
| + case d := <-dials: |
| + if !d.ok { |
| + r.t.Fatalf("at %v the Link presented bearer %q, which the instance did not take", d.at.Sub(r.start), d.token) |
| + } |
| + if d.drops == r.drops-1 && d.at.Equal(now) { |
| + if d.token != r.s.Token() { |
| + r.t.Fatalf("at %v the Link presented %q, the session holds %q", now.Sub(r.start), d.token, r.s.Token()) |
| + } |
| + return |
| + } |
| + case <-time.After(20 * time.Second): |
| + r.t.Fatalf("at %v the Link did not dial again", now.Sub(r.start)) |
| + } |
| + } |
| +} |
| + |
| // A renewal that keeps failing is tried again, 5 seconds on and doubling |
| -// to a minute, until 2 minutes before the credential expires; when that |
| -// last try fails the work stops: the work context is cancelled with |
| +// to a minute, while it can start before its cutoff, 2 minutes before the |
| +// credential expires; at the cutoff the work stops: the work context is cancelled with |
| // ErrRenewal as its cause (and one asked for later is born cancelled), |
| // the failure is reported once, Run returns ErrRenewal, and nothing more |
| // is renewed. |
| @@ -446,7 +657,6 @@ func TestRenewalFailureStopsWork(t *testing.T) { |
| for at, wait := 30*time.Minute, 5*time.Second; at < tc.at; at, wait = at+wait, min(2*wait, time.Minute) { |
| want = append(want, at) |
| } |
| - want = append(want, tc.at) |
| if got := r.f.tried(r.start); !slices.Equal(got, want) { |
| t.Errorf("bearer renewals asked at %v, want %v", got, want) |
| } |
| @@ -543,7 +753,7 @@ func TestNoRenewalPastDeadline(t *testing.T) { |
| // caps the certificate at it, and a renewal that does not extend the |
| // certificate is the last. |
| t.Run("a certification launch", func(t *testing.T) { |
| - r := newRenewRigFor(t, 20*time.Minute, hostedwire.PurposeCertification) |
| + r := newRenewRigWith(t, 20*time.Minute, certification) |
| r.run() |
| r.advanceTo(r.start.Add(30 * time.Minute)) |
| if !r.ended || r.err != nil { |
| @@ -553,6 +763,38 @@ func TestNoRenewalPastDeadline(t *testing.T) { |
| t.Errorf("%d certificate and %d bearer renewals, want 2 (the second reaching the cap) and 0", certs, bearers) |
| } |
| }) |
| + // The clock jumps from before the first renewal to past the deadline |
| + // (a VM paused): the job is over, nothing is asked, nothing reported. |
| + t.Run("a clock jump across the deadline", func(t *testing.T) { |
| + r := newRenewRig(t, 20*time.Minute) |
| + var reports atomic.Int64 |
| + r.s.OnRenewalFailed(func(string) { reports.Add(1) }) |
| + r.run() |
| + r.h.Clock.Advance(21 * time.Minute) |
| + r.settle() |
| + if !r.ended || r.err != nil || reports.Load() != 0 { |
| + t.Fatalf("Run past the deadline returned %v with %v, %d reports; want nil and none", r.ended, r.err, reports.Load()) |
| + } |
| + if n := len(r.h.Controller.Received("POST /v1/proxy/renew")); n != 0 { |
| + t.Errorf("%d renewals asked past the deadline", n) |
| + } |
| + }) |
| + // A renewal in flight when the clock passes the deadline ends with |
| + // the job: not a renewal failure. |
| + t.Run("a request in flight across the deadline", func(t *testing.T) { |
| + r := newRenewRig(t, 20*time.Minute) |
| + held := holdBoot(t, r.boot...) |
| + var reports atomic.Int64 |
| + r.s.OnRenewalFailed(func(string) { reports.Add(1) }) |
| + r.run() |
| + r.advanceTo(r.start.Add(7*time.Minute + 29*time.Second)) |
| + r.busy(time.Second, held) |
| + r.h.Clock.Advance(14 * time.Minute) // 21m30s |
| + r.settle() |
| + if !r.ended || r.err != nil || reports.Load() != 0 { |
| + t.Fatalf("Run with its request crossing the deadline returned %v with %v, %d reports; want nil and none", r.ended, r.err, reports.Load()) |
| + } |
| + }) |
| t.Run("a bearer past the deadline", func(t *testing.T) { |
| r := newRenewRig(t, 70*time.Minute) |
| r.f.set(func(f *fakeInstance) { f.lavish = true }) |
| @@ -571,3 +813,129 @@ func TestNoRenewalPastDeadline(t *testing.T) { |
| } |
| }) |
| } |
| + |
| +// A renewal's requests end at its cutoff (2 minutes before the credential |
| +// expires), however long they would take, across every bootstrap |
| +// listener: one still waiting then fails the job at the cutoff, and no |
| +// try starts after it. |
| +func TestRenewalCutoffInFlight(t *testing.T) { |
| + t.Run("the proxy certificate, two listeners", func(t *testing.T) { |
| + r := newRenewRigWith(t, 3*time.Hour, func(h *proxytest.Harness, b *hostedwire.BootstrapV2) { |
| + second := h.AddProxy(t) |
| + b.Proxies = append(b.Proxies, second.EgressAddr()) |
| + b.ProxyBoot = append(b.ProxyBoot, second.BootAddr()) |
| + }) |
| + held := holdBoot(t, r.boot...) |
| + r.run() |
| + r.advanceTo(r.start.Add(7*time.Minute + 29*time.Second)) |
| + r.busy(time.Second, held) // 7m30s: the first listener's dial hangs |
| + for range 5 { |
| + r.step(time.Minute) |
| + } |
| + r.step(29 * time.Second) // 12m59s |
| + r.running("before the cutoff") |
| + r.step(time.Second) // 13m00s |
| + r.settle() |
| + if !r.ended || !errors.Is(r.err, hosted.ErrRenewal) { |
| + t.Fatalf("at the cutoff Run returned %v with %v, want ErrRenewal", r.ended, r.err) |
| + } |
| + if n := len(held); n != 0 { |
| + t.Errorf("the second listener was dialled %d times after the cutoff", n) |
| + } |
| + if n := len(r.h.Controller.Received("POST /v1/proxy/renew")); n != 0 { |
| + t.Errorf("%d renewals reached the controller", n) |
| + } |
| + }) |
| + t.Run("the bearer", func(t *testing.T) { |
| + r := newRenewRig(t, 3*time.Hour) |
| + r.f.set(func(f *fakeInstance) { |
| + f.refuse = true |
| + f.holdFrom = r.start.Add(57*time.Minute + 15*time.Second) // the last try before 58m |
| + }) |
| + t.Cleanup(func() { close(r.f.release) }) |
| + r.run() |
| + r.advanceTo(r.start.Add(57*time.Minute + 14*time.Second)) |
| + r.busy(time.Second, r.f.held) |
| + r.step(44 * time.Second) // 57m59s |
| + r.running("before the cutoff") |
| + r.step(time.Second) // 58m00s |
| + r.settle() |
| + if !r.ended || !errors.Is(r.err, hosted.ErrRenewal) { |
| + t.Fatalf("at the cutoff Run returned %v with %v, want ErrRenewal", r.ended, r.err) |
| + } |
| + }) |
| +} |
| + |
| +// A renewed credential is checked at the time it is installed, not when |
| +// its request began: a bearer that expired while its answer was on the |
| +// way is refused (and the next try renews it). |
| +func TestRenewValidatesAtInstallation(t *testing.T) { |
| + r := newRenewRig(t, 3*time.Hour) |
| + r.f.set(func(f *fakeInstance) { |
| + f.holdFrom = r.start.Add(30 * time.Minute) |
| + f.fixedExpiry = r.start.Add(30*time.Minute + 30*time.Second) |
| + }) |
| + r.run() |
| + r.advanceTo(r.start.Add(30*time.Minute - time.Second)) |
| + r.busy(time.Second, r.f.held) |
| + r.step(40 * time.Second) // 30m40s: the answer, expiring at 30m30s, still on its way |
| + r.f.set(func(f *fakeInstance) { f.holdFrom = time.Time{} }) |
| + close(r.f.release) |
| + r.settle() |
| + if r.ended || r.s.Token() != "bearer-1" { |
| + t.Fatalf("Run returned %v (%v) and the session holds %q, want bearer-1 kept and a retry", r.ended, r.err, r.s.Token()) |
| + } |
| + if want := r.start.Add(30*time.Minute + 45*time.Second); !r.due.Equal(want) { |
| + t.Errorf("the retry is at %v, want %v", r.due.Sub(r.start), want.Sub(r.start)) |
| + } |
| + r.advanceTo(r.start.Add(31 * time.Minute)) |
| + if r.s.Token() != "bearer-3" { |
| + t.Errorf("after the retry the session holds %q, want bearer-3", r.s.Token()) |
| + } |
| +} |
| + |
| +// Answers that say 200 but break the job's binding are refused and not |
| +// installed: a certificate for another epoch, a certificate past the |
| +// session's deadline, a bearer for another runner. Each is tried again, |
| +// and the job fails at the cutoff. |
| +func TestRenewRefusesHostileAnswers(t *testing.T) { |
| + cert := func(t *testing.T, life time.Duration, as func(proxytest.Launch) proxytest.Launch) { |
| + r := newRenewRig(t, life) |
| + r.h.Controller.RenewAs(as) |
| + serial := hosted.CurrentCert(r.s).SerialNumber |
| + r.run() |
| + r.advanceTo(r.start.Add(7*time.Minute + 30*time.Second)) |
| + if n := len(r.h.Controller.Received("POST /v1/proxy/renew")); n != 1 { |
| + t.Fatalf("%d renewals asked, want 1", n) |
| + } |
| + if got := hosted.CurrentCert(r.s).SerialNumber; got.Cmp(serial) != 0 { |
| + t.Fatalf("the session installed serial %x", got) |
| + } |
| + if r.ended { |
| + t.Fatalf("Run returned %v at the first refusal, want a retry", r.err) |
| + } |
| + r.advanceTo(r.start.Add(13 * time.Minute)) |
| + if !r.ended || !errors.Is(r.err, hosted.ErrRenewal) { |
| + t.Fatalf("at the cutoff Run returned %v with %v, want ErrRenewal", r.ended, r.err) |
| + } |
| + } |
| + t.Run("a certificate for another epoch", func(t *testing.T) { |
| + cert(t, 3*time.Hour, func(l proxytest.Launch) proxytest.Launch { l.Epoch += 5; return l }) |
| + }) |
| + t.Run("a certificate past the deadline", func(t *testing.T) { |
| + cert(t, 20*time.Minute, func(l proxytest.Launch) proxytest.Launch { l.Deadline = time.Time{}; return l }) |
| + }) |
| + t.Run("a bearer for another runner", func(t *testing.T) { |
| + r := newRenewRig(t, 3*time.Hour) |
| + r.f.set(func(f *fakeInstance) { f.otherRunner = true }) |
| + r.run() |
| + r.advanceTo(r.start.Add(30 * time.Minute)) |
| + if _, bearers := r.renewed(); bearers != 1 || r.s.Token() != "bearer-1" || r.ended { |
| + t.Fatalf("%d renewals; the session holds %q; Run returned %v (%v): want bearer-1 kept and a retry", bearers, r.s.Token(), r.ended, r.err) |
| + } |
| + r.advanceTo(r.start.Add(58 * time.Minute)) |
| + if !r.ended || !errors.Is(r.err, hosted.ErrRenewal) || r.s.Token() != "bearer-1" { |
| + t.Fatalf("at the cutoff Run returned %v with %v holding %q, want ErrRenewal and bearer-1", r.ended, r.err, r.s.Token()) |
| + } |
| + }) |
| +} |
diff --git a/internal/runner/thin/link.go b/internal/runner/thin/link.go| index eda429a4..c6a62970 100644 |
| --- a/internal/runner/thin/link.go |
| +++ b/internal/runner/thin/link.go |
| @@ -114,6 +114,10 @@ type Link struct { |
| // tests set 1 to act as a slice 4 runner). |
| Protocol int |
| + // ReconnectWait, when set, is the timer between connections (tests: a |
| + // fake clock's); nil is time.After. |
| + ReconnectWait func(time.Duration) <-chan time.Time |
| + |
| mu sync.Mutex |
| conn *websocket.Conn |
| generation int64 |
| @@ -529,10 +533,14 @@ func (l *Link) Run(ctx context.Context) error { |
| l.Logger.Info("runner stream ended", "retry_in", wait.Round(time.Millisecond)) |
| } |
| } |
| + after := time.After |
| + if l.ReconnectWait != nil { |
| + after = l.ReconnectWait |
| + } |
| select { |
| case <-ctx.Done(): |
| return ctx.Err() |
| - case <-time.After(wait): |
| + case <-after(wait): |
| } |
| } |
| } |