oficina / equipo Public

native: fixes from the Fable review of slice 1

- Streamed reply text reads nothing; a burst of changes reads once.
- Needs you is this person's list, not every creator's on the team.
- Thread replies show how they are going until the server has them.
- Removed and moved projects say so, as the web does.
- Waiting messages go when the team answers again; a lost answer is
  resent with its own key on the next tap; a failed Stop is offered again.
- Pairing keeps the credential before its first read; :443 is no port.
- Proof bytes match Go's \b and \f escapes (new vector).
- A cancelled request is not offline; a failed first read is shown.
- iPhone keychain item only while unlocked; the Mac follows visibility.
- Card links match the web's; strings that promised too much, and two
  outside the catalog, fixed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 225c04d1b01423ae7d4d7296d1952cfa1d20078d parent 17e1af3
22 files changed, +441 −75
  • internal/equipo/personapi/device_proof_vector_test.go +3 −0
  • native/apple/Sources/EquipoKit/API/Thin.swift +2 −1
  • native/apple/Sources/EquipoKit/API/Transport.swift +5 −0
  • native/apple/Sources/EquipoKit/Pairing/DeviceProof.swift +3 −0
  • native/apple/Sources/EquipoKit/Pairing/Pairing.swift +10 −4
  • native/apple/Sources/EquipoKit/Pairing/SecretStore.swift +6 −1
  • native/apple/Sources/EquipoKit/Presentation/Roster.swift +10 −5
  • native/apple/Sources/EquipoKit/Presentation/ThreadTurn.swift +8 −3
  • native/apple/Sources/EquipoKit/Resources/Localizable.xcstrings +80 −3
  • native/apple/Sources/EquipoKit/Session/EquipoSession.swift +68 −9
  • native/apple/Sources/EquipoKit/UI/LiveCards.swift +14 −11
  • native/apple/Sources/EquipoKit/UI/RosterViews.swift +28 −17
  • native/apple/Sources/EquipoKit/UI/Screens/ConversationScreen.swift +4 −1
  • native/apple/Sources/EquipoKit/UI/Screens/PairingView.swift +1 −1
  • native/apple/Sources/EquipoKit/UI/Screens/TaskScreens.swift +27 −9
  • native/apple/Sources/EquipoMac/EquipoMacApp.swift +4 −1
  • native/apple/Sources/EquipoMac/LiveTranscript.swift +7 −1
  • native/apple/Tests/EquipoKitTests/Fixtures/device-proof-vectors.json +11 −0
  • native/apple/Tests/EquipoKitTests/PairingTests.swift +16 −0
  • native/apple/Tests/EquipoKitTests/SessionTests.swift +120 −5
  • native/apple/Tests/EquipoKitTests/Support.swift +4 −0
  • native/scripts/strings.json +10 −3

CI failed — run details

CI log
=== prepare ===
ci-box: machine: aarch64, 32 CPUs, 62 GiB memory, kernel 7.0.0-1017-aws
ci-box: python 3.12.3; Docker version 29.1.3, build 29.1.3-0ubuntu3~24.04.2
ci-box: user namespaces allowed: 233151
ci-box: cgroup: cgroup2fs
ci-box: disk /home/ci/work/repos/oficina__equipo/wt/native__slice-1: Type  Size Avail | ext4   96G   85G
ci-box: disk /home/ci/.cache/equipo-ci-box: Type  Size Avail | ext4   96G   85G
ci-box: bwrap: fetched and verified in 0.3s
ci-box: claude: fetched and verified in 2.3s
ci-box: codex: fetched and verified in 3.7s
ci-box: codex-code-mode-host: fetched and verified in 1.2s
ci-box: libwrap: fetched and verified in 0.3s
ci-box: socat: fetched and verified in 0.3s
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
ci-box: image pulled in 9.8s
ci-box: pi: installed and verified in 7.4s
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.7s
ci-box: clone deepened in 4.6s
ci-box: file times set from content: 2666 files, 172 directories
ci-box: ready in 18.2s
=== copy ===
EQUIPO_RELEASE_COPY_CHECK=1 CGO_ENABLED=0 go test ./internal/equipotest -run '^TestReleaseCopyReviewed$' -count=1
ok  	amadan.net/oficina/equipo/internal/equipotest	0.244s
=== compile ===
go build ./...
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py compile
+ go build -tags testbuild ./...
  1.1s
+ go list -export -test -tags testbuild -f  ./...
  0.8s
+ go list -export -test -tags browser,testbuild -f  ./internal/headless ./internal/idtest ./internal/plan3test ./internal/thintest
  0.2s
rastrillo: budget size: 1 problem(s)
exit status 1
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -version
staticcheck 2026.1 (v0.7.0)
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 -version
Go: go1.26.11
Scanner: govulncheck@v1.8.0
DB: https://vuln.go.dev
DB updated: 2026-11-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
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m18.83s 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 1m17.281s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m17.28s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 35.22, cpu waiting 21.97%, memory waiting 0.00%, io waiting 0.66%
--- 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
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m20.801s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m19.202s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m19.2s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 35.22, cpu waiting 21.32%, memory waiting 0.00%, io waiting 0.62%
--- 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
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m22.451s 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 1m20.355s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m10.18s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 5.58s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 4.59s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 35.22, cpu waiting 21.32%, memory waiting 0.00%, io waiting 0.62%
--- 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
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m17.65s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m16.027s amadan.net/oficina/equipo/internal/headless
receipt: slow test 36.66s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 19.7s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 10.29s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
receipt: slow test 9.38s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
machine: 32 CPUs, load 35.93, cpu waiting 21.97%, memory waiting 0.00%, io waiting 0.66%
--- 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
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m34.919s 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.323s amadan.net/oficina/equipo/internal/headless
receipt: slow test 58.29s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 11.01s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 9.73s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 8.56s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 5.73s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
machine: 32 CPUs, load 31.27, cpu waiting 17.96%, memory waiting 0.00%, io waiting 0.50%
--- 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
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 3m10.124s 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 3m8.169s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m42.55s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistant
receipt: slow test 23.35s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 20.13s amadan.net/oficina/equipo/internal/headless TestHeadlessResearchHandoff
receipt: slow test 7.89s amadan.net/oficina/equipo/internal/headless TestHeadlessClaudeSignIn
receipt: slow test 7.22s amadan.net/oficina/equipo/internal/headless TestHeadlessTurnBatching
machine: 32 CPUs, load 9.12, cpu waiting 3.64%, memory waiting 0.00%, io waiting 0.12%
--- shard 6 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane thintest: ./internal/thintest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test([^C]|C[^o]|Co[^n]|Con[^t])|^TestContract(Assistant|Outcome|Team|Handoff|HostAllowlist|HostIsPerPerson|Look|Use[A-Z]|RemoteCall|LanesRunAtOnce|NoMergeQuestionWhenGateMerges|PreviewHeldUntilPublishAnswer|PreviewNotHeldBelow19|PublishNeedsOwnerAnswer)' ./internal/thintest

receipt: test step 330ms against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1m48.287s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 7.58s amadan.net/oficina/equipo/internal/thintest TestContractTeamJobSettledStates
receipt: slow test 6.7s amadan.net/oficina/equipo/internal/thintest TestExplorePreviewsOff
receipt: slow test 3.57s amadan.net/oficina/equipo/internal/thintest TestContractPreviewHeldUntilPublishAnswer
receipt: slow test 3.25s amadan.net/oficina/equipo/internal/thintest TestContractTeamNudgePersonNeeds
receipt: slow test 2.4s amadan.net/oficina/equipo/internal/thintest TestResearchDoneFallsBack
machine: 32 CPUs, load 1.20, cpu waiting 0.00%, memory waiting 0.00%, io waiting 2.38%
--- 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 1m8.238s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m6.942s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 6.77s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 3.75s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
receipt: slow test 2.31s amadan.net/oficina/equipo/internal/thintest TestContractPreview
receipt: slow test 2.05s amadan.net/oficina/equipo/internal/thintest TestContractHostedBindingRules
receipt: slow test 1.75s amadan.net/oficina/equipo/internal/thintest TestContractTokenConnection
machine: 32 CPUs, load 33.13, cpu waiting 22.51%, memory waiting 0.00%, io waiting 0.78%
--- 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 4m14.573s, over the 45s its record on line 44 allows; reported only, timing fails on CI

receipt: test step 4m27.025s 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 4m14.573s amadan.net/oficina/equipo/internal/runner/thin
receipt: slow test 36.76s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeAnsweredByAnotherModel
receipt: slow test 36.71s amadan.net/oficina/equipo/internal/runner/thin TestModelsEngineeringProbesThenRunsTheStrongest
receipt: slow test 36.62s amadan.net/oficina/equipo/internal/runner/thin TestModelsUnhealthyRetriedOnDemand
receipt: slow test 18.37s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeRunsInsideTheAdmission
receipt: slow test 6.75s amadan.net/oficina/equipo/internal/runner/thin TestOpenCodeStepsRealOpenCode
machine: 32 CPUs, load 3.28, cpu waiting 1.02%, memory waiting 0.00%, io waiting 0.02%
--- shard 9 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-bug: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestDirectBugWorkflow$|^TestEnrolKeepsTheRole$' ./internal/runner
cache miss: amadan.net/oficina/equipo/internal/runner: its inputs changed

receipt: test step 47.942s 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 46.821s amadan.net/oficina/equipo/internal/runner
receipt: slow test 26.79s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.02s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 30.34, cpu waiting 21.91%, memory waiting 0.00%, io waiting 1.09%
--- 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 48.222s 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 46.324s amadan.net/oficina/equipo/internal/runner
receipt: slow test 36.23s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 32.37s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.38s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.69s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 31.36, cpu waiting 21.91%, memory waiting 0.00%, io waiting 1.09%
--- 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 34.947s 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.053s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.12s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.48s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.12s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 1.91s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 1.62s amadan.net/oficina/equipo/internal/runner TestCoordinatorTransientRefusalKeepsServing
machine: 32 CPUs, load 24.49, cpu waiting 14.84%, memory waiting 0.00%, io waiting 1.38%
--- 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 29.0%, load 19.22
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
cache miss: amadan.net/oficina/equipo/internal/equipotest: its inputs changed
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/equipotest TestDirectDeadReferencesRepository
=== RUN   TestDirectDeadReferencesRepository
    direct_cutover_test.go:221: repository reference inventory: exit status 1
        native/apple/Sources/EquipoKit/UI/Components.swift:7:12: unclassified Node
        native/apple/Sources/EquipoKit/UI/Components.swift:38:29: unclassified Node
        native/apple/Tests/EquipoKitTests/Fixtures/thin/events.json:20:12: unclassified node
        native/apple/Tests/EquipoKitTests/Fixtures/thin/snapshot.json:263:10: unclassified node
        native/apple/Tests/EquipoKitTests/Fixtures/thin/snapshot.json:301:12: unclassified node
        reference scan: 2380 text files, 2744 matches, 5 failures
