oficina / equipo Public

thintest: Design end to end, with its refusals

What changed: internal/thintest/design_contract_test.go, five contract
tests on a real instance and runner link. The coordinator is the test's
tool calls; the Design step's runner side is the runner's own
render_page Tool (renderpage) and Design tools (designstep). The
browser is a fake behind the real renderer health check (render.Health
with Verify and Fixture faked), so its "ok" in the hello is computed,
and no Chromium runs. Render checks are page_render leases and the
captures go up as real render_file frames over the link (task 19's
open gap: stream.go's frame list had no test).

- TestContractDesignFinishLine: person asks for a Patrix design
  overhaul; propose_specialist design-v1 for Patrix; card "Add Design
  for Patrix to your team?"; Add queues the specialist_added turn (no
  PersonText, the request quoted); it records an exploration and
  starts it with Design; the dispatch carries the whole binding,
  explore and brief; the model writes mockups/<task>/ and
  release/preview.json, renders 3 pages through the instance's render
  check, ask_person gets the fixed reply, submit_candidate names two
  options; render_file chunks are staged, the final report keeps them
  byte for byte (served by the task-file route); the task page and the
  direction card show the gallery; Build without a note is 409
  direction_note; Build with one makes the change task with Design as
  maker, the note quoted as the person's in its brief and dispatch.
- TestContractDesignRevokeMidStep: revoke between renders; cancel_step;
  the next render checks are refused and render_page stops (one check,
  no browser run); pre-push refused; nothing staged or kept, a chunk
  after the end neither; the recovery card hands the task to
  Engineering, unbound.
- TestContractDesignWaitsForItsRunner: renderer failed its fixture ->
  waits design_renderer; reconnected at 35 -> design_runner_old; at 36
  -> dispatched bound. The task page says why each time.
- TestContractDesignAddNeedsAnOwner: another person's tap 404; the
  proposer made a member taps Add 403; nothing granted, queued or
  recorded.
- TestContractDesignNotNowWindow: Not now grants and queues nothing;
  proposing again 1 minute inside 7 days is declined_recently, 1
  minute after is proposed.

.rastrillo/budgets.txt: thintest 37004 -> 37620 test lines (it was
already 1 over at 37005; this file is 615 lines). internal/runner/provider
is still over (5792/5731), not from this task.

Test: CGO_ENABLED=0 go test ./internal/thintest/ -run TestContractDesign
-count=1 (5 tests, about 2 s in the package; -count=5 in 7.2 s, no
flake). Also -run 'Specialist|Explore|Research|Direction|Build' ok (23 s).

RED: the code under test landed in tasks 15 to 19, so the first run
passed; the failing evidence is each guard broken below.

Mutations (scripted: break, run -run TestContractDesign, restore), all
killed:
- M1 stream.go without *wire.RenderFile: FinishLine (policy close)
- M2 placement skips the renderer check: WaitsForItsRunner
- M3 placement skips the protocol check: WaitsForItsRunner
- M4 render lease ignores a binding that no longer holds: RevokeMidStep
- M5 pre-push ignores it: RevokeMidStep
- M6 report does not keep captures: FinishLine
- M7 Build without a note on two options: FinishLine
- M8 note not in Build's brief: FinishLine
- M9 Build's task without the maker: FinishLine
- M10 Add without the owner check: AddNeedsAnOwner
- M11 no decline window: NotNowWindow
- M12 Add queues no continuation: FinishLine
- M13 dispatch drops explore: FinishLine
- M14 revoke sends no cancel_step: RevokeMidStep
- M15 render_file staged in any step state: RevokeMidStep (first
  survived; the late-chunk case was added for it)
- M16 no recovery card after a step report: RevokeMidStep
- M17 runner's render stop not sticky (designstep): RevokeMidStep
- M18a direction card without the gallery, M18b gallery without option
  labels: FinishLine
- M19 continuation without the person's words: FinishLine
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev c37b0ce9042c399ba21c282ccbf4f737cdeb3977 parent 5eaff5a
2 files changed, +616 −1
  • .rastrillo/budgets.txt +1 −1
  • internal/thintest/design_contract_test.go +615 −0

CI cancelled — superseded by a newer push — 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/specialists-slice-1: Type  Size Avail | ext4   96G   84G
ci-box: disk /home/ci/.cache/equipo-ci-box: Type  Size Avail | ext4   96G   84G
ci-box: bwrap: fetched and verified in 0.3s
ci-box: claude: fetched and verified in 1.4s
ci-box: codex: fetched and verified in 3.5s
ci-box: codex-code-mode-host: fetched and verified in 1.4s
ci-box: libwrap: fetched and verified in 0.3s
ci-box: socat: fetched and verified in 0.3s
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
ci-box: image pulled in 10.0s
ci-box: pi: installed and verified in 7.4s
ci-box: opencode: installed and verified in 2.3s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 9.4s
ci-box: clone deepened in 4.6s
ci-box: file times set from content: 3402 files, 222 directories
ci-box: ready in 18.2s
=== 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.155s
=== compile ===
go build ./...
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py compile
+ go build -tags testbuild ./...
  6.5s
+ go list -export -test -tags testbuild -f  ./...
  6.2s
+ go list -export -test -tags browser,testbuild -f  ./internal/equipo ./internal/equipotest ./internal/headless ./internal/idtest ./internal/plan3test ./internal/thintest
  3.8s
rastrillo: budget size: 1 problem(s)
exit status 1
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -version
staticcheck 2026.1 (v0.7.0)
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 -version
Go: go1.26.11
Scanner: govulncheck@v1.8.0
DB: https://vuln.go.dev
DB updated: 2026-11-24 15:56:00 +0000 UTC

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

receipt: test step 1m20.819s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m18.689s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m18.69s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 67.58, cpu waiting 41.51%, memory waiting 0.00%, io waiting 0.45%
--- 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 1m22.941s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m19.945s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m19.94s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 67.58, cpu waiting 41.51%, memory waiting 0.00%, io waiting 0.45%
--- 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 1m21.915s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m19.465s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m9.66s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 5.29s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 4.52s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 67.58, cpu waiting 41.51%, memory waiting 0.00%, io waiting 0.45%
--- shard 3 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-mac: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestMacWorker$|^TestHeadlessAttachments$|^TestHeadlessPrewarm$|^TestHeadless$/^1_first_token$|^TestHeadless$/^6_quick_messages$|^TestHeadless$/^8_instance_restart$|^TestHeadless$/^3_runner_offline$' ./internal/headless

receipt: test step 1m19.936s 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.944s amadan.net/oficina/equipo/internal/headless
receipt: slow test 38.94s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 19.48s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.33s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
receipt: slow test 9.19s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
machine: 32 CPUs, load 68.33, cpu waiting 41.73%, memory waiting 0.00%, io waiting 0.46%
--- 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 1m38.454s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m35.516s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m4.75s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.67s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 8.42s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 7.67s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 5.01s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
machine: 32 CPUs, load 61.19, cpu waiting 38.91%, 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 3m2.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 2m59.434s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m41.87s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistant
receipt: slow test 20.46s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.41s amadan.net/oficina/equipo/internal/headless TestHeadlessResearchHandoff
receipt: slow test 7.38s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistantAttachments
receipt: slow test 6.75s amadan.net/oficina/equipo/internal/headless TestHeadlessTurnBatching
machine: 32 CPUs, load 23.91, cpu waiting 10.45%, memory waiting 0.00%, io waiting 0.07%
--- shard 6 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane thintest: ./internal/thintest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test([^C]|C[^o]|Co[^n]|Con[^t])|^TestContract(Assistant|Outcome|Team|Handoff|HostAllowlist|HostIsPerPerson|Look|Use[A-Z]|RemoteCall|LanesRunAtOnce|NoMergeQuestionWhenGateMerges|PreviewHeldUntilPublishAnswer|PreviewNotHeldBelow19|PublishNeedsOwnerAnswer)' ./internal/thintest

