oficina / equipo Public

Smart door: Fable's review fixes (oficina/equipo #45)

- A sign-in never lands on /signed-out or a sign-in page. rememberSignIn
  rewrites a minting answer's Location to "/" when its path, cleaned as a
  browser cleans it (dot segments, backslashes as slashes), is /signed-out,
  /signin… or /auth/…. Covers a dot segment, a dot-dot segment, a direct
  POST to Begin and a tampered kept-page cookie. The door's own check
  (signedOutPage) cleans the path the same way, and oficinaid's Start
  sends a /signed-out return to "/".
- A stale session is signed out, not refused. The guard refuses an active
  member's session from before their session epoch (removed, then added
  back). The door now asks who it is: an active member's session is ended
  with the plain door, no refusal and nothing forgotten. An Oficina ID
  session is judged by the account it is linked to, and a lookup that
  fails is undecided.
- The Oficina ID settings page answers 503 when the session cannot be
  read, instead of redirecting to a door that sends it straight back.
- An end-to-end test with a real invitation: the invitee is neither
  refused nor signed out at the door.

Each fix fails its test when reverted (6 mutations, 6 caught).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by claude agent, operated by paul@keymail.dev 1329595f4674ddc49a8c202d2ecce93de312ffd9 parent 1e95ddc
8 files changed, +344 −18
  • internal/equipo/app.go +2 −2
  • internal/equipo/door/door.go +2 −1
  • internal/equipo/door/door_test.go +45 −0
  • internal/equipo/door/routes.go +61 −14
  • internal/equipo/oficinaid/http.go +10 −1
  • internal/equipo/oficinaid/store.go +10 −0
  • internal/equipo/setup/session_handlers.go +30 −0
  • internal/idtest/door_review_test.go +184 −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/feat__smart-door: Type  Size Avail | ext4   96G   84G
ci-box: disk /home/ci/.cache/equipo-ci-box: Type  Size Avail | ext4   96G   84G
ci-box: bwrap: fetched and verified in 0.3s
ci-box: image pulled in 9.9s
ci-box: claude: fetched and verified in 13.8s
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.3s
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
ci-box: pi: installed and verified in 7.5s
ci-box: opencode: installed and verified in 2.3s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 8.8s
ci-box: clone deepened in 3.6s
ci-box: file times set from content: 2848 files, 187 directories
ci-box: ready in 27.6s
=== 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.136s
=== compile ===
go build ./...
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py compile
+ go build -tags testbuild ./...
  4.6s
+ go list -export -test -tags testbuild -f  ./...
  4.4s
+ go list -export -test -tags browser,testbuild -f  ./internal/equipo ./internal/headless ./internal/idtest ./internal/plan3test ./internal/thintest
  3.1s
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -version
staticcheck 2026.1 (v0.7.0)
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 -version
Go: go1.26.11
Scanner: govulncheck@v1.8.0
DB: https://vuln.go.dev
DB updated: 2026-11-11 02:51:11 +0000 UTC

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

receipt: test step 1m11.232s 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 1m9.426s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m9.43s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 56.25, cpu waiting 35.38%, memory waiting 0.00%, io waiting 0.65%
--- 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 1m10.374s 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 1m8.695s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m8.69s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 56.25, cpu waiting 35.38%, memory waiting 0.00%, io waiting 0.65%
--- 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 1m10.423s 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 1m8.438s amadan.net/oficina/equipo/internal/headless
receipt: slow test 59.59s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 4.78s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 4.07s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 56.25, cpu waiting 35.38%, memory waiting 0.00%, io waiting 0.65%
--- 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 1m8.968s 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.123s amadan.net/oficina/equipo/internal/headless
receipt: slow test 32.71s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 17.7s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 8.62s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
receipt: slow test 8.08s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
machine: 32 CPUs, load 56.25, cpu waiting 34.92%, memory waiting 0.00%, io waiting 0.67%
--- 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
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/headless TestHeadless
=== RUN   TestHeadless
--- FAIL: TestHeadless (87.12s)

--- FAIL amadan.net/oficina/equipo/internal/headless TestHeadless/3_empty_repo
=== RUN   TestHeadless/3_empty_repo
time=2026-11-22T19:28:22.837Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-22T19:28:22.837Z level=INFO msg="startup phase done" phase=state_lock took=55µs
time=2026-11-22T19:28:22.837Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-22T19:28:22.837Z level=INFO msg="startup phase done" phase=claim_roots took=79µs
time=2026-11-22T19:28:22.837Z level=INFO msg="startup phase" phase=sweep
time=2026-11-22T19:28:22.878Z level=INFO msg="startup phase done" phase=sweep took=41.059ms
time=2026-11-22T19:28:22.878Z level=INFO msg="startup phase" phase=credentials
time=2026-11-22T19:28:22.878Z level=INFO msg="startup phase done" phase=credentials took=200µs
time=2026-11-22T19:28:22.878Z level=INFO msg="startup phase" phase=open_state
time=2026-11-22T19:28:22.927Z level=INFO msg="startup phase done" phase=open_state took=48.055ms
time=2026-11-22T19:28:22.927Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-22T19:28:22.928Z level=INFO msg=connecting host=127.0.0.1:42309 protocol=28
time=2026-11-22T19:28:22.929Z level=INFO msg=connected host=127.0.0.1:42309 took=889µs
time=2026-11-22T19:28:22.929Z level=INFO msg="capabilities gathering"
time=2026-11-22T19:28:22.931Z level=INFO msg="capabilities gathered" took=1.869ms tags=linux,claude,go
time=2026-11-22T19:28:22.931Z level=INFO msg="hello sent" protocol=28
time=2026-11-22T19:28:22.939Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-22T19:28:22.952Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-22T19:28:22.952Z level=WARN msg="startup phase failed" phase=state_lock took=49µs err=provider_uncertain
    env_test.go:375: runner exited: provider_uncertain
time=2026-11-22T19:28:22.954Z level=WARN msg=index repo=amadan.net/oficina/equipo err=cancelled
    env_test.go:282: runner did not stop
