oficina / equipo Public

coordinator: see tool health, retry stuck steps, offer a merge retry

Paul, 2026-11-25: empower Equipo to finish stuck work (task
tkbstr6cjl7h). The status tool reports the runner's preview scanner
health. retry_step re-runs a failed preview, checks or review with the
person's Retry checks, never merge, publish or Engineering, audited on
the timeline. offer_retry reuses the merge card so only the person's
tap merges. A failed preview can be retried behind a queued merge,
rebuilt from the approved commit and rescanned. Each coordinator action
runs at most once per task per turn. Protocol 30.

Astra: READY AFTER FIXES, APPROVED round 2. Copy approved by Paul
(2026-11-25, unchanged).

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

Squashed from coordinator-stuck-tasks into main.
claude agent, operated by paul@keymail.dev 2950f60466503566be2752c34154bf881a5b2411 parent f8c54d5
42 files changed, +1,278 −53
  • .rastrillo/budgets.txt +6 −6
  • docs/api/equipo-v1.openapi.json +22 −0
  • docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md +4 −0
  • internal/equipo/chat/handoff.go +1 −1
  • internal/equipo/chat/stuck.go +213 −0
  • internal/equipo/chat/tasks.go +87 −17
  • internal/equipo/chat/tools.go +26 −4
  • internal/equipo/copy.go +4 −0
  • internal/equipo/migrations/0107_coordinator_attempt.sql +3 −0
  • internal/equipo/migrations/schema.sql +1 −0
  • internal/equipo/templates/work_task.html +1 −0
  • internal/equipo/work_pages.go +6 −2
  • internal/equipo/work_views.go +26 −0
  • internal/plan3test/plan3_release_test.go +3 −1
  • internal/runner/provider/actions.go +1 −1
  • internal/runner/provider/claude/launcher.go +1 −1
  • internal/runner/thin/bridge.go +3 −0
  • internal/runner/thin/capabilities.go +3 −0
  • internal/runner/thin/claude.go +2 −2
  • internal/runner/thin/link.go +8 −2
  • internal/runner/thin/mcp.go +3 −1
  • internal/runner/thin/preview_security.go +18 −0
  • internal/runner/thin/stuck.go +20 −0
  • internal/runner/thin/stuck_test.go +89 −0
  • internal/runner/thin/tool_health_test.go +92 −0
  • internal/thintest/stuck_contract_test.go +422 −0
  • internal/wire/assistant_test.go +1 −1
  • internal/wire/frames.go +6 −2
  • internal/wire/injection_test.go +2 −2
  • internal/wire/mixed_protocol_test.go +1 −1
  • internal/wire/models_test.go +1 −1
  • internal/wire/opencode_test.go +1 −1
  • internal/wire/pinned_release_test.go +1 −1
  • internal/wire/publish_test.go +1 −1
  • internal/wire/runners.go +20 −1
  • internal/wire/runners_test.go +1 −1
  • internal/wire/schedule_test.go +1 −1
  • internal/wire/stuck.go +88 −0
  • internal/wire/stuck_test.go +84 −0
  • internal/wire/tasks.go +3 −0
  • internal/wire/usage_test.go +1 −1
  • internal/wire/warm_test.go +1 −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/main: Type  Size Avail | ext4   96G   86G
ci-box: disk /home/ci/.cache/equipo-ci-box: Type  Size Avail | ext4   96G   86G
ci-box: bwrap: fetched and verified in 0.3s
ci-box: claude: fetched and verified in 1.5s
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 10.0s
ci-box: pi: installed and verified in 7.5s
ci-box: opencode: installed and verified in 2.3s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 8.8s
ci-box: clone deepened in 3.9s
ci-box: file times set from content: 2996 files, 193 directories
ci-box: ready in 17.6s
=== copy ===
EQUIPO_RELEASE_COPY_CHECK=1 CGO_ENABLED=0 go test ./internal/equipotest -run '^TestReleaseCopyReviewed$' -count=1
ok  	amadan.net/oficina/equipo/internal/equipotest	0.148s
=== compile ===
go build ./...
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py compile
+ go build -tags testbuild ./...
  5.8s
+ go list -export -test -tags testbuild -f  ./...
  5.5s
+ go list -export -test -tags browser,testbuild -f  ./internal/equipo ./internal/headless ./internal/idtest ./internal/plan3test ./internal/thintest
  3.3s
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -version
staticcheck 2026.1 (v0.7.0)
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 -version
Go: go1.26.11
Scanner: govulncheck@v1.8.0
DB: https://vuln.go.dev
DB updated: 2026-11-24 15:56:00 +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 1m20.439s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m18.24s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m18.24s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 78.51, cpu waiting 44.74%, memory waiting 0.00%, io waiting 0.38%
--- 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 1m19.536s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m17.714s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m17.71s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 78.51, cpu waiting 44.46%, memory waiting 0.00%, io waiting 0.39%
--- 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 1m20.799s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m18.179s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m7.97s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 5.6s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 4.61s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 78.51, cpu waiting 44.74%, memory waiting 0.00%, io waiting 0.38%
--- shard 3 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-mac: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestMacWorker$|^TestHeadlessAttachments$|^TestHeadlessPrewarm$|^TestHeadless$/^1_first_token$|^TestHeadless$/^6_quick_messages$|^TestHeadless$/^8_instance_restart$|^TestHeadless$/^3_runner_offline$' ./internal/headless

receipt: test step 1m16.646s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m14.411s amadan.net/oficina/equipo/internal/headless
receipt: slow test 36.73s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 20.09s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.01s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
receipt: slow test 8.58s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
machine: 32 CPUs, load 76.12, cpu waiting 44.10%, memory waiting 0.00%, io waiting 0.40%
--- shard 4 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-guards: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadlessCopyRotation$|^TestHeadlessPolicyGuards$|^TestHeadlessRunnerKillLeavesNoCopies$|^TestHeadlessNewHouseRuleStartsFresh$|^TestHeadless$/^3_engineering$|^TestHeadless$/^3_step_cancel$|^TestHeadless$/^3_step_contained$|^TestHeadless$/^3_step_refused$|^TestHeadless$/^3_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless

receipt: test step 1m35.7s 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 1m33.881s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m4.46s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.35s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 8.34s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 7.09s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 4.63s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
machine: 32 CPUs, load 71.79, cpu waiting 42.76%, memory waiting 0.00%, io waiting 0.29%
--- shard 5 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-rest: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^TestHeadless$/^4c_rebase$|^TestHeadless$/^4b_ask$|^TestHeadless$/^4c_checks_card$|^TestHeadless$/^4_step_crash$|^TestHeadless$/^4_review$|^TestHeadless$/^2b_access$|^TestHeadless$/^runner_crash$|^TestHeadless$/^2b_first_message$|^TestHeadless$/^4_checks_honest$|^TestHeadless$/^7_stream_resume$|^TestHeadless$/^2b_notebook$|^TestHeadless$/^2b_move_in$|^TestHeadless$/^2b_desk_failure$|^TestHeadless$/^cancel$|^TestHeadlessConnections$|^TestHeadlessTokenPasteEndToEnd$|^TestHeadlessTokenConnection$|^TestMacWorker$|^TestHeadlessAttachments$|^TestHeadlessPrewarm$|^TestHeadless$/^1_first_token$|^TestHeadless$/^6_quick_messages$|^TestHeadless$/^8_instance_restart$|^TestHeadless$/^3_runner_offline$|^TestHeadlessCopyRotation$|^TestHeadlessPolicyGuards$|^TestHeadlessRunnerKillLeavesNoCopies$|^TestHeadlessNewHouseRuleStartsFresh$|^TestHeadless$/^3_engineering$|^TestHeadless$/^3_step_cancel$|^TestHeadless$/^3_step_contained$|^TestHeadless$/^3_step_refused$|^TestHeadless$/^3_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless

receipt: test step 2m46.613s 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 2m44.256s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m38.24s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistant
receipt: slow test 18.55s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 8.78s amadan.net/oficina/equipo/internal/headless TestHeadlessResearchHandoff
receipt: slow test 6.63s amadan.net/oficina/equipo/internal/headless TestHeadlessTurnBatching
receipt: slow test 6.57s amadan.net/oficina/equipo/internal/headless TestHeadlessBatchAfterRefusedReply
machine: 32 CPUs, load 28.90, cpu waiting 14.17%, memory waiting 0.00%, io waiting 0.08%
--- shard 6 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane thintest: ./internal/thintest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test([^C]|C[^o]|Co[^n]|Con[^t])|^TestContract(Assistant|Outcome|Team|Handoff|HostAllowlist|HostIsPerPerson|Look|Use[A-Z]|RemoteCall|LanesRunAtOnce|NoMergeQuestionWhenGateMerges|PreviewHeldUntilPublishAnswer|PreviewNotHeldBelow19|PublishNeedsOwnerAnswer)' ./internal/thintest

receipt: test step 2m9.952s 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 2m7.813s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 8.38s amadan.net/oficina/equipo/internal/thintest TestContractTeamJobSettledStates
receipt: slow test 6.83s amadan.net/oficina/equipo/internal/thintest TestExplorePreviewsOff
receipt: slow test 3.72s amadan.net/oficina/equipo/internal/thintest TestContractPreviewHeldUntilPublishAnswer
receipt: slow test 3.67s amadan.net/oficina/equipo/internal/thintest TestContractTeamNudgePersonNeeds
receipt: slow test 2.57s amadan.net/oficina/equipo/internal/thintest TestResearchDoneFallsBack
machine: 32 CPUs, load 49.43, cpu waiting 25.73%, memory waiting 0.00%, io waiting 0.16%
--- 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 1m39.014s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m36.635s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 9.09s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 5.29s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotOffered
receipt: slow test 4.55s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
receipt: slow test 2.41s amadan.net/oficina/equipo/internal/thintest TestContractRetryFailedPreviewAfterMerge
receipt: slow test 2.39s amadan.net/oficina/equipo/internal/thintest TestContractPreview
machine: 32 CPUs, load 71.79, cpu waiting 42.21%, memory waiting 0.00%, io waiting 0.28%
--- 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 4m50.21s, over the 45s its record on line 44 allows; reported only, timing fails on CI

receipt: test step 4m56.074s 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 4m50.21s amadan.net/oficina/equipo/internal/runner/thin
receipt: slow test 37.06s amadan.net/oficina/equipo/internal/runner/thin TestModelsEngineeringProbesThenRunsTheStrongest
receipt: slow test 37.01s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeAnsweredByAnotherModel
receipt: slow test 36.83s amadan.net/oficina/equipo/internal/runner/thin TestModelsUnhealthyRetriedOnDemand
receipt: slow test 18.49s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeRunsInsideTheAdmission
receipt: slow test 7.02s amadan.net/oficina/equipo/internal/runner/thin TestOpenCodeStepsRealOpenCode
machine: 32 CPUs, load 4.51, cpu waiting 1.67%, memory waiting 0.00%, io waiting 0.00%
--- shard 9 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-bug: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestDirectBugWorkflow$|^TestEnrolKeepsTheRole$' ./internal/runner

receipt: test step 51.825s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 50.906s amadan.net/oficina/equipo/internal/runner
receipt: slow test 30.87s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.02s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 65.91, cpu waiting 35.01%, memory waiting 0.00%, io waiting 0.63%
--- shard 10 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-plans: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestPlanWorkflowCandidateOrder$|^TestPlanWorkflowFeature$|^TestCoordinatorRecoveryCallRefusalKeepsServing$|^TestCoordinatorRefusalMatrix$' ./internal/runner

receipt: test step 1m3.741s 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.424s amadan.net/oficina/equipo/internal/runner
receipt: slow test 52.36s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 49.57s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.43s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.61s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 76.37, cpu waiting 42.67%, memory waiting 0.00%, io waiting 0.51%
--- shard 11 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-rest: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^TestDirectBugWorkflow$|^TestEnrolKeepsTheRole$|^TestPlanWorkflowCandidateOrder$|^TestPlanWorkflowFeature$|^TestCoordinatorRecoveryCallRefusalKeepsServing$|^TestCoordinatorRefusalMatrix$' ./internal/runner

receipt: test step 36.426s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 35.561s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.15s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.68s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.12s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 2.62s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 1.61s amadan.net/oficina/equipo/internal/runner TestReportPostsRetryExactRequest
machine: 32 CPUs, load 42.10, cpu waiting 23.85%, memory waiting 0.00%, io waiting 0.80%
--- shard 12 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-a started 30s late; cpu waiting 40.6%, load 31.83
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 1m10.16s 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 1m8.202s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 28.85s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 28.74s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 26.57s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 23.7s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
receipt: slow test 23.65s amadan.net/oficina/equipo/internal/equipotest TestAuthorityUsesLiveRoster
machine: 32 CPUs, load 68.37, cpu waiting 41.03%, memory waiting 0.00%, io waiting 0.27%
--- shard 13 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-e started 30s late; cpu waiting 40.6%, load 27.55
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 1m19.423s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m17.542s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 20.32s amadan.net/oficina/equipo/internal/equipotest TestProjectsReopen
receipt: slow test 20.31s amadan.net/oficina/equipo/internal/equipotest TestProjectConcurrentRetry
receipt: slow test 20.25s amadan.net/oficina/equipo/internal/equipotest TestProjectsFailuresRollBack
receipt: slow test 20.21s amadan.net/oficina/equipo/internal/equipotest TestProjectBindingUniqueness
receipt: slow test 20.21s amadan.net/oficina/equipo/internal/equipotest TestProjectWritesRequireCurrentOwner
machine: 32 CPUs, load 64.17, cpu waiting 36.34%, memory waiting 0.00%, io waiting 0.23%
--- shard 14 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-r started 30s late; cpu waiting 40.6%, load 31.83
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 1m17.089s 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.726s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 16.8s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 13.74s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 10.69s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 10.68s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 7.6s amadan.net/oficina/equipo/internal/equipotest TestRosterAuditFailureRollsBack
machine: 32 CPUs, load 64.17, cpu waiting 37.54%, memory waiting 0.00%, io waiting 0.24%
--- shard 15 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-rest started 30s late; cpu waiting 40.6%, load 31.83
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 1m10.245s 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 1m8.277s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 26.52s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 25.95s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 25.86s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 23.97s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsRollbackAndUnavailable
receipt: slow test 23.91s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsUpgrade
machine: 32 CPUs, load 68.37, cpu waiting 41.03%, memory waiting 0.00%, io waiting 0.27%
--- shard 16 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: plan3test started 30s late; cpu waiting 40.6%, load 27.55
test lane plan3test: ./internal/plan3test
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./internal/plan3test

receipt: test step 55.768s 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 53.768s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 3.77s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 3.52s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 1.79s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.68s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3A
receipt: slow test 1.35s amadan.net/oficina/equipo/internal/plan3test TestInviteMigration
machine: 32 CPUs, load 75.19, cpu waiting 43.63%, memory waiting 0.00%, io waiting 0.35%
--- shard 17 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: rest started 30s late; cpu waiting 40.6%, load 27.55
test lane rest: ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/door ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/pause ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/push ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/idtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/claude/realcli ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/forgekey ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/door ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/pause ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/push ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/idtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/claude/realcli ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/forgekey ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
cache miss: amadan.net/oficina/equipo/internal/chatmarkdown: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/copydesk: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/equipo/team: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/forge: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/webread: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/workspace: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runnerproto: its inputs changed
--- FAIL amadan.net/oficina/equipo/internal/runner/metered TestMeteredRaceAdmitsExactlyOne
=== RUN   TestMeteredRaceAdmitsExactlyOne
    meter_test.go:205: round 0: ran map[], held map[ask:busy review:busy]
--- FAIL: TestMeteredRaceAdmitsExactlyOne (0.01s)

--- FAIL amadan.net/oficina/equipo/internal/runner/metered (package output)
FAIL
rastrillo-budget/v1 ran 1.289s
FAIL	amadan.net/oficina/equipo/internal/runner/metered	1.312s

--- 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:302 Reason: File:s001.txt}
--- FAIL: TestTimeouts (0.65s)

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

budget note: internal/equipo took 58.531s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/equipo/chat took 20.005s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/equipo/setup took 11.631s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/idtest took 1m57.453s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/release took 23.057s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/runner/containment took 1m4.548s, over the 15s its record on line 40 allows; reported only, timing fails on CI
budget note: internal/runner/forge took 27.098s, over the 20s its record on line 35 allows; reported only, timing fails on CI
budget note: internal/runner/provider/claude/realcli took 14.229s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/runner/provider/pi took 1m26.009s, over the 1m0s its record on line 27 allows; reported only, timing fails on CI
budget note: internal/runner/workspace took 15.339s, over the 10s the default allows; reported only, timing fails on CI

receipt: test step 2m5.124s against a 60s target (the gate's other steps are not in this figure)
receipt: 35 packages ran, 29 cached, 17 without tests, 2 failed
receipt: slow package 1m57.453s amadan.net/oficina/equipo/internal/idtest
receipt: slow package 1m26.009s amadan.net/oficina/equipo/internal/runner/provider/pi
receipt: slow package 1m12.97s amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow package 1m4.548s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow package 59.793s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow test 48.33s amadan.net/oficina/equipo/internal/idtest TestDoorForgetsOficinaIDForARefusedSession
receipt: slow test 48.24s amadan.net/oficina/equipo/internal/idtest TestDoorNeverJudgesANativeSession
receipt: slow test 47.63s amadan.net/oficina/equipo/internal/idtest TestDoorOficinaSettingsUnreadableIsNoLoop
receipt: slow test 47.25s amadan.net/oficina/equipo/internal/idtest TestDoorStepUpIsLocal
receipt: slow test 32.23s amadan.net/oficina/equipo/internal/runner/containment TestEngineeringOfflineGo
rastrillo: budget test: go test failed
exit status 1
+ go test -tags testbuild -timeout 15m -v -run '^TestMeteredRaceAdmitsExactlyOne$' -count=1 ./internal/runner/metered   (retry, once)
##############################################################################
FLAKE ./internal/runner/metered:TestMeteredRaceAdmitsExactlyOne rest 2950f60466503566be2752c34154bf881a5b2411 0.01s 33.79
##############################################################################
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 2950f60466503566be2752c34154bf881a5b2411 0.65s 33.79
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 33.79, cpu waiting 16.73%, memory waiting 0.00%, io waiting 0.10%
--- shard 18 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-chat: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$' ./internal/headless

receipt: test step 1m25.957s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m24.089s amadan.net/oficina/equipo/internal/headless
receipt: slow test 39.26s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 14.95s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 10.65s amadan.net/oficina/equipo/internal/headless TestBrowserChat
receipt: slow test 7.25s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 6.43s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
machine: 32 CPUs, load 75.19, cpu waiting 43.11%, memory waiting 0.00%, io waiting 0.34%
--- shard 19 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-work: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$' ./internal/headless

receipt: test step 1m32.759s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m30.955s amadan.net/oficina/equipo/internal/headless
receipt: slow test 27.58s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 21.73s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 13.34s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 10.21s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
receipt: slow test 9.22s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
machine: 32 CPUs, load 75.17, cpu waiting 43.30%, memory waiting 0.00%, io waiting 0.31%
--- 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 1m54.757s 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 1m52.958s amadan.net/oficina/equipo/internal/headless
receipt: slow test 14.13s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 13.42s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 12.9s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 11.46s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
receipt: slow test 11.25s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsSignInEmail
machine: 32 CPUs, load 58.05, cpu waiting 31.97%, memory waiting 0.00%, io waiting 0.20%
--- 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|TestBrowserConnectionsSignInEmail|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' ./internal/headless
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserCopyContinue
=== RUN   TestBrowserCopyContinue
time=2026-11-25T21:44:45.760Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-25T21:44:45.760Z level=INFO msg="startup phase done" phase=state_lock took=250µs
time=2026-11-25T21:44:45.760Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-25T21:44:45.760Z level=INFO msg="startup phase done" phase=claim_roots took=108µs
time=2026-11-25T21:44:45.760Z level=INFO msg="startup phase" phase=sweep
time=2026-11-25T21:44:45.805Z level=INFO msg="startup phase done" phase=sweep took=45.287ms
time=2026-11-25T21:44:45.806Z level=INFO msg="startup phase" phase=credentials
time=2026-11-25T21:44:45.806Z level=INFO msg="startup phase done" phase=credentials took=199µs
time=2026-11-25T21:44:45.806Z level=INFO msg="startup phase" phase=open_state
time=2026-11-25T21:44:45.862Z level=INFO msg="startup phase done" phase=open_state took=56.371ms
time=2026-11-25T21:44:45.863Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-25T21:44:45.864Z level=INFO msg=connecting host=127.0.0.1:35435 protocol=30
time=2026-11-25T21:44:45.866Z level=INFO msg=connected host=127.0.0.1:35435 took=1.395ms
time=2026-11-25T21:44:45.869Z level=INFO msg="capabilities gathering"
time=2026-11-25T21:44:45.870Z level=INFO msg="capabilities gathered" took=642µs tags=linux,claude,go
time=2026-11-25T21:44:45.871Z level=INFO msg="hello sent" protocol=30
time=2026-11-25T21:44:45.879Z level=INFO msg=welcome protocol=30 role=primary generation=1
    browser_copy_test.go:90: waiting for !document.querySelector('[data-copy-continue]'): context deadline exceeded (last evaluation: context deadline exceeded)
--- FAIL: TestBrowserCopyContinue (6.48s)

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


receipt: test step 1m36.109s 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.446s amadan.net/oficina/equipo/internal/headless
receipt: slow test 14.94s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
receipt: slow test 11.94s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 10.78s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 9.5s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 7.42s amadan.net/oficina/equipo/internal/headless TestBrowserEmptyExplore
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|TestBrowserConnectionsSignInEmail|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' -v -run '^TestBrowserCopyContinue$' -count=1 ./internal/headless   (retry, once)
##############################################################################
FLAKE ./internal/headless:TestBrowserCopyContinue browser-headless-rest 2950f60466503566be2752c34154bf881a5b2411 6.48s 71.79
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 68.37, cpu waiting 41.03%, memory waiting 0.00%, io waiting 0.27%
--- shard 22 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-rest: ./internal/equipo
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserPreviewBlocksNavigation)$' ./internal/equipo