--- FAIL: TestDirectDeadReferencesRepository (1.68s)

--- FAIL amadan.net/oficina/equipo/internal/equipotest (package output)
FAIL
rastrillo-budget/v1 ran 1m0.868s
FAIL	amadan.net/oficina/equipo/internal/equipotest	61.242s


receipt: test step 1m2.597s 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 1m0.868s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 25.13s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 25.04s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 23.21s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 20.83s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
receipt: slow test 20.67s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelDuplicates
exit status 1
+ go test -tags testbuild -timeout 15m -run '^Test[A-D]|^TestQ' -v -run '^TestDirectDeadReferencesRepository$' -count=1 ./internal/equipotest   (retry, once)
FAILED TWICE ./internal/equipotest:TestDirectDeadReferencesRepository equipotest-a
=== RUN   TestDirectDeadReferencesRepository
    direct_cutover_test.go:221: repository reference inventory: exit status 1
        native/apple/Sources/EquipoKit/UI/Components.swift:7:12: unclassified Node
        native/apple/Sources/EquipoKit/UI/Components.swift:38:29: unclassified Node
        native/apple/Tests/EquipoKitTests/Fixtures/thin/events.json:20:12: unclassified node
        native/apple/Tests/EquipoKitTests/Fixtures/thin/snapshot.json:263:10: unclassified node
        native/apple/Tests/EquipoKitTests/Fixtures/thin/snapshot.json:301:12: unclassified node
        reference scan: 2380 text files, 2744 matches, 5 failures
--- FAIL: TestDirectDeadReferencesRepository (1.68s)
FAIL
rastrillo-budget/v1 ran 1.683s
FAIL	amadan.net/oficina/equipo/internal/equipotest	1.933s
FAIL
machine: 32 CPUs, load 31.27, cpu waiting 17.37%, memory waiting 0.00%, io waiting 0.49%
make: *** [Makefile:113: ci-shard] Error 1

amadan: step check shard 12 of 29 failed: exit status 2
--- shard 13 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-e started 30s late; cpu waiting 29.0%, load 19.22
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 1.481s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1m12.08s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 19s amadan.net/oficina/equipo/internal/equipotest TestProjectRequestActorAndUpdate
receipt: slow test 18.98s amadan.net/oficina/equipo/internal/equipotest TestProjectsSharedAndGrouped
receipt: slow test 18.92s amadan.net/oficina/equipo/internal/equipotest TestProjectWritesRequireCurrentOwner
receipt: slow test 18.86s amadan.net/oficina/equipo/internal/equipotest TestProjectsFailuresRollBack
receipt: slow test 18.85s amadan.net/oficina/equipo/internal/equipotest TestProjectsReopen
machine: 32 CPUs, load 19.22, cpu waiting 13.07%, memory waiting 0.00%, io waiting 1.43%
--- 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 29.0%, load 19.22
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
cache miss: amadan.net/oficina/equipo/internal/equipotest: its inputs changed

receipt: test step 1m12.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 1m1.882s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 13.8s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 12.72s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 9.69s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 9.6s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 6.62s amadan.net/oficina/equipo/internal/equipotest TestRosterBootstrapOnce
machine: 32 CPUs, load 29.81, cpu waiting 15.72%, memory waiting 0.00%, io waiting 0.44%
--- 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 29.0%, load 19.22
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 1.422s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1m4.547s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 23.06s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 23.03s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 23s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 21.31s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsRollbackAndUnavailable
receipt: slow test 21.22s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsCurrentOwner
machine: 32 CPUs, load 19.22, cpu waiting 13.07%, memory waiting 0.00%, io waiting 1.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 29.0%, load 19.22
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 741ms against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 48.107s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 3.45s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 3.44s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 1.41s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3A
receipt: slow test 1.39s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.18s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorMessageSourcesUpgrade
machine: 32 CPUs, load 19.22, cpu waiting 13.07%, memory waiting 0.00%, io waiting 1.43%
--- 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 29.0%, load 19.22
test lane rest: ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/idtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/wiretest ./tools/drive
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/idtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/wiretest ./tools/drive
cache miss: amadan.net/oficina/equipo/internal/runner/webread: 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/cmd/equipo-runner: 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/provider/claude: 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/provider/codex: 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 24.227s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/equipo/chat took 11.886s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/idtest took 42.05s, 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 38.892s, over the 15s its record on line 40 allows; reported only, timing fails on CI

receipt: test step 2m16.113s against a 60s target (the gate's other steps are not in this figure)
receipt: 14 packages ran, 44 cached, 18 without tests, 0 failed
receipt: slow package 53.931s amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow package 51.642s amadan.net/oficina/equipo/internal/runner/provider/pi
receipt: slow package 42.05s amadan.net/oficina/equipo/internal/idtest
receipt: slow package 38.892s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow package 36.735s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow test 21.51s amadan.net/oficina/equipo/internal/runner/provider/opencode TestOpenCodeAcceptanceHostileRepository
receipt: slow test 14.89s amadan.net/oficina/equipo/internal/runner/containment TestEngineeringOfflineGo
receipt: slow test 11.57s amadan.net/oficina/equipo/internal/idtest TestIDCallbackGuardAndPendingNonce
receipt: slow test 9.24s amadan.net/oficina/equipo/internal/runner/containment TestEngineeringMissingModuleCache
receipt: slow test 8.39s amadan.net/oficina/equipo/internal/runner/checks TestCheckNamespaceGoRootInsideModuleCache
machine: 32 CPUs, load 13.08, cpu waiting 5.43%, memory waiting 0.00%, io waiting 0.14%
--- 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
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m22.005s 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 1m20.598s amadan.net/oficina/equipo/internal/headless
receipt: slow test 37.42s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 15.12s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 10.2s amadan.net/oficina/equipo/internal/headless TestBrowserChat
receipt: slow test 7.66s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 5.82s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
machine: 32 CPUs, load 34.00, cpu waiting 20.81%, memory waiting 0.00%, io waiting 0.60%
--- 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
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m30.23s 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.629s amadan.net/oficina/equipo/internal/headless
receipt: slow test 25.44s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 21.85s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 13.89s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 9.89s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
receipt: slow test 7.81s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
machine: 32 CPUs, load 33.04, cpu waiting 18.53%, memory waiting 0.00%, io waiting 0.52%
--- 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
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m39.479s 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 1m37.842s amadan.net/oficina/equipo/internal/headless
receipt: slow test 13.68s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 13.04s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 12.83s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 10.34s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
receipt: slow test 10.05s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsOpenCodeGoLimitRequired
machine: 32 CPUs, load 29.81, cpu waiting 16.25%, memory waiting 0.00%, io waiting 0.45%
--- 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-18T21:07:38.721Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-18T21:07:38.721Z level=INFO msg="startup phase done" phase=state_lock took=54µs
time=2026-11-18T21:07:38.721Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-18T21:07:38.721Z level=INFO msg="startup phase done" phase=claim_roots took=105µs
time=2026-11-18T21:07:38.721Z level=INFO msg="startup phase" phase=sweep
time=2026-11-18T21:07:38.750Z level=INFO msg="startup phase done" phase=sweep took=29.335ms
time=2026-11-18T21:07:38.750Z level=INFO msg="startup phase" phase=credentials
time=2026-11-18T21:07:38.750Z level=INFO msg="startup phase done" phase=credentials took=98µs
time=2026-11-18T21:07:38.750Z level=INFO msg="startup phase" phase=open_state
time=2026-11-18T21:07:38.791Z level=INFO msg="startup phase done" phase=open_state took=40.957ms
time=2026-11-18T21:07:38.792Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-18T21:07:38.793Z level=INFO msg=connecting host=127.0.0.1:39799 protocol=26
time=2026-11-18T21:07:38.794Z level=INFO msg=connected host=127.0.0.1:39799 took=827µs
time=2026-11-18T21:07:38.794Z level=INFO msg="capabilities gathering"
time=2026-11-18T21:07:38.794Z level=INFO msg="capabilities gathered" took=408µs tags=linux,claude,go
time=2026-11-18T21:07:38.795Z level=INFO msg="hello sent" protocol=26
time=2026-11-18T21:07:38.800Z level=INFO msg=welcome protocol=26 role=primary generation=1
time=2026-11-18T21:07:39.819Z 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.82s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m25.809s
FAIL	amadan.net/oficina/equipo/internal/headless	86.116s


receipt: test step 1m27.138s 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 1m25.809s amadan.net/oficina/equipo/internal/headless
receipt: slow test 14.94s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
receipt: slow test 11s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 10.41s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 10.28s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 8.07s amadan.net/oficina/equipo/internal/headless TestBrowserRefreshRace
rastrillo: budget test: go test failed
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 225c04d1b01423ae7d4d7296d1952cfa1d20078d 5.82s 34.00
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 31.27, cpu waiting 16.80%, memory waiting 0.00%, io waiting 0.47%
--- 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/idtest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserOficinaIDDoor)$' ./internal/idtest

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

