oficina / equipo Public

Merge remote-tracking branch 'origin/main' into thinking-line-steady

# Conflicts:
#	.rastrillo/budgets.txt
claude pushed by paul@keymail.dev 87fc7929e1c597a2670dd4389854c20d86dd465e parent 22a6447parent a798a59
14 files changed, +734 −47
  • .rastrillo/budgets.txt +4 −4
  • internal/headless/ask_test.go +27 −3
  • internal/headless/engineering_test.go +32 −5
  • internal/headless/env_test.go +5 −2
  • internal/headless/review_test.go +21 −5
  • internal/runner/provider/accounts.go +9 −4
  • internal/runner/provider/token_test.go +18 −0
  • internal/runner/thin/bridge.go +20 −5
  • internal/runner/thin/claude.go +3 −0
  • internal/runner/thin/copy_reason_test.go +39 −0
  • internal/runner/thin/forge.go +164 −17
  • internal/runner/thin/start_default_test.go +384 −0
  • internal/runner/thin/state.go +3 −1
  • scripts/staging-thin.py +5 −1

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/thinking-line-steady: 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.2s
ci-box: claude: fetched and verified in 1.7s
ci-box: codex: fetched and verified in 3.4s
ci-box: codex-code-mode-host: fetched and verified in 1.3s
ci-box: libwrap: fetched and verified in 0.3s
ci-box: socat: fetched and verified in 0.3s
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
ci-box: image pulled in 9.9s
ci-box: pi: installed and verified in 7.3s
ci-box: opencode: installed and verified in 1.9s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 8.6s
ci-box: clone deepened in 3.0s
ci-box: file times set from content: 2728 files, 174 directories
ci-box: ready in 15.9s
=== 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.245s
=== compile ===
go build ./...
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py compile
+ go build -tags testbuild ./...
  5.1s
+ go list -export -test -tags testbuild -f  ./...
  5.0s
+ go list -export -test -tags browser,testbuild -f  ./internal/equipo ./internal/headless ./internal/idtest ./internal/plan3test ./internal/thintest
  3.0s
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 1m26.016s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m23.571s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m23.57s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 52.86, cpu waiting 33.81%, memory waiting 0.00%, io waiting 0.48%
--- shard 1 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-review: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadless$/^4_review$|^TestHeadless$/^2b_access$|^TestHeadless$/^runner_crash$|^TestHeadless$/^2b_first_message$|^TestHeadless$/^4_checks_honest$|^TestHeadless$/^7_stream_resume$|^TestHeadless$/^2b_notebook$|^TestHeadless$/^2b_move_in$|^TestHeadless$/^2b_desk_failure$|^TestHeadless$/^cancel$' ./internal/headless

receipt: test step 1m28.261s 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 1m25.484s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m25.48s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 52.86, cpu waiting 33.91%, memory waiting 0.00%, io waiting 0.46%
--- 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 1m29.284s 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 1m26.633s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m15.59s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 6.04s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 5.01s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 50.79, cpu waiting 33.88%, memory waiting 0.00%, io waiting 0.45%
--- 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 1m24.866s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m22.484s amadan.net/oficina/equipo/internal/headless
receipt: slow test 42.02s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 20.58s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 10.3s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
receipt: slow test 9.58s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
machine: 32 CPUs, load 52.86, cpu waiting 33.81%, memory waiting 0.00%, io waiting 0.48%
--- 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 1m41.743s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m39.118s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m3.79s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 11.21s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 9.95s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 8.45s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 5.71s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
machine: 32 CPUs, load 45.50, cpu waiting 28.81%, memory waiting 0.00%, io waiting 0.36%
--- 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 3m11.137s 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 3m8.977s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m49.15s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistant
receipt: slow test 23.41s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 11.2s amadan.net/oficina/equipo/internal/headless TestHeadlessResearchHandoff
receipt: slow test 7.93s amadan.net/oficina/equipo/internal/headless TestHeadlessClaudeSignIn
receipt: slow test 7.26s amadan.net/oficina/equipo/internal/headless TestHeadlessTurnBatching
machine: 32 CPUs, load 11.17, cpu waiting 6.48%, memory waiting 0.00%, io waiting 0.07%
--- 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 2.117s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 2m1.763s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 7.82s amadan.net/oficina/equipo/internal/thintest TestContractTeamJobSettledStates
receipt: slow test 6.74s amadan.net/oficina/equipo/internal/thintest TestExplorePreviewsOff
receipt: slow test 3.69s amadan.net/oficina/equipo/internal/thintest TestContractPreviewHeldUntilPublishAnswer
receipt: slow test 3.38s amadan.net/oficina/equipo/internal/thintest TestContractTeamNudgePersonNeeds
receipt: slow test 2.43s amadan.net/oficina/equipo/internal/thintest TestResearchDoneFallsBack
machine: 32 CPUs, load 3.43, cpu waiting 2.49%, memory waiting 0.00%, io waiting 1.98%
--- shard 7 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane thintest-contract: ./internal/thintest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^Test([^C]|C[^o]|Co[^n]|Con[^t])|^TestContract(Assistant|Outcome|Team|Handoff|HostAllowlist|HostIsPerPerson|Look|Use[A-Z]|RemoteCall|LanesRunAtOnce|NoMergeQuestionWhenGateMerges|PreviewHeldUntilPublishAnswer|PreviewNotHeldBelow19|PublishNeedsOwnerAnswer)' ./internal/thintest

receipt: test step 2.48s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1m21.077s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 9.15s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 4.95s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotOffered
receipt: slow test 4.43s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
receipt: slow test 2.34s amadan.net/oficina/equipo/internal/thintest TestContractPublishNameTaken
receipt: slow test 2.34s amadan.net/oficina/equipo/internal/thintest TestContractPreview
machine: 32 CPUs, load 3.43, cpu waiting 2.49%, memory waiting 0.00%, io waiting 1.98%
--- 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 4m34.869s, over the 45s its record on line 44 allows; reported only, timing fails on CI

receipt: test step 4m40.195s 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 4m34.869s amadan.net/oficina/equipo/internal/runner/thin
receipt: slow test 37.03s amadan.net/oficina/equipo/internal/runner/thin TestModelsEngineeringProbesThenRunsTheStrongest
receipt: slow test 37s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeAnsweredByAnotherModel
receipt: slow test 36.78s amadan.net/oficina/equipo/internal/runner/thin TestModelsUnhealthyRetriedOnDemand
receipt: slow test 18.46s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeRunsInsideTheAdmission
receipt: slow test 6.82s amadan.net/oficina/equipo/internal/runner/thin TestOpenCodeStepsRealOpenCode
machine: 32 CPUs, load 3.27, cpu waiting 1.49%, 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 48.072s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 47.047s amadan.net/oficina/equipo/internal/runner
receipt: slow test 27.01s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.02s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 38.91, cpu waiting 29.84%, memory waiting 0.00%, io waiting 0.88%
--- 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 54.307s 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.992s amadan.net/oficina/equipo/internal/runner
receipt: slow test 42.99s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 36.94s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.43s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.55s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 42.04, cpu waiting 32.18%, memory waiting 0.00%, io waiting 0.83%
--- shard 11 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-rest: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^TestDirectBugWorkflow$|^TestEnrolKeepsTheRole$|^TestPlanWorkflowCandidateOrder$|^TestPlanWorkflowFeature$|^TestCoordinatorRecoveryCallRefusalKeepsServing$|^TestCoordinatorRefusalMatrix$' ./internal/runner

receipt: test step 35.293s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 34.382s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.13s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.75s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.12s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 2.19s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 1.61s amadan.net/oficina/equipo/internal/runner TestCoordinatorTransientRefusalKeepsServing
machine: 32 CPUs, load 23.12, cpu waiting 18.55%, memory waiting 0.00%, io waiting 1.12%
--- 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 30.6%, load 14.69
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 1m4.751s 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.914s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 26.31s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 26.2s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 24.26s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 21.69s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
receipt: slow test 21.58s amadan.net/oficina/equipo/internal/equipotest TestBudgetLoweringBelowUsage
machine: 32 CPUs, load 48.33, cpu waiting 31.66%, memory waiting 0.00%, io waiting 0.40%
--- 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 30.6%, load 14.69
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 1m12.796s 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 1m11.14s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 18.58s amadan.net/oficina/equipo/internal/equipotest TestProjectRejectsUnsafeBinding
receipt: slow test 18.54s amadan.net/oficina/equipo/internal/equipotest TestProjectsFailuresRollBack
receipt: slow test 18.53s amadan.net/oficina/equipo/internal/equipotest TestProjectOwnersAreMembers
receipt: slow test 18.53s amadan.net/oficina/equipo/internal/equipotest TestProjectsReopen
receipt: slow test 18.53s amadan.net/oficina/equipo/internal/equipotest TestProjectRequestActorAndUpdate
machine: 32 CPUs, load 45.50, cpu waiting 28.81%, 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 30.6%, load 14.69
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 1m10.598s 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 1m5.889s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 15.05s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 13.06s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 10.02s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 10s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 6.93s amadan.net/oficina/equipo/internal/equipotest TestRosterBootstrapOnce
machine: 32 CPUs, load 45.50, cpu waiting 29.75%, 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 30.6%, load 14.69
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 1m6.29s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m4.37s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 24.32s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 23.13s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 23.09s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 21.5s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsRollbackAndUnavailable
receipt: slow test 21.42s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsCurrentOwner
machine: 32 CPUs, load 48.33, cpu waiting 31.66%, memory waiting 0.00%, io waiting 0.40%
--- 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 30.6%, load 14.69
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 49.654s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 47.818s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 3.53s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 3.44s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 1.43s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.38s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3A
receipt: slow test 1.17s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorMessageSourcesUpgrade
machine: 32 CPUs, load 54.16, cpu waiting 33.91%, memory waiting 0.00%, io waiting 0.53%
--- 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 30.6%, load 14.69
test lane rest: ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/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/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/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/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/release: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/forge: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/equipo/team: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/webread: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/workspace: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/testci: its inputs changed
--- FAIL amadan.net/oficina/equipo/internal/runner/provider/codex TestCodexAppServerPolicy
=== RUN   TestCodexAppServerPolicy
=== PAUSE TestCodexAppServerPolicy
=== CONT  TestCodexAppServerPolicy
    launcher_test.go:400: codex_turn_uncertain
--- FAIL: TestCodexAppServerPolicy (0.86s)

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

