oficina / equipo Public

preview: retry a finished task's preview from a proven commit

Paul asked the coordinator to retry the Neary's preview (2026-11-26);
it couldn't, because both tasks were done and an unconfirmed preview
wasn't retryable. The person's Retry and the coordinator's retry_step
can now re-run a done task's preview, built from the merged commit
only when it is the approved candidate or the hub's own merge reply
with the candidate as second parent; otherwise the approved candidate,
reported as merge_unverified. Unconfirmed, failed, cancelled, expired
and taken-down previews are retryable; refusals carry fixed reasons.
A devbox link re-run on a done task stays up until replaced.

Astra: NOT READY (unverified merged_sha), APPROVED round 2 after the
expiry sweep was cut.

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

Squashed from preview-retry-done into main.
Paul Campbell pushed by claude agent, operated by paul@keymail.dev a2619ce3525ffe2a4f98cacf6c22cb421e06c3b5 parent 8ac4dba
12 files changed, +1,144 −94
  • .rastrillo/budgets.txt +4 −4
  • internal/equipo/chat/change_files_exposure_test.go +1 −1
  • internal/equipo/chat/preview.go +3 −1
  • internal/equipo/chat/preview_retry.go +388 −0
  • internal/equipo/chat/publish.go +4 −2
  • internal/equipo/chat/stuck.go +59 −57
  • internal/equipo/chat/tasks.go +36 −18
  • internal/equipo/preview_pass_store.go +7 −2
  • internal/equipo/work_views.go +47 −8
  • internal/runner/thin/mcp.go +1 −1
  • internal/runner/thin/merge_identity_test.go +95 −0
  • internal/thintest/preview_retry_done_contract_test.go +499 −0

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.3s
ci-box: codex: fetched and verified in 3.5s
ci-box: codex-code-mode-host: fetched and verified in 1.4s
ci-box: libwrap: fetched and verified in 0.3s
ci-box: socat: fetched and verified in 0.4s
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
ci-box: image pulled in 10.0s
ci-box: pi: installed and verified in 7.5s
ci-box: opencode: installed and verified in 2.0s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 9.3s
ci-box: clone deepened in 4.4s
ci-box: file times set from content: 3175 files, 211 directories
ci-box: ready in 17.9s
=== copy ===
EQUIPO_RELEASE_COPY_CHECK=1 CGO_ENABLED=0 go test ./internal/equipotest -run '^TestReleaseCopyReviewed$' -count=1
ok  	amadan.net/oficina/equipo/internal/equipotest	0.143s
=== compile ===
go build ./...
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py compile
+ go build -tags testbuild ./...
  4.1s
+ go list -export -test -tags testbuild -f  ./...
  4.0s
+ 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 1m16.614s 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.84s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m14.84s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 69.53, cpu waiting 40.40%, memory waiting 0.00%, io waiting 0.46%
--- 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 1m17.675s 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 1m15.991s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m15.99s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 69.53, cpu waiting 40.40%, memory waiting 0.00%, io waiting 0.46%
--- shard 2 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-connections: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadlessConnections$|^TestHeadlessTokenPasteEndToEnd$|^TestHeadlessTokenConnection$' ./internal/headless

receipt: test step 1m16.986s 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 1m15.082s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m5.35s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 5.32s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 4.41s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 69.53, cpu waiting 40.40%, memory waiting 0.00%, io waiting 0.46%
--- 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 1m14.555s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m12.819s amadan.net/oficina/equipo/internal/headless
receipt: slow test 35.42s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 19.88s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 8.86s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
receipt: slow test 8.66s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
machine: 32 CPUs, load 68.36, cpu waiting 40.14%, memory waiting 0.00%, io waiting 0.48%
--- shard 4 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-guards: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadlessCopyRotation$|^TestHeadlessPolicyGuards$|^TestHeadlessRunnerKillLeavesNoCopies$|^TestHeadlessNewHouseRuleStartsFresh$|^TestHeadless$/^3_engineering$|^TestHeadless$/^3_step_cancel$|^TestHeadless$/^3_step_contained$|^TestHeadless$/^3_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 1m33.21s 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 1m31.605s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m2.73s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.14s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 8.05s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 7.03s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 4.65s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
machine: 32 CPUs, load 67.02, cpu waiting 40.50%, memory waiting 0.00%, io waiting 0.34%
--- 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 2m44.362s 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 2m42.414s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m36.62s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistant
receipt: slow test 18.57s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 8.82s amadan.net/oficina/equipo/internal/headless TestHeadlessResearchHandoff
receipt: slow test 6.59s amadan.net/oficina/equipo/internal/headless TestHeadlessTurnBatching
receipt: slow test 6.37s amadan.net/oficina/equipo/internal/headless TestHeadlessBatchAfterRefusedReply
machine: 32 CPUs, load 29.73, cpu waiting 14.66%, memory waiting 0.00%, io waiting 0.10%
--- 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 2m13.261s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 2m11.787s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 9.74s amadan.net/oficina/equipo/internal/thintest TestContractTeamJobSettledStates
receipt: slow test 6.73s amadan.net/oficina/equipo/internal/thintest TestExplorePreviewsOff
receipt: slow test 3.97s amadan.net/oficina/equipo/internal/thintest TestContractTeamNudgePersonNeeds
receipt: slow test 3.84s amadan.net/oficina/equipo/internal/thintest TestContractPreviewHeldUntilPublishAnswer
receipt: slow test 2.58s amadan.net/oficina/equipo/internal/thintest TestContractTeamUpdatePersonNeeds
machine: 32 CPUs, load 42.28, cpu waiting 23.05%, memory waiting 0.00%, io waiting 0.17%
--- shard 7 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane thintest-contract: ./internal/thintest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^Test([^C]|C[^o]|Co[^n]|Con[^t])|^TestContract(Assistant|Outcome|Team|Handoff|HostAllowlist|HostIsPerPerson|Look|Use[A-Z]|RemoteCall|LanesRunAtOnce|NoMergeQuestionWhenGateMerges|PreviewHeldUntilPublishAnswer|PreviewNotHeldBelow19|PublishNeedsOwnerAnswer)' ./internal/thintest
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/thintest TestContractChecksPlacedOnTheWorker
=== RUN   TestContractChecksPlacedOnTheWorker
    placement_contract_test.go:338: failed to get reader: context deadline exceeded
--- FAIL: TestContractChecksPlacedOnTheWorker (45.48s)

--- FAIL amadan.net/oficina/equipo/internal/thintest (package output)
FAIL
rastrillo-budget/v1 ran 2m36.737s
FAIL	amadan.net/oficina/equipo/internal/thintest	156.944s


receipt: test step 2m38.488s 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 2m36.737s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 45.48s amadan.net/oficina/equipo/internal/thintest TestContractChecksPlacedOnTheWorker
receipt: slow test 9.3s amadan.net/oficina/equipo/internal/thintest TestContractRetryPreviewUnverifiedMerge
receipt: slow test 8.93s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 4.83s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotOffered
receipt: slow test 4.61s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
exit status 1
+ go test -tags testbuild -timeout 15m -skip '^Test([^C]|C[^o]|Co[^n]|Con[^t])|^TestContract(Assistant|Outcome|Team|Handoff|HostAllowlist|HostIsPerPerson|Look|Use[A-Z]|RemoteCall|LanesRunAtOnce|NoMergeQuestionWhenGateMerges|PreviewHeldUntilPublishAnswer|PreviewNotHeldBelow19|PublishNeedsOwnerAnswer)' -v -run '^TestContractChecksPlacedOnTheWorker$' -count=1 ./internal/thintest   (retry, once)
##############################################################################
FLAKE ./internal/thintest:TestContractChecksPlacedOnTheWorker thintest-contract a2619ce3525ffe2a4f98cacf6c22cb421e06c3b5 45.48s 31.62
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 29.73, cpu waiting 15.16%, memory waiting 0.00%, io waiting 0.11%
--- 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 5m8.089s, over the 45s its record on line 44 allows; reported only, timing fails on CI

receipt: test step 5m13.521s 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 5m8.089s amadan.net/oficina/equipo/internal/runner/thin
receipt: slow test 37.01s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeAnsweredByAnotherModel
receipt: slow test 36.88s amadan.net/oficina/equipo/internal/runner/thin TestModelsEngineeringProbesThenRunsTheStrongest
receipt: slow test 36.81s amadan.net/oficina/equipo/internal/runner/thin TestModelsUnhealthyRetriedOnDemand
receipt: slow test 18.47s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeRunsInsideTheAdmission
receipt: slow test 10.04s amadan.net/oficina/equipo/internal/runner/thin TestTimeoutKeepsNothingForAnOlderInstance
machine: 32 CPUs, load 3.42, cpu waiting 1.20%, 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
cache miss: amadan.net/oficina/equipo/internal/runner: its inputs changed

receipt: test step 50.577s 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 49.464s amadan.net/oficina/equipo/internal/runner
receipt: slow test 29.43s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.03s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 56.14, cpu waiting 31.92%, memory waiting 0.00%, io waiting 0.72%
--- 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
cache miss: amadan.net/oficina/equipo/internal/runner: its inputs changed

receipt: test step 1m2.569s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m0.513s amadan.net/oficina/equipo/internal/runner
receipt: slow test 50.51s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 45.72s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.4s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.59s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 64.91, cpu waiting 39.04%, memory waiting 0.00%, io waiting 0.59%
--- 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
cache miss: amadan.net/oficina/equipo/internal/runner: its inputs changed

receipt: test step 35.853s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 34.765s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.13s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.34s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.12s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 2.54s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 1.6s amadan.net/oficina/equipo/internal/runner TestReportPostsRetryExactRequest
machine: 32 CPUs, load 37.73, cpu waiting 21.31%, memory waiting 0.00%, io waiting 0.91%
--- 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 39.6%, load 30.31
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 1m8.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 1m6.849s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 28.57s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 28.55s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 26.5s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 23.4s amadan.net/oficina/equipo/internal/equipotest TestAuthorityFailureIsNotRevocation
receipt: slow test 23.28s amadan.net/oficina/equipo/internal/equipotest TestAuthoritySnapshotChanges
machine: 32 CPUs, load 64.30, cpu waiting 39.43%, memory waiting 0.00%, io waiting 0.32%
--- 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 39.6%, load 30.31
test lane equipotest-e: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test[E-P]' ./internal/equipotest

receipt: test step 1m18.293s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m16.589s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 20.2s amadan.net/oficina/equipo/internal/equipotest TestProjectsFailuresRollBack
receipt: slow test 20.16s amadan.net/oficina/equipo/internal/equipotest TestProjectWritesRequireCurrentOwner
receipt: slow test 20.13s amadan.net/oficina/equipo/internal/equipotest TestProjectOwnersAreMembers
receipt: slow test 20.09s amadan.net/oficina/equipo/internal/equipotest TestProjectKindsAndDefaultBranch
receipt: slow test 20.09s amadan.net/oficina/equipo/internal/equipotest TestProjectsReopen
machine: 32 CPUs, load 57.31, cpu waiting 34.40%, memory waiting 0.00%, io waiting 0.27%
--- 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 41.5%, load 29.56
test lane equipotest-r: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestR' ./internal/equipotest

receipt: test step 1m16.271s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m10.964s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 16.05s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 13.68s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 10.62s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 10.57s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 7.5s amadan.net/oficina/equipo/internal/equipotest TestRosterProtectsLastOwner
machine: 32 CPUs, load 57.31, cpu waiting 35.49%, memory waiting 0.00%, io waiting 0.28%
--- 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 39.6%, load 30.31
test lane equipotest-rest: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^Test[A-D]|^TestQ|^Test[E-P]|^TestR' ./internal/equipotest

receipt: test step 1m9.703s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m7.823s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 25.92s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 25.63s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 25.62s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 23.82s amadan.net/oficina/equipo/internal/equipotest TestSigninCSRF
receipt: slow test 23.76s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsCurrentOwner
machine: 32 CPUs, load 60.91, cpu waiting 38.66%, memory waiting 0.00%, io waiting 0.31%
--- 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 39.6%, load 30.31
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 54.798s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 52.902s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 3.83s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 3.53s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 1.64s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.52s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3A
receipt: slow test 1.34s amadan.net/oficina/equipo/internal/plan3test TestPlanMigrationUpgrade
machine: 32 CPUs, load 66.33, cpu waiting 40.28%, memory waiting 0.00%, io waiting 0.40%
--- 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 39.6%, load 30.31
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/runner/provider/claude/realcli: 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/provider/opencode: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/webread: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runnerproto: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/workspace: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/testci: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/wire/wireschema: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/checks: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/containment: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/pi: its inputs changed
budget note: internal/equipo took 2m21.167s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/equipo/chat took 20.809s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/idtest took 1m53.62s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/release took 41.44s, 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 50.015s, over the 15s its record on line 40 allows; reported only, timing fails on CI
budget note: internal/runner/forge took 22.362s, over the 20s its record on line 35 allows; reported only, timing fails on CI
budget note: internal/runner/provider/claude/realcli took 12.939s, over the 10s the default allows; reported only, timing fails on CI

