oficina / equipo Public

runner: let Engineering's sandboxed shell run; checks use local Go

On token Claude connections (CLAUDE_CODE_SUBPROCESS_ENV_SCRUB=1) the
pinned CLI stops auto-approving sandboxed Bash, and StepPermission
allowed only file tools, so Engineering could not cd, run go test or
use /opt/go (task tkwkpraqeeer, 2026-11-22). StepPermission now allows
Bash when the launched policy keeps every command in the sandbox and
the request cannot leave it; refusals name a fixed rule. A realcli
test drives the pinned CLI in token and subscription modes.

Checks force GOTOOLCHAIN=local through MAKEFLAGS, check the runner's Go
against the base commit's requirements first (checks_unavailable when
too old), and run their own dependency step. needs_network needs
complete evidence from both runs; any test, -json, panic or compile
failure keeps the candidate failed; an unverified dependency-step exit
stops before the gate. The unread certification printf ask rules are
gone.

Astra: READY AFTER FIXES, NOT APPROVED, APPROVED on round 3.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Squashed from eng-bash-and-checks-go into main.
claude agent, operated by paul@keymail.dev 474c4f61c860ddb0f34095d0078e9ff4b0c8536f parent efa00f6
25 files changed, +1,625 −88
  • .rastrillo/budgets.txt +1 −1
  • internal/runner/checks/containment_test.go +1 −0
  • internal/runner/checks/macos.go +28 −0
  • internal/runner/checks/macos_test.go +22 −0
  • internal/runner/checks/network.go +333 −0
  • internal/runner/checks/network_test.go +240 −0
  • internal/runner/checks/sandbox.go +1 −1
  • internal/runner/containment/engineering_go_test.go +1 −1
  • internal/runner/provider/claude/answers.go +113 −10
  • internal/runner/provider/claude/answers_test.go +148 −3
  • internal/runner/provider/claude/certification_gaps_test.go +11 −4
  • internal/runner/provider/claude/glance_policy_test.go +2 −4
  • internal/runner/provider/claude/launcher.go +5 −3
  • internal/runner/provider/claude/realcli/approval_test.go +386 −0
  • internal/runner/provider/claude/realcli/budget_test.go +10 −0
  • internal/runner/provider/claude/research_policy_test.go +2 −4
  • internal/runner/provider/gotoolchain/make_test.go +48 −0
  • internal/runner/provider/gotoolchain/tree.go +6 −1
  • internal/runner/thin/check_go_test.go +173 −0
  • internal/runner/thin/engineer.go +4 −1
  • internal/runner/thin/go_checks.go +54 −0
  • internal/runner/thin/index.go +3 −2
  • internal/runner/thin/judge.go +33 −31
  • internal/runner/thin/judge_test.go +0 −19
  • internal/runner/thin/worker.go +0 −3

CI passed — run details

CI log
=== prepare ===
ci-box: machine: aarch64, 32 CPUs, 62 GiB memory, kernel 7.0.0-1017-aws
ci-box: python 3.12.3; Docker version 29.1.3, build 29.1.3-0ubuntu3~24.04.2
ci-box: user namespaces allowed: 233151
ci-box: cgroup: cgroup2fs
ci-box: disk /home/ci/work/repos/oficina__equipo/wt/main: 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.3s
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
ci-box: image pulled in 9.9s
ci-box: pi: installed and verified in 7.5s
ci-box: opencode: installed and verified in 2.3s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 8.9s
ci-box: clone deepened in 3.8s
ci-box: file times set from content: 2888 files, 188 directories
ci-box: ready in 17.6s
=== 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.149s
=== compile ===
go build ./...
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py compile
+ go build -tags testbuild ./...
  3.9s
+ go list -export -test -tags testbuild -f  ./...
  4.7s
+ go list -export -test -tags browser,testbuild -f  ./internal/equipo ./internal/headless ./internal/idtest ./internal/plan3test ./internal/thintest
  3.3s
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -version
staticcheck 2026.1 (v0.7.0)
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 -version
Go: go1.26.11
Scanner: govulncheck@v1.8.0
DB: https://vuln.go.dev
DB updated: 2026-11-11 02:51:11 +0000 UTC

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

receipt: test step 1m19.515s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m17.314s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m17.31s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 65.76, cpu waiting 42.48%, memory waiting 0.00%, io waiting 0.60%
--- 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 1m18.72s 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 1m16.62s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m16.62s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 65.76, cpu waiting 42.48%, memory waiting 0.00%, io waiting 0.60%
--- 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 1m19.114s 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 1m16.921s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m7.19s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 5.4s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 4.33s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 65.76, cpu waiting 42.48%, memory waiting 0.00%, io waiting 0.60%
--- 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 1m16.198s 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 1m13.848s amadan.net/oficina/equipo/internal/headless
receipt: slow test 36.6s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 19.48s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.12s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
receipt: slow test 8.65s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
machine: 32 CPUs, load 67.65, cpu waiting 42.11%, memory waiting 0.00%, io waiting 0.64%
--- 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 1m30.17s 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 1m27.812s amadan.net/oficina/equipo/internal/headless
receipt: slow test 58.55s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.21s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 8.17s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 7.18s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 4.69s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
machine: 32 CPUs, load 62.58, cpu waiting 41.14%, memory waiting 0.00%, io waiting 0.50%
--- 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 2m45.691s 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 2m43.514s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m37.22s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistant
receipt: slow test 18.69s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 8.81s amadan.net/oficina/equipo/internal/headless TestHeadlessResearchHandoff
receipt: slow test 6.65s amadan.net/oficina/equipo/internal/headless TestHeadlessTurnBatching
receipt: slow test 6.41s amadan.net/oficina/equipo/internal/headless TestHeadlessBatchAfterRefusedReply
machine: 32 CPUs, load 23.65, cpu waiting 13.74%, memory waiting 0.00%, io waiting 0.13%
--- 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 2m9.335s 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 2m6.822s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 8.31s amadan.net/oficina/equipo/internal/thintest TestContractTeamJobSettledStates
receipt: slow test 6.75s amadan.net/oficina/equipo/internal/thintest TestExplorePreviewsOff
receipt: slow test 3.79s amadan.net/oficina/equipo/internal/thintest TestContractPreviewHeldUntilPublishAnswer
receipt: slow test 3.69s amadan.net/oficina/equipo/internal/thintest TestContractTeamNudgePersonNeeds
receipt: slow test 2.55s amadan.net/oficina/equipo/internal/thintest TestContractTeamUpdatePersonNeeds
machine: 32 CPUs, load 39.71, cpu waiting 24.95%, memory waiting 0.00%, io waiting 0.25%
--- 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
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/thintest TestContractWorkerTaintIsSticky
=== RUN   TestContractWorkerTaintIsSticky
    placement_contract_test.go:552: waiting for send_pack: failed to get reader: context deadline exceeded
--- FAIL: TestContractWorkerTaintIsSticky (45.25s)

--- FAIL amadan.net/oficina/equipo/internal/thintest (package output)
FAIL
rastrillo-budget/v1 ran 2m9.646s
FAIL	amadan.net/oficina/equipo/internal/thintest	129.888s


receipt: test step 2m11.675s 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 2m9.646s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 45.25s amadan.net/oficina/equipo/internal/thintest TestContractWorkerTaintIsSticky
receipt: slow test 8.94s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 4.85s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotOffered
receipt: slow test 4.52s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
receipt: slow test 2.32s amadan.net/oficina/equipo/internal/thintest TestContractPreview
exit status 1
+ go 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)' -v -run '^TestContractWorkerTaintIsSticky$' -count=1 ./internal/thintest   (retry, once)
##############################################################################
FLAKE ./internal/thintest:TestContractWorkerTaintIsSticky thintest-contract 474c4f61c860ddb0f34095d0078e9ff4b0c8536f 45.25s 39.71
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 37.09, cpu waiting 23.40%, memory waiting 0.00%, io waiting 0.24%
--- 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 4m47.546s, over the 45s its record on line 44 allows; reported only, timing fails on CI

receipt: test step 4m53.444s 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 4m47.546s amadan.net/oficina/equipo/internal/runner/thin
receipt: slow test 37.02s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeAnsweredByAnotherModel
receipt: slow test 37.02s amadan.net/oficina/equipo/internal/runner/thin TestModelsEngineeringProbesThenRunsTheStrongest
receipt: slow test 36.86s amadan.net/oficina/equipo/internal/runner/thin TestModelsUnhealthyRetriedOnDemand
receipt: slow test 18.48s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeRunsInsideTheAdmission
receipt: slow test 7.24s amadan.net/oficina/equipo/internal/runner/thin TestOpenCodeStepsRealOpenCode
machine: 32 CPUs, load 3.58, cpu waiting 1.62%, 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 54.253s 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 52.945s amadan.net/oficina/equipo/internal/runner
receipt: slow test 32.91s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.03s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 58.61, cpu waiting 36.40%, memory waiting 0.00%, io waiting 0.93%
--- 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 1m3.814s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m2.529s amadan.net/oficina/equipo/internal/runner
receipt: slow test 52.37s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 47.85s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.44s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.7s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 67.24, cpu waiting 41.55%, memory waiting 0.00%, io waiting 0.78%
--- 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 36.465s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 35.373s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.13s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.38s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.12s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 2.75s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 1.62s amadan.net/oficina/equipo/internal/runner TestCoordinatorTransientRefusalKeepsServing
machine: 32 CPUs, load 32.69, cpu waiting 23.62%, memory waiting 0.00%, io waiting 1.21%
--- shard 12 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-a started 30s late; cpu waiting 40.7%, load 21.17
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

receipt: test step 1m9.125s 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 1m7.094s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 28.12s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 28s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 25.86s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 22.94s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
receipt: slow test 22.72s amadan.net/oficina/equipo/internal/equipotest TestBudgetLoweringBelowUsage
machine: 32 CPUs, load 57.82, cpu waiting 39.46%, memory waiting 0.00%, io waiting 0.42%
--- 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 40.7%, load 21.17
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 1m18.894s 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 1m16.791s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 20.7s amadan.net/oficina/equipo/internal/equipotest TestProjectConcurrentRetry
receipt: slow test 20.68s amadan.net/oficina/equipo/internal/equipotest TestProjectsFailuresRollBack
receipt: slow test 20.65s amadan.net/oficina/equipo/internal/equipotest TestProjectWritesRequireCurrentOwner
receipt: slow test 20.65s amadan.net/oficina/equipo/internal/equipotest TestProjectRetryAndRevision
receipt: slow test 20.58s amadan.net/oficina/equipo/internal/equipotest TestProjectsAccountRevisionAndValidation
machine: 32 CPUs, load 51.51, cpu waiting 33.98%, memory waiting 0.00%, io waiting 0.36%
--- 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 40.7%, load 21.17
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

receipt: test step 1m16.044s 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 1m10.677s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 16.18s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 13.66s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 10.56s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 10.54s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 7.49s amadan.net/oficina/equipo/internal/equipotest TestRosterAuditFailureRollsBack
machine: 32 CPUs, load 54.95, cpu waiting 36.22%, memory waiting 0.00%, io waiting 0.38%
--- 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 40.7%, load 21.17
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 1m9.289s 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 1m7.386s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 25.9s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 25.43s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 25.4s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 23.53s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsUpgrade
receipt: slow test 23.39s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsCurrentOwner
machine: 32 CPUs, load 57.82, cpu waiting 39.46%, memory waiting 0.00%, io waiting 0.42%
--- 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 40.7%, load 21.17
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 55.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 54.02s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 3.73s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 3.52s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 1.71s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.64s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3A
receipt: slow test 1.3s amadan.net/oficina/equipo/internal/plan3test TestInviteMigration
machine: 32 CPUs, load 62.89, cpu waiting 41.08%, memory waiting 0.00%, io waiting 0.54%
--- 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 40.7%, load 21.17
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/door ./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/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/claude/realcli ./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/door ./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/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/claude/realcli ./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/equipo/team: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/forge: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/webread: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/workspace: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/testci: its inputs changed
--- FAIL amadan.net/oficina/equipo/internal/runner/provider/codex TestCodexEmptyHomeReplay
=== RUN   TestCodexEmptyHomeReplay
--- FAIL: TestCodexEmptyHomeReplay (12.43s)

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

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

budget note: internal/equipo took 51.718s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/equipo/chat took 14.738s, 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 1m56.016s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/release took 36.558s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/runner/containment took 1m3.721s, over the 15s its record on line 40 allows; reported only, timing fails on CI
budget note: internal/runner/forge took 26.343s, over the 20s its record on line 35 allows; reported only, timing fails on CI
budget note: internal/runner/provider/claude/realcli took 15.631s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/runner/provider/pi took 1m24.651s, over the 1m0s its record on line 27 allows; reported only, timing fails on CI
budget note: internal/runner/workspace took 14.361s, over the 10s the default allows; reported only, timing fails on CI

receipt: test step 2m1.609s against a 60s target (the gate's other steps are not in this figure)
receipt: 33 packages ran, 29 cached, 18 without tests, 1 failed
receipt: slow package 1m56.016s amadan.net/oficina/equipo/internal/idtest
receipt: slow package 1m24.651s amadan.net/oficina/equipo/internal/runner/provider/pi
receipt: slow package 1m13.748s amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow package 1m3.721s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow package 58.376s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow test 56.11s amadan.net/oficina/equipo/internal/idtest TestDoorRemembersOficinaID
receipt: slow test 48.08s amadan.net/oficina/equipo/internal/idtest TestDoorOficinaSettingsUnreadableIsNoLoop
receipt: slow test 48.07s amadan.net/oficina/equipo/internal/idtest TestDoorNeverJudgesANativeSession
receipt: slow test 48.06s amadan.net/oficina/equipo/internal/idtest TestDoorStepUpIsLocal
receipt: slow test 47.52s amadan.net/oficina/equipo/internal/idtest TestDoorForgetsOficinaIDForARefusedSession
rastrillo: budget test: go test failed
exit status 1
+ go test -tags testbuild -timeout 15m -v -run '^TestCodexEmptyHomeReplay$/^implement$' -count=1 ./internal/runner/provider/codex   (retry, once)
##############################################################################
FLAKE ./internal/runner/provider/codex:TestCodexEmptyHomeReplay/implement rest 474c4f61c860ddb0f34095d0078e9ff4b0c8536f 5.51s 29.66
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 27.77, cpu waiting 16.23%, memory waiting 0.00%, io waiting 0.16%
--- 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 1m25.749s 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.136s amadan.net/oficina/equipo/internal/headless
receipt: slow test 38.91s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 14.84s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 10.92s amadan.net/oficina/equipo/internal/headless TestBrowserChat
receipt: slow test 7.17s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 6.41s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
machine: 32 CPUs, load 62.89, cpu waiting 41.08%, memory waiting 0.00%, io waiting 0.52%
--- 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 1m32.112s 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 1m30.459s amadan.net/oficina/equipo/internal/headless
receipt: slow test 28.13s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 21s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 13.32s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 10.16s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
receipt: slow test 9.23s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
machine: 32 CPUs, load 60.85, cpu waiting 40.93%, memory waiting 0.00%, io waiting 0.47%
--- 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 1m42.412s 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 1m40.166s amadan.net/oficina/equipo/internal/headless
receipt: slow test 13.64s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 13.21s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 12.08s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 11.15s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
receipt: slow test 11.05s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsOpenCodeGoLimitRequired
machine: 32 CPUs, load 57.82, cpu waiting 37.24%, memory waiting 0.00%, io waiting 0.40%
--- shard 21 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-rest: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAskAfterMerge|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' ./internal/headless
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserCopyContinue
=== RUN   TestBrowserCopyContinue
time=2026-11-23T11:15:58.373Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-23T11:15:58.373Z level=INFO msg="startup phase done" phase=state_lock took=61µs
time=2026-11-23T11:15:58.373Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-23T11:15:58.374Z level=INFO msg="startup phase done" phase=claim_roots took=108µs
time=2026-11-23T11:15:58.374Z level=INFO msg="startup phase" phase=sweep
time=2026-11-23T11:15:58.416Z level=INFO msg="startup phase done" phase=sweep took=42.776ms
time=2026-11-23T11:15:58.416Z level=INFO msg="startup phase" phase=credentials
time=2026-11-23T11:15:58.417Z level=INFO msg="startup phase done" phase=credentials took=126µs
time=2026-11-23T11:15:58.417Z level=INFO msg="startup phase" phase=open_state
time=2026-11-23T11:15:58.460Z level=INFO msg="startup phase done" phase=open_state took=43.756ms
time=2026-11-23T11:15:58.461Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-23T11:15:58.462Z level=INFO msg=connecting host=127.0.0.1:36883 protocol=28
time=2026-11-23T11:15:58.463Z level=INFO msg=connected host=127.0.0.1:36883 took=950µs
time=2026-11-23T11:15:58.463Z level=INFO msg="capabilities gathering"
time=2026-11-23T11:15:58.465Z level=INFO msg="capabilities gathered" took=1.997ms tags=linux,claude,go
time=2026-11-23T11:15:58.466Z level=INFO msg="hello sent" protocol=28
time=2026-11-23T11:15:58.477Z level=INFO msg=welcome protocol=28 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.61s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m33.606s
FAIL	amadan.net/oficina/equipo/internal/headless	93.815s


receipt: test step 1m35.038s 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 1m33.606s amadan.net/oficina/equipo/internal/headless
receipt: slow test 14.95s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
receipt: slow test 11.08s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 10.96s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 9.54s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 7.42s 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$' -count=1 ./internal/headless   (retry, once)
##############################################################################
FLAKE ./internal/headless:TestBrowserCopyContinue browser-headless-rest 474c4f61c860ddb0f34095d0078e9ff4b0c8536f 6.61s 60.85
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 57.82, cpu waiting 38.33%, memory waiting 0.00%, io waiting 0.41%
--- shard 22 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-rest: ./internal/equipo
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserPreviewBlocksNavigation)$' ./internal/equipo

