oficina / equipo Public

chat: carry a failed turn's words into the next turn, marked unanswered

A turn that fails before its message reaches the coordinator (on
5a6755bb, claudeCoordinator.Turn's CheckCopy failure stops the process
and returns before the stdin write) leaves the person's words nowhere
the next turn reads:

- a resumed session (same account, same UTC day: c.start --resume)
  replays its transcript, which never had them;
- coordBase.prompt sends in.Tail only when the session is fresh, and
  there the failed message sat in the tail as if it had been answered;
- dispatch sent only the new turn's own messages as Text/PersonText.

dispatch now carries the person's composer words from the lane's person
turns that failed after its last answered one: quoted under "Not yet
answered, the person's words" with an Equipo note, before the newest
message, and first in PersonText; they leave the tail. Cancelled turns
are not carried (the person stopped them). At most the newest two failed
turns ride, so words that may be what makes turns fail stop after two;
the oldest give way if the frame would be too big. The note does not
claim the coordinator never saw them: the instance cannot tell, so it
asks not to repeat anything already done. Instance only: no wire,
protocol or runner change, so production runners read it as Text.

The fakes steer by the turn's own newest message, not carried words.
Size exemptions for internal/equipo/chat and internal/thintest bumped.

Failing first: TestFailedTurnMessageCarried ("carried text \"next\"").
Each guard observed failing when broken (tail filter, cancelled carried,
reset on answer, the two-turn bound, frame fit), then restored.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev b281d8b9f4a40d7673c39b50cb7406a34bea0f9b parent 1449687
7 files changed, +262 −12
  • .rastrillo/budgets.txt +2 −2
  • internal/equipo/chat/store.go +94 −4
  • internal/equipo/chat/tools.go +8 −0
  • internal/fakeclaude/fake.go +4 −0
  • internal/fakecodex/fake.go +4 −0
  • internal/thintest/batching_contract_test.go +27 −6
  • internal/thintest/instance_contract_test.go +123 −0