receipt: test step 289ms against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1.889s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 1.89s 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|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 339ms against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 2m49.987s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 16.87s amadan.net/oficina/equipo/internal/thintest TestBrowserAccessRequest
receipt: slow test 14.32s amadan.net/oficina/equipo/internal/thintest TestBrowserSettingsTeams
receipt: slow test 10.85s amadan.net/oficina/equipo/internal/thintest TestBrowserPlacementQuestionAndPending
receipt: slow test 9.05s amadan.net/oficina/equipo/internal/thintest TestBrowserThinkingCycles
receipt: slow test 7.65s amadan.net/oficina/equipo/internal/thintest TestBrowserInnerScreens
machine: 32 CPUs, load 1.20, cpu waiting 1.07%, memory waiting 0.00%, io waiting 2.36%
--- 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   (53s)
ok ./internal/headless TestHeadlessConnections/A5_cancel_and_sign_out 5.32s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.30s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 9.49s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 9.89s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 24.88s
+ 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   (54s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 14.30s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 12.60s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 11.27s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 13.75s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless   (22s)
ok ./internal/headless TestMixedVersions 20.03s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks   (1s)
ok ./internal/runner/checks TestCheckSandboxDeniedPathsTampering 0.78s
+ go test -tags testbuild -timeout 15m -v -run '^TestRunnerCancelAndSupersede$' ./internal/runner/thin   (0s)
ok ./internal/runner/thin TestRunnerCancelAndSupersede 0.05s
quarantine: 0 flaked (passed on the retry), 0 failed
machine: 32 CPUs, load 32.77, cpu waiting 22.69%, memory waiting 0.00%, io waiting 0.99%
--- 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 8.425s 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.347s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 174ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 92ms amadan.net/oficina/equipo/internal/runner/provider/codex
receipt: slow package 2ms amadan.net/oficina/equipo/internal/runner/provider
receipt: slow package 1ms amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow test 5.18s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.76s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 310ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 170ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 90ms 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.015s 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.693s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 260ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 180ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryCleansScratch
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceExitStatus
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
machine: 32 CPUs, load 5.07, cpu waiting 4.90%, memory waiting 0.00%, io waiting 2.00%
--- 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 29.0%, load 19.22
shard 25: make runner-dead-references lanes-check build vet fmt-check budget migration-check
python3 scripts/runner-dead-references.py
reference scan: 2380 text files, 2744 matches, 5 failures
native/apple/Sources/EquipoKit/UI/Components.swift:7:12: unclassified Node
native/apple/Sources/EquipoKit/UI/Components.swift:38:29: unclassified Node
native/apple/Tests/EquipoKitTests/Fixtures/thin/events.json:20:12: unclassified node
native/apple/Tests/EquipoKitTests/Fixtures/thin/snapshot.json:263:10: unclassified node
native/apple/Tests/EquipoKitTests/Fixtures/thin/snapshot.json:301:12: unclassified node
make[1]: *** [Makefile:229: runner-dead-references] Error 1
machine: 32 CPUs, load 19.22, cpu waiting 13.07%, memory waiting 0.00%, io waiting 1.43%
make: *** [Makefile:113: ci-shard] Error 2

amadan: step check shard 25 of 29 failed: exit status 2
--- shard 26 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: staticcheck started 30s late; cpu waiting 29.0%, load 19.22
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 19.22, cpu waiting 13.07%, memory waiting 0.00%, io waiting 1.43%
--- 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 29.0%, load 19.22
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 24.49, cpu waiting 15.92%, memory waiting 0.00%, io waiting 1.34%
--- 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 29.0%, load 19.22
shard 28: make gitleaks
9:06PM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
9:07PM INF 980 commits scanned.
9:07PM INF scanned ~59003233 bytes (59 MB) in 13.4s
9:07PM INF no leaks found
machine: 32 CPUs, load 30.34, cpu waiting 20.59%, memory waiting 0.00%, io waiting 1.17%

amadan: job failed at step check shards 12, 25 of 29 — its output is above, not at the tail of this log
diff --git a/internal/equipo/personapi/device_proof_vector_test.go b/internal/equipo/personapi/device_proof_vector_test.go
index 9c73a0e9..f5c37240 100644
--- a/internal/equipo/personapi/device_proof_vector_test.go
+++ b/internal/equipo/personapi/device_proof_vector_test.go
@@ -38,6 +38,9 @@ func nativeProofVectors() []nativeProofVector {
// Go escapes <, > and & and leaves / alone; Swift's encoders differ on
// both, so the native side must build the array itself.
{Name: "escapes", Instance: "a/b<c>&d é
", ID: "dev_\"quoted\"\\", Nonce: "n/o<n>&ce"},
+ // Since Go 1.22, \b and \f are written as short escapes; other control
+ // characters as \u00XX.
+ {Name: "controls", Instance: "a\bb\fc\x01d\te\nf", ID: "dev_\x7f", Nonce: "n\rx"},
}
for i := range in {
seed := make([]byte, ed25519.SeedSize)
diff --git a/native/apple/Sources/EquipoKit/API/Thin.swift b/native/apple/Sources/EquipoKit/API/Thin.swift
index ea459388..27706260 100644
--- a/native/apple/Sources/EquipoKit/API/Thin.swift
+++ b/native/apple/Sources/EquipoKit/API/Thin.swift
@@ -95,13 +95,14 @@ public struct ThinTask: Codable, Sendable, Identifiable, Equatable {
public var verdict: String
public var reviewLabel: String
/// Why the task waits on the person ("merge", ...); empty when it does not.
+ /// Why the task waits on its creator; empty when it does not. The
+ /// team list marks every creator's tasks: use EquipoSession.waitsOnYou.
public var needsYou: String
public var steps: [ThinStep]?
public var thread: [ThreadEntry]?
public var createdAt: Date
public var updatedAt: Date
public var kind: String?
- public var waitsOnYou: Bool { !needsYou.isEmpty }
}
public struct ThinProject: Codable, Sendable, Identifiable, Equatable {
diff --git a/native/apple/Sources/EquipoKit/API/Transport.swift b/native/apple/Sources/EquipoKit/API/Transport.swift
index 5a2ba9ac..e383ef61 100644
--- a/native/apple/Sources/EquipoKit/API/Transport.swift
+++ b/native/apple/Sources/EquipoKit/API/Transport.swift
@@ -94,6 +94,10 @@ public final class URLSessionTransport: NSObject, EquipoTransport, URLSessionTas
observe(.responded(status: http.statusCode))
guard data.count <= Self.maxBytes else { throw EquipoAPIError.tooLarge }
return APIResponse(status: http.statusCode, data: data)
+ } catch let error as URLError where error.code == .cancelled {
+ // This app stopped asking (the stream closed, pairing cancelled):
+ // the team was not unreachable.
+ throw CancellationError()
} catch let error as URLError {
observe(.offline(error.code))
throw EquipoAPIError.offline
@@ -108,6 +112,7 @@ extension URLSessionTransport {
r.timeoutInterval = 60
let (bytes, response): (URLSession.AsyncBytes, URLResponse)
do { (bytes, response) = try await streamSession.bytes(for: r) }
+ catch let error as URLError where error.code == .cancelled { throw CancellationError() }
catch let error as URLError { observe(.offline(error.code)); throw EquipoAPIError.offline }
guard let http = response as? HTTPURLResponse else { throw EquipoAPIError.offline }
observe(.responded(status: http.statusCode))
diff --git a/native/apple/Sources/EquipoKit/Pairing/DeviceProof.swift b/native/apple/Sources/EquipoKit/Pairing/DeviceProof.swift
index 4924ef9b..d0a34814 100644
--- a/native/apple/Sources/EquipoKit/Pairing/DeviceProof.swift
+++ b/native/apple/Sources/EquipoKit/Pairing/DeviceProof.swift
@@ -58,6 +58,9 @@ public enum DeviceProof {
case "\n": out += "\\n"
case "\r": out += "\\r"
case "\t": out += "\\t"
+ // Go 1.22 and later write these two as short escapes.
+ case "\u{8}": out += "\\b"
+ case "\u{c}": out += "\\f"
case "<", ">", "&", "\u{2028}", "\u{2029}":
out += String(format: "\\u%04x", scalar.value)
default:
diff --git a/native/apple/Sources/EquipoKit/Pairing/Pairing.swift b/native/apple/Sources/EquipoKit/Pairing/Pairing.swift
index e0f10528..502034d1 100644
--- a/native/apple/Sources/EquipoKit/Pairing/Pairing.swift
+++ b/native/apple/Sources/EquipoKit/Pairing/Pairing.swift
@@ -49,7 +49,9 @@ public final class PairingModel {
if !text.contains("://") { text = "https://" + text }
guard let url = URL(string: text), let scheme = url.scheme?.lowercased(), let host = url.host?.lowercased(), !host.isEmpty, url.user == nil else { return nil }
guard scheme == "https" || (scheme == "http" && isLoopback(host)) else { return nil }
- var c = URLComponents(); c.scheme = scheme; c.host = host; c.port = url.port
+ // The default port is the same place as none: the server's links leave it out.
+ let port = url.port == (scheme == "https" ? 443 : 80) ? nil : url.port
+ var c = URLComponents(); c.scheme = scheme; c.host = host; c.port = port
return c.url
}
static func isLoopback(_ host: String) -> Bool { host == "127.0.0.1" || host == "localhost" || host == "::1" }
@@ -87,11 +89,15 @@ public final class PairingModel {
do {
let credential = try await client.exchangeDevice(proof)
account.credential = credential
- let me = try await EquipoClient(transport: makeTransport(origin), token: credential.token).me()
- account.teamName = me.teamName; account.address = me.person.address
+ // The server now holds a live device: keep it before anything else can fail.
try accounts.save(account)
self.account = account
- step = .approved(teamName: me.teamName)
+ if let me = try? await EquipoClient(transport: makeTransport(origin), token: credential.token).me() {
+ account.teamName = me.teamName; account.address = me.person.address
+ try? accounts.save(account)
+ self.account = account
+ }
+ step = .approved(teamName: account.teamName ?? origin.host ?? "")
return
} catch let error as EquipoAPIError {
switch error.code {
diff --git a/native/apple/Sources/EquipoKit/Pairing/SecretStore.swift b/native/apple/Sources/EquipoKit/Pairing/SecretStore.swift
index 786ad8a2..42527a90 100644
--- a/native/apple/Sources/EquipoKit/Pairing/SecretStore.swift
+++ b/native/apple/Sources/EquipoKit/Pairing/SecretStore.swift
@@ -32,7 +32,12 @@ public struct KeychainSecretStore: SecretStore {
guard updated == errSecItemNotFound else { throw StoreError.keychain(updated) }
var q = query(account)
q[kSecValueData as String] = data
- q[kSecAttrAccessible as String] = kSecAttrAccessibleAfterFirstUnlockThisDeviceOnly
+ // iPhone: only while unlocked, never in a backup or on another device.
+ // Slice 1 does no background work, so it needs nothing looser. On the
+ // Mac this lands in the login keychain, readable by this app only
+ // (its default access list); the data protection keychain would need
+ // a keychain-access-groups entitlement and so a provisioning profile.
+ q[kSecAttrAccessible as String] = kSecAttrAccessibleWhenUnlockedThisDeviceOnly
let added = SecItemAdd(q as CFDictionary, nil)
guard added == errSecSuccess else { throw StoreError.keychain(added) }
}
diff --git a/native/apple/Sources/EquipoKit/Presentation/Roster.swift b/native/apple/Sources/EquipoKit/Presentation/Roster.swift
index 86dd836f..3d73c9f2 100644
--- a/native/apple/Sources/EquipoKit/Presentation/Roster.swift
+++ b/native/apple/Sources/EquipoKit/Presentation/Roster.swift
@@ -93,14 +93,15 @@ public struct TaskReport: Sendable, Equatable {
public var title: String { task.title }
public var stage: Stage? { Stage(wire: task.stage) }
public var cancelled: Bool { task.stage == "cancelled" }
- public var needsYou: Bool { task.waitsOnYou }
+ /// Waits on this person (their Needs you), not merely on its creator.
+ public var needsYou: Bool
- public init(_ task: ThinTask) { self.task = task }
+ public init(_ task: ThinTask, needsYou: Bool) { self.task = task; self.needsYou = needsYou }
/// chat_roster.go rosterTone.
public var tone: StageTone {
if task.checks == "failed" || task.verdict == "changes_requested" { return .negative }
- return task.waitsOnYou ? .warning : .positive
+ return needsYou ? .warning : .positive
}
public var eyebrow: String {
if cancelled { return String(localized: "stage.cancelled", bundle: .module) }
@@ -207,7 +208,7 @@ public enum Feed {
let n = session.messages.count + i
if card.kind == "task" {
guard let task = session.task(card.taskId) else { continue }
- let report = TaskReport(task)
+ let report = TaskReport(task, needsYou: session.waitsOnYou(task))
let byline = RosterByline(who: report.specialist, verb: String(localized: "byline.reports", bundle: .module), project: project, time: at)
timed.append((at, n, .report(card, byline, report, compact: deciding.contains(task.id))))
} else if isReceipt(card) {
@@ -226,9 +227,11 @@ public enum Feed {
return items
}
- /// The card on the web: the conversation, at the card.
+ /// The card on the web: the conversation, at the card, linked as the
+ /// web links it (work_needs.html), so an older card is found too.
public static func webURL(for card: ThinCard, origin: URL) -> URL {
var c = URLComponents(url: origin.appendingPathComponent("conversation"), resolvingAgainstBaseURL: false)!
+ c.queryItems = [URLQueryItem(name: "card", value: card.id)]
c.fragment = "card-" + card.id
return c.url!
}
@@ -238,6 +241,8 @@ public enum Feed {
switch (card.kind, card.state) {
case ("project", "added"): return String(localized: "receipt.added \(card.name)", bundle: .module)
case ("project", "created"): return String(localized: "receipt.created \(card.name)", bundle: .module)
+ case ("project", "removed"): return String(localized: "receipt.removed \(card.name)", bundle: .module)
+ case ("project", "changed"): return String(localized: "receipt.changed \(card.choice)", bundle: .module)
case ("project", _): return String(localized: "receipt.working \(card.name)", bundle: .module)
case ("home", _) where card.name.isEmpty: return String(localized: "receipt.home_cleared", bundle: .module)
case ("home", _): return String(localized: "receipt.home \(card.name)", bundle: .module)
diff --git a/native/apple/Sources/EquipoKit/Presentation/ThreadTurn.swift b/native/apple/Sources/EquipoKit/Presentation/ThreadTurn.swift
index 0b9967a9..9fc4183e 100644
--- a/native/apple/Sources/EquipoKit/Presentation/ThreadTurn.swift
+++ b/native/apple/Sources/EquipoKit/Presentation/ThreadTurn.swift
@@ -8,12 +8,17 @@ public struct ThreadTurn: Identifiable, Sendable, Equatable {
public var person: String?
public var text: String
public var time: Date?
- public var pending = false
+ /// Yours and still on its way: how it is going. nil once the server has it.
+ public var delivery: EquipoSession.Outgoing.State?
public var own: Bool { who == nil && person == nil }
public var timeText: String { time.map { $0.formatted(date: .omitted, time: .shortened) } ?? "" }
- public init(id: String, who: Specialist?, person: String? = nil, text: String, time: Date?, pending: Bool = false) {
- self.id = id; self.who = who; self.person = person; self.text = text; self.time = time; self.pending = pending
+ public init(id: String, who: Specialist?, person: String? = nil, text: String, time: Date?, delivery: EquipoSession.Outgoing.State? = nil) {
+ self.id = id; self.who = who; self.person = person; self.text = text; self.time = time; self.delivery = delivery
+ }
+ /// A reply this device is still sending.
+ public init(_ outgoing: EquipoSession.Outgoing) {
+ self.init(id: outgoing.id, who: nil, text: outgoing.text, time: nil, delivery: outgoing.state)
}
/// A thread entry: yours, Equipo's own update (author "equipo"), or a teammate's.
public init(_ entry: ThreadEntry, me: String?) {
diff --git a/native/apple/Sources/EquipoKit/Resources/Localizable.xcstrings b/native/apple/Sources/EquipoKit/Resources/Localizable.xcstrings
index e9ef67cd..81ab2ab6 100644
--- a/native/apple/Sources/EquipoKit/Resources/Localizable.xcstrings
+++ b/native/apple/Sources/EquipoKit/Resources/Localizable.xcstrings
@@ -63,7 +63,7 @@
"en": {
"stringUnit": {
"state": "translated",
- "value": "Signing out removes this device from the team. You can pair it again at any time."
+ "value": "Signing out forgets this device here at once, and removes it from the team when the team can be reached. You can pair it again at any time."
}
}
}
@@ -217,7 +217,7 @@
"en": {
"stringUnit": {
"state": "translated",
- "value": "Couldn’t reach your team, so nothing was sent. Try again."
+ "value": "Couldn’t reach your team. Try again."
}
}
}
@@ -420,6 +420,17 @@
}
}
},
+ "device.mac": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Mac"
+ }
+ }
+ }
+ },
"fact.branch": {
"extractionState": "manual",
"localizations": {
@@ -778,7 +789,7 @@
"en": {
"stringUnit": {
"state": "translated",
- "value": "Waiting for you to approve. The code lasts 10 minutes."
+ "value": "Waiting for you to approve."
}
}
}
@@ -849,6 +860,39 @@
}
}
},
+ "read.failed": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Your team answered, but not with what this screen needs. Try again in a moment."
+ }
+ }
+ }
+ },
+ "read.failed_title": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Couldn’t load this"
+ }
+ }
+ }
+ },
+ "read.retry": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Try again"
+ }
+ }
+ }
+ },
"receipt.added %@": {
"extractionState": "manual",
"localizations": {
@@ -860,6 +904,17 @@
}
}
},
+ "receipt.changed %@": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Moved to %@"
+ }
+ }
+ }
+ },
"receipt.created %@": {
"extractionState": "manual",
"localizations": {
@@ -893,6 +948,17 @@
}
}
},
+ "receipt.removed %@": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Removed %@"
+ }
+ }
+ }
+ },
"receipt.working %@": {
"extractionState": "manual",
"localizations": {
@@ -1432,6 +1498,17 @@
}
}
},
+ "thinking.waiting": {
+ "extractionState": "manual",
+ "localizations": {
+ "en": {
+ "stringUnit": {
+ "state": "translated",
+ "value": "Waiting for a connection"
+ }
+ }
+ }
+ },
"thinking.working": {
"extractionState": "manual",
"localizations": {
diff --git a/native/apple/Sources/EquipoKit/Session/EquipoSession.swift b/native/apple/Sources/EquipoKit/Session/EquipoSession.swift
index ba2b7713..99adb2fe 100644
--- a/native/apple/Sources/EquipoKit/Session/EquipoSession.swift
+++ b/native/apple/Sources/EquipoKit/Session/EquipoSession.swift
@@ -11,7 +11,8 @@ public final class EquipoSession {
public enum Status: Equatable, Sendable { case loading, ready, signedOut }
/// Something this device is sending. It stays, with its key, until the
- /// server has it; offline it waits and is sent again as itself.
+ /// server has it; offline it waits, and is sent again as itself when the
+ /// team answers again or the person taps it.
public struct Outgoing: Identifiable, Equatable, Sendable {
public enum State: Equatable, Sendable { case sending, waiting, failed }
public let id: String
@@ -34,6 +35,8 @@ public final class EquipoSession {
/// The latest activity of each live turn, from the event stream.
public private(set) var activity: [String: ThinActivity] = [:]
public private(set) var outgoing: [Outgoing] = []
+ /// Turns this person asked to stop that are still running.
+ public private(set) var stopping: Set<String> = []
public private(set) var refreshFailed = false
public private(set) var cursor: Int64 = 0
@@ -41,6 +44,13 @@ public final class EquipoSession {
private let accounts: DeviceAccounts
private let runner = CoalescedRunner()
private var live: Task<Void, Never>?
+ /// Reads asked for by the stream: one runs at a time, and a burst
+ /// during it is answered by one more read after it.
+ private var pendingRead: Task<Void, Never>?
+ private var readAgain = false
+ /// Answers not yet known to have landed, by card, revision and choice:
+ /// another tap sends the same answer again, as itself.
+ private var unsettledAnswers: [String: PendingWrite] = [:]
private let sleep: @Sendable (Duration) async throws -> Void
public init(account: DeviceAccount, accounts: DeviceAccounts, transport: EquipoTransport? = nil,
@@ -55,6 +65,9 @@ public final class EquipoSession {
public var origin: URL { account.origin }
public var teamName: String { me?.teamName ?? account.teamName ?? origin.host ?? "" }
public func task(_ id: String) -> ThinTask? { tasks.first { $0.id == id } ?? needsYou?.first { $0.id == id } }
+ /// Whether the task waits on this person. The team's task list marks a
+ /// task that waits on its creator; Needs you is this person's own.
+ public func waitsOnYou(_ task: ThinTask) -> Bool { needsYou?.contains { $0.id == task.id } ?? false }
public func project(_ id: String) -> ThinProject? { projects[id] }
/// The coordinator's turn in flight, if any.
public var liveTurn: ThinTurn? { turns.filter(\.isLive).max { $0.createdAt < $1.createdAt } }
@@ -79,8 +92,15 @@ public final class EquipoSession {
needsYou = needsList.items ?? []
status = .ready
refreshFailed = false
+ // The team answers again: what was waiting goes now, as itself.
+ for item in outgoing where item.state == .waiting {
+ let id = item.id
+ outgoing[outgoing.firstIndex { $0.id == id }!].state = .sending
+ Task { await self.deliver(id) }
+ }
} catch let error as EquipoAPIError where error.endsSession {
endSession()
+ } catch is CancellationError {
} catch {
refreshFailed = true
}
@@ -95,6 +115,7 @@ public final class EquipoSession {
cursor = max(cursor, snapshot.cursor)
let liveIDs = Set(turns.filter(\.isLive).map(\.id))
activity = activity.filter { liveIDs.contains($0.key) }
+ stopping.formIntersection(liveIDs)
if account.teamName != snapshot.me.teamName {
account.teamName = snapshot.me.teamName; account.address = snapshot.me.address
try? accounts.save(account)
@@ -114,7 +135,7 @@ public final class EquipoSession {
/// updates the thinking line; anything else is read again through the
/// snapshot. A dropped stream reconnects with backoff.
public func startLive() {
- live?.cancel()
+ guard live == nil else { return }
live = Task { [weak self] in
var backoff = Backoff()
while !Task.isCancelled {
@@ -151,8 +172,33 @@ public final class EquipoSession {
if event.resource == "turn", let data = event.activity { activity[data.turnId] = data }
return
}
+ // Reply text as it streams: the finished message arrives as its own event.
+ if event.type == "delta" { return }
guard Self.shown.contains(event.resource) else { return }
- await refresh()
+ requestRefresh()
+ }
+
+ /// Reads again soon, without holding up the stream.
+ func requestRefresh() {
+ if pendingRead != nil { readAgain = true; return }
+ pendingRead = Task { [weak self] in
+ guard let self else { return }
+ repeat {
+ self.readAgain = false
+ await self.refresh()
+ } while self.readAgain && !Task.isCancelled
+ self.pendingRead = nil
+ }
+ }
+
+ /// Waits for reads and sends already under way (tests, and before a screen settles).
+ func settle() async {
+ for _ in 0..<50 {
+ await pendingRead?.value
+ await Task.yield()
+ if pendingRead == nil && !outgoing.contains(where: { $0.state == .sending }) { return }
+ try? await Task.sleep(for: .milliseconds(2))
+ }
}
static let shown: Set<String> = ["message", "turn", "card", "task", "step", "project", "member"]
@@ -215,7 +261,8 @@ public final class EquipoSession {
if error.endsSession { endSession(); return }
if let i = outgoing.firstIndex(where: { $0.id == id }) { outgoing[i].state = error == .offline ? .waiting : .failed }
} catch {
- if let i = outgoing.firstIndex(where: { $0.id == id }) { outgoing[i].state = .failed }
+ // Cancelled on the way: it may yet be sent, as itself.
+ if let i = outgoing.firstIndex(where: { $0.id == id }) { outgoing[i].state = error is CancellationError ? .waiting : .failed }
}
}
@@ -232,28 +279,39 @@ public final class EquipoSession {
/// Answers a card as the person saw it, bound to that revision. A lost
/// answer is retried as itself; a stale one is never sent again.
public func answer(_ card: ThinCard, choice: String, note: String? = nil) async -> AnswerOutcome {
- guard card.isOpen, let write = try? EquipoClient.answer(choice, note: note, to: card) else { return .changed }
+ guard card.isOpen else { return .changed }
+ let slot = "\(card.id)#\(card.revision)#\(choice)#\(note ?? "")"
+ guard let write = unsettledAnswers[slot] ?? (try? EquipoClient.answer(choice, note: note, to: card)) else { return .failed }
+ unsettledAnswers[slot] = write
var attempts = 0
while true {
do {
let answered = try await client.answer(card: card.id, write)
+ unsettledAnswers[slot] = nil
cards = Self.merge(cards, [answered.card])
await refresh()
return .answered
} catch let error as EquipoAPIError {
+ if error == .offline, attempts < 2 { attempts += 1; try? await sleep(.seconds(2)); continue }
+ // Offline: it may have landed; keep it to send again as itself.
+ if error != .offline { unsettledAnswers[slot] = nil }
if error.endsSession { endSession(); return .failed }
if case .card(_, _, let current) = error { cards = Self.merge(cards, [current]); return .changed }
if error.isStale { await refresh(); return .changed }
- if error == .offline, attempts < 2 { attempts += 1; try? await sleep(.seconds(2)); continue }
return error == .offline ? .offline : .failed
- } catch { return .failed }
+ } catch { unsettledAnswers[slot] = nil; return .failed }
}
}
/// Stops the coordinator's turn in flight: that turn only.
- public func stop(_ turn: ThinTurn) async {
- try? await client.cancelTurn(turn.id)
+ /// Says whether the server took it; on false, Stop is offered again.
+ @discardableResult
+ public func stop(_ turn: ThinTurn) async -> Bool {
+ guard !stopping.contains(turn.id) else { return true }
+ stopping.insert(turn.id)
+ do { try await client.cancelTurn(turn.id) } catch { stopping.remove(turn.id); return false }
await refresh()
+ return true
}
// MARK: Signing out
@@ -261,6 +319,7 @@ public final class EquipoSession {
private func endSession() {
status = .signedOut
stopLive()
+ pendingRead?.cancel(); pendingRead = nil
}
/// Revokes this device on the server, then forgets it here. Forgetting
diff --git a/native/apple/Sources/EquipoKit/UI/LiveCards.swift b/native/apple/Sources/EquipoKit/UI/LiveCards.swift
index 7dc805a5..4538cddc 100644
--- a/native/apple/Sources/EquipoKit/UI/LiveCards.swift
+++ b/native/apple/Sources/EquipoKit/UI/LiveCards.swift
@@ -162,32 +162,35 @@ struct LiveReceipt: View {
}
/// The coordinator at work: the mark, what it is doing, elapsed time and a
-/// quiet Stop for that turn only.
+/// quiet Stop for that turn only. A turn waiting for a connection says so,
+/// without a clock. A Stop the server did not take is offered again.
public struct ThinkingLine: View {
let turn: ThinTurn
let activity: String?
+ let stopping: Bool
var onStop: () -> Void
- @State private var stopping = false
- public init(turn: ThinTurn, activity: String?, onStop: @escaping () -> Void) {
- self.turn = turn; self.activity = activity; self.onStop = onStop
+ public init(turn: ThinTurn, activity: String?, stopping: Bool, onStop: @escaping () -> Void) {
+ self.turn = turn; self.activity = activity; self.stopping = stopping; self.onStop = onStop
}
public var body: some View {
TimelineView(.periodic(from: .now, by: 1)) { context in
+ let waiting = turn.state == "waiting"
let seconds = max(0, Int(context.date.timeIntervalSince(turn.createdAt)))
- let doing = activity ?? String(localized: "thinking.working", bundle: .module)
+ let doing = waiting ? String(localized: "thinking.waiting", bundle: .module)
+ : activity ?? String(localized: "thinking.working", bundle: .module)
HStack(spacing: 0) {
CoordinatorMark(size: 22).frame(width: Metric.indent, alignment: .leading)
HStack(spacing: 0) {
Text(doing).font(Typo.secondaryStrong).foregroundStyle(Palette.text).lineLimit(1).truncationMode(.tail)
- Text(" · ").foregroundStyle(Palette.faint).accessibilityHidden(true)
- Text(Duration.seconds(seconds).formatted(.units(allowed: [.minutes, .seconds], width: .narrow)))
- .monospacedDigit().foregroundStyle(Palette.secondary).fixedSize()
+ if !waiting {
+ Text(" · ").foregroundStyle(Palette.faint).accessibilityHidden(true)
+ Text(Duration.seconds(seconds).formatted(.units(allowed: [.minutes, .seconds], width: .narrow)))
+ .monospacedDigit().foregroundStyle(Palette.secondary).fixedSize()
+ }
}.font(Typo.secondary)
Spacer(minLength: 8)
QuietLink(title: stopping ? String(localized: "thinking.stopping", bundle: .module) : String(localized: "thinking.stop", bundle: .module)) {
- guard !stopping else { return }
- stopping = true
- onStop()
+ if !stopping { onStop() }
}
}
.accessibilityElement(children: .combine)
diff --git a/native/apple/Sources/EquipoKit/UI/RosterViews.swift b/native/apple/Sources/EquipoKit/UI/RosterViews.swift
index f771967d..2474ef33 100644
--- a/native/apple/Sources/EquipoKit/UI/RosterViews.swift
+++ b/native/apple/Sources/EquipoKit/UI/RosterViews.swift
@@ -394,6 +394,7 @@ struct CardHead: View {
struct ThreadBubble: View {
let turn: ThreadTurn
+ var retry: () -> Void = {}
var body: some View {
if turn.own {
VStack(alignment: .trailing, spacing: 4) {
@@ -402,12 +403,12 @@ struct ThreadBubble: View {
.padding(.horizontal, 12).padding(.vertical, 8)
.background(Palette.soft, in: RoundedRectangle(cornerRadius: 14, style: .continuous))
.overlay(RoundedRectangle(cornerRadius: 14, style: .continuous).strokeBorder(Palette.lightRim, lineWidth: 1))
- Text(String(localized: "thread.sent", bundle: .module)).font(Typo.caption).foregroundStyle(Palette.faint)
+ delivery
}
.padding(.leading, 32)
.frame(maxWidth: .infinity, alignment: .trailing)
.accessibilityElement(children: .combine)
- .accessibilityLabel(Text(String(localized: "thread.own_spoken \(turn.text)", bundle: .module)))
+ .accessibilityLabel(Text(spoken))
} else {
let who = turn.who ?? .coordinator
HStack(alignment: .top, spacing: 8) {
@@ -430,6 +431,29 @@ struct ThreadBubble: View {
}
}
}
+extension ThreadBubble {
+ /// Sent only once the server has it; until then, how it is going.
+ @ViewBuilder var delivery: some View {
+ switch turn.delivery {
+ case nil: Text(String(localized: "thread.sent", bundle: .module)).font(Typo.caption).foregroundStyle(Palette.faint)
+ case .sending: Text(String(localized: "message.sending", bundle: .module)).font(Typo.caption).foregroundStyle(Palette.faint)
+ case .waiting:
+ Button(action: retry) { Text(String(localized: "message.waiting", bundle: .module)).underline() }
+ .buttonStyle(.plain).font(Typo.caption).foregroundStyle(Palette.secondary).frame(minHeight: Metric.target)
+ case .failed:
+ Button(action: retry) { Text(String(localized: "message.failed", bundle: .module)).underline() }
+ .buttonStyle(.plain).font(Typo.caption).foregroundStyle(Palette.negative).frame(minHeight: Metric.target)
+ }
+ }
+ var spoken: String {
+ switch turn.delivery {
+ case nil: return String(localized: "thread.own_spoken \(turn.text)", bundle: .module)
+ case .sending: return String(localized: "message.own_spoken \(turn.text)", bundle: .module) + ". " + String(localized: "message.sending", bundle: .module)
+ case .waiting: return String(localized: "message.own_spoken \(turn.text)", bundle: .module) + ". " + String(localized: "message.waiting", bundle: .module)
+ case .failed: return String(localized: "message.own_spoken \(turn.text)", bundle: .module) + ". " + String(localized: "message.failed", bundle: .module)
+ }
+ }
+}
struct ReadingLine: View {
let who: Specialist
var body: some View {
@@ -444,12 +468,12 @@ struct ReadingLine: View {
/// The card's composer: the main composer's pill, smaller. The send
/// button is a 44-point target centred in a 46-point pill.
struct MiniComposer: View {
- var placeholder = "Reply"
+ var placeholder = String(localized: "task.reply", bundle: .module)
@State var text: String
var busy = false
var focused = false
var onSend: (String) -> Void = { _ in }
- init(placeholder: String = "Reply", text: String = "", busy: Bool = false, focused: Bool = false, onSend: @escaping (String) -> Void = { _ in }) {
+ init(placeholder: String = String(localized: "task.reply", bundle: .module), text: String = "", busy: Bool = false, focused: Bool = false, onSend: @escaping (String) -> Void = { _ in }) {
self.placeholder = placeholder; _text = State(initialValue: text); self.busy = busy; self.focused = focused; self.onSend = onSend
}
var body: some View {
@@ -487,19 +511,6 @@ struct MiniComposer: View {
.background(shape.stroke(Palette.accent.opacity(focused || has ? 0.18 : 0), lineWidth: 6))
}
}
-/// "Talk about this": the task's thread, in a drawer under the report.
-struct SubChatDrawer: View {
- let turns: [ThreadTurn]
- var body: some View {
- VStack(alignment: .leading, spacing: Metric.gap) {
- ForEach(turns) { ThreadBubble(turn: $0) }
- MiniComposer(placeholder: "Reply")
- }
- .padding(12)
- .background(Palette.surface2, in: RoundedRectangle(cornerRadius: Metric.raised - 4, style: .continuous))
- .overlay(RoundedRectangle(cornerRadius: Metric.raised - 4, style: .continuous).strokeBorder(Palette.border, lineWidth: 1))
- }
-}
// MARK: - Messages, the thinking line and the roll-up
diff --git a/native/apple/Sources/EquipoKit/UI/Screens/ConversationScreen.swift b/native/apple/Sources/EquipoKit/UI/Screens/ConversationScreen.swift
index 389e83b7..d3a73bfe 100644
--- a/native/apple/Sources/EquipoKit/UI/Screens/ConversationScreen.swift
+++ b/native/apple/Sources/EquipoKit/UI/Screens/ConversationScreen.swift
@@ -14,6 +14,9 @@ public struct ConversationScreen: View {
ScrollViewReader { proxy in
ScrollView {
LazyVStack(alignment: .leading, spacing: 20) {
+ if items.isEmpty && session.status != .ready && session.refreshFailed {
+ ReadFailed { Task { await session.refresh() } }
+ }
if items.isEmpty && session.status == .ready {
Text(String(localized: "conversation.empty", bundle: .module))
.font(Typo.body).foregroundStyle(Palette.secondary).padding(.top, 40)
@@ -60,7 +63,7 @@ public struct ConversationScreen: View {
case .receipt(let card, _):
LiveReceipt(card: card)
case .thinking(let turn, let activity):
- ThinkingLine(turn: turn, activity: activity) { Task { await session.stop(turn) } }
+ ThinkingLine(turn: turn, activity: activity, stopping: session.stopping.contains(turn.id)) { Task { await session.stop(turn) } }
}
}
}
diff --git a/native/apple/Sources/EquipoKit/UI/Screens/PairingView.swift b/native/apple/Sources/EquipoKit/UI/Screens/PairingView.swift
index 80c77285..b2002306 100644
--- a/native/apple/Sources/EquipoKit/UI/Screens/PairingView.swift
+++ b/native/apple/Sources/EquipoKit/UI/Screens/PairingView.swift
@@ -87,7 +87,7 @@ public struct PairingView: View {
#if canImport(UIKit)
return UIDevice.current.name
#else
- return Host.current().localizedName ?? "Mac"
+ return Host.current().localizedName ?? String(localized: "device.mac", bundle: .module)
#endif
}
diff --git a/native/apple/Sources/EquipoKit/UI/Screens/TaskScreens.swift b/native/apple/Sources/EquipoKit/UI/Screens/TaskScreens.swift
index 21756375..146c6db8 100644
--- a/native/apple/Sources/EquipoKit/UI/Screens/TaskScreens.swift
+++ b/native/apple/Sources/EquipoKit/UI/Screens/TaskScreens.swift
@@ -18,10 +18,12 @@ public struct NeedsScreen: View {
}
ForEach(needs) { task in
VStack(alignment: .leading, spacing: 8) {
- TaskRowButton(task: task) { openTask(task.id) }
+ TaskRowButton(task: task, needsYou: session.waitsOnYou(task)) { openTask(task.id) }
TaskCards(session: session, task: task)
}
}
+ } else if session.refreshFailed {
+ ReadFailed { Task { await session.refresh() } }
} else {
ProgressView().frame(maxWidth: .infinity).padding(.top, 40)
}
@@ -40,9 +42,9 @@ public struct TasksScreen: View {
public init(session: EquipoSession, openTask: @escaping (String) -> Void) { self.session = session; self.openTask = openTask }
public var body: some View {
List {
- group(String(localized: "tasks.needs_you", bundle: .module), session.tasks.filter(\.waitsOnYou))
- group(String(localized: "tasks.in_progress", bundle: .module), session.tasks.filter { !$0.waitsOnYou && !Self.finished($0) })
- group(String(localized: "tasks.finished", bundle: .module), session.tasks.filter { !$0.waitsOnYou && Self.finished($0) })
+ group(String(localized: "tasks.needs_you", bundle: .module), session.tasks.filter { session.waitsOnYou($0) })
+ group(String(localized: "tasks.in_progress", bundle: .module), session.tasks.filter { !session.waitsOnYou($0) && !Self.finished($0) })
+ group(String(localized: "tasks.finished", bundle: .module), session.tasks.filter { !session.waitsOnYou($0) && Self.finished($0) })
}
.scrollContentBackground(.hidden).background(Palette.background)
.refreshable { await session.refresh() }
@@ -58,7 +60,7 @@ public struct TasksScreen: View {
if !tasks.isEmpty {
Section(title) {
ForEach(tasks) { task in
- TaskRowButton(task: task) { openTask(task.id) }
+ TaskRowButton(task: task, needsYou: session.waitsOnYou(task)) { openTask(task.id) }
}
}.listRowBackground(Palette.surface)
}
@@ -67,9 +69,10 @@ public struct TasksScreen: View {
struct TaskRowButton: View {
let task: ThinTask
+ let needsYou: Bool
var action: () -> Void
var body: some View {
- let report = TaskReport(task)
+ let report = TaskReport(task, needsYou: needsYou)
Button(action: action) {
HStack(alignment: .center, spacing: 10) {
VStack(alignment: .leading, spacing: 5) {
@@ -140,7 +143,7 @@ public struct TaskScreen: View {
}
@ViewBuilder private func content(_ task: ThinTask) -> some View {
- let report = TaskReport(task)
+ let report = TaskReport(task, needsYou: session.waitsOnYou(task))
VStack(alignment: .leading, spacing: 20) {
VStack(alignment: .leading, spacing: 6) {
HStack {
@@ -185,12 +188,12 @@ struct TaskThread: View {
var sent: () -> Void = {}
var body: some View {
let turns = (task.thread ?? []).map { ThreadTurn($0, me: session.me?.address) }
- + session.outgoing.filter { $0.taskID == task.id }.map { ThreadTurn(id: $0.id, who: nil, text: $0.text, time: nil, pending: true) }
+ + session.outgoing.filter { $0.taskID == task.id }.map(ThreadTurn.init)
VStack(alignment: .leading, spacing: Metric.gap) {
if turns.isEmpty {
Text(String(localized: "task.thread_empty", bundle: .module)).font(Typo.secondary).foregroundStyle(Palette.secondary)
}
- ForEach(turns) { ThreadBubble(turn: $0) }
+ ForEach(turns) { turn in ThreadBubble(turn: turn) { Task { await session.retry(turn.id) } } }
MiniComposer(placeholder: String(localized: "task.reply", bundle: .module)) { text in
Task { await session.send(text, inThreadOf: task.id); sent() }
}
@@ -200,3 +203,18 @@ struct TaskThread: View {
.overlay(RoundedRectangle(cornerRadius: Metric.raised - 4, style: .continuous).strokeBorder(Palette.border, lineWidth: 1))
}
}
+
+/// The team answered, but not with what the screens need: say so, offer again.
+struct ReadFailed: View {
+ var retry: () -> Void
+ var body: some View {
+ ContentUnavailableView {
+ Label(String(localized: "read.failed_title", bundle: .module), systemImage: "exclamationmark.triangle")
+ } description: {
+ Text(String(localized: "read.failed", bundle: .module))
+ } actions: {
+ RosterButton(title: String(localized: "read.retry", bundle: .module), action: retry)
+ }
+ .padding(.top, 40)
+ }
+}
diff --git a/native/apple/Sources/EquipoMac/EquipoMacApp.swift b/native/apple/Sources/EquipoMac/EquipoMacApp.swift
index 1a45c8a8..11e3a3ff 100644
--- a/native/apple/Sources/EquipoMac/EquipoMacApp.swift
+++ b/native/apple/Sources/EquipoMac/EquipoMacApp.swift
@@ -53,7 +53,10 @@ struct MacRoot: View {
.frame(minWidth: 860, minHeight: 560)
.onAppear { model.foreground() }
.onReceive(NotificationCenter.default.publisher(for: NSApplication.didBecomeActiveNotification)) { _ in model.foreground() }
- .onReceive(NotificationCenter.default.publisher(for: NSApplication.didResignActiveNotification)) { _ in model.background() }
+ // Live while a window can be seen, even beside another app.
+ .onReceive(NotificationCenter.default.publisher(for: NSApplication.didChangeOcclusionStateNotification)) { _ in
+ NSApp.occlusionState.contains(.visible) ? model.foreground() : model.background()
+ }
.onChange(of: model.session?.status) { _, status in if status == .signedOut { model.sessionEnded() } }
}
}
diff --git a/native/apple/Sources/EquipoMac/LiveTranscript.swift b/native/apple/Sources/EquipoMac/LiveTranscript.swift
index 75102c2c..8532e04d 100644
--- a/native/apple/Sources/EquipoMac/LiveTranscript.swift
+++ b/native/apple/Sources/EquipoMac/LiveTranscript.swift
@@ -21,6 +21,8 @@ final class LiveTranscript: NSView {
var openTask: (String) -> Void
private(set) var items: [FeedItem] = []
private var answers: [String: AnswerState] = [:]
+ /// The card revision each answer state belongs to: a newer card clears it.
+ private var answeredRevision: [String: Int64] = [:]
private let scroll = NSScrollView()
private let document = FlippedView()
let composer = MacComposer()
@@ -130,7 +132,7 @@ final class LiveTranscript: NSView {
place(receiptRow(card, width: width))
case .thinking(let turn, let activity):
let session = self.session
- place(hosted(ThinkingLine(turn: turn, activity: activity) { Task { await session.stop(turn) } }, width: width))
+ place(hosted(ThinkingLine(turn: turn, activity: activity, stopping: session.stopping.contains(turn.id)) { Task { await session.stop(turn) } }, width: width))
}
}
// The last item scrolls clear of the composer.
@@ -208,6 +210,9 @@ final class LiveTranscript: NSView {
}
private func questionCard(_ card: ThinCard, taskTitle: String?, width: CGFloat) -> RaisedPlate {
+ if let seen = answeredRevision[card.id], seen != card.revision {
+ if case .sending = answers[card.id] {} else { answers[card.id] = nil; answeredRevision[card.id] = nil }
+ }
let state = answers[card.id]
let plate = RaisedPlate(width: width, height: 0, flat: !card.isOpen)
let inner = width - 2 * MacMetric.pad
@@ -264,6 +269,7 @@ final class LiveTranscript: NSView {
private func submit(card: ThinCard, choice: String) {
if case .sending = answers[card.id] { return }
answers[card.id] = .sending(choice)
+ answeredRevision[card.id] = card.revision
rebuild()
let session = self.session
Task { [weak self] in
diff --git a/native/apple/Tests/EquipoKitTests/Fixtures/device-proof-vectors.json b/native/apple/Tests/EquipoKitTests/Fixtures/device-proof-vectors.json
index 0230808f..7fa68c5b 100644
--- a/native/apple/Tests/EquipoKitTests/Fixtures/device-proof-vectors.json
+++ b/native/apple/Tests/EquipoKitTests/Fixtures/device-proof-vectors.json
@@ -20,5 +20,16 @@
"nonce": "n/o\u003cn\u003e\u0026ce",
"message": "[\"equipo.person.device.v1\",\"a/b\\u003cc\\u003e\\u0026d é\\u2028\",\"dev_\\\"quoted\\\"\\\\\",\"WyJhL2JcdTAwM2NjXHUwMDNlXHUwMDI2ZCDDqVx1MjAyOCIsIlE0SjdYUloyTTNLUDZUQk4iXQ\",\"n/o\\u003cn\\u003e\\u0026ce\"]",
"signature": "7DVst_PqFo8W12gYPjRU4CtUbdKrPr9ryX00iSbsDC789Yrk5D4ty0MTgIq2J5ALrKwwcozZambpO0bjft4YAw"
+ },
+ {
+ "name": "controls",
+ "seed": "Pj9AQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVpbXF0",
+ "public_key": "0TR3c1AbI3i5josM83kiNMKzZUQRm2t8SahAxIVyrNA",
+ "instance": "a\bb\fc\u0001d\te\nf",
+ "id": "dev_",
+ "challenge": "WyJhXGJiXGZjXHUwMDAxZFx0ZVxuZiIsIlE0SjdYUloyTTNLUDZUQk4iXQ",
+ "nonce": "n\rx",
+ "message": "[\"equipo.person.device.v1\",\"a\\bb\\fc\\u0001d\\te\\nf\",\"dev_\",\"WyJhXGJiXGZjXHUwMDAxZFx0ZVxuZiIsIlE0SjdYUloyTTNLUDZUQk4iXQ\",\"n\\rx\"]",
+ "signature": "Tlg1FnrZJEuXRcUpP0o6tc_iRLFEFzAHuW1gGPrYqPkLJvnf5EyjHk2m5cfFw_kSHm_4oQkdXRF0Y1MuKbZTAQ"
}
]
diff --git a/native/apple/Tests/EquipoKitTests/PairingTests.swift b/native/apple/Tests/EquipoKitTests/PairingTests.swift
index 48730027..779f17ab 100644
--- a/native/apple/Tests/EquipoKitTests/PairingTests.swift
+++ b/native/apple/Tests/EquipoKitTests/PairingTests.swift
@@ -55,6 +55,19 @@ final class Sleeps: @unchecked Sendable {
#expect(sleeps.waits.allSatisfy { $0 == .seconds(5) })
}
+ @Test func aCredentialIsKeptEvenIfTheFirstReadFails() async throws {
+ let t = ScriptedTransport()
+ t.on("POST /auth/devices", fixture: "device-challenge")
+ t.on("POST /auth/devices/exchange", fixture: "device-credential")
+ t.on("GET /me", .success(APIResponse(status: 500, data: Data(#"{"code":"internal","copy_key":"api.internal","request_id":"r"}"#.utf8))))
+ let store = MemorySecretStore()
+ let model = PairingModel(accounts: DeviceAccounts(store: store), makeTransport: { _ in t }, sleep: Sleeps().sleep)
+ await model.run(origin: t.origin, label: "Test")
+ let saved = try #require(DeviceAccounts(store: store).all().first, "the server holds a live device: so must we")
+ #expect(saved.credential?.token == "equipo.person.v1.TOKENFIXTURE")
+ guard case .approved = model.step else { Issue.record("paired, team name to follow: \(model.step)"); return }
+ }
+
@Test func expiredChallengeStops() async throws {
let t = ScriptedTransport()
t.on("POST /auth/devices", fixture: "device-challenge")
@@ -98,5 +111,8 @@ final class Sleeps: @unchecked Sendable {
#expect(PairingModel.origin(from: "http://localhost:8824/x")?.absoluteString == "http://localhost:8824")
#expect(PairingModel.origin(from: "http://127.0.0.1.example.test") == nil)
#expect(PairingModel.origin(from: "http://10.0.0.5:8824") == nil)
+ // The default port is the same place as no port.
+ #expect(PairingModel.origin(from: "team.example.test:443")?.absoluteString == "https://team.example.test")
+ #expect(PairingModel.origin(from: "https://team.example.test:8443")?.absoluteString == "https://team.example.test:8443")
}
}
diff --git a/native/apple/Tests/EquipoKitTests/SessionTests.swift b/native/apple/Tests/EquipoKitTests/SessionTests.swift
index bb645b9c..c6ae99cc 100644
--- a/native/apple/Tests/EquipoKitTests/SessionTests.swift
+++ b/native/apple/Tests/EquipoKitTests/SessionTests.swift
@@ -20,6 +20,16 @@ private func readable(_ t: ScriptedTransport) {
private let waiting = "tkqsrho7oq3n" // Ready to merge, needs you for the merge
private let merged = "tkyiki7muqby" // Done
+/// The thin tasks, with the finished one turned into a teammate's task that waits on them.
+private func teammateWaiting() throws -> Data {
+ var list = try JSONSerialization.jsonObject(with: Fixture.data("thin/tasks")) as! [String: Any]
+ var items = list["items"] as! [[String: Any]]
+ let i = items.firstIndex { $0["id"] as? String == merged }!
+ items[i]["needs_you"] = "merge"; items[i]["creator"] = "teammate@example.com"; items[i]["stage"] = "ready_to_merge"
+ list["items"] = items
+ return try JSONSerialization.data(withJSONObject: list)
+}
+
@MainActor @Suite struct SessionTests {
@Test func refreshFillsEverything() async throws {
let t = ScriptedTransport(); readable(t)
@@ -71,7 +81,7 @@ private let merged = "tkyiki7muqby" // Done
@Test func reportsUseTheWebsWords() throws {
let tasks: ThinList<ThinTask> = try Fixture.decode("thin/tasks")
- let ready = TaskReport(try #require(tasks.items?.first { $0.id == waiting }))
+ let ready = TaskReport(try #require(tasks.items?.first { $0.id == waiting }), needsYou: true)
#expect(ready.tone == .warning)
#expect(ready.eyebrow == "Ready to merge")
#expect(ready.track.map(\.state) == [.done, .done, .done, .current, .todo])
@@ -82,11 +92,11 @@ private let merged = "tkyiki7muqby" // Done
#expect(ready.facts[1].detail == "same family")
#expect(ready.facts[2].detail == "2222222")
var failed = ready.task; failed.checks = "failed"
- #expect(TaskReport(failed).tone == .negative)
+ #expect(TaskReport(failed, needsYou: true).tone == .negative)
var merging = ready.task; merging.stage = "merging"
- #expect(TaskReport(merging).track[3].state == .current)
+ #expect(TaskReport(merging, needsYou: true).track[3].state == .current)
var unknown = ready.task; unknown.checks = "something_new"; unknown.verdict = ""
- #expect(TaskReport(unknown).facts.map(\.label) == ["Branch"], "a value without words is left out, never invented")
+ #expect(TaskReport(unknown, needsYou: true).facts.map(\.label) == ["Branch"], "a value without words is left out, never invented")
#expect(Specialist.coordinator.name == "Coordinator")
}
@@ -101,6 +111,110 @@ private let merged = "tkyiki7muqby" // Done
#expect(TaskReport.known.allSatisfy { EquipoStrings.text(.init($0)) != $0 })
}
+ @Test func aTeammatesTaskDoesNotNeedYou() async throws {
+ let t = ScriptedTransport()
+ t.on("GET /snapshot", fixture: "thin/snapshot"); t.on("GET /needs-you", fixture: "thin/needs-you")
+ t.on("GET /tasks", .success(APIResponse(status: 200, data: try teammateWaiting())))
+ let s = try paired(t); await s.refresh()
+ let theirs = try #require(s.tasks.first { $0.id == merged })
+ #expect(!theirs.needsYou.isEmpty, "it waits on its creator")
+ #expect(!s.waitsOnYou(theirs), "but not on this person")
+ #expect(s.waitsOnYou(try #require(s.tasks.first { $0.id == waiting })))
+ for case .report(_, _, let report, _) in Feed.build(s) where report.task.id == merged {
+ #expect(!report.needsYou); #expect(report.tone == .positive)
+ }
+ }
+
+ @Test func projectReceiptsSayWhatHappened() throws {
+ let snapshot: Snapshot = try Fixture.decode("thin/snapshot")
+ var card = try #require(snapshot.cards?.first { $0.kind == "project" })
+ card.name = "sample"
+ card.state = "removed"; #expect(Feed.receiptLine(card) == "Removed sample")
+ card.state = "changed"; card.choice = "woodstar"; #expect(Feed.receiptLine(card) == "Moved to woodstar")
+ card.state = "working"; #expect(Feed.receiptLine(card) == "Working in sample")
+ }
+
+ @Test func streamedTextReadsNothingAndABurstReadsOnce() async throws {
+ let t = ScriptedTransport(); readable(t)
+ let s = try paired(t); await s.refresh()
+ let turn = try #require(s.liveTurn)
+ let reads = t.sent("GET /snapshot").count
+ for i in 0..<20 {
+ await s.handle(#"data: {"cursor":\#(100 + i),"type":"delta","resource":"turn","id":"\#(turn.id)","revision":0,"data":{"text":"word "}}"#)
+ }
+ await s.settle()
+ #expect(t.sent("GET /snapshot").count == reads, "reply text as it streams reads nothing")
+ for i in 0..<20 {
+ await s.handle(#"data: {"cursor":\#(200 + i),"type":"card","resource":"card","id":"c","revision":\#(i),"data":{}}"#)
+ }
+ await s.settle()
+ #expect(t.sent("GET /snapshot").count <= reads + 2, "a burst of changes is read once or twice, not twenty times")
+ #expect(t.sent("GET /snapshot").count > reads)
+ }
+
+ @Test func aWaitingMessageIsSentWhenTheTeamIsBack() async throws {
+ let t = ScriptedTransport(); readable(t)
+ t.on("POST /messages", .failure(.offline), .success(APIResponse(status: 200, data: Fixture.data("thin/sent"))))
+ let s = try paired(t)
+ await s.send("Thanks")
+ #expect(s.outgoing.first?.state == .waiting)
+ await s.refresh()
+ await s.settle()
+ #expect(s.outgoing.isEmpty, "sent once the team answered again")
+ let posts = t.sent("POST /messages")
+ #expect(posts.count == 2)
+ #expect(posts[0].idempotencyKey == posts[1].idempotencyKey)
+ }
+
+ @Test func aLostAnswerKeepsItsKeyAcrossTaps() async throws {
+ let t = ScriptedTransport(); readable(t)
+ let s = try paired(t); await s.refresh()
+ let card = try #require(s.cards.first { $0.kind == "merge" && $0.isOpen })
+ t.on("POST /cards/\(card.id)/answer", .failure(.offline), .failure(.offline), .failure(.offline),
+ .success(APIResponse(status: 200, data: Fixture.data("thin/answered"))))
+ #expect(await s.answer(card, choice: "wait_mac") == .offline)
+ #expect(await s.answer(card, choice: "wait_mac") == .answered)
+ let posts = t.sent("POST /cards/\(card.id)/answer")
+ #expect(posts.count == 4)
+ #expect(Set(posts.map(\.idempotencyKey)).count == 1, "the same answer, as itself")
+ }
+
+ @Test func aThreadReplyShowsHowItIsGoing() async throws {
+ let t = ScriptedTransport(); readable(t)
+ t.on("POST /tasks/\(waiting)/thread", .failure(.offline))
+ let s = try paired(t); await s.refresh()
+ await s.send("Does this cover the iPad too?", inThreadOf: waiting)
+ let turn = ThreadTurn(try #require(s.outgoing.first))
+ #expect(turn.own)
+ #expect(turn.delivery == .waiting, "not Sent")
+ }
+
+ @Test func aFailedStopSaysSo() async throws {
+ let t = ScriptedTransport(); readable(t)
+ let s = try paired(t); await s.refresh()
+ let turn = try #require(s.liveTurn)
+ t.on("POST /turns/\(turn.id)/cancel", .failure(.offline), .success(APIResponse(status: 200, data: Data("{}".utf8))))
+ #expect(await s.stop(turn) == false)
+ #expect(!s.stopping.contains(turn.id), "Stop is offered again")
+ #expect(await s.stop(turn) == true)
+ }
+
+ @Test func aFailedFirstReadIsShown() async throws {
+ let t = ScriptedTransport()
+ t.on("GET /tasks", fixture: "thin/tasks"); t.on("GET /needs-you", fixture: "thin/needs-you")
+ t.on("GET /snapshot", .success(APIResponse(status: 500, data: Data(#"{"code":"internal","copy_key":"api.internal","request_id":"r"}"#.utf8))))
+ let s = try paired(t); await s.refresh()
+ #expect(s.refreshFailed)
+ #expect(s.needsYou == nil, "still unknown, not zero")
+ }
+
+ @Test func aReadThisAppStoppedIsNotAFailure() async throws {
+ let t = ScriptedTransport(); readable(t)
+ t.cancel("GET /snapshot")
+ let s = try paired(t); await s.refresh()
+ #expect(!s.refreshFailed, "nothing failed: the app stopped asking")
+ }
+
@Test func coordinatorIsUnnamedOnScreen() {
let b = RosterByline(who: .coordinator, verb: "asks", project: "Woodstar", time: nil)
#expect(!b.showsName)
@@ -207,6 +321,7 @@ private let merged = "tkyiki7muqby" // Done
#expect(t.sent("GET /snapshot").count == reads, "activity, runners and pings read nothing")
#expect(s.cursor == 71)
await s.handle(#"data: {"cursor":72,"type":"card","resource":"card","id":"c","revision":3,"data":{}}"#)
+ await s.settle()
#expect(t.sent("GET /snapshot").count == reads + 1, "a card change reads the conversation again")
}
@@ -249,6 +364,6 @@ private let merged = "tkyiki7muqby" // Done
let snapshot: Snapshot = try Fixture.decode("thin/snapshot")
let card = try #require(snapshot.cards?.first { $0.kind == "merge" })
let url = Feed.webURL(for: card, origin: URL(string: "https://team.example.test")!)
- #expect(url.absoluteString == "https://team.example.test/conversation#card-\(card.id)")
+ #expect(url.absoluteString == "https://team.example.test/conversation?card=\(card.id)#card-\(card.id)")
}
}
diff --git a/native/apple/Tests/EquipoKitTests/Support.swift b/native/apple/Tests/EquipoKitTests/Support.swift
index 030df1cb..f0e3f15d 100644
--- a/native/apple/Tests/EquipoKitTests/Support.swift
+++ b/native/apple/Tests/EquipoKitTests/Support.swift
@@ -24,9 +24,13 @@ final class ScriptedTransport: EquipoTransport, @unchecked Sendable {
script[route] = queue
return next
}
+ if lock.withLock({ cancelled.contains(route) }) { throw CancellationError() }
guard let answer else { return APIResponse(status: 404, data: Data(#"{"code":"not_found","copy_key":"api.not_found","request_id":"r"}"#.utf8)) }
return try answer.get()
}
+ /// Routes whose requests this app stops asking for (URLError.cancelled).
+ private var cancelled: Set<String> = []
+ func cancel(_ route: String) { lock.withLock { _ = cancelled.insert(route) } }
func sent(_ route: String) -> [APIRequest] { lock.withLock { requests.filter { $0.method + " " + $0.path == route } } }
/// Event streams, one per call to `lines`; with none left the stream is refused as offline.
diff --git a/native/scripts/strings.json b/native/scripts/strings.json
index 874201d6..b5882da5 100644
--- a/native/scripts/strings.json
+++ b/native/scripts/strings.json
@@ -4,7 +4,7 @@
"account.device_name": "Name",
"account.sign_out": "Sign out",
"account.sign_out_confirm": "Sign out of this team on this device?",
- "account.sign_out_footer": "Signing out removes this device from the team. You can pair it again at any time.",
+ "account.sign_out_footer": "Signing out forgets this device here at once, and removes it from the team when the team can be reached. You can pair it again at any time.",
"account.signed_in_as": "Signed in as",
"account.team": "Team",
"account.team_name": "Name",
@@ -18,7 +18,7 @@
"byline.reports": "reports",
"card.changed": "This item has changed. Check it before trying again.",
"card.failed": "Couldn’t confirm that change. Try again.",
- "card.offline": "Couldn’t reach your team, so nothing was sent. Try again.",
+ "card.offline": "Couldn’t reach your team. Try again.",
"card.open_on_web": "Open in Equipo on the web",
"card.question": "Question",
"checks.cannot_run": "Can’t run here",
@@ -37,6 +37,7 @@
"conversation.placeholder": "Message",
"decision.on_web": "For now you make this decision on the web, where its full context is.",
"decision.untitled": "A decision",
+ "device.mac": "Mac",
"fact.branch": "Branch",
"fact.checks": "Checks",
"fact.review": "Review",
@@ -69,17 +70,22 @@
"pairing.team_label": "Team address",
"pairing.team_placeholder": "team.equipo.oficina.works",
"pairing.title": "Pair with your team",
- "pairing.waiting": "Waiting for you to approve. The code lasts 10 minutes.",
+ "pairing.waiting": "Waiting for you to approve.",
"pairing.welcome_lede": "Talk to your coordinator, answer questions and follow your team’s work from this device.",
"pairing.welcome_title": "Equipo",
"pairing.your_code": "Your code",
"project.spoken %@": "Project %@",
"question.answered %@": "You answered: %@",
"question.closed": "This question is no longer open.",
+ "read.failed": "Your team answered, but not with what this screen needs. Try again in a moment.",
+ "read.failed_title": "Couldn’t load this",
+ "read.retry": "Try again",
"receipt.added %@": "Added %@",
+ "receipt.changed %@": "Moved to %@",
"receipt.created %@": "Created %@",
"receipt.home %@": "New projects go to %@",
"receipt.home_cleared": "New projects go to the best-fitting existing repository",
+ "receipt.removed %@": "Removed %@",
"receipt.working %@": "Working in %@",
"review.approve": "Approved",
"review.changes_requested": "Changes requested",
@@ -129,6 +135,7 @@
"tasks.needs_you": "Needs you",
"thinking.stop": "Stop",
"thinking.stopping": "Stopping…",
+ "thinking.waiting": "Waiting for a connection",
"thinking.working": "Working…",
"thread.own_spoken %@": "You said: %@. Sent",
"thread.reading %@": "%@ is reading",