receipt: test step 2m18.096s 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 2m15.299s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 10.22s amadan.net/oficina/equipo/internal/thintest TestContractTeamJobSettledStates
receipt: slow test 6.75s amadan.net/oficina/equipo/internal/thintest TestExplorePreviewsOff
receipt: slow test 4.1s amadan.net/oficina/equipo/internal/thintest TestContractTeamNudgePersonNeeds
receipt: slow test 3.94s amadan.net/oficina/equipo/internal/thintest TestContractPreviewHeldUntilPublishAnswer
receipt: slow test 2.7s amadan.net/oficina/equipo/internal/thintest TestContractTeamUpdatePersonNeeds
machine: 32 CPUs, load 39.72, cpu waiting 21.39%, 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
--- 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.40s)

--- FAIL amadan.net/oficina/equipo/internal/thintest (package output)
FAIL
rastrillo-budget/v1 ran 2m41.12s
FAIL	amadan.net/oficina/equipo/internal/thintest	161.375s


receipt: test step 2m44.124s 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 2m41.12s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 45.4s amadan.net/oficina/equipo/internal/thintest TestContractChecksPlacedOnTheWorker
receipt: slow test 9.35s amadan.net/oficina/equipo/internal/thintest TestContractRetryPreviewUnverifiedMerge
receipt: slow test 8.92s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 4.88s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotOffered
receipt: slow test 4.62s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
rastrillo: budget test: go test failed
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 c37b0ce9042c399ba21c282ccbf4f737cdeb3977 45.40s 29.45
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 27.33, cpu waiting 13.64%, memory waiting 0.00%, io waiting 0.10%
--- 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

amadan: job cancelled — a newer push superseded it
--- shard 9 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-bug: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestDirectBugWorkflow$|^TestEnrolKeepsTheRole$' ./internal/runner

receipt: test step 52.839s 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 51.776s amadan.net/oficina/equipo/internal/runner
receipt: slow test 31.74s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.02s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 58.67, cpu waiting 35.51%, memory waiting 0.00%, io waiting 0.74%
--- shard 10 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-plans: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestPlanWorkflowCandidateOrder$|^TestPlanWorkflowFeature$|^TestCoordinatorRecoveryCallRefusalKeepsServing$|^TestCoordinatorRefusalMatrix$' ./internal/runner

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

receipt: test step 36.817s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 35.741s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.13s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.37s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.33s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 3.15s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 1.61s amadan.net/oficina/equipo/internal/runner TestReportPostsRetryExactRequest
machine: 32 CPUs, load 39.35, cpu waiting 23.09%, memory waiting 0.00%, io waiting 0.97%
--- 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 41.6%, load 29.63
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
--- FAIL amadan.net/oficina/equipo/internal/equipotest TestDirectDeadReferencesRepository
=== RUN   TestDirectDeadReferencesRepository
    direct_cutover_test.go:221: repository reference inventory: exit status 1
        internal/thintest/design_contract_test.go:47:92: unclassified equipo-runner
        reference scan: 3114 text files, 3333 matches, 1 failures
--- FAIL: TestDirectDeadReferencesRepository (2.42s)

rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/equipotest (package output)
FAIL
rastrillo-budget/v1 ran 1m10.174s
FAIL	amadan.net/oficina/equipo/internal/equipotest	70.692s


receipt: test step 1m12.47s 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 1m10.174s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 30.59s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 30.54s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 28.06s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 25.25s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
receipt: slow test 25.05s amadan.net/oficina/equipo/internal/equipotest TestAuthorityReadsOneSnapshot
exit status 1
+ go test -tags testbuild -timeout 15m -run '^Test[A-D]|^TestQ' -v -run '^TestDirectDeadReferencesRepository$' -count=1 ./internal/equipotest   (retry, once)
FAILED TWICE ./internal/equipotest:TestDirectDeadReferencesRepository equipotest-a
=== RUN   TestDirectDeadReferencesRepository
    direct_cutover_test.go:221: repository reference inventory: exit status 1
        internal/thintest/design_contract_test.go:47:92: unclassified equipo-runner
        reference scan: 3114 text files, 3333 matches, 1 failures
--- FAIL: TestDirectDeadReferencesRepository (2.35s)
FAIL
rastrillo-budget/v1 ran 2.35s
FAIL	amadan.net/oficina/equipo/internal/equipotest	2.518s
FAIL
machine: 32 CPUs, load 54.45, cpu waiting 35.02%, memory waiting 0.00%, io waiting 0.29%
make: *** [Makefile:113: ci-shard] Error 1

amadan: step check shard 12 of 29 failed: exit status 2
--- shard 13 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-e started 30s late; cpu waiting 41.7%, load 26.81
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 2m17.646s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 2m15.503s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 21.63s amadan.net/oficina/equipo/internal/equipotest TestProjectsFailuresRollBack
receipt: slow test 21.62s amadan.net/oficina/equipo/internal/equipotest TestProjectsReopen
receipt: slow test 21.61s amadan.net/oficina/equipo/internal/equipotest TestProjectWritesRequireCurrentOwner
receipt: slow test 21.58s amadan.net/oficina/equipo/internal/equipotest TestProjectOwnersAreMembers
receipt: slow test 21.57s amadan.net/oficina/equipo/internal/equipotest TestProjectConcurrentRetry
machine: 32 CPUs, load 27.33, cpu waiting 13.64%, memory waiting 0.00%, io waiting 0.10%
--- 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.6%, load 29.63
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

amadan: job cancelled — a newer push superseded it
--- 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 41.6%, load 29.63
test lane equipotest-rest: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^Test[A-D]|^TestQ|^Test[E-P]|^TestR' ./internal/equipotest

receipt: test step 1m10.938s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m8.772s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 28.08s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 27.43s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 27.31s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 25.37s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsUpgrade
receipt: slow test 25.33s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsCurrentOwner
machine: 32 CPUs, load 57.89, cpu waiting 38.00%, memory waiting 0.00%, io waiting 0.33%
--- 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 41.6%, load 29.63
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
--- FAIL amadan.net/oficina/equipo/internal/plan3test TestPlan3ReleaseBoundaries
=== RUN   TestPlan3ReleaseBoundaries
--- FAIL: TestPlan3ReleaseBoundaries (0.38s)

--- FAIL amadan.net/oficina/equipo/internal/plan3test TestPlan3ReleaseBoundaries/inventory
=== RUN   TestPlan3ReleaseBoundaries/inventory
    plan3_release_test.go:22: entry has no copy review status or applicable acceptance chat.specialist.capability.branch.edit
--- FAIL: TestPlan3ReleaseBoundaries/inventory (0.02s)

--- FAIL amadan.net/oficina/equipo/internal/plan3test (package output)
FAIL
rastrillo-budget/v1 ran 55.086s
FAIL	amadan.net/oficina/equipo/internal/plan3test	55.442s


receipt: test step 57.29s 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 55.086s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 4.04s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 3.47s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 1.75s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.62s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3A
receipt: slow test 1.39s amadan.net/oficina/equipo/internal/plan3test TestPlanMigrationUpgrade
rastrillo: budget test: go test failed
exit status 1
+ go test -tags testbuild -timeout 15m -v -run '^TestPlan3ReleaseBoundaries$/^inventory$' -count=1 ./internal/plan3test   (retry, once)
FAILED TWICE ./internal/plan3test:TestPlan3ReleaseBoundaries/inventory plan3test
=== RUN   TestPlan3ReleaseBoundaries
=== RUN   TestPlan3ReleaseBoundaries/inventory
    plan3_release_test.go:22: entry has no copy review status or applicable acceptance chat.specialist.capability.branch.edit
--- FAIL: TestPlan3ReleaseBoundaries (0.02s)
    --- FAIL: TestPlan3ReleaseBoundaries/inventory (0.02s)
FAIL
rastrillo-budget/v1 ran 23ms
FAIL	amadan.net/oficina/equipo/internal/plan3test	0.228s
FAIL
machine: 32 CPUs, load 65.53, cpu waiting 40.64%, memory waiting 0.00%, io waiting 0.40%
make: *** [Makefile:113: ci-shard] Error 1

