oficina / equipo Public

Ask for the Claude account email in the sign-in step

Paul's ruling (2026-11-23): a sign-in by a link runs the unmodified
claude setup-token, whose token cannot read the profile, so the code's
step now asks for the account email once, optionally, with existing
accepted strings. Typed there, it is posted on its own (the code field
stays unnamed) to the existing email route, kept on the attempt and is
the stated email once the connection is made; left empty, the row asks
as before. Same shape check, cap, CSRF and ownership; a token paste
still connecting takes none. Scriptless, the form posts the email back
to the Add page.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev 05592f30a4f6e9621409e128cab7520032584173 parent eff421c
8 files changed, +311 −11
  • .rastrillo/budgets.txt +4 −4
  • internal/equipo/chat/connections.go +9 −1
  • internal/equipo/chat_connections.go +7 −2
  • internal/equipo/static/connections.js +32 −3
  • internal/equipo/static/equipo.css +5 −0
  • internal/equipo/templates/models.html +1 −1
  • internal/headless/browser_signin_email_test.go +68 −0
  • internal/thintest/signin_email_pages_test.go +185 −0

CI failed — run details

CI log
=== prepare ===
ci-box: machine: aarch64, 32 CPUs, 62 GiB memory, kernel 7.0.0-1017-aws
ci-box: python 3.12.3; Docker version 29.1.3, build 29.1.3-0ubuntu3~24.04.2
ci-box: user namespaces allowed: 233151
ci-box: cgroup: cgroup2fs
ci-box: disk /home/ci/work/repos/oficina__equipo/wt/signin-email-field: 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.1s
ci-box: codex: fetched and verified in 3.4s
ci-box: codex-code-mode-host: fetched and verified in 1.3s
ci-box: libwrap: fetched and verified in 0.3s
ci-box: socat: fetched and verified in 0.5s
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
ci-box: image pulled in 9.9s
ci-box: pi: installed and verified in 7.5s
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 3.3s
ci-box: file times set from content: 2959 files, 192 directories
ci-box: ready in 16.7s
=== 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.144s
=== compile ===
go build ./...
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py compile
+ go build -tags testbuild ./...
  3.9s
+ go list -export -test -tags testbuild -f  ./...
  3.8s
+ go list -export -test -tags browser,testbuild -f  ./internal/equipo ./internal/headless ./internal/idtest ./internal/plan3test ./internal/thintest
  3.2s
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-23 20:05:14 +0000 UTC

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

receipt: test step 1m12.755s 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 1m10.922s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m10.92s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 53.56, cpu waiting 33.02%, memory waiting 0.00%, io waiting 0.54%
--- shard 1 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-review: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadless$/^4_review$|^TestHeadless$/^2b_access$|^TestHeadless$/^runner_crash$|^TestHeadless$/^2b_first_message$|^TestHeadless$/^4_checks_honest$|^TestHeadless$/^7_stream_resume$|^TestHeadless$/^2b_notebook$|^TestHeadless$/^2b_move_in$|^TestHeadless$/^2b_desk_failure$|^TestHeadless$/^cancel$' ./internal/headless

receipt: test step 1m13.106s 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 1m11.251s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m11.25s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 54.72, cpu waiting 33.02%, memory waiting 0.00%, io waiting 0.54%
--- shard 2 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-connections: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadlessConnections$|^TestHeadlessTokenPasteEndToEnd$|^TestHeadlessTokenConnection$' ./internal/headless

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

receipt: test step 1m27.027s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m25.154s amadan.net/oficina/equipo/internal/headless
receipt: slow test 34.07s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 33.46s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 8.92s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
receipt: slow test 8.7s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
machine: 32 CPUs, load 55.04, cpu waiting 33.55%, memory waiting 0.00%, io waiting 0.42%
--- 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_step_refused$|^TestHeadless$/^3_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless

receipt: test step 1m28.728s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m26.736s amadan.net/oficina/equipo/internal/headless
receipt: slow test 58.21s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.2s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 7.95s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 6.9s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 4.46s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
machine: 32 CPUs, load 53.92, cpu waiting 33.40%, memory waiting 0.00%, io waiting 0.41%
--- 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_step_refused$|^TestHeadless$/^3_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless

receipt: test step 2m49.67s 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 2m47.669s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m33.62s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistant
receipt: slow test 18.26s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 17.68s amadan.net/oficina/equipo/internal/headless TestHeadlessResearchHandoff
receipt: slow test 6.59s amadan.net/oficina/equipo/internal/headless TestHeadlessTurnBatching
receipt: slow test 6.39s amadan.net/oficina/equipo/internal/headless TestHeadlessBatchAfterRefusedReply
machine: 32 CPUs, load 18.35, cpu waiting 9.90%, memory waiting 0.00%, io waiting 0.10%
--- 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 2m6.037s 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 2m4.27s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 8.06s amadan.net/oficina/equipo/internal/thintest TestContractTeamJobSettledStates
receipt: slow test 6.72s amadan.net/oficina/equipo/internal/thintest TestExplorePreviewsOff
receipt: slow test 3.73s amadan.net/oficina/equipo/internal/thintest TestContractPreviewHeldUntilPublishAnswer
receipt: slow test 3.54s amadan.net/oficina/equipo/internal/thintest TestContractTeamNudgePersonNeeds
receipt: slow test 2.49s amadan.net/oficina/equipo/internal/thintest TestResearchDoneFallsBack
machine: 32 CPUs, load 35.46, cpu waiting 19.78%, memory waiting 0.00%, io waiting 0.21%
--- 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 1m28.133s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m26.657s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 9.13s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 4.95s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotOffered
receipt: slow test 4.51s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
receipt: slow test 2.39s amadan.net/oficina/equipo/internal/thintest TestContractPreview
receipt: slow test 2.36s amadan.net/oficina/equipo/internal/thintest TestContractPublishNameTaken
machine: 32 CPUs, load 53.92, cpu waiting 33.40%, memory waiting 0.00%, io waiting 0.41%
--- 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 4m41.561s, over the 45s its record on line 44 allows; reported only, timing fails on CI

receipt: test step 4m55.753s 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 4m41.561s amadan.net/oficina/equipo/internal/runner/thin
receipt: slow test 37.01s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeAnsweredByAnotherModel
receipt: slow test 36.9s amadan.net/oficina/equipo/internal/runner/thin TestModelsEngineeringProbesThenRunsTheStrongest
receipt: slow test 36.82s amadan.net/oficina/equipo/internal/runner/thin TestModelsUnhealthyRetriedOnDemand
receipt: slow test 18.48s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeRunsInsideTheAdmission
receipt: slow test 7.03s amadan.net/oficina/equipo/internal/runner/thin TestOpenCodeStepsRealOpenCode
machine: 32 CPUs, load 3.12, cpu waiting 1.17%, memory waiting 0.00%, io waiting 0.00%
--- 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 50.853s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 49.559s amadan.net/oficina/equipo/internal/runner
receipt: slow test 29.52s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.03s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 46.11, cpu waiting 30.68%, memory waiting 0.00%, io waiting 0.78%
--- shard 10 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-plans: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestPlanWorkflowCandidateOrder$|^TestPlanWorkflowFeature$|^TestCoordinatorRecoveryCallRefusalKeepsServing$|^TestCoordinatorRefusalMatrix$' ./internal/runner
cache miss: amadan.net/oficina/equipo/internal/runner: its inputs changed

