oficina / equipo Public

hostedctl: pin the owner connection; a lost one fails the store

Ruling R15. database/sql can discard a bad connection and open a fresh
one, which would drop the exclusive lock while the Store carries on and
let a stale clock overwrite a newer checkpoint. Open now pins one
sql.Conn, which holds the lock, and every Store operation runs on it,
one transaction at a time. When a call fails and the Conn is gone
(ErrBadConn, ErrConnDone or a failed ping), the Store is lost for good:
every later call returns ErrStoreLost and nothing reconnects; Close and
a fresh Open recover.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev a5050ff97a802115df53955826cce18a473813c9 parent 94122cd
3 files changed, +140 −12
  • docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md +14 −0
  • internal/hostedctl/store.go +70 −12
  • internal/hostedctl/store_test.go +56 −0

CI cancelled — superseded by a newer push — run details

CI log
=== prepare ===
ci-box: machine: aarch64, 32 CPUs, 62 GiB memory, kernel 7.0.0-1017-aws
ci-box: python 3.12.3; Docker version 29.1.3, build 29.1.3-0ubuntu3~24.04.2
ci-box: user namespaces allowed: 233151
ci-box: cgroup: cgroup2fs
ci-box: disk /home/ci/work/repos/oficina__equipo/wt/hosted-runners-1a: 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 1.3s
ci-box: codex: fetched and verified in 3.6s
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: image pulled in 10.1s
ci-box: pi: installed and verified in 7.6s
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.9s
ci-box: clone deepened in 3.8s
ci-box: file times set from content: 2868 files, 192 directories
ci-box: ready in 17.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.252s
=== compile ===
go build ./...
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py compile
+ go build -tags testbuild ./...
  1.2s
+ go list -export -test -tags testbuild -f  ./...
  0.7s
+ go list -export -test -tags browser,testbuild -f  ./internal/equipo ./internal/headless ./internal/idtest ./internal/plan3test ./internal/thintest
  0.3s
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -version
staticcheck 2026.1 (v0.7.0)
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 -version
Go: go1.26.11
Scanner: govulncheck@v1.8.0
DB: https://vuln.go.dev
DB updated: 2026-11-11 02:51:11 +0000 UTC

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

--- FAIL amadan.net/oficina/equipo/internal/headless TestHeadless/4c_rebase
=== RUN   TestHeadless/4c_rebase
time=2026-11-22T17:15:23.949Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-22T17:15:23.949Z level=INFO msg="startup phase done" phase=state_lock took=82µs
time=2026-11-22T17:15:23.949Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-22T17:15:23.949Z level=INFO msg="startup phase done" phase=claim_roots took=88µs
time=2026-11-22T17:15:23.949Z level=INFO msg="startup phase" phase=sweep
time=2026-11-22T17:15:23.978Z level=INFO msg="startup phase done" phase=sweep took=29.43ms
time=2026-11-22T17:15:23.978Z level=INFO msg="startup phase" phase=credentials
time=2026-11-22T17:15:23.978Z level=INFO msg="startup phase done" phase=credentials took=117µs
time=2026-11-22T17:15:23.978Z level=INFO msg="startup phase" phase=open_state
time=2026-11-22T17:15:24.017Z level=INFO msg="startup phase done" phase=open_state took=38.922ms
time=2026-11-22T17:15:24.018Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-22T17:15:24.019Z level=INFO msg=connecting host=127.0.0.1:38061 protocol=28
time=2026-11-22T17:15:24.020Z level=INFO msg=connected host=127.0.0.1:38061 took=950µs
time=2026-11-22T17:15:24.020Z level=INFO msg="capabilities gathering"
time=2026-11-22T17:15:24.020Z level=INFO msg="capabilities gathered" took=413µs tags=linux,claude,go
time=2026-11-22T17:15:24.021Z level=INFO msg="hello sent" protocol=28
time=2026-11-22T17:15:24.025Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-22T17:15:24.959Z level=INFO msg="connection checked" connection=claude-1 state=healthy
time=2026-11-22T17:15:29.332Z level=INFO msg="kept sessions" kept=1 bytes=2824 expired=0
time=2026-11-22T17:15:35.018Z level=INFO msg="kept sessions" kept=2 bytes=5030 expired=0
    merge_test.go:245: steps [engineering:done checks:passed review:approve merge:merge_conflict engineering:queued], want [engineering:done checks:passed review:approve merge:merge_conflict engineering:done checks:passed review:approve merge:done] (in_progress )
