oficina / equipo Public

renderer: report ToolHealth.Renderer; status says a bad one needs updating

Task 8 of dynamic specialists slice 1 (half 1a).

What changed:
- render.Health (internal/runner/render/health.go) is the runner's word
  on its page renderer. ok only when the tree verifies against the
  linked pin and this very tree (same directory object, not only the
  same path) has rendered the fixture page (render.CheckFixture, task
  7's) since the process started. Otherwise the state VerifyRenderer
  gives (missing, mismatch, unpinned; anything unexpected is mismatch),
  or missing for a tree that verifies but has not rendered: still being
  checked, or unable to render. A tree replaced while it is verified or
  rendered is a mismatch.
- Start runs the check in the background, so the connect never waits on
  it. Report (the capability probe) returns the last state, missing
  before the first check ends, and starts another check in the
  background; a change of state calls Changed (caps.Stale +
  link.HelloSoon), so the next hello says it.
- Ready(ctx) (tree, health, err) is the call the render path makes
  before each render: it verifies the files again every time and
  returns the tree only when ok. Ended(err) is told how each render
  ended.
- The fixture is rendered once per tree. A failure is not tried again
  (the runner needs updating); one cut short by its context is. A
  fixture or render whose sandbox could not be shown to have ended
  (ErrNotEnded) stops every later render of this process.
- ErrNotEnded's declaration moves from launch_linux.go to render.go so
  the health compiles on every platform. render.Platform (Linux amd64)
  and render.Installed (launch config and scratch beside the runner) are
  shared with verify-installed's verifyRenderer.
- thin: linuxCapabilities takes the Health and fills Tools.Renderer;
  Run makes one only on Linux amd64 (rendererHealth), wires Changed and
  starts it, and gives it to the Engineer for render_page. A Mac or
  Linux arm64 runner has none: the field is omitted.
- status's description (model-facing, mcp.go) now says what
  runner.tools.renderer means and that anything but ok needs the runner
  updated, not another try.
- .rastrillo/budgets.txt: thin 30367/25283, thintest 36980.

Tests:
  CGO_ENABLED=0 go test ./internal/runner/render/ -run TestHealth
  CGO_ENABLED=0 go test ./internal/runner/thin/ -run 'TestToolHealth|TestStatusSaysABadRenderer'
  CGO_ENABLED=0 go test ./internal/thintest/ -run TestContractStatusToolHealth
  CGO_ENABLED=0 go test ./internal/runner/render/ ./cmd/equipo-runner/ ./internal/runner/thin/

RED (stub Health: Report "ok", Ready nothing; rendererHealth nil; the
old status text):
  TestHealthReportsEachState/missing: reported "ok", want "missing"
  (mismatch, unpinned, unexpected likewise); /ok: ready: "" "" <nil>
  TestHealthVerifiedButNotRenderedIsNotOK: reported "ok"
  TestHealthNotEndedNeedsAttention: ready: "" "" <nil> after 0 renders
  TestHealthStartsInTheBackground: reported "ok" before the fixture
  TestHealthRechecksTheFilesBeforeEachRender: ready "" <nil>
  TestHealthIsPerTree: another tree: "" after 0 renders
  TestHealthOnlyOnLinuxAmd64: no renderer reported "ok"
  TestToolHealthReportsTheRenderer: linux/amd64 renderer: <nil>
  TestStatusSaysABadRendererNeedsTheRunnerUpdated: the description
  lacks runner.tools.renderer
TestContractStatusToolHealth's renderer case is a witness: the instance
already passes the field through (it passed before the code).

GREEN: the targeted runs above pass (TestHealth x20); the render, thin
(1162 s on a disk-stalled box) and cmd/equipo-runner packages pass; darwin/arm64 build and vet and the
linux/arm64 build pass; make budget passes.

Mutations (each broken, its test run, restored): 27 caught, 0 survived.
  M1 Platform true everywhere -> TestHealthOnlyOnLinuxAmd64
  M2 verify error ignored, M3 verify state always missing
     -> TestHealthReportsEachState
  M4 no fixture render, M5 fixture error ignored, M6 fixture retried
     on every check -> TestHealthVerifiedButNotRenderedIsNotOK
  M7 ErrNotEnded not sticky -> TestHealthNotEndedNeedsAttention
  M8 identity by path only, M9 tree replaced during the fixture
     -> TestHealthIsPerTree
  M10 tree replaced during verify -> TestHealthTreeReplacedWhileVerified
  M11 Start synchronous, M12 unchecked reads ok, M13 Changed never,
     M14 Changed on every check, M16 Report never rechecks
     -> TestHealthStartsInTheBackground
  M15 Ready uses the cached state
     -> TestHealthRechecksTheFilesBeforeEachRender
  M17 a cancelled fixture counts as tried
     -> TestHealthCancelledRenderIsTriedAgain
  M18 Launch's refusal state lost -> TestHealthLaunchRefusalKeepsItsState
  M19 nil Health reports something -> TestHealthOnlyOnLinuxAmd64
  M20 ErrNotEnded checked after "passed", M21 Ended ignores ErrNotEnded,
     M22 Ended sticks on any error
     -> TestHealthRenderNotEndedNeedsAttention
  T1 capability omits the renderer, T2 renderer on every platform,
     T4 Installed's scratch -> TestToolHealthReportsTheRenderer
  T3 status wording removed
     -> TestStatusSaysABadRendererNeedsTheRunnerUpdated
  T5 Installed's scratch
     -> TestVerifyInstalledHoldsTheRendererBesideTheRunner
  (M10, M13 and M14 first failed to build; rewritten so they compile,
  then caught.)
Not under test: run.go's wiring lines (Changed, Start, the Engineer
field), which no test reaches through thin.Run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 73f59a743c4fa9445d492c93ce13c88a81bbb8e4 parent a3a7f65
13 files changed, +767 −19
  • .rastrillo/budgets.txt +2 −2
  • cmd/equipo-runner/install_renderer.go +4 −6
  • internal/runner/render/health.go +284 −0
  • internal/runner/render/health_test.go +351 −0
  • internal/runner/render/launch_linux.go +0 −6
  • internal/runner/render/render.go +7 −0
  • internal/runner/thin/capabilities.go +25 −1
  • internal/runner/thin/engineer.go +4 −0
  • internal/runner/thin/mcp.go +1 −1
  • internal/runner/thin/research_step_test.go +1 −1
  • internal/runner/thin/run.go +10 −1
  • internal/runner/thin/tool_health_test.go +69 −1
  • internal/thintest/stuck_contract_test.go +9 −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/specialists-slice-1: Type  Size Avail | ext4   96G   84G
ci-box: disk /home/ci/.cache/equipo-ci-box: Type  Size Avail | ext4   96G   84G
ci-box: bwrap: fetched and verified in 0.3s
ci-box: claude: fetched and verified in 2.1s
ci-box: codex: fetched and verified in 3.4s
ci-box: codex-code-mode-host: fetched and verified in 1.3s
ci-box: libwrap: fetched and verified in 0.3s
ci-box: socat: fetched and verified in 0.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.2s
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.7s
ci-box: clone deepened in 4.7s
ci-box: file times set from content: 3344 files, 218 directories
ci-box: ready in 18.0s
=== 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 ./...
  5.6s
+ go list -export -test -tags testbuild -f  ./...
  5.3s
+ go list -export -test -tags browser,testbuild -f  ./internal/equipo ./internal/equipotest ./internal/headless ./internal/idtest ./internal/plan3test ./internal/thintest
  3.6s
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 1m21.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 1m18.604s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m18.6s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 67.03, cpu waiting 40.13%, memory waiting 0.00%, io waiting 0.47%
--- 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
--- FAIL amadan.net/oficina/equipo/internal/headless TestHeadless
=== RUN   TestHeadless
--- FAIL: TestHeadless (78.44s)

--- FAIL amadan.net/oficina/equipo/internal/headless TestHeadless/2b_desk_failure
=== RUN   TestHeadless/2b_desk_failure
time=2026-11-28T20:34:37.382Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-28T20:34:37.382Z level=INFO msg="startup phase done" phase=state_lock took=55µs
time=2026-11-28T20:34:37.382Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-28T20:34:37.382Z level=INFO msg="startup phase done" phase=claim_roots took=81µs
time=2026-11-28T20:34:37.382Z level=INFO msg="startup phase" phase=sweep
time=2026-11-28T20:34:37.417Z level=INFO msg="startup phase done" phase=sweep took=35.075ms
time=2026-11-28T20:34:37.417Z level=INFO msg="startup phase" phase=credentials
time=2026-11-28T20:34:37.418Z level=INFO msg="startup phase done" phase=credentials took=224µs
time=2026-11-28T20:34:37.418Z level=INFO msg="startup phase" phase=open_state
time=2026-11-28T20:34:37.461Z level=INFO msg="startup phase done" phase=open_state took=43.048ms
time=2026-11-28T20:34:37.462Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-28T20:34:37.464Z level=INFO msg=connecting host=127.0.0.1:34515 protocol=35
time=2026-11-28T20:34:37.466Z level=INFO msg=connected host=127.0.0.1:34515 took=987µs
time=2026-11-28T20:34:37.466Z level=INFO msg="capabilities gathering"
time=2026-11-28T20:34:37.466Z level=INFO msg="capabilities gathered" took=410µs tags=linux,claude,go
time=2026-11-28T20:34:37.467Z level=INFO msg="hello sent" protocol=35
time=2026-11-28T20:34:37.471Z level=INFO msg=welcome protocol=35 role=primary generation=1
time=2026-11-28T20:34:38.327Z level=INFO msg="connection checked" connection=claude-1 state=healthy
time=2026-11-28T20:34:40.190Z level=WARN msg="coordinator desk" err=*os.LinkError
    movein_test.go:304: introductions 0, coordinator moving_in