receipt: test step 2m34.579s against a 60s target (the gate's other steps are not in this figure)
receipt: 23 packages ran, 43 cached, 17 without tests, 0 failed
receipt: slow package 2m21.167s amadan.net/oficina/equipo/internal/equipo
receipt: slow package 1m53.62s amadan.net/oficina/equipo/internal/idtest
receipt: slow package 1m9.891s amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow package 53.715s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 53.243s amadan.net/oficina/equipo/internal/runner/provider/pi
receipt: slow test 54.47s amadan.net/oficina/equipo/internal/idtest TestDoorRemembersOficinaID
receipt: slow test 46.02s amadan.net/oficina/equipo/internal/idtest TestDoorOficinaSettingsUnreadableIsNoLoop
receipt: slow test 45.7s amadan.net/oficina/equipo/internal/idtest TestDoorForgetsOficinaIDForARefusedSession
receipt: slow test 44.75s amadan.net/oficina/equipo/internal/idtest TestDoorStepUpIsLocal
receipt: slow test 44.68s amadan.net/oficina/equipo/internal/idtest TestDoorNeverJudgesANativeSession
machine: 32 CPUs, load 20.51, cpu waiting 9.83%, memory waiting 0.00%, io waiting 0.06%
--- 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 1m22.917s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m21.299s amadan.net/oficina/equipo/internal/headless
receipt: slow test 38.65s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 14.79s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 9.09s amadan.net/oficina/equipo/internal/headless TestBrowserChat
receipt: slow test 7.08s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 6.68s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
machine: 32 CPUs, load 68.53, cpu waiting 40.73%, memory waiting 0.00%, io waiting 0.42%
--- shard 19 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-work: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$' ./internal/headless

receipt: test step 1m30.443s 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 1m28.914s amadan.net/oficina/equipo/internal/headless
receipt: slow test 27.46s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 21.23s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 12.87s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 9.61s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
receipt: slow test 9.2s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
machine: 32 CPUs, load 67.02, cpu waiting 40.62%, memory waiting 0.00%, io waiting 0.35%
--- 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 1m51.291s 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 1m49.757s amadan.net/oficina/equipo/internal/headless
receipt: slow test 13.25s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 13.11s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 11.78s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 11.35s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsSignInEmail
receipt: slow test 11.28s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
machine: 32 CPUs, load 53.84, cpu waiting 32.34%, memory waiting 0.00%, io waiting 0.25%
--- 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
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserCopyContinue
=== RUN   TestBrowserCopyContinue
time=2026-11-26T22:31:09.980Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-26T22:31:09.980Z level=INFO msg="startup phase done" phase=state_lock took=64µs
time=2026-11-26T22:31:09.980Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-26T22:31:09.981Z level=INFO msg="startup phase done" phase=claim_roots took=81µs
time=2026-11-26T22:31:09.981Z level=INFO msg="startup phase" phase=sweep
time=2026-11-26T22:31:10.037Z level=INFO msg="startup phase done" phase=sweep took=56.174ms
time=2026-11-26T22:31:10.037Z level=INFO msg="startup phase" phase=credentials
time=2026-11-26T22:31:10.037Z level=INFO msg="startup phase done" phase=credentials took=160µs
time=2026-11-26T22:31:10.037Z level=INFO msg="startup phase" phase=open_state
time=2026-11-26T22:31:10.128Z level=INFO msg="startup phase done" phase=open_state took=90.654ms
time=2026-11-26T22:31:10.128Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-26T22:31:10.129Z level=INFO msg=connecting host=127.0.0.1:42167 protocol=32
time=2026-11-26T22:31:10.130Z level=INFO msg=connected host=127.0.0.1:42167 took=1.042ms
time=2026-11-26T22:31:10.131Z level=INFO msg="capabilities gathering"
time=2026-11-26T22:31:10.132Z level=INFO msg="capabilities gathered" took=1.542ms tags=linux,claude,go
time=2026-11-26T22:31:10.133Z level=INFO msg="hello sent" protocol=32
time=2026-11-26T22:31:10.144Z level=INFO msg=welcome protocol=32 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.59s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m32.63s
FAIL	amadan.net/oficina/equipo/internal/headless	92.869s


receipt: test step 1m34.082s 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 1m32.63s amadan.net/oficina/equipo/internal/headless
receipt: slow test 14.86s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
receipt: slow test 11.08s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 10.47s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 9.45s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 7.61s amadan.net/oficina/equipo/internal/headless TestBrowserRefreshRace
rastrillo: budget test: go test failed
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 a2619ce3525ffe2a4f98cacf6c22cb421e06c3b5 6.59s 64.30
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 64.30, cpu waiting 39.43%, memory waiting 0.00%, io waiting 0.32%
--- shard 22 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-rest: ./internal/equipo
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserPreviewBlocksNavigation|TestBrowserPreviewPassExchange)$' ./internal/equipo

receipt: test step 3.972s 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.452s amadan.net/oficina/equipo/internal/equipo
receipt: slow test 1.81s amadan.net/oficina/equipo/internal/equipo TestBrowserPreviewPassExchange
receipt: slow test 650ms 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.825s, over the 10s the default allows; reported only, timing fails on CI

