oficina / equipo Public

Live Activities name their team; tokens go only to that origin

Astra's fourth review: device-side ownership was lost on relaunch and a
cold launch bound activities to the session before restore. The server
now puts its origin in push-to-start attributes; the device sends an
activity's token only to the account at that origin, checked when sent,
and never sends one that names no origin.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev fffd14451411c02e605f28ad00510792f6bcb36e parent 78fb282
15 files changed, +105 −80
  • .rastrillo/budgets.txt +2 −2
  • docs/api/equipo-v1.md +1 −1
  • internal/equipo/chat/push.go +1 −0
  • internal/equipo/chat/push_test.go +8 −1
  • internal/equipo/push/payload.go +1 −1
  • internal/equipo/push/payload_test.go +1 −0
  • internal/equipo/push/rules.go +2 −0
  • internal/equipo/push/testdata/activity-start.json +2 −1
  • internal/wire/push.go +3 −0
  • native/apple/Sources/EquipoActivity/TaskActivity.swift +5 −2
  • native/apple/Sources/EquipoKit/Push/LiveActivities.swift +3 −20
  • native/apple/Sources/EquipoKit/Push/PushRegistrar.swift +27 −16
  • native/apple/Tests/EquipoKitTests/Fixtures/push/activity-start.json +2 −1
  • native/apple/Tests/EquipoKitTests/PushTests.swift +45 −34
  • native/apple/Tests/EquipoKitTests/Support.swift +2 −1

CI cancelled — superseded by a newer push — run details

CI log
=== prepare ===
ci-box: machine: aarch64, 32 CPUs, 62 GiB memory, kernel 7.0.0-1017-aws
ci-box: python 3.12.3; Docker version 29.1.3, build 29.1.3-0ubuntu3~24.04.2
ci-box: user namespaces allowed: 233151
ci-box: cgroup: cgroup2fs
ci-box: disk /home/ci/work/repos/oficina__equipo/wt/native__push: Type  Size Avail | ext4   96G   86G
ci-box: disk /home/ci/.cache/equipo-ci-box: Type  Size Avail | ext4   96G   86G
ci-box: bwrap: fetched and verified in 0.3s
ci-box: claude: fetched and verified in 1.5s
ci-box: codex: fetched and verified in 4.5s
ci-box: codex-code-mode-host: fetched and verified in 1.5s
ci-box: libwrap: fetched and verified in 0.3s
ci-box: socat: fetched and verified in 0.3s
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
ci-box: image pulled in 9.8s
ci-box: pi: installed and verified in 7.5s
ci-box: opencode: installed and verified in 2.3s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 8.6s
ci-box: clone deepened in 3.2s
ci-box: file times set from content: 2794 files, 184 directories
ci-box: ready in 17.8s
=== 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.242s
=== compile ===
go build ./...
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py compile
+ go build -tags testbuild ./...
  4.4s
+ go list -export -test -tags testbuild -f  ./...
  4.8s
+ 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 1m30.625s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m28.362s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m28.36s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 72.61, cpu waiting 43.12%, memory waiting 0.00%, io waiting 0.49%
--- 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 1m33.727s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m31.932s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m31.93s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 72.80, cpu waiting 43.01%, memory waiting 0.00%, io waiting 0.46%
--- shard 2 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-connections: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadlessConnections$|^TestHeadlessTokenPasteEndToEnd$|^TestHeadlessTokenConnection$' ./internal/headless

receipt: test step 1m35.369s 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 1m33.412s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m22.13s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 6.35s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 4.93s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 69.37, cpu waiting 43.01%, memory waiting 0.00%, io waiting 0.44%
--- shard 3 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-mac: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestMacWorker$|^TestHeadlessAttachments$|^TestHeadlessPrewarm$|^TestHeadless$/^1_first_token$|^TestHeadless$/^6_quick_messages$|^TestHeadless$/^8_instance_restart$|^TestHeadless$/^3_runner_offline$' ./internal/headless

receipt: test step 1m29.786s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m27.745s amadan.net/oficina/equipo/internal/headless
receipt: slow test 45.35s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 22.14s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 10.57s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
receipt: slow test 9.68s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
machine: 32 CPUs, load 72.61, cpu waiting 43.12%, memory waiting 0.00%, io waiting 0.49%
--- 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

amadan: job cancelled — a newer push superseded it
--- 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

amadan: job cancelled — a newer push superseded it
--- 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

amadan: job cancelled — a newer push superseded it
--- 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 1m24.844s 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 1m22.821s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 9.18s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 5.06s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotOffered
receipt: slow test 4.41s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
receipt: slow test 2.35s amadan.net/oficina/equipo/internal/thintest TestContractPreview
receipt: slow test 2.35s amadan.net/oficina/equipo/internal/thintest TestContractPublishNameTaken
machine: 32 CPUs, load 75.01, cpu waiting 43.68%, memory waiting 0.00%, io waiting 0.53%
--- shard 8 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-thin: ./internal/runner/thin
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./internal/runner/thin

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

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

receipt: test step 1m1.318s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m0.006s amadan.net/oficina/equipo/internal/runner
receipt: slow test 49.94s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 43.51s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.38s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.67s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 63.59, cpu waiting 39.96%, memory waiting 0.00%, io waiting 0.79%
--- shard 11 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-rest: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^TestDirectBugWorkflow$|^TestEnrolKeepsTheRole$|^TestPlanWorkflowCandidateOrder$|^TestPlanWorkflowFeature$|^TestCoordinatorRecoveryCallRefusalKeepsServing$|^TestCoordinatorRefusalMatrix$' ./internal/runner

receipt: test step 35.882s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 34.962s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.11s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.39s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.13s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 2.55s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 1.61s amadan.net/oficina/equipo/internal/runner TestCoordinatorTransientRefusalKeepsServing
machine: 32 CPUs, load 39.39, cpu waiting 20.52%, memory waiting 0.00%, io waiting 1.22%
--- shard 12 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-a started 30s late; cpu waiting 36.3%, load 22.52
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.643s 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.572s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 26.88s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 26.86s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 24.63s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 22.26s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
receipt: slow test 22.12s amadan.net/oficina/equipo/internal/equipotest TestAuthoritySnapshotChanges
machine: 32 CPUs, load 69.37, cpu waiting 43.01%, memory waiting 0.00%, io waiting 0.44%
--- shard 13 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-e started 30s late; cpu waiting 36.3%, load 22.52
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

amadan: job cancelled — a newer push superseded it
--- shard 14 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-r started 30s late; cpu waiting 36.3%, load 27.84
test lane equipotest-r: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestR' ./internal/equipotest

