oficina / equipo Public

Fix push token races, retry holds, and activity lifetimes

Protect current registrations from old responses, quarantine unreadable rows, reload claimed badges, retain activity ends through delayed starts, persist platform holds, and keep replaced activities ended. Add regression tests and additive migration 0096.
Co-Authored-By: Codex GPT-6-Astra <noreply@openai.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 466b6a0cf1d9448e6d750fbb92cbb4b867a90797 parent 18eee15
10 files changed, +508 −40
  • .rastrillo/budgets.txt +1 −1
  • internal/equipo/chat/push.go +10 −4
  • internal/equipo/chat/push_review_test.go +87 −0
  • internal/equipo/migrations/0096_push_hold.sql +2 −0
  • internal/equipo/migrations/schema.sql +2 −0
  • internal/equipo/push/review_test.go +289 −0
  • internal/equipo/push/sender.go +32 −30
  • internal/equipo/push/sender_state.go +80 −0
  • internal/equipo/push/sender_test.go +1 −1
  • internal/equipo/push/store.go +4 −4

CI passed — run details

CI log
=== prepare ===
ci-box: machine: aarch64, 32 CPUs, 62 GiB memory, kernel 7.0.0-1017-aws
ci-box: python 3.12.3; Docker version 29.1.3, build 29.1.3-0ubuntu3~24.04.2
ci-box: user namespaces allowed: 233151
ci-box: cgroup: cgroup2fs
ci-box: disk /home/ci/work/repos/oficina__equipo/wt/push__server: Type  Size Avail | ext4   96G   86G
ci-box: disk /home/ci/.cache/equipo-ci-box: Type  Size Avail | ext4   96G   86G
ci-box: bwrap: fetched and verified in 0.3s
ci-box: claude: fetched and verified in 2.4s
ci-box: codex: fetched and verified in 3.5s
ci-box: codex-code-mode-host: fetched and verified in 1.4s
ci-box: libwrap: fetched and verified in 0.3s
ci-box: socat: fetched and verified in 0.4s
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
ci-box: image pulled in 10.3s
ci-box: pi: installed and verified in 7.7s
ci-box: opencode: installed and verified in 2.1s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 8.9s
ci-box: clone deepened in 3.3s
ci-box: file times set from content: 2753 files, 176 directories
ci-box: ready in 17.0s
=== copy ===
EQUIPO_RELEASE_COPY_CHECK=1 CGO_ENABLED=0 go test ./internal/equipotest -run '^TestReleaseCopyReviewed$' -count=1
ok  	amadan.net/oficina/equipo/internal/equipotest	0.244s
=== compile ===
go build ./...
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py compile
+ go build -tags testbuild ./...
  3.6s
+ 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 1m27.569s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m25.896s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m25.9s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 63.23, cpu waiting 36.80%, memory waiting 0.00%, io waiting 0.48%
--- 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 1m31.611s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m29.9s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m29.9s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 61.05, cpu waiting 36.65%, memory waiting 0.00%, io waiting 0.45%
--- shard 2 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-connections: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadlessConnections$|^TestHeadlessTokenPasteEndToEnd$|^TestHeadlessTokenConnection$' ./internal/headless

receipt: test step 1m32.196s 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.521s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m19.17s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 6.19s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 5.15s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 61.05, cpu waiting 36.30%, memory waiting 0.00%, io waiting 0.43%
--- 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 1m27.996s 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 1m26.134s amadan.net/oficina/equipo/internal/headless
receipt: slow test 44.14s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 21.71s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 10.61s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
receipt: slow test 9.67s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
machine: 32 CPUs, load 63.23, cpu waiting 36.80%, memory waiting 0.00%, io waiting 0.48%
--- shard 4 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-guards: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadlessCopyRotation$|^TestHeadlessPolicyGuards$|^TestHeadlessRunnerKillLeavesNoCopies$|^TestHeadlessNewHouseRuleStartsFresh$|^TestHeadless$/^3_engineering$|^TestHeadless$/^3_step_cancel$|^TestHeadless$/^3_step_contained$|^TestHeadless$/^3_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 1m45.067s 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 1m43.45s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m5.82s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 12.11s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 10.39s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 9.09s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 6.04s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
machine: 32 CPUs, load 50.92, cpu waiting 31.03%, memory waiting 0.00%, io waiting 0.35%
--- 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 3m17.353s 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 3m15.287s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m53.13s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistant
receipt: slow test 24.08s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 11.5s amadan.net/oficina/equipo/internal/headless TestHeadlessResearchHandoff
receipt: slow test 8.16s amadan.net/oficina/equipo/internal/headless TestHeadlessClaudeSignIn
receipt: slow test 7.34s amadan.net/oficina/equipo/internal/headless TestHeadlessTurnBatching
machine: 32 CPUs, load 13.61, cpu waiting 6.82%, memory waiting 0.00%, io waiting 0.07%
--- shard 6 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane thintest: ./internal/thintest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test([^C]|C[^o]|Co[^n]|Con[^t])|^TestContract(Assistant|Outcome|Team|Handoff|HostAllowlist|HostIsPerPerson|Look|Use[A-Z]|RemoteCall|LanesRunAtOnce|NoMergeQuestionWhenGateMerges|PreviewHeldUntilPublishAnswer|PreviewNotHeldBelow19|PublishNeedsOwnerAnswer)' ./internal/thintest

receipt: test step 2m0.539s 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 1m58.733s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 7.7s amadan.net/oficina/equipo/internal/thintest TestContractTeamJobSettledStates
receipt: slow test 6.73s amadan.net/oficina/equipo/internal/thintest TestExplorePreviewsOff
receipt: slow test 3.82s amadan.net/oficina/equipo/internal/thintest TestContractPreviewHeldUntilPublishAnswer
receipt: slow test 3.47s amadan.net/oficina/equipo/internal/thintest TestContractTeamNudgePersonNeeds
receipt: slow test 2.49s amadan.net/oficina/equipo/internal/thintest TestResearchDoneFallsBack
machine: 32 CPUs, load 40.90, cpu waiting 23.95%, memory waiting 0.00%, io waiting 0.27%
--- 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.221s 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.34s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 9.01s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 4.94s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotOffered
receipt: slow test 4.37s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
receipt: slow test 2.37s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotNow
receipt: slow test 2.35s amadan.net/oficina/equipo/internal/thintest TestContractPublishNameTaken
machine: 32 CPUs, load 62.82, cpu waiting 36.30%, memory waiting 0.00%, io waiting 0.51%
--- 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
cache miss: amadan.net/oficina/equipo/internal/runner/thin: its inputs changed
budget note: internal/runner/thin took 4m37.024s, over the 45s its record on line 44 allows; reported only, timing fails on CI

receipt: test step 4m50.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 4m37.024s amadan.net/oficina/equipo/internal/runner/thin
receipt: slow test 37.02s amadan.net/oficina/equipo/internal/runner/thin TestModelsEngineeringProbesThenRunsTheStrongest
receipt: slow test 36.97s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeAnsweredByAnotherModel
receipt: slow test 36.81s amadan.net/oficina/equipo/internal/runner/thin TestModelsUnhealthyRetriedOnDemand
receipt: slow test 18.51s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeRunsInsideTheAdmission
receipt: slow test 7s amadan.net/oficina/equipo/internal/runner/thin TestOpenCodeStepsRealOpenCode
machine: 32 CPUs, load 3.45, cpu waiting 1.42%, memory waiting 0.00%, io waiting 0.05%
--- 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.994s 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.78s amadan.net/oficina/equipo/internal/runner
receipt: slow test 28.75s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.03s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 51.84, cpu waiting 29.66%, memory waiting 0.00%, io waiting 0.91%
--- 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 59.255s 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 57.232s amadan.net/oficina/equipo/internal/runner
receipt: slow test 47.14s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 43.14s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.41s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.67s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 57.46, cpu waiting 34.37%, memory waiting 0.00%, io waiting 0.77%
--- 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 36.068s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 35.182s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.11s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.72s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.12s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 2.49s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 1.61s amadan.net/oficina/equipo/internal/runner TestCoordinatorTransientRefusalKeepsServing
machine: 32 CPUs, load 32.37, cpu waiting 19.00%, memory waiting 0.00%, io waiting 1.16%
--- shard 12 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-a started 30s late; cpu waiting 35.8%, load 20.10
test lane equipotest-a: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test[A-D]|^TestQ' ./internal/equipotest