amadan: step check shard 16 of 29 failed: exit status 2
--- 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 41.6%, load 29.63
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/diffscan ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/door ./internal/equipo/github ./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/release/renderertest ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/designstep ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/pause ./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/render ./internal/runner/renderpage ./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/diffscan ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/door ./internal/equipo/github ./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/release/renderertest ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/designstep ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/pause ./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/render ./internal/runner/renderpage ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/forgekey ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
cache miss: amadan.net/oficina/equipo/internal/chatmarkdown: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/copydesk: its inputs changed
--- FAIL amadan.net/oficina/equipo/internal/runner/pause TestHoldStopsAReparentedDaemon
=== RUN   TestHoldStopsAReparentedDaemon
    pause_linux_test.go:603: daemon made no progress in 2s
    pause_linux_test.go:69: sandbox stderr: 
--- FAIL: TestHoldStopsAReparentedDaemon (2.36s)

--- FAIL amadan.net/oficina/equipo/internal/runner/pause (package output)
FAIL
FAIL	amadan.net/oficina/equipo/internal/runner/pause	6.500s

--- FAIL amadan.net/oficina/equipo/internal/testci TestBudgetRecordsAreShort
=== RUN   TestBudgetRecordsAreShort
    budgets_file_test.go:37: .rastrillo/budgets.txt:17: reason is 302 bytes, over 200
    budgets_file_test.go:37: .rastrillo/budgets.txt:18: reason is 283 bytes, over 200
    budgets_file_test.go:37: .rastrillo/budgets.txt:41: reason is 461 bytes, over 200
    budgets_file_test.go:37: .rastrillo/budgets.txt:59: reason is 445 bytes, over 200
    budgets_file_test.go:37: .rastrillo/budgets.txt:74: reason is 285 bytes, over 200
--- FAIL: TestBudgetRecordsAreShort (0.00s)

--- FAIL amadan.net/oficina/equipo/internal/testci (package output)
FAIL
rastrillo-budget/v1 ran 1.55s
FAIL	amadan.net/oficina/equipo/internal/testci	1.556s

budget: amadan.net/oficina/equipo/internal/runner/designstep ran tests but printed no time: add func TestMain(m *testing.M) { os.Exit(budget.Main(m)) }
budget note: internal/equipo took 2m35.164s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/equipo/chat took 36.303s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/equipo/github took 32.846s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/equipo/setup took 14.115s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/idtest took 1m58.42s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/release took 42.999s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/runner/containment took 1m1.016s, over the 15s its record on line 40 allows; reported only, timing fails on CI
budget note: internal/runner/forge took 25.225s, over the 20s its record on line 35 allows; reported only, timing fails on CI
budget note: internal/runner/provider/claude/realcli took 12.626s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/runner/provider/pi took 1m15.303s, over the 1m0s its record on line 27 allows; reported only, timing fails on CI
budget note: internal/runner/render took 1m28.102s, over the 10s the default allows; reported only, timing fails on CI

receipt: test step 2m41.822s against a 60s target (the gate's other steps are not in this figure)
receipt: 54 packages ran, 17 cached, 17 without tests, 2 failed
receipt: slow package 2m35.164s amadan.net/oficina/equipo/internal/equipo
receipt: slow package 1m58.42s amadan.net/oficina/equipo/internal/idtest
receipt: slow package 1m28.102s amadan.net/oficina/equipo/internal/runner/render
receipt: slow package 1m15.303s amadan.net/oficina/equipo/internal/runner/provider/pi
rastrillo: budget test: go test failed
receipt: slow package 1m5.427s amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow test 57.22s amadan.net/oficina/equipo/internal/idtest TestDoorRemembersOficinaID
receipt: slow test 50.31s amadan.net/oficina/equipo/internal/runner/render TestLaunchNeverClaimsAnUnprovenEnd
receipt: slow test 49.59s amadan.net/oficina/equipo/internal/idtest TestDoorOficinaSettingsUnreadableIsNoLoop
receipt: slow test 49.37s amadan.net/oficina/equipo/internal/idtest TestDoorForgetsOficinaIDForARefusedSession
receipt: slow test 48.99s amadan.net/oficina/equipo/internal/idtest TestDoorNeverJudgesANativeSession
exit status 1
+ go test -tags testbuild -timeout 15m -v -run '^TestHoldStopsAReparentedDaemon$' -count=1 ./internal/runner/pause   (retry, once)
FAILED TWICE ./internal/runner/pause:TestHoldStopsAReparentedDaemon rest
=== RUN   TestHoldStopsAReparentedDaemon
    pause_linux_test.go:603: daemon made no progress in 2s
    pause_linux_test.go:69: sandbox stderr: 
--- FAIL: TestHoldStopsAReparentedDaemon (2.31s)
FAIL
FAIL	amadan.net/oficina/equipo/internal/runner/pause	2.317s
FAIL
+ go test -tags testbuild -timeout 15m -v -run '^TestBudgetRecordsAreShort$' -count=1 ./internal/testci   (retry, once)
FAILED TWICE ./internal/testci:TestBudgetRecordsAreShort rest
=== RUN   TestBudgetRecordsAreShort
    budgets_file_test.go:37: .rastrillo/budgets.txt:17: reason is 302 bytes, over 200
    budgets_file_test.go:37: .rastrillo/budgets.txt:18: reason is 283 bytes, over 200
    budgets_file_test.go:37: .rastrillo/budgets.txt:41: reason is 461 bytes, over 200
    budgets_file_test.go:37: .rastrillo/budgets.txt:59: reason is 445 bytes, over 200
    budgets_file_test.go:37: .rastrillo/budgets.txt:74: reason is 285 bytes, over 200
--- FAIL: TestBudgetRecordsAreShort (0.00s)
FAIL
rastrillo-budget/v1 ran 0s
FAIL	amadan.net/oficina/equipo/internal/testci	0.004s
FAIL
machine: 32 CPUs, load 19.32, cpu waiting 8.56%, memory waiting 0.00%, io waiting 0.06%
make: *** [Makefile:113: ci-shard] Error 1

amadan: step check shard 17 of 29 failed: exit status 2
--- 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 1m27.066s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m25.052s amadan.net/oficina/equipo/internal/headless
receipt: slow test 38.91s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 15.05s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 10.8s amadan.net/oficina/equipo/internal/headless TestBrowserChat
receipt: slow test 7.64s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 6.78s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
machine: 32 CPUs, load 65.53, cpu waiting 40.64%, memory waiting 0.00%, io waiting 0.40%
--- shard 19 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-work: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$' ./internal/headless

receipt: test step 1m34.655s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m32.24s amadan.net/oficina/equipo/internal/headless
receipt: slow test 29.11s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 21.74s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 13.59s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 9.47s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
receipt: slow test 9.28s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
machine: 32 CPUs, load 61.19, cpu waiting 39.45%, 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 1m55.272s 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 1m53.436s amadan.net/oficina/equipo/internal/headless
receipt: slow test 14.41s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 13.62s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 13.57s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 11.35s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsSignInEmail
receipt: slow test 11.26s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
machine: 32 CPUs, load 49.66, cpu waiting 30.05%, 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|TestBrowserCardAnswerSettlesAtBottom|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInEmail|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' ./internal/headless
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserCopyContinue
=== RUN   TestBrowserCopyContinue
time=2026-11-29T02:38:41.939Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-29T02:38:41.939Z level=INFO msg="startup phase done" phase=state_lock took=225µs
time=2026-11-29T02:38:41.939Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-29T02:38:41.939Z level=INFO msg="startup phase done" phase=claim_roots took=180µs
time=2026-11-29T02:38:41.939Z level=INFO msg="startup phase" phase=sweep
time=2026-11-29T02:38:42.018Z level=INFO msg="startup phase done" phase=sweep took=78.529ms
time=2026-11-29T02:38:42.018Z level=INFO msg="startup phase" phase=credentials
time=2026-11-29T02:38:42.018Z level=INFO msg="startup phase done" phase=credentials took=101µs
time=2026-11-29T02:38:42.018Z level=INFO msg="startup phase" phase=open_state
time=2026-11-29T02:38:42.095Z level=INFO msg="startup phase done" phase=open_state took=77.338ms
time=2026-11-29T02:38:42.096Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-29T02:38:42.098Z level=INFO msg=connecting host=127.0.0.1:41225 protocol=36
time=2026-11-29T02:38:42.100Z level=INFO msg=connected host=127.0.0.1:41225 took=957µs
time=2026-11-29T02:38:42.100Z level=INFO msg="capabilities gathering"
time=2026-11-29T02:38:42.102Z level=INFO msg="capabilities gathered" took=1.495ms tags=linux,claude,go
time=2026-11-29T02:38:42.102Z level=INFO msg="hello sent" protocol=36
time=2026-11-29T02:38:42.111Z level=INFO msg=welcome protocol=36 role=primary generation=1
    browser_copy_test.go:90: waiting for !document.querySelector('[data-copy-continue]'): context deadline exceeded (last evaluation: context deadline exceeded)
--- FAIL: TestBrowserCopyContinue (6.48s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m41.695s
FAIL	amadan.net/oficina/equipo/internal/headless	101.906s


receipt: test step 1m43.55s 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 1m41.695s amadan.net/oficina/equipo/internal/headless
receipt: slow test 15.34s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
receipt: slow test 13.6s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 10.46s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 9.49s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 7.81s amadan.net/oficina/equipo/internal/headless TestBrowserRefreshRace
exit status 1
+ go test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAskAfterMerge|TestBrowserCardAnswerSettlesAtBottom|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 c37b0ce9042c399ba21c282ccbf4f737cdeb3977 6.48s 54.45
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 52.33, cpu waiting 32.99%, memory waiting 0.00%, io waiting 0.27%
--- shard 22 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-rest: ./internal/equipo
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserPreviewBlocksNavigation|TestBrowserPreviewPassExchange)$' ./internal/equipo

receipt: test step 4.764s 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.657s amadan.net/oficina/equipo/internal/equipo
receipt: slow test 1.85s amadan.net/oficina/equipo/internal/equipo TestBrowserPreviewPassExchange
receipt: slow test 800ms amadan.net/oficina/equipo/internal/equipo TestBrowserPreviewBlocksNavigation
browser lane browser-rest: ./internal/equipotest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserGitHubManifestCSP)$' ./internal/equipotest