receipt: test step 57.159s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 55.255s amadan.net/oficina/equipo/internal/runner
receipt: slow test 45.19s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 41.77s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.41s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.64s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 50.91, cpu waiting 32.66%, memory waiting 0.00%, io waiting 0.70%
--- shard 11 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-rest: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^TestDirectBugWorkflow$|^TestEnrolKeepsTheRole$|^TestPlanWorkflowCandidateOrder$|^TestPlanWorkflowFeature$|^TestCoordinatorRecoveryCallRefusalKeepsServing$|^TestCoordinatorRefusalMatrix$' ./internal/runner
cache miss: amadan.net/oficina/equipo/internal/runner: its inputs changed

receipt: test step 35.734s 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.757s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.17s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.32s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.12s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 2.51s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 1.62s amadan.net/oficina/equipo/internal/runner TestCoordinatorTransientRefusalKeepsServing
machine: 32 CPUs, load 33.90, cpu waiting 21.51%, memory waiting 0.00%, io waiting 0.99%
--- 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 39.7%, load 23.89
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
--- FAIL amadan.net/oficina/equipo/internal/equipotest TestDirectDeadReferencesRepository
=== RUN   TestDirectDeadReferencesRepository
    direct_cutover_test.go:221: repository reference inventory: exit status 1
        internal/headless/browser_signin_email_test.go:41:374: unclassified Node
        reference scan: 2672 text files, 3211 matches, 1 failures
--- FAIL: TestDirectDeadReferencesRepository (2.05s)

--- FAIL amadan.net/oficina/equipo/internal/equipotest (package output)
FAIL
rastrillo-budget/v1 ran 1m5.196s
FAIL	amadan.net/oficina/equipo/internal/equipotest	65.636s


receipt: test step 1m7.258s 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 1m5.196s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 27.63s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 27.52s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 25.48s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 22.72s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
receipt: slow test 22.66s amadan.net/oficina/equipo/internal/equipotest TestAuthProductionConfig
rastrillo: budget test: go test failed
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
        internal/headless/browser_signin_email_test.go:41:374: unclassified Node
        reference scan: 2672 text files, 3211 matches, 1 failures
--- FAIL: TestDirectDeadReferencesRepository (2.00s)
FAIL
rastrillo-budget/v1 ran 2.005s
FAIL	amadan.net/oficina/equipo/internal/equipotest	2.162s
FAIL
machine: 32 CPUs, load 48.36, cpu waiting 29.91%, memory waiting 0.00%, io waiting 0.33%
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 38.8%, load 23.89
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 1m17.343s 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 1m15.427s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 20.73s amadan.net/oficina/equipo/internal/equipotest TestProjectWritesRequireCurrentOwner
receipt: slow test 20.72s amadan.net/oficina/equipo/internal/equipotest TestProjectConcurrentRetry
receipt: slow test 20.72s amadan.net/oficina/equipo/internal/equipotest TestProjectRequestActorAndUpdate
receipt: slow test 20.66s amadan.net/oficina/equipo/internal/equipotest TestProjectRejectsUnsafeBinding
receipt: slow test 20.63s amadan.net/oficina/equipo/internal/equipotest TestProjectsFailuresRollBack
machine: 32 CPUs, load 45.85, cpu waiting 27.23%, memory waiting 0.00%, io waiting 0.30%
--- 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 39.7%, load 23.89
test lane equipotest-r: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestR' ./internal/equipotest

receipt: test step 1m12.953s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m7.637s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 14.59s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 13.29s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 10.43s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 10.35s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 7.32s amadan.net/oficina/equipo/internal/equipotest TestRosterAuditFailureRollsBack
machine: 32 CPUs, load 45.85, cpu waiting 29.03%, memory waiting 0.00%, io waiting 0.32%
--- 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 38.8%, load 23.89
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 1m8.381s 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.425s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 25.93s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 24.84s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 24.75s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 22.95s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsCurrentOwner
receipt: slow test 22.92s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsRollbackAndUnavailable
machine: 32 CPUs, load 48.36, cpu waiting 30.75%, memory waiting 0.00%, io waiting 0.34%
--- 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 38.8%, load 23.89
test lane plan3test: ./internal/plan3test
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./internal/plan3test

receipt: test step 52.952s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 50.85s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 3.68s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 3.47s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 1.66s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.43s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3A
receipt: slow test 1.25s amadan.net/oficina/equipo/internal/plan3test TestPlanMigrationUpgrade
machine: 32 CPUs, load 56.26, cpu waiting 33.83%, memory waiting 0.00%, io waiting 0.45%
--- 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 38.8%, load 23.89
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/door ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/push ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/idtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/claude/realcli ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/forgekey ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/door ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/push ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/idtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/claude/realcli ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/forgekey ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
cache miss: amadan.net/oficina/equipo/internal/copydesk: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/claude/realcli: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/forge: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/equipo/team: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/opencode: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/webread: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runnerproto: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/testci: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/wire/wireschema: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/workspace: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/checks: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/containment: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/pi: its inputs changed
--- FAIL amadan.net/oficina/equipo/internal/runner/checks TestDependencyStage
=== RUN   TestDependencyStage
    testing.go:1464: TempDir RemoveAll cleanup: unlinkat /tmp/TestDependencyStage3055524886: directory not empty
--- FAIL: TestDependencyStage (0.05s)

--- FAIL amadan.net/oficina/equipo/internal/runner/checks (package output)
FAIL
rastrillo-budget/v1 ran 47.95s
FAIL	amadan.net/oficina/equipo/internal/runner/checks	48.041s

budget note: internal/equipo took 46.714s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/equipo/chat took 18.565s, 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 1m53.534s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/release took 36.558s, 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 46.695s, over the 15s its record on line 40 allows; reported only, timing fails on CI