--- FAIL: TestHeadless/4c_rebase (11.57s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m11.721s
FAIL	amadan.net/oficina/equipo/internal/headless	72.054s


receipt: test step 1m13.289s 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 1m11.721s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m11.72s amadan.net/oficina/equipo/internal/headless TestHeadless
exit status 1

amadan: job cancelled — a newer push superseded it
--- shard 1 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-review: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadless$/^4_review$|^TestHeadless$/^2b_access$|^TestHeadless$/^runner_crash$|^TestHeadless$/^2b_first_message$|^TestHeadless$/^4_checks_honest$|^TestHeadless$/^7_stream_resume$|^TestHeadless$/^2b_notebook$|^TestHeadless$/^2b_move_in$|^TestHeadless$/^2b_desk_failure$|^TestHeadless$/^cancel$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m23.626s 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.803s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m21.8s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 30.15, cpu waiting 20.47%, memory waiting 0.00%, io waiting 0.63%
--- shard 2 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-connections: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadlessConnections$|^TestHeadlessTokenPasteEndToEnd$|^TestHeadlessTokenConnection$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m25.331s 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.161s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m12.54s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 5.83s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 4.79s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 30.15, cpu waiting 19.93%, memory waiting 0.00%, io waiting 0.61%
--- shard 3 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-mac: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestMacWorker$|^TestHeadlessAttachments$|^TestHeadlessPrewarm$|^TestHeadless$/^1_first_token$|^TestHeadless$/^6_quick_messages$|^TestHeadless$/^8_instance_restart$|^TestHeadless$/^3_runner_offline$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m19.967s 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 1m18.299s amadan.net/oficina/equipo/internal/headless
receipt: slow test 37.57s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 20.51s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 10.6s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
receipt: slow test 9.62s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
machine: 32 CPUs, load 30.51, cpu waiting 21.13%, memory waiting 0.00%, io waiting 0.68%
--- shard 4 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-guards: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadlessCopyRotation$|^TestHeadlessPolicyGuards$|^TestHeadlessRunnerKillLeavesNoCopies$|^TestHeadlessNewHouseRuleStartsFresh$|^TestHeadless$/^3_engineering$|^TestHeadless$/^3_step_cancel$|^TestHeadless$/^3_step_contained$|^TestHeadless$/^3_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

amadan: job cancelled — a newer push superseded it
--- shard 5 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-rest: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^TestHeadless$/^4c_rebase$|^TestHeadless$/^4b_ask$|^TestHeadless$/^4c_checks_card$|^TestHeadless$/^4_step_crash$|^TestHeadless$/^4_review$|^TestHeadless$/^2b_access$|^TestHeadless$/^runner_crash$|^TestHeadless$/^2b_first_message$|^TestHeadless$/^4_checks_honest$|^TestHeadless$/^7_stream_resume$|^TestHeadless$/^2b_notebook$|^TestHeadless$/^2b_move_in$|^TestHeadless$/^2b_desk_failure$|^TestHeadless$/^cancel$|^TestHeadlessConnections$|^TestHeadlessTokenPasteEndToEnd$|^TestHeadlessTokenConnection$|^TestMacWorker$|^TestHeadlessAttachments$|^TestHeadlessPrewarm$|^TestHeadless$/^1_first_token$|^TestHeadless$/^6_quick_messages$|^TestHeadless$/^8_instance_restart$|^TestHeadless$/^3_runner_offline$|^TestHeadlessCopyRotation$|^TestHeadlessPolicyGuards$|^TestHeadlessRunnerKillLeavesNoCopies$|^TestHeadlessNewHouseRuleStartsFresh$|^TestHeadless$/^3_engineering$|^TestHeadless$/^3_step_cancel$|^TestHeadless$/^3_step_contained$|^TestHeadless$/^3_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

amadan: job cancelled — a newer push superseded it
--- shard 6 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane thintest: ./internal/thintest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test([^C]|C[^o]|Co[^n]|Con[^t])|^TestContract(Assistant|Outcome|Team|Handoff|HostAllowlist|HostIsPerPerson|Look|Use[A-Z]|RemoteCall|LanesRunAtOnce|NoMergeQuestionWhenGateMerges|PreviewHeldUntilPublishAnswer|PreviewNotHeldBelow19|PublishNeedsOwnerAnswer)' ./internal/thintest

receipt: test step 1.094s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 2m1.624s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 7.84s amadan.net/oficina/equipo/internal/thintest TestContractTeamJobSettledStates
receipt: slow test 6.74s amadan.net/oficina/equipo/internal/thintest TestExplorePreviewsOff
receipt: slow test 4.31s amadan.net/oficina/equipo/internal/thintest TestContractTeamUpdatePersonNeeds
receipt: slow test 3.81s amadan.net/oficina/equipo/internal/thintest TestContractPreviewHeldUntilPublishAnswer
receipt: slow test 3.52s amadan.net/oficina/equipo/internal/thintest TestContractTeamNudgePersonNeeds
machine: 32 CPUs, load 1.43, cpu waiting 0.00%, memory waiting 0.00%, io waiting 2.54%
--- 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 1.094s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1m26.784s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 9.08s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 5.03s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotOffered
receipt: slow test 4.41s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
receipt: slow test 2.4s amadan.net/oficina/equipo/internal/thintest TestContractPreview
receipt: slow test 2.34s amadan.net/oficina/equipo/internal/thintest TestContractPublishNameTaken
machine: 32 CPUs, load 1.43, cpu waiting 0.00%, memory waiting 0.00%, io waiting 2.54%
--- 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

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

receipt: test step 47.258s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 46.141s amadan.net/oficina/equipo/internal/runner
receipt: slow test 26.11s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.02s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 29.32, cpu waiting 20.18%, memory waiting 0.00%, io waiting 1.17%
--- 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 47.807s 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 45.887s amadan.net/oficina/equipo/internal/runner
receipt: slow test 35.92s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 31.67s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.38s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.57s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 29.32, cpu waiting 20.18%, memory waiting 0.00%, io waiting 1.17%
--- 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.009s 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.097s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.12s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.5s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.13s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 2.28s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 1.61s amadan.net/oficina/equipo/internal/runner TestCoordinatorTransientRefusalKeepsServing
machine: 32 CPUs, load 20.97, cpu waiting 15.29%, memory waiting 0.00%, io waiting 1.43%
--- 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 26.9%, load 15.39
test lane equipotest-a: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test[A-D]|^TestQ' ./internal/equipotest
cache miss: amadan.net/oficina/equipo/internal/equipotest: its inputs changed

amadan: job cancelled — a newer push superseded it
--- 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 26.9%, load 15.39
test lane equipotest-e: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test[E-P]' ./internal/equipotest

receipt: test step 1.218s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1m12.399s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 19.2s amadan.net/oficina/equipo/internal/equipotest TestProjectWritesRequireCurrentOwner
receipt: slow test 19.12s amadan.net/oficina/equipo/internal/equipotest TestProjectOwnersAreMembers
receipt: slow test 19.11s amadan.net/oficina/equipo/internal/equipotest TestProjectsReopen
receipt: slow test 19.11s amadan.net/oficina/equipo/internal/equipotest TestProjectRetryAndRevision
receipt: slow test 19.08s amadan.net/oficina/equipo/internal/equipotest TestProjectsFailuresRollBack
machine: 32 CPUs, load 15.39, cpu waiting 12.36%, memory waiting 0.00%, io waiting 1.52%
--- 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 26.9%, load 15.39
test lane equipotest-r: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestR' ./internal/equipotest
cache miss: amadan.net/oficina/equipo/internal/equipotest: its inputs changed

amadan: job cancelled — a newer push superseded it
--- shard 15 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-rest started 30s late; cpu waiting 26.9%, load 15.39
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 508ms against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1m4.231s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 24.45s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 23.28s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 23.2s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 21.61s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsUpgrade
receipt: slow test 21.57s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsRollbackAndUnavailable
machine: 32 CPUs, load 15.39, cpu waiting 10.95%, memory waiting 0.00%, io waiting 1.58%
--- 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 26.9%, load 15.39
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 611ms against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 48.756s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 3.61s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 3.41s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 1.5s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.47s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3A
receipt: slow test 1.21s amadan.net/oficina/equipo/internal/plan3test TestPlanMigrationUpgrade
machine: 32 CPUs, load 15.39, cpu waiting 10.95%, memory waiting 0.00%, io waiting 1.58%
--- 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 26.9%, load 15.39
test lane rest: ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/push ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/hostedctl ./internal/hostedwire ./internal/idtest ./internal/isolatedjob ./internal/isolatedjob/awsjob ./internal/isolatedjob/guardfixture ./internal/isolatedjob/isolatedjobtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/push ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/hostedctl ./internal/hostedwire ./internal/idtest ./internal/isolatedjob ./internal/isolatedjob/awsjob ./internal/isolatedjob/guardfixture ./internal/isolatedjob/isolatedjobtest ./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/isolatedjob: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/webread: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/equipo/team: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/claude: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/forge: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/codex: 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

amadan: job cancelled — a newer push superseded it
--- shard 18 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-chat: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m22.573s 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.11s amadan.net/oficina/equipo/internal/headless
receipt: slow test 37.3s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 15.21s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 10.42s amadan.net/oficina/equipo/internal/headless TestBrowserChat
receipt: slow test 7.88s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 5.76s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
machine: 32 CPUs, load 30.15, cpu waiting 20.47%, memory waiting 0.00%, io waiting 0.63%
--- shard 19 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-work: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

amadan: job cancelled — a newer push superseded it
--- shard 20 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-connections: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

amadan: job cancelled — a newer push superseded it
--- shard 21 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-rest: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAskAfterMerge|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' ./internal/headless

amadan: job cancelled — a newer push superseded it
--- shard 22 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-rest: ./internal/equipo
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserPreviewBlocksNavigation)$' ./internal/equipo

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