receipt: test step 12.227s 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.825s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 8.61s amadan.net/oficina/equipo/internal/idtest TestBrowserSmartDoor
receipt: slow test 2.21s 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.689s 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.099s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 2.1s 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 3m38.694s 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 3m37.115s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 23.18s amadan.net/oficina/equipo/internal/thintest TestBrowserAccessRequest
receipt: slow test 14.42s amadan.net/oficina/equipo/internal/thintest TestBrowserSettingsTeams
receipt: slow test 12.04s amadan.net/oficina/equipo/internal/thintest TestBrowserThinkingCycles
receipt: slow test 10.83s amadan.net/oficina/equipo/internal/thintest TestBrowserPlacementQuestionAndPending
receipt: slow test 9.3s amadan.net/oficina/equipo/internal/thintest TestBrowserRhythm
machine: 32 CPUs, load 8.91, cpu waiting 4.00%, 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   (52s)
ok ./internal/headless TestHeadlessConnections/A5_cancel_and_sign_out 4.64s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.11s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 8.08s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 8.93s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 26.91s
+ 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   (54s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 11.19s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 11.17s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 9.68s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 19.46s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless   (21s)
ok ./internal/headless TestMixedVersions 18.52s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks   (2s)
ok ./internal/runner/checks TestCheckSandboxDeniedPathsTampering 0.79s
+ go test -tags testbuild -timeout 15m -v -run '^TestRunnerCancelAndSupersede$' ./internal/runner/thin   (2s)
ok ./internal/runner/thin TestRunnerCancelAndSupersede 0.06s
quarantine: 0 flaked (passed on the retry), 0 failed
machine: 32 CPUs, load 56.14, cpu waiting 34.85%, memory waiting 0.00%, io waiting 0.67%
--- 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 11.298s against a 60s target (the gate's other steps are not in this figure)
receipt: 4 packages ran, 0 cached, 4 without tests, 0 failed
receipt: slow package 7.4s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 201ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 73ms amadan.net/oficina/equipo/internal/runner/provider/codex
receipt: slow package 1ms amadan.net/oficina/equipo/internal/runner/provider
receipt: slow package 0s amadan.net/oficina/equipo/internal/runner/provider/claude/realcli
receipt: slow test 5.13s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.75s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 390ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 200ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxToolchain
CGO_ENABLED=0 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run '^TestNamespace' -count=1 ./internal/runner/containment
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run '^TestNamespace' -count=1 ./internal/runner/containment

receipt: test step 3.399s 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.017s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 280ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 210ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof
receipt: slow test 130ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 130ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryReusedPID
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceExitStatus
machine: 32 CPUs, load 20.06, cpu waiting 8.30%, memory waiting 0.00%, io waiting 1.32%
--- 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 41.5%, load 29.56
shard 25: make runner-dead-references lanes-check build vet fmt-check spacing budget migration-check
python3 scripts/runner-dead-references.py
reference scan: 2887 text files, 3229 matches, 0 failures
python3 native/scripts/check-share.py
Share packaging, keychain-only boundary and reviewed copy verified
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.572s
machine: 32 CPUs, load 68.36, cpu waiting 40.08%, memory waiting 0.00%, io waiting 0.50%
--- 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 39.6%, load 30.31
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 56.14, cpu waiting 31.92%, memory waiting 0.00%, io waiting 0.72%
--- 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 41.5%, load 29.56
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 10
vulnerabilities in modules you require, but your code doesn't appear to call
these vulnerabilities.
Use '-show verbose' for more details.
machine: 32 CPUs, load 37.73, cpu waiting 21.31%, memory waiting 0.00%, io waiting 0.91%
--- 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 41.5%, load 29.56
shard 28: make gitleaks
10:31PM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
10:31PM INF 1215 commits scanned.
10:31PM INF scanned ~67541445 bytes (67.54 MB) in 23.3s
10:31PM INF no leaks found
machine: 32 CPUs, load 56.14, cpu waiting 33.46%, memory waiting 0.00%, io waiting 0.70%
=== 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.078ms, worst 1.145ms, budget 150ms
perf: GET /api/runner/protocol: median 67µs, worst 81µs, budget 150ms
perf: GET /api/v1/account-setups/{id}: median 587µs, worst 600µs, budget 150ms
perf: GET /api/v1/accounts: median 407µs, worst 455µs, budget 150ms
perf: GET /api/v1/auth/devices: median 439µs, worst 490µs, budget 150ms
perf: GET /api/v1/budgets: median 471µs, worst 489µs, budget 150ms
perf: GET /api/v1/capabilities: median 260µs, worst 321µs, budget 150ms
perf: GET /api/v1/cards/{id}: median 1.199ms, worst 1.345ms, budget 150ms
perf: GET /api/v1/connections: median 572µs, worst 608µs, budget 150ms
perf: GET /api/v1/connections/{id}: median 524µs, worst 605µs, budget 150ms
perf: GET /api/v1/conversation: median 907µs, worst 999µs, budget 150ms
perf: GET /api/v1/conversation/cards: median 1.473ms, worst 1.574ms, budget 150ms
perf: GET /api/v1/coordinator: median 1.724ms, worst 1.873ms, budget 150ms
perf: GET /api/v1/invites/{id}: median 439µs, worst 499µs, budget 150ms
perf: GET /api/v1/journey: median 8.933ms, worst 9.121ms, budget 150ms
perf: GET /api/v1/me: median 482µs, worst 500µs, budget 150ms
perf: GET /api/v1/me/settings: median 547µs, worst 600µs, budget 150ms
perf: GET /api/v1/needs-you: median 8.824ms, worst 9.215ms, budget 150ms
perf: GET /api/v1/notifications: median 1.691ms, worst 1.779ms, budget 150ms
perf: GET /api/v1/onboarding: median 411µs, worst 466µs, budget 150ms
perf: GET /api/v1/people: median 462µs, worst 527µs, budget 150ms
perf: GET /api/v1/playbooks: median 599µs, worst 633µs, budget 150ms
perf: GET /api/v1/playbooks/{id}: median 548µs, worst 570µs, budget 150ms
perf: GET /api/v1/playbooks/{id}/template-diff: median 866µs, worst 1.01ms, budget 150ms
perf: GET /api/v1/preferences: median 802µs, worst 847µs, budget 150ms
perf: GET /api/v1/projects/{id}: median 480µs, worst 510µs, budget 150ms
perf: GET /api/v1/projects/{id}/settings: median 606µs, worst 627µs, budget 150ms
perf: GET /api/v1/roster: median 525µs, worst 953µs, budget 150ms
perf: GET /api/v1/runners/{id}: median 470µs, worst 513µs, budget 150ms
perf: GET /api/v1/specialists: median 8.097ms, worst 8.671ms, budget 150ms
perf: GET /api/v1/specialists/{id}: median 7.986ms, worst 8.321ms, budget 150ms
perf: GET /api/v1/specialists/{id}/template-diff: median 815µs, worst 940µs, budget 150ms
perf: GET /api/v1/tasks/{id}/plan: median 1.158ms, worst 1.22ms, budget 150ms
perf: GET /api/v1/tasks/{id}/thread: median 738µs, worst 768µs, budget 150ms
perf: GET /api/v1/teams: median 439µs, worst 456µs, budget 150ms
perf: GET /api/v1/templates: median 598µs, worst 610µs, budget 150ms
perf: GET /api/v1/templates/{id}: median 442µs, worst 461µs, budget 150ms
perf: GET /auth/callback: median 81µs, worst 105µs, budget 150ms
perf: GET /auth/devices/{id}: median 3.974ms, worst 4.056ms, budget 150ms
perf: GET /auth/verify: median 86µs, worst 112µs, budget 150ms
perf: GET /connections: median 4.222ms, worst 4.347ms, budget 150ms
perf: GET /conversation: median 8.343ms, worst 8.603ms, budget 150ms
perf: GET /conversation/connections: median 259µs, worst 284µs, budget 150ms
perf: GET /conversation/notebook: median 252µs, worst 259µs, budget 150ms
perf: GET /conversation/settings: median 4.409ms, worst 4.529ms, budget 150ms
perf: GET /conversation/settings/autonomy: median 4.47ms, worst 4.82ms, budget 150ms
perf: GET /conversation/settings/connections: median 7.039ms, worst 7.26ms, budget 150ms
perf: GET /conversation/settings/connections/add: median 7.527ms, worst 7.951ms, budget 150ms
perf: GET /conversation/settings/copy: median 4.855ms, worst 5.053ms, budget 150ms
perf: GET /conversation/settings/housekeeping: median 4.894ms, worst 5.019ms, budget 150ms
perf: GET /conversation/settings/machines: median 5.227ms, worst 5.363ms, budget 150ms
perf: GET /conversation/settings/machines/add: median 5.312ms, worst 5.584ms, budget 150ms
perf: GET /conversation/settings/notebook: median 4.119ms, worst 4.194ms, budget 150ms
perf: GET /conversation/settings/thinking: median 4.737ms, worst 5.056ms, budget 150ms
perf: GET /housekeeping: median 4.258ms, worst 4.742ms, budget 150ms
perf: GET /invites/new: median 587µs, worst 661µs, budget 150ms
perf: GET /invites/{id}: median 623µs, worst 647µs, budget 150ms
perf: GET /jobs: median 3.852ms, worst 4.036ms, budget 150ms
perf: GET /jobs/{id}: median 5.276ms, worst 7.746ms, budget 150ms
perf: GET /journey: median 10.788ms, worst 11.191ms, budget 150ms
perf: GET /nav/rail: median 3.363ms, worst 3.634ms, budget 150ms
perf: GET /needs-you: median 10.309ms, worst 10.617ms, budget 150ms
perf: GET /onboarding: median 4.499ms, worst 4.561ms, budget 150ms
perf: GET /people: median 3.911ms, worst 4.079ms, budget 150ms
perf: GET /playbook-suggestions/{suggestion}: median 5.022ms, worst 5.139ms, budget 150ms
perf: GET /playbooks: median 4.515ms, worst 4.679ms, budget 150ms
perf: GET /playbooks/new: median 4.761ms, worst 7.754ms, budget 150ms
perf: GET /playbooks/{id}: median 5.211ms, worst 5.368ms, budget 150ms
perf: GET /playbooks/{id}/edit: median 5.138ms, worst 5.217ms, budget 150ms
perf: GET /playbooks/{id}/template-diff: median 4.455ms, worst 4.58ms, budget 150ms
perf: GET /preferences: median 4.563ms, worst 4.652ms, budget 150ms
perf: GET /preferences/sources/{source}: median 4.345ms, worst 4.474ms, budget 150ms
perf: GET /projects: median 6.048ms, worst 6.241ms, budget 150ms
perf: GET /projects/accounts: median 4.001ms, worst 4.133ms, budget 150ms
perf: GET /projects/new: median 3.979ms, worst 4.121ms, budget 150ms
perf: GET /projects/{id}: median 13.17ms, worst 13.34ms, budget 150ms
perf: GET /projects/{id}/edit: median 4.669ms, worst 6.575ms, budget 150ms
perf: GET /runners/enrol: median 4.785ms, worst 4.919ms, budget 150ms
perf: GET /settings: median 3.9ms, worst 4.105ms, budget 150ms
perf: GET /settings/coordinator: median 5.926ms, worst 6.114ms, budget 150ms
perf: GET /settings/devices: median 3.737ms, worst 3.895ms, budget 150ms
perf: GET /settings/recovery: median 3.947ms, worst 4.052ms, budget 150ms
perf: GET /settings/recovery/release: median 3.91ms, worst 3.935ms, budget 150ms
perf: GET /settings/thinking: median 242µs, worst 286µs, budget 150ms
perf: GET /signed-out: median 274µs, worst 295µs, budget 150ms
perf: GET /signin: median 269µs, worst 305µs, budget 150ms
perf: GET /specialists/new: median 3.873ms, worst 3.991ms, budget 150ms
perf: GET /specialists/{key}: median 13.183ms, worst 13.425ms, budget 150ms
perf: GET /specialists/{key}/edit: median 4.393ms, worst 4.486ms, budget 150ms
perf: GET /specialists/{key}/template-diff: median 4.798ms, worst 6.868ms, budget 150ms
perf: GET /tasks: median 6.774ms, worst 6.878ms, budget 150ms
perf: GET /tasks/new: median 4.048ms, worst 4.286ms, budget 150ms
perf: GET /tasks/{id}: median 6.886ms, worst 7.083ms, budget 150ms
perf: GET /tasks/{id}/merge: median 6.11ms, worst 6.317ms, budget 150ms
perf: GET /tasks/{id}/move: median 5.695ms, worst 5.766ms, budget 150ms
perf: GET /tasks/{id}/plan: median 6.578ms, worst 6.729ms, budget 150ms
perf: GET /tasks/{id}/preview: median 1.606ms, worst 1.684ms, budget 150ms
perf: GET /tasks/{id}/questions/{question}: median 5.652ms, worst 5.924ms, budget 150ms
perf: GET /tasks/{id}/rendered-change: median 5.391ms, worst 5.463ms, budget 150ms
perf: GET /tasks/{id}/rendered-change/{hash}.png: median 4.741ms, worst 5.018ms, budget 150ms
perf: GET /tasks/{id}/thread: median 9.031ms, worst 9.652ms, budget 150ms
perf: GET /team/{specialist}: median 5.238ms, worst 5.499ms, budget 150ms
perf: GET /teams: median 12.889ms, worst 13.372ms, budget 150ms
perf: GET /templates: median 4.358ms, worst 4.492ms, budget 150ms
perf: GET /usage: median 5.303ms, worst 5.44ms, budget 150ms
perf: GET /work: median 4.003ms, worst 4.153ms, 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 162ms of [155.645839ms 162.416422ms 164.47292ms], budget 500ms

receipt: test step 46.796s 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.16s amadan.net/oficina/equipo/internal/equipotest TestPerfScreens
receipt: slow test 540ms amadan.net/oficina/equipo/internal/equipotest TestPerfBoot
=== cache ===
ci-box: build cache /home/ci/work/repos/oficina__equipo/cache/go-build: 3.80 GiB in 24681 files
ci-box: module cache /home/ci/work/repos/oficina__equipo/cache/go-mod: 1.15 GiB in 40997 files

landed from preview-retry-done

diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt
index 7a7c6d2d..e5ae5dc7 100644
--- a/.rastrillo/budgets.txt
+++ b/.rastrillo/budgets.txt
@@ -14,7 +14,7 @@ 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 23248 - Preview grants, Retry/timeline, no-access merges, kept timed-out work, and reviewed check-db operator copy; measured 23248 source lines (2026-11-26).
+size internal/equipo 23293 - Preview grants, Retry/timeline, no-access merges, kept timed-out work, and reviewed check-db operator copy; previews run again on done tasks; measured 23293 source lines (2026-11-26).
size internal/wire 7420 - Protocol 31 display facts, path validation, task evidence, merge reasons; protocol 32 unfinished work, shell_unavailable, CI units (2026-11-26); measured 7420 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);
@@ -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 29062 23966 Protocol 31 facts, merge credential, publication guards; step limit, kept timed-out work, shell use, CI unit shares (2026-11-26); measured 29062/23966.
+size internal/runner/thin 29062 24061 Protocol 31 facts, merge credential, publication guards; step limit, kept timed-out work, shell use, CI units, merge identity (2026-11-26); measured 29062/24061.
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 35061 9910 Detail-only file facts, hosted projection, no-access merges, preview reads; unfinished work, free shell-less rounds, CI feedback (2026-11-26); measured 35061/9910.
+size internal/equipo/chat 35473 9910 File facts, hosted projection, no-access merges, preview reads; unfinished work, shell-less rounds, CI feedback; previews on done tasks (2026-11-26); measured 35473/9910.
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 - 35444 Protocol 31 and detail-only contracts, stuck tasks, no-access merges; held retries, unfinished work, shard feedback, free rounds (2026-11-26); measured 35444 test lines.
+size internal/thintest - 35943 Protocol 31 and detail-only contracts, stuck tasks, no-access merges; held retries, unfinished work, shard feedback, free rounds; previews on done tasks (2026-11-26); measured 35943 test lines.
perf GET /api/v1/projects/{id}/merge-policy skip Merge authority person API: bearer-only JSON for devices; the browser reads the policy on /projects/{id}.
perf GET /api/v1/usage skip Thin v1 person API: bearer-only JSON for devices; the browser reads usage through /usage.
diff --git a/internal/equipo/chat/change_files_exposure_test.go b/internal/equipo/chat/change_files_exposure_test.go
index adc40573..7d7b0f1b 100644
--- a/internal/equipo/chat/change_files_exposure_test.go
+++ b/internal/equipo/chat/change_files_exposure_test.go
@@ -61,7 +61,7 @@ func TestChangeFilesStayOutOfCoordinatorListsSnapshotAndEvents(t *testing.T) {
must(err)
noFacts("snapshot", snapshot)
must(r.s.tx(ctx, func(tx *txn) error {
- result, err := tx.readTask(k.ID)
+ result, err := tx.readTask(hkOwner, k.ID)
if err != nil {
return err
}
diff --git a/internal/equipo/chat/preview.go b/internal/equipo/chat/preview.go
index 0e2b0ad6..21ec1fbd 100644
--- a/internal/equipo/chat/preview.go
+++ b/internal/equipo/chat/preview.go
@@ -138,7 +138,9 @@ func (t *txn) previewRefusal(l Lease, s *stepRecord, purpose, digest string) (st
return "", err
}
p := progressFor(k, steps)
- if p.moved || p.candidate != s.CandidateSHA || p.review == nil || p.review.State != wire.StepDone || p.review.Verdict != wire.VerdictApprove {
+ // The approved candidate while the branch is at it, or once the task
+ // is done the commit a preview of it builds (its merged commit).
+ if !previewMayBuild(k, p, s.CandidateSHA) {
return "withdrawn", nil
}
grant := previewGrant(*s)
diff --git a/internal/equipo/chat/preview_retry.go b/internal/equipo/chat/preview_retry.go
new file mode 100644
index 00000000..6c58449c
--- /dev/null
+++ b/internal/equipo/chat/preview_retry.go
@@ -0,0 +1,388 @@
+package chat
+
+import (
+ "encoding/json"
+ "errors"
+ "strings"
+ "time"
+
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// Previews on finished tasks (Paul, 2026-11-26: "Retry the Neary's
+// preview" was refused because both tasks were merged and done). A
+// preview is ancillary, so it may run again after its task ended: on a
+// task Equipo merged it builds the merged commit, otherwise the approved
+// candidate, as a new preview step; the task's stage, merge and other
+// steps stay as they are. It is published only through the preview's own
+// checks (previewRefusal). A preview that ended unconfirmed, or whose link
+// is gone, counts as one to run again, like a failed one.
+
+// Why a retry is refused, in fixed words: retry_step's result and
+// read_task's retry say them; people see the conflict, never these.
+const (
+ retryTaskCancelled = "task_cancelled"
+ retryTaskDone = "task_done"
+ retryNotEnded = "not_ended"
+ retryCompleted = "completed"
+ retryNotFailed = "not_failed"
+ retryNotNewest = "not_newest"
+ retryCommitChanged = "commit_changed"
+ retryNotApproved = "not_approved"
+ retryNoRunner = "no_runner"
+ retryNotYours = "not_yours"
+ retryNotOwner = "not_owner"
+ retryNoStep = "no_step"
+ // Notes beside a retry that can run (read_task's retry, retry_step's
+ // result): the merged commit could not be proven to be the merge of
+ // the approved candidate, so the approved candidate is built instead;
+ // a devbox link brought up after the task was done stays up until the
+ // next run replaces it.
+ retryMergeUnverified = "merge_unverified"
+ retryDevboxStaysUp = "devbox_stays_up"
+ // previewHostAuthority's reasons are used as they are:
+ // wire.ReasonRunnerOutdated, preview_host, preview_public_disabled.
+)
+
+// retryNotes is what the model reads back for each reason.
+var retryNotes = map[string]string{
+ retryTaskCancelled: "The task was cancelled: nothing of it runs again.",
+ retryTaskDone: "The task is done: only its preview can run again (step: preview). Its checks, review and merge stay as they are.",
+ retryNotEnded: "That step has not ended yet (queued or running, or its end is not proven). Wait for it; read_task shows it.",
+ retryCompleted: "That step did its work (its checks or review finished, or its preview link is up). There is nothing to run again.",
+ retryNotFailed: "That step was stopped, not failed: there is nothing to run again.",
+ retryNotNewest: "A newer step of that kind came after it: only the newest runs again.",
+ retryCommitChanged: "The commit it would judge or show is no longer the task's (the branch moved, or a new candidate came). read_task shows where it stands.",
+ retryNotApproved: "Review has not approved the task's commit, so no preview of it runs.",
+ retryNoRunner: "The person has no primary runner connected to run it on.",
+ retryNotYours: "That task is another person's: only the person who asked for it can run its steps again.",
+ retryNotOwner: "Only an owner's runner can run work.",
+ retryNoStep: "That task has no step of that kind yet.",
+ retryMergeUnverified: "Equipo could not prove the merged commit is exactly the merge of the approved commit, so a preview builds the approved commit itself, which Review approved, not the merged one.",
+ retryDevboxStaysUp: "Its preview link on the person's tailnet came up after the task was done; it stays up until the next preview of the task replaces it.",
+ wire.ReasonRunnerOutdated: "The person's primary runner is too old to make previews: it needs an update first.",
+ "preview_host": "The person's primary runner has no preview host now.",
+ "preview_public_disabled": "This project does not allow public previews now; an owner can turn them on in Settings.",
+ "not_retryable": toolStepNotRetried,
+}
+
+// retryRefusal is a refused retry with its fixed reason: errors.Is
+// matches its kind (ErrNotRetryable, ErrTaskEnded or ErrForbidden).
+type retryRefusal struct {
+ kind error
+ reason string
+}
+
+func (e retryRefusal) Error() string { return e.kind.Error() + ": " + e.reason }
+func (e retryRefusal) Unwrap() error { return e.kind }
+func refuseRetry(kind error, reason string) error { return retryRefusal{kind, reason} }
+
+// retryReasonOf is err's fixed reason, fallback when it has none.
+func retryReasonOf(err error, fallback string) string {
+ var r retryRefusal
+ if errors.As(err, &r) {
+ return r.reason
+ }
+ return fallback
+}
+
+// refusedRetry is retry_step's refusal: the code, and the reason with
+// what it means.
+func refusedRetry(code, reason string) wire.ToolResult {
+ note, ok := retryNotes[reason]
+ if !ok {
+ reason, note = "not_retryable", toolStepNotRetried
+ }
+ raw, _ := json.Marshal(map[string]string{"reason": reason, "note": note})
+ return refused(code, string(raw))
+}
+
+// approvedCandidate reports whether Review approved the task's candidate.
+func approvedCandidate(p progress) bool {
+ return p.candidate != "" && p.review != nil && p.review.State == wire.StepDone && p.review.Verdict == wire.VerdictApprove
+}
+
+// previewTarget is the commit a new preview of the task builds now: on a
+// done task Equipo merged, its merged commit when that is proven to be the
+// merge of the approved candidate (verifiedMerge), else the approved
+// candidate itself, which Review approved (note says merge_unverified);
+// otherwise the approved candidate while the branch is at it. "" when
+// there is none.
+func previewTarget(k taskRecord, p progress) (sha, note string) {
+ if !approvedCandidate(p) {
+ return "", ""
+ }
+ if k.Stage == wire.StageDone && k.MergedSHA != "" {
+ if m := verifiedMerge(k, p); m != "" {
+ return m, ""
+ }
+ // The candidate landed (the hub or the runner said so), so it is
+ // on the default branch's history whatever the branch did since.
+ return p.candidate, retryMergeUnverified
+ }
+ if p.moved {
+ return "", ""
+ }
+ return p.candidate, ""
+}
+
+// verifiedMerge is the task's merged commit when it is proven to bring in
+// exactly the approved candidate: the candidate itself (it landed as it
+// is), or the hub's own answer to this merge request, a merge commit whose
+// second parent is the candidate (MergeVerified, its parents recorded on
+// the merge step). "" otherwise: a reconciled or cached landing names the
+// commit the runner found, and past its 200-commit search the default
+// branch's tip, which may hold later work that nobody reviewed here.
+func verifiedMerge(k taskRecord, p progress) string {
+ m := p.merge
+ if k.Stage != wire.StageDone || k.MergedSHA == "" || m == nil || m.State != wire.StepDone || m.MergeSHA != k.MergedSHA || m.CandidateSHA != p.candidate {
+ return ""
+ }
+ if k.MergedSHA == p.candidate {
+ return k.MergedSHA
+ }
+ var parents []string
+ if json.Unmarshal([]byte(m.MergeParents), &parents) != nil {
+ return ""
+ }
+ if !k.MergeVerified || m.MergeSource != wire.MergeSourceHub || len(parents) != 2 || parents[1] != p.candidate || parents[0] == p.candidate || parents[0] == k.MergedSHA {
+ return ""
+ }
+ return k.MergedSHA
+}
+
+// previewMayBuild reports whether a preview of sha may run and publish
+// for the task now: the approved candidate while the branch is at it,
+// or, once the task is done, previewTarget.
+func previewMayBuild(k taskRecord, p progress, sha string) bool {
+ if sha == "" || !approvedCandidate(p) {
+ return false
+ }
+ target, _ := previewTarget(k, p)
+ return sha == p.candidate && !p.moved || k.Stage == wire.StageDone && sha == target
+}
+
+// previewOfTask reports whether a preview of sha stands for the task: of
+// its candidate cand, or of its merged commit once done (a preview of it
+// is only ever placed when verifiedMerge proved it).
+func previewOfTask(k taskRecord, cand, sha string) bool {
+ return sha != "" && (sha == cand || k.Stage == wire.StageDone && k.MergedSHA != "" && sha == k.MergedSHA)
+}
+
+// previewUp reports whether a preview step's link is served now:
+// deployed, before any expiry, and a devbox link only while its task runs
+// or is held for Publish (previewHeld), or one that came up after its task
+// was done (devboxAfterDone).
+func previewUp(k taskRecord, s stepRecord, now time.Time, held bool) bool {
+ r := decodePreview(s.Preview)
+ if s.State != wire.StepDone || r == nil || r.Outcome != wire.PreviewDeployed || r.URL == "" {
+ return false
+ }
+ if r.ExpiresAt != nil && !r.ExpiresAt.After(now) {
+ return false
+ }
+ if strings.HasPrefix(r.App, "eq-") && wire.FinalStage(k.Stage) && !held {
+ return devboxAfterDone(k, s)
+ }
+ return true
+}
+
+// devboxAfterDone: a devbox link that came up after its task was done (a
+// preview run again on a merged task). Nothing takes it down by itself:
+// the task's next preview replaces it, or the existing paths unshare it
+// (a known gap, retryDevboxStaysUp).
+func devboxAfterDone(k taskRecord, s stepRecord) bool {
+ r := decodePreview(s.Preview)
+ return r != nil && strings.HasPrefix(r.App, "eq-") && k.Stage == wire.StageDone && k.DoneAt != nil && s.FinishedAt != nil && s.FinishedAt.After(*k.DoneAt)
+}
+
+// previewRetryCheck is why a preview step cannot run again for person
+// now ("" when it can), and the commit it would build: the person's, on a
+// task not cancelled, the task's newest preview, ended and not up (failed,
+// cancelled, unconfirmed, expired, or a devbox link gone with its task),
+// a commit previewTarget names, on a primary whose preview host the
+// project allows now.
+func (t *txn) previewRetryCheck(k taskRecord, st stepRecord, person string) (reason, target string, err error) {
+ if st.Person != person {
+ return retryNotYours, "", nil
+ }
+ if k.CancelRequested || k.Stage == wire.StageCancelled {
+ return retryTaskCancelled, "", nil
+ }
+ steps, err := t.steps(k.ID)
+ if err != nil {
+ return "", "", err
+ }
+ for _, s := range steps {
+ if s.Specialist == wire.SpecialistPreview && s.Idx > st.Idx {
+ return retryNotNewest, "", nil
+ }
+ }
+ if !wire.StepTerminal(st.State) || !st.Terminated {
+ return retryNotEnded, "", nil
+ }
+ held := false
+ if wire.FinalStage(k.Stage) {
+ if held, err = t.previewHeld(k, steps); err != nil {
+ return "", "", err
+ }
+ }
+ // Up: nothing to run again, except a devbox link brought up after the
+ // task was done, which only the next run replaces.
+ if previewUp(k, st, t.now(), held) && !devboxAfterDone(k, st) {
+ return retryCompleted, "", nil
+ }
+ p := progressFor(k, steps)
+ if !approvedCandidate(p) {
+ return retryNotApproved, "", nil
+ }
+ target, _ = previewTarget(k, p)
+ if target == "" || k.Stage != wire.StageDone && st.CandidateSHA != target {
+ return retryCommitChanged, "", nil
+ }
+ primary, err := t.s.authority.PrimaryRunner(t.db, st.Person)
+ if err != nil || primary == "" {
+ return retryNoRunner, "", err
+ }
+ rs, err := t.runners(st.Person)
+ if err != nil {
+ return "", "", err
+ }
+ for _, r := range rs {
+ if r.ID == primary {
+ reason, err := t.previewHostAuthority(k.ProjectID, r)
+ return reason, target, err
+ }
+ }
+ return retryNoRunner, "", nil
+}
+
+// endedReason is why a step other than a preview cannot run again for
+// its state ("" when it failed and ended).
+func endedReason(st stepRecord, found bool) string {
+ switch {
+ case !found:
+ return retryNoStep
+ case !wire.StepTerminal(st.State) || !st.Terminated:
+ return retryNotEnded
+ case st.State == wire.StepDone:
+ return retryCompleted
+ case st.State == wire.StepCancelled:
+ return retryNotFailed
+ }
+ return ""
+}
+
+// retryReason is why person cannot run st again now ("" when they can),
+// as personRetry would decide for the coordinator: read_task's retry.
+func (t *txn) retryReason(k taskRecord, st stepRecord, person string) (string, error) {
+ if err := t.isOwner(person); errors.Is(err, ErrForbidden) {
+ return retryNotOwner, nil
+ } else if err != nil {
+ return "", err
+ }
+ if k.Creator != person {
+ return retryNotYours, nil
+ }
+ if k.CancelRequested || k.Stage == wire.StageCancelled {
+ return retryTaskCancelled, nil
+ }
+ if st.Specialist == wire.SpecialistPreview {
+ reason, _, err := t.previewRetryCheck(k, st, person)
+ return reason, err
+ }
+ if k.Stage == wire.StageDone {
+ return retryTaskDone, nil
+ }
+ latest, found, err := t.latestStep(k.ID)
+ if err != nil {
+ return "", err
+ }
+ if !found || latest.ID != st.ID {
+ return retryNotNewest, nil
+ }
+ if r := endedReason(st, true); r != "" {
+ return r, nil
+ }
+ if st.Person != person {
+ return retryNotYours, nil
+ }
+ primary, err := t.s.authority.PrimaryRunner(t.db, st.Person)
+ if err != nil || primary == "" {
+ return retryNoRunner, err
+ }
+ return "", nil
+}
+
+// retryView is read_task's word on running the task's newest step of a
+// kind again (wire.RetryStepKinds): Reason is "" when it can run.
+type retryView struct {
+ Step string `json:"step"`
+ StepID string `json:"step_id"`
+ Retryable bool `json:"retryable"`
+ Reason string `json:"reason,omitempty"`
+ // Note is a fixed note beside it (retryMergeUnverified,
+ // retryDevboxStaysUp), NoteText what it means.
+ Note string `json:"note,omitempty"`
+ NoteText string `json:"note_text,omitempty"`
+}
+
+func (t *txn) retryViews(k taskRecord, person string) ([]retryView, error) {
+ var out []retryView
+ for _, kind := range wire.RetryStepKinds {
+ var st stepRecord
+ res := t.db.Where("task_id = ? AND specialist = ? AND coalesce(retired, 0) = 0", k.ID, kind).Order("idx DESC").Limit(1).Find(&st)
+ if res.Error != nil {
+ return nil, res.Error
+ }
+ if res.RowsAffected == 0 {
+ continue
+ }
+ reason, err := t.retryReason(k, st, person)
+ if err != nil {
+ return nil, err
+ }
+ v := retryView{Step: kind, StepID: st.ID, Retryable: reason == "", Reason: reason}
+ if kind == wire.SpecialistPreview {
+ if v.Note, err = t.previewNote(k, st); err != nil {
+ return nil, err
+ }
+ v.NoteText = retryNotes[v.Note]
+ }
+ out = append(out, v)
+ }
+ return out, nil
+}
+
+// rerunPreview places a new preview step of target on a finished task,
+// beside its other steps (the timeline shows it after them); the task's
+// stage and its merge are untouched.
+func (t *txn) rerunPreview(k *taskRecord, st *stepRecord, target string, coordinator bool) (int64, error) {
+ steps, err := t.steps(k.ID)
+ if err != nil {
+ return 0, err
+ }
+ s := stepRecord{Specialist: wire.SpecialistPreview, Person: st.Person, Round: st.Round, BaseSHA: st.BaseSHA, CandidateSHA: target}
+ if coordinator {
+ s.CoordinatorAttempt = 1
+ }
+ if err := t.nextStep(k, steps, s); err != nil {
+ return 0, err
+ }
+ return 1, nil
+}
+
+// previewNote is the fixed note beside a task's newest preview: its link
+// on a done task stays up until replaced, or a new preview would build the
+// approved commit because the merged one is not proven.
+func (t *txn) previewNote(k taskRecord, st stepRecord) (string, error) {
+ if devboxAfterDone(k, st) && previewUp(k, st, t.now(), false) {
+ return retryDevboxStaysUp, nil
+ }
+ steps, err := t.steps(k.ID)
+ if err != nil {
+ return "", err
+ }
+ _, note := previewTarget(k, progressFor(k, steps))
+ return note, nil
+}
diff --git a/internal/equipo/chat/publish.go b/internal/equipo/chat/publish.go
index 70b68635..08349b69 100644
--- a/internal/equipo/chat/publish.go
+++ b/internal/equipo/chat/publish.go
@@ -660,14 +660,16 @@ func previewLink(k taskRecord, steps []stepRecord, cand string, now time.Time, h
}
for i := len(steps) - 1; i >= 0; i-- {
s := steps[i]
- if s.Specialist != wire.SpecialistPreview || s.CandidateSHA != cand || s.State != wire.StepDone {
+ // Of the candidate, or of the merged commit once done (a preview
+ // run again after the merge).
+ if s.Specialist != wire.SpecialistPreview || !previewOfTask(k, cand, s.CandidateSHA) || s.State != wire.StepDone {
continue
}
r := decodePreview(s.Preview)
if r == nil || r.Outcome != wire.PreviewDeployed || r.URL == "" {
continue
}
- if strings.HasPrefix(r.App, "eq-") && wire.FinalStage(k.Stage) && !held || r.ExpiresAt != nil && !r.ExpiresAt.After(now) {
+ if !previewUp(k, s, now, held) {
return ""
}
return r.URL
diff --git a/internal/equipo/chat/stuck.go b/internal/equipo/chat/stuck.go
index 6742300b..507e2b9f 100644
--- a/internal/equipo/chat/stuck.go
+++ b/internal/equipo/chat/stuck.go
@@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"slices"
+ "strings"
"gorm.io/gorm"
@@ -99,54 +100,30 @@ func (t *txn) offerRetry(r turnRecord, args json.RawMessage) (wire.ToolResult, e
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.
+// retryPreview runs a preview again (the person's Retry on it, or
+// retry_step), also when a merge step came after it or the task is done:
+// only the task's newest preview, ended and not up, as previewRetryCheck
+// says. On a task still open it is the step's next attempt, of the
+// candidate the task stands on; on a done task a new preview step of
+// previewTarget (rerunPreview). 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 {
+ reason, target, err := t.previewRetryCheck(*k, *st, person)
+ switch {
+ case err != nil:
return 0, err
+ case reason == retryNotYours:
+ return 0, refuseRetry(ErrForbidden, reason)
+ case reason == retryTaskCancelled:
+ return 0, refuseRetry(ErrTaskEnded, reason)
+ case reason != "":
+ return 0, refuseRetry(ErrNotRetryable, reason)
}
- 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
+ if k.Stage == wire.StageDone {
+ return t.rerunPreview(k, st, target, coordinator)
}
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, "", ""
@@ -163,15 +140,22 @@ func (t *txn) retryPreview(k *taskRecord, st *stepRecord, person string, coordin
// 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."
+ 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."
+ // A done task's preview runs again as a new step.
+ toolRetryNewPreview = "Started a new preview of the task's merged commit; the task stays done and merged. Tell the person in one line; the task shows it."
+ // The merged commit is not proven (merge_unverified), or Equipo did
+ // not merge it: the approved commit is built.
+ toolRetryApprovedPreview = "Started a new preview of the commit Review approved (Equipo could not prove the merged commit is exactly its merge, or did not merge it); the task stays done. 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.
+// On a done task only a preview runs again, as a new step of the merged
+// commit. A refusal says why in a fixed reason (retryNotes).
func (t *txn) retryStepTool(r turnRecord, args json.RawMessage) (wire.ToolResult, error) {
var in struct {
Task string `json:"task"`
@@ -183,31 +167,49 @@ func (t *txn) retryStepTool(r turnRecord, args json.RawMessage) (wire.ToolResult
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
+ k, err := t.loadTask(strings.TrimSpace(in.Task))
+ if errors.Is(err, ErrNotFound) {
+ return refused("not_found", toolNoTask), nil
+ } else if err != nil {
+ return wire.ToolResult{}, err
+ }
+ if k.Creator != r.Person {
+ return refusedRetry("not_yours", retryNotYours), nil
}
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
+ return refusedRetry("not_retryable", retryNoStep), 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
+ return refusedRetry("not_retryable", retryReasonOf(err, "not_retryable")), nil
case errors.Is(err, ErrTaskEnded):
- return refused("task_ended", toolTaskEnded), nil
+ return refusedRetry("task_ended", retryReasonOf(err, retryTaskCancelled)), nil
case errors.Is(err, ErrForbidden):
- return refused("not_yours", toolNotYours), nil
+ return refusedRetry("not_yours", retryReasonOf(err, retryNotYours)), nil
case err != nil:
return wire.ToolResult{}, err
}
+ text := fmt.Sprintf(toolRetryStarted, attempt)
+ var now stepRecord
+ if err := t.db.Where("task_id = ? AND specialist = ? AND coalesce(retired, 0) = 0", k.ID, in.Step).Order("idx DESC").First(&now).Error; err != nil {
+ return wire.ToolResult{}, err
+ }
+ if now.ID != st.ID {
+ // A done task's preview: a new step of the merged commit, or of the
+ // approved commit when the merged one is not proven.
+ text = toolRetryNewPreview
+ if now.CandidateSHA != k.MergedSHA {
+ text = toolRetryApprovedPreview
+ }
+ }
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 {
+ if err := t.s.authority.Audit(t.db, "coordinator:"+r.Person, "task.retry", k.ID+"/"+now.ID+"/"+itoa64(attempt)); err != nil {
return wire.ToolResult{}, err
}
}
- return wire.ToolResult{Code: "retrying", Text: fmt.Sprintf(toolRetryStarted, attempt)}, nil
+ return wire.ToolResult{Code: "retrying", Text: text}, nil
}
diff --git a/internal/equipo/chat/tasks.go b/internal/equipo/chat/tasks.go
index 3eba769f..2e798c0e 100644
--- a/internal/equipo/chat/tasks.go
+++ b/internal/equipo/chat/tasks.go
@@ -1233,7 +1233,7 @@ func (t *txn) dispatchStep(k *taskRecord, s *stepRecord) error {
}
// readTask is what the coordinator sees of a task.
-func (t *txn) readTask(id string) (wire.ToolResult, error) {
+func (t *txn) readTask(person, id string) (wire.ToolResult, error) {
k, err := t.loadTask(strings.TrimSpace(id))
if errors.Is(err, ErrNotFound) {
return refused("not_found", toolNoTask), nil
@@ -1251,10 +1251,17 @@ func (t *txn) readTask(id string) (wire.ToolResult, error) {
// The questions and answers are the person's with the specialists;
// the coordinator points people there and never relays them.
v.Questions = []wire.Question{}
+ // Whether each step retry_step may run again can run now, and if not
+ // why (a fixed reason), for this turn's person.
+ retry, err := t.retryViews(k, person)
+ if err != nil {
+ return wire.ToolResult{}, err
+ }
raw, _ := json.Marshal(struct {
- Link string `json:"link"`
+ Link string `json:"link"`
+ Retry []retryView `json:"retry,omitempty"`
wire.Task
- }{TaskLink(v.ID), v})
+ }{TaskLink(v.ID), retry, v})
return wire.ToolResult{Code: "task", Text: clipText(string(raw), 16<<10)}, nil
}
@@ -2028,11 +2035,14 @@ func (s *Store) retryTask(ctx context.Context, person, id, step string) (attempt
}
// 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.
+// step): an owner, the task's creator, a task not cancelled; on a done
+// task only its preview (retryStepOf). The coordinator's retry_step makes
+// exactly these checks for its person (coordinator), on RetryStepKinds
+// only. A refusal carries its fixed reason (retryRefusal).
func (t *txn) personRetry(person, id, step string, coordinator bool) (int64, error) {
- if err := t.isOwner(person); err != nil {
+ if err := t.isOwner(person); errors.Is(err, ErrForbidden) {
+ return 0, refuseRetry(ErrForbidden, retryNotOwner)
+ } else if err != nil {
return 0, err
}
k, err := t.loadTask(id)
@@ -2041,10 +2051,10 @@ func (t *txn) personRetry(person, id, step string, coordinator bool) (int64, err
}
// Only the task's creator retries it, onto their own runner.
if k.Creator != person {
- return 0, ErrForbidden
+ return 0, refuseRetry(ErrForbidden, retryNotYours)
}
- if wire.FinalStage(k.Stage) || k.CancelRequested {
- return 0, ErrTaskEnded
+ if k.Stage == wire.StageCancelled || k.CancelRequested {
+ return 0, refuseRetry(ErrTaskEnded, retryTaskCancelled)
}
return t.retryStepOf(&k, person, step, coordinator)
}
@@ -2072,12 +2082,15 @@ func (t *txn) retryStepOf(k *taskRecord, person, step string, coordinator bool)
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
+ return 0, refuseRetry(ErrNotRetryable, retryNoStep)
} else if err != nil {
return 0, err
}
if named.Specialist != wire.SpecialistPreview && (!found || named.ID != st.ID) {
- return 0, ErrNotRetryable
+ if k.Stage == wire.StageDone {
+ return 0, refuseRetry(ErrTaskEnded, retryTaskDone)
+ }
+ return 0, refuseRetry(ErrNotRetryable, retryNotNewest)
}
st, found = named, true
}
@@ -2087,6 +2100,11 @@ func (t *txn) retryStepOf(k *taskRecord, person, step string, coordinator bool)
if found && st.Specialist == wire.SpecialistPreview {
return t.retryPreview(k, &st, person, coordinator)
}
+ if wire.FinalStage(k.Stage) {
+ // A done task runs only its preview again; its merge, checks and
+ // review stay as they are.
+ return 0, refuseRetry(ErrTaskEnded, retryTaskDone)
+ }
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.
@@ -2102,11 +2120,11 @@ func (t *txn) retryStepOf(k *taskRecord, person, step string, coordinator bool)
attempt = st.Attempt
return attempt, t.saveTask(k)
}
- if !found || st.State != wire.StepFailed || !st.Terminated {
- return 0, ErrNotRetryable
+ if reason := endedReason(st, found); reason != "" {
+ return 0, refuseRetry(ErrNotRetryable, reason)
}
if st.Person != person {
- return 0, ErrForbidden
+ return 0, refuseRetry(ErrForbidden, retryNotYours)
}
if st.Specialist == wire.SpecialistMerge {
// Never merge a SHA that is not the judged one, as it stands; a
@@ -2120,7 +2138,7 @@ func (t *txn) retryStepOf(k *taskRecord, person, step string, coordinator bool)
}
p := progressFor(*k, steps)
if p.candidate != st.CandidateSHA || !p.mergeAllowed(st.WithoutChecks) {
- return 0, ErrNotRetryable
+ return 0, refuseRetry(ErrNotRetryable, retryCommitChanged)
}
_, protocol, err := t.primaryState(st.Person)
if err != nil {
@@ -2138,7 +2156,7 @@ func (t *txn) retryStepOf(k *taskRecord, person, step string, coordinator bool)
return 0, err
}
if primary == "" {
- return 0, ErrNotRetryable
+ return 0, refuseRetry(ErrNotRetryable, retryNoRunner)
}
from := st.Attempt
st.Attempt++
@@ -2359,7 +2377,7 @@ func (t *txn) runTaskTool(r turnRecord, v *wire.ToolCall) (wire.ToolResult, erro
if wire.Strict(v.Args, &in) != nil {
return refused("invalid", toolBadInput), nil
}
- return t.readTask(in.Task)
+ return t.readTask(r.Person, in.Task)
case wire.ToolCancelTask:
var in struct {
Task string `json:"task"`
diff --git a/internal/equipo/preview_pass_store.go b/internal/equipo/preview_pass_store.go
index 0286de4f..f236fe96 100644
--- a/internal/equipo/preview_pass_store.go
+++ b/internal/equipo/preview_pass_store.go
@@ -114,10 +114,15 @@ func (s *Store) previewDeployment(task wire.Task) (wire.Step, string, error) {
}
func (s *Store) validatePreview(task wire.Task, b previewBinding) error {
step, fingerprint, err := s.previewDeployment(task)
- if task.CandidateSHA != b.Candidate || err != nil || step.CandidateSHA != b.Candidate || step.ID != b.StepID || step.Attempt != b.Attempt || fingerprint != b.Fingerprint {
+ // Of the task's candidate, or, once it is done, of its merged commit
+ // (a preview run again after the merge).
+ merged := task.Stage == wire.StageDone && task.Merged != nil && task.Merged.SHA != "" && step.CandidateSHA == task.Merged.SHA
+ if task.CandidateSHA != b.Candidate || err != nil || step.CandidateSHA != b.Candidate && !merged || step.ID != b.StepID || step.Attempt != b.Attempt || fingerprint != b.Fingerprint {
return ErrPreviewChanged
}
- if (step.Preview.ExpiresAt != nil && !s.runnerClock.Now().Before(*step.Preview.ExpiresAt)) || (strings.HasPrefix(step.Preview.App, "eq-") && wire.FinalStage(task.Stage)) {
+ // A devbox link comes down with its task, unless it came up after the
+ // task was done (a preview run again on a merged task).
+ if (step.Preview.ExpiresAt != nil && !s.runnerClock.Now().Before(*step.Preview.ExpiresAt)) || (strings.HasPrefix(step.Preview.App, "eq-") && wire.FinalStage(task.Stage) && !devboxAfterDone(task, step)) {
return ErrPreviewExpired
}
return nil
diff --git a/internal/equipo/work_views.go b/internal/equipo/work_views.go
index 562eb714..e865b8e3 100644
--- a/internal/equipo/work_views.go
+++ b/internal/equipo/work_views.go
@@ -1148,7 +1148,11 @@ func timelineOf(t wire.Task, v taskLine) []timelineItem {
out = append(out, it)
continue
case wire.StepCancelled:
- out = append(out, timelineItem{Kind: "stopped", What: fmt.Sprintf(copyText("work.tl.cancelled"), title), At: s.FinishedAt})
+ it := timelineItem{Kind: "stopped", What: fmt.Sprintf(copyText("work.tl.cancelled"), title), At: s.FinishedAt}
+ if previewRetry(t, s, v.Mine) {
+ it.RetryPost, it.RetryStep = "/conversation/tasks/"+t.ID+"/retry", s.ID
+ }
+ out = append(out, it)
continue
}
switch s.Specialist {
@@ -1199,6 +1203,10 @@ func timelineOf(t wire.Task, v taskLine) []timelineItem {
if s.Preview.Outcome == wire.PreviewDeployed && s.Preview.URL != "" {
it.What, it.Markdown = copyText("work.tl.preview_ready"), "["+previewHostLabel(s.Preview.URL)+"](/tasks/"+t.ID+"/preview)"
}
+ if previewRetry(t, s, v.Mine) {
+ // Unconfirmed, or its link is gone: Retry, as for a failed one.
+ it.RetryPost, it.RetryStep = "/conversation/tasks/"+t.ID+"/retry", s.ID
+ }
out = append(out, it)
case wire.SpecialistReview:
one := t
@@ -1265,12 +1273,17 @@ 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).
+// previewRetry reports whether the person may run a preview again from
+// its own entry: theirs, ended without a link up now (failed, cancelled,
+// unconfirmed, expired, or a devbox link gone with its task), the task's
+// newest preview, of the candidate the task stands on, or on a done task
+// any (it builds the merged commit), the task not cancelled. The store
+// decides again (previewRetryCheck).
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 {
+ if !mine || s.Specialist != wire.SpecialistPreview || !wire.StepTerminal(s.State) || !s.Terminated || t.Stage == wire.StageCancelled || previewShown(t, s, time.Now()) && !devboxAfterDone(t, s) {
+ return false
+ }
+ if t.Stage != wire.StageDone && (t.CandidateSHA == "" || s.CandidateSHA != t.CandidateSHA) {
return false
}
for _, o := range t.Steps {
@@ -1281,6 +1294,31 @@ func previewRetry(t wire.Task, s wire.Step, mine bool) bool {
return true
}
+// previewShown reports whether a preview step's link is up now: deployed,
+// before any expiry, and a devbox link only while its task runs or one
+// that came up after its task was done (the store's previewUp, without a
+// Publish hold, which only keeps a link up longer).
+func previewShown(t wire.Task, s wire.Step, now time.Time) bool {
+ p := s.Preview
+ if s.State != wire.StepDone || p == nil || p.Outcome != wire.PreviewDeployed || p.URL == "" {
+ return false
+ }
+ if p.ExpiresAt != nil && !p.ExpiresAt.After(now) {
+ return false
+ }
+ if strings.HasPrefix(p.App, "eq-") && wire.FinalStage(t.Stage) {
+ return devboxAfterDone(t, s)
+ }
+ return true
+}
+
+// devboxAfterDone: a devbox link that came up after its task was done (a
+// preview run again on a merged task); any other comes down with the
+// task. It stays up until the task's next preview replaces it.
+func devboxAfterDone(t wire.Task, s wire.Step) bool {
+ return s.Preview != nil && strings.HasPrefix(s.Preview.App, "eq-") && t.Stage == wire.StageDone && t.DoneAt != nil && s.FinishedAt != nil && s.FinishedAt.After(*t.DoneAt)
+}
+
// sentenceCase capitalises a reason fragment for a line of its own.
func sentenceCase(s string) string {
if s == "" {
@@ -1545,8 +1583,9 @@ func previewCard(t wire.Task, now time.Time) (url, line string) {
p := s.Preview
if strings.HasPrefix(p.App, "eq-") {
// A CARLOS devbox link: no expiry; it comes down when the task
- // ends, and so does the line.
- if wire.FinalStage(t.Stage) {
+ // ends, and so does the line; one run again after the task was
+ // done stays until the next run replaces it.
+ if wire.FinalStage(t.Stage) && (!devboxAfterDone(t, s) || p.ExpiresAt != nil && !p.ExpiresAt.After(now)) {
return "", ""
}
return "/tasks/" + t.ID + "/preview", fmt.Sprintf(copyText("work.card.preview_tailnet"), previewHostLabel(p.URL))
diff --git a/internal/runner/thin/mcp.go b/internal/runner/thin/mcp.go
index a37cd600..9bec432b 100644
--- a/internal/runner/thin/mcp.go
+++ b/internal/runner/thin/mcp.go
@@ -172,7 +172,7 @@ var converseTools = []any{
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")},
+ map[string]any{"name": wire.ToolRetryStep, "description": "Run a task's preview, checks or review again, as the person's own Retry would (step: preview, checks or review). read_task's retry says for each whether it can run again now, and if not why, in a fixed reason; a refusal says it too. A failed step runs again as its next attempt. A preview also runs again when it ended unconfirmed or its link is gone, and on a done (merged) task as a new preview of the merged commit, the task staying done and merged. Only when 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/merge_identity_test.go b/internal/runner/thin/merge_identity_test.go
new file mode 100644
index 00000000..f04f18d4
--- /dev/null
+++ b/internal/runner/thin/merge_identity_test.go
@@ -0,0 +1,95 @@
+package thin
+
+import (
+ "context"
+ "os"
+ "path/filepath"
+ "strconv"
+ "testing"
+
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// Merge identity (Astra, previews on done tasks): the commit a landing
+// names is publication authority only when it is proven to be the merge
+// of the approved candidate. These are the shapes, in real git, where the
+// runner's reconciled landing (inspectMerge) names something else: a
+// nested merge, or a merge more than 200 first-parent commits back, are
+// named by the default branch's tip, which holds later work. The
+// instance builds the approved candidate then (chat.verifiedMerge); only
+// the hub's own answer, with the candidate as second parent, is the merge.
+
+// landedThenMoved merges the candidate through the hub, then lets main
+// move on with work in a clone of the remote.
+func landedThenMoved(t *testing.T, more func(work string)) (*Engineer, *hubForge, stepRow, string, string) {
+ t.Helper()
+ e, f, r, cand := hubRig(t)
+ rep := e.Exec(context.Background(), r, func(wire.StepReport) {})
+ if rep.State != wire.StepDone || rep.MergeSource != wire.MergeSourceHub || len(rep.MergeParents) != 2 || rep.MergeParents[1] != cand {
+ t.Fatalf("hub merge %+v", rep)
+ }
+ work := filepath.Join(t.TempDir(), "later")
+ gitOut(t, filepath.Dir(work), "clone", "-q", f.dir, work)
+ more(work)
+ gitOut(t, work, "push", "-q", "-f", "origin", "HEAD:main")
+ return e, f, r, cand, rep.MergeSHA
+}
+
+func commitFile(t *testing.T, work, name, body string) {
+ t.Helper()
+ if err := os.WriteFile(filepath.Join(work, name), []byte(body), 0o644); err != nil {
+ t.Fatal(err)
+ }
+ gitOut(t, work, "add", "-A")
+ gitOut(t, work, "commit", "-q", "-m", name)
+}
+
+// TestMergeIdentityLaterCommits: later commits after the merge leave the
+// merge commit itself the one that brought the candidate in.
+func TestMergeIdentityLaterCommits(t *testing.T) {
+ e, f, r, cand, merge := landedThenMoved(t, func(work string) {
+ for i := range 3 {
+ commitFile(t, work, "later-"+strconv.Itoa(i), "later\n")
+ }
+ })
+ st, err := e.inspectMerge(context.Background(), r.Repo, r.Branch, cand)
+ tip := gitOut(t, f.dir, "rev-parse", "main")
+ if err != nil || !st.Landed || st.MergeSHA != merge || tip == merge {
+ t.Fatalf("inspect %+v %v (merge %s, tip %s)", st, err, merge, tip)
+ }
+}
+
+// TestMergeIdentityFallsBackToTheTip: a nested merge (the candidate came
+// in through another branch's merge) and a merge more than 200
+// first-parent commits back are both named by the tip, whose parents do
+// not have the candidate second: never proof of the merge.
+func TestMergeIdentityFallsBackToTheTip(t *testing.T) {
+ for name, more := range map[string]func(string){
+ "nested": func(work string) {
+ // The candidate reaches main only through another branch's
+ // merge: integration merges it, then main merges integration.
+ gitOut(t, work, "checkout", "-q", "-b", "integration", "main~1")
+ gitOut(t, work, "merge", "-q", "--no-ff", "-m", "integration", "main^2")
+ commitFile(t, work, "integration-only", "x\n")
+ gitOut(t, work, "checkout", "-q", "-B", "main", "origin/main~1")
+ gitOut(t, work, "merge", "-q", "--no-ff", "-m", "bring integration", "integration")
+ },
+ "far": func(work string) {
+ for i := range 201 {
+ commitFile(t, work, "far", strconv.Itoa(i)+"\n")
+ }
+ },
+ } {
+ t.Run(name, func(t *testing.T) {
+ e, f, r, cand, _ := landedThenMoved(t, more)
+ st, err := e.inspectMerge(context.Background(), r.Repo, r.Branch, cand)
+ tip := gitOut(t, f.dir, "rev-parse", "main")
+ if err != nil || !st.Landed || st.MergeSHA != tip {
+ t.Fatalf("inspect %+v %v (tip %s)", st, err, tip)
+ }
+ if parents := e.mergeParents(context.Background(), r.Repo, tip); len(parents) == 2 && parents[1] == cand {
+ t.Fatalf("the tip reads as the candidate's merge: %v", parents)
+ }
+ })
+ }
+}
diff --git a/internal/thintest/preview_retry_done_contract_test.go b/internal/thintest/preview_retry_done_contract_test.go
new file mode 100644
index 00000000..369c925d
--- /dev/null
+++ b/internal/thintest/preview_retry_done_contract_test.go
@@ -0,0 +1,499 @@
+package thintest
+
+import (
+ "encoding/json"
+ "net/http"
+ "net/url"
+ "strings"
+ "testing"
+ "time"
+
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// Previews on finished tasks (Paul, 2026-11-26, production): "Retry the
+// Neary's preview" was refused because both tasks were merged and done,
+// one preview failed for its scanner and the other ended unconfirmed
+// (preview_headers), which did not count as a failure. A preview runs
+// again on a merged task from its merged commit, by the person's Retry or
+// the coordinator's retry_step, through the preview's own checks; the
+// task's stage, merge and other steps stay as they are. An unconfirmed
+// preview, or one whose link is gone, counts as one to run again. A
+// refusal says why in a fixed reason, in the tool's result and in
+// read_task.
+
+var mergedSHA = strings.Repeat("9", 40)
+
+// previewedThenMerged is previewedAndMerging with the preview ended by
+// end and the merge confirmed as mergedSHA, the hub's own merge commit
+// with the candidate as second parent: the task is done.
+func (r *toolRig) previewedThenMerged(key, base, cand string, end func(id string, pv *wire.DispatchCommand)) (string, *wire.DispatchCommand, *wire.DispatchCommand) {
+ r.t.Helper()
+ return r.previewedThenLanded(key, base, cand, end, func(m *wire.DispatchCommand) {
+ r.landed(key+"-m", m, mergedSHA, wire.MergeSourceHub, []string{base, cand})
+ })
+}
+
+// landed reports a merge step done as sha, from source with parents.
+func (r *toolRig) landed(key string, d *wire.DispatchCommand, sha, source string, parents []string) {
+ r.t.Helper()
+ r.step(key+"-run", wire.StepReport{TaskID: d.TaskID, StepID: d.StepID, Attempt: d.Attempt, State: wire.StepRunning, BaseSHA: d.BaseSHA, CandidateSHA: d.CandidateSHA})
+ r.step(key, wire.StepReport{TaskID: d.TaskID, StepID: d.StepID, Attempt: d.Attempt, State: wire.StepDone, BaseSHA: d.BaseSHA, CandidateSHA: d.CandidateSHA, Termination: true, Findings: []wire.Finding{}, MergeSHA: sha, Into: "main", Strategy: wire.MergeCommit, MergeSource: source, MergeParents: parents})
+}
+
+// previewedThenLanded is previewedThenMerged with the merge reported by
+// land.
+func (r *toolRig) previewedThenLanded(key, base, cand string, end func(id string, pv *wire.DispatchCommand), land func(m *wire.DispatchCommand)) (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")
+ }
+ r.built(key+"-pv-built", pv, digestA)
+ end(id, pv)
+ // The preview's outcome may give the merge card a new revision.
+ var seen int64
+ for {
+ 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 && k.Revision > seen {
+ card = k
+ }
+ }
+ return card.ID != ""
+ })
+ _, err := r.client.Answer(r.ctx, card.ID, wire.ChoiceMerge, card.Revision)
+ if err == nil {
+ break
+ }
+ if Status(err) != http.StatusConflict || seen > 5 {
+ r.t.Fatal(err)
+ }
+ seen = card.Revision
+ }
+ m := r.dispatched(wire.SpecialistMerge, base, cand, 0)
+ land(m)
+ r.wait("done", func(c *Conversation) bool { return c.Tasks[id].Stage == wire.StageDone })
+ return id, pv, m
+}
+
+// failedPreview ends a preview the way tkbstr6cjl7h's did.
+func (r *toolRig) failedPreview(reason string) func(string, *wire.DispatchCommand) {
+ return func(id string, pv *wire.DispatchCommand) {
+ r.step(id+"-pv-fail", wire.StepReport{TaskID: id, StepID: pv.StepID, Attempt: pv.Attempt, State: wire.StepFailed, Reason: reason, BaseSHA: pv.BaseSHA, CandidateSHA: pv.CandidateSHA, Termination: true, Findings: []wire.Finding{}})
+ }
+}
+
+// unconfirmedPreview ends a preview the way tkzmnycab3ml's did: done, its
+// link not confirmed, for reason.
+func (r *toolRig) unconfirmedPreview(reason, app string) func(string, *wire.DispatchCommand) {
+ return func(id string, pv *wire.DispatchCommand) {
+ r.step(id+"-pv-unconfirmed", wire.StepReport{TaskID: id, StepID: pv.StepID, Attempt: pv.Attempt, State: wire.StepDone, Reason: reason, BaseSHA: pv.BaseSHA, CandidateSHA: pv.CandidateSHA, Termination: true, Findings: []wire.Finding{}, Preview: &wire.PreviewResult{Phase: wire.PreviewDone, App: app + id, Digest: digestA, Outcome: wire.PreviewUnconfirmed}})
+ }
+}
+
+// refusal is a refused retry_step's fixed reason.
+func refusal(t *testing.T, res wire.ToolResult) string {
+ t.Helper()
+ var out struct {
+ Reason string `json:"reason"`
+ Note string `json:"note"`
+ }
+ if !res.IsError || json.Unmarshal([]byte(res.Text), &out) != nil || out.Reason == "" || out.Note == "" {
+ t.Fatalf("not a refusal with a reason: %+v", res)
+ }
+ return out.Reason
+}
+
+// retryOf is read_task's word on running the task's newest step of kind
+// again: "" when it can run, else the fixed reason it cannot.
+func (r *toolRig) retryOf(key, id, kind string) (string, bool) {
+ r.t.Helper()
+ res := r.call(key, wire.ToolReadTask, map[string]string{"task": id})
+ var out struct {
+ Retry []struct {
+ Step string `json:"step"`
+ StepID string `json:"step_id"`
+ Retryable bool `json:"retryable"`
+ Reason string `json:"reason"`
+ } `json:"retry"`
+ }
+ if res.IsError || json.Unmarshal([]byte(res.Text), &out) != nil {
+ r.t.Fatalf("read_task %+v", res)
+ }
+ for _, x := range out.Retry {
+ if x.Step == kind {
+ if x.Retryable == (x.Reason != "") || x.StepID == "" {
+ r.t.Fatalf("read_task retry %+v", x)
+ }
+ return x.Reason, true
+ }
+ }
+ return "", false
+}
+
+// TestContractRetryPreviewOnMergedTask (tkbstr6cjl7h): the person's Retry
+// on a done task's failed preview builds the merged commit as a new
+// preview step, published only through the preview's checks; the task
+// stays done, merged as it was, and its earlier steps are untouched.
+func TestContractRetryPreviewOnMergedTask(t *testing.T) {
+ r := publicPreviewRig(t)
+ base, cand := strings.Repeat("1", 40), strings.Repeat("2", 40)
+ id, pv, m := r.previewedThenMerged("pd", base, cand, r.failedPreview("preview_scanner"))
+ before, _ := r.client.Task(r.ctx, id)
+ if before.Stage != wire.StageDone || before.Merged == nil || before.Merged.SHA != mergedSHA {
+ t.Fatalf("not merged %+v", before)
+ }
+ page := r.get(r.inst.Cookie(), "/tasks/"+id, 200)
+ if !strings.Contains(page, `<input type="hidden" name="step" value="`+pv.StepID+`">`) || !strings.Contains(page, "data-step-retry") {
+ t.Fatal("the done task's 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")
+ }
+ // Retry with no step means the newest step, the merge: never run again.
+ if _, err := r.client.RetryTask(r.ctx, id); Status(err) != http.StatusConflict {
+ t.Fatalf("Retry of the done task's merge: %v", err)
+ }
+ 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(mergedSHA)
+ if again == nil || again.StepID == pv.StepID || again.Attempt != 1 || again.CandidateSHA != mergedSHA {
+ t.Fatalf("the preview of the merged commit %+v", again)
+ }
+ k, _ := r.client.Task(r.ctx, id)
+ if k.Stage != wire.StageDone || k.Merged == nil || *k.Merged != *before.Merged || k.DoneAt == nil || !k.DoneAt.Equal(*before.DoneAt) || len(k.Steps) != len(before.Steps)+1 {
+ t.Fatalf("the re-run moved the task %+v", k)
+ }
+ for i, s := range before.Steps {
+ got := k.Steps[i]
+ if got.ID != s.ID || got.State != s.State || got.Attempt != s.Attempt || got.Reason != s.Reason || got.CandidateSHA != s.CandidateSHA || got.MergeSHA != s.MergeSHA {
+ t.Fatalf("step %d changed: %+v to %+v", i, s, got)
+ }
+ }
+ if s := k.Steps[len(k.Steps)-1]; s.ID != again.StepID || s.Specialist != wire.SpecialistPreview || s.State != wire.StepQueued || s.CandidateSHA != mergedSHA || s.RetriedBy != "" {
+ t.Fatalf("the new preview step %+v", s)
+ }
+ if s := k.Steps[len(k.Steps)-2]; s.ID != m.StepID || s.State != wire.StepDone || s.MergeSHA != mergedSHA {
+ t.Fatalf("the merge %+v", s)
+ }
+ // Asked again while it runs: nothing more.
+ r.post(r.inst.Cookie(), "/conversation/tasks/"+id+"/retry", url.Values{"from": {"task"}, "step": {again.StepID}})
+ if extra := r.previewDispatch(mergedSHA); extra != nil {
+ t.Fatalf("a second preview %+v", extra)
+ }
+ // Published only through the preview's own checks, for its export.
+ if refused := r.lease(r.runner, "pd-start", wire.LeaseCheck{StepID: again.StepID, Attempt: 1}); refused != "" {
+ t.Fatalf("start refused %q", refused)
+ }
+ if refused := r.lease(r.runner, "pd-early", wire.LeaseCheck{StepID: again.StepID, Attempt: 1, Purpose: wire.LeasePurposePreview, Digest: digestB}); refused != wire.RefusedPreviewNotBuilt {
+ t.Fatalf("publish before built: %q", refused)
+ }
+ r.built("pd-built", again, digestB)
+ if refused := r.lease(r.runner, "pd-wrong", wire.LeaseCheck{StepID: again.StepID, Attempt: 1, Purpose: wire.LeasePurposePreview, Digest: digestA}); refused != "withdrawn" {
+ t.Fatalf("publish of another export: %q", refused)
+ }
+ if refused := r.lease(r.runner, "pd-pub", wire.LeaseCheck{StepID: again.StepID, Attempt: 1, Purpose: wire.LeasePurposePreview, Digest: digestB}); refused != "" {
+ t.Fatalf("publish refused %q", refused)
+ }
+ expires := time.Now().Add(7 * 24 * time.Hour).UTC().Truncate(time.Second)
+ link := "https://tmp-" + id + ".bds.oncarlos.com/"
+ r.previewDone("pd-up", again, wire.PreviewResult{Phase: wire.PreviewDone, App: "tmp-" + id, URL: link, Digest: digestB, ExpiresAt: &expires, Outcome: wire.PreviewDeployed})
+ k, _ = r.client.Task(r.ctx, id)
+ if k.Stage != wire.StageDone || *k.Merged != *before.Merged || !strings.HasSuffix(k.PreviewURL, "/tasks/"+id+"/preview") {
+ t.Fatalf("after the re-run: %s %+v %q", k.Stage, k.Merged, k.PreviewURL)
+ }
+ if page := r.get(r.inst.Cookie(), "/tasks/"+id, 200); !strings.Contains(page, "data-preview") || strings.Contains(page, "data-step-retry") {
+ t.Fatal("the re-run's link is not shown, or Retry is still offered while it is up")
+ }
+ if page := r.get(r.inst.Cookie(), "/tasks/"+id+"/preview", 200); !strings.Contains(page, `src="`+link+`"`) {
+ t.Fatal("the preview page does not open the re-run")
+ }
+}
+
+// TestContractCoordinatorRetryUnconfirmedPreviewOnMergedTask
+// (tkzmnycab3ml): a done task's preview that ended unconfirmed
+// (preview_headers) is the coordinator's to run again, once per task in
+// a turn, from the merged commit; the page credits the coordinator.
+func TestContractCoordinatorRetryUnconfirmedPreviewOnMergedTask(t *testing.T) {
+ r := publicPreviewRig(t)
+ base, cand := strings.Repeat("1", 40), strings.Repeat("2", 40)
+ id, pv, _ := r.previewedThenMerged("pu", base, cand, r.unconfirmedPreview("preview_headers", "tmp-"))
+ if reason, ok := r.retryOf("pu-read", id, wire.SpecialistPreview); !ok || reason != "" {
+ t.Fatalf("read_task: the unconfirmed preview is not retryable (%q)", reason)
+ }
+ res := r.call("pu1", wire.ToolRetryStep, map[string]string{"task": id, "step": wire.SpecialistPreview})
+ if res.IsError || res.Code != "retrying" {
+ t.Fatalf("retry_step %+v", res)
+ }
+ again := r.previewDispatch(mergedSHA)
+ if again == nil || again.StepID == pv.StepID || again.Attempt != 1 {
+ t.Fatalf("the preview of the merged commit %+v", again)
+ }
+ k, _ := r.client.Task(r.ctx, id)
+ if s := k.Steps[len(k.Steps)-1]; s.ID != again.StepID || s.RetriedBy != wire.RetriedByCoordinator || k.Stage != wire.StageDone {
+ t.Fatalf("the coordinator's preview %+v (%s)", s, k.Stage)
+ }
+ if page := r.get(r.inst.Cookie(), "/tasks/"+id, 200); !strings.Contains(page, "The coordinator started Preview 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"))
+ }
+ if reason, _ := r.retryOf("pu-read2", id, wire.SpecialistPreview); reason != "not_ended" {
+ t.Fatalf("read_task while it runs: %q", reason)
+ }
+ // Once per task in a turn: a fresh call while it runs, and again once
+ // it failed and ended, is answered by the ledger; nothing more runs.
+ if res := r.call("pu2", wire.ToolRetryStep, map[string]string{"task": id, "step": wire.SpecialistPreview}); res.IsError || !res.Replayed {
+ t.Fatalf("second retry_step %+v", res)
+ }
+ r.step("pu-again-fail", wire.StepReport{TaskID: id, StepID: again.StepID, Attempt: 1, State: wire.StepFailed, Reason: "preview_failed", BaseSHA: again.BaseSHA, CandidateSHA: mergedSHA, Termination: true, Findings: []wire.Finding{}})
+ if res := r.call("pu3", wire.ToolRetryStep, map[string]string{"task": id, "step": wire.SpecialistPreview}); res.IsError || !res.Replayed {
+ t.Fatalf("retry_step after the re-run failed %+v", res)
+ }
+ if extra := r.previewDispatch(mergedSHA); extra != nil || r.audits("task.retry") != 1 {
+ t.Fatalf("a second preview in the turn %+v", extra)
+ }
+ if k2, _ := r.client.Task(r.ctx, id); len(k2.Steps) != len(k.Steps) || k2.Stage != wire.StageDone {
+ t.Fatalf("steps %d to %d, stage %s", len(k.Steps), len(k2.Steps), k2.Stage)
+ }
+}
+
+// TestContractRetryUnconfirmedPreview: on a task still open, a preview
+// that ended unconfirmed is offered and run again as its next attempt.
+func TestContractRetryUnconfirmedPreview(t *testing.T) {
+ r := publicPreviewRig(t)
+ r.asksBeforeMerging()
+ base, cand := strings.Repeat("1", 40), strings.Repeat("2", 40)
+ id, d := r.approvedWithPreview("uc", base, cand, true)
+ if d == nil {
+ t.Fatal("no preview")
+ }
+ r.built("uc-built", d, digestA)
+ r.unconfirmedPreview("preview_failed", "tmp-")(id, d)
+ page := r.get(r.inst.Cookie(), "/tasks/"+id, 200)
+ if !strings.Contains(page, `<input type="hidden" name="step" value="`+d.StepID+`">`) {
+ t.Fatal("an unconfirmed preview offers no Retry")
+ }
+ if status, _ := r.post(r.inst.Cookie(), "/conversation/tasks/"+id+"/retry", url.Values{"from": {"task"}, "step": {d.StepID}}); status != http.StatusSeeOther {
+ t.Fatalf("Retry %d", status)
+ }
+ again := r.previewDispatch(cand)
+ if again == nil || again.StepID != d.StepID || again.Attempt != 2 {
+ t.Fatalf("the preview again %+v", again)
+ }
+ if k, _ := r.client.Task(r.ctx, id); k.Stage != wire.StageReadyToMerge {
+ t.Fatalf("stage %s", k.Stage)
+ }
+}
+
+// TestContractRetryRefusalReasons: a retry that is still refused says
+// why, in a fixed reason, in retry_step's result and in read_task.
+func TestContractRetryRefusalReasons(t *testing.T) {
+ r := publicPreviewRig(t)
+ base, cand := strings.Repeat("1", 40), strings.Repeat("2", 40)
+ expires := time.Now().Add(7 * 24 * time.Hour).UTC().Truncate(time.Second)
+ id, pv, _ := r.previewedThenMerged("rr", base, cand, func(id string, pv *wire.DispatchCommand) {
+ r.previewDone("rr-up", pv, wire.PreviewResult{Phase: wire.PreviewDone, App: "tmp-" + id, URL: "https://tmp-" + id + ".bds.oncarlos.com/", Digest: digestA, ExpiresAt: &expires, Outcome: wire.PreviewDeployed})
+ })
+ // Deployed and still up: nothing to run again.
+ if res := r.call("rr1", wire.ToolRetryStep, map[string]string{"task": id, "step": wire.SpecialistPreview}); res.Code != "not_retryable" || refusal(t, res) != "completed" {
+ t.Fatalf("retry of a preview that is up %+v", res)
+ }
+ if reason, _ := r.retryOf("rr-read", id, wire.SpecialistPreview); reason != "completed" {
+ t.Fatalf("read_task %q", reason)
+ }
+ // A finished task's checks and review are not run again.
+ for _, kind := range []string{wire.SpecialistChecks, wire.SpecialistReview} {
+ if res := r.call("rr-"+kind, wire.ToolRetryStep, map[string]string{"task": id, "step": kind}); res.Code != "task_ended" || refusal(t, res) != "task_done" {
+ t.Fatalf("retry of a done task's %s %+v", kind, res)
+ }
+ if reason, _ := r.retryOf("rr-read-"+kind, id, kind); reason != "task_done" {
+ t.Fatalf("read_task %s %q", kind, reason)
+ }
+ }
+ // A cancelled task runs nothing again.
+ b2, c2 := strings.Repeat("3", 40), strings.Repeat("4", 40)
+ other, _ := r.pushed("rc", "Fix the README typo", b2, c2)
+ r.expect(wire.FrameWatchMerge)
+ r.checks("rc-c", r.dispatched(wire.SpecialistChecks, b2, c2, 0), wire.ChecksPassed, exit(0), "", "ok\n")
+ rv := r.dispatched(wire.SpecialistReview, b2, c2, 0)
+ r.step("rc-r", wire.StepReport{TaskID: rv.TaskID, StepID: rv.StepID, Attempt: rv.Attempt, State: wire.StepDone, BaseSHA: b2, CandidateSHA: c2, Termination: true, Family: "codex", Account: "codex-a", Verdict: wire.VerdictApprove, ReviewLabel: wire.ReviewOtherFamily, Findings: []wire.Finding{}, Summary: "Read it.", HasPreview: true})
+ d := r.previewDispatch(c2)
+ if d == nil {
+ t.Fatal("no preview of the second task")
+ }
+ if reason, _ := r.retryOf("rc-read", other, wire.SpecialistPreview); reason != "not_ended" {
+ t.Fatalf("read_task of a queued preview %q", reason)
+ }
+ if res := r.call("rc-cancel", wire.ToolCancelTask, map[string]string{"task": other}); res.IsError {
+ t.Fatalf("cancel %+v", res)
+ }
+ r.failedPreview("cancelled")(other, d)
+ if res := r.call("rc1", wire.ToolRetryStep, map[string]string{"task": other, "step": wire.SpecialistPreview}); res.Code != "task_ended" || refusal(t, res) != "task_cancelled" {
+ t.Fatalf("retry on a cancelled task %+v", res)
+ }
+ // Its link expired: it runs again, unless the project stopped
+ // allowing public previews since.
+ if err := r.inst.DB.G.Exec("UPDATE chat_steps SET preview = replace(preview, ?, ?) WHERE id = ?", expires.Format(time.RFC3339), time.Now().Add(-time.Hour).UTC().Format(time.RFC3339), pv.StepID).Error; err != nil {
+ t.Fatal(err)
+ }
+ if reason, _ := r.retryOf("rr-read-expired", id, wire.SpecialistPreview); reason != "" {
+ t.Fatalf("an expired preview: %q", reason)
+ }
+ project := r.project()
+ var revision int
+ if err := r.inst.DB.G.Raw("SELECT coalesce(autonomy_revision, 0) FROM chat_projects WHERE id = ?", project).Scan(&revision).Error; err != nil {
+ t.Fatal(err)
+ }
+ if code, _ := r.post(r.inst.Cookie(), "/settings/autonomy", url.Values{"project": {project}, "revision": {itoa(revision)}}); code != http.StatusSeeOther {
+ t.Fatalf("turn public previews off: %d", code)
+ }
+ if res := r.call("rr2", wire.ToolRetryStep, map[string]string{"task": id, "step": wire.SpecialistPreview}); res.Code != "not_retryable" || refusal(t, res) != "preview_public_disabled" {
+ t.Fatalf("retry with public previews off %+v", res)
+ }
+ if extra := r.previewDispatch(mergedSHA); extra != nil {
+ t.Fatalf("a refused retry dispatched %+v", extra)
+ }
+}
+
+// TestContractRetryDevboxPreviewOnMergedTask: a devbox link comes down
+// when its task ends, so a done task's deployed devbox preview counts as
+// one to run again. The re-run's link shows on the task, with no expiry:
+// it stays up until the next run replaces it (read_task says so), and
+// that next run may go ahead while it is up.
+func TestContractRetryDevboxPreviewOnMergedTask(t *testing.T) {
+ r := newToolRigAt(t, wire.ProtocolCurrent)
+ r.pairedWith(&wire.PreviewHost{Kind: wire.PreviewHostDevbox, Domain: "devbox.dev.example"})
+ base, cand := strings.Repeat("1", 40), strings.Repeat("2", 40)
+ id, _, _ := r.previewedThenMerged("dd", base, cand, func(id string, pv *wire.DispatchCommand) {
+ r.previewDone("dd-up", pv, wire.PreviewResult{Phase: wire.PreviewDone, App: "eq-" + id, URL: "https://eq-" + id + ".devbox.dev.example/", Digest: digestA, Outcome: wire.PreviewDeployed})
+ })
+ line := "Preview: eq-" + id + ".devbox.dev.example (on your tailnet)"
+ if page := r.get(r.inst.Cookie(), "/tasks/"+id, 200); strings.Contains(page, line) || !strings.Contains(page, "data-step-retry") {
+ t.Fatal("the done task still shows its devbox link, or offers no Retry")
+ }
+ if res := r.call("dd1", wire.ToolRetryStep, map[string]string{"task": id, "step": wire.SpecialistPreview}); res.IsError {
+ t.Fatalf("retry_step %+v", res)
+ }
+ again := r.previewDispatch(mergedSHA)
+ if again == nil {
+ t.Fatal("no preview of the merged commit")
+ }
+ r.built("dd-built", again, digestB)
+ r.previewDone("dd-again", again, wire.PreviewResult{Phase: wire.PreviewDone, App: "eq-" + id, URL: "https://eq-" + id + ".devbox.dev.example/", Digest: digestB, Outcome: wire.PreviewDeployed})
+ if page := r.get(r.inst.Cookie(), "/tasks/"+id, 200); !strings.Contains(page, line) {
+ t.Fatal("the re-run's devbox link is not shown")
+ }
+ if page := r.get(r.inst.Cookie(), "/tasks/"+id+"/preview", 200); !strings.Contains(page, "<iframe") {
+ t.Fatal("the preview page does not open the re-run")
+ }
+ k, _ := r.client.Task(r.ctx, id)
+ if up := k.Steps[len(k.Steps)-1].Preview; up == nil || up.ExpiresAt != nil {
+ t.Fatalf("the re-run's link %+v", up)
+ }
+ if reason, note := r.retryNote("dd-read", id); reason != "" || note != "devbox_stays_up" {
+ t.Fatalf("read_task %q %q", reason, note)
+ }
+ // The next run replaces it: the person's Retry while it is up.
+ if status, _ := r.post(r.inst.Cookie(), "/conversation/tasks/"+id+"/retry", url.Values{"from": {"task"}, "step": {again.StepID}}); status != http.StatusSeeOther {
+ t.Fatalf("Retry %d", status)
+ }
+ if next := r.previewDispatch(mergedSHA); next == nil || next.StepID == again.StepID {
+ t.Fatalf("the next run %+v", next)
+ }
+ if k2, _ := r.client.Task(r.ctx, id); k2.Stage != wire.StageDone || *k2.Merged != *k.Merged {
+ t.Fatalf("the re-run moved the task %+v", k2)
+ }
+}
+
+// retryNote is read_task's retry for the preview: its reason and note.
+func (r *toolRig) retryNote(key, id string) (string, string) {
+ r.t.Helper()
+ res := r.call(key, wire.ToolReadTask, map[string]string{"task": id})
+ var out struct {
+ Retry []struct {
+ Step string `json:"step"`
+ Reason string `json:"reason"`
+ Note string `json:"note"`
+ NoteText string `json:"note_text"`
+ } `json:"retry"`
+ }
+ if res.IsError || json.Unmarshal([]byte(res.Text), &out) != nil {
+ r.t.Fatalf("read_task %+v", res)
+ }
+ for _, x := range out.Retry {
+ if x.Step == wire.SpecialistPreview {
+ if x.Note != "" && x.NoteText == "" {
+ r.t.Fatalf("a note without its words %+v", x)
+ }
+ return x.Reason, x.Note
+ }
+ }
+ r.t.Fatal("no preview in read_task's retry")
+ return "", ""
+}
+
+// TestContractRetryPreviewUnverifiedMerge (Astra round 1): a merged
+// commit is publication authority only when proven to be the merge of
+// the approved candidate (the hub's own answer, the candidate its second
+// parent). A reconciled landing past the runner's 200-commit search names
+// the default branch's tip; a nested merge's commit has another second
+// parent; a cached landing says nothing of parents. In each, a preview of
+// the done task builds the approved candidate itself, never the named
+// commit, and read_task and the result say why (merge_unverified).
+func TestContractRetryPreviewUnverifiedMerge(t *testing.T) {
+ later := strings.Repeat("7", 40)
+ for name, landing := range map[string]struct {
+ source string
+ parents func(base, cand string) []string
+ }{
+ "far tip": {wire.MergeSourceReconciled, func(string, string) []string { return nil }},
+ "nested": {wire.MergeSourceHub, func(base, _ string) []string { return []string{base, strings.Repeat("6", 40)} }},
+ "cached": {wire.MergeSourceCached, func(base, cand string) []string { return []string{base, cand} }},
+ "first only": {wire.MergeSourceHub, func(_, cand string) []string { return []string{cand, strings.Repeat("6", 40)} }},
+ } {
+ t.Run(name, func(t *testing.T) {
+ r := publicPreviewRig(t)
+ base, cand := strings.Repeat("1", 40), strings.Repeat("2", 40)
+ id, pv, _ := r.previewedThenLanded("um", base, cand, r.failedPreview("preview_scanner"), func(m *wire.DispatchCommand) {
+ r.landed("um-m", m, later, landing.source, landing.parents(base, cand))
+ })
+ before, _ := r.client.Task(r.ctx, id)
+ if before.Stage != wire.StageDone || before.Merged == nil || before.Merged.SHA != later {
+ t.Fatalf("not merged as the landing said %+v", before.Merged)
+ }
+ if reason, note := r.retryNote("um-read", id); reason != "" || note != "merge_unverified" {
+ t.Fatalf("read_task %q %q", reason, note)
+ }
+ res := r.call("um1", wire.ToolRetryStep, map[string]string{"task": id, "step": wire.SpecialistPreview})
+ if res.IsError || res.Code != "retrying" || !strings.Contains(res.Text, "Review approved") {
+ t.Fatalf("retry_step %+v", res)
+ }
+ if wrong := r.previewDispatch(later); wrong != nil {
+ t.Fatalf("a preview of the unproven commit %+v", wrong)
+ }
+ again := r.previewDispatch(cand)
+ if again == nil || again.StepID == pv.StepID || again.Attempt != 1 {
+ t.Fatalf("the preview of the approved commit %+v", again)
+ }
+ r.built("um-built", again, digestB)
+ if refused := r.lease(r.runner, "um-pub", wire.LeaseCheck{StepID: again.StepID, Attempt: 1, Purpose: wire.LeasePurposePreview, Digest: digestB}); refused != "" {
+ t.Fatalf("publish of the approved commit refused %q", refused)
+ }
+ if k, _ := r.client.Task(r.ctx, id); k.Stage != wire.StageDone || *k.Merged != *before.Merged {
+ t.Fatalf("the preview moved the task %+v", k)
+ }
+ })
+ }
+}