amadan: job cancelled — a newer push superseded it
--- shard 15 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-rest started 30s late; cpu waiting 36.3%, load 22.52
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.576s 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.441s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 24.52s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 23.78s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 23.74s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 22.03s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsUpgrade
receipt: slow test 21.9s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsConcurrentRevision
machine: 32 CPUs, load 69.37, cpu waiting 42.19%, memory waiting 0.00%, io waiting 0.43%
--- 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 36.3%, load 22.52
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.868s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 51.003s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 3.67s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 3.57s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 1.52s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3A
receipt: slow test 1.49s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.3s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorDefinitiveRefusalReleasesQueue
machine: 32 CPUs, load 75.01, cpu waiting 43.49%, memory waiting 0.00%, io waiting 0.56%
--- shard 17 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: rest started 30s late; cpu waiting 36.3%, load 22.52
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/copydesk: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/release: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/equipo/team: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/forge: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/webread: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runnerproto: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/workspace: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/checks: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/containment: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/opencode: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/pi: its inputs changed

amadan: job cancelled — a newer push superseded it
--- 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-20T15:15:59.850Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T15:15:59.850Z level=INFO msg="startup phase done" phase=state_lock took=103µs
time=2026-11-20T15:15:59.850Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T15:15:59.850Z level=INFO msg="startup phase done" phase=claim_roots took=83µs
time=2026-11-20T15:15:59.850Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T15:15:59.878Z level=INFO msg="startup phase done" phase=sweep took=27.188ms
time=2026-11-20T15:15:59.878Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T15:15:59.878Z level=INFO msg="startup phase done" phase=credentials took=234µs
time=2026-11-20T15:15:59.878Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T15:15:59.920Z level=INFO msg="startup phase done" phase=open_state took=42.271ms
time=2026-11-20T15:15:59.921Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T15:15:59.921Z level=INFO msg=connecting host=127.0.0.1:40245 protocol=28
time=2026-11-20T15:15:59.924Z level=INFO msg=connected host=127.0.0.1:40245 took=2.49ms
time=2026-11-20T15:15:59.924Z level=INFO msg="capabilities gathering"
time=2026-11-20T15:15:59.925Z level=INFO msg="capabilities gathered" took=1.036ms tags=linux,claude,go
time=2026-11-20T15:15:59.929Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T15:15:59.937Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-20T15:16:02.485Z 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.39s)

--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
=== RUN   TestBrowserChatSendStaysOnPage
time=2026-11-20T15:16:06.257Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T15:16:06.257Z level=INFO msg="startup phase done" phase=state_lock took=341µs
time=2026-11-20T15:16:06.257Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T15:16:06.257Z level=INFO msg="startup phase done" phase=claim_roots took=180µs
time=2026-11-20T15:16:06.258Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T15:16:06.287Z level=INFO msg="startup phase done" phase=sweep took=29.817ms
time=2026-11-20T15:16:06.287Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T15:16:06.288Z level=INFO msg="startup phase done" phase=credentials took=136µs
time=2026-11-20T15:16:06.288Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T15:16:06.326Z level=INFO msg="startup phase done" phase=open_state took=38.577ms
time=2026-11-20T15:16:06.327Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T15:16:06.328Z level=INFO msg=connecting host=127.0.0.1:44969 protocol=28
time=2026-11-20T15:16:06.329Z level=INFO msg=connected host=127.0.0.1:44969 took=1.886ms
time=2026-11-20T15:16:06.330Z level=INFO msg="capabilities gathering"
time=2026-11-20T15:16:06.331Z level=INFO msg="capabilities gathered" took=1.333ms tags=linux,claude,go
time=2026-11-20T15:16:06.332Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T15:16:06.337Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-20T15:16:08.867Z level=INFO msg="connection checked" connection=claude-1 state=healthy
    browser_test.go:108: waiting for [...document.querySelectorAll('[equipo-message="incoming"] [equipo-markdown]:not([data-stream-text])')].some(e=>e.textContent.includes('fake coordinator')): context deadline exceeded (last evaluation: context deadline exceeded)
--- FAIL: TestBrowserChatSendStaysOnPage (6.53s)

--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
=== RUN   TestBrowserDraftIsTheMessage
time=2026-11-20T15:16:12.877Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T15:16:12.877Z level=INFO msg="startup phase done" phase=state_lock took=202µs
time=2026-11-20T15:16:12.877Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T15:16:12.877Z level=INFO msg="startup phase done" phase=claim_roots took=187µs
time=2026-11-20T15:16:12.877Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T15:16:12.942Z level=INFO msg="startup phase done" phase=sweep took=58.654ms
time=2026-11-20T15:16:12.943Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T15:16:12.943Z level=INFO msg="startup phase done" phase=credentials took=707µs
time=2026-11-20T15:16:12.944Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T15:16:12.989Z level=INFO msg="startup phase done" phase=open_state took=45.428ms
time=2026-11-20T15:16:12.990Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T15:16:12.992Z level=INFO msg=connecting host=127.0.0.1:39149 protocol=28
time=2026-11-20T15:16:12.993Z level=INFO msg=connected host=127.0.0.1:39149 took=1.257ms
time=2026-11-20T15:16:12.993Z level=INFO msg="capabilities gathering"
time=2026-11-20T15:16:12.994Z level=INFO msg="capabilities gathered" took=381µs tags=linux,claude,go
time=2026-11-20T15:16:12.994Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T15:16:13.001Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-20T15:16:15.104Z level=INFO msg="connection checked" connection=claude-1 state=healthy
    browser_thinking_test.go:106: waiting for !!window.__m: context deadline exceeded (last evaluation: context deadline exceeded)
--- FAIL: TestBrowserDraftIsTheMessage (8.35s)

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


receipt: test step 51.064s 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.407s amadan.net/oficina/equipo/internal/headless
receipt: slow test 15.32s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 8.35s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 7.75s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 6.53s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
receipt: slow test 6.39s amadan.net/oficina/equipo/internal/headless TestBrowserChat
rastrillo: budget test: go test failed
exit status 1

