oficina / equipo Public

Lookups: Astra phase 3 round 1 fixes (2 P1, 5 P2)

- The inventory is ready only after this process's scan committed; a
  failed scan makes it not ready, and the snapshot is published after
  commit.
- A lookup is shown only once its outcome is stored: a failed commit is
  an error, never a shown answer the reply would lack.
- Typed addresses are read as typed (scheme, port, IP), refused by rule
  and recorded, never turned into a search or another address.
- The pack reads the person's zone itself: none known, no city and
  UTC's date.
- Runner: a lookup result goes on the connection its step came on or
  nowhere; instance: an answer counts only from that same connection.
- A search refused before sending uses no quota; refunds run on a
  context of their own.
- Result URLs are bounded; the answer step is sized as sent and refused
  over budget right before sending.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev 5edac79fc83b31ba40717136fe420098173d476b parent 618d08b
15 files changed, +319 −57
  • .rastrillo/budgets.txt +2 −2
  • internal/equipo/chat/abilities_harness_test.go +5 −0
  • internal/equipo/chat/instance_inventory.go +17 −3
  • internal/equipo/chat/instance_inventory_test.go +29 −0
  • internal/equipo/chat/lookup.go +62 −14
  • internal/equipo/chat/lookup_live.go +14 −9
  • internal/equipo/chat/lookup_pack.go +16 −2
  • internal/equipo/chat/lookup_pack_test.go +19 −5
  • internal/equipo/chat/lookup_test.go +49 −3
  • internal/equipo/chat/stream.go +5 −2
  • internal/runner/thin/link.go +26 −12
  • internal/runner/thin/lookup_test.go +20 −0
  • internal/websearch/backends.go +4 −1
  • internal/websearch/websearch.go +20 −4
  • internal/websearch/websearch_test.go +31 −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/abilities-phase3: Type  Size Avail | ext4   96G   86G
ci-box: disk /home/ci/.cache/equipo-ci-box: Type  Size Avail | ext4   96G   86G
ci-box: bwrap: fetched and verified in 0.3s
ci-box: claude: fetched and verified in 1.4s
ci-box: codex: fetched and verified in 3.4s
ci-box: codex-code-mode-host: fetched and verified in 1.4s
ci-box: libwrap: fetched and verified in 0.3s
ci-box: socat: fetched and verified in 0.3s
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
ci-box: image pulled in 9.8s
ci-box: pi: installed and verified in 7.3s
ci-box: opencode: installed and verified in 2.3s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 8.6s
ci-box: clone deepened in 4.9s
ci-box: file times set from content: 3361 files, 217 directories
ci-box: ready in 18.4s
=== 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.149s
=== compile ===
go build ./...
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py compile
+ go build -tags testbuild ./...
  4.7s
+ go list -export -test -tags testbuild -f  ./...
  5.0s
+ go list -export -test -tags browser,testbuild -f  ./internal/equipo ./internal/equipotest ./internal/headless ./internal/idtest ./internal/plan3test ./internal/thintest
  3.8s
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-24 15:56:00 +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 1m23.158s 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.747s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m20.75s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 91.62, cpu waiting 46.95%, memory waiting 0.00%, io waiting 0.40%
--- 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 1m23.716s 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.2s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m21.2s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 91.62, cpu waiting 46.95%, memory waiting 0.00%, io waiting 0.40%
--- 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 1m24.459s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m22.259s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m11.77s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 5.69s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 4.8s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 91.62, cpu waiting 47.05%, memory waiting 0.00%, io waiting 0.39%
--- 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 1m20.022s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m17.683s amadan.net/oficina/equipo/internal/headless
receipt: slow test 38.29s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 21.49s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.01s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
receipt: slow test 8.88s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
machine: 32 CPUs, load 88.45, cpu waiting 46.33%, memory waiting 0.00%, io waiting 0.43%
--- shard 4 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-guards: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadlessCopyRotation$|^TestHeadlessPolicyGuards$|^TestHeadlessRunnerKillLeavesNoCopies$|^TestHeadlessNewHouseRuleStartsFresh$|^TestHeadless$/^3_engineering$|^TestHeadless$/^3_step_cancel$|^TestHeadless$/^3_step_contained$|^TestHeadless$/^3_step_refused$|^TestHeadless$/^3_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless

receipt: test step 1m40.509s 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 1m38.62s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m8.87s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.3s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 8.28s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 7.38s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 4.79s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
machine: 32 CPUs, load 78.03, cpu waiting 44.55%, memory waiting 0.00%, io waiting 0.29%
--- shard 5 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-rest: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^TestHeadless$/^4c_rebase$|^TestHeadless$/^4b_ask$|^TestHeadless$/^4c_checks_card$|^TestHeadless$/^4_step_crash$|^TestHeadless$/^4_review$|^TestHeadless$/^2b_access$|^TestHeadless$/^runner_crash$|^TestHeadless$/^2b_first_message$|^TestHeadless$/^4_checks_honest$|^TestHeadless$/^7_stream_resume$|^TestHeadless$/^2b_notebook$|^TestHeadless$/^2b_move_in$|^TestHeadless$/^2b_desk_failure$|^TestHeadless$/^cancel$|^TestHeadlessConnections$|^TestHeadlessTokenPasteEndToEnd$|^TestHeadlessTokenConnection$|^TestMacWorker$|^TestHeadlessAttachments$|^TestHeadlessPrewarm$|^TestHeadless$/^1_first_token$|^TestHeadless$/^6_quick_messages$|^TestHeadless$/^8_instance_restart$|^TestHeadless$/^3_runner_offline$|^TestHeadlessCopyRotation$|^TestHeadlessPolicyGuards$|^TestHeadlessRunnerKillLeavesNoCopies$|^TestHeadlessNewHouseRuleStartsFresh$|^TestHeadless$/^3_engineering$|^TestHeadless$/^3_step_cancel$|^TestHeadless$/^3_step_contained$|^TestHeadless$/^3_step_refused$|^TestHeadless$/^3_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless

receipt: test step 3m3.371s 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 3m0.781s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m44.67s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistant
receipt: slow test 20.24s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.12s amadan.net/oficina/equipo/internal/headless TestHeadlessResearchHandoff
receipt: slow test 6.83s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistantAttachments
receipt: slow test 6.75s amadan.net/oficina/equipo/internal/headless TestHeadlessTurnBatching
machine: 32 CPUs, load 26.98, cpu waiting 12.03%, memory waiting 0.00%, io waiting 0.07%
--- 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
--- FAIL amadan.net/oficina/equipo/internal/thintest TestWeatherDublinGetsForecast
=== RUN   TestWeatherDublinGetsForecast
    lookup_e2e_test.go:163: steps [{Person:owner@example.com Lookup:lk6aokn47fh73xlutypsrpdhr66l Attempt:1 Nonce:nrb2ejwm7euvlccwsse2lhpaxgt1 Stage:query Pack:{Question:What's the weather in Dublin? Earlier:[] City: Date:2026-11-28, Saturday} Results:[] Pages:[] Truncated:false} {Person:owner@example.com Lookup:lk6aokn47fh73xlutypsrpdhr66l Attempt:1 Nonce:nx5d6l3r65f3qzanbn4tnvzp5ku2 Stage:answer Pack:{Question:What's the weather in Dublin? Earlier:[] City: Date:2026-11-28, Saturday} Results:[{Title:Dublin forecast URL:https://www.met.ie/dublin Snippet: Date:}] Pages:[{URL:https://www.met.ie/dublin Title:www.met.ie Text:Rain at first, then sun. Highs of 11 degrees. Open 10:00 to 17:00.}] Truncated:false}]
--- FAIL: TestWeatherDublinGetsForecast (0.19s)

--- FAIL amadan.net/oficina/equipo/internal/thintest (package output)
FAIL
rastrillo-budget/v1 ran 3m19.642s
FAIL	amadan.net/oficina/equipo/internal/thintest	199.878s


receipt: test step 3m22.384s 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 3m19.642s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 15.71s amadan.net/oficina/equipo/internal/thintest TestTasklessHoldResumes
receipt: slow test 10.92s amadan.net/oficina/equipo/internal/thintest TestContractTeamJobSettledStates
receipt: slow test 6.66s amadan.net/oficina/equipo/internal/thintest TestExplorePreviewsOff
receipt: slow test 5.45s amadan.net/oficina/equipo/internal/thintest TestAbilityHoldResumes
receipt: slow test 5.44s amadan.net/oficina/equipo/internal/thintest TestNudgeResumesHeldJob
rastrillo: budget test: go test failed
exit status 1
+ go 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)' -v -run '^TestWeatherDublinGetsForecast$' -count=1 ./internal/thintest   (retry, once)
FAILED TWICE ./internal/thintest:TestWeatherDublinGetsForecast thintest
=== RUN   TestWeatherDublinGetsForecast
    lookup_e2e_test.go:163: steps [{Person:owner@example.com Lookup:lkipeqdqhjbnjsfsy7a4kxfr3eo5 Attempt:1 Nonce:n6gw2tflh6pq6n5d3cfxi4bxvuw1 Stage:query Pack:{Question:What's the weather in Dublin? Earlier:[] City: Date:2026-11-28, Saturday} Results:[] Pages:[] Truncated:false} {Person:owner@example.com Lookup:lkipeqdqhjbnjsfsy7a4kxfr3eo5 Attempt:1 Nonce:ngplks4lvfephkqzipwcmpmfsqx2 Stage:answer Pack:{Question:What's the weather in Dublin? Earlier:[] City: Date:2026-11-28, Saturday} Results:[{Title:Dublin forecast URL:https://www.met.ie/dublin Snippet: Date:}] Pages:[{URL:https://www.met.ie/dublin Title:www.met.ie Text:Rain at first, then sun. Highs of 11 degrees. Open 10:00 to 17:00.}] Truncated:false}]
--- FAIL: TestWeatherDublinGetsForecast (1.31s)
FAIL
rastrillo-budget/v1 ran 1.314s
FAIL	amadan.net/oficina/equipo/internal/thintest	1.473s
FAIL
machine: 32 CPUs, load 19.93, cpu waiting 8.62%, memory waiting 0.00%, io waiting 0.04%
make: *** [Makefile:113: ci-shard] Error 1

amadan: step check shard 6 of 29 failed: exit status 2
--- 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 1m58.716s 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 1m56.794s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 9.69s amadan.net/oficina/equipo/internal/thintest TestContractRetryPreviewUnverifiedMerge
receipt: slow test 9.03s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 4.97s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotOffered
receipt: slow test 4.56s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
receipt: slow test 3.07s amadan.net/oficina/equipo/internal/thintest TestContractPausedJob
machine: 32 CPUs, load 63.66, cpu waiting 33.89%, memory waiting 0.00%, io waiting 0.21%
--- 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
budget note: internal/runner/thin took 5m16.712s, over the 45s its record on line 44 allows; reported only, timing fails on CI

receipt: test step 5m22.856s 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 5m16.712s amadan.net/oficina/equipo/internal/runner/thin
receipt: slow test 37.03s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeAnsweredByAnotherModel
receipt: slow test 36.89s amadan.net/oficina/equipo/internal/runner/thin TestModelsEngineeringProbesThenRunsTheStrongest
receipt: slow test 36.81s amadan.net/oficina/equipo/internal/runner/thin TestModelsUnhealthyRetriedOnDemand
receipt: slow test 18.48s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeRunsInsideTheAdmission
receipt: slow test 10.03s amadan.net/oficina/equipo/internal/runner/thin TestTimeoutKeepsNothingForAnOlderInstance
machine: 32 CPUs, load 3.41, cpu waiting 1.20%, memory waiting 0.00%, io waiting 0.00%
--- shard 9 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-bug: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestDirectBugWorkflow$|^TestEnrolKeepsTheRole$' ./internal/runner

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

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

receipt: test step 42.194s 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 41.21s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.13s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 5.01s amadan.net/oficina/equipo/internal/runner TestEnrolCommitsTheCredentialLast
receipt: slow test 3.69s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.41s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 3.13s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
machine: 32 CPUs, load 50.53, cpu waiting 25.35%, memory waiting 0.00%, io waiting 0.82%
--- 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 38.3%, load 30.77
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 1m11.047s 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.059s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 29.44s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 29.41s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 26.97s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 24.27s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
receipt: slow test 24.18s amadan.net/oficina/equipo/internal/equipotest TestAuthorityUsesLiveRoster
machine: 32 CPUs, load 82.65, cpu waiting 44.55%, memory waiting 0.00%, io waiting 0.29%
--- shard 13 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-e started 30s late; cpu waiting 38.3%, load 30.77
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 2m14.386s 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 2m12.447s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 20.25s amadan.net/oficina/equipo/internal/equipotest TestProjectWritesRequireCurrentOwner
receipt: slow test 20.24s amadan.net/oficina/equipo/internal/equipotest TestProjectsReopen
receipt: slow test 20.23s amadan.net/oficina/equipo/internal/equipotest TestProjectsFailuresRollBack
receipt: slow test 20.17s amadan.net/oficina/equipo/internal/equipotest TestProjectsAccountRevisionAndValidation
receipt: slow test 20.15s amadan.net/oficina/equipo/internal/equipotest TestProjectRequestActorAndUpdate
machine: 32 CPUs, load 35.99, cpu waiting 16.78%, memory waiting 0.00%, io waiting 0.10%
--- 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 38.3%, load 30.77
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 1m21.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 1m15.373s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 18.97s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 13.68s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 10.66s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 10.56s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 7.62s amadan.net/oficina/equipo/internal/equipotest TestRosterAuditFailureRollsBack
machine: 32 CPUs, load 68.68, cpu waiting 38.53%, memory waiting 0.00%, io waiting 0.25%
--- shard 15 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-rest started 30s late; cpu waiting 38.3%, load 30.77
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 1m10.627s 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.794s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 27.53s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 26.78s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 26.75s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 24.78s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsCurrentOwner
receipt: slow test 24.63s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsUpgrade
machine: 32 CPUs, load 82.65, cpu waiting 44.55%, memory waiting 0.00%, io waiting 0.29%
--- 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.7%, load 30.77
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 57.946s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 55.573s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 3.98s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 3.56s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 1.75s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.73s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3A
receipt: slow test 1.42s amadan.net/oficina/equipo/internal/plan3test TestOnboardingAccountMigration
machine: 32 CPUs, load 89.81, cpu waiting 46.72%, memory waiting 0.00%, io waiting 0.36%
--- 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.7%, load 30.77
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/diffscan ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/door ./internal/equipo/github ./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/pause ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/push ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/idtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/claude/realcli ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websearch ./internal/websearch/websearchtest ./internal/websource ./internal/websource/guard ./internal/wire ./internal/wire/forgekey ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/diffscan ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/door ./internal/equipo/github ./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/pause ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/push ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/idtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/claude/realcli ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websearch ./internal/websearch/websearchtest ./internal/websource ./internal/websource/guard ./internal/wire ./internal/wire/forgekey ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
cache miss: amadan.net/oficina/equipo/internal/chatmarkdown: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/copydesk: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/equipo/team: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/forge: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/claude/realcli: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/workspace: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runnerproto: its inputs changed
budget note: internal/equipo took 2m34.984s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/equipo/chat took 38.988s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/equipo/github took 40.581s, 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 13.817s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/idtest took 2m4.998s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/release took 26.018s, 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 1m9.555s, over the 15s its record on line 40 allows; reported only, timing fails on CI
budget note: internal/runner/forge took 31.765s, over the 20s its record on line 35 allows; reported only, timing fails on CI
budget note: internal/runner/provider/claude/realcli took 12.37s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/runner/provider/pi took 1m29.612s, over the 1m0s its record on line 27 allows; reported only, timing fails on CI
budget note: internal/runner/workspace took 17.009s, over the 10s the default allows; reported only, timing fails on CI

receipt: test step 2m40.509s against a 60s target (the gate's other steps are not in this figure)
receipt: 43 packages ran, 28 cached, 17 without tests, 0 failed
receipt: slow package 2m34.984s amadan.net/oficina/equipo/internal/equipo
receipt: slow package 2m4.998s amadan.net/oficina/equipo/internal/idtest
receipt: slow package 1m29.612s amadan.net/oficina/equipo/internal/runner/provider/pi
receipt: slow package 1m16.806s amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow package 1m9.555s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 57.8s amadan.net/oficina/equipo/internal/idtest TestDoorRemembersOficinaID
receipt: slow test 51.6s amadan.net/oficina/equipo/cmd/equipo-runner TestReleaseRunnerHasNoFakeWorker
receipt: slow test 49.27s amadan.net/oficina/equipo/internal/idtest TestDoorNeverJudgesANativeSession
receipt: slow test 48.65s amadan.net/oficina/equipo/internal/idtest TestDoorStepUpIsLocal
receipt: slow test 48.45s amadan.net/oficina/equipo/internal/idtest TestDoorOficinaSettingsUnreadableIsNoLoop
machine: 32 CPUs, load 23.38, cpu waiting 10.53%, memory waiting 0.00%, io waiting 0.06%
--- 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 1m25.874s 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.768s amadan.net/oficina/equipo/internal/headless
receipt: slow test 39.13s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 14.85s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 10.43s amadan.net/oficina/equipo/internal/headless TestBrowserChat
receipt: slow test 7.3s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 6.67s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
machine: 32 CPUs, load 89.81, cpu waiting 47.02%, memory waiting 0.00%, io waiting 0.37%
--- 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 1m38.152s 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 1m36.156s amadan.net/oficina/equipo/internal/headless
receipt: slow test 28.88s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 24.24s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 13.31s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 11.24s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
receipt: slow test 9.76s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
machine: 32 CPUs, load 82.65, cpu waiting 45.18%, memory waiting 0.00%, io waiting 0.30%
--- 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 1m55.994s 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 1m54.277s amadan.net/oficina/equipo/internal/headless
receipt: slow test 14.94s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 13.46s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 12.62s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 11.35s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
receipt: slow test 11.31s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsSignInEmail
machine: 32 CPUs, load 63.66, cpu waiting 34.97%, memory waiting 0.00%, io waiting 0.22%
--- 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|TestBrowserCardAnswerSettlesAtBottom|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInEmail|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' ./internal/headless
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserCopyContinue
=== RUN   TestBrowserCopyContinue
time=2026-11-28T23:36:39.710Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-28T23:36:39.710Z level=INFO msg="startup phase done" phase=state_lock took=60µs
time=2026-11-28T23:36:39.710Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-28T23:36:39.711Z level=INFO msg="startup phase done" phase=claim_roots took=114µs
time=2026-11-28T23:36:39.711Z level=INFO msg="startup phase" phase=sweep
time=2026-11-28T23:36:39.761Z level=INFO msg="startup phase done" phase=sweep took=50.439ms
time=2026-11-28T23:36:39.761Z level=INFO msg="startup phase" phase=credentials
time=2026-11-28T23:36:39.761Z level=INFO msg="startup phase done" phase=credentials took=126µs
time=2026-11-28T23:36:39.761Z level=INFO msg="startup phase" phase=open_state
time=2026-11-28T23:36:39.814Z level=INFO msg="startup phase done" phase=open_state took=52.967ms
time=2026-11-28T23:36:39.816Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-28T23:36:39.817Z level=INFO msg=connecting host=127.0.0.1:46875 protocol=36
time=2026-11-28T23:36:39.819Z level=INFO msg=connected host=127.0.0.1:46875 took=2.062ms
time=2026-11-28T23:36:39.819Z level=INFO msg="capabilities gathering"
time=2026-11-28T23:36:39.827Z level=INFO msg="capabilities gathered" took=7.41ms tags=linux,claude,go
time=2026-11-28T23:36:39.830Z level=INFO msg="hello sent" protocol=36
time=2026-11-28T23:36:39.833Z level=INFO msg=welcome protocol=36 role=primary generation=1
    browser_copy_test.go:90: waiting for !document.querySelector('[data-copy-continue]'): context deadline exceeded (last evaluation: <nil>)
--- FAIL: TestBrowserCopyContinue (6.36s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m43.939s
FAIL	amadan.net/oficina/equipo/internal/headless	104.187s


receipt: test step 1m45.982s 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 1m43.939s amadan.net/oficina/equipo/internal/headless
receipt: slow test 14.97s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
receipt: slow test 13.99s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 11.39s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 9.61s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 7.39s amadan.net/oficina/equipo/internal/headless TestBrowserNotebookLook
rastrillo: budget test: go test failed
exit status 1
+ go test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAskAfterMerge|TestBrowserCardAnswerSettlesAtBottom|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInEmail|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' -v -run '^TestBrowserCopyContinue$' -count=1 ./internal/headless   (retry, once)
##############################################################################
FLAKE ./internal/headless:TestBrowserCopyContinue browser-headless-rest 5edac79fc83b31ba40717136fe420098173d476b 6.36s 73.70
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 73.70, cpu waiting 38.53%, memory waiting 0.00%, io waiting 0.25%
--- 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|TestBrowserPreviewPassExchange)$' ./internal/equipo

receipt: test step 4.414s 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.599s amadan.net/oficina/equipo/internal/equipo
receipt: slow test 1.89s amadan.net/oficina/equipo/internal/equipo TestBrowserPreviewPassExchange
receipt: slow test 710ms amadan.net/oficina/equipo/internal/equipo TestBrowserPreviewBlocksNavigation
browser lane browser-rest: ./internal/equipotest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserGitHubManifestCSP)$' ./internal/equipotest

receipt: test step 8.03s 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 6.426s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 6.43s amadan.net/oficina/equipo/internal/equipotest TestBrowserGitHubManifestCSP
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 11.174s, over the 10s the default allows; reported only, timing fails on CI

receipt: test step 12.878s 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 11.174s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 9.05s amadan.net/oficina/equipo/internal/idtest TestBrowserSmartDoor
receipt: slow test 2.12s 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 4.031s 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.393s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 2.39s 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|TestBrowserPausedWork|TestBrowserPhoneIndex|TestBrowserPlacementQuestionAndPending|TestBrowserProjectPlacement|TestBrowserProjectsList|TestBrowserReportActionFeedback|TestBrowserReportNextSteps|TestBrowserReportThread|TestBrowserRhythm|TestBrowserRollup|TestBrowserRosterAlignment|TestBrowserRosterDecisionStates|TestBrowserRosterQuietDay|TestBrowserRosterReports|TestBrowserRosterSetAside|TestBrowserRosterSubchat|TestBrowserRosterThinking|TestBrowserRosterVisual|TestBrowserSettingsHousekeepingGroups|TestBrowserSettingsMenu|TestBrowserSettingsRail|TestBrowserSettingsSaveBar|TestBrowserSettingsShots|TestBrowserSettingsStayOnPage|TestBrowserSettingsTeams|TestBrowserShipsButtons|TestBrowserSpecialistRows|TestBrowserSpendFollowsAnswers|TestBrowserTaskRows|TestBrowserTeamPanel|TestBrowserThinkingCycles|TestBrowserThinkingLinesClear|TestBrowserThinkingSteady|TestBrowserThinkingWords|TestBrowserTokenRowEmail|TestBrowserTrackPulse|TestBrowserTrackStarCentre|TestBrowserTryAgain)$' ./internal/thintest

receipt: test step 3m39.921s 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 3m37.331s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 26.6s amadan.net/oficina/equipo/internal/thintest TestBrowserAccessRequest
receipt: slow test 14.41s amadan.net/oficina/equipo/internal/thintest TestBrowserSettingsTeams
receipt: slow test 12.04s amadan.net/oficina/equipo/internal/thintest TestBrowserThinkingCycles
receipt: slow test 10.62s amadan.net/oficina/equipo/internal/thintest TestBrowserPlacementQuestionAndPending
receipt: slow test 9.09s amadan.net/oficina/equipo/internal/thintest TestBrowserRhythm
machine: 32 CPUs, load 9.12, cpu waiting 3.87%, memory waiting 0.00%, io waiting 0.01%
--- 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   (52s)
ok ./internal/headless TestHeadlessConnections/A5_cancel_and_sign_out 4.74s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.20s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 7.94s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 8.36s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 26.80s
+ 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   (68s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 16.07s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 11.64s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 19.38s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 18.39s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless   (21s)
ok ./internal/headless TestMixedVersions 18.00s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks   (2s)
ok ./internal/runner/checks TestCheckSandboxDeniedPathsTampering 0.83s
+ go test -tags testbuild -timeout 15m -v -run '^TestRunnerCancelAndSupersede$' ./internal/runner/thin   (2s)
ok ./internal/runner/thin TestRunnerCancelAndSupersede 0.06s
quarantine: 0 flaked (passed on the retry), 0 failed
machine: 32 CPUs, load 83.33, cpu waiting 44.97%, memory waiting 0.00%, io waiting 0.51%
--- 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 13.223s against a 60s target (the gate's other steps are not in this figure)
receipt: 4 packages ran, 0 cached, 4 without tests, 0 failed
receipt: slow package 7.448s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 248ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 77ms 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/claude/realcli
receipt: slow test 5.24s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.79s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 320ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 250ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 80ms 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 4.126s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 3.109s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 290ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 200ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof
receipt: slow test 130ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryMalformedRecord
receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryReusedPID
machine: 32 CPUs, load 28.51, cpu waiting 10.44%, memory waiting 0.00%, io waiting 1.22%
--- 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 38.3%, load 30.77
shard 25: make runner-dead-references lanes-check build vet fmt-check spacing budget migration-check
python3 scripts/runner-dead-references.py
reference scan: 3073 text files, 3282 matches, 0 failures
python3 native/scripts/check-share.py
Share packaging, keychain-only boundary and reviewed copy verified
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 tool fiesta spacing -skip tokens.css internal/equipo/static
go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget size
budget size: 97 directories within budget
CGO_ENABLED=0 go test ./internal/equipo -run '^TestMigrationModels$' -count=1
ok  	amadan.net/oficina/equipo/internal/equipo	2.670s
machine: 32 CPUs, load 91.62, cpu waiting 46.95%, memory waiting 0.00%, io waiting 0.40%
--- 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.7%, load 30.77
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 68.54, cpu waiting 37.62%, memory waiting 0.00%, io waiting 0.62%
--- 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.7%, load 30.77
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 1 vulnerability in packages you import and 10
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 60.23, cpu waiting 34.49%, memory waiting 0.00%, io waiting 0.67%
--- 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 38.3%, load 30.77
shard 28: make gitleaks
11:36PM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
11:36PM INF 1300 commits scanned.
11:36PM INF scanned ~69329372 bytes (69.33 MB) in 26.2s
11:36PM INF no leaks found
machine: 32 CPUs, load 60.23, cpu waiting 35.91%, memory waiting 0.00%, io waiting 0.64%

amadan: job failed at step check shard 6 of 29 — its output is above, not at the tail of this log
diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt
index a75ab5e8..8cb8a169 100644
--- a/.rastrillo/budgets.txt
+++ b/.rastrillo/budgets.txt
@@ -38,7 +38,7 @@ time internal/runner/provider 15s Plan 3 CI repair measured 10.346s for the full
perf GET /releases/* skip Verified runner release file downloads, not browser GET screens.
perf GET /install.sh skip Mac runners: the one-line bootstrap a terminal pipes to sh, not a browser screen.
time internal/runner/containment 15s Plan 3 loaded CI measured 10.817s;
-size internal/runner/thin 30501 25342 Protocol 31 facts, 35 diffs, merge credential, publication guards, kept work, CI units, 34 places publish, GitHub token scans, waiting cards, 36 lookups; measured 30501/25342.
+size internal/runner/thin 30515 25362 Protocol 31 facts, 35 diffs, merge credential, publication guards, kept work, CI units, 34 places publish, GitHub token scans, waiting cards, 36 lookups; measured 30515/25362.
time internal/thintest 240s Thin contract and page tests, the Assistant's and the models' included, share one harness. Measured 202s on a shared 16 CPU box (2026-11-13); CI runs two lanes.
time internal/runner/mac 30s Mac runners (Darwin worker): real process groups killed after a grace and proven gone (SIGTERM, SIGKILL, the marker sweep), and the probes run end to end with fake srt and xcodebuild, P6 killing.
time internal/runner/thin 45s Thin v1 slice 4 review: real git repositories for the merge and squash checks, a stalled fetch, and a 16 MiB candidate streamed through the review diff and the checks pack (about 5s).
@@ -57,7 +57,7 @@ perf GET /api/v1/assistant/snapshot skip Assistant person API: bearer-only JSON
perf GET /api/v1/assistant/messages skip Assistant person API: bearer-only JSON for Base's chat, not a browser screen.
perf GET /api/v1/assistant/events skip Assistant event stream (Server-Sent Events), bearer-only and long-lived; not a screen.
perf GET /api/v1/assistant/abilities skip Assistant person API: bearer-only JSON for Base's Settings line, not a browser screen.
-size internal/equipo/chat 41116 14365 File facts/diffs, previews, merge authority, unfinished work, CI feedback, receipts, Assistant files, places, waiting cards, abilities, lookups; measured 41116/14365.
+size internal/equipo/chat 41200 14459 File facts/diffs, previews, merge authority, unfinished work, CI feedback, receipts, Assistant files, places, waiting cards, abilities, lookups; measured 41200/14459.
perf GET /api/v1/questions/{id} skip Thin v1 person API: bearer-only JSON for devices; the browser reads questions on /tasks/{id}.
perf GET /api/v1/steps/{id}/log skip Thin v1 person API: bearer-only JSON for devices; the browser shows the log tail on /tasks/{id}.
perf GET /api/v1/connections/preference skip Connections slice 1 person API: bearer-only JSON for devices; the browser shows the preference on /conversation/connections.
diff --git a/internal/equipo/chat/abilities_harness_test.go b/internal/equipo/chat/abilities_harness_test.go
index aa1c00f8..206b6fc3 100644
--- a/internal/equipo/chat/abilities_harness_test.go
+++ b/internal/equipo/chat/abilities_harness_test.go
@@ -122,6 +122,8 @@ type abilitiesHarness struct {
mu sync.Mutex
at time.Time
audits []string
+ // failAudit, when set, is an audit kind whose writing fails.
+ failAudit string
}
const abPerson = "member@example.com"
@@ -157,6 +159,9 @@ func newAbilitiesHarness(t *testing.T, hosts ...string) *abilitiesHarness {
CurrentPerson: func(context.Context, *gorm.DB) error { return nil },
PrimaryRunner: func(*gorm.DB, string) (string, error) { return "RUNNER1", nil },
Audit: func(_ *gorm.DB, actor, kind, record string) error {
+ if kind == h.failAudit {
+ return errors.New("audit failed")
+ }
h.mu.Lock()
h.audits = append(h.audits, kind+" "+actor+" "+record)
h.mu.Unlock()
diff --git a/internal/equipo/chat/instance_inventory.go b/internal/equipo/chat/instance_inventory.go
index d0a65c6d..892023b1 100644
--- a/internal/equipo/chat/instance_inventory.go
+++ b/internal/equipo/chat/instance_inventory.go
@@ -72,6 +72,9 @@ type inventorySnap struct {
type instanceNet struct {
listed atomic.Pointer[[]netip.Prefix]
snap atomic.Pointer[inventorySnap]
+ // scanned: this process's latest scan succeeded and committed. Until
+ // then, and after one fails, the inventory isn't ready.
+ scanned atomic.Bool
}
// ParseInstancePrefixes reads EQUIPO_INSTANCE_PREFIXES: comma-separated
@@ -118,7 +121,7 @@ type instanceInventory struct{ s *Store }
// address the latest scan saw is inside a confirmed one.
func (i instanceInventory) Ready(ctx context.Context) error {
listed := i.s.listedPrefixes()
- if len(listed) == 0 {
+ if len(listed) == 0 || !i.s.instance.scanned.Load() {
return guard.ErrInventoryUnconfirmed
}
var ready bool
@@ -207,6 +210,7 @@ func (s *Store) ScanInstanceAddresses(ctx context.Context) error {
}
raw, err := list()
if err != nil {
+ s.instance.scanned.Store(false)
return err
}
var seen []netip.Addr
@@ -225,7 +229,8 @@ func (s *Store) ScanInstanceAddresses(ctx context.Context) error {
}
slices.SortFunc(seen, func(a, b netip.Addr) int { return a.Compare(b) })
listed := s.listedPrefixes()
- return s.tx(ctx, func(t *txn) error {
+ var snap *inventorySnap
+ err = s.tx(ctx, func(t *txn) error {
now := t.now()
if err := t.db.Where("1 = 1").Delete(&instanceAddressRecord{}).Error; err != nil {
return err
@@ -239,7 +244,7 @@ func (s *Store) ScanInstanceAddresses(ctx context.Context) error {
if err != nil {
return err
}
- s.instance.snap.Store(&inventorySnap{prefixes: confirmed, addrs: seen})
+ snap = &inventorySnap{prefixes: confirmed, addrs: seen}
if len(listed) == 0 {
return nil
}
@@ -249,6 +254,15 @@ func (s *Store) ScanInstanceAddresses(ctx context.Context) error {
}
return t.askInventory(listed, seen)
})
+ // Published only once committed; a scan that failed leaves the
+ // inventory not ready until one succeeds.
+ if err != nil {
+ s.instance.scanned.Store(false)
+ return err
+ }
+ s.instance.snap.Store(snap)
+ s.instance.scanned.Store(true)
+ return nil
}
// askInventory asks every owner to confirm the listed prefixes and the
diff --git a/internal/equipo/chat/instance_inventory_test.go b/internal/equipo/chat/instance_inventory_test.go
index 77ac6b1e..2079f074 100644
--- a/internal/equipo/chat/instance_inventory_test.go
+++ b/internal/equipo/chat/instance_inventory_test.go
@@ -147,3 +147,32 @@ func TestInventoryInside(t *testing.T) {
t.Error("a bad prefix was taken")
}
}
+
+// Confirmed rows alone aren't enough: until this process has scanned, or
+// after a scan fails, the inventory isn't ready (Astra phase 3 round 1,
+// P1).
+func TestInventoryNeedsItsOwnScan(t *testing.T) {
+ h := newAbilitiesHarness(t)
+ ctx := context.Background()
+ if err := h.s.SetInstancePrefixes("203.0.113.0/24"); err != nil {
+ t.Fatal(err)
+ }
+ if err := h.s.db.G.Create(&instancePrefixRecord{Prefix: "203.0.113.0/24", ConfirmedBy: "owner@example.com"}).Error; err != nil {
+ t.Fatal(err)
+ }
+ if err := h.s.InstanceInventory().Ready(ctx); !errors.Is(err, guard.ErrInventoryUnconfirmed) {
+ t.Errorf("ready before any scan: %v", err)
+ }
+ scanning(h, "203.0.113.5")
+ scan(t, h)
+ if err := h.s.InstanceInventory().Ready(ctx); err != nil {
+ t.Fatalf("not ready after a scan: %v", err)
+ }
+ h.s.ifaceAddrs = func() ([]net.Addr, error) { return nil, errors.New("no interfaces") }
+ if err := h.s.ScanInstanceAddresses(ctx); err == nil {
+ t.Fatal("the failing scan succeeded")
+ }
+ if err := h.s.InstanceInventory().Ready(ctx); !errors.Is(err, guard.ErrInventoryUnconfirmed) {
+ t.Errorf("ready after a failed scan: %v", err)
+ }
+}
diff --git a/internal/equipo/chat/lookup.go b/internal/equipo/chat/lookup.go
index 964bc1f0..d403367e 100644
--- a/internal/equipo/chat/lookup.go
+++ b/internal/equipo/chat/lookup.go
@@ -8,6 +8,7 @@ import (
"errors"
"net/http"
"net/url"
+ "regexp"
"slices"
"strconv"
"strings"
@@ -151,13 +152,19 @@ func (s *Store) webLookup(ctx context.Context, call toolCallRecord) (json.RawMes
if errors.As(err, &refusal) {
// The gate refused (web turned off meanwhile): nothing more was
// sent. The refusal is the Assistant's answer.
- run.finish(context.WithoutCancel(ctx), "", nil, refusal.Code)
+ if err := run.finish(context.WithoutCancel(ctx), "", nil, refusal.Code); err != nil {
+ return nil, err
+ }
return nil, refusal
}
if err != nil {
code = wire.CodeLookupFailed
}
- run.finish(context.WithoutCancel(ctx), answer, sources, code)
+ // Shown only once stored: a lookup whose outcome didn't commit is an
+ // error, not an answer the reply would lack.
+ if err := run.finish(context.WithoutCancel(ctx), answer, sources, code); err != nil {
+ return nil, err
+ }
return lookupResult(run.row)
}
@@ -193,13 +200,10 @@ func (r *lookupRun) do(ctx context.Context, pack wire.LookupPack) (answer string
r.deny = append(slices.Clone(r.cfg.Deny), deny...)
var results []wire.SearchResult
var candidates []string
- if typed := websource.Mentions(pack.Question); len(typed) > 0 {
- for i, u := range typed {
- if i == lookupReads {
- break
- }
- candidates = append(candidates, u.String())
- }
+ if typed := typedAddresses(pack.Question); len(typed) > 0 {
+ // The addresses the person typed, as typed: read, or refused by
+ // rule (recorded), never a search instead.
+ candidates = typed
} else {
q, err := r.s.lookupStep(ctx, r.call.Person, wire.LookupStep{Lookup: r.row.ID, Attempt: int(r.row.Attempt), Stage: wire.LookupStageQuery, Pack: pack})
if err != nil || q.Code != "" || wire.ValidQueryResult(q) != nil {
@@ -257,7 +261,7 @@ func (r *lookupRun) do(ctx context.Context, pack wire.LookupPack) (answer string
if len(pages) == 0 && len(results) == 0 {
return "", nil, wire.CodeNothingFound, nil
}
- step, truncated := fitAnswerStep(wire.LookupStep{Lookup: r.row.ID, Attempt: int(r.row.Attempt), Stage: wire.LookupStageAnswer, Pack: pack, Results: results, Pages: pages})
+ step, truncated := fitAnswerStep(wire.LookupStep{Person: r.call.Person, Lookup: r.row.ID, Attempt: int(r.row.Attempt), Stage: wire.LookupStageAnswer, Pack: pack, Results: results, Pages: pages, Truncated: true})
step.Truncated = truncated
a, err := r.s.lookupStep(ctx, r.call.Person, step)
if err != nil || a.Code != "" || wire.ValidAnswerResult(a, len(results)) != nil {
@@ -266,6 +270,39 @@ func (r *lookupRun) do(ctx context.Context, pack wire.LookupPack) (answer string
return a.Answer, lookupSources(pages, results, a.Used), wire.CodeLookupShown, nil
}
+// explicitAddr finds the addresses a person typed with a scheme, a port
+// or an IP address: kept as typed, so the guarded client refuses what it
+// must (scheme, port, IP literal, length) rather than the lookup reading
+// something else.
+var explicitAddr = regexp.MustCompile(`(?i)\b[a-z][a-z0-9+.-]{1,15}://[^\s<>"']+|\b(?:[a-z0-9-]+\.)+[a-z][a-z0-9-]*:\d{1,5}(?:/[^\s<>"']*)?|\b\d{1,3}(?:\.\d{1,3}){3}(?::\d{1,5})?(?:/[^\s<>"']*)?`)
+
+// typedAddresses are the addresses in the person's message, at most 3,
+// in order: those typed with a scheme, a port or an IP address as typed
+// (https assumed when none), then the bare domains websource.Mentions
+// finds on other hosts.
+func typedAddresses(text string) []string {
+ var out []string
+ hosts := map[string]bool{}
+ for _, m := range explicitAddr.FindAllString(text, -1) {
+ m = strings.TrimRight(m, ".,;:!?)]}'\"")
+ raw := m
+ if !strings.Contains(m, "://") {
+ raw = "https://" + m
+ }
+ if u, err := url.Parse(raw); err == nil {
+ hosts[strings.ToLower(u.Hostname())] = true
+ }
+ out = append(out, raw)
+ }
+ for _, u := range websource.Mentions(text) {
+ if !hosts[strings.ToLower(u.Host)] {
+ hosts[strings.ToLower(u.Host)] = true
+ out = append(out, u.String())
+ }
+ }
+ return out[:min(len(out), lookupReads)]
+}
+
// searchCtx carries the final check for each search request: the pace
// for the actual host, then the gate, right before it is sent.
func (r *lookupRun) searchCtx(ctx context.Context) context.Context {
@@ -339,20 +376,29 @@ func (r *lookupRun) read(ctx context.Context, raw string) (*wire.LookupPage, err
// until the whole fits. truncated says it was cut.
func fitAnswerStep(s wire.LookupStep) (wire.LookupStep, bool) {
truncated := false
+ // Sized as sent: with the nonce the live channel adds (room kept).
+ limit := wire.MaxLookupStepBytes - lookupNonceRoom
size := func() int { raw, _ := json.Marshal(s); return len(raw) }
- for i := len(s.Pages) - 1; i >= 0 && size() > wire.MaxLookupStepBytes; i-- {
- over := size() - wire.MaxLookupStepBytes
+ for i := len(s.Pages) - 1; i >= 0 && size() > limit; i-- {
+ over := size() - limit
text := s.Pages[i].Text
s.Pages[i].Text = cutRunes(text, len(text)-over-64)
truncated = true
}
- for size() > wire.MaxLookupStepBytes && len(s.Results) > 1 {
+ for size() > limit && len(s.Results) > 0 {
s.Results = s.Results[:len(s.Results)-1]
truncated = true
}
+ for size() > limit && len(s.Pages) > 0 {
+ s.Pages = s.Pages[:len(s.Pages)-1]
+ truncated = true
+ }
return s, truncated
}
+// lookupNonceRoom is the room kept for the nonce the live channel adds.
+const lookupNonceRoom = 128
+
// lookupSources are the pages read, or else the results the answer used:
// https only, at most 5.
func lookupSources(pages []wire.LookupPage, results []wire.SearchResult, used []int) []wire.LookupSource {
@@ -378,7 +424,7 @@ func lookupSources(pages []wire.LookupPage, results []wire.SearchResult, used []
// finish stores the lookup's outcome and audits it: the person, the
// numbers of queries and reads, the hosts' registrable domains, the code.
// Never a query, a path or the answer.
-func (r *lookupRun) finish(ctx context.Context, answer string, sources []wire.LookupSource, code string) {
+func (r *lookupRun) finish(ctx context.Context, answer string, sources []wire.LookupSource, code string) error {
queries, _ := json.Marshal(r.queries)
reads, _ := json.Marshal(r.reads)
src, _ := json.Marshal(sources)
@@ -402,7 +448,9 @@ func (r *lookupRun) finish(ctx context.Context, answer string, sources []wire.Lo
if l := r.s.logger.Load(); l != nil {
l.Warn("lookup not stored", "call", r.call.CallID, "err", err)
}
+ r.row.State = lookupFailed
}
+ return err
}
// lookupDeny is the person's own hosts no lookup may reach: the
diff --git a/internal/equipo/chat/lookup_live.go b/internal/equipo/chat/lookup_live.go
index aa719c78..09bbd04c 100644
--- a/internal/equipo/chat/lookup_live.go
+++ b/internal/equipo/chat/lookup_live.go
@@ -47,9 +47,10 @@ func lookupKey(lookup string, attempt int, nonce, stage string) string {
}
// attachLive makes runner's connection, at protocol, the one its lookup
-// steps go to, until detach: then every step waiting on it fails.
-func (s *Store) attachLive(runner string, protocol int, send func(context.Context, wire.Frame) error) (detach func()) {
- c := &liveConn{runner: runner, protocol: protocol, send: send, done: make(chan struct{})}
+// steps go to, until detach: then every step waiting on it fails. c is
+// the connection's handle, which its answers come back with.
+func (s *Store) attachLive(runner string, protocol int, send func(context.Context, wire.Frame) error) (c *liveConn, detach func()) {
+ c = &liveConn{runner: runner, protocol: protocol, send: send, done: make(chan struct{})}
l := &s.live
l.mu.Lock()
if l.conns == nil {
@@ -60,7 +61,7 @@ func (s *Store) attachLive(runner string, protocol int, send func(context.Contex
}
l.conns[runner] = c
l.mu.Unlock()
- return func() {
+ return c, func() {
l.mu.Lock()
defer l.mu.Unlock()
if l.conns[runner] == c {
@@ -70,16 +71,16 @@ func (s *Store) attachLive(runner string, protocol int, send func(context.Contex
}
}
-// deliverLookup hands a lookup_result from runner to the step waiting on
-// it, when there is one on that same connection; anything else (stale,
-// from another connection, unasked) is dropped.
-func (s *Store) deliverLookup(runner string, r wire.LookupResult) {
+// deliverLookup hands a lookup_result that came on connection c to the
+// step waiting on it there; anything else (stale, from another
+// connection, unasked) is dropped.
+func (s *Store) deliverLookup(c *liveConn, r wire.LookupResult) {
l := &s.live
l.mu.Lock()
defer l.mu.Unlock()
key := lookupKey(r.Lookup, r.Attempt, r.Nonce, r.Stage)
w := l.waiters[key]
- if w == nil || w.conn != l.conns[runner] || w.conn == nil {
+ if w == nil || c == nil || w.conn != c {
return
}
delete(l.waiters, key)
@@ -125,6 +126,10 @@ func (s *Store) lookupStep(ctx context.Context, person string, step wire.LookupS
if err != nil {
return failed, err
}
+ // The runner's frame budget, checked as sent.
+ if len(f.Data) > wire.MaxLookupStepBytes {
+ return failed, nil
+ }
wctx, cancel := context.WithTimeout(ctx, lookupStepWait)
defer cancel()
if err := c.send(wctx, f); err != nil {
diff --git a/internal/equipo/chat/lookup_pack.go b/internal/equipo/chat/lookup_pack.go
index 34fd2847..afa9bad2 100644
--- a/internal/equipo/chat/lookup_pack.go
+++ b/internal/equipo/chat/lookup_pack.go
@@ -27,8 +27,22 @@ func (t *txn) lookupPack(person string, turn turnRecord, now time.Time) (wire.Lo
return pack, false, err
}
pack.Question = mine.Text
- loc := t.zone(person)
- pack.City, pack.Date = zoneCity(loc.String()), now.In(loc).Format("2006-01-02, Monday")
+ // The person's own zone, read for the pack: with none known (or one
+ // that can't be read) no city is made up, and the date is UTC's.
+ var z zoneRecord
+ if err := t.db.Where("person = ?", person).Limit(1).Find(&z).Error; err != nil {
+ return pack, false, err
+ }
+ loc, known := time.UTC, false
+ if z.Zone != "" {
+ if l, ok := LoadZone(z.Zone); ok {
+ loc, known = l, true
+ }
+ }
+ pack.Date = now.In(loc).Format("2006-01-02, Monday")
+ if known {
+ pack.City = zoneCity(z.Zone)
+ }
if isFollowUp(mine.Text) {
since := now.Add(-lookupWindow)
var reset []time.Time
diff --git a/internal/equipo/chat/lookup_pack_test.go b/internal/equipo/chat/lookup_pack_test.go
index 37fb5c36..f299bffb 100644
--- a/internal/equipo/chat/lookup_pack_test.go
+++ b/internal/equipo/chat/lookup_pack_test.go
@@ -175,7 +175,7 @@ func TestLookupStepEphemeral(t *testing.T) {
h.s.SetLogger(slog.New(slog.NewTextHandler(&logs, nil)))
const sentinel = "SENTINEL-PAGE-TEXT-77"
sent := make(chan wire.LookupStep, 4)
- detach := h.s.attachLive("RUNNER1", wire.ProtocolLookup, func(_ context.Context, f wire.Frame) error {
+ live, detach := h.s.attachLive("RUNNER1", wire.ProtocolLookup, func(_ context.Context, f wire.Frame) error {
body, err := f.Decode()
if err == nil && f.Type == wire.FrameLookupStep && !f.Durable() {
sent <- *body.(*wire.LookupStep)
@@ -194,9 +194,9 @@ func TestLookupStepEphemeral(t *testing.T) {
}
// A stale answer (another nonce), and one from another runner, are
// dropped; the right one is taken.
- h.s.deliverLookup("RUNNER1", wire.LookupResult{Lookup: "lk1", Attempt: 1, Nonce: "old", Stage: wire.LookupStageAnswer, Answer: "stale"})
- h.s.deliverLookup("RUNNER2", wire.LookupResult{Lookup: "lk1", Attempt: 1, Nonce: got.Nonce, Stage: wire.LookupStageAnswer, Answer: "elsewhere"})
- h.s.deliverLookup("RUNNER1", wire.LookupResult{Lookup: "lk1", Attempt: 1, Nonce: got.Nonce, Stage: wire.LookupStageAnswer, Answer: "Rain."})
+ h.s.deliverLookup(live, wire.LookupResult{Lookup: "lk1", Attempt: 1, Nonce: "old", Stage: wire.LookupStageAnswer, Answer: "stale"})
+ h.s.deliverLookup(&liveConn{runner: "RUNNER1"}, wire.LookupResult{Lookup: "lk1", Attempt: 1, Nonce: got.Nonce, Stage: wire.LookupStageAnswer, Answer: "elsewhere"})
+ h.s.deliverLookup(live, wire.LookupResult{Lookup: "lk1", Attempt: 1, Nonce: got.Nonce, Stage: wire.LookupStageAnswer, Answer: "Rain."})
if r := <-done; r.Answer != "Rain." || r.Code != "" {
t.Errorf("result %+v", r)
}
@@ -224,7 +224,8 @@ func TestLookupStepEphemeral(t *testing.T) {
if r, _ := h.s.lookupStep(context.Background(), abPerson, step); r.Code != wire.CodeLookupFailed {
t.Errorf("no connection: %+v", r)
}
- defer h.s.attachLive("RUNNER1", wire.Protocol35, func(context.Context, wire.Frame) error { t.Error("sent below 36"); return nil })()
+ _, old := h.s.attachLive("RUNNER1", wire.Protocol35, func(context.Context, wire.Frame) error { t.Error("sent below 36"); return nil })
+ defer old()
if r, _ := h.s.lookupStep(context.Background(), abPerson, step); r.Code != wire.CodeLookupFailed {
t.Errorf("below 36: %+v", r)
}
@@ -232,3 +233,16 @@ func TestLookupStepEphemeral(t *testing.T) {
t.Error("a log line holds the page")
}
}
+
+// With no zone known, no city is made up and the date is UTC's (Astra
+// phase 3 round 1, P2).
+func TestPackNoZoneNoCity(t *testing.T) {
+ r := newPackRig(t)
+ if err := r.h.s.db.G.Where("person = ?", abPerson).Delete(&zoneRecord{}).Error; err != nil {
+ t.Fatal(err)
+ }
+ r.now = time.Date(2026, 11, 28, 23, 59, 59, 0, time.UTC)
+ if p := r.pack(r.say("Weather?", 0, "")); p.City != "" || p.Date != "2026-11-28, Saturday" {
+ t.Errorf("pack %+v", p)
+ }
+}
diff --git a/internal/equipo/chat/lookup_test.go b/internal/equipo/chat/lookup_test.go
index d844e49c..0d004446 100644
--- a/internal/equipo/chat/lookup_test.go
+++ b/internal/equipo/chat/lookup_test.go
@@ -143,7 +143,8 @@ func newLookupRig(t *testing.T) *lookupRig {
}
h.s.SetLookups(&LookupConfig{Search: websearch.Chain{Primary: r.search, Usage: r.usage}, Pages: pages, Inventory: g.Inventory, Deny: []string{"equipo.example.org"}})
h.s.SetOperations(assist.NewRegistry(r.apps, h.s.WebProvider()))
- r.detach = h.s.attachLive("RUNNER1", wire.ProtocolLookup, func(_ context.Context, f wire.Frame) error {
+ var live *liveConn
+ live, r.detach = h.s.attachLive("RUNNER1", wire.ProtocolLookup, func(_ context.Context, f wire.Frame) error {
body, err := f.Decode()
if err != nil {
return err
@@ -161,7 +162,7 @@ func newLookupRig(t *testing.T) *lookupRig {
}
}
r.mu.Unlock()
- h.s.deliverLookup("RUNNER1", res)
+ h.s.deliverLookup(live, res)
return nil
})
return r
@@ -406,6 +407,12 @@ func TestAnswerStepBudget(t *testing.T) {
raw, _ := json.Marshal(out)
if !cut || len(raw) > wire.MaxLookupStepBytes || out.Pages[0].Text != big || len(out.Pages[3].Text) >= len(big) {
t.Errorf("%d bytes, cut %v", len(raw), cut)
+ } // One result too big on its own still fits (Astra phase 3 round 1, P2).
+ huge := wire.LookupStep{Person: abPerson, Stage: wire.LookupStageAnswer, Results: []wire.SearchResult{{Title: strings.Repeat("x", 60<<10)}}, Pages: []wire.LookupPage{{Text: big}}}
+ out, cut = fitAnswerStep(huge)
+ raw, _ = json.Marshal(out)
+ if !cut || len(raw) > wire.MaxLookupStepBytes-lookupNonceRoom {
+ t.Errorf("one result: %d bytes", len(raw))
}
}
@@ -487,7 +494,8 @@ func TestLookupUnsupported(t *testing.T) {
t.Fatal("not listed when it can run")
}
r.detach()
- defer r.h.s.attachLive("RUNNER1", wire.Protocol35, func(context.Context, wire.Frame) error { return nil })()
+ _, old := r.h.s.attachLive("RUNNER1", wire.Protocol35, func(context.Context, wire.Frame) error { return nil })
+ defer old()
if listed(r) {
t.Error("listed on protocol 35")
}
@@ -514,3 +522,41 @@ func TestLookupUnsupported(t *testing.T) {
func TestLookupExemptFromOutboundRule(t *testing.T) {
t.Skip("MCP Task 27 (the outbound rule) has not landed")
}
+
+// An outcome that doesn't commit (its audit failing) is an error, never
+// a shown answer the reply would lack (Astra phase 3 round 1, P1).
+func TestLookupNotShownUnlessStored(t *testing.T) {
+ r := newLookupRig(t)
+ r.search.Results["dublin weather"] = []websearch.Result{{Title: "Met", URL: "https://www.met.ie/dublin"}}
+ r.h.failAudit = auditLookup
+ call := r.ask("Weather?", wire.TurnPerson)
+ if out, err := r.lookup(call, `{}`); err == nil || strings.Contains(string(out), wire.CodeLookupShown) {
+ t.Errorf("%s %v", out, err)
+ }
+ if row := r.row(call); row.State == lookupShown {
+ t.Errorf("stored shown: %+v", row)
+ }
+}
+
+// Addresses that aren't pages get an honest code, never a search and
+// never a request: another scheme, an IP address (http tried as https),
+// a port, an address over 2 KiB (Astra phase 3 round 1, P2).
+func TestTypedAddressesNotPages(t *testing.T) {
+ for _, words := range []string{"What's on ftp://files.example.org/x", "Open http://192.168.1.1/admin", "Read news.example.org:8080/today", "Read https://news.example.org/" + strings.Repeat("a", 2100)} {
+ r := newLookupRig(t)
+ r.search.Results["dublin weather"] = []websearch.Result{{Title: "Met", URL: "https://www.met.ie/dublin"}}
+ call := r.ask(words, wire.TurnPerson)
+ if _, err := r.lookup(call, `{}`); codeOf(err) != wire.CodeNothingFound {
+ t.Errorf("%.60q: %v", words, err)
+ }
+ if r.search.Asked() != 0 || len(r.web.requests()) != 0 {
+ t.Errorf("%.60q: searched %d, read %v", words, r.search.Asked(), r.web.requests())
+ }
+ if row := r.row(call); !strings.Contains(row.Reads, `"code"`) {
+ t.Errorf("%.60q: no refusal recorded: %s", words, row.Reads)
+ }
+ }
+ if got := typedAddresses("See example.org:8080/x and www.met.ie please."); len(got) != 2 || got[0] != "https://example.org:8080/x" || got[1] != "https://www.met.ie/" {
+ t.Errorf("typed %v", got)
+ }
+}
diff --git a/internal/equipo/chat/stream.go b/internal/equipo/chat/stream.go
index 31ce1ec7..122ca820 100644
--- a/internal/equipo/chat/stream.go
+++ b/internal/equipo/chat/stream.go
@@ -58,6 +58,8 @@ type runnerConn struct {
observed string
lease Lease
seen chan struct{}
+ // live is this connection's lookup channel (attachLive).
+ live *liveConn
}
func (rc *runnerConn) log(msg string, err error) {
@@ -136,7 +138,8 @@ func (rc *runnerConn) serve() {
return
}
// Lookup steps go to this connection, live, until it ends.
- detach := store.attachLive(rc.principal.RunnerID, rc.lease.Protocol, rc.send)
+ live, detach := store.attachLive(rc.principal.RunnerID, rc.lease.Protocol, rc.send)
+ rc.live = live
defer detach()
rc.seen = make(chan struct{}, 1)
closeCode := make(chan websocket.StatusCode, 1)
@@ -184,7 +187,7 @@ func (rc *runnerConn) read(ctx context.Context) websocket.StatusCode {
err = store.Heartbeat(ctx, rc.lease, *v)
case *wire.LookupResult:
// Live only: handed to the step waiting on it, never stored.
- store.deliverLookup(rc.principal.RunnerID, *v)
+ store.deliverLookup(rc.live, *v)
case *wire.ChangeDiffUpload, *wire.AccessReport, *wire.Sync, *wire.Ack, *wire.DeltaReport, *wire.Reply, *wire.TurnReport, *wire.ToolCall, *wire.ActivityReport, *wire.MoveIn, *wire.NotebookReport, *wire.StepReport, *wire.MergedReport, *wire.AnswerReport, *wire.BranchReport, *wire.ConnectionReport, *wire.UsageReport, *wire.StepActivityReport, *wire.Blob, *wire.PublishedReport, *wire.ResearchFile, *wire.GlanceReport:
err = store.Apply(ctx, rc.lease, f, body)
case *wire.LeaseCheck:
diff --git a/internal/runner/thin/link.go b/internal/runner/thin/link.go
index 8c789568..ebc5156d 100644
--- a/internal/runner/thin/link.go
+++ b/internal/runner/thin/link.go
@@ -115,7 +115,7 @@ type Link struct {
notify chan struct{}
pending []wire.DeltaReport
glances []wire.GlanceReport
- lookups []wire.LookupResult
+ lookups []queuedLookup
activity []wire.ActivityReport
stepActs []wire.StepActivityReport
waiters map[string]chan string
@@ -411,23 +411,37 @@ func (l *Link) Glance(g wire.GlanceReport) {
l.Notify()
}
-// LookupResult queues a lookup step's result, live: sent once on the
-// current connection, never stored, dropped while disconnected (the
-// instance fails the attempt then, and never resends).
-func (l *Link) LookupResult(r wire.LookupResult) {
+// queuedLookup is a lookup step's result and the connection its step
+// came on: it goes on that connection or nowhere.
+type queuedLookup struct {
+ conn *websocket.Conn
+ r wire.LookupResult
+}
+
+// lookupResult queues a lookup step's result, live, for the connection
+// c its step came on: sent once on it, never stored, dropped when it has
+// ended (the instance fails the attempt then, and never resends).
+func (l *Link) lookupResult(c *websocket.Conn, r wire.LookupResult) {
l.init()
l.mu.Lock()
- if l.conn != nil {
- l.lookups = append(l.lookups, r)
+ if l.conn == c {
+ l.lookups = append(l.lookups, queuedLookup{c, r})
}
l.mu.Unlock()
l.Notify()
}
-func (l *Link) takeLookups() []wire.LookupResult {
+// takeLookups takes the results queued for c; any for another
+// connection are dropped.
+func (l *Link) takeLookups(c *websocket.Conn) []wire.LookupResult {
l.mu.Lock()
defer l.mu.Unlock()
- out := l.lookups
+ var out []wire.LookupResult
+ for _, q := range l.lookups {
+ if q.conn == c {
+ out = append(out, q.r)
+ }
+ }
l.lookups = nil
return out
}
@@ -709,7 +723,7 @@ func (l *Link) serve(ctx context.Context, c *websocket.Conn, welcome *wire.Welco
l.mu.Unlock()
defer func() {
l.mu.Lock()
- l.conn = nil
+ l.conn, l.lookups = nil, nil
l.mu.Unlock()
}()
if err := l.State.SaveGeneration(ctx, welcome.Generation); err != nil {
@@ -1053,7 +1067,7 @@ func (l *Link) read(ctx context.Context, c *websocket.Conn) (time.Duration, erro
continue
}
step := *v
- go func() { l.LookupResult(l.Engine.Lookup(ctx, step)) }()
+ go func() { l.lookupResult(c, l.Engine.Lookup(ctx, step)) }()
case *wire.Drain:
return time.Duration(max(v.RetryAfter, 1)) * time.Second, nil
default:
@@ -1104,7 +1118,7 @@ func (l *Link) write(ctx context.Context, c *websocket.Conn) error {
return err
}
}
- for _, r := range l.takeLookups() {
+ for _, r := range l.takeLookups(c) {
seq++
f, _ := wire.NewFrame(l.State.prefix+"-l-"+time.Now().UTC().Format("150405.000000")+"-"+itoa(seq), wire.FrameLookupResult, r)
if err := l.send(ctx, c, f); err != nil {
diff --git a/internal/runner/thin/lookup_test.go b/internal/runner/thin/lookup_test.go
index 25ba8a4b..040cd6ef 100644
--- a/internal/runner/thin/lookup_test.go
+++ b/internal/runner/thin/lookup_test.go
@@ -13,6 +13,7 @@ import (
"amadan.net/oficina/equipo/internal/runner"
"amadan.net/oficina/equipo/internal/runner/provider"
"amadan.net/oficina/equipo/internal/wire"
+ "github.com/coder/websocket"
)
// fakeLookup is a lookup harness answering reply (or blocking until its
@@ -125,3 +126,22 @@ func TestLookupStepBadJSON(t *testing.T) {
}
}
}
+
+// A result goes on the connection its step came on, or nowhere (Astra
+// phase 3 round 1, P2).
+func TestLookupResultStaysOnItsConnection(t *testing.T) {
+ l := &Link{}
+ l.init()
+ first, second := &websocket.Conn{}, &websocket.Conn{}
+ l.conn = first
+ l.lookupResult(first, wire.LookupResult{Lookup: "a"})
+ l.conn = second
+ l.lookupResult(first, wire.LookupResult{Lookup: "late"})
+ if got := l.takeLookups(second); len(got) != 0 {
+ t.Errorf("sent on the next connection: %+v", got)
+ }
+ l.lookupResult(second, wire.LookupResult{Lookup: "b"})
+ if got := l.takeLookups(second); len(got) != 1 || got[0].Lookup != "b" {
+ t.Errorf("got %+v", got)
+ }
+}
diff --git a/internal/websearch/backends.go b/internal/websearch/backends.go
index da10a2d3..7d01b653 100644
--- a/internal/websearch/backends.go
+++ b/internal/websearch/backends.go
@@ -52,7 +52,7 @@ func (b *backend) Search(ctx context.Context, q string, n int) ([]Result, error)
if r.Rule == guard.RuleRedirect {
return nil, &Error{Backend: b.name, Class: ClassBadResponse}
}
- return nil, &Error{Backend: b.name, Class: ClassUnavailable}
+ return nil, &Error{Backend: b.name, Class: ClassUnavailable, Unsent: preSend[r.Rule]}
}
results, class := b.parse(res.Status, res.Body)
if class != "" {
@@ -61,6 +61,9 @@ func (b *backend) Search(ctx context.Context, q string, n int) ([]Result, error)
return clean(results, n), nil
}
+// preSend are the guard's rules that refuse before anything is sent.
+var preSend = map[string]bool{guard.RuleScheme: true, guard.RulePort: true, guard.RuleHost: true, guard.RuleIPLiteral: true, guard.RuleDenied: true, guard.RulePrivate: true, guard.RuleInventory: true, guard.RuleUnconfirmed: true, guard.RulePolicy: true, guard.RuleURL: true}
+
// statusClass is a non-200's class: 401 and 403 auth, 402 and 429 limit
// (out of credit, or too many), 5xx unavailable, else bad_response.
func statusClass(status int) string {
diff --git a/internal/websearch/websearch.go b/internal/websearch/websearch.go
index 7e05bba3..602f8716 100644
--- a/internal/websearch/websearch.go
+++ b/internal/websearch/websearch.go
@@ -13,6 +13,7 @@ import (
"log/slog"
"strconv"
"strings"
+ "time"
"unicode/utf8"
"amadan.net/oficina/equipo/internal/websource/guard"
@@ -41,9 +42,11 @@ const (
)
// Error is a backend's failure, by class only: never a URL, a query or a
-// key.
+// key. Unsent says the request never went out (refused before sending),
+// so its reservation is returned.
type Error struct {
Backend, Class string
+ Unsent bool
}
func (e *Error) Error() string { return "websearch: " + e.Backend + ": " + e.Class }
@@ -113,12 +116,18 @@ func (c Chain) Search(ctx context.Context, q string, n int, before Before) (resu
var be *Error
switch {
case err != nil && !errors.As(err, &be):
- // Refused before sending (the final check): nothing went out.
- if rerr := c.Usage.Return(ctx, r); rerr != nil {
+ // Refused before sending (the final check, or the pace ended
+ // by the lookup's end): nothing went out.
+ if rerr := c.refund(ctx, r); rerr != nil {
return nil, "", rerr
}
return nil, "", err
case err != nil:
+ if be.Unsent {
+ if rerr := c.refund(ctx, r); rerr != nil {
+ return nil, "", rerr
+ }
+ }
last = err
continue
case len(got) == 0:
@@ -139,6 +148,13 @@ func (c Chain) Search(ctx context.Context, q string, n int, before Before) (resu
return nil, "", last
}
+// refund returns r on a context of its own: the lookup's may have ended.
+func (c Chain) refund(ctx context.Context, r Reservation) error {
+ cctx, cancel := context.WithTimeout(context.WithoutCancel(ctx), 5*time.Second)
+ defer cancel()
+ return c.Usage.Return(cctx, r)
+}
+
// Config is the operator's search configuration (AD3): the primary and
// fallback backends by name, each backend's key and monthly cap.
type Config struct {
@@ -224,7 +240,7 @@ func clean(in []Result, n int) []Result {
if len(out) == n {
break
}
- if !strings.HasPrefix(r.URL, "https://") || strings.TrimSpace(r.Title) == "" {
+ if !strings.HasPrefix(r.URL, "https://") || len(r.URL) > guard.MaxURL || strings.TrimSpace(r.Title) == "" {
continue
}
out = append(out, Result{Title: cut(strings.TrimSpace(r.Title), MaxTitle), URL: r.URL, Snippet: cut(strings.TrimSpace(r.Snippet), MaxSnippet), Date: cut(strings.TrimSpace(r.Date), 40)})
diff --git a/internal/websearch/websearch_test.go b/internal/websearch/websearch_test.go
index 38bb107d..e183c03a 100644
--- a/internal/websearch/websearch_test.go
+++ b/internal/websearch/websearch_test.go
@@ -520,3 +520,34 @@ func TestMisconfiguredBackendLeftOut(t *testing.T) {
t.Error("no key: usable")
}
}
+
+// A request refused before it was sent (the inventory unconfirmed) uses
+// no quota; one refused at the final check on a lookup that has ended is
+// refunded all the same (Astra phase 3 round 1, P2).
+func TestUnsentSearchesRefunded(t *testing.T) {
+ v := newVendor(t)
+ g := v.guard()
+ g.Inventory = notReady{}
+ s, err := websearch.NewKagi(sentinel, g)
+ if err != nil {
+ t.Fatal(err)
+ }
+ u := &websearchtest.MemUsage{Caps: map[string]int{"kagi": 5}, Month: "2026-11"}
+ if _, _, err := (websearch.Chain{Primary: s, Usage: u}).Search(context.Background(), "q", 8, nil); err == nil {
+ t.Fatal("searched with the inventory unconfirmed")
+ }
+ if u.Used[websearch.Reservation{Backend: "kagi", Month: "2026-11"}] != 0 {
+ t.Errorf("an unsent request used quota: %v", u.Used)
+ }
+ p, _, _ := fakes()
+ ctx, cancel := context.WithCancel(context.Background())
+ p.Hook = func(context.Context, string) error { cancel(); return context.Canceled }
+ if _, _, err := (websearch.Chain{Primary: p, Usage: u}).Search(ctx, "q", 8, nil); err == nil || u.Used[websearch.Reservation{Backend: "kagi", Month: "2026-11"}] != 0 {
+ t.Errorf("%v, used %v", err, u.Used)
+ }
+}
+
+type notReady struct{}
+
+func (notReady) Ready(context.Context) error { return guard.ErrInventoryUnconfirmed }
+func (notReady) Inside(netip.Addr) bool { return false }