CI failed — 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/failed-turn-carried: Type  Size Avail | ext4   96G   87G
ci-box: disk /home/ci/.cache/equipo-ci-box: Type  Size Avail | ext4   96G   87G
ci-box: bwrap: fetched and verified in 0.3s
ci-box: claude: fetched and verified in 1.4s
ci-box: codex: fetched and verified in 3.4s
ci-box: codex-code-mode-host: fetched and verified in 1.2s
ci-box: libwrap: fetched and verified in 0.3s
ci-box: socat: fetched and verified in 0.3s
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
ci-box: image pulled in 9.9s
ci-box: pi: installed and verified in 7.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 8.7s
ci-box: clone deepened in 3.0s
ci-box: file times set from content: 2726 files, 174 directories
ci-box: ready in 16.2s
=== copy ===
EQUIPO_RELEASE_COPY_CHECK=1 CGO_ENABLED=0 go test ./internal/equipotest -run '^TestReleaseCopyReviewed$' -count=1
ok  	amadan.net/oficina/equipo/internal/equipotest	0.243s
=== 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.6s
+ 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 1m28.631s 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 1m27.048s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m27.05s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 68.10, cpu waiting 39.91%, memory waiting 0.00%, io waiting 0.78%
--- 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 1m32.008s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m30.438s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m30.44s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 66.25, cpu waiting 40.07%, memory waiting 0.00%, io waiting 0.75%
--- 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 1m34.394s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m32.598s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m21.2s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 6.36s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 5.04s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 66.25, cpu waiting 40.23%, memory waiting 0.00%, io waiting 0.73%
--- 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 1m29.105s 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 1m27.471s amadan.net/oficina/equipo/internal/headless
receipt: slow test 45s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 22.24s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 10.6s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
receipt: slow test 9.64s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
machine: 32 CPUs, load 68.10, cpu waiting 39.91%, memory waiting 0.00%, io waiting 0.78%
--- 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 1m46.646s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m44.937s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m8.21s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 11.75s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 10.31s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 8.71s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 5.95s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
machine: 32 CPUs, load 57.58, cpu waiting 33.68%, memory waiting 0.00%, io waiting 0.58%
--- 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 3m16.751s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 3m14.726s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m53.38s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistant
receipt: slow test 23.78s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 11.4s amadan.net/oficina/equipo/internal/headless TestHeadlessResearchHandoff
receipt: slow test 8.04s amadan.net/oficina/equipo/internal/headless TestHeadlessClaudeSignIn
receipt: slow test 7.33s amadan.net/oficina/equipo/internal/headless TestHeadlessTurnBatching
machine: 32 CPUs, load 19.02, cpu waiting 7.90%, memory waiting 0.00%, io waiting 0.12%
--- 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 2m1.799s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 2m0.003s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 7.61s amadan.net/oficina/equipo/internal/thintest TestContractTeamJobSettledStates
receipt: slow test 6.76s amadan.net/oficina/equipo/internal/thintest TestExplorePreviewsOff
receipt: slow test 3.71s amadan.net/oficina/equipo/internal/thintest TestContractPreviewHeldUntilPublishAnswer
receipt: slow test 3.48s amadan.net/oficina/equipo/internal/thintest TestContractTeamUpdatePersonNeeds
receipt: slow test 3.43s amadan.net/oficina/equipo/internal/thintest TestContractTeamNudgePersonNeeds
machine: 32 CPUs, load 46.65, cpu waiting 26.86%, memory waiting 0.00%, io waiting 0.45%
--- 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.464s 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.664s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 9.08s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 5.05s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotOffered
receipt: slow test 4.38s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
receipt: slow test 2.36s amadan.net/oficina/equipo/internal/thintest TestContractPublishNameTaken
receipt: slow test 2.34s amadan.net/oficina/equipo/internal/thintest TestContractPreview
machine: 32 CPUs, load 68.54, cpu waiting 40.32%, memory waiting 0.00%, io waiting 0.86%
--- 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 4m36.879s, over the 45s its record on line 44 allows; reported only, timing fails on CI