--- FAIL: TestHeadless/2b_desk_failure (3.30s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m18.436s
FAIL	amadan.net/oficina/equipo/internal/headless	78.696s


receipt: test step 1m21.104s 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 1m18.436s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m18.44s amadan.net/oficina/equipo/internal/headless TestHeadless
rastrillo: budget test: go test failed
exit status 1
+ go 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$' -v -run '^TestHeadless$/^2b_desk_failure$' -count=1 ./internal/headless   (retry, once)
##############################################################################
FLAKE ./internal/headless:TestHeadless/2b_desk_failure headless-review 73f59a743c4fa9445d492c93ce13c88a81bbb8e4 3.30s 67.03
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 67.35, cpu waiting 40.13%, memory waiting 0.00%, io waiting 0.44%
--- 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 1m21.005s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m18.249s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m8.45s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 5.28s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 4.52s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 67.03, cpu waiting 40.27%, memory waiting 0.00%, io waiting 0.48%
--- 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 1m19.636s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m16.901s amadan.net/oficina/equipo/internal/headless
receipt: slow test 39.1s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 19.69s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.11s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
receipt: slow test 9s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
machine: 32 CPUs, load 69.12, cpu waiting 40.27%, memory waiting 0.00%, io waiting 0.48%
--- 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 1m37.298s 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 1m34.74s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m4.35s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.53s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 8.49s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 7.37s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 5s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
machine: 32 CPUs, load 62.76, cpu waiting 38.24%, memory waiting 0.00%, io waiting 0.36%
--- 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 3m0.113s 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 2m57.238s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m40.31s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistant
receipt: slow test 20.24s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.27s amadan.net/oficina/equipo/internal/headless TestHeadlessResearchHandoff
receipt: slow test 7.24s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistantAttachments
receipt: slow test 6.82s amadan.net/oficina/equipo/internal/headless TestHeadlessTurnBatching
machine: 32 CPUs, load 22.19, cpu waiting 10.30%, memory waiting 0.00%, io waiting 0.08%
--- shard 6 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane thintest: ./internal/thintest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test([^C]|C[^o]|Co[^n]|Con[^t])|^TestContract(Assistant|Outcome|Team|Handoff|HostAllowlist|HostIsPerPerson|Look|Use[A-Z]|RemoteCall|LanesRunAtOnce|NoMergeQuestionWhenGateMerges|PreviewHeldUntilPublishAnswer|PreviewNotHeldBelow19|PublishNeedsOwnerAnswer)' ./internal/thintest

receipt: test step 2m16.307s 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 2m13.993s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 10.17s amadan.net/oficina/equipo/internal/thintest TestContractTeamJobSettledStates
receipt: slow test 6.76s amadan.net/oficina/equipo/internal/thintest TestExplorePreviewsOff
receipt: slow test 4.07s amadan.net/oficina/equipo/internal/thintest TestContractTeamNudgePersonNeeds
receipt: slow test 3.85s amadan.net/oficina/equipo/internal/thintest TestContractPreviewHeldUntilPublishAnswer
receipt: slow test 2.63s amadan.net/oficina/equipo/internal/thintest TestContractTeamUpdatePersonNeeds
machine: 32 CPUs, load 37.40, cpu waiting 21.27%, memory waiting 0.00%, io waiting 0.18%
--- 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 1m59.724s 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 1m57.388s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 9.59s amadan.net/oficina/equipo/internal/thintest TestContractRetryPreviewUnverifiedMerge
receipt: slow test 9.08s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 4.95s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotOffered
receipt: slow test 4.67s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
receipt: slow test 3.02s amadan.net/oficina/equipo/internal/thintest TestContractPausedJob
machine: 32 CPUs, load 45.80, cpu waiting 27.61%, memory waiting 0.00%, io waiting 0.24%
--- 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 5m13.992s, over the 45s its record on line 44 allows; reported only, timing fails on CI

receipt: test step 5m19.957s 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 5m13.992s amadan.net/oficina/equipo/internal/runner/thin
receipt: slow test 37.02s 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.83s amadan.net/oficina/equipo/internal/runner/thin TestModelsUnhealthyRetriedOnDemand
receipt: slow test 18.49s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeRunsInsideTheAdmission
receipt: slow test 9.96s amadan.net/oficina/equipo/internal/runner/thin TestTimeoutKeepsNothingForAnOlderInstance
machine: 32 CPUs, load 3.54, cpu waiting 0.99%, 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 52.026s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 50.97s amadan.net/oficina/equipo/internal/runner
receipt: slow test 30.94s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.03s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 57.68, cpu waiting 33.73%, memory waiting 0.00%, io waiting 0.78%
--- shard 10 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-plans: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestPlanWorkflowCandidateOrder$|^TestPlanWorkflowFeature$|^TestCoordinatorRecoveryCallRefusalKeepsServing$|^TestCoordinatorRefusalMatrix$' ./internal/runner

receipt: test step 1m1.536s 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.254s amadan.net/oficina/equipo/internal/runner
receipt: slow test 50.2s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 44.88s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.4s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.62s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 67.35, cpu waiting 39.21%, memory waiting 0.00%, io waiting 0.66%
--- 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 36.954s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 35.955s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.13s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.48s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.32s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 3.13s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 1.61s amadan.net/oficina/equipo/internal/runner TestReportPostsRetryExactRequest
machine: 32 CPUs, load 42.29, cpu waiting 21.81%, memory waiting 0.00%, io waiting 1.02%
--- 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 40.7%, load 32.22
test lane equipotest-a: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test[A-D]|^TestQ' ./internal/equipotest
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/equipotest TestDirectDeadReferencesRepository
=== RUN   TestDirectDeadReferencesRepository
    direct_cutover_test.go:221: repository reference inventory: exit status 1
        docs/superpowers/plans/2026-11-28-dynamic-specialists-slice-1.md:109:5: unclassified equipo-runner
        docs/superpowers/plans/CONTROLLER-BRIEF-specialists-slice-1.md:84:25: unclassified Paseo
        docs/superpowers/specs/2026-11-28-dynamic-specialists.md:224:15: unclassified equipo-runner
        internal/runner/render/driver.go:302:3: unclassified Node
        internal/runner/render/driver.go:302:13: unclassified Node
        internal/runner/render/driver.go:302:25: unclassified node
        internal/runner/render/driver.go:307:39: unclassified Node
        internal/runner/render/driver_test.go:89:30: unclassified node
        internal/runner/render/driver_test.go:90:20: unclassified node
        internal/runner/render/driver_test.go:91:20: unclassified node
        internal/runner/render/health_test.go:38:37: unclassified equipo-runner
        internal/runner/render/page.go:351:6: unclassified Node
        internal/runner/render/page.go:351:18: unclassified node
        internal/runner/render/page.go:352:8: unclassified Node
        internal/runner/render/page.go:353:2: unclassified Node
        internal/runner/render/page.go:353:27: unclassified node
        internal/runner/render/page.go:376:9: unclassified Node
        internal/runner/render/page.go:376:26: unclassified node
        internal/runner/render/page.go:379:7: unclassified Node
        internal/runner/render/page.go:383:62: unclassified node
        internal/runner/render/page.go:384:66: unclassified node
        internal/runner/render/page.go:388:24: unclassified node
        internal/runner/render/page.go:390:14: unclassified node
        internal/runner/render/page.go:390:24: unclassified Node
        internal/runner/render/page.go:391:9: unclassified node
        internal/runner/render/page.go:391:23: unclassified Node
        internal/runner/render/page.go:392:3: unclassified node
        internal/runner/render/page.go:392:16: unclassified node
        internal/runner/render/page.go:392:28: unclassified Node
        internal/runner/render/page.go:394:36: unclassified node
        internal/runner/render/page.go:395:20: unclassified node
        internal/runner/render/page.go:396:24: unclassified Node
        internal/runner/render/page.go:396:43: unclassified Node
        internal/runner/render/page.go:397:12: unclassified Node
        internal/runner/render/page.go:401:20: unclassified node
        internal/runner/render/page.go:414:27: unclassified node
        internal/runner/render/page.go:424:8: unclassified node
        internal/runner/render/page.go:448:24: unclassified Node
        internal/runner/render/page_test.go:197:77: unclassified Node
        internal/runner/render/page_test.go:198:9: unclassified Node
        internal/runner/render/page_test.go:198:14: unclassified Node
        internal/runner/render/page_test.go:208:41: unclassified node
        internal/runner/render/page_test.go:211:2: unclassified node
        internal/runner/render/page_test.go:211:15: unclassified Node
        internal/runner/render/page_test.go:221:23: unclassified node
        internal/runner/render/page_test.go:227:13: unclassified Node
        internal/runner/render/page_test.go:245:11: unclassified node
        internal/runner/render/page_test.go:246:14: unclassified Node
        internal/runner/render/report.go:151:44: unclassified node
        reference scan: 3056 text files, 3317 matches, 49 failures
--- FAIL: TestDirectDeadReferencesRepository (2.33s)

--- FAIL amadan.net/oficina/equipo/internal/equipotest (package output)
FAIL
rastrillo-budget/v1 ran 1m7.74s
FAIL	amadan.net/oficina/equipo/internal/equipotest	68.056s


receipt: test step 1m9.805s 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 1m7.74s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 28.96s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 28.85s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 26.78s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 23.83s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelDuplicates
receipt: slow test 23.81s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
exit status 1
+ go test -tags testbuild -timeout 15m -run '^Test[A-D]|^TestQ' -v -run '^TestDirectDeadReferencesRepository$' -count=1 ./internal/equipotest   (retry, once)
FAILED TWICE ./internal/equipotest:TestDirectDeadReferencesRepository equipotest-a
=== RUN   TestDirectDeadReferencesRepository
    direct_cutover_test.go:221: repository reference inventory: exit status 1
        docs/superpowers/plans/2026-11-28-dynamic-specialists-slice-1.md:109:5: unclassified equipo-runner
        docs/superpowers/plans/CONTROLLER-BRIEF-specialists-slice-1.md:84:25: unclassified Paseo
        docs/superpowers/specs/2026-11-28-dynamic-specialists.md:224:15: unclassified equipo-runner
        internal/runner/render/driver.go:302:3: unclassified Node
        internal/runner/render/driver.go:302:13: unclassified Node
        internal/runner/render/driver.go:302:25: unclassified node
        internal/runner/render/driver.go:307:39: unclassified Node
        internal/runner/render/driver_test.go:89:30: unclassified node
        internal/runner/render/driver_test.go:90:20: unclassified node
        internal/runner/render/driver_test.go:91:20: unclassified node
        internal/runner/render/health_test.go:38:37: unclassified equipo-runner
        internal/runner/render/page.go:351:6: unclassified Node
        internal/runner/render/page.go:351:18: unclassified node
        internal/runner/render/page.go:352:8: unclassified Node
        internal/runner/render/page.go:353:2: unclassified Node
        internal/runner/render/page.go:353:27: unclassified node
        internal/runner/render/page.go:376:9: unclassified Node
        internal/runner/render/page.go:376:26: unclassified node
        internal/runner/render/page.go:379:7: unclassified Node
        internal/runner/render/page.go:383:62: unclassified node
        internal/runner/render/page.go:384:66: unclassified node
        internal/runner/render/page.go:388:24: unclassified node
        internal/runner/render/page.go:390:14: unclassified node
        internal/runner/render/page.go:390:24: unclassified Node
        internal/runner/render/page.go:391:9: unclassified node
        internal/runner/render/page.go:391:23: unclassified Node
        internal/runner/render/page.go:392:3: unclassified node
        internal/runner/render/page.go:392:16: unclassified node
        internal/runner/render/page.go:392:28: unclassified Node
        internal/runner/render/page.go:394:36: unclassified node
        internal/runner/render/page.go:395:20: unclassified node
        internal/runner/render/page.go:396:24: unclassified Node
        internal/runner/render/page.go:396:43: unclassified Node
        internal/runner/render/page.go:397:12: unclassified Node
        internal/runner/render/page.go:401:20: unclassified node
        internal/runner/render/page.go:414:27: unclassified node
        internal/runner/render/page.go:424:8: unclassified node
        internal/runner/render/page.go:448:24: unclassified Node
        internal/runner/render/page_test.go:197:77: unclassified Node
        internal/runner/render/page_test.go:198:9: unclassified Node
        internal/runner/render/page_test.go:198:14: unclassified Node
        internal/runner/render/page_test.go:208:41: unclassified node
        internal/runner/render/page_test.go:211:2: unclassified node
        internal/runner/render/page_test.go:211:15: unclassified Node
        internal/runner/render/page_test.go:221:23: unclassified node
        internal/runner/render/page_test.go:227:13: unclassified Node
        internal/runner/render/page_test.go:245:11: unclassified node
        internal/runner/render/page_test.go:246:14: unclassified Node
        internal/runner/render/report.go:151:44: unclassified node
        reference scan: 3056 text files, 3317 matches, 49 failures
--- FAIL: TestDirectDeadReferencesRepository (2.31s)
FAIL
rastrillo-budget/v1 ran 2.308s
FAIL	amadan.net/oficina/equipo/internal/equipotest	2.474s
FAIL
machine: 32 CPUs, load 59.17, cpu waiting 35.08%, memory waiting 0.00%, io waiting 0.32%
make: *** [Makefile:113: ci-shard] Error 1

amadan: step check shard 12 of 29 failed: exit status 2
--- shard 13 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-e started 30s late; cpu waiting 40.7%, load 24.23
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.809s 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.531s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 21.37s amadan.net/oficina/equipo/internal/equipotest TestProjectWritesRequireCurrentOwner
receipt: slow test 21.36s amadan.net/oficina/equipo/internal/equipotest TestProjectsFailuresRollBack
receipt: slow test 21.34s amadan.net/oficina/equipo/internal/equipotest TestProjectConcurrentRetry
receipt: slow test 21.34s amadan.net/oficina/equipo/internal/equipotest TestProjectsReopen
receipt: slow test 21.3s amadan.net/oficina/equipo/internal/equipotest TestProjectRequestActorAndUpdate
machine: 32 CPUs, load 27.38, cpu waiting 13.44%, memory waiting 0.00%, io waiting 0.11%
--- 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 40.7%, load 24.23
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
budget note: internal/equipotest took 5m34.097s, over the 5m0s its record on line 15 allows; reported only, timing fails on CI

receipt: test step 5m40.02s 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 5m34.097s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 4m41.48s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 13.59s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 10.58s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 10.54s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 7.48s amadan.net/oficina/equipo/internal/equipotest TestRosterBootstrapOnce
machine: 32 CPUs, load 2.11, cpu waiting 0.43%, memory waiting 0.00%, io waiting 0.00%
--- 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 40.7%, load 24.23
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 1m9.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 1m7.782s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 25.93s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 25.92s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 25.45s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 24.03s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsUpgrade
receipt: slow test 23.78s amadan.net/oficina/equipo/internal/equipotest TestSigninCSRF
machine: 32 CPUs, load 62.76, cpu waiting 37.21%, memory waiting 0.00%, io waiting 0.34%
--- shard 16 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: plan3test started 30s late; cpu waiting 40.7%, load 24.23
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 56.592s 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 54.027s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 3.91s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 3.49s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 1.72s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.58s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3A
receipt: slow test 1.37s amadan.net/oficina/equipo/internal/plan3test TestInviteMigration
machine: 32 CPUs, load 67.35, cpu waiting 40.13%, memory waiting 0.00%, io waiting 0.44%
--- 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 40.7%, load 24.23
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/release/renderertest ./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/render ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/forgekey ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/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/release/renderertest ./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/render ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/forgekey ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
cache miss: amadan.net/oficina/equipo/internal/copydesk: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/claude/realcli: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/forge: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/webread: 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
cache miss: amadan.net/oficina/equipo/internal/testci: its inputs changed
--- FAIL amadan.net/oficina/equipo/internal/runner/webread TestTimeouts
=== RUN   TestTimeouts
    fetch_test.go:537: s1: {Source:s1 Origin:paul Parent: URL:https://shop.example.com/slow-body Hops:[{URL:https://shop.example.com/slow-body Address:151.101.1.1 Status:200}] Address:151.101.1.1 Status:200 Type:text/plain Bytes:5 SHA256:2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 Millis:302 Reason: File:s001.txt}
--- FAIL: TestTimeouts (0.61s)

--- FAIL amadan.net/oficina/equipo/internal/runner/webread (package output)
FAIL
rastrillo-budget/v1 ran 2.254s
FAIL	amadan.net/oficina/equipo/internal/runner/webread	2.281s

--- FAIL amadan.net/oficina/equipo/internal/testci TestBudgetRecordsAreShort
=== RUN   TestBudgetRecordsAreShort
    budgets_file_test.go:37: .rastrillo/budgets.txt:41: reason is 214 bytes, over 200
    budgets_file_test.go:37: .rastrillo/budgets.txt:74: reason is 232 bytes, over 200
--- FAIL: TestBudgetRecordsAreShort (0.00s)

--- FAIL amadan.net/oficina/equipo/internal/testci (package output)
FAIL
rastrillo-budget/v1 ran 1.991s
FAIL	amadan.net/oficina/equipo/internal/testci	1.998s

budget note: internal/equipo took 2m24.307s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/equipo/chat took 25.17s, 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 10.341s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/idtest took 1m53.373s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/release took 42.584s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/runner/containment took 1m1.764s, over the 15s its record on line 40 allows; reported only, timing fails on CI
budget note: internal/runner/forge took 25.297s, over the 20s its record on line 35 allows; reported only, timing fails on CI
budget note: internal/runner/provider/claude/realcli took 15.218s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/runner/provider/pi took 1m23.756s, over the 1m0s its record on line 27 allows; reported only, timing fails on CI
budget note: internal/runner/render took 1m29.766s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/runner/workspace took 10.19s, over the 10s the default allows; reported only, timing fails on CI

receipt: test step 2m29.483s against a 60s target (the gate's other steps are not in this figure)
receipt: 29 packages ran, 39 cached, 17 without tests, 2 failed
receipt: slow package 2m24.307s amadan.net/oficina/equipo/internal/equipo
receipt: slow package 1m53.373s amadan.net/oficina/equipo/internal/idtest
receipt: slow package 1m29.766s amadan.net/oficina/equipo/internal/runner/render
receipt: slow package 1m23.756s amadan.net/oficina/equipo/internal/runner/provider/pi
receipt: slow package 1m12.417s amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow test 54.52s amadan.net/oficina/equipo/internal/idtest TestDoorRemembersOficinaID
receipt: slow test 50.31s amadan.net/oficina/equipo/internal/runner/render TestLaunchNeverClaimsAnUnprovenEnd
receipt: slow test 46.3s amadan.net/oficina/equipo/internal/idtest TestDoorStepUpIsLocal
receipt: slow test 44.93s amadan.net/oficina/equipo/internal/idtest TestDoorNeverJudgesANativeSession
receipt: slow test 43.54s amadan.net/oficina/equipo/internal/idtest TestDoorForgetsOficinaIDForARefusedSession
rastrillo: budget test: go test failed
exit status 1
+ go test -tags testbuild -timeout 15m -v -run '^TestTimeouts$' -count=1 ./internal/runner/webread   (retry, once)
##############################################################################
FLAKE ./internal/runner/webread:TestTimeouts rest 73f59a743c4fa9445d492c93ce13c88a81bbb8e4 0.61s 20.73
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
+ go test -tags testbuild -timeout 15m -v -run '^TestBudgetRecordsAreShort$' -count=1 ./internal/testci   (retry, once)
FAILED TWICE ./internal/testci:TestBudgetRecordsAreShort rest
=== RUN   TestBudgetRecordsAreShort
    budgets_file_test.go:37: .rastrillo/budgets.txt:41: reason is 214 bytes, over 200
    budgets_file_test.go:37: .rastrillo/budgets.txt:74: reason is 232 bytes, over 200
--- FAIL: TestBudgetRecordsAreShort (0.00s)
FAIL
rastrillo-budget/v1 ran 0s
FAIL	amadan.net/oficina/equipo/internal/testci	0.004s
FAIL
machine: 32 CPUs, load 20.73, cpu waiting 9.96%, memory waiting 0.00%, io waiting 0.08%
make: *** [Makefile:113: ci-shard] Error 1

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

receipt: test step 1m26.64s 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 1m24.757s amadan.net/oficina/equipo/internal/headless
receipt: slow test 39.14s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 14.83s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 10.72s amadan.net/oficina/equipo/internal/headless TestBrowserChat
receipt: slow test 7.34s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 6.59s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
machine: 32 CPUs, load 67.35, cpu waiting 40.03%, memory waiting 0.00%, io waiting 0.42%
--- 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 1m33.737s 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 1m31.707s amadan.net/oficina/equipo/internal/headless
receipt: slow test 28.81s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 21.62s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 13.44s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 9.72s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
receipt: slow test 9.43s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
machine: 32 CPUs, load 62.76, cpu waiting 38.92%, memory waiting 0.00%, io waiting 0.37%
--- 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 1m54.983s 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 1m52.878s amadan.net/oficina/equipo/internal/headless
receipt: slow test 14.42s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 13.29s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 13.29s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 11.38s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
receipt: slow test 11.3s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsSignInEmail
machine: 32 CPUs, load 49.00, cpu waiting 29.38%, memory waiting 0.00%, io waiting 0.26%
--- 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
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserCopyContinue
=== RUN   TestBrowserCopyContinue
time=2026-11-28T20:35:01.711Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-28T20:35:01.711Z level=INFO msg="startup phase done" phase=state_lock took=273µs
time=2026-11-28T20:35:01.711Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-28T20:35:01.711Z level=INFO msg="startup phase done" phase=claim_roots took=116µs
time=2026-11-28T20:35:01.711Z level=INFO msg="startup phase" phase=sweep
time=2026-11-28T20:35:01.758Z level=INFO msg="startup phase done" phase=sweep took=46.52ms
time=2026-11-28T20:35:01.759Z level=INFO msg="startup phase" phase=credentials
time=2026-11-28T20:35:01.760Z level=INFO msg="startup phase done" phase=credentials took=217µs
time=2026-11-28T20:35:01.760Z level=INFO msg="startup phase" phase=open_state
time=2026-11-28T20:35:01.819Z level=INFO msg="startup phase done" phase=open_state took=58.829ms
time=2026-11-28T20:35:01.820Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-28T20:35:01.821Z level=INFO msg=connecting host=127.0.0.1:35159 protocol=35
time=2026-11-28T20:35:01.823Z level=INFO msg=connected host=127.0.0.1:35159 took=975µs
time=2026-11-28T20:35:01.823Z level=INFO msg="capabilities gathering"
time=2026-11-28T20:35:01.824Z level=INFO msg="capabilities gathered" took=423µs tags=linux,claude,go
time=2026-11-28T20:35:01.828Z level=INFO msg="hello sent" protocol=35
time=2026-11-28T20:35:01.830Z level=INFO msg=welcome protocol=35 role=primary generation=1
    browser_copy_test.go:90: waiting for !document.querySelector('[data-copy-continue]'): context deadline exceeded (last evaluation: context deadline exceeded)
--- FAIL: TestBrowserCopyContinue (6.36s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m40.653s
FAIL	amadan.net/oficina/equipo/internal/headless	100.877s


receipt: test step 1m42.908s 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 1m40.653s amadan.net/oficina/equipo/internal/headless
receipt: slow test 15.13s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
receipt: slow test 12.77s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 10.71s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 9.49s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 7.58s amadan.net/oficina/equipo/internal/headless TestBrowserRefreshRace
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 73f59a743c4fa9445d492c93ce13c88a81bbb8e4 6.36s 59.17
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 55.15, cpu waiting 33.01%, memory waiting 0.00%, io waiting 0.30%
--- 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.422s 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.538s amadan.net/oficina/equipo/internal/equipo
receipt: slow test 1.89s amadan.net/oficina/equipo/internal/equipo TestBrowserPreviewPassExchange
receipt: slow test 650ms 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 7.897s 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.24s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 6.24s 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.431s, over the 10s the default allows; reported only, timing fails on CI

receipt: test step 12.971s 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.431s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 9.11s amadan.net/oficina/equipo/internal/idtest TestBrowserSmartDoor
receipt: slow test 2.33s 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.275s 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.552s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 2.55s 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 3m35.712s 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 3m33.008s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 25.58s amadan.net/oficina/equipo/internal/thintest TestBrowserAccessRequest
receipt: slow test 14.43s amadan.net/oficina/equipo/internal/thintest TestBrowserSettingsTeams
receipt: slow test 12.03s amadan.net/oficina/equipo/internal/thintest TestBrowserThinkingCycles
receipt: slow test 10.69s amadan.net/oficina/equipo/internal/thintest TestBrowserPlacementQuestionAndPending
receipt: slow test 9.06s amadan.net/oficina/equipo/internal/thintest TestBrowserRhythm
machine: 32 CPUs, load 8.37, cpu waiting 3.32%, memory waiting 0.00%, io waiting 0.02%
--- 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   (54s)
ok ./internal/headless TestHeadlessConnections/A5_cancel_and_sign_out 4.67s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.24s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 9.71s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 9.18s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 26.39s
+ 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   (65s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 23.82s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 12.15s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 10.60s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 15.38s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless   (22s)
ok ./internal/headless TestMixedVersions 18.95s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks   (3s)
ok ./internal/runner/checks TestCheckSandboxDeniedPathsTampering 0.82s
+ go test -tags testbuild -timeout 15m -v -run '^TestRunnerCancelAndSupersede$' ./internal/runner/thin   (2s)
ok ./internal/runner/thin TestRunnerCancelAndSupersede 0.05s
quarantine: 0 flaked (passed on the retry), 0 failed
machine: 32 CPUs, load 67.40, cpu waiting 40.31%, memory waiting 0.00%, io waiting 0.61%
--- 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 14.14s 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.957s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 247ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 104ms amadan.net/oficina/equipo/internal/runner/provider/codex
receipt: slow package 7ms amadan.net/oficina/equipo/internal/runner/provider
receipt: slow package 1ms amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow test 5.61s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.84s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 370ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 240ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxToolchain
CGO_ENABLED=0 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run '^TestNamespace' -count=1 ./internal/runner/containment
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run '^TestNamespace' -count=1 ./internal/runner/containment

receipt: test step 4.335s 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.297s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 320ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 220ms 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 TestNamespaceReapsOrphans
receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryCleansScratch
machine: 32 CPUs, load 19.13, cpu waiting 11.14%, memory waiting 0.00%, io waiting 1.38%
--- shard 25 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: runner-dead-references started 30s late; cpu waiting 40.7%, load 24.23
shard 25: make runner-dead-references lanes-check build vet fmt-check spacing budget migration-check
python3 scripts/runner-dead-references.py
docs/superpowers/plans/2026-11-28-dynamic-specialists-slice-1.md:109:5: unclassified equipo-runner
docs/superpowers/plans/CONTROLLER-BRIEF-specialists-slice-1.md:84:25: unclassified Paseo
docs/superpowers/specs/2026-11-28-dynamic-specialists.md:224:15: unclassified equipo-runner
internal/runner/render/driver.go:302:3: unclassified Node
internal/runner/render/driver.go:302:13: unclassified Node
internal/runner/render/driver.go:302:25: unclassified node
internal/runner/render/driver.go:307:39: unclassified Node
internal/runner/render/driver_test.go:89:30: unclassified node
internal/runner/render/driver_test.go:90:20: unclassified node
internal/runner/render/driver_test.go:91:20: unclassified node
internal/runner/render/health_test.go:38:37: unclassified equipo-runner
internal/runner/render/page.go:351:6: unclassified Node
internal/runner/render/page.go:351:18: unclassified node
internal/runner/render/page.go:352:8: unclassified Node
internal/runner/render/page.go:353:2: unclassified Node
internal/runner/render/page.go:353:27: unclassified node
internal/runner/render/page.go:376:9: unclassified Node
internal/runner/render/page.go:376:26: unclassified node
internal/runner/render/page.go:379:7: unclassified Node
internal/runner/render/page.go:383:62: unclassified node
internal/runner/render/page.go:384:66: unclassified node
internal/runner/render/page.go:388:24: unclassified node
internal/runner/render/page.go:390:14: unclassified node
internal/runner/render/page.go:390:24: unclassified Node
internal/runner/render/page.go:391:9: unclassified node
internal/runner/render/page.go:391:23: unclassified Node
internal/runner/render/page.go:392:3: unclassified node
internal/runner/render/page.go:392:16: unclassified node
internal/runner/render/page.go:392:28: unclassified Node
internal/runner/render/page.go:394:36: unclassified node
internal/runner/render/page.go:395:20: unclassified node
internal/runner/render/page.go:396:24: unclassified Node
internal/runner/render/page.go:396:43: unclassified Node
internal/runner/render/page.go:397:12: unclassified Node
internal/runner/render/page.go:401:20: unclassified node
internal/runner/render/page.go:414:27: unclassified node
internal/runner/render/page.go:424:8: unclassified node
internal/runner/render/page.go:448:24: unclassified Node
internal/runner/render/page_test.go:197:77: unclassified Node
internal/runner/render/page_test.go:198:9: unclassified Node
internal/runner/render/page_test.go:198:14: unclassified Node
internal/runner/render/page_test.go:208:41: unclassified node
internal/runner/render/page_test.go:211:2: unclassified node
internal/runner/render/page_test.go:211:15: unclassified Node
internal/runner/render/page_test.go:221:23: unclassified node
internal/runner/render/page_test.go:227:13: unclassified Node
internal/runner/render/page_test.go:245:11: unclassified node
internal/runner/render/page_test.go:246:14: unclassified Node
internal/runner/render/report.go:151:44: unclassified node
reference scan: 3056 text files, 3317 matches, 49 failures
make[1]: *** [Makefile:238: runner-dead-references] Error 1
machine: 32 CPUs, load 32.22, cpu waiting 18.31%, memory waiting 0.00%, io waiting 1.09%
make: *** [Makefile:113: ci-shard] Error 2

amadan: step check shard 25 of 29 failed: exit status 2
--- shard 26 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: staticcheck started 30s late; cpu waiting 40.7%, load 32.22
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 57.68, cpu waiting 35.31%, memory waiting 0.00%, io waiting 0.75%
--- 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 40.7%, load 24.23
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 57.68, cpu waiting 35.31%, memory waiting 0.00%, io waiting 0.75%
--- 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 40.7%, load 24.23
shard 28: make gitleaks
8:34PM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
8:35PM INF 1278 commits scanned.
8:35PM INF scanned ~69293931 bytes (69.29 MB) in 24.8s
8:35PM INF no leaks found
machine: 32 CPUs, load 57.68, cpu waiting 35.31%, memory waiting 0.00%, io waiting 0.75%

amadan: job failed at step check shards 12, 17, 25 of 29 — its output is above, not at the tail of this log
diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt
index e200a2ff..d70843cb 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 30330 25215 Protocol 31 facts, 35 diffs, merge credential, publication guards, kept work, CI units, 34 places publish, GitHub token scans, waiting cards in the Assistant opening; measured 30330/25215.
+size internal/runner/thin 30367 25283 Protocol 31 facts, 35 diffs, merge credential, publication guards, kept work, CI units, 34 places publish, GitHub token scans, waiting cards in the Assistant opening, the page renderer health; measured 30367/25283.
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).
@@ -71,7 +71,7 @@ perf GET /tasks/{id}/files/{file} skip Research kept images: the bytes of one im
perf GET /api/v1/runners skip Mac runners person API: bearer-only JSON for devices; the browser shows runners in the Team section.
time cmd/equipo-runner 60s TestReleaseRunnerHasNoFakeWorker builds the release runner and the thin package under testbuild (about 12s locally).
size internal/headless - 11873 Grant scenarios (#48); sign-in email at 1280 and 390; Assistant files end to end; the restart wait; the live site waits for a place; a card answer settles at the bottom; measured 11873 test lines.
-size internal/thintest - 36971 Protocol 31 contracts, 35 diffs, stuck tasks, no-access merges, held retries, unfinished work, free rounds, previews, Assistant files, places and where their cards land; measured 36971 test lines.
+size internal/thintest - 36980 Protocol 31 contracts, 35 diffs, stuck tasks (the renderer health in status too), no-access merges, held retries, unfinished work, free rounds, previews, Assistant files, places and where their cards land; measured 36980 test lines.
perf GET /api/v1/projects/{id}/merge-policy skip Merge authority person API: bearer-only JSON for devices; the browser reads the policy on /projects/{id}.
perf GET /api/v1/usage skip Thin v1 person API: bearer-only JSON for devices; the browser reads usage through /usage.
diff --git a/cmd/equipo-runner/install_renderer.go b/cmd/equipo-runner/install_renderer.go
index 78d033d1..622ab757 100644
--- a/cmd/equipo-runner/install_renderer.go
+++ b/cmd/equipo-runner/install_renderer.go
@@ -25,7 +25,7 @@ var fixtureRender = render.CheckFixture
// rendererPlatform is where a runner has the page renderer: Linux amd64.
// A Mac runner and a Linux arm64 one neither install nor check one.
-func rendererPlatform(goos, goarch string) bool { return goos == "linux" && goarch == "amd64" }
+func rendererPlatform(goos, goarch string) bool { return render.Platform(goos, goarch) }
// verifyRenderer is verify-installed's renderer check, on Linux amd64
// only: the tree beside the runner's executable
@@ -37,13 +37,11 @@ func verifyRenderer(cfg runner.Config, goos, goarch string) error {
if !rendererPlatform(goos, goarch) {
return nil
}
- pin := rendererPin()
- dir := filepath.Dir(cfg.Executable)
- tree := release.RendererTree(dir, pin)
- if err := release.VerifyRenderer(tree, pin); err != nil {
+ launch, scratch := render.Installed(cfg.Bwrap(), cfg.Executable, rendererPin())
+ if err := release.VerifyRenderer(launch.Tree, launch.Pin); err != nil {
return err
}
- return fixtureRender(context.Background(), render.LaunchConfig{Bwrap: cfg.Bwrap(), Binary: cfg.Executable, Tree: tree, Pin: pin}, filepath.Join(dir, "renderer"))
+ return fixtureRender(context.Background(), launch, scratch)
}
// installRendererCommand is `equipo-runner install-renderer <archive>`:
diff --git a/internal/runner/render/health.go b/internal/runner/render/health.go
new file mode 100644
index 00000000..88fadcfb
--- /dev/null
+++ b/internal/runner/render/health.go
@@ -0,0 +1,284 @@
+package render
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "log/slog"
+ "os"
+ "path/filepath"
+ "sync"
+
+ "amadan.net/oficina/equipo/internal/release"
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// Platform reports whether a runner on goos/goarch has the page
+// renderer: Linux amd64 only. A Mac runner and a Linux arm64 one neither
+// install, check nor report one.
+func Platform(goos, goarch string) bool { return goos == "linux" && goarch == "amd64" }
+
+// Installed is the launch configuration of the renderer installed beside
+// the runner's executable, for pin: the tree release.RendererTree(<its
+// directory>, pin), bubblewrap bwrap and the runner itself as the
+// sandbox's first process; and the scratch directory a fixture render
+// uses, <its directory>/renderer, which the installer made private.
+func Installed(bwrap, executable, pin string) (LaunchConfig, string) {
+ dir := filepath.Dir(executable)
+ return LaunchConfig{Bwrap: bwrap, Binary: executable, Tree: release.RendererTree(dir, pin), Pin: pin}, filepath.Join(dir, "renderer")
+}
+
+// ErrNotChecked is a tree that verifies but has not rendered the fixture
+// page since this runner started: the check is still running, or the
+// render failed. Such a tree is not used.
+var ErrNotChecked = errors.New("render: the renderer has not rendered its check page")
+
+// errTreeMoved is a tree that was replaced while it was checked.
+var errTreeMoved = &release.RendererError{Health: wire.ToolMismatch, Reason: "the tree was replaced while it was checked"}
+
+// Health is the runner's word on its page renderer, ToolHealth.Renderer
+// (spec section 3, "Pin and provisioning"). It is ok only when the tree
+// verifies against the linked pin now and this very tree (the same
+// directory, not only the same path) has rendered the fixture page since
+// the runner started. Otherwise it is the state VerifyRenderer gives
+// (missing, mismatch or unpinned), or missing for a tree that verifies
+// but has not rendered: still being checked, or unable to render, as a
+// host that cannot nest the browser's sandbox is.
+//
+// The fixture is rendered once per tree: a failure is not tried again,
+// since another try does not help a renderer that cannot render; the
+// runner needs updating. A fixture whose sandbox could not be shown to
+// have ended (ErrNotEnded) stops every later render of this process: the
+// runner needs attention.
+//
+// A nil Health is a runner without a renderer: it reports nothing and is
+// never ready.
+type Health struct {
+ // Config is Installed's launch configuration and Scratch its scratch
+ // directory.
+ Config LaunchConfig
+ Scratch string
+ // Verify and Fixture are release.VerifyRenderer and CheckFixture
+ // (nil for those); tests replace them.
+ Verify func(tree, pin string) error
+ Fixture func(ctx context.Context, cfg LaunchConfig, scratch string) error
+ // Changed hears that the reported state changed, so the next hello
+ // says it; it is never called with Health's lock held.
+ Changed func()
+ // Logger hears why a check was not ok, for the operator.
+ Logger *slog.Logger
+
+ mu sync.Mutex
+ base context.Context
+ state string
+ passed os.FileInfo
+ tried []os.FileInfo
+ stuck error
+ running chan struct{}
+}
+
+// Start checks the renderer in the background (it does not hold up the
+// runner's connect): the tree is verified and the fixture page rendered.
+// Background checks run with ctx, the runner's.
+func (h *Health) Start(ctx context.Context) {
+ if h == nil {
+ return
+ }
+ h.mu.Lock()
+ h.base = ctx
+ h.mu.Unlock()
+ h.kick()
+}
+
+// Report is the state for ToolHealth.Renderer ("" without a renderer):
+// the last check's, missing before the first has ended. It never waits
+// on the disk; it starts another check in the background, when none is
+// running, so the files are verified again for the next report, and a
+// change of state is told to Changed.
+func (h *Health) Report(context.Context) string {
+ if h == nil {
+ return ""
+ }
+ h.mu.Lock()
+ state := reported(h.state)
+ h.mu.Unlock()
+ h.kick()
+ return state
+}
+
+// Ready is the render path's check before each render: it waits for a
+// running check, then verifies the tree again now. It returns the tree
+// to launch with when the health is ok; otherwise "", the health and why.
+// Launch verifies the tree once more as it mounts it.
+func (h *Health) Ready(ctx context.Context) (tree, health string, err error) {
+ if h == nil {
+ return "", wire.ToolMissing, errors.New("render: this runner has no page renderer")
+ }
+ if health, err = h.run(ctx); err != nil {
+ return "", health, err
+ }
+ return h.Config.Tree, health, nil
+}
+
+// Ended is told how each render with the tree ended (its error, or
+// nil). A sandbox that could not be shown to have ended (ErrNotEnded)
+// stops every later render of this process, as a fixture's does: the
+// runner needs attention, never another try.
+func (h *Health) Ended(err error) {
+ if h == nil || !errors.Is(err, ErrNotEnded) {
+ return
+ }
+ h.mu.Lock()
+ before := reported(h.state)
+ if h.stuck == nil {
+ h.stuck = err
+ }
+ h.state = wire.ToolMissing
+ h.mu.Unlock()
+ if before != wire.ToolMissing && h.Changed != nil {
+ h.Changed()
+ }
+}
+
+// reported is a state as reported: missing before the first check.
+func reported(state string) string {
+ if state == "" {
+ return wire.ToolMissing
+ }
+ return state
+}
+
+// kick runs a check in the background unless one is running or Start
+// was not called.
+func (h *Health) kick() {
+ h.mu.Lock()
+ ctx := h.base
+ if ctx == nil || h.running != nil || ctx.Err() != nil {
+ h.mu.Unlock()
+ return
+ }
+ done := make(chan struct{})
+ h.running = done
+ h.mu.Unlock()
+ go h.finish(ctx, done)
+}
+
+// wait waits for a running check to end.
+func (h *Health) wait(ctx context.Context) {
+ for {
+ h.mu.Lock()
+ ch := h.running
+ h.mu.Unlock()
+ if ch == nil {
+ return
+ }
+ select {
+ case <-ch:
+ case <-ctx.Done():
+ return
+ }
+ }
+}
+
+// run is one check, one at a time: it waits for a running one first.
+func (h *Health) run(ctx context.Context) (string, error) {
+ h.mu.Lock()
+ for h.running != nil {
+ ch := h.running
+ h.mu.Unlock()
+ select {
+ case <-ch:
+ case <-ctx.Done():
+ return wire.ToolMissing, ctx.Err()
+ }
+ h.mu.Lock()
+ }
+ done := make(chan struct{})
+ h.running = done
+ h.mu.Unlock()
+ return h.finish(ctx, done)
+}
+
+// finish runs the check that holds done (h.running), records its state,
+// lets the next check start and tells Changed of a change.
+func (h *Health) finish(ctx context.Context, done chan struct{}) (string, error) {
+ state, err := h.check(ctx)
+ if err != nil && h.Logger != nil {
+ h.Logger.Warn("page renderer not ready", "health", state, "err", err)
+ }
+ h.mu.Lock()
+ before := reported(h.state)
+ h.state, h.running = state, nil
+ h.mu.Unlock()
+ close(done)
+ if before != state && h.Changed != nil {
+ h.Changed()
+ }
+ return state, err
+}
+
+// check verifies the tree and, for a tree that has not been tried,
+// renders the fixture page with it.
+func (h *Health) check(ctx context.Context) (string, error) {
+ cfg := h.Config
+ verify, fixture := h.Verify, h.Fixture
+ if verify == nil {
+ verify = release.VerifyRenderer
+ }
+ if fixture == nil {
+ fixture = CheckFixture
+ }
+ before, _ := os.Lstat(cfg.Tree)
+ if err := verify(cfg.Tree, cfg.Pin); err != nil {
+ return release.RendererHealth(err), err
+ }
+ tree, err := os.Lstat(cfg.Tree)
+ if err != nil || before == nil || !os.SameFile(before, tree) {
+ return wire.ToolMismatch, errTreeMoved
+ }
+ h.mu.Lock()
+ stuck, passed, tried := h.stuck, h.passed != nil && os.SameFile(h.passed, tree), false
+ for _, t := range h.tried {
+ tried = tried || os.SameFile(t, tree)
+ }
+ if stuck == nil && !passed && !tried {
+ h.tried = append(h.tried, tree)
+ }
+ h.mu.Unlock()
+ switch {
+ case stuck != nil:
+ return wire.ToolMissing, stuck
+ case passed:
+ return wire.ToolHealthy, nil
+ case tried:
+ return wire.ToolMissing, ErrNotChecked
+ }
+ err = fixture(ctx, cfg, h.Scratch)
+ if after, serr := os.Lstat(cfg.Tree); err == nil && (serr != nil || !os.SameFile(tree, after)) {
+ err = errTreeMoved
+ }
+ switch {
+ case errors.Is(err, ErrNotEnded):
+ h.mu.Lock()
+ h.stuck = err
+ h.mu.Unlock()
+ return wire.ToolMissing, err
+ case err != nil && ctx.Err() != nil:
+ // Cut short (the runner stopping, a render call cancelled): the
+ // tree was not given its try.
+ h.mu.Lock()
+ h.tried = h.tried[:len(h.tried)-1]
+ h.mu.Unlock()
+ return wire.ToolMissing, fmt.Errorf("%w: %w", ErrNotChecked, err)
+ case err != nil:
+ var re *release.RendererError
+ if errors.As(err, &re) {
+ return release.RendererHealth(err), fmt.Errorf("%w: %w", ErrNotChecked, err)
+ }
+ return wire.ToolMissing, fmt.Errorf("%w: %w", ErrNotChecked, err)
+ }
+ h.mu.Lock()
+ h.passed = tree
+ h.mu.Unlock()
+ return wire.ToolHealthy, nil
+}
diff --git a/internal/runner/render/health_test.go b/internal/runner/render/health_test.go
new file mode 100644
index 00000000..0aed85bd
--- /dev/null
+++ b/internal/runner/render/health_test.go
@@ -0,0 +1,351 @@
+package render
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "os"
+ "path/filepath"
+ "sync"
+ "sync/atomic"
+ "testing"
+ "time"
+
+ "amadan.net/oficina/equipo/internal/release"
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// healthRig is a Health over a real tree directory, with VerifyRenderer
+// and the fixture render faked: verify returns verifyErr, the fixture
+// fixtureErr (after waiting on gate when it is set).
+type healthRig struct {
+ h *Health
+ tree string
+ mu sync.Mutex
+ verifyErr error
+ fixtureErr error
+ gate chan struct{}
+ verifies atomic.Int32
+ fixtures atomic.Int32
+ changed atomic.Int32
+ configs []LaunchConfig
+}
+
+const healthPin = "8f27c7adf358cd4c9f31fb16a06449ecf67696864f35b54005574b0a9ce8dae8"
+
+func newHealthRig(t *testing.T) *healthRig {
+ t.Helper()
+ exe := filepath.Join(t.TempDir(), "equipo-runner")
+ cfg, scratch := Installed("/usr/bin/bwrap", exe, healthPin)
+ r := &healthRig{tree: cfg.Tree}
+ if err := os.MkdirAll(cfg.Tree, 0o755); err != nil {
+ t.Fatal(err)
+ }
+ r.h = &Health{Config: cfg, Scratch: scratch,
+ Verify: func(tree, pin string) error {
+ r.verifies.Add(1)
+ if tree != cfg.Tree || pin != healthPin {
+ return fmt.Errorf("verified %s against %s", tree, pin)
+ }
+ r.mu.Lock()
+ defer r.mu.Unlock()
+ return r.verifyErr
+ },
+ Fixture: func(ctx context.Context, c LaunchConfig, s string) error {
+ r.fixtures.Add(1)
+ r.mu.Lock()
+ r.configs = append(r.configs, c)
+ gate, err := r.gate, r.fixtureErr
+ r.mu.Unlock()
+ if s != scratch {
+ return fmt.Errorf("scratch %s", s)
+ }
+ if gate != nil {
+ select {
+ case <-gate:
+ case <-ctx.Done():
+ return ctx.Err()
+ }
+ }
+ return err
+ },
+ Changed: func() { r.changed.Add(1) },
+ }
+ return r
+}
+
+func (r *healthRig) set(verify, fixture error) {
+ r.mu.Lock()
+ r.verifyErr, r.fixtureErr = verify, fixture
+ r.mu.Unlock()
+}
+
+// settle starts the check and waits for its end (Ready waits on a
+// running check before its own).
+func (r *healthRig) settle(t *testing.T) {
+ t.Helper()
+ ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
+ defer cancel()
+ r.h.Start(ctx)
+ r.h.wait(ctx)
+}
+
+// TestHealthReportsEachState (task 8): the renderer's health is ok only
+// when the tree verifies and has rendered the fixture page; otherwise
+// the state VerifyRenderer's error gives (anything unexpected is a
+// mismatch), never ok.
+func TestHealthReportsEachState(t *testing.T) {
+ for _, c := range []struct {
+ name string
+ verify error
+ want string
+ }{
+ {"ok", nil, wire.ToolHealthy},
+ {"missing", &release.RendererError{Health: wire.ToolMissing, Reason: "absent"}, wire.ToolMissing},
+ {"mismatch", &release.RendererError{Health: wire.ToolMismatch, Path: "usr/lib/x", Reason: "hash"}, wire.ToolMismatch},
+ {"unpinned", &release.RendererError{Health: wire.ToolUnpinned, Reason: "no pin"}, wire.ToolUnpinned},
+ {"unexpected", errors.New("disk on fire"), wire.ToolMismatch},
+ } {
+ t.Run(c.name, func(t *testing.T) {
+ r := newHealthRig(t)
+ r.set(c.verify, nil)
+ r.settle(t)
+ if got := r.h.Report(context.Background()); got != c.want {
+ t.Fatalf("reported %q, want %q", got, c.want)
+ }
+ tree, health, err := r.h.Ready(context.Background())
+ if health != c.want || (c.want == wire.ToolHealthy) != (err == nil) || (c.want == wire.ToolHealthy) != (tree == r.tree) {
+ t.Fatalf("ready: %q %q %v", tree, health, err)
+ }
+ if c.verify != nil && r.fixtures.Load() != 0 {
+ t.Fatalf("a tree that does not verify was rendered")
+ }
+ if c.want == wire.ToolHealthy && (len(r.configs) != 1 || r.configs[0] != r.h.Config) {
+ t.Fatalf("fixture rendered with %+v", r.configs)
+ }
+ })
+ }
+}
+
+// TestHealthVerifiedButNotRenderedIsNotOK: a tree that verifies but
+// cannot render the fixture page reports missing (as a host that cannot
+// nest the browser's sandbox does) and Ready refuses it. The render is
+// not tried again for the same tree: the runner needs updating.
+func TestHealthVerifiedButNotRenderedIsNotOK(t *testing.T) {
+ r := newHealthRig(t)
+ r.set(nil, errors.New("the browser's sandbox did not start"))
+ r.settle(t)
+ if got := r.h.Report(context.Background()); got != wire.ToolMissing {
+ t.Fatalf("reported %q", got)
+ }
+ r.h.wait(context.Background())
+ tree, health, err := r.h.Ready(context.Background())
+ if tree != "" || health != wire.ToolMissing || !errors.Is(err, ErrNotChecked) {
+ t.Fatalf("ready: %q %q %v", tree, health, err)
+ }
+ // Even once it would render, the same tree is not tried again.
+ r.set(nil, nil)
+ if _, health, _ := r.h.Ready(context.Background()); health != wire.ToolMissing || r.fixtures.Load() != 1 {
+ t.Fatalf("tried again: %q after %d renders", health, r.fixtures.Load())
+ }
+}
+
+// TestHealthNotEndedNeedsAttention: a fixture whose sandbox could not be
+// shown to have ended is never ok and never tried again, not even with
+// another tree.
+func TestHealthNotEndedNeedsAttention(t *testing.T) {
+ r := newHealthRig(t)
+ r.set(nil, fmt.Errorf("closing: %w", ErrNotEnded))
+ r.settle(t)
+ replaceTree(t, r.tree)
+ r.set(nil, nil)
+ tree, health, err := r.h.Ready(context.Background())
+ if tree != "" || health != wire.ToolMissing || !errors.Is(err, ErrNotEnded) || r.fixtures.Load() != 1 {
+ t.Fatalf("ready: %q %q %v after %d renders", tree, health, err, r.fixtures.Load())
+ }
+}
+
+// TestHealthRenderNotEndedNeedsAttention: a render after the fixture
+// whose sandbox could not be shown to have ended stops every later one;
+// another render's error does not.
+func TestHealthRenderNotEndedNeedsAttention(t *testing.T) {
+ r := newHealthRig(t)
+ r.settle(t)
+ r.h.Ended(nil)
+ r.h.Ended(&Error{Code: CodeTimeout})
+ if _, health, err := r.h.Ready(context.Background()); health != wire.ToolHealthy || err != nil {
+ t.Fatalf("after a timeout: %q %v", health, err)
+ }
+ r.h.Ended(fmt.Errorf("render: %w", ErrNotEnded))
+ if got := r.h.Report(context.Background()); got != wire.ToolMissing || r.changed.Load() != 2 {
+ t.Fatalf("reported %q, changed %d", got, r.changed.Load())
+ }
+ r.h.wait(context.Background())
+ if tree, health, err := r.h.Ready(context.Background()); tree != "" || health != wire.ToolMissing || !errors.Is(err, ErrNotEnded) {
+ t.Fatalf("after a render that did not end: %q %q %v", tree, health, err)
+ }
+}
+
+// TestHealthStartsInTheBackground: Start does not wait for the check;
+// until the fixture has rendered the report is not ok, and once it has,
+// Changed hears it (the next hello says ok).
+func TestHealthStartsInTheBackground(t *testing.T) {
+ r := newHealthRig(t)
+ r.gate = make(chan struct{})
+ done := make(chan struct{})
+ go func() {
+ r.h.Start(context.Background())
+ close(done)
+ }()
+ select {
+ case <-done:
+ case <-time.After(5 * time.Second):
+ t.Fatal("Start waited for the fixture render")
+ }
+ if got := r.h.Report(context.Background()); got != wire.ToolMissing {
+ t.Fatalf("reported %q before the fixture rendered", got)
+ }
+ close(r.gate)
+ r.h.wait(context.Background())
+ if r.changed.Load() != 1 {
+ t.Fatalf("changed %d times", r.changed.Load())
+ }
+ if got := r.h.Report(context.Background()); got != wire.ToolHealthy {
+ t.Fatalf("reported %q", got)
+ }
+ // Report checks again in the background; the same state says nothing.
+ r.h.wait(context.Background())
+ if r.changed.Load() != 1 || r.verifies.Load() < 2 {
+ t.Fatalf("changed %d times, verified %d", r.changed.Load(), r.verifies.Load())
+ }
+}
+
+// TestHealthRechecksTheFilesBeforeEachRender: Ready verifies the tree
+// every time; once it no longer verifies it is not ok, and the report
+// changes with it.
+func TestHealthRechecksTheFilesBeforeEachRender(t *testing.T) {
+ r := newHealthRig(t)
+ r.settle(t)
+ for range 3 {
+ if _, health, err := r.h.Ready(context.Background()); health != wire.ToolHealthy || err != nil {
+ t.Fatalf("ready %q %v", health, err)
+ }
+ }
+ if r.verifies.Load() != 4 || r.fixtures.Load() != 1 {
+ t.Fatalf("verified %d times, rendered %d", r.verifies.Load(), r.fixtures.Load())
+ }
+ r.set(&release.RendererError{Health: wire.ToolMismatch, Path: "MANIFEST", Reason: "tampered"}, nil)
+ tree, health, err := r.h.Ready(context.Background())
+ if tree != "" || health != wire.ToolMismatch || !errors.Is(err, release.ErrRendererMismatch) {
+ t.Fatalf("ready: %q %q %v", tree, health, err)
+ }
+ if got := r.h.Report(context.Background()); got != wire.ToolMismatch || r.changed.Load() != 2 {
+ t.Fatalf("reported %q, changed %d", got, r.changed.Load())
+ }
+}
+
+// TestHealthIsPerTree: the fixture rendered with one tree says nothing
+// about another at the same path (an update put it there): that one is
+// not ok until it has rendered too.
+func TestHealthIsPerTree(t *testing.T) {
+ r := newHealthRig(t)
+ r.settle(t)
+ replaceTree(t, r.tree)
+ r.set(nil, errors.New("crashed"))
+ if _, health, _ := r.h.Ready(context.Background()); health != wire.ToolMissing || r.fixtures.Load() != 2 {
+ t.Fatalf("another tree: %q after %d renders", health, r.fixtures.Load())
+ }
+ // A tree replaced while the fixture renders is not the one rendered.
+ r = newHealthRig(t)
+ var once sync.Once
+ r.h.Fixture = func(context.Context, LaunchConfig, string) error {
+ once.Do(func() { replaceTree(t, r.tree) })
+ return nil
+ }
+ r.settle(t)
+ if got := r.h.Report(context.Background()); got == wire.ToolHealthy {
+ t.Fatal("a tree replaced during its fixture render is ok")
+ }
+ // The tree now there renders once on its own, and then it is ok.
+ r.h.wait(context.Background())
+ if _, health, _ := r.h.Ready(context.Background()); health != wire.ToolHealthy {
+ t.Fatalf("the new tree: %q", health)
+ }
+}
+
+// TestHealthTreeReplacedWhileVerified: a tree replaced while it is
+// verified is not the one verified: a mismatch, never rendered.
+func TestHealthTreeReplacedWhileVerified(t *testing.T) {
+ r := newHealthRig(t)
+ r.h.Verify = func(string, string) error {
+ replaceTree(t, r.tree)
+ return nil
+ }
+ if _, health, err := r.h.Ready(context.Background()); health != wire.ToolMismatch || err == nil || r.fixtures.Load() != 0 {
+ t.Fatalf("ready %q %v after %d renders", health, err, r.fixtures.Load())
+ }
+}
+
+// TestHealthLaunchRefusalKeepsItsState: a fixture render that Launch
+// refuses because the tree no longer verifies says that state.
+func TestHealthLaunchRefusalKeepsItsState(t *testing.T) {
+ r := newHealthRig(t)
+ r.set(nil, &release.RendererError{Health: wire.ToolMismatch, Path: "usr/bin/x", Reason: "hash"})
+ if _, health, err := r.h.Ready(context.Background()); health != wire.ToolMismatch || !errors.Is(err, ErrNotChecked) {
+ t.Fatalf("ready %q %v", health, err)
+ }
+}
+
+// TestHealthCancelledRenderIsTriedAgain: a fixture render cut short (the
+// runner stopping, a render call cancelled) was not the tree's try.
+func TestHealthCancelledRenderIsTriedAgain(t *testing.T) {
+ r := newHealthRig(t)
+ r.gate = make(chan struct{})
+ ctx, cancel := context.WithCancel(context.Background())
+ cancel()
+ if health, _ := r.h.run(ctx); health != wire.ToolMissing {
+ t.Fatalf("cancelled: %q", health)
+ }
+ close(r.gate)
+ if _, health, err := r.h.Ready(context.Background()); health != wire.ToolHealthy || err != nil || r.fixtures.Load() != 2 {
+ t.Fatalf("after a cancelled render: %q %v, %d renders", health, err, r.fixtures.Load())
+ }
+}
+
+// TestHealthOnlyOnLinuxAmd64: the renderer is Linux amd64's; a nil
+// Health (a Mac or arm64 runner has none) reports nothing and is never
+// ready.
+func TestHealthOnlyOnLinuxAmd64(t *testing.T) {
+ for _, p := range [][2]string{{"darwin", "arm64"}, {"linux", "arm64"}, {"darwin", "amd64"}} {
+ if Platform(p[0], p[1]) {
+ t.Fatalf("%s/%s has a renderer", p[0], p[1])
+ }
+ }
+ if !Platform("linux", "amd64") {
+ t.Fatal("linux/amd64 has no renderer")
+ }
+ var h *Health
+ h.Start(context.Background())
+ if got := h.Report(context.Background()); got != "" {
+ t.Fatalf("no renderer reported %q", got)
+ }
+ if tree, health, err := h.Ready(context.Background()); tree != "" || health != wire.ToolMissing || err == nil {
+ t.Fatalf("no renderer ready: %q %q %v", tree, health, err)
+ }
+}
+
+// replaceTree puts another directory at tree, as an install's rename
+// does.
+func replaceTree(t *testing.T, tree string) {
+ t.Helper()
+ next := tree + ".next"
+ if err := os.Mkdir(next, 0o755); err != nil {
+ t.Fatal(err)
+ }
+ if err := os.Rename(tree, tree+".old"); err != nil {
+ t.Fatal(err)
+ }
+ if err := os.Rename(next, tree); err != nil {
+ t.Fatal(err)
+ }
+}
diff --git a/internal/runner/render/launch_linux.go b/internal/runner/render/launch_linux.go
index 3a70c9ce..e0d8fe9b 100644
--- a/internal/runner/render/launch_linux.go
+++ b/internal/runner/render/launch_linux.go
@@ -140,12 +140,6 @@ const endBound = 10 * time.Second
// have ended; without it the end cannot be shown.
const infoGrace = 200 * time.Millisecond
-// ErrNotEnded is a sandbox whose processes could not be shown to have
-// ended: its init was never identified (no PID, no pidfd, no way to tell
-// the process at that PID is the init), or it did not end within
-// endBound of being killed, twice. Some of its processes may still run.
-var ErrNotEnded = errors.New("render: the sandbox's processes did not end")
-
// Seams for tests: how a pidfd is opened, a process's parent read and a
// moment before the init is identified.
var (
diff --git a/internal/runner/render/render.go b/internal/runner/render/render.go
index 3ae7ce46..c3553d6f 100644
--- a/internal/runner/render/render.go
+++ b/internal/runner/render/render.go
@@ -27,6 +27,13 @@ const Subcommand = "render-sandbox"
// closes every descriptor it should not have and executes bubblewrap.
const ExecSubcommand = "render-exec"
+// ErrNotEnded is a sandbox whose processes could not be shown to have
+// ended: its init was never identified (no PID, no pidfd, no way to tell
+// the process at that PID is the init), or it did not end within
+// endBound of being killed, twice. Some of its processes may still run.
+// The runner needs attention: it is never a reason to try again.
+var ErrNotEnded = errors.New("render: the sandbox's processes did not end")
+
// Paths inside the sandbox.
const (
// BrowserPath is the pinned tree's program (renderer.json "program"),
diff --git a/internal/runner/thin/capabilities.go b/internal/runner/thin/capabilities.go
index 94ca26b0..a12fe69e 100644
--- a/internal/runner/thin/capabilities.go
+++ b/internal/runner/thin/capabilities.go
@@ -11,8 +11,10 @@ import (
"sync"
"time"
+ "amadan.net/oficina/equipo/internal/release"
"amadan.net/oficina/equipo/internal/runner"
"amadan.net/oficina/equipo/internal/runner/provider"
+ "amadan.net/oficina/equipo/internal/runner/render"
"amadan.net/oficina/equipo/internal/runner/webread"
"amadan.net/oficina/equipo/internal/wire"
)
@@ -77,7 +79,7 @@ var goVersion = regexp.MustCompile(`\bgo1\.[0-9]+(?:\.[0-9]+)?\b`)
// when it runs Claude Code, go when checks have the Go toolchain. Never a
// path or raw output.
// addrs lists this machine's addresses (nil: its interfaces).
-func linuxCapabilities(c runner.Config, previews func() *wire.PreviewHost, site *SiteOptions, addrs func() ([]netip.Addr, error)) func(context.Context) wire.Capabilities {
+func linuxCapabilities(c runner.Config, previews func() *wire.PreviewHost, site *SiteOptions, addrs func() ([]netip.Addr, error), renderer *render.Health) func(context.Context) wire.Capabilities {
if addrs == nil {
addrs = webread.LocalAddresses
}
@@ -90,6 +92,9 @@ func linuxCapabilities(c runner.Config, previews func() *wire.PreviewHost, site
// Whether the pinned preview scanner is installed and matches its
// pin (protocol 30, for the coordinator's status).
out.Tools = previewToolHealth(c)
+ // The page renderer's (Linux amd64; nil and empty elsewhere): ok
+ // only once its tree verified and rendered the fixture page.
+ out.Tools.Renderer = renderer.Report(ctx)
// Which carlos, and what it can reach (protocol 31): its version,
// the owner logins and the deploy keys, never a secret.
var cli *carlosCLI
@@ -117,3 +122,22 @@ func linuxCapabilities(c runner.Config, previews func() *wire.PreviewHost, site
// hostPlatform is the platform the runner runs on.
func hostPlatform() wire.Platform { return wire.Platform{OS: runtime.GOOS, Arch: runtime.GOARCH} }
+
+// linkedRendererPin is the renderer pin linked into this build, "" for
+// none (the health then says unpinned).
+func linkedRendererPin() string {
+ pin, _ := release.RendererPin()
+ return pin
+}
+
+// rendererHealth is the page renderer's health on Linux amd64
+// (render.Platform): the tree installed beside this runner for pin
+// (release.RendererPin), launched with the configured bubblewrap. Nil
+// elsewhere, so the report has no renderer field.
+func rendererHealth(c runner.Config, goos, goarch, pin string, logger *slog.Logger) *render.Health {
+ if !render.Platform(goos, goarch) {
+ return nil
+ }
+ cfg, scratch := render.Installed(c.Bwrap(), c.Executable, pin)
+ return &render.Health{Config: cfg, Scratch: scratch, Logger: logger}
+}
diff --git a/internal/runner/thin/engineer.go b/internal/runner/thin/engineer.go
index c42b09ec..77a708e0 100644
--- a/internal/runner/thin/engineer.go
+++ b/internal/runner/thin/engineer.go
@@ -25,6 +25,7 @@ import (
"amadan.net/oficina/equipo/internal/runner/forge"
"amadan.net/oficina/equipo/internal/runner/provider"
"amadan.net/oficina/equipo/internal/runner/provider/claude"
+ "amadan.net/oficina/equipo/internal/runner/render"
"amadan.net/oficina/equipo/internal/runner/workspace"
"amadan.net/oficina/equipo/internal/runnerproto"
"amadan.net/oficina/equipo/internal/wire"
@@ -73,6 +74,9 @@ type Engineer struct {
OpenCode OpenCodeOptions
Clones *Clones
Forge Forge
+ // Renderer is the page renderer's health (nil without one): a render
+ // asks its Ready first, which verifies the tree again.
+ Renderer *render.Health
// CI is the hub's hosted CI for checks the instance offers it for
// (nil: checks always run the gate here).
CI HostedCI
diff --git a/internal/runner/thin/mcp.go b/internal/runner/thin/mcp.go
index 512661db..aa4a2d9f 100644
--- a/internal/runner/thin/mcp.go
+++ b/internal/runner/thin/mcp.go
@@ -184,7 +184,7 @@ var str = map[string]string{"type": "string"}
// descriptions are for the model; people never read them.
var converseTools = []any{
map[string]any{"name": wire.ToolRequestAccess, "description": "Propose an access request for an unreachable repository. The person confirms before filing; never retry unprompted. Prefer one repository; namespace only if explicitly requested. Role defaults to agent.", "inputSchema": toolSchema(map[string]any{"target": str, "role": str, "reason": str}, "target", "reason")},
- map[string]any{"name": "status", "description": "Read-only: this person's runner, model connections, current projects, the repositories you can add (can_add) and the namespaces you can create repositories in (create_in, with home for unrelated new work). Call it before choosing where work goes. runner.tools says whether the runner's pinned preview scanner is installed and matches its pin (ok, missing, mismatch, unpinned, or unknown when the runner does not say): a preview that failed for its scanner needs the runner fixed or updated, not another try. runner.tools.carlos says whether its CARLOS command line tool is current enough for previews and sites (ok, outdated, missing) and carlos_version which release it is: outdated or missing needs the person to update it, not another try.", "inputSchema": toolSchema(map[string]any{})},
+ map[string]any{"name": "status", "description": "Read-only: this person's runner, model connections, current projects, the repositories you can add (can_add) and the namespaces you can create repositories in (create_in, with home for unrelated new work). Call it before choosing where work goes. runner.tools says whether the runner's pinned preview scanner is installed and matches its pin (ok, missing, mismatch, unpinned, or unknown when the runner does not say): a preview that failed for its scanner needs the runner fixed or updated, not another try. runner.tools.carlos says whether its CARLOS command line tool is current enough for previews and sites (ok, outdated, missing) and carlos_version which release it is: outdated or missing needs the person to update it, not another try. runner.tools.renderer, only on a runner that has the page renderer, says whether its pinned browser is installed, matches its pin and has rendered its check page since the runner started (ok, missing, mismatch, unpinned): anything but ok needs the runner updated, not another try.", "inputSchema": toolSchema(map[string]any{})},
map[string]any{"name": "find", "description": "Read-only: find which repository an app, product or feature lives in, by name, alias or keyword (for example Woodstar). Returns candidates with reasons, or says nothing Equipo's agent can reach matches.", "inputSchema": toolSchema(map[string]any{"query": str}, "query")},
map[string]any{"name": "search_code", "description": "Read-only: search a repository's default branch for a fixed string, case insensitive. Returns path:line: text, bounded.", "inputSchema": toolSchema(map[string]any{"repo": str, "query": str}, "repo", "query")},
map[string]any{"name": "read_file", "description": "Read-only: read a file from a repository's default branch with line numbers (up to 300 lines from start), or list a directory (empty path is the root). For a file the person attached, repo is \"attachments\" and path is the one given with their message.", "inputSchema": toolSchema(map[string]any{"repo": str, "path": str, "start": map[string]string{"type": "integer"}}, "repo", "path")},
diff --git a/internal/runner/thin/research_step_test.go b/internal/runner/thin/research_step_test.go
index 89c3af6f..4a52292c 100644
--- a/internal/runner/thin/research_step_test.go
+++ b/internal/runner/thin/research_step_test.go
@@ -738,7 +738,7 @@ func TestResearchCapabilityAddresses(t *testing.T) {
t.Fatalf("an error reported %+v", c)
}
// A Linux primary's capability report carries them.
- if c := linuxCapabilities(runner.Config{}, func() *wire.PreviewHost { return nil }, nil, nil)(context.Background()); c.Research == nil {
+ if c := linuxCapabilities(runner.Config{}, func() *wire.PreviewHost { return nil }, nil, nil, nil)(context.Background()); c.Research == nil {
t.Fatal("the Linux report has no Research addresses")
}
var many []string
diff --git a/internal/runner/thin/run.go b/internal/runner/thin/run.go
index a11ebfb6..0fd94f6d 100644
--- a/internal/runner/thin/run.go
+++ b/internal/runner/thin/run.go
@@ -205,8 +205,16 @@ func Run(ctx context.Context, c runner.Config, o Options) error {
devbox := ProbeDevbox(c, o.Logger, nil)
// Merged websites publish to their confirmed places through carlos.
site := ProbeSite(c, o.Logger)
- caps := &Capabilities{Probe: linuxCapabilities(c, PreviewHostOf(devbox, preview), site, o.ResearchAddresses), Logger: o.Logger}
+ // The page renderer (Linux amd64 only): checked in the background, so
+ // the connect never waits on its fixture render; a change of its
+ // health goes out in the next hello.
+ renderer := rendererHealth(c, platform.OS, platform.Arch, linkedRendererPin(), o.Logger)
+ caps := &Capabilities{Probe: linuxCapabilities(c, PreviewHostOf(devbox, preview), site, o.ResearchAddresses, renderer), Logger: o.Logger}
link := &Link{Origin: c.Origin, Token: creds.Bearer.Token, State: state, Logger: o.Logger, Connected: o.Connected, Protocol: o.Protocol, WorkerOnly: platform.OS == "darwin", Role: enrolledRole(c, creds.Bearer.Role)}
+ if renderer != nil {
+ renderer.Changed = func() { caps.Stale(); link.HelloSoon() }
+ }
+ renderer.Start(ctx)
link.Files = &Files{State: state, SessionRoot: o.Claude.SessionRoot, Logger: o.Logger}
// Attachments stay bounded whether or not anything arrives.
go link.Files.Run(ctx, 10*time.Minute)
@@ -364,6 +372,7 @@ func Run(ctx context.Context, c runner.Config, o Options) error {
return err
}
engineer := &Engineer{DiffSecrets: []string{creds.Bearer.Token}, O: o.Claude, Codex: o.Codex, Pi: piOptions(c, o.Pi), OpenCode: opencodeOptions(c, o.OpenCode), Clones: clones, Forge: fg, CI: hostedCIOf(fg), Authorize: link.Confirm, AuthorizeStep: link.ConfirmStep, ConfirmMerge: link.ConfirmMerge, ConfirmPreview: link.ConfirmPreview, Preview: preview, Devbox: devbox, Site: site, ConfirmPublish: link.ConfirmPublish, ConfirmMint: link.ConfirmMint, SiteChanged: func() { caps.Stale(); link.HelloSoon() }, ConfirmPublication: link.ConfirmPublication, Owners: withPerson(coordinatorPersons(c)(), creds.Bearer.Person), MaxStep: o.MaxStep, Note: o.StepNote, Spoken: func() int { p, _ := link.Spoken(); return p }, Healthy: conns.Usable, Conns: conns, Delta: link.Delta, Activity: link.Activity, StepActivity: link.StepActivity, Retention: o.KeptRetention, Host: c.MachineLabel, Merged: func(string) { index.Kick() }}
+ engineer.Renderer = renderer
link.Forget = engineer.RemoveKept
link.TaskEnded = engineer.PreviewTaskEnded
// A Research step that met an address outside the confirmed inventory
diff --git a/internal/runner/thin/tool_health_test.go b/internal/runner/thin/tool_health_test.go
index ac738913..2f7714dd 100644
--- a/internal/runner/thin/tool_health_test.go
+++ b/internal/runner/thin/tool_health_test.go
@@ -10,7 +10,9 @@ import (
"strings"
"testing"
+ "amadan.net/oficina/equipo/internal/release"
"amadan.net/oficina/equipo/internal/runner"
+ "amadan.net/oficina/equipo/internal/runner/render"
"amadan.net/oficina/equipo/internal/wire"
)
@@ -31,7 +33,7 @@ func TestToolHealthReportsTheScannerPin(t *testing.T) {
t.Cleanup(func() { previewScannerTool = old })
report := func(path, want string) wire.Capabilities {
previewScannerTool = func(runner.Config) (string, string) { return path, want }
- return linuxCapabilities(runner.Config{}, func() *wire.PreviewHost { return nil }, nil, nil)(context.Background())
+ return linuxCapabilities(runner.Config{}, func() *wire.PreviewHost { return nil }, nil, nil, nil)(context.Background())
}
for _, c := range []struct{ path, pin, want string }{
{binary, pin, wire.ToolHealthy},
@@ -90,3 +92,69 @@ func TestHandshakeHelloWithholdsToolHealth(t *testing.T) {
}
}
}
+
+// TestToolHealthReportsTheRenderer (task 8): on Linux amd64 the
+// capability report carries the page renderer's health, ok only once the
+// tree verified and rendered the fixture page; a runner without one (a
+// Mac, Linux arm64) sends no renderer field at all.
+func TestToolHealthReportsTheRenderer(t *testing.T) {
+ for _, p := range [][2]string{{"darwin", "arm64"}, {"linux", "arm64"}} {
+ if h := rendererHealth(runner.Config{Executable: "/opt/equipo/runner"}, p[0], p[1], strings.Repeat("a", 64), nil); h != nil {
+ t.Fatalf("%s/%s has a renderer: %+v", p[0], p[1], h)
+ }
+ }
+ h := rendererHealth(runner.Config{Executable: "/opt/equipo/runner", BwrapPath: "/usr/bin/bwrap"}, "linux", "amd64", strings.Repeat("a", 64), nil)
+ if h == nil || h.Config.Tree != "/opt/equipo/renderer/aaaaaaaaaaaa" || h.Config.Binary != "/opt/equipo/runner" || h.Config.Bwrap != "/usr/bin/bwrap" || h.Scratch != "/opt/equipo/renderer" {
+ t.Fatalf("linux/amd64 renderer: %+v", h)
+ }
+ caps := func(h *render.Health) wire.Capabilities {
+ return linuxCapabilities(runner.Config{}, func() *wire.PreviewHost { return nil }, nil, nil, h)(context.Background())
+ }
+ none := caps(nil)
+ if out, _ := json.Marshal(none); none.Tools == nil || none.Tools.Renderer != "" || strings.Contains(string(out), "renderer") {
+ t.Fatalf("no renderer reported: %s", out)
+ }
+ tree := filepath.Join(t.TempDir(), "renderer", "aaaaaaaaaaaa")
+ if err := os.MkdirAll(tree, 0o755); err != nil {
+ t.Fatal(err)
+ }
+ for _, c := range []struct {
+ verify, fixture error
+ want string
+ }{
+ {nil, nil, wire.ToolHealthy},
+ {nil, fmt.Errorf("no namespaces"), wire.ToolMissing},
+ {&release.RendererError{Health: wire.ToolMismatch, Reason: "tampered"}, nil, wire.ToolMismatch},
+ {&release.RendererError{Health: wire.ToolUnpinned, Reason: "no pin"}, nil, wire.ToolUnpinned},
+ {&release.RendererError{Health: wire.ToolMissing, Reason: "absent"}, nil, wire.ToolMissing},
+ } {
+ h := &render.Health{Config: render.LaunchConfig{Tree: tree}, Verify: func(string, string) error { return c.verify }, Fixture: func(context.Context, render.LaunchConfig, string) error { return c.fixture }}
+ h.Start(context.Background())
+ _, _, _ = h.Ready(context.Background())
+ got := caps(h)
+ if got.Tools == nil || got.Tools.Renderer != c.want || wire.ValidCapabilities(got) != nil {
+ t.Fatalf("verify %v, fixture %v: %+v", c.verify, c.fixture, got.Tools)
+ }
+ if out, _ := json.Marshal(got); strings.Contains(string(out), tree) {
+ t.Fatalf("the report names the tree: %s", out)
+ }
+ }
+}
+
+// TestStatusSaysABadRendererNeedsTheRunnerUpdated: status's description
+// tells the coordinator what runner.tools.renderer means and that a bad
+// renderer needs the runner updated, never another try.
+func TestStatusSaysABadRendererNeedsTheRunnerUpdated(t *testing.T) {
+ for _, tool := range converseTools {
+ m := tool.(map[string]any)
+ if m["name"] != "status" {
+ continue
+ }
+ d := m["description"].(string)
+ if !strings.Contains(d, "runner.tools.renderer") || !strings.Contains(d, "anything but ok needs the runner updated, not another try") {
+ t.Fatalf("status's description: %s", d)
+ }
+ return
+ }
+ t.Fatal("no status tool")
+}
diff --git a/internal/thintest/stuck_contract_test.go b/internal/thintest/stuck_contract_test.go
index ac735095..97a295ad 100644
--- a/internal/thintest/stuck_contract_test.go
+++ b/internal/thintest/stuck_contract_test.go
@@ -52,6 +52,15 @@ func TestContractStatusToolHealth(t *testing.T) {
if strings.Contains(res.Text, "/opt/") || strings.Contains(res.Text, "/home/") || strings.Contains(res.Text, "gitleaks") {
t.Fatalf("status names a path: %s", res.Text)
}
+ // The page renderer's health (Linux amd64 runners) is shown as said.
+ h.Capabilities.Tools = &wire.ToolHealth{Scanner: wire.ToolHealthy, Renderer: wire.ToolMismatch}
+ if err := r.runner.Send(r.ctx, "h-renderer", wire.FrameHello, h); err != nil {
+ t.Fatal(err)
+ }
+ r.client.Snapshot(r.ctx)
+ if got := toolsOf(t, r.call("s2r", wire.ToolStatus, map[string]string{})); got != *h.Capabilities.Tools {
+ t.Fatalf("reported renderer health %+v", got)
+ }
// A report out of bounds is not believed: unknown again.
h.Capabilities.Tools = &wire.ToolHealth{Scanner: "fine"}
if err := r.runner.Send(r.ctx, "h-bad", wire.FrameHello, h); err != nil {