receipt: test step 1m6.514s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m4.639s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 27.2s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 27.14s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 24.92s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 22.35s amadan.net/oficina/equipo/internal/equipotest TestAuthorityRejectsMismatchedTarget
receipt: slow test 22.31s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
machine: 32 CPUs, load 58.48, cpu waiting 34.99%, memory waiting 0.00%, io waiting 0.40%
--- shard 13 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-e started 30s late; cpu waiting 35.8%, load 20.10
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.21s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m13.223s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 19.19s amadan.net/oficina/equipo/internal/equipotest TestProjectOwnersAreMembers
receipt: slow test 19.15s amadan.net/oficina/equipo/internal/equipotest TestProjectWritesRequireCurrentOwner
receipt: slow test 19.14s amadan.net/oficina/equipo/internal/equipotest TestProjectRetryAndRevision
receipt: slow test 19.1s amadan.net/oficina/equipo/internal/equipotest TestProjectKindsAndDefaultBranch
receipt: slow test 19.1s amadan.net/oficina/equipo/internal/equipotest TestProjectsAccountRevisionAndValidation
machine: 32 CPUs, load 50.92, cpu waiting 31.03%, memory waiting 0.00%, io waiting 0.35%
--- shard 14 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-r started 30s late; cpu waiting 35.8%, load 22.65
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.358s 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.397s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 15.08s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 13.11s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 10.08s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 9.98s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 6.98s amadan.net/oficina/equipo/internal/equipotest TestRosterAuditFailureRollsBack
machine: 32 CPUs, load 55.00, cpu waiting 32.05%, memory waiting 0.00%, io waiting 0.36%
--- shard 15 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-rest started 30s late; cpu waiting 35.8%, load 22.65
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.272s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m5.528s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 24.88s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 23.75s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 23.74s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 21.85s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedAuditRollback
receipt: slow test 21.77s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsCurrentOwner
machine: 32 CPUs, load 58.48, cpu waiting 34.99%, memory waiting 0.00%, io waiting 0.40%
--- shard 16 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: plan3test started 30s late; cpu waiting 35.8%, load 20.10
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.198s 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.517s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 3.6s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 3.49s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 1.67s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.47s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3A
receipt: slow test 1.23s amadan.net/oficina/equipo/internal/plan3test TestInviteMigration
machine: 32 CPUs, load 62.82, cpu waiting 36.35%, memory waiting 0.00%, io waiting 0.53%
--- shard 17 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: rest started 30s late; cpu waiting 35.8%, load 20.10
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/push ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/idtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/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/push ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/idtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/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/testci: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/webread: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/wire/wireschema: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/opencode: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/copydesk: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/equipo/team: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/forge: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/workspace: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runnerproto: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/checks: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/containment: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/pi: its inputs changed
budget note: internal/equipo took 23.463s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/equipo/chat took 13.373s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/idtest took 41.255s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/release took 22.788s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/runner/containment took 48.38s, over the 15s its record on line 40 allows; reported only, timing fails on CI

receipt: test step 2m30.727s against a 60s target (the gate's other steps are not in this figure)
receipt: 22 packages ran, 39 cached, 18 without tests, 0 failed
receipt: slow package 1m6.481s amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow package 53.107s amadan.net/oficina/equipo/internal/runner/provider/pi
receipt: slow package 51.784s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 48.38s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow package 41.255s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 25.18s amadan.net/oficina/equipo/internal/runner/provider/opencode TestOpenCodeAcceptanceHostileRepository
receipt: slow test 20.82s amadan.net/oficina/equipo/internal/runner/containment TestEngineeringOfflineGo
receipt: slow test 17.36s amadan.net/oficina/equipo/cmd/equipo-runner TestReleaseRunnerHasNoFakeWorker
receipt: slow test 12.56s amadan.net/oficina/equipo/internal/idtest TestIDCallbackGuardAndPendingNonce
receipt: slow test 11.62s amadan.net/oficina/equipo/internal/runner/provider/opencode TestOpenCodeP1OnlyOpenCodeReachable
machine: 32 CPUs, load 16.70, cpu waiting 8.90%, memory waiting 0.00%, io waiting 0.09%
--- 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
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserChat
=== RUN   TestBrowserChat
time=2026-11-20T13:15:28.976Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T13:15:28.977Z level=INFO msg="startup phase done" phase=state_lock took=161µs
time=2026-11-20T13:15:28.977Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T13:15:28.977Z level=INFO msg="startup phase done" phase=claim_roots took=167µs
time=2026-11-20T13:15:28.977Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T13:15:29.025Z level=INFO msg="startup phase done" phase=sweep took=48.212ms
time=2026-11-20T13:15:29.027Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T13:15:29.027Z level=INFO msg="startup phase done" phase=credentials took=172µs
time=2026-11-20T13:15:29.027Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T13:15:29.083Z level=INFO msg="startup phase done" phase=open_state took=55.862ms
time=2026-11-20T13:15:29.084Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T13:15:29.084Z level=INFO msg=connecting host=127.0.0.1:40735 protocol=28
time=2026-11-20T13:15:29.087Z level=INFO msg=connected host=127.0.0.1:40735 took=2.699ms
time=2026-11-20T13:15:29.087Z level=INFO msg="capabilities gathering"
time=2026-11-20T13:15:29.088Z level=INFO msg="capabilities gathered" took=1.071ms tags=linux,claude,go
time=2026-11-20T13:15:29.090Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T13:15:29.097Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-20T13:15:31.264Z 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.16s)

--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
=== RUN   TestBrowserDraftIsTheMessage
time=2026-11-20T13:15:42.341Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T13:15:42.341Z level=INFO msg="startup phase done" phase=state_lock took=206µs
time=2026-11-20T13:15:42.341Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T13:15:42.341Z level=INFO msg="startup phase done" phase=claim_roots took=174µs
time=2026-11-20T13:15:42.341Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T13:15:42.381Z level=INFO msg="startup phase done" phase=sweep took=39.81ms
time=2026-11-20T13:15:42.381Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T13:15:42.381Z level=INFO msg="startup phase done" phase=credentials took=95µs
time=2026-11-20T13:15:42.381Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T13:15:42.442Z level=INFO msg="startup phase done" phase=open_state took=60.894ms
time=2026-11-20T13:15:42.443Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T13:15:42.444Z level=INFO msg=connecting host=127.0.0.1:35953 protocol=28
time=2026-11-20T13:15:42.446Z level=INFO msg=connected host=127.0.0.1:35953 took=916µs
time=2026-11-20T13:15:42.446Z level=INFO msg="capabilities gathering"
time=2026-11-20T13:15:42.448Z level=INFO msg="capabilities gathered" took=2.106ms tags=linux,claude,go
time=2026-11-20T13:15:42.450Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T13:15:42.455Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-20T13:15:44.608Z level=INFO msg="connection checked" connection=claude-1 state=healthy
    browser_thinking_test.go:106: waiting for !!window.__m: context deadline exceeded (last evaluation: <nil>)
--- FAIL: TestBrowserDraftIsTheMessage (8.20s)

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