--- FAIL: TestHeadless/3_empty_repo (45.53s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m54.396s
FAIL	amadan.net/oficina/equipo/internal/headless	114.604s


receipt: test step 1m56.393s 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 1m54.396s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m27.12s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 8.67s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 7.61s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 6.62s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 4.36s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
exit status 1
+ go 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$' -v -run '^TestHeadless$/^3_empty_repo$' -count=1 ./internal/headless   (retry, once)
##############################################################################
FLAKE ./internal/headless:TestHeadless/3_empty_repo headless-guards 1329595f4674ddc49a8c202d2ecce93de312ffd9 45.53s 44.52
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 41.51, cpu waiting 24.00%, memory waiting 0.00%, io waiting 0.27%
--- shard 5 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-rest: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^TestHeadless$/^4c_rebase$|^TestHeadless$/^4b_ask$|^TestHeadless$/^4c_checks_card$|^TestHeadless$/^4_step_crash$|^TestHeadless$/^4_review$|^TestHeadless$/^2b_access$|^TestHeadless$/^runner_crash$|^TestHeadless$/^2b_first_message$|^TestHeadless$/^4_checks_honest$|^TestHeadless$/^7_stream_resume$|^TestHeadless$/^2b_notebook$|^TestHeadless$/^2b_move_in$|^TestHeadless$/^2b_desk_failure$|^TestHeadless$/^cancel$|^TestHeadlessConnections$|^TestHeadlessTokenPasteEndToEnd$|^TestHeadlessTokenConnection$|^TestMacWorker$|^TestHeadlessAttachments$|^TestHeadlessPrewarm$|^TestHeadless$/^1_first_token$|^TestHeadless$/^6_quick_messages$|^TestHeadless$/^8_instance_restart$|^TestHeadless$/^3_runner_offline$|^TestHeadlessCopyRotation$|^TestHeadlessPolicyGuards$|^TestHeadlessRunnerKillLeavesNoCopies$|^TestHeadlessNewHouseRuleStartsFresh$|^TestHeadless$/^3_engineering$|^TestHeadless$/^3_step_cancel$|^TestHeadless$/^3_step_contained$|^TestHeadless$/^3_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless

receipt: test step 2m33.408s 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 2m31.805s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m30.25s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistant
receipt: slow test 17.11s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 7.68s amadan.net/oficina/equipo/internal/headless TestHeadlessResearchHandoff
receipt: slow test 6.45s amadan.net/oficina/equipo/internal/headless TestHeadlessTurnBatching
receipt: slow test 6.23s amadan.net/oficina/equipo/internal/headless TestHeadlessBatchAfterRefusedReply
machine: 32 CPUs, load 24.85, cpu waiting 13.76%, memory waiting 0.00%, io waiting 0.15%
--- shard 6 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane thintest: ./internal/thintest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test([^C]|C[^o]|Co[^n]|Con[^t])|^TestContract(Assistant|Outcome|Team|Handoff|HostAllowlist|HostIsPerPerson|Look|Use[A-Z]|RemoteCall|LanesRunAtOnce|NoMergeQuestionWhenGateMerges|PreviewHeldUntilPublishAnswer|PreviewNotHeldBelow19|PublishNeedsOwnerAnswer)' ./internal/thintest

receipt: test step 2m0.891s 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 1m59.16s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 7.86s amadan.net/oficina/equipo/internal/thintest TestContractTeamJobSettledStates
receipt: slow test 6.74s amadan.net/oficina/equipo/internal/thintest TestExplorePreviewsOff
receipt: slow test 4.56s amadan.net/oficina/equipo/internal/thintest TestContractTeamNudgePersonNeeds
receipt: slow test 3.8s amadan.net/oficina/equipo/internal/thintest TestContractPreviewHeldUntilPublishAnswer
receipt: slow test 2.41s amadan.net/oficina/equipo/internal/thintest TestResearchDoneFallsBack
machine: 32 CPUs, load 41.51, cpu waiting 24.00%, memory waiting 0.00%, io waiting 0.27%
--- shard 7 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane thintest-contract: ./internal/thintest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^Test([^C]|C[^o]|Co[^n]|Con[^t])|^TestContract(Assistant|Outcome|Team|Handoff|HostAllowlist|HostIsPerPerson|Look|Use[A-Z]|RemoteCall|LanesRunAtOnce|NoMergeQuestionWhenGateMerges|PreviewHeldUntilPublishAnswer|PreviewNotHeldBelow19|PublishNeedsOwnerAnswer)' ./internal/thintest

receipt: test step 1m27.637s 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.468s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 9.04s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 4.96s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotOffered
receipt: slow test 4.4s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
receipt: slow test 2.35s amadan.net/oficina/equipo/internal/thintest TestContractPublishNameTaken
receipt: slow test 2.34s amadan.net/oficina/equipo/internal/thintest TestContractPreview
machine: 32 CPUs, load 57.71, cpu waiting 36.83%, memory waiting 0.00%, io waiting 0.49%
--- 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 4m36.653s, over the 45s its record on line 44 allows; reported only, timing fails on CI

receipt: test step 4m49.684s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 4m36.653s amadan.net/oficina/equipo/internal/runner/thin
receipt: slow test 36.99s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeAnsweredByAnotherModel
receipt: slow test 36.98s amadan.net/oficina/equipo/internal/runner/thin TestModelsEngineeringProbesThenRunsTheStrongest
receipt: slow test 36.79s amadan.net/oficina/equipo/internal/runner/thin TestModelsUnhealthyRetriedOnDemand
receipt: slow test 18.47s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeRunsInsideTheAdmission
receipt: slow test 6.86s amadan.net/oficina/equipo/internal/runner/thin TestOpenCodeStepsRealOpenCode
machine: 32 CPUs, load 3.81, cpu waiting 1.47%, 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 50.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 48.798s amadan.net/oficina/equipo/internal/runner
receipt: slow test 28.77s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.02s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 51.86, cpu waiting 31.40%, memory waiting 0.00%, io waiting 0.91%
--- shard 10 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-plans: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestPlanWorkflowCandidateOrder$|^TestPlanWorkflowFeature$|^TestCoordinatorRecoveryCallRefusalKeepsServing$|^TestCoordinatorRefusalMatrix$' ./internal/runner
cache miss: amadan.net/oficina/equipo/internal/runner: its inputs changed

receipt: test step 58.359s 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 56.358s amadan.net/oficina/equipo/internal/runner
receipt: slow test 46.4s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 42.08s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.39s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.56s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 57.37, cpu waiting 34.10%, memory waiting 0.00%, io waiting 0.79%
--- shard 11 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-rest: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^TestDirectBugWorkflow$|^TestEnrolKeepsTheRole$|^TestPlanWorkflowCandidateOrder$|^TestPlanWorkflowFeature$|^TestCoordinatorRecoveryCallRefusalKeepsServing$|^TestCoordinatorRefusalMatrix$' ./internal/runner
cache miss: amadan.net/oficina/equipo/internal/runner: its inputs changed

receipt: test step 36.077s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 35.197s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.13s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.58s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.12s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 2.49s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 1.61s amadan.net/oficina/equipo/internal/runner TestReportPostsRetryExactRequest
machine: 32 CPUs, load 30.42, cpu waiting 18.91%, memory waiting 0.00%, io waiting 1.19%
--- 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 37.5%, load 22.01
test lane equipotest-a: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test[A-D]|^TestQ' ./internal/equipotest

receipt: test step 1m6.309s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m4.47s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 26.35s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 26.23s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 24.18s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 21.76s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
receipt: slow test 21.62s amadan.net/oficina/equipo/internal/equipotest TestAuthorityReadsOneSnapshot
machine: 32 CPUs, load 53.40, cpu waiting 34.26%, memory waiting 0.00%, io waiting 0.41%
--- 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 37.5%, load 22.01
test lane equipotest-e: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test[E-P]' ./internal/equipotest

receipt: test step 1m15.784s 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 1m14.082s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 19.76s amadan.net/oficina/equipo/internal/equipotest TestProjectKindsAndDefaultBranch
receipt: slow test 19.74s amadan.net/oficina/equipo/internal/equipotest TestProjectsAccountRevisionAndValidation
receipt: slow test 19.73s amadan.net/oficina/equipo/internal/equipotest TestProjectRetryAndRevision
receipt: slow test 19.7s amadan.net/oficina/equipo/internal/equipotest TestProjectConcurrentRetry
receipt: slow test 19.68s amadan.net/oficina/equipo/internal/equipotest TestProjectsSharedAndGrouped
machine: 32 CPUs, load 50.80, cpu waiting 29.55%, memory waiting 0.00%, io waiting 0.35%
--- shard 14 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-r started 30s late; cpu waiting 37.5%, load 22.01
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 1m11.986s 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.092s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 14.54s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 13.06s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 9.97s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 9.91s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 6.96s amadan.net/oficina/equipo/internal/equipotest TestRosterBootstrapOnce
machine: 32 CPUs, load 50.80, cpu waiting 31.45%, memory waiting 0.00%, io waiting 0.37%
--- 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 39.0%, load 22.01
test lane equipotest-rest: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^Test[A-D]|^TestQ|^Test[E-P]|^TestR' ./internal/equipotest

receipt: test step 1m7.162s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m5.46s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 24.06s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 23.58s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 23.57s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 21.85s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsRollbackAndUnavailable
receipt: slow test 21.77s amadan.net/oficina/equipo/internal/equipotest TestSigninCSRF
machine: 32 CPUs, load 53.40, cpu waiting 34.26%, memory waiting 0.00%, io waiting 0.41%
--- shard 16 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: plan3test started 30s late; cpu waiting 37.5%, load 22.01
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
--- FAIL amadan.net/oficina/equipo/internal/plan3test TestPlan3ReleaseBoundaries
=== RUN   TestPlan3ReleaseBoundaries
--- FAIL: TestPlan3ReleaseBoundaries (0.33s)

--- FAIL amadan.net/oficina/equipo/internal/plan3test TestPlan3ReleaseBoundaries/inventory
=== RUN   TestPlan3ReleaseBoundaries/inventory
    plan3_release_test.go:22: entry has no copy review status or applicable acceptance signin.refused
--- FAIL: TestPlan3ReleaseBoundaries/inventory (0.01s)

--- FAIL amadan.net/oficina/equipo/internal/plan3test (package output)
FAIL
rastrillo-budget/v1 ran 50.39s
FAIL	amadan.net/oficina/equipo/internal/plan3test	50.655s


receipt: test step 52.347s 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 50.39s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 3.64s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 3.45s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 1.56s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.5s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3A
receipt: slow test 1.23s amadan.net/oficina/equipo/internal/plan3test TestPlanMigrationUpgrade
rastrillo: budget test: go test failed
exit status 1
+ go test -tags testbuild -timeout 15m -v -run '^TestPlan3ReleaseBoundaries$/^inventory$' -count=1 ./internal/plan3test   (retry, once)
FAILED TWICE ./internal/plan3test:TestPlan3ReleaseBoundaries/inventory plan3test
=== RUN   TestPlan3ReleaseBoundaries
=== RUN   TestPlan3ReleaseBoundaries/inventory
    plan3_release_test.go:22: entry has no copy review status or applicable acceptance signin.refused
--- FAIL: TestPlan3ReleaseBoundaries (0.02s)
    --- FAIL: TestPlan3ReleaseBoundaries/inventory (0.01s)
FAIL
rastrillo-budget/v1 ran 15ms
FAIL	amadan.net/oficina/equipo/internal/plan3test	0.193s
FAIL
machine: 32 CPUs, load 58.99, cpu waiting 36.72%, memory waiting 0.00%, io waiting 0.51%
make: *** [Makefile:113: ci-shard] Error 1

amadan: step check shard 16 of 29 failed: exit status 2
--- 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 37.5%, load 22.01
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/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/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/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
cache miss: amadan.net/oficina/equipo/internal/copydesk: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/opencode: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/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/webread: 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/runnerproto: 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 45.819s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/equipo/chat took 14.978s, 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/setup took 10.097s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/idtest took 1m45.844s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/release took 35.766s, 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.563s, over the 15s its record on line 40 allows; reported only, timing fails on CI

receipt: test step 2m26.988s against a 60s target (the gate's other steps are not in this figure)
receipt: 22 packages ran, 40 cached, 18 without tests, 0 failed
receipt: slow package 1m45.844s amadan.net/oficina/equipo/internal/idtest
receipt: slow package 1m3.117s amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow package 52.573s amadan.net/oficina/equipo/internal/runner/provider/pi
receipt: slow package 49.02s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 46.563s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 52.7s amadan.net/oficina/equipo/internal/idtest TestDoorRemembersOficinaID
receipt: slow test 45.61s amadan.net/oficina/equipo/internal/idtest TestDoorForgetsOficinaIDForARefusedSession
receipt: slow test 45.6s amadan.net/oficina/equipo/internal/idtest TestDoorOficinaSettingsUnreadableIsNoLoop
receipt: slow test 45.5s amadan.net/oficina/equipo/internal/idtest TestDoorNeverJudgesANativeSession
receipt: slow test 45.32s amadan.net/oficina/equipo/internal/idtest TestDoorStepUpIsLocal
machine: 32 CPUs, load 16.77, cpu waiting 9.23%, memory waiting 0.00%, io waiting 0.10%
--- 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 1m21.863s 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.275s amadan.net/oficina/equipo/internal/headless
receipt: slow test 38.59s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 14.35s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 8.62s amadan.net/oficina/equipo/internal/headless TestBrowserChat
receipt: slow test 6.91s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 6.65s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
machine: 32 CPUs, load 58.99, cpu waiting 36.48%, memory waiting 0.00%, io waiting 0.53%
--- 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 1m22.741s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m21.327s amadan.net/oficina/equipo/internal/headless
receipt: slow test 25.29s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 19.06s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 12.04s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 8.92s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
receipt: slow test 8.06s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
machine: 32 CPUs, load 58.99, cpu waiting 36.72%, memory waiting 0.00%, io waiting 0.51%
--- 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 1m39.288s 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.738s amadan.net/oficina/equipo/internal/headless
receipt: slow test 13.41s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 13.06s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 11.51s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 11.04s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
receipt: slow test 10.63s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsOpenCodeGoLimitRequired
machine: 32 CPUs, load 53.40, cpu waiting 32.41%, memory waiting 0.00%, io waiting 0.39%
--- 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

receipt: test step 1m26.762s 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.252s amadan.net/oficina/equipo/internal/headless
receipt: slow test 14.6s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
receipt: slow test 11.3s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 9.19s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 8.73s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 7.26s amadan.net/oficina/equipo/internal/headless TestBrowserEmptyExplore
machine: 32 CPUs, load 57.71, cpu waiting 36.57%, memory waiting 0.00%, io waiting 0.48%
--- shard 22 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-rest: ./internal/equipo
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserPreviewBlocksNavigation)$' ./internal/equipo

receipt: test step 1.926s 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 652ms amadan.net/oficina/equipo/internal/equipo
receipt: slow test 650ms 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.363s, over the 10s the default allows; reported only, timing fails on CI

receipt: test step 11.769s 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.363s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 8.32s amadan.net/oficina/equipo/internal/idtest TestBrowserSmartDoor
receipt: slow test 2.04s 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.538s 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.016s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 2.02s 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|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 3m18.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 3m17.433s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 21.98s amadan.net/oficina/equipo/internal/thintest TestBrowserAccessRequest
receipt: slow test 14.37s amadan.net/oficina/equipo/internal/thintest TestBrowserSettingsTeams
receipt: slow test 12.04s amadan.net/oficina/equipo/internal/thintest TestBrowserThinkingCycles
receipt: slow test 10.5s amadan.net/oficina/equipo/internal/thintest TestBrowserPlacementQuestionAndPending
receipt: slow test 7.07s amadan.net/oficina/equipo/internal/thintest TestBrowserInnerScreens
machine: 32 CPUs, load 9.11, cpu waiting 4.74%, memory waiting 0.00%, io waiting 0.08%
--- shard 23 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
shard 23: make test-quarantine
python3 scripts/ci-test.py quarantine
quarantine: 12 tests from scripts/ci-quarantine.txt; a failure is retried once, and a pass on the retry is reported as a flake
+ go test -tags testbuild -timeout 15m -v -run '^TestHeadlessConnections$/^A5_cancel_and_sign_out$|^TestHeadlessConnections$/^C4_claude_sign_in$|^TestHeadlessConnections$/^C5_engineering_failover$|^TestHeadlessConnections$/^C5_engineering_to_codex$|^TestHeadlessConnections$/^C5_engineering_waits$' ./internal/headless   (49s)
ok ./internal/headless TestHeadlessConnections/A5_cancel_and_sign_out 4.38s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.16s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 7.57s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 8.05s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 25.52s
+ 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   (48s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 9.12s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 10.02s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 8.86s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 17.76s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless   (19s)
ok ./internal/headless TestMixedVersions 17.06s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks   (2s)
ok ./internal/runner/checks TestCheckSandboxDeniedPathsTampering 0.79s
+ 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 51.86, cpu waiting 30.27%, memory waiting 0.00%, io waiting 0.94%
--- 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.367s 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.584s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 204ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 164ms amadan.net/oficina/equipo/internal/runner/provider/codex
receipt: slow package 2ms amadan.net/oficina/equipo/internal/runner/provider
receipt: slow package 0s amadan.net/oficina/equipo/internal/runner/provider/gotoolchain
receipt: slow test 5.3s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.8s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 370ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 200ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 150ms 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.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 2.965s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 280ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 200ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof
receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryMalformedRecord
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryReusedPID
machine: 32 CPUs, load 15.12, cpu waiting 8.95%, memory waiting 0.00%, io waiting 1.61%
--- 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 37.5%, load 22.01
shard 25: make runner-dead-references lanes-check build vet fmt-check budget migration-check
python3 scripts/runner-dead-references.py
reference scan: 2561 text files, 2862 matches, 0 failures
python3 scripts/ci-test.py check
lanes: 18 lanes and 5 browser lanes run every test once; 20-check@29
CGO_ENABLED=0 go build ./...
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o /dev/null ./cmd/equipo-runner
go vet ./...
go vet -tags testbuild ./internal/runner/thin ./internal/headless
GOOS=darwin GOARCH=arm64 go vet ./cmd/equipo-runner/... ./internal/runner/... ./internal/wire/... ./internal/release/...
go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget size
budget size: 89 directories within budget
CGO_ENABLED=0 go test ./internal/equipo -run '^TestMigrationModels$' -count=1
ok  	amadan.net/oficina/equipo/internal/equipo	2.243s
machine: 32 CPUs, load 57.71, cpu waiting 36.57%, memory waiting 0.00%, io waiting 0.48%
--- 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 37.5%, load 22.01
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 51.86, cpu waiting 30.27%, memory waiting 0.00%, io waiting 0.94%
--- 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 37.5%, load 22.01
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 38.15, cpu waiting 22.39%, memory waiting 0.00%, io waiting 1.11%
--- 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.0%, load 22.01
shard 28: make gitleaks
7:28PM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
7:28PM INF 1087 commits scanned.
7:28PM INF scanned ~61194879 bytes (61.19 MB) in 20.6s
7:28PM INF no leaks found
machine: 32 CPUs, load 51.86, cpu waiting 31.40%, memory waiting 0.00%, io waiting 0.91%

amadan: job failed at step check shard 16 of 29 — its output is above, not at the tail of this log
diff --git a/internal/equipo/app.go b/internal/equipo/app.go
index a38c2c95..39e91ba1 100644
--- a/internal/equipo/app.go
+++ b/internal/equipo/app.go
@@ -290,9 +290,9 @@ func RouterWithStore(d *db.DB, cfg Config, mailer mail.Sender, logger *slog.Logg
a.Get("/auth/verify", a.rememberSignIn(a.auth.Verify))
a.Post("/auth/verify", a.rememberSignIn(a.auth.Verify))
// The sign-in door (package door), behind the admission probe.
- signinDoor := &door.Routes{Look: signinLook, Auth: authentication, DB: d.Writer(), Origin: cfg.Origin, Guard: a.requireMember, Invited: store.MayVerifyInvitation, Signout: a.auth.Signout}
+ signinDoor := &door.Routes{Look: signinLook, Auth: authentication, DB: d.Writer(), Origin: cfg.Origin, Guard: a.requireMember, Invited: store.MayVerifyInvitation, Signout: a.auth.Signout, Active: store.sessionHandler(nil).Active}
if a.home != nil {
- signinDoor.Issuer, signinDoor.Signout, a.home.SignedIn = cfg.Home.Issuer, a.home.Signout, signinDoor.SignedIn
+ signinDoor.Issuer, signinDoor.Signout, a.home.SignedIn, signinDoor.Address = cfg.Home.Issuer, a.home.Signout, signinDoor.SignedIn, a.home.Store.LinkedAddress
a.home.Routes(a)
}
signinDoor.Mount(a)
diff --git a/internal/equipo/door/door.go b/internal/equipo/door/door.go
index 0ca4ff1e..66f5aed2 100644
--- a/internal/equipo/door/door.go
+++ b/internal/equipo/door/door.go
@@ -19,6 +19,7 @@ import (
"context"
"net/http"
"net/url"
+ "path"
"strings"
"amadan.net/oficina/estilo.git/brand"
@@ -218,5 +219,5 @@ func signedOutPage(p string) bool {
return false
}
u, err := url.Parse(p)
- return err != nil || u.Path == SignedOutPath
+ return err != nil || path.Clean("/"+strings.ReplaceAll(u.Path, "\\", "/")) == SignedOutPath
}
diff --git a/internal/equipo/door/door_test.go b/internal/equipo/door/door_test.go
index d026e74b..7b42c513 100644
--- a/internal/equipo/door/door_test.go
+++ b/internal/equipo/door/door_test.go
@@ -137,6 +137,43 @@ func TestTheProbeReadsTheGuard(t *testing.T) {
}
}
+// What a 4xx means depends on who the session is: an active member's is
+// only stale (signed out, never refused), an Oficina ID session is judged
+// by the account it is linked to, and any lookup that fails is undecided.
+func TestTheProbeReadsAStaleSessionAsSignedOut(t *testing.T) {
+ disk := errors.New("disk")
+ for _, c := range []struct {
+ name, method, linked string
+ active bool
+ activeErr, linkErr error
+ want admission
+ }{
+ {"an active member's stale session", "magiclink", "", true, nil, nil, admission{stale: true}},
+ {"a removed member", "magiclink", "", false, nil, nil, admission{refused: true}},
+ {"the roster unreadable", "magiclink", "", false, disk, nil, admission{undecided: true}},
+ {"a stale Oficina ID session", "oficina-id", "member@example.test", true, nil, nil, admission{stale: true}},
+ {"an Oficina ID session linked to nobody", "oficina-id", "", true, nil, nil, admission{refused: true}},
+ {"the link unreadable", "oficina-id", "", true, nil, disk, admission{undecided: true}},
+ } {
+ s := newStand(t)
+ s.status = http.StatusForbidden
+ var asked string
+ s.rt.Active = func(_ context.Context, address string) (bool, error) { asked = address; return c.active, c.activeErr }
+ s.rt.Address = func(context.Context, string) (string, error) { return c.linked, c.linkErr }
+ subject := "someone@example.test"
+ if c.method == "oficina-id" {
+ subject = "pr_home_subject"
+ }
+ got := s.rt.admission(request(s.session(t, subject, c.method)))
+ if got != c.want {
+ t.Errorf("%s: %+v, want %+v", c.name, got, c.want)
+ }
+ if c.method == "oficina-id" && c.linked != "" && asked != c.linked {
+ t.Errorf("%s: asked about %q, want the linked address", c.name, asked)
+ }
+ }
+}
+
// The probe ends nothing: the door does, for a session it refuses.
func TestTheProbeEndsNothing(t *testing.T) {
s := newStand(t)
@@ -228,6 +265,14 @@ func TestOficinaHrefFollowsTheRoute(t *testing.T) {
}
}
+func TestSignedOutPageIsCleaned(t *testing.T) {
+ for p, want := range map[string]bool{"/signed-out": true, "/./signed-out": true, "/work/../signed-out": true, "/work/..\\signed-out": true, "/signed-out/": true, "/signed-outs": false, "/work": false} {
+ if got := signedOutPage(p); got != want {
+ t.Errorf("signedOutPage(%q) = %v, want %v", p, got, want)
+ }
+ }
+}
+
func TestReturnPaths(t *testing.T) {
for p, want := range map[string]bool{"/work": true, "/tasks/1?x=2": true, "/signed-out": false, "/signed-out?x=1": false,
"//evil.example/x": false, "https://evil.example/": false, "/\\evil.example": false, "/signin": false, "/auth/home": false, "/account/home/confirm": false} {
diff --git a/internal/equipo/door/routes.go b/internal/equipo/door/routes.go
index f95d09a1..46b26324 100644
--- a/internal/equipo/door/routes.go
+++ b/internal/equipo/door/routes.go
@@ -31,6 +31,12 @@ type Routes struct {
// Invited reports whether an address that is no member yet holds an
// invitation it may verify (the invitation's sign-in).
Invited func(context.Context, string) (bool, error)
+ // Active reports whether address is an active member: false, with no
+ // error, for one not on the team.
+ Active func(context.Context, string) (bool, error)
+ // Address is the Equipo address an Oficina ID session's subject is
+ // linked to, "" for none. Nil without Home.
+ Address func(context.Context, string) (string, error)
// Signout is the app's sign-out: rastrillo's standalone, oficinaid's
// with Home.
Signout http.HandlerFunc
@@ -232,8 +238,8 @@ func (rt *Routes) SignedIn(w http.ResponseWriter, r *http.Request, minted *http.
// as signed in, as connect counts any live session.
func (rt *Routes) admitted(w http.ResponseWriter, r *http.Request) (*http.Request, bool) {
ad := rt.admission(r)
- if ad.refused {
- return rt.refusedSession(w, r), false
+ if ad.refused || ad.stale {
+ return rt.refusedSession(w, r, ad.refused), false
}
return r, ad.admitted || ad.undecided
}
@@ -244,7 +250,12 @@ func (rt *Routes) admitted(w http.ResponseWriter, r *http.Request) (*http.Reques
// refuses them. A remembered Oficina ID is forgotten, because offered again
// it would sign the same refused person in; a remembered email way is
// kept. If the session cannot be ended, the door says nothing of it.
-func (rt *Routes) refusedSession(w http.ResponseWriter, r *http.Request) *http.Request {
+//
+// With refused false the session is only stale (an active member's from
+// before their session epoch: removed, then added back): it is ended the
+// same way, and the door is plain, with nothing forgotten and no refusal,
+// because this person can sign in.
+func (rt *Routes) refusedSession(w http.ResponseWriter, r *http.Request, refused bool) *http.Request {
c, err := r.Cookie(rt.Auth.SessionCookie())
if err != nil {
return r
@@ -255,6 +266,9 @@ func (rt *Routes) refusedSession(w http.ResponseWriter, r *http.Request) *http.R
http.SetCookie(w, &http.Cookie{Name: c.Name, Value: "", Path: "/", MaxAge: -1, HttpOnly: true,
Secure: strings.HasPrefix(rt.Origin, "https://"), SameSite: http.SameSiteLaxMode})
w.Header().Set("Cache-Control", "no-store")
+ if !refused {
+ return withoutCookie(r, c.Name)
+ }
jar := rt.Auth.RememberJar()
if rec, res := jar.Read(r); res == lastsignin.Valid && rec.Method == lastsignin.MethodFederated {
jar.Clear(w)
@@ -265,7 +279,10 @@ func (rt *Routes) refusedSession(w http.ResponseWriter, r *http.Request) *http.R
// admission is what the probe found.
type admission struct {
admitted, refused, undecided bool
- address string
+ // stale: the guard refused a session of an active member, one from
+ // before their session epoch. Signed out, not refused.
+ stale bool
+ address string
}
// admission runs the gate every signed-in page runs (requireMember:
@@ -312,20 +329,50 @@ func (rt *Routes) admission(r *http.Request) admission {
case out.status >= http.StatusInternalServerError:
ad.undecided = true
case out.status >= http.StatusBadRequest:
- if string(raw.Method) != oficinaid.Method && rt.Invited != nil {
- invited, err := rt.Invited(r.Context(), raw.Address)
- if err != nil {
- return admission{undecided: true}
- }
- if invited {
- return admission{}
- }
- }
- ad.refused = true
+ return rt.standing(r.Context(), raw)
}
return ad
}
+// standing is what a 4xx from the guard means for raw: a refusal, a stale
+// session of somebody still on the team (removed and added back since it
+// began), or somebody invited who has not joined yet (left alone). Any
+// lookup that fails is undecided.
+func (rt *Routes) standing(ctx context.Context, raw auth.Identity) admission {
+ address := raw.Address
+ if string(raw.Method) == oficinaid.Method {
+ if rt.Address == nil {
+ return admission{refused: true}
+ }
+ var err error
+ if address, err = rt.Address(ctx, raw.Address); err != nil {
+ return admission{undecided: true}
+ }
+ if address == "" {
+ return admission{refused: true}
+ }
+ }
+ if rt.Active != nil {
+ active, err := rt.Active(ctx, address)
+ if err != nil {
+ return admission{undecided: true}
+ }
+ if active {
+ return admission{stale: true}
+ }
+ }
+ if string(raw.Method) != oficinaid.Method && rt.Invited != nil {
+ invited, err := rt.Invited(ctx, address)
+ if err != nil {
+ return admission{undecided: true}
+ }
+ if invited {
+ return admission{}
+ }
+ }
+ return admission{refused: true}
+}
+
// judged reports whether the door judges a session by its method.
func judged(method string) bool {
return method == "magiclink" || method == "keymail" || method == oficinaid.Method
diff --git a/internal/equipo/oficinaid/http.go b/internal/equipo/oficinaid/http.go
index 98a91126..16cffd35 100644
--- a/internal/equipo/oficinaid/http.go
+++ b/internal/equipo/oficinaid/http.go
@@ -9,6 +9,7 @@ import (
"mime"
"net/http"
"net/url"
+ stdpath "path"
"strings"
"sync"
"time"
@@ -154,6 +155,9 @@ func (h *HTTP) Start(w http.ResponseWriter, r *http.Request) {
h.fail(w, r, ErrRefused)
return
}
+ if u, e := url.Parse(path); e == nil && stdpath.Clean("/"+strings.ReplaceAll(u.Path, "\\", "/")) == "/signed-out" {
+ path = "/" // a fresh sign-in never lands on "You’re signed out"
+ }
h.startOnce.Do(func() { h.startLimiter = signin.NewMemoryLimiter(10 * time.Minute) })
hops := 0
if carlos.Running() {
@@ -239,10 +243,15 @@ func (h *HTTP) Finish(w http.ResponseWriter, r *http.Request) {
}
func (h *HTTP) Settings(w http.ResponseWriter, r *http.Request) {
linked, e := h.Store.Linked(r.Context(), h.token(r), time.Now())
- if e != nil {
+ if errors.Is(e, ErrRefused) {
http.Redirect(w, r, "/signin?return_to="+url.QueryEscape(settingsPath), http.StatusSeeOther)
return
}
+ if e != nil {
+ // Unknown, not signed out: the door would send it straight back.
+ h.fail(w, r, ErrUnavailable)
+ return
+ }
h.Render(w, r, View{State: "settings", Subject: linked.Subject, LinkedAt: linked.At}, 200)
}
func (h *HTTP) BeginReauth(w http.ResponseWriter, r *http.Request) {
diff --git a/internal/equipo/oficinaid/store.go b/internal/equipo/oficinaid/store.go
index 78bc2e1b..69a4daad 100644
--- a/internal/equipo/oficinaid/store.go
+++ b/internal/equipo/oficinaid/store.go
@@ -292,3 +292,13 @@ func (s *Store) NativeSessionOn(ctx context.Context, q linkstore.Queryer, hash s
}
return sess, nil
}
+
+// LinkedAddress is the Equipo address the Oficina ID subject is linked to,
+// "" when it is linked to none; any other failure is an error.
+func (s *Store) LinkedAddress(ctx context.Context, subject string) (string, error) {
+ _, address, err := s.Links.Resolve(ctx, s.Config.Issuer, subject)
+ if errors.Is(err, linkstore.ErrRefused) {
+ return "", nil
+ }
+ return address, err
+}
diff --git a/internal/equipo/setup/session_handlers.go b/internal/equipo/setup/session_handlers.go
index ef9b956e..aadc077e 100644
--- a/internal/equipo/setup/session_handlers.go
+++ b/internal/equipo/setup/session_handlers.go
@@ -11,6 +11,9 @@ import (
"errors"
"log/slog"
"net/http"
+ "net/url"
+ "path"
+ "strings"
)
// SigninPath is the sign-in door, and ForgetPath rastrillo auth's Forget:
@@ -99,6 +102,16 @@ func (h *SessionHandler) door(w http.ResponseWriter, r *http.Request, status int
h.Door(h.Auth, w, r, status, refused)
}
+// Active reports whether address is an active member: false, with no
+// error, for one not on the team.
+func (h *SessionHandler) Active(ctx context.Context, address string) (bool, error) {
+ member, err := h.Member(ctx, address)
+ if errors.Is(err, h.NotFound) {
+ return false, nil
+ }
+ return member.Active, err
+}
+
func (h *SessionHandler) RequireMember(next http.Handler) http.Handler {
if h.Auth == nil || h.Member == nil {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { h.fail(w, r, http.StatusServiceUnavailable) })
@@ -146,6 +159,11 @@ func (h *SessionHandler) RememberSignIn(next http.HandlerFunc) http.HandlerFunc
if cookie.Name != h.Auth.SessionCookie() || cookie.Value == "" || cookie.MaxAge < 0 {
continue
}
+ // A minted session never lands on a sign-in page: a kept page
+ // that cleans to one (/./signed-out, /work/../signin) is "/".
+ if loc := out.header.Get("Location"); loc != "" && notALanding(loc) {
+ out.header.Set("Location", "/")
+ }
request := r.Clone(r.Context())
request.Header = r.Header.Clone()
request.Header.Del("Cookie")
@@ -180,6 +198,18 @@ func (h *SessionHandler) RememberSignIn(next http.HandlerFunc) http.HandlerFunc
}
}
+// notALanding reports whether a redirect's path, cleaned as the browser
+// will clean it (backslashes as slashes), is /signed-out or a sign-in
+// page: no place for a session just minted to land.
+func notALanding(loc string) bool {
+ u, err := url.Parse(loc)
+ if err != nil {
+ return true
+ }
+ p := path.Clean("/" + strings.ReplaceAll(u.Path, "\\", "/"))
+ return p == "/signed-out" || p == "/signin" || strings.HasPrefix(p, "/signin/") || p == "/auth" || strings.HasPrefix(p, "/auth/")
+}
+
type signInResponse struct {
header http.Header
status int
diff --git a/internal/idtest/door_review_test.go b/internal/idtest/door_review_test.go
new file mode 100644
index 00000000..bfa32748
--- /dev/null
+++ b/internal/idtest/door_review_test.go
@@ -0,0 +1,184 @@
+package idtest
+
+// Fable's review of the door (oficina/equipo #45): /signed-out is never a
+// landing, a stale session is signed out rather than refused, an Oficina
+// ID settings page that cannot be read does not loop, and an invited
+// person is left alone.
+
+import (
+ "net/http"
+ "net/url"
+ "strings"
+ "testing"
+ "time"
+
+ "amadan.net/rastrillo/rastrillo/pow"
+)
+
+// emailLanding signs who in by email from the door at start, with form's
+// fields over the door's, and with kept in place of the page the sign-in
+// kept when it is set; it returns where the finished sign-in lands.
+func (f *fixture) emailLanding(t *testing.T, start, who string, form url.Values, kept *http.Cookie) string {
+ t.Helper()
+ page := f.request("GET", start, "", nil)
+ fields := fields(page.Body.String(), "/auth/begin")
+ fields.Set("address", who)
+ for k, v := range form {
+ fields[k] = v
+ }
+ time.Sleep(pow.DefaultMinAge + 20*time.Millisecond)
+ begin := f.request("POST", "/auth/begin", f.origin, fields)
+ if begin.Code != http.StatusSeeOther {
+ t.Fatalf("begin %d", begin.Code)
+ }
+ jar := mergeCookies(page.Result().Cookies(), begin.Result().Cookies())
+ if kept != nil {
+ jar = mergeCookies(jar, []*http.Cookie{kept})
+ }
+ confirm := f.request("GET", f.mailedLink(t), "", nil, jar...)
+ done := f.request("POST", "/auth/verify", f.origin, fieldsOf(confirm.Body.String(), "/auth/verify"), mergeCookies(jar, confirm.Result().Cookies())...)
+ if done.Code != http.StatusSeeOther {
+ t.Fatalf("verify %s %d %q", who, done.Code, title(done.Body.String()))
+ }
+ cookie(t, done, sessionCookie)
+ return done.Header().Get("Location")
+}
+
+func fieldsOf(body, action string) url.Values { return fields(body, action) }
+
+// A sign-in never lands on /signed-out (or a sign-in page), however the
+// page it kept was spelled or reached it.
+func TestDoorNeverLandsOnSignedOut(t *testing.T) {
+ t.Parallel()
+ modes(t, func(t *testing.T, f *fixture, home bool) {
+ for _, c := range []struct {
+ name, start string
+ form url.Values
+ kept *http.Cookie
+ }{
+ {"a dot segment", "/signin?way=email&return_to=%2F.%2Fsigned-out", nil, nil},
+ {"a dot-dot segment", "/signin?way=email&return_to=%2Fwork%2F..%2Fsigned-out", nil, nil},
+ {"posted to Begin", "/signin?way=email", url.Values{"return_to": {"/signed-out"}}, nil},
+ {"a tampered kept page", "/signin?way=email", nil, &http.Cookie{Name: keptCookie, Value: "%2Fsigned-out"}},
+ {"a backslash", "/signin?way=email", url.Values{"return_to": {"/work/..\\signed-out"}}, nil},
+ {"a sign-in page", "/signin?way=email", url.Values{"return_to": {"/work/../signin/local"}}, nil},
+ } {
+ // One address each: a mail per address is rate-limited.
+ who := strings.ToLower(strings.ReplaceAll(c.name, " ", "-")) + "@example.test"
+ f.member(t, who)
+ if got := f.emailLanding(t, c.start, who, c.form, c.kept); got != "/" {
+ t.Errorf("%s: landed on %q, want /", c.name, got)
+ }
+ }
+ // The door does not even carry such a page on its form.
+ for _, start := range []string{"/signin?way=email&return_to=%2F.%2Fsigned-out", "/signin?way=email&return_to=%2Fwork%2F..%2Fsigned-out"} {
+ if got := fields(f.request("GET", start, "", nil).Body.String(), "/auth/begin").Get("return_to"); got != "" {
+ t.Errorf("%s: the door's form carries %q", start, got)
+ }
+ }
+ // A page that is a page still lands there.
+ f.member(t, "a-real-page@example.test")
+ if got := f.emailLanding(t, "/signin?way=email&return_to=%2Fwork", "a-real-page@example.test", nil, nil); got != "/work" {
+ t.Errorf("a real page: landed on %q", got)
+ }
+ if home {
+ f.link(t)
+ // handoff.SafePath refuses a dot segment before any exchange.
+ if w := f.request("GET", "/auth/home?return_to=%2F.%2Fsigned-out", "", nil); w.Code == http.StatusSeeOther {
+ t.Error("an Oficina ID exchange started for /./signed-out")
+ }
+ start := f.request("GET", "/auth/home?return_to=%2Fsigned-out", "", nil)
+ u, _ := url.Parse(start.Header().Get("Location"))
+ receipt := f.request("POST", "/auth/assertion", f.issuer, url.Values{"assertion": {f.signed(t, u.Query().Get("nonce"), person, time.Now())}})
+ done := f.request("GET", "/auth/finish", "", nil, cookie(t, start, "__Host-equipo-id-pending"), cookie(t, receipt, "__Host-equipo-id-inbox"))
+ if done.Code != http.StatusSeeOther || done.Header().Get("Location") != "/" {
+ t.Errorf("an Oficina ID sign-in landed on %q", done.Header().Get("Location"))
+ }
+ }
+ })
+}
+
+// Removed and added back: the old session predates the member's session
+// epoch, so the guard refuses it. The door ends it and says nothing of a
+// refusal, because this person can sign in; a remembered way is kept.
+func TestDoorStaleSessionIsSignedOutNotRefused(t *testing.T) {
+ t.Parallel()
+ modes(t, func(t *testing.T, f *fixture, home bool) {
+ const who = "readded@example.test"
+ f.member(t, who)
+ s, record := f.emailRecord(t, who)
+ sessions := map[string][2]*http.Cookie{"email": {s, record}}
+ if home {
+ f.link(t)
+ done := f.oficinaSignin(t)
+ sessions["oficina-id"] = [2]*http.Cookie{cookie(t, done, sessionCookie), cookie(t, done, jarCookie)}
+ }
+ epoch := time.Now().Add(5 * time.Second).Unix()
+ if _, err := f.db.Writer().Exec("UPDATE members SET session_epoch=? WHERE address IN (?,?)", epoch, who, address); err != nil {
+ t.Fatal(err)
+ }
+ for name, c := range sessions {
+ if w := f.request("GET", "/work", "", nil, c[0]); w.Code < 400 || w.Code >= 500 {
+ t.Fatalf("%s: the guard admits a stale session: %d", name, w.Code)
+ }
+ door := f.request("GET", "/signin", "", nil, c[0], c[1])
+ if door.Code != http.StatusOK || strings.Contains(door.Body.String(), refusal) || title(door.Body.String()) != "Sign in to Equipo" {
+ t.Errorf("%s: %d %q, or told an active member they can't sign in", name, door.Code, title(door.Body.String()))
+ }
+ if _, clears := set(door, sessionCookie); !clears || f.sessionAlive(t, c[0]) {
+ t.Errorf("%s: the stale session lived on", name)
+ }
+ if c, _ := set(door, jarCookie); c != nil {
+ t.Errorf("%s: the door forgot how this person signs in", name)
+ }
+ }
+ })
+}
+
+// The Oficina ID settings page, when the session cannot be read, answers
+// 503 rather than sending the browser to a door that sends it back.
+func TestDoorOficinaSettingsUnreadableIsNoLoop(t *testing.T) {
+ t.Parallel()
+ f := newFixture(t, true)
+ s := f.local(t, address)
+ f.breakRoster(t)
+ w := f.request("GET", "/conversation/settings/oficina-id", "", nil, s)
+ if w.Code != http.StatusServiceUnavailable || w.Header().Get("Location") != "" {
+ t.Fatalf("settings on a storage failure: %d %s", w.Code, w.Header().Get("Location"))
+ }
+ signedOut := f.request("GET", "/conversation/settings/oficina-id", "", nil)
+ if signedOut.Code != http.StatusSeeOther || !strings.HasPrefix(signedOut.Header().Get("Location"), "/signin?") {
+ t.Fatalf("settings signed out: %d %s", signedOut.Code, signedOut.Header().Get("Location"))
+ }
+}
+
+// An invited person who has signed in to verify their address, and not yet
+// joined, is not refused at the door and keeps their session: the real
+// invitation, requireMember and MayVerifyInvitation.
+func TestDoorLeavesAnInviteeAlone(t *testing.T) {
+ t.Parallel()
+ modes(t, func(t *testing.T, f *fixture, home bool) {
+ const invitee = "invitee@example.test"
+ owner := f.local(t, address)
+ created := f.request("POST", "/invites", f.origin, url.Values{"address": {invitee}, "role": {"member"}, "request_id": {"door-invite"}}, owner)
+ if created.Code != http.StatusOK {
+ t.Fatalf("invite %d %.300s", created.Code, created.Body.String())
+ }
+ s := f.sessionAs(t, invitee, "magiclink")
+ if w := f.request("GET", "/work", "", nil, s); w.Code != http.StatusForbidden {
+ t.Fatalf("the guard admits an invitee: %d", w.Code)
+ }
+ door := f.request("GET", "/signin", "", nil, s)
+ if door.Code != http.StatusOK || strings.Contains(door.Body.String(), refusal) {
+ t.Fatalf("invitee door %d, or refused", door.Code)
+ }
+ if c, _ := set(door, sessionCookie); c != nil || !f.sessionAlive(t, s) {
+ t.Fatal("the door ended an invitee's session")
+ }
+ // Without the invitation the same person is refused.
+ stranger := f.sessionAs(t, "stranger@example.test", "magiclink")
+ if !strings.Contains(f.request("GET", "/signin", "", nil, stranger).Body.String(), refusal) {
+ t.Fatal("a stranger was not refused")
+ }
+ })
+}