receipt: test step 2m26.813s against a 60s target (the gate's other steps are not in this figure)
receipt: 21 packages ran, 43 cached, 17 without tests, 1 failed
receipt: slow package 1m53.534s amadan.net/oficina/equipo/internal/idtest
receipt: slow package 1m2.698s amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow package 53.348s amadan.net/oficina/equipo/internal/runner/provider/pi
receipt: slow package 47.95s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 46.714s amadan.net/oficina/equipo/internal/equipo
receipt: slow test 53.68s amadan.net/oficina/equipo/internal/idtest TestDoorRemembersOficinaID
receipt: slow test 46.9s amadan.net/oficina/equipo/internal/idtest TestDoorOficinaSettingsUnreadableIsNoLoop
receipt: slow test 46.78s amadan.net/oficina/equipo/internal/idtest TestDoorForgetsOficinaIDForARefusedSession
receipt: slow test 45.94s amadan.net/oficina/equipo/internal/idtest TestDoorStepUpIsLocal
receipt: slow test 45.62s amadan.net/oficina/equipo/internal/idtest TestDoorNeverJudgesANativeSession
rastrillo: budget test: go test failed
exit status 1
+ go test -tags testbuild -timeout 15m -v -run '^TestDependencyStage$' -count=1 ./internal/runner/checks   (retry, once)
FAILED TWICE ./internal/runner/checks:TestDependencyStage rest
=== RUN   TestDependencyStage
    testing.go:1464: TempDir RemoveAll cleanup: unlinkat /tmp/TestDependencyStage1840231879: directory not empty
--- FAIL: TestDependencyStage (0.04s)
FAIL
rastrillo-budget/v1 ran 36ms
FAIL	amadan.net/oficina/equipo/internal/runner/checks	0.041s
FAIL
machine: 32 CPUs, load 16.96, cpu waiting 8.66%, memory waiting 0.00%, io waiting 0.08%
make: *** [Makefile:113: ci-shard] Error 1

amadan: step check shard 17 of 29 failed: exit status 2
--- shard 18 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-chat: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$' ./internal/headless

receipt: test step 1m22.44s 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.932s amadan.net/oficina/equipo/internal/headless
receipt: slow test 38.14s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 14.64s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 9.98s amadan.net/oficina/equipo/internal/headless TestBrowserChat
receipt: slow test 7.22s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 5.87s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
machine: 32 CPUs, load 55.04, cpu waiting 33.83%, memory waiting 0.00%, io waiting 0.45%
--- 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

receipt: test step 1m25.611s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m23.937s amadan.net/oficina/equipo/internal/headless
receipt: slow test 26.07s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 19.62s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 12.56s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 9.22s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
receipt: slow test 7.96s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
machine: 32 CPUs, load 55.04, cpu waiting 33.55%, memory waiting 0.00%, io waiting 0.42%
--- shard 20 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-connections: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' ./internal/headless

receipt: test step 1m49.74s 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 1m48.155s amadan.net/oficina/equipo/internal/headless
receipt: slow test 13.4s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 12.76s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 12.03s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 11.3s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsSignInEmail
receipt: slow test 10.85s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
machine: 32 CPUs, load 43.14, cpu waiting 25.60%, memory waiting 0.00%, io waiting 0.28%
--- 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|TestBrowserConnectionsSignInEmail|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 TestBrowserCopyContinue
rastrillo: budget test: go test failed
=== RUN   TestBrowserCopyContinue
time=2026-11-24T09:41:09.649Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-24T09:41:09.649Z level=INFO msg="startup phase done" phase=state_lock took=263µs
time=2026-11-24T09:41:09.650Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-24T09:41:09.650Z level=INFO msg="startup phase done" phase=claim_roots took=175µs
time=2026-11-24T09:41:09.650Z level=INFO msg="startup phase" phase=sweep
time=2026-11-24T09:41:09.693Z level=INFO msg="startup phase done" phase=sweep took=43.093ms
time=2026-11-24T09:41:09.693Z level=INFO msg="startup phase" phase=credentials
time=2026-11-24T09:41:09.693Z level=INFO msg="startup phase done" phase=credentials took=194µs
time=2026-11-24T09:41:09.693Z level=INFO msg="startup phase" phase=open_state
time=2026-11-24T09:41:09.737Z level=INFO msg="startup phase done" phase=open_state took=43.974ms
time=2026-11-24T09:41:09.738Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-24T09:41:09.739Z level=INFO msg=connecting host=127.0.0.1:45603 protocol=28
time=2026-11-24T09:41:09.741Z level=INFO msg=connected host=127.0.0.1:45603 took=2.218ms
time=2026-11-24T09:41:09.741Z level=INFO msg="capabilities gathering"
time=2026-11-24T09:41:09.742Z level=INFO msg="capabilities gathered" took=896µs tags=linux,claude,go
time=2026-11-24T09:41:09.745Z level=INFO msg="hello sent" protocol=28
time=2026-11-24T09:41:09.747Z level=INFO msg=welcome protocol=28 role=primary generation=1
    browser_copy_test.go:90: waiting for !document.querySelector('[data-copy-continue]'): context deadline exceeded (last evaluation: context deadline exceeded)
--- FAIL: TestBrowserCopyContinue (6.28s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m29.557s
FAIL	amadan.net/oficina/equipo/internal/headless	89.752s


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

receipt: test step 2.277s 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 675ms amadan.net/oficina/equipo/internal/equipo
receipt: slow test 680ms amadan.net/oficina/equipo/internal/equipo TestBrowserPreviewBlocksNavigation
browser lane browser-rest: ./internal/idtest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserOficinaIDDoor|TestBrowserSmartDoor)$' ./internal/idtest
budget note: internal/idtest took 10.625s, over the 10s the default allows; reported only, timing fails on CI

receipt: test step 11.845s 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 10.625s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 8.48s amadan.net/oficina/equipo/internal/idtest TestBrowserSmartDoor
receipt: slow test 2.14s amadan.net/oficina/equipo/internal/idtest TestBrowserOficinaIDDoor
browser lane browser-rest: ./internal/plan3test
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestTeamsHierarchyBrowser)$' ./internal/plan3test

receipt: test step 3.589s 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.037s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 2.04s amadan.net/oficina/equipo/internal/plan3test TestTeamsHierarchyBrowser
browser lane browser-rest: ./internal/thintest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAccessEmojiByline|TestBrowserAccessFinalOutcomes|TestBrowserAccessRequest|TestBrowserAccessReview|TestBrowserActivitySubjects|TestBrowserAutonomySettings|TestBrowserCoordinatorQueue|TestBrowserEmptyConversation|TestBrowserEndedNoteStaysGone|TestBrowserHousekeeping|TestBrowserInnerGallery|TestBrowserInnerScreens|TestBrowserInstantThinking|TestBrowserInstantThinkingQueued|TestBrowserMachines|TestBrowserPhoneIndex|TestBrowserPlacementQuestionAndPending|TestBrowserProjectPlacement|TestBrowserProjectsList|TestBrowserReportActionFeedback|TestBrowserReportNextSteps|TestBrowserReportThread|TestBrowserRhythm|TestBrowserRollup|TestBrowserRosterAlignment|TestBrowserRosterDecisionStates|TestBrowserRosterQuietDay|TestBrowserRosterReports|TestBrowserRosterSetAside|TestBrowserRosterSubchat|TestBrowserRosterThinking|TestBrowserRosterVisual|TestBrowserSettingsHousekeepingGroups|TestBrowserSettingsMenu|TestBrowserSettingsRail|TestBrowserSettingsSaveBar|TestBrowserSettingsShots|TestBrowserSettingsStayOnPage|TestBrowserSettingsTeams|TestBrowserShipsButtons|TestBrowserSpecialistRows|TestBrowserSpendFollowsAnswers|TestBrowserTaskRows|TestBrowserTeamPanel|TestBrowserThinkingCycles|TestBrowserThinkingLinesClear|TestBrowserThinkingSteady|TestBrowserThinkingWords|TestBrowserTokenRowEmail|TestBrowserTrackPulse|TestBrowserTrackStarCentre|TestBrowserTryAgain)$' ./internal/thintest