receipt: test step 2.149s 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 522ms amadan.net/oficina/equipo/internal/equipo
receipt: slow test 520ms amadan.net/oficina/equipo/internal/equipo TestBrowserPreviewBlocksNavigation
browser lane browser-rest: ./internal/idtest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserOficinaIDDoor|TestBrowserSmartDoor)$' ./internal/idtest
budget note: internal/idtest took 10.986s, over the 10s the default allows; reported only, timing fails on CI

receipt: test step 12.33s 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 10.986s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 8.67s amadan.net/oficina/equipo/internal/idtest TestBrowserSmartDoor
receipt: slow test 2.32s 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.741s 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.161s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 2.16s amadan.net/oficina/equipo/internal/plan3test TestTeamsHierarchyBrowser
browser lane browser-rest: ./internal/thintest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAccessEmojiByline|TestBrowserAccessFinalOutcomes|TestBrowserAccessRequest|TestBrowserAccessReview|TestBrowserActivitySubjects|TestBrowserAutonomySettings|TestBrowserCoordinatorQueue|TestBrowserEmptyConversation|TestBrowserEndedNoteStaysGone|TestBrowserHousekeeping|TestBrowserInnerGallery|TestBrowserInnerScreens|TestBrowserInstantThinking|TestBrowserInstantThinkingQueued|TestBrowserMachines|TestBrowserPausedWork|TestBrowserPhoneIndex|TestBrowserPlacementQuestionAndPending|TestBrowserProjectPlacement|TestBrowserProjectsList|TestBrowserReportActionFeedback|TestBrowserReportNextSteps|TestBrowserReportThread|TestBrowserRhythm|TestBrowserRollup|TestBrowserRosterAlignment|TestBrowserRosterDecisionStates|TestBrowserRosterQuietDay|TestBrowserRosterReports|TestBrowserRosterSetAside|TestBrowserRosterSubchat|TestBrowserRosterThinking|TestBrowserRosterVisual|TestBrowserSettingsHousekeepingGroups|TestBrowserSettingsMenu|TestBrowserSettingsRail|TestBrowserSettingsSaveBar|TestBrowserSettingsShots|TestBrowserSettingsStayOnPage|TestBrowserSettingsTeams|TestBrowserShipsButtons|TestBrowserSpecialistRows|TestBrowserSpendFollowsAnswers|TestBrowserTaskRows|TestBrowserTeamPanel|TestBrowserThinkingCycles|TestBrowserThinkingLinesClear|TestBrowserThinkingSteady|TestBrowserThinkingWords|TestBrowserTokenRowEmail|TestBrowserTrackPulse|TestBrowserTrackStarCentre|TestBrowserTryAgain)$' ./internal/thintest

