isolatedjob: runner interface, validation and two-part clock
Add the provider-neutral Runner interface with its LaunchSpec, Job and Limits types, the state vocabulary (unknown is neither live nor terminal), LaunchSpec.Validate against provider limits and the 8-hour hard cap, the Wall/Mono Clock with a system implementation, and NetworkAudit.OK. Record the mutations in the progress file.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 files changed,
+532
−0
docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md+10 −0internal/isolatedjob/clock.go+24 −0internal/isolatedjob/isolatedjob.go+195 −0internal/isolatedjob/isolatedjob_test.go+232 −0internal/isolatedjob/validate.go+71 −0
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-1a: Type Size Avail | ext4 96G 85G
ci-box: disk /home/ci/.cache/equipo-ci-box: Type Size Avail | ext4 96G 85G
ci-box: bwrap: fetched and verified in 0.3s
ci-box: claude: fetched and verified in 1.7s
ci-box: codex: fetched and verified in 3.5s
ci-box: codex-code-mode-host: fetched and verified in 1.4s
ci-box: libwrap: fetched and verified in 0.3s
ci-box: socat: fetched and verified in 0.4s
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
ci-box: image pulled in 9.8s
ci-box: pi: installed and verified in 7.4s
ci-box: opencode: installed and verified in 2.1s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 9.3s
ci-box: clone deepened in 3.3s
ci-box: file times set from content: 2843 files, 187 directories
ci-box: ready in 16.8s
=== copy ===
EQUIPO_RELEASE_COPY_CHECK=1 CGO_ENABLED=0 go test ./internal/equipotest -run '^TestReleaseCopyReviewed$' -count=1
ok amadan.net/oficina/equipo/internal/equipotest 0.249s
=== compile ===
go build ./...
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py compile
+ go build -tags testbuild ./...
3.0s
+ go list -export -test -tags testbuild -f ./...
3.9s
+ go list -export -test -tags browser,testbuild -f ./internal/equipo ./internal/headless ./internal/idtest ./internal/plan3test ./internal/thintest
1.2s
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -version
staticcheck 2026.1 (v0.7.0)
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 -version
Go: go1.26.11
Scanner: govulncheck@v1.8.0
DB: https://vuln.go.dev
DB updated: 2026-11-11 02:51:11 +0000 UTC
go run github.com/zricethezav/gitleaks/v8@v8.30.1 version
version is set by build process
=== check ===
--- shard 0 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-work: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadless$/^4c_rebase$|^TestHeadless$/^4b_ask$|^TestHeadless$/^4c_checks_card$|^TestHeadless$/^4_step_crash$' ./internal/headless
receipt: test step 1m21.812s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m19.975s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m19.97s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 41.48, cpu waiting 24.38%, memory waiting 0.00%, io waiting 0.50%
--- 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 1m24.499s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m22.774s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m22.77s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 39.36, cpu waiting 23.32%, memory waiting 0.00%, io waiting 0.47%
--- 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 1m25.499s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m23.463s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m12.8s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 5.8s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 4.87s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 39.36, cpu waiting 23.32%, memory waiting 0.00%, io waiting 0.47%
--- shard 3 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-mac: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestMacWorker$|^TestHeadlessAttachments$|^TestHeadlessPrewarm$|^TestHeadless$/^1_first_token$|^TestHeadless$/^6_quick_messages$|^TestHeadless$/^8_instance_restart$|^TestHeadless$/^3_runner_offline$' ./internal/headless
receipt: test step 1m37.007s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m35.172s amadan.net/oficina/equipo/internal/headless
receipt: slow test 38.51s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 36.53s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 10.54s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
receipt: slow test 9.58s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
machine: 32 CPUs, load 35.16, cpu waiting 19.68%, memory waiting 0.00%, io waiting 0.38%
--- shard 4 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-guards: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadlessCopyRotation$|^TestHeadlessPolicyGuards$|^TestHeadlessRunnerKillLeavesNoCopies$|^TestHeadlessNewHouseRuleStartsFresh$|^TestHeadless$/^3_engineering$|^TestHeadless$/^3_step_cancel$|^TestHeadless$/^3_step_contained$|^TestHeadless$/^3_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless
receipt: test step 1m38.654s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m36.958s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m0.66s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 11.61s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 10.05s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 8.78s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 5.85s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
machine: 32 CPUs, load 35.16, cpu waiting 19.07%, memory waiting 0.00%, io waiting 0.37%
--- shard 5 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-rest: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^TestHeadless$/^4c_rebase$|^TestHeadless$/^4b_ask$|^TestHeadless$/^4c_checks_card$|^TestHeadless$/^4_step_crash$|^TestHeadless$/^4_review$|^TestHeadless$/^2b_access$|^TestHeadless$/^runner_crash$|^TestHeadless$/^2b_first_message$|^TestHeadless$/^4_checks_honest$|^TestHeadless$/^7_stream_resume$|^TestHeadless$/^2b_notebook$|^TestHeadless$/^2b_move_in$|^TestHeadless$/^2b_desk_failure$|^TestHeadless$/^cancel$|^TestHeadlessConnections$|^TestHeadlessTokenPasteEndToEnd$|^TestHeadlessTokenConnection$|^TestMacWorker$|^TestHeadlessAttachments$|^TestHeadlessPrewarm$|^TestHeadless$/^1_first_token$|^TestHeadless$/^6_quick_messages$|^TestHeadless$/^8_instance_restart$|^TestHeadless$/^3_runner_offline$|^TestHeadlessCopyRotation$|^TestHeadlessPolicyGuards$|^TestHeadlessRunnerKillLeavesNoCopies$|^TestHeadlessNewHouseRuleStartsFresh$|^TestHeadless$/^3_engineering$|^TestHeadless$/^3_step_cancel$|^TestHeadless$/^3_step_contained$|^TestHeadless$/^3_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless
receipt: test step 3m17.242s 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 3m15.326s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m44.67s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistant
receipt: slow test 24.13s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 20.59s amadan.net/oficina/equipo/internal/headless TestHeadlessResearchHandoff
receipt: slow test 8.1s amadan.net/oficina/equipo/internal/headless TestHeadlessClaudeSignIn
receipt: slow test 7.36s amadan.net/oficina/equipo/internal/headless TestHeadlessTurnBatching
machine: 32 CPUs, load 7.64, cpu waiting 3.73%, memory waiting 0.00%, io waiting 0.06%
--- shard 6 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane thintest: ./internal/thintest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test([^C]|C[^o]|Co[^n]|Con[^t])|^TestContract(Assistant|Outcome|Team|Handoff|HostAllowlist|HostIsPerPerson|Look|Use[A-Z]|RemoteCall|LanesRunAtOnce|NoMergeQuestionWhenGateMerges|PreviewHeldUntilPublishAnswer|PreviewNotHeldBelow19|PublishNeedsOwnerAnswer)' ./internal/thintest
receipt: test step 1.276s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 2m1.624s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 7.84s amadan.net/oficina/equipo/internal/thintest TestContractTeamJobSettledStates
receipt: slow test 6.74s amadan.net/oficina/equipo/internal/thintest TestExplorePreviewsOff
receipt: slow test 4.31s amadan.net/oficina/equipo/internal/thintest TestContractTeamUpdatePersonNeeds
receipt: slow test 3.81s amadan.net/oficina/equipo/internal/thintest TestContractPreviewHeldUntilPublishAnswer
receipt: slow test 3.52s amadan.net/oficina/equipo/internal/thintest TestContractTeamNudgePersonNeeds
machine: 32 CPUs, load 10.49, cpu waiting 1.25%, memory waiting 0.00%, io waiting 1.92%
--- shard 7 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane thintest-contract: ./internal/thintest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^Test([^C]|C[^o]|Co[^n]|Con[^t])|^TestContract(Assistant|Outcome|Team|Handoff|HostAllowlist|HostIsPerPerson|Look|Use[A-Z]|RemoteCall|LanesRunAtOnce|NoMergeQuestionWhenGateMerges|PreviewHeldUntilPublishAnswer|PreviewNotHeldBelow19|PublishNeedsOwnerAnswer)' ./internal/thintest
receipt: test step 1.212s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1m26.784s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 9.08s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 5.03s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotOffered
receipt: slow test 4.41s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
receipt: slow test 2.4s amadan.net/oficina/equipo/internal/thintest TestContractPreview
receipt: slow test 2.34s amadan.net/oficina/equipo/internal/thintest TestContractPublishNameTaken
machine: 32 CPUs, load 10.49, cpu waiting 1.25%, memory waiting 0.00%, io waiting 1.92%
--- shard 8 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-thin: ./internal/runner/thin
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./internal/runner/thin
budget note: internal/runner/thin took 4m32.068s, over the 45s its record on line 44 allows; reported only, timing fails on CI
receipt: test step 4m37.518s 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 4m32.068s amadan.net/oficina/equipo/internal/runner/thin
receipt: slow test 36.98s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeAnsweredByAnotherModel
receipt: slow test 36.93s amadan.net/oficina/equipo/internal/runner/thin TestModelsEngineeringProbesThenRunsTheStrongest
receipt: slow test 36.77s amadan.net/oficina/equipo/internal/runner/thin TestModelsUnhealthyRetriedOnDemand
receipt: slow test 18.46s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeRunsInsideTheAdmission
receipt: slow test 6.86s amadan.net/oficina/equipo/internal/runner/thin TestOpenCodeStepsRealOpenCode
machine: 32 CPUs, load 2.62, cpu waiting 0.98%, memory waiting 0.00%, io waiting 0.01%
--- shard 9 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-bug: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestDirectBugWorkflow$|^TestEnrolKeepsTheRole$' ./internal/runner
receipt: test step 47.407s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 46.496s amadan.net/oficina/equipo/internal/runner
receipt: slow test 26.47s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.03s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 40.63, cpu waiting 23.14%, memory waiting 0.00%, io waiting 0.89%
--- shard 10 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-plans: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestPlanWorkflowCandidateOrder$|^TestPlanWorkflowFeature$|^TestCoordinatorRecoveryCallRefusalKeepsServing$|^TestCoordinatorRefusalMatrix$' ./internal/runner
receipt: test step 48.26s 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 47.003s amadan.net/oficina/equipo/internal/runner
receipt: slow test 36.96s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 32.02s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.41s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.61s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 40.63, cpu waiting 23.14%, memory waiting 0.00%, io waiting 0.89%
--- shard 11 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-rest: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^TestDirectBugWorkflow$|^TestEnrolKeepsTheRole$|^TestPlanWorkflowCandidateOrder$|^TestPlanWorkflowFeature$|^TestCoordinatorRecoveryCallRefusalKeepsServing$|^TestCoordinatorRefusalMatrix$' ./internal/runner
receipt: test step 35.274s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 34.436s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.13s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.53s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.11s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 2.25s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 1.61s amadan.net/oficina/equipo/internal/runner TestReportPostsRetryExactRequest
machine: 32 CPUs, load 33.85, cpu waiting 16.12%, memory waiting 0.00%, io waiting 1.08%
--- 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 27.4%, load 21.45
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
internal/runner/containment/helper_version_test.go:133:35: unclassified Node
reference scan: 2556 text files, 2854 matches, 1 failures
--- FAIL: TestDirectDeadReferencesRepository (1.84s)
--- FAIL amadan.net/oficina/equipo/internal/equipotest (package output)
FAIL
rastrillo-budget/v1 ran 1m2.344s
FAIL amadan.net/oficina/equipo/internal/equipotest 62.824s
receipt: test step 1m4.086s 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 1m2.344s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 26.21s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 26.15s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 24.17s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 21.76s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
receipt: slow test 21.48s amadan.net/oficina/equipo/internal/equipotest TestAuthorityReadsOneSnapshot
exit status 1
+ go test -tags testbuild -timeout 15m -run '^Test[A-D]|^TestQ' -v -run '^TestDirectDeadReferencesRepository$' -count=1 ./internal/equipotest (retry, once)
FAILED TWICE ./internal/equipotest:TestDirectDeadReferencesRepository equipotest-a
=== RUN TestDirectDeadReferencesRepository
direct_cutover_test.go:221: repository reference inventory: exit status 1
internal/runner/containment/helper_version_test.go:133:35: unclassified Node
reference scan: 2556 text files, 2854 matches, 1 failures
--- FAIL: TestDirectDeadReferencesRepository (1.81s)
FAIL
rastrillo-budget/v1 ran 1.813s
FAIL amadan.net/oficina/equipo/internal/equipotest 2.083s
FAIL
machine: 32 CPUs, load 35.16, cpu waiting 20.21%, memory waiting 0.00%, io waiting 0.39%
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 27.4%, load 21.45
test lane equipotest-e: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test[E-P]' ./internal/equipotest
receipt: test step 1.304s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1m12.399s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 19.2s amadan.net/oficina/equipo/internal/equipotest TestProjectWritesRequireCurrentOwner
receipt: slow test 19.12s amadan.net/oficina/equipo/internal/equipotest TestProjectOwnersAreMembers
receipt: slow test 19.11s amadan.net/oficina/equipo/internal/equipotest TestProjectsReopen
receipt: slow test 19.11s amadan.net/oficina/equipo/internal/equipotest TestProjectRetryAndRevision
receipt: slow test 19.08s amadan.net/oficina/equipo/internal/equipotest TestProjectsFailuresRollBack
machine: 32 CPUs, load 25.74, cpu waiting 12.65%, memory waiting 0.00%, io waiting 1.16%
--- shard 14 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-r started 30s late; cpu waiting 27.4%, load 21.45
test lane equipotest-r: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestR' ./internal/equipotest
cache miss: amadan.net/oficina/equipo/internal/equipotest: its inputs changed
receipt: test step 1m12.538s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m3.927s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 14.01s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 12.86s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 9.81s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 9.66s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 6.74s amadan.net/oficina/equipo/internal/equipotest TestRosterBootstrapOnce
machine: 32 CPUs, load 32.67, cpu waiting 18.44%, memory waiting 0.00%, io waiting 0.35%
--- shard 15 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-rest started 30s late; cpu waiting 27.4%, load 25.74
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 1.447s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1m5.041s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 24.98s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 23.87s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 23.81s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 22.1s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedAuditRollback
receipt: slow test 22.09s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsUpgrade
machine: 32 CPUs, load 25.74, cpu waiting 12.65%, memory waiting 0.00%, io waiting 1.16%
--- shard 16 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: plan3test started 30s late; cpu waiting 27.4%, load 25.74
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 50.828s 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 48.756s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 3.61s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 3.41s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 1.5s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.47s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3A
receipt: slow test 1.21s amadan.net/oficina/equipo/internal/plan3test TestPlanMigrationUpgrade
machine: 32 CPUs, load 41.48, cpu waiting 24.38%, memory waiting 0.00%, io waiting 0.50%
--- shard 17 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: rest started 30s late; cpu waiting 27.4%, load 21.45
test lane rest: ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/push ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/idtest ./internal/isolatedjob ./internal/isolatedjob/awsjob ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/push ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/idtest ./internal/isolatedjob ./internal/isolatedjob/awsjob ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
cache miss: amadan.net/oficina/equipo/internal/copydesk: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/webread: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/forge: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runnerproto: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/workspace: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/equipo/team: its inputs changed
budget note: internal/equipo took 45.275s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/equipo/chat took 12.529s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/idtest took 39.84s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/release took 34.981s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/runner/containment took 47.193s, over the 15s its record on line 40 allows; reported only, timing fails on CI
budget note: internal/runner/provider/pi took 1m10.725s, over the 1m0s its record on line 27 allows; reported only, timing fails on CI
receipt: test step 1m37.649s against a 60s target (the gate's other steps are not in this figure)
receipt: 14 packages ran, 48 cached, 19 without tests, 0 failed
receipt: slow package 1m10.725s amadan.net/oficina/equipo/internal/runner/provider/pi
receipt: slow package 58.612s amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow package 47.193s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow package 45.275s amadan.net/oficina/equipo/internal/equipo
receipt: slow package 41.465s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow test 23.26s amadan.net/oficina/equipo/internal/runner/provider/opencode TestOpenCodeAcceptanceHostileRepository
receipt: slow test 19.13s amadan.net/oficina/equipo/internal/runner/containment TestEngineeringOfflineGo
receipt: slow test 10.89s amadan.net/oficina/equipo/internal/idtest TestIDCallbackGuardAndPendingNonce
receipt: slow test 10.82s amadan.net/oficina/equipo/internal/equipo TestAgentReadRechecksIdentity
receipt: slow test 10.44s amadan.net/oficina/equipo/internal/runner/containment TestEngineeringMissingModuleCache
machine: 32 CPUs, load 22.00, cpu waiting 11.96%, memory waiting 0.00%, io waiting 0.23%
--- 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 1m23.989s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m22.326s amadan.net/oficina/equipo/internal/headless
receipt: slow test 37.56s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 15.14s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 10.92s amadan.net/oficina/equipo/internal/headless TestBrowserChat
receipt: slow test 7.82s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 5.85s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
machine: 32 CPUs, load 39.36, cpu waiting 23.32%, memory waiting 0.00%, io waiting 0.47%
--- shard 19 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-work: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$' ./internal/headless
receipt: test step 1m34.411s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m32.9s amadan.net/oficina/equipo/internal/headless
receipt: slow test 27.24s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 23.2s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 14.16s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 10.25s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
receipt: slow test 8.15s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
machine: 32 CPUs, load 35.16, cpu waiting 20.21%, memory waiting 0.00%, io waiting 0.39%
--- shard 20 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-connections: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' ./internal/headless
receipt: test step 1m41.546s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m39.907s amadan.net/oficina/equipo/internal/headless
receipt: slow test 14.79s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 13.2s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 12.97s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 10.28s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
receipt: slow test 10.13s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsOpenCodeGoLimitRequired
machine: 32 CPUs, load 32.67, cpu waiting 18.44%, memory waiting 0.00%, io waiting 0.35%
--- shard 21 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-rest: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAskAfterMerge|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' ./internal/headless
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserCopyContinue
=== RUN TestBrowserCopyContinue
time=2026-11-22T16:02:07.049Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-22T16:02:07.049Z level=INFO msg="startup phase done" phase=state_lock took=79µs
time=2026-11-22T16:02:07.049Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-22T16:02:07.049Z level=INFO msg="startup phase done" phase=claim_roots took=92µs
time=2026-11-22T16:02:07.049Z level=INFO msg="startup phase" phase=sweep
time=2026-11-22T16:02:07.083Z level=INFO msg="startup phase done" phase=sweep took=33.789ms
time=2026-11-22T16:02:07.083Z level=INFO msg="startup phase" phase=credentials
time=2026-11-22T16:02:07.083Z level=INFO msg="startup phase done" phase=credentials took=100µs
time=2026-11-22T16:02:07.083Z level=INFO msg="startup phase" phase=open_state
time=2026-11-22T16:02:07.123Z level=INFO msg="startup phase done" phase=open_state took=40.059ms
time=2026-11-22T16:02:07.124Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-22T16:02:07.125Z level=INFO msg=connecting host=127.0.0.1:41109 protocol=28
time=2026-11-22T16:02:07.128Z level=INFO msg=connected host=127.0.0.1:41109 took=2.485ms
time=2026-11-22T16:02:07.130Z level=INFO msg="capabilities gathering"
time=2026-11-22T16:02:07.137Z level=INFO msg="capabilities gathered" took=6.497ms tags=linux,claude,go
time=2026-11-22T16:02:07.137Z level=INFO msg="hello sent" protocol=28
time=2026-11-22T16:02:07.144Z level=INFO msg=welcome protocol=28 role=primary generation=1
browser_copy_test.go:93: continue did not reach Checks: 0 <nil>
--- FAIL: TestBrowserCopyContinue (1.96s)
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserEmptyExplore
=== RUN TestBrowserEmptyExplore
time=2026-11-22T16:02:39.289Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-22T16:02:39.289Z level=INFO msg="startup phase done" phase=state_lock took=72µs
time=2026-11-22T16:02:39.289Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-22T16:02:39.289Z level=INFO msg="startup phase done" phase=claim_roots took=96µs
time=2026-11-22T16:02:39.289Z level=INFO msg="startup phase" phase=sweep
time=2026-11-22T16:02:39.320Z level=INFO msg="startup phase done" phase=sweep took=30.384ms
time=2026-11-22T16:02:39.320Z level=INFO msg="startup phase" phase=credentials
time=2026-11-22T16:02:39.320Z level=INFO msg="startup phase done" phase=credentials took=98µs
time=2026-11-22T16:02:39.320Z level=INFO msg="startup phase" phase=open_state
time=2026-11-22T16:02:39.361Z level=INFO msg="startup phase done" phase=open_state took=41.493ms
time=2026-11-22T16:02:39.362Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-22T16:02:39.363Z level=INFO msg=connecting host=127.0.0.1:40227 protocol=28
time=2026-11-22T16:02:39.364Z level=INFO msg=connected host=127.0.0.1:40227 took=824µs
time=2026-11-22T16:02:39.364Z level=INFO msg="capabilities gathering"
time=2026-11-22T16:02:39.365Z level=INFO msg="capabilities gathered" took=1.134ms tags=linux,claude,go
time=2026-11-22T16:02:39.366Z level=INFO msg="hello sent" protocol=28
time=2026-11-22T16:02:39.370Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-22T16:02:40.400Z level=INFO msg="connection checked" connection=claude-1 state=healthy
browser_receipts_test.go:169: waiting for [...document.querySelectorAll('[equipo-markdown]:not([data-stream-text])')].some(e=>e.textContent.includes("I'm your coordinator")): context deadline exceeded (last evaluation: <nil>)
--- FAIL: TestBrowserEmptyExplore (5.84s)
--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m28.58s
FAIL amadan.net/oficina/equipo/internal/headless 88.906s
receipt: test step 1m30.406s 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 1m28.58s amadan.net/oficina/equipo/internal/headless
receipt: slow test 15.27s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
rastrillo: budget test: go test failed
receipt: slow test 11.63s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 10.61s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 10.38s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 7.97s amadan.net/oficina/equipo/internal/headless TestBrowserRefreshRace
exit status 1
+ go test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAskAfterMerge|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' -v -run '^TestBrowserCopyContinue$|^TestBrowserEmptyExplore$' -count=1 ./internal/headless (retry, once)
FAILED TWICE ./internal/headless:TestBrowserCopyContinue browser-headless-rest
FAILED TWICE ./internal/headless:TestBrowserEmptyExplore browser-headless-rest
=== RUN TestBrowserCopyContinue
time=2026-11-22T16:03:00.445Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-22T16:03:00.445Z level=INFO msg="startup phase done" phase=state_lock took=69µs
time=2026-11-22T16:03:00.445Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-22T16:03:00.446Z level=INFO msg="startup phase done" phase=claim_roots took=103µs
time=2026-11-22T16:03:00.446Z level=INFO msg="startup phase" phase=sweep
time=2026-11-22T16:03:00.478Z level=INFO msg="startup phase done" phase=sweep took=32.506ms
time=2026-11-22T16:03:00.478Z level=INFO msg="startup phase" phase=credentials
time=2026-11-22T16:03:00.478Z level=INFO msg="startup phase done" phase=credentials took=110µs
time=2026-11-22T16:03:00.478Z level=INFO msg="startup phase" phase=open_state
time=2026-11-22T16:03:00.519Z level=INFO msg="startup phase done" phase=open_state took=40.577ms
time=2026-11-22T16:03:00.519Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-22T16:03:00.520Z level=INFO msg=connecting host=127.0.0.1:43117 protocol=28
time=2026-11-22T16:03:00.521Z level=INFO msg=connected host=127.0.0.1:43117 took=918µs
time=2026-11-22T16:03:00.521Z level=INFO msg="capabilities gathering"
time=2026-11-22T16:03:00.522Z level=INFO msg="capabilities gathered" took=372µs tags=linux,claude,go
time=2026-11-22T16:03:00.523Z level=INFO msg="hello sent" protocol=28
time=2026-11-22T16:03:00.527Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-22T16:03:01.474Z level=WARN msg="judge tree" err=*errors.errorString
--- PASS: TestBrowserCopyContinue (2.60s)
=== RUN TestBrowserEmptyExplore
time=2026-11-22T16:03:01.987Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-22T16:03:01.987Z level=INFO msg="startup phase done" phase=state_lock took=72µs
time=2026-11-22T16:03:01.987Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-22T16:03:01.987Z level=INFO msg="startup phase done" phase=claim_roots took=80µs
time=2026-11-22T16:03:01.987Z level=INFO msg="startup phase" phase=sweep
time=2026-11-22T16:03:02.020Z level=INFO msg="startup phase done" phase=sweep took=32.399ms
time=2026-11-22T16:03:02.020Z level=INFO msg="startup phase" phase=credentials
time=2026-11-22T16:03:02.020Z level=INFO msg="startup phase done" phase=credentials took=121µs
time=2026-11-22T16:03:02.020Z level=INFO msg="startup phase" phase=open_state
time=2026-11-22T16:03:02.059Z level=INFO msg="startup phase done" phase=open_state took=39.392ms
time=2026-11-22T16:03:02.060Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-22T16:03:02.061Z level=INFO msg=connecting host=127.0.0.1:39649 protocol=28
time=2026-11-22T16:03:02.062Z level=INFO msg=connected host=127.0.0.1:39649 took=850µs
time=2026-11-22T16:03:02.062Z level=INFO msg="capabilities gathering"
time=2026-11-22T16:03:02.062Z level=INFO msg="capabilities gathered" took=369µs tags=linux,claude,go
time=2026-11-22T16:03:02.063Z level=INFO msg="hello sent" protocol=28
time=2026-11-22T16:03:02.067Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-22T16:03:02.942Z level=INFO msg="connection checked" connection=claude-1 state=healthy
browser_receipts_test.go:169: waiting for [...document.querySelectorAll('[equipo-markdown]:not([data-stream-text])')].some(e=>e.textContent.includes("I'm your coordinator")): context deadline exceeded (last evaluation: <nil>)
--- FAIL: TestBrowserEmptyExplore (5.73s)
FAIL
rastrillo-budget/v1 ran 8.331s
FAIL amadan.net/oficina/equipo/internal/headless 8.600s
FAIL
machine: 32 CPUs, load 32.67, cpu waiting 19.07%, memory waiting 0.00%, io waiting 0.37%
make: *** [Makefile:113: ci-shard] Error 1
amadan: step check shard 21 of 29 failed: exit status 2
--- shard 22 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-rest: ./internal/equipo
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserPreviewBlocksNavigation)$' ./internal/equipo
receipt: test step 1.242s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 573ms amadan.net/oficina/equipo/internal/equipo
receipt: slow test 570ms amadan.net/oficina/equipo/internal/equipo TestBrowserPreviewBlocksNavigation
browser lane browser-rest: ./internal/idtest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserOficinaIDDoor)$' ./internal/idtest
receipt: test step 873ms against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1.673s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 1.67s amadan.net/oficina/equipo/internal/idtest TestBrowserOficinaIDDoor
browser lane browser-rest: ./internal/plan3test
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestTeamsHierarchyBrowser)$' ./internal/plan3test
receipt: test step 3.145s 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 1.856s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 1.86s amadan.net/oficina/equipo/internal/plan3test TestTeamsHierarchyBrowser
browser lane browser-rest: ./internal/thintest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAccessEmojiByline|TestBrowserAccessFinalOutcomes|TestBrowserAccessRequest|TestBrowserAccessReview|TestBrowserActivitySubjects|TestBrowserAutonomySettings|TestBrowserCoordinatorQueue|TestBrowserEmptyConversation|TestBrowserEndedNoteStaysGone|TestBrowserHousekeeping|TestBrowserInnerGallery|TestBrowserInnerScreens|TestBrowserInstantThinking|TestBrowserInstantThinkingQueued|TestBrowserMachines|TestBrowserPhoneIndex|TestBrowserPlacementQuestionAndPending|TestBrowserProjectPlacement|TestBrowserProjectsList|TestBrowserReportActionFeedback|TestBrowserReportNextSteps|TestBrowserReportThread|TestBrowserRollup|TestBrowserRosterAlignment|TestBrowserRosterDecisionStates|TestBrowserRosterQuietDay|TestBrowserRosterReports|TestBrowserRosterSetAside|TestBrowserRosterSubchat|TestBrowserRosterThinking|TestBrowserRosterVisual|TestBrowserSettingsHousekeepingGroups|TestBrowserSettingsMenu|TestBrowserSettingsRail|TestBrowserSettingsSaveBar|TestBrowserSettingsShots|TestBrowserSettingsStayOnPage|TestBrowserSettingsTeams|TestBrowserShipsButtons|TestBrowserSpecialistRows|TestBrowserSpendFollowsAnswers|TestBrowserTaskRows|TestBrowserTeamPanel|TestBrowserThinkingCycles|TestBrowserThinkingLinesClear|TestBrowserThinkingSteady|TestBrowserThinkingWords|TestBrowserTokenRowEmail|TestBrowserTrackPulse|TestBrowserTrackStarCentre|TestBrowserTryAgain)$' ./internal/thintest
receipt: test step 1.101s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 3m20.199s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 17.52s amadan.net/oficina/equipo/internal/thintest TestBrowserAccessRequest
receipt: slow test 14.35s amadan.net/oficina/equipo/internal/thintest TestBrowserSettingsTeams
receipt: slow test 12.02s amadan.net/oficina/equipo/internal/thintest TestBrowserThinkingCycles
receipt: slow test 10.55s amadan.net/oficina/equipo/internal/thintest TestBrowserPlacementQuestionAndPending
receipt: slow test 7.93s amadan.net/oficina/equipo/internal/thintest TestBrowserInnerScreens
machine: 32 CPUs, load 14.46, cpu waiting 3.91%, memory waiting 0.00%, io waiting 1.73%
--- shard 23 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
shard 23: make test-quarantine
python3 scripts/ci-test.py quarantine
quarantine: 12 tests from scripts/ci-quarantine.txt; a failure is retried once, and a pass on the retry is reported as a flake
+ go test -tags testbuild -timeout 15m -v -run '^TestHeadlessConnections$/^A5_cancel_and_sign_out$|^TestHeadlessConnections$/^C4_claude_sign_in$|^TestHeadlessConnections$/^C5_engineering_failover$|^TestHeadlessConnections$/^C5_engineering_to_codex$|^TestHeadlessConnections$/^C5_engineering_waits$' ./internal/headless (53s)
ok ./internal/headless TestHeadlessConnections/A5_cancel_and_sign_out 5.29s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.47s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 9.65s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 9.93s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 24.84s
+ 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 (82s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 11.99s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 24.50s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 20.58s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 22.44s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless (22s)
ok ./internal/headless TestMixedVersions 20.28s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks (2s)
ok ./internal/runner/checks TestCheckSandboxDeniedPathsTampering 0.81s
+ go test -tags testbuild -timeout 15m -v -run '^TestRunnerCancelAndSupersede$' ./internal/runner/thin (2s)
ok ./internal/runner/thin TestRunnerCancelAndSupersede 0.05s
quarantine: 0 flaked (passed on the retry), 0 failed
machine: 32 CPUs, load 41.48, cpu waiting 24.38%, memory waiting 0.00%, io waiting 0.50%
--- 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 9.699s against a 60s target (the gate's other steps are not in this figure)
receipt: 4 packages ran, 0 cached, 3 without tests, 0 failed
receipt: slow package 6.884s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 145ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 61ms amadan.net/oficina/equipo/internal/runner/provider/codex
receipt: slow package 2ms amadan.net/oficina/equipo/internal/runner/provider
receipt: slow package 0s amadan.net/oficina/equipo/internal/runner/provider/gotoolchain
receipt: slow test 4.93s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.59s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 290ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 140ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 60ms amadan.net/oficina/equipo/internal/runner/provider/codex TestDirectJournalAdapterBarrier
CGO_ENABLED=0 EQUIPO_REQUIRE_USER_SESSION=1 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run '^TestNamespace' -count=1 ./internal/runner/containment
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run '^TestNamespace' -count=1 ./internal/runner/containment
receipt: test step 3.784s 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.871s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 280ms 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 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryCleansScratch
receipt: slow test 100ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceExitStatus
machine: 32 CPUs, load 16.74, cpu waiting 6.14%, memory waiting 0.00%, io waiting 1.57%
--- 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 27.4%, load 21.45
shard 25: make runner-dead-references lanes-check build vet fmt-check budget migration-check
python3 scripts/runner-dead-references.py
internal/runner/containment/helper_version_test.go:133:35: unclassified Node
reference scan: 2556 text files, 2854 matches, 1 failures
make[1]: *** [Makefile:229: runner-dead-references] Error 1
machine: 32 CPUs, load 25.74, cpu waiting 12.65%, memory waiting 0.00%, io waiting 1.16%
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 27.4%, load 21.45
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 37.55, cpu waiting 20.44%, memory waiting 0.00%, io waiting 0.98%
--- 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 27.4%, load 21.45
shard 27: make govulncheck
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 ./...
=== Symbol Results ===
No vulnerabilities found.
Your code is affected by 0 vulnerabilities.
This scan also found 0 vulnerabilities in packages you import and 5
vulnerabilities in modules you require, but your code doesn't appear to call
these vulnerabilities.
Use '-show verbose' for more details.
machine: 32 CPUs, load 33.85, cpu waiting 16.12%, memory waiting 0.00%, io waiting 1.08%
--- 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 27.4%, load 25.74
shard 28: make gitleaks
[90m4:01PM[0m [32mINF[0m [1mUnknown SCM platform. Use --platform to include links in findings.[0m [36mhost=[0mamadan.net
[90m4:02PM[0m [32mINF[0m [1m1102 commits scanned.[0m
[90m4:02PM[0m [32mINF[0m [1mscanned ~61225968 bytes (61.23 MB) in 15.1s[0m
[90m4:02PM[0m [32mINF[0m [1mno leaks found[0m
machine: 32 CPUs, load 40.63, cpu waiting 22.47%, memory waiting 0.00%, io waiting 0.92%
amadan: job failed at step check shards 12, 21, 25 of 29 — its output is above, not at the tail of this log
diff --git a/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md b/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md| index cb18514c..c4ce2b7e 100644 |
| --- a/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md |
| +++ b/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md |
| @@ -52,3 +52,13 @@ Fix: `parentFixture` takes `RunnerBinary` from `os.Executable()` (panicking on i |
| | `cgroupSkip` ignores `require` (`case require && false:`) | `go test ./internal/runner/containment -run 'TestCgroupSessionRule' -count=1` | `linux_test.go:264: no session required: cgroupSkip = (true, "no systemd user session; production containment does not use cgroups", false), want (false, "EQUIPO_REQUIRE_USER_SESSION=1 but no systemd user session at /sys/fs/cgroup/user.slice/user-1000.slice/user@1000.service: file does not exist", true)` | yes, `-run 'TestCgroupSessionRule'` passes | |
| On docs-t1 (bubblewrap 0.11.0, session cgroup present): `go test ./internal/runner/containment -run '^TestNamespaceCgroupMoveKeepsMembership$' -count=1 -v` gives `--- PASS: TestNamespaceCgroupMoveKeepsMembership (0.11s)`, and the same with `EQUIPO_REQUIRE_USER_SESSION=1` gives `--- PASS (0.13s)`. |
| + |
| +## Task 5 |
| + |
| +New package `internal/isolatedjob`: the `Runner` interface, `LaunchSpec.Validate`, the state sets, `Clock` with `SystemClock()`, and `NetworkAudit.OK`. An attempt ID is 1 to 64 ASCII letters, digits or `-` (it becomes the AWS client token, which takes up to 128). Validate wraps `ErrInvalid` for every failure except an oversized bootstrap, which wraps `ErrBootstrapTooLarge`. |
| + |
| +| Mutation | Command | Observed failure | Restored | |
| +| --- | --- | --- | --- | |
| +| `unknown` is terminal (`case StateStopped, StateFailed, StateUnknown:`) | `go test ./internal/isolatedjob -run 'TestStateSets' -count=1` | `isolatedjob_test.go:141: State("unknown").Terminal() = true, want false` | yes, `-run 'TestStateSets'` passes | |
| +| `>=` on the lifetime limit (`s.MaxLifetime >= limit`) | `go test ./internal/isolatedjob -run 'TestLaunchSpecValidate' -count=1` | `isolatedjob_test.go:83: Validate = isolatedjob: invalid request: lifetime 8h0m0s must be above zero and at most 8h0m0s, want nil` (also the 1h provider-limit row) | yes, `-run 'TestLaunchSpecValidate'` passes | |
| +| Extra: `OK` ignores missing egress (`missingFrom(want, a.EgressOnly)[:0]`) | `go test ./internal/isolatedjob -run 'TestNetworkAuditOK' -count=1` | `isolatedjob_test.go:195: OK = nil, want an error naming [egress]` (the missing-egress and nothing-seen rows) | yes, whole package passes | |
diff --git a/internal/isolatedjob/clock.go b/internal/isolatedjob/clock.go| new file mode 100644 |
| index 00000000..e2620df3 |
| --- /dev/null |
| +++ b/internal/isolatedjob/clock.go |
| @@ -0,0 +1,24 @@ |
| +package isolatedjob |
| + |
| +import "time" |
| + |
| +// Clock gives the controller two readings. Wall is the calendar time, which |
| +// can jump when the host clock is set. Mono is time elapsed since some fixed |
| +// start; it never decreases, so deadlines and timeouts use it. |
| +type Clock interface { |
| + Wall() time.Time |
| + Mono() time.Duration |
| +} |
| + |
| +// SystemClock returns a Clock on this host's clocks. Mono is measured with |
| +// Go's monotonic reading from the moment SystemClock is called. |
| +func SystemClock() Clock { |
| + return systemClock{start: time.Now()} |
| +} |
| + |
| +type systemClock struct{ start time.Time } |
| + |
| +// Wall strips the monotonic reading, so a Wall value never stands in for Mono. |
| +func (c systemClock) Wall() time.Time { return time.Now().Round(0) } |
| + |
| +func (c systemClock) Mono() time.Duration { return time.Since(c.start) } |
diff --git a/internal/isolatedjob/isolatedjob.go b/internal/isolatedjob/isolatedjob.go| new file mode 100644 |
| index 00000000..9118ec83 |
| --- /dev/null |
| +++ b/internal/isolatedjob/isolatedjob.go |
| @@ -0,0 +1,195 @@ |
| +// Package isolatedjob is the provider-neutral face of hosted runner VMs. The |
| +// controller launches, watches, suspends and stops VMs through Runner and |
| +// never sees a provider type. The AWS Lambda MicroVMs implementation belongs |
| +// in awsjob. |
| +// |
| +// A provider state this package does not know maps to StateUnknown, which is |
| +// never live, never terminal and never proof that a VM has stopped. |
| +package isolatedjob |
| + |
| +import ( |
| + "context" |
| + "errors" |
| + "fmt" |
| + "net/netip" |
| + "slices" |
| + "strings" |
| + "time" |
| +) |
| + |
| +// Runner launches and manages isolated job VMs. |
| +type Runner interface { |
| + Launch(ctx context.Context, s LaunchSpec) (Ref, error) // idempotent on AttemptID |
| + Get(ctx context.Context, ref Ref) (Job, error) |
| + Suspend(ctx context.Context, ref Ref) error |
| + Resume(ctx context.Context, ref Ref) error |
| + Stop(ctx context.Context, ref Ref, reason string) error // succeeds if already gone |
| + List(ctx context.Context) ([]Job, error) // all VMs the provider holds |
| + Limits() Limits |
| +} |
| + |
| +// Ref is the provider's identifier for one VM. |
| +type Ref string |
| + |
| +// ImageDigest names a certified base image: "sha256:" and 64 lower-case hex |
| +// digits. |
| +type ImageDigest string |
| + |
| +// Size is the memory class of a VM. One image version has one size. |
| +type Size string |
| + |
| +const ( |
| + SizeSmall Size = "small" // 2 GB |
| + SizeLarge Size = "large" // 4 GB |
| +) |
| + |
| +// MemoryMiB returns the VM memory for s in MiB, or 0 when s is not a known |
| +// size. |
| +func (s Size) MemoryMiB() int { |
| + switch s { |
| + case SizeSmall: |
| + return 2048 |
| + case SizeLarge: |
| + return 4096 |
| + } |
| + return 0 |
| +} |
| + |
| +// State is a VM's lifecycle state in this package's vocabulary. |
| +type State string |
| + |
| +const ( |
| + StateStarting State = "starting" |
| + StateRunning State = "running" |
| + StateSuspending State = "suspending" |
| + StateSuspended State = "suspended" |
| + StateStopping State = "stopping" |
| + StateStopped State = "stopped" |
| + StateFailed State = "failed" |
| + StateUnknown State = "unknown" |
| +) |
| + |
| +// Live reports whether the VM may still exist and run or resume work. |
| +// Unknown and unrecognised states are not live. |
| +func (s State) Live() bool { |
| + switch s { |
| + case StateStarting, StateRunning, StateSuspending, StateSuspended, StateStopping: |
| + return true |
| + } |
| + return false |
| +} |
| + |
| +// Terminal reports whether the state proves the VM has ended. Unknown and |
| +// unrecognised states are not terminal. |
| +func (s State) Terminal() bool { |
| + switch s { |
| + case StateStopped, StateFailed: |
| + return true |
| + } |
| + return false |
| +} |
| + |
| +// HardMaxLifetime is the longest a VM may live, running and suspended time |
| +// together, whatever a provider allows. |
| +const HardMaxLifetime = 28800 * time.Second |
| + |
| +// LaunchSpec is one launch request. Launching the same AttemptID twice gives |
| +// the same VM. |
| +type LaunchSpec struct { |
| + AttemptID string |
| + Image ImageDigest // must be certified |
| + Size Size // SizeSmall or SizeLarge |
| + MaxLifetime time.Duration // includes suspended time |
| + Bootstrap []byte // the one-time enrolment code only |
| +} |
| + |
| +// Job is one VM as the provider reports it. |
| +type Job struct { |
| + Ref Ref |
| + State State |
| + StartedAt time.Time |
| + Reason string |
| + |
| + // ProviderAge is the provider's server time minus the provider's start |
| + // time for the VM, both taken from one response. It is never worked out |
| + // from this host's clock. AgeKnown is false when the response lacked |
| + // either time. |
| + ProviderAge time.Duration |
| + AgeKnown bool |
| +} |
| + |
| +// Limits are what a provider allows. |
| +type Limits struct { |
| + MaxLifetime time.Duration |
| + MaxBootstrapBytes int |
| + SuspendUsesLifetime bool // suspended time counts towards MaxLifetime |
| + ConnectionsSurvive bool // open connections survive suspend and resume |
| +} |
| + |
| +var ( |
| + // ErrNotFound: the provider holds no VM with this ref. |
| + ErrNotFound = errors.New("isolatedjob: not found") |
| + // ErrInvalid: the request is malformed or outside the provider's limits. |
| + ErrInvalid = errors.New("isolatedjob: invalid request") |
| + // ErrConflict: the VM's current state does not allow the operation, or |
| + // an attempt ID was reused with a different request. |
| + ErrConflict = errors.New("isolatedjob: conflict") |
| + // ErrThrottled: the provider asked us to slow down; retry later. |
| + ErrThrottled = errors.New("isolatedjob: throttled") |
| + // ErrIncomplete: the provider's answer cannot be trusted as whole, for |
| + // example a list that could not read every page. |
| + ErrIncomplete = errors.New("isolatedjob: incomplete answer") |
| + // ErrBootstrapTooLarge: the bootstrap is longer than the provider takes. |
| + // Validate returns it instead of ErrInvalid for an oversized bootstrap. |
| + ErrBootstrapTooLarge = errors.New("isolatedjob: bootstrap too large") |
| +) |
| + |
| +// NetworkAuditor reads the provider's network settings for hosted VMs as they |
| +// are now, not as they were configured. |
| +type NetworkAuditor interface { |
| + AuditNetwork(ctx context.Context) (NetworkAudit, error) |
| +} |
| + |
| +// NetworkAudit is one reading of the network hosted VMs launch into. |
| +type NetworkAudit struct { |
| + ResolverDisabled bool // the provider's managed DNS is off |
| + IngressClosed bool // VMs take no inbound connections |
| + RouteOutAbsent bool // the VMs' subnet has no internet route |
| + EgressOnly []netip.AddrPort // every destination VMs are allowed to reach |
| +} |
| + |
| +// OK returns nil only when the resolver is off, ingress is closed, no route |
| +// out exists and EgressOnly holds exactly the destinations in want, in any |
| +// order. Otherwise its error names every property that failed. |
| +func (a NetworkAudit) OK(want []netip.AddrPort) error { |
| + var failed []string |
| + if !a.ResolverDisabled { |
| + failed = append(failed, "resolver enabled") |
| + } |
| + if !a.IngressClosed { |
| + failed = append(failed, "ingress open") |
| + } |
| + if !a.RouteOutAbsent { |
| + failed = append(failed, "route out present") |
| + } |
| + extra := missingFrom(a.EgressOnly, want) |
| + missing := missingFrom(want, a.EgressOnly) |
| + if len(extra) > 0 || len(missing) > 0 { |
| + failed = append(failed, fmt.Sprintf("egress differs (extra %v, missing %v)", extra, missing)) |
| + } |
| + if len(failed) == 0 { |
| + return nil |
| + } |
| + return errors.New("isolatedjob: network audit failed: " + strings.Join(failed, "; ")) |
| +} |
| + |
| +// missingFrom returns the members of have that are not in set. |
| +func missingFrom(have, set []netip.AddrPort) []netip.AddrPort { |
| + var out []netip.AddrPort |
| + for _, p := range have { |
| + if !slices.Contains(set, p) && !slices.Contains(out, p) { |
| + out = append(out, p) |
| + } |
| + } |
| + return out |
| +} |
diff --git a/internal/isolatedjob/isolatedjob_test.go b/internal/isolatedjob/isolatedjob_test.go| new file mode 100644 |
| index 00000000..3b9d7ca8 |
| --- /dev/null |
| +++ b/internal/isolatedjob/isolatedjob_test.go |
| @@ -0,0 +1,232 @@ |
| +package isolatedjob |
| + |
| +import ( |
| + "errors" |
| + "net/netip" |
| + "os" |
| + "strings" |
| + "testing" |
| + "time" |
| + |
| + "amadan.net/rastrillo/rastrillo/budget" |
| +) |
| + |
| +func TestMain(m *testing.M) { os.Exit(budget.Main(m)) } |
| + |
| +const goodDigest = ImageDigest("sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef") |
| + |
| +func goodSpec() LaunchSpec { |
| + return LaunchSpec{ |
| + AttemptID: "attempt-1", |
| + Image: goodDigest, |
| + Size: SizeSmall, |
| + MaxLifetime: time.Hour, |
| + Bootstrap: []byte("one-time-code"), |
| + } |
| +} |
| + |
| +func TestLaunchSpecValidate(t *testing.T) { |
| + limits := Limits{MaxLifetime: HardMaxLifetime, MaxBootstrapBytes: 4096} |
| + short := Limits{MaxLifetime: time.Hour, MaxBootstrapBytes: 4096} |
| + loose := Limits{MaxLifetime: 10 * time.Hour, MaxBootstrapBytes: 4096} |
| + |
| + cases := []struct { |
| + name string |
| + limits Limits |
| + edit func(*LaunchSpec) |
| + want error // nil means the spec passes |
| + field string // a word the error must name |
| + }{ |
| + {"good", limits, func(*LaunchSpec) {}, nil, ""}, |
| + {"attempt id empty", limits, func(s *LaunchSpec) { s.AttemptID = "" }, ErrInvalid, "attempt id"}, |
| + {"attempt id 65 chars", limits, func(s *LaunchSpec) { s.AttemptID = strings.Repeat("a", 65) }, ErrInvalid, "attempt id"}, |
| + {"attempt id underscore", limits, func(s *LaunchSpec) { s.AttemptID = "attempt_1" }, ErrInvalid, "attempt id"}, |
| + {"attempt id space", limits, func(s *LaunchSpec) { s.AttemptID = "attempt 1" }, ErrInvalid, "attempt id"}, |
| + {"attempt id non-ascii", limits, func(s *LaunchSpec) { s.AttemptID = "attempt-é" }, ErrInvalid, "attempt id"}, |
| + {"attempt id 64 chars at limit", limits, func(s *LaunchSpec) { s.AttemptID = strings.Repeat("A9-", 21) + "z" }, nil, ""}, |
| + {"attempt id one char", limits, func(s *LaunchSpec) { s.AttemptID = "a" }, nil, ""}, |
| + {"image empty", limits, func(s *LaunchSpec) { s.Image = "" }, ErrInvalid, "image"}, |
| + {"image no prefix", limits, func(s *LaunchSpec) { s.Image = goodDigest[len("sha256:"):] }, ErrInvalid, "image"}, |
| + {"image upper prefix", limits, func(s *LaunchSpec) { s.Image = ImageDigest(strings.ToUpper(string(goodDigest[:20]))) + goodDigest[20:] }, ErrInvalid, "image"}, |
| + {"image upper hex digit", limits, func(s *LaunchSpec) { s.Image = goodDigest[:len(goodDigest)-1] + "F" }, ErrInvalid, "image"}, |
| + {"image short", limits, func(s *LaunchSpec) { s.Image = goodDigest[:len(goodDigest)-1] }, ErrInvalid, "image"}, |
| + {"image long", limits, func(s *LaunchSpec) { s.Image = goodDigest + "0" }, ErrInvalid, "image"}, |
| + {"image other algorithm", limits, func(s *LaunchSpec) { s.Image = "sha512:" + goodDigest[len("sha256:"):] }, ErrInvalid, "image"}, |
| + {"size empty", limits, func(s *LaunchSpec) { s.Size = "" }, ErrInvalid, "size"}, |
| + {"size medium", limits, func(s *LaunchSpec) { s.Size = "medium" }, ErrInvalid, "size"}, |
| + {"size capitalised", limits, func(s *LaunchSpec) { s.Size = "Small" }, ErrInvalid, "size"}, |
| + {"size large", limits, func(s *LaunchSpec) { s.Size = SizeLarge }, nil, ""}, |
| + {"lifetime zero", limits, func(s *LaunchSpec) { s.MaxLifetime = 0 }, ErrInvalid, "lifetime"}, |
| + {"lifetime negative", limits, func(s *LaunchSpec) { s.MaxLifetime = -time.Second }, ErrInvalid, "lifetime"}, |
| + {"lifetime one nanosecond", limits, func(s *LaunchSpec) { s.MaxLifetime = 1 }, nil, ""}, |
| + {"lifetime over the provider limit", short, func(s *LaunchSpec) { s.MaxLifetime = time.Hour + time.Second }, ErrInvalid, "lifetime"}, |
| + {"lifetime at the provider limit", short, func(s *LaunchSpec) { s.MaxLifetime = time.Hour }, nil, ""}, |
| + {"lifetime 28801 s", limits, func(s *LaunchSpec) { s.MaxLifetime = 28801 * time.Second }, ErrInvalid, "lifetime"}, |
| + {"lifetime 28801 s over a looser provider", loose, func(s *LaunchSpec) { s.MaxLifetime = 28801 * time.Second }, ErrInvalid, "lifetime"}, |
| + {"lifetime 28800 s at the hard limit", limits, func(s *LaunchSpec) { s.MaxLifetime = 28800 * time.Second }, nil, ""}, |
| + {"lifetime 28800 s at the hard limit, looser provider", loose, func(s *LaunchSpec) { s.MaxLifetime = 28800 * time.Second }, nil, ""}, |
| + {"lifetime with no provider limit", Limits{MaxBootstrapBytes: 4096}, func(*LaunchSpec) {}, ErrInvalid, "lifetime"}, |
| + {"bootstrap empty", limits, func(s *LaunchSpec) { s.Bootstrap = nil }, ErrInvalid, "bootstrap"}, |
| + {"bootstrap zero length", limits, func(s *LaunchSpec) { s.Bootstrap = []byte{} }, ErrInvalid, "bootstrap"}, |
| + {"bootstrap one byte", limits, func(s *LaunchSpec) { s.Bootstrap = []byte("x") }, nil, ""}, |
| + {"bootstrap at the limit", limits, func(s *LaunchSpec) { s.Bootstrap = make([]byte, 4096) }, nil, ""}, |
| + {"bootstrap one byte over", limits, func(s *LaunchSpec) { s.Bootstrap = make([]byte, 4097) }, ErrBootstrapTooLarge, "bootstrap"}, |
| + {"bootstrap with no provider limit", Limits{MaxLifetime: HardMaxLifetime}, func(*LaunchSpec) {}, ErrBootstrapTooLarge, "bootstrap"}, |
| + } |
| + for _, c := range cases { |
| + t.Run(c.name, func(t *testing.T) { |
| + s := goodSpec() |
| + c.edit(&s) |
| + err := s.Validate(c.limits) |
| + if c.want == nil { |
| + if err != nil { |
| + t.Fatalf("Validate = %v, want nil", err) |
| + } |
| + return |
| + } |
| + if !errors.Is(err, c.want) { |
| + t.Fatalf("Validate = %v, want %v", err, c.want) |
| + } |
| + if !strings.Contains(err.Error(), c.field) { |
| + t.Fatalf("Validate = %q, want it to name %q", err, c.field) |
| + } |
| + }) |
| + } |
| +} |
| + |
| +func TestHardMaxLifetime(t *testing.T) { |
| + if HardMaxLifetime != 8*time.Hour { |
| + t.Fatalf("HardMaxLifetime = %v, want 8h", HardMaxLifetime) |
| + } |
| +} |
| + |
| +func TestSizeMemory(t *testing.T) { |
| + for _, c := range []struct { |
| + size Size |
| + mib int |
| + }{{SizeSmall, 2048}, {SizeLarge, 4096}, {"", 0}, {"medium", 0}} { |
| + if got := c.size.MemoryMiB(); got != c.mib { |
| + t.Errorf("Size(%q).MemoryMiB() = %d, want %d", c.size, got, c.mib) |
| + } |
| + } |
| + if SizeSmall != "small" || SizeLarge != "large" { |
| + t.Fatalf("sizes = %q, %q", SizeSmall, SizeLarge) |
| + } |
| +} |
| + |
| +func TestStateSets(t *testing.T) { |
| + cases := []struct { |
| + state State |
| + live, terminal bool |
| + }{ |
| + {StateStarting, true, false}, |
| + {StateRunning, true, false}, |
| + {StateSuspending, true, false}, |
| + {StateSuspended, true, false}, |
| + {StateStopping, true, false}, |
| + {StateStopped, false, true}, |
| + {StateFailed, false, true}, |
| + {StateUnknown, false, false}, |
| + // Values no adapter should produce are treated as unknown. |
| + {"", false, false}, |
| + {"TERMINATED", false, false}, |
| + {"RUNNING", false, false}, |
| + {"Stopped", false, false}, |
| + } |
| + for _, c := range cases { |
| + if got := c.state.Live(); got != c.live { |
| + t.Errorf("State(%q).Live() = %v, want %v", c.state, got, c.live) |
| + } |
| + if got := c.state.Terminal(); got != c.terminal { |
| + t.Errorf("State(%q).Terminal() = %v, want %v", c.state, got, c.terminal) |
| + } |
| + } |
| + want := map[State]string{ |
| + StateStarting: "starting", StateRunning: "running", StateSuspending: "suspending", |
| + StateSuspended: "suspended", StateStopping: "stopping", StateStopped: "stopped", |
| + StateFailed: "failed", StateUnknown: "unknown", |
| + } |
| + for s, v := range want { |
| + if string(s) != v { |
| + t.Errorf("state %q, want %q", s, v) |
| + } |
| + } |
| +} |
| + |
| +func TestNetworkAuditOK(t *testing.T) { |
| + a := netip.MustParseAddrPort("10.0.0.1:443") |
| + b := netip.MustParseAddrPort("10.0.0.2:443") |
| + c := netip.MustParseAddrPort("10.0.0.1:80") |
| + clean := func(egress ...netip.AddrPort) NetworkAudit { |
| + return NetworkAudit{ResolverDisabled: true, IngressClosed: true, RouteOutAbsent: true, EgressOnly: egress} |
| + } |
| + all := []string{"resolver", "ingress", "route out", "egress"} |
| + |
| + cases := []struct { |
| + name string |
| + audit NetworkAudit |
| + want []netip.AddrPort |
| + named []string // properties the error must name; nil means OK |
| + }{ |
| + {"exact", clean(a, b), []netip.AddrPort{a, b}, nil}, |
| + {"other order", clean(b, a), []netip.AddrPort{a, b}, nil}, |
| + {"single", clean(a), []netip.AddrPort{a}, nil}, |
| + {"none wanted none seen", clean(), nil, nil}, |
| + {"resolver on", NetworkAudit{IngressClosed: true, RouteOutAbsent: true, EgressOnly: []netip.AddrPort{a}}, []netip.AddrPort{a}, []string{"resolver"}}, |
| + {"ingress open", NetworkAudit{ResolverDisabled: true, RouteOutAbsent: true, EgressOnly: []netip.AddrPort{a}}, []netip.AddrPort{a}, []string{"ingress"}}, |
| + {"route out", NetworkAudit{ResolverDisabled: true, IngressClosed: true, EgressOnly: []netip.AddrPort{a}}, []netip.AddrPort{a}, []string{"route out"}}, |
| + {"extra egress", clean(a, b), []netip.AddrPort{a}, []string{"egress"}}, |
| + {"missing egress", clean(a), []netip.AddrPort{a, b}, []string{"egress"}}, |
| + {"same address other port", clean(c), []netip.AddrPort{a}, []string{"egress"}}, |
| + {"egress seen none wanted", clean(a), nil, []string{"egress"}}, |
| + {"nothing seen", clean(), []netip.AddrPort{a}, []string{"egress"}}, |
| + {"everything wrong", NetworkAudit{EgressOnly: []netip.AddrPort{b}}, []netip.AddrPort{a}, all}, |
| + } |
| + for _, c := range cases { |
| + t.Run(c.name, func(t *testing.T) { |
| + err := c.audit.OK(c.want) |
| + if c.named == nil { |
| + if err != nil { |
| + t.Fatalf("OK = %v, want nil", err) |
| + } |
| + return |
| + } |
| + if err == nil { |
| + t.Fatalf("OK = nil, want an error naming %v", c.named) |
| + } |
| + msg := err.Error() |
| + for _, p := range all { |
| + named := strings.Contains(msg, p) |
| + want := false |
| + for _, n := range c.named { |
| + want = want || n == p |
| + } |
| + if named != want { |
| + t.Errorf("OK = %q: names %q is %v, want %v", msg, p, named, want) |
| + } |
| + } |
| + }) |
| + } |
| +} |
| + |
| +func TestSystemClock(t *testing.T) { |
| + c := SystemClock() |
| + last := c.Mono() |
| + if last < 0 { |
| + t.Fatalf("Mono = %v, want >= 0", last) |
| + } |
| + for i := 0; i < 1000; i++ { |
| + m := c.Mono() |
| + if m < last { |
| + t.Fatalf("Mono went back: %v after %v", m, last) |
| + } |
| + last = m |
| + } |
| + w := c.Wall() |
| + if strings.Contains(w.String(), "m=") { |
| + t.Fatalf("Wall = %v carries a monotonic reading", w) |
| + } |
| + if d := time.Since(w); d < 0 || d > time.Minute { |
| + t.Fatalf("Wall = %v, %v from now", w, d) |
| + } |
| +} |
diff --git a/internal/isolatedjob/validate.go b/internal/isolatedjob/validate.go| new file mode 100644 |
| index 00000000..1925263c |
| --- /dev/null |
| +++ b/internal/isolatedjob/validate.go |
| @@ -0,0 +1,71 @@ |
| +package isolatedjob |
| + |
| +import ( |
| + "fmt" |
| + "strings" |
| +) |
| + |
| +// maxAttemptIDLen bounds an attempt ID. The ID becomes the provider's client |
| +// token (AWS takes 1 to 128 characters), so 64 leaves room. |
| +const maxAttemptIDLen = 64 |
| + |
| +// Validate checks s against the provider limits l before any provider call. |
| +// |
| +// - AttemptID: 1 to 64 characters, each an ASCII letter, digit or '-'. |
| +// - Image: "sha256:" and 64 lower-case hex digits. |
| +// - Size: SizeSmall or SizeLarge. |
| +// - MaxLifetime: above zero and no more than the smaller of l.MaxLifetime |
| +// and HardMaxLifetime. |
| +// - Bootstrap: 1 to l.MaxBootstrapBytes bytes. |
| +// |
| +// Every failure wraps ErrInvalid, except an oversized bootstrap, which wraps |
| +// ErrBootstrapTooLarge. |
| +func (s LaunchSpec) Validate(l Limits) error { |
| + if !validAttemptID(s.AttemptID) { |
| + return fmt.Errorf("%w: attempt id must be 1 to %d letters, digits or '-'", ErrInvalid, maxAttemptIDLen) |
| + } |
| + if !validDigest(s.Image) { |
| + return fmt.Errorf("%w: image must be sha256: and 64 lower-case hex digits", ErrInvalid) |
| + } |
| + if s.Size.MemoryMiB() == 0 { |
| + return fmt.Errorf("%w: size %q is not %q or %q", ErrInvalid, s.Size, SizeSmall, SizeLarge) |
| + } |
| + limit := min(l.MaxLifetime, HardMaxLifetime) |
| + if s.MaxLifetime <= 0 || s.MaxLifetime > limit { |
| + return fmt.Errorf("%w: lifetime %v must be above zero and at most %v", ErrInvalid, s.MaxLifetime, limit) |
| + } |
| + if len(s.Bootstrap) == 0 { |
| + return fmt.Errorf("%w: bootstrap is empty", ErrInvalid) |
| + } |
| + if len(s.Bootstrap) > l.MaxBootstrapBytes { |
| + return fmt.Errorf("%w: bootstrap is %d bytes, limit %d", ErrBootstrapTooLarge, len(s.Bootstrap), l.MaxBootstrapBytes) |
| + } |
| + return nil |
| +} |
| + |
| +func validAttemptID(id string) bool { |
| + if len(id) == 0 || len(id) > maxAttemptIDLen { |
| + return false |
| + } |
| + for i := 0; i < len(id); i++ { |
| + c := id[i] |
| + if !(c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9' || c == '-') { |
| + return false |
| + } |
| + } |
| + return true |
| +} |
| + |
| +func validDigest(d ImageDigest) bool { |
| + hex, ok := strings.CutPrefix(string(d), "sha256:") |
| + if !ok || len(hex) != 64 { |
| + return false |
| + } |
| + for i := 0; i < len(hex); i++ { |
| + c := hex[i] |
| + if !(c >= '0' && c <= '9' || c >= 'a' && c <= 'f') { |
| + return false |
| + } |
| + } |
| + return true |
| +} |