receipt: test step 4m41.837s 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 4m36.879s amadan.net/oficina/equipo/internal/runner/thin
receipt: slow test 37.01s amadan.net/oficina/equipo/internal/runner/thin TestModelsEngineeringProbesThenRunsTheStrongest
receipt: slow test 37.01s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeAnsweredByAnotherModel
receipt: slow test 36.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.92s amadan.net/oficina/equipo/internal/runner/thin TestOpenCodeStepsRealOpenCode
machine: 32 CPUs, load 5.26, cpu waiting 1.88%, memory waiting 0.00%, io waiting 0.02%
--- 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.607s 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.369s amadan.net/oficina/equipo/internal/runner
receipt: slow test 28.34s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.02s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 52.24, cpu waiting 29.47%, memory waiting 0.00%, io waiting 1.53%
--- 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 1m1.216s 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 59.193s amadan.net/oficina/equipo/internal/runner
receipt: slow test 49.19s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 43.4s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.35s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.63s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 66.96, cpu waiting 37.55%, memory waiting 0.00%, io waiting 1.25%
--- 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.801s 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.906s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.12s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.29s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.13s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 2.59s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 1.65s amadan.net/oficina/equipo/internal/runner TestCoordinatorTransientRefusalKeepsServing
machine: 32 CPUs, load 34.72, cpu waiting 18.87%, memory waiting 0.00%, io waiting 1.94%
--- 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 36.7%, load 26.42
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 1m7.691s 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.941s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 27.83s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 27.78s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 25.51s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 23.03s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
receipt: slow test 22.98s amadan.net/oficina/equipo/internal/equipotest TestAuthProductionConfig
machine: 32 CPUs, load 66.15, cpu waiting 38.89%, memory waiting 0.00%, io waiting 0.68%
--- 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 36.7%, load 26.42
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 1m15.039s 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 1m13.401s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 19.03s amadan.net/oficina/equipo/internal/equipotest TestProjectsReopen
receipt: slow test 19.03s amadan.net/oficina/equipo/internal/equipotest TestProjectKindsAndDefaultBranch
receipt: slow test 18.96s amadan.net/oficina/equipo/internal/equipotest TestProjectsFailuresRollBack
receipt: slow test 18.94s amadan.net/oficina/equipo/internal/equipotest TestProjectRejectsUnsafeBinding
receipt: slow test 18.9s amadan.net/oficina/equipo/internal/equipotest TestProjectsSharedAndGrouped
machine: 32 CPUs, load 57.58, cpu waiting 34.75%, memory waiting 0.00%, io waiting 0.60%
--- 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 36.7%, load 26.42
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 1m12.424s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m7.587s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 15.23s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 13.15s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 9.97s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 9.95s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 7.07s amadan.net/oficina/equipo/internal/equipotest TestRosterProtectsLastOwner
machine: 32 CPUs, load 61.81, cpu waiting 36.87%, memory waiting 0.00%, io waiting 0.64%
--- 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 36.7%, load 25.50
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.691s 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.978s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 24.55s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 24.26s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 24.2s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 22.45s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsCurrentOwner
receipt: slow test 22.43s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsUpgrade
machine: 32 CPUs, load 66.15, cpu waiting 38.89%, memory waiting 0.00%, io waiting 0.68%
--- 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 37.4%, load 26.42
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 52.425s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 50.167s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 3.67s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 3.55s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 1.47s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3A
receipt: slow test 1.38s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.2s amadan.net/oficina/equipo/internal/plan3test TestOnboardingAccountMigration
machine: 32 CPUs, load 68.54, cpu waiting 40.32%, memory waiting 0.00%, io waiting 0.86%
--- 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 36.7%, load 26.42
test lane rest: ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/idtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/idtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
cache miss: amadan.net/oficina/equipo/internal/copydesk: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/opencode: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/equipo/team: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/forge: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/webread: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runnerproto: 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/workspace: 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/testci TestBudgetRecordsAreShort
=== RUN   TestBudgetRecordsAreShort
    budgets_file_test.go:37: .rastrillo/budgets.txt:74: reason is 207 bytes, over 200
--- FAIL: TestBudgetRecordsAreShort (0.00s)

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

budget note: internal/equipo took 25.931s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/equipo/chat took 13.971s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/idtest took 43.031s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/release took 18.73s, 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 52.696s, over the 15s its record on line 40 allows; reported only, timing fails on CI
budget note: internal/runner/forge took 20.727s, over the 20s its record on line 35 allows; reported only, timing fails on CI

receipt: test step 2m35.051s 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 1m9.618s amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow package 55.567s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 52.853s amadan.net/oficina/equipo/internal/runner/provider/pi
receipt: slow package 52.696s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow package 50.462s amadan.net/oficina/equipo/cmd/equipo-runner
receipt: slow test 45.22s amadan.net/oficina/equipo/cmd/equipo-runner TestReleaseRunnerHasNoFakeWorker
receipt: slow test 25.91s amadan.net/oficina/equipo/internal/runner/provider/opencode TestOpenCodeAcceptanceHostileRepository
receipt: slow test 22.67s amadan.net/oficina/equipo/internal/runner/containment TestEngineeringOfflineGo
receipt: slow test 15.69s amadan.net/oficina/equipo/internal/idtest TestIDCallbackGuardAndPendingNonce
receipt: slow test 13.99s amadan.net/oficina/equipo/internal/runner/provider/opencode TestOpenCodeP1OnlyOpenCodeReachable
rastrillo: budget test: go test failed
exit status 1
+ go test -tags testbuild -timeout 15m -v -run '^TestBudgetRecordsAreShort$' -count=1 ./internal/testci   (retry, once)
FAILED TWICE ./internal/testci:TestBudgetRecordsAreShort rest
=== RUN   TestBudgetRecordsAreShort
    budgets_file_test.go:37: .rastrillo/budgets.txt:74: reason is 207 bytes, over 200
