oficina / equipo Public

Merge branch 'failed-turn-carried' into main

Merge failed-turn-carried: a failed message reaches the next turn

Typed words from up to two turns that failed before the model ran ride the next turn, quoted as unanswered; they can start jobs; card answers excluded.
claude agent, operated by paul@keymail.dev b6c76de292c1506b03bbd5747dc9df58d5f9dcc9 parent 92b78ddparent c8e921d
12 files changed, +446 −16
  • .rastrillo/budgets.txt +2 −2
  • internal/equipo/chat/handoff.go +9 −3
  • internal/equipo/chat/models.go +11 −1
  • internal/equipo/chat/store.go +115 −4
  • internal/equipo/chat/tools.go +7 −0
  • internal/equipo/migrations/0095_turn_carried.sql +4 −0
  • internal/equipo/migrations/schema.sql +2 −0
  • internal/fakeclaude/fake.go +4 −0
  • internal/fakecodex/fake.go +4 −0
  • internal/thintest/batching_contract_test.go +27 −6
  • internal/thintest/carried_contract_test.go +138 −0
  • internal/thintest/instance_contract_test.go +123 −0

CI passed — run details

CI log
=== prepare ===
ci-box: machine: aarch64, 32 CPUs, 62 GiB memory, kernel 7.0.0-1017-aws
ci-box: python 3.12.3; Docker version 29.1.3, build 29.1.3-0ubuntu3~24.04.2
ci-box: user namespaces allowed: 233151
ci-box: cgroup: cgroup2fs
ci-box: disk /home/ci/work/repos/oficina__equipo/wt/main: Type  Size Avail | ext4   96G   85G
ci-box: disk /home/ci/.cache/equipo-ci-box: Type  Size Avail | ext4   96G   85G
ci-box: bwrap: fetched and verified in 0.3s
ci-box: claude: fetched and verified in 2.2s
ci-box: codex: fetched and verified in 3.4s
ci-box: codex-code-mode-host: fetched and verified in 1.3s
ci-box: libwrap: fetched and verified in 0.3s
ci-box: socat: fetched and verified in 0.3s
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
ci-box: image pulled in 9.7s
ci-box: pi: installed and verified in 7.4s
ci-box: opencode: installed and verified in 1.9s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 9.0s
ci-box: clone deepened in 3.4s
ci-box: file times set from content: 2732 files, 174 directories
ci-box: ready in 16.5s
=== 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.244s
=== compile ===
go build ./...
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py compile
+ go build -tags testbuild ./...
  3.5s
+ go list -export -test -tags testbuild -f  ./...
  3.7s
+ go list -export -test -tags browser,testbuild -f  ./internal/equipo ./internal/headless ./internal/idtest ./internal/plan3test ./internal/thintest
  3.0s
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -version
staticcheck 2026.1 (v0.7.0)
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 -version
Go: go1.26.11
Scanner: govulncheck@v1.8.0
DB: https://vuln.go.dev
DB updated: 2026-11-11 02:51:11 +0000 UTC

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

receipt: test step 1m27.172s 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.437s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m25.44s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 59.34, cpu waiting 36.37%, memory waiting 0.00%, io waiting 0.43%
--- 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 1m30.053s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m28.178s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m28.18s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 59.34, cpu waiting 36.26%, memory waiting 0.00%, io waiting 0.42%
--- 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 1m31.224s 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 1m29.194s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m17.85s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 6.23s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 5.11s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 59.34, cpu waiting 36.02%, memory waiting 0.00%, io waiting 0.40%
--- 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 1m26.829s 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.176s amadan.net/oficina/equipo/internal/headless
receipt: slow test 43.31s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 21.87s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 10.48s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
receipt: slow test 9.51s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
machine: 32 CPUs, load 59.34, cpu waiting 36.37%, memory waiting 0.00%, io waiting 0.43%
--- shard 4 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-guards: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadlessCopyRotation$|^TestHeadlessPolicyGuards$|^TestHeadlessRunnerKillLeavesNoCopies$|^TestHeadlessNewHouseRuleStartsFresh$|^TestHeadless$/^3_engineering$|^TestHeadless$/^3_step_cancel$|^TestHeadless$/^3_step_contained$|^TestHeadless$/^3_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless

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

receipt: test step 3m14.937s 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 3m12.802s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m51.61s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistant
receipt: slow test 23.73s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 11.32s amadan.net/oficina/equipo/internal/headless TestHeadlessResearchHandoff
receipt: slow test 8.03s amadan.net/oficina/equipo/internal/headless TestHeadlessClaudeSignIn
receipt: slow test 7.3s amadan.net/oficina/equipo/internal/headless TestHeadlessTurnBatching
machine: 32 CPUs, load 15.14, cpu waiting 6.91%, memory waiting 0.00%, io waiting 0.06%
--- 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 2m2.742s 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 2m0.586s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 7.77s amadan.net/oficina/equipo/internal/thintest TestContractTeamJobSettledStates
receipt: slow test 6.74s amadan.net/oficina/equipo/internal/thintest TestExplorePreviewsOff
receipt: slow test 3.77s amadan.net/oficina/equipo/internal/thintest TestContractPreviewHeldUntilPublishAnswer
receipt: slow test 3.51s amadan.net/oficina/equipo/internal/thintest TestContractTeamNudgePersonNeeds
receipt: slow test 2.47s amadan.net/oficina/equipo/internal/thintest TestResearchDoneFallsBack
machine: 32 CPUs, load 38.04, cpu waiting 22.77%, memory waiting 0.00%, io waiting 0.23%
--- shard 7 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane thintest-contract: ./internal/thintest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^Test([^C]|C[^o]|Co[^n]|Con[^t])|^TestContract(Assistant|Outcome|Team|Handoff|HostAllowlist|HostIsPerPerson|Look|Use[A-Z]|RemoteCall|LanesRunAtOnce|NoMergeQuestionWhenGateMerges|PreviewHeldUntilPublishAnswer|PreviewNotHeldBelow19|PublishNeedsOwnerAnswer)' ./internal/thintest

receipt: test step 1m23.716s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m21.938s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 9.06s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 5.05s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotOffered
receipt: slow test 4.45s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
receipt: slow test 2.46s amadan.net/oficina/equipo/internal/thintest TestContractPreview
receipt: slow test 2.34s amadan.net/oficina/equipo/internal/thintest TestContractPublishNameTaken
machine: 32 CPUs, load 60.42, cpu waiting 35.98%, memory waiting 0.00%, io waiting 0.46%
--- shard 8 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-thin: ./internal/runner/thin
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./internal/runner/thin
budget note: internal/runner/thin took 4m35.575s, over the 45s its record on line 44 allows; reported only, timing fails on CI

receipt: test step 4m40.682s 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 4m35.575s amadan.net/oficina/equipo/internal/runner/thin
receipt: slow test 37.04s amadan.net/oficina/equipo/internal/runner/thin TestModelsEngineeringProbesThenRunsTheStrongest
receipt: slow test 36.98s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeAnsweredByAnotherModel
receipt: slow test 36.78s amadan.net/oficina/equipo/internal/runner/thin TestModelsUnhealthyRetriedOnDemand
receipt: slow test 18.47s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeRunsInsideTheAdmission
receipt: slow test 6.96s amadan.net/oficina/equipo/internal/runner/thin TestOpenCodeStepsRealOpenCode
machine: 32 CPUs, load 4.22, cpu waiting 1.64%, memory waiting 0.00%, io waiting 0.01%
--- shard 9 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-bug: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestDirectBugWorkflow$|^TestEnrolKeepsTheRole$' ./internal/runner
cache miss: amadan.net/oficina/equipo/internal/runner: its inputs changed

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

receipt: test step 57.723s 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 55.695s amadan.net/oficina/equipo/internal/runner
receipt: slow test 45.58s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 41.1s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.4s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.69s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 53.88, cpu waiting 33.04%, memory waiting 0.00%, io waiting 0.72%
--- shard 11 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-rest: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^TestDirectBugWorkflow$|^TestEnrolKeepsTheRole$|^TestPlanWorkflowCandidateOrder$|^TestPlanWorkflowFeature$|^TestCoordinatorRecoveryCallRefusalKeepsServing$|^TestCoordinatorRefusalMatrix$' ./internal/runner
cache miss: amadan.net/oficina/equipo/internal/runner: its inputs changed

receipt: test step 35.595s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 34.599s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.12s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.36s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.12s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 2.37s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 1.61s amadan.net/oficina/equipo/internal/runner TestReportPostsRetryExactRequest
machine: 32 CPUs, load 36.27, cpu waiting 18.97%, memory waiting 0.00%, io waiting 1.04%
--- 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 35.5%, load 27.67
test lane equipotest-a: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test[A-D]|^TestQ' ./internal/equipotest

receipt: test step 1m6.704s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m4.739s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 27.04s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 26.94s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 24.92s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 22.36s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
receipt: slow test 22.18s amadan.net/oficina/equipo/internal/equipotest TestAuthorityUsesLiveRoster
machine: 32 CPUs, load 55.54, cpu waiting 34.38%, memory waiting 0.00%, io waiting 0.36%
--- 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 35.5%, load 27.67
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 1m14.131s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m12.313s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 19.14s amadan.net/oficina/equipo/internal/equipotest TestProjectsReopen
receipt: slow test 19.13s amadan.net/oficina/equipo/internal/equipotest TestProjectWritesRequireCurrentOwner
receipt: slow test 19.1s amadan.net/oficina/equipo/internal/equipotest TestProjectsFailuresRollBack
receipt: slow test 19.09s amadan.net/oficina/equipo/internal/equipotest TestProjectConcurrentRetry
receipt: slow test 19.06s amadan.net/oficina/equipo/internal/equipotest TestProjectRetryAndRevision
machine: 32 CPUs, load 51.74, cpu waiting 31.43%, memory waiting 0.00%, io waiting 0.33%
--- 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 35.5%, load 27.67
test lane equipotest-r: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestR' ./internal/equipotest

receipt: test step 1m11.904s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m6.881s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 14.73s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 13.14s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 9.98s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 9.97s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 6.99s amadan.net/oficina/equipo/internal/equipotest TestRosterAuditFailureRollsBack
machine: 32 CPUs, load 51.74, cpu waiting 32.43%, memory waiting 0.00%, io waiting 0.34%
--- 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 35.5%, load 27.67
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 1m7.513s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m5.76s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 25.23s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 24.06s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 23.98s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 22.35s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsUpgrade
receipt: slow test 22.28s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsRollbackAndUnavailable
machine: 32 CPUs, load 55.54, cpu waiting 34.38%, memory waiting 0.00%, io waiting 0.36%
--- 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 35.5%, load 27.67
test lane plan3test: ./internal/plan3test
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./internal/plan3test