receipt: test step 3m29.533s 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 3m28.058s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 21.52s amadan.net/oficina/equipo/internal/thintest TestBrowserAccessRequest
receipt: slow test 14.41s amadan.net/oficina/equipo/internal/thintest TestBrowserSettingsTeams
receipt: slow test 12.04s amadan.net/oficina/equipo/internal/thintest TestBrowserThinkingCycles
receipt: slow test 10.54s amadan.net/oficina/equipo/internal/thintest TestBrowserPlacementQuestionAndPending
receipt: slow test 9.01s amadan.net/oficina/equipo/internal/thintest TestBrowserRhythm
machine: 32 CPUs, load 7.29, cpu waiting 3.64%, memory waiting 0.00%, io waiting 0.03%
--- 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   (51s)
ok ./internal/headless TestHeadlessConnections/A5_cancel_and_sign_out 4.63s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.29s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 8.71s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 8.34s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 26.09s
+ 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   (52s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 11.84s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 10.99s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 10.14s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 16.67s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless   (20s)
ok ./internal/headless TestMixedVersions 18.28s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks   (1s)
ok ./internal/runner/checks TestCheckSandboxDeniedPathsTampering 0.76s
+ go test -tags testbuild -timeout 15m -v -run '^TestRunnerCancelAndSupersede$' ./internal/runner/thin   (1s)
ok ./internal/runner/thin TestRunnerCancelAndSupersede 0.05s
quarantine: 0 flaked (passed on the retry), 0 failed
machine: 32 CPUs, load 50.91, cpu waiting 31.67%, memory waiting 0.00%, io waiting 0.75%
--- shard 24 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
shard 24: make runner-host
python3 scripts/runner-prerequisites.py
CGO_ENABLED=0 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks

receipt: test step 11.906s against a 60s target (the gate's other steps are not in this figure)
receipt: 4 packages ran, 0 cached, 4 without tests, 0 failed
receipt: slow package 8.072s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 187ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 61ms amadan.net/oficina/equipo/internal/runner/provider/codex
receipt: slow package 4ms amadan.net/oficina/equipo/internal/runner/provider
receipt: slow package 1ms amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow test 5.77s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.74s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 440ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 190ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 100ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxToolchain
CGO_ENABLED=0 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run '^TestNamespace' -count=1 ./internal/runner/containment
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run '^TestNamespace' -count=1 ./internal/runner/containment

receipt: test step 3.361s 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.99s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 300ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 190ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof
receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReapsOrphans
receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryCleansScratch
machine: 32 CPUs, load 12.94, cpu waiting 9.49%, memory waiting 0.00%, io waiting 1.38%
--- 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 39.7%, load 23.89
shard 25: make runner-dead-references lanes-check build vet fmt-check spacing budget migration-check
python3 scripts/runner-dead-references.py
internal/headless/browser_signin_email_test.go:41:374: unclassified Node
reference scan: 2672 text files, 3211 matches, 1 failures
make[1]: *** [Makefile:238: runner-dead-references] Error 1
machine: 32 CPUs, load 23.89, cpu waiting 18.04%, memory waiting 0.00%, io waiting 1.05%
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 38.8%, load 23.89
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 40.81, cpu waiting 25.71%, memory waiting 0.00%, io waiting 0.89%
--- 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 39.7%, load 23.89
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 3
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 37.84, cpu waiting 23.00%, memory waiting 0.00%, io waiting 0.95%
--- 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 39.7%, load 23.89
shard 28: make gitleaks
9:41AM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
9:41AM INF 1127 commits scanned.
9:41AM INF scanned ~65040044 bytes (65.04 MB) in 20.5s
9:41AM INF no leaks found
machine: 32 CPUs, load 46.11, cpu waiting 30.68%, memory waiting 0.00%, io waiting 0.78%

amadan: job failed at step check shards 12, 17, 25 of 29 — its output is above, not at the tail of this log
diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt
index 41646f4b..acf12663 100644
--- a/.rastrillo/budgets.txt
+++ b/.rastrillo/budgets.txt
@@ -14,7 +14,7 @@ perf GET /* skip Unknown private paths render 404; this fallback contains no scr
time internal/equipo/team 60s Plan 3 loaded CI measured 45.985s; niced serial reruns measured 18.079s and 22.031s. Keep migration, recovery, accounting and concurrency assertions; 60s leaves 30 percent headroom above loaded CI.
time internal/equipotest 300s Final fix package rerun measured 187.035s (review 172.4s); 300s gives 60 percent headroom for HTTP, sandbox, authority and final regression coverage.
-size internal/equipo 22112 - One Luna-reviewed output format for the GitHub egress diagnostic; measured 22112 source lines.
+size internal/equipo 22117 - The sign-in's account email returns to the Add page (Paul, 2026-11-23); measured 22117 source lines.
size internal/wire 6830 - Successful-push proposal diagnostic in existing Reason fields; measured 6830 source lines.
size internal/equipotest - 12017 Task 21 repairs historical migration and conversation fixtures after Plan 3, and the Rastrillo upgrade contract comparing served assets with what Assets serves; measured 0/12017 source/test lines.
time internal/runner/checks 90s CI worker measured 44.553s (44.6s rounded);
@@ -56,7 +56,7 @@ perf GET /api/v1/tasks/{id} skip Thin v1 person API: bearer-only JSON for device
perf GET /api/v1/assistant/snapshot skip Assistant person API: bearer-only JSON for Base's chat, not a browser screen.
perf GET /api/v1/assistant/messages skip Assistant person API: bearer-only JSON for Base's chat, not a browser screen.
perf GET /api/v1/assistant/events skip Assistant event stream (Server-Sent Events), bearer-only and long-lived; not a screen.
-size internal/equipo/chat 33348 8399 Preserve proposal diagnostics on successful Engineering, Copy and worker publication; measured 33348 source and 8399 test lines.
+size internal/equipo/chat 33356 8399 The sign-in by a link keeps the account email typed with its code (Paul, 2026-11-23); measured 33356 source and 8399 test lines.
perf GET /api/v1/questions/{id} skip Thin v1 person API: bearer-only JSON for devices; the browser reads questions on /tasks/{id}.
perf GET /api/v1/steps/{id}/log skip Thin v1 person API: bearer-only JSON for devices; the browser shows the log tail on /tasks/{id}.
perf GET /api/v1/connections/preference skip Connections slice 1 person API: bearer-only JSON for devices; the browser shows the preference on /conversation/connections.
@@ -70,8 +70,8 @@ perf GET /api/v1/tasks/{id}/files/{file} skip Research kept images: bearer-only
perf GET /tasks/{id}/files/{file} skip Research kept images: the bytes of one image, shown on the task page; a file, not a screen.
perf GET /api/v1/runners skip Mac runners person API: bearer-only JSON for devices; the browser shows runners in the Team section.
time cmd/equipo-runner 60s TestReleaseRunnerHasNoFakeWorker builds the release runner and the thin package under testbuild (about 12s locally).
-size internal/headless - 11349 Forge Host/Propose fixtures for the explicit-use interface; measured 11349 test lines, existing assertions unchanged.
-size internal/thintest - 34019 Device project cards, exact negation and old-runner pass-through regressions, and tools_refused delivery; measured 34019 test lines.
+size internal/headless - 11417 The sign-in's account email in the browser at 1280 and 390; measured 11417 test lines, existing assertions unchanged.
+size internal/thintest - 34204 The sign-in's account email: field, refusals, ownership and the row once connected; measured 34204 test lines.
perf GET /api/v1/projects/{id}/merge-policy skip Merge authority person API: bearer-only JSON for devices; the browser reads the policy on /projects/{id}.
perf GET /api/v1/usage skip Thin v1 person API: bearer-only JSON for devices; the browser reads usage through /usage.
diff --git a/internal/equipo/chat/connections.go b/internal/equipo/chat/connections.go
index f15ef652..0168240e 100644
--- a/internal/equipo/chat/connections.go
+++ b/internal/equipo/chat/connections.go
@@ -1236,7 +1236,11 @@ func (s *Store) SetStatedEmail(ctx context.Context, person, id, email string) er
} else if err != nil {
return err
}
- if r.Kind != wire.KindToken || r.LocalID == "" || r.State == wire.ConnSignedOut || r.State == wire.ConnConnecting {
+ // Claude's sign-in by a link asks for it with the code (Paul,
+ // 2026-11-23): kept on the attempt, it is the token connection's
+ // once the runner makes it.
+ asked := r.State == wire.ConnConnecting && signingIn(r)
+ if !asked && (r.Kind != wire.KindToken || r.LocalID == "" || r.State == wire.ConnSignedOut || r.State == wire.ConnConnecting) {
return ErrConflict
}
if r.StatedEmail == email {
@@ -1245,6 +1249,10 @@ func (s *Store) SetStatedEmail(ctx context.Context, person, id, email string) er
if err := t.db.Model(&connectionRecord{}).Where("id = ?", r.ID).Update("stated_email", email).Error; err != nil {
return err
}
+ if asked {
+ // Nothing on the card shows it: no event until the row.
+ return nil
+ }
r.StatedEmail = email
// The row's event, so the person's other pages read it again.
return t.saveConnection(&r, false)
diff --git a/internal/equipo/chat_connections.go b/internal/equipo/chat_connections.go
index 59b90fae..43aed600 100644
--- a/internal/equipo/chat_connections.go
+++ b/internal/equipo/chat_connections.go
@@ -343,9 +343,14 @@ func (a *application) connectionsPrefer(w http.ResponseWriter, r *http.Request)
}
// connectionsEmail keeps the account email the person typed for one of
-// their own token connections, or clears it (display only).
+// their own token connections, or clears it (display only). The sign-in
+// card's code form posts it too, from the Add page, where it returns.
func (a *application) connectionsEmail(w http.ResponseWriter, r *http.Request) {
- a.chatActionTo(w, r, "/conversation/settings/connections", func(ctx context.Context, address string) error {
+ back := "/conversation/settings/connections"
+ if r.PostFormValue("from") == "add" {
+ back += "/add"
+ }
+ a.chatActionTo(w, r, back, func(ctx context.Context, address string) error {
return a.store.Chat().SetStatedEmail(ctx, address, chi.URLParam(r, "id"), r.PostFormValue("email"))
})
}
diff --git a/internal/equipo/static/connections.js b/internal/equipo/static/connections.js
index 4cb97591..9041fa5b 100644
--- a/internal/equipo/static/connections.js
+++ b/internal/equipo/static/connections.js
@@ -126,10 +126,11 @@
var card = form.closest("[data-connecting]");
var same = card && next.querySelector('[data-connecting][data-connection="' + CSS.escape(card.dataset.connection) + '"] :is([data-token-form], [data-code-form])');
var other = same && same.closest("[data-connecting]");
- if (same && other.dataset.attempt === card.dataset.attempt && !form.closest("[data-token-steps], [data-code-steps]").hidden && (field.value || document.activeElement === field)) {
+ var mail = form.querySelector("[data-email-field]");
+ if (same && other.dataset.attempt === card.dataset.attempt && !form.closest("[data-token-steps], [data-code-steps]").hidden && (field.value || mail && mail.value || form.contains(document.activeElement))) {
card.setAttribute("data-settled", "");
same.closest("[data-connecting]").replaceWith(card);
- if (document.activeElement === field) typing = field;
+ if (form.contains(document.activeElement)) typing = document.activeElement;
}
});
// An open account email field stays open as it is, with what is
@@ -254,7 +255,8 @@
// back on the page that says why.
if (form.matches("[data-metered-form]")) return;
event.preventDefault();
- if (form.matches("[data-token-form], [data-code-form], [data-key-form]")) { sealSecret(form); return; }
+ if (form.matches("[data-code-form]")) { signInEmail(form); return; }
+ if (form.matches("[data-token-form], [data-key-form]")) { sealSecret(form); return; }
if (form.matches("[data-email-form]")) { saveEmail(form); return; }
// An ended attempt's note goes once dismissed, or once a new
// attempt starts.
@@ -285,6 +287,33 @@
.catch(function () { form.submit(); });
});
+ // The account email typed with the sign-in's code (Paul, 2026-11-23),
+ // if any: posted first, on its own (the code has no name, so it never
+ // goes with it), to be the connection's once it is made. One the
+ // server refuses says so beside the field and the code waits in its
+ // field; otherwise the code is sealed and sent as ever, the email
+ // being optional.
+ function signInEmail(form) {
+ var mail = form.querySelector("[data-email-field]");
+ if (!mail || !mail.value.trim()) { sealSecret(form); return; }
+ if (form.hasAttribute("data-busy")) return;
+ var note = form.querySelector("[data-email-note]");
+ note.hidden = true;
+ form.setAttribute("data-busy", "");
+ fetch(form.action, { method: "POST", credentials: "same-origin", headers: { "Accept": "application/json" }, body: new URLSearchParams(new FormData(form)) })
+ .then(function (r) { return r.status; }, function () { return 0; })
+ .then(function (status) {
+ form.removeAttribute("data-busy");
+ if (status === 422) {
+ note.textContent = note.dataset.bad;
+ note.hidden = false;
+ mail.focus();
+ return;
+ }
+ sealSecret(form);
+ });
+ }
+
// The account email a person types for a token row: posted in the
// background; one the server refuses says so beside the field, and a
// saved one closes the field and the row reads again.
diff --git a/internal/equipo/static/equipo.css b/internal/equipo/static/equipo.css
index 13046a92..d7f4fa3f 100644
--- a/internal/equipo/static/equipo.css
+++ b/internal/equipo/static/equipo.css
@@ -1157,6 +1157,11 @@ a[equipo-source]:hover { color: var(--rst-text); text-decoration: underline; tex
[equipo-conn-token] [data-token-note], [equipo-conn-token] [data-token-trust] { margin: 0; }
[equipo-conn-token] [data-token-note][data-tone="bad"] { color: var(--rst-tone-negative-fg); }
[equipo-conn-token] [data-code-wrong] { margin: 0; color: var(--rst-tone-negative-fg); }
+/* The sign-in's account email (Paul, 2026-11-23): optional, asked once
+ with the code, quieter than it; Connect ends the form. */
+[equipo-conn-signin-email] { display: grid; gap: var(--rst-sp-1); margin-block-start: var(--rst-sp-2); font-size: var(--rst-fs-sm); }
+[equipo-conn-signin-email] [equipo-conn-small] { margin: 0; }
+[equipo-conn-signin-email] [data-email-note] { color: var(--rst-tone-negative-fg); }
[equipo-conn-expires] { font-size: var(--rst-fs-xs); color: var(--rst-text-muted); white-space: nowrap; }
[equipo-conn-renew] { font-size: var(--rst-fs-xs); color: var(--rst-tone-warning-fg); }
[equipo-conn-renew] [equipo-link] { font-size: inherit; }
diff --git a/internal/equipo/templates/models.html b/internal/equipo/templates/models.html
index 3bf9979c..1f8805da 100644
--- a/internal/equipo/templates/models.html
+++ b/internal/equipo/templates/models.html
@@ -14,7 +14,7 @@
<div equipo-conn-card-foot><span></span>{{template "conn-cancel" .ID}}</div>
{{else if .Prompt.URL}}<ol equipo-conn-steps data-code-steps>
<li><div equipo-conn-link-row><a rst-btn="primary" href="{{.Prompt.URL}}" rel="noopener" target="_blank" data-open-anthropic>{{icon "external-link"}}{{copy "chat.connections.open_anthropic"}}</a>{{template "conn-copy-link" .Prompt.URL}}</div></li>
-<li><div><form equipo-conn-token data-code-form autocomplete="off"><label for="code-{{.ID}}">{{copy "chat.connections.code_paste"}}</label>{{if .Prompt.WrongCode}}<span equipo-conn-small data-code-wrong data-tone="bad" role="status">{{copy "chat.connections.code_wrong"}}</span>{{end}}<span equipo-conn-token-row><input rst-input id="code-{{.ID}}" type="password" data-code-field autocomplete="off" autocapitalize="off" spellcheck="false" required><button rst-btn="primary" type="submit" data-code-connect>{{copy "chat.connections.token_connect"}}</button></span><span equipo-conn-small data-token-trust>{{copy "chat.connections.token_sealed"}}</span><span equipo-conn-small data-token-note role="status" hidden data-bad="{{copy "chat.connections.code_bad"}}" data-failed="{{copy "chat.connections.code_failed"}}" data-no-key="{{copy "chat.connections.code_no_key"}}"></span></form></div></li>
+<li><div><form method="post" action="/conversation/connections/{{.ID}}/email" equipo-conn-token data-code-form autocomplete="off"><input type="hidden" name="from" value="add"><label for="code-{{.ID}}">{{copy "chat.connections.code_paste"}}</label>{{if .Prompt.WrongCode}}<span equipo-conn-small data-code-wrong data-tone="bad" role="status">{{copy "chat.connections.code_wrong"}}</span>{{end}}<span equipo-conn-token-row><input rst-input id="code-{{.ID}}" type="password" data-code-field autocomplete="off" autocapitalize="off" spellcheck="false" required></span><span equipo-conn-small data-token-note role="status" hidden data-bad="{{copy "chat.connections.code_bad"}}" data-failed="{{copy "chat.connections.code_failed"}}" data-no-key="{{copy "chat.connections.code_no_key"}}"></span><span equipo-conn-small data-token-trust>{{copy "chat.connections.token_sealed"}}</span><span equipo-conn-signin-email><label for="signin-email-{{.ID}}">{{copy "chat.connections.email_ask"}}</label><input rst-input id="signin-email-{{.ID}}" type="email" name="email" maxlength="254" autocapitalize="off" spellcheck="false" data-email-field><span equipo-conn-small>{{copy "chat.connections.email_hint"}}</span><span equipo-conn-small data-email-note role="status" hidden data-bad="{{copy "chat.connections.email_bad"}}" data-tone="bad"></span></span><span><button rst-btn="primary" type="submit" data-code-connect>{{copy "chat.connections.token_connect"}}</button></span></form></div></li>
</ol>
<div data-token-waiting hidden>{{template "conn-waiting" (copy "chat.connections.waiting_code")}}</div>
<div equipo-conn-card-foot><span equipo-conn-small>{{template "conn-paste-instead"}}</span>{{template "conn-cancel" .ID}}</div>
diff --git a/internal/headless/browser_signin_email_test.go b/internal/headless/browser_signin_email_test.go
new file mode 100644
index 00000000..d4b69391
--- /dev/null
+++ b/internal/headless/browser_signin_email_test.go
@@ -0,0 +1,68 @@
+//go:build browser
+
+package headless
+
+import (
+ "strconv"
+ "testing"
+
+ "amadan.net/oficina/equipo/internal/browsertest"
+ "amadan.net/oficina/equipo/internal/thintest"
+ "amadan.net/oficina/equipo/internal/wire"
+ "github.com/chromedp/chromedp"
+)
+
+// signInEmailDay is where the sign-in email's screenshots go.
+const signInEmailDay = "2026-11-24"
+
+// Paul, 2026-11-23: a sign-in by a link makes a token connection whose
+// account Claude will not name, so the code's step asks for the account
+// email once, optionally: Claude account email under the code field,
+// empty, with its hint, and Connect after both. An email the server
+// refuses says so beside the field, the code waiting in its own; one it
+// takes is posted alone, before the sealed code, and is on the row as
+// the person's own once the connection is made.
+func TestBrowserConnectionsSignInEmail(t *testing.T) {
+ for _, width := range []int64{1280, 390} {
+ t.Run(strconv.FormatInt(width, 10), func(t *testing.T) {
+ inst := thintest.StartInstance(t)
+ runner := dialFake(t, inst)
+ c := inst.Cookie()
+ p := openPage(t, inst.URL, c.Name, c.Value, width, 900, width > 600)
+ t.Cleanup(p.stop)
+ shot := func(name string) { t.Helper(); connShotOn(t, p, signInEmailDay, name, width) }
+ p.run(chromedp.Navigate(inst.URL+"/conversation/settings/connections/add"), browsertest.Wait(`!!document.querySelector('[data-connections]') && !!window.EquipoSeal && !!window.nacl`))
+ p.check(`(()=>{window.__equipoStayed=true;return true})()`, "mark")
+ p.check(recordPosts, "record posts")
+ p.check(`(()=>{document.querySelector('[data-add="claude"]').click();return true})()`, "Claude")
+ cmd := runner.expect(t, wire.FrameConnect).(*wire.ConnectCommand)
+ runner.send(t, wire.FrameConnection, wire.ConnectionReport{Connection: cmd.Connection, Person: thintest.Owner, Provider: "claude", State: wire.ConnConnecting, Prompt: &wire.ConnectPrompt{Kind: wire.PromptAuthorize, URL: signInLinks[0], Attempt: 1}})
+ p.run(waitLong(`!!document.querySelector('[data-code-steps]')`))
+ p.check(`(()=>{const form=document.querySelector('[data-code-form]');const code=form.querySelector('[data-code-field]');const mail=form.querySelector('[data-email-field]');const label=form.querySelector('label[for="'+mail.id+'"]');const hint=mail.nextElementSibling;const go=form.querySelector('[data-code-connect]');const follows=(a,b)=>!!(a.compareDocumentPosition(b)&Node.DOCUMENT_POSITION_FOLLOWING);return !code.name && mail.type==='email' && mail.name==='email' && mail.value==='' && !mail.required && label.textContent==='Claude account email' && hint.textContent==='Optional. Shown wherever Equipo names this connection. Equipo does not verify it with Claude.' && mail.checkVisibility() && follows(code,mail) && follows(mail,go) && go.getBoundingClientRect().top>=mail.getBoundingClientRect().bottom && getComputedStyle(label).fontSize!==getComputedStyle(form.querySelector('label[for="'+code.id+'"]')).fontSize && document.documentElement.scrollWidth<=innerWidth+1})()`, "the sign-in step does not ask for the account email, empty and optional, before Connect")
+ p.run(waitLong(`document.getAnimations().every(a=>a.playState!=='running'||a.effect&&a.effect.getTiming().iterations===Infinity)`))
+ shot("signin-email")
+
+ // Refused by the server: said beside the field; the code waits.
+ p.check(`(()=>{window.__posts=[];const f=document.querySelector('[data-code-form]');f.querySelector('[data-code-field]').value=`+jsonString(canarySignInCode)+`;f.querySelector('[data-email-field]').value='me@example';f.requestSubmit();return true})()`, "a bad email")
+ p.run(waitLong(`(()=>{const n=document.querySelector('[data-code-form] [data-email-note]');return !n.hidden && n.textContent==='That does not look like an email address.' && n.checkVisibility()})()`))
+ p.check(`(()=>{const f=document.querySelector('[data-code-form]');return window.__posts.length===1 && window.__posts[0].url.endsWith('/email') && !window.__posts[0].body.includes('CANARY') && f.querySelector('[data-code-field]').value===`+jsonString(canarySignInCode)+` && document.activeElement===f.querySelector('[data-email-field]') && !f.closest('[data-code-steps]').hidden})()`, "a refused email sent the code, or lost it")
+ shot("signin-email-bad")
+
+ // Taken: the email alone, then the sealed code.
+ p.check(`(()=>{window.__posts=[];const f=document.querySelector('[data-code-form]');f.querySelector('[data-email-field]').value=' me@example.com ';f.requestSubmit();return true})()`, "a good email")
+ p.run(waitLong(`window.__posts.length===2`))
+ p.check(`(()=>{const [a,b]=window.__posts;return a.url.endsWith('/email') && a.body==='from=add&email=me%40example.com' && !a.body.includes('CANARY') && b.url.endsWith('/secret') && !b.body.includes('example.com') && !b.body.includes('CANARY')})()`, "the email and the code did not go apart, email first")
+ secret := runner.expect(t, wire.FrameSecret).(*wire.SecretCommand)
+ if opened := runner.open(t, secret.Sealed); opened.Secret != canarySignInCode {
+ t.Fatal("the code")
+ }
+
+ // Connected: the row has the email as the person's own.
+ runner.send(t, wire.FrameConnection, wire.ConnectionReport{Connection: cmd.Connection, Person: thintest.Owner, LocalID: "claude-1", Provider: "claude", State: wire.ConnHealthy})
+ runner.hello(t, wire.HeldConnection{LocalID: "claude-1", Person: thintest.Owner, Provider: "claude", Kind: wire.KindToken, State: wire.ConnHealthy})
+ p.run(waitLong(`location.pathname==='/conversation/settings/connections' && [...document.querySelectorAll('[equipo-conn-row][data-provider="claude"]')].some(e=>e.querySelector('[data-stated-email]')?.textContent==='me@example.com' && !e.querySelector('details[data-account-email]').open)`))
+ p.run(waitLong(`document.getAnimations().every(a=>a.playState!=='running'||a.effect&&a.effect.getTiming().iterations===Infinity)`))
+ shot("signin-email-row")
+ })
+ }
+}
diff --git a/internal/thintest/signin_email_pages_test.go b/internal/thintest/signin_email_pages_test.go
new file mode 100644
index 00000000..b3fe55e5
--- /dev/null
+++ b/internal/thintest/signin_email_pages_test.go
@@ -0,0 +1,185 @@
+package thintest
+
+import (
+ "net/http"
+ "net/url"
+ "strings"
+ "testing"
+
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// signInCardRig starts a Claude sign-in by a link for the owner and has
+// the runner put its link on the card. It returns the attempt's id.
+func signInCardRig(t *testing.T, r *toolRig, runner *FakeRunner, frame string) string {
+ t.Helper()
+ attempt, err := r.client.Connect(r.ctx, wire.Connect{Provider: "claude"})
+ if err != nil || attempt.Prompt == nil || attempt.Prompt.Kind != wire.PromptAuthorize {
+ t.Fatalf("sign-in attempt %+v %v", attempt, err)
+ }
+ f, _, err := runner.Expect(r.ctx, wire.FrameConnect)
+ if err != nil {
+ t.Fatal(err)
+ }
+ _ = runner.Send(r.ctx, "a-"+frame, wire.FrameAck, wire.Ack{ID: f.ID})
+ if err := runner.Send(r.ctx, "r-"+frame, wire.FrameConnection, wire.ConnectionReport{Connection: attempt.ID, Person: Owner, Provider: "claude", State: wire.ConnConnecting, Prompt: &wire.ConnectPrompt{Kind: wire.PromptAuthorize, URL: signInLink, Attempt: 1}}); err != nil {
+ t.Fatal(err)
+ }
+ r.wait("the link on the card", func(c *Conversation) bool {
+ p := c.Connections[attempt.ID].Prompt
+ return p != nil && p.URL == signInLink
+ })
+ return attempt.ID
+}
+
+// codeForm is the sign-in card's code form on the Add page.
+func codeForm(t *testing.T, page string) string {
+ t.Helper()
+ i := strings.Index(page, "data-code-form")
+ if i < 0 {
+ t.Fatalf("no code form: %.400s", page)
+ }
+ start := strings.LastIndex(page[:i], "<form")
+ form, _, _ := strings.Cut(page[start:], "</form>")
+ return form
+}
+
+// connectedAs has the runner finish the attempt as a token connection
+// the provider named no account for.
+func connectedAs(t *testing.T, r *toolRig, runner *FakeRunner, id, local, frame string) {
+ t.Helper()
+ if err := runner.Send(r.ctx, "r-"+frame, wire.FrameConnection, wire.ConnectionReport{Connection: id, Person: Owner, LocalID: local, Provider: "claude", State: wire.ConnHealthy}); err != nil {
+ t.Fatal(err)
+ }
+ r.wait("healthy", func(c *Conversation) bool { return c.Connections[id].State == wire.ConnHealthy })
+}
+
+// TestPagesSignInEmail (Paul, 2026-11-23): a Claude sign-in by a link
+// makes a token connection whose account the provider will not name, so
+// the sign-in step itself asks for the account email, once and
+// optionally, as part of the code's form: no value prefilled, the code
+// field still unnamed (never posted). An email typed there is the
+// stated email once the connection is made, shown on the row as the
+// person's own with the field closed; left empty, the row asks as
+// before. A bad shape, a teammate and a cross-site post are refused as
+// on the row, and a token paste still connecting takes none. The email
+// goes nowhere else.
+func TestPagesSignInEmail(t *testing.T) {
+ r := &toolRig{rig: newRig(t)}
+ keys := sealKeys(t)
+ runner := r.dial(0)
+ hello := held()
+ hello.Generation, hello.SealKey = runner.Welcome.Generation, keys.PublicString()
+ if err := runner.Send(r.ctx, "h1", wire.FrameHello, hello); err != nil {
+ t.Fatal(err)
+ }
+ r.wait("runner online", func(c *Conversation) bool { return c.Runner.Online })
+ owner := r.inst.Cookie()
+ const add = "/conversation/settings/connections/add"
+ const page = "/conversation/settings/connections"
+
+ id := signInCardRig(t, r, runner, "one")
+ form := codeForm(t, r.get(owner, add, 200))
+ for _, want := range []string{
+ `method="post" action="/conversation/connections/` + id + `/email"`,
+ `<input type="hidden" name="from" value="add">`,
+ `<label for="signin-email-` + id + `">Claude account email</label>`,
+ `<input rst-input id="signin-email-` + id + `" type="email" name="email" maxlength="254" autocapitalize="off" spellcheck="false" data-email-field>`,
+ "Optional. Shown wherever Equipo names this connection. Equipo does not verify it with Claude.",
+ `data-email-note role="status" hidden data-bad="That does not look like an email address."`,
+ "Paste the code Anthropic shows you",
+ } {
+ if !strings.Contains(form, want) {
+ t.Fatalf("the sign-in step lacks %q: %s", want, form)
+ }
+ }
+ if _, code, _ := strings.Cut(form, `id="code-`+id+`"`); strings.Contains(strings.SplitN(code, ">", 2)[0], "name=") {
+ t.Fatal("the code field has a name: a scriptless post would send it")
+ }
+ if strings.Count(form, "data-email-field") != 1 || strings.Contains(form, "value=\"\" data-email-field") || strings.Contains(form, `data-email-field required`) {
+ t.Fatalf("the email field is prefilled, required or doubled: %s", form)
+ }
+
+ email := func(c *http.Cookie, id, v string) (int, string) {
+ return r.post(c, "/conversation/connections/"+id+"/email", url.Values{"email": {v}, "from": {"add"}})
+ }
+ // Refused as on the row: a teammate, a cross-site post, a bad shape.
+ if status, _ := email(r.memberCookie(), id, "mallory@example.com"); status != http.StatusNotFound {
+ t.Fatalf("a teammate set the email: %d", status)
+ }
+ cross, _ := http.NewRequest("POST", r.inst.URL+"/conversation/connections/"+id+"/email", strings.NewReader(url.Values{"email": {"cross@example.com"}}.Encode()))
+ cross.AddCookie(owner)
+ cross.Header.Set("Content-Type", "application/x-www-form-urlencoded")
+ cross.Header.Set("Origin", "https://elsewhere.example")
+ cross.Header.Set("Sec-Fetch-Site", "cross-site")
+ if res, err := http.DefaultClient.Do(cross); err != nil || res.StatusCode != http.StatusForbidden {
+ t.Fatalf("a cross-site post: %v %v", res.StatusCode, err)
+ } else {
+ res.Body.Close()
+ }
+ for _, bad := range []string{"not an email", "me@example", "me@@example.com", "@example.com", "me@example.com\u202e", "me\x07@example.com", strings.Repeat("a", 243) + "@example.com"} {
+ if status, _ := email(owner, id, bad); status != http.StatusUnprocessableEntity {
+ t.Fatalf("%q: %d", bad, status)
+ }
+ }
+
+ // The owner's, typed with the code: kept for the attempt, the page
+ // back on the Add page, the card's field still empty.
+ if status, loc := email(owner, id, " me@example.com "); status != http.StatusSeeOther || loc != add {
+ t.Fatalf("the owner's email: %d to %q", status, loc)
+ }
+ if form = codeForm(t, r.get(owner, add, 200)); strings.Contains(form, "me@example.com") {
+ t.Fatal("the sign-in step prefills the email")
+ }
+ connectedAs(t, r, runner, id, "claude-1", "one-ok")
+ row := rowHTML(t, r.get(owner, page+"?added="+id, 200), id)
+ for _, want := range []string{"<span data-stated-email>me@example.com</span> <span equipo-conn-said>(added by you)</span>", "Change the account email", `value="me@example.com"`} {
+ if !strings.Contains(row, want) {
+ t.Fatalf("the signed-in row lacks %q: %s", want, row)
+ }
+ }
+ if strings.Contains(row, `data-account-email="`+id+`" open`) {
+ t.Fatal("the row asks again for the email given at sign-in")
+ }
+ list, err := r.client.Connections(r.ctx)
+ if err != nil {
+ t.Fatal(err)
+ }
+ for _, c := range list.Items {
+ if c.ID == id && (c.Label != "" || c.Kind != wire.KindToken) {
+ t.Fatalf("the stated email became the provider's label, or not a token: %+v", c)
+ }
+ }
+
+ // Left empty: the row asks after the sign-in, as before.
+ empty := signInCardRig(t, r, runner, "two")
+ connectedAs(t, r, runner, empty, "claude-2", "two-ok")
+ row = rowHTML(t, r.get(owner, page+"?added="+empty, 200), empty)
+ if !strings.Contains(row, `data-account-email="`+empty+`" open`) || !strings.Contains(row, "Add the account email") || strings.Contains(row, "(added by you)") {
+ t.Fatalf("an empty sign-in email changed the row: %s", row)
+ }
+
+ // A token paste still connecting takes none; nor does an ended one.
+ paste, err := r.client.Connect(r.ctx, wire.Connect{Provider: "claude", Kind: wire.KindToken})
+ if err != nil {
+ t.Fatal(err)
+ }
+ if status, _ := email(owner, paste.ID, "paste@example.com"); status != http.StatusConflict {
+ t.Fatalf("an email on a token paste still connecting: %d", status)
+ }
+ if _, err := r.client.CancelConnection(r.ctx, paste.ID); err != nil {
+ t.Fatal(err)
+ }
+ if status, _ := email(owner, paste.ID, "paste@example.com"); status != http.StatusConflict {
+ t.Fatalf("an email on an ended attempt: %d", status)
+ }
+
+ // Nowhere else: not to the runner, not in the event stream.
+ var sent int
+ if err := r.inst.DB.Writer().QueryRow("SELECT count(*) FROM runner_commands WHERE body LIKE '%me@example.com%' OR body LIKE '%paste@example.com%'").Scan(&sent); err != nil || sent != 0 {
+ t.Fatalf("the stated email went to the runner: %d %v", sent, err)
+ }
+ if raw := rawEvents(t, r.rig); strings.Contains(raw, "me@example.com") {
+ t.Fatal("the stated email is in the event stream")
+ }
+}