--- FAIL: TestBudgetRecordsAreShort (0.00s)
FAIL
rastrillo-budget/v1 ran 0s
FAIL	amadan.net/oficina/equipo/internal/testci	0.003s
FAIL
machine: 32 CPUs, load 19.64, cpu waiting 9.34%, memory waiting 0.00%, io waiting 0.15%
make: *** [Makefile:113: ci-shard] Error 1

amadan: step check shard 17 of 29 failed: exit status 2
--- shard 18 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-chat: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$' ./internal/headless
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserChat
=== RUN   TestBrowserChat
time=2026-11-20T08:41:40.959Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T08:41:40.959Z level=INFO msg="startup phase done" phase=state_lock took=249µs
time=2026-11-20T08:41:40.959Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T08:41:40.960Z level=INFO msg="startup phase done" phase=claim_roots took=194µs
time=2026-11-20T08:41:40.960Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T08:41:40.997Z level=INFO msg="startup phase done" phase=sweep took=37.57ms
time=2026-11-20T08:41:40.997Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T08:41:40.998Z level=INFO msg="startup phase done" phase=credentials took=204µs
time=2026-11-20T08:41:40.998Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T08:41:41.058Z level=INFO msg="startup phase done" phase=open_state took=60.041ms
time=2026-11-20T08:41:41.059Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T08:41:41.061Z level=INFO msg=connecting host=127.0.0.1:42793 protocol=28
time=2026-11-20T08:41:41.064Z level=INFO msg=connected host=127.0.0.1:42793 took=3.02ms
time=2026-11-20T08:41:41.064Z level=INFO msg="capabilities gathering"
time=2026-11-20T08:41:41.067Z level=INFO msg="capabilities gathered" took=3.161ms tags=linux,claude,go
time=2026-11-20T08:41:41.073Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T08:41:41.084Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-20T08:41:43.480Z 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: <nil>)
--- FAIL: TestBrowserChat (6.30s)

--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
=== RUN   TestBrowserChatSendStaysOnPage
time=2026-11-20T08:41:47.269Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T08:41:47.269Z level=INFO msg="startup phase done" phase=state_lock took=242µs
time=2026-11-20T08:41:47.269Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T08:41:47.270Z level=INFO msg="startup phase done" phase=claim_roots took=147µs
time=2026-11-20T08:41:47.270Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T08:41:47.320Z level=INFO msg="startup phase done" phase=sweep took=49.821ms
time=2026-11-20T08:41:47.320Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T08:41:47.320Z level=INFO msg="startup phase done" phase=credentials took=101µs
time=2026-11-20T08:41:47.320Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T08:41:47.380Z level=INFO msg="startup phase done" phase=open_state took=60.078ms
time=2026-11-20T08:41:47.381Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T08:41:47.381Z level=INFO msg=connecting host=127.0.0.1:38457 protocol=28
time=2026-11-20T08:41:47.384Z level=INFO msg=connected host=127.0.0.1:38457 took=2.399ms
time=2026-11-20T08:41:47.384Z level=INFO msg="capabilities gathering"
time=2026-11-20T08:41:47.385Z level=INFO msg="capabilities gathered" took=786µs tags=linux,claude,go
time=2026-11-20T08:41:47.390Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T08:41:47.398Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-20T08:41:49.455Z 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: context deadline exceeded)
--- FAIL: TestBrowserChatSendStaysOnPage (6.26s)