receipt: test step 51.712s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 49.957s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 3.55s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 3.51s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 1.53s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.48s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3A
receipt: slow test 1.25s amadan.net/oficina/equipo/internal/plan3test TestInviteMigration
machine: 32 CPUs, load 58.80, cpu waiting 35.85%, memory waiting 0.00%, io waiting 0.48%
--- 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 35.5%, load 27.67
test lane rest: ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/idtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/idtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
cache miss: amadan.net/oficina/equipo/internal/runner/webread: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/copydesk: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/opencode: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/forge: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/equipo/team: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runnerproto: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/workspace: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/testci: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/wire/wireschema: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/checks: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/containment: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/pi: its inputs changed
--- FAIL amadan.net/oficina/equipo/internal/runner/webread TestTimeouts
=== RUN   TestTimeouts
    fetch_test.go:537: s1: {Source:s1 Origin:paul Parent: URL:https://shop.example.com/slow-body Hops:[{URL:https://shop.example.com/slow-body Address:151.101.1.1 Status:200}] Address:151.101.1.1 Status:200 Type:text/plain Bytes:5 SHA256:2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 Millis:301 Reason: File:s001.txt}
--- FAIL: TestTimeouts (0.61s)

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

budget note: internal/equipo took 20.802s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/equipo/chat took 10.629s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/idtest took 41.017s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/release took 22.778s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/runner/containment took 48.537s, over the 15s its record on line 40 allows; reported only, timing fails on CI

receipt: test step 2m28.86s against a 60s target (the gate's other steps are not in this figure)
receipt: 21 packages ran, 38 cached, 18 without tests, 1 failed
receipt: slow package 1m6.02s amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow package 52.406s amadan.net/oficina/equipo/internal/runner/provider/pi
receipt: slow package 49.115s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 48.537s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow package 41.017s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 24.39s amadan.net/oficina/equipo/internal/runner/provider/opencode TestOpenCodeAcceptanceHostileRepository
receipt: slow test 20.64s amadan.net/oficina/equipo/internal/runner/containment TestEngineeringOfflineGo
receipt: slow test 15.09s amadan.net/oficina/equipo/cmd/equipo-runner TestReleaseRunnerHasNoFakeWorker
receipt: slow test 11.17s amadan.net/oficina/equipo/internal/runner/containment TestEngineeringMissingModuleCache
receipt: slow test 10.83s amadan.net/oficina/equipo/internal/idtest TestIDCallbackGuardAndPendingNonce
rastrillo: budget test: go test failed
exit status 1
+ go test -tags testbuild -timeout 15m -v -run '^TestTimeouts$' -count=1 ./internal/runner/webread   (retry, once)
##############################################################################
FLAKE ./internal/runner/webread:TestTimeouts rest b6c76de292c1506b03bbd5747dc9df58d5f9dcc9 0.61s 18.66
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 18.66, cpu waiting 8.73%, memory waiting 0.00%, io waiting 0.08%
--- shard 18 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-chat: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$' ./internal/headless
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserChat
=== RUN   TestBrowserChat
time=2026-11-20T09:24:51.484Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T09:24:51.484Z level=INFO msg="startup phase done" phase=state_lock took=65µs
time=2026-11-20T09:24:51.484Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T09:24:51.484Z level=INFO msg="startup phase done" phase=claim_roots took=85µs
time=2026-11-20T09:24:51.484Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T09:24:51.519Z level=INFO msg="startup phase done" phase=sweep took=34.954ms
time=2026-11-20T09:24:51.519Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T09:24:51.519Z level=INFO msg="startup phase done" phase=credentials took=105µs
time=2026-11-20T09:24:51.519Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T09:24:51.567Z level=INFO msg="startup phase done" phase=open_state took=47.524ms
time=2026-11-20T09:24:51.567Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T09:24:51.568Z level=INFO msg=connecting host=127.0.0.1:35705 protocol=28
time=2026-11-20T09:24:51.570Z level=INFO msg=connected host=127.0.0.1:35705 took=1.355ms
time=2026-11-20T09:24:51.572Z level=INFO msg="capabilities gathering"
time=2026-11-20T09:24:51.577Z level=INFO msg="capabilities gathered" took=4.63ms tags=linux,claude,go
time=2026-11-20T09:24:51.585Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T09:24:51.600Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-20T09:24:53.693Z level=INFO msg="connection checked" connection=claude-1 state=healthy
    browser_test.go:46: waiting for [...document.querySelectorAll('[equipo-message="incoming"] [equipo-markdown]:not([data-stream-text])')].some(e=>e.textContent.includes('fake coordinator')): context deadline exceeded (last evaluation: context deadline exceeded)
--- FAIL: TestBrowserChat (6.21s)

--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
=== RUN   TestBrowserChatSendStaysOnPage
time=2026-11-20T09:24:57.823Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T09:24:57.823Z level=INFO msg="startup phase done" phase=state_lock took=114µs
time=2026-11-20T09:24:57.823Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T09:24:57.823Z level=INFO msg="startup phase done" phase=claim_roots took=87µs
time=2026-11-20T09:24:57.823Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T09:24:57.882Z level=INFO msg="startup phase done" phase=sweep took=59.323ms
time=2026-11-20T09:24:57.884Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T09:24:57.884Z level=INFO msg="startup phase done" phase=credentials took=238µs
time=2026-11-20T09:24:57.884Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T09:24:57.964Z level=INFO msg="startup phase done" phase=open_state took=79.691ms
time=2026-11-20T09:24:57.965Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T09:24:57.968Z level=INFO msg=connecting host=127.0.0.1:40101 protocol=28
time=2026-11-20T09:24:57.969Z level=INFO msg=connected host=127.0.0.1:40101 took=957µs
time=2026-11-20T09:24:57.969Z level=INFO msg="capabilities gathering"
time=2026-11-20T09:24:57.970Z level=INFO msg="capabilities gathered" took=915µs tags=linux,claude,go
time=2026-11-20T09:24:57.977Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T09:24:57.981Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-20T09:25:00.177Z level=INFO msg="connection checked" connection=claude-1 state=healthy
    browser_test.go:108: waiting for [...document.querySelectorAll('[equipo-message="incoming"] [equipo-markdown]:not([data-stream-text])')].some(e=>e.textContent.includes('fake coordinator')): context deadline exceeded (last evaluation: <nil>)
--- FAIL: TestBrowserChatSendStaysOnPage (6.41s)

--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
=== RUN   TestBrowserDraftIsTheMessage
time=2026-11-20T09:25:04.109Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T09:25:04.110Z level=INFO msg="startup phase done" phase=state_lock took=214µs
time=2026-11-20T09:25:04.110Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T09:25:04.110Z level=INFO msg="startup phase done" phase=claim_roots took=179µs
time=2026-11-20T09:25:04.110Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T09:25:04.162Z level=INFO msg="startup phase done" phase=sweep took=52.518ms
time=2026-11-20T09:25:04.163Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T09:25:04.163Z level=INFO msg="startup phase done" phase=credentials took=217µs
time=2026-11-20T09:25:04.163Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T09:25:04.226Z level=INFO msg="startup phase done" phase=open_state took=63.108ms
time=2026-11-20T09:25:04.226Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T09:25:04.228Z level=INFO msg=connecting host=127.0.0.1:35315 protocol=28
time=2026-11-20T09:25:04.229Z level=INFO msg=connected host=127.0.0.1:35315 took=880µs
time=2026-11-20T09:25:04.230Z level=INFO msg="capabilities gathering"
time=2026-11-20T09:25:04.230Z level=INFO msg="capabilities gathered" took=409µs tags=linux,claude,go
time=2026-11-20T09:25:04.231Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T09:25:04.239Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-20T09:25:06.209Z level=INFO msg="connection checked" connection=claude-1 state=healthy
    browser_thinking_test.go:106: waiting for !!window.__m: context deadline exceeded (last evaluation: <nil>)
--- FAIL: TestBrowserDraftIsTheMessage (8.13s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 48.598s
FAIL	amadan.net/oficina/equipo/internal/headless	48.921s


receipt: test step 50.129s 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 48.598s amadan.net/oficina/equipo/internal/headless
receipt: slow test 15.34s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 8.13s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 7.85s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 6.41s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
receipt: slow test 6.21s amadan.net/oficina/equipo/internal/headless TestBrowserChat
exit status 1
+ go test -tags browser,testbuild -timeout 15m -run '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$' -v -run '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserDraftIsTheMessage$' -count=1 ./internal/headless   (retry, once)
##############################################################################
FLAKE ./internal/headless:TestBrowserChat browser-headless-chat b6c76de292c1506b03bbd5747dc9df58d5f9dcc9 6.21s 52.82
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
##############################################################################
FLAKE ./internal/headless:TestBrowserChatSendStaysOnPage browser-headless-chat b6c76de292c1506b03bbd5747dc9df58d5f9dcc9 6.41s 52.82
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
##############################################################################
FLAKE ./internal/headless:TestBrowserDraftIsTheMessage browser-headless-chat b6c76de292c1506b03bbd5747dc9df58d5f9dcc9 8.13s 52.82
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 47.91, cpu waiting 29.50%, memory waiting 0.00%, io waiting 0.31%
--- shard 19 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-work: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$' ./internal/headless
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
=== RUN   TestBrowserRailFollowsWork
time=2026-11-20T09:24:47.463Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T09:24:47.463Z level=INFO msg="startup phase done" phase=state_lock took=67µs
time=2026-11-20T09:24:47.463Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T09:24:47.463Z level=INFO msg="startup phase done" phase=claim_roots took=103µs
time=2026-11-20T09:24:47.463Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T09:24:47.490Z level=INFO msg="startup phase done" phase=sweep took=26.528ms
time=2026-11-20T09:24:47.490Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T09:24:47.490Z level=INFO msg="startup phase done" phase=credentials took=135µs
time=2026-11-20T09:24:47.490Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T09:24:47.531Z level=INFO msg="startup phase done" phase=open_state took=41.121ms
time=2026-11-20T09:24:47.532Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T09:24:47.533Z level=INFO msg=connecting host=127.0.0.1:44253 protocol=28
time=2026-11-20T09:24:47.534Z level=INFO msg=connected host=127.0.0.1:44253 took=931µs
time=2026-11-20T09:24:47.534Z level=INFO msg="capabilities gathering"
time=2026-11-20T09:24:47.534Z level=INFO msg="capabilities gathered" took=613µs tags=linux,claude,go
time=2026-11-20T09:24:47.539Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T09:24:47.540Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-20T09:24:48.888Z level=INFO msg="connection checked" connection=claude-1 state=healthy
time=2026-11-20T09:24:57.831Z level=INFO msg="kept sessions" kept=1 bytes=2770 expired=0
time=2026-11-20T09:25:02.800Z level=INFO msg="kept sessions" kept=2 bytes=4922 expired=0
time=2026-11-20T09:25:03.584Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T09:25:03.584Z level=INFO msg="startup phase done" phase=state_lock took=259µs
time=2026-11-20T09:25:03.584Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T09:25:03.584Z level=INFO msg="startup phase done" phase=claim_roots took=232µs
time=2026-11-20T09:25:03.584Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T09:25:03.617Z level=INFO msg="startup phase done" phase=sweep took=32.054ms
time=2026-11-20T09:25:03.617Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T09:25:03.617Z level=INFO msg="startup phase done" phase=credentials took=188µs
time=2026-11-20T09:25:03.617Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T09:25:03.661Z level=INFO msg="startup phase done" phase=open_state took=43.6ms
time=2026-11-20T09:25:03.662Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T09:25:03.663Z level=INFO msg=connecting host=127.0.0.1:46507 protocol=28
time=2026-11-20T09:25:03.666Z level=INFO msg=connected host=127.0.0.1:46507 took=2.604ms
time=2026-11-20T09:25:03.666Z level=INFO msg="capabilities gathering"
time=2026-11-20T09:25:03.668Z level=INFO msg="capabilities gathered" took=2.054ms tags=linux,claude,go
time=2026-11-20T09:25:03.672Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T09:25:03.676Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-20T09:25:05.633Z level=INFO msg="connection checked" connection=claude-1 state=healthy
    browser_review_test.go:57: waiting for document.querySelector('#rail [data-specialist="engineering"]')?.dataset.state==='working' && document.querySelector('#rail [data-specialist="engineering"]').querySelector('[equipo-nav-task]')?.textContent==='Slow sidebar change' && document.querySelector('#nav-tasks [data-count]')?.textContent==='1': context deadline exceeded (last evaluation: context deadline exceeded)
time=2026-11-20T09:25:10.234Z level=WARN msg="step account" err="context canceled"
--- FAIL: TestBrowserRailFollowsWork (23.33s)

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


receipt: test step 1m36.394s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 0 cached, 0 without tests, 1 failed
receipt: slow package 1m34.787s amadan.net/oficina/equipo/internal/headless
receipt: slow test 25.76s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 23.33s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 14.47s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 11.03s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
receipt: slow test 10.35s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
exit status 1
+ go test -tags browser,testbuild -timeout 15m -run '^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$' -v -run '^TestBrowserRailFollowsWork$' -count=1 ./internal/headless   (retry, once)
##############################################################################
FLAKE ./internal/headless:TestBrowserRailFollowsWork browser-headless-work b6c76de292c1506b03bbd5747dc9df58d5f9dcc9 23.33s 55.54
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 41.09, cpu waiting 24.34%, memory waiting 0.00%, io waiting 0.25%
--- 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 1m45.786s 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 1m44.118s amadan.net/oficina/equipo/internal/headless
receipt: slow test 17.01s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 13.29s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 12.97s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 10.73s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
receipt: slow test 10.5s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsOpenCodeGoLimitRequired
machine: 32 CPUs, load 51.74, cpu waiting 29.50%, memory waiting 0.00%, io waiting 0.31%
--- shard 21 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-rest: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAskAfterMerge|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' ./internal/headless
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserCopyContinue
=== RUN   TestBrowserCopyContinue
time=2026-11-20T09:25:02.145Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T09:25:02.148Z level=INFO msg="startup phase done" phase=state_lock took=2.589ms
time=2026-11-20T09:25:02.148Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T09:25:02.148Z level=INFO msg="startup phase done" phase=claim_roots took=224µs
time=2026-11-20T09:25:02.148Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T09:25:02.223Z level=INFO msg="startup phase done" phase=sweep took=75.024ms
time=2026-11-20T09:25:02.223Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T09:25:02.223Z level=INFO msg="startup phase done" phase=credentials took=106µs
time=2026-11-20T09:25:02.223Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T09:25:02.330Z level=INFO msg="startup phase done" phase=open_state took=106.948ms
time=2026-11-20T09:25:02.335Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T09:25:02.336Z level=INFO msg=connecting host=127.0.0.1:40835 protocol=28
time=2026-11-20T09:25:02.340Z level=INFO msg=connected host=127.0.0.1:40835 took=1.989ms
time=2026-11-20T09:25:02.342Z level=INFO msg="capabilities gathering"
time=2026-11-20T09:25:02.343Z level=INFO msg="capabilities gathered" took=1.012ms tags=linux,claude,go
time=2026-11-20T09:25:02.344Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T09:25:02.357Z level=INFO msg=welcome protocol=28 role=primary generation=1
    browser_copy_test.go:90: waiting for !document.querySelector('[data-copy-continue]'): context deadline exceeded (last evaluation: context deadline exceeded)
--- FAIL: TestBrowserCopyContinue (6.73s)

--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserEmptyExplore
=== RUN   TestBrowserEmptyExplore
time=2026-11-20T09:25:41.478Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T09:25:41.478Z level=INFO msg="startup phase done" phase=state_lock took=84µs
time=2026-11-20T09:25:41.478Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T09:25:41.478Z level=INFO msg="startup phase done" phase=claim_roots took=83µs
time=2026-11-20T09:25:41.478Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T09:25:41.506Z level=INFO msg="startup phase done" phase=sweep took=28.231ms
time=2026-11-20T09:25:41.507Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T09:25:41.507Z level=INFO msg="startup phase done" phase=credentials took=256µs
time=2026-11-20T09:25:41.507Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T09:25:41.551Z level=INFO msg="startup phase done" phase=open_state took=44.566ms
time=2026-11-20T09:25:41.552Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T09:25:41.553Z level=INFO msg=connecting host=127.0.0.1:42079 protocol=28
time=2026-11-20T09:25:41.555Z level=INFO msg=connected host=127.0.0.1:42079 took=1.758ms
time=2026-11-20T09:25:41.556Z level=INFO msg="capabilities gathering"
time=2026-11-20T09:25:41.556Z level=INFO msg="capabilities gathered" took=591µs tags=linux,claude,go
time=2026-11-20T09:25:41.559Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T09:25:41.566Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-20T09:25:42.717Z level=INFO msg="connection checked" connection=claude-1 state=healthy
    browser_receipts_test.go:169: waiting for [...document.querySelectorAll('[equipo-markdown]:not([data-stream-text])')].some(e=>e.textContent.includes("I'm your coordinator")): context deadline exceeded (last evaluation: context deadline exceeded)
--- FAIL: TestBrowserEmptyExplore (5.90s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m37.982s
FAIL	amadan.net/oficina/equipo/internal/headless	98.321s


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

receipt: test step 1.975s 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 504ms amadan.net/oficina/equipo/internal/equipo
receipt: slow test 500ms amadan.net/oficina/equipo/internal/equipo TestBrowserPreviewBlocksNavigation
browser lane browser-rest: ./internal/idtest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserOficinaIDDoor)$' ./internal/idtest

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

receipt: test step 3.157s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1.855s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 1.85s amadan.net/oficina/equipo/internal/plan3test TestTeamsHierarchyBrowser
browser lane browser-rest: ./internal/thintest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAccessEmojiByline|TestBrowserAccessFinalOutcomes|TestBrowserAccessRequest|TestBrowserAccessReview|TestBrowserActivitySubjects|TestBrowserAutonomySettings|TestBrowserCoordinatorQueue|TestBrowserEmptyConversation|TestBrowserHousekeeping|TestBrowserInnerGallery|TestBrowserInnerScreens|TestBrowserInstantThinking|TestBrowserInstantThinkingQueued|TestBrowserMachines|TestBrowserPhoneIndex|TestBrowserPlacementQuestionAndPending|TestBrowserProjectPlacement|TestBrowserProjectsList|TestBrowserReportActionFeedback|TestBrowserReportNextSteps|TestBrowserReportThread|TestBrowserRollup|TestBrowserRosterAlignment|TestBrowserRosterDecisionStates|TestBrowserRosterQuietDay|TestBrowserRosterReports|TestBrowserRosterSetAside|TestBrowserRosterSubchat|TestBrowserRosterThinking|TestBrowserRosterVisual|TestBrowserSettingsHousekeepingGroups|TestBrowserSettingsMenu|TestBrowserSettingsRail|TestBrowserSettingsSaveBar|TestBrowserSettingsShots|TestBrowserSettingsStayOnPage|TestBrowserSettingsTeams|TestBrowserShipsButtons|TestBrowserSpecialistRows|TestBrowserSpendFollowsAnswers|TestBrowserTaskRows|TestBrowserTeamPanel|TestBrowserThinkingCycles|TestBrowserThinkingLinesClear|TestBrowserThinkingSteady|TestBrowserThinkingWords|TestBrowserTokenRowEmail|TestBrowserTrackPulse|TestBrowserTrackStarCentre)$' ./internal/thintest

receipt: test step 3m19.499s 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 3m18.042s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 17.37s amadan.net/oficina/equipo/internal/thintest TestBrowserAccessRequest
receipt: slow test 14.35s amadan.net/oficina/equipo/internal/thintest TestBrowserSettingsTeams
receipt: slow test 11.99s amadan.net/oficina/equipo/internal/thintest TestBrowserThinkingCycles
receipt: slow test 10.55s amadan.net/oficina/equipo/internal/thintest TestBrowserPlacementQuestionAndPending
receipt: slow test 7.92s amadan.net/oficina/equipo/internal/thintest TestBrowserInnerScreens
machine: 32 CPUs, load 12.34, cpu waiting 5.47%, memory waiting 0.00%, io waiting 0.05%
--- shard 23 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
shard 23: make test-quarantine
python3 scripts/ci-test.py quarantine
quarantine: 12 tests from scripts/ci-quarantine.txt; a failure is retried once, and a pass on the retry is reported as a flake
+ go test -tags testbuild -timeout 15m -v -run '^TestHeadlessConnections$/^A5_cancel_and_sign_out$|^TestHeadlessConnections$/^C4_claude_sign_in$|^TestHeadlessConnections$/^C5_engineering_failover$|^TestHeadlessConnections$/^C5_engineering_to_codex$|^TestHeadlessConnections$/^C5_engineering_waits$' ./internal/headless   (55s)
ok ./internal/headless TestHeadlessConnections/A5_cancel_and_sign_out 5.23s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.46s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 9.84s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 10.40s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 26.50s
+ go test -tags testbuild -timeout 15m -v -run '^TestHeadlessConnections$/^C5_review_auth$|^TestHeadlessConnections$/^C5_review_failover$|^TestHeadlessConnections$/^C5_review_on_codex$|^TestHeadlessConnections$/^C5_review_other_family_first$' ./internal/headless   (71s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 16.23s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 17.38s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 20.88s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 14.83s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless   (23s)
ok ./internal/headless TestMixedVersions 20.97s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks   (2s)
ok ./internal/runner/checks TestCheckSandboxDeniedPathsTampering 0.77s
+ go test -tags testbuild -timeout 15m -v -run '^TestRunnerCancelAndSupersede$' ./internal/runner/thin   (2s)
ok ./internal/runner/thin TestRunnerCancelAndSupersede 0.05s
quarantine: 0 flaked (passed on the retry), 0 failed
machine: 32 CPUs, load 60.44, cpu waiting 35.69%, memory waiting 0.00%, io waiting 0.55%
--- shard 24 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
shard 24: make runner-host
python3 scripts/runner-prerequisites.py
CGO_ENABLED=0 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks

receipt: test step 11.091s against a 60s target (the gate's other steps are not in this figure)
receipt: 4 packages ran, 0 cached, 3 without tests, 0 failed
receipt: slow package 7.438s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 191ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 80ms amadan.net/oficina/equipo/internal/runner/provider/codex
receipt: slow package 1ms amadan.net/oficina/equipo/internal/runner/provider
receipt: slow package 0s amadan.net/oficina/equipo/internal/runner/provider/gotoolchain
receipt: slow test 5.2s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.76s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 370ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 190ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 90ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxToolchain
CGO_ENABLED=0 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run '^TestNamespace' -count=1 ./internal/runner/containment
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run '^TestNamespace' -count=1 ./internal/runner/containment

receipt: test step 3.339s 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.951s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 260ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 190ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof
receipt: slow test 140ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicy
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceOpenCodeBinaryAfterAttestation
machine: 32 CPUs, load 18.12, cpu waiting 7.70%, memory waiting 0.00%, io waiting 1.46%
--- 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 35.5%, load 27.67
shard 25: make runner-dead-references lanes-check build vet fmt-check budget migration-check
python3 scripts/runner-dead-references.py
reference scan: 2446 text files, 2846 matches, 0 failures
python3 scripts/ci-test.py check
lanes: 18 lanes and 5 browser lanes run every test once; 20-check@29
CGO_ENABLED=0 go build ./...
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o /dev/null ./cmd/equipo-runner
go vet ./...
go vet -tags testbuild ./internal/runner/thin ./internal/headless
GOOS=darwin GOARCH=arm64 go vet ./cmd/equipo-runner/... ./internal/runner/... ./internal/wire/... ./internal/release/...
go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget size
budget size: 87 directories within budget
CGO_ENABLED=0 go test ./internal/equipo -run '^TestMigrationModels$' -count=1
ok  	amadan.net/oficina/equipo/internal/equipo	2.433s
machine: 32 CPUs, load 55.89, cpu waiting 34.45%, memory waiting 0.00%, io waiting 0.63%
--- 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 35.5%, load 27.67
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 50.63, cpu waiting 28.17%, memory waiting 0.00%, io waiting 0.85%
--- shard 27 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: govulncheck started 30s late; cpu waiting 35.5%, load 27.67
shard 27: make govulncheck
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 ./...
=== Symbol Results ===

No vulnerabilities found.

Your code is affected by 0 vulnerabilities.
This scan also found 0 vulnerabilities in packages you import and 5
vulnerabilities in modules you require, but your code doesn't appear to call
these vulnerabilities.
Use '-show verbose' for more details.
machine: 32 CPUs, load 42.33, cpu waiting 20.67%, memory waiting 0.00%, io waiting 1.01%
--- 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 35.5%, load 27.67
shard 28: make gitleaks
9:24AM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
9:25AM INF 1050 commits scanned.
9:25AM INF scanned ~60115596 bytes (60.12 MB) in 21.1s
9:25AM INF no leaks found
machine: 32 CPUs, load 52.82, cpu waiting 30.70%, memory waiting 0.00%, io waiting 0.80%
=== perf ===
go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -require TestPerfScreens,TestPerfBoot -tags perf -count=1 -p 1 -parallel 1 -run '^TestPerf' ./...
perf: GET /: median 1.077ms, worst 1.152ms, budget 150ms
perf: GET /api/runner/protocol: median 84µs, worst 108µs, budget 150ms
perf: GET /api/v1/account-setups/{id}: median 605µs, worst 653µs, budget 150ms
perf: GET /api/v1/accounts: median 424µs, worst 461µs, budget 150ms
perf: GET /api/v1/auth/devices: median 473µs, worst 511µs, budget 150ms
perf: GET /api/v1/budgets: median 480µs, worst 504µs, budget 150ms
perf: GET /api/v1/capabilities: median 248µs, worst 266µs, budget 150ms
perf: GET /api/v1/cards/{id}: median 1.261ms, worst 1.34ms, budget 150ms
perf: GET /api/v1/connections: median 561µs, worst 596µs, budget 150ms
perf: GET /api/v1/connections/{id}: median 533µs, worst 551µs, budget 150ms
perf: GET /api/v1/conversation: median 881µs, worst 936µs, budget 150ms
perf: GET /api/v1/conversation/cards: median 1.504ms, worst 1.553ms, budget 150ms
perf: GET /api/v1/coordinator: median 1.72ms, worst 1.812ms, budget 150ms
perf: GET /api/v1/invites/{id}: median 463µs, worst 510µs, budget 150ms
perf: GET /api/v1/journey: median 9.218ms, worst 9.416ms, budget 150ms
perf: GET /api/v1/me: median 518µs, worst 552µs, budget 150ms
perf: GET /api/v1/me/settings: median 596µs, worst 619µs, budget 150ms
perf: GET /api/v1/needs-you: median 9.218ms, worst 10.173ms, budget 150ms
perf: GET /api/v1/notifications: median 1.764ms, worst 1.834ms, budget 150ms
perf: GET /api/v1/onboarding: median 403µs, worst 430µs, budget 150ms
perf: GET /api/v1/people: median 433µs, worst 482µs, budget 150ms
perf: GET /api/v1/playbooks: median 590µs, worst 614µs, budget 150ms
perf: GET /api/v1/playbooks/{id}: median 518µs, worst 573µs, budget 150ms
perf: GET /api/v1/playbooks/{id}/template-diff: median 833µs, worst 897µs, budget 150ms
perf: GET /api/v1/preferences: median 749µs, worst 837µs, budget 150ms
perf: GET /api/v1/projects/{id}: median 454µs, worst 492µs, budget 150ms
perf: GET /api/v1/projects/{id}/settings: median 570µs, worst 607µs, budget 150ms
perf: GET /api/v1/roster: median 453µs, worst 495µs, budget 150ms
perf: GET /api/v1/runners/{id}: median 425µs, worst 463µs, budget 150ms
perf: GET /api/v1/specialists: median 8.011ms, worst 8.901ms, budget 150ms
perf: GET /api/v1/specialists/{id}: median 7.806ms, worst 8.099ms, budget 150ms
perf: GET /api/v1/specialists/{id}/template-diff: median 815µs, worst 861µs, budget 150ms
perf: GET /api/v1/tasks/{id}/plan: median 1.094ms, worst 1.132ms, budget 150ms
perf: GET /api/v1/tasks/{id}/thread: median 707µs, worst 735µs, budget 150ms
perf: GET /api/v1/teams: median 419µs, worst 478µs, budget 150ms
perf: GET /api/v1/templates: median 591µs, worst 636µs, budget 150ms
perf: GET /api/v1/templates/{id}: median 438µs, worst 468µs, budget 150ms
perf: GET /auth/callback: median 78µs, worst 113µs, budget 150ms
perf: GET /auth/devices/{id}: median 3.245ms, worst 3.397ms, budget 150ms
perf: GET /auth/verify: median 88µs, worst 125µs, budget 150ms
perf: GET /connections: median 3.668ms, worst 3.802ms, budget 150ms
perf: GET /conversation: median 7.478ms, worst 7.71ms, budget 150ms
perf: GET /conversation/connections: median 243µs, worst 253µs, budget 150ms
perf: GET /conversation/notebook: median 251µs, worst 294µs, budget 150ms
perf: GET /conversation/settings: median 4.089ms, worst 4.569ms, budget 150ms
perf: GET /conversation/settings/autonomy: median 3.651ms, worst 5.071ms, budget 150ms
perf: GET /conversation/settings/connections: median 6.125ms, worst 6.478ms, budget 150ms
perf: GET /conversation/settings/connections/add: median 6.304ms, worst 6.584ms, budget 150ms
perf: GET /conversation/settings/copy: median 3.529ms, worst 3.806ms, budget 150ms
perf: GET /conversation/settings/housekeeping: median 4.006ms, worst 4.199ms, budget 150ms
perf: GET /conversation/settings/machines: median 4.311ms, worst 4.877ms, budget 150ms
perf: GET /conversation/settings/machines/add: median 4.178ms, worst 4.458ms, budget 150ms
perf: GET /conversation/settings/notebook: median 3.216ms, worst 3.348ms, budget 150ms
perf: GET /conversation/settings/thinking: median 3.947ms, worst 4.337ms, budget 150ms
perf: GET /housekeeping: median 3.767ms, worst 4.08ms, budget 150ms
perf: GET /invites/new: median 628µs, worst 701µs, budget 150ms
perf: GET /invites/{id}: median 628µs, worst 641µs, budget 150ms
perf: GET /jobs: median 3.287ms, worst 3.344ms, budget 150ms
perf: GET /jobs/{id}: median 4.433ms, worst 4.754ms, budget 150ms
perf: GET /journey: median 10.374ms, worst 10.74ms, budget 150ms
perf: GET /nav/rail: median 2.776ms, worst 3.167ms, budget 150ms
perf: GET /needs-you: median 9.835ms, worst 9.928ms, budget 150ms
perf: GET /onboarding: median 3.773ms, worst 4.001ms, budget 150ms
perf: GET /people: median 3.289ms, worst 3.41ms, budget 150ms
perf: GET /playbook-suggestions/{suggestion}: median 4.59ms, worst 7.194ms, budget 150ms
perf: GET /playbooks: median 4.132ms, worst 4.207ms, budget 150ms
perf: GET /playbooks/new: median 4.301ms, worst 4.494ms, budget 150ms
perf: GET /playbooks/{id}: median 4.744ms, worst 4.911ms, budget 150ms
perf: GET /playbooks/{id}/edit: median 4.672ms, worst 4.908ms, budget 150ms
perf: GET /playbooks/{id}/template-diff: median 3.857ms, worst 4.209ms, budget 150ms
perf: GET /preferences: median 4.153ms, worst 4.175ms, budget 150ms
perf: GET /preferences/sources/{source}: median 3.91ms, worst 3.997ms, budget 150ms
perf: GET /projects: median 5.067ms, worst 5.222ms, budget 150ms
perf: GET /projects/accounts: median 3.485ms, worst 3.724ms, budget 150ms
perf: GET /projects/new: median 3.556ms, worst 3.861ms, budget 150ms
perf: GET /projects/{id}: median 10.686ms, worst 11.062ms, budget 150ms
perf: GET /projects/{id}/edit: median 3.98ms, worst 4.202ms, budget 150ms
perf: GET /runners/enrol: median 4.225ms, worst 4.339ms, budget 150ms
perf: GET /settings: median 3.295ms, worst 3.435ms, budget 150ms
perf: GET /settings/coordinator: median 5.382ms, worst 5.496ms, budget 150ms
perf: GET /settings/devices: median 3.137ms, worst 3.227ms, budget 150ms
perf: GET /settings/recovery: median 3.355ms, worst 3.46ms, budget 150ms
perf: GET /settings/recovery/release: median 3.319ms, worst 3.406ms, budget 150ms
perf: GET /settings/thinking: median 247µs, worst 279µs, budget 150ms
perf: GET /signin: median 313µs, worst 357µs, budget 150ms
perf: GET /specialists/new: median 3.226ms, worst 3.289ms, budget 150ms
perf: GET /specialists/{key}: median 13.244ms, worst 15.711ms, budget 150ms
perf: GET /specialists/{key}/edit: median 3.848ms, worst 4.159ms, budget 150ms
perf: GET /specialists/{key}/template-diff: median 4.034ms, worst 4.164ms, budget 150ms
perf: GET /tasks: median 5.621ms, worst 5.842ms, budget 150ms
perf: GET /tasks/new: median 3.388ms, worst 3.431ms, budget 150ms
perf: GET /tasks/{id}: median 6.031ms, worst 6.084ms, budget 150ms
perf: GET /tasks/{id}/merge: median 5.401ms, worst 5.517ms, budget 150ms
perf: GET /tasks/{id}/move: median 4.988ms, worst 5.261ms, budget 150ms
perf: GET /tasks/{id}/plan: median 6.01ms, worst 6.251ms, budget 150ms
perf: GET /tasks/{id}/preview: median 1.545ms, worst 1.652ms, budget 150ms
perf: GET /tasks/{id}/questions/{question}: median 5.357ms, worst 6.711ms, budget 150ms
perf: GET /tasks/{id}/rendered-change: median 4.736ms, worst 5.441ms, budget 150ms
perf: GET /tasks/{id}/rendered-change/{hash}.png: median 4.101ms, worst 4.207ms, budget 150ms
perf: GET /tasks/{id}/thread: median 7.793ms, worst 7.918ms, budget 150ms
perf: GET /team/{specialist}: median 4.313ms, worst 4.647ms, budget 150ms
perf: GET /teams: median 11.737ms, worst 12.046ms, budget 150ms
perf: GET /templates: median 3.657ms, worst 3.731ms, budget 150ms
perf: GET /usage: median 4.334ms, worst 4.558ms, budget 150ms
perf: GET /work: median 3.221ms, worst 3.331ms, budget 150ms
perf: cold boot: median 256ms of [254.31929ms 256.370763ms 260.666163ms], budget 500ms

receipt: test step 40.838s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 83 without tests, 0 failed
receipt: slow package 8.904s amadan.net/oficina/equipo/internal/equipotest
receipt: slow package 0s amadan.net/oficina/equipo/cmd/equipo-runner
receipt: slow package 0s amadan.net/oficina/equipo/cmd/equipo-tool-proxy
receipt: slow package 0s amadan.net/oficina/equipo/internal/advice
receipt: slow package 0s amadan.net/oficina/equipo/internal/attach
receipt: slow test 8.08s amadan.net/oficina/equipo/internal/equipotest TestPerfScreens
receipt: slow test 820ms amadan.net/oficina/equipo/internal/equipotest TestPerfBoot
=== cache ===
ci-box: build cache /home/ci/work/repos/oficina__equipo/cache/go-build: 4.52 GiB in 25029 files
ci-box: module cache /home/ci/work/repos/oficina__equipo/cache/go-mod: 0.84 GiB in 27329 files
ci-box: build cache over 4.0 GiB: dropped 1.94 GiB this job did not read, kept 2.58 GiB
diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt
index 50085f19..b5b0f186 100644
--- a/.rastrillo/budgets.txt
+++ b/.rastrillo/budgets.txt
@@ -56,7 +56,7 @@ perf GET /api/v1/tasks/{id} skip Thin v1 person API: bearer-only JSON for device
perf GET /api/v1/assistant/snapshot skip Assistant person API: bearer-only JSON for Base's chat, not a browser screen.
perf GET /api/v1/assistant/messages skip Assistant person API: bearer-only JSON for Base's chat, not a browser screen.
perf GET /api/v1/assistant/events skip Assistant event stream (Server-Sent Events), bearer-only and long-lived; not a screen.
-size internal/equipo/chat 31167 - Fable follow-up: base and diagnostic gates, preview isolation and provenance guards; measured 31167/6180 source/test lines.
+size internal/equipo/chat 31301 - Fable follow-up: base and diagnostic gates, preview isolation and provenance guards; measured 31167/6180 source/test lines.
perf GET /api/v1/questions/{id} skip Thin v1 person API: bearer-only JSON for devices; the browser reads questions on /tasks/{id}.
perf GET /api/v1/steps/{id}/log skip Thin v1 person API: bearer-only JSON for devices; the browser shows the log tail on /tasks/{id}.
perf GET /api/v1/connections/preference skip Connections slice 1 person API: bearer-only JSON for devices; the browser shows the preference on /conversation/connections.
@@ -71,7 +71,7 @@ perf GET /tasks/{id}/files/{file} skip Research kept images: the bytes of one im
perf GET /api/v1/runners skip Mac runners person API: bearer-only JSON for devices; the browser shows runners in the Team section.
time cmd/equipo-runner 60s TestReleaseRunnerHasNoFakeWorker builds the release runner and the thin package under testbuild (about 12s locally).
size internal/headless - 11319 Fable follow-up: base and diagnostic gates, preview isolation and provenance guards; live staging witnesses; measured 0/11319 source/test lines (live first-stage check).
-size internal/thintest - 32338 Fable follow-up: base and diagnostic gates, preview isolation and provenance guards; empty conversation page and browser checks; measured 1515/32338 source/test lines.
+size internal/thintest - 32620 Fable follow-up: base and diagnostic gates, preview isolation and provenance guards; empty conversation page and browser checks; measured 1515/32338 source/test lines.
perf GET /api/v1/projects/{id}/merge-policy skip Merge authority person API: bearer-only JSON for devices; the browser reads the policy on /projects/{id}.
perf GET /api/v1/usage skip Thin v1 person API: bearer-only JSON for devices; the browser reads usage through /usage.
diff --git a/internal/equipo/chat/handoff.go b/internal/equipo/chat/handoff.go
index f5b4799c..92b147c2 100644
--- a/internal/equipo/chat/handoff.go
+++ b/internal/equipo/chat/handoff.go
@@ -328,8 +328,9 @@ func (t *txn) liveCall(call toolCallRecord) (turnRecord, error) {
}
// quote is words as the person wrote them in one of the turn's
-// messages: found there compared lower-cased with each run of
-// whitespace as one space, at least minQuote characters. Only a turn
+// messages, or one it carried from a turn that failed before the model
+// saw it (carriedRecord): found there compared lower-cased with each run
+// of whitespace as one space, at least minQuote characters. Only a turn
// the person started has their words (a team_update turn has none).
func (t *txn) quote(r turnRecord, words string) (string, error) {
refuse := assist.Failure{Code: "not_their_words"}
@@ -342,7 +343,12 @@ func (t *txn) quote(r turnRecord, words string) (string, error) {
if err := t.db.Model(&messageRecord{}).Where("turn_id = ? AND person = ? AND role = ?", r.ID, r.Person, wire.RolePerson).Order("seq").Pluck("text", &texts).Error; err != nil {
return "", err
}
- for _, text := range texts {
+ // Exactly the messages dispatch carried: the person's own, in the lane.
+ var carried []string
+ if err := t.db.Model(&messageRecord{}).Where("person = ? AND role = ? AND origin = ? AND coalesce(lane, '') = ? AND id IN (SELECT message_id FROM chat_turn_carried WHERE turn_id = ? AND person = ?)", r.Person, wire.RolePerson, originComposer, r.Lane, r.ID, r.Person).Order("seq").Pluck("text", &carried).Error; err != nil {
+ return "", err
+ }
+ for _, text := range append(texts, carried...) {
if found, ok := quoteIn(text, w); ok {
return found, nil
}
diff --git a/internal/equipo/chat/models.go b/internal/equipo/chat/models.go
index b042c325..0107066e 100644
--- a/internal/equipo/chat/models.go
+++ b/internal/equipo/chat/models.go
@@ -7,7 +7,7 @@ package chat
import "time"
// Models are the tables this package owns, for the migration check.
-var Models = []any{&cardVisibility{}, &cardThreadRecord{}, &copyAttemptRecord{}, &copyReviewRecord{}, &copyFeedbackRecord{}, &turnRecord{}, &messageRecord{}, &eventRecord{}, &commandRecord{}, &inboxRecord{}, &runnerSessionRecord{}, &projectRecord{}, &cardRecord{}, &toolCallRecord{}, &settingRecord{}, &coordinatorRecord{}, &notebookRecord{}, &taskRecord{}, &stepRecord{}, &entryRecord{}, &attachmentRecord{}, &starRecord{}, &questionRecord{}, &connectionRecord{}, &usageRecord{}, &distinctRecord{}, &hkRecord{}, &hkFailureRecord{}, &hkSettingsRecord{}, &fileRecord{}, &fileDataRecord{}, &transferRecord{}, &mergePolicyRecord{}, &mergeAuditRecord{}, &specialistRecord{}, &grantRecord{}, &specialistAuditRecord{}, &researchSourceRecord{}, &researchAddressRecord{}, &researchPrefixRecord{}, &researchInventoryRecord{}, &researchRecord{}, &researchFetchRecord{}, &taskFileRecord{}, &taskFileDataRecord{}, &releaseRecord{}, &adviceRecord{}, &assistantHostRecord{}, &handoffRecord{}, &handoffTurnRecord{}, &handoffTaskRecord{}, &handoffActionRecord{}, &connectTurnRecord{}}
+var Models = []any{&cardVisibility{}, &cardThreadRecord{}, &copyAttemptRecord{}, &copyReviewRecord{}, &copyFeedbackRecord{}, &turnRecord{}, &messageRecord{}, &eventRecord{}, &commandRecord{}, &inboxRecord{}, &runnerSessionRecord{}, &projectRecord{}, &cardRecord{}, &toolCallRecord{}, &settingRecord{}, &coordinatorRecord{}, &notebookRecord{}, &taskRecord{}, &stepRecord{}, &entryRecord{}, &attachmentRecord{}, &starRecord{}, &questionRecord{}, &connectionRecord{}, &usageRecord{}, &distinctRecord{}, &hkRecord{}, &hkFailureRecord{}, &hkSettingsRecord{}, &fileRecord{}, &fileDataRecord{}, &transferRecord{}, &mergePolicyRecord{}, &mergeAuditRecord{}, &specialistRecord{}, &grantRecord{}, &specialistAuditRecord{}, &researchSourceRecord{}, &researchAddressRecord{}, &researchPrefixRecord{}, &researchInventoryRecord{}, &researchRecord{}, &researchFetchRecord{}, &taskFileRecord{}, &taskFileDataRecord{}, &releaseRecord{}, &adviceRecord{}, &assistantHostRecord{}, &handoffRecord{}, &handoffTurnRecord{}, &handoffTaskRecord{}, &handoffActionRecord{}, &connectTurnRecord{}, &carriedRecord{}}
type turnRecord struct {
CreateRepo string
@@ -40,6 +40,16 @@ type turnRecord struct {
func (turnRecord) TableName() string { return "chat_turns" }
+// carriedRecord is one person's message a turn carried, unanswered, from
+// a turn that failed before it (dispatch, unanswered).
+type carriedRecord struct {
+ TurnID string `gorm:"primaryKey"`
+ MessageID string `gorm:"primaryKey"`
+ Person string
+}
+
+func (carriedRecord) TableName() string { return "chat_turn_carried" }
+
// messageRecord's integer key is the SQLite rowid, so the person index
// orders by it. Coordinator replies use the key "reply:<turn>". A key is
// unique per person and lane.
diff --git a/internal/equipo/chat/store.go b/internal/equipo/chat/store.go
index f81fe642..069283fd 100644
--- a/internal/equipo/chat/store.go
+++ b/internal/equipo/chat/store.go
@@ -7,7 +7,9 @@ import (
"encoding/hex"
"encoding/json"
"errors"
+ "fmt"
"log/slog"
+ "slices"
"strconv"
"strings"
"sync"
@@ -322,9 +324,25 @@ func (t *txn) dispatch(r *turnRecord) error {
if err := t.db.Where("person = ? AND coalesce(lane, '') = ? AND turn_id <> ? AND turn_id NOT IN (SELECT id FROM chat_turns WHERE person = ? AND dispatched = ? AND state = ?)", r.Person, r.Lane, r.ID, r.Person, false, wire.TurnQueued).Order("seq DESC").Limit(wire.MaxTailMessages).Find(&prior).Error; err != nil {
return err
}
+ // The person's words in turns that failed before the model ran never
+ // reached the coordinator: they ride in this turn's frame, marked
+ // unanswered, and not in the tail as if answered.
+ var carried []messageRecord
+ if r.Kind == wire.TurnPerson {
+ var err error
+ if carried, err = t.unanswered(r); err != nil {
+ return err
+ }
+ }
+ inFrame := map[string]bool{}
+ for _, m := range carried {
+ inFrame[m.ID] = true
+ }
tail := make([]wire.TailMessage, 0, len(prior))
for i := len(prior) - 1; i >= 0; i-- {
- tail = append(tail, wire.TailMessage{Role: prior[i].Role, Text: prior[i].Text})
+ if !inFrame[prior[i].ID] {
+ tail = append(tail, wire.TailMessage{Role: prior[i].Role, Text: prior[i].Text})
+ }
}
texts := make([]string, 0, len(mine))
own := make([]string, 0, len(mine))
@@ -370,18 +388,111 @@ func (t *txn) dispatch(r *turnRecord) error {
text += "\n\n" + block
}
}
- cmd := wire.MessageCommand{Person: r.Person, TurnID: r.ID, Attempt: r.Attempt, Kind: r.Kind, Text: text, PersonText: own, Tail: tail, Attachments: files, Lane: r.Lane}
+ cmd := wire.MessageCommand{Person: r.Person, TurnID: r.ID, Attempt: r.Attempt, Kind: r.Kind, Attachments: files, Lane: r.Lane}
if wire.CoordinatorRole(r.Lane) {
if cmd.PlacementNotes, err = t.placementNotes(r.Person); err != nil {
return err
}
}
- if cmd.Tail, err = fitTail(cmd); err != nil {
- return err
+ // The tail gives way first, then the oldest unanswered message: a
+ // runner refuses a frame too big, every time it is resent.
+ for {
+ words := make([]string, 0, len(carried)+len(own))
+ for _, m := range carried {
+ words = append(words, m.Text)
+ }
+ cmd.Text, cmd.PersonText, cmd.Tail = withUnanswered(carried, text), append(words, own...), tail
+ if cmd.Tail, err = fitTail(cmd); err != nil {
+ return err
+ }
+ raw, err := json.Marshal(cmd)
+ if err != nil {
+ return err
+ }
+ if len(raw) <= frameRoom || len(carried) == 0 {
+ break
+ }
+ carried = carried[1:]
+ }
+ // In this turn the carried words are the person's too (quote).
+ for _, m := range carried {
+ if err := t.db.Create(&carriedRecord{TurnID: r.ID, MessageID: m.ID, Person: r.Person}).Error; err != nil {
+ return err
+ }
}
return t.command(r.Person, wire.FrameMessage, cmd)
}
+// A turn carries the person's words from at most maxCarriedTurns failed
+// turns, and at most maxUnanswered messages: words that rode in two turns
+// that failed too may be what makes them fail, so they stop riding.
+const (
+ maxCarriedTurns = 2
+ maxUnanswered = 10
+)
+
+// reachedModel is SQL true when the chat_turns row reached the model: a
+// delta or an activity was recorded for it, or a tool call, or usage.
+// Events are kept a day (wire.EventRetention), longer than a session
+// resumes (the same UTC day); tool calls and usage are kept.
+const reachedModel = "(EXISTS (SELECT 1 FROM chat_tool_calls c WHERE c.turn_id = chat_turns.id) OR EXISTS (SELECT 1 FROM chat_usage u WHERE u.turn_id = chat_turns.id) OR EXISTS (SELECT 1 FROM chat_events e WHERE e.person = chat_turns.person AND e.type IN ('" + wire.EventDelta + "', '" + wire.EventActivity + "') AND e.body LIKE '%\"turn_id\":\"' || chat_turns.id || '\"%'))"
+
+// unanswered is the person's plain messages (composer words, not a card's
+// answer or reply, which reach the model with their card) in the lane's
+// failed person turns since the last that reached the model (answered,
+// or ended after it began), the newest maxCarriedTurns of them, oldest
+// first. So each failed before the model ran: its words are in no
+// transcript, and the tail showed them as if answered. A turn that
+// reached the model bounds them, its own words and those it carried: a
+// resumed session's transcript may hold them. A cancelled turn's are not
+// carried: the person stopped it.
+func (t *txn) unanswered(r *turnRecord) ([]messageRecord, error) {
+ turns := "SELECT id FROM chat_turns WHERE person = ? AND coalesce(lane, '') = ? AND coalesce(kind, '') = '' AND "
+ var last int64
+ if err := t.db.Model(&messageRecord{}).Select("coalesce(max(seq), 0)").Where("person = ? AND coalesce(lane, '') = ? AND role = ? AND turn_id IN ("+turns+"(state = ? OR state IN ? AND "+reachedModel+"))", r.Person, r.Lane, wire.RolePerson, r.Person, r.Lane, wire.TurnReplied, []string{wire.TurnFailed, wire.TurnCancelled}).Scan(&last).Error; err != nil {
+ return nil, err
+ }
+ var rows []messageRecord
+ if err := t.db.Where("person = ? AND coalesce(lane, '') = ? AND role = ? AND seq > ? AND turn_id <> ? AND turn_id IN ("+turns+"state = ?)", r.Person, r.Lane, wire.RolePerson, last, r.ID, r.Person, r.Lane, wire.TurnFailed).Order("seq DESC").Limit(wire.MaxTailMessages).Find(&rows).Error; err != nil {
+ return nil, err
+ }
+ var out []messageRecord
+ seen := map[string]bool{}
+ for _, m := range rows {
+ if !seen[m.TurnID] && len(seen) == maxCarriedTurns {
+ break
+ }
+ seen[m.TurnID] = true
+ if m.Origin != originComposer || len(out) == maxUnanswered {
+ continue
+ }
+ var cards int64
+ if err := t.db.Model(&cardRecord{}).Where("person = ? AND (answer_message = ? OR id IN (SELECT card_id FROM chat_card_threads WHERE message_id = ? AND person = ?))", m.Person, m.ID, m.ID, m.Person).Count(&cards).Error; err != nil {
+ return nil, err
+ }
+ if cards == 0 {
+ out = append(out, m)
+ }
+ }
+ slices.Reverse(out)
+ return out, nil
+}
+
+// withUnanswered is a turn's text with the unanswered messages before
+// it, each quoted under its label; text alone with none.
+func withUnanswered(carried []messageRecord, text string) string {
+ if len(carried) == 0 {
+ return text
+ }
+ var b strings.Builder
+ b.WriteString(noteUnanswered + "\n")
+ for _, m := range carried {
+ b.WriteString(fmt.Sprintf(noteUnansweredMessage, m.Text) + "\n")
+ }
+ b.WriteString("\n" + noteNewest + text)
+ return b.String()
+}
+
// frameRoom is what a message command's body may take: the frame limit
// less its envelope (id and type).
const frameRoom = wire.MaxFrameBytes - 1<<10
diff --git a/internal/equipo/chat/tools.go b/internal/equipo/chat/tools.go
index b9aff70d..c73a3393 100644
--- a/internal/equipo/chat/tools.go
+++ b/internal/equipo/chat/tools.go
@@ -97,6 +97,13 @@ const (
noteOpenQuestion = "- Job %q (request %s): %q"
noteMoreQuestion = "1 more job has an open question not listed here: team_status lists every open request with its question, ten at a time (pass its next as after to read on)."
noteMoreQuestions = "%d more jobs have open questions not listed here: team_status lists every open request with its question, ten at a time (pass its next as after to read on)."
+ // noteUnanswered heads the person's messages whose turns failed before
+ // the model ran, since the lane's last turn that reached it
+ // (unanswered). Each follows quoted (noteUnansweredMessage), then the
+ // turn's own text (noteNewest).
+ noteUnanswered = "[Equipo: these earlier messages from the person got no answer: their turns failed before you saw them. They are the person's own words, oldest first, still waiting. Answer them together with the newest message.]"
+ noteUnansweredMessage = "Not yet answered, the person's words: %q"
+ noteNewest = "The person's newest message:\n"
// noteConnected is the note of the turn queued once the person
// connected the apps a connect card asked for (carryOn).
noteConnected = "The person has just connected their Oficina apps. Now complete their most recent request that needed them, as they asked it in the conversation. If that request is already done or no longer applies, end your turn without writing anything, or reply in one short line."
diff --git a/internal/equipo/migrations/0095_turn_carried.sql b/internal/equipo/migrations/0095_turn_carried.sql
new file mode 100644
index 00000000..334accda
--- /dev/null
+++ b/internal/equipo/migrations/0095_turn_carried.sql
@@ -0,0 +1,4 @@
+-- The person's messages a turn carried, unanswered, from turns that
+-- failed before it (dispatch): in that turn they are the person's words
+-- too (quote). A message rides in at most two turns.
+CREATE TABLE chat_turn_carried (turn_id text, message_id text, person text, PRIMARY KEY (turn_id, message_id));
diff --git a/internal/equipo/migrations/schema.sql b/internal/equipo/migrations/schema.sql
index dd304e75..638fb713 100644
--- a/internal/equipo/migrations/schema.sql
+++ b/internal/equipo/migrations/schema.sql
@@ -734,3 +734,5 @@ WHERE CASE WHEN json_valid(entries) THEN json_type(entries) = 'array' ELSE 0 END
AND EXISTS (SELECT 1 FROM json_each(chat_notebooks.entries) WHERE json_extract(value, '$.source') = 'person');
ALTER TABLE chat_steps ADD COLUMN base_checks text;
+
+CREATE TABLE chat_turn_carried (turn_id text, message_id text, person text, PRIMARY KEY (turn_id, message_id));
diff --git a/internal/fakeclaude/fake.go b/internal/fakeclaude/fake.go
index b3bc7958..231be71e 100644
--- a/internal/fakeclaude/fake.go
+++ b/internal/fakeclaude/fake.go
@@ -1006,6 +1006,10 @@ func (f *fake) serve(stdin io.Reader, stdout, stderr io.Writer) int {
if _, after, ok := strings.Cut(prompt, "Newest message:\n"); ok {
newest = after
}
+ // Words a failed turn left unanswered ride before it, as context.
+ if _, after, ok := strings.Cut(newest, "The person's newest message:\n"); ok {
+ newest = after
+ }
// A move-in or explore turn has no person message to steer by.
steps, intro, settle := settling(prompt)
if settle {
diff --git a/internal/fakecodex/fake.go b/internal/fakecodex/fake.go
index 7ffa2749..5c56412c 100644
--- a/internal/fakecodex/fake.go
+++ b/internal/fakecodex/fake.go
@@ -411,6 +411,10 @@ func (s *server) runTurn(thread, turn, prompt string, stop chan struct{}) {
if _, after, ok := strings.Cut(prompt, "Newest message:\n"); ok {
newest = after
}
+ // Words a failed turn left unanswered ride before it, as context.
+ if _, after, ok := strings.Cut(newest, "The person's newest message:\n"); ok {
+ newest = after
+ }
done := func(status string, turnErr any) {
s.notify("turn/completed", map[string]any{"threadId": thread, "turn": map[string]any{"id": turn, "status": status, "items": []any{}, "error": turnErr}})
}
diff --git a/internal/thintest/batching_contract_test.go b/internal/thintest/batching_contract_test.go
index ef5e7a36..3d6849fd 100644
--- a/internal/thintest/batching_contract_test.go
+++ b/internal/thintest/batching_contract_test.go
@@ -3,6 +3,7 @@ package thintest
import (
"context"
"fmt"
+ "strconv"
"strings"
"testing"
"time"
@@ -71,6 +72,14 @@ func (r *rig) turnIs(id, state string) wire.Turn {
// batchFrame expects the next message frame to be the batch: the three
// messages apart and in order, and nothing else.
func (r *rig) batchFrame(runner *FakeRunner, batch string, texts ...string) wire.Frame {
+ r.t.Helper()
+ return r.batchFrameCarrying(runner, batch, nil, texts...)
+}
+
+// batchFrameCarrying is batchFrame for a batch after failed turns: their
+// person's words (carried) come first in PersonText, marked unanswered
+// in Text before the batch.
+func (r *rig) batchFrameCarrying(runner *FakeRunner, batch string, carried []string, texts ...string) wire.Frame {
r.t.Helper()
ctx, cancel := context.WithTimeout(r.ctx, 10*time.Second)
defer cancel()
@@ -79,13 +88,20 @@ func (r *rig) batchFrame(runner *FakeRunner, batch string, texts ...string) wire
r.t.Fatalf("no next turn: %v", err)
}
cmd := body.(*wire.MessageCommand)
- if cmd.TurnID != batch || len(cmd.PersonText) != len(texts) {
+ if cmd.TurnID != batch || len(cmd.PersonText) != len(carried)+len(texts) {
r.t.Fatalf("next turn %s carries %q, not the batch %s", cmd.TurnID, cmd.PersonText, batch)
}
at := -1
+ for i, text := range carried {
+ n := strings.Index(cmd.Text, "Not yet answered, the person's words: "+strconv.Quote(text))
+ if n <= at || cmd.PersonText[i] != text {
+ r.t.Fatalf("batch lacks unanswered %q in place:\n%s", text, cmd.Text)
+ }
+ at = n
+ }
for i, text := range texts {
n := strings.Index(cmd.Text, "Message "+string(rune('1'+i))+" of "+string(rune('0'+len(texts)))+":\n"+text)
- if n <= at || cmd.PersonText[i] != text {
+ if n <= at || cmd.PersonText[len(carried)+i] != text {
r.t.Fatalf("batch lacks %q in place:\n%s", text, cmd.Text)
}
at = n
@@ -192,7 +208,7 @@ func TestBatchStrandedRecovers(t *testing.T) {
r.inst.Restart(t)
again := r.dial(runner.Welcome.Generation)
again.Send(r.ctx, "s1", wire.FrameSync, wire.Sync{Sessions: []wire.SessionState{}, Runs: []wire.Run{}})
- f := r.batchFrame(again, batch, "alpha", "bravo", "charlie")
+ f := r.batchFrameCarrying(again, batch, []string{"one"}, "alpha", "bravo", "charlie")
again.Send(r.ctx, "s2", wire.FrameSync, wire.Sync{Sessions: []wire.SessionState{}, Runs: []wire.Run{}})
again.Send(r.ctx, "ab", wire.FrameAck, wire.Ack{ID: f.ID})
r.turnIs(batch, wire.TurnRunning)
@@ -200,8 +216,9 @@ func TestBatchStrandedRecovers(t *testing.T) {
}
// However the running turn ends (failed, cancelled, or lost across a
-// runner reconnect), the batch goes next, once, and the failed turn's own
-// message is not answered again inside it.
+// runner reconnect), the batch goes next, once, and the ended turn keeps
+// its own message. A failed turn's words ride before the batch, marked
+// unanswered; a cancelled turn's do not (the person stopped it).
func TestBatchAfterTurnEnds(t *testing.T) {
for _, end := range []string{"failed", "cancelled", "interrupted"} {
t.Run(end, func(t *testing.T) {
@@ -226,7 +243,11 @@ func TestBatchAfterTurnEnds(t *testing.T) {
runner = r.dial(0)
runner.Send(r.ctx, "e1", wire.FrameSync, wire.Sync{Sessions: []wire.SessionState{}, Runs: []wire.Run{}})
}
- r.batchFrame(runner, batch, "alpha", "bravo", "charlie")
+ var carried []string
+ if end != "cancelled" {
+ carried = []string{"one"}
+ }
+ r.batchFrameCarrying(runner, batch, carried, "alpha", "bravo", "charlie")
if st, _ := r.client.Turn(r.ctx, busy.Turn.ID); !wire.Terminal(st.State) || len(st.MessageIDs) != 1 {
t.Fatalf("ended turn %+v", st)
}
diff --git a/internal/thintest/carried_contract_test.go b/internal/thintest/carried_contract_test.go
new file mode 100644
index 00000000..e0aa0c81
--- /dev/null
+++ b/internal/thintest/carried_contract_test.go
@@ -0,0 +1,138 @@
+package thintest
+
+import (
+ "slices"
+ "strings"
+ "testing"
+ "time"
+
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// Words a failed turn carries into the next (dispatch's unanswered):
+// only a plain message the coordinator never saw, and in the turn that
+// carries them they are the person's words for team_request too.
+
+// failTurn reports id failed at attempt 1 and waits for it to end.
+func (r *rig) failTurn(runner *FakeRunner, id string) {
+ r.t.Helper()
+ if err := runner.Send(r.ctx, "e-"+id, wire.FrameTurn, wire.TurnReport{TurnID: id, Attempt: 1, State: wire.TurnFailed, Reason: "policy_rejected"}); err != nil {
+ r.t.Fatal(err)
+ }
+ for deadline := time.Now().Add(10 * time.Second); time.Now().Before(deadline); time.Sleep(20 * time.Millisecond) {
+ var state string
+ if err := r.inst.DB.Writer().QueryRow("SELECT state FROM chat_turns WHERE id = ?", id).Scan(&state); err == nil && state == wire.TurnFailed {
+ return
+ }
+ }
+ r.t.Fatalf("turn %s did not fail", id)
+}
+
+// A turn that reached the model (a delta or a thinking or tool activity
+// was recorded for it) is not carried: its words may already be in a
+// resumed session's transcript. One that failed before is.
+func TestContractCarriedOnlyBeforeTheModel(t *testing.T) {
+ r := newRig(t)
+ runner := r.dial(0)
+ turn := func(text, key string) (wire.Sent, *wire.MessageCommand) {
+ t.Helper()
+ sent, err := r.client.Send(r.ctx, text, key)
+ if err != nil {
+ t.Fatal(err)
+ }
+ f, body, err := runner.Expect(r.ctx, wire.FrameMessage)
+ if err != nil {
+ t.Fatal(err)
+ }
+ runner.Send(r.ctx, "a-"+key, wire.FrameAck, wire.Ack{ID: f.ID})
+ r.wait("running", func(c *Conversation) bool { return c.Turns[sent.Turn.ID].State == wire.TurnRunning })
+ return sent, body.(*wire.MessageCommand)
+ }
+ // Frames apply in order: each report lands before the failure after it.
+ streamed, _ := turn("streamed words", "k1")
+ runner.Send(r.ctx, "d1", wire.FrameDelta, wire.DeltaReport{TurnID: streamed.Turn.ID, Attempt: 1, Text: "Looking"})
+ r.failTurn(runner, streamed.Turn.ID)
+ thought, cmd := turn("thought words", "k2")
+ if slices.Contains(cmd.PersonText, "streamed words") {
+ t.Fatalf("a turn that streamed was carried %q", cmd.PersonText)
+ }
+ runner.Send(r.ctx, "t2", wire.FrameActivity, wire.ActivityReport{TurnID: thought.Turn.ID, Attempt: 1, Kind: wire.ActivityThink})
+ r.failTurn(runner, thought.Turn.ID)
+ early, cmd := turn("early words", "k3")
+ if len(cmd.PersonText) != 1 || strings.Contains(cmd.Text, "Not yet answered") {
+ t.Fatalf("a turn that reached the model was carried %q", cmd.PersonText)
+ }
+ r.failTurn(runner, early.Turn.ID)
+ last, cmd := turn("last", "k4")
+ if strings.Join(cmd.PersonText, "|") != "early words|last" {
+ t.Fatalf("a turn that failed before the model was not carried %q", cmd.PersonText)
+ }
+ // The turn that carried them reached the model: they are in its
+ // transcript now, and ride no further.
+ runner.Send(r.ctx, "d4", wire.FrameDelta, wire.DeltaReport{TurnID: last.Turn.ID, Attempt: 1, Text: "On it"})
+ r.failTurn(runner, last.Turn.ID)
+ if _, cmd = turn("final", "k5"); len(cmd.PersonText) != 1 {
+ t.Fatalf("carried past a turn that reached the model %q", cmd.PersonText)
+ }
+}
+
+// A typed answer to a card is not carried as a plain message: bare,
+// "the second one" means nothing without the question it answers.
+func TestContractCarriedSkipsCardAnswers(t *testing.T) {
+ r := newToolRig(t)
+ if res := r.call("q1", wire.ToolAskPerson, map[string]any{"question": "Which one do you mean?"}); res.Code != "asked" {
+ t.Fatalf("ask_person %+v", res)
+ }
+ r.runner.Send(r.ctx, "rep1", wire.FrameReply, wire.Reply{TurnID: r.turn, Attempt: 1, Text: "Which day suits?"})
+ var card wire.Card
+ r.wait("question card", func(c *Conversation) bool {
+ for _, k := range c.Cards {
+ if k.Kind == wire.CardQuestion && k.State == wire.CardOpen {
+ card = k
+ return true
+ }
+ }
+ return false
+ })
+ answered, err := r.client.Answer(r.ctx, card.ID, "the second one", card.Revision)
+ if err != nil {
+ t.Fatal(err)
+ }
+ f, _, err := r.runner.Expect(r.ctx, wire.FrameMessage)
+ if err != nil {
+ t.Fatal(err)
+ }
+ r.runner.Send(r.ctx, "a-ans", wire.FrameAck, wire.Ack{ID: f.ID})
+ r.failTurn(r.runner, answered.Turn.ID)
+ if _, err = r.client.Send(r.ctx, "next", "k-next"); err != nil {
+ t.Fatal(err)
+ }
+ _, body, err := r.runner.Expect(r.ctx, wire.FrameMessage)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if cmd := body.(*wire.MessageCommand); len(cmd.PersonText) != 1 || strings.Contains(cmd.Text, "Not yet answered") {
+ t.Fatalf("a card answer was carried bare %q %q", cmd.PersonText, cmd.Text)
+ }
+}
+
+// Words a failed Assistant turn left unanswered ride in the next turn,
+// and there team_request takes them as the person's: the hand-off is
+// their message, as written. Words from no message of theirs still are
+// not theirs.
+func TestContractCarriedWordsHandOver(t *testing.T) {
+ o := newTeamRig(t)
+ lost := o.ask("Can we fix a bug in Tito? Login is broken")
+ o.failTurn(o.runner, lost)
+ o.ask("Please continue")
+ if res := o.use("tr-not", "team_request", map[string]any{"words": "The checkout page is broken"}); !res.IsError || res.Code != "not_their_words" {
+ t.Fatalf("words from no message %+v", res)
+ }
+ request, cmd := o.handoff("tr1", "Login is broken", "")
+ if !strings.HasPrefix(cmd.Text, "Login is broken") {
+ t.Fatalf("thread frame %q", cmd.Text)
+ }
+ if thread := o.thread(request); len(thread) != 1 || thread[0].Text != "Login is broken" || thread[0].Role != wire.RolePerson {
+ t.Fatalf("thread %+v", thread)
+ }
+}
diff --git a/internal/thintest/instance_contract_test.go b/internal/thintest/instance_contract_test.go
index a26ba7dc..ca6505c4 100644
--- a/internal/thintest/instance_contract_test.go
+++ b/internal/thintest/instance_contract_test.go
@@ -4,9 +4,11 @@ import (
"amadan.net/oficina/equipo/internal/equipo/chat"
"context"
"encoding/json"
+ "fmt"
"io"
"net/http"
"os"
+ "strconv"
"strings"
"testing"
"time"
@@ -248,6 +250,127 @@ func TestQueuedMessagesJoinOneTurn(t *testing.T) {
}
}
+// A person's message whose turn failed never reached the coordinator: a
+// resumed session's transcript lacks it and a fresh one's tail showed it
+// as if answered. The next turn carries it, quoted and labelled as not
+// yet answered, until a turn is answered, from the newest two failed
+// turns at most. A cancelled turn's is not carried: the person stopped it.
+func TestFailedTurnMessageCarried(t *testing.T) {
+ r := newRig(t)
+ runner := r.dial(0)
+ turn := func(text, key string) (wire.Sent, *wire.MessageCommand) {
+ t.Helper()
+ sent, err := r.client.Send(r.ctx, text, key)
+ if err != nil {
+ t.Fatal(err)
+ }
+ f, body, err := runner.Expect(r.ctx, wire.FrameMessage)
+ if err != nil {
+ t.Fatal(err)
+ }
+ runner.Send(r.ctx, "a-"+key, wire.FrameAck, wire.Ack{ID: f.ID})
+ return sent, body.(*wire.MessageCommand)
+ }
+ end := func(id, state string) {
+ t.Helper()
+ runner.Send(r.ctx, "e-"+id, wire.FrameTurn, wire.TurnReport{TurnID: id, Attempt: 1, State: state, Reason: "provider_failed"})
+ r.wait(state, func(c *Conversation) bool { return c.Turns[id].State == state })
+ }
+ first, _ := turn("one", "k1")
+ runner.Send(r.ctx, "rep1", wire.FrameReply, wire.Reply{TurnID: first.Turn.ID, Attempt: 1, Text: "first"})
+ r.wait("replied", func(c *Conversation) bool { return c.Turns[first.Turn.ID].State == wire.TurnReplied })
+
+ stopped, _ := turn("never mind", "k2")
+ end(stopped.Turn.ID, wire.TurnCancelled)
+ lost, _ := turn("the long message [with brackets]", "k3")
+ end(lost.Turn.ID, wire.TurnFailed)
+ again, _ := turn("second try", "k4")
+ end(again.Turn.ID, wire.TurnFailed)
+
+ next, cmd := turn("next", "k5")
+ want := "[Equipo: these earlier messages from the person got no answer: their turns failed before you saw them. They are the person's own words, oldest first, still waiting. Answer them together with the newest message.]\n" +
+ "Not yet answered, the person's words: \"the long message [with brackets]\"\n" +
+ "Not yet answered, the person's words: \"second try\"\n\n" +
+ "The person's newest message:\nnext"
+ if cmd.Text != want {
+ t.Fatalf("carried text %q", cmd.Text)
+ }
+ if strings.Join(cmd.PersonText, "|") != "the long message [with brackets]|second try|next" {
+ t.Fatalf("person text %q", cmd.PersonText)
+ }
+ for _, m := range cmd.Tail {
+ if m.Text == "the long message [with brackets]" || m.Text == "second try" {
+ t.Fatalf("carried message also in the tail: %+v", cmd.Tail)
+ }
+ }
+ if len(cmd.Tail) != 3 || cmd.Tail[2].Text != "never mind" {
+ t.Fatalf("tail %+v", cmd.Tail)
+ }
+
+ // Words that ride in two turns that fail too stop riding: they may be
+ // what makes them fail.
+ end(next.Turn.ID, wire.TurnFailed)
+ fourth, cmd := turn("fourth", "k6")
+ if strings.Join(cmd.PersonText, "|") != "second try|next|fourth" || strings.Contains(cmd.Text, "the long message") {
+ t.Fatalf("carried past its bound %q", cmd.PersonText)
+ }
+
+ // Once a turn is answered, nothing before it is carried again.
+ runner.Send(r.ctx, "rep6", wire.FrameReply, wire.Reply{TurnID: fourth.Turn.ID, Attempt: 1, Text: "answered"})
+ r.wait("replied", func(c *Conversation) bool { return c.Turns[fourth.Turn.ID].State == wire.TurnReplied })
+ _, cmd = turn("after", "k7")
+ if cmd.Text != "after" || len(cmd.PersonText) != 1 {
+ t.Fatalf("carried after an answer %q %q", cmd.Text, cmd.PersonText)
+ }
+}
+
+// Carried messages that would make the frame too big for a runner give
+// way, oldest first: the newest unanswered words still go. Two failed
+// batches, each as big as a batch gets, cannot both ride with a third.
+func TestFailedTurnMessagesFitOneFrame(t *testing.T) {
+ r := newRig(t)
+ runner := r.dial(0)
+ big := func(i int) string { return fmt.Sprintf("%02d", i) + strings.Repeat("x", wire.MaxMessageBytes-2) }
+ first, err := r.client.Send(r.ctx, "a", "k-a")
+ if err != nil {
+ t.Fatal(err)
+ }
+ turns := []string{first.Turn.ID}
+ for i := range 10 {
+ sent, err := r.client.Send(r.ctx, big(i), "k"+strconv.Itoa(i))
+ if err != nil {
+ t.Fatal(err)
+ }
+ if turns[len(turns)-1] != sent.Turn.ID {
+ turns = append(turns, sent.Turn.ID)
+ }
+ }
+ if len(turns) != 3 {
+ t.Fatalf("batches %v", turns)
+ }
+ var cmd *wire.MessageCommand
+ for i, id := range turns {
+ f, body, err := runner.Expect(r.ctx, wire.FrameMessage)
+ if err != nil {
+ t.Fatal(err)
+ }
+ runner.Send(r.ctx, "a-"+id, wire.FrameAck, wire.Ack{ID: f.ID})
+ if cmd = body.(*wire.MessageCommand); cmd.TurnID != id {
+ t.Fatalf("turn %s, want %s", cmd.TurnID, id)
+ }
+ if i < 2 {
+ runner.Send(r.ctx, "e-"+id, wire.FrameTurn, wire.TurnReport{TurnID: id, Attempt: 1, State: wire.TurnFailed, Reason: "provider_failed"})
+ }
+ }
+ if raw, _ := json.Marshal(cmd); len(raw) > wire.MaxFrameBytes-1<<10 {
+ t.Fatalf("frame %d bytes", len(raw))
+ }
+ n := len(cmd.PersonText)
+ if n < 6 || n >= 11 || cmd.PersonText[0] == "a" || cmd.PersonText[n-6] != big(4) || cmd.PersonText[n-1] != big(9) {
+ t.Fatalf("carried %d messages", n)
+ }
+}
+
func TestCancel(t *testing.T) {
r := newRig(t)
runner := r.dial(0)