receipt: test step 8.213s 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 6.522s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 6.52s amadan.net/oficina/equipo/internal/equipotest TestBrowserGitHubManifestCSP
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.957s, over the 10s the default allows; reported only, timing fails on CI

receipt: test step 12.617s 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.957s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 8.8s amadan.net/oficina/equipo/internal/idtest TestBrowserSmartDoor
receipt: slow test 2.16s 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 4.065s 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.501s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 2.5s 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 3m37.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 3m34.614s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 25.31s amadan.net/oficina/equipo/internal/thintest TestBrowserAccessRequest
receipt: slow test 14.44s amadan.net/oficina/equipo/internal/thintest TestBrowserSettingsTeams
receipt: slow test 12.11s amadan.net/oficina/equipo/internal/thintest TestBrowserThinkingCycles
receipt: slow test 10.75s amadan.net/oficina/equipo/internal/thintest TestBrowserPlacementQuestionAndPending
receipt: slow test 9.29s amadan.net/oficina/equipo/internal/thintest TestBrowserRhythm
machine: 32 CPUs, load 10.21, cpu waiting 3.48%, 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   (55s)
ok ./internal/headless TestHeadlessConnections/A5_cancel_and_sign_out 4.94s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.35s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 9.74s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 9.34s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 26.96s
+ go test -tags testbuild -timeout 15m -v -run '^TestHeadlessConnections$/^C5_review_auth$|^TestHeadlessConnections$/^C5_review_failover$|^TestHeadlessConnections$/^C5_review_on_codex$|^TestHeadlessConnections$/^C5_review_other_family_first$' ./internal/headless   (60s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 15.70s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 12.58s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 10.86s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 18.30s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless   (23s)
ok ./internal/headless TestMixedVersions 19.73s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks   (2s)
ok ./internal/runner/checks TestCheckSandboxDeniedPathsTampering 0.81s
+ go test -tags testbuild -timeout 15m -v -run '^TestRunnerCancelAndSupersede$' ./internal/runner/thin   (2s)
ok ./internal/runner/thin TestRunnerCancelAndSupersede 0.06s
quarantine: 0 flaked (passed on the retry), 0 failed
machine: 32 CPUs, load 67.33, cpu waiting 39.82%, memory waiting 0.00%, io waiting 0.65%
--- shard 24 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
shard 24: make runner-host
python3 scripts/runner-prerequisites.py
CGO_ENABLED=0 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks

receipt: test step 14.611s against a 60s target (the gate's other steps are not in this figure)
receipt: 4 packages ran, 0 cached, 4 without tests, 0 failed
receipt: slow package 8.164s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 171ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 64ms amadan.net/oficina/equipo/internal/runner/provider/codex
receipt: slow package 2ms amadan.net/oficina/equipo/internal/runner/provider
receipt: slow package 0s amadan.net/oficina/equipo/internal/runner/provider/claude/realcli
receipt: slow test 5.97s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.71s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 330ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 170ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxToolchain
CGO_ENABLED=0 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run '^TestNamespace' -count=1 ./internal/runner/containment
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run '^TestNamespace' -count=1 ./internal/runner/containment

receipt: test step 4.386s 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.23s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 290ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 190ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof
receipt: slow test 130ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceExitStatus
receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryCleansScratch
machine: 32 CPUs, load 21.31, cpu waiting 13.23%, memory waiting 0.00%, io waiting 1.27%
--- 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.6%, load 29.63
shard 25: make runner-dead-references lanes-check build vet fmt-check spacing budget migration-check
python3 scripts/runner-dead-references.py
internal/thintest/design_contract_test.go:47:92: unclassified equipo-runner
reference scan: 3114 text files, 3333 matches, 1 failures
make[1]: *** [Makefile:238: runner-dead-references] Error 1
machine: 32 CPUs, load 29.63, cpu waiting 19.49%, memory waiting 0.00%, io waiting 1.04%
make: *** [Makefile:113: ci-shard] Error 2

amadan: step check shard 25 of 29 failed: exit status 2
--- shard 26 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: staticcheck started 30s late; cpu waiting 41.6%, load 29.63
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
internal/runner/thin/render_page_test.go:210:48: error should be returned as the last argument (ST1008)
internal/wire/design_test.go:244:76: string literal contains the Unicode format character U+202E, consider using the '\u202e' escape sequence instead (ST1018)
exit status 1
make[1]: *** [Makefile:195: staticcheck] Error 1
machine: 32 CPUs, load 67.33, cpu waiting 39.82%, memory waiting 0.00%, io waiting 0.65%
make: *** [Makefile:113: ci-shard] Error 2

amadan: step check shard 26 of 29 failed: exit status 2
--- 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.6%, load 29.63
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 1 vulnerability 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 58.67, cpu waiting 36.74%, memory waiting 0.00%, io waiting 0.72%
--- 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.7%, load 26.81
shard 28: make gitleaks
2:38AM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
2:38AM INF 1299 commits scanned.
2:38AM INF scanned ~70071083 bytes (70.07 MB) in 26.5s
2:38AM INF no leaks found
machine: 32 CPUs, load 64.22, cpu waiting 37.95%, memory waiting 0.00%, io waiting 0.69%
diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt
index 065fde1b..4d06c9e7 100644
--- a/.rastrillo/budgets.txt
+++ b/.rastrillo/budgets.txt
@@ -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 - 11873 Grant scenarios (#48); sign-in email at 1280 and 390; Assistant files end to end; the restart wait; the live site waits for a place; a card answer settles at the bottom; measured 11873 test lines.
-size internal/thintest - 37004 Protocol 31 contracts, 35 diffs, stuck tasks (the renderer health in status too), no-access merges, held retries, unfinished work, free rounds, previews, Assistant files, places and where their cards land, 36 Build's note; measured 37004 test lines.
+size internal/thintest - 37620 Protocol 31 contracts, 35 diffs, stuck tasks (the renderer health in status too), no-access merges, held retries, unfinished work, free rounds, previews, Assistant files, places and where their cards land, 36 Build's note, Design end to end and its refusals; measured 37620 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/thintest/design_contract_test.go b/internal/thintest/design_contract_test.go
new file mode 100644
index 00000000..c880adc6
--- /dev/null
+++ b/internal/thintest/design_contract_test.go
@@ -0,0 +1,615 @@
+package thintest
+
+import (
+ "context"
+ "crypto/sha256"
+ "encoding/hex"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "image"
+ "image/color"
+ "image/png"
+ "os"
+ "path/filepath"
+ "slices"
+ "sort"
+ "strconv"
+ "strings"
+ "testing"
+ "time"
+
+ "amadan.net/oficina/equipo/internal/equipo"
+ "amadan.net/oficina/equipo/internal/runner/designstep"
+ "amadan.net/oficina/equipo/internal/runner/render"
+ "amadan.net/oficina/equipo/internal/runner/renderpage"
+ "amadan.net/oficina/equipo/internal/specialist"
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// Design end to end (spec 2026-11-28-dynamic-specialists.md; slice 1
+// plan task 20). The instance and its runner link are real; the
+// coordinator is this test's tool calls; the Design step's runner side is
+// the runner's own render_page Tool and Design tools (renderpage,
+// designstep) with a fake browser behind the real renderer health check,
+// so no Chromium runs. Render checks and render_file chunks go over the
+// runner link.
+
+const patrixRepo = "amadan.net/oficina/patrix"
+
+// overhaulWords is the person's request that leads to Design.
+const overhaulWords = "Patrix needs a design overhaul. Show me a couple of directions for the home page before anything is built."
+
+// rendererHealth is the runner's renderer check with its tree verified
+// and its fixture page rendered by fakes: fixture is the fixture's end.
+func rendererHealth(t *testing.T, fixture error) *render.Health {
+ t.Helper()
+ h := &render.Health{Config: render.LaunchConfig{Bwrap: "/usr/bin/bwrap", Binary: "/runner/equipo-runner", Tree: t.TempDir(), Pin: "pin"}, Scratch: t.TempDir(),
+ Verify: func(string, string) error { return nil },
+ Fixture: func(context.Context, render.LaunchConfig, string) error { return fixture }}
+ h.Ready(context.Background())
+ return h
+}
+
+// designHello is the primary's hello at protocol with Patrix on its list,
+// the owner's Claude subscription, and the renderer's reported health.
+func (r *toolRig) designHello(protocol int, h *render.Health) wire.Hello {
+ hello := primaryAt(toolHello(r.runner.Welcome.Generation), protocol)
+ hello.Repos = append(hello.Repos, patrixRepo)
+ hello.Catalog = append(hello.Catalog, wire.RepoInfo{Repo: patrixRepo, DefaultBranch: "main", Summary: "Patrix is a parking app.", Names: []string{"patrix", "Patrix"}, Hints: []string{"web"}, HeadSHA: baseX, HeadSubject: "Start"})
+ hello.Capabilities.Tools = &wire.ToolHealth{Scanner: wire.ToolHealthy, Renderer: h.Report(context.Background())}
+ return hello
+}
+
+// designOn says the design hello and adds Patrix as the team's project.
+func (r *toolRig) designOn(h *render.Health) {
+ r.t.Helper()
+ if err := r.runner.Send(r.ctx, "h-design", wire.FrameHello, r.designHello(wire.ProtocolCurrent, h)); err != nil {
+ r.t.Fatal(err)
+ }
+ if refused := r.lease(r.runner, "h-design-ping", wire.LeaseCheck{}); refused != "" {
+ r.t.Fatalf("ping refused %q", refused)
+ }
+ if res := r.call("d-add", wire.ToolAddProject, map[string]string{"repo": "oficina/patrix"}); res.IsError {
+ r.t.Fatalf("add Patrix %+v", res)
+ }
+}
+
+// redialAt reconnects the primary at protocol with h's renderer health.
+func (r *toolRig) redialAt(protocol int, h *render.Health) {
+ r.t.Helper()
+ f, err := DialRunnerHello(r.ctx, r.inst.URL, r.rig.runner, r.designHello(protocol, h))
+ if err != nil {
+ r.t.Fatal(err)
+ }
+ r.t.Cleanup(f.Close)
+ r.runner, r.held = f, nil
+ r.lease(f, "h-redial-ping", wire.LeaseCheck{})
+}
+
+func designProposal() map[string]any {
+ return map[string]any{"profile": specialist.ProfileDesign, "name": "Design", "brief": "Overhaul Patrix's look: calm colours, larger type.", "capabilities": []string{specialist.CapabilityBranchEdit, specialist.CapabilityPageRender}, "tools": []string{specialist.ToolRenderPage, specialist.ToolSubmitCandidate, specialist.ToolAskPerson}, "project": "patrix"}
+}
+
+// proposeDesign has the coordinator propose Design for Patrix, end its
+// turn, and returns the open card.
+func (r *toolRig) proposeDesign(key string) wire.Card {
+ r.t.Helper()
+ if res := r.call(key, wire.ToolProposeSpecialist, designProposal()); res.IsError || res.Code != "proposed" {
+ r.t.Fatalf("propose %+v", res)
+ }
+ card := r.specialistCard(wire.CardOpen)
+ if err := r.runner.Send(r.ctx, "r-reply-"+r.turn, wire.FrameReply, wire.Reply{TurnID: r.turn, Attempt: 1, Text: "Design would do this well. Add it?"}); err != nil {
+ r.t.Fatal(err)
+ }
+ prev := r.turn
+ r.wait("replied", func(c *Conversation) bool { return c.Turns[prev].State == wire.TurnReplied })
+ return card
+}
+
+// continuation takes the specialist_added turn the Add queued.
+func (r *toolRig) continuation() *wire.MessageCommand {
+ r.t.Helper()
+ _, body := r.expect(wire.FrameMessage)
+ m := body.(*wire.MessageCommand)
+ r.wait("continuation running", func(c *Conversation) bool { return c.Turns[m.TurnID].State == wire.TurnRunning })
+ r.turn = m.TurnID
+ return m
+}
+
+// designAdded taps Add on card and has the continuation record the
+// exploration and start it with Design; it returns the specialist and
+// the task.
+func (r *toolRig) designAdded(card wire.Card) (wire.Specialist, string) {
+ r.t.Helper()
+ if _, err := r.client.Answer(r.ctx, card.ID, wire.ChoiceAdd, card.Revision); err != nil {
+ r.t.Fatal(err)
+ }
+ m := r.continuation()
+ sp := card.Specialist
+ if m.Kind != wire.TurnSpecialistAdded || len(m.PersonText) != 0 || !strings.Contains(m.Text, strconv.Quote(overhaulWords)) || !strings.Contains(m.Text, sp.ID) {
+ r.t.Fatalf("continuation %+v", m)
+ }
+ id := taskID(r.t, r.call("d-rec", wire.ToolRecordTask, map[string]any{"repo": "oficina/patrix", "title": "Patrix design overhaul", "brief": "Two directions for the home page.", "kind": wire.KindExplore}))
+ if res := r.call("d-start", wire.ToolStartTask, map[string]string{"task": id, "brief": "Show two directions.", "specialist": sp.ID}); res.IsError {
+ r.t.Fatalf("start %+v", res)
+ }
+ if err := r.runner.Send(r.ctx, "r-reply-"+m.TurnID, wire.FrameReply, wire.Reply{TurnID: m.TurnID, Attempt: 1, Text: "Design is on it."}); err != nil {
+ r.t.Fatal(err)
+ }
+ list, err := r.client.Specialists(r.ctx)
+ if err != nil || len(list.Items) != 1 || list.Items[0].State != wire.SpecialistActive {
+ r.t.Fatalf("specialists %+v %v", list, err)
+ }
+ return list.Items[0], id
+}
+
+// designHand is the runner side of one Design attempt: the fake model's
+// workspace, the runner's render_page Tool over a fake browser, and the
+// step's Design tools, whose render check is a lease over the link.
+type designHand struct {
+ r *toolRig
+ d *wire.DispatchCommand
+ work, dir, scratch string
+ page *renderpage.Tool
+ at *designstep.Attempt
+ usage renderpage.Usage
+ checks, browserRuns int
+}
+
+func (r *toolRig) designHand(d *wire.DispatchCommand, h *render.Health) *designHand {
+ root := r.t.TempDir()
+ x := &designHand{r: r, d: d, work: filepath.Join(root, "work"), dir: filepath.Join(root, "render"), scratch: filepath.Join(root, "render-work")}
+ x.page = &renderpage.Tool{Renderer: h, Config: h.Config, Render: x.browser}
+ x.at = &designstep.Attempt{Dir: x.dir, Confirm: x.confirm, Render: func(ctx context.Context, raw json.RawMessage) (string, []renderpage.Capture, error) {
+ return x.page.Call(ctx, x, raw)
+ }}
+ return x
+}
+
+func (x *designHand) confirm(context.Context) error {
+ x.checks++
+ if why := x.r.lease(x.r.runner, "ds-render-"+itoa(x.checks), wire.LeaseCheck{StepID: x.d.StepID, Attempt: x.d.Attempt, Purpose: wire.LeasePurposeRender}); why != "" {
+ return fmt.Errorf("%w: %s", designstep.ErrRenderRefused, why)
+ }
+ return nil
+}
+
+func (x *designHand) Dir() string { return x.dir }
+func (x *designHand) Scratch() string { return x.scratch }
+func (x *designHand) Accept(_ context.Context, captures int) (renderpage.Usage, error) {
+ x.usage.Calls++
+ x.usage.Captures += captures
+ return x.usage, nil
+}
+
+// Site exports the work tree's release/preview.json output; its digest
+// is over every exported file.
+func (x *designHand) Site(_ context.Context, tree, stage string) (string, error) {
+ if tree != renderpage.TreeWork {
+ return "", renderpage.Refuse(renderpage.CodeNoSite, "no base site")
+ }
+ var cfg struct{ Output string }
+ raw, err := os.ReadFile(filepath.Join(x.work, "release", "preview.json"))
+ if err != nil || json.Unmarshal(raw, &cfg) != nil {
+ return "", renderpage.Refuse(renderpage.CodeNoSite, "no preview config")
+ }
+ sum, from := sha256.New(), filepath.Join(x.work, cfg.Output)
+ var names []string
+ err = filepath.WalkDir(from, func(p string, e os.DirEntry, err error) error {
+ if err == nil && !e.IsDir() {
+ names = append(names, p)
+ }
+ return err
+ })
+ sort.Strings(names)
+ for _, p := range names {
+ rel, _ := filepath.Rel(from, p)
+ b, _ := os.ReadFile(p)
+ os.MkdirAll(filepath.Dir(filepath.Join(stage, rel)), 0o700)
+ if err == nil {
+ err = os.WriteFile(filepath.Join(stage, rel), b, 0o600)
+ }
+ fmt.Fprintf(sum, "%s\x00%d\x00%s", rel, len(b), b)
+ }
+ return hex.EncodeToString(sum.Sum(nil)), err
+}
+
+// browser stands in for Chromium: each page is its viewport's size in
+// a colour taken from the page's own file, so options differ.
+func (x *designHand) browser(_ context.Context, cfg render.LaunchConfig, out string, pages []render.Page) (*render.Report, error) {
+ x.browserRuns++
+ rep := &render.Report{Schema: render.ReportSchema}
+ for i, p := range pages {
+ html, err := os.ReadFile(filepath.Join(cfg.Site, p.Path, "index.html"))
+ if err != nil {
+ return nil, err
+ }
+ w, h, _ := p.Viewport.Size()
+ img, c := image.NewNRGBA(image.Rect(0, 0, w, h)), sha256.Sum256(html)
+ for y := range h {
+ for x := range w {
+ img.Set(x, y, color.NRGBA{c[0], c[1], c[2], 0xff})
+ }
+ }
+ name := "page-" + itoa(i+1) + ".png"
+ f, err := os.Create(filepath.Join(out, name))
+ if err != nil {
+ return nil, err
+ }
+ err = errors.Join(png.Encode(f, img), f.Close())
+ if err != nil {
+ return nil, err
+ }
+ rep.Pages = append(rep.Pages, render.PageReport{Path: p.Path, Viewport: p.Viewport, Width: w, Height: h, FullPage: p.FullPage, Capture: name, CaptureWidth: w, CaptureHeight: h, Title: "Patrix"})
+ }
+ return rep, nil
+}
+
+// mockups is the fake model writing its two options under
+// mockups/<task>/ and release/preview.json naming them.
+func (x *designHand) mockups() {
+ x.r.t.Helper()
+ files := map[string]string{
+ "release/preview.json": `{"output": "mockups/` + x.d.TaskID + `"}`,
+ "mockups/" + x.d.TaskID + "/calm/index.html": "<h1>Patrix</h1><p>Calm: soft blue, larger type.</p>",
+ "mockups/" + x.d.TaskID + "/bold/index.html": "<h1>Patrix</h1><p>Bold: black and yellow.</p>",
+ }
+ for name, body := range files {
+ p := filepath.Join(x.work, name)
+ if err := errors.Join(os.MkdirAll(filepath.Dir(p), 0o700), os.WriteFile(p, []byte(body), 0o600)); err != nil {
+ x.r.t.Fatal(err)
+ }
+ }
+}
+
+// tool is the fake model calling one of the step's tools.
+func (x *designHand) tool(name, args string) (string, bool) {
+ return x.at.Call(x.r.ctx, name, "", json.RawMessage(args))
+}
+
+const renderBoth = `{"tree": "work", "pages": [{"path": "/calm/", "viewport": "desktop"}, {"path": "/calm/", "viewport": "phone"}, {"path": "/bold/", "viewport": "desktop"}]}`
+
+// uploads sends the named captures over the link as render_file chunks.
+func (x *designHand) uploads(key string) {
+ x.r.t.Helper()
+ files, err := designstep.Files(x.dir, x.d.TaskID, x.d.StepID, x.d.Attempt, x.at.Options())
+ if err != nil {
+ x.r.t.Fatal(err)
+ }
+ for i, chunks := range files {
+ for j, c := range chunks {
+ x.r.ack(key+"-"+itoa(i)+"-"+itoa(j), wire.FrameRenderFile, c)
+ }
+ }
+}
+
+// ack sends one durable frame and waits for its ack, holding the rest.
+func (r *toolRig) ack(id, kind string, body any) {
+ r.t.Helper()
+ if err := r.runner.Send(r.ctx, id, kind, body); err != nil {
+ r.t.Fatal(err)
+ }
+ for {
+ f, b, err := r.runner.Next(r.ctx)
+ if err != nil {
+ r.t.Fatal(err)
+ }
+ if a, ok := b.(*wire.Ack); ok && a.ID == id {
+ return
+ }
+ if f.Type != wire.FrameAck {
+ r.held = append(r.held, heldFrame{f, b, r.runner.Received[len(r.runner.Received)-1]})
+ }
+ }
+}
+
+// designStarted takes Design's dispatch, checks its binding, and has the
+// runner start it.
+func (r *toolRig) designStarted(sp wire.Specialist, id string) *wire.DispatchCommand {
+ r.t.Helper()
+ d := r.nextDispatch()
+ design, _ := specialist.Lookup(specialist.ProfileDesign)
+ if d.TaskID != id || d.Specialist != wire.SpecialistEngineering || d.SpecialistID != sp.ID || d.SpecialistRevision != sp.Revision || d.SpecialistProject != r.patrixID() || d.Profile != specialist.ProfileDesign || !slices.Equal(d.Capabilities, design.Capabilities) || !d.Explore || d.SpecialistBrief != designProposal()["brief"] || !wire.ValidSpecialistBinding(d) || d.Repo != patrixRepo {
+ r.t.Fatalf("Design's dispatch %+v", d)
+ }
+ if why := r.lease(r.runner, "ds-start", wire.LeaseCheck{StepID: d.StepID, Attempt: d.Attempt}); why != "" {
+ r.t.Fatalf("start refused %q", why)
+ }
+ r.step("ds-run", wire.StepReport{TaskID: id, StepID: d.StepID, Attempt: d.Attempt, State: wire.StepRunning, BaseSHA: baseX, Family: "claude", Account: "claude-a"})
+ return d
+}
+
+func (r *toolRig) makerOf(id string) string {
+ r.t.Helper()
+ var maker string
+ if err := r.inst.DB.Writer().QueryRow("SELECT maker_specialist_id FROM chat_tasks WHERE id = ?", id).Scan(&maker); err != nil {
+ r.t.Fatal(err)
+ }
+ return maker
+}
+
+// TestContractDesignFinishLine is slice 1's Design finish line: the
+// person asks for a Patrix design overhaul on a primary at 36 whose
+// renderer is ok and which holds their Claude subscription; the
+// coordinator proposes design-v1 for Patrix; the owner's Add queues the
+// continuation, which records an exploration and starts it with Design;
+// the dispatch carries the binding; the model renders through the
+// instance's render check, writes its options under mockups/<task>/ and
+// submits; the captures go up as render_file chunks and the final
+// report keeps them; the task page and the direction card show them;
+// Build needs a note and, with one, makes the change task with Design
+// as its maker and the note quoted as the person's own words.
+func TestContractDesignFinishLine(t *testing.T) {
+ r := newToolRigSaying(t, wire.ProtocolCurrent, overhaulWords)
+ health := rendererHealth(t, nil)
+ if got := health.Report(r.ctx); got != wire.ToolHealthy {
+ t.Fatalf("renderer %q", got)
+ }
+ r.designOn(health)
+ card := r.proposeDesign("d-propose")
+ if card.Question != "Add Design for Patrix to your team?" || card.Specialist.Profile != specialist.ProfileDesign {
+ t.Fatalf("card %+v %+v", card, card.Specialist)
+ }
+ sp, id := r.designAdded(card)
+ if sp.Project != r.patrixID() || r.makerOf(id) != sp.ID || r.task(id).Kind != wire.KindExplore {
+ t.Fatalf("maker %q", r.makerOf(id))
+ }
+ d := r.designStarted(sp, id)
+
+ x := r.designHand(d, health)
+ x.mockups()
+ if text, failed := x.tool(designstep.ToolRenderPage, renderBoth); failed || !strings.Contains(text, "/render/1-work-3.png") {
+ t.Fatalf("render_page %v %s", failed, text)
+ }
+ if x.checks != 1 || x.browserRuns != 1 {
+ t.Fatalf("%d render checks, %d browser runs", x.checks, x.browserRuns)
+ }
+ if text, failed := x.tool(designstep.ToolAskPerson, `{"question": "Blue or yellow?"}`); failed || text != designstep.AskText {
+ t.Fatalf("ask_person %s", text)
+ }
+ if text, failed := x.tool(designstep.ToolSubmitCandidate, `{"options": [{"name": "Calm", "captures": ["1-work-1.png", "1-work-2.png"]}, {"name": "Bold", "captures": ["1-work-3.png"]}]}`); failed {
+ t.Fatalf("submit %s", text)
+ }
+ x.uploads("ds-file")
+ if r.rows("SELECT count(*) FROM chat_task_files WHERE step_id = ? AND complete = 1 AND kept = 0", d.StepID) != 3 {
+ t.Fatal("the captures are not staged")
+ }
+ if why := r.lease(r.runner, "ds-push", wire.LeaseCheck{StepID: d.StepID, Attempt: d.Attempt}); why != "" {
+ t.Fatalf("pre-push refused %q", why)
+ }
+ r.step("ds-done", wire.StepReport{TaskID: id, StepID: d.StepID, Attempt: d.Attempt, State: wire.StepDone, BaseSHA: baseX, CandidateSHA: candX, Pushed: true, Termination: true, Family: "claude", Account: "claude-a", Summary: "Two directions.", Options: x.at.Options()})
+
+ // Kept, byte for byte, in the report's order.
+ k := r.task(id)
+ eng := stepsOf(k, wire.SpecialistEngineering)[0]
+ if eng.Design == nil || len(eng.Design.Options) != 2 || eng.Design.Options[0].Name != "Calm" || len(eng.Design.Options[0].Captures) != 2 || eng.Design.Options[1].Name != "Bold" || len(eng.Design.Options[1].Captures) != 1 {
+ t.Fatalf("kept %+v", eng.Design)
+ }
+ for _, o := range eng.Design.Options {
+ for _, c := range o.Captures {
+ want, err := os.ReadFile(filepath.Join(x.dir, c.CaptureID))
+ got, _ := r.fetch(r.client.Token, "/api/v1/tasks/"+id+"/files/"+c.ID, 200)
+ if err != nil || string(got) != string(want) || c.Width < 1 {
+ t.Fatalf("capture %+v: %d bytes, want %d", c, len(got), len(want))
+ }
+ }
+ }
+ r.expect(wire.FrameWatchMerge)
+ r.approved("ds", candX, true)
+ dir := r.directionCard(id)
+ if k := r.task(id); k.Direction == nil || len(k.Direction.Options) != 2 || !k.Direction.NoteNeeded {
+ t.Fatalf("direction %+v", k.Direction)
+ }
+ calm := eng.Design.Options[0].Captures[0].ID
+ page := r.get(r.inst.SessionFor(t, Owner), "/tasks/"+id, 200)
+ conv := r.get(r.inst.SessionFor(t, Owner), "/conversation", 200)
+ for _, want := range []string{"Option 1: Calm", "Option 2: Bold", `/tasks/` + id + `/files/` + calm} {
+ if !strings.Contains(page, want) || !strings.Contains(conv, want) {
+ t.Fatalf("the task page or the direction card lacks %q", want)
+ }
+ }
+ if !strings.Contains(conv, "data-direction-build") {
+ t.Fatal("the direction card's Build asks for no note")
+ }
+
+ // Build with two options needs the person's note.
+ _, err := r.client.Answer(r.ctx, dir.ID, wire.ChoiceBuild, dir.Revision)
+ var conflict wire.CardConflict
+ if st, ok := err.(*ErrStatus); !ok || st.Status != 409 || json.Unmarshal(st.Body, &conflict) != nil || conflict.Code != wire.ConflictDirectionNote {
+ t.Fatalf("Build without a note: %v", err)
+ }
+ note := "Build Calm, with Bold's yellow button."
+ if _, err := r.client.AnswerNote(r.ctx, dir.ID, wire.ChoiceBuild, note, dir.Revision); err != nil {
+ t.Fatal(err)
+ }
+ k = r.task(id)
+ if k.BuiltAs == nil {
+ t.Fatalf("built %+v", k)
+ }
+ built := r.task(k.BuiltAs.ID)
+ if built.Kind == wire.KindExplore || !strings.HasSuffix(built.Brief, "said which option to build, in their own words: "+wire.QuotedData(note)) || r.makerOf(built.ID) != sp.ID {
+ t.Fatalf("the change task %q %q maker %q", built.Kind, built.Brief, r.makerOf(built.ID))
+ }
+ if b := r.nextDispatch(); b.TaskID != built.ID || b.SpecialistID != sp.ID || b.Explore || !strings.Contains(b.Brief, wire.QuotedData(note)) {
+ t.Fatalf("the change task's dispatch %+v", b)
+ }
+}
+
+// patrixID is the Patrix project's id.
+func (r *toolRig) patrixID() string {
+ r.t.Helper()
+ list, err := r.client.Projects(r.ctx)
+ if err != nil {
+ r.t.Fatal(err)
+ }
+ for _, p := range list.Items {
+ if p.Repo == patrixRepo {
+ return p.ID
+ }
+ }
+ r.t.Fatal("no Patrix project")
+ return ""
+}
+
+// TestContractDesignRevokeMidStep: an owner revokes Design between two
+// renders. The runner gets cancel_step; the next render check is refused
+// over the link, so render_page stops for the attempt and the browser
+// never runs again; the pre-push check is refused; the captures it
+// uploads are never kept; and once the attempt reports its end, the
+// recovery card hands the task to Engineering, unbound.
+func TestContractDesignRevokeMidStep(t *testing.T) {
+ r := newToolRigSaying(t, wire.ProtocolCurrent, overhaulWords)
+ health := rendererHealth(t, nil)
+ r.designOn(health)
+ sp, id := r.designAdded(r.proposeDesign("d-propose"))
+ d := r.designStarted(sp, id)
+ x := r.designHand(d, health)
+ x.mockups()
+ if _, failed := x.tool(designstep.ToolRenderPage, renderBoth); failed {
+ t.Fatal("the first render")
+ }
+ if _, err := r.client.RevokeSpecialist(r.ctx, sp.ID, sp.Revision); err != nil {
+ t.Fatal(err)
+ }
+ if _, body := r.expect(wire.FrameCancelStep); body.(*wire.CancelStepCommand).StepID != d.StepID {
+ t.Fatalf("cancel %+v", body)
+ }
+ for i := range 2 {
+ if text, failed := x.tool(designstep.ToolRenderPage, renderBoth); !failed || text != designstep.RenderRefusedText {
+ t.Fatalf("render %d after the revoke: %s", i+2, text)
+ }
+ }
+ if x.checks != 2 || x.browserRuns != 1 {
+ t.Fatalf("%d render checks, %d browser runs", x.checks, x.browserRuns)
+ }
+ if text, failed := x.tool(designstep.ToolSubmitCandidate, `{"options": [{"name": "Calm", "captures": ["1-work-1.png"]}]}`); failed {
+ t.Fatalf("submit %s", text)
+ }
+ x.uploads("rv-file")
+ if why := r.lease(r.runner, "rv-push", wire.LeaseCheck{StepID: d.StepID, Attempt: d.Attempt}); why == "" {
+ t.Fatal("pushed after the revoke")
+ }
+ r.step("rv-end", wire.StepReport{TaskID: id, StepID: d.StepID, Attempt: d.Attempt, State: wire.StepCancelled, Reason: "cancelled", BaseSHA: baseX, Termination: true, Options: x.at.Options()})
+ // A chunk after the attempt ended is not staged either.
+ files, _ := designstep.Files(x.dir, id, d.StepID, d.Attempt, x.at.Options())
+ r.ack("rv-late", wire.FrameRenderFile, files[0][0])
+ if n := r.rows("SELECT count(*) FROM chat_task_files WHERE step_id = ?", d.StepID); n != 0 {
+ t.Fatalf("%d captures of a revoked attempt kept or staged", n)
+ }
+ if s := r.newest(id, wire.SpecialistEngineering); s.State != wire.StepCancelled || s.Design != nil {
+ t.Fatalf("the attempt %+v", s)
+ }
+ var card wire.Card
+ r.wait("recovery card", func(c *Conversation) bool {
+ for _, k := range c.Cards {
+ if k.Kind == wire.CardMakerRemoved && k.TaskID == id && k.State == wire.CardOpen {
+ card = k
+ }
+ }
+ return card.ID != ""
+ })
+ if _, err := r.client.Answer(r.ctx, card.ID, wire.ChoiceToEngineering, card.Revision); err != nil {
+ t.Fatal(err)
+ }
+ if e := r.nextDispatch(); e.TaskID != id || e.SpecialistID != "" || e.Profile != "" || r.makerOf(id) != "" {
+ t.Fatalf("handed to Engineering %+v", e)
+ }
+}
+
+// TestContractDesignWaitsForItsRunner: Design never runs where it cannot.
+// A primary whose renderer failed its fixture page reports it, and the
+// started task's Design step waits for the renderer, unsent; reconnected
+// at protocol 35 with the renderer ok, it waits for the runner's update;
+// at 36 it is dispatched with its binding. The task page says why.
+func TestContractDesignWaitsForItsRunner(t *testing.T) {
+ r := newToolRigSaying(t, wire.ProtocolCurrent, overhaulWords)
+ broken := rendererHealth(t, errors.New("the fixture page did not render"))
+ if got := broken.Report(r.ctx); got == wire.ToolHealthy {
+ t.Fatalf("a failed fixture reported %q", got)
+ }
+ r.designOn(broken)
+ sp, id := r.designAdded(r.proposeDesign("d-propose"))
+ waits := func(reason, words string) {
+ t.Helper()
+ if err := r.inst.Store.Chat().Place(r.ctx); err != nil {
+ t.Fatal(err)
+ }
+ s := r.newest(id, wire.SpecialistEngineering)
+ if s.State != wire.StepQueued || s.Placement != wire.PlacementDesign || s.Reason != reason || s.RunnerID != "" || r.commands(wire.FrameDispatch) != 0 {
+ t.Fatalf("waiting for %s: %+v", reason, s)
+ }
+ if page := r.get(r.inst.SessionFor(t, Owner), "/tasks/"+id, 200); !strings.Contains(page, words) {
+ t.Fatalf("the task page lacks %q", words)
+ }
+ }
+ waits("design_renderer", "Waiting for the runner’s page renderer.")
+ ok := rendererHealth(t, nil)
+ r.redialAt(wire.ProtocolChangeDiffs, ok)
+ waits("design_runner_old", "Waiting for the runner to be updated so it can run Design.")
+ r.redialAt(wire.ProtocolCurrent, ok)
+ if err := r.inst.Store.Chat().Place(r.ctx); err != nil {
+ t.Fatal(err)
+ }
+ r.designStarted(sp, id)
+}
+
+// TestContractDesignAddNeedsAnOwner: only the card's owner adds Design.
+// Another person's tap finds nothing; the proposer made a member taps
+// Add and is refused. Nothing is granted, no continuation is queued and
+// no task is recorded.
+func TestContractDesignAddNeedsAnOwner(t *testing.T) {
+ a := newToolRigAt(t, wire.ProtocolCurrent)
+ a.designOn(rendererHealth(t, nil))
+ b := personToolRigAt(t, a, "second@example.com", equipo.RoleOwner, wire.ProtocolCurrent)
+ m := personToolRig(t, a, "member@example.com", equipo.RoleMember)
+ card := b.proposeDesign("b-propose")
+ for _, other := range []*toolRig{a, m} {
+ if _, err := other.client.Answer(a.ctx, card.ID, wire.ChoiceAdd, card.Revision); Status(err) != 404 {
+ t.Fatalf("another person's tap: %v", err)
+ }
+ }
+ var revision int64
+ if err := a.inst.DB.Writer().QueryRow("SELECT revision FROM members WHERE address = ?", "second@example.com").Scan(&revision); err != nil {
+ t.Fatal(err)
+ }
+ if err := a.inst.Store.SetMember(context.Background(), equipo.Actor{Address: Owner}, "second@example.com", equipo.RoleMember, true, revision); err != nil {
+ t.Fatal(err)
+ }
+ if _, err := b.client.Answer(a.ctx, card.ID, wire.ChoiceAdd, card.Revision); Status(err) != 403 {
+ t.Fatalf("a member added Design: %v", err)
+ }
+ if a.rows("SELECT count(*) FROM chat_capability_grants") != 0 || a.rows("SELECT count(*) FROM chat_specialists WHERE state = ?", wire.SpecialistProposed) != 1 || a.rows("SELECT count(*) FROM chat_specialist_turns") != 0 || a.rows("SELECT count(*) FROM chat_tasks") != 0 {
+ t.Fatal("a member's tap granted, queued or recorded something")
+ }
+}
+
+// TestContractDesignNotNowWindow: Not now grants nothing and queues no
+// continuation; the coordinator cannot propose Design for Patrix again
+// until 7 days have passed since the answer.
+func TestContractDesignNotNowWindow(t *testing.T) {
+ r := newToolRigSaying(t, wire.ProtocolCurrent, overhaulWords)
+ r.designOn(rendererHealth(t, nil))
+ card := r.proposeDesign("n-propose")
+ if _, err := r.client.Answer(r.ctx, card.ID, wire.ChoiceNotNow, card.Revision); err != nil {
+ t.Fatal(err)
+ }
+ if r.rows("SELECT count(*) FROM chat_capability_grants") != 0 || r.rows("SELECT count(*) FROM chat_specialist_turns") != 0 || r.rows("SELECT count(*) FROM chat_specialists WHERE state = ?", wire.SpecialistDeclined) != 1 {
+ t.Fatal("Not now granted or queued something")
+ }
+ r.next("Patrix still needs that overhaul.")
+ answered := func(ago time.Duration) {
+ t.Helper()
+ if _, err := r.inst.DB.Writer().Exec("UPDATE chat_specialists SET decided_at = ? WHERE id = ?", time.Now().UTC().Add(-ago), card.Specialist.ID); err != nil {
+ t.Fatal(err)
+ }
+ }
+ answered(7*24*time.Hour - time.Minute)
+ if res := r.call("n-again", wire.ToolProposeSpecialist, designProposal()); !res.IsError || res.Code != "declined_recently" {
+ t.Fatalf("proposed again within 7 days %+v", res)
+ }
+ answered(7*24*time.Hour + time.Minute)
+ if res := r.call("n-later", wire.ToolProposeSpecialist, designProposal()); res.IsError || res.Code != "proposed" {
+ t.Fatalf("after 7 days %+v", res)
+ }
+}