--- FAIL amadan.net/oficina/equipo/internal/runner/webread TestTimeouts
=== RUN   TestTimeouts
    fetch_test.go:537: s1: {Source:s1 Origin:paul Parent: URL:https://shop.example.com/slow-body Hops:[{URL:https://shop.example.com/slow-body Address:151.101.1.1 Status:200}] Address:151.101.1.1 Status:200 Type:text/plain Bytes:5 SHA256:2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 Millis:306 Reason: File:s001.txt}
--- FAIL: TestTimeouts (0.68s)

--- FAIL amadan.net/oficina/equipo/internal/runner/webread (package output)
FAIL
rastrillo-budget/v1 ran 2.021s
FAIL	amadan.net/oficina/equipo/internal/runner/webread	2.042s

budget note: internal/equipo took 21.177s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/equipo/chat took 12.563s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/idtest took 39.232s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/release took 28.615s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/runner/containment took 56.283s, over the 15s its record on line 40 allows; reported only, timing fails on CI
budget note: internal/runner/forge took 20.545s, over the 20s its record on line 35 allows; reported only, timing fails on CI
budget note: internal/runner/provider/pi took 1m19.029s, over the 1m0s its record on line 27 allows; reported only, timing fails on CI
budget note: internal/runner/workspace took 13.237s, over the 10s the default allows; reported only, timing fails on CI

receipt: test step 1m48.219s against a 60s target (the gate's other steps are not in this figure)
receipt: 30 packages ran, 28 cached, 18 without tests, 2 failed
receipt: slow package 1m19.029s amadan.net/oficina/equipo/internal/runner/provider/pi
receipt: slow package 1m6.351s amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow package 56.283s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow package 50.445s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 39.232s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 24.84s amadan.net/oficina/equipo/internal/runner/containment TestEngineeringOfflineGo
receipt: slow test 24.66s amadan.net/oficina/equipo/internal/runner/provider/opencode TestOpenCodeAcceptanceHostileRepository
receipt: slow test 19.94s amadan.net/oficina/equipo/cmd/equipo-runner TestReleaseRunnerHasNoFakeWorker
receipt: slow test 13.18s amadan.net/oficina/equipo/internal/runner/provider/pi TestPiGoBinaryIsolation
receipt: slow test 12.59s amadan.net/oficina/equipo/internal/idtest TestIDCallbackGuardAndPendingNonce
rastrillo: budget test: go test failed
exit status 1
+ go test -tags testbuild -timeout 15m -v -run '^TestCodexAppServerPolicy$' -count=1 ./internal/runner/provider/codex   (retry, once)
##############################################################################
FLAKE ./internal/runner/provider/codex:TestCodexAppServerPolicy rest 87fc7929e1c597a2670dd4389854c20d86dd465e 0.86s 26.77
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
+ go test -tags testbuild -timeout 15m -v -run '^TestTimeouts$' -count=1 ./internal/runner/webread   (retry, once)
##############################################################################
FLAKE ./internal/runner/webread:TestTimeouts rest 87fc7929e1c597a2670dd4389854c20d86dd465e 0.68s 26.77
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 24.78, cpu waiting 15.40%, memory waiting 0.00%, io waiting 0.19%
--- 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
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserChat
=== RUN   TestBrowserChat
time=2026-11-20T08:57:42.744Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T08:57:42.744Z level=INFO msg="startup phase done" phase=state_lock took=254µs
time=2026-11-20T08:57:42.744Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T08:57:42.744Z level=INFO msg="startup phase done" phase=claim_roots took=182µs
time=2026-11-20T08:57:42.744Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T08:57:42.776Z level=INFO msg="startup phase done" phase=sweep took=31.517ms
time=2026-11-20T08:57:42.776Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T08:57:42.776Z level=INFO msg="startup phase done" phase=credentials took=231µs
time=2026-11-20T08:57:42.776Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T08:57:42.818Z level=INFO msg="startup phase done" phase=open_state took=41.813ms
time=2026-11-20T08:57:42.819Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T08:57:42.819Z level=INFO msg=connecting host=127.0.0.1:45929 protocol=28
time=2026-11-20T08:57:42.822Z level=INFO msg=connected host=127.0.0.1:45929 took=2.345ms
time=2026-11-20T08:57:42.822Z level=INFO msg="capabilities gathering"
time=2026-11-20T08:57:42.823Z level=INFO msg="capabilities gathered" took=490µs tags=linux,claude,go
time=2026-11-20T08:57:42.823Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T08:57:42.835Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-20T08:57:44.586Z level=INFO msg="connection checked" connection=claude-1 state=healthy
    browser_test.go:46: waiting for [...document.querySelectorAll('[equipo-message="incoming"] [equipo-markdown]:not([data-stream-text])')].some(e=>e.textContent.includes('fake coordinator')): context deadline exceeded (last evaluation: context deadline exceeded)
--- FAIL: TestBrowserChat (5.99s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m19.394s
FAIL	amadan.net/oficina/equipo/internal/headless	79.712s


receipt: test step 1m21.226s 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 1m19.394s amadan.net/oficina/equipo/internal/headless
receipt: slow test 39.04s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 15.2s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 7.77s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 6.78s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
receipt: slow test 5.99s amadan.net/oficina/equipo/internal/headless TestBrowserChat
exit status 1
+ go test -tags browser,testbuild -timeout 15m -run '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$' -v -run '^TestBrowserChat$' -count=1 ./internal/headless   (retry, once)
##############################################################################
FLAKE ./internal/headless:TestBrowserChat browser-headless-chat 87fc7929e1c597a2670dd4389854c20d86dd465e 5.99s 54.16
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 50.79, cpu waiting 32.60%, memory waiting 0.00%, io waiting 0.42%
--- 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
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
=== RUN   TestBrowserRailFollowsWork
time=2026-11-20T08:57:39.328Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T08:57:39.328Z level=INFO msg="startup phase done" phase=state_lock took=296µs
time=2026-11-20T08:57:39.328Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T08:57:39.328Z level=INFO msg="startup phase done" phase=claim_roots took=182µs
time=2026-11-20T08:57:39.329Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T08:57:39.360Z level=INFO msg="startup phase done" phase=sweep took=31.231ms
time=2026-11-20T08:57:39.360Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T08:57:39.360Z level=INFO msg="startup phase done" phase=credentials took=220µs
time=2026-11-20T08:57:39.360Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T08:57:39.399Z level=INFO msg="startup phase done" phase=open_state took=38.96ms
time=2026-11-20T08:57:39.400Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T08:57:39.401Z level=INFO msg=connecting host=127.0.0.1:35167 protocol=28
time=2026-11-20T08:57:39.403Z level=INFO msg=connected host=127.0.0.1:35167 took=1.946ms
time=2026-11-20T08:57:39.403Z level=INFO msg="capabilities gathering"
time=2026-11-20T08:57:39.403Z level=INFO msg="capabilities gathered" took=402µs tags=linux,claude,go
time=2026-11-20T08:57:39.404Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T08:57:39.411Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-20T08:57:40.660Z level=INFO msg="connection checked" connection=claude-1 state=healthy
time=2026-11-20T08:57:49.135Z level=INFO msg="kept sessions" kept=1 bytes=2770 expired=0
time=2026-11-20T08:57:53.345Z level=INFO msg="kept sessions" kept=2 bytes=4922 expired=0
time=2026-11-20T08:57:54.172Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T08:57:54.172Z level=INFO msg="startup phase done" phase=state_lock took=66µs
time=2026-11-20T08:57:54.172Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T08:57:54.172Z level=INFO msg="startup phase done" phase=claim_roots took=83µs
time=2026-11-20T08:57:54.172Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T08:57:54.218Z level=INFO msg="startup phase done" phase=sweep took=45.532ms
time=2026-11-20T08:57:54.219Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T08:57:54.219Z level=INFO msg="startup phase done" phase=credentials took=224µs
time=2026-11-20T08:57:54.219Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T08:57:54.265Z level=INFO msg="startup phase done" phase=open_state took=45.48ms
time=2026-11-20T08:57:54.266Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T08:57:54.267Z level=INFO msg=connecting host=127.0.0.1:36123 protocol=28
time=2026-11-20T08:57:54.268Z level=INFO msg=connected host=127.0.0.1:36123 took=1.075ms
time=2026-11-20T08:57:54.268Z level=INFO msg="capabilities gathering"
time=2026-11-20T08:57:54.269Z level=INFO msg="capabilities gathered" took=596µs tags=linux,claude,go
time=2026-11-20T08:57:54.271Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T08:57:54.275Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-20T08:57:56.504Z level=INFO msg="connection checked" connection=claude-1 state=healthy
    browser_review_test.go:57: waiting for document.querySelector('#rail [data-specialist="engineering"]')?.dataset.state==='working' && document.querySelector('#rail [data-specialist="engineering"]').querySelector('[equipo-nav-task]')?.textContent==='Slow sidebar change' && document.querySelector('#nav-tasks [data-count]')?.textContent==='1': context deadline exceeded (last evaluation: context deadline exceeded)
time=2026-11-20T08:58:00.947Z level=WARN msg="step account" err="context canceled"
--- FAIL: TestBrowserRailFollowsWork (22.18s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m31.089s
FAIL	amadan.net/oficina/equipo/internal/headless	91.433s


receipt: test step 1m32.693s 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 1m31.089s amadan.net/oficina/equipo/internal/headless
receipt: slow test 24.47s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 22.18s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 14.09s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 10.91s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
receipt: slow test 9.68s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
exit status 1
+ go test -tags browser,testbuild -timeout 15m -run '^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$' -v -run '^TestBrowserRailFollowsWork$' -count=1 ./internal/headless   (retry, once)
##############################################################################
FLAKE ./internal/headless:TestBrowserRailFollowsWork browser-headless-work 87fc7929e1c597a2670dd4389854c20d86dd465e 22.18s 50.79
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 36.58, cpu waiting 22.97%, memory waiting 0.00%, io waiting 0.29%
--- 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 1m43.788s 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 1m41.842s amadan.net/oficina/equipo/internal/headless
receipt: slow test 15.78s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 12.99s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 12.97s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 10.77s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
receipt: slow test 10.37s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsOpenCodeGoLimitRequired
machine: 32 CPUs, load 42.49, cpu waiting 27.87%, memory waiting 0.00%, io waiting 0.35%
--- shard 21 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-rest: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAskAfterMerge|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' ./internal/headless
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserCopyContinue
=== RUN   TestBrowserCopyContinue
time=2026-11-20T08:57:54.168Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T08:57:54.168Z level=INFO msg="startup phase done" phase=state_lock took=62µs
time=2026-11-20T08:57:54.168Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T08:57:54.168Z level=INFO msg="startup phase done" phase=claim_roots took=88µs
time=2026-11-20T08:57:54.168Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T08:57:54.225Z level=INFO msg="startup phase done" phase=sweep took=56.519ms
time=2026-11-20T08:57:54.225Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T08:57:54.225Z level=INFO msg="startup phase done" phase=credentials took=212µs
time=2026-11-20T08:57:54.225Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T08:57:54.277Z level=INFO msg="startup phase done" phase=open_state took=51.507ms
time=2026-11-20T08:57:54.277Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T08:57:54.279Z level=INFO msg=connecting host=127.0.0.1:40733 protocol=28
time=2026-11-20T08:57:54.281Z level=INFO msg=connected host=127.0.0.1:40733 took=892µs
time=2026-11-20T08:57:54.281Z level=INFO msg="capabilities gathering"
time=2026-11-20T08:57:54.282Z level=INFO msg="capabilities gathered" took=669µs tags=linux,claude,go
time=2026-11-20T08:57:54.286Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T08:57:54.289Z 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: <nil>)
--- FAIL: TestBrowserCopyContinue (6.40s)

--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserEmptyExplore
=== RUN   TestBrowserEmptyExplore
time=2026-11-20T08:58:31.451Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T08:58:31.452Z level=INFO msg="startup phase done" phase=state_lock took=92µs
time=2026-11-20T08:58:31.452Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T08:58:31.452Z level=INFO msg="startup phase done" phase=claim_roots took=94µs
time=2026-11-20T08:58:31.452Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T08:58:31.481Z level=INFO msg="startup phase done" phase=sweep took=29.459ms
time=2026-11-20T08:58:31.481Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T08:58:31.482Z level=INFO msg="startup phase done" phase=credentials took=214µs
time=2026-11-20T08:58:31.482Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T08:58:31.523Z level=INFO msg="startup phase done" phase=open_state took=41.658ms
time=2026-11-20T08:58:31.524Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T08:58:31.525Z level=INFO msg=connecting host=127.0.0.1:34191 protocol=28
time=2026-11-20T08:58:31.527Z level=INFO msg=connected host=127.0.0.1:34191 took=2.435ms
time=2026-11-20T08:58:31.527Z level=INFO msg="capabilities gathering"
time=2026-11-20T08:58:31.528Z level=INFO msg="capabilities gathered" took=603µs tags=linux,claude,go
time=2026-11-20T08:58:31.532Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T08:58:31.533Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-20T08:58:32.626Z level=INFO msg="connection checked" connection=claude-1 state=healthy
    browser_receipts_test.go:169: waiting for [...document.querySelectorAll('[equipo-markdown]:not([data-stream-text])')].some(e=>e.textContent.includes("I'm your coordinator")): context deadline exceeded (last evaluation: <nil>)
--- FAIL: TestBrowserEmptyExplore (5.85s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m34.687s
FAIL	amadan.net/oficina/equipo/internal/headless	94.966s


receipt: test step 1m36.123s 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 1m34.687s amadan.net/oficina/equipo/internal/headless
receipt: slow test 15.14s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
receipt: slow test 12.06s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 11.08s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 10.63s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 8.13s amadan.net/oficina/equipo/internal/headless TestBrowserRefreshRace
exit status 1
+ go test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAskAfterMerge|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' -v -run '^TestBrowserCopyContinue$|^TestBrowserEmptyExplore$' -count=1 ./internal/headless   (retry, once)
##############################################################################
FLAKE ./internal/headless:TestBrowserCopyContinue browser-headless-rest 87fc7929e1c597a2670dd4389854c20d86dd465e 6.40s 48.33
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
##############################################################################
FLAKE ./internal/headless:TestBrowserEmptyExplore browser-headless-rest 87fc7929e1c597a2670dd4389854c20d86dd465e 5.85s 48.33
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 39.41, cpu waiting 25.38%, memory waiting 0.00%, io waiting 0.32%
--- shard 22 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-rest: ./internal/equipo
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserPreviewBlocksNavigation)$' ./internal/equipo

receipt: test step 1.526s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 668ms amadan.net/oficina/equipo/internal/equipo
receipt: slow test 670ms amadan.net/oficina/equipo/internal/equipo TestBrowserPreviewBlocksNavigation
browser lane browser-rest: ./internal/idtest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserOficinaIDDoor)$' ./internal/idtest

receipt: test step 995ms against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1.687s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 1.69s 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.113s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1.93s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 1.93s 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|TestBrowserHousekeeping|TestBrowserInnerGallery|TestBrowserInnerScreens|TestBrowserInstantThinking|TestBrowserInstantThinkingQueued|TestBrowserMachines|TestBrowserPhoneIndex|TestBrowserPlacementQuestionAndPending|TestBrowserProjectPlacement|TestBrowserProjectsList|TestBrowserReportActionFeedback|TestBrowserReportNextSteps|TestBrowserReportThread|TestBrowserRollup|TestBrowserRosterAlignment|TestBrowserRosterDecisionStates|TestBrowserRosterQuietDay|TestBrowserRosterReports|TestBrowserRosterSetAside|TestBrowserRosterSubchat|TestBrowserRosterThinking|TestBrowserRosterVisual|TestBrowserSettingsHousekeepingGroups|TestBrowserSettingsMenu|TestBrowserSettingsRail|TestBrowserSettingsSaveBar|TestBrowserSettingsShots|TestBrowserSettingsStayOnPage|TestBrowserSettingsTeams|TestBrowserShipsButtons|TestBrowserSpecialistRows|TestBrowserSpendFollowsAnswers|TestBrowserTaskRows|TestBrowserTeamPanel|TestBrowserThinkingCycles|TestBrowserThinkingLinesClear|TestBrowserThinkingSteady|TestBrowserThinkingWords|TestBrowserTokenRowEmail|TestBrowserTrackStarCentre)$' ./internal/thintest

receipt: test step 1.133s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 3m15.231s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 17.81s amadan.net/oficina/equipo/internal/thintest TestBrowserAccessRequest
receipt: slow test 14.37s amadan.net/oficina/equipo/internal/thintest TestBrowserSettingsTeams
receipt: slow test 12.02s amadan.net/oficina/equipo/internal/thintest TestBrowserThinkingCycles
receipt: slow test 10.51s amadan.net/oficina/equipo/internal/thintest TestBrowserPlacementQuestionAndPending
receipt: slow test 7.88s amadan.net/oficina/equipo/internal/thintest TestBrowserInnerScreens
machine: 32 CPUs, load 6.92, cpu waiting 5.84%, memory waiting 0.00%, io waiting 1.79%
--- 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   (55s)
ok ./internal/headless TestHeadlessConnections/A5_cancel_and_sign_out 5.12s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.27s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 10.06s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 10.09s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 26.66s
+ 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   (60s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 16.83s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 12.61s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 11.36s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 16.99s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless   (23s)
ok ./internal/headless TestMixedVersions 20.92s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks   (2s)
ok ./internal/runner/checks TestCheckSandboxDeniedPathsTampering 0.80s
+ go test -tags testbuild -timeout 15m -v -run '^TestRunnerCancelAndSupersede$' ./internal/runner/thin   (2s)
ok ./internal/runner/thin TestRunnerCancelAndSupersede 0.08s
quarantine: 0 flaked (passed on the retry), 0 failed
machine: 32 CPUs, load 44.62, cpu waiting 33.82%, memory waiting 0.00%, io waiting 0.72%
--- 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 12.472s against a 60s target (the gate's other steps are not in this figure)
receipt: 4 packages ran, 0 cached, 3 without tests, 0 failed
receipt: slow package 7.166s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 201ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 70ms 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/gotoolchain
receipt: slow test 4.96s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.75s 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 90ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxToolchain
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 3.863s 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.908s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 280ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 180ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof
receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceExitStatus
receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryCleansScratch
machine: 32 CPUs, load 10.94, cpu waiting 9.84%, memory waiting 0.00%, io waiting 1.51%
--- 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 30.6%, load 14.69
shard 25: make runner-dead-references lanes-check build vet fmt-check budget migration-check
python3 scripts/runner-dead-references.py
reference scan: 2442 text files, 2846 matches, 0 failures
python3 scripts/ci-test.py check
lanes: 18 lanes and 5 browser lanes run every test once; 20-check@29
CGO_ENABLED=0 go build ./...
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o /dev/null ./cmd/equipo-runner
go vet ./...
go vet -tags testbuild ./internal/runner/thin ./internal/headless
GOOS=darwin GOARCH=arm64 go vet ./cmd/equipo-runner/... ./internal/runner/... ./internal/wire/... ./internal/release/...
go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget size
budget size: 87 directories within budget
CGO_ENABLED=0 go test ./internal/equipo -run '^TestMigrationModels$' -count=1
ok  	amadan.net/oficina/equipo/internal/equipo	2.397s
machine: 32 CPUs, load 51.15, cpu waiting 34.65%, memory waiting 0.00%, io waiting 0.61%
--- 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 30.6%, load 14.69
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 42.04, cpu waiting 30.86%, memory waiting 0.00%, io waiting 0.85%
--- 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 30.6%, load 14.69
shard 27: make govulncheck
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 ./...
=== Symbol Results ===

No vulnerabilities found.

Your code is affected by 0 vulnerabilities.
This scan also found 0 vulnerabilities in packages you import and 5
vulnerabilities in modules you require, but your code doesn't appear to call
these vulnerabilities.
Use '-show verbose' for more details.
machine: 32 CPUs, load 23.12, cpu waiting 20.23%, memory waiting 0.00%, io waiting 1.08%
--- shard 28 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: gitleaks started 30s late; cpu waiting 30.6%, load 14.69
shard 28: make gitleaks
8:57AM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
8:58AM INF 1045 commits scanned.
8:58AM INF scanned ~60074207 bytes (60.07 MB) in 19.3s
8:58AM INF no leaks found
machine: 32 CPUs, load 38.91, cpu waiting 29.84%, memory waiting 0.00%, io waiting 0.88%
=== 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.027ms, worst 1.102ms, budget 150ms
perf: GET /api/runner/protocol: median 88µs, worst 115µs, budget 150ms
perf: GET /api/v1/account-setups/{id}: median 623µs, worst 649µs, budget 150ms
perf: GET /api/v1/accounts: median 399µs, worst 455µs, budget 150ms
perf: GET /api/v1/auth/devices: median 448µs, worst 478µs, budget 150ms
perf: GET /api/v1/budgets: median 481µs, worst 528µs, budget 150ms
perf: GET /api/v1/capabilities: median 246µs, worst 272µs, budget 150ms
perf: GET /api/v1/cards/{id}: median 1.163ms, worst 1.251ms, budget 150ms
perf: GET /api/v1/connections: median 547µs, worst 589µs, budget 150ms
perf: GET /api/v1/connections/{id}: median 535µs, worst 556µs, budget 150ms
perf: GET /api/v1/conversation: median 863µs, worst 934µs, budget 150ms
perf: GET /api/v1/conversation/cards: median 1.425ms, worst 1.449ms, budget 150ms
perf: GET /api/v1/coordinator: median 1.678ms, worst 1.783ms, budget 150ms
perf: GET /api/v1/invites/{id}: median 436µs, worst 472µs, budget 150ms
perf: GET /api/v1/journey: median 9.145ms, worst 9.28ms, budget 150ms
perf: GET /api/v1/me: median 485µs, worst 509µs, budget 150ms
perf: GET /api/v1/me/settings: median 566µs, worst 592µs, budget 150ms
perf: GET /api/v1/needs-you: median 8.7ms, worst 8.925ms, budget 150ms
perf: GET /api/v1/notifications: median 1.638ms, worst 1.792ms, budget 150ms
perf: GET /api/v1/onboarding: median 405µs, worst 437µs, budget 150ms
perf: GET /api/v1/people: median 439µs, worst 455µs, budget 150ms
perf: GET /api/v1/playbooks: median 567µs, worst 618µs, budget 150ms
perf: GET /api/v1/playbooks/{id}: median 534µs, worst 563µs, budget 150ms
perf: GET /api/v1/playbooks/{id}/template-diff: median 838µs, worst 875µs, budget 150ms
perf: GET /api/v1/preferences: median 753µs, worst 794µs, budget 150ms
perf: GET /api/v1/projects/{id}: median 441µs, worst 491µs, budget 150ms
perf: GET /api/v1/projects/{id}/settings: median 578µs, worst 596µs, budget 150ms
perf: GET /api/v1/roster: median 470µs, worst 501µs, budget 150ms
perf: GET /api/v1/runners/{id}: median 416µs, worst 457µs, budget 150ms
perf: GET /api/v1/specialists: median 8.046ms, worst 8.213ms, budget 150ms
perf: GET /api/v1/specialists/{id}: median 7.867ms, worst 7.949ms, budget 150ms
perf: GET /api/v1/specialists/{id}/template-diff: median 828µs, worst 875µs, budget 150ms
perf: GET /api/v1/tasks/{id}/plan: median 1.13ms, worst 1.167ms, budget 150ms
perf: GET /api/v1/tasks/{id}/thread: median 730µs, worst 749µs, budget 150ms
perf: GET /api/v1/teams: median 454µs, worst 484µs, budget 150ms
perf: GET /api/v1/templates: median 624µs, worst 669µs, budget 150ms
perf: GET /api/v1/templates/{id}: median 465µs, worst 479µs, budget 150ms
perf: GET /auth/callback: median 86µs, worst 121µs, budget 150ms
perf: GET /auth/devices/{id}: median 3.363ms, worst 3.409ms, budget 150ms
perf: GET /auth/verify: median 78µs, worst 105µs, budget 150ms
perf: GET /connections: median 3.658ms, worst 3.778ms, budget 150ms
perf: GET /conversation: median 7.125ms, worst 7.24ms, budget 150ms
perf: GET /conversation/connections: median 259µs, worst 268µs, budget 150ms
perf: GET /conversation/notebook: median 237µs, worst 266µs, budget 150ms
perf: GET /conversation/settings: median 3.781ms, worst 3.941ms, budget 150ms
perf: GET /conversation/settings/autonomy: median 3.388ms, worst 3.561ms, budget 150ms
perf: GET /conversation/settings/connections: median 5.965ms, worst 6.159ms, budget 150ms
perf: GET /conversation/settings/connections/add: median 6.183ms, worst 6.306ms, budget 150ms
perf: GET /conversation/settings/copy: median 3.448ms, worst 3.611ms, budget 150ms
perf: GET /conversation/settings/housekeeping: median 4.132ms, worst 6.286ms, budget 150ms
perf: GET /conversation/settings/machines: median 4.394ms, worst 4.613ms, budget 150ms
perf: GET /conversation/settings/machines/add: median 4.241ms, worst 4.337ms, budget 150ms
perf: GET /conversation/settings/notebook: median 3.279ms, worst 3.38ms, budget 150ms
perf: GET /conversation/settings/thinking: median 3.778ms, worst 3.948ms, budget 150ms
perf: GET /housekeeping: median 3.644ms, worst 3.689ms, budget 150ms
perf: GET /invites/new: median 571µs, worst 636µs, budget 150ms
perf: GET /invites/{id}: median 609µs, worst 636µs, budget 150ms
perf: GET /jobs: median 3.163ms, worst 3.281ms, budget 150ms
perf: GET /jobs/{id}: median 4.307ms, worst 4.381ms, budget 150ms
perf: GET /journey: median 10.238ms, worst 10.576ms, budget 150ms
perf: GET /nav/rail: median 2.976ms, worst 3.233ms, budget 150ms
perf: GET /needs-you: median 9.896ms, worst 10.038ms, budget 150ms
perf: GET /onboarding: median 3.841ms, worst 3.915ms, budget 150ms
perf: GET /people: median 3.256ms, worst 3.283ms, budget 150ms
perf: GET /playbook-suggestions/{suggestion}: median 4.498ms, worst 4.625ms, budget 150ms
perf: GET /playbooks: median 3.997ms, worst 4.055ms, budget 150ms
perf: GET /playbooks/new: median 4.183ms, worst 4.306ms, budget 150ms
perf: GET /playbooks/{id}: median 4.596ms, worst 4.69ms, budget 150ms
perf: GET /playbooks/{id}/edit: median 4.627ms, worst 4.677ms, budget 150ms
perf: GET /playbooks/{id}/template-diff: median 3.96ms, worst 3.994ms, budget 150ms
perf: GET /preferences: median 4.267ms, worst 4.852ms, budget 150ms
perf: GET /preferences/sources/{source}: median 3.939ms, worst 4.072ms, budget 150ms
perf: GET /projects: median 5.086ms, worst 5.151ms, budget 150ms
perf: GET /projects/accounts: median 3.535ms, worst 3.599ms, budget 150ms
perf: GET /projects/new: median 3.505ms, worst 3.608ms, budget 150ms
perf: GET /projects/{id}: median 10.15ms, worst 10.295ms, budget 150ms
perf: GET /projects/{id}/edit: median 3.58ms, worst 3.638ms, budget 150ms
perf: GET /runners/enrol: median 4.2ms, worst 4.234ms, budget 150ms
perf: GET /settings: median 3.268ms, worst 3.346ms, budget 150ms
perf: GET /settings/coordinator: median 5.523ms, worst 7.671ms, budget 150ms
perf: GET /settings/devices: median 3.278ms, worst 3.33ms, budget 150ms
perf: GET /settings/recovery: median 3.305ms, worst 3.462ms, budget 150ms
perf: GET /settings/recovery/release: median 3.247ms, worst 3.465ms, budget 150ms
perf: GET /settings/thinking: median 256µs, worst 299µs, budget 150ms
perf: GET /signin: median 309µs, worst 347µs, budget 150ms
perf: GET /specialists/new: median 3.229ms, worst 3.385ms, budget 150ms
perf: GET /specialists/{key}: median 12.417ms, worst 12.897ms, budget 150ms
perf: GET /specialists/{key}/edit: median 3.892ms, worst 4.052ms, budget 150ms
perf: GET /specialists/{key}/template-diff: median 4.043ms, worst 4.089ms, budget 150ms
perf: GET /tasks: median 5.569ms, worst 5.621ms, budget 150ms
perf: GET /tasks/new: median 3.373ms, worst 3.432ms, budget 150ms
perf: GET /tasks/{id}: median 6.358ms, worst 8.445ms, budget 150ms
perf: GET /tasks/{id}/merge: median 5.523ms, worst 5.595ms, budget 150ms
perf: GET /tasks/{id}/move: median 4.914ms, worst 5.125ms, budget 150ms
perf: GET /tasks/{id}/plan: median 5.587ms, worst 5.661ms, budget 150ms
perf: GET /tasks/{id}/preview: median 1.471ms, worst 1.603ms, budget 150ms
perf: GET /tasks/{id}/questions/{question}: median 5.055ms, worst 5.139ms, budget 150ms
perf: GET /tasks/{id}/rendered-change: median 4.563ms, worst 4.664ms, budget 150ms
perf: GET /tasks/{id}/rendered-change/{hash}.png: median 4.099ms, worst 4.223ms, budget 150ms
perf: GET /tasks/{id}/thread: median 7.752ms, worst 7.865ms, budget 150ms
perf: GET /team/{specialist}: median 4.282ms, worst 4.377ms, budget 150ms
perf: GET /teams: median 11.883ms, worst 12.522ms, budget 150ms
perf: GET /templates: median 3.75ms, worst 3.842ms, budget 150ms
perf: GET /usage: median 4.316ms, worst 4.525ms, budget 150ms
perf: GET /work: median 3.248ms, worst 3.337ms, budget 150ms
perf: cold boot: median 253ms of [252.852228ms 253.495916ms 256.483585ms], budget 500ms

receipt: test step 46.331s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 83 without tests, 0 failed
receipt: slow package 8.838s 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 8.02s amadan.net/oficina/equipo/internal/equipotest TestPerfScreens
receipt: slow test 820ms amadan.net/oficina/equipo/internal/equipotest TestPerfBoot
=== cache ===
ci-box: build cache /home/ci/work/repos/oficina__equipo/cache/go-build: 5.01 GiB in 27195 files
ci-box: module cache /home/ci/work/repos/oficina__equipo/cache/go-mod: 0.84 GiB in 27329 files
ci-box: build cache over 4.0 GiB: dropped 2.61 GiB this job did not read, kept 2.41 GiB
diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt
index c8fb17cb..8b2a2623 100644
--- a/.rastrillo/budgets.txt
+++ b/.rastrillo/budgets.txt
@@ -26,7 +26,7 @@ time internal/runner/provider/claude 45s Task 5 measured 32.430s for fake CLI se
time internal/runner/provider/codex 35s Plan 3 CI repair measured 24.464s for the full package (controller CI 27.908s).
time internal/runner/provider/pi 60s The real pinned Pi in bubblewrap against a fake TensorX: probes P1 to P5 (a hundred RPC turns), the hostile repository, and the pinned tree checked whole (about 160 MB); measured 22s locally.
time internal/runner/provider/opencode 90s The real pinned OpenCode in bubblewrap against a fake Go: probes, the hostile repository per source, termination, resume; the 260 MB binary hashed per launch. Measured 40s.
-size internal/runner/provider 5598 - Fable follow-up: base and diagnostic gates, preview isolation and provenance guards; measured 5598/4345 source/test lines.
+size internal/runner/provider 5603 - Fable follow-up: base and diagnostic gates, preview isolation and provenance guards; measured 5603/4363 source/test lines (containment reasons logged).
time internal/plan3test 300s Initial cap for combined browser and runner acceptance; measure at both usable stops.
@@ -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 27849 21023 Fable follow-up: base and diagnostic gates, preview isolation and provenance guards; measured 27849/21023 source/test lines.
+size internal/runner/thin 28016 21446 Fable follow-up gates and guards, then main started at repo creation; measured 28016/21446 source/test lines (containment reasons logged).
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).
@@ -70,8 +70,8 @@ perf GET /api/v1/tasks/{id}/files/{file} skip Research kept images: bearer-only
perf GET /tasks/{id}/files/{file} skip Research kept images: the bytes of one image, shown on the task page; a file, not a screen.
perf GET /api/v1/runners skip Mac runners person API: bearer-only JSON for devices; the browser shows runners in the Team section.
time cmd/equipo-runner 60s TestReleaseRunnerHasNoFakeWorker builds the release runner and the thin package under testbuild (about 12s locally).
-size internal/headless - 11249 Fable follow-up: base and diagnostic gates, preview isolation and provenance guards; measured 0/11249 source/test lines (live first-stage check).
-size internal/thintest - 32195 Thin contract and browser checks: base gates, preview guards, empty conversation, the steady thinking line; measured 1515/32195 source/test lines.
+size internal/headless - 11319 Fable follow-up: base and diagnostic gates, preview isolation and provenance guards; live staging witnesses; measured 0/11319 source/test lines (live first-stage check).
+size internal/thintest - 32195 Fable follow-up: base and diagnostic gates, preview isolation and provenance guards; empty conversation page and browser checks; measured 1515/32091 source/test lines.
perf GET /api/v1/projects/{id}/merge-policy skip Merge authority person API: bearer-only JSON for devices; the browser reads the policy on /projects/{id}.
perf GET /api/v1/usage skip Thin v1 person API: bearer-only JSON for devices; the browser reads usage through /usage.
diff --git a/internal/headless/ask_test.go b/internal/headless/ask_test.go
index 373d2cf0..4829c8a0 100644
--- a/internal/headless/ask_test.go
+++ b/internal/headless/ask_test.go
@@ -171,14 +171,18 @@ func scenarioAsk(t *testing.T, env *Env) {
}
}
-// The staging witness (EQUIPO_STAGING_ASK_TASK): on a task whose steps
-// ran with their sessions kept, ask Engineering what it changed and
+// The staging witness (EQUIPO_STAGING_ASK_TASK, else the task this run's
+// 3_engineering pushed, which 4_review has seen judged): on a task whose
+// steps ran with their sessions kept, ask Engineering what it changed and
// Review what it was unsure about, then ask Engineering to fix a typo,
// which it must decline from here. Answers and timings go to the report.
func scenarioAskWitness(t *testing.T, env *Env) {
id := os.Getenv("EQUIPO_STAGING_ASK_TASK")
+ if id == "" {
+ id = pushedTask
+ }
if !env.Live || id == "" {
- t.Skip("staging only, with EQUIPO_STAGING_ASK_TASK")
+ t.Skip("staging only, with EQUIPO_STAGING_ASK_TASK or this run's 3_engineering task")
}
s := open(t, env)
s.keep()
@@ -186,6 +190,26 @@ func scenarioAskWitness(t *testing.T, env *Env) {
if err != nil {
t.Fatal(err)
}
+ if os.Getenv("EQUIPO_STAGING_ASK_TASK") == "" {
+ // Only a Claude step keeps its session (a Codex step keeps none,
+ // by design), and where this run's steps ran is the runner's call.
+ // The newest finished step of each is the one a question goes to.
+ newest := map[string]wire.Step{}
+ for _, st := range k.Steps {
+ if st.State == wire.StepDone && (st.Specialist == wire.SpecialistEngineering || st.Specialist == wire.SpecialistReview) {
+ newest[st.Specialist] = st
+ }
+ }
+ for _, name := range []string{wire.SpecialistEngineering, wire.SpecialistReview} {
+ st := newest[name]
+ if st.Family != "claude" {
+ t.Skipf("live: this run's %s ran on %s (%s), which keeps no session to ask", st.Specialist, st.Account, st.Family)
+ }
+ if !st.Askable {
+ t.Fatalf("a finished Claude step kept no session: %+v", st)
+ }
+ }
+ }
before := k.CandidateSHA
out := map[string]any{"task": id}
for _, q := range []struct{ name, text, specialist string }{
diff --git a/internal/headless/engineering_test.go b/internal/headless/engineering_test.go
index 27e4f217..59d3d9d0 100644
--- a/internal/headless/engineering_test.go
+++ b/internal/headless/engineering_test.go
@@ -74,6 +74,10 @@ func forgeShow(t *testing.T, bare string, args ...string) string {
return string(out)
}
+// pushedTask is the task a live 3_engineering pushed in this run, for the
+// scenarios that judge and ask about it without a new message.
+var pushedTask string
+
// Scenario 2, to the branch: the person reports a bug; the task is noted
// at once, investigated with a finding, and Engineering's step commits in
// a task tree, records the candidate SHA and pushes the task's own branch
@@ -120,6 +124,7 @@ func scenarioEngineering(t *testing.T, env *Env) {
}
noRepoQuestion(t, s, sent.Turn.ID)
if env.Live {
+ pushedTask = id
return
}
if !slices.Contains(stages, wire.StageInvestigated) || task.Findings[0].Path != "README.md" || task.Findings[0].Line != 5 {
@@ -163,11 +168,15 @@ func scenarioStepCrash(t *testing.T, env *Env) {
s.wait(t, "runner online", 30*time.Second, func(c *thintest.Conversation) bool { return c.Runner.Online })
text := "tool:record_task:oficina/sample|Fix the README typo|teh\ntool:start_task:$task|Slowly. stepsleep:4000 edit:README.md|teh panes|the panes"
if env.Live {
+ if env.CrashWitness == "" {
+ t.Fatal("EQUIPO_STAGING_CRASH_WITNESS is not set")
+ }
text = env.CrashWitness
}
sent := s.send(t, text)
id := s.taskOf(t, sent.Turn.ID)
- running := s.step(t, id, 5*time.Minute, wire.StepRunning)
+ // Live, the step may queue behind the earlier tasks' checks and review.
+ running := s.step(t, id, 10*time.Minute, wire.StepRunning)
if !env.Live {
// What Engineering started shows while it runs: the fake reads the
// file it will edit before it sleeps.
@@ -225,23 +234,38 @@ func scenarioStepCrash(t *testing.T, env *Env) {
}
// Cancel during a step: the task ends only when the runner reports the
-// attempt's termination; nothing is pushed.
+// attempt's termination; nothing is pushed. Live, the person asks for a
+// real change (EQUIPO_STAGING_CANCEL_WITNESS) and cancels it a second
+// after the real Engineering step starts, long before it could push.
func scenarioStepCancel(t *testing.T, env *Env) {
s := open(t, env)
s.keep()
- sent := s.send(t, "tool:record_task:oficina/sample|Slow change|x\ntool:start_task:$task|stepsleep:20000 edit:README.md|teh|the")
+ text, running, ended := "tool:record_task:oficina/sample|Slow change|x\ntool:start_task:$task|stepsleep:20000 edit:README.md|teh|the", time.Minute, time.Minute
+ if env.Live {
+ if env.CancelWitness == "" {
+ t.Fatal("EQUIPO_STAGING_CANCEL_WITNESS is not set")
+ }
+ // The live step may queue behind the earlier task's checks and
+ // review, and ends only when the runner has stopped a real
+ // process tree.
+ text, running, ended = env.CancelWitness, 10*time.Minute, 3*time.Minute
+ }
+ sent := s.send(t, text)
id := s.taskOf(t, sent.Turn.ID)
- s.step(t, id, time.Minute, wire.StepRunning)
+ s.step(t, id, running, wire.StepRunning)
time.Sleep(time.Second)
acc, err := env.Client.CancelTask(s.ctx, id)
if err != nil || acc.Attempt != 1 {
t.Fatalf("cancel: %+v %v", acc, err)
}
- st := s.step(t, id, time.Minute, wire.StepCancelled, wire.StepFailed, wire.StepDone)
+ st := s.step(t, id, ended, wire.StepCancelled, wire.StepFailed, wire.StepDone)
if st.State != wire.StepCancelled || !st.Terminated || st.Pushed {
t.Fatalf("cancelled step %+v", st)
}
s.wait(t, "task cancelled", 30*time.Second, func(c *thintest.Conversation) bool { return c.Tasks[id].Stage == wire.StageCancelled })
+ if env.Live {
+ return
+ }
if forgeHead(t, env.ForgePath("amadan.net/oficina/sample"), wire.TaskBranch(id, "Slow change")) != "" {
t.Fatal("a cancelled step pushed")
}
@@ -250,6 +274,9 @@ func scenarioStepCancel(t *testing.T, env *Env) {
// A step that asks to write outside /workspace is denied by the
// permission callback, and the tree commits only what it changed inside.
func scenarioStepContained(t *testing.T, env *Env) {
+ if env.Live {
+ t.Skip("local only: the fake CLI asks to write outside /workspace; a live model is never steered to")
+ }
s := open(t, env)
s.keep()
sent := s.send(t, "tool:record_task:oficina/sample|Contained|x\ntool:start_task:$task|escape:/etc/hostname escape:/home/runner/.claude/x edit:README.md|teh|the")
diff --git a/internal/headless/env_test.go b/internal/headless/env_test.go
index e906a10a..17b0a351 100644
--- a/internal/headless/env_test.go
+++ b/internal/headless/env_test.go
@@ -94,8 +94,10 @@ type Env struct {
// BreakDesk makes the desk record unwritable, then starts the runner.
BreakDesk func(t *testing.T)
// Witness is what the person says in the live Engineering scenario
- // (EQUIPO_STAGING_WITNESS); CrashWitness the same for scenario 4.
- Witness, CrashWitness string
+ // (EQUIPO_STAGING_WITNESS); CrashWitness the same for scenario 4 and
+ // CancelWitness for the step cancel. Each asks for a different change,
+ // so no two of a run's tasks read alike.
+ Witness, CrashWitness, CancelWitness string
// ForgePath is a local forge repository's bare path (local only).
ForgePath func(repo string) string
// GrantNow makes a repository reachable without restarting the
@@ -447,6 +449,7 @@ func stagingEnv(t *testing.T) *Env {
Project: os.Getenv("EQUIPO_STAGING_PROJECT"),
Witness: os.Getenv("EQUIPO_STAGING_WITNESS"),
CrashWitness: os.Getenv("EQUIPO_STAGING_CRASH_WITNESS"),
+ CancelWitness: os.Getenv("EQUIPO_STAGING_CANCEL_WITNESS"),
turns: &turns,
}
}
diff --git a/internal/headless/review_test.go b/internal/headless/review_test.go
index f78f3daa..8844f871 100644
--- a/internal/headless/review_test.go
+++ b/internal/headless/review_test.go
@@ -69,20 +69,32 @@ func witnessTask(t *testing.T, k wire.Task, checks, review wire.Step, since time
// and verdict agree, so the task is ready to merge, and Equipo merges that
// SHA into main through the forge (a merge commit, the branch deleted) and
// says so in one line.
+//
+// Live, the task is the one 3_engineering pushed in this run, judged with
+// no new message (or a new one from EQUIPO_STAGING_REVIEW_WITNESS): it
+// ends ready to merge or needing its person, on one SHA, and checks that
+// could not run say why.
func scenarioReview(t *testing.T, env *Env) {
- if env.Live && os.Getenv("EQUIPO_STAGING_REVIEW_WITNESS") == "" {
- t.Skip("EQUIPO_STAGING_REVIEW_WITNESS is not set")
+ witness := os.Getenv("EQUIPO_STAGING_REVIEW_WITNESS")
+ if env.Live && witness == "" && pushedTask == "" {
+ t.Skip("live: needs this run's 3_engineering task or EQUIPO_STAGING_REVIEW_WITNESS")
}
s := open(t, env)
s.keep()
s.wait(t, "runner online", 30*time.Second, func(c *thintest.Conversation) bool { return c.Runner.Online })
text := "tool:record_task:oficina/sample|Make edge swipe go back|Swiping from the edge does nothing.\ntool:start_task:$task|review:need:README.md|keeps your place, always|edit=README.md~keeps your place~keeps your place, always; edit:panes/swipe.go|return false|return true"
if env.Live {
- text = os.Getenv("EQUIPO_STAGING_REVIEW_WITNESS")
+ text = witness
}
start := time.Now()
- sent := s.send(t, text)
- id := s.taskOf(t, sent.Turn.ID)
+ var sent wire.Sent
+ var id string
+ if env.Live && witness == "" {
+ id = pushedTask
+ } else {
+ sent = s.send(t, text)
+ id = s.taskOf(t, sent.Turn.ID)
+ }
k := s.settled(t, id, 40*time.Minute)
checks, review := oneSHA(t, k)
witnessTask(t, k, checks, review, start)
@@ -91,6 +103,10 @@ func scenarioReview(t *testing.T, env *Env) {
if k.Stage != wire.StageReadyToMerge && k.NeedsYou == "" {
t.Fatalf("task ended %s", k.Stage)
}
+ // Honest checks: what could not run says why, and is never a pass.
+ if k.Checks == wire.ChecksCannotRun && (k.ChecksReason == "" || checks.Checks != wire.ChecksCannotRun) {
+ t.Fatalf("checks that could not run: task %s (%q), step %+v", k.Checks, k.ChecksReason, checks)
+ }
return
}
// Approved with checks passed on the branch's head: Equipo merges it.
diff --git a/internal/runner/provider/accounts.go b/internal/runner/provider/accounts.go
index edd6a829..5ce82146 100644
--- a/internal/runner/provider/accounts.go
+++ b/internal/runner/provider/accounts.go
@@ -8,7 +8,6 @@ import (
"encoding/hex"
"encoding/json"
"errors"
- "fmt"
"io"
"os"
"os/user"
@@ -900,6 +899,12 @@ func (l *AccountLease) PreflightFingerprint(ctx context.Context) (string, error)
return hex.EncodeToString(sum[:]), nil
}
-func accountContainment(reason string) error {
- return fmt.Errorf("%w: %s", ErrContainment, reason)
-}
+// containmentError is ErrContainment with its category, always a literal.
+type containmentError struct{ reason string }
+
+func (e containmentError) Error() string { return string(ErrContainment) + ": " + e.reason }
+func (e containmentError) Unwrap() error { return ErrContainment }
+func accountContainment(reason string) error { return containmentError{reason} }
+
+// ContainmentReason is a containment refusal's category, safe to log; "" otherwise.
+func ContainmentReason(err error) string { var c containmentError; errors.As(err, &c); return c.reason }
diff --git a/internal/runner/provider/token_test.go b/internal/runner/provider/token_test.go
index 8a9a129d..47798190 100644
--- a/internal/runner/provider/token_test.go
+++ b/internal/runner/provider/token_test.go
@@ -118,3 +118,21 @@ func TestClaudeTokenIdentity(t *testing.T) {
t.Fatal(err)
}
}
+
+// A containment refusal keeps its fixed category: the runner's log needs
+// it to say what changed in a copy, and it is never a path.
+func TestContainmentKeepsItsReason(t *testing.T) {
+ l := openTokenCopy(t, tokenFixture(t))
+ // A signed-in CLI records the account in its native config.
+ writeFake(t, filepath.Join(l.Binding().Home, ".claude.json"), `{"oauthAccount":{"emailAddress":"a@example.com","accountUuid":"u1"}}`)
+ err := l.CheckCopy(context.Background())
+ if !errors.Is(err, ErrContainment) {
+ t.Fatalf("changed account metadata accepted: %v", err)
+ }
+ if got := ContainmentReason(err); got != "runtime_claude_identity" {
+ t.Fatalf("reason %q", got)
+ }
+ if got := ContainmentReason(ErrPolicy); got != "" {
+ t.Fatalf("a policy refusal has containment reason %q", got)
+ }
+}
diff --git a/internal/runner/thin/bridge.go b/internal/runner/thin/bridge.go
index a0e93615..8ca8919e 100644
--- a/internal/runner/thin/bridge.go
+++ b/internal/runner/thin/bridge.go
@@ -100,15 +100,30 @@ func (b *bridge) call(ctx context.Context, person, turn string, attempt int64, n
}
// Creation progress is kept with the call: a resent call never
// creates twice, and a repository that already exists (an earlier
- // answer was lost) is adopted.
+ // answer was lost, or another writer made it) is adopted as it is.
+ // "made" is recorded only once the hub answered that this call
+ // created it, so only such a repository gets main started, also
+ // when a resent call finishes a start that failed.
state, err := b.State.creation(ctx, base, repo)
if err != nil {
return toolCreateError, true
}
- if state == "" {
- exists, err := b.Forge.Exists(ctx, repo)
- if err == nil && !exists {
- err = b.Forge.Create(ctx, repo)
+ if state == "" || state == "made" {
+ ours := state == "made"
+ if !ours {
+ var exists bool
+ if exists, err = b.Forge.Exists(ctx, repo); err == nil && !exists {
+ switch err = b.Forge.Create(ctx, repo); {
+ case err == nil:
+ ours, err = true, b.State.setCreation(ctx, base, repo, "made")
+ case errors.Is(err, ErrAdopted):
+ err = nil
+ }
+ }
+ }
+ if err == nil && ours && b.Clones != nil {
+ // main first, so task branches start from it and merge into it.
+ err = b.Clones.StartDefault(ctx, repo)
}
if err == nil {
err = b.State.setCreation(ctx, base, repo, "created")
diff --git a/internal/runner/thin/claude.go b/internal/runner/thin/claude.go
index cb80a226..402d40c0 100644
--- a/internal/runner/thin/claude.go
+++ b/internal/runner/thin/claude.go
@@ -277,6 +277,9 @@ func (c *coordBase) log(msg string, err error) {
// sanitize keeps only provider error codes: no paths or provider output.
func sanitize(err error) string {
+ if reason := provider.ContainmentReason(err); reason != "" {
+ return string(provider.ErrContainment) + ": " + reason
+ }
var p provider.Error
if errors.As(err, &p) {
return string(p)
diff --git a/internal/runner/thin/copy_reason_test.go b/internal/runner/thin/copy_reason_test.go
new file mode 100644
index 00000000..5a78e489
--- /dev/null
+++ b/internal/runner/thin/copy_reason_test.go
@@ -0,0 +1,39 @@
+package thin
+
+import (
+ "context"
+ "encoding/json"
+ "os"
+ "path/filepath"
+ "testing"
+ "time"
+
+ "amadan.net/oficina/equipo/internal/runner/provider"
+)
+
+// The log keeps a containment refusal's fixed category (2026-11-20:
+// production logged only provider_account_containment).
+func TestSanitizeKeepsContainmentReason(t *testing.T) {
+ root := t.TempDir()
+ home := filepath.Join(root, "claude-1")
+ id := provider.Identity{AccountID: "token:claude-1", HomeID: "h", ProviderVersion: provider.ClaudeVersion}
+ raw, _ := json.Marshal(id)
+ if os.Mkdir(home, 0700) != nil || os.WriteFile(filepath.Join(home, provider.IdentityFile), raw, 0600) != nil || os.WriteFile(filepath.Join(home, provider.TokenFile), []byte("sk-ant-oat01-canary"), 0600) != nil {
+ t.Fatal("home")
+ }
+ b := provider.Binding{ID: "claude-1", Home: home, AccountID: id.AccountID, Provider: "claude", Token: true, Expected: id, RuntimeRoot: filepath.Join(root, "homes")}
+ l, err := provider.OpenRuntimeCopy(context.Background(), b, func(context.Context, provider.Binding) (provider.Identity, error) { return id, nil }, time.Second)
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer l.Close()
+ if err = os.WriteFile(filepath.Join(l.Binding().Home, provider.TokenFile), []byte("x"), 0600); err != nil {
+ t.Fatal(err)
+ }
+ if got := sanitize(l.CheckCopy(context.Background())); got != "provider_account_containment: runtime_token_credential" {
+ t.Fatalf("logged %q", got)
+ }
+ if got := sanitize(provider.ErrPolicy); got != "provider_policy_rejected" {
+ t.Fatalf("logged %q", got)
+ }
+}
diff --git a/internal/runner/thin/forge.go b/internal/runner/thin/forge.go
index 58d48d16..2baf2817 100644
--- a/internal/runner/thin/forge.go
+++ b/internal/runner/thin/forge.go
@@ -35,7 +35,8 @@ type Forge interface {
Remote(ctx context.Context, repo string) (workspace.Remote, error)
// CreateIn lists namespaces the runner's agent may create repositories in.
CreateIn(ctx context.Context) []string
- // Create makes a new private repository and adds it to Repos.
+ // Create makes a new private repository and adds it to Repos. One that
+ // exists already is added too, with ErrAdopted: it is not this runner's.
Create(ctx context.Context, repo string) error
// Reachable lists every repository the agent can reach, for the
// context index. It includes Repos.
@@ -54,6 +55,11 @@ type Forge interface {
// ErrNoCreate means repositories cannot be created in that namespace.
var ErrNoCreate = errors.New("repository creation is not available here")
+// ErrAdopted means Create did not make the repository: it existed, or the
+// hub's answer was lost and it exists now. It is adopted, and is not this
+// runner's to start.
+var ErrAdopted = errors.New("the repository already exists; adopted")
+
// ErrEmptyRepo means the forge serves the repository and it has no
// commits yet: no branch, nothing to read. It is not an access failure.
var ErrEmptyRepo = errors.New("the repository has no commits yet")
@@ -263,6 +269,8 @@ func (f *fileForge) Exists(ctx context.Context, repo string) (bool, error) {
// Create makes repo once: an existing one (an earlier answer was lost) is
// adopted, and after any failure the hub is asked again before giving up.
+// Only the hub's own "created" answer makes it this runner's; an adopted
+// one returns ErrAdopted.
func (f *fileForge) Create(ctx context.Context, repo string) error {
parts := strings.Split(strings.TrimPrefix(repo, nsPrefix), "/")
if !ValidNewRepo(repo) || !slices.Contains(f.CreateIn(ctx), parts[0]) {
@@ -271,7 +279,7 @@ func (f *fileForge) Create(ctx context.Context, repo string) error {
if ok, err := f.Exists(ctx, repo); err != nil {
return err
} else if ok {
- return f.record(repo)
+ return f.adopt(repo)
}
c, err := f.agent(ctx)
if err != nil {
@@ -288,12 +296,20 @@ func (f *fileForge) Create(ctx context.Context, repo string) error {
return f.record(repo)
}
}
+ // "Already exists", or no answer: someone else's, or not known to be ours.
if ok, xerr := f.Exists(ctx, repo); xerr == nil && ok {
- return f.record(repo)
+ return f.adopt(repo)
}
return ErrNoCreate
}
+func (f *fileForge) adopt(repo string) error {
+ if err := f.record(repo); err != nil {
+ return err
+ }
+ return ErrAdopted
+}
+
// Merge sends the hub the merge request with the agent's credential for
// repo (its own entry, or the agent-wide one).
func (f *fileForge) Merge(ctx context.Context, repo, branch string, req forge.HubMergeRequest) (forge.HubMergeResult, error) {
@@ -397,20 +413,9 @@ func (c *Clones) fetch(ctx context.Context, repo string, shallow bool, branch st
if err != nil {
return err
}
- env := workspace.GitEnvironment()
- env["HOME"] = "/nonexistent"
- protocol := "https"
- if filepath.IsAbs(remote.URL) {
- protocol = "file"
- if remote.GitPassword != "" {
- return ErrNoCreate
- }
- } else if remote.GitPassword == "" || !strings.HasPrefix(remote.URL, "https://") {
- return workspace.ErrGitPassword
- } else {
- env["GIT_CONFIG_COUNT"] = "10"
- env["GIT_CONFIG_KEY_9"] = "http.extraHeader"
- env["GIT_CONFIG_VALUE_9"] = "Authorization: Basic " + base64.StdEncoding.EncodeToString([]byte("x:"+remote.GitPassword))
+ env, protocol, err := remoteEnv(remote)
+ if err != nil {
+ return err
}
dir := c.Path(repo)
if err = os.MkdirAll(filepath.Dir(dir), 0700); err != nil {
@@ -475,6 +480,148 @@ func groupCommand(ctx context.Context, name string, args ...string) *exec.Cmd {
return cmd
}
+// remoteEnv is git's environment for a resolved remote: no home, and the
+// password only in a header. A local path takes no password; an https
+// remote needs one.
+func remoteEnv(remote workspace.Remote) (map[string]string, string, error) {
+ env := workspace.GitEnvironment()
+ env["HOME"] = "/nonexistent"
+ if filepath.IsAbs(remote.URL) {
+ if remote.GitPassword != "" {
+ return nil, "", ErrNoCreate
+ }
+ return env, "file", nil
+ }
+ if remote.GitPassword == "" || !strings.HasPrefix(remote.URL, "https://") {
+ return nil, "", workspace.ErrGitPassword
+ }
+ env["GIT_CONFIG_COUNT"] = "10"
+ env["GIT_CONFIG_KEY_9"] = "http.extraHeader"
+ env["GIT_CONFIG_VALUE_9"] = "Authorization: Basic " + base64.StdEncoding.EncodeToString([]byte("x:"+remote.GitPassword))
+ return env, "https", nil
+}
+
+// startDefaultGap runs between StartDefault's emptiness check and its
+// push; tests put another writer there.
+var startDefaultGap = func() {}
+
+// startDate makes the start commit the same bytes every time.
+const startDate = "2026-01-01T00:00:00+0000"
+
+// lsRefs reads ls-remote's lines: each ref once, without HEAD and without
+// the peeled lines of annotated tags (refs/tags/v1^{}), which are no refs
+// of their own.
+func lsRefs(out string) map[string]string {
+ got := map[string]string{}
+ for _, line := range strings.Split(out, "\n") {
+ if sha, ref, ok := strings.Cut(line, "\t"); ok && ref != "HEAD" && !strings.HasSuffix(ref, "^{}") {
+ got[ref] = sha
+ }
+ }
+ return got
+}
+
+// StartDefault gives a repository this runner just created its default
+// branch before any task branch exists: main, at an empty first commit
+// with no parent. Task branches then start from main, and every merge
+// targets it. Left unborn, the hub made the first task branch pushed the
+// default, and a later task's merge was asked to merge into that
+// unrelated branch. A repository with any ref at all is left alone.
+//
+// Another writer may push between the check and the push. The start
+// commit is deterministic (fixed dates), so main is recognisable as this
+// start, and it is pushed create-only (an empty lease): a main of theirs
+// is never replaced, and is the default. Any other ref that does not
+// start from this main fails the start, now and on every retry; main is
+// withdrawn when the forge allows (only while it is still the start), so
+// no main unrelated to their work is left behind quietly.
+func (c *Clones) StartDefault(ctx context.Context, repo string) error {
+ if !repoKey.MatchString(repo) {
+ return ErrNoCreate
+ }
+ remote, err := readRemote(ctx, c.Forge, repo)
+ if err != nil {
+ return err
+ }
+ refs := func() (map[string]string, error) {
+ out, err := c.lsRemote(ctx, remote, "--", remote.URL)
+ if err != nil {
+ return nil, err
+ }
+ return lsRefs(string(out)), nil
+ }
+ env, protocol, err := remoteEnv(remote)
+ if err != nil {
+ return err
+ }
+ dir, err := os.MkdirTemp(c.Root, "start-")
+ if err != nil {
+ return err
+ }
+ defer os.RemoveAll(dir)
+ for k, v := range map[string]string{"GIT_DIR": dir, "GIT_AUTHOR_NAME": commitName, "GIT_AUTHOR_EMAIL": commitEmail, "GIT_COMMITTER_NAME": commitName, "GIT_COMMITTER_EMAIL": commitEmail, "GIT_AUTHOR_DATE": startDate, "GIT_COMMITTER_DATE": startDate} {
+ env[k] = v
+ }
+ git := func(stdin string, args ...string) (string, error) {
+ cmd := groupCommand(ctx, c.Git, append([]string{"-c", "protocol." + protocol + ".allow=always", "-c", "http.followRedirects=false"}, args...)...)
+ cmd.Dir = dir
+ for k, v := range env {
+ cmd.Env = append(cmd.Env, k+"="+v)
+ }
+ cmd.Stdin, cmd.Stderr = strings.NewReader(stdin), io.Discard
+ out, err := cmd.Output()
+ return strings.TrimSpace(string(out)), err
+ }
+ if _, err := git("", "init", "-q", "--bare", "--template=", dir); err != nil {
+ return err
+ }
+ tree, err := git("", "hash-object", "-t", "tree", "-w", "--stdin")
+ if err != nil {
+ return err
+ }
+ sha, err := git("Start the repository\n", "commit-tree", tree)
+ if err != nil || !shaPattern.MatchString(sha) {
+ return fmt.Errorf("start %s: no first commit", repo)
+ }
+ main := "refs/heads/" + unbornDefault
+ have, err := refs()
+ if err != nil {
+ return err
+ }
+ if len(have) == 0 {
+ startDefaultGap()
+ _, perr := git("", "push", "-q", "--no-verify", "--force-with-lease="+main+":", "--", remote.URL, sha+":"+main)
+ if have, err = refs(); err != nil {
+ return err
+ }
+ if perr != nil && have[main] == "" {
+ return fmt.Errorf("start %s: push main: %w", repo, perr)
+ }
+ }
+ if have[main] != sha {
+ return nil // refs of their own, or their main: left as they are
+ }
+ delete(have, main)
+ if len(have) == 0 {
+ return nil
+ }
+ if _, err := git("", "fetch", "-q", "--no-tags", "--", remote.URL, "+refs/*:refs/check/*"); err == nil {
+ related := true
+ for ref := range have {
+ if _, err := git("", "merge-base", "--is-ancestor", sha, "refs/check/"+strings.TrimPrefix(ref, "refs/")); err != nil {
+ related = false
+ }
+ }
+ if related {
+ return nil
+ }
+ }
+ if _, err := git("", "push", "-q", "--no-verify", "--force-with-lease="+main+":"+sha, "--", remote.URL, ":"+main); err != nil {
+ return fmt.Errorf("start %s: another writer's branch does not start from main, and main could not be withdrawn: %w", repo, err)
+ }
+ return fmt.Errorf("start %s: another writer's branch does not start from main; main withdrawn", repo)
+}
+
// DefaultBranch asks the remote which branch HEAD names.
func (c *Clones) DefaultBranch(ctx context.Context, repo string) (string, error) {
remote, err := readRemote(ctx, c.Forge, repo)
diff --git a/internal/runner/thin/start_default_test.go b/internal/runner/thin/start_default_test.go
new file mode 100644
index 00000000..7557bc28
--- /dev/null
+++ b/internal/runner/thin/start_default_test.go
@@ -0,0 +1,384 @@
+package thin
+
+import (
+ "context"
+ "encoding/json"
+ "errors"
+ "net/http"
+ "os"
+ "path/filepath"
+ "strings"
+ "testing"
+
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// creatingForge makes each repository it creates as an empty bare
+// repository, the way the hub serves a new one.
+type creatingForge struct {
+ pathForge
+ t *testing.T
+ failPush bool
+}
+
+func (f *creatingForge) Create(ctx context.Context, repo string) error {
+ if err := f.countingForge.Create(ctx, repo); err != nil {
+ return err
+ }
+ gitT(f.t, filepath.Dir(f.path(repo)), "init", "-q", "--bare", "-b", "main", f.path(repo))
+ if f.failPush {
+ // The hub refuses the first push: no main, and nothing recorded.
+ os.Chmod(filepath.Join(f.path(repo), "objects"), 0500)
+ f.t.Cleanup(func() { os.Chmod(filepath.Join(f.path(repo), "objects"), 0700) })
+ }
+ return nil
+}
+
+func startRig(t *testing.T) (*creatingForge, *Clones) {
+ t.Helper()
+ root := t.TempDir()
+ f := &creatingForge{pathForge: pathForge{root: filepath.Join(root, "forge")}, t: t}
+ os.MkdirAll(f.root, 0700)
+ os.MkdirAll(filepath.Join(root, "work"), 0700)
+ return f, &Clones{Root: filepath.Join(root, "work"), Git: "git", Forge: f}
+}
+
+// A repository Equipo creates gets its default branch, main, at an empty
+// first commit before any task branch exists. Task branches then start
+// from main and every merge targets it. Without it, the hub made the
+// first task branch pushed the default, and the next task's merge was
+// asked to merge into that unrelated branch ("could not compute the
+// merge").
+func TestStartDefaultMakesMainBeforeAnyTaskBranch(t *testing.T) {
+ f, c := startRig(t)
+ const repo = "amadan.net/oficina/site"
+ ctx := context.Background()
+ if err := f.Create(ctx, repo); err != nil {
+ t.Fatal(err)
+ }
+ if _, err := c.DefaultBranch(ctx, repo); !errors.Is(err, ErrEmptyRepo) {
+ t.Fatalf("a new repository should start empty: %v", err)
+ }
+ if err := c.StartDefault(ctx, repo); err != nil {
+ t.Fatal(err)
+ }
+ remote := f.path(repo)
+ if refs := gitT(t, remote, "for-each-ref", "--format=%(refname)"); refs != "refs/heads/main" {
+ t.Fatalf("refs after start: %q", refs)
+ }
+ main := gitT(t, remote, "rev-parse", "refs/heads/main")
+ if tree := gitT(t, remote, "rev-parse", main+"^{tree}"); tree != gitT(t, remote, "hash-object", "-t", "tree", "/dev/null") {
+ t.Fatalf("main's first commit is not empty: tree %s", tree)
+ }
+ if parents := gitT(t, remote, "rev-list", "--parents", "-n1", main); parents != main {
+ t.Fatalf("main's first commit has parents: %s", parents)
+ }
+ if def, err := c.DefaultBranch(ctx, repo); err != nil || def != "main" {
+ t.Fatalf("default after start: %q %v", def, err)
+ }
+ // Again (a resent create): nothing new.
+ if err := c.StartDefault(ctx, repo); err != nil {
+ t.Fatal(err)
+ }
+ if again := gitT(t, remote, "rev-parse", "refs/heads/main"); again != main {
+ t.Fatalf("main moved on a second start: %s -> %s", main, again)
+ }
+}
+
+// A repository with any branch already, including one holding only task
+// branches (the stuck ones), is left exactly as it is.
+func TestStartDefaultLeavesBranchesAlone(t *testing.T) {
+ f, c := startRig(t)
+ const repo = "amadan.net/oficina/stuck"
+ ctx := context.Background()
+ if err := f.Create(ctx, repo); err != nil {
+ t.Fatal(err)
+ }
+ seed := filepath.Join(t.TempDir(), "seed")
+ gitT(t, filepath.Dir(seed), "init", "-q", "-b", "equipo/tk1-demo", seed)
+ os.WriteFile(filepath.Join(seed, "index.html"), []byte("demo\n"), 0600)
+ gitT(t, seed, "add", "-A")
+ gitT(t, seed, "commit", "-q", "-m", "demo")
+ gitT(t, seed, "push", "-q", f.path(repo), "equipo/tk1-demo")
+ before := gitT(t, f.path(repo), "for-each-ref", "--format=%(refname) %(objectname)")
+ if err := c.StartDefault(ctx, repo); err != nil {
+ t.Fatal(err)
+ }
+ if after := gitT(t, f.path(repo), "for-each-ref", "--format=%(refname) %(objectname)"); after != before {
+ t.Fatalf("refs changed: %q -> %q", before, after)
+ }
+}
+
+// create_project starts main as part of creating the repository; a
+// failed start is not recorded as created, so the resent call (the
+// repository exists by then) starts it.
+func TestCreateProjectStartsMain(t *testing.T) {
+ state, err := OpenState(context.Background(), t.TempDir())
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer state.Close()
+ f, c := startRig(t)
+ f.failPush = true
+ b := &bridge{State: state, Forge: f, Clones: c, speaks: wire.ProtocolCurrent, trip: func(_ context.Context, call wire.ToolCall) wire.ToolResult {
+ var in struct{ Repo string }
+ _ = json.Unmarshal(call.Args, &in)
+ if call.Name == wire.ToolCreateProject {
+ return wire.ToolResult{Code: "create", Repo: in.Repo}
+ }
+ return wire.ToolResult{Code: "created", Repo: in.Repo, Text: "Created."}
+ }}
+ args := json.RawMessage(`{"namespace":"oficina","name":"site"}`)
+ if _, isErr := b.Call(context.Background(), "p", "t1", 1, wire.ToolCreateProject, "toolu_1", args); !isErr {
+ t.Fatal("a repository without main was reported created")
+ }
+ remote := f.path("amadan.net/oficina/site")
+ os.Chmod(filepath.Join(remote, "objects"), 0700)
+ if text, isErr := b.Call(context.Background(), "p", "t1", 1, wire.ToolCreateProject, "toolu_1", args); isErr {
+ t.Fatalf("resent create: %s", text)
+ }
+ if f.creates != 1 {
+ t.Fatalf("created %d times", f.creates)
+ }
+ if refs := gitT(t, remote, "for-each-ref", "--format=%(refname)"); strings.TrimSpace(refs) != "refs/heads/main" {
+ t.Fatalf("refs after create: %q", refs)
+ }
+}
+
+// Only a repository this bridge created is started. One that already
+// existed, empty or holding only tags, is adopted exactly as it is.
+func TestCreateProjectAdoptsExistingRepositoriesAsTheyAre(t *testing.T) {
+ state, err := OpenState(context.Background(), t.TempDir())
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer state.Close()
+ f, c := startRig(t)
+ b := &bridge{State: state, Forge: f, Clones: c, speaks: wire.ProtocolCurrent, trip: func(_ context.Context, call wire.ToolCall) wire.ToolResult {
+ var in struct{ Repo string }
+ _ = json.Unmarshal(call.Args, &in)
+ if call.Name == wire.ToolCreateProject {
+ return wire.ToolResult{Code: "create", Repo: in.Repo}
+ }
+ return wire.ToolResult{Code: "created", Repo: in.Repo, Text: "Created."}
+ }}
+ ctx := context.Background()
+ for i, name := range []string{"empty", "tagged"} {
+ repo := "amadan.net/oficina/" + name
+ if err := f.Create(ctx, repo); err != nil { // someone else's, before the call
+ t.Fatal(err)
+ }
+ if name == "tagged" {
+ seed := filepath.Join(t.TempDir(), "seed")
+ gitT(t, filepath.Dir(seed), "init", "-q", seed)
+ gitT(t, seed, "commit", "-q", "--allow-empty", "-m", "tagged")
+ gitT(t, seed, "push", "-q", f.path(repo), "HEAD:refs/tags/v1")
+ }
+ before := gitT(t, f.path(repo), "for-each-ref", "--format=%(refname) %(objectname)")
+ call := "toolu_adopt" + string(rune('0'+i))
+ if text, isErr := b.Call(ctx, "p", "t3", 1, wire.ToolCreateProject, call, json.RawMessage(`{"namespace":"oficina","name":"`+name+`"}`)); isErr {
+ t.Fatalf("adopt %s: %s", name, text)
+ }
+ if after := gitT(t, f.path(repo), "for-each-ref", "--format=%(refname) %(objectname)"); after != before {
+ t.Fatalf("%s changed on adoption: %q -> %q", name, before, after)
+ }
+ }
+ if f.creates != 2 {
+ t.Fatalf("adoption created repositories: %d creates", f.creates)
+ }
+}
+
+// A repository holding only tags is not empty: StartDefault leaves it.
+func TestStartDefaultLeavesTagsAlone(t *testing.T) {
+ f, c := startRig(t)
+ const repo = "amadan.net/oficina/tags"
+ ctx := context.Background()
+ if err := f.Create(ctx, repo); err != nil {
+ t.Fatal(err)
+ }
+ seed := filepath.Join(t.TempDir(), "seed")
+ gitT(t, filepath.Dir(seed), "init", "-q", seed)
+ gitT(t, seed, "commit", "-q", "--allow-empty", "-m", "tagged")
+ gitT(t, seed, "push", "-q", f.path(repo), "HEAD:refs/tags/v1")
+ if err := c.StartDefault(ctx, repo); err != nil {
+ t.Fatal(err)
+ }
+ if refs := gitT(t, f.path(repo), "for-each-ref", "--format=%(refname)"); refs != "refs/tags/v1" {
+ t.Fatalf("refs: %q", refs)
+ }
+}
+
+// Another writer between the emptiness check and the push. A main of
+// theirs is never replaced and is the default. A branch of theirs that
+// does not start from main fails the start, every time it is retried;
+// main is withdrawn where the forge allows deleting it (git refuses to
+// delete the current branch, so both are tested).
+func TestStartDefaultConcurrentWriter(t *testing.T) {
+ for _, c := range []struct {
+ name, theirs string
+ deletable bool
+ }{{"their main", "main", false}, {"their branch", "trunk", false}, {"their branch, main withdrawn", "trunk", true}} {
+ t.Run(c.name, func(t *testing.T) {
+ f, clones := startRig(t)
+ const repo = "amadan.net/oficina/raced"
+ ctx := context.Background()
+ if err := f.Create(ctx, repo); err != nil {
+ t.Fatal(err)
+ }
+ if c.deletable {
+ gitT(t, f.path(repo), "config", "receive.denyDeleteCurrent", "false")
+ }
+ seed := filepath.Join(t.TempDir(), "seed")
+ gitT(t, filepath.Dir(seed), "init", "-q", "-b", c.theirs, seed)
+ os.WriteFile(filepath.Join(seed, "index.html"), []byte("theirs\n"), 0600)
+ gitT(t, seed, "add", "-A")
+ gitT(t, seed, "commit", "-q", "-m", "theirs")
+ tip := gitT(t, seed, "rev-parse", "HEAD")
+ old := startDefaultGap
+ t.Cleanup(func() { startDefaultGap = old })
+ startDefaultGap = func() { gitT(t, seed, "push", "-q", f.path(repo), c.theirs) }
+ err := clones.StartDefault(ctx, repo)
+ startDefaultGap = func() {}
+ again := clones.StartDefault(ctx, repo)
+ refs := gitT(t, f.path(repo), "for-each-ref", "--format=%(refname) %(objectname)")
+ theirs := "refs/heads/" + c.theirs + " " + tip
+ switch {
+ case c.theirs == "main":
+ if err != nil || again != nil || refs != theirs {
+ t.Fatalf("their main: %v / %v, refs %q", err, again, refs)
+ }
+ case c.deletable:
+ if err == nil || refs != theirs {
+ t.Fatalf("main left beside their branch: %v, refs %q", err, refs)
+ }
+ default:
+ if err == nil || again == nil || !strings.Contains(refs, theirs) {
+ t.Fatalf("a start beside their unrelated branch reported success: %v / %v, refs %q", err, again, refs)
+ }
+ }
+ })
+ }
+}
+
+// Create owns a repository only when the hub answered that it created
+// it. "Already exists", or an answer that never came while the
+// repository turns out to exist, is adopted and not this runner's.
+func TestFileForgeCreateOwnsOnlyWhatTheHubCreated(t *testing.T) {
+ for _, c := range []struct {
+ name string
+ before bool // the repository exists before the request
+ status int // the hub's answer to the create; 0 drops it
+ afterward bool // it exists when asked again
+ want error
+ }{
+ {"created", false, http.StatusOK, true, nil},
+ {"exists already", true, 0, true, ErrAdopted},
+ {"another writer won", false, http.StatusConflict, true, ErrAdopted},
+ {"answer lost", false, 0, true, ErrAdopted},
+ {"refused", false, http.StatusForbidden, false, ErrNoCreate},
+ } {
+ t.Run(c.name, func(t *testing.T) {
+ exists, posts := c.before, 0
+ f := accessForge(t, func(w http.ResponseWriter, r *http.Request) {
+ switch {
+ case r.Method == http.MethodGet && r.URL.Path == "/api/v1/repos":
+ repos := `{"ns":"oficina","name":"other"}`
+ if exists {
+ repos += `,{"ns":"oficina","name":"site"}`
+ }
+ w.Write([]byte(`{"repos":[` + repos + `]}`))
+ case r.Method == http.MethodPost && r.URL.Path == "/api/v1/repos":
+ posts++
+ exists = c.afterward
+ if c.status == 0 {
+ hj, _ := w.(http.Hijacker)
+ conn, _, _ := hj.Hijack()
+ conn.Close()
+ return
+ }
+ w.WriteHeader(c.status)
+ default:
+ w.WriteHeader(http.StatusNotFound)
+ }
+ })
+ err := f.Create(context.Background(), "amadan.net/oficina/site")
+ if !errors.Is(err, c.want) || c.want == nil && err != nil {
+ t.Fatalf("Create = %v, want %v", err, c.want)
+ }
+ if c.before && posts != 0 {
+ t.Fatal("asked the hub to create a repository that exists")
+ }
+ })
+ }
+}
+
+// Another writer creates the repository between Exists and Create:
+// create_project adopts it and never starts main in it, then or on retry.
+func TestCreateProjectNeverStartsARepositoryItDidNotMake(t *testing.T) {
+ state, err := OpenState(context.Background(), t.TempDir())
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer state.Close()
+ f, c := startRig(t)
+ lost := &adoptingForge{creatingForge: f}
+ b := &bridge{State: state, Forge: lost, Clones: c, speaks: wire.ProtocolCurrent, trip: func(_ context.Context, call wire.ToolCall) wire.ToolResult {
+ var in struct{ Repo string }
+ _ = json.Unmarshal(call.Args, &in)
+ if call.Name == wire.ToolCreateProject {
+ return wire.ToolResult{Code: "create", Repo: in.Repo}
+ }
+ return wire.ToolResult{Code: "created", Repo: in.Repo, Text: "Created."}
+ }}
+ args := json.RawMessage(`{"namespace":"oficina","name":"site"}`)
+ for range 2 {
+ if text, isErr := b.Call(context.Background(), "p", "t4", 1, wire.ToolCreateProject, "toolu_4", args); isErr {
+ t.Fatalf("adopt: %s", text)
+ }
+ if refs := gitT(t, f.path("amadan.net/oficina/site"), "for-each-ref"); refs != "" {
+ t.Fatalf("main started in someone else's repository: %q", refs)
+ }
+ }
+}
+
+// adoptingForge loses the race: the repository is made, by someone else.
+type adoptingForge struct{ *creatingForge }
+
+func (f *adoptingForge) Create(ctx context.Context, repo string) error {
+ if err := f.creatingForge.Create(ctx, repo); err != nil {
+ return err
+ }
+ return ErrAdopted
+}
+
+// An annotated tag on the start commit: ls-remote lists it peeled too
+// (refs/tags/v1^{}), and neither line is someone else's unrelated work.
+func TestStartDefaultAnnotatedTagOnMain(t *testing.T) {
+ f, c := startRig(t)
+ const repo = "amadan.net/oficina/tagged-main"
+ ctx := context.Background()
+ if err := f.Create(ctx, repo); err != nil {
+ t.Fatal(err)
+ }
+ if err := c.StartDefault(ctx, repo); err != nil {
+ t.Fatal(err)
+ }
+ main := gitT(t, f.path(repo), "rev-parse", "refs/heads/main")
+ gitT(t, f.path(repo), "tag", "-a", "-m", "first", "v1", main)
+ if err := c.StartDefault(ctx, repo); err != nil {
+ t.Fatalf("an annotated tag on main failed the start: %v", err)
+ }
+ if again := gitT(t, f.path(repo), "rev-parse", "refs/heads/main"); again != main {
+ t.Fatalf("main changed: %s -> %s", main, again)
+ }
+}
+
+// lsRefs keeps each ref once: HEAD and the peeled lines of annotated tags
+// (refs/tags/v1^{}) are not refs of their own.
+func TestLsRefsSkipsHeadAndPeeledTags(t *testing.T) {
+ a, b := strings.Repeat("a", 40), strings.Repeat("b", 40)
+ got := lsRefs(a + "\tHEAD\n" + a + "\trefs/heads/main\n" + b + "\trefs/tags/v1\n" + a + "\trefs/tags/v1^{}\n")
+ if len(got) != 2 || got["refs/heads/main"] != a || got["refs/tags/v1"] != b {
+ t.Fatalf("lsRefs = %v", got)
+ }
+}
diff --git a/internal/runner/thin/state.go b/internal/runner/thin/state.go
index 304b6de2..e215ddc2 100644
--- a/internal/runner/thin/state.go
+++ b/internal/runner/thin/state.go
@@ -303,7 +303,9 @@ type run struct {
}
// creation is how far a create_project call got: "" (not started),
-// "created" (the repository exists) or "done" (the instance has it).
+// "made" (the hub answered that this call created it, so it is ours to
+// start), "created" (the repository exists, started) or "done" (the
+// instance has it).
func (s *State) creation(ctx context.Context, callID, repo string) (string, error) {
var state, got string
err := s.db.QueryRowContext(ctx, "SELECT repo, state FROM creations WHERE call_id=?", callID).Scan(&got, &state)
diff --git a/scripts/staging-thin.py b/scripts/staging-thin.py
index 89d32152..b5b03b69 100755
--- a/scripts/staging-thin.py
+++ b/scripts/staging-thin.py
@@ -585,7 +585,11 @@ def suite_run(only, run_id, token):
# real bug in a repository the agent reaches; the step pushes
# its own branch and nothing merges.
EQUIPO_STAGING_WITNESS=os.environ.get('EQUIPO_STAGING_WITNESS', 'Bug in oficina/equipo: README.md never links to the API reference, so device developers cannot find it. Add one line to the README pointing to docs/api/equipo-v1.md. Change only README.md.'),
- EQUIPO_STAGING_CRASH_WITNESS=os.environ.get('EQUIPO_STAGING_CRASH_WITNESS', ''),
+ # The step crash and the step cancel each ask for their own
+ # small, true change, so no two of a run's tasks read alike
+ # (similar tasks are combined). The cancelled one never pushes.
+ EQUIPO_STAGING_CRASH_WITNESS=os.environ.get('EQUIPO_STAGING_CRASH_WITNESS', 'Bug in oficina/equipo: docs/plan-3-acceptance.md has no title; its first line is the copy marker. Add the line "# Plan 3 acceptance" above that marker and keep the marker as it is. Change only docs/plan-3-acceptance.md.'),
+ EQUIPO_STAGING_CANCEL_WITNESS=os.environ.get('EQUIPO_STAGING_CANCEL_WITNESS', 'Bug in oficina/equipo: docs/mac-runner.md has no list of its sections, so a person cannot see the steps and the troubleshooting at a glance. Add a short list of its three section headings after the opening paragraphs. Change only docs/mac-runner.md.'),
# Slice 4: tasks already pushed that the upgrade judges (no
# new message), and what the person says in the live review
# and checks scenario.