receipt: test step 3m41.608s 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 3m39.97s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 24.55s amadan.net/oficina/equipo/internal/thintest TestBrowserAccessRequest
receipt: slow test 14.44s amadan.net/oficina/equipo/internal/thintest TestBrowserSettingsTeams
receipt: slow test 12.02s amadan.net/oficina/equipo/internal/thintest TestBrowserThinkingCycles
receipt: slow test 10.77s amadan.net/oficina/equipo/internal/thintest TestBrowserPlacementQuestionAndPending
receipt: slow test 9.1s amadan.net/oficina/equipo/internal/thintest TestBrowserRhythm
machine: 32 CPUs, load 9.18, cpu waiting 4.13%, memory waiting 0.00%, io waiting 0.02%
--- shard 23 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
shard 23: make test-quarantine
python3 scripts/ci-test.py quarantine
quarantine: 12 tests from scripts/ci-quarantine.txt; a failure is retried once, and a pass on the retry is reported as a flake
+ go test -tags testbuild -timeout 15m -v -run '^TestHeadlessConnections$/^A5_cancel_and_sign_out$|^TestHeadlessConnections$/^C4_claude_sign_in$|^TestHeadlessConnections$/^C5_engineering_failover$|^TestHeadlessConnections$/^C5_engineering_to_codex$|^TestHeadlessConnections$/^C5_engineering_waits$' ./internal/headless   (54s)
ok ./internal/headless TestHeadlessConnections/A5_cancel_and_sign_out 4.80s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.15s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 9.75s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 8.71s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 27.16s
+ 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   (58s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 13.11s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 11.78s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 10.28s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 20.03s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless   (22s)
ok ./internal/headless TestMixedVersions 18.94s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks   (2s)
ok ./internal/runner/checks TestCheckSandboxDeniedPathsTampering 0.82s
+ go test -tags testbuild -timeout 15m -v -run '^TestRunnerCancelAndSupersede$' ./internal/runner/thin   (2s)
ok ./internal/runner/thin TestRunnerCancelAndSupersede 0.05s
quarantine: 0 flaked (passed on the retry), 0 failed
machine: 32 CPUs, load 70.48, cpu waiting 40.97%, memory waiting 0.00%, io waiting 0.55%
--- shard 24 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
shard 24: make runner-host
python3 scripts/runner-prerequisites.py
CGO_ENABLED=0 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks

receipt: test step 14.748s against a 60s target (the gate's other steps are not in this figure)
receipt: 4 packages ran, 0 cached, 4 without tests, 0 failed
receipt: slow package 8.367s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 174ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 80ms amadan.net/oficina/equipo/internal/runner/provider/codex
receipt: slow package 3ms amadan.net/oficina/equipo/internal/runner/provider/claude/realcli
receipt: slow package 2ms amadan.net/oficina/equipo/internal/runner/provider
receipt: slow test 6.05s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.76s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 410ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 170ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 120ms 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 4.266s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 3.108s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 300ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 190ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof
receipt: slow test 130ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicy
receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceExitStatus
machine: 32 CPUs, load 25.42, cpu waiting 12.79%, memory waiting 0.00%, io waiting 1.08%
--- shard 25 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: runner-dead-references started 30s late; cpu waiting 40.6%, load 31.83
shard 25: make runner-dead-references lanes-check build vet fmt-check spacing budget migration-check
python3 scripts/runner-dead-references.py
reference scan: 2709 text files, 3228 matches, 0 failures
python3 scripts/ci-test.py check
lanes: 18 lanes and 5 browser lanes run every test once; 20-check@29
CGO_ENABLED=0 go build ./...
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o /dev/null ./cmd/equipo-runner
go vet ./...
go vet -tags testbuild ./internal/runner/thin ./internal/headless
GOOS=darwin GOARCH=arm64 go vet ./cmd/equipo-runner/... ./internal/runner/... ./internal/wire/... ./internal/release/...
go tool fiesta spacing -skip tokens.css internal/equipo/static
go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget size
budget size: 92 directories within budget
CGO_ENABLED=0 go test ./internal/equipo -run '^TestMigrationModels$' -count=1
ok  	amadan.net/oficina/equipo/internal/equipo	2.447s
machine: 32 CPUs, load 78.51, cpu waiting 44.74%, memory waiting 0.00%, io waiting 0.38%
--- shard 26 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: staticcheck started 30s late; cpu waiting 40.6%, load 27.55
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 76.37, cpu waiting 42.05%, memory waiting 0.00%, io waiting 0.53%
--- shard 27 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: govulncheck started 30s late; cpu waiting 40.6%, load 31.83
shard 27: make govulncheck
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 ./...
=== Symbol Results ===

No vulnerabilities found.

Your code is affected by 0 vulnerabilities.
This scan also found 0 vulnerabilities in packages you import and 3
vulnerabilities in modules you require, but your code doesn't appear to call
these vulnerabilities.
Use '-show verbose' for more details.
machine: 32 CPUs, load 42.10, cpu waiting 25.62%, memory waiting 0.00%, io waiting 0.77%
--- shard 28 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: gitleaks started 30s late; cpu waiting 40.6%, load 31.83
shard 28: make gitleaks
9:44PM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
9:45PM INF 1153 commits scanned.
9:45PM INF scanned ~65886383 bytes (65.89 MB) in 28.5s
9:45PM INF no leaks found
machine: 32 CPUs, load 70.48, cpu waiting 40.97%, memory waiting 0.00%, io waiting 0.55%
=== 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.057ms, worst 1.188ms, budget 150ms
perf: GET /api/runner/protocol: median 82µs, worst 106µs, budget 150ms
perf: GET /api/v1/account-setups/{id}: median 597µs, worst 649µs, budget 150ms
perf: GET /api/v1/accounts: median 410µs, worst 451µs, budget 150ms
perf: GET /api/v1/auth/devices: median 447µs, worst 512µs, budget 150ms
perf: GET /api/v1/budgets: median 505µs, worst 544µs, budget 150ms
perf: GET /api/v1/capabilities: median 263µs, worst 283µs, budget 150ms
perf: GET /api/v1/cards/{id}: median 1.196ms, worst 1.297ms, budget 150ms
perf: GET /api/v1/connections: median 637µs, worst 666µs, budget 150ms
perf: GET /api/v1/connections/{id}: median 604µs, worst 676µs, budget 150ms
perf: GET /api/v1/conversation: median 983µs, worst 1.05ms, budget 150ms
perf: GET /api/v1/conversation/cards: median 1.647ms, worst 1.69ms, budget 150ms
perf: GET /api/v1/coordinator: median 1.951ms, worst 2.081ms, budget 150ms
perf: GET /api/v1/invites/{id}: median 485µs, worst 502µs, budget 150ms
perf: GET /api/v1/journey: median 8.156ms, worst 8.337ms, budget 150ms
perf: GET /api/v1/me: median 464µs, worst 509µs, budget 150ms
perf: GET /api/v1/me/settings: median 554µs, worst 574µs, budget 150ms
perf: GET /api/v1/needs-you: median 8.06ms, worst 11.596ms, budget 150ms
perf: GET /api/v1/notifications: median 1.827ms, worst 1.985ms, budget 150ms
perf: GET /api/v1/onboarding: median 433µs, worst 441µs, budget 150ms
perf: GET /api/v1/people: median 449µs, worst 504µs, budget 150ms
perf: GET /api/v1/playbooks: median 612µs, worst 681µs, budget 150ms
perf: GET /api/v1/playbooks/{id}: median 534µs, worst 594µs, budget 150ms
perf: GET /api/v1/playbooks/{id}/template-diff: median 854µs, worst 881µs, budget 150ms
perf: GET /api/v1/preferences: median 771µs, worst 890µs, budget 150ms
perf: GET /api/v1/projects/{id}: median 464µs, worst 510µs, budget 150ms
perf: GET /api/v1/projects/{id}/settings: median 748µs, worst 779µs, budget 150ms
perf: GET /api/v1/roster: median 565µs, worst 636µs, budget 150ms
perf: GET /api/v1/runners/{id}: median 451µs, worst 480µs, budget 150ms
perf: GET /api/v1/specialists: median 8.241ms, worst 8.363ms, budget 150ms
perf: GET /api/v1/specialists/{id}: median 8.05ms, worst 8.235ms, budget 150ms
perf: GET /api/v1/specialists/{id}/template-diff: median 844µs, worst 934µs, budget 150ms
perf: GET /api/v1/tasks/{id}/plan: median 1.13ms, worst 1.2ms, budget 150ms
perf: GET /api/v1/tasks/{id}/thread: median 749µs, worst 771µs, budget 150ms
perf: GET /api/v1/teams: median 450µs, worst 478µs, budget 150ms
perf: GET /api/v1/templates: median 595µs, worst 646µs, budget 150ms
perf: GET /api/v1/templates/{id}: median 448µs, worst 465µs, budget 150ms
perf: GET /auth/callback: median 71µs, worst 91µs, budget 150ms
perf: GET /auth/devices/{id}: median 3.841ms, worst 3.984ms, budget 150ms
perf: GET /auth/verify: median 82µs, worst 110µs, budget 150ms
perf: GET /connections: median 4.626ms, worst 4.765ms, budget 150ms
perf: GET /conversation: median 9.329ms, worst 9.809ms, budget 150ms
perf: GET /conversation/connections: median 252µs, worst 279µs, budget 150ms
perf: GET /conversation/notebook: median 250µs, worst 267µs, budget 150ms
perf: GET /conversation/settings: median 5.025ms, worst 5.23ms, budget 150ms
perf: GET /conversation/settings/autonomy: median 5.336ms, worst 7.503ms, budget 150ms
perf: GET /conversation/settings/connections: median 7.299ms, worst 7.593ms, budget 150ms
perf: GET /conversation/settings/connections/add: median 7.469ms, worst 7.7ms, budget 150ms
perf: GET /conversation/settings/copy: median 4.665ms, worst 4.828ms, budget 150ms
perf: GET /conversation/settings/housekeeping: median 4.717ms, worst 4.836ms, budget 150ms
perf: GET /conversation/settings/machines: median 5.174ms, worst 5.265ms, budget 150ms
perf: GET /conversation/settings/machines/add: median 5.138ms, worst 5.202ms, budget 150ms
perf: GET /conversation/settings/notebook: median 3.993ms, worst 4.091ms, budget 150ms
perf: GET /conversation/settings/thinking: median 4.816ms, worst 5.017ms, budget 150ms
perf: GET /housekeeping: median 4.477ms, worst 6.755ms, budget 150ms
perf: GET /invites/new: median 615µs, worst 644µs, budget 150ms
perf: GET /invites/{id}: median 710µs, worst 733µs, budget 150ms
perf: GET /jobs: median 4.033ms, worst 4.065ms, budget 150ms
perf: GET /jobs/{id}: median 5.336ms, worst 5.445ms, budget 150ms
perf: GET /journey: median 11.136ms, worst 11.355ms, budget 150ms
perf: GET /nav/rail: median 3.504ms, worst 3.641ms, budget 150ms
perf: GET /needs-you: median 10.776ms, worst 10.859ms, budget 150ms
perf: GET /onboarding: median 4.596ms, worst 4.745ms, budget 150ms
perf: GET /people: median 3.994ms, worst 4.148ms, budget 150ms
perf: GET /playbook-suggestions/{suggestion}: median 5.384ms, worst 8.301ms, budget 150ms
perf: GET /playbooks: median 4.86ms, worst 5.011ms, budget 150ms
perf: GET /playbooks/new: median 4.933ms, worst 5.006ms, budget 150ms
perf: GET /playbooks/{id}: median 5.217ms, worst 5.306ms, budget 150ms
perf: GET /playbooks/{id}/edit: median 5.217ms, worst 5.344ms, budget 150ms
perf: GET /playbooks/{id}/template-diff: median 4.424ms, worst 4.497ms, budget 150ms
perf: GET /preferences: median 4.954ms, worst 5.027ms, budget 150ms
perf: GET /preferences/sources/{source}: median 4.83ms, worst 4.923ms, budget 150ms
perf: GET /projects: median 6.377ms, worst 6.41ms, budget 150ms
perf: GET /projects/accounts: median 4.289ms, worst 4.394ms, budget 150ms
perf: GET /projects/new: median 4.368ms, worst 4.405ms, budget 150ms
perf: GET /projects/{id}: median 13.014ms, worst 14.451ms, budget 150ms
perf: GET /projects/{id}/edit: median 4.508ms, worst 4.606ms, budget 150ms
perf: GET /runners/enrol: median 5.234ms, worst 5.366ms, budget 150ms
perf: GET /settings: median 4.16ms, worst 4.286ms, budget 150ms
perf: GET /settings/coordinator: median 6.279ms, worst 6.434ms, budget 150ms
perf: GET /settings/devices: median 3.874ms, worst 4.08ms, budget 150ms
perf: GET /settings/recovery: median 4.149ms, worst 4.246ms, budget 150ms
perf: GET /settings/recovery/release: median 4.068ms, worst 4.146ms, budget 150ms
perf: GET /settings/thinking: median 257µs, worst 290µs, budget 150ms
perf: GET /signed-out: median 257µs, worst 277µs, budget 150ms
perf: GET /signin: median 288µs, worst 329µs, budget 150ms
perf: GET /specialists/new: median 4.046ms, worst 4.119ms, budget 150ms
perf: GET /specialists/{key}: median 11.902ms, worst 15.126ms, budget 150ms
perf: GET /specialists/{key}/edit: median 4.313ms, worst 4.445ms, budget 150ms
perf: GET /specialists/{key}/template-diff: median 4.371ms, worst 4.415ms, budget 150ms
perf: GET /tasks: median 6.418ms, worst 6.748ms, budget 150ms
perf: GET /tasks/new: median 3.85ms, worst 4.021ms, budget 150ms
perf: GET /tasks/{id}: median 6.211ms, worst 6.448ms, budget 150ms
perf: GET /tasks/{id}/merge: median 5.537ms, worst 5.586ms, budget 150ms
perf: GET /tasks/{id}/move: median 5.355ms, worst 5.504ms, budget 150ms
perf: GET /tasks/{id}/plan: median 6.389ms, worst 6.514ms, budget 150ms
perf: GET /tasks/{id}/preview: median 1.63ms, worst 1.712ms, budget 150ms
perf: GET /tasks/{id}/questions/{question}: median 6.115ms, worst 9.602ms, budget 150ms
perf: GET /tasks/{id}/rendered-change: median 5.475ms, worst 5.653ms, budget 150ms
perf: GET /tasks/{id}/rendered-change/{hash}.png: median 4.961ms, worst 5.048ms, budget 150ms
perf: GET /tasks/{id}/thread: median 8.796ms, worst 9.092ms, budget 150ms
perf: GET /team/{specialist}: median 4.992ms, worst 5.204ms, budget 150ms
perf: GET /teams: median 10.616ms, worst 10.803ms, budget 150ms
perf: GET /templates: median 3.973ms, worst 4.074ms, budget 150ms
perf: GET /usage: median 4.896ms, worst 4.964ms, budget 150ms
perf: GET /work: median 3.643ms, worst 3.714ms, budget 150ms
perf: GET /auth/devices/{id}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /connections: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/autonomy: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/connections: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/connections/add: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/copy: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/housekeeping: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/machines: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/machines/add: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/notebook: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/thinking: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /housekeeping: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /invites/new: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /invites/{id}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /jobs: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /jobs/{id}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /journey: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /nav/rail: 0 bytes of framework CSS and JS, gzipped; 16000-byte budget
perf: GET /needs-you: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /onboarding: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /people: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /playbook-suggestions/{suggestion}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /playbooks: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /playbooks/new: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /playbooks/{id}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /playbooks/{id}/edit: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /playbooks/{id}/template-diff: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /preferences: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /preferences/sources/{source}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /projects: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /projects/accounts: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /projects/new: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /projects/{id}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /projects/{id}/edit: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /runners/enrol: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /settings: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /settings/coordinator: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /settings/devices: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /settings/recovery: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /settings/recovery/release: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /signed-out: 30270 bytes of framework CSS and JS, gzipped; 40000-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /specialists/new: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /specialists/{key}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /specialists/{key}/edit: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /specialists/{key}/template-diff: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/new: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/merge: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/move: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/plan: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/preview: 25954 bytes of framework CSS and JS, gzipped; 40000-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/questions/{question}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/rendered-change: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/thread: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /team/{specialist}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /teams: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /templates: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /usage: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /work: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: cold boot: median 163ms of [160.698648ms 163.002037ms 164.331255ms], budget 500ms

receipt: test step 54.357s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 88 without tests, 0 failed
receipt: slow package 10.697s amadan.net/oficina/equipo/internal/equipotest
receipt: slow package 0s amadan.net/oficina/equipo/cmd/equipo
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 test 10.15s amadan.net/oficina/equipo/internal/equipotest TestPerfScreens
receipt: slow test 550ms amadan.net/oficina/equipo/internal/equipotest TestPerfBoot
=== cache ===
ci-box: build cache /home/ci/work/repos/oficina__equipo/cache/go-build: 4.22 GiB in 28220 files
ci-box: module cache /home/ci/work/repos/oficina__equipo/cache/go-mod: 1.15 GiB in 40997 files
ci-box: build cache over 4.0 GiB: dropped 1.58 GiB this job did not read, kept 2.64 GiB

landed from coordinator-stuck-tasks

diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt
index 48456cfa..8323a629 100644
--- a/.rastrillo/budgets.txt
+++ b/.rastrillo/budgets.txt
@@ -14,8 +14,8 @@ perf GET /* skip Unknown private paths render 404; this fallback contains no scr
time internal/equipo/team 60s Plan 3 loaded CI measured 45.985s; niced serial reruns measured 18.079s and 22.031s. Keep migration, recovery, accounting and concurrency assertions; 60s leaves 30 percent headroom above loaded CI.
time internal/equipotest 300s Final fix package rerun measured 187.035s (review 172.4s); 300s gives 60 percent headroom for HTTP, sandbox, authority and final regression coverage.
-size internal/equipo 22564 - Paused work: the report card and task page lead, stop and Run now, in the person's zone (2026-11-24); measured 22564 source lines.
-size internal/wire 6946 - StepPaused, RunNowOffer, the paused job state, CarryOn, TimeZone and protocol 29's pinned release (2026-11-24); measured 6946 source lines.
+size internal/equipo 22598 - Stuck tasks: the task page Retry on a failed preview and the coordinator's retried attempt on the timeline (2026-11-25); measured 22598 source lines.
+size internal/wire 7060 - Protocol 30: the runner's tool health, offer_retry and retry_step, a step's retried_by (2026-11-25); measured 7060 source lines.
size internal/equipotest - 12017 Task 21 repairs historical migration and conversation fixtures after Plan 3, and the Rastrillo upgrade contract comparing served assets with what Assets serves; measured 0/12017 source/test lines.
time internal/runner/checks 90s CI worker measured 44.553s (44.6s rounded);
time internal/runner 330s Plan 3 CI repair measured 292.120s for the full package (controller CI 472.184s).
@@ -30,7 +30,7 @@ size internal/runner/provider 5731 - Fable follow-up: base and diagnostic gates,
time internal/plan3test 300s Initial cap for combined browser and runner acceptance; measure at both usable stops.
-size internal/plan3test - 11909 Luna-accepted paused-work strings and the Assistant routes in the release inventory and API contract (2026-11-24); measured 11909 test lines, source cap unchanged.
+size internal/plan3test - 11911 Paused-work strings, the Assistant routes and Paul's approved stuck-task strings in the release inventory and API contract (2026-11-25); measured 11911 test lines.
time internal/runner/forge 20s Plan 3 CI repair measured 10.527s for the full package (controller CI 10.407s).
time internal/runner/provider 15s Plan 3 CI repair measured 10.346s for the full package (controller CI 10.709s);
@@ -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 28478 22713 Forge review fixes, fileForge router coverage, authority and proposal regressions, and protocol 29's pinned release (2026-11-24); measured 28478/22713.
+size internal/runner/thin 28530 22894 Protocol 30: the preview scanner's health in the capability report, the stuck-task tools refused on an older link (2026-11-25); measured 28530/22894.
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).
@@ -56,7 +56,7 @@ perf GET /api/v1/tasks/{id} skip Thin v1 person API: bearer-only JSON for device
perf GET /api/v1/assistant/snapshot skip Assistant person API: bearer-only JSON for Base's chat, not a browser screen.
perf GET /api/v1/assistant/messages skip Assistant person API: bearer-only JSON for Base's chat, not a browser screen.
perf GET /api/v1/assistant/events skip Assistant event stream (Server-Sent Events), bearer-only and long-lived; not a screen.
-size internal/equipo/chat 34507 9500 Paused work: zone, Run now prediction, pinned release checked against the tap, paused job card, carry_on, per-card sweep (2026-11-24); measured 34507/9500.
+size internal/equipo/chat 34812 9500 Stuck tasks: offer_retry, retry_step, a failed preview run again behind a merge, the scanner health in status (2026-11-25); measured 34812/9500.
perf GET /api/v1/questions/{id} skip Thin v1 person API: bearer-only JSON for devices; the browser reads questions on /tasks/{id}.
perf GET /api/v1/steps/{id}/log skip Thin v1 person API: bearer-only JSON for devices; the browser shows the log tail on /tasks/{id}.
perf GET /api/v1/connections/preference skip Connections slice 1 person API: bearer-only JSON for devices; the browser shows the preference on /conversation/connections.
@@ -71,7 +71,7 @@ perf GET /tasks/{id}/files/{file} skip Research kept images: the bytes of one im
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 - 11437 Grant scenarios for a named repository (hub #48); the sign-in's account email at 1280 and 390; measured 11437 test lines.
-size internal/thintest - 34650 Paused work: the paused job contract, the paused card in the browser, housekeeping and day boxes on Madrid's clock (2026-11-24); measured 34650 test lines.
+size internal/thintest - 35072 Stuck tasks: offer_retry, retry_step, the preview retry behind a merge and the status tool health contracts (2026-11-25); measured 35072 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/docs/api/equipo-v1.openapi.json b/docs/api/equipo-v1.openapi.json
index ba9e4d2c..83cc183e 100644
--- a/docs/api/equipo-v1.openapi.json
+++ b/docs/api/equipo-v1.openapi.json
@@ -18802,6 +18802,9 @@
},
"sites": {
"type": "boolean"
+ },
+ "tools": {
+ "$ref": "#/components/schemas/ToolHealth"
}
},
"required": [
@@ -22328,6 +22331,9 @@
},
"publish": {
"$ref": "#/components/schemas/PublishResult"
+ },
+ "retried_by": {
+ "type": "string"
}
},
"required": [
@@ -24123,6 +24129,22 @@
"time_zone"
],
"additionalProperties": false
+ },
+ "ToolHealth": {
+ "type": "object",
+ "properties": {
+ "scanner": {
+ "type": "string"
+ },
+ "renderer": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "scanner"
+ ],
+ "additionalProperties": false,
+ "x-go-type": "wire.ToolHealth"
}
},
"responses": {
diff --git a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
index 2d0d402b..d6e36d8f 100644
--- a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
+++ b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
@@ -6904,6 +6904,10 @@ records remain unchanged.
| `api.already_running` | A request to run this work is already in progress. | A second Run now for the same hold (paused work review S2) | COPY ACCEPTED BY DELEGATION (Luna, 2026-11-24) |
| `api.offer_changed` | The option to run this work has changed. Check the current option, then try again. | A Run now tap whose offer changed since the page was drawn (paused work re-review R1) | COPY ACCEPTED BY DELEGATION (Luna, 2026-11-24) |
| `work.pause.run_now_may_bill` | This may use a plan that bills per use. | Under plain Run it now anyway, for an older runner, when a pay-per-use connection could take it (re-review R1) | COPY ACCEPTED BY DELEGATION (Luna, 2026-11-24) |
+| `chat.merge.retry_offer` | Merging %s didn’t go through. Try the merge again? | Copy specialist | Runtime; COPY APPROVED (Paul, 2026-11-25, copy-review 6haczxo74hoyyuf7xkojgqd27e, unchanged) |
+| `chat.activity.offer_retry` | Offering to try the merge again… | Copy specialist | Runtime; COPY APPROVED (Paul, 2026-11-25, copy-review 6haczxo74hoyyuf7xkojgqd27e, unchanged) |
+| `chat.activity.retry_step` | Trying it again… | Copy specialist | Runtime; COPY APPROVED (Paul, 2026-11-25, copy-review 6haczxo74hoyyuf7xkojgqd27e, unchanged) |
+| `work.tl.coordinator_retried` | The coordinator started %s again. | Copy specialist | Runtime; COPY APPROVED (Paul, 2026-11-25, copy-review 6haczxo74hoyyuf7xkojgqd27e, unchanged) |
## Task 21
diff --git a/internal/equipo/chat/handoff.go b/internal/equipo/chat/handoff.go
index 92b147c2..6e9a300d 100644
--- a/internal/equipo/chat/handoff.go
+++ b/internal/equipo/chat/handoff.go
@@ -482,7 +482,7 @@ func (t *txn) handoffOf(turnID, taskID string) (handoffRecord, bool, error) {
// workTools create, start or change work: once the person cancels a
// request (stopping or cancelled), its turns may run none of them.
-var workTools = []string{wire.ToolRecordTask, wire.ToolStartTask, wire.ToolAddFinding, wire.ToolAddReport, wire.ToolHoldMerge, wire.ToolSetMergePolicy, wire.ToolProposeSpecialist, wire.ToolResearch}
+var workTools = []string{wire.ToolRecordTask, wire.ToolStartTask, wire.ToolAddFinding, wire.ToolAddReport, wire.ToolHoldMerge, wire.ToolSetMergePolicy, wire.ToolProposeSpecialist, wire.ToolResearch, wire.ToolOfferRetry, wire.ToolRetryStep}
// handoffFenced: the turn belongs to a request the person cancelled and
// the tool would create or start work. Checked in the tool's own
diff --git a/internal/equipo/chat/stuck.go b/internal/equipo/chat/stuck.go
new file mode 100644
index 00000000..6742300b
--- /dev/null
+++ b/internal/equipo/chat/stuck.go
@@ -0,0 +1,213 @@
+package chat
+
+import (
+ "encoding/json"
+ "errors"
+ "fmt"
+ "slices"
+
+ "gorm.io/gorm"
+
+ "amadan.net/oficina/equipo/internal/equipo/mergegate"
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// Stuck tasks (coordinator powers, Paul 2026-11-25): what the coordinator
+// may do for a task that stopped. It never merges and never publishes: a
+// failed merge it can only put in front of the person (offer_retry), whose
+// tap merges through the person's own path.
+
+// What the model reads back; people never see these.
+const (
+ toolRetryOffered = "Offered: a card in the person's conversation asks whether to try the merge again. Only their tap merges, through Equipo's merge rules; you cannot. Tell them in one line, and never say it is merged."
+ toolNoFailedMerge = "Nothing to offer: this task has no merge that failed and ended. read_task shows where it stands."
+ toolAlreadyOffered = "The person already has a card to try the merge again. Wait for their tap; do not ask again."
+ toolRetryNotMergeable = "Not offered: the person's tap could not merge this task now (the branch moved, it is not approved, or Equipo's merge rules refuse it). Tell them what read_task shows."
+)
+
+// offerRetry is the coordinator's offer_retry: for a merge that failed and
+// ended, the merge card in the person's conversation asking whether to try
+// it again. Nothing is dispatched here. The card's Merge is answerMerge,
+// the person's own path (personMerge, the gate deciding for them then); it
+// is offered only when that tap could merge now, and once while it is open.
+func (t *txn) offerRetry(r turnRecord, args json.RawMessage) (wire.ToolResult, error) {
+ var in struct {
+ Task string `json:"task"`
+ }
+ if wire.Strict(args, &in) != nil {
+ return refused("invalid", toolBadInput), nil
+ }
+ k, res, err := t.ownTask(r.Person, in.Task)
+ if res != nil || err != nil {
+ return deref(res), err
+ }
+ if t.isOwner(r.Person) != nil {
+ return refused("not_owner", toolNotOwner), nil
+ }
+ steps, err := t.steps(k.ID)
+ if err != nil {
+ return wire.ToolResult{}, err
+ }
+ p := progressFor(k, steps)
+ if p.merge == nil || p.merge.State != wire.StepFailed || !p.merge.Terminated || p.eng == nil {
+ return refused("no_failed_merge", toolNoFailedMerge), nil
+ }
+ var open int64
+ if err := t.db.Model(&cardRecord{}).Where("task_id = ? AND kind = ? AND state = ?", k.ID, wire.CardMerge, wire.CardOpen).Count(&open).Error; err != nil {
+ return wire.ToolResult{}, err
+ }
+ if open > 0 {
+ return refused("already_offered", toolAlreadyOffered), nil
+ }
+ if ok, err := t.mergeOffered(k, p); err != nil || !ok {
+ return refused("not_mergeable", toolRetryNotMergeable), err
+ }
+ // What the gate would say to the person's tap now; only a decision,
+ // never recorded or acted on here.
+ online, protocol, err := t.primaryState(p.eng.Person)
+ if err != nil {
+ return wire.ToolResult{}, err
+ }
+ if !online {
+ protocol = 0
+ }
+ gate, _, err := t.mergeInputs(k, p, t.personDecides(k, k.Creator), protocol)
+ if err != nil {
+ return wire.ToolResult{}, err
+ }
+ if mergegate.Decide(gate).Class != mergegate.ClassAct {
+ return refused("not_mergeable", toolRetryNotMergeable), nil
+ }
+ now := t.now()
+ opts, _ := json.Marshal([]string{wire.ChoiceMerge, wire.ChoiceNotNow})
+ c := cardRecord{ID: newID("c_"), Person: k.Creator, Kind: wire.CardMerge, State: wire.CardOpen, TurnID: r.ID, ProjectID: k.ProjectID, TaskID: k.ID, Name: k.Title, Question: t.words("chat.merge.retry_offer", k.Title), Options: string(opts), Revision: 1, CreatedAt: now, UpdatedAt: now, Lane: r.Lane}
+ if err := t.db.Create(&c).Error; err != nil {
+ return wire.ToolResult{}, err
+ }
+ // The card asks about this candidate: answerMerge acts only on it.
+ if err := t.db.Model(&taskRecord{}).Where("id = ?", k.ID).Update("merge_asked", p.candidate).Error; err != nil {
+ return wire.ToolResult{}, err
+ }
+ if t.s.authority.Audit != nil {
+ if err := t.s.authority.Audit(t.db, "coordinator:"+r.Person, "task.merge_retry_offered", k.ID+"/"+p.merge.ID); err != nil {
+ return wire.ToolResult{}, err
+ }
+ }
+ if err := t.cardEvent(c); err != nil {
+ return wire.ToolResult{}, err
+ }
+ return wire.ToolResult{Code: "offered", Text: toolRetryOffered}, nil
+}
+
+// retryPreview runs a failed preview again as its next attempt, also when a
+// merge step came after it (the person's Retry on it, or retry_step): only
+// the task's newest preview, ended, of the candidate the task stands on
+// (approved, the branch at it), on a primary whose preview host the
+// project allows now. It is recomputed: the export is built and scanned
+// afresh and every publish is decided for that export (authorizePreview),
+// a public one only under the project's own setting. A preview is
+// ancillary, so the task's stage and its other steps are untouched.
+func (t *txn) retryPreview(k *taskRecord, st *stepRecord, person string, coordinator bool) (int64, error) {
+ if st.State != wire.StepFailed || !st.Terminated {
+ return 0, ErrNotRetryable
+ }
+ if st.Person != person {
+ return 0, ErrForbidden
+ }
+ steps, err := t.steps(k.ID)
+ if err != nil {
+ return 0, err
+ }
+ for _, s := range steps {
+ if s.Specialist == wire.SpecialistPreview && s.Idx > st.Idx {
+ return 0, ErrNotRetryable
+ }
+ }
+ p := progressFor(*k, steps)
+ if p.moved || p.candidate == "" || p.candidate != st.CandidateSHA || p.review == nil || p.review.State != wire.StepDone || p.review.Verdict != wire.VerdictApprove {
+ return 0, ErrNotRetryable
+ }
+ primary, err := t.s.authority.PrimaryRunner(t.db, st.Person)
+ if err != nil {
+ return 0, err
+ }
+ rs, err := t.runners(st.Person)
+ if err != nil {
+ return 0, err
+ }
+ allowed := false
+ for _, r := range rs {
+ if r.ID == primary && primary != "" {
+ reason, err := t.previewHostAuthority(k.ProjectID, r)
+ if err != nil {
+ return 0, err
+ }
+ allowed = reason == ""
+ }
+ }
+ if !allowed {
+ return 0, ErrNotRetryable
+ }
+ st.Attempt++
+ st.State, st.Reason, st.Terminated, st.Summary, st.LogTail, st.StartedAt, st.FinishedAt, st.Headline, st.Activity = wire.StepQueued, "", false, "", "", nil, nil, "", ""
+ // Recomputed: no export recorded until this attempt reports one.
+ st.Preview, st.Withdrawn, st.RefusedBy = "", false, ""
+ if coordinator {
+ st.CoordinatorAttempt = st.Attempt
+ }
+ if err := t.dispatchStep(k, st); err != nil {
+ return 0, err
+ }
+ return st.Attempt, t.saveStep(st, k)
+}
+
+// More of what the model reads back for retry_step.
+const (
+ toolRetryKinds = "retry_step runs again only a failed preview, checks or review (step: preview, checks or review). A merge is the person's: use offer_retry. Engineering's work is theirs to ask for."
+ toolRetryStarted = "Started again as attempt %d. Tell the person in one line; the task shows it."
+ toolStepNotRetried = "Not started: that step has not failed and ended, is not the task's newest (a preview may be behind a merge), or its candidate is no longer the one to judge. read_task shows where it stands."
+)
+
+// retryStepTool is the coordinator's retry_step: the person's Retry
+// (personRetry, its checks for the turn's person), for the task's newest
+// step of a kind in wire.RetryStepKinds, recorded as the coordinator's
+// (CoordinatorAttempt) and audited. It never runs a merge or a publish.
+func (t *txn) retryStepTool(r turnRecord, args json.RawMessage) (wire.ToolResult, error) {
+ var in struct {
+ Task string `json:"task"`
+ Step string `json:"step"`
+ }
+ if wire.Strict(args, &in) != nil {
+ return refused("invalid", toolBadInput), nil
+ }
+ if !slices.Contains(wire.RetryStepKinds, in.Step) {
+ return refused("invalid", toolRetryKinds), nil
+ }
+ k, res, err := t.ownTask(r.Person, in.Task)
+ if res != nil || err != nil {
+ return deref(res), err
+ }
+ var st stepRecord
+ if err := t.db.Where("task_id = ? AND specialist = ? AND coalesce(retired, 0) = 0", k.ID, in.Step).Order("idx DESC").First(&st).Error; errors.Is(err, gorm.ErrRecordNotFound) {
+ return refused("not_retryable", toolStepNotRetried), nil
+ } else if err != nil {
+ return wire.ToolResult{}, err
+ }
+ attempt, err := t.personRetry(r.Person, k.ID, st.ID, true)
+ switch {
+ case errors.Is(err, ErrNotRetryable):
+ return refused("not_retryable", toolStepNotRetried), nil
+ case errors.Is(err, ErrTaskEnded):
+ return refused("task_ended", toolTaskEnded), nil
+ case errors.Is(err, ErrForbidden):
+ return refused("not_yours", toolNotYours), nil
+ case err != nil:
+ return wire.ToolResult{}, err
+ }
+ if t.s.authority.Audit != nil {
+ if err := t.s.authority.Audit(t.db, "coordinator:"+r.Person, "task.retry", k.ID+"/"+st.ID+"/"+itoa64(attempt)); err != nil {
+ return wire.ToolResult{}, err
+ }
+ }
+ return wire.ToolResult{Code: "retrying", Text: fmt.Sprintf(toolRetryStarted, attempt)}, nil
+}
diff --git a/internal/equipo/chat/tasks.go b/internal/equipo/chat/tasks.go
index a9bd3b10..1c19fc41 100644
--- a/internal/equipo/chat/tasks.go
+++ b/internal/equipo/chat/tasks.go
@@ -278,6 +278,9 @@ type stepRecord struct {
// as low and never spends, wherever and whenever it is placed.
Hold string
HousekeepingAttempt int64
+ // CoordinatorAttempt is the attempt the coordinator's retry_step
+ // started (0: none), for the task's timeline (RetriedBy).
+ CoordinatorAttempt int64
// HeldAt is when the runner first held the step without a break (nil
// while it is not held): advice's "waited a week".
HeldAt *time.Time
@@ -463,7 +466,16 @@ func (t *txn) latestStep(taskID string) (stepRecord, bool, error) {
func stepView(s stepRecord) wire.Step {
return wire.Step{RunnerID: s.RunnerID, Needs: decodeList(s.Needs), Placement: s.Placement, Publication: s.Publication, TerminationKind: s.TerminationKind, ChecksSandbox: s.ChecksSandbox, ID: s.ID, Revision: s.Revision, TaskID: s.TaskID, Index: s.Idx, Specialist: s.Specialist, State: s.State, Reason: s.Reason, Attempt: s.Attempt, BaseSHA: s.BaseSHA, CandidateSHA: s.CandidateSHA, Pushed: s.Pushed, Terminated: s.Terminated, Summary: s.Summary, Headline: s.Headline, LogTail: s.LogTail, StartedAt: s.StartedAt, FinishedAt: s.FinishedAt,
Round: s.Round, Family: s.Family, Account: s.Account, Model: s.Model, Verdict: s.Verdict, ReviewLabel: s.ReviewLabel, Findings: decodeFindings(s.Findings), BaseChecks: s.BaseChecks, Checks: s.Checks, Gate: s.Gate, ExitCode: s.ExitCode, Askable: s.Askable,
- Rebase: s.Rebase, MergeSHA: s.MergeSHA, Into: s.MergeInto, Strategy: s.MergeStrategy, WithoutChecks: s.WithoutChecks, Activity: decodeActivity(s.Activity), Preview: decodePreview(s.Preview), Publish: decodePublish(s.Publish)}
+ Rebase: s.Rebase, MergeSHA: s.MergeSHA, Into: s.MergeInto, Strategy: s.MergeStrategy, WithoutChecks: s.WithoutChecks, Activity: decodeActivity(s.Activity), Preview: decodePreview(s.Preview), Publish: decodePublish(s.Publish), RetriedBy: retriedBy(s)}
+}
+
+// retriedBy says who started the step's current attempt, when it was the
+// coordinator (retry_step).
+func retriedBy(s stepRecord) string {
+ if s.CoordinatorAttempt != 0 && s.CoordinatorAttempt == s.Attempt {
+ return wire.RetriedByCoordinator
+ }
+ return ""
}
// stepViewSwitched adds the switched line, when the step moved, and the
@@ -747,7 +759,7 @@ func (t *txn) writeStep(s *stepRecord) error {
}
s.Revision++
s.UpdatedAt = t.now()
- if err := t.db.Model(&stepRecord{}).Where("id = ?", s.ID).Select("base_checks", "base_checks_sha", "copy_owner", "copy_revision", "copy_result", "failure_signature", "state", "reason", "attempt", "base_sha", "candidate_sha", "pushed", "terminated", "summary", "log_tail", "started_at", "finished_at", "revision", "updated_at", "headline", "family", "account", "verdict", "review_label", "findings", "checks", "gate", "exit_code", "output", "republish", "from_attempt", "askable", "rebase", "from_base", "from_candidate", "merge_sha", "merge_into", "merge_strategy", "without_checks", "switched", "activity", "runner_id", "needs", "placement", "waiting_since", "refused_by", "withdrawn", "termination_kind", "publication", "publication_id", "apple", "checks_sandbox", "change_facts", "decided_by", "merge_source", "merge_parents", "hosted_ci", "kind", "note", "sandbox_runner", "unsandboxed_by", "unsandboxed_at", "unsandboxed_attempt", "unsandboxed_runner", "has_preview", "preview", "boundary", "question", "request_turn", "sources_card", "sources_hash", "research_grant", "research_grant_revision", "hold", "housekeeping_attempt", "held_at", "publish", "model").Updates(s).Error; err != nil {
+ if err := t.db.Model(&stepRecord{}).Where("id = ?", s.ID).Select("base_checks", "base_checks_sha", "copy_owner", "copy_revision", "copy_result", "failure_signature", "state", "reason", "attempt", "base_sha", "candidate_sha", "pushed", "terminated", "summary", "log_tail", "started_at", "finished_at", "revision", "updated_at", "headline", "family", "account", "verdict", "review_label", "findings", "checks", "gate", "exit_code", "output", "republish", "from_attempt", "askable", "rebase", "from_base", "from_candidate", "merge_sha", "merge_into", "merge_strategy", "without_checks", "switched", "activity", "runner_id", "needs", "placement", "waiting_since", "refused_by", "withdrawn", "termination_kind", "publication", "publication_id", "apple", "checks_sandbox", "change_facts", "decided_by", "merge_source", "merge_parents", "hosted_ci", "kind", "note", "sandbox_runner", "unsandboxed_by", "unsandboxed_at", "unsandboxed_attempt", "unsandboxed_runner", "has_preview", "preview", "boundary", "question", "request_turn", "sources_card", "sources_hash", "research_grant", "research_grant_revision", "hold", "housekeeping_attempt", "coordinator_attempt", "held_at", "publish", "model").Updates(s).Error; err != nil {
return err
}
if s.Retired {
@@ -1932,39 +1944,90 @@ func (s *Store) CancelTask(ctx context.Context, person, id string) (attempt int6
// RetryTask is POST /tasks/{id}/retry: a new attempt of the last step,
// only once the runner confirmed termination of the current one.
func (s *Store) RetryTask(ctx context.Context, person, id string) (attempt int64, err error) {
+ return s.retryTask(ctx, person, id, "")
+}
+
+// RetryStep is the person's Retry of one step of a task (the task page's
+// Retry on a failed preview behind a newer step): the checks and the new
+// attempt RetryTask makes, for that step.
+func (s *Store) RetryStep(ctx context.Context, person, id, step string) (attempt int64, err error) {
+ if step == "" {
+ return 0, ErrInvalid
+ }
+ return s.retryTask(ctx, person, id, step)
+}
+
+func (s *Store) retryTask(ctx context.Context, person, id, step string) (attempt int64, err error) {
err = s.tx(ctx, func(t *txn) error {
if err := s.authority.CurrentPerson(ctx, t.db); err != nil {
return err
}
- if err := t.isOwner(person); err != nil {
- return err
- }
- k, err := t.loadTask(id)
- if err != nil {
- return err
- }
- // Only the task's creator retries it, onto their own runner.
- if k.Creator != person {
- return ErrForbidden
- }
- if wire.FinalStage(k.Stage) || k.CancelRequested {
- return ErrTaskEnded
- }
- attempt, err = t.retryStep(&k, person)
+ attempt, err = t.personRetry(person, id, step, false)
return err
})
return attempt, err
}
+// personRetry is the person's Retry of the task's step ("" for its newest
+// step): an owner, the task's creator, a task that has not ended. The
+// coordinator's retry_step makes exactly these checks for its person
+// (coordinator), on RetryStepKinds only.
+func (t *txn) personRetry(person, id, step string, coordinator bool) (int64, error) {
+ if err := t.isOwner(person); err != nil {
+ return 0, err
+ }
+ k, err := t.loadTask(id)
+ if err != nil {
+ return 0, err
+ }
+ // Only the task's creator retries it, onto their own runner.
+ if k.Creator != person {
+ return 0, ErrForbidden
+ }
+ if wire.FinalStage(k.Stage) || k.CancelRequested {
+ return 0, ErrTaskEnded
+ }
+ return t.retryStepOf(&k, person, step, coordinator)
+}
+
// retryStep runs the task's newest step again as its next attempt, once
// the runner confirmed termination of the current one: the person's Retry
// (RetryTask) and needs-you triage's automatic retry of a passing stop,
// under the housekeeping principal, which refuses a merge step.
func (t *txn) retryStep(k *taskRecord, person string) (attempt int64, err error) {
+ return t.retryStepOf(k, person, "", false)
+}
+
+// retryStepOf is retryStep for a named step: the newest step, or a failed
+// preview behind it (retryPreview). "" is the newest step. A preview, the
+// newest or not, runs again only as retryPreview says.
+//
+// coordinator is the coordinator's retry_step: the same checks, never on
+// a step outside wire.RetryStepKinds (a merge, a publish, the work), and
+// the attempt it starts is recorded as its own (CoordinatorAttempt).
+func (t *txn) retryStepOf(k *taskRecord, person, step string, coordinator bool) (attempt int64, err error) {
st, found, err := t.latestStep(k.ID)
if err != nil {
return 0, err
}
+ if step != "" {
+ var named stepRecord
+ if err := t.db.Where("id = ? AND task_id = ? AND coalesce(retired, 0) = 0", step, k.ID).First(&named).Error; errors.Is(err, gorm.ErrRecordNotFound) {
+ return 0, ErrNotRetryable
+ } else if err != nil {
+ return 0, err
+ }
+ if named.Specialist != wire.SpecialistPreview && (!found || named.ID != st.ID) {
+ return 0, ErrNotRetryable
+ }
+ st, found = named, true
+ }
+ if coordinator && (!found || !slices.Contains(wire.RetryStepKinds, st.Specialist)) {
+ return 0, ErrForbidden
+ }
+ if found && st.Specialist == wire.SpecialistPreview {
+ return t.retryPreview(k, &st, person, coordinator)
+ }
if found && st.Specialist == wire.SpecialistEngineering && st.State == wire.StepDone && st.Publication == wire.PublicationFailed {
// A worker's commit the primary could not push: publish the
// recorded commit again, without running Engineering.
@@ -2046,6 +2109,9 @@ func (t *txn) retryStep(k *taskRecord, person string) (attempt int64, err error)
st.MergeSHA, st.MergeInto, st.MergeStrategy, st.MergeSource, st.MergeParents = "", "", "", "", ""
}
st.Withdrawn, st.RefusedBy = false, ""
+ if coordinator {
+ st.CoordinatorAttempt = st.Attempt
+ }
// Run again under the task's kind as it is now.
st.Kind = wire.NormalKind(k.Kind)
if err := t.dispatchStep(k, &st); err != nil {
@@ -2185,6 +2251,10 @@ func (t *txn) runTaskTool(r turnRecord, v *wire.ToolCall) (wire.ToolResult, erro
return t.holdMerge(r, v.Args)
case wire.ToolSetMergePolicy:
return t.setMergePolicy(r, v.Args)
+ case wire.ToolOfferRetry:
+ return t.offerRetry(r, v.Args)
+ case wire.ToolRetryStep:
+ return t.retryStepTool(r, v.Args)
case wire.ToolAddFinding:
return t.addFinding(r, v.Args)
case wire.ToolStartTask:
diff --git a/internal/equipo/chat/tools.go b/internal/equipo/chat/tools.go
index 9e0b19e4..ac78940b 100644
--- a/internal/equipo/chat/tools.go
+++ b/internal/equipo/chat/tools.go
@@ -299,6 +299,7 @@ func (t *txn) mutationOp(person string, v *wire.ToolCall) (string, error) {
Project string `json:"project"`
Starred bool `json:"starred"`
Profile string `json:"profile"`
+ Step string `json:"step"`
}
_ = json.Unmarshal(v.Args, &a)
switch kind {
@@ -318,6 +319,10 @@ func (t *txn) mutationOp(person string, v *wire.ToolCall) (string, error) {
return kind + ":" + strings.TrimSpace(a.Profile), nil
case "research":
return kind + ":" + strings.TrimSpace(a.Task), nil
+ case "retry_offer":
+ return kind + ":" + strings.TrimSpace(a.Task), nil
+ case "task_retry":
+ return kind + ":" + strings.TrimSpace(a.Task) + ":" + strings.TrimSpace(a.Step), nil
}
return "", nil
}
@@ -438,10 +443,13 @@ func (t *txn) sameProject(projectID, repo string) bool {
// onceInAttempt: kinds the ledger also holds to once within an attempt
// (one open question card per turn; the home and a finding once per
-// target), since the tool alone would make them again.
+// target), since the tool alone would make them again. A retry (retry_step)
+// and a merge offer (offer_retry) too: once that attempt failed and ended,
+// or the person tapped Not now, the tool would start or offer again, so a
+// turn retries a task's step kind and offers a task's merge at most once.
func onceInAttempt(op string) bool {
kind, _, _ := strings.Cut(op, ":")
- return kind == "ask" || kind == "home" || kind == "finding" || kind == "star"
+ return kind == "ask" || kind == "home" || kind == "finding" || kind == "star" || kind == "task_retry" || kind == "retry_offer"
}
// madeTask is the task a record_task call recorded (or replayed).
@@ -471,6 +479,10 @@ var madeCodes = map[string][]string{
wire.ToolProposeSpecialist: {"proposed"},
// A refused request made nothing; only a recorded run is.
wire.ToolResearch: {"requested"},
+ // A refused offer made nothing; only a raised card is in the ledger.
+ wire.ToolOfferRetry: {"offered"},
+ // A refused retry started nothing.
+ wire.ToolRetryStep: {"retrying"},
}
func mutated(tool, code string) bool {
@@ -638,7 +650,7 @@ func (t *txn) runTool(l Lease, v *wire.ToolCall) (wire.ToolResult, error) {
return refused("invalid", toolBadInput), nil
}
return t.starProject(r, in.Project, *in.Starred)
- case wire.ToolRecordTask, wire.ToolAddFinding, wire.ToolStartTask, wire.ToolReadTask, wire.ToolCancelTask, wire.ToolAddReport, wire.ToolHoldMerge, wire.ToolSetMergePolicy:
+ case wire.ToolRecordTask, wire.ToolAddFinding, wire.ToolStartTask, wire.ToolReadTask, wire.ToolCancelTask, wire.ToolAddReport, wire.ToolHoldMerge, wire.ToolSetMergePolicy, wire.ToolOfferRetry, wire.ToolRetryStep:
return t.taskTool(r, v)
case wire.ToolProposeSpecialist:
return t.toolProposeSpecialist(l, r, v)
@@ -730,7 +742,7 @@ func (t *txn) status(l Lease) (wire.ToolResult, error) {
CreateIn []string `json:"create_in"`
Home string `json:"home"`
Coordinator string `json:"coordinator"`
- }{Runner: map[string]any{"online": true, "versions": h.Versions}, Connections: []connection{}, Projects: []project{}, CanAdd: []string{}, CreateIn: []string{}}
+ }{Runner: map[string]any{"online": true, "versions": h.Versions, "tools": toolHealth(h)}, Connections: []connection{}, Projects: []project{}, CanAdd: []string{}, CreateIn: []string{}}
if h.CreateIn != nil {
out.CreateIn = h.CreateIn
}
@@ -770,6 +782,16 @@ func (t *txn) status(l Lease) (wire.ToolResult, error) {
return wire.ToolResult{Code: "ok", Text: string(raw)}, nil
}
+// toolHealth is the primary's word on its pinned tools (protocol 30),
+// fixed states only (cleanHello dropped a report out of bounds); unknown
+// when it did not say.
+func toolHealth(h wire.Hello) wire.ToolHealth {
+ if h.Capabilities == nil || h.Capabilities.Tools == nil {
+ return wire.ToolHealth{Scanner: wire.ToolUnknown}
+ }
+ return *h.Capabilities.Tools
+}
+
// toolAddProject adds the project and puts an Added card in the
// conversation; the person can Remove it. No confirmation step.
func (t *txn) toolAddProject(r turnRecord, raw string) (wire.ToolResult, error) {
diff --git a/internal/equipo/copy.go b/internal/equipo/copy.go
index 824e399e..088dba28 100644
--- a/internal/equipo/copy.go
+++ b/internal/equipo/copy.go
@@ -1423,6 +1423,8 @@ var pageCopy = map[string]string{
"chat.activity.add_report": "Adding to the task…", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
"chat.activity.hold_merge": "Holding the merge…", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
"chat.activity.set_merge_policy": "Setting this project's merge rules…", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.activity.offer_retry": "Offering to try the merge again…", // COPY APPROVED (Paul, 2026-11-25, copy-review 6haczxo74hoyyuf7xkojgqd27e, unchanged)
+ "chat.activity.retry_step": "Trying it again…", // COPY APPROVED (Paul, 2026-11-25, copy-review 6haczxo74hoyyuf7xkojgqd27e, unchanged)
// Thinking words: the sets a person picks for the thinking line
// (Settings, Thinking words). One line per set and situation, phrases
// separated by " | ". Edit them here; ids and situations are in
@@ -1642,6 +1644,7 @@ var pageCopy = map[string]string{
"work.tl.looked": "Coordinator looked into it", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
"work.tl.attempt": "%s, attempt %d", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
"work.tl.stopped": "%s stopped", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
+ "work.tl.coordinator_retried": "The coordinator started %s again.", // COPY APPROVED (Paul, 2026-11-25, copy-review 6haczxo74hoyyuf7xkojgqd27e, unchanged)
"work.tl.cancelled": "%s cancelled", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
"work.tl.pushed": "Pushed %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
"work.tl.on": "%s on %s", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
@@ -2193,6 +2196,7 @@ var pageCopy = map[string]string{
// Merge authority (spec 2026-11-11-equipo-merge-authority.md).
"chat.merge.stance_merge": "Merge %s? I'd merge: %s, but %s.", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
"chat.merge.stance_wait": "Merge %s? I'd wait: %s.", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "chat.merge.retry_offer": "Merging %s didn’t go through. Try the merge again?", // COPY APPROVED (Paul, 2026-11-25, copy-review 6haczxo74hoyyuf7xkojgqd27e, unchanged)
"chat.merge.why.approved": "approved by Review", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
"chat.merge.why.small": "a small change, %d lines in %d files", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
"chat.merge.why.small_one": "a small change, %d lines in one file", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
diff --git a/internal/equipo/migrations/0107_coordinator_attempt.sql b/internal/equipo/migrations/0107_coordinator_attempt.sql
new file mode 100644
index 00000000..86202a11
--- /dev/null
+++ b/internal/equipo/migrations/0107_coordinator_attempt.sql
@@ -0,0 +1,3 @@
+-- The attempt the coordinator's retry_step started (stuck tasks, protocol
+-- 30); 0 or NULL is none.
+ALTER TABLE chat_steps ADD COLUMN coordinator_attempt integer;
diff --git a/internal/equipo/migrations/schema.sql b/internal/equipo/migrations/schema.sql
index f82d00aa..b766173e 100644
--- a/internal/equipo/migrations/schema.sql
+++ b/internal/equipo/migrations/schema.sql
@@ -776,3 +776,4 @@ CREATE TABLE chat_person_zones (person text PRIMARY KEY, zone text NOT NULL, sou
ALTER TABLE chat_cards ADD COLUMN carry_on numeric;
ALTER TABLE chat_cards ADD COLUMN carry_on_connection text;
ALTER TABLE chat_releases ADD COLUMN connection text;
+ALTER TABLE chat_steps ADD COLUMN coordinator_attempt integer;
diff --git a/internal/equipo/templates/work_task.html b/internal/equipo/templates/work_task.html
index eb03da12..1c90f06c 100644
--- a/internal/equipo/templates/work_task.html
+++ b/internal/equipo/templates/work_task.html
@@ -38,6 +38,7 @@
{{with .Findings}}<ul equipo-findings>{{range .}}<li>{{with .Headline}}<b>{{.}}</b> {{end}}{{.Text}}{{if .Path}}<small><code>{{.Path}}{{if .Line}}:{{.Line}}{{end}}</code></small>{{end}}</li>{{end}}</ul>{{end}}
{{range .Text}}<p equipo-tl-note>{{.}}</p>{{end}}
</div></details>{{end}}
+{{if .RetryStep}}<form method="post" action="{{.RetryPost}}" data-card-form><input type="hidden" name="from" value="task"><input type="hidden" name="step" value="{{.RetryStep}}"><button equipo-link type="submit" data-step-retry>{{copy "work.retry"}}</button></form>{{end}}
{{if .Decision}}{{template "decision" (dict "Task" $.Thin.Task "Head" false "From" "task")}}{{end}}
</div></li>{{end}}</ol>
<details equipo-details id="task-details"><summary>{{icon "chevron-down"}}{{copy "work.details"}}</summary>
diff --git a/internal/equipo/work_pages.go b/internal/equipo/work_pages.go
index 6229c44b..fcd85de5 100644
--- a/internal/equipo/work_pages.go
+++ b/internal/equipo/work_pages.go
@@ -939,9 +939,13 @@ func (a *application) workTaskAction(retry bool) http.HandlerFunc {
id := chi.URLParam(r, "id")
a.chatActionTo(w, r, workBack(r, id), func(ctx context.Context, address string) error {
var err error
- if retry {
+ switch step := r.PostFormValue("step"); {
+ case retry && step != "":
+ // One step's Retry (a failed preview behind the merge).
+ _, err = a.store.Chat().RetryStep(ctx, address, id, step)
+ case retry:
_, err = a.store.Chat().RetryTask(ctx, address, id)
- } else {
+ default:
_, err = a.store.Chat().CancelTask(ctx, address, id)
}
return err
diff --git a/internal/equipo/work_views.go b/internal/equipo/work_views.go
index 803dfd64..49195a39 100644
--- a/internal/equipo/work_views.go
+++ b/internal/equipo/work_views.go
@@ -954,6 +954,9 @@ type timelineItem struct {
// once done (research_views.go).
Specialist string
Research *researchView
+ // RetryPost and RetryStep are a stopped step's own Retry (a failed
+ // preview behind the merge), for the task's creator.
+ RetryPost, RetryStep string
}
// HasDetails reports whether the entry has anything behind Details.
@@ -1092,6 +1095,10 @@ func timelineOf(t wire.Task, v taskLine) []timelineItem {
out = append(out, researchItem(t, s, v, title))
continue
}
+ if s.RetriedBy == wire.RetriedByCoordinator {
+ // The coordinator's retry_step started this attempt.
+ out = append(out, timelineItem{Kind: "note", What: fmt.Sprintf(copyText("work.tl.coordinator_retried"), name)})
+ }
if s.Specialist == wire.SpecialistMerge && (s.State == wire.StepQueued || s.State == wire.StepRunning || s.State == wire.StepDone) {
// The merging and merged lines say it.
continue
@@ -1129,6 +1136,9 @@ func timelineOf(t wire.Task, v taskLine) []timelineItem {
if s.LogTail != "" {
it.Markdown = "```\n" + s.LogTail + "\n```"
}
+ if previewRetry(t, s, v.Mine) {
+ it.RetryPost, it.RetryStep = "/conversation/tasks/"+t.ID+"/retry", s.ID
+ }
out = append(out, it)
continue
case wire.StepCancelled:
@@ -1248,6 +1258,22 @@ func timelineOf(t wire.Task, v taskLine) []timelineItem {
return out
}
+// previewRetry reports whether the person may run a failed preview again
+// from its own entry: theirs, ended, the task's newest preview, of the
+// candidate the task stands on, the task not ended. The store decides
+// again (retryPreview).
+func previewRetry(t wire.Task, s wire.Step, mine bool) bool {
+ if !mine || s.Specialist != wire.SpecialistPreview || s.State != wire.StepFailed || !s.Terminated || wire.FinalStage(t.Stage) || t.CandidateSHA == "" || s.CandidateSHA != t.CandidateSHA {
+ return false
+ }
+ for _, o := range t.Steps {
+ if o.Specialist == wire.SpecialistPreview && o.Index > s.Index {
+ return false
+ }
+ }
+ return true
+}
+
// sentenceCase capitalises a reason fragment for a line of its own.
func sentenceCase(s string) string {
if s == "" {
diff --git a/internal/plan3test/plan3_release_test.go b/internal/plan3test/plan3_release_test.go
index 762101aa..eaf16089 100644
--- a/internal/plan3test/plan3_release_test.go
+++ b/internal/plan3test/plan3_release_test.go
@@ -183,6 +183,8 @@ func plan3CopyInventory(t *testing.T) {
approvedFailedReplies := strings.HasPrefix(key, "chat.failed.") && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY APPROVED (Paul, 2026-11-22, copy-review ipgtz3lqoo3rj6rpiodpekh6vu, unchanged)") || key == "signin.refused" && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY APPROVED (Paul, 2026-11-22, copy-review smart-door-copy-5, unchanged)")
// Paul's own review of the Engineering stop reasons.
approvedStopReasons := slices.Contains([]string{"work.reason.no_further_changes", "work.reason.tools_refused"}, key) && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY APPROVED (Paul, 2026-11-23, copy-review eavqvil43jg2zs3wxx3kxp3bpm, unchanged)")
+ // Paul's own review of the coordinator's stuck-task strings.
+ approvedStuckTasks := slices.Contains([]string{"chat.merge.retry_offer", "chat.activity.offer_retry", "chat.activity.retry_step", "work.tl.coordinator_retried"}, key) && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY APPROVED (Paul, 2026-11-25, copy-review 6haczxo74hoyyuf7xkojgqd27e, unchanged)")
acceptedRoster := strings.HasPrefix(key, "roster.") && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY ACCEPTED BY DELEGATION (Astra, 2026-11-14)")
acceptedPlacement := strings.HasPrefix(key, "placement.") && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15)")
acceptedAccess := slices.Contains([]string{"access.waiting", "access.reopen", "access.not_owned", "access.already", "access.unconfirmed", "access.missing", "access.uncheckable", "access.authority", "access.confirm_namespace", "access.namespace", "access.granted_note", "access.title", "access.confirm", "access.ask", "access.approve", "access.aside", "access.reason", "access.role", "access.confirmation", "access.filing", "access.pending", "access.approved", "access.declined", "access.expired", "access.limited", "access.failed", "access.operator", "access.continue"}, key) && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY ACCEPTED BY DELEGATION (Astra, 2026-11-17)")
@@ -208,7 +210,7 @@ func plan3CopyInventory(t *testing.T) {
acceptedProjects := slices.Contains([]string{"projects.amadan", "projects.yours", "projects.can_add", "projects.add_reachable", "projects.names", "projects.names_hint", "projects.details", "projects.title", "projects.description", "projects.save", "projects.context", "projects.found", "projects.selected", "projects.owner_add", "projects.selection_lost", "projects.other", "projects.name_question", "projects.personal_names", "projects.forget_name", "docs/api/equipo-v1.md / Projects and starting a request"}, key) && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY ACCEPTED BY DELEGATION (Luna, 2026-11-22)")
acceptedAgentAccess := slices.Contains([]string{"copyAgentConfig", "copyAgentForbidden", "copyAgentNotFound", "copyAgentUnavailable", "copyAgentTooLarge", "copyAgentInvalid", "copyAgentMedia", "copyAgentUnauthenticated", "agent.equipo_projects_list", "agent.equipo_tasks_list", "agent.equipo_task_get", "agent.equipo_needs_you", "docs/api/equipo-v1.md / Delegated read-only operations"}, key) && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY ACCEPTED BY DELEGATION (Luna, 2026-11-20)")
acceptedCopy := strings.TrimSuffix(cells[3], " |") == "COPY ACCEPTED BY DELEGATION (Copy, record-bound) sha256:"+copydesk.Hash(rows[key])
- if !acceptedPaused && !acceptedNewTeamCard && !acceptedGitHubEgress && !acceptedForgeSeam && !acceptedAPIErrors && !acceptedNativeProjects && !acceptedInjection && !acceptedMail && !acceptedPush && !acceptedAgentAccess && !acceptedProjects && !acceptedCardNames && !acceptedAccess && !acceptedPlacementEdges && !acceptedPlacement && !acceptedReportActions && !acceptedRoster && !acceptedCopy && !strings.Contains(cells[3], "COPY REVIEW REQUIRED") && !acceptedAll && !acceptedGuide && !acceptedRound2 && !acceptedStarter && !acceptedDelegation && !approvedPublish && !approvedAssistant && !approvedJobs && !approvedOficina && !approvedFailedReplies && !approvedStopReasons {
+ if !approvedStuckTasks && !acceptedPaused && !acceptedNewTeamCard && !acceptedGitHubEgress && !acceptedForgeSeam && !acceptedAPIErrors && !acceptedNativeProjects && !acceptedInjection && !acceptedMail && !acceptedPush && !acceptedAgentAccess && !acceptedProjects && !acceptedCardNames && !acceptedAccess && !acceptedPlacementEdges && !acceptedPlacement && !acceptedReportActions && !acceptedRoster && !acceptedCopy && !strings.Contains(cells[3], "COPY REVIEW REQUIRED") && !acceptedAll && !acceptedGuide && !acceptedRound2 && !acceptedStarter && !acceptedDelegation && !approvedPublish && !approvedAssistant && !approvedJobs && !approvedOficina && !approvedFailedReplies && !approvedStopReasons {
t.Fatal("entry has no copy review status or applicable acceptance", key)
}
}
diff --git a/internal/runner/provider/actions.go b/internal/runner/provider/actions.go
index 1d4ec4f0..79f7f809 100644
--- a/internal/runner/provider/actions.go
+++ b/internal/runner/provider/actions.go
@@ -177,7 +177,7 @@ func ResearchReaderAction(action string) bool { return action == "implement" ||
// ConverseTools is the thin coordinator's tool set (wire.ConverseTools
// plus create_project, which the runner carries out itself).
func ConverseTools() []string {
- return []string{"request_access", "status", "find", "search_code", "read_file", "add_project", "create_project", "set_project_home", "star_project", "ask_person", "write_note", "read_notes", "record_task", "add_finding", "start_task", "read_task", "cancel_task", "add_report", "hold_merge", "set_merge_policy", "propose_specialist", "research"}
+ return []string{"request_access", "status", "find", "search_code", "read_file", "add_project", "create_project", "set_project_home", "star_project", "ask_person", "write_note", "read_notes", "record_task", "add_finding", "start_task", "read_task", "cancel_task", "add_report", "hold_merge", "set_merge_policy", "propose_specialist", "research", "offer_retry", "retry_step"}
}
// AssistTools is the Assistant's tool set (wire.AssistTools).
diff --git a/internal/runner/provider/claude/launcher.go b/internal/runner/provider/claude/launcher.go
index 99bce3e7..3b80d2c8 100644
--- a/internal/runner/provider/claude/launcher.go
+++ b/internal/runner/provider/claude/launcher.go
@@ -140,7 +140,7 @@ func PolicyInputs(b provider.Binding, in provider.PolicyInputs, specialist, mode
}
tools := append(append([]string{}, native...), "mcp__equipo__permission")
for _, tool := range in.Tools {
- converse := in.Action == "converse" && slices.Contains([]string{"mcp__equipo__request_access", "mcp__equipo__status", "mcp__equipo__find", "mcp__equipo__search_code", "mcp__equipo__read_file", "mcp__equipo__add_project", "mcp__equipo__create_project", "mcp__equipo__set_project_home", "mcp__equipo__star_project", "mcp__equipo__write_note", "mcp__equipo__read_notes", "mcp__equipo__record_task", "mcp__equipo__add_finding", "mcp__equipo__start_task", "mcp__equipo__read_task", "mcp__equipo__cancel_task", "mcp__equipo__add_report", "mcp__equipo__hold_merge", "mcp__equipo__set_merge_policy", "mcp__equipo__propose_specialist", "mcp__equipo__research"}, tool)
+ converse := in.Action == "converse" && slices.Contains([]string{"mcp__equipo__request_access", "mcp__equipo__status", "mcp__equipo__find", "mcp__equipo__search_code", "mcp__equipo__read_file", "mcp__equipo__add_project", "mcp__equipo__create_project", "mcp__equipo__set_project_home", "mcp__equipo__star_project", "mcp__equipo__write_note", "mcp__equipo__read_notes", "mcp__equipo__record_task", "mcp__equipo__add_finding", "mcp__equipo__start_task", "mcp__equipo__read_task", "mcp__equipo__cancel_task", "mcp__equipo__add_report", "mcp__equipo__hold_merge", "mcp__equipo__set_merge_policy", "mcp__equipo__propose_specialist", "mcp__equipo__research", "mcp__equipo__offer_retry", "mcp__equipo__retry_step"}, tool)
assist := in.Action == "assist" && slices.Contains([]string{"mcp__equipo__look", "mcp__equipo__describe", "mcp__equipo__use", "mcp__equipo__write_note", "mcp__equipo__read_notes"}, tool)
answer := in.Action == "answer" && slices.Contains([]string{"mcp__equipo__git_log", "mcp__equipo__git_diff", "mcp__equipo__git_show"}, tool)
research := provider.ResearchAction(in.Action) && slices.Contains([]string{"mcp__equipo__submit_findings", "mcp__equipo__keep_image"}, tool)
diff --git a/internal/runner/thin/bridge.go b/internal/runner/thin/bridge.go
index 8ca8919e..995147eb 100644
--- a/internal/runner/thin/bridge.go
+++ b/internal/runner/thin/bridge.go
@@ -595,6 +595,9 @@ func (b *bridge) roundTrip(ctx context.Context, call wire.ToolCall) wire.ToolRes
if res, no := accessRefused(call, b.spoken()); no {
return res
}
+ if res, no := stuckRefused(call, b.spoken()); no {
+ return res
+ }
if res, refused := exploreRefused(call, b.spoken(), nil); refused {
// An instance below protocol 10 refuses it anyway (the kind is
// never dropped from an exploration); say why, here.
diff --git a/internal/runner/thin/capabilities.go b/internal/runner/thin/capabilities.go
index 1d83bd63..05338a55 100644
--- a/internal/runner/thin/capabilities.go
+++ b/internal/runner/thin/capabilities.go
@@ -87,6 +87,9 @@ func linuxCapabilities(c runner.Config, previews func() *wire.PreviewHost, sites
// The Research site inventory's detected addresses (absent when
// they cannot be read).
out.Research = researchCapability(addrs)
+ // Whether the pinned preview scanner is installed and matches its
+ // pin (protocol 30, for the coordinator's status).
+ out.Tools = previewToolHealth(c)
if c.ClaudePath != "" {
out.Harness.Claude = provider.ClaudeVersion
out.Tags = append(out.Tags, wire.TagClaude)
diff --git a/internal/runner/thin/claude.go b/internal/runner/thin/claude.go
index 7acd47fa..1a99a147 100644
--- a/internal/runner/thin/claude.go
+++ b/internal/runner/thin/claude.go
@@ -681,7 +681,7 @@ func (c *claudeCoordinator) idleExit() {
// houseRule versions the opening's rule. Changing the rule's text changes
// it, so sessions started under an older rule are not resumed.
-const houseRule = "2026-11-17.2"
+const houseRule = "2026-11-25.1"
// sessionAccount records the account and the lane's rule a session runs
// on.
@@ -775,7 +775,7 @@ func opening(person string, catalog []wire.RepoInfo) string {
b.WriteString("You are the Equipo coordinator for " + person + ". You talk with them about their software work. Answer briefly in plain words. Do not use em dashes.\n")
b.WriteString(accessPrompt + "Use the named project or the clear continuation. If placement is ambiguous, ask_person with structured placement choices, best guess first. Always confirm a new repository unless the person directly requested one in the main composer this turn. Hand-offs, nudges, quotes and ordinary card answers cannot grant creation. One turn permits one creation; placement-card labels name the repository and come from the server. Wait for the answer before recording or starting work. Learn from project corrections in your notebook. Call status to see reachable repositories and create_in namespaces.\n")
b.WriteString("For settled placement, call add_project for existing work or create_project for explicitly requested or confirmed new work. Choose the related namespace, otherwise home from status. Change home only when asked. Never fall back silently to a different project after a refusal.\n")
- b.WriteString("Once placement is settled for a bug or change, call record_task before investigating, with the repository it belongs to, a short title and their words as the brief. Then investigate with search_code and read_file, attach what you found with add_finding (a one-sentence headline for the person, plain words and no file paths, and the full finding with its file and line), and call start_task with a brief for Engineering. Engineering changes the code on the task's own branch and pushes it to Amadan; the change is then checked and reviewed, and Equipo's merge rules decide whether it merges on its own or asks the person with a card that gives Equipo's call. You cannot make it merge: when you have a concrete reason a change needs the person's look, call hold_merge with that reason. When the person says how a project should merge (\"always ask me about Suite\", \"main is not a release for Woodstar\"), call set_merge_policy with their words; a stricter rule applies at once and a looser one waits for their tap. Never offer to merge or open a pull request, and never ask the person to merge. Use ask_person only for a question only the person can answer. Mockups, prototypes, design options and spikes are explorations: record them with kind explore; they end at a preview and the person's choice of direction, never a merge. A website meant to go live is a change, not an exploration: ask Engineering for plain HTML and CSS files with no build step, kept in one folder that release/preview.json names. Once it is merged its person is asked whether to publish it; never say it is live before then.\n")
+ b.WriteString("Once placement is settled for a bug or change, call record_task before investigating, with the repository it belongs to, a short title and their words as the brief. Then investigate with search_code and read_file, attach what you found with add_finding (a one-sentence headline for the person, plain words and no file paths, and the full finding with its file and line), and call start_task with a brief for Engineering. Engineering changes the code on the task's own branch and pushes it to Amadan; the change is then checked and reviewed, and Equipo's merge rules decide whether it merges on its own or asks the person with a card that gives Equipo's call. You cannot make it merge: when you have a concrete reason a change needs the person's look, call hold_merge with that reason. When the person says how a project should merge (\"always ask me about Suite\", \"main is not a release for Woodstar\"), call set_merge_policy with their words; a stricter rule applies at once and a looser one waits for their tap. Never offer to merge or open a pull request, and never ask the person to merge. The one exception: when a merge failed and the task waits at Ready to merge, offer_retry puts a card in front of the person to try it again, and only their tap merges. Use ask_person only for a question only the person can answer. Mockups, prototypes, design options and spikes are explorations: record them with kind explore; they end at a preview and the person's choice of direction, never a merge. A website meant to go live is a change, not an exploration: ask Engineering for plain HTML and CSS files with no build step, kept in one folder that release/preview.json names. Once it is merged its person is asked whether to publish it; never say it is live before then.\n")
b.WriteString("Never file the same problem twice. If record_task returns similar open tasks and one of them is what the person is reporting, call add_report on it with their words and tell them in one line it is already logged and where it stands, naming it as a markdown link; record a separate task only when it is clearly a different problem.\n")
b.WriteString("Speak at the outcome level: what you understood, what is happening, what you need from the person. For example: \"Got it, I've logged [Swipe back doesn't work](/tasks/tk...) and Engineering is on it.\" No file paths, line numbers or code mechanics in your replies; the diagnosis goes on the task with add_finding. Always name a task as a markdown link with its title and the link from record_task, start_task or read_task, never as \"the task card\".\n")
b.WriteString("Anything the person may need to paste (commands, prompts, config, codes) goes in a fenced code block, one block per thing to paste, with its kind after the opening fence (bash for a command, prompt for a prompt, text for plain text): the chat shows each block with a Copy button.\n")
diff --git a/internal/runner/thin/link.go b/internal/runner/thin/link.go
index bc39e51e..7f059679 100644
--- a/internal/runner/thin/link.go
+++ b/internal/runner/thin/link.go
@@ -474,7 +474,11 @@ func (l *Link) send(ctx context.Context, c *websocket.Conn, f wire.Frame) error
return err
}
if call, ok := body.(*wire.ToolCall); ok {
- if result, refused := accessRefused(*call, proto); refused {
+ result, refused := accessRefused(*call, proto)
+ if !refused {
+ result, refused = stuckRefused(*call, proto)
+ }
+ if refused {
if err := l.State.Acked(ctx, f.ID); err != nil {
return err
}
@@ -564,6 +568,8 @@ func (l *Link) handshake(ctx context.Context, offer int) (*websocket.Conn, *wire
heldUsage := wire.WithoutUsageRefresh(&hello)
// Nor the sites capability, below protocol 16.
heldSites := wire.WithoutSites(&hello)
+ // Nor the tool health, below protocol 30.
+ heldTools := wire.WithoutToolHealth(&hello)
l.mu.Lock()
hello.Generation, hello.Protocol, l.proto = l.generation, offer, offer
l.mu.Unlock()
@@ -612,7 +618,7 @@ func (l *Link) handshake(ctx context.Context, offer int) (*websocket.Conn, *wire
}
l.mu.Lock()
l.proto, l.role = min(spoken, offer), role
- if heldUsage && l.proto >= wire.ProtocolUsageRefresh || held && l.proto >= wire.ProtocolEmptyRepos || heldPreviews && l.proto >= wire.ProtocolExplore || heldResearch && l.proto >= wire.ProtocolResearch || heldReadings && l.proto >= wire.ProtocolReadings || heldSites && l.proto >= wire.ProtocolPublish {
+ if heldUsage && l.proto >= wire.ProtocolUsageRefresh || held && l.proto >= wire.ProtocolEmptyRepos || heldPreviews && l.proto >= wire.ProtocolExplore || heldResearch && l.proto >= wire.ProtocolResearch || heldReadings && l.proto >= wire.ProtocolReadings || heldSites && l.proto >= wire.ProtocolPublish || heldTools && l.proto >= wire.ProtocolStuckTasks {
l.helloSoon = true
}
l.mu.Unlock()
diff --git a/internal/runner/thin/mcp.go b/internal/runner/thin/mcp.go
index 1fcea1c0..a37cd600 100644
--- a/internal/runner/thin/mcp.go
+++ b/internal/runner/thin/mcp.go
@@ -150,7 +150,7 @@ var str = map[string]string{"type": "string"}
// descriptions are for the model; people never read them.
var converseTools = []any{
map[string]any{"name": wire.ToolRequestAccess, "description": "Propose an access request for an unreachable repository. The person confirms before filing; never retry unprompted. Prefer one repository; namespace only if explicitly requested. Role defaults to agent.", "inputSchema": toolSchema(map[string]any{"target": str, "role": str, "reason": str}, "target", "reason")},
- map[string]any{"name": "status", "description": "Read-only: this person's runner, model connections, current projects, the repositories you can add (can_add) and the namespaces you can create repositories in (create_in, with home for unrelated new work). Call it before choosing where work goes.", "inputSchema": toolSchema(map[string]any{})},
+ map[string]any{"name": "status", "description": "Read-only: this person's runner, model connections, current projects, the repositories you can add (can_add) and the namespaces you can create repositories in (create_in, with home for unrelated new work). Call it before choosing where work goes. runner.tools says whether the runner's pinned preview scanner is installed and matches its pin (ok, missing, mismatch, unpinned, or unknown when the runner does not say): a preview that failed for its scanner needs the runner fixed or updated, not another try.", "inputSchema": toolSchema(map[string]any{})},
map[string]any{"name": "find", "description": "Read-only: find which repository an app, product or feature lives in, by name, alias or keyword (for example Woodstar). Returns candidates with reasons, or says nothing Equipo's agent can reach matches.", "inputSchema": toolSchema(map[string]any{"query": str}, "query")},
map[string]any{"name": "search_code", "description": "Read-only: search a repository's default branch for a fixed string, case insensitive. Returns path:line: text, bounded.", "inputSchema": toolSchema(map[string]any{"repo": str, "query": str}, "repo", "query")},
map[string]any{"name": "read_file", "description": "Read-only: read a file from a repository's default branch with line numbers (up to 300 lines from start), or list a directory (empty path is the root). For a file the person attached, repo is \"attachments\" and path is the one given with their message.", "inputSchema": toolSchema(map[string]any{"repo": str, "path": str, "start": map[string]string{"type": "integer"}}, "repo", "path")},
@@ -171,6 +171,8 @@ var converseTools = []any{
map[string]any{"name": "set_merge_policy", "description": "Record how Equipo merges a project, from what the person said (words: their sentence). mode is rules (merge on its own when every rule holds) or ask (ask before every merge); max_lines and max_files bound a merge without checks; main_ships is yes or no (does merging to main ship to users); add_sensitive adds path globs that always ask. A stricter change applies at once; a looser one waits for the person to tap Save on a card.", "inputSchema": toolSchema(map[string]any{"project": str, "words": str, "mode": str, "max_lines": map[string]any{"type": "integer"}, "max_files": map[string]any{"type": "integer"}, "main_ships": str, "add_sensitive": map[string]any{"type": "array", "items": str}}, "project", "words")},
map[string]any{"name": "propose_specialist", "description": "Ask the person to add a specialist to their team, from Equipo's fixed menu. Only when the person wants something researched on the public web. The one profile is research-v1: it reads public web pages Equipo fetches for a task and reports what they say; it never reaches repositories. Pass profile research-v1, a short name (for example Research), a brief of at most 2 KB on what it should look for, capabilities [\"web.research\"] and tools [\"submit_findings\", \"keep_image\"], exactly those. Nothing is added until an owner taps Add on the card it raises; do not ask again in your reply. If they tap Not now, propose it again only when they ask.", "inputSchema": toolSchema(map[string]any{"profile": map[string]any{"type": "string", "enum": []string{"research-v1"}}, "name": str, "brief": str, "capabilities": map[string]any{"type": "array", "items": str}, "tools": map[string]any{"type": "array", "items": str}}, "profile", "name", "brief", "capabilities", "tools")},
map[string]any{"name": "research", "description": "Ask Research (once it is on the team; see propose_specialist) to read public web pages for one of the person's tasks. Use it when an exploration or change names an outside site, brand, API or docs, or the person asking (their business, their own site), and the work needs what those pages say. task is the task id; question (at most 1,000 bytes) is what to look for, for example colours, logo, fonts, opening hours and services; urls are pages you propose (https or http, no query string, a path of at most 100 characters, at most 10), or []. URLs and bare domains the person typed on the task are read without asking; your urls are shown to the person in full on a card and read only if they tap Allow, so propose only pages the task needs and never put anything from a repository in them. This only requests a run: Equipo starts it only at the task's start (call it before start_task) or after a review round, before Engineering's next round, and Engineering waits until Research ends. At most one run per start or round and 3 per task, and Equipo never retries a run for you. Research's findings reach Engineering and Review; do not wait for them in your reply.", "inputSchema": toolSchema(map[string]any{"task": str, "question": str, "urls": map[string]any{"type": "array", "items": str, "maxItems": 10}}, "task", "question", "urls")},
+ map[string]any{"name": wire.ToolOfferRetry, "description": "When a task's merge failed and it waits at Ready to merge (read_task shows the failed merge step), put a card in front of the person asking whether to try the merge again. You cannot merge: only their tap merges, through Equipo's merge rules, and it is offered only when that tap could merge now. One card per task; do not ask again in your reply, and never say it is merged.", "inputSchema": toolSchema(map[string]any{"task": str}, "task")},
+ map[string]any{"name": wire.ToolRetryStep, "description": "Run a task's failed preview, checks or review again, as the person's own Retry would (step: preview, checks or review). Only when read_task shows that step failed and why, and another try could help: a preview that failed for its scanner (status runner.tools) needs the runner fixed first. Never a merge (use offer_retry: only the person's tap merges) and never Engineering's work. The task shows that you started it. Call it once per step.", "inputSchema": toolSchema(map[string]any{"task": str, "step": map[string]any{"type": "string", "enum": wire.RetryStepKinds}}, "task", "step")},
}
// stepTools are the tools the implement profile pins for an Engineering
diff --git a/internal/runner/thin/preview_security.go b/internal/runner/thin/preview_security.go
index a58d2f32..14bef507 100644
--- a/internal/runner/thin/preview_security.go
+++ b/internal/runner/thin/preview_security.go
@@ -3,6 +3,7 @@ package thin
import (
"amadan.net/oficina/equipo/internal/release"
"amadan.net/oficina/equipo/internal/runner"
+ "amadan.net/oficina/equipo/internal/wire"
"context"
"crypto/sha256"
"encoding/hex"
@@ -40,6 +41,23 @@ var previewScannerTool = func(c runner.Config) (string, string) {
return filepath.Join(filepath.Dir(c.Executable), "gitleaks"), release.GitleaksSHA256()
}
+// previewToolHealth is whether the preview scanner is installed and is the
+// pinned build, as scanPreview checks it before every scan: a fixed state
+// for the coordinator's status, never the path or the pin.
+func previewToolHealth(c runner.Config) *wire.ToolHealth {
+ binary, pin := previewScannerTool(c)
+ state := wire.ToolHealthy
+ switch info, err := os.Lstat(binary); {
+ case !filepath.IsAbs(binary) || err != nil || !info.Mode().IsRegular():
+ state = wire.ToolMissing
+ case pin == "":
+ state = wire.ToolUnpinned
+ case !release.VerifyGitleaks(binary, pin):
+ state = wire.ToolMismatch
+ }
+ return &wire.ToolHealth{Scanner: state}
+}
+
func (e *Engineer) scanPreview(ctx context.Context, stage string) string {
binary, pin := previewScannerTool(e.O.Runner)
if !release.VerifyGitleaks(binary, pin) {
diff --git a/internal/runner/thin/stuck.go b/internal/runner/thin/stuck.go
new file mode 100644
index 00000000..3cd36be8
--- /dev/null
+++ b/internal/runner/thin/stuck.go
@@ -0,0 +1,20 @@
+package thin
+
+import (
+ "slices"
+
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// toolStuckOld: the instance cannot take a stuck-task tool yet (below
+// wire.ProtocolStuckTasks). For the model; people never read it.
+const toolStuckOld = "Equipo needs an update before it can do that. Tell the person what stopped and that they can use Retry or Merge on the task themselves."
+
+// stuckRefused answers a stuck-task tool here on a link below protocol 30:
+// Encode refuses the call, so it is never sent to an older instance.
+func stuckRefused(call wire.ToolCall, protocol int) (wire.ToolResult, bool) {
+ if !slices.Contains(wire.StuckTools, call.Name) || protocol == 0 || protocol >= wire.ProtocolStuckTasks {
+ return wire.ToolResult{}, false
+ }
+ return wire.ToolResult{CallID: call.CallID, IsError: true, Code: "stuck_unsupported", Text: toolStuckOld}, true
+}
diff --git a/internal/runner/thin/stuck_test.go b/internal/runner/thin/stuck_test.go
new file mode 100644
index 00000000..e721d86f
--- /dev/null
+++ b/internal/runner/thin/stuck_test.go
@@ -0,0 +1,89 @@
+package thin
+
+import (
+ "context"
+ "encoding/json"
+ "slices"
+ "strings"
+ "testing"
+
+ "amadan.net/oficina/equipo/internal/runner/provider"
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// TestStuckToolsRefusedOnAnOlderLink (stuck tasks, protocol 30): each
+// stuck-task tool is offered to the model, and a link below 30 answers it
+// here (an older instance has no words for it and Encode refuses the
+// call); at 30 it goes to the instance. Its description tells the model
+// that only the person's tap merges.
+func TestStuckToolsRefusedOnAnOlderLink(t *testing.T) {
+ for _, name := range wire.StuckTools {
+ if !slices.Contains(provider.ConverseTools(), name) {
+ t.Fatalf("%s is not offered", name)
+ }
+ var offered map[string]any
+ for _, tool := range converseTools {
+ if m := tool.(map[string]any); m["name"] == name {
+ offered = m
+ }
+ }
+ if offered == nil {
+ t.Fatalf("%s has no schema", name)
+ }
+ call := wire.ToolCall{CallID: "t/1/" + name, TurnID: "t", Attempt: 1, Name: name, Args: json.RawMessage(`{"task":"tk1"}`)}
+ sent := 0
+ trip := func(context.Context, wire.ToolCall) wire.ToolResult {
+ sent++
+ return wire.ToolResult{Code: "ok"}
+ }
+ old := &bridge{speaks: wire.ProtocolPinnedRelease, trip: trip}
+ if res := old.roundTrip(context.Background(), call); !res.IsError || res.Code != "stuck_unsupported" || res.Text != toolStuckOld || sent != 0 {
+ t.Fatalf("%s at 29: %+v, %d sent", name, res, sent)
+ }
+ current := &bridge{speaks: wire.ProtocolStuckTasks, trip: trip}
+ if res := current.roundTrip(context.Background(), call); res.IsError || sent != 1 {
+ t.Fatalf("%s at 30: %+v, %d sent", name, res, sent)
+ }
+ }
+ for _, tool := range converseTools {
+ if m := tool.(map[string]any); m["name"] == wire.ToolOfferRetry && !strings.Contains(m["description"].(string), "only their tap merges") {
+ t.Fatalf("offer_retry's description: %s", m["description"])
+ }
+ }
+}
+
+// TestStuckToolUnencodableCallIsRetired: a stuck-task call queued for a
+// link that turns out to speak 29 is answered at once and leaves the
+// outbox, so it never replays after an upgrade.
+func TestStuckToolUnencodableCallIsRetired(t *testing.T) {
+ ctx := context.Background()
+ s, err := OpenState(ctx, t.TempDir())
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer s.Close()
+ call := wire.ToolCall{CallID: "call", TurnID: "finished-turn", Name: wire.ToolOfferRetry, Args: json.RawMessage(`{"task":"tk1"}`)}
+ if err := s.SendToolCall(ctx, call); err != nil {
+ t.Fatal(err)
+ }
+ frames, _, err := s.Unacked(ctx, 0)
+ if err != nil || len(frames) != 1 {
+ t.Fatal(err, frames)
+ }
+ l := &Link{State: s, proto: wire.ProtocolPinnedRelease}
+ wait := l.waitTool(call.CallID)
+ if err := l.send(ctx, nil, frames[0]); err != nil {
+ t.Fatal(err)
+ }
+ select {
+ case res := <-wait:
+ if res.Code != "stuck_unsupported" {
+ t.Fatal(res)
+ }
+ default:
+ t.Fatal("no immediate unsupported result")
+ }
+ if frames, _, err = s.Unacked(ctx, 0); err != nil || len(frames) != 0 {
+ t.Fatal("an old call can replay after an upgrade", frames, err)
+ }
+}
diff --git a/internal/runner/thin/tool_health_test.go b/internal/runner/thin/tool_health_test.go
new file mode 100644
index 00000000..8a0a29a4
--- /dev/null
+++ b/internal/runner/thin/tool_health_test.go
@@ -0,0 +1,92 @@
+package thin
+
+import (
+ "context"
+ "crypto/sha256"
+ "encoding/json"
+ "fmt"
+ "os"
+ "path/filepath"
+ "strings"
+ "testing"
+
+ "amadan.net/oficina/equipo/internal/runner"
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// TestToolHealthReportsTheScannerPin (stuck tasks, protocol 30): the
+// capability report says whether the preview scanner is installed and is
+// the pinned build, as the scan itself checks it: one fixed state, never
+// its path or digest.
+func TestToolHealthReportsTheScannerPin(t *testing.T) {
+ dir := t.TempDir()
+ binary := filepath.Join(dir, "gitleaks")
+ if err := os.WriteFile(binary, []byte("#!/bin/sh\nexit 0\n"), 0o700); err != nil {
+ t.Fatal(err)
+ }
+ raw, _ := os.ReadFile(binary)
+ pin := fmt.Sprintf("%x", sha256.Sum256(raw))
+ other := fmt.Sprintf("%x", sha256.Sum256([]byte("another build")))
+ old := previewScannerTool
+ t.Cleanup(func() { previewScannerTool = old })
+ report := func(path, want string) wire.Capabilities {
+ previewScannerTool = func(runner.Config) (string, string) { return path, want }
+ return linuxCapabilities(runner.Config{}, func() *wire.PreviewHost { return nil }, false, nil)(context.Background())
+ }
+ for _, c := range []struct{ path, pin, want string }{
+ {binary, pin, wire.ToolHealthy},
+ {binary, other, wire.ToolMismatch},
+ {filepath.Join(dir, "absent"), pin, wire.ToolMissing},
+ {dir, pin, wire.ToolMissing},
+ {binary, "", wire.ToolUnpinned},
+ } {
+ caps := report(c.path, c.pin)
+ if caps.Tools == nil || caps.Tools.Scanner != c.want || caps.Tools.Renderer != "" {
+ t.Fatalf("%s pinned %q: %+v", c.path, c.pin, caps.Tools)
+ }
+ if err := wire.ValidCapabilities(caps); err != nil {
+ t.Fatalf("report out of bounds: %v", err)
+ }
+ out, _ := json.Marshal(caps)
+ if strings.Contains(string(out), dir) || strings.Contains(string(out), pin) || strings.Contains(string(out), "gitleaks") {
+ t.Fatalf("the report names the tool's path or pin: %s", out)
+ }
+ }
+ // Not executable is not installed: the scan would refuse it.
+ if err := os.Chmod(binary, 0o600); err != nil {
+ t.Fatal(err)
+ }
+ if caps := report(binary, pin); caps.Tools.Scanner != wire.ToolMismatch && caps.Tools.Scanner != wire.ToolMissing {
+ t.Fatalf("a scanner the scan refuses reported %q", caps.Tools.Scanner)
+ }
+}
+
+// TestHandshakeHelloWithholdsToolHealth: the first hello goes out before
+// the instance says its protocol, so it never carries the tool health an
+// older instance's strict decoder refuses; after a protocol 30 welcome
+// the next hello, sent at once, does; at 29 none ever does.
+func TestHandshakeHelloWithholdsToolHealth(t *testing.T) {
+ hello := func() wire.Hello {
+ return wire.Hello{Repos: []string{"amadan.net/oficina/sample"}, CreateIn: []string{}, Catalog: []wire.RepoInfo{}, Connections: []wire.HeldConnection{}, Versions: map[string]string{"runner": "test", "claude": "2.1.312"},
+ Capabilities: &wire.Capabilities{Tags: []string{wire.TagLinux}, Simulators: []wire.Simulator{}, Tools: &wire.ToolHealth{Scanner: wire.ToolMissing}}}
+ }
+ for _, protocol := range []int{wire.ProtocolPinnedRelease, wire.ProtocolStuckTasks} {
+ inst := newFakeInstance(t)
+ link, _, _, _ := startLinkWith(t, inst.url, &stubCoordinator{}, hello)
+ c := <-inst.conns
+ _, raw := read(t, c, wire.FrameHello)
+ if strings.Contains(string(raw), `"tools"`) || !strings.Contains(string(raw), `"linux"`) {
+ t.Fatalf("handshake hello: %s", raw)
+ }
+ welcome, _ := json.Marshal(wire.Frame{ID: "w-t", Type: wire.FrameWelcome, Data: json.RawMessage(`{"generation":3,"runner_id":"RUNNER1","protocol":` + itoa(int64(protocol)) + `,"role":"primary"}`)})
+ write(t, c, welcome)
+ read(t, c, wire.FrameSync)
+ if protocol < wire.ProtocolStuckTasks {
+ link.HelloSoon()
+ }
+ _, raw = read(t, c, wire.FrameHello)
+ if got := strings.Contains(string(raw), `"tools":{"scanner":"missing"}`); got != (protocol >= wire.ProtocolStuckTasks) {
+ t.Fatalf("protocol %d hello: %s", protocol, raw)
+ }
+ }
+}
diff --git a/internal/thintest/stuck_contract_test.go b/internal/thintest/stuck_contract_test.go
new file mode 100644
index 00000000..ac735095
--- /dev/null
+++ b/internal/thintest/stuck_contract_test.go
@@ -0,0 +1,422 @@
+package thintest
+
+import (
+ "encoding/json"
+ "net/http"
+ "net/url"
+ "slices"
+ "strings"
+ "testing"
+
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// Stuck tasks (Paul, 2026-11-25: "empower Equipo to be more able to do
+// work"): the coordinator can see why a preview could not be scanned,
+// offer the person a one-tap retry of a failed merge, and run a failed
+// preview, checks or review again; it never merges or publishes.
+
+// toolsOf is status's runner tools.
+func toolsOf(t *testing.T, res wire.ToolResult) wire.ToolHealth {
+ t.Helper()
+ var out struct {
+ Runner struct {
+ Tools *wire.ToolHealth `json:"tools"`
+ } `json:"runner"`
+ }
+ if res.IsError || json.Unmarshal([]byte(res.Text), &out) != nil || out.Runner.Tools == nil {
+ t.Fatalf("status %+v", res)
+ }
+ return *out.Runner.Tools
+}
+
+// TestContractStatusToolHealth: status says whether the primary's pinned
+// preview scanner is installed and matches its pin, from its newest
+// hello; unknown when the runner does not say (an older runner). Never a
+// path.
+func TestContractStatusToolHealth(t *testing.T) {
+ r := newToolRigAt(t, wire.ProtocolCurrent)
+ if got := toolsOf(t, r.call("s1", wire.ToolStatus, map[string]string{})); got != (wire.ToolHealth{Scanner: wire.ToolUnknown}) {
+ t.Fatalf("an unsaid health %+v", got)
+ }
+ h := primaryAt(toolHello(r.runner.Welcome.Generation), wire.ProtocolCurrent)
+ h.Capabilities.Tools = &wire.ToolHealth{Scanner: wire.ToolMismatch}
+ if err := r.runner.Send(r.ctx, "h-tools", wire.FrameHello, h); err != nil {
+ t.Fatal(err)
+ }
+ r.client.Snapshot(r.ctx)
+ res := r.call("s2", wire.ToolStatus, map[string]string{})
+ if got := toolsOf(t, res); got != (wire.ToolHealth{Scanner: wire.ToolMismatch}) {
+ t.Fatalf("reported health %+v", got)
+ }
+ if strings.Contains(res.Text, "/opt/") || strings.Contains(res.Text, "/home/") || strings.Contains(res.Text, "gitleaks") {
+ t.Fatalf("status names a path: %s", res.Text)
+ }
+ // A report out of bounds is not believed: unknown again.
+ h.Capabilities.Tools = &wire.ToolHealth{Scanner: "fine"}
+ if err := r.runner.Send(r.ctx, "h-bad", wire.FrameHello, h); err != nil {
+ t.Fatal(err)
+ }
+ r.client.Snapshot(r.ctx)
+ if got := toolsOf(t, r.call("s3", wire.ToolStatus, map[string]string{})); got.Scanner != wire.ToolUnknown {
+ t.Fatalf("an invalid report believed %+v", got)
+ }
+}
+
+// TestContractOfferRetryMerge (stuck tasks c): the coordinator cannot
+// merge. For a merge that failed and ended, offer_retry puts the merge
+// card in front of the person, asking whether to try it again; nothing is
+// dispatched until they tap Merge, and then the merge is theirs, decided
+// by the gate for them. Asked again it is the one card; nothing to offer
+// while a merge runs or once the branch moved.
+func TestContractOfferRetryMerge(t *testing.T) {
+ r := newToolRigAt(t, wire.ProtocolCurrent)
+ ctx := r.ctx
+ base, cand := strings.Repeat("1", 40), strings.Repeat("2", 40)
+ id := r.judgedTask("o", "Fix the README typo", base, cand, wire.ChecksPassed, "")
+ m := r.dispatched(wire.SpecialistMerge, base, cand, 0)
+ if res := r.call("o1", wire.ToolOfferRetry, map[string]string{"task": id}); !res.IsError || res.Code != "no_failed_merge" {
+ t.Fatalf("offered while merging: %+v", res)
+ }
+ r.step("o-m-run", wire.StepReport{TaskID: id, StepID: m.StepID, Attempt: 1, State: wire.StepRunning, BaseSHA: base, CandidateSHA: cand})
+ r.step("o-m-fail", wire.StepReport{TaskID: id, StepID: m.StepID, Attempt: 1, State: wire.StepFailed, Reason: "merge_failed", BaseSHA: base, CandidateSHA: cand, Termination: true})
+ r.wait("ready again", func(c *Conversation) bool { return c.Tasks[id].Stage == wire.StageReadyToMerge })
+ res := r.call("o2", wire.ToolOfferRetry, map[string]string{"task": id})
+ if res.IsError || res.Code != "offered" || !strings.Contains(res.Text, "tap") {
+ t.Fatalf("offer %+v", res)
+ }
+ if refused := r.lease(r.runner, "o-ping", wire.LeaseCheck{}); refused != "" || r.heldKinds(wire.FrameDispatch) != 0 {
+ t.Fatalf("the offer dispatched something (%q)", refused)
+ }
+ k, _ := r.client.Task(ctx, id)
+ if last := k.Steps[len(k.Steps)-1]; k.Stage != wire.StageReadyToMerge || last.Specialist != wire.SpecialistMerge || last.Attempt != 1 || last.State != wire.StepFailed {
+ t.Fatalf("after the offer %s %+v", k.Stage, last)
+ }
+ var card wire.Card
+ r.wait("retry card", func(c *Conversation) bool {
+ for _, k := range c.Cards {
+ if k.Kind == wire.CardMerge && k.TaskID == id && k.State == wire.CardOpen {
+ card = k
+ }
+ }
+ return card.ID != ""
+ })
+ if card.Question != "Merging Fix the README typo didn’t go through. Try the merge again?" || !slices.Equal(card.Options, []string{wire.ChoiceMerge, wire.ChoiceNotNow}) {
+ t.Fatalf("card %+v", card)
+ }
+ if page := r.get(r.inst.Cookie(), "/conversation", 200); !strings.Contains(page, "didn’t go through. Try the merge again?") {
+ t.Fatal("the card is not on the page")
+ }
+ // Asked again in the turn: the first offer's result, still the one
+ // card; the same call, its stored result.
+ if again := r.call("o3", wire.ToolOfferRetry, map[string]string{"task": id}); again.IsError || again.Code != "offered" || !again.Replayed {
+ t.Fatalf("second offer %+v", again)
+ }
+ if same := r.call("o2", wire.ToolOfferRetry, map[string]string{"task": id}); same != res {
+ t.Fatalf("replay %+v", same)
+ }
+ if n := len(r.mergeCards(id)); n != 1 {
+ t.Fatalf("%d merge cards", n)
+ }
+ // The person's tap merges, as theirs.
+ if _, err := r.client.Answer(ctx, card.ID, wire.ChoiceMerge, card.Revision); err != nil {
+ t.Fatal(err)
+ }
+ _, body := r.expect(wire.FrameDispatch)
+ if d := body.(*wire.DispatchCommand); d.Specialist != wire.SpecialistMerge || d.CandidateSHA != cand || d.Attempt != 2 {
+ t.Fatalf("dispatch after the tap %+v", d)
+ }
+ if k, _ := r.client.Task(ctx, id); k.MergeDecision == nil || k.MergeDecision.DecidedBy != "person:"+Owner {
+ t.Fatalf("decision %+v", k.MergeDecision)
+ }
+ m.Attempt = 2
+ r.mergedStep("o-m2", m, strings.Repeat("e", 40))
+ r.wait("done", func(c *Conversation) bool { return c.Tasks[id].Stage == wire.StageDone })
+ // Merged: asked again in the same turn, only the ledger's first answer;
+ // no card is raised.
+ if res := r.call("o4", wire.ToolOfferRetry, map[string]string{"task": id}); !res.Replayed || r.count("SELECT count(*) FROM chat_cards WHERE task_id = ? AND kind = ? AND state = ?", id, wire.CardMerge, wire.CardOpen) != 0 {
+ t.Fatalf("offer on a merged task %+v", res)
+ }
+}
+
+// TestContractOfferRetryOnlyWhatTheTapCanMerge: a failed merge whose
+// branch moved since is not offered (the tap could not merge it).
+func TestContractOfferRetryOnlyWhatTheTapCanMerge(t *testing.T) {
+ r := newToolRigAt(t, wire.ProtocolCurrent)
+ base, cand := strings.Repeat("1", 40), strings.Repeat("2", 40)
+ id := r.judgedTask("n", "Fix the README typo", base, cand, wire.ChecksPassed, "")
+ m := r.dispatched(wire.SpecialistMerge, base, cand, 0)
+ r.step("n-m-fail", wire.StepReport{TaskID: id, StepID: m.StepID, Attempt: 1, State: wire.StepFailed, Reason: "merge_failed", BaseSHA: base, CandidateSHA: cand, Termination: true})
+ if err := r.runner.Send(r.ctx, "n-away", wire.FrameBranch, wire.BranchReport{TaskID: id, CandidateSHA: cand, Head: strings.Repeat("8", 40)}); err != nil {
+ t.Fatal(err)
+ }
+ r.wait("moved", func(c *Conversation) bool { return c.Tasks[id].NeedsYou == wire.NeedsBranchMoved })
+ if res := r.call("n1", wire.ToolOfferRetry, map[string]string{"task": id}); !res.IsError || res.Code != "not_mergeable" {
+ t.Fatalf("offered with the branch away %+v", res)
+ }
+ if len(r.mergeCards(id)) != 0 {
+ t.Fatal("a card was raised")
+ }
+}
+
+// previewedAndMerging is an approved candidate with a preview config on a
+// project that asks before merging: the preview is dispatched (step 4),
+// the person taps Merge (step 5, queued), and the preview fails: the
+// incident on tkbstr6cjl7h.
+func (r *toolRig) previewedAndMerging(key, base, cand string) (string, *wire.DispatchCommand, *wire.DispatchCommand) {
+ r.t.Helper()
+ r.asksBeforeMerging()
+ id, _ := r.pushed(key, "Barber mockups", base, cand)
+ r.expect(wire.FrameWatchMerge)
+ c := r.dispatched(wire.SpecialistChecks, base, cand, 0)
+ r.checks(key+"-c", c, wire.ChecksPassed, exit(0), "", "ok\n")
+ rv := r.dispatched(wire.SpecialistReview, base, cand, 0)
+ r.step(key+"-r", wire.StepReport{TaskID: rv.TaskID, StepID: rv.StepID, Attempt: rv.Attempt, State: wire.StepDone, BaseSHA: base, CandidateSHA: cand, Termination: true, Family: "codex", Account: "codex-a", Verdict: wire.VerdictApprove, ReviewLabel: wire.ReviewOtherFamily, Findings: []wire.Finding{}, Summary: "Read it.", HasPreview: true, Change: facts(rv)})
+ pv := r.previewDispatch(cand)
+ if pv == nil {
+ r.t.Fatal("no preview dispatched")
+ }
+ var card wire.Card
+ r.wait("merge card", func(c *Conversation) bool {
+ for _, k := range c.Cards {
+ if k.Kind == wire.CardMerge && k.TaskID == id && k.State == wire.CardOpen {
+ card = k
+ }
+ }
+ return card.ID != ""
+ })
+ if _, err := r.client.Answer(r.ctx, card.ID, wire.ChoiceMerge, card.Revision); err != nil {
+ r.t.Fatal(err)
+ }
+ m := r.dispatched(wire.SpecialistMerge, base, cand, 0)
+ // Its export was built, then publishing it failed.
+ r.built(key+"-pv-built", pv, digestA)
+ r.step(key+"-pv-fail", wire.StepReport{TaskID: id, StepID: pv.StepID, Attempt: 1, State: wire.StepFailed, Reason: "preview_failed", BaseSHA: base, CandidateSHA: cand, Termination: true, Findings: []wire.Finding{}})
+ return id, pv, m
+}
+
+// TestContractRetryFailedPreviewAfterMerge (stuck tasks d): a preview that
+// failed while the merge went ahead can be run again by its person from
+// the task page: a new attempt of that preview for the current candidate,
+// recomputed (its export reported afresh) and published only through the
+// preview's own guards, the merge and the task's stage untouched. Retry
+// with no step still means the newest step, which is the merge.
+func TestContractRetryFailedPreviewAfterMerge(t *testing.T) {
+ r := publicPreviewRig(t)
+ base, cand := strings.Repeat("1", 40), strings.Repeat("2", 40)
+ id, pv, m := r.previewedAndMerging("v", base, cand)
+ if _, err := r.client.RetryTask(r.ctx, id); Status(err) != 409 {
+ t.Fatalf("Retry with the merge queued: %v", err)
+ }
+ form := `<input type="hidden" name="step" value="` + pv.StepID + `">`
+ page := r.get(r.inst.Cookie(), "/tasks/"+id, 200)
+ if !strings.Contains(page, form) || !strings.Contains(page, "data-step-retry") {
+ t.Fatal("the failed preview offers no Retry")
+ }
+ if p := r.get(r.memberCookie(), "/tasks/"+id, 200); strings.Contains(p, "data-step-retry") {
+ t.Fatal("a teammate is offered the preview's Retry")
+ }
+ before, _ := r.client.Task(r.ctx, id)
+ if status, at := r.post(r.inst.Cookie(), "/conversation/tasks/"+id+"/retry", url.Values{"from": {"task"}, "step": {pv.StepID}}); status != http.StatusSeeOther || at != "/tasks/"+id {
+ t.Fatalf("Retry the preview: %d %s", status, at)
+ }
+ again := r.previewDispatch(cand)
+ if again == nil || again.StepID != pv.StepID || again.Attempt != 2 || again.CandidateSHA != cand {
+ t.Fatalf("the preview again %+v", again)
+ }
+ k, _ := r.client.Task(r.ctx, id)
+ if k.Stage != before.Stage || k.Stage != wire.StageMerging {
+ t.Fatalf("the preview moved the task: %s to %s", before.Stage, k.Stage)
+ }
+ for _, s := range k.Steps {
+ if s.ID == m.StepID && (s.Attempt != 1 || s.State != wire.StepQueued && s.State != wire.StepRunning) {
+ t.Fatalf("the merge was touched %+v", s)
+ }
+ if s.ID == pv.StepID && (s.State != wire.StepQueued || s.Preview != nil) {
+ t.Fatalf("the preview kept its old export %+v %+v", s, s.Preview)
+ }
+ }
+ // Recomputed: nothing publishes until this attempt's export is built.
+ if refused := r.lease(r.runner, "v-start", wire.LeaseCheck{StepID: again.StepID, Attempt: 2}); refused != "" {
+ t.Fatalf("start refused %q", refused)
+ }
+ if refused := r.lease(r.runner, "v-early", wire.LeaseCheck{StepID: again.StepID, Attempt: 2, Purpose: wire.LeasePurposePreview, Digest: digestA}); refused != wire.RefusedPreviewNotBuilt {
+ t.Fatalf("publish before built: %q", refused)
+ }
+ r.built("v-built", again, digestB)
+ if refused := r.lease(r.runner, "v-pub", wire.LeaseCheck{StepID: again.StepID, Attempt: 2, Purpose: wire.LeasePurposePreview, Digest: digestB}); refused != "" {
+ t.Fatalf("publish refused %q", refused)
+ }
+ // Asked again while it runs: nothing more.
+ r.post(r.inst.Cookie(), "/conversation/tasks/"+id+"/retry", url.Values{"from": {"task"}, "step": {pv.StepID}})
+ if extra := r.previewDispatch(cand); extra != nil {
+ t.Fatalf("a second preview attempt %+v", extra)
+ }
+ if page := r.get(r.inst.Cookie(), "/tasks/"+id, 200); strings.Contains(page, "data-step-retry") {
+ t.Fatal("Retry still offered on a running preview")
+ }
+}
+
+// TestContractRetryPreviewOnlyForTheCandidate: a failed preview of a
+// candidate the branch moved away from is not run again.
+func TestContractRetryPreviewOnlyForTheCandidate(t *testing.T) {
+ r := publicPreviewRig(t)
+ base, cand := strings.Repeat("1", 40), strings.Repeat("2", 40)
+ id, pv, _ := r.previewedAndMerging("w", base, cand)
+ if err := r.runner.Send(r.ctx, "w-away", wire.FrameBranch, wire.BranchReport{TaskID: id, CandidateSHA: cand, Head: strings.Repeat("8", 40)}); err != nil {
+ t.Fatal(err)
+ }
+ r.wait("moved", func(c *Conversation) bool { return c.Tasks[id].NeedsYou == wire.NeedsBranchMoved })
+ r.post(r.inst.Cookie(), "/conversation/tasks/"+id+"/retry", url.Values{"from": {"task"}, "step": {pv.StepID}})
+ if again := r.previewDispatch(cand); again != nil {
+ t.Fatalf("a preview of a candidate the branch left %+v", again)
+ }
+}
+
+// TestContractCoordinatorRetryStep (stuck tasks b): retry_step runs a
+// failed preview, checks or review again with exactly the person's Retry
+// (the creator's task, an owner, ended and failed, the newest step), as
+// the next attempt, and the task page says the coordinator started it.
+// Never a merge, a publish or the work itself: those are refused and
+// nothing is dispatched.
+func TestContractCoordinatorRetryStep(t *testing.T) {
+ r := newToolRigAt(t, wire.ProtocolCurrent)
+ base, cand := strings.Repeat("1", 40), strings.Repeat("2", 40)
+ id, _ := r.pushed("b", "Fix the README typo", base, cand)
+ r.expect(wire.FrameWatchMerge)
+ c := r.dispatched(wire.SpecialistChecks, base, cand, 0)
+ if res := r.call("b0", wire.ToolRetryStep, map[string]string{"task": id, "step": wire.SpecialistChecks}); !res.IsError || res.Code != "not_retryable" {
+ t.Fatalf("retry of queued checks %+v", res)
+ }
+ r.step("b-c-fail", wire.StepReport{TaskID: id, StepID: c.StepID, Attempt: 1, State: wire.StepFailed, Reason: "provider_failed", BaseSHA: base, CandidateSHA: cand, Termination: true, Findings: []wire.Finding{}})
+ for _, kind := range []string{wire.SpecialistMerge, wire.SpecialistPublish, wire.SpecialistEngineering, "anything"} {
+ if res := r.call("b-"+kind, wire.ToolRetryStep, map[string]string{"task": id, "step": kind}); !res.IsError || res.Code != "invalid" {
+ t.Fatalf("retry_step %s: %+v", kind, res)
+ }
+ }
+ if refused := r.lease(r.runner, "b-ping", wire.LeaseCheck{}); refused != "" || r.heldKinds(wire.FrameDispatch) != 0 {
+ t.Fatal("a refused retry dispatched something")
+ }
+ res := r.call("b1", wire.ToolRetryStep, map[string]string{"task": id, "step": wire.SpecialistChecks})
+ if res.IsError || res.Code != "retrying" {
+ t.Fatalf("retry_step %+v", res)
+ }
+ _, body := r.expect(wire.FrameDispatch)
+ if d := body.(*wire.DispatchCommand); d.Specialist != wire.SpecialistChecks || d.StepID != c.StepID || d.Attempt != 2 || d.CandidateSHA != cand {
+ t.Fatalf("dispatch %+v", d)
+ }
+ k, _ := r.client.Task(r.ctx, id)
+ if s := k.Steps[len(k.Steps)-1]; s.ID != c.StepID || s.Attempt != 2 || s.RetriedBy != wire.RetriedByCoordinator {
+ t.Fatalf("the step %+v", s)
+ }
+ if page := r.get(r.inst.Cookie(), "/tasks/"+id, 200); !strings.Contains(page, "The coordinator started Checks again.") {
+ t.Fatal("the timeline does not say the coordinator started it")
+ }
+ if r.audits("task.retry") != 1 {
+ t.Fatalf("audits %d", r.audits("task.retry"))
+ }
+ // Once per turn: asked again with a fresh call while it runs, and
+ // again once that attempt failed and ended, the ledger answers with
+ // the first result and nothing more runs.
+ if again := r.call("b2", wire.ToolRetryStep, map[string]string{"task": id, "step": wire.SpecialistChecks}); again.IsError || again.Code != "retrying" || !again.Replayed {
+ t.Fatalf("second retry_step %+v", again)
+ }
+ if same := r.call("b1", wire.ToolRetryStep, map[string]string{"task": id, "step": wire.SpecialistChecks}); same != res {
+ t.Fatalf("replay %+v", same)
+ }
+ if refused := r.lease(r.runner, "b-ping2", wire.LeaseCheck{}); refused != "" || r.heldKinds(wire.FrameDispatch) != 0 {
+ t.Fatal("a second dispatch")
+ }
+ r.step("b-c2-fail", wire.StepReport{TaskID: id, StepID: c.StepID, Attempt: 2, State: wire.StepFailed, Reason: "provider_failed", BaseSHA: base, CandidateSHA: cand, Termination: true, Findings: []wire.Finding{}})
+ if again := r.call("b3", wire.ToolRetryStep, map[string]string{"task": id, "step": wire.SpecialistChecks}); again.IsError || again.Code != "retrying" || !again.Replayed {
+ t.Fatalf("retry_step after the retry failed %+v", again)
+ }
+ if refused := r.lease(r.runner, "b-ping3", wire.LeaseCheck{}); refused != "" || r.heldKinds(wire.FrameDispatch) != 0 {
+ t.Fatal("a third attempt in the same turn")
+ }
+ if k, _ := r.client.Task(r.ctx, id); k.Steps[len(k.Steps)-1].Attempt != 2 || k.Steps[len(k.Steps)-1].State != wire.StepFailed || r.audits("task.retry") != 1 {
+ t.Fatalf("after the fresh call %+v, %d audits", k.Steps[len(k.Steps)-1], r.audits("task.retry"))
+ }
+ // The person's own Retry later is theirs: the page no longer credits
+ // the coordinator.
+ if acc, err := r.client.RetryTask(r.ctx, id); err != nil || acc.Attempt != 3 {
+ t.Fatalf("the person's Retry %+v %v", acc, err)
+ }
+ if k, _ := r.client.Task(r.ctx, id); k.Steps[len(k.Steps)-1].RetriedBy != "" {
+ t.Fatal("the person's attempt credited to the coordinator")
+ }
+}
+
+// TestContractCoordinatorRetryNeverMerges: a failed merge is not the
+// coordinator's to retry (offer_retry is); a failed preview behind the
+// queued merge is, as the person's Retry would run it.
+func TestContractCoordinatorRetryNeverMerges(t *testing.T) {
+ r := publicPreviewRig(t)
+ base, cand := strings.Repeat("1", 40), strings.Repeat("2", 40)
+ id, pv, m := r.previewedAndMerging("x", base, cand)
+ res := r.call("x1", wire.ToolRetryStep, map[string]string{"task": id, "step": wire.SpecialistPreview})
+ if res.IsError || res.Code != "retrying" {
+ t.Fatalf("retry_step preview %+v", res)
+ }
+ if again := r.previewDispatch(cand); again == nil || again.StepID != pv.StepID || again.Attempt != 2 {
+ t.Fatalf("the preview again %+v", again)
+ }
+ k, _ := r.client.Task(r.ctx, id)
+ for _, s := range k.Steps {
+ if s.ID == pv.StepID && s.RetriedBy != wire.RetriedByCoordinator {
+ t.Fatalf("the preview's attempt is not the coordinator's %+v", s)
+ }
+ }
+ r.step("x-m-fail", wire.StepReport{TaskID: id, StepID: m.StepID, Attempt: 1, State: wire.StepFailed, Reason: "merge_failed", BaseSHA: base, CandidateSHA: cand, Termination: true})
+ r.wait("ready again", func(c *Conversation) bool { return c.Tasks[id].Stage == wire.StageReadyToMerge })
+ if res := r.call("x2", wire.ToolRetryStep, map[string]string{"task": id, "step": wire.SpecialistMerge}); !res.IsError || res.Code != "invalid" {
+ t.Fatalf("retry_step merge %+v", res)
+ }
+ if refused := r.lease(r.runner, "x-ping", wire.LeaseCheck{}); refused != "" || r.heldKinds(wire.FrameDispatch) != 0 {
+ t.Fatal("the coordinator's call dispatched a merge")
+ }
+ if k, _ := r.client.Task(r.ctx, id); k.Stage != wire.StageReadyToMerge || k.Merged != nil {
+ t.Fatalf("after retry_step merge %+v", k)
+ }
+}
+
+// TestContractOfferRetryOncePerTurn: after the person taps Not now, a
+// fresh offer_retry call in the same turn reopens nothing: the ledger
+// answers with the first offer, and no card, merge or audit is added.
+func TestContractOfferRetryOncePerTurn(t *testing.T) {
+ r := newToolRigAt(t, wire.ProtocolCurrent)
+ base, cand := strings.Repeat("1", 40), strings.Repeat("2", 40)
+ id := r.judgedTask("q", "Fix the README typo", base, cand, wire.ChecksPassed, "")
+ m := r.dispatched(wire.SpecialistMerge, base, cand, 0)
+ r.step("q-m-fail", wire.StepReport{TaskID: id, StepID: m.StepID, Attempt: 1, State: wire.StepFailed, Reason: "merge_failed", BaseSHA: base, CandidateSHA: cand, Termination: true})
+ r.wait("ready again", func(c *Conversation) bool { return c.Tasks[id].Stage == wire.StageReadyToMerge })
+ if res := r.call("q1", wire.ToolOfferRetry, map[string]string{"task": id}); res.IsError || res.Code != "offered" {
+ t.Fatalf("offer %+v", res)
+ }
+ var card wire.Card
+ r.wait("retry card", func(c *Conversation) bool {
+ for _, k := range c.Cards {
+ if k.Kind == wire.CardMerge && k.TaskID == id && k.State == wire.CardOpen {
+ card = k
+ }
+ }
+ return card.ID != ""
+ })
+ if _, err := r.client.Answer(r.ctx, card.ID, wire.ChoiceNotNow, card.Revision); err != nil {
+ t.Fatal(err)
+ }
+ cards, audits := r.count("SELECT count(*) FROM chat_cards WHERE task_id = ? AND kind = ?", id, wire.CardMerge), r.audits("task.merge_retry_offered")
+ again := r.call("q2", wire.ToolOfferRetry, map[string]string{"task": id})
+ if again.IsError || again.Code != "offered" || !again.Replayed {
+ t.Fatalf("offer after Not now %+v", again)
+ }
+ if refused := r.lease(r.runner, "q-ping", wire.LeaseCheck{}); refused != "" || r.heldKinds(wire.FrameDispatch) != 0 {
+ t.Fatal("the second offer dispatched something")
+ }
+ if n := r.count("SELECT count(*) FROM chat_cards WHERE task_id = ? AND kind = ? AND state = ?", id, wire.CardMerge, wire.CardOpen); n != 0 {
+ t.Fatalf("%d open merge cards after Not now", n)
+ }
+ if n := r.count("SELECT count(*) FROM chat_cards WHERE task_id = ? AND kind = ?", id, wire.CardMerge); n != cards || r.audits("task.merge_retry_offered") != audits {
+ t.Fatalf("cards %d (was %d), audits %d (was %d)", n, cards, r.audits("task.merge_retry_offered"), audits)
+ }
+}
diff --git a/internal/wire/assistant_test.go b/internal/wire/assistant_test.go
index bd7e99ae..3d0b8ab5 100644
--- a/internal/wire/assistant_test.go
+++ b/internal/wire/assistant_test.go
@@ -81,7 +81,7 @@ func TestAssistantCardJSON(t *testing.T) {
// A runner that speaks 24 or more is spoken to at 24, the warm
// protocol; glances came at 23 and jobs at 22.
func TestSpokenIs24(t *testing.T) {
- if wire.Spoken(99) != 29 || wire.ProtocolCurrent != wire.ProtocolPinnedRelease || wire.ProtocolWarm != wire.Protocol24 || wire.ProtocolGlance != wire.Protocol23 || wire.ProtocolJobs != wire.Protocol22 || wire.ProtocolCopy != wire.Protocol21 || wire.ProtocolUsageRefresh != wire.Protocol20 || wire.ProtocolAssistant != wire.Protocol19 {
+ if wire.Spoken(99) != 30 || wire.ProtocolCurrent != wire.ProtocolStuckTasks || wire.ProtocolWarm != wire.Protocol24 || wire.ProtocolGlance != wire.Protocol23 || wire.ProtocolJobs != wire.Protocol22 || wire.ProtocolCopy != wire.Protocol21 || wire.ProtocolUsageRefresh != wire.Protocol20 || wire.ProtocolAssistant != wire.Protocol19 {
t.Fatalf("spoken %d, current %d", wire.Spoken(99), wire.ProtocolCurrent)
}
}
diff --git a/internal/wire/frames.go b/internal/wire/frames.go
index 527b9f1a..0f09798a 100644
--- a/internal/wire/frames.go
+++ b/internal/wire/frames.go
@@ -583,7 +583,7 @@ const (
)
// ConverseTools is the coordinator's tool set in a conversation.
-var ConverseTools = []string{ToolRequestAccess, ToolStatus, ToolFind, ToolSearchCode, ToolReadFile, ToolAddProject, ToolCreateProject, ToolSetProjectHome, ToolStarProject, ToolAskPerson, ToolWriteNote, ToolReadNotes, ToolRecordTask, ToolAddFinding, ToolStartTask, ToolReadTask, ToolCancelTask, ToolAddReport, ToolHoldMerge, ToolSetMergePolicy, ToolProposeSpecialist, ToolResearch}
+var ConverseTools = []string{ToolRequestAccess, ToolStatus, ToolFind, ToolSearchCode, ToolReadFile, ToolAddProject, ToolCreateProject, ToolSetProjectHome, ToolStarProject, ToolAskPerson, ToolWriteNote, ToolReadNotes, ToolRecordTask, ToolAddFinding, ToolStartTask, ToolReadTask, ToolCancelTask, ToolAddReport, ToolHoldMerge, ToolSetMergePolicy, ToolProposeSpecialist, ToolResearch, ToolOfferRetry, ToolRetryStep}
// MoveInTools are the tools a move_in or explore turn may use: it looks
// around and takes notes, and never acts for the person.
@@ -676,12 +676,16 @@ var MutationKinds = map[string]string{
ToolProposeSpecialist: "specialist",
// One research request per task in a turn, in any attempt and wording.
ToolResearch: "research",
+ // One offer of a failed merge per task in a turn.
+ ToolOfferRetry: "retry_offer",
+ // One retry per task and step kind in a turn.
+ ToolRetryStep: "task_retry",
}
// WriteTools change something outside the coordinator's session: the
// runner replays an exact repeat of one in a later attempt from its own
// record.
-var WriteTools = []string{ToolRequestAccess, ToolAddProject, ToolCreateProject, ToolSetProjectHome, ToolStarProject, ToolAskPerson, ToolWriteNote, ToolRecordTask, ToolAddFinding, ToolStartTask, ToolCancelTask, ToolAddReport, ToolHoldMerge, ToolSetMergePolicy, ToolProjectCreated, ToolProposeSpecialist, ToolResearch}
+var WriteTools = []string{ToolRequestAccess, ToolAddProject, ToolCreateProject, ToolSetProjectHome, ToolStarProject, ToolAskPerson, ToolWriteNote, ToolRecordTask, ToolAddFinding, ToolStartTask, ToolCancelTask, ToolAddReport, ToolHoldMerge, ToolSetMergePolicy, ToolProjectCreated, ToolProposeSpecialist, ToolResearch, ToolOfferRetry, ToolRetryStep}
// ActivityReport is what the coordinator started doing: thinking, or a
// tool by name. Sent once, never acked, like a delta.
diff --git a/internal/wire/injection_test.go b/internal/wire/injection_test.go
index ac4325fa..e6678b6c 100644
--- a/internal/wire/injection_test.go
+++ b/internal/wire/injection_test.go
@@ -7,10 +7,10 @@ import (
)
func TestInjectionProtocolDowngrade(t *testing.T) {
- if wire.ProtocolInjectionDefences != 28 || wire.ProtocolCurrent != 29 {
+ if wire.ProtocolInjectionDefences != 28 || wire.ProtocolCurrent != 30 {
t.Fatal("injection guarantees require protocol 28")
}
- for version, want := range map[int]int{26: 26, 27: 27, 28: 28, 29: 29, 99: 29} {
+ for version, want := range map[int]int{26: 26, 27: 27, 28: 28, 29: 29, 30: 30, 99: 30} {
if got := wire.Spoken(version); got != want {
t.Fatalf("negotiated %d as %d, want %d", version, got, want)
}
diff --git a/internal/wire/mixed_protocol_test.go b/internal/wire/mixed_protocol_test.go
index 195b6574..38424ed1 100644
--- a/internal/wire/mixed_protocol_test.go
+++ b/internal/wire/mixed_protocol_test.go
@@ -15,7 +15,7 @@ import (
// both go out whole; at 11 both are downgraded. The numbers are written
// out so that pointing ProtocolResearch back at 12 fails here.
func TestEncodeMixedMeteredAndResearch(t *testing.T) {
- if wire.ProtocolMetered != wire.Protocol12 || wire.ProtocolResearch != wire.Protocol13 || wire.ProtocolCurrent != wire.Protocol29 {
+ if wire.ProtocolMetered != wire.Protocol12 || wire.ProtocolResearch != wire.Protocol13 || wire.ProtocolCurrent != wire.Protocol30 {
t.Fatalf("metered %d, research %d, current %d", wire.ProtocolMetered, wire.ProtocolResearch, wire.ProtocolCurrent)
}
metered := wire.HeldConnection{LocalID: "tensorx-1", Person: "p", Provider: wire.ProviderTensorX, Kind: wire.KindAPIKey, State: wire.ConnHealthy, Harness: wire.HarnessPi, Upstream: "https://api.tensorx.ai", Billing: wire.BillingMetered, Model: "z-ai/glm-5.3", Budget: &wire.Budget{Day: 1, Month: 2, Currency: "USD"}, Spend: &wire.Spend{Currency: "USD"}}
diff --git a/internal/wire/models_test.go b/internal/wire/models_test.go
index 8cfe64b0..28012643 100644
--- a/internal/wire/models_test.go
+++ b/internal/wire/models_test.go
@@ -94,7 +94,7 @@ func modelsFrames(t *testing.T) map[string]wire.Frame {
// protocol is checked because an older step in Encode's chain could
// undo a newer one (S5's bug).
func TestEncodeBelowProtocol18AgainstFrozenSchemas(t *testing.T) {
- if wire.ProtocolModels != wire.Protocol18 || wire.ProtocolCurrent != wire.Protocol29 {
+ if wire.ProtocolModels != wire.Protocol18 || wire.ProtocolCurrent != wire.Protocol30 {
t.Fatalf("models %d, current %d", wire.ProtocolModels, wire.ProtocolCurrent)
}
fs := modelsFrames(t)
diff --git a/internal/wire/opencode_test.go b/internal/wire/opencode_test.go
index b4806cde..ef98f25b 100644
--- a/internal/wire/opencode_test.go
+++ b/internal/wire/opencode_test.go
@@ -57,7 +57,7 @@ func providersIn(t *testing.T, raw []byte) (providers, harnesses []string) {
// leave hello and sync, its usage rows leave every report, and a connect
// or a report about one is refused. At 17 nothing changes.
func TestEncodeBelowProtocol17DropsOpenCode(t *testing.T) {
- if wire.ProtocolOpenCode != wire.Protocol17 || wire.ProtocolCurrent != wire.Protocol29 {
+ if wire.ProtocolOpenCode != wire.Protocol17 || wire.ProtocolCurrent != wire.Protocol30 {
t.Fatalf("opencode %d, current %d", wire.ProtocolOpenCode, wire.ProtocolCurrent)
}
budget := &wire.Budget{Day: 1_000_000, Month: 10_000_000, Currency: "USD", Revision: 1}
diff --git a/internal/wire/pinned_release_test.go b/internal/wire/pinned_release_test.go
index 9e602f3c..0a71599a 100644
--- a/internal/wire/pinned_release_test.go
+++ b/internal/wire/pinned_release_test.go
@@ -13,7 +13,7 @@ import (
// carrying a pinned release loses the release and its pin; an unpinned
// release is unchanged from protocol 14.
func TestEncodePinnedReleaseBelow29(t *testing.T) {
- if wire.ProtocolPinnedRelease != wire.Protocol29 || wire.ProtocolCurrent != wire.Protocol29 {
+ if wire.ProtocolPinnedRelease != wire.Protocol29 || wire.ProtocolCurrent != wire.Protocol30 {
t.Fatalf("pinned %d, current %d", wire.ProtocolPinnedRelease, wire.ProtocolCurrent)
}
pinned, err := wire.NewFrame("f1", wire.FrameRelease, wire.ReleaseCommand{ID: "rl_1", Person: "p", TaskID: "tk1", StepID: "s1", StepRevision: 1, Connection: "claude-1"})
diff --git a/internal/wire/publish_test.go b/internal/wire/publish_test.go
index 129d9f2e..6f940f0d 100644
--- a/internal/wire/publish_test.go
+++ b/internal/wire/publish_test.go
@@ -17,7 +17,7 @@ import (
// and a hello's sites capability are dropped, so nothing a protocol 15
// peer decodes strictly carries them.
func TestEncodeBelowProtocol16DropsPublish(t *testing.T) {
- if wire.ProtocolPublish != wire.Protocol16 || wire.ProtocolCurrent != wire.Protocol29 {
+ if wire.ProtocolPublish != wire.Protocol16 || wire.ProtocolCurrent != wire.Protocol30 {
t.Fatalf("publish %d, current %d", wire.ProtocolPublish, wire.ProtocolCurrent)
}
publish := wire.DispatchCommand{Person: "p", TaskID: "tk", StepID: "s", Attempt: 1, Specialist: wire.SpecialistPublish, Findings: []wire.Finding{}, CandidateSHA: strings.Repeat("e", 40), Publish: &wire.PublishDispatch{App: "site-sample", Into: "main"}}
diff --git a/internal/wire/runners.go b/internal/wire/runners.go
index 1d82a593..a1c77dc5 100644
--- a/internal/wire/runners.go
+++ b/internal/wire/runners.go
@@ -55,6 +55,7 @@ const (
Protocol27 = 27
Protocol28 = 28
Protocol29 = 29
+ Protocol30 = 30
// ProtocolSpend is the first protocol with a fix round's Feedback and
// a usage row's Turns; Encode drops both below it.
ProtocolSpend = Protocol3
@@ -188,7 +189,12 @@ const (
// leave anywhere, metered included, so it is never handed one. The
// instance offers an older runner plain Run now, with no promise.
ProtocolPinnedRelease = Protocol29
- ProtocolCurrent = ProtocolPinnedRelease
+ // ProtocolStuckTasks adds the coordinator's powers for stuck tasks
+ // (stuck.go): a hello's tool health and the coordinator's offer_retry.
+ // Below it Encode drops the tool health and refuses the tool's call
+ // (downgradeStuck).
+ ProtocolStuckTasks = Protocol30
+ ProtocolCurrent = ProtocolStuckTasks
)
// Runner roles. A person's first runner is the primary: the coordinator,
@@ -268,6 +274,9 @@ type Capabilities struct {
// Sites (ProtocolPublish): this runner is paired with a site host and
// can publish a merged website. Withheld until the welcome says 16.
Sites bool `json:"sites,omitempty"`
+ // Tools (ProtocolStuckTasks): whether the runner's pinned tools are
+ // installed and match their pins. Withheld until the welcome says 30.
+ Tools *ToolHealth `json:"tools,omitempty"`
}
// PreviewHost is a preview host a runner pairs with: its kind (an
@@ -362,6 +371,9 @@ func ValidCapabilities(c Capabilities) error {
if h := c.PreviewHost; h != nil && (!c.Previews || h.Kind != PreviewHostDevbox && h.Kind != PreviewHostCarlokuTemp || h.Domain != "" && (len(h.Domain) > 253 || !previewHostDomain.MatchString(h.Domain))) {
return ErrCapabilities
}
+ if h := c.Tools; h != nil && !validToolHealth(*h) {
+ return ErrCapabilities
+ }
if err := checkStrings(reflect.ValueOf(c)); err != nil {
return err
}
@@ -618,6 +630,13 @@ func Encode(f Frame, protocol int) (Frame, error) {
return Frame{}, ErrProtocol
}
changed := false
+ if protocol < ProtocolStuckTasks {
+ dropped, err := downgradeStuck(body, protocol)
+ if err != nil {
+ return Frame{}, err
+ }
+ changed = dropped
+ }
if protocol < ProtocolPinnedRelease {
if v, ok := body.(*ReleaseCommand); ok && v.Connection != "" {
return Frame{}, fmt.Errorf("%w: a pinned release at protocol %d", ErrProtocol, protocol)
diff --git a/internal/wire/runners_test.go b/internal/wire/runners_test.go
index d7f2be8e..cbf4fdd6 100644
--- a/internal/wire/runners_test.go
+++ b/internal/wire/runners_test.go
@@ -413,7 +413,7 @@ func TestEncodeBelowProtocol9DropsPreviews(t *testing.T) {
if _, err := wire.Encode(d, wire.ProtocolPreview); err != nil {
t.Fatal(err)
}
- if wire.ProtocolCurrent != wire.ProtocolPinnedRelease || wire.ProtocolPinnedRelease != 29 || wire.ProtocolInjectionDefences != 28 || wire.ProtocolWarm != 24 || wire.ProtocolGlance != 23 || wire.ProtocolJobs != 22 || wire.ProtocolCopy != 21 || wire.ProtocolUsageRefresh != 20 || wire.ProtocolAssistant != 19 || wire.ProtocolModels != 18 || wire.ProtocolOpenCode != 17 || wire.ProtocolPublish != 16 || wire.ProtocolReadings != 15 || wire.ProtocolScheduler != 14 || wire.ProtocolResearch != 13 || wire.ProtocolMetered != 12 || wire.ProtocolPreviewHost != 11 || wire.ProtocolExplore != 10 || wire.ProtocolPreview != 9 {
+ if wire.ProtocolCurrent != wire.ProtocolStuckTasks || wire.ProtocolStuckTasks != 30 || wire.ProtocolPinnedRelease != 29 || wire.ProtocolInjectionDefences != 28 || wire.ProtocolWarm != 24 || wire.ProtocolGlance != 23 || wire.ProtocolJobs != 22 || wire.ProtocolCopy != 21 || wire.ProtocolUsageRefresh != 20 || wire.ProtocolAssistant != 19 || wire.ProtocolModels != 18 || wire.ProtocolOpenCode != 17 || wire.ProtocolPublish != 16 || wire.ProtocolReadings != 15 || wire.ProtocolScheduler != 14 || wire.ProtocolResearch != 13 || wire.ProtocolMetered != 12 || wire.ProtocolPreviewHost != 11 || wire.ProtocolExplore != 10 || wire.ProtocolPreview != 9 {
t.Fatalf("current %d", wire.ProtocolCurrent)
}
}
diff --git a/internal/wire/schedule_test.go b/internal/wire/schedule_test.go
index 12bd0b98..50478281 100644
--- a/internal/wire/schedule_test.go
+++ b/internal/wire/schedule_test.go
@@ -17,7 +17,7 @@ import (
// refused anything that spends, never handed it), and a dispatch loses
// its priority, deadline and release; what 13 already had is unchanged.
func TestEncodeBelowProtocol14DropsScheduler(t *testing.T) {
- if wire.ProtocolScheduler != wire.Protocol14 || wire.ProtocolCurrent != wire.Protocol29 {
+ if wire.ProtocolScheduler != wire.Protocol14 || wire.ProtocolCurrent != wire.Protocol30 {
t.Fatalf("scheduler %d, current %d", wire.ProtocolScheduler, wire.ProtocolCurrent)
}
by := time.Date(2026, 11, 20, 17, 0, 0, 0, time.UTC)
diff --git a/internal/wire/stuck.go b/internal/wire/stuck.go
new file mode 100644
index 00000000..6d930a7a
--- /dev/null
+++ b/internal/wire/stuck.go
@@ -0,0 +1,88 @@
+package wire
+
+import (
+ "fmt"
+ "slices"
+)
+
+// Stuck tasks (coordinator powers, Paul 2026-11-25): ProtocolStuckTasks
+// adds the runner's tool health to its capabilities, so the coordinator's
+// status can say why a preview could not be scanned, and the
+// coordinator's offer_retry and retry_step. Below it Encode drops a hello's tool health
+// and refuses the tools' calls: an older instance decodes a hello
+// strictly and has no words for either.
+
+// ToolOfferRetry puts a card in front of the person to try a failed merge
+// again; only their tap merges (the merge card's Merge). ToolRetryStep
+// runs a failed step of RetryStepKinds again, as the person's Retry would.
+const (
+ ToolOfferRetry = "offer_retry"
+ ToolRetryStep = "retry_step"
+)
+
+// StuckTools are ProtocolStuckTasks's coordinator tools.
+var StuckTools = []string{ToolOfferRetry, ToolRetryStep}
+
+// RetryStepKinds are the steps retry_step may run again: never a merge, a
+// publish, or the work itself (Engineering, Copy).
+var RetryStepKinds = []string{SpecialistPreview, SpecialistChecks, SpecialistReview}
+
+// RetriedByCoordinator is a step's RetriedBy when the coordinator's
+// retry_step started its current attempt.
+const RetriedByCoordinator = "coordinator"
+
+// ToolHealth is whether the runner's pinned tools are installed and
+// match their pins, one fixed state each (ToolHealthy and the rest):
+// never a path, a digest or a tool's output. Scanner is the preview's
+// secret scanner (gitleaks at release.GitleaksVersion); Renderer is a
+// page renderer's, absent while the runner has none.
+type ToolHealth struct {
+ Scanner string `json:"scanner"`
+ Renderer string `json:"renderer,omitempty"`
+}
+
+// Tool health states. ToolUnknown is the instance's word for a runner
+// that did not say (an older one); a runner never reports it.
+const (
+ ToolHealthy = "ok"
+ ToolMissing = "missing"
+ ToolMismatch = "mismatch"
+ ToolUnpinned = "unpinned"
+ ToolUnknown = "unknown"
+)
+
+var toolStates = []string{ToolHealthy, ToolMissing, ToolMismatch, ToolUnpinned}
+
+// validToolHealth reports whether a runner's report is in the fixed set:
+// the scanner always said, the renderer only when there is one.
+func validToolHealth(h ToolHealth) bool {
+ return slices.Contains(toolStates, h.Scanner) && (h.Renderer == "" || slices.Contains(toolStates, h.Renderer))
+}
+
+// WithoutToolHealth drops a hello's tool health, in a copy. The first
+// hello is sent before the instance says its protocol: an older
+// instance's strict decoder would refuse it. It reports whether it
+// dropped anything.
+func WithoutToolHealth(h *Hello) bool {
+ if h.Capabilities == nil || h.Capabilities.Tools == nil {
+ return false
+ }
+ c := *h.Capabilities
+ c.Tools = nil
+ h.Capabilities = &c
+ return true
+}
+
+// downgradeStuck clears ProtocolStuckTasks's fields for an older peer
+// and refuses its tools' calls outright.
+func downgradeStuck(body any, protocol int) (bool, error) {
+ switch v := body.(type) {
+ case *Hello:
+ return WithoutToolHealth(v), nil
+ case *ToolCall:
+ if slices.Contains(StuckTools, v.Name) {
+ return false, fmt.Errorf("%w: %s at protocol %d", ErrProtocol, v.Name, protocol)
+ }
+ }
+ return false, nil
+}
diff --git a/internal/wire/stuck_test.go b/internal/wire/stuck_test.go
new file mode 100644
index 00000000..337db477
--- /dev/null
+++ b/internal/wire/stuck_test.go
@@ -0,0 +1,84 @@
+package wire_test
+
+import (
+ "bytes"
+ "encoding/json"
+ "errors"
+ "slices"
+ "strings"
+ "testing"
+
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// Stuck tasks (protocol 30): a hello's tool health is a fixed state per
+// pinned tool, never a path, and an older instance never hears it.
+func TestProtocol30ToolHealth(t *testing.T) {
+ if wire.ProtocolStuckTasks != wire.Protocol30 || wire.ProtocolCurrent != wire.Protocol30 || wire.Spoken(99) != 30 {
+ t.Fatalf("stuck %d, current %d", wire.ProtocolStuckTasks, wire.ProtocolCurrent)
+ }
+ caps := func(h *wire.ToolHealth) wire.Capabilities {
+ return wire.Capabilities{Tags: []string{wire.TagLinux}, Simulators: []wire.Simulator{}, Tools: h}
+ }
+ for _, s := range []string{wire.ToolHealthy, wire.ToolMissing, wire.ToolMismatch, wire.ToolUnpinned} {
+ if err := wire.ValidCapabilities(caps(&wire.ToolHealth{Scanner: s})); err != nil {
+ t.Fatalf("scanner %s refused: %v", s, err)
+ }
+ if err := wire.ValidCapabilities(caps(&wire.ToolHealth{Scanner: wire.ToolHealthy, Renderer: s})); err != nil {
+ t.Fatalf("renderer %s refused: %v", s, err)
+ }
+ }
+ for _, bad := range []wire.ToolHealth{{}, {Scanner: wire.ToolUnknown}, {Scanner: "fine"}, {Scanner: wire.ToolHealthy, Renderer: wire.ToolUnknown}, {Scanner: "/usr/bin/gitleaks"}} {
+ if err := wire.ValidCapabilities(caps(&bad)); !errors.Is(err, wire.ErrCapabilities) {
+ t.Fatalf("%+v accepted", bad)
+ }
+ }
+ hello := wire.Hello{Protocol: wire.Protocol30, Repos: []string{}, Capabilities: &wire.Capabilities{Tags: []string{wire.TagLinux}, Sites: true, Tools: &wire.ToolHealth{Scanner: wire.ToolMismatch}}}
+ f, _ := wire.NewFrame("h", wire.FrameHello, hello)
+ if same, err := wire.Encode(f, wire.Protocol30); err != nil || !bytes.Equal(same.Data, f.Data) || !strings.Contains(string(same.Data), `"tools":{"scanner":"mismatch"}`) {
+ t.Fatalf("hello at 30: %v %s", err, same.Data)
+ }
+ got, err := wire.Encode(f, wire.Protocol29)
+ if err != nil || strings.Contains(string(got.Data), `"tools"`) || !strings.Contains(string(got.Data), `"sites":true`) {
+ t.Fatalf("hello at 29: %v %s", err, got.Data)
+ }
+ if hello.Capabilities.Tools == nil {
+ t.Fatal("encoding changed the caller's hello")
+ }
+ first := hello
+ if !wire.WithoutToolHealth(&first) || first.Capabilities.Tools != nil || hello.Capabilities.Tools == nil || wire.WithoutToolHealth(&first) {
+ t.Fatal("WithoutToolHealth")
+ }
+}
+
+// The stuck-task tools are coordinator write tools, held to one operation
+// per task in a turn, never a move-in turn's, and never sent below 30.
+func TestProtocol30StuckTools(t *testing.T) {
+ for _, name := range wire.StuckTools {
+ if !slices.Contains(wire.ConverseTools, name) || !slices.Contains(wire.WriteTools, name) || wire.MutationKinds[name] == "" || slices.Contains(wire.MoveInTools, name) {
+ t.Fatalf("%s is not a coordinator write tool", name)
+ }
+ call, _ := wire.NewFrame("c", wire.FrameToolCall, wire.ToolCall{CallID: "c", TurnID: "t", Attempt: 1, Name: name, Args: json.RawMessage(`{"task":"tk"}`)})
+ for _, p := range []int{wire.Protocol29, wire.ProtocolAccess, wire.Protocol1} {
+ if _, err := wire.Encode(call, p); !errors.Is(err, wire.ErrProtocol) {
+ t.Fatalf("%s encoded at %d: %v", name, p, err)
+ }
+ }
+ if same, err := wire.Encode(call, wire.Protocol30); err != nil || !bytes.Equal(same.Data, call.Data) {
+ t.Fatalf("%s at 30: %v", name, err)
+ }
+ }
+ if !slices.Contains(wire.StuckTools, wire.ToolOfferRetry) || !slices.Contains(wire.StuckTools, wire.ToolRetryStep) {
+ t.Fatal("offer_retry and retry_step are not stuck-task tools")
+ }
+ // retry_step runs these again, never a merge, a publish or the work
+ // itself.
+ if !slices.Equal(wire.RetryStepKinds, []string{wire.SpecialistPreview, wire.SpecialistChecks, wire.SpecialistReview}) {
+ t.Fatalf("retry_step kinds %v", wire.RetryStepKinds)
+ }
+ // Any other tool call goes to an older instance as it was.
+ other, _ := wire.NewFrame("c", wire.FrameToolCall, wire.ToolCall{CallID: "c", TurnID: "t", Attempt: 1, Name: wire.ToolReadTask, Args: json.RawMessage(`{"task":"tk"}`)})
+ if same, err := wire.Encode(other, wire.Protocol29); err != nil || !bytes.Equal(same.Data, other.Data) {
+ t.Fatalf("read_task at 29: %v", err)
+ }
+}
diff --git a/internal/wire/tasks.go b/internal/wire/tasks.go
index 2d8ed289..3cd955cf 100644
--- a/internal/wire/tasks.go
+++ b/internal/wire/tasks.go
@@ -319,6 +319,9 @@ type Step struct {
Paused *StepPaused `json:"paused,omitempty"`
// Publish: a publish step's export and, once done, its outcome.
Publish *PublishResult `json:"publish,omitempty"`
+ // RetriedBy is "coordinator" when the coordinator's retry_step
+ // started the current attempt (protocol 30), else empty.
+ RetriedBy string `json:"retried_by,omitempty"`
}
// Task is one piece of work under a project. Branch is the task's own
diff --git a/internal/wire/usage_test.go b/internal/wire/usage_test.go
index abf8bfa9..2eeede17 100644
--- a/internal/wire/usage_test.go
+++ b/internal/wire/usage_test.go
@@ -44,7 +44,7 @@ func headrooms(t *testing.T, raw []byte) []map[string]json.RawMessage {
// decodes strictly against the frozen protocol 14 headroom, and the
// caller's own values are untouched; at 15 nothing changes.
func TestEncodeBelowProtocol15DropsReadingTimes(t *testing.T) {
- if wire.ProtocolReadings != wire.Protocol15 || wire.ProtocolCurrent != wire.Protocol29 {
+ if wire.ProtocolReadings != wire.Protocol15 || wire.ProtocolCurrent != wire.Protocol30 {
t.Fatalf("readings %d, current %d", wire.ProtocolReadings, wire.ProtocolCurrent)
}
at := time.Date(2026, 11, 12, 9, 58, 0, 0, time.UTC)
diff --git a/internal/wire/warm_test.go b/internal/wire/warm_test.go
index 352c2c00..81358c7d 100644
--- a/internal/wire/warm_test.go
+++ b/internal/wire/warm_test.go
@@ -13,7 +13,7 @@ import (
// other (durable, acked), and Encode refuses it below 24: an older
// runner's strict decoder would close the stream on it.
func TestEncodeWarmBelow24(t *testing.T) {
- if wire.ProtocolWarm != 24 || wire.ProtocolCurrent != wire.ProtocolPinnedRelease || wire.Spoken(99) != 29 {
+ if wire.ProtocolWarm != 24 || wire.ProtocolCurrent != wire.ProtocolStuckTasks || wire.Spoken(99) != 30 {
t.Fatalf("protocols %d %d", wire.ProtocolWarm, wire.ProtocolCurrent)
}
f, err := wire.NewFrame("c1", wire.FrameWarm, wire.WarmCommand{Person: "ana@example.com"})