--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
=== RUN   TestBrowserDraftIsTheMessage
time=2026-11-20T08:41:53.534Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T08:41:53.534Z level=INFO msg="startup phase done" phase=state_lock took=209µs
time=2026-11-20T08:41:53.534Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T08:41:53.534Z level=INFO msg="startup phase done" phase=claim_roots took=235µs
time=2026-11-20T08:41:53.534Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T08:41:53.604Z level=INFO msg="startup phase done" phase=sweep took=69.44ms
time=2026-11-20T08:41:53.604Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T08:41:53.604Z level=INFO msg="startup phase done" phase=credentials took=106µs
time=2026-11-20T08:41:53.604Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T08:41:53.683Z level=INFO msg="startup phase done" phase=open_state took=78.688ms
time=2026-11-20T08:41:53.684Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T08:41:53.684Z level=INFO msg=connecting host=127.0.0.1:39421 protocol=28
time=2026-11-20T08:41:53.688Z level=INFO msg=connected host=127.0.0.1:39421 took=3.415ms
time=2026-11-20T08:41:53.688Z level=INFO msg="capabilities gathering"
time=2026-11-20T08:41:53.688Z level=INFO msg="capabilities gathered" took=378µs tags=linux,claude,go
time=2026-11-20T08:41:53.689Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T08:41:53.701Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-20T08:41:55.877Z level=INFO msg="connection checked" connection=claude-1 state=healthy
    browser_thinking_test.go:106: waiting for !!window.__m: context deadline exceeded (last evaluation: context deadline exceeded)
--- FAIL: TestBrowserDraftIsTheMessage (8.17s)

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


receipt: test step 49.709s 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.399s amadan.net/oficina/equipo/internal/headless
receipt: slow test 15.31s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 8.17s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 7.88s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 6.3s amadan.net/oficina/equipo/internal/headless TestBrowserChat
receipt: slow test 6.26s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
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 b281d8b9f4a40d7673c39b50cb7406a34bea0f9b 6.30s 52.24
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
##############################################################################
FLAKE ./internal/headless:TestBrowserChatSendStaysOnPage browser-headless-chat b281d8b9f4a40d7673c39b50cb7406a34bea0f9b 6.26s 52.24
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
##############################################################################
FLAKE ./internal/headless:TestBrowserDraftIsTheMessage browser-headless-chat b281d8b9f4a40d7673c39b50cb7406a34bea0f9b 8.17s 52.24
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 57.58, cpu waiting 32.61%, memory waiting 0.00%, io waiting 0.56%
--- 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
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
=== RUN   TestBrowserRailFollowsWork
time=2026-11-20T08:41:36.792Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T08:41:36.792Z level=INFO msg="startup phase done" phase=state_lock took=205µs
time=2026-11-20T08:41:36.792Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T08:41:36.792Z level=INFO msg="startup phase done" phase=claim_roots took=166µs
time=2026-11-20T08:41:36.792Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T08:41:36.831Z level=INFO msg="startup phase done" phase=sweep took=38.568ms
time=2026-11-20T08:41:36.831Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T08:41:36.831Z level=INFO msg="startup phase done" phase=credentials took=116µs
time=2026-11-20T08:41:36.831Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T08:41:36.872Z level=INFO msg="startup phase done" phase=open_state took=40.956ms
time=2026-11-20T08:41:36.872Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T08:41:36.873Z level=INFO msg=connecting host=127.0.0.1:40941 protocol=28
time=2026-11-20T08:41:36.876Z level=INFO msg=connected host=127.0.0.1:40941 took=2.486ms
time=2026-11-20T08:41:36.876Z level=INFO msg="capabilities gathering"
time=2026-11-20T08:41:36.876Z level=INFO msg="capabilities gathered" took=539µs tags=linux,claude,go
time=2026-11-20T08:41:36.877Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T08:41:36.881Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-20T08:41:38.174Z level=INFO msg="connection checked" connection=claude-1 state=healthy
time=2026-11-20T08:41:46.872Z level=INFO msg="kept sessions" kept=1 bytes=2770 expired=0
time=2026-11-20T08:41:51.336Z level=INFO msg="kept sessions" kept=2 bytes=4922 expired=0
time=2026-11-20T08:41:52.124Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T08:41:52.124Z level=INFO msg="startup phase done" phase=state_lock took=218µs
time=2026-11-20T08:41:52.124Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T08:41:52.124Z level=INFO msg="startup phase done" phase=claim_roots took=226µs
time=2026-11-20T08:41:52.125Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T08:41:52.161Z level=INFO msg="startup phase done" phase=sweep took=36.16ms
time=2026-11-20T08:41:52.161Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T08:41:52.161Z level=INFO msg="startup phase done" phase=credentials took=219µs
time=2026-11-20T08:41:52.161Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T08:41:52.211Z level=INFO msg="startup phase done" phase=open_state took=49.477ms
time=2026-11-20T08:41:52.212Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T08:41:52.214Z level=INFO msg=connecting host=127.0.0.1:35639 protocol=28
time=2026-11-20T08:41:52.215Z level=INFO msg=connected host=127.0.0.1:35639 took=923µs
time=2026-11-20T08:41:52.215Z level=INFO msg="capabilities gathering"
time=2026-11-20T08:41:52.217Z level=INFO msg="capabilities gathered" took=1.725ms tags=linux,claude,go
time=2026-11-20T08:41:52.220Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T08:41:52.223Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-20T08:41:54.158Z 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: <nil>)
--- FAIL: TestBrowserRailFollowsWork (21.72s)

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