receipt: test step 811ms against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1.673s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 1.67s 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 229ms against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1.856s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 1.86s 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 1.083s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 3m20.199s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 17.52s amadan.net/oficina/equipo/internal/thintest TestBrowserAccessRequest
receipt: slow test 14.35s amadan.net/oficina/equipo/internal/thintest TestBrowserSettingsTeams
receipt: slow test 12.02s amadan.net/oficina/equipo/internal/thintest TestBrowserThinkingCycles
receipt: slow test 10.55s amadan.net/oficina/equipo/internal/thintest TestBrowserPlacementQuestionAndPending
receipt: slow test 7.93s amadan.net/oficina/equipo/internal/thintest TestBrowserInnerScreens
machine: 32 CPUs, load 3.08, cpu waiting 1.66%, memory waiting 0.00%, io waiting 2.44%
--- shard 23 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
shard 23: make test-quarantine
python3 scripts/ci-test.py quarantine
quarantine: 12 tests from scripts/ci-quarantine.txt; a failure is retried once, and a pass on the retry is reported as a flake
+ go test -tags testbuild -timeout 15m -v -run '^TestHeadlessConnections$/^A5_cancel_and_sign_out$|^TestHeadlessConnections$/^C4_claude_sign_in$|^TestHeadlessConnections$/^C5_engineering_failover$|^TestHeadlessConnections$/^C5_engineering_to_codex$|^TestHeadlessConnections$/^C5_engineering_waits$' ./internal/headless   (53s)
ok ./internal/headless TestHeadlessConnections/A5_cancel_and_sign_out 5.53s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.33s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 9.29s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 9.94s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 24.84s
+ 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   (63s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 12.88s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 14.23s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 20.67s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 13.14s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless   (21s)
ok ./internal/headless TestMixedVersions 19.83s
+ 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 30.42, cpu waiting 21.37%, memory waiting 0.00%, io waiting 0.89%
--- shard 24 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
shard 24: make runner-host
python3 scripts/runner-prerequisites.py
CGO_ENABLED=0 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks

receipt: test step 8.272s 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.117s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 173ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 66ms amadan.net/oficina/equipo/internal/runner/provider/codex
receipt: slow package 1ms amadan.net/oficina/equipo/internal/runner/provider
receipt: slow package 0s amadan.net/oficina/equipo/internal/runner/provider/gotoolchain
receipt: slow test 5.07s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.66s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 310ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 170ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 70ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxToolchain
CGO_ENABLED=0 EQUIPO_REQUIRE_USER_SESSION=1 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.068s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 2.755s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 280ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 180ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof
receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 100ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReapsOrphans
receipt: slow test 100ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryMalformedRecord
machine: 32 CPUs, load 3.95, cpu waiting 4.54%, memory waiting 0.00%, io waiting 2.13%
--- 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 26.9%, load 15.39
shard 25: make runner-dead-references lanes-check build vet fmt-check budget migration-check
python3 scripts/runner-dead-references.py
reference scan: 2581 text files, 2854 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: 94 directories within budget
CGO_ENABLED=0 go test ./internal/equipo -run '^TestMigrationModels$' -count=1
ok  	amadan.net/oficina/equipo/internal/equipo	2.514s
machine: 32 CPUs, load 25.69, cpu waiting 19.51%, memory waiting 0.00%, io waiting 1.25%
--- 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 26.9%, load 15.39
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 15.39, cpu waiting 12.36%, memory waiting 0.00%, io waiting 1.52%
--- 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 26.9%, load 15.39
shard 27: make govulncheck
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 ./...
=== Symbol Results ===

No vulnerabilities found.

Your code is affected by 0 vulnerabilities.
This scan also found 0 vulnerabilities in packages you import and 5
vulnerabilities in modules you require, but your code doesn't appear to call
these vulnerabilities.
Use '-show verbose' for more details.
machine: 32 CPUs, load 20.97, cpu waiting 15.29%, memory waiting 0.00%, io waiting 1.43%
--- 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 26.9%, load 15.39
shard 28: make gitleaks
5:14PM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
5:15PM INF 1116 commits scanned.
5:15PM INF scanned ~61546479 bytes (61.55 MB) in 14.1s
5:15PM INF no leaks found
machine: 32 CPUs, load 29.32, cpu waiting 19.51%, memory waiting 0.00%, io waiting 1.25%
diff --git a/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md b/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md
index 74510006..4802fa30 100644
--- a/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md
+++ b/docs/superpowers/plans/HOSTED-SLICE1-PROGRESS.md
@@ -283,3 +283,17 @@ RED: `store_test.go:326: Open through current.db while controller.db is open = n
| R7a round-1 order (no held-row check, bound from the old mark only) | `go test ./internal/hostedctl -run '^TestStoreNonceReplayAcrossWallJump$' -count=1` | `store_test.go:354: replay with until 12:10 at 12:11 = (true, <nil>), want (false, nil): a held row is a replay whatever its expiry` | yes, passes |
| R7b no held-row check | same | `store_test.go:354: replay with until 12:10 at 12:11 = (false, hostedctl: nonce window already pruned ...), want (false, nil)` | yes, passes |
| R7c bound ignores this call's prune | same | `store_test.go:360: new nonce with until 12:10 at 12:11, pruning until 12:10 = (true, <nil>), want (false, ErrNoncePruned)` | yes, passes |
+
+Controller ruling R15 (review r3, finding 3: database/sql can discard the connection and open a fresh one, so the exclusive lock lapses while the Store lives on).
+- `Open` pins one `*sql.Conn` (`db.Conn`), which takes the exclusive lock at Open's first write. Migrate, clock restore, `Tx` (and through it `Checkpoint`, `Remember`, alert marking and Close's checkpoint) all run on that Conn, one transaction at a time.
+- When a `Tx` fails, the Store checks whether the Conn is gone: the error is `driver.ErrBadConn` or `sql.ErrConnDone`, or a ping on the Conn fails. If it is gone, the Store is marked lost for good: this and every later call returns `ErrStoreLost`, and nothing reconnects.
+- `Close` of a lost Store skips the checkpoint and only releases. Recovery is `Close` and a fresh `Open`.
+- `TestStoreLostConnectionFailsStore`:
+ - It discards the pinned connection (`Conn.Raw` returning `driver.ErrBadConn`, as database/sql does with a bad connection).
+ - A second Store then opens, which proves the lock lapsed, and closes, writing its checkpoint.
+ - The original Store's `Tx`, `Checkpoint` and `Remember` all return `ErrStoreLost`, and the second Store's checkpoint is unchanged.
+- RED: with the names only and `Tx` still on the pool, the run hung, because the pinned Conn holds the pool's one slot. That is a deadlock, not an assertion; the mutation below is the assertion evidence. GREEN: `go test ./internal/hostedctl -count=1` ok.
+
+| Mutation | Command | Observed failure | Restored |
+| --- | --- | --- | --- |
+| R15 continue on a new connection (on a lost Conn: `s.conn, _ = s.db.Conn(ctx); return s.runTx(ctx, fn)`) | `go test ./internal/hostedctl -run '^TestStoreLostConnectionFailsStore$' -count=1` | `store_test.go:379: Tx on the Store whose connection was discarded = <nil>, want ErrStoreLost` | yes, passes |
diff --git a/internal/hostedctl/store.go b/internal/hostedctl/store.go
index 0b1d3a87..2c9ae493 100644
--- a/internal/hostedctl/store.go
+++ b/internal/hostedctl/store.go
@@ -6,12 +6,14 @@ package hostedctl
import (
"context"
"database/sql"
+ "database/sql/driver"
"embed"
"errors"
"fmt"
"math"
"net/url"
"sync"
+ "sync/atomic"
"time"
"amadan.net/oficina/equipo/internal/hostedwire"
@@ -34,6 +36,12 @@ var ErrStoreInUse = errors.New("hostedctl: database is open in another controlle
// denies it.
var ErrNoncePruned = errors.New("hostedctl: nonce window already pruned (wall clock went back)")
+// ErrStoreLost: the Store's one connection, and with it the exclusive lock,
+// is gone. The Store stays failed and never reconnects, because another
+// controller may own the database since. Close it and Open afresh, which
+// takes the lock again and restores controller time.
+var ErrStoreLost = errors.New("hostedctl: store connection lost; close and reopen")
+
// AlertClockRollback is the alert kind, and the audit action, raised when
// Open finds the wall clock behind the last checkpoint.
const AlertClockRollback = "clock_rollback"
@@ -51,6 +59,9 @@ func schemaVersion() int { return len(migrations) }
// Store is the controller's SQLite database and its controller time.
type Store struct {
db *sql.DB
+ conn *sql.Conn // the one connection, pinned at Open; it holds the exclusive lock
+ txMu sync.Mutex // one transaction at a time on conn
+ lost atomic.Bool
host isolatedjob.Clock
clock *CtlClock
restarted bool
@@ -116,10 +127,16 @@ func Open(ctx context.Context, path string, c isolatedjob.Clock) (*Store, error)
if err != nil {
return nil, fmt.Errorf("hostedctl: open store: %w", err)
}
- // One connection: transactions in this process queue for it instead of
- // meeting SQLITE_BUSY.
+ // One connection, pinned for the Store's life: it takes the exclusive
+ // lock at Open's first write and every Store operation runs on it. If
+ // database/sql discards it, nothing reconnects (see ErrStoreLost).
db.SetMaxOpenConns(1)
- s := &Store{db: db, host: c}
+ conn, err := db.Conn(ctx)
+ if err != nil {
+ _ = db.Close()
+ return nil, inUse(fmt.Errorf("hostedctl: open store: %w", err), path)
+ }
+ s := &Store{db: db, conn: conn, host: c}
if err := s.migrate(ctx); err != nil {
_ = s.release()
return nil, inUse(err, path)
@@ -147,7 +164,7 @@ func inUse(err error, path string) error {
// migrate applies the missing migrations in one transaction. The version is
// read inside the transaction, so two Opens racing apply each one once.
func (s *Store) migrate(ctx context.Context) error {
- tx, err := s.db.BeginTx(ctx, nil)
+ tx, err := s.conn.BeginTx(ctx, nil)
if err != nil {
return fmt.Errorf("hostedctl: migrate: %w", err)
}
@@ -183,7 +200,7 @@ func (s *Store) migrate(ctx context.Context) error {
// restoreClock sets controller time from the last checkpoint and writes a
// new one, in one transaction with any clock_rollback audit row.
func (s *Store) restoreClock(ctx context.Context) error {
- tx, err := s.db.BeginTx(ctx, nil)
+ tx, err := s.conn.BeginTx(ctx, nil)
if err != nil {
return fmt.Errorf("hostedctl: restore clock: %w", err)
}
@@ -262,7 +279,8 @@ func undeliveredAlerts(ctx context.Context, tx *sql.Tx) ([]outboxAlert, error) {
}
// Close checkpoints controller time, closes the database and releases the
-// exclusive lock. A second Close does nothing.
+// exclusive lock. A second Close does nothing. A lost Store skips the
+// checkpoint (it no longer owns the database) and just lets go.
func (s *Store) Close() error {
s.mu.Lock()
if s.closed {
@@ -271,11 +289,22 @@ func (s *Store) Close() error {
}
s.closed = true
s.mu.Unlock()
- return errors.Join(s.Checkpoint(context.Background()), s.release())
+ var cpErr error
+ if !s.lost.Load() {
+ cpErr = s.Checkpoint(context.Background())
+ }
+ return errors.Join(cpErr, s.release())
}
-// release closes the database, which drops the exclusive lock.
-func (s *Store) release() error { return s.db.Close() }
+// release closes the pinned connection and the database, which drops the
+// exclusive lock.
+func (s *Store) release() error {
+ err := s.conn.Close()
+ if errors.Is(err, sql.ErrConnDone) {
+ err = nil // already discarded
+ }
+ return errors.Join(err, s.db.Close())
+}
// Clock returns the store's controller clock.
func (s *Store) Clock() *CtlClock { return s.clock }
@@ -327,8 +356,13 @@ func (s *Store) deliverStartupAlerts(ctx context.Context, a Alerter) error {
// the start. It rolls back when fn returns an error (returned as is) or
// panics, and otherwise checkpoints controller time and commits. Use the tx
// handle for every statement inside fn, audit rows included. Never call Tx,
-// Checkpoint or Remember from inside fn: the store has one connection, so
-// the inner call would wait for it forever. Do provider calls outside fn.
+// Checkpoint or Remember from inside fn: transactions run one at a time on
+// the one connection, so the inner call would wait forever. Do provider
+// calls outside fn.
+//
+// When a call fails and the pinned connection turns out to be gone (the
+// error says so, or a ping on it fails), the Store is marked lost: this and
+// every later call returns ErrStoreLost.
//
// The checkpoint is sampled after fn returns, so it is at least every T fn
// read or wrote, and it commits with fn's writes: no committed row holds a T
@@ -336,7 +370,31 @@ func (s *Store) deliverStartupAlerts(ctx context.Context, a Alerter) error {
// stored T even when the wall clock went back. A T only read and never
// stored may appear to step back after a crash (ruling R10).
func (s *Store) Tx(ctx context.Context, fn func(*sql.Tx) error) error {
- tx, err := s.db.BeginTx(ctx, nil)
+ s.txMu.Lock()
+ defer s.txMu.Unlock()
+ if s.lost.Load() {
+ return ErrStoreLost
+ }
+ err := s.runTx(ctx, fn)
+ if err != nil && s.connGone(ctx, err) {
+ s.lost.Store(true)
+ return fmt.Errorf("%w: %w", ErrStoreLost, err)
+ }
+ return err
+}
+
+// connGone reports whether err, or a ping on the pinned connection, shows
+// the connection was discarded.
+func (s *Store) connGone(ctx context.Context, err error) bool {
+ if errors.Is(err, driver.ErrBadConn) || errors.Is(err, sql.ErrConnDone) {
+ return true
+ }
+ return s.conn.PingContext(context.WithoutCancel(ctx)) != nil
+}
+
+// runTx is one transaction on the pinned connection; see Tx.
+func (s *Store) runTx(ctx context.Context, fn func(*sql.Tx) error) error {
+ tx, err := s.conn.BeginTx(ctx, nil)
if err != nil {
return fmt.Errorf("hostedctl: begin: %w", err)
}
diff --git a/internal/hostedctl/store_test.go b/internal/hostedctl/store_test.go
index 9a434095..d10e6127 100644
--- a/internal/hostedctl/store_test.go
+++ b/internal/hostedctl/store_test.go
@@ -3,6 +3,7 @@ package hostedctl
import (
"context"
"database/sql"
+ "database/sql/driver"
"errors"
"net/url"
"os"
@@ -351,6 +352,61 @@ func TestStoreOneOwnerThroughLinks(t *testing.T) {
openStore(t, symlink, isolatedjobtest.NewFakeClock(testWall))
}
+// TestStoreLostConnectionFailsStore: when database/sql discards the pinned
+// connection, its exclusive lock is gone, so the Store must stop for good
+// instead of carrying on with a fresh connection and a stale clock.
+func TestStoreLostConnectionFailsStore(t *testing.T) {
+ ctx := context.Background()
+ path := filepath.Join(t.TempDir(), "hosted.db")
+ clk := isolatedjobtest.NewFakeClock(testWall)
+ s := openStore(t, path, clk)
+
+ // What database/sql does with a connection the driver calls bad.
+ _ = s.conn.Raw(func(any) error { return driver.ErrBadConn })
+
+ other, err := Open(ctx, path, isolatedjobtest.NewFakeClock(testWall.Add(time.Hour)))
+ if err != nil {
+ t.Fatalf("Open after the first Store lost its connection = %v, want nil (the lock is gone)", err)
+ }
+ if err := other.Close(); err != nil {
+ t.Fatal(err)
+ }
+ before := readCheckpoint(t, path)
+
+ clk.AdvanceMono(time.Minute)
+ err = s.Tx(ctx, func(tx *sql.Tx) error { return appendAudit(tx, Audit{Action: "stale"}) })
+ if !errors.Is(err, ErrStoreLost) {
+ t.Fatalf("Tx on the Store whose connection was discarded = %v, want ErrStoreLost", err)
+ }
+ if err := s.Checkpoint(ctx); !errors.Is(err, ErrStoreLost) {
+ t.Fatalf("a later Checkpoint = %v, want ErrStoreLost (the Store stays failed)", err)
+ }
+ if ok, err := s.Remember(ctx, "inst-1", "n1", testWall.Add(hostedwire.NonceTTL)); ok || !errors.Is(err, ErrStoreLost) {
+ t.Fatalf("a later Remember = (%v, %v), want (false, ErrStoreLost)", ok, err)
+ }
+ if after := readCheckpoint(t, path); after != before {
+ t.Fatalf("checkpoint after the stale Store's calls = %v, want the second Store's %v unchanged", after, before)
+ }
+ if err := s.Close(); err != nil {
+ t.Fatalf("Close of a lost Store = %v, want nil", err)
+ }
+}
+
+// readCheckpoint reads the clock row past the store, with a short timeout.
+func readCheckpoint(t *testing.T, path string) [2]int64 {
+ t.Helper()
+ db, err := sql.Open("sqlite", (&url.URL{Scheme: "file", Path: path}).String()+"?_pragma=busy_timeout(100)")
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer db.Close()
+ var cp [2]int64
+ if err := db.QueryRow(`SELECT t_ns, wall_unix_ns FROM clock WHERE id = 1`).Scan(&cp[0], &cp[1]); err != nil {
+ t.Fatalf("read checkpoint: %v", err)
+ }
+ return cp
+}
+
// TestStoreNonceReplayAcrossWallJump: the wall clock jumps forward between
// Verify (which set until) and Remember (which prunes by the wall clock).
func TestStoreNonceReplayAcrossWallJump(t *testing.T) {