amadan: job cancelled — a newer push superseded it
--- shard 19 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-work: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$' ./internal/headless
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
=== RUN   TestBrowserRailFollowsWork
time=2026-11-20T15:15:56.045Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T15:15:56.045Z level=INFO msg="startup phase done" phase=state_lock took=145µs
time=2026-11-20T15:15:56.045Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T15:15:56.045Z level=INFO msg="startup phase done" phase=claim_roots took=157µs
time=2026-11-20T15:15:56.045Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T15:15:56.076Z level=INFO msg="startup phase done" phase=sweep took=30.717ms
time=2026-11-20T15:15:56.076Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T15:15:56.076Z level=INFO msg="startup phase done" phase=credentials took=127µs
time=2026-11-20T15:15:56.076Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T15:15:56.119Z level=INFO msg="startup phase done" phase=open_state took=42.899ms
time=2026-11-20T15:15:56.120Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T15:15:56.120Z level=INFO msg=connecting host=127.0.0.1:34241 protocol=28
time=2026-11-20T15:15:56.121Z level=INFO msg=connected host=127.0.0.1:34241 took=1.065ms
time=2026-11-20T15:15:56.121Z level=INFO msg="capabilities gathering"
time=2026-11-20T15:15:56.122Z level=INFO msg="capabilities gathered" took=421µs tags=linux,claude,go
time=2026-11-20T15:15:56.122Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T15:15:56.133Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-20T15:15:57.477Z level=INFO msg="connection checked" connection=claude-1 state=healthy
time=2026-11-20T15:16:06.581Z level=INFO msg="kept sessions" kept=1 bytes=2770 expired=0
time=2026-11-20T15:16:11.553Z level=INFO msg="kept sessions" kept=2 bytes=4922 expired=0
time=2026-11-20T15:16:12.315Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T15:16:12.315Z level=INFO msg="startup phase done" phase=state_lock took=102µs
time=2026-11-20T15:16:12.315Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T15:16:12.315Z level=INFO msg="startup phase done" phase=claim_roots took=88µs
time=2026-11-20T15:16:12.315Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T15:16:12.385Z level=INFO msg="startup phase done" phase=sweep took=69.544ms
time=2026-11-20T15:16:12.385Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T15:16:12.385Z level=INFO msg="startup phase done" phase=credentials took=208µs
time=2026-11-20T15:16:12.385Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T15:16:12.456Z level=INFO msg="startup phase done" phase=open_state took=70.576ms
time=2026-11-20T15:16:12.456Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T15:16:12.458Z level=INFO msg=connecting host=127.0.0.1:42867 protocol=28
time=2026-11-20T15:16:12.460Z level=INFO msg=connected host=127.0.0.1:42867 took=980µs
time=2026-11-20T15:16:12.460Z level=INFO msg="capabilities gathering"
time=2026-11-20T15:16:12.465Z level=INFO msg="capabilities gathered" took=4.683ms tags=linux,claude,go
time=2026-11-20T15:16:12.466Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T15:16:12.472Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-20T15:16:14.754Z 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)
--- FAIL: TestBrowserRailFollowsWork (22.74s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m38.56s
FAIL	amadan.net/oficina/equipo/internal/headless	98.937s


receipt: test step 1m40.413s 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 1m38.56s amadan.net/oficina/equipo/internal/headless
receipt: slow test 27.86s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 22.74s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 14.61s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 12.37s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
receipt: slow test 11.02s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
exit status 1

amadan: job cancelled — a newer push superseded it
--- 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

amadan: job cancelled — a newer push superseded it
--- 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
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserEmptyExplore
=== RUN   TestBrowserEmptyExplore
time=2026-11-20T15:16:48.623Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-20T15:16:48.623Z level=INFO msg="startup phase done" phase=state_lock took=80µs
time=2026-11-20T15:16:48.623Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-20T15:16:48.623Z level=INFO msg="startup phase done" phase=claim_roots took=101µs
time=2026-11-20T15:16:48.623Z level=INFO msg="startup phase" phase=sweep
time=2026-11-20T15:16:48.657Z level=INFO msg="startup phase done" phase=sweep took=33.94ms
time=2026-11-20T15:16:48.657Z level=INFO msg="startup phase" phase=credentials
time=2026-11-20T15:16:48.658Z level=INFO msg="startup phase done" phase=credentials took=196µs
time=2026-11-20T15:16:48.658Z level=INFO msg="startup phase" phase=open_state
time=2026-11-20T15:16:48.702Z level=INFO msg="startup phase done" phase=open_state took=44.379ms
time=2026-11-20T15:16:48.703Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-20T15:16:48.704Z level=INFO msg=connecting host=127.0.0.1:36865 protocol=28
time=2026-11-20T15:16:48.706Z level=INFO msg=connected host=127.0.0.1:36865 took=1.327ms
time=2026-11-20T15:16:48.706Z level=INFO msg="capabilities gathering"
time=2026-11-20T15:16:48.707Z level=INFO msg="capabilities gathered" took=358µs tags=linux,claude,go
time=2026-11-20T15:16:48.707Z level=INFO msg="hello sent" protocol=28
time=2026-11-20T15:16:48.715Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-20T15:16:49.934Z level=INFO msg="connection checked" connection=claude-1 state=healthy
    browser_receipts_test.go:169: waiting for [...document.querySelectorAll('[equipo-markdown]:not([data-stream-text])')].some(e=>e.textContent.includes("I'm your coordinator")): context deadline exceeded (last evaluation: context deadline exceeded)
--- FAIL: TestBrowserEmptyExplore (5.95s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m36.415s
FAIL	amadan.net/oficina/equipo/internal/headless	96.717s


receipt: test step 1m38.053s 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 1m36.415s amadan.net/oficina/equipo/internal/headless
receipt: slow test 15.13s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
receipt: slow test 12.83s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 12.15s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 10.86s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 8.2s amadan.net/oficina/equipo/internal/headless TestBrowserNotebookLook
rastrillo: budget test: go test failed
exit status 1

amadan: job cancelled — a newer push superseded it
--- 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 2.111s 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 575ms amadan.net/oficina/equipo/internal/equipo
receipt: slow test 570ms 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.927s 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.629s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 1.63s 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.204s 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.841s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 1.84s amadan.net/oficina/equipo/internal/plan3test TestTeamsHierarchyBrowser
browser lane browser-rest: ./internal/thintest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAccessEmojiByline|TestBrowserAccessFinalOutcomes|TestBrowserAccessRequest|TestBrowserAccessReview|TestBrowserActivitySubjects|TestBrowserAutonomySettings|TestBrowserCoordinatorQueue|TestBrowserEmptyConversation|TestBrowserHousekeeping|TestBrowserInnerGallery|TestBrowserInnerScreens|TestBrowserInstantThinking|TestBrowserInstantThinkingQueued|TestBrowserMachines|TestBrowserPhoneIndex|TestBrowserPlacementQuestionAndPending|TestBrowserProjectPlacement|TestBrowserProjectsList|TestBrowserReportActionFeedback|TestBrowserReportNextSteps|TestBrowserReportThread|TestBrowserRollup|TestBrowserRosterAlignment|TestBrowserRosterDecisionStates|TestBrowserRosterQuietDay|TestBrowserRosterReports|TestBrowserRosterSetAside|TestBrowserRosterSubchat|TestBrowserRosterThinking|TestBrowserRosterVisual|TestBrowserSettingsHousekeepingGroups|TestBrowserSettingsMenu|TestBrowserSettingsRail|TestBrowserSettingsSaveBar|TestBrowserSettingsShots|TestBrowserSettingsStayOnPage|TestBrowserSettingsTeams|TestBrowserShipsButtons|TestBrowserSpecialistRows|TestBrowserSpendFollowsAnswers|TestBrowserTaskRows|TestBrowserTeamPanel|TestBrowserThinkingCycles|TestBrowserThinkingLinesClear|TestBrowserThinkingSteady|TestBrowserThinkingWords|TestBrowserTokenRowEmail|TestBrowserTrackPulse|TestBrowserTrackStarCentre)$' ./internal/thintest

amadan: job cancelled — a newer push superseded it
--- 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   (60s)
ok ./internal/headless TestHeadlessConnections/A5_cancel_and_sign_out 5.30s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.35s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 10.86s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 11.24s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 28.72s
+ 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   (67s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 19.46s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 13.83s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 12.19s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 19.43s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless   (24s)
ok ./internal/headless TestMixedVersions 22.04s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks   (2s)
ok ./internal/runner/checks TestCheckSandboxDeniedPathsTampering 0.85s
+ go test -tags testbuild -timeout 15m -v -run '^TestRunnerCancelAndSupersede$' ./internal/runner/thin   (2s)
ok ./internal/runner/thin TestRunnerCancelAndSupersede 0.07s
quarantine: 0 flaked (passed on the retry), 0 failed
machine: 32 CPUs, load 68.11, cpu waiting 41.85%, memory waiting 0.00%, io waiting 0.71%
--- 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 12.49s 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.675s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 198ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 111ms amadan.net/oficina/equipo/internal/runner/provider/codex
receipt: slow package 3ms amadan.net/oficina/equipo/internal/runner/provider
receipt: slow package 0s amadan.net/oficina/equipo/internal/runner/provider/gotoolchain
receipt: slow test 5.28s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.75s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 520ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 200ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/provider/codex TestDirectJournalAdapterBarrier
CGO_ENABLED=0 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run '^TestNamespace' -count=1 ./internal/runner/containment
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run '^TestNamespace' -count=1 ./internal/runner/containment

receipt: test step 3.377s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 3.011s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 310ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 220ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof
receipt: slow test 140ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 130ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryCleansScratch
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReapsOrphans
machine: 32 CPUs, load 17.63, cpu waiting 9.07%, memory waiting 0.00%, io waiting 1.71%
--- shard 25 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: runner-dead-references started 30s late; cpu waiting 36.3%, load 22.52
shard 25: make runner-dead-references lanes-check build vet fmt-check budget migration-check
python3 scripts/runner-dead-references.py
reference scan: 2507 text files, 2846 matches, 0 failures
python3 scripts/ci-test.py check
lanes: 18 lanes and 5 browser lanes run every test once; 20-check@29
CGO_ENABLED=0 go build ./...
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o /dev/null ./cmd/equipo-runner
go vet ./...
go vet -tags testbuild ./internal/runner/thin ./internal/headless
GOOS=darwin GOARCH=arm64 go vet ./cmd/equipo-runner/... ./internal/runner/... ./internal/wire/... ./internal/release/...
go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget size
budget size: 88 directories within budget
CGO_ENABLED=0 go test ./internal/equipo -run '^TestMigrationModels$' -count=1
ok  	amadan.net/oficina/equipo/internal/equipo	2.522s
machine: 32 CPUs, load 70.57, cpu waiting 43.04%, memory waiting 0.00%, io waiting 0.62%
--- shard 26 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: staticcheck started 30s late; cpu waiting 36.3%, load 22.52
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 59.09, cpu waiting 33.28%, memory waiting 0.00%, io waiting 0.93%
--- shard 27 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: govulncheck started 30s late; cpu waiting 36.3%, load 22.52
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 39.39, cpu waiting 22.21%, memory waiting 0.00%, io waiting 1.18%
--- shard 28 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: gitleaks started 30s late; cpu waiting 36.3%, load 22.52
shard 28: make gitleaks
3:15PM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
3:16PM INF 1062 commits scanned.
3:16PM INF scanned ~60520354 bytes (60.52 MB) in 24.4s
3:16PM INF no leaks found
machine: 32 CPUs, load 59.09, cpu waiting 34.94%, memory waiting 0.00%, io waiting 0.90%
diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt
index 1df51253..85c590ac 100644
--- a/.rastrillo/budgets.txt
+++ b/.rastrillo/budgets.txt
@@ -15,7 +15,7 @@ time internal/equipo/team 60s Plan 3 loaded CI measured 45.985s; niced serial re
time internal/equipotest 300s Final fix package rerun measured 187.035s (review 172.4s); 300s gives 60 percent headroom for HTTP, sandbox, authority and final regression coverage.
size internal/equipo 21493 - Merge main conversation starters and work status with native push configuration; measured 21493/3385 source/test lines.
-size internal/wire 6768 - Native slice 2 push registrations and set aside, with main integrated; measured 6768/2972 source/test lines.
+size internal/wire 6771 - Native slice 2 push registrations and set aside, and the instance origin in Live Activity attributes; measured 6771/2972 source/test lines.
size internal/equipotest - 12013 Task 21 repairs historical migration and conversation fixtures after Plan 3; measured 0/12013 source/test lines.
time internal/runner/checks 90s CI worker measured 44.553s (44.6s rounded);
time internal/runner 330s Plan 3 CI repair measured 292.120s for the full package (controller CI 472.184s).
@@ -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 32021 - Merge main carried messages with native push and activity review fixes; measured 32021/6905 source/test lines.
+size internal/equipo/chat 32022 - Merge main carried messages with native push and activity review fixes, and start pushes naming the instance origin; measured 32022/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/docs/api/equipo-v1.md b/docs/api/equipo-v1.md
index 8ffe18c3..cc7dffd7 100644
--- a/docs/api/equipo-v1.md
+++ b/docs/api/equipo-v1.md
@@ -138,7 +138,7 @@ The server decides on pushes in the same transaction as the change, so a change
- a passive alert when a task you started ends, or when one of its steps stops and waits for Retry, with `{"kind":"task","task_id":"<task ID>"}`;
- the badge showing your Needs you count when the device registers and whenever that count changes.
-Alerts that wait on you have the category `needs_you`. Each task you started gets a Live Activity, at most three at once for you: those of the three most recently started tasks. It starts by push-to-start when work starts, with `attributes-type` `EquipoTaskAttributes` and attributes `{"task_id":"<task ID>"}`. Its content state has `task_id`, `title`, `stage`, `specialist`, `activity`, `needs_you`, `tone` (`positive`, `warning` or `negative`) and, at the end, `outcome` (`done`, `cancelled`, or `replaced` when a newer task took its place). It updates when the stage, step or `needs_you` changes, and at most once a minute for a new activity line. When the task starts needing you, the update is urgent but has no alert: the decision card's alert is the only sound. Send each running activity's own token with `POST /api/v1/push-registrations/activities`, `{"task_id":"tk...","token":"<hex>"}`, which returns `204`. When the token is received, the activity gets the task's full current state. After the task ends, the token is accepted only while the activity's end notification is waiting to be sent. The server then sends the end notification immediately. After that, it returns `409 task_ended`. The server forgets the token when the activity ends.
+Alerts that wait on you have the category `needs_you`. Each task you started gets a Live Activity, at most three at once for you: those of the three most recently started tasks. It starts by push-to-start when work starts, with `attributes-type` `EquipoTaskAttributes` and attributes `{"task_id":"<task ID>","origin":"<this instance's origin>"}`. A device sends an activity's token only to the account at that origin, and ignores an activity with no origin. Its content state has `task_id`, `title`, `stage`, `specialist`, `activity`, `needs_you`, `tone` (`positive`, `warning` or `negative`) and, at the end, `outcome` (`done`, `cancelled`, or `replaced` when a newer task took its place). It updates when the stage, step or `needs_you` changes, and at most once a minute for a new activity line. When the task starts needing you, the update is urgent but has no alert: the decision card's alert is the only sound. Send each running activity's own token with `POST /api/v1/push-registrations/activities`, `{"task_id":"tk...","token":"<hex>"}`, which returns `204`. When the token is received, the activity gets the task's full current state. After the task ends, the token is accepted only while the activity's end notification is waiting to be sent. The server then sends the end notification immediately. After that, it returns `409 task_ended`. The server forgets the token when the activity ends.
## Talk to the Assistant
diff --git a/internal/equipo/chat/push.go b/internal/equipo/chat/push.go
index d0e34bde..d6487ec6 100644
--- a/internal/equipo/chat/push.go
+++ b/internal/equipo/chat/push.go
@@ -278,6 +278,7 @@ func (t *txn) enqueuePush(person string, devices []push.Registration, in push.In
badge = n
}
now := t.now()
+ in.Origin = t.s.authority.Origin
raw, typ, err := push.Render(in, t.s.authority.Copy, badge, now)
if errors.Is(err, push.ErrTooLarge) {
t.s.pushWarn("push too large", "rule", in.Rule, "task", in.TaskID)
diff --git a/internal/equipo/chat/push_test.go b/internal/equipo/chat/push_test.go
index 05e1cd49..608e3240 100644
--- a/internal/equipo/chat/push_test.go
+++ b/internal/equipo/chat/push_test.go
@@ -32,6 +32,7 @@ type pushRig struct {
func newPushRig(t *testing.T) *pushRig {
t.Helper()
r := &pushRig{hkRig: newHKRig(t), revoked: map[string]bool{}}
+ r.s.authority.Origin = "https://oficina.equipo.example"
r.s.authority.PushDevice = func(_ *gorm.DB, person, credential string) error {
if r.revoked[credential] || !strings.HasPrefix(credential, "cr_") {
return ErrForbidden
@@ -181,13 +182,19 @@ func TestPushTaskLifecycle(t *testing.T) {
}
var p struct {
APS struct {
- ContentState wire.LiveActivityState `json:"content-state"`
+ ContentState wire.LiveActivityState `json:"content-state"`
+ Attributes wire.LiveActivityAttributes `json:"attributes"`
} `json:"aps"`
}
r.must(json.Unmarshal([]byte(rows[0].Payload), &p))
if s := p.APS.ContentState; s.TaskID != "tk1" || s.Specialist != wire.SpecialistEngineering || s.Activity != "work.activity.working" || s.Tone != wire.TonePositive {
t.Fatalf("content state %+v", s)
}
+ // The activity names its team, so a device never sends its token to
+ // another team's instance, even after a relaunch.
+ if a := p.APS.Attributes; a.TaskID != "tk1" || a.Origin != r.s.authority.Origin || a.Origin == "" {
+ t.Fatalf("attributes %+v", a)
+ }
// The activity's own token arrives: it hears the whole state at once.
r.must(r.activity("cr_phone", "tk1"))
if rows = r.outbox(); kinds(rows[1:]) != push.KindActivityUpdate || rows[1].Priority != 10 || rows[1].Target != push.TargetActivity {
diff --git a/internal/equipo/push/payload.go b/internal/equipo/push/payload.go
index f5de160d..d475e1e2 100644
--- a/internal/equipo/push/payload.go
+++ b/internal/equipo/push/payload.go
@@ -75,7 +75,7 @@ func Render(in Intent, copy func(string) string, badge int, now time.Time) ([]by
case KindActivityStart:
p.APS.Event = "start"
p.APS.AttributesType = wire.LiveActivityAttributesType
- p.APS.Attributes = &wire.LiveActivityAttributes{TaskID: in.TaskID}
+ p.APS.Attributes = &wire.LiveActivityAttributes{TaskID: in.TaskID, Origin: in.Origin}
case KindActivityUpdate:
p.APS.Event = "update"
case KindActivityEnd:
diff --git a/internal/equipo/push/payload_test.go b/internal/equipo/push/payload_test.go
index 85c723ca..f8306396 100644
--- a/internal/equipo/push/payload_test.go
+++ b/internal/equipo/push/payload_test.go
@@ -48,6 +48,7 @@ func TestPayloadGoldens(t *testing.T) {
"activity-replaced": {Replace(working), 0, TypeLiveActivity},
}
for name, c := range cases {
+ c.in.Origin = "https://oficina.example.test"
raw, typ, err := Render(c.in, copyStub, c.badge, at)
if err != nil {
t.Fatal(name, err)
diff --git a/internal/equipo/push/rules.go b/internal/equipo/push/rules.go
index 34703b24..980cf64b 100644
--- a/internal/equipo/push/rules.go
+++ b/internal/equipo/push/rules.go
@@ -101,6 +101,8 @@ type Intent struct {
State *wire.LiveActivityState
// TaskID names the task a Live Activity push follows.
TaskID string
+ // Origin is the instance's origin, named in a start's attributes.
+ Origin string
}
// LineEvery is how often an activity line may update a Live Activity, to
diff --git a/internal/equipo/push/testdata/activity-start.json b/internal/equipo/push/testdata/activity-start.json
index 30373829..bd340b2c 100644
--- a/internal/equipo/push/testdata/activity-start.json
+++ b/internal/equipo/push/testdata/activity-start.json
@@ -18,7 +18,8 @@
},
"attributes-type": "EquipoTaskAttributes",
"attributes": {
- "task_id": "tk1"
+ "task_id": "tk1",
+ "origin": "https://oficina.example.test"
}
}
}
diff --git a/internal/wire/push.go b/internal/wire/push.go
index 5fb64e64..cf26f0e3 100644
--- a/internal/wire/push.go
+++ b/internal/wire/push.go
@@ -60,6 +60,9 @@ const LiveActivityAttributesType = "EquipoTaskAttributes"
// LiveActivityAttributes are a task Live Activity's fixed attributes.
type LiveActivityAttributes struct {
TaskID string `json:"task_id"`
+ // Origin is the instance's origin: a device sends this activity's
+ // token only to the account it names.
+ Origin string `json:"origin"`
}
// Live Activity tones, as Roster's stage track: amber waits on you, red
diff --git a/native/apple/Sources/EquipoActivity/TaskActivity.swift b/native/apple/Sources/EquipoActivity/TaskActivity.swift
index 9c44de32..56ba7996 100644
--- a/native/apple/Sources/EquipoActivity/TaskActivity.swift
+++ b/native/apple/Sources/EquipoActivity/TaskActivity.swift
@@ -13,8 +13,11 @@ import ActivityKit
/// spell out the wire's snake case.
public struct EquipoTaskAttributes: Codable, Hashable, Sendable {
public var taskID: String
- enum CodingKeys: String, CodingKey { case taskID = "task_id" }
- public init(taskID: String) { self.taskID = taskID }
+ /// The team's instance that started it: its token goes only to the
+ /// account at this origin. nil from a server that did not name one.
+ public var origin: String?
+ enum CodingKeys: String, CodingKey { case taskID = "task_id", origin }
+ public init(taskID: String, origin: String? = nil) { self.taskID = taskID; self.origin = origin }
/// The task as the activity shows it: the task, its stage (Task.stage),
/// the specialist working on it, the newest activity line, what it needs
diff --git a/native/apple/Sources/EquipoKit/Push/LiveActivities.swift b/native/apple/Sources/EquipoKit/Push/LiveActivities.swift
index e524617e..d8d0097b 100644
--- a/native/apple/Sources/EquipoKit/Push/LiveActivities.swift
+++ b/native/apple/Sources/EquipoKit/Push/LiveActivities.swift
@@ -23,22 +23,6 @@ public enum LiveActivityPolicy {
}
}
-/// Which session each Live Activity belongs to: the one it was first seen
-/// under. Observers start again on a new session, but an activity never
-/// changes hands, so a token from another team's activity is never sent
-/// with this team's credential (the registrar drops other generations).
-@MainActor
-public final class ActivityOwners {
- private var owners: [String: Int] = [:]
- public init() {}
- /// The generation `activity`'s tokens are sent under.
- public func owner(of activity: String, current: Int) -> Int {
- if let known = owners[activity] { return known }
- owners[activity] = current
- return current
- }
-}
-
#if os(iOS)
/// Follows this device's task Live Activities: the push-to-start token for
/// the device's registration, and each running activity's own token for
@@ -50,7 +34,6 @@ public final class LiveActivities {
private let registrar: PushRegistrar
private var observed: Set<String> = []
private var observers: [Task<Void, Never>] = []
- private let owners = ActivityOwners()
private var started = false
public init(registrar: PushRegistrar) {
@@ -58,7 +41,7 @@ public final class LiveActivities {
// A task the server says is over (409 task_ended, or not this
// person's) leaves the Lock Screen at once.
registrar.onActivityClosed = { task in Task { await Self.end(task: task) } }
- // A new session: observers start again, bound to it.
+ // A new session: observers deliver their tokens again, for it.
registrar.onSessionChanged = { [weak self] in self?.reobserve() }
}
@@ -88,11 +71,11 @@ public final class LiveActivities {
let task = activity.attributes.taskID
let tokens = activity.pushTokenUpdates
let states = activity.activityStateUpdates
- let generation = owners.owner(of: activity.id, current: registrar.generation)
+ let origin = activity.attributes.origin
observers.append(Task {
for await token in tokens {
if Task.isCancelled { return }
- await registrar.activityTokenChanged(token, task: task, generation: generation)
+ await registrar.activityTokenChanged(token, task: task, origin: origin)
}
})
Task {
diff --git a/native/apple/Sources/EquipoKit/Push/PushRegistrar.swift b/native/apple/Sources/EquipoKit/Push/PushRegistrar.swift
index 52b73edc..9743851b 100644
--- a/native/apple/Sources/EquipoKit/Push/PushRegistrar.swift
+++ b/native/apple/Sources/EquipoKit/Push/PushRegistrar.swift
@@ -18,9 +18,10 @@ public final class PushRegistrar {
private var accepted: (bearer: String, body: PushRegistrationBody)?
/// A registration the server refused as invalid: not sent again as is.
private var refused: (bearer: String, body: PushRegistrationBody)?
- /// Each running Live Activity's token, by task, and which of them the
- /// current session's server has.
- private var activities: [String: String] = [:]
+ /// Each running Live Activity's token, by task, with the origin of the
+ /// instance that started it; and which of them the current session's
+ /// server has. A token goes only to the account at its own origin.
+ private var activities: [String: (origin: String, token: String)] = [:]
private var acceptedActivities: [String: String] = [:]
/// Tasks the server says are over or not this person's: their tokens are not sent again.
private var closedActivities: [String: String] = [:]
@@ -29,8 +30,8 @@ public final class PushRegistrar {
/// Moves on with every change of session: a pass that was waiting on the
/// network when the session changed sends nothing more and records nothing.
public private(set) var generation = 0
- /// Called when the session changes, so activity observers start again
- /// bound to the new session (their old buffered tokens are dropped).
+ /// Called when the session changes, so activity observers deliver
+ /// their tokens again for the new session.
public var onSessionChanged: (() -> Void)?
/// Called with a task whose activity the server will never take (it
/// ended, or is not this person's): the app ends it on this device.
@@ -46,8 +47,14 @@ public final class PushRegistrar {
if client?.token != self.client?.token {
generation += 1
// Another session (another team, a new credential, or none): it
- // never gets the last session's activity tokens.
- activities = [:]; acceptedActivities = [:]; closedActivities = [:]
+ // keeps only the activities its own instance started. At launch
+ // that is every activity seen before the session was restored.
+ if let account = client?.origin {
+ activities = activities.filter { Self.same($0.value.origin, account) }
+ } else {
+ activities = [:]
+ }
+ acceptedActivities = [:]; closedActivities = [:]
self.client = client
onSessionChanged?()
}
@@ -65,17 +72,20 @@ public final class PushRegistrar {
startToken = PushToken.hex(token)
await sync()
}
- /// A running Live Activity's own token, for the server's updates.
- public func activityTokenChanged(_ token: Data, task: String) async {
- await activityTokenChanged(token, task: task, generation: generation)
- }
- /// A token from an observer started in session `generation`: one from an
- /// earlier session is dropped, never sent with the current bearer.
- public func activityTokenChanged(_ token: Data, task: String, generation: Int) async {
- guard generation == self.generation else { return }
- activities[task] = PushToken.hex(token)
+ /// A running Live Activity's own token, for the server's updates, from
+ /// the instance at `origin` (the activity's attributes). An activity
+ /// that names no origin is never sent anywhere.
+ public func activityTokenChanged(_ token: Data, task: String, origin: String?) async {
+ guard let origin else { return }
+ activities[task] = (origin, PushToken.hex(token))
await sync()
}
+
+ /// Whether an activity's origin is this account's: scheme, host and port.
+ static func same(_ origin: String, _ account: URL) -> Bool {
+ guard let o = URL(string: origin), let scheme = o.scheme?.lowercased(), let host = o.host?.lowercased() else { return false }
+ return scheme == account.scheme?.lowercased() && host == account.host?.lowercased() && o.port == account.port
+ }
/// The activity ended on this device: nothing more to send for it.
public func activityEnded(task: String) {
activities[task] = nil; acceptedActivities[task] = nil; closedActivities[task] = nil
@@ -119,6 +129,7 @@ public final class PushRegistrar {
// Activity tokens need the device's registration first.
guard accepted?.bearer == bearer else { return }
for (task, token) in activities.sorted(by: { $0.key < $1.key })
+ .filter({ Self.same($0.value.origin, client.origin) }).map({ ($0.key, $0.value.token) })
where acceptedActivities[task] != token && closedActivities[task] != token {
guard generation == self.generation else { return }
do {
diff --git a/native/apple/Tests/EquipoKitTests/Fixtures/push/activity-start.json b/native/apple/Tests/EquipoKitTests/Fixtures/push/activity-start.json
index 30373829..bd340b2c 100644
--- a/native/apple/Tests/EquipoKitTests/Fixtures/push/activity-start.json
+++ b/native/apple/Tests/EquipoKitTests/Fixtures/push/activity-start.json
@@ -18,7 +18,8 @@
},
"attributes-type": "EquipoTaskAttributes",
"attributes": {
- "task_id": "tk1"
+ "task_id": "tk1",
+ "origin": "https://oficina.example.test"
}
}
}
diff --git a/native/apple/Tests/EquipoKitTests/PushTests.swift b/native/apple/Tests/EquipoKitTests/PushTests.swift
index 61649a31..8b2d372a 100644
--- a/native/apple/Tests/EquipoKitTests/PushTests.swift
+++ b/native/apple/Tests/EquipoKitTests/PushTests.swift
@@ -13,6 +13,7 @@ private let startToken = Data((0..<32).map { UInt8($0) })
private let deviceHex = "a0a1a2a3a4a5a6a7a8a9aaabacadaeafb0b1b2b3b4b5b6b7b8b9babbbcbdbebf"
private let startHex = "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f"
+private let here = "https://oficina.example.test"
private func client(_ t: ScriptedTransport, _ bearer: String = "equipo.person.v1.TOKENFIXTURE") -> EquipoClient {
EquipoClient(transport: t, token: bearer)
}
@@ -116,7 +117,7 @@ private func json(_ request: APIRequest) throws -> [String: String] {
.success(APIResponse(status: 204, data: Data())))
let r = PushRegistrar(environment: .production, platform: .ios)
await r.attach(client(t))
- await r.activityTokenChanged(startToken, task: "tk1")
+ await r.activityTokenChanged(startToken, task: "tk1", origin: here)
#expect(t.sent("POST /push-registrations/activities").isEmpty, "the device registers first")
registered(t)
await r.deviceTokenChanged(deviceToken)
@@ -124,11 +125,11 @@ private func json(_ request: APIRequest) throws -> [String: String] {
#expect(first.count == 1)
#expect(try json(first[0]) == ["task_id": "tk1", "token": startHex])
#expect(first[0].bearer == "equipo.person.v1.TOKENFIXTURE")
- await r.activityTokenChanged(deviceToken, task: "tk2")
+ await r.activityTokenChanged(deviceToken, task: "tk2", origin: here)
#expect(t.sent("POST /push-registrations/activities").count == 2)
await r.sync()
#expect(t.sent("POST /push-registrations/activities").count == 2, "an ended task's token is not sent again")
- await r.activityTokenChanged(startToken, task: "tk3")
+ await r.activityTokenChanged(startToken, task: "tk3", origin: here)
#expect(try json(t.sent("POST /push-registrations/activities")[2])["task_id"] == "tk3")
}
@@ -141,54 +142,64 @@ private func json(_ request: APIRequest) throws -> [String: String] {
r.onActivityClosed = { closed.append($0) }
await r.attach(client(t))
await r.deviceTokenChanged(deviceToken)
- await r.activityTokenChanged(startToken, task: "tk1")
+ await r.activityTokenChanged(startToken, task: "tk1", origin: here)
#expect(closed == ["tk1"], "the Lock Screen does not keep a task the server says is over")
}
@Test func anotherTeamNeverSendsTheLastTeamsActivities() async throws {
- let t = ScriptedTransport(); registered(t)
- t.on("POST /push-registrations/activities", .success(APIResponse(status: 204, data: Data())))
+ let a = ScriptedTransport(); registered(a)
+ a.on("POST /push-registrations/activities", .success(APIResponse(status: 204, data: Data())))
+ let b = ScriptedTransport(origin: URL(string: "https://other.example.test")!); registered(b)
+ b.on("POST /push-registrations/activities", .success(APIResponse(status: 204, data: Data())))
let r = PushRegistrar(environment: .production, platform: .ios)
- await r.attach(client(t))
+ var changes = 0
+ r.onSessionChanged = { changes += 1 }
+ await r.attach(client(a))
await r.deviceTokenChanged(deviceToken)
- await r.activityTokenChanged(startToken, task: "tkA")
- await r.attach(client(t, "equipo.person.v1.OTHER"))
- let other = t.sent("POST /push-registrations/activities").filter { $0.bearer == "equipo.person.v1.OTHER" }
- #expect(other.isEmpty, "team A's activity tokens never go to team B's server")
+ await r.activityTokenChanged(startToken, task: "tkA", origin: here)
+ await r.attach(client(b, "equipo.person.v1.OTHER"))
+ #expect(changes == 2, "observers deliver their tokens again for each new session")
+ // Team A's activity is still on the device and its observer delivers again.
+ await r.activityTokenChanged(startToken, task: "tkA", origin: here)
+ #expect(b.sent("POST /push-registrations/activities").isEmpty, "team A's activity tokens never go to team B's server")
+ }
+
+ @Test func afterARelaunchAnotherTeamsActivityIsStillNeverSent() async throws {
+ let b = ScriptedTransport(origin: URL(string: "https://other.example.test")!); registered(b)
+ b.on("POST /push-registrations/activities", .success(APIResponse(status: 204, data: Data())))
+ // A fresh process: nothing remembered, team B signed in, and team A's
+ // activity survived (its end failed). It is seen for the first time.
+ let r = PushRegistrar(environment: .production, platform: .ios)
+ await r.attach(client(b))
+ await r.deviceTokenChanged(deviceToken)
+ await r.activityTokenChanged(startToken, task: "tkA", origin: here)
+ #expect(b.sent("POST /push-registrations/activities").isEmpty, "an activity names its team, so it is never adopted")
+ await r.activityTokenChanged(deviceToken, task: "tkB", origin: "https://OTHER.example.test")
+ let own = try #require(b.sent("POST /push-registrations/activities").first, "team B's own activity is sent")
+ #expect(try json(own)["task_id"] == "tkB")
}
- @Test func aTokenFromAnEarlierSessionIsDropped() async throws {
+ @Test func anActivitySeenBeforeTheSessionIsRestoredIsSentOnceItIs() async throws {
let t = ScriptedTransport(); registered(t)
t.on("POST /push-registrations/activities", .success(APIResponse(status: 204, data: Data())))
let r = PushRegistrar(environment: .production, platform: .ios)
+ // Cold launch: observation starts before the saved session attaches.
+ await r.activityTokenChanged(startToken, task: "tk1", origin: here)
await r.attach(client(t))
await r.deviceTokenChanged(deviceToken)
- let teamA = r.generation
- var changes = 0
- r.onSessionChanged = { changes += 1 }
- await r.attach(client(t, "equipo.person.v1.OTHER"))
- #expect(changes == 1, "observers are told to start again for the new session")
- // An observer of team A's activity delivers a buffered token late.
- await r.activityTokenChanged(startToken, task: "tkA", generation: teamA)
- #expect(t.sent("POST /push-registrations/activities").isEmpty, "team A's token never reaches team B")
+ let sent = try #require(t.sent("POST /push-registrations/activities").first,
+ "a push-started activity still gets the server's updates and its end")
+ #expect(try json(sent)["task_id"] == "tk1")
}
- @Test func anActivityKeepsTheSessionItWasFirstSeenUnder() async throws {
+ @Test func anActivityThatNamesNoTeamIsNeverSent() async throws {
let t = ScriptedTransport(); registered(t)
t.on("POST /push-registrations/activities", .success(APIResponse(status: 204, data: Data())))
let r = PushRegistrar(environment: .production, platform: .ios)
- let owners = ActivityOwners()
await r.attach(client(t))
await r.deviceTokenChanged(deviceToken)
- let seen = owners.owner(of: "activityA", current: r.generation)
- await r.attach(client(t, "equipo.person.v1.OTHER"))
- // Team B's session re-observes every activity still on the device,
- // team A's among them while its end is still in flight.
- let again = owners.owner(of: "activityA", current: r.generation)
- #expect(again == seen, "an activity never changes hands on re-observation")
- await r.activityTokenChanged(startToken, task: "tkA", generation: again)
- #expect(t.sent("POST /push-registrations/activities").isEmpty, "team A's token never reaches team B")
- #expect(owners.owner(of: "activityB", current: r.generation) == r.generation, "a new activity is the new session's")
+ await r.activityTokenChanged(startToken, task: "tk1", origin: nil)
+ #expect(t.sent("POST /push-registrations/activities").isEmpty)
}
@Test func aPassSuspendedAcrossASessionChangeSendsNothingMore() async throws {
@@ -198,8 +209,8 @@ private func json(_ request: APIRequest) throws -> [String: String] {
let r = PushRegistrar(environment: .production, platform: .ios)
await r.attach(EquipoClient(transport: gate, token: "equipo.person.v1.TOKENFIXTURE"))
// Two activities wait for the device's registration.
- await r.activityTokenChanged(startToken, task: "tk1")
- await r.activityTokenChanged(deviceToken, task: "tk2")
+ await r.activityTokenChanged(startToken, task: "tk1", origin: here)
+ await r.activityTokenChanged(deviceToken, task: "tk2", origin: here)
gate.hold = true
// The pass registers the device, then is held on the first activity request.
let pass = Task { await r.deviceTokenChanged(deviceToken) }
@@ -321,7 +332,7 @@ final class GatedTransport: EquipoTransport, @unchecked Sendable {
#expect(start["attributes-type"] as? String == String(describing: EquipoTaskAttributes.self),
"push-to-start names this type")
let attributes = try JSONDecoder().decode(EquipoTaskAttributes.self, from: JSONSerialization.data(withJSONObject: start["attributes"]!))
- #expect(attributes == EquipoTaskAttributes(taskID: "tk1"))
+ #expect(attributes == EquipoTaskAttributes(taskID: "tk1", origin: "https://oficina.example.test"))
#expect(try state("activity-start") == .init(taskID: "tk1", title: "Fix login", stage: "in_progress", specialist: "engineering",
activity: "Reading README.md", needsYou: "", tone: "positive"))
#expect(try state("activity-update").outcome == nil)
diff --git a/native/apple/Tests/EquipoKitTests/Support.swift b/native/apple/Tests/EquipoKitTests/Support.swift
index f0e3f15d..2b16896d 100644
--- a/native/apple/Tests/EquipoKitTests/Support.swift
+++ b/native/apple/Tests/EquipoKitTests/Support.swift
@@ -4,7 +4,8 @@ import Foundation
/// Answers requests from a script and records each one. A route is
/// "METHOD /path"; each answer is used once, the last one repeats.
final class ScriptedTransport: EquipoTransport, @unchecked Sendable {
- let origin = URL(string: "https://oficina.example.test")!
+ let origin: URL
+ init(origin: URL = URL(string: "https://oficina.example.test")!) { self.origin = origin }
private let lock = NSLock()
private var script: [String: [Result<APIResponse, EquipoAPIError>]] = [:]
private(set) var requests: [APIRequest] = []