receipt: test step 1m38.639s 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.044s amadan.net/oficina/equipo/internal/headless
receipt: slow test 27.58s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 21.72s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 14.42s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 11.81s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
receipt: slow test 11.48s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
rastrillo: budget test: go test failed
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 b281d8b9f4a40d7673c39b50cb7406a34bea0f9b 21.72s 66.15
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 46.65, cpu waiting 26.86%, memory waiting 0.00%, io waiting 0.45%
--- 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 1m47.885s 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 1m46.336s amadan.net/oficina/equipo/internal/headless
receipt: slow test 17.45s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 13.76s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 13.05s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 10.93s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
receipt: slow test 10.85s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsOpenCodeGoLimitRequired
machine: 32 CPUs, load 57.58, cpu waiting 32.61%, memory waiting 0.00%, io waiting 0.56%
--- shard 21 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-rest: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAskAfterMerge|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' ./internal/headless
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserCopyContinue
=== RUN   TestBrowserCopyContinue
time=2026-11-20T08:41:52.127Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T08:41:52.127Z level=INFO msg="startup phase done" phase=state_lock took=257µs
time=2026-11-20T08:41:52.127Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T08:41:52.127Z level=INFO msg="startup phase done" phase=claim_roots took=112µs
time=2026-11-20T08:41:52.127Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T08:41:52.160Z level=INFO msg="startup phase done" phase=sweep took=32.468ms
time=2026-11-20T08:41:52.160Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T08:41:52.160Z level=INFO msg="startup phase done" phase=credentials took=197µs
time=2026-11-20T08:41:52.160Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T08:41:52.204Z level=INFO msg="startup phase done" phase=open_state took=43.646ms
time=2026-11-20T08:41:52.205Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T08:41:52.206Z level=INFO msg=connecting host=127.0.0.1:42535 protocol=28
time=2026-11-20T08:41:52.208Z level=INFO msg=connected host=127.0.0.1:42535 took=887µs
time=2026-11-20T08:41:52.208Z level=INFO msg="capabilities gathering"
time=2026-11-20T08:41:52.209Z level=INFO msg="capabilities gathered" took=399µs tags=linux,claude,go
time=2026-11-20T08:41:52.209Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T08:41:52.214Z 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.26s)