receipt: test step 51.12s 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 49.741s amadan.net/oficina/equipo/internal/headless
receipt: slow test 15.45s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 8.2s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 7.8s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 7.23s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
receipt: slow test 6.16s amadan.net/oficina/equipo/internal/headless TestBrowserChat
rastrillo: budget test: go test failed
exit status 1
+ go test -tags browser,testbuild -timeout 15m -run '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$' -v -run '^TestBrowserChat$|^TestBrowserDraftIsTheMessage$' -count=1 ./internal/headless   (retry, once)
##############################################################################
FLAKE ./internal/headless:TestBrowserChat browser-headless-chat 466b6a0cf1d9448e6d750fbb92cbb4b867a90797 6.16s 51.84
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
##############################################################################
FLAKE ./internal/headless:TestBrowserDraftIsTheMessage browser-headless-chat 466b6a0cf1d9448e6d750fbb92cbb4b867a90797 8.20s 51.84
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 55.00, cpu waiting 32.05%, memory waiting 0.00%, io waiting 0.36%
--- 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-20T13:15:24.474Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T13:15:24.474Z level=INFO msg="startup phase done" phase=state_lock took=66µs
time=2026-11-20T13:15:24.474Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T13:15:24.474Z level=INFO msg="startup phase done" phase=claim_roots took=82µs
time=2026-11-20T13:15:24.474Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T13:15:24.508Z level=INFO msg="startup phase done" phase=sweep took=33.5ms
time=2026-11-20T13:15:24.508Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T13:15:24.508Z level=INFO msg="startup phase done" phase=credentials took=120µs
time=2026-11-20T13:15:24.508Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T13:15:24.547Z level=INFO msg="startup phase done" phase=open_state took=39.239ms
time=2026-11-20T13:15:24.548Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T13:15:24.549Z level=INFO msg=connecting host=127.0.0.1:35911 protocol=28
time=2026-11-20T13:15:24.551Z level=INFO msg=connected host=127.0.0.1:35911 took=2.052ms
time=2026-11-20T13:15:24.551Z level=INFO msg="capabilities gathering"
time=2026-11-20T13:15:24.552Z level=INFO msg="capabilities gathered" took=393µs tags=linux,claude,go
time=2026-11-20T13:15:24.552Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T13:15:24.556Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-20T13:15:25.865Z level=INFO msg="connection checked" connection=claude-1 state=healthy
time=2026-11-20T13:15:34.454Z level=INFO msg="kept sessions" kept=1 bytes=2770 expired=0
time=2026-11-20T13:15:39.079Z level=INFO msg="kept sessions" kept=2 bytes=4922 expired=0
time=2026-11-20T13:15:39.970Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T13:15:39.970Z level=INFO msg="startup phase done" phase=state_lock took=163µs
time=2026-11-20T13:15:39.970Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T13:15:39.970Z level=INFO msg="startup phase done" phase=claim_roots took=179µs
time=2026-11-20T13:15:39.970Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T13:15:40.020Z level=INFO msg="startup phase done" phase=sweep took=49.396ms
time=2026-11-20T13:15:40.021Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T13:15:40.021Z level=INFO msg="startup phase done" phase=credentials took=200µs
rastrillo: budget test: go test failed
time=2026-11-20T13:15:40.021Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T13:15:40.093Z level=INFO msg="startup phase done" phase=open_state took=72.215ms
time=2026-11-20T13:15:40.094Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T13:15:40.095Z level=INFO msg=connecting host=127.0.0.1:38233 protocol=28
time=2026-11-20T13:15:40.099Z level=INFO msg=connected host=127.0.0.1:38233 took=3.895ms
time=2026-11-20T13:15:40.099Z level=INFO msg="capabilities gathering"
time=2026-11-20T13:15:40.099Z level=INFO msg="capabilities gathered" took=594µs tags=linux,claude,go
time=2026-11-20T13:15:40.107Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T13:15:40.110Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-20T13:15:42.151Z level=INFO msg="connection checked" connection=claude-1 state=healthy
    browser_review_test.go:57: waiting for document.querySelector('#rail [data-specialist="engineering"]')?.dataset.state==='working' && document.querySelector('#rail [data-specialist="engineering"]').querySelector('[equipo-nav-task]')?.textContent==='Slow sidebar change' && document.querySelector('#nav-tasks [data-count]')?.textContent==='1': context deadline exceeded (last evaluation: context deadline exceeded)
time=2026-11-20T13:15:45.818Z level=WARN msg="step state" err="context canceled"
--- FAIL: TestBrowserRailFollowsWork (22.11s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m35.08s
FAIL	amadan.net/oficina/equipo/internal/headless	95.430s


receipt: test step 1m36.641s 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 1m35.08s amadan.net/oficina/equipo/internal/headless
receipt: slow test 26.08s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 22.11s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 14.34s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 11.38s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
receipt: slow test 11.22s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
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 466b6a0cf1d9448e6d750fbb92cbb4b867a90797 22.11s 58.48
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 40.90, cpu waiting 24.73%, memory waiting 0.00%, io waiting 0.28%
--- 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 1m46.86s 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 1m45.155s amadan.net/oficina/equipo/internal/headless
receipt: slow test 17.37s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 13.76s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 13.18s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 10.87s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
receipt: slow test 10.6s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsOpenCodeGoLimitRequired
machine: 32 CPUs, load 50.92, cpu waiting 30.05%, memory waiting 0.00%, io waiting 0.34%
--- 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 TestBrowserEmptyExplore
=== RUN   TestBrowserEmptyExplore
time=2026-11-20T13:16:15.753Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T13:16:15.753Z level=INFO msg="startup phase done" phase=state_lock took=235µs
time=2026-11-20T13:16:15.753Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T13:16:15.754Z level=INFO msg="startup phase done" phase=claim_roots took=92µs
time=2026-11-20T13:16:15.754Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T13:16:15.784Z level=INFO msg="startup phase done" phase=sweep took=30.44ms
time=2026-11-20T13:16:15.784Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T13:16:15.784Z level=INFO msg="startup phase done" phase=credentials took=101µs
time=2026-11-20T13:16:15.784Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T13:16:15.825Z level=INFO msg="startup phase done" phase=open_state took=40.416ms
time=2026-11-20T13:16:15.825Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T13:16:15.827Z level=INFO msg=connecting host=127.0.0.1:36697 protocol=28
time=2026-11-20T13:16:15.829Z level=INFO msg=connected host=127.0.0.1:36697 took=1.001ms
time=2026-11-20T13:16:15.829Z level=INFO msg="capabilities gathering"
time=2026-11-20T13:16:15.830Z level=INFO msg="capabilities gathered" took=443µs tags=linux,claude,go
time=2026-11-20T13:16:15.833Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T13:16:15.836Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-20T13:16:16.929Z 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: <nil>)
--- FAIL: TestBrowserEmptyExplore (5.81s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m35.403s
FAIL	amadan.net/oficina/equipo/internal/headless	95.732s


receipt: test step 1m36.931s 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 1m35.403s amadan.net/oficina/equipo/internal/headless
receipt: slow test 15.21s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
receipt: slow test 12.82s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 11.64s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 11.15s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 8.19s 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 '^TestBrowserEmptyExplore$' -count=1 ./internal/headless   (retry, once)
##############################################################################
FLAKE ./internal/headless:TestBrowserEmptyExplore browser-headless-rest 466b6a0cf1d9448e6d750fbb92cbb4b867a90797 5.81s 58.48
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 50.92, cpu waiting 30.05%, memory waiting 0.00%, io waiting 0.34%
--- 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.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 505ms amadan.net/oficina/equipo/internal/equipo
receipt: slow test 500ms amadan.net/oficina/equipo/internal/equipo TestBrowserPreviewBlocksNavigation
browser lane browser-rest: ./internal/idtest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserOficinaIDDoor)$' ./internal/idtest