receipt: test step 2.09s 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 571ms 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|TestBrowserSmartDoor)$' ./internal/idtest
budget note: internal/idtest took 11.042s, over the 10s the default allows; reported only, timing fails on CI

receipt: test step 12.511s 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.042s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 8.86s amadan.net/oficina/equipo/internal/idtest TestBrowserSmartDoor
receipt: slow test 2.18s 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.629s 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.073s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 2.07s 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|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 3m36.834s 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 3m35.183s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 23.8s amadan.net/oficina/equipo/internal/thintest TestBrowserAccessRequest
receipt: slow test 14.42s amadan.net/oficina/equipo/internal/thintest TestBrowserSettingsTeams
receipt: slow test 12s amadan.net/oficina/equipo/internal/thintest TestBrowserThinkingCycles
receipt: slow test 10.74s amadan.net/oficina/equipo/internal/thintest TestBrowserPlacementQuestionAndPending
receipt: slow test 9.23s amadan.net/oficina/equipo/internal/thintest TestBrowserRhythm
machine: 32 CPUs, load 8.39, cpu waiting 4.14%, memory waiting 0.00%, io waiting 0.03%
--- 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   (51s)
ok ./internal/headless TestHeadlessConnections/A5_cancel_and_sign_out 4.69s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.25s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 8.25s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 8.10s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 26.50s
+ 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   (65s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 15.45s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 12.28s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 19.50s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 15.09s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless   (20s)
ok ./internal/headless TestMixedVersions 18.38s
+ 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 67.24, cpu waiting 42.15%, memory waiting 0.00%, io waiting 0.76%
--- 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 14.415s 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 8.129s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 198ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 145ms amadan.net/oficina/equipo/internal/runner/provider/codex
receipt: slow package 1ms amadan.net/oficina/equipo/internal/runner/provider
receipt: slow package 0s amadan.net/oficina/equipo/internal/runner/provider/claude/realcli
receipt: slow test 5.83s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.81s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 360ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 200ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 140ms amadan.net/oficina/equipo/internal/runner/provider/codex TestDirectJournalAdapterBarrier
CGO_ENABLED=0 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.432s 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.304s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 310ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 240ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof
receipt: slow test 140ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryCleansScratch
receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReapsOrphans
machine: 32 CPUs, load 17.70, cpu waiting 12.29%, memory waiting 0.00%, io waiting 1.64%
--- 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 40.7%, load 21.17
shard 25: make runner-dead-references lanes-check build vet fmt-check spacing budget migration-check
python3 scripts/runner-dead-references.py
reference scan: 2601 text files, 2862 matches, 0 failures
python3 scripts/ci-test.py check
lanes: 18 lanes and 5 browser lanes run every test once; 20-check@29
CGO_ENABLED=0 go build ./...
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o /dev/null ./cmd/equipo-runner
go vet ./...
go vet -tags testbuild ./internal/runner/thin ./internal/headless
GOOS=darwin GOARCH=arm64 go vet ./cmd/equipo-runner/... ./internal/runner/... ./internal/wire/... ./internal/release/...
go tool fiesta spacing -skip tokens.css internal/equipo/static
go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget size
budget size: 90 directories within budget
CGO_ENABLED=0 go test ./internal/equipo -run '^TestMigrationModels$' -count=1
ok  	amadan.net/oficina/equipo/internal/equipo	2.445s
machine: 32 CPUs, load 67.62, cpu waiting 41.77%, memory waiting 0.00%, io waiting 0.68%
--- 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 40.7%, load 21.17
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 58.61, cpu waiting 38.95%, memory waiting 0.00%, io waiting 0.87%
--- 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 40.7%, load 21.17
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 3
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 32.69, cpu waiting 23.62%, memory waiting 0.00%, io waiting 1.21%
--- 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 40.7%, load 21.17
shard 28: make gitleaks
11:15AM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
11:16AM INF 1102 commits scanned.
11:16AM INF scanned ~61838616 bytes (61.84 MB) in 23.6s
11:16AM INF no leaks found
machine: 32 CPUs, load 53.53, cpu waiting 36.40%, memory waiting 0.00%, io waiting 0.93%
=== perf ===
go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -require TestPerfScreens,TestPerfBoot -tags perf -count=1 -p 1 -parallel 1 -run '^TestPerf' ./...
perf: GET /: median 1.114ms, worst 1.146ms, budget 150ms
perf: GET /api/runner/protocol: median 97µs, worst 114µs, budget 150ms
perf: GET /api/v1/account-setups/{id}: median 667µs, worst 694µs, budget 150ms
perf: GET /api/v1/accounts: median 458µs, worst 499µs, budget 150ms
perf: GET /api/v1/auth/devices: median 500µs, worst 557µs, budget 150ms
perf: GET /api/v1/budgets: median 522µs, worst 548µs, budget 150ms
perf: GET /api/v1/capabilities: median 270µs, worst 287µs, budget 150ms
perf: GET /api/v1/cards/{id}: median 1.343ms, worst 1.387ms, budget 150ms
perf: GET /api/v1/connections: median 667µs, worst 696µs, budget 150ms
perf: GET /api/v1/connections/{id}: median 648µs, worst 710µs, budget 150ms
perf: GET /api/v1/conversation: median 1.047ms, worst 1.12ms, budget 150ms
perf: GET /api/v1/conversation/cards: median 1.635ms, worst 1.675ms, budget 150ms
perf: GET /api/v1/coordinator: median 2.014ms, worst 4.782ms, budget 150ms
perf: GET /api/v1/invites/{id}: median 456µs, worst 474µs, budget 150ms
perf: GET /api/v1/journey: median 7.804ms, worst 7.97ms, budget 150ms
perf: GET /api/v1/me: median 438µs, worst 486µs, budget 150ms
perf: GET /api/v1/me/settings: median 520µs, worst 537µs, budget 150ms
perf: GET /api/v1/needs-you: median 7.406ms, worst 7.467ms, budget 150ms
perf: GET /api/v1/notifications: median 1.802ms, worst 1.891ms, budget 150ms
perf: GET /api/v1/onboarding: median 389µs, worst 425µs, budget 150ms
perf: GET /api/v1/people: median 459µs, worst 492µs, budget 150ms
perf: GET /api/v1/playbooks: median 609µs, worst 643µs, budget 150ms
perf: GET /api/v1/playbooks/{id}: median 549µs, worst 564µs, budget 150ms
perf: GET /api/v1/playbooks/{id}/template-diff: median 881µs, worst 934µs, budget 150ms
perf: GET /api/v1/preferences: median 778µs, worst 837µs, budget 150ms
perf: GET /api/v1/projects/{id}: median 476µs, worst 524µs, budget 150ms
perf: GET /api/v1/projects/{id}/settings: median 615µs, worst 635µs, budget 150ms
perf: GET /api/v1/roster: median 488µs, worst 530µs, budget 150ms
perf: GET /api/v1/runners/{id}: median 436µs, worst 477µs, budget 150ms
perf: GET /api/v1/specialists: median 8.519ms, worst 8.669ms, budget 150ms
perf: GET /api/v1/specialists/{id}: median 8.311ms, worst 8.474ms, budget 150ms
perf: GET /api/v1/specialists/{id}/template-diff: median 833µs, worst 860µs, budget 150ms
perf: GET /api/v1/tasks/{id}/plan: median 1.158ms, worst 1.182ms, budget 150ms
perf: GET /api/v1/tasks/{id}/thread: median 734µs, worst 784µs, budget 150ms
perf: GET /api/v1/teams: median 445µs, worst 494µs, budget 150ms
perf: GET /api/v1/templates: median 623µs, worst 662µs, budget 150ms
perf: GET /api/v1/templates/{id}: median 467µs, worst 485µs, budget 150ms
perf: GET /auth/callback: median 83µs, worst 106µs, budget 150ms
perf: GET /auth/devices/{id}: median 3.935ms, worst 4.169ms, budget 150ms
perf: GET /auth/verify: median 75µs, worst 108µs, budget 150ms
perf: GET /connections: median 4.289ms, worst 4.522ms, budget 150ms
perf: GET /conversation: median 8.897ms, worst 11.966ms, budget 150ms
perf: GET /conversation/connections: median 256µs, worst 301µs, budget 150ms
perf: GET /conversation/notebook: median 262µs, worst 282µs, budget 150ms
perf: GET /conversation/settings: median 4.79ms, worst 5.006ms, budget 150ms
perf: GET /conversation/settings/autonomy: median 4.709ms, worst 4.853ms, budget 150ms
perf: GET /conversation/settings/connections: median 7.111ms, worst 7.485ms, budget 150ms
perf: GET /conversation/settings/connections/add: median 7.345ms, worst 7.427ms, budget 150ms
perf: GET /conversation/settings/copy: median 4.588ms, worst 4.779ms, budget 150ms
perf: GET /conversation/settings/housekeeping: median 4.818ms, worst 4.949ms, budget 150ms
perf: GET /conversation/settings/machines: median 5.221ms, worst 5.383ms, budget 150ms
perf: GET /conversation/settings/machines/add: median 5.344ms, worst 5.603ms, budget 150ms
perf: GET /conversation/settings/notebook: median 4.159ms, worst 4.364ms, budget 150ms
perf: GET /conversation/settings/thinking: median 4.742ms, worst 4.868ms, budget 150ms
perf: GET /housekeeping: median 4.277ms, worst 4.406ms, budget 150ms
perf: GET /invites/new: median 630µs, worst 686µs, budget 150ms
perf: GET /invites/{id}: median 669µs, worst 708µs, budget 150ms
perf: GET /jobs: median 3.976ms, worst 4.256ms, budget 150ms
perf: GET /jobs/{id}: median 5.172ms, worst 5.326ms, budget 150ms
perf: GET /journey: median 13.542ms, worst 13.78ms, budget 150ms
perf: GET /nav/rail: median 3.91ms, worst 4.023ms, budget 150ms
perf: GET /needs-you: median 13.357ms, worst 16.009ms, budget 150ms
perf: GET /onboarding: median 5.348ms, worst 5.508ms, budget 150ms
perf: GET /people: median 4.465ms, worst 4.608ms, budget 150ms
perf: GET /playbook-suggestions/{suggestion}: median 6.229ms, worst 6.371ms, budget 150ms
perf: GET /playbooks: median 5.767ms, worst 5.831ms, budget 150ms
perf: GET /playbooks/new: median 5.83ms, worst 6.035ms, budget 150ms
perf: GET /playbooks/{id}: median 5.257ms, worst 5.366ms, budget 150ms
perf: GET /playbooks/{id}/edit: median 5.26ms, worst 5.436ms, budget 150ms
perf: GET /playbooks/{id}/template-diff: median 4.362ms, worst 4.476ms, budget 150ms
perf: GET /preferences: median 5.069ms, worst 5.173ms, budget 150ms
perf: GET /preferences/sources/{source}: median 4.758ms, worst 5.059ms, budget 150ms
perf: GET /projects: median 6.691ms, worst 9.014ms, budget 150ms
perf: GET /projects/accounts: median 4.221ms, worst 4.32ms, budget 150ms
perf: GET /projects/new: median 4.311ms, worst 4.441ms, budget 150ms
perf: GET /projects/{id}: median 11.477ms, worst 11.616ms, budget 150ms
perf: GET /projects/{id}/edit: median 4.437ms, worst 4.542ms, budget 150ms
perf: GET /runners/enrol: median 5.104ms, worst 5.262ms, budget 150ms
perf: GET /settings: median 4.09ms, worst 4.201ms, budget 150ms
perf: GET /settings/coordinator: median 6.384ms, worst 6.603ms, budget 150ms
perf: GET /settings/devices: median 3.871ms, worst 4.103ms, budget 150ms
perf: GET /settings/recovery: median 3.906ms, worst 4.11ms, budget 150ms
perf: GET /settings/recovery/release: median 4.193ms, worst 6.843ms, budget 150ms
perf: GET /settings/thinking: median 260µs, worst 289µs, budget 150ms
perf: GET /signed-out: median 278µs, worst 313µs, budget 150ms
perf: GET /signin: median 279µs, worst 317µs, budget 150ms
perf: GET /specialists/new: median 4.064ms, worst 4.222ms, budget 150ms
perf: GET /specialists/{key}: median 11.987ms, worst 12.129ms, budget 150ms
perf: GET /specialists/{key}/edit: median 4.168ms, worst 4.376ms, budget 150ms
perf: GET /specialists/{key}/template-diff: median 4.255ms, worst 4.328ms, budget 150ms
perf: GET /tasks: median 6.041ms, worst 6.344ms, budget 150ms
perf: GET /tasks/new: median 3.802ms, worst 3.874ms, budget 150ms
perf: GET /tasks/{id}: median 6.083ms, worst 6.381ms, budget 150ms
perf: GET /tasks/{id}/merge: median 5.385ms, worst 5.625ms, budget 150ms
perf: GET /tasks/{id}/move: median 5.196ms, worst 8.91ms, budget 150ms
perf: GET /tasks/{id}/plan: median 6.69ms, worst 6.88ms, budget 150ms
perf: GET /tasks/{id}/preview: median 1.625ms, worst 1.697ms, budget 150ms
perf: GET /tasks/{id}/questions/{question}: median 6.04ms, worst 6.349ms, budget 150ms
perf: GET /tasks/{id}/rendered-change: median 5.474ms, worst 5.686ms, budget 150ms
perf: GET /tasks/{id}/rendered-change/{hash}.png: median 4.99ms, worst 5.259ms, budget 150ms
perf: GET /tasks/{id}/thread: median 8.659ms, worst 8.852ms, budget 150ms
perf: GET /team/{specialist}: median 4.892ms, worst 5.072ms, budget 150ms
perf: GET /teams: median 10.432ms, worst 10.635ms, budget 150ms
perf: GET /templates: median 3.971ms, worst 7.187ms, budget 150ms
perf: GET /usage: median 4.896ms, worst 5.169ms, budget 150ms
perf: GET /work: median 3.644ms, worst 3.795ms, budget 150ms
perf: GET /auth/devices/{id}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /connections: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/autonomy: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/connections: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/connections/add: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/copy: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/housekeeping: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/machines: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/machines/add: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/notebook: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/thinking: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /housekeeping: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /invites/new: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /invites/{id}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /jobs: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /jobs/{id}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /journey: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /nav/rail: 0 bytes of framework CSS and JS, gzipped; 16000-byte budget
perf: GET /needs-you: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /onboarding: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /people: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /playbook-suggestions/{suggestion}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /playbooks: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /playbooks/new: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /playbooks/{id}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /playbooks/{id}/edit: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /playbooks/{id}/template-diff: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /preferences: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /preferences/sources/{source}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /projects: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /projects/accounts: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /projects/new: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /projects/{id}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /projects/{id}/edit: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /runners/enrol: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /settings: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /settings/coordinator: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /settings/devices: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /settings/recovery: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /settings/recovery/release: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /signed-out: 30270 bytes of framework CSS and JS, gzipped; 40000-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /specialists/new: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /specialists/{key}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /specialists/{key}/edit: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /specialists/{key}/template-diff: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/new: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/merge: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/move: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/plan: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/preview: 25954 bytes of framework CSS and JS, gzipped; 40000-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/questions/{question}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/rendered-change: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/thread: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /team/{specialist}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /teams: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /templates: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /usage: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /work: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: cold boot: median 163ms of [161.913867ms 163.2131ms 164.775524ms], budget 500ms

receipt: test step 48.107s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 86 without tests, 0 failed
receipt: slow package 10.731s amadan.net/oficina/equipo/internal/equipotest
receipt: slow package 0s amadan.net/oficina/equipo/cmd/equipo-runner
receipt: slow package 0s amadan.net/oficina/equipo/cmd/equipo-tool-proxy
receipt: slow package 0s amadan.net/oficina/equipo/internal/advice
receipt: slow package 0s amadan.net/oficina/equipo/internal/attach
receipt: slow test 10.19s amadan.net/oficina/equipo/internal/equipotest TestPerfScreens
receipt: slow test 540ms amadan.net/oficina/equipo/internal/equipotest TestPerfBoot
=== cache ===
ci-box: build cache /home/ci/work/repos/oficina__equipo/cache/go-build: 4.45 GiB in 27020 files
ci-box: module cache /home/ci/work/repos/oficina__equipo/cache/go-mod: 1.15 GiB in 40997 files
ci-box: build cache over 4.0 GiB: dropped 1.84 GiB this job did not read, kept 2.61 GiB

landed from eng-bash-and-checks-go

diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt
index fb5f693b..19ff1031 100644
--- a/.rastrillo/budgets.txt
+++ b/.rastrillo/budgets.txt
@@ -38,7 +38,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 28140 21846 Fable follow-up gates and guards, then main started at repo creation; measured 28140/21846 source/test lines (start steps logged as fixed codes; tool socket bound by descriptor).
+size internal/runner/thin 28197 22000 Fable follow-up gates and guards, then main started at repo creation; measured 28197/22000 source/test lines (checks hold Go to the base; needs-network only from their own stage).
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 30s Mac runners (Darwin worker): real process groups killed after a grace and proven gone (SIGTERM, SIGKILL, the marker sweep), and the probes run end to end with fake srt and xcodebuild, P6 killing.
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/internal/runner/checks/containment_test.go b/internal/runner/checks/containment_test.go
index 0e09b7ff..dd299a69 100644
--- a/internal/runner/checks/containment_test.go
+++ b/internal/runner/checks/containment_test.go
@@ -225,6 +225,7 @@ func TestCheckNamespaceGoRootInsideModuleCache(t *testing.T) {
script := `import os,subprocess
assert not os.path.exists(` + strconv.Quote(filepath.Join(home, ".cache/go-build")) + `)
assert os.environ['GOTOOLCHAIN']=='local'
+assert os.environ['MAKEFLAGS']=='GOTOOLCHAIN=local'
for path in ['/opt/go/VERSION', '/opt/go-mod/` + filepath.ToSlash(filepath.Join("golang.org", filepath.Base(goRoot))) + `/VERSION']:
assert os.path.isfile(path), path
try:
diff --git a/internal/runner/checks/macos.go b/internal/runner/checks/macos.go
new file mode 100644
index 00000000..a13f4d1c
--- /dev/null
+++ b/internal/runner/checks/macos.go
@@ -0,0 +1,28 @@
+package checks
+
+import (
+ "path"
+ "strings"
+)
+
+// NeedsMacOS reports whether checking this change needs Apple's tools:
+// the change touches Swift, Objective-C or Xcode files, or the gate
+// itself calls Xcode's tools. A Linux runner cannot check those, so it
+// says so rather than pass or fail.
+func NeedsMacOS(changed []string, gateText string) bool {
+ for _, f := range changed {
+ switch strings.ToLower(path.Ext(f)) {
+ case ".swift", ".m", ".mm", ".xib", ".storyboard", ".xcconfig", ".entitlements":
+ return true
+ }
+ if strings.Contains(f, ".xcodeproj/") || strings.Contains(f, ".xcworkspace/") || path.Base(f) == "Package.swift" || path.Base(f) == "Podfile" {
+ return true
+ }
+ }
+ for _, tool := range []string{"xcodebuild", "xcrun", "swift build", "swift test", "fastlane"} {
+ if strings.Contains(gateText, tool) {
+ return true
+ }
+ }
+ return false
+}
diff --git a/internal/runner/checks/macos_test.go b/internal/runner/checks/macos_test.go
new file mode 100644
index 00000000..7988ad2e
--- /dev/null
+++ b/internal/runner/checks/macos_test.go
@@ -0,0 +1,22 @@
+package checks
+
+import "testing"
+
+// A Linux runner says honestly that it cannot check Apple code.
+func TestNeedsMacOS(t *testing.T) {
+ for _, tc := range []struct {
+ changed []string
+ gate string
+ want bool
+ }{
+ {[]string{"ios/Woodstar/AccountNavigationHost.swift"}, "./scripts/ci.sh", true},
+ {[]string{"ios/Woodstar.xcodeproj/project.pbxproj"}, "", true},
+ {[]string{"internal/x.go", "web/a.js"}, "go test ./...", false},
+ {[]string{"README.md"}, "xcodebuild test -scheme App", true},
+ {nil, "make ci", false},
+ } {
+ if got := NeedsMacOS(tc.changed, tc.gate); got != tc.want {
+ t.Fatalf("NeedsMacOS(%v, %q) = %v", tc.changed, tc.gate, got)
+ }
+ }
+}
diff --git a/internal/runner/checks/network.go b/internal/runner/checks/network.go
new file mode 100644
index 00000000..efadfc0c
--- /dev/null
+++ b/internal/runner/checks/network.go
@@ -0,0 +1,333 @@
+package checks
+
+import (
+ "bytes"
+ "encoding/json"
+ "errors"
+ "go/version"
+ "io/fs"
+ "os"
+ "path"
+ "path/filepath"
+ "regexp"
+ "slices"
+ "strings"
+ "sync"
+)
+
+// Run is a command's exit code and output. Evidence is what was read
+// from the whole output as it was produced (the Output kept may be only
+// its tail); without it nothing is concluded from the output.
+type Run struct {
+ Code int
+ Output string
+ Evidence *Evidence
+}
+
+// Go's progress lines there are neither evidence nor a disqualification.
+var neutralLine = regexp.MustCompile(`^go: (?:no module dependencies to download|downloading \S+ \S+)$`)
+var offlineRefusal = regexp.MustCompile(`^go: (?:download go1\.[0-9a-z.]+ for [a-z0-9]+/[a-z0-9]+: )?(?:[^\s@:]+@[^\s@:]+: module lookup disabled by GOPROXY=off|golang\.org/toolchain@v0\.0\.1-go1\.[0-9a-z.]+-[a-z0-9]+: verifying module: checksum database disabled by GOSUMDB=off)$`)
+
+// A failure of the gate's own, beyond dependencies it could not fetch: a
+// failing test, a panic, or a compiler or vet diagnostic other than Go
+// failing to fetch a module (offline, or into the read-only cache, which
+// is how a build in the check profile reports a module the cache lacks).
+// These lines only decide what does not count against the stage's
+// evidence; they never establish it.
+var independentFailure = regexp.MustCompile(`(?m)^(?:--- FAIL: |panic: |\S+\.go:[0-9]+(?::[0-9]+)?: )`)
+var offlineDiagnostic = regexp.MustCompile(`^\S+\.go:[0-9]+(?::[0-9]+)?: (?:module lookup disabled by GOPROXY=off|(?:mkdir|open) /opt/go-mod/cache/download/\S+: read-only file system)$`)
+
+// NeedsNetwork reports whether a failed gate could neither pass nor fail
+// honestly offline. Only Equipo's own dependency stage can show it: the
+// stage failed, its whole output was read, and every line is Go refusing
+// an offline download. The gate's output is the candidate's, so it can
+// only keep a failure a failure: read whole, it must show no failing
+// test (plain or go test -json), panic, build failure or diagnostic
+// other than Go failing to fetch a module. Evidence that is missing or
+// incomplete keeps it a failure.
+func NeedsNetwork(stage, gate Run) bool {
+ s, g := stage.Evidence, gate.Evidence
+ if stage.Code == 0 || gate.Code == 0 || s == nil || g == nil {
+ return false
+ }
+ s.mu.Lock()
+ staged := s.complete() && s.refusals > 0 && s.others == 0
+ s.mu.Unlock()
+ g.mu.Lock()
+ defer g.mu.Unlock()
+ return staged && g.complete() && !g.failure
+}
+
+// maxEvidenceLine bounds one line; a longer one makes the evidence
+// incomplete rather than unread.
+const maxEvidenceLine = 64 << 10
+
+// Evidence classifies every line of a command's output as it is
+// produced, before any tail is kept. It is complete only when every
+// stream it was given was closed whole.
+type Evidence struct {
+ mu sync.Mutex
+ open int
+ broken, failure bool
+ refusals, others int
+}
+
+// EvidenceStream is one output stream's writer. Close when the stream
+// ended whole; Abort when it was cut short or could not be read.
+type EvidenceStream struct {
+ e *Evidence
+ partial []byte
+ long bool
+ done bool
+}
+
+// NewEvidence returns evidence fed by n streams.
+func NewEvidence(n int) (*Evidence, []*EvidenceStream) {
+ e := &Evidence{open: n}
+ streams := make([]*EvidenceStream, n)
+ for i := range streams {
+ streams[i] = &EvidenceStream{e: e}
+ }
+ return e, streams
+}
+
+// Scan is the evidence of an output read whole.
+func Scan(output string) *Evidence {
+ e, w := NewEvidence(1)
+ w[0].Write([]byte(output))
+ w[0].Close()
+ return e
+}
+
+func (w *EvidenceStream) Write(p []byte) (int, error) {
+ n := len(p)
+ for len(p) > 0 {
+ i := bytes.IndexByte(p, '\n')
+ chunk := p
+ if i >= 0 {
+ chunk = p[:i]
+ }
+ if !w.long {
+ if len(w.partial)+len(chunk) > maxEvidenceLine {
+ w.long, w.partial = true, nil
+ } else {
+ w.partial = append(w.partial, chunk...)
+ }
+ }
+ if i < 0 {
+ break
+ }
+ w.line()
+ p = p[i+1:]
+ }
+ return n, nil
+}
+
+func (w *EvidenceStream) line() {
+ w.e.mu.Lock()
+ defer w.e.mu.Unlock()
+ if w.long {
+ w.e.broken = true
+ } else {
+ w.e.classify(strings.TrimSuffix(string(w.partial), "\r"))
+ }
+ w.partial, w.long = w.partial[:0], false
+}
+
+// Close records the stream's last line and that it ended whole.
+func (w *EvidenceStream) Close() error {
+ if w.done {
+ return nil
+ }
+ if len(w.partial) > 0 || w.long {
+ w.line()
+ }
+ w.done = true
+ w.e.mu.Lock()
+ w.e.open--
+ w.e.mu.Unlock()
+ return nil
+}
+
+// Abort records that the stream did not end whole.
+func (w *EvidenceStream) Abort() {
+ w.e.mu.Lock()
+ w.e.broken = true
+ w.e.mu.Unlock()
+}
+
+func (e *Evidence) complete() bool { return e.open == 0 && !e.broken }
+
+func (e *Evidence) classify(line string) {
+ if (independentFailure.MatchString(line) && !offlineDiagnostic.MatchString(line)) || jsonFailure(line) {
+ e.failure = true
+ }
+ switch trimmed := strings.TrimSpace(line); {
+ case trimmed == "" || neutralLine.MatchString(trimmed):
+ case offlineRefusal.MatchString(trimmed):
+ e.refusals++
+ default:
+ e.others++
+ }
+}
+
+// jsonFailure reports a go test -json event that failed: a test or a
+// package (fail), or a build (build-fail).
+func jsonFailure(line string) bool {
+ line = strings.TrimSpace(line)
+ if !strings.HasPrefix(line, "{") {
+ return false
+ }
+ var ev struct{ Action string }
+ return json.Unmarshal([]byte(line), &ev) == nil && (ev.Action == "fail" || ev.Action == "build-fail")
+}
+
+// GoModuleDirs lists the directories under root ("." first) holding a
+// module's go.mod whose dependencies come from the module cache: not
+// vendored, and not under vendor or testdata or a directory Go ignores
+// (a leading dot or underscore). Symlinks are not followed.
+func GoModuleDirs(root string) []string {
+ dir, err := os.OpenRoot(root)
+ if err != nil {
+ return nil
+ }
+ defer dir.Close()
+ var out []string
+ _ = fs.WalkDir(dir.FS(), ".", func(name string, d fs.DirEntry, err error) error {
+ if err != nil || len(out) >= 64 {
+ return fs.SkipDir
+ }
+ if d.IsDir() {
+ if base := d.Name(); name != "." && (ignoredDir(base)) {
+ return fs.SkipDir
+ }
+ return nil
+ }
+ if d.Name() != "go.mod" || !d.Type().IsRegular() {
+ return nil
+ }
+ if info, err := dir.Lstat(path.Join(path.Dir(name), "vendor/modules.txt")); err != nil || !info.Mode().IsRegular() {
+ out = append(out, path.Dir(name))
+ }
+ return nil
+ })
+ slices.Sort(out)
+ return out
+}
+
+func ignoredDir(base string) bool {
+ return base == "vendor" || base == "testdata" || strings.HasPrefix(base, ".") || strings.HasPrefix(base, "_")
+}
+
+// DependencyStage is the argv of Equipo's own dependency stage: `go mod
+// download` in each module directory, stopping at the first failure. It
+// works on copies of go.mod and go.sum (-modfile), so the tree the gate
+// then checks is exactly the candidate's.
+func DependencyStage(dirs []string) []string {
+ const script = `t=$(mktemp -d) || exit 1
+i=0
+for d; do
+ i=$((i+1)); mkdir -p "$t/$i" || exit 1
+ cp -- "$d/go.mod" "$t/$i/go.mod" || exit 1
+ if [ -f "$d/go.sum" ]; then cp -- "$d/go.sum" "$t/$i/go.sum" || exit 1; fi
+ (cd -- "$d" && go mod download -modfile="$t/$i/go.mod") || exit $?
+done`
+ return append([]string{"/usr/bin/bash", "-c", script, "equipo-dependencies"}, dirs...)
+}
+
+// GoRequirement is what a repository's own files ask of the Go toolchain.
+type GoRequirement struct {
+ // Minimum is the highest go or toolchain directive in any go.mod.
+ Minimum string
+ // Make are the releases Makefiles pin. make runs with
+ // GOTOOLCHAIN=local (gotoolchain.Environment), so a newer patch of
+ // the same minor release stands in.
+ Make []string
+ // Exact are the releases other gate files pin. Nothing overrides
+ // those, so only that release runs them.
+ Exact []string
+}
+
+// GoRequirementFile reports whether a repository file is read for its Go
+// requirement: a go.mod (not a vendored or test-data copy), a Makefile or
+// .mk file, or an Amadan gate file.
+func GoRequirementFile(name string) bool {
+ for _, part := range strings.Split(path.Dir(name), "/") {
+ if part != "." && ignoredDir(part) && part != ".amadan" {
+ return false
+ }
+ }
+ base := path.Base(name)
+ return base == "go.mod" || base == "Makefile" || base == "makefile" || base == "GNUmakefile" || path.Ext(name) == ".mk" || name == ".amadan/ci" || strings.HasPrefix(name, ".amadan/ci.d/")
+}
+
+var goDirective = regexp.MustCompile(`(?m)^[ \t]*(go|toolchain)[ \t]+(\S+)[ \t]*(?://.*)?$`)
+var toolchainPin = regexp.MustCompile(`\bGOTOOLCHAIN[ \t]*(?::=|::=|\?=|=)[ \t]*['"]?(go1\.[0-9]+(?:\.[0-9]+)?(?:(?:rc|beta)[0-9]+)?)(\+auto|\+path)?`)
+
+// ReadGoRequirement reads the requirement from files named by
+// GoRequirementFile (path to content).
+func ReadGoRequirement(files map[string][]byte) GoRequirement {
+ var r GoRequirement
+ raise := func(v string) {
+ if version.IsValid(v) && (r.Minimum == "" || version.Compare(v, r.Minimum) > 0) {
+ r.Minimum = v
+ }
+ }
+ for name, body := range files {
+ text := string(body)
+ if path.Base(name) == "go.mod" {
+ for _, m := range goDirective.FindAllStringSubmatch(text, -1) {
+ v := m[2]
+ if m[1] == "go" {
+ v = "go" + v
+ }
+ raise(v)
+ }
+ continue
+ }
+ makefile := path.Base(name) != "ci" && !strings.HasPrefix(name, ".amadan/")
+ for _, m := range toolchainPin.FindAllStringSubmatch(text, -1) {
+ switch {
+ case m[2] != "":
+ raise(m[1])
+ case makefile:
+ r.Make = append(r.Make, m[1])
+ default:
+ r.Exact = append(r.Exact, m[1])
+ }
+ }
+ }
+ return r
+}
+
+// Unmet reports whether the local toolchain (go1.x.y) cannot honour r.
+func (r GoRequirement) Unmet(local string) bool {
+ if r.Minimum != "" && version.Compare(local, r.Minimum) < 0 {
+ return true
+ }
+ for _, pin := range r.Make {
+ if version.Lang(pin) != version.Lang(local) || version.Compare(local, pin) < 0 {
+ return true
+ }
+ }
+ for _, pin := range r.Exact {
+ if version.Compare(local, pin) != 0 {
+ return true
+ }
+ }
+ return false
+}
+
+// RunnerGoVersion is the release of the Go tree at goRoot, from the first
+// line of its VERSION file.
+func RunnerGoVersion(goRoot string) (string, error) {
+ raw, err := os.ReadFile(filepath.Join(goRoot, "VERSION"))
+ if err != nil {
+ return "", err
+ }
+ v, _, _ := strings.Cut(string(raw), "\n")
+ if v = strings.TrimSpace(v); !version.IsValid(v) {
+ return "", errors.New("go root has no release version")
+ }
+ return v, nil
+}
diff --git a/internal/runner/checks/network_test.go b/internal/runner/checks/network_test.go
new file mode 100644
index 00000000..3e62173f
--- /dev/null
+++ b/internal/runner/checks/network_test.go
@@ -0,0 +1,240 @@
+package checks
+
+import (
+ "os"
+ "os/exec"
+ "path/filepath"
+ "slices"
+ "strings"
+ "testing"
+
+ "golang.org/x/mod/module"
+ modzip "golang.org/x/mod/zip"
+)
+
+const (
+ toolchainRefused = "go: golang.org/toolchain@v0.0.1-go1.26.5.linux-amd64: verifying module: checksum database disabled by GOSUMDB=off"
+ moduleRefused = "go: amadan.net/oficina/home/handoff@v0.0.0-20261120140933-17cdcaff3345: module lookup disabled by GOPROXY=off"
+)
+
+// TestNeedsNetworkNeedsTheDependencyStage: only Equipo's own dependency
+// stage can say a gate needed the network: it failed, and everything Go
+// printed there is its refusal to download a module or a Go release
+// offline. The gate's output is the candidate's: read whole, as it is
+// produced, it can only keep a failure a failure, and evidence that is
+// not complete keeps it a failure too (Astra, reviews of f03d79bb and
+// 4e0d2497).
+func TestNeedsNetworkNeedsTheDependencyStage(t *testing.T) {
+ run := func(code int, out string) Run { return Run{Code: code, Output: out, Evidence: Scan(out)} }
+ offline := run(1, moduleRefused+"\n"+toolchainRefused+"\n")
+ deps := "go mod download in . failed (the hub's git rate limit?); retrying in 5s\napp.go:32:2: module lookup disabled by GOPROXY=off\nx.go:3:8: mkdir /opt/go-mod/cache/download/example.invalid: read-only file system\nFAIL\tamadan.net/oficina/home [setup failed]\nFAIL\nmake: *** [Makefile:82: deps] Error 1\n"
+ gateDeps := run(2, deps)
+ if !NeedsNetwork(offline, gateDeps) {
+ t.Fatal("an offline dependency stage and a gate failing on dependencies is not needs-network")
+ }
+ noise := strings.Repeat("noise\n", 5000)
+ for name, tc := range map[string]struct{ stage, gate Run }{
+ "checksum mismatch": {run(1, "verifying example.com/m@v1.0.0: checksum mismatch\n\tdownloaded: h1:aaa=\n\tgo.sum: h1:bbb=\n\nSECURITY ERROR\nThis download does NOT match an earlier download recorded in go.sum.\n"), gateDeps},
+ "corrupt archive": {run(1, "go: golang.org/toolchain@v0.0.1-go1.26.5.linux-amd64: zip: not a valid zip file\n"), gateDeps},
+ "quoted diagnostic": {run(0, ""), run(1, " door_test.go:12: got \""+toolchainRefused+"\"\n"+toolchainRefused+"\n"+moduleRefused+"\nFAIL\n")},
+ "stage passed": {run(0, toolchainRefused), gateDeps},
+ "mixed test": {offline, run(1, deps+"--- FAIL: TestDoorPages (0.01s)\n")},
+ "mixed compile": {offline, run(1, deps+"./calma.go:12:2: undefined: doorView\n")},
+ "mixed panic": {offline, run(1, deps+"panic: runtime error: index out of range\n")},
+ "mixed other write": {offline, run(1, deps+"x.go:3:8: open /workspace/gen.go: read-only file system\n")},
+ "json test failure": {offline, run(1, deps+`{"Time":"2026-11-23T10:00:00Z","Action":"fail","Package":"example.com/x","Test":"TestDoor","Elapsed":0}`+"\n")},
+ "json build failure": {offline, run(1, deps+`{"ImportPath":"example.com/x","Action":"build-fail"}`+"\n")},
+ "failure beyond tail": {offline, run(1, "--- FAIL: TestDoor (0.00s)\n"+noise+deps)},
+ "stage other line": {run(1, moduleRefused+"\nbash: cd: handoff: No such file or directory\n"), gateDeps},
+ "stage refusal beyond tail": {run(1, "bash: cd: handoff: No such file or directory\n"+strings.Repeat(moduleRefused+"\n", 500)), gateDeps},
+ "stage empty": {run(1, ""), gateDeps},
+ "stage only progress": {run(1, "go: no module dependencies to download\n"), gateDeps},
+ "gate passed": {offline, run(0, "")},
+ "newer go.mod": {run(1, "go: go.mod requires go >= 1.27.0 (running go 1.26.10; GOTOOLCHAIN=local)\n"), gateDeps},
+ "no gate evidence": {offline, Run{Code: 2, Output: deps}},
+ "no stage evidence": {Run{Code: 1, Output: moduleRefused}, gateDeps},
+ } {
+ if NeedsNetwork(tc.stage, tc.gate) {
+ t.Errorf("%s: counted as needs-network", name)
+ }
+ }
+ // Incomplete evidence is a failure: a stream never finished, one cut
+ // short, or a line too long to read whole.
+ incomplete := map[string]func() *Evidence{
+ "stream never closed": func() *Evidence {
+ e, w := NewEvidence(2)
+ w[0].Write([]byte(deps))
+ w[0].Close()
+ return e
+ },
+ "stream cut short": func() *Evidence {
+ e, w := NewEvidence(1)
+ w[0].Write([]byte(deps))
+ w[0].Abort()
+ return e
+ },
+ "line too long": func() *Evidence {
+ e, w := NewEvidence(1)
+ w[0].Write([]byte(deps + strings.Repeat("x", 1<<20) + "\n"))
+ w[0].Close()
+ return e
+ },
+ }
+ for name, ev := range incomplete {
+ if NeedsNetwork(offline, Run{Code: 2, Output: deps, Evidence: ev()}) {
+ t.Errorf("%s: counted as needs-network", name)
+ }
+ }
+ stageEv, stageW := NewEvidence(2)
+ stageW[0].Write([]byte(moduleRefused + "\n"))
+ stageW[0].Close()
+ if NeedsNetwork(Run{Code: 1, Evidence: stageEv}, gateDeps) {
+ t.Error("an unfinished dependency stage counted as needs-network")
+ }
+ // Written in pieces, from two streams at once, the same lines read the same.
+ e, w := NewEvidence(2)
+ for _, piece := range strings.SplitAfter(deps, "o") {
+ w[0].Write([]byte(piece))
+ w[1].Write([]byte(piece))
+ }
+ w[0].Close()
+ w[1].Close()
+ if !NeedsNetwork(offline, Run{Code: 2, Evidence: e}) {
+ t.Fatal("streamed evidence read differently")
+ }
+}
+
+// TestGoRequirement: the runner's Go must meet what the base's own
+// go.mod files and gate files ask. go and toolchain directives are
+// minimums; a release a Makefile pins is honoured by the same minor
+// release at that patch or newer (make runs with GOTOOLCHAIN=local); a
+// release any other gate file pins is honoured only exactly.
+func TestGoRequirement(t *testing.T) {
+ home := map[string]string{"go.mod": "module amadan.net/oficina/home\n\ngo 1.26.0\n\ntoolchain go1.26.5\n", "handoff/go.mod": "module x\n\ngo 1.25.0\n", "Makefile": "export GOTOOLCHAIN := go1.26.5\nbuild:\n\tgo build ./...\n"}
+ for _, tc := range []struct {
+ name string
+ files map[string]string
+ met bool
+ }{
+ {"home", home, true},
+ {"newer go directive", map[string]string{"go.mod": "module x\n\ngo 1.27.0\n"}, false},
+ {"newer toolchain directive", map[string]string{"go.mod": "module x\n\ngo 1.26.0\ntoolchain go1.27.1\n"}, false},
+ {"newer submodule", map[string]string{"go.mod": "module x\n\ngo 1.26.0\n", "tools/go.mod": "module y\n\ngo 1.26.11\n"}, false},
+ {"vendored go.mod ignored", map[string]string{"go.mod": "module x\n\ngo 1.26.0\n", "vendor/example.com/y/go.mod": "module y\n\ngo 1.30\n", "internal/testdata/go.mod": "module z\n\ngo 1.30\n"}, true},
+ {"make pins an older minor", map[string]string{"Makefile": "export GOTOOLCHAIN := go1.25.4\n"}, false},
+ {"make pins a newer patch", map[string]string{"build/go.mk": "GOTOOLCHAIN ?= go1.26.11\n"}, false},
+ {"make pins a minimum", map[string]string{"GNUmakefile": "export GOTOOLCHAIN=go1.26.3+auto\n"}, true},
+ {"make pins a newer minimum", map[string]string{"Makefile": "export GOTOOLCHAIN = go1.27.0+auto\n"}, false},
+ {"make asks for local", map[string]string{"Makefile": "export GOTOOLCHAIN := local\n"}, true},
+ {"script pins another patch", map[string]string{".amadan/ci.d/10-vet": "#!/bin/sh\nexport GOTOOLCHAIN=go1.26.5\nexec go vet ./...\n"}, false},
+ {"script pins this release", map[string]string{".amadan/ci": "GOTOOLCHAIN='go1.26.10' go test ./...\n"}, true},
+ {"no Go", map[string]string{"package.json": "{}"}, true},
+ } {
+ files := map[string][]byte{}
+ for name, body := range tc.files {
+ if !GoRequirementFile(name) && name != "package.json" && name != "vendor/example.com/y/go.mod" && name != "internal/testdata/go.mod" {
+ t.Fatalf("%s: %s not read", tc.name, name)
+ }
+ if GoRequirementFile(name) {
+ files[name] = []byte(body)
+ }
+ }
+ if got := ReadGoRequirement(files).Unmet("go1.26.10"); got == tc.met {
+ t.Errorf("%s: unmet=%v", tc.name, got)
+ }
+ }
+}
+
+func TestRunnerGoVersion(t *testing.T) {
+ root := t.TempDir()
+ if _, err := RunnerGoVersion(root); err == nil {
+ t.Fatal("missing VERSION accepted")
+ }
+ os.WriteFile(filepath.Join(root, "VERSION"), []byte("go1.26.10\ntime 2026-11-05T00:00:00Z\n"), 0o600)
+ if v, err := RunnerGoVersion(root); err != nil || v != "go1.26.10" {
+ t.Fatalf("%q %v", v, err)
+ }
+ os.WriteFile(filepath.Join(root, "VERSION"), []byte("devel +abc\n"), 0o600)
+ if _, err := RunnerGoVersion(root); err == nil {
+ t.Fatal("unversioned toolchain accepted")
+ }
+}
+
+// TestDependencyStage: the stage downloads each module's dependencies
+// from the read-only cache, in Go's own words, and leaves the tree's
+// go.mod and go.sum exactly as the candidate wrote them.
+func TestDependencyStage(t *testing.T) {
+ goBin, err := exec.LookPath("go")
+ if err != nil {
+ t.Skip("go is not installed")
+ }
+ tree := t.TempDir()
+ write := func(name, body string) {
+ p := filepath.Join(tree, name)
+ os.MkdirAll(filepath.Dir(p), 0o700)
+ if err := os.WriteFile(p, []byte(body), 0o600); err != nil {
+ t.Fatal(err)
+ }
+ }
+ write("go.mod", "module example.com/app\n\ngo 1.21\n")
+ write("app.go", "package app\n")
+ write("dep/go.mod", "module example.com/dep\n\ngo 1.21\n\nrequire example.invalid/missing v1.0.0\n")
+ write("dep/go.sum", "")
+ write("vendored/go.mod", "module example.com/vendored\n\ngo 1.21\n\nrequire example.invalid/v v1.0.0\n")
+ write("vendored/vendor/modules.txt", "# example.invalid/v v1.0.0\n")
+ for _, skipped := range []string{"vendor/x/go.mod", "testdata/go.mod", ".hidden/go.mod", "_old/go.mod"} {
+ write(skipped, "module skipped\n")
+ }
+ dirs := GoModuleDirs(tree)
+ if !slices.Equal(dirs, []string{".", "dep"}) {
+ t.Fatalf("module dirs %q", dirs)
+ }
+ proxy := "off"
+ run := func(dirs []string) Run {
+ argv := DependencyStage(dirs)
+ cmd := exec.Command(argv[0], argv[1:]...)
+ cmd.Dir = tree
+ cmd.Env = []string{"PATH=" + filepath.Dir(goBin) + ":/usr/bin:/bin", "HOME=" + t.TempDir(), "TMPDIR=" + t.TempDir(), "GOMODCACHE=" + t.TempDir(), "GOCACHE=" + t.TempDir(), "GOPROXY=" + proxy, "GOSUMDB=off", "GOTOOLCHAIN=local", "GOFLAGS=-modcacherw", "GOWORK=off", "GOENV=off", "GOTELEMETRY=off"}
+ out, _ := cmd.CombinedOutput()
+ return Run{Code: cmd.ProcessState.ExitCode(), Output: string(out), Evidence: Scan(string(out))}
+ }
+ if res := run([]string{"."}); res.Code != 0 {
+ t.Fatalf("a module with nothing to download failed: %+v", res)
+ }
+ res := run(dirs)
+ if res.Code == 0 || !NeedsNetwork(res, Run{Code: 1, Evidence: Scan("make: *** [ci] Error 1\n")}) {
+ t.Fatalf("missing module not refused offline in Go's words: %+v", res)
+ }
+ // A download that succeeds (from a local proxy here) records its sums
+ // in the stage's copy, never in the candidate's go.sum.
+ dir := t.TempDir()
+ lib := filepath.Join(dir, "lib")
+ os.MkdirAll(lib, 0o700)
+ os.WriteFile(filepath.Join(lib, "go.mod"), []byte("module example.com/lib\n\ngo 1.21\n"), 0o600)
+ os.WriteFile(filepath.Join(lib, "lib.go"), []byte("package lib\n"), 0o600)
+ at := filepath.Join(dir, "proxy/example.com/lib/@v")
+ os.MkdirAll(at, 0o700)
+ os.WriteFile(filepath.Join(at, "list"), []byte("v1.0.0\n"), 0o600)
+ os.WriteFile(filepath.Join(at, "v1.0.0.info"), []byte(`{"Version":"v1.0.0"}`), 0o600)
+ os.WriteFile(filepath.Join(at, "v1.0.0.mod"), []byte("module example.com/lib\n\ngo 1.21\n"), 0o600)
+ z, err := os.Create(filepath.Join(at, "v1.0.0.zip"))
+ if err != nil {
+ t.Fatal(err)
+ }
+ if err := modzip.CreateFromDir(z, module.Version{Path: "example.com/lib", Version: "v1.0.0"}, lib); err != nil {
+ t.Fatal(err)
+ }
+ z.Close()
+ write("uses/go.mod", "module example.com/uses\n\ngo 1.21\n\nrequire example.com/lib v1.0.0\n")
+ write("uses/go.sum", "")
+ write("uses/uses.go", "package uses\n\nimport _ \"example.com/lib\"\n")
+ proxy = "file://" + filepath.Join(dir, "proxy")
+ if res := run([]string{"uses"}); res.Code != 0 {
+ t.Fatalf("download from the proxy failed: %+v", res)
+ }
+ for _, name := range []string{"dep/go.sum", "uses/go.sum"} {
+ if raw, _ := os.ReadFile(filepath.Join(tree, name)); len(raw) != 0 {
+ t.Fatalf("the stage wrote the candidate's %s: %q", name, raw)
+ }
+ }
+}
diff --git a/internal/runner/checks/sandbox.go b/internal/runner/checks/sandbox.go
index bef6ad96..e1b17e81 100644
--- a/internal/runner/checks/sandbox.go
+++ b/internal/runner/checks/sandbox.go
@@ -213,7 +213,7 @@ func (s *CodexSandbox) Run(ctx context.Context, c Command, work string, policy p
defer cancel()
cmd := exec.CommandContext(ctx, s.binary, args...)
cmd.Dir = control
- cmd.Env = []string{"PATH=" + filepath.Join(s.goRoot, "bin") + ":/usr/bin:/bin", "HOME=" + s.home, "CODEX_HOME=" + cfgHome, "TMPDIR=" + temp, "GOCACHE=" + cache, "GOTMPDIR=" + goTemp, "GOROOT=" + s.goRoot, "CGO_ENABLED=0", "GOTOOLCHAIN=local", "GOWORK=off", "GOENV=off", "GOFLAGS=", "GOTELEMETRY=off", "XDG_CONFIG_HOME=" + xdg, "GOPROXY=off", "GOSUMDB=off", "LANG=C", "LC_ALL=C"}
+ cmd.Env = []string{"PATH=" + filepath.Join(s.goRoot, "bin") + ":/usr/bin:/bin", "HOME=" + s.home, "CODEX_HOME=" + cfgHome, "TMPDIR=" + temp, "GOCACHE=" + cache, "GOTMPDIR=" + goTemp, "GOROOT=" + s.goRoot, "CGO_ENABLED=0", "GOTOOLCHAIN=local", "MAKEFLAGS=GOTOOLCHAIN=local", "GOWORK=off", "GOENV=off", "GOFLAGS=", "GOTELEMETRY=off", "XDG_CONFIG_HOME=" + xdg, "GOPROXY=off", "GOSUMDB=off", "LANG=C", "LC_ALL=C"}
for key, value := range workspace.GitEnvironment() {
if strings.HasPrefix(key, "GIT_") {
cmd.Env = append(cmd.Env, key+"="+value)
diff --git a/internal/runner/containment/engineering_go_test.go b/internal/runner/containment/engineering_go_test.go
index 33f60c23..75949ea9 100644
--- a/internal/runner/containment/engineering_go_test.go
+++ b/internal/runner/containment/engineering_go_test.go
@@ -119,7 +119,7 @@ func TestEngineeringOfflineGo(t *testing.T) {
}
defer listener.Close()
script := fmt.Sprintf(`import os,socket,subprocess
-expected={'GOPROXY':'off','GOSUMDB':'off','GOTOOLCHAIN':'local','GOFLAGS':'','CGO_ENABLED':'0','GOCACHE':'/tmp/claude-'+str(os.getuid())+'/go-build','GOTMPDIR':'/tmp/claude-'+str(os.getuid())+'/go-tmp','GOROOT':'/opt/go','GOMODCACHE':'/opt/go-mod','GOENV':'off','GOWORK':'off','GOTELEMETRY':'off'}
+expected={'GOPROXY':'off','GOSUMDB':'off','GOTOOLCHAIN':'local','MAKEFLAGS':'GOTOOLCHAIN=local','GOFLAGS':'','CGO_ENABLED':'0','GOCACHE':'/tmp/claude-'+str(os.getuid())+'/go-build','GOTMPDIR':'/tmp/claude-'+str(os.getuid())+'/go-tmp','GOROOT':'/opt/go','GOMODCACHE':'/opt/go-mod','GOENV':'off','GOWORK':'off','GOTELEMETRY':'off'}
for k,v in expected.items(): assert os.environ.get(k)==v,(k,os.environ.get(k))
assert os.environ['PATH'].endswith('/opt/go/bin:/usr/bin:/bin:/opt')
assert 'XDG_CONFIG_HOME' not in os.environ
diff --git a/internal/runner/provider/claude/answers.go b/internal/runner/provider/claude/answers.go
index cebe0c5f..0236c479 100644
--- a/internal/runner/provider/claude/answers.go
+++ b/internal/runner/provider/claude/answers.go
@@ -173,28 +173,132 @@ func permissionResult(q permissionRequest, a provider.Answer, policy provider.Po
return json.Marshal(map[string]any{"behavior": "allow", "updatedInput": input})
}
+// A step's permission callback refuses with a fixed reason: the rule
+// that refused and what to do instead. It never repeats the request.
+const (
+ refusePath = "file tools need an absolute path under /workspace; for Glob and Grep, pass path, such as /workspace"
+ refuseOutside = "this step can use files only under /workspace (and read /research)"
+ refuseProtected = "that path is protected: credentials, runtime files and links are never available"
+ refuseResearch = "/research is read-only: use Read, Glob and Grep there"
+ refuseFields = "the request has a field this step does not accept"
+ refuseSandbox = "commands run only inside the sandbox; dangerouslyDisableSandbox is not available"
+ refusePerson = "this step's policy keeps shell commands for a person's approval, and nobody is asked during a step"
+ refuseTool = "this tool is not available to this step"
+ refuseReadOnly = "this step only reads: use Read, Glob and Grep under /workspace"
+ refuseShell = "this step's policy does not keep commands in the sandbox, so it runs none"
+)
+
+func refusal(rule string) json.RawMessage {
+ out, _ := json.Marshal(map[string]string{"behavior": "deny", "message": provider.ErrPolicy.Error() + ": " + rule})
+ return out
+}
+
// StepPermission answers an Engineering step's permission callback when
-// nobody is asked: a workspace file action passes the same protected-path
-// and field checks as an approved one and is allowed; everything else is
-// denied. The result is the callback's JSON text.
+// nobody is asked. A workspace file action passes the same protected-path
+// and field checks as an approved one and is allowed. A shell command is
+// allowed when the policy confines every command to the CLI's sandbox
+// (sandboxedShell): the CLI asks for one only where its own automatic
+// approval is off or declines, as it always is for a token connection
+// (CLAUDE_CODE_SUBPROCESS_ENV_SCRUB). Everything else is denied with the
+// rule that refused it. The result is the callback's JSON text.
func StepPermission(raw json.RawMessage, policy provider.Policy) json.RawMessage {
- deny, _ := permissionResult(permissionRequest{}, provider.Answer{Behavior: "deny"}, policy)
var q permissionRequest
d := json.NewDecoder(bytes.NewReader(raw))
d.DisallowUnknownFields()
if !uniqueJSON(raw) || d.Decode(&q) != nil || q.Tool == "" || !uniqueJSON(q.Input) || len(raw) > MaxFrameBytes {
- return deny
+ return refusal(refuseFields)
}
- if protectedNativePath(q, policy) || !workspaceNativePath(q) && !researchNativePath(q) {
- return deny
+ if q.Tool == "Bash" {
+ if rule := sandboxedShell(q, policy); rule != "" {
+ return refusal(rule)
+ }
+ } else if rule := stepPathRule(q, policy); rule != "" {
+ return refusal(rule)
}
out, err := permissionResult(q, provider.Answer{Behavior: "allow"}, policy)
if err != nil {
- return deny
+ return refusal(refuseFields)
}
return out
}
+// stepPathRule names the rule refusing a native file action in a step, or
+// "" when the action is inside the step's profile.
+func stepPathRule(q permissionRequest, policy provider.Policy) string {
+ if !slices.Contains([]string{"Read", "Write", "Edit", "Glob", "Grep"}, q.Tool) {
+ return refuseTool
+ }
+ var input map[string]json.RawMessage
+ if json.Unmarshal(q.Input, &input) != nil {
+ return refuseFields
+ }
+ path := ""
+ for _, key := range []string{"file_path", "path"} {
+ if raw, ok := input[key]; ok {
+ if json.Unmarshal(raw, &path) != nil {
+ return refuseFields
+ }
+ break
+ }
+ }
+ switch {
+ case path == "" || strings.HasPrefix(path, "~") || !filepath.IsAbs(path):
+ return refusePath
+ case protectedNativePath(q, policy):
+ return refuseProtected
+ case workspaceNativePath(q) || researchNativePath(q):
+ return ""
+ case filepath.Clean(path) == "/research" || strings.HasPrefix(filepath.Clean(path), "/research/"):
+ return refuseResearch
+ }
+ return refuseOutside
+}
+
+// sandboxedShell names the rule refusing a shell command in a step, or ""
+// when the step may run it: the policy keeps every command in the CLI's
+// sandbox (enabled, no unconfined fallback or exemption, no weaker nesting),
+// the request cannot ask to leave it, and the policy reserves no shell
+// approval for a person. The command's text is never consulted: a shell
+// rule cannot stop a sandboxed command producing any text, so a policy
+// with a Bash ask rule refuses every shell request in a step.
+func sandboxedShell(q permissionRequest, policy provider.Policy) string {
+ var input map[string]json.RawMessage
+ var command string
+ if json.Unmarshal(q.Input, &input) != nil {
+ return refuseFields
+ }
+ for _, key := range []string{"dangerouslyDisableSandbox", "sandbox"} {
+ if _, ok := input[key]; ok {
+ return refuseSandbox
+ }
+ }
+ if json.Unmarshal(input["command"], &command) != nil || strings.TrimSpace(command) == "" {
+ return refuseFields
+ }
+ var m manifest
+ var settings struct {
+ Sandbox *struct {
+ Enabled, FailIfUnavailable, AllowUnsandboxedCommands *bool
+ ExcludedCommands []string
+ EnableWeakerNestedSandbox *bool
+ }
+ Permissions struct{ Ask []string }
+ }
+ if json.Unmarshal(policy.Manifest, &m) != nil || json.Unmarshal(m.Settings, &settings) != nil {
+ return refuseShell
+ }
+ s := settings.Sandbox
+ if s == nil || s.Enabled == nil || !*s.Enabled || s.FailIfUnavailable == nil || !*s.FailIfUnavailable || s.AllowUnsandboxedCommands == nil || *s.AllowUnsandboxedCommands || len(s.ExcludedCommands) != 0 || s.EnableWeakerNestedSandbox != nil && *s.EnableWeakerNestedSandbox {
+ return refuseShell
+ }
+ for _, rule := range settings.Permissions.Ask {
+ if rule == "Bash" || strings.HasPrefix(rule, "Bash(") {
+ return refusePerson
+ }
+ }
+ return ""
+}
+
// ReadPermission is StepPermission for a read-only step: only Read, Glob
// and Grep inside the workspace; every write, shell or other tool is
// denied.
@@ -203,8 +307,7 @@ func ReadPermission(raw json.RawMessage, policy provider.Policy) json.RawMessage
Tool string `json:"tool_name"`
}
if json.Unmarshal(raw, &q) != nil || !slices.Contains([]string{"Read", "Glob", "Grep"}, q.Tool) {
- deny, _ := permissionResult(permissionRequest{}, provider.Answer{Behavior: "deny"}, policy)
- return deny
+ return refusal(refuseReadOnly)
}
return StepPermission(raw, policy)
}
diff --git a/internal/runner/provider/claude/answers_test.go b/internal/runner/provider/claude/answers_test.go
index 7ca6c4f3..b35d27b0 100644
--- a/internal/runner/provider/claude/answers_test.go
+++ b/internal/runner/provider/claude/answers_test.go
@@ -174,7 +174,8 @@ func TestClaudePermissionResponsePinnedWire(t *testing.T) {
}
// TestStepPermission: with nobody to ask, an Engineering step may use its
-// file tools inside /workspace under the same checks; nothing else.
+// file tools inside /workspace under the same checks, and its shell, which
+// the policy confines to the CLI's sandbox; nothing else.
func TestStepPermission(t *testing.T) {
f := fixtureFor(t, "Engineering")
allowed := func(raw string) bool {
@@ -190,6 +191,7 @@ func TestStepPermission(t *testing.T) {
`{"tool_name":"Write","input":{"file_path":"/workspace/panes/new.go","content":"package panes"}}`,
`{"tool_name":"Read","input":{"file_path":"/workspace/README.md"}}`,
`{"tool_name":"Grep","input":{"pattern":"swipe","path":"/workspace"}}`,
+ `{"tool_name":"Bash","input":{"command":"curl example.com"}}`,
} {
if !allowed(raw) {
t.Fatalf("refused %s", raw)
@@ -200,7 +202,7 @@ func TestStepPermission(t *testing.T) {
`{"tool_name":"Read","input":{"file_path":"/workspace/../home/runner/.credentials.json"}}`,
`{"tool_name":"Write","input":{"file_path":"/tool/equipo.sock","content":"x"}}`,
`{"tool_name":"Write","input":{"file_path":"/workspace/a","content":"x","dangerouslyDisableSandbox":true}}`,
- `{"tool_name":"Bash","input":{"command":"curl example.com"}}`,
+ `{"tool_name":"Bash","input":{"command":"ls","dangerouslyDisableSandbox":true}}`,
`{"tool_name":"mcp__equipo__submit_candidate","input":{}}`,
`{"tool_name":"Read","input":{"file_path":"README.md"}}`,
`{"tool_name":"Edit","input":{"file_path":"/workspace/a"},"extra":1}`,
@@ -242,11 +244,154 @@ func TestStepPermissionReadsResearch(t *testing.T) {
`{"tool_name":"Read","input":{"file_path":"/researchers/a"}}`,
`{"tool_name":"Read","input":{"file_path":"research/img1-logo.png"}}`,
`{"tool_name":"Glob","input":{"pattern":"../home/*","path":"/research"}}`,
- `{"tool_name":"Bash","input":{"command":"cat /research/img1-logo.png"}}`,
} {
if allowed(check, raw) {
t.Fatalf("allowed %s", raw)
}
}
}
+ // Engineering's shell runs in the sandbox, which binds /research
+ // read-only; a read-only step runs no shell through its callback.
+ if allowed(ReadPermission, `{"tool_name":"Bash","input":{"command":"cat /research/img1-logo.png"}}`) {
+ t.Fatal("read-only step allowed a shell read")
+ }
+}
+
+// TestStepPermissionRunsSandboxedShell: production 2026-11-22, a token
+// connection (claude-2). Token launches set CLAUDE_CODE_SUBPROCESS_ENV_SCRUB,
+// and in that mode the pinned CLI turns sandbox auto-approval off, so its
+// ordinary shell commands reached this callback and every one was refused.
+// The policy forces every command into the CLI's sandbox, so the step
+// allows them exactly as the CLI's auto-approval would. No command's text
+// is special; a policy that reserves shell approval for a person (any
+// Bash ask rule) refuses every shell request in a step instead.
+func TestStepPermissionRunsSandboxedShell(t *testing.T) {
+ f := fixtureFor(t, "Engineering")
+ // The commands the CLI escalated in that step (its reason codes:
+ // cd-compound-read, too-complex, no-rule-match, outside the working
+ // directory).
+ for _, command := range []string{
+ `cd internal/home; grep -ln "operator/confirm" *_test.go`,
+ `cd /workspace/internal/home; ls *operator*`,
+ `export PATH=/opt/go/bin:$PATH GOMODCACHE=/opt/go-mod GOTOOLCHAIN=local; go test ./internal/home/`,
+ `GOTOOLCHAIN=local CGO_ENABLED=0 /opt/go/bin/go test -count=1 ./internal/home/ 2>&1 | tail -30`,
+ `/opt/go/bin/go version`,
+ `ls /opt/go/bin`,
+ `which go gofmt; ls /opt`,
+ `printf equipo-cert-deny`, `printf "equipo-cert-allow"`, `env printf equipo-cert-deny`,
+ } {
+ input, _ := json.Marshal(map[string]any{"command": command, "description": "d", "timeout": 600000})
+ raw, _ := json.Marshal(map[string]any{"tool_name": "Bash", "tool_use_id": "toolu_x", "input": json.RawMessage(input)})
+ var v struct {
+ Behavior string
+ UpdatedInput json.RawMessage
+ }
+ if json.Unmarshal(StepPermission(raw, f.launch.Policy), &v) != nil || v.Behavior != "allow" || !sameJSON(v.UpdatedInput, input) {
+ t.Fatalf("sandboxed command refused or changed: %s -> %+v", command, v)
+ }
+ }
+ for _, raw := range []string{
+ `{"tool_name":"Bash","input":{"command":"ls","dangerouslyDisableSandbox":false}}`,
+ `{"tool_name":"Bash","input":{"command":"ls","sandbox":false}}`,
+ `{"tool_name":"Bash","input":{"command":7}}`,
+ `{"tool_name":"Bash","input":{}}`,
+ } {
+ if stepBehavior(t, StepPermission, raw, f.launch.Policy) == "allow" {
+ t.Fatalf("allowed %s", raw)
+ }
+ }
+ // Only a policy that keeps every command in the sandbox lets the step
+ // approve shell commands itself.
+ for name, mutate := range map[string]func(map[string]any){
+ "sandbox off": func(s map[string]any) { s["enabled"] = false },
+ "unsandboxed allowed": func(s map[string]any) { s["allowUnsandboxedCommands"] = true },
+ "may run unconfined": func(s map[string]any) { s["failIfUnavailable"] = false },
+ "excluded commands": func(s map[string]any) { s["excludedCommands"] = []string{"go"} },
+ "weaker nested": func(s map[string]any) { s["enableWeakerNestedSandbox"] = true },
+ "no sandbox key": nil,
+ } {
+ p := withSandboxSettings(t, f.launch.Policy, mutate)
+ if stepBehavior(t, StepPermission, `{"tool_name":"Bash","input":{"command":"ls"}}`, p) == "allow" {
+ t.Fatalf("%s: shell allowed", name)
+ }
+ }
+ reserved := withSettings(t, f.launch.Policy, func(s map[string]any) {
+ s["permissions"].(map[string]any)["ask"] = []string{"Bash(git push:*)"}
+ })
+ if stepBehavior(t, StepPermission, `{"tool_name":"Bash","input":{"command":"ls"}}`, reserved) == "allow" {
+ t.Fatal("a policy reserving shell approval for a person let a step approve")
+ }
+ // Review keeps its read-only callback: no shell through it.
+ r := fixtureFor(t, "Review")
+ if stepBehavior(t, ReadPermission, `{"tool_name":"Bash","input":{"command":"ls"}}`, r.launch.Policy) == "allow" {
+ t.Fatal("read-only step allowed a shell command")
+ }
+}
+
+// TestStepPermissionNamesTheRule: a refusal tells the model which rule
+// refused it and what to do instead, in fixed words that never repeat
+// the request.
+func TestStepPermissionNamesTheRule(t *testing.T) {
+ f := fixtureFor(t, "Engineering")
+ secret := "sk-ant-oat01-zzzz"
+ for _, tc := range []struct{ raw, want string }{
+ {`{"tool_name":"Glob","input":{"pattern":"internal/home/*` + secret + `*"}}`, "absolute path"},
+ {`{"tool_name":"Read","input":{"file_path":"README-` + secret + `.md"}}`, "absolute path"},
+ {`{"tool_name":"Read","input":{"file_path":"~/` + secret + `"}}`, "absolute path"},
+ {`{"tool_name":"Read","input":{"file_path":"/etc/` + secret + `"}}`, "/workspace"},
+ {`{"tool_name":"Write","input":{"file_path":"/tool/equipo.sock","content":"` + secret + `"}}`, "protected"},
+ {`{"tool_name":"Write","input":{"file_path":"/research/a","content":"` + secret + `"}}`, "read"},
+ {`{"tool_name":"Bash","input":{"command":"ls ` + secret + `","dangerouslyDisableSandbox":true}}`, "sandbox"},
+ {`{"tool_name":"WebFetch","input":{"url":"https://` + secret + `"}}`, "not available"},
+ {`{"tool_name":"Edit","input":{"file_path":"/workspace/a","old_string":"` + secret + `","new_string":"b","extra":1}}`, "field"},
+ } {
+ out := StepPermission(json.RawMessage(tc.raw), f.launch.Policy)
+ var v struct{ Behavior, Message string }
+ if json.Unmarshal(out, &v) != nil || v.Behavior != "deny" {
+ t.Fatalf("not denied: %s -> %s", tc.raw, out)
+ }
+ if !strings.HasPrefix(v.Message, provider.ErrPolicy.Error()+": ") || !strings.Contains(v.Message, tc.want) || strings.Contains(v.Message, secret) {
+ t.Fatalf("%s: message %q, want the rule naming %q and no request text", tc.raw, v.Message, tc.want)
+ }
+ }
+ r := fixtureFor(t, "Review")
+ var v struct{ Behavior, Message string }
+ if json.Unmarshal(ReadPermission(json.RawMessage(`{"tool_name":"Bash","input":{"command":"ls"}}`), r.launch.Policy), &v) != nil || v.Behavior != "deny" || !strings.Contains(v.Message, "Read, Glob and Grep") {
+ t.Fatalf("read-only refusal does not name its rule: %+v", v)
+ }
+}
+
+func stepBehavior(t *testing.T, check func(json.RawMessage, provider.Policy) json.RawMessage, raw string, p provider.Policy) string {
+ t.Helper()
+ var v struct{ Behavior string }
+ if out := check(json.RawMessage(raw), p); json.Unmarshal(out, &v) != nil {
+ t.Fatalf("not JSON: %s", out)
+ }
+ return v.Behavior
+}
+
+// withSandboxSettings returns p with its manifest's sandbox settings
+// changed by mutate (nil removes the sandbox key).
+func withSandboxSettings(t *testing.T, p provider.Policy, mutate func(map[string]any)) provider.Policy {
+ return withSettings(t, p, func(s map[string]any) {
+ if mutate == nil {
+ delete(s, "sandbox")
+ } else {
+ mutate(s["sandbox"].(map[string]any))
+ }
+ })
+}
+
+// withSettings returns p with its manifest's settings changed by mutate.
+func withSettings(t *testing.T, p provider.Policy, mutate func(map[string]any)) provider.Policy {
+ t.Helper()
+ var m map[string]json.RawMessage
+ var settings map[string]any
+ if json.Unmarshal(p.Manifest, &m) != nil || json.Unmarshal(m["Settings"], &settings) != nil {
+ t.Fatal("manifest settings unreadable")
+ }
+ mutate(settings)
+ m["Settings"], _ = json.Marshal(settings)
+ p.Manifest, _ = json.Marshal(m)
+ return p
}
diff --git a/internal/runner/provider/claude/certification_gaps_test.go b/internal/runner/provider/claude/certification_gaps_test.go
index 3505d13b..b8e6be19 100644
--- a/internal/runner/provider/claude/certification_gaps_test.go
+++ b/internal/runner/provider/claude/certification_gaps_test.go
@@ -5,6 +5,7 @@ import (
"context"
"encoding/json"
"slices"
+ "strings"
"testing"
"time"
)
@@ -46,7 +47,13 @@ func TestHookEventFlagBoundToPolicy(t *testing.T) {
}
}
-func TestNativeControlCommandsRequireApproval(t *testing.T) {
+// TestNoShellCommandIsAMarker: the person-approval controls were shell
+// commands whose printed text a live-gate harness read as evidence
+// (printf equipo-cert-allow, printf equipo-cert-deny). That harness went
+// with the certification evidence (bbf490ed); nothing reads the text now,
+// and a shell rule could never keep a sandboxed command from printing it.
+// No Bash ask rule remains: no command's text means anything to Equipo.
+func TestNoShellCommandIsAMarker(t *testing.T) {
f := fixtureFor(t, "Engineering")
var settings struct {
Permissions struct{ Ask []string }
@@ -55,9 +62,9 @@ func TestNativeControlCommandsRequireApproval(t *testing.T) {
if err := json.Unmarshal(f.inputs.Settings, &settings); err != nil {
t.Fatal(err)
}
- for _, command := range []string{"printf equipo-cert-allow", "printf equipo-cert-deny"} {
- if !slices.Contains(settings.Permissions.Ask, "Bash("+command+")") {
- t.Errorf("native control auto-approved: %s", command)
+ for _, ask := range settings.Permissions.Ask {
+ if strings.HasPrefix(ask, "Bash") {
+ t.Errorf("shell ask rule %q", ask)
}
}
if settings.Sandbox["autoAllowBashIfSandboxed"] != true || settings.Sandbox["allowUnsandboxedCommands"] != false {
diff --git a/internal/runner/provider/claude/glance_policy_test.go b/internal/runner/provider/claude/glance_policy_test.go
index 57a6bd67..f04494ff 100644
--- a/internal/runner/provider/claude/glance_policy_test.go
+++ b/internal/runner/provider/claude/glance_policy_test.go
@@ -46,10 +46,8 @@ func TestGlanceLaunchHasNoTools(t *testing.T) {
if json.Unmarshal(got.Settings, &settings) != nil || len(settings.Permissions.Allow) != 0 || !slices.Contains(settings.Sandbox.Filesystem.DenyWrite, "/workspace") {
t.Fatalf("settings %s", got.Settings)
}
- for _, ask := range settings.Permissions.Ask {
- if ask != "Bash(printf equipo-cert-allow)" && ask != "Bash(printf equipo-cert-deny)" {
- t.Fatalf("native ask rule %q", ask)
- }
+ if len(settings.Permissions.Ask) != 0 {
+ t.Fatalf("native ask rules %q", settings.Permissions.Ask)
}
for _, tool := range []string{"mcp__equipo__ask_person", "mcp__equipo__look", "mcp__equipo__use", "mcp__equipo__read_notes", "mcp__equipo__submit_answer", "mcp__equipo__submit_findings", "Read"} {
more := in
diff --git a/internal/runner/provider/claude/launcher.go b/internal/runner/provider/claude/launcher.go
index cdeb4ef0..99bce3e7 100644
--- a/internal/runner/provider/claude/launcher.go
+++ b/internal/runner/provider/claude/launcher.go
@@ -165,9 +165,11 @@ func PolicyInputs(b provider.Binding, in provider.PolicyInputs, specialist, mode
}
}
allow := append([]string{}, in.Tools...)
- // These harmless control commands must exercise the person approval path,
- // even though ordinary sandboxed Bash commands run without a prompt.
- ask := []string{"Bash(printf equipo-cert-allow)", "Bash(printf equipo-cert-deny)"}
+ // No shell command is reserved: ordinary sandboxed Bash commands run
+ // without a prompt, and no command's text is evidence of anything.
+ // (Two printf "control" commands once were; the live-gate harness
+ // that read them left with the certification evidence, bbf490ed.)
+ ask := []string{}
for _, tool := range native {
if slices.Contains([]string{"Write", "Edit", "Read", "Glob", "Grep"}, tool) {
ask = append(ask, tool+"(//workspace/**)")
diff --git a/internal/runner/provider/claude/realcli/approval_test.go b/internal/runner/provider/claude/realcli/approval_test.go
new file mode 100644
index 00000000..83437ff9
--- /dev/null
+++ b/internal/runner/provider/claude/realcli/approval_test.go
@@ -0,0 +1,386 @@
+// Package realcli runs the pinned Claude CLI itself, in bubblewrap,
+// against a fake Messages API on loopback.
+package realcli
+
+import (
+ "bufio"
+ "crypto/sha256"
+ "encoding/hex"
+ "encoding/json"
+ "fmt"
+ "io"
+ "net"
+ "net/http"
+ "net/http/httptest"
+ "os"
+ "os/exec"
+ "path/filepath"
+ "runtime"
+ "slices"
+ "strconv"
+ "strings"
+ "sync"
+ "testing"
+ "time"
+
+ "amadan.net/oficina/equipo/internal/runner/provider"
+ "amadan.net/oficina/equipo/internal/runner/provider/claude"
+ "amadan.net/oficina/equipo/internal/testci"
+)
+
+const canary = "sk-ant-oat01-equipo-canary-0f3a9c"
+
+// TestStepApprovalInThePinnedCLI: production 2026-11-22. A token
+// connection sets CLAUDE_CODE_SUBPROCESS_ENV_SCRUB, which turns the
+// pinned CLI's sandbox auto-approval off, so Engineering's ordinary shell
+// commands reached the step's permission callback and were refused. This
+// runs the real CLI under Equipo's Engineering settings, answers every
+// permission request with claude.StepPermission (over the CLI's stdio
+// control channel; production carries the same request over MCP), and
+// holds the approved commands to the sandbox: they run, but read no
+// protected file, see no credential, reach no network, write nothing
+// outside the workspace, and leave no process behind.
+func TestStepApprovalInThePinnedCLI(t *testing.T) {
+ testci.Tools(t, "try-bin", "bwrap")
+ binary := pinnedCLI(t)
+ for _, mode := range []string{"token", "subscription"} {
+ t.Run(mode, func(t *testing.T) { approvalRun(t, binary, mode) })
+ }
+}
+
+func pinnedCLI(t *testing.T) string {
+ home, err := os.UserHomeDir()
+ if err != nil {
+ t.Fatal(err)
+ }
+ binary := filepath.Join(home, ".local/share/equipo/try/bin/claude")
+ f, err := os.Open(binary)
+ if os.IsNotExist(err) {
+ testci.Absent(t, "pinned Claude 2.1.312 binary absent; the approval regression runs the local pinned installation")
+ }
+ if err != nil {
+ t.Fatal(err)
+ }
+ sum := sha256.New()
+ _, err = io.Copy(sum, f)
+ f.Close()
+ pin, ok := claude.ReleasePin(runtime.GOARCH)
+ if err != nil || !ok || hex.EncodeToString(sum.Sum(nil)) != pin {
+ t.Fatal("pinned Claude digest differs")
+ }
+ return binary
+}
+
+func approvalRun(t *testing.T, binary, mode string) {
+ root := t.TempDir()
+ work, runnerHome, cred, cfg := filepath.Join(root, "workspace"), filepath.Join(root, "home"), filepath.Join(root, "cred"), filepath.Join(root, "config")
+ for _, d := range []string{filepath.Join(work, "internal"), runnerHome, cred, cfg} {
+ if err := os.MkdirAll(d, 0o700); err != nil {
+ t.Fatal(err)
+ }
+ }
+ os.WriteFile(filepath.Join(work, "internal", "door.go"), []byte("package internal\n"), 0o600)
+ os.WriteFile(filepath.Join(cred, ".credentials.json"), []byte(`{"canary":"`+canary+`"}`), 0o600)
+ env := []string{}
+ if mode == "token" {
+ env = append(env, provider.OAuthTokenEnv+"="+canary, provider.ScrubEnv+"=1")
+ } else {
+ os.MkdirAll(filepath.Join(runnerHome, ".claude"), 0o700)
+ os.WriteFile(filepath.Join(runnerHome, ".claude", ".credentials.json"), []byte(`{"claudeAiOauth":{"accessToken":"`+canary+`","refreshToken":"`+canary+`-refresh","expiresAt":4102444800000,"scopes":["user:inference","user:profile"],"subscriptionType":"max"}}`), 0o600)
+ }
+ b := provider.Binding{ID: "binding", Provider: "claude", Home: runnerHome, CredentialHome: cred, RuntimeRoot: filepath.Join(root, "runtime")}
+ profile, _ := provider.Profile("implement")
+ in, err := claude.PolicyInputs(b, provider.PolicyInputs{Action: "implement", Tools: profile.MCPTools()}, profile.Specialist, "claude-opus-5-5")
+ if err != nil {
+ t.Fatal(err)
+ }
+ // StepPermission reads the policy's manifest: its settings and tools.
+ manifest, _ := json.Marshal(map[string]any{"Settings": in.Settings, "Tools": in.Tools, "DeniedPaths": in.DeniedPaths})
+ policy := provider.Policy{Manifest: manifest}
+ os.WriteFile(filepath.Join(cfg, "equipo-settings.json"), in.Settings, 0o600)
+ os.WriteFile(filepath.Join(cfg, "equipo-mcp.json"), []byte(`{"mcpServers":{}}`), 0o600)
+
+ marker := "3" + strconv.Itoa(1000+os.Getpid()%8000)
+ api := fakeAPI(t)
+ port := api.URL[strings.LastIndex(api.URL, ":")+1:]
+ // The protected paths come from command substitution, so the CLI
+ // cannot check them itself: only the sandbox stands between the
+ // command and the file.
+ hidden := []string{
+ `c=$(printf /config); cat $c/equipo-settings.json 2>&1; echo read-rc=$?`,
+ `h=$(printf /home/runner); ls -A $h $h/.claude 2>&1; cat $h/.claude/.credentials.json 2>&1; echo listed`,
+ `k=$(printf ` + cred + `); cat $k/.credentials.json 2>&1; echo cred-rc=$?`,
+ `p=$(printf /proc); env; tr '\0' '\n' < $p/self/environ 2>&1; tr '\0' '\n' < $p/1/environ 2>&1; echo env-done`,
+ `for d in $(printf '/config ` + cred + ` /home/runner'); do echo probe > $d/written 2>&1; done; echo wrote`,
+ `timeout 3 bash -c 'echo > /dev/tcp/127.0.0.1/` + port + `' 2>&1 && echo connected || echo refused`,
+ }
+ script := []tool{bash(`cd internal && ls`), bash(`echo ok > /workspace/written && echo ws-ok`)}
+ for _, c := range hidden {
+ script = append(script, bash(c))
+ }
+ api.script(append(script, tool{"Bash", map[string]any{"command": "sleep " + marker, "run_in_background": true}}))
+ // The argv Equipo launches, with the permission callback on the CLI's
+ // stdio channel and no MCP servers (this test answers in-process).
+ argv := slices.Clone(in.Argv)
+ for i := range argv {
+ switch argv[i] {
+ case "mcp__equipo__permission":
+ argv[i] = "stdio"
+ }
+ }
+ args := []string{"--unshare-user", "--unshare-pid", "--unshare-ipc", "--unshare-uts", "--die-with-parent", "--new-session",
+ "--ro-bind", "/usr", "/usr", "--symlink", "usr/bin", "/bin", "--symlink", "usr/lib", "/lib", "--symlink", "usr/lib64", "/lib64",
+ "--ro-bind", "/etc", "/etc", "--proc", "/proc", "--dev", "/dev", "--tmpfs", "/tmp",
+ "--bind", runnerHome, "/home/runner", "--bind", work, "/workspace", "--bind", cred, cred, "--bind", cfg, "/config",
+ "--ro-bind", binary, "/opt/claude", "--chdir", "/workspace", "--clearenv",
+ "--setenv", "HOME", "/home/runner", "--setenv", "TMPDIR", "/tmp", "--setenv", "PATH", "/usr/bin:/bin:/opt", "--setenv", "CLAUDE_CODE_TMPDIR", "/tmp",
+ "--setenv", "ANTHROPIC_BASE_URL", api.URL, "--setenv", "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC", "1", "--setenv", "DISABLE_AUTOUPDATER", "1"}
+ for _, kv := range env {
+ k, v, _ := strings.Cut(kv, "=")
+ args = append(args, "--setenv", k, v)
+ }
+ cmd := exec.Command("bwrap", append(args, argv...)...)
+ stdin, _ := cmd.StdinPipe()
+ stdout, _ := cmd.StdoutPipe()
+ var stderr strings.Builder
+ cmd.Stderr = &stderr
+ if err := cmd.Start(); err != nil {
+ t.Fatal(err)
+ }
+ done := make(chan struct{})
+ t.Cleanup(func() { _ = cmd.Process.Kill(); <-done })
+ go func() { _ = cmd.Wait(); close(done) }()
+ send := func(v any) { raw, _ := json.Marshal(v); stdin.Write(append(raw, '\n')) }
+ send(map[string]any{"type": "user", "message": map[string]any{"role": "user", "content": "go"}})
+
+ results, asked := map[string]string{}, map[string]string{}
+ uses := map[string]string{}
+ lines := make(chan []byte)
+ go func() {
+ sc := bufio.NewScanner(stdout)
+ sc.Buffer(make([]byte, 1<<20), 16<<20)
+ for sc.Scan() {
+ lines <- slices.Clone(sc.Bytes())
+ }
+ close(lines)
+ }()
+ deadline := time.After(150 * time.Second)
+read:
+ for {
+ select {
+ case <-deadline:
+ t.Fatalf("no result in time; stderr: %s", stderr.String())
+ case line, ok := <-lines:
+ if !ok {
+ break read
+ }
+ var m struct {
+ RequestID string `json:"request_id"`
+ Kind string `json:"type"`
+ Request struct {
+ Subtype string
+ ToolName string `json:"tool_name"`
+ Input json.RawMessage `json:"input"`
+ ToolUseID string `json:"tool_use_id"`
+ }
+ Message struct{ Content []json.RawMessage }
+ }
+ if json.Unmarshal(line, &m) != nil {
+ continue
+ }
+ switch m.Kind {
+ case "control_request":
+ if m.Request.Subtype != "can_use_tool" {
+ continue
+ }
+ raw, _ := json.Marshal(map[string]any{"tool_name": m.Request.ToolName, "tool_use_id": m.Request.ToolUseID, "input": m.Request.Input})
+ answer := claude.StepPermission(raw, policy)
+ var in struct{ Command string }
+ _ = json.Unmarshal(m.Request.Input, &in)
+ asked[in.Command] = string(answer)
+ send(map[string]any{"type": "control_response", "response": map[string]any{"subtype": "success", "request_id": m.RequestID, "response": json.RawMessage(answer)}})
+ case "assistant", "user":
+ for _, c := range m.Message.Content {
+ var b struct {
+ Type, ID, Name string
+ ToolUseID string `json:"tool_use_id"`
+ Input map[string]any
+ Content json.RawMessage
+ IsError bool `json:"is_error"`
+ }
+ if json.Unmarshal(c, &b) != nil {
+ continue
+ }
+ if b.Type == "tool_use" {
+ uses[b.ID], _ = b.Input["command"].(string)
+ }
+ if b.Type == "tool_result" {
+ var text string
+ if json.Unmarshal(b.Content, &text) != nil {
+ text = string(b.Content)
+ }
+ results[uses[b.ToolUseID]] = fmt.Sprintf("error=%v %s", b.IsError, text)
+ }
+ }
+ case "result":
+ break read
+ }
+ }
+ }
+ running := false
+ for i := 0; i < 30 && !running; i++ {
+ running = sleeping(marker)
+ time.Sleep(100 * time.Millisecond)
+ }
+ _ = cmd.Process.Kill()
+ <-done
+ if !running {
+ t.Error("the background command never ran")
+ }
+ all := ""
+ for _, r := range results {
+ all += r + "\n"
+ }
+ t.Logf("%s mode: %d tool results, %d asked", mode, len(results), len(asked))
+ expect := func(command, want string) {
+ t.Helper()
+ got, ok := results[command]
+ if !ok || !strings.Contains(got, want) {
+ t.Errorf("%s: %q, want %q (stderr %s)", command, got, want, stderr.String())
+ }
+ }
+ expect(`cd internal && ls`, "door.go")
+ expect(`echo ok > /workspace/written && echo ws-ok`, "ws-ok")
+ for _, c := range hidden {
+ // Scrub mode has no automatic approval: each reaches the step.
+ if mode == "token" && !strings.Contains(asked[c], `"allow"`) {
+ t.Errorf("%s: not approved through the step's callback: %q", c, asked[c])
+ }
+ }
+ expect(hidden[0], "read-rc=1")
+ expect(hidden[1], "listed")
+ expect(hidden[2], "cred-rc=1")
+ expect(hidden[3], "env-done")
+ expect(hidden[4], "wrote")
+ expect(hidden[5], "refused")
+ if strings.Contains(all, canary) || strings.Contains(all, `"enabled":true`) || strings.Contains(all, ".credentials.json\n") {
+ t.Errorf("a sandboxed command read a credential or the policy:\n%s", all)
+ }
+ for _, name := range []string{filepath.Join(cfg, "written"), filepath.Join(cred, "written"), filepath.Join(runnerHome, "written")} {
+ if _, err := os.Stat(name); err == nil {
+ t.Errorf("a sandboxed command wrote %s", name)
+ }
+ }
+ if _, err := os.Stat(filepath.Join(work, "written")); err != nil {
+ t.Error("the workspace write did not land")
+ }
+ if _, ok := asked[`cd internal && ls`]; mode == "token" && !ok {
+ t.Error("in scrub mode an ordinary command did not reach the step's callback")
+ }
+ if api.calls() < len(script)+1 {
+ t.Errorf("the scripted turn did not finish: %d API calls", api.calls())
+ }
+ for i := 0; i < 50 && sleeping(marker); i++ {
+ time.Sleep(100 * time.Millisecond)
+ }
+ if sleeping(marker) {
+ t.Errorf("background command outlived the session: sleep %s", marker)
+ }
+}
+
+// sleeping reports a host process running `sleep marker`.
+func sleeping(marker string) bool {
+ entries, _ := os.ReadDir("/proc")
+ for _, e := range entries {
+ raw, err := os.ReadFile(filepath.Join("/proc", e.Name(), "cmdline"))
+ if err == nil && strings.Contains(string(raw), "sleep\x00"+marker) {
+ return true
+ }
+ }
+ return false
+}
+
+type tool struct {
+ name string
+ input map[string]any
+}
+
+func bash(command string) tool { return tool{"Bash", map[string]any{"command": command}} }
+
+type api struct {
+ *httptest.Server
+ mu sync.Mutex
+ tools []tool
+ next int
+ n int
+}
+
+func (a *api) script(tools []tool) { a.mu.Lock(); a.tools = tools; a.mu.Unlock() }
+func (a *api) calls() int { a.mu.Lock(); defer a.mu.Unlock(); return a.n }
+
+// fakeAPI answers the Messages API on loopback: each request offering
+// the Bash tool gets the next scripted tool call, then a closing text.
+func fakeAPI(t *testing.T) *api {
+ a := &api{}
+ l, err := net.Listen("tcp", "127.0.0.1:0")
+ if err != nil {
+ t.Fatal(err)
+ }
+ a.Server = httptest.NewUnstartedServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ var body struct {
+ Model string
+ Stream bool
+ Tools []struct{ Name string }
+ }
+ _ = json.NewDecoder(r.Body).Decode(&body)
+ if !strings.HasSuffix(r.URL.Path, "/v1/messages") {
+ if strings.HasSuffix(r.URL.Path, "/count_tokens") {
+ w.Write([]byte(`{"input_tokens":10}`))
+ return
+ }
+ http.NotFound(w, r)
+ return
+ }
+ block := map[string]any{"type": "text", "text": "done"}
+ stop := "end_turn"
+ if slices.ContainsFunc(body.Tools, func(x struct{ Name string }) bool { return x.Name == "Bash" }) {
+ a.mu.Lock()
+ a.n++
+ if a.next < len(a.tools) {
+ tl := a.tools[a.next]
+ block = map[string]any{"type": "tool_use", "id": fmt.Sprintf("toolu_%03d", a.next), "name": tl.name, "input": tl.input}
+ stop = "tool_use"
+ a.next++
+ }
+ a.mu.Unlock()
+ }
+ msg := map[string]any{"id": "msg_x", "type": "message", "role": "assistant", "model": body.Model, "content": []any{}, "stop_reason": nil, "stop_sequence": nil, "usage": map[string]int{"input_tokens": 1, "output_tokens": 1}}
+ if !body.Stream {
+ msg["content"], msg["stop_reason"] = []any{block}, stop
+ json.NewEncoder(w).Encode(msg)
+ return
+ }
+ w.Header().Set("content-type", "text/event-stream")
+ ev := func(name string, v any) {
+ raw, _ := json.Marshal(v)
+ fmt.Fprintf(w, "event: %s\ndata: %s\n\n", name, raw)
+ }
+ ev("message_start", map[string]any{"type": "message_start", "message": msg})
+ if block["type"] == "tool_use" {
+ input, _ := json.Marshal(block["input"])
+ ev("content_block_start", map[string]any{"type": "content_block_start", "index": 0, "content_block": map[string]any{"type": "tool_use", "id": block["id"], "name": block["name"], "input": map[string]any{}}})
+ ev("content_block_delta", map[string]any{"type": "content_block_delta", "index": 0, "delta": map[string]any{"type": "input_json_delta", "partial_json": string(input)}})
+ } else {
+ ev("content_block_start", map[string]any{"type": "content_block_start", "index": 0, "content_block": map[string]any{"type": "text", "text": ""}})
+ ev("content_block_delta", map[string]any{"type": "content_block_delta", "index": 0, "delta": map[string]any{"type": "text_delta", "text": "done"}})
+ }
+ ev("content_block_stop", map[string]any{"type": "content_block_stop", "index": 0})
+ ev("message_delta", map[string]any{"type": "message_delta", "delta": map[string]any{"stop_reason": stop, "stop_sequence": nil}, "usage": map[string]int{"output_tokens": 1}})
+ ev("message_stop", map[string]any{"type": "message_stop"})
+ }))
+ a.Server.Listener.Close()
+ a.Server.Listener = l
+ a.Start()
+ t.Cleanup(a.Close)
+ return a
+}
diff --git a/internal/runner/provider/claude/realcli/budget_test.go b/internal/runner/provider/claude/realcli/budget_test.go
new file mode 100644
index 00000000..a6db6d99
--- /dev/null
+++ b/internal/runner/provider/claude/realcli/budget_test.go
@@ -0,0 +1,10 @@
+package realcli
+
+import (
+ "os"
+ "testing"
+
+ "amadan.net/rastrillo/rastrillo/budget"
+)
+
+func TestMain(m *testing.M) { os.Exit(budget.Main(m)) }
diff --git a/internal/runner/provider/claude/research_policy_test.go b/internal/runner/provider/claude/research_policy_test.go
index 6183acaa..7610d572 100644
--- a/internal/runner/provider/claude/research_policy_test.go
+++ b/internal/runner/provider/claude/research_policy_test.go
@@ -48,10 +48,8 @@ func TestResearchStepPolicyNoNativeTools(t *testing.T) {
if !slices.Equal(settings.Permissions.Allow, profile.MCPTools()) {
t.Fatalf("allow %v", settings.Permissions.Allow)
}
- for _, ask := range settings.Permissions.Ask {
- if ask != "Bash(printf equipo-cert-allow)" && ask != "Bash(printf equipo-cert-deny)" {
- t.Fatalf("native ask rule %q", ask)
- }
+ if len(settings.Permissions.Ask) != 0 {
+ t.Fatalf("native ask rules %q", settings.Permissions.Ask)
}
// Exactly the profile's tools: another submission, a question, a
// coordinator tool or a git tool is refused.
diff --git a/internal/runner/provider/gotoolchain/make_test.go b/internal/runner/provider/gotoolchain/make_test.go
new file mode 100644
index 00000000..4e8221c2
--- /dev/null
+++ b/internal/runner/provider/gotoolchain/make_test.go
@@ -0,0 +1,48 @@
+package gotoolchain
+
+import (
+ "os"
+ "os/exec"
+ "path/filepath"
+ "strings"
+ "testing"
+)
+
+// TestEnvironmentKeepsMakeOnLocalToolchain: production 2026-11-22, a
+// project Makefile began `export GOTOOLCHAIN := go1.26.5`. A Makefile
+// assignment beats the environment, so its go commands asked for that
+// release, which the offline checks cannot fetch (GOSUMDB=off refuses a
+// toolchain download). The shared environment carries GOTOOLCHAIN=local
+// as a make command-line variable (MAKEFLAGS), which beats the Makefile,
+// for every launch that uses it and for nested makes.
+func TestEnvironmentKeepsMakeOnLocalToolchain(t *testing.T) {
+ makeBin, err := exec.LookPath("make")
+ if err != nil {
+ t.Skip("make is not installed")
+ }
+ dir := t.TempDir()
+ makefile := "export GOTOOLCHAIN := go1.26.5\nGOTOOLCHAIN = go1.26.6\nall:\n\t@echo \"recipe=$$GOTOOLCHAIN\"; sh -c 'echo child=$$GOTOOLCHAIN'\nnested:\n\t@$(MAKE) --no-print-directory all\n"
+ if err := os.WriteFile(filepath.Join(dir, "Makefile"), []byte(makefile), 0o600); err != nil {
+ t.Fatal(err)
+ }
+ for _, p := range []string{"", "claude", "codex", "pi"} {
+ env := Environment(p)
+ if env["GOTOOLCHAIN"] != "local" {
+ t.Fatalf("%q: GOTOOLCHAIN %q", p, env["GOTOOLCHAIN"])
+ }
+ for _, target := range []string{"all", "nested"} {
+ cmd := exec.Command(makeBin, "-s", target)
+ cmd.Dir = dir
+ cmd.Env = []string{"PATH=" + os.Getenv("PATH")}
+ for k, v := range env {
+ if k != "PATH" {
+ cmd.Env = append(cmd.Env, k+"="+v)
+ }
+ }
+ out, err := cmd.CombinedOutput()
+ if err != nil || strings.TrimSpace(string(out)) != "recipe=local\nchild=local" {
+ t.Fatalf("provider %q, make %s: %q %v", p, target, out, err)
+ }
+ }
+ }
+}
diff --git a/internal/runner/provider/gotoolchain/tree.go b/internal/runner/provider/gotoolchain/tree.go
index bfd9ebb6..56f38950 100644
--- a/internal/runner/provider/gotoolchain/tree.go
+++ b/internal/runner/provider/gotoolchain/tree.go
@@ -13,12 +13,17 @@ import (
func Target(path string) bool { return path == "/opt/go" || path == "/opt/go-mod" }
+// Environment is the shared offline Go environment. MAKEFLAGS passes
+// GOTOOLCHAIN=local to make as a command-line variable: a Makefile that
+// assigns GOTOOLCHAIN (export GOTOOLCHAIN := go1.x) overrides the
+// environment but not the command line, and its go commands would
+// otherwise ask for a release that only the network has.
func Environment(provider ...string) map[string]string {
tmp := "/tmp"
if len(provider) > 0 && provider[0] == "claude" {
tmp += "/claude-" + strconv.Itoa(os.Getuid())
}
- env := map[string]string{"GOCACHE": tmp + "/go-build", "GOTMPDIR": tmp + "/go-tmp", "GOMODCACHE": "/opt/go-mod", "GOROOT": "/opt/go", "GOTOOLCHAIN": "local", "GOWORK": "off", "GOENV": "off", "GOFLAGS": "", "GOTELEMETRY": "off", "GOPROXY": "off", "GOSUMDB": "off", "CGO_ENABLED": "0", "PATH": "/opt/go/bin:/usr/bin:/bin:/opt"}
+ env := map[string]string{"GOCACHE": tmp + "/go-build", "GOTMPDIR": tmp + "/go-tmp", "GOMODCACHE": "/opt/go-mod", "GOROOT": "/opt/go", "GOTOOLCHAIN": "local", "MAKEFLAGS": "GOTOOLCHAIN=local", "GOWORK": "off", "GOENV": "off", "GOFLAGS": "", "GOTELEMETRY": "off", "GOPROXY": "off", "GOSUMDB": "off", "CGO_ENABLED": "0", "PATH": "/opt/go/bin:/usr/bin:/bin:/opt"}
if len(provider) > 0 && provider[0] == "claude" {
env["CLAUDE_CODE_TMPDIR"] = "/tmp"
}
diff --git a/internal/runner/thin/check_go_test.go b/internal/runner/thin/check_go_test.go
new file mode 100644
index 00000000..5d6db601
--- /dev/null
+++ b/internal/runner/thin/check_go_test.go
@@ -0,0 +1,173 @@
+package thin
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "go/version"
+ "io"
+ "os"
+ "os/exec"
+ "path/filepath"
+ "strings"
+ "testing"
+
+ "amadan.net/oficina/equipo/internal/runner/checks"
+ "amadan.net/oficina/equipo/internal/runner/containment"
+ "amadan.net/oficina/equipo/internal/runner/provider"
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// TestChecksGoToolchainAndDependencies (Astra, review of f03d79bb): the
+// runner's Go is held to the base's requirement before any gate runs,
+// and only Equipo's own dependency stage can make a failed gate "needs
+// network"; the candidate's output can only keep a failure a failure.
+func TestChecksGoToolchainAndDependencies(t *testing.T) {
+ out, err := exec.Command("go", "env", "GOROOT").Output()
+ if err != nil {
+ t.Skip("go is not installed")
+ }
+ goRoot := strings.TrimSpace(string(out))
+ local, err := checks.RunnerGoVersion(goRoot)
+ if err != nil {
+ t.Skip("the test's Go has no release version")
+ }
+ other := "go1.20.1"
+ if version.Lang(local) == "go1.20" {
+ other = "go1.21.1"
+ }
+ const sum = "example.invalid/dep v1.0.0 h1:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\nexample.invalid/dep v1.0.0/go.mod h1:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=\n"
+ needsDep := map[string]string{"go.mod": "module example.com/x\n\ngo 1.21\n\nrequire example.invalid/dep v1.0.0\n", "go.sum": sum, "x.go": "package x\n\nimport _ \"example.invalid/dep\"\n"}
+ plain := map[string]string{"go.mod": "module example.com/x\n\ngo 1.21\n", "x.go": "package x\n"}
+ with := func(files map[string]string, name, body string) map[string]string {
+ out := map[string]string{name: body}
+ for k, v := range files {
+ if k != name {
+ out[k] = v
+ }
+ }
+ return out
+ }
+ for _, tc := range []struct {
+ name string
+ base, candidate map[string]string
+ outcome, reason string
+ }{
+ {"newer base requirement", with(plain, "go.mod", "module example.com/x\n\ngo 1.99.0\n"), nil, wire.ChecksCannotRun, "checks_unavailable"},
+ {"version-specific base build", with(plain, "Makefile", "export GOTOOLCHAIN := "+other+"\nci:\n\ttrue\n"), nil, wire.ChecksCannotRun, "checks_unavailable"},
+ {"candidate raises the requirement", plain, map[string]string{"go.mod": "module example.com/x\n\ngo 1.99.0\n"}, wire.ChecksFailed, ""},
+ {"pinned patch of this minor", with(plain, "Makefile", "export GOTOOLCHAIN := "+version.Lang(local)+".0\nci:\n\tgo vet ./...\n"), nil, wire.ChecksPassed, ""},
+ {"offline dependency", with(needsDep, "Makefile", "ci:\n\tgo vet ./...\n"), nil, wire.ChecksCannotRun, "needs_network"},
+ {"mixed failure", with(needsDep, "Makefile", "ci:\n\t@echo '--- FAIL: TestDoor (0.00s)'; go vet ./...\n"), nil, wire.ChecksFailed, ""},
+ {"json failure", with(needsDep, "Makefile", "ci:\n\t@echo '{\"Action\":\"fail\",\"Package\":\"example.com/x\",\"Test\":\"TestDoor\"}'; go vet ./...\n"), nil, wire.ChecksFailed, ""},
+ {"failure beyond the tail", with(needsDep, "Makefile", "ci:\n\t@echo '--- FAIL: TestDoor (0.00s)'; seq 1000; go vet ./...\n"), nil, wire.ChecksFailed, ""},
+ {"quoted diagnostic", with(plain, "Makefile", "ci:\n\t@echo 'go: golang.org/toolchain@v0.0.1-go1.26.5.linux-amd64: verifying module: checksum database disabled by GOSUMDB=off'; echo 'go: example.invalid/dep@v1.0.0: module lookup disabled by GOPROXY=off'; exit 1\n"), nil, wire.ChecksFailed, ""},
+ } {
+ t.Run(tc.name, func(t *testing.T) {
+ e, f, r, _ := hubRig(t)
+ seed := filepath.Join(filepath.Dir(f.dir), "seed")
+ if _, ok := tc.base["Makefile"]; !ok {
+ tc.base = with(tc.base, "Makefile", "ci:\n\tgo vet ./...\n")
+ }
+ for name, body := range tc.base {
+ writeFile(t, seed, name, body)
+ }
+ gitOut(t, seed, "add", "-A")
+ gitOut(t, seed, "commit", "-qm", "base")
+ r.BaseSHA = gitOut(t, seed, "rev-parse", "HEAD")
+ gitOut(t, seed, "checkout", "-q", "-B", r.Branch)
+ writeFile(t, seed, "NEWS", "candidate\n")
+ for name, body := range tc.candidate {
+ writeFile(t, seed, name, body)
+ }
+ gitOut(t, seed, "add", "-A")
+ gitOut(t, seed, "commit", "-qm", "candidate")
+ r.CandidateSHA = gitOut(t, seed, "rev-parse", "HEAD")
+ gitOut(t, seed, "push", "-q", "--force", f.dir, "main", r.Branch)
+ r.Specialist = wire.SpecialistChecks
+ scratch := filepath.Join(filepath.Dir(f.dir), "sandbox")
+ _ = os.Mkdir(scratch, 0o700)
+ self, _ := os.Executable()
+ m, err := containment.New(containment.Config{Binary: "/usr/bin/bwrap", RunnerBinary: self, ScratchRoot: scratch})
+ if err != nil {
+ t.Fatal(err)
+ }
+ // A module cache as a runner has one, without the module.
+ cache := t.TempDir()
+ _ = os.MkdirAll(filepath.Join(cache, "cache/download"), 0o700)
+ e.O.Manager, e.O.Runner.GoRoot, e.O.Runner.ModuleCache = m, goRoot, cache
+ if err := e.O.State.AcceptDispatch(context.Background(), "d", r.DispatchCommand); err != nil {
+ t.Fatal(err)
+ }
+ rep := e.Exec(context.Background(), r, func(wire.StepReport) {})
+ if rep.Checks != tc.outcome || rep.Reason != tc.reason {
+ t.Fatalf("checks %q (%q), want %q (%q)\n%s", rep.Checks, rep.Reason, tc.outcome, tc.reason, fmt.Sprint(rep.Output))
+ }
+ if tc.reason == "checks_unavailable" && (rep.ExitCode != nil || rep.Output != "") {
+ t.Fatalf("a gate ran for a toolchain this runner lacks: %+v", rep)
+ }
+ })
+ }
+}
+
+// TestChecksStopWhenTheStageExitIsUnverified (Astra, review of 4e0d2497):
+// when the dependency stage's namespace exit cannot be verified, the step
+// stops there, unterminated, with that namespace kept for recovery. No
+// gate launches over it and nothing is reported checked.
+func TestChecksStopWhenTheStageExitIsUnverified(t *testing.T) {
+ out, err := exec.Command("go", "env", "GOROOT").Output()
+ if err != nil {
+ t.Skip("go is not installed")
+ }
+ e, f, r, _ := hubRig(t)
+ seed := filepath.Join(filepath.Dir(f.dir), "seed")
+ writeFile(t, seed, "go.mod", "module example.com/x\n\ngo 1.21\n")
+ writeFile(t, seed, "Makefile", "ci:\n\ttrue\n")
+ gitOut(t, seed, "add", "-A")
+ gitOut(t, seed, "commit", "-qm", "base")
+ r.BaseSHA = gitOut(t, seed, "rev-parse", "HEAD")
+ gitOut(t, seed, "checkout", "-q", "-B", r.Branch)
+ writeFile(t, seed, "NEWS", "candidate\n")
+ gitOut(t, seed, "commit", "-qam", "candidate")
+ r.CandidateSHA = gitOut(t, seed, "rev-parse", "HEAD")
+ gitOut(t, seed, "push", "-q", "--force", f.dir, "main", r.Branch)
+ r.Specialist = wire.SpecialistChecks
+ cache := t.TempDir()
+ starter := &unprovenStarter{}
+ e.checkStarter, e.O.Runner.GoRoot, e.O.Runner.ModuleCache = starter, strings.TrimSpace(string(out)), cache
+ if err := e.O.State.AcceptDispatch(context.Background(), "d", r.DispatchCommand); err != nil {
+ t.Fatal(err)
+ }
+ rep := e.Exec(context.Background(), r, func(wire.StepReport) {})
+ var ns string
+ e.O.State.db.QueryRow("SELECT ns_id FROM steps WHERE step_id=? AND attempt=?", r.StepID, r.Attempt).Scan(&ns)
+ if rep.State != wire.StepFailed || rep.Termination || rep.Checks != "" || rep.ExitCode != nil || starter.launches != 1 || ns != "ns-1" {
+ t.Fatalf("report %+v after %d launches, namespace %q", rep, starter.launches, ns)
+ }
+}
+
+// unprovenStarter launches processes whose exit is never verified.
+type unprovenStarter struct{ launches int }
+
+func (s *unprovenStarter) StartRecorded(ctx context.Context, _ provider.Launch, _ []string, record func(context.Context, containment.Record) error) (provider.Process, error) {
+ s.launches++
+ if err := record(ctx, containment.Record{ID: fmt.Sprintf("ns-%d", s.launches)}); err != nil {
+ return nil, err
+ }
+ return unprovenProcess{}, nil
+}
+
+type unprovenProcess struct{}
+
+func (unprovenProcess) Stdin() io.WriteCloser { return nopWriter{} }
+func (unprovenProcess) Stdout() io.ReadCloser { return io.NopCloser(strings.NewReader("")) }
+func (unprovenProcess) Stderr() io.ReadCloser { return io.NopCloser(strings.NewReader("")) }
+func (unprovenProcess) ID() string { return "unproven" }
+func (unprovenProcess) Wait(context.Context) (provider.Exit, error) {
+ return provider.Exit{Code: 1}, errors.New("namespace exit not proven")
+}
+
+type nopWriter struct{}
+
+func (nopWriter) Write(p []byte) (int, error) { return len(p), nil }
+func (nopWriter) Close() error { return nil }
diff --git a/internal/runner/thin/engineer.go b/internal/runner/thin/engineer.go
index 20afdb4a..8334008c 100644
--- a/internal/runner/thin/engineer.go
+++ b/internal/runner/thin/engineer.go
@@ -18,6 +18,7 @@ import (
"time"
"amadan.net/oficina/equipo/internal/runner"
+ "amadan.net/oficina/equipo/internal/runner/checks"
"amadan.net/oficina/equipo/internal/runner/connect"
"amadan.net/oficina/equipo/internal/runner/forge"
"amadan.net/oficina/equipo/internal/runner/provider"
@@ -58,6 +59,8 @@ type Engineer struct {
keptAt time.Time
O ClaudeOptions
+ // checkStarter, when set, launches checks in place of O.Manager (tests).
+ checkStarter starter
// Codex pins the Codex binaries a step may run on a Codex connection.
Codex CodexOptions
// Pi is the runner's Pi, for a step on a metered connection.
@@ -348,7 +351,7 @@ func (e *Engineer) Exec(ctx context.Context, r stepRow, progress func(wire.StepR
}
if files, err := tree.ChangedFiles(ctx, sha); err == nil && len(files) > 0 {
// The instance places its checks on a Mac when it needs one.
- rep.Apple = needsMacOS(files, "")
+ rep.Apple = checks.NeedsMacOS(files, "")
rep.LogTail = clip(strings.TrimSpace(rep.LogTail+"\nChanged: "+strings.Join(files[:min(len(files), 20)], ", ")), wire.MaxLogTail)
}
if err := e.O.State.setStepPhase(ctx, r, phaseCommitted, base, sha); err != nil {
diff --git a/internal/runner/thin/go_checks.go b/internal/runner/thin/go_checks.go
new file mode 100644
index 00000000..86041542
--- /dev/null
+++ b/internal/runner/thin/go_checks.go
@@ -0,0 +1,54 @@
+package thin
+
+import (
+ "context"
+ "maps"
+ "slices"
+ "time"
+
+ "amadan.net/oficina/equipo/internal/runner/checks"
+ "amadan.net/oficina/equipo/internal/runner/workspace"
+)
+
+// goUnmet reports whether the runner's Go cannot honour what the base's
+// own go.mod files and gate files ask (checks.GoRequirement), read from
+// base objects the candidate cannot change. Unknown is not unmet: the
+// gate runs, and Go says why it cannot.
+func (e *Engineer) goUnmet(ctx context.Context, tree workspace.TaskTree, base string) bool {
+ local, err := checks.RunnerGoVersion(e.O.Runner.GoRoot)
+ if e.O.Runner.GoRoot == "" || err != nil {
+ return false
+ }
+ listing, err := gateListing(ctx, tree.Git, tree.GitDir, base)
+ if err != nil {
+ e.log("checks go requirement", err)
+ return false
+ }
+ files := map[string][]byte{}
+ for _, name := range slices.Sorted(maps.Keys(listing)) {
+ if mode := listing[name]; checks.GoRequirementFile(name) && (mode == "100644" || mode == "100755") && len(files) < 512 {
+ if raw, err := gateGit(ctx, tree.Git, tree.GitDir, 1<<20, "cat-file", "blob", base+":"+name); err == nil {
+ files[name] = raw
+ }
+ }
+ }
+ return checks.ReadGoRequirement(files).Unmet(local)
+}
+
+// dependencyStage runs Equipo's own `go mod download` for the tree's
+// modules in the check profile (checks.DependencyStage), before the gate.
+// Its exit code and Go's own lines are the only evidence that a gate
+// needed the network; a stage that did not run, or did not finish, gives
+// none. The gateResult says whether its namespace's exit was observed:
+// when it was not, the caller must stop.
+func (e *Engineer) dependencyStage(ctx context.Context, r stepRow, dir string) (checks.Run, gateResult) {
+ dirs := checks.GoModuleDirs(dir)
+ if existingDir(e.O.Runner.GoRoot) == "" || len(dirs) == 0 {
+ return checks.Run{}, gateResult{terminated: true}
+ }
+ res := e.runGate(ctx, r, dir, gate{name: "dependencies", argv: checks.DependencyStage(dirs), limit: 5 * time.Minute})
+ if !res.terminated || res.reason != "" {
+ return checks.Run{}, res
+ }
+ return checks.Run{Code: res.code, Output: res.output, Evidence: res.evidence}, res
+}
diff --git a/internal/runner/thin/index.go b/internal/runner/thin/index.go
index 86263e2e..2ce22dc2 100644
--- a/internal/runner/thin/index.go
+++ b/internal/runner/thin/index.go
@@ -21,6 +21,7 @@ import (
"unicode"
"unicode/utf8"
+ "amadan.net/oficina/equipo/internal/runner/checks"
"amadan.net/oficina/equipo/internal/runner/workspace"
"amadan.net/oficina/equipo/internal/wire"
)
@@ -292,11 +293,11 @@ func (x *Index) describe(ctx context.Context, repo, branch, dir string) wire.Rep
e.Hints = bounded(hints(list, read), wire.MaxRepoHints)
var gateText string
e.Gate, gateText = listedGate(list, read)
- if runtime.GOOS != "darwin" && needsMacOS(list, gateText) {
+ if runtime.GOOS != "darwin" && checks.NeedsMacOS(list, gateText) {
e.ChecksReason = "needs_macos"
}
// Protocol 2: what the instance places checks by.
- e.NeedsMacOS, e.Simulator = needsMacOS(nil, gateText), sharedScheme(list)
+ e.NeedsMacOS, e.Simulator = checks.NeedsMacOS(nil, gateText), sharedScheme(list)
return e
}
diff --git a/internal/runner/thin/judge.go b/internal/runner/thin/judge.go
index 7955ef05..ff0d58c3 100644
--- a/internal/runner/thin/judge.go
+++ b/internal/runner/thin/judge.go
@@ -10,7 +10,6 @@ import (
"io/fs"
"os"
"os/exec"
- "path"
"path/filepath"
"regexp"
"runtime"
@@ -21,6 +20,7 @@ import (
"amadan.net/oficina/equipo/internal/copydesk"
"amadan.net/oficina/equipo/internal/runner"
+ "amadan.net/oficina/equipo/internal/runner/checks"
"amadan.net/oficina/equipo/internal/runner/connect"
"amadan.net/oficina/equipo/internal/runner/forge"
"amadan.net/oficina/equipo/internal/runner/provider"
@@ -193,28 +193,6 @@ func findGate(dir string) (gate, bool) {
return gate{}, false
}
-// needsMacOS reports whether checking this change needs Apple's tools:
-// the change touches Swift, Objective-C or Xcode files, or the gate
-// itself calls Xcode's tools. A Linux runner cannot check those, so it
-// says so rather than pass or fail.
-func needsMacOS(changed []string, gateText string) bool {
- for _, f := range changed {
- switch strings.ToLower(path.Ext(f)) {
- case ".swift", ".m", ".mm", ".xib", ".storyboard", ".xcconfig", ".entitlements":
- return true
- }
- if strings.Contains(f, ".xcodeproj/") || strings.Contains(f, ".xcworkspace/") || path.Base(f) == "Package.swift" || path.Base(f) == "Podfile" {
- return true
- }
- }
- for _, tool := range []string{"xcodebuild", "xcrun", "swift build", "swift test", "fastlane"} {
- if strings.Contains(gateText, tool) {
- return true
- }
- }
- return false
-}
-
// checks runs the repository's gate on the candidate.
func (e *Engineer) checks(ctx context.Context, r stepRow, progress func(wire.StepReport)) wire.StepReport {
rep := judgeReport(r)
@@ -300,21 +278,31 @@ func (e *Engineer) checks(ctx context.Context, r stepRow, progress func(wire.Ste
}
return done(wire.ChecksNone, "")
}
- mac := runtime.GOOS != "darwin" && needsMacOS(changed, g.text)
+ mac := runtime.GOOS != "darwin" && checks.NeedsMacOS(changed, g.text)
if mac {
rep.LogTail = "Not run: " + g.name + " needs macOS to check this change, and this runner is " + runtime.GOOS + "."
return done(wire.ChecksCannotRun, "needs_macos")
}
+ if e.goUnmet(ctx, tree, r.BaseSHA) {
+ return done(wire.ChecksCannotRun, "checks_unavailable")
+ }
if err := e.checkRepository(ctx, tree, r.CandidateSHA); err != nil {
e.log("checks repository", err)
rep.State, rep.Reason, rep.Termination = wire.StepFailed, "workspace_refused", true
return rep
}
+ stage, staged := e.dependencyStage(ctx, r, tree.Dir)
+ if !staged.terminated {
+ // Its namespace's exit was not observed: no gate launches over
+ // it, and its namespace stays recorded for recovery.
+ rep.State, rep.Reason, rep.Termination = wire.StepFailed, firstNonEmpty(staged.reason, "provider_failed"), false
+ return rep
+ }
res := e.runGate(ctx, r, tree.Dir, g)
baseResult, baseGate := res, g
if certified {
rep.BaseChecks = wire.ChecksCannotRun
- if res.terminated && res.reason == "" && (res.code == 0 || !offline.MatchString(res.output)) {
+ if res.terminated && res.reason == "" && (res.code == 0 || !checks.NeedsNetwork(stage, checks.Run{Code: res.code, Output: res.output, Evidence: res.evidence})) {
rep.BaseChecks = wire.ChecksFailed
if res.code == 0 {
rep.BaseChecks = wire.ChecksPassed
@@ -367,7 +355,7 @@ func (e *Engineer) checks(ctx context.Context, r stepRow, progress func(wire.Ste
case res.reason != "":
rep.Gate, rep.Output = "", ""
return done(wire.ChecksCannotRun, "checks_unavailable")
- case res.code != 0 && offline.MatchString(gateOutput):
+ case res.code != 0 && checks.NeedsNetwork(stage, checks.Run{Code: res.code, Output: gateOutput, Evidence: res.evidence}):
// A gate that needs the network cannot pass or fail honestly here.
rep.Gate = ""
return done(wire.ChecksCannotRun, "needs_network")
@@ -383,8 +371,6 @@ func (e *Engineer) checks(ctx context.Context, r stepRow, progress func(wire.Ste
return done(wire.ChecksFailed, "")
}
-var offline = regexp.MustCompile(`GOPROXY=off|module lookup disabled|Could not resolve host|Temporary failure in name resolution|ENOTFOUND|EAI_AGAIN`)
-
// checkRepository gives the checks tree a .git of its own at exactly the
// candidate (shallow, one commit, no remote, no hooks), so a gate that
// asks git about its files sees the commit it judges. The namespace may
@@ -530,6 +516,8 @@ type gateResult struct {
terminated bool
// sandbox is how a worker's gate was confined (wire.Sandbox*).
sandbox string
+ // evidence was read from the whole output (output is its tail).
+ evidence *checks.Evidence
}
// runGate runs the gate in the containment's check profile: the tree at
@@ -556,7 +544,11 @@ func (e *Engineer) runGate(ctx context.Context, r stepRow, work string, g gate)
}
pctx, kill := context.WithCancel(context.Background())
defer kill()
- proc, err := recordedStart(pctx, e.O.Manager, provider.Launch{AttemptKey: "checks/" + stepKey(r) + "/" + uuid(), Workspace: work, Policy: policy}, g.argv, func(ctx context.Context, id string) error {
+ var m starter = e.O.Manager
+ if e.checkStarter != nil {
+ m = e.checkStarter
+ }
+ proc, err := recordedStart(pctx, m, provider.Launch{AttemptKey: "checks/" + stepKey(r) + "/" + uuid(), Workspace: work, Policy: policy}, g.argv, func(ctx context.Context, id string) error {
return e.O.State.setStepNamespace(ctx, r, id)
})
if err != nil {
@@ -566,12 +558,22 @@ func (e *Engineer) runGate(ctx context.Context, r stepRow, work string, g gate)
out := &lineTail{max: wire.MaxChecksLines}
copied := make(chan struct{}, 2)
structured := &copydesk.Output{}
+ evidence, streams := checks.NewEvidence(2)
for i, rd := range []io.Reader{proc.Stdout(), proc.Stderr()} {
var destination io.Writer = out
if g.jsonOutput && i == 0 {
destination = structured
}
- go func() { _, _ = io.Copy(destination, io.LimitReader(rd, 256<<20)); copied <- struct{}{} }()
+ go func() {
+ // The whole stream is classified as it is copied; one cut
+ // short leaves the evidence incomplete.
+ if n, err := io.Copy(io.MultiWriter(destination, streams[i]), io.LimitReader(rd, 256<<20)); err != nil || n == 256<<20 {
+ streams[i].Abort()
+ } else {
+ streams[i].Close()
+ }
+ copied <- struct{}{}
+ }()
}
go func() {
if len(g.input) > 0 {
@@ -605,7 +607,7 @@ func (e *Engineer) runGate(ctx context.Context, r stepRow, work string, g gate)
}
}
codeMu.Lock()
- res.code, res.output = code, out.String()
+ res.code, res.output, res.evidence = code, out.String(), evidence
if g.jsonOutput {
var over bool
res.output, over = structured.Result()
diff --git a/internal/runner/thin/judge_test.go b/internal/runner/thin/judge_test.go
index e77e5310..fb1aed5a 100644
--- a/internal/runner/thin/judge_test.go
+++ b/internal/runner/thin/judge_test.go
@@ -56,25 +56,6 @@ func TestFindGate(t *testing.T) {
}
}
-// A Linux runner says honestly that it cannot check Apple code.
-func TestNeedsMacOS(t *testing.T) {
- for _, tc := range []struct {
- changed []string
- gate string
- want bool
- }{
- {[]string{"ios/Woodstar/AccountNavigationHost.swift"}, "./scripts/ci.sh", true},
- {[]string{"ios/Woodstar.xcodeproj/project.pbxproj"}, "", true},
- {[]string{"internal/x.go", "web/a.js"}, "go test ./...", false},
- {[]string{"README.md"}, "xcodebuild test -scheme App", true},
- {nil, "make ci", false},
- } {
- if got := needsMacOS(tc.changed, tc.gate); got != tc.want {
- t.Fatalf("needsMacOS(%v, %q) = %v", tc.changed, tc.gate, got)
- }
- }
-}
-
func TestLineTailKeepsTheLast200Lines(t *testing.T) {
tail := &lineTail{max: wire.MaxChecksLines}
for i := 1; i <= 500; i++ {
diff --git a/internal/runner/thin/worker.go b/internal/runner/thin/worker.go
index 1892a6b6..2b64539a 100644
--- a/internal/runner/thin/worker.go
+++ b/internal/runner/thin/worker.go
@@ -215,9 +215,6 @@ func (w *Worker) Exec(ctx context.Context, r stepRow, progress func(wire.StepRep
case res.reason != "":
rep.Gate, rep.Output = "", ""
return done(wire.ChecksCannotRun, "checks_unavailable")
- case res.code != 0 && offline.MatchString(res.output):
- rep.Gate = ""
- return done(wire.ChecksCannotRun, "needs_network")
}
code := res.code
rep.ExitCode = &code