--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserEmptyExplore
=== RUN   TestBrowserEmptyExplore
time=2026-11-20T08:42:33.116Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T08:42:33.116Z level=INFO msg="startup phase done" phase=state_lock took=68µs
time=2026-11-20T08:42:33.116Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T08:42:33.116Z level=INFO msg="startup phase done" phase=claim_roots took=84µs
time=2026-11-20T08:42:33.116Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T08:42:33.148Z level=INFO msg="startup phase done" phase=sweep took=31.67ms
time=2026-11-20T08:42:33.148Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T08:42:33.148Z level=INFO msg="startup phase done" phase=credentials took=107µs
time=2026-11-20T08:42:33.148Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T08:42:33.188Z level=INFO msg="startup phase done" phase=open_state took=39.762ms
time=2026-11-20T08:42:33.188Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T08:42:33.190Z level=INFO msg=connecting host=127.0.0.1:39531 protocol=28
time=2026-11-20T08:42:33.191Z level=INFO msg=connected host=127.0.0.1:39531 took=927µs
time=2026-11-20T08:42:33.191Z level=INFO msg="capabilities gathering"
time=2026-11-20T08:42:33.191Z level=INFO msg="capabilities gathered" took=479µs tags=linux,claude,go
time=2026-11-20T08:42:33.192Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T08:42:33.196Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-20T08:42:34.329Z 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.85s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m39.851s
FAIL	amadan.net/oficina/equipo/internal/headless	100.163s


receipt: test step 1m41.318s 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 1m39.851s amadan.net/oficina/equipo/internal/headless
receipt: slow test 15.08s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
receipt: slow test 12.75s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 12.19s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 10.95s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 8.21s 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 b281d8b9f4a40d7673c39b50cb7406a34bea0f9b 6.26s 61.81
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
##############################################################################
FLAKE ./internal/headless:TestBrowserEmptyExplore browser-headless-rest b281d8b9f4a40d7673c39b50cb7406a34bea0f9b 5.85s 61.81
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 53.69, cpu waiting 30.58%, memory waiting 0.00%, io waiting 0.52%
--- 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.774s 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 525ms amadan.net/oficina/equipo/internal/equipo
receipt: slow test 520ms amadan.net/oficina/equipo/internal/equipo TestBrowserPreviewBlocksNavigation
browser lane browser-rest: ./internal/idtest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserOficinaIDDoor)$' ./internal/idtest

receipt: test step 3.02s 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.744s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 1.74s 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.201s 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.955s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 1.95s 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|TestBrowserThinkingWords|TestBrowserTokenRowEmail|TestBrowserTrackStarCentre)$' ./internal/thintest