receipt: test step 2.854s 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.652s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 1.65s 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.326s 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.992s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 1.99s 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|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 3m2.28s 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 3m0.732s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 17.49s amadan.net/oficina/equipo/internal/thintest TestBrowserAccessRequest
receipt: slow test 14.34s amadan.net/oficina/equipo/internal/thintest TestBrowserSettingsTeams
receipt: slow test 10.69s amadan.net/oficina/equipo/internal/thintest TestBrowserPlacementQuestionAndPending
receipt: slow test 9.06s amadan.net/oficina/equipo/internal/thintest TestBrowserThinkingCycles
receipt: slow test 8.5s amadan.net/oficina/equipo/internal/thintest TestBrowserInnerScreens
machine: 32 CPUs, load 14.36, cpu waiting 7.53%, memory waiting 0.00%, io waiting 0.08%
--- 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   (57s)
ok ./internal/headless TestHeadlessConnections/A5_cancel_and_sign_out 5.32s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.50s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 10.50s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 11.03s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 26.71s
+ 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   (70s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 16.44s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 23.09s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 12.09s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 15.83s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless   (24s)
ok ./internal/headless TestMixedVersions 21.91s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks   (2s)
ok ./internal/runner/checks TestCheckSandboxDeniedPathsTampering 0.80s
+ 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 62.97, cpu waiting 35.78%, memory waiting 0.00%, io waiting 0.63%
--- shard 24 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
shard 24: make runner-host
python3 scripts/runner-prerequisites.py
CGO_ENABLED=0 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks

receipt: test step 11.365s 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.562s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 241ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 84ms amadan.net/oficina/equipo/internal/runner/provider/codex
receipt: slow package 20ms amadan.net/oficina/equipo/internal/runner/provider
receipt: slow package 2ms amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow test 5.37s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.74s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 350ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 240ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 90ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxToolchain
CGO_ENABLED=0 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run '^TestNamespace' -count=1 ./internal/runner/containment
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run '^TestNamespace' -count=1 ./internal/runner/containment

receipt: test step 3.29s 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.898s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 270ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 180ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof
receipt: slow test 140ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 100ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicy
receipt: slow test 100ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryReusedPID
machine: 32 CPUs, load 17.05, cpu waiting 7.70%, memory waiting 0.00%, io waiting 1.62%
--- shard 25 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: runner-dead-references started 30s late; cpu waiting 35.8%, load 22.65
shard 25: make runner-dead-references lanes-check build vet fmt-check budget migration-check
python3 scripts/runner-dead-references.py
reference scan: 2467 text files, 2842 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: 88 directories within budget
CGO_ENABLED=0 go test ./internal/equipo -run '^TestMigrationModels$' -count=1
ok  	amadan.net/oficina/equipo/internal/equipo	2.464s
machine: 32 CPUs, load 63.05, cpu waiting 35.34%, memory waiting 0.00%, io waiting 0.70%
--- shard 26 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: staticcheck started 30s late; cpu waiting 35.8%, load 22.65
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 47.65, cpu waiting 26.82%, memory waiting 0.00%, io waiting 0.98%
--- shard 27 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: govulncheck started 30s late; cpu waiting 35.8%, load 22.65
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 32.37, cpu waiting 20.60%, memory waiting 0.00%, io waiting 1.12%
--- shard 28 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: gitleaks started 30s late; cpu waiting 35.8%, load 20.10
shard 28: make gitleaks
1:15PM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
1:15PM INF 1027 commits scanned.
1:15PM INF scanned ~60192297 bytes (60.19 MB) in 21.4s
1:15PM INF no leaks found
machine: 32 CPUs, load 51.84, cpu waiting 30.85%, memory waiting 0.00%, io waiting 0.88%
=== perf ===
go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -require TestPerfScreens,TestPerfBoot -tags perf -count=1 -p 1 -parallel 1 -run '^TestPerf' ./...
perf: GET /: median 1.119ms, worst 1.176ms, budget 150ms
perf: GET /api/runner/protocol: median 103µs, worst 133µs, budget 150ms
perf: GET /api/v1/account-setups/{id}: median 596µs, worst 662µs, budget 150ms
perf: GET /api/v1/accounts: median 418µs, worst 498µs, budget 150ms
perf: GET /api/v1/auth/devices: median 457µs, worst 488µs, budget 150ms
perf: GET /api/v1/budgets: median 505µs, worst 527µs, budget 150ms
perf: GET /api/v1/capabilities: median 265µs, worst 288µs, budget 150ms
perf: GET /api/v1/cards/{id}: median 1.263ms, worst 1.412ms, budget 150ms
perf: GET /api/v1/connections: median 766µs, worst 1.88ms, budget 150ms
perf: GET /api/v1/connections/{id}: median 547µs, worst 574µs, budget 150ms
perf: GET /api/v1/conversation: median 925µs, worst 976µs, budget 150ms
perf: GET /api/v1/conversation/cards: median 1.647ms, worst 1.694ms, budget 150ms
perf: GET /api/v1/coordinator: median 1.75ms, worst 1.87ms, budget 150ms
perf: GET /api/v1/invites/{id}: median 444µs, worst 468µs, budget 150ms
perf: GET /api/v1/journey: median 7.456ms, worst 7.748ms, budget 150ms
perf: GET /api/v1/me: median 419µs, worst 438µs, budget 150ms
perf: GET /api/v1/me/settings: median 525µs, worst 604µs, budget 150ms
perf: GET /api/v1/needs-you: median 7.423ms, worst 7.784ms, budget 150ms
perf: GET /api/v1/notifications: median 1.804ms, worst 1.902ms, budget 150ms
perf: GET /api/v1/onboarding: median 401µs, worst 431µs, budget 150ms
perf: GET /api/v1/people: median 457µs, worst 473µs, budget 150ms
perf: GET /api/v1/playbooks: median 612µs, worst 664µs, budget 150ms
perf: GET /api/v1/playbooks/{id}: median 542µs, worst 594µs, budget 150ms
perf: GET /api/v1/playbooks/{id}/template-diff: median 877µs, worst 924µs, budget 150ms
perf: GET /api/v1/preferences: median 769µs, worst 813µs, budget 150ms
perf: GET /api/v1/projects/{id}: median 461µs, worst 518µs, budget 150ms
perf: GET /api/v1/projects/{id}/settings: median 595µs, worst 655µs, budget 150ms
perf: GET /api/v1/roster: median 466µs, worst 493µs, budget 150ms
perf: GET /api/v1/runners/{id}: median 437µs, worst 473µs, budget 150ms
perf: GET /api/v1/specialists: median 8.228ms, worst 8.37ms, budget 150ms
perf: GET /api/v1/specialists/{id}: median 8.113ms, worst 8.292ms, budget 150ms
perf: GET /api/v1/specialists/{id}/template-diff: median 854µs, worst 953µs, budget 150ms
perf: GET /api/v1/tasks/{id}/plan: median 1.181ms, worst 1.332ms, budget 150ms
perf: GET /api/v1/tasks/{id}/thread: median 708µs, worst 807µs, budget 150ms
perf: GET /api/v1/teams: median 439µs, worst 459µs, budget 150ms
perf: GET /api/v1/templates: median 616µs, worst 669µs, budget 150ms
perf: GET /api/v1/templates/{id}: median 476µs, worst 530µs, budget 150ms
perf: GET /auth/callback: median 85µs, worst 123µs, budget 150ms
perf: GET /auth/devices/{id}: median 3.468ms, worst 3.633ms, budget 150ms
perf: GET /auth/verify: median 77µs, worst 117µs, budget 150ms
perf: GET /connections: median 3.961ms, worst 4.026ms, budget 150ms
perf: GET /conversation: median 8.124ms, worst 8.704ms, budget 150ms
perf: GET /conversation/connections: median 262µs, worst 302µs, budget 150ms
perf: GET /conversation/notebook: median 241µs, worst 261µs, budget 150ms
perf: GET /conversation/settings: median 4.069ms, worst 4.253ms, budget 150ms
perf: GET /conversation/settings/autonomy: median 3.534ms, worst 3.744ms, budget 150ms
perf: GET /conversation/settings/connections: median 6.194ms, worst 6.384ms, budget 150ms
perf: GET /conversation/settings/connections/add: median 6.67ms, worst 6.814ms, budget 150ms
perf: GET /conversation/settings/copy: median 3.718ms, worst 4.092ms, budget 150ms
perf: GET /conversation/settings/housekeeping: median 4.171ms, worst 4.317ms, budget 150ms
perf: GET /conversation/settings/machines: median 4.831ms, worst 7.307ms, budget 150ms
perf: GET /conversation/settings/machines/add: median 4.772ms, worst 4.903ms, budget 150ms
perf: GET /conversation/settings/notebook: median 3.424ms, worst 3.523ms, budget 150ms
perf: GET /conversation/settings/thinking: median 3.887ms, worst 4.037ms, budget 150ms
perf: GET /housekeeping: median 3.784ms, worst 4.009ms, budget 150ms
perf: GET /invites/new: median 589µs, worst 657µs, budget 150ms
perf: GET /invites/{id}: median 620µs, worst 658µs, budget 150ms
perf: GET /jobs: median 3.28ms, worst 3.38ms, budget 150ms
perf: GET /jobs/{id}: median 4.513ms, worst 4.651ms, budget 150ms
perf: GET /journey: median 11.912ms, worst 12.241ms, budget 150ms
perf: GET /nav/rail: median 3.251ms, worst 3.344ms, budget 150ms
perf: GET /needs-you: median 12.082ms, worst 12.698ms, budget 150ms
perf: GET /onboarding: median 4.235ms, worst 4.446ms, budget 150ms
perf: GET /people: median 3.592ms, worst 3.706ms, budget 150ms
perf: GET /playbook-suggestions/{suggestion}: median 5.021ms, worst 5.149ms, budget 150ms
perf: GET /playbooks: median 4.492ms, worst 4.657ms, budget 150ms
perf: GET /playbooks/new: median 4.582ms, worst 4.756ms, budget 150ms
perf: GET /playbooks/{id}: median 5.335ms, worst 5.497ms, budget 150ms
perf: GET /playbooks/{id}/edit: median 5.285ms, worst 5.35ms, budget 150ms
perf: GET /playbooks/{id}/template-diff: median 4.235ms, worst 4.412ms, budget 150ms
perf: GET /preferences: median 4.276ms, worst 6.905ms, budget 150ms
perf: GET /preferences/sources/{source}: median 4.247ms, worst 4.659ms, budget 150ms
perf: GET /projects: median 5.414ms, worst 5.59ms, budget 150ms
perf: GET /projects/accounts: median 3.786ms, worst 3.996ms, budget 150ms
perf: GET /projects/new: median 3.658ms, worst 3.773ms, budget 150ms
perf: GET /projects/{id}: median 10.564ms, worst 10.966ms, budget 150ms
perf: GET /projects/{id}/edit: median 3.732ms, worst 3.884ms, budget 150ms
perf: GET /runners/enrol: median 4.526ms, worst 4.682ms, budget 150ms
perf: GET /settings: median 3.53ms, worst 3.614ms, budget 150ms
perf: GET /settings/coordinator: median 5.638ms, worst 5.822ms, budget 150ms
perf: GET /settings/devices: median 3.558ms, worst 3.762ms, budget 150ms
perf: GET /settings/recovery: median 3.624ms, worst 3.705ms, budget 150ms
perf: GET /settings/recovery/release: median 3.695ms, worst 3.856ms, budget 150ms
perf: GET /settings/thinking: median 256µs, worst 271µs, budget 150ms
perf: GET /signin: median 314µs, worst 346µs, budget 150ms
perf: GET /specialists/new: median 3.449ms, worst 3.534ms, budget 150ms
perf: GET /specialists/{key}: median 11.067ms, worst 11.382ms, budget 150ms
perf: GET /specialists/{key}/edit: median 3.667ms, worst 3.765ms, budget 150ms
perf: GET /specialists/{key}/template-diff: median 3.813ms, worst 3.906ms, budget 150ms
perf: GET /tasks: median 5.319ms, worst 5.447ms, budget 150ms
perf: GET /tasks/new: median 3.357ms, worst 3.528ms, budget 150ms
perf: GET /tasks/{id}: median 5.739ms, worst 8.303ms, budget 150ms
perf: GET /tasks/{id}/merge: median 5.341ms, worst 5.653ms, budget 150ms
perf: GET /tasks/{id}/move: median 4.708ms, worst 4.834ms, budget 150ms
perf: GET /tasks/{id}/plan: median 5.806ms, worst 5.84ms, budget 150ms
perf: GET /tasks/{id}/preview: median 1.509ms, worst 1.64ms, budget 150ms
perf: GET /tasks/{id}/questions/{question}: median 5.504ms, worst 5.743ms, budget 150ms
perf: GET /tasks/{id}/rendered-change: median 5.075ms, worst 5.297ms, budget 150ms
perf: GET /tasks/{id}/rendered-change/{hash}.png: median 4.434ms, worst 4.635ms, budget 150ms
perf: GET /tasks/{id}/thread: median 8.304ms, worst 8.546ms, budget 150ms
perf: GET /team/{specialist}: median 4.501ms, worst 4.614ms, budget 150ms
perf: GET /teams: median 10.64ms, worst 12.694ms, budget 150ms
perf: GET /templates: median 3.644ms, worst 3.815ms, budget 150ms
perf: GET /usage: median 4.283ms, worst 4.451ms, budget 150ms
perf: GET /work: median 3.102ms, worst 3.198ms, budget 150ms
perf: cold boot: median 260ms of [259.956114ms 260.046099ms 262.396812ms], budget 500ms

receipt: test step 39.336s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 84 without tests, 0 failed
receipt: slow package 9.011s amadan.net/oficina/equipo/internal/equipotest
receipt: slow package 0s amadan.net/oficina/equipo/cmd/equipo-runner
receipt: slow package 0s amadan.net/oficina/equipo/cmd/equipo-tool-proxy
receipt: slow package 0s amadan.net/oficina/equipo/internal/advice
receipt: slow package 0s amadan.net/oficina/equipo/internal/attach
receipt: slow test 8.18s amadan.net/oficina/equipo/internal/equipotest TestPerfScreens
receipt: slow test 830ms amadan.net/oficina/equipo/internal/equipotest TestPerfBoot
=== cache ===
ci-box: build cache /home/ci/work/repos/oficina__equipo/cache/go-build: 3.38 GiB in 22214 files
ci-box: module cache /home/ci/work/repos/oficina__equipo/cache/go-mod: 0.84 GiB in 27329 files
diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt
index 0b5d80d0..bbc100b6 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 31881 - Native slice 2: push registrations, the push outbox and its rules, set aside, and the review fixes (one token a credential, sealed at rest, CARLOS outcomes); measured 31881/6818 source/test lines.
+size internal/equipo/chat 31887 - Native slice 2 review: preserve replaced activity memory and hurry its pending end on a late token; adds 6 source lines, measured 31887/6905 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.
diff --git a/internal/equipo/chat/push.go b/internal/equipo/chat/push.go
index c4702c71..d0e34bde 100644
--- a/internal/equipo/chat/push.go
+++ b/internal/equipo/chat/push.go
@@ -194,6 +194,16 @@ func (s *Store) RegisterActivity(ctx context.Context, person, credential string,
// pushCatchUp sends a running activity its task's whole state, to the
// device whose token just arrived, and remembers the activity running.
func (t *txn) pushCatchUp(person, credential string, k taskRecord) error {
+ m, err := push.LoadMemory(t.db, person, k.ID)
+ if err != nil {
+ return err
+ }
+ if m.Ended {
+ // A late token for a replaced activity can deliver its end, but
+ // must never revive the activity or enqueue a catch-up update.
+ t.pushed = true
+ return push.Hurry(t.db, credential, k.ID, t.now())
+ }
v, err := t.taskView(k)
if err != nil {
return err
@@ -206,10 +216,6 @@ func (t *txn) pushCatchUp(person, credential string, k taskRecord) error {
if _, err := t.enqueuePush(person, device, push.CatchUp(after)); err != nil {
return err
}
- m, err := push.LoadMemory(t.db, person, k.ID)
- if err != nil {
- return err
- }
now := t.now()
next := m.Remember(after)
if !m.Live() {
diff --git a/internal/equipo/chat/push_review_test.go b/internal/equipo/chat/push_review_test.go
new file mode 100644
index 00000000..4da857bd
--- /dev/null
+++ b/internal/equipo/chat/push_review_test.go
@@ -0,0 +1,87 @@
+package chat
+
+import (
+ "context"
+ "strings"
+ "testing"
+ "time"
+
+ "amadan.net/oficina/equipo/internal/equipo/push"
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+func TestPushLateTokenKeepsReplacedActivityEnded(t *testing.T) {
+ r := newPushRig(t)
+ for _, id := range []string{"tk1", "tk2", "tk3", "tk4"} {
+ k := r.task(id, "Task "+id, hkOwner)
+ r.step(&k, "s"+id, wire.SpecialistEngineering, wire.StepRunning)
+ }
+ r.must(r.s.db.G.Model(&push.OutboxRecord{}).Where("task_id = ? AND kind = ?", "tk1", push.KindActivityEnd).Update("next_at", r.now.Add(time.Hour)).Error)
+ r.must(r.activity("cr_phone", "tk1"))
+ live, err := push.LiveTasks(r.s.db.G, hkOwner)
+ r.must(err)
+ if len(live) != 3 || live[0].TaskID != "tk2" {
+ t.Fatalf("late token revived replaced activity: %d live", len(live))
+ }
+ for _, row := range r.outbox() {
+ if row.TaskID == "tk1" && row.Kind == push.KindActivityUpdate {
+ t.Fatal("replaced activity received catch-up")
+ }
+ if row.TaskID == "tk1" && row.Kind == push.KindActivityEnd && row.NextAt.After(r.now) {
+ t.Fatal("pending replacement end was not hurried")
+ }
+ }
+ k := r.task("tk5", "Task tk5", hkOwner)
+ r.step(&k, "stk5", wire.SpecialistEngineering, wire.StepRunning)
+ var ends []string
+ for _, row := range r.outbox() {
+ if row.Kind == push.KindActivityEnd && strings.Contains(row.Payload, `"outcome":"replaced"`) {
+ ends = append(ends, row.TaskID)
+ }
+ }
+ if strings.Join(ends, " ") != "tk1 tk2" {
+ t.Fatalf("unexpected replaced tasks: %v", ends)
+ }
+}
+
+type reviewPushTransport func(push.Message) (push.Result, error)
+
+func (f reviewPushTransport) Send(_ context.Context, m push.Message) (push.Result, error) {
+ return f(m)
+}
+
+func TestPushDelayedStartAcceptsTokenAndEnds(t *testing.T) {
+ r := newPushRig(t)
+ k := r.task("tk1", "Short task", hkOwner)
+ r.step(&k, "s1", wire.SpecialistEngineering, wire.StepRunning)
+ var start push.OutboxRecord
+ r.must(r.s.db.G.Where("kind = ?", push.KindActivityStart).Take(&start).Error)
+ delayed := true
+ ended := false
+ sender := r.s.PushSender(reviewPushTransport(func(m push.Message) (push.Result, error) {
+ if m.ID == start.ID && delayed {
+ return push.Result{Status: 503}, nil
+ }
+ if strings.Contains(string(m.Payload), `"event":"end"`) {
+ ended = true
+ }
+ return push.Result{Status: 200}, nil
+ }))
+ drain := func() { _, err := sender.Drain(r.ctx); r.must(err) }
+ drain()
+ r.stage(&k, wire.StageCancelled)
+ for i := 0; i < 14; i++ {
+ drain()
+ r.now = r.now.Add(time.Minute)
+ }
+ delayed = false
+ r.now = r.now.Add(2 * time.Minute)
+ drain()
+ if err := r.activity("cr_phone", "tk1"); err != nil {
+ t.Fatal("late token refused:", err)
+ }
+ drain()
+ if !ended {
+ t.Fatal("delayed start left an activity without its end")
+ }
+}
diff --git a/internal/equipo/migrations/0096_push_hold.sql b/internal/equipo/migrations/0096_push_hold.sql
new file mode 100644
index 00000000..35e28cc4
--- /dev/null
+++ b/internal/equipo/migrations/0096_push_hold.sql
@@ -0,0 +1,2 @@
+-- Keep CARLOS retry deadlines across drains, newly queued pushes and restarts.
+CREATE TABLE push_holds (id text PRIMARY KEY, until datetime);
diff --git a/internal/equipo/migrations/schema.sql b/internal/equipo/migrations/schema.sql
index 9aa2f83f..41707562 100644
--- a/internal/equipo/migrations/schema.sql
+++ b/internal/equipo/migrations/schema.sql
@@ -746,3 +746,5 @@ CREATE INDEX push_outbox_credential ON push_outbox(credential);
CREATE INDEX push_outbox_person ON push_outbox(person);
CREATE TABLE push_tasks (person text, task_id text, title text, tone text, stage text, needs_you text, specialist text, step_id text, activity text, started_at datetime, ended numeric, line_at datetime, updated_at datetime, PRIMARY KEY (person, task_id));
CREATE TABLE push_once (person text, key text, created_at datetime, PRIMARY KEY (person, key));
+-- Keep CARLOS retry deadlines across drains, newly queued pushes and restarts.
+CREATE TABLE push_holds (id text PRIMARY KEY, until datetime);
diff --git a/internal/equipo/push/review_test.go b/internal/equipo/push/review_test.go
new file mode 100644
index 00000000..fe66e89c
--- /dev/null
+++ b/internal/equipo/push/review_test.go
@@ -0,0 +1,289 @@
+package push
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "strings"
+ "testing"
+ "time"
+
+ "amadan.net/oficina/equipo/internal/wire"
+ "gorm.io/gorm"
+)
+
+func TestSenderInvalidationKeepsNewRegistration(t *testing.T) {
+ for _, target := range []string{TargetDevice, TargetStart, TargetActivity} {
+ for _, change := range []string{"rotated400", "rotated410", "renewed410", "unchanged400", "unchanged410", "rotated200", "unchanged200"} {
+ if strings.HasSuffix(change, "200") && target != TargetActivity {
+ continue
+ }
+ t.Run(target+"/"+change, func(t *testing.T) {
+ r := newRig(t)
+ kind := KindAlert
+ if target == TargetStart {
+ kind = KindActivityStart
+ }
+ if target == TargetActivity {
+ kind = KindActivityUpdate
+ if strings.HasSuffix(change, "200") {
+ kind = KindActivityEnd
+ }
+ r.must(RegisterActivity(r.d.G, testBox, "p@example.com", "cr1", "tk1", actToken, r.now))
+ }
+ r.enqueue(kind, target, "", false)
+ r.answer = func(m Message) (Result, error) {
+ if !strings.HasPrefix(change, "unchanged") {
+ token := m.Token
+ if strings.HasPrefix(change, "rotated") {
+ token = strings.Repeat("dd", 32)
+ }
+ r.must(r.d.G.Transaction(func(tx *gorm.DB) error {
+ if target == TargetActivity {
+ return RegisterActivity(tx, testBox, "p@example.com", "cr1", "tk1", token, at.Add(time.Second))
+ }
+ in := wire.RegisterPush{Token: devToken, StartToken: startToken, Platform: wire.PlatformIOS, Environment: wire.APNsDevelopment}
+ if target == TargetStart {
+ in.StartToken = token
+ } else {
+ in.Token = token
+ }
+ _, err := Register(tx, testBox, "p@example.com", "cr1", in, at.Add(time.Second))
+ return err
+ }))
+ }
+ if strings.HasSuffix(change, "200") {
+ return Result{Status: 200}, nil
+ }
+ if strings.HasSuffix(change, "400") {
+ return Result{Status: 400, Reason: "BadDeviceToken"}, nil
+ }
+ return Result{Status: 410, Reason: "Unregistered", Timestamp: at}, nil
+ }
+ r.drain()
+ var n int64
+ if target == TargetActivity {
+ r.must(r.d.G.Model(&ActivityToken{}).Count(&n).Error)
+ } else {
+ var regs []Registration
+ r.must(r.d.G.Find(&regs).Error)
+ for _, reg := range regs {
+ if target == TargetDevice || reg.StartToken != "" {
+ n++
+ }
+ }
+ }
+ want := int64(1)
+ if strings.HasPrefix(change, "unchanged") {
+ want = 0
+ }
+ if n != want {
+ t.Fatalf("registrations = %d, want %d", n, want)
+ }
+ })
+ }
+ }
+}
+
+func TestSenderQuarantinesUnreadableRows(t *testing.T) {
+ for _, broken := range []string{"payload", "token"} {
+ t.Run(broken, func(t *testing.T) {
+ r := newRig(t)
+ for i := 0; i < PassSize; i++ {
+ r.enqueue(KindAlert, TargetDevice, fmt.Sprint(i), false)
+ }
+ if broken == "payload" {
+ r.must(r.d.G.Model(&OutboxRecord{}).Where("1 = 1").Update("payload", "unreadable").Error)
+ } else {
+ r.must(r.d.G.Model(&Registration{}).Where("credential = ?", "cr1").Update("token", "unreadable").Error)
+ }
+ original := r.s.Box.Open
+ r.s.Box.Open = func(domain, sealed string, v any) error {
+ if sealed == "unreadable" {
+ return errors.New("private token or payload must not escape")
+ }
+ return original(domain, sealed, v)
+ }
+ var logs []string
+ r.s.Errorf = func(msg string, args ...any) { logs = append(logs, fmt.Sprint(msg, args)) }
+ r.drain()
+ for _, row := range r.rows() {
+ if row.State != StateFailed || row.Reason != "unreadable_"+broken {
+ t.Fatalf("unreadable row not quarantined: state=%s reason=%s", row.State, row.Reason)
+ }
+ }
+ if strings.Contains(strings.Join(logs, " "), "private") {
+ t.Fatal("decryption error leaked")
+ }
+ if broken == "token" {
+ _, err := Register(r.d.G, testBox, "p@example.com", "cr1", wire.RegisterPush{Token: devToken, Platform: wire.PlatformIOS, Environment: wire.APNsDevelopment}, r.now)
+ r.must(err)
+ }
+ r.now = r.now.Add(time.Second)
+ r.enqueue(KindAlert, TargetDevice, "valid", false)
+ if r.drain() != 1 {
+ t.Fatal("valid row starved")
+ }
+ })
+ }
+}
+
+func TestSenderClaimsCurrentBadge(t *testing.T) {
+ r := newRig(t)
+ r.enqueue(KindBadge, TargetDevice, "badge", true)
+ stale := r.rows()[0]
+ latest := stale
+ latest.Payload = `{"aps":{"badge":7}}`
+ latest.Priority = 5
+ r.must(Enqueue(r.d.G, testBox, latest, true))
+ _, err := r.s.one(context.Background(), stale)
+ r.must(err)
+ if len(r.sent) != 1 || string(r.sent[0].Payload) != latest.Payload || r.sent[0].Priority != 5 {
+ t.Fatal("sent stale coalesced badge")
+ }
+}
+
+func TestSenderEndWaitsForDelayedStart(t *testing.T) {
+ r := newRig(t)
+ r.enqueue(KindActivityStart, TargetStart, "start", false)
+ r.answer = func(Message) (Result, error) { return Result{Status: 503}, nil }
+ r.drain()
+ r.now = r.now.Add(time.Second)
+ r.enqueue(KindActivityEnd, TargetActivity, "end", false)
+ for r.now.Before(at.Add(AppleRetry)) {
+ r.drain()
+ var end OutboxRecord
+ r.must(r.d.G.Where("kind = ?", KindActivityEnd).Take(&end).Error)
+ if end.State != StatePending {
+ t.Fatal("end abandoned before delayed start")
+ }
+ r.now = end.NextAt
+ if r.now.After(at.Add(AppleRetry)) {
+ r.now = at.Add(AppleRetry)
+ }
+ }
+ r.now = at.Add(AppleRetry)
+ r.answer = func(Message) (Result, error) { return Result{Status: 200}, nil }
+ r.drain()
+ r.must(RegisterActivity(r.d.G, testBox, "p@example.com", "cr1", "tk1", actToken, r.now))
+ r.must(Hurry(r.d.G, "cr1", "tk1", r.now))
+ if r.drain() != 1 {
+ t.Fatal("late activity was not ended")
+ }
+}
+
+func TestSenderThrottlesAlreadyReadBatch(t *testing.T) {
+ r := newRig(t)
+ for i := 0; i < 3; i++ {
+ r.enqueue(KindAlert, TargetDevice, fmt.Sprint(i), false)
+ }
+ r.answer = func(Message) (Result, error) { return Result{Status: 429, Reason: "TooManyRequests"}, nil }
+ r.drain()
+ if len(r.sent) != 1 {
+ t.Fatalf("sent %d rows through token throttle", len(r.sent))
+ }
+ r.drain()
+ if len(r.sent) != 1 {
+ t.Fatal("next drain ignored token throttle")
+ }
+ r.now = r.now.Add(FirstRetry)
+ r.answer = func(Message) (Result, error) { return Result{Status: 200}, nil }
+ if r.drain() != 3 {
+ t.Fatal("throttle did not expire")
+ }
+}
+
+func TestSenderPlatformHoldAcrossDrains(t *testing.T) {
+ for _, code := range []string{"PAUSED", "RATE", "PUSHER_UNAVAILABLE", "APNS_UNAVAILABLE"} {
+ t.Run(code, func(t *testing.T) {
+ r := newRig(t)
+ r.enqueue(KindAlert, TargetDevice, "first", false)
+ r.answer = func(Message) (Result, error) {
+ return Result{Refused: 503, Code: code, RetryAfter: 300 * time.Second}, nil
+ }
+ r.drain()
+ r.enqueue(KindBadge, TargetDevice, "new", false)
+ // A fresh sender must observe the same persisted platform hold.
+ old := r.s
+ r.s = &Sender{Write: old.Write, Transport: old.Transport, Check: old.Check, Box: old.Box, Now: old.Now}
+ r.now = at.Add(299 * time.Second)
+ r.drain()
+ if len(r.sent) != 1 {
+ t.Fatal("platform hold forgotten across drains")
+ }
+ r.now = at.Add(300 * time.Second)
+ r.answer = func(Message) (Result, error) { return Result{Status: 200}, nil }
+ if r.drain() != 2 {
+ t.Fatal("platform hold did not expire")
+ }
+ })
+ }
+}
+
+func TestActivityTokenDoesNotHurryDelayedStart(t *testing.T) {
+ r := newRig(t)
+ r.enqueue(KindActivityStart, TargetStart, "start", false)
+ r.answer = func(Message) (Result, error) { return Result{Status: 503}, nil }
+ r.drain()
+ r.enqueue(KindActivityEnd, TargetActivity, "end", false)
+ r.must(Hurry(r.d.G, "cr1", "tk1", r.now))
+ var start OutboxRecord
+ r.must(r.d.G.Where("kind = ?", KindActivityStart).Take(&start).Error)
+ if !start.NextAt.Equal(at.Add(AppleRetry)) {
+ t.Fatal("token arrival bypassed Apple's retry delay")
+ }
+}
+
+func TestSenderLastAttemptStillThrottlesBatch(t *testing.T) {
+ r := newRig(t)
+ r.enqueue(KindAlert, TargetDevice, "first", false)
+ r.must(r.d.G.Model(&OutboxRecord{}).Where("1 = 1").Update("attempts", MaxAttempts-1).Error)
+ r.now = r.now.Add(time.Second)
+ r.enqueue(KindAlert, TargetDevice, "second", false)
+ r.answer = func(Message) (Result, error) { return Result{Status: 429}, nil }
+ r.drain()
+ if len(r.sent) != 1 {
+ t.Fatal("exhausted row bypassed device throttle")
+ }
+}
+
+func TestSenderMissingTokenWaitIsBounded(t *testing.T) {
+ r := newRig(t)
+ r.enqueue(KindActivityEnd, TargetActivity, "end", false)
+ r.drain()
+ if r.rows()[0].Attempts != 0 {
+ t.Fatal("missing token spent a delivery attempt")
+ }
+ r.now = Expiration(KindActivityEnd, at).Add(-time.Second)
+ r.drain()
+ if r.rows()[0].State != StatePending {
+ t.Fatal("end abandoned inside its lifetime")
+ }
+ r.now = Expiration(KindActivityEnd, at)
+ r.drain()
+ if r.rows()[0].State != StateDropped {
+ t.Fatal("missing token waited beyond expiry")
+ }
+}
+
+func TestSenderPlatformHoldLookupFailsClosed(t *testing.T) {
+ r := newRig(t)
+ r.enqueue(KindAlert, TargetDevice, "one", false)
+ r.must(r.d.G.Migrator().DropTable(&HoldRecord{}))
+ r.drain()
+ if len(r.sent) != 0 || r.rows()[0].State != StatePending {
+ t.Fatal("unknown platform hold treated as ready")
+ }
+}
+
+func TestSenderPlatformHoldCannotBeShortened(t *testing.T) {
+ r := newRig(t)
+ r.must(holdPlatform(r.d.G, at.Add(300*time.Second)))
+ r.must(holdPlatform(r.d.G, at.Add(time.Second)))
+ r.enqueue(KindAlert, TargetDevice, "one", false)
+ r.now = at.Add(2 * time.Second)
+ r.drain()
+ if len(r.sent) != 0 {
+ t.Fatal("shorter overlapping response released platform hold")
+ }
+}
diff --git a/internal/equipo/push/sender.go b/internal/equipo/push/sender.go
index 479ebe8a..edd8b0c2 100644
--- a/internal/equipo/push/sender.go
+++ b/internal/equipo/push/sender.go
@@ -133,10 +133,19 @@ func (s *Sender) one(ctx context.Context, r OutboxRecord) (Verdict, error) {
claimed := false
err := s.Write(ctx, func(tx *gorm.DB) error {
now := s.Now()
- res := tx.Model(&OutboxRecord{}).Where("id = ? AND state = ? AND (lease_until IS NULL OR lease_until < ?)", r.ID, StatePending, now).Select("lease_until").Updates(map[string]any{"lease_until": now.Add(Lease)})
+ held, err := platformHeld(tx, now)
+ if err != nil || held {
+ return err
+ }
+ res := tx.Model(&OutboxRecord{}).Where("id = ? AND state = ? AND next_at <= ? AND (lease_until IS NULL OR lease_until < ?)", r.ID, StatePending, now, now).Select("lease_until").Updates(map[string]any{"lease_until": now.Add(Lease)})
if res.Error != nil || res.RowsAffected != 1 {
return res.Error
}
+ // A coalescing write or another sender may have changed this row
+ // since Drain read its batch. Use the row we just claimed.
+ if err := tx.Where("id = ?", r.ID).Take(&r).Error; err != nil {
+ return err
+ }
if !now.Before(Expiration(r.Kind, r.CreatedAt)) {
return finish(tx, r.ID, StateDropped, Result{Reason: "expired"}, now)
}
@@ -156,18 +165,25 @@ func (s *Sender) one(ctx context.Context, r OutboxRecord) (Verdict, error) {
}
token, env, err := s.token(tx, r)
if errors.Is(err, ErrNoActivity) {
- if r.Kind == KindActivityEnd && r.Attempts+1 < MaxAttempts {
- // The app may not have sent the activity's token yet.
- return retry(tx, r, now, Backoff(r.Attempts+1), true, Result{Reason: "no_token"})
+ if r.Kind == KindActivityEnd {
+ // An end is created after its start and updates, with the
+ // same lifetime. Wait to expiry, without spending delivery
+ // attempts, so an Apple-delayed start can still be ended.
+ wait := min(max(FirstRetry, now.Sub(r.CreatedAt)), MaxRetry)
+ wait = min(wait, Expiration(r.Kind, r.CreatedAt).Sub(now))
+ return retry(tx, r, now, wait, false, Result{Reason: "no_token"})
}
return finish(tx, r.ID, StateDropped, Result{Reason: "no_token"}, now)
}
+ if errors.Is(err, errUnreadableToken) {
+ return finish(tx, r.ID, StateFailed, Result{Reason: "unreadable_token"}, now)
+ }
if err != nil {
return err
}
payload, err := s.Box.OpenPayload(r.Payload)
if err != nil {
- return err
+ return finish(tx, r.ID, StateFailed, Result{Reason: "unreadable_payload"}, now)
}
if len(payload) > MaxPayload {
return finish(tx, r.ID, StateFailed, Result{Reason: "payload_too_large"}, now)
@@ -196,26 +212,29 @@ func (s *Sender) one(ctx context.Context, r OutboxRecord) (Verdict, error) {
now := s.Now()
switch v.Act {
case ActHold:
+ if err := holdPlatform(tx, now.Add(v.Wait)); err != nil {
+ return err
+ }
return retry(tx, r, now, v.Wait, false, result)
case ActRetry:
- if r.Attempts+1 >= MaxAttempts {
- return finish(tx, r.ID, StateFailed, result, now)
- }
if v.Device {
// Apple throttles this device: its other rows wait too.
if err := tx.Model(&OutboxRecord{}).Where("credential = ? AND state = ? AND lease_until IS NULL AND next_at < ?", r.Credential, StatePending, now.Add(v.Wait)).Select("next_at").Updates(map[string]any{"next_at": now.Add(v.Wait)}).Error; err != nil {
return err
}
}
+ if r.Attempts+1 >= MaxAttempts {
+ return finish(tx, r.ID, StateFailed, result, now)
+ }
return retry(tx, r, now, v.Wait, true, result)
case ActGone:
- if err := s.forgetToken(tx, r, result.Timestamp); err != nil {
+ if err := s.forgetToken(tx, r, m.Token, result.Timestamp); err != nil {
return err
}
return finish(tx, r.ID, StateFailed, result, now)
case ActSent:
if r.Kind == KindActivityEnd {
- if err := tx.Where("credential = ? AND task_id = ?", r.Credential, r.TaskID).Delete(&ActivityToken{}).Error; err != nil {
+ if err := s.forgetToken(tx, r, m.Token, time.Time{}); err != nil {
return err
}
}
@@ -276,27 +295,10 @@ func (s *Sender) token(tx *gorm.DB, r OutboxRecord) (token, env string, err erro
sealed = a.Token
}
token, err = s.Box.open(domainToken, sealed)
- return token, reg.Environment, err
-}
-
-// forgetToken deletes the token Apple said is gone: the device's
-// registration, its push-to-start token, or one activity's. A device
-// registration newer than Apple's timestamp (a 410's last-valid time) is
-// a later one, and stays.
-func (s *Sender) forgetToken(tx *gorm.DB, r OutboxRecord, apple time.Time) error {
- switch r.Target {
- case TargetStart:
- return tx.Model(&Registration{}).Where("credential = ?", r.Credential).Select("start_token").Updates(map[string]any{"start_token": ""}).Error
- case TargetActivity:
- return tx.Where("credential = ? AND task_id = ?", r.Credential, r.TaskID).Delete(&ActivityToken{}).Error
- }
- if !apple.IsZero() {
- var n int64
- if err := tx.Model(&Registration{}).Where("credential = ? AND updated_at > ?", r.Credential, apple).Count(&n).Error; err != nil || n > 0 {
- return err
- }
+ if err != nil {
+ return "", "", errUnreadableToken
}
- return ForgetCredential(tx, r.Credential)
+ return token, reg.Environment, nil
}
// retry puts a row back for wait, keeping the answer if there was one;
diff --git a/internal/equipo/push/sender_state.go b/internal/equipo/push/sender_state.go
new file mode 100644
index 00000000..cc58126f
--- /dev/null
+++ b/internal/equipo/push/sender_state.go
@@ -0,0 +1,80 @@
+package push
+
+import (
+ "errors"
+ "time"
+
+ "gorm.io/gorm"
+ "gorm.io/gorm/clause"
+)
+
+// HoldRecord keeps the platform's retry deadline across passes and sender
+// restarts. The single platform row covers new and already queued pushes.
+type HoldRecord struct {
+ ID string `gorm:"primaryKey"`
+ Until time.Time
+}
+
+func (HoldRecord) TableName() string { return "push_holds" }
+
+func platformHeld(tx *gorm.DB, now time.Time) (bool, error) {
+ var n int64
+ err := tx.Model(&HoldRecord{}).Where("id = ? AND until > ?", "platform", now).Count(&n).Error
+ return n > 0, err
+}
+
+func holdPlatform(tx *gorm.DB, until time.Time) error {
+ return tx.Clauses(clause.OnConflict{
+ Columns: []clause.Column{{Name: "id"}},
+ DoUpdates: clause.Assignments(map[string]any{"until": gorm.Expr("MAX(push_holds.until, excluded.until)")}),
+ }).Create(&HoldRecord{ID: "platform", Until: until}).Error
+}
+
+// Never expose an opener's error: it can include token or payload text.
+var errUnreadableToken = errors.New("push: unreadable token")
+
+// forgetToken only invalidates the token this send used. A renewal after
+// Apple's last-valid timestamp also survives, for every token type.
+// Compare opened tokens in Go; neither tokens nor their hashes enter SQL.
+func (s *Sender) forgetToken(tx *gorm.DB, r OutboxRecord, sent string, apple time.Time) error {
+ var sealed string
+ var registered time.Time
+ if r.Target == TargetActivity {
+ var a ActivityToken
+ err := tx.Where("credential = ? AND task_id = ?", r.Credential, r.TaskID).Take(&a).Error
+ if errors.Is(err, gorm.ErrRecordNotFound) {
+ return nil
+ }
+ if err != nil {
+ return err
+ }
+ sealed, registered = a.Token, a.CreatedAt
+ } else {
+ var reg Registration
+ err := tx.Where("credential = ?", r.Credential).Take(&reg).Error
+ if errors.Is(err, gorm.ErrRecordNotFound) {
+ return nil
+ }
+ if err != nil {
+ return err
+ }
+ sealed, registered = reg.Token, reg.UpdatedAt
+ if r.Target == TargetStart {
+ sealed = reg.StartToken
+ }
+ }
+ current, err := s.Box.open(domainToken, sealed)
+ if err != nil {
+ return errUnreadableToken
+ }
+ if current != sent || !apple.IsZero() && registered.After(apple) {
+ return nil
+ }
+ switch r.Target {
+ case TargetStart:
+ return tx.Model(&Registration{}).Where("credential = ?", r.Credential).Select("start_token").Updates(map[string]any{"start_token": ""}).Error
+ case TargetActivity:
+ return tx.Where("credential = ? AND task_id = ?", r.Credential, r.TaskID).Delete(&ActivityToken{}).Error
+ }
+ return ForgetCredential(tx, r.Credential)
+}
diff --git a/internal/equipo/push/sender_test.go b/internal/equipo/push/sender_test.go
index 15ab6fa0..cc242272 100644
--- a/internal/equipo/push/sender_test.go
+++ b/internal/equipo/push/sender_test.go
@@ -275,7 +275,7 @@ func TestSenderActivityTokens(t *testing.T) {
r.drain()
rows := r.rows()
// Ordered by kind: the end, then the update.
- if len(r.sent) != 0 || rows[1].State != StateDropped || rows[1].Reason != "no_token" || rows[0].State != StatePending || rows[0].Attempts != 1 {
+ if len(r.sent) != 0 || rows[1].State != StateDropped || rows[1].Reason != "no_token" || rows[0].State != StatePending || rows[0].Attempts != 0 {
t.Fatalf("rows %+v", rows)
}
r.must(r.d.G.Transaction(func(tx *gorm.DB) error {
diff --git a/internal/equipo/push/store.go b/internal/equipo/push/store.go
index 488c70ad..56c0410f 100644
--- a/internal/equipo/push/store.go
+++ b/internal/equipo/push/store.go
@@ -14,7 +14,7 @@ import (
// Models are the push tables, for the migration check (chat.Models
// carries them).
-var Models = []any{&Registration{}, &ActivityToken{}, &OutboxRecord{}, &MemoryRecord{}, &OnceRecord{}}
+var Models = []any{&Registration{}, &ActivityToken{}, &OutboxRecord{}, &MemoryRecord{}, &OnceRecord{}, &HoldRecord{}}
// Registration is a paired device's push registration, one per device
// credential: a new one replaces it, and one APNs token belongs to one
@@ -239,10 +239,10 @@ func Waiting(tx *gorm.DB, credential, task string) (bool, error) {
return n > 0, err
}
-// Hurry makes what waits for the device about the task due now: its
-// activity's token just arrived.
+// Hurry makes activity updates and ends due now: their token just arrived.
+// A start's Apple retry deadline must stay intact.
func Hurry(tx *gorm.DB, credential, task string, now time.Time) error {
- return tx.Model(&OutboxRecord{}).Where("credential = ? AND task_id = ? AND state = ? AND lease_until IS NULL", credential, task, StatePending).Select("next_at").Updates(map[string]any{"next_at": now}).Error
+ return tx.Model(&OutboxRecord{}).Where("credential = ? AND task_id = ? AND target = ? AND state = ? AND lease_until IS NULL", credential, task, TargetActivity, StatePending).Select("next_at").Updates(map[string]any{"next_at": now}).Error
}
// ForgetCredential deletes a device's registration, its activity tokens