receipt: test step 3m7.563s 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 3m6.133s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 17.39s amadan.net/oficina/equipo/internal/thintest TestBrowserAccessRequest
receipt: slow test 14.37s amadan.net/oficina/equipo/internal/thintest TestBrowserSettingsTeams
receipt: slow test 10.56s amadan.net/oficina/equipo/internal/thintest TestBrowserPlacementQuestionAndPending
receipt: slow test 9.18s amadan.net/oficina/equipo/internal/thintest TestBrowserThinkingCycles
receipt: slow test 8.46s amadan.net/oficina/equipo/internal/thintest TestBrowserInnerScreens
machine: 32 CPUs, load 19.02, cpu waiting 7.65%, memory waiting 0.00%, io waiting 0.12%
--- 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   (59s)
ok ./internal/headless TestHeadlessConnections/A5_cancel_and_sign_out 5.22s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.38s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 10.21s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 10.59s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 29.02s
+ 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   (66s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 18.87s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 13.77s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 11.84s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 19.66s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless   (24s)
ok ./internal/headless TestMixedVersions 21.72s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks   (2s)
ok ./internal/runner/checks TestCheckSandboxDeniedPathsTampering 0.82s
+ go test -tags testbuild -timeout 15m -v -run '^TestRunnerCancelAndSupersede$' ./internal/runner/thin   (2s)
ok ./internal/runner/thin TestRunnerCancelAndSupersede 0.05s
quarantine: 0 flaked (passed on the retry), 0 failed
machine: 32 CPUs, load 66.40, cpu waiting 38.19%, memory waiting 0.00%, io waiting 1.17%
--- 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 10.759s 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.397s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 169ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 79ms amadan.net/oficina/equipo/internal/runner/provider/codex
receipt: slow package 1ms amadan.net/oficina/equipo/internal/runner/provider
receipt: slow package 1ms amadan.net/oficina/equipo/internal/runner/provider/pi
receipt: slow test 5.33s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.63s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 340ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 170ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 80ms amadan.net/oficina/equipo/internal/runner/provider/codex TestDirectJournalAdapterBarrier
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.308s 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.936s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 260ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 180ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 100ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryCleansScratch
receipt: slow test 100ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicy
machine: 32 CPUs, load 12.39, cpu waiting 7.57%, memory waiting 0.00%, io waiting 2.70%
--- 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 36.7%, load 26.42
shard 25: make runner-dead-references lanes-check build vet fmt-check budget migration-check
python3 scripts/runner-dead-references.py
reference scan: 2440 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.447s
machine: 32 CPUs, load 66.40, cpu waiting 38.33%, memory waiting 0.00%, io waiting 1.09%
--- 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 36.7%, load 26.42
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 49.47, cpu waiting 28.17%, memory waiting 0.00%, io waiting 1.58%
--- 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 36.7%, load 26.42
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 34.72, cpu waiting 20.67%, memory waiting 0.00%, io waiting 1.87%
--- 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 36.7%, load 26.42
shard 28: make gitleaks
8:41AM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
8:42AM INF 1032 commits scanned.
8:42AM INF scanned ~60036760 bytes (60.04 MB) in 21.8s
8:42AM INF no leaks found
machine: 32 CPUs, load 52.24, cpu waiting 30.99%, memory waiting 0.00%, io waiting 1.48%

amadan: job failed at step check shard 17 of 29 — its output is above, not at the tail of this log
diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt
index ed35e14e..292f1b2c 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 31265 - Fable follow-up: base and diagnostic gates, preview isolation and provenance guards; failed turns' words carried unanswered; measured 31265/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 - 11249 Fable follow-up: base and diagnostic gates, preview isolation and provenance guards; measured 0/11249 source/test lines (live first-stage check).
-size internal/thintest - 32091 Fable follow-up: base and diagnostic gates, preview isolation and provenance guards; empty conversation page and browser checks; measured 1515/32091 source/test lines.
+size internal/thintest - 32235 Fable follow-up: base and diagnostic gates, preview isolation and provenance guards; empty conversation page and browser checks; failed turns' words carried unanswered; measured 1515/32235 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/store.go b/internal/equipo/chat/store.go
index f81fe642..3d88fee6 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 since the lane's last
+ // answer mostly 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,90 @@ 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:]
}
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
+)
+
+// unanswered is the person's own words (composer messages, never a
+// tapped option) in the lane's person turns that failed after its last
+// answered one, the newest maxCarriedTurns of them, oldest first. A
+// failure before the words reached the coordinator leaves them out of a
+// resumed session's transcript, and a fresh session's tail showed them
+// as if answered. 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 state = ?"
+ 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+")", r.Person, r.Lane, wire.RolePerson, r.Person, r.Lane, wire.TurnReplied).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+")", 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 {
+ 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..bc0d38d0 100644
--- a/internal/equipo/chat/tools.go
+++ b/internal/equipo/chat/tools.go
@@ -97,6 +97,14 @@ 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 since
+ // the lane's last answered turn (unanswered): most failed before the
+ // coordinator saw them, but the instance cannot tell (a failure after
+ // the words reached it has the same reasons). 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, most often before you saw them. They are the person's own words, oldest first, still waiting. If you already did something one asks for, do not do it again. 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/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/instance_contract_test.go b/internal/thintest/instance_contract_test.go
index a26ba7dc..3dbaf04b 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, most often before you saw them. They are the person's own words, oldest first, still waiting. If you already did something one asks for, do not do it again. 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)