oficina / equipo Public

renderer: bound the sandbox's /tmp and drop its /out bind

What changed (internal/runner/render; task 6 follow-up):
- /tmp is bounded. bwrapArgs gives `--size 536870912` before
  `--tmpfs /tmp` (TmpSize = 512 MiB, one constant in render.go). The
  browser's profile and caches live there, and tmpfs pages show in no
  process's resident set, so MemoryLimit did not cover them.
- Ruling: the sandbox's /out bind is dropped. Captures come over CDP and
  the runner writes them, so nothing the sandbox writes outlives it,
  and there is less writable surface inside. The plan's "/out
  read-write" is served by the runner-side out dir.
  - fdOut is gone; fdInfo is now 10.
  - LaunchConfig.Out is removed.
  - Render takes the out dir as an argument: Render(ctx, cfg, out,
    pages).
  - The out dir is checked on the runner side before any sandbox
    starts (openOut: absolute, clean, empty, mode 0700, this user's,
    no symlink, pinOutDir) and is held through its descriptor
    (os.Root).
- Task 5's tests no longer use /out to get results back:
  - the probe sends its report as one NUL-ended message on the
    browser's pipe (fd 4);
  - the fake browser answers a "report" command;
  - the spawned writer ticks on the browser's pipe, and the test keeps
    its own reader of that pipe after Close;
  - "nothing ran" in the refusal tests is now a launcher that never
    forked (testBeforeFork), not an empty out dir.
- TestSandboxSiteIsReadOnly: `mkdir /out` is EROFS, and /tmp is the only
  place the sandbox writes. TestSandboxHoldsNoRunnerState no longer
  allows /out.

Tests:
  CGO_ENABLED=0 go test ./internal/runner/render/ -count=1   ok (10.8 s)
  -count=10 of TestCloseReturnsOnlyWhenEverythingEnded and
    TestSandboxTmpIsBounded                                 ok
  -count=20 of TestCloseReturnsOnlyWhenEverythingEnded      ok
  EQUIPO_RENDERER_TREE=<tree> -run 'TestRender|TestLaunchRealBrowser'
    ok (tree rebuilt, pin 8f27c7ad...dae8): fixture site, 6 pages in
    5.6 s; redirect blocked; timeout after 15.1 s; crashed (the
    renderer crashed) after 3.7 s; crashed (over memory); real browser.
New tests:
- TestSandboxTmpIsBounded: a writer filling /tmp from inside gets
  ENOSPC after at most TmpSize, within 8 MiB of it.
- TestRenderRefusesItsOutDir: relative, unclean, used, open, symlinked,
  a file, missing, root's. Each is refused with a real launch config,
  and the launcher never forks. A good out dir is written through.
- TestBwrapArgs: the exact argv is updated.

RED: each new guard was broken (mutations), then restored and
checksummed:
- tmpfs unbounded: TestSandboxTmpIsBounded (wrote the 1 GiB cap with no
  error), TestBwrapArgs.
- tmpfs at twice the bound: TestSandboxTmpIsBounded (1073737728 bytes
  before ENOSPC), TestBwrapArgs.
- an /out back in the sandbox (--dir /out): TestSandboxSiteIsReadOnly
  ("file exists"), TestBwrapArgs.
- out not pinned: TestRenderRefusesItsOutDir (open, symlinked, root's
  accepted).
- out path unchecked: TestRenderRefusesItsOutDir ("a sandbox started").
- out opened after the launch: TestRenderRefusesItsOutDir ("a sandbox
  started").
- Close does not wait: TestCloseReturnsOnlyWhenEverythingEnded (bwrap
  still runs).
The writer's pipe witness alone does not catch "Close does not wait":
SIGKILL stops the writes before Close returns. The process check is
what catches it, as with the old /out/ticks file.

Gates: darwin/arm64 build and vet, linux/arm64 vet, staticcheck v0.7.0,
budget size, cmd/equipo-runner TestRenderSandboxVerb: all pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 4d095d2c7195bb15b9f9291151c9834734bc6196 parent bd5be59
10 files changed, +289 −131
  • internal/runner/render/descriptors_linux.go +2 −2
  • internal/runner/render/driver.go +16 −11
  • internal/runner/render/driver_real_linux_test.go +17 −16
  • internal/runner/render/helpers_linux_test.go +61 −28
  • internal/runner/render/launch_linux.go +11 −16
  • internal/runner/render/launch_linux_test.go +79 −43
  • internal/runner/render/memory_linux_test.go +66 −10
  • internal/runner/render/out_linux.go +24 −0
  • internal/runner/render/out_other.go +8 −0
  • internal/runner/render/render.go +5 −5

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 1.4s
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.7s
ci-box: pi: installed and verified in 7.5s
ci-box: opencode: installed and verified in 2.2s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 8.6s
ci-box: clone deepened in 5.0s
ci-box: file times set from content: 3330 files, 217 directories
ci-box: ready in 18.4s
=== copy ===
EQUIPO_RELEASE_COPY_CHECK=1 CGO_ENABLED=0 go test ./internal/equipotest -run '^TestReleaseCopyReviewed$' -count=1
ok  	amadan.net/oficina/equipo/internal/equipotest	0.152s
=== compile ===
go build ./...
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py compile
+ go build -tags testbuild ./...
  5.5s
+ 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 1m19.647s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m17.036s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m17.04s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 65.44, cpu waiting 39.91%, memory waiting 0.00%, io waiting 0.45%
--- shard 1 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-review: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadless$/^4_review$|^TestHeadless$/^2b_access$|^TestHeadless$/^runner_crash$|^TestHeadless$/^2b_first_message$|^TestHeadless$/^4_checks_honest$|^TestHeadless$/^7_stream_resume$|^TestHeadless$/^2b_notebook$|^TestHeadless$/^2b_move_in$|^TestHeadless$/^2b_desk_failure$|^TestHeadless$/^cancel$' ./internal/headless

receipt: test step 1m20.053s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m17.336s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m17.33s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 65.44, cpu waiting 39.81%, 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 1m20.905s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m17.817s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m8.2s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 5.07s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 4.54s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 65.44, cpu waiting 39.81%, memory waiting 0.00%, io waiting 0.44%
--- 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 1m18.267s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m15.266s amadan.net/oficina/equipo/internal/headless
receipt: slow test 38.37s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 18.85s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.04s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
receipt: slow test 9s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
machine: 32 CPUs, load 67.57, cpu waiting 40.27%, memory waiting 0.00%, io waiting 0.47%
--- 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 1m35.241s 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 1m32.651s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m2.36s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.56s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 8.47s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 7.25s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 5.01s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
machine: 32 CPUs, load 61.33, cpu waiting 38.59%, memory waiting 0.00%, io waiting 0.35%
--- 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 2m59.209s 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 2m56.317s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m39.59s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistant
receipt: slow test 20.23s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.19s amadan.net/oficina/equipo/internal/headless TestHeadlessResearchHandoff
receipt: slow test 7.29s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistantAttachments
receipt: slow test 6.77s amadan.net/oficina/equipo/internal/headless TestHeadlessTurnBatching
machine: 32 CPUs, load 25.97, cpu waiting 10.19%, 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 2m17.902s 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 2m14.76s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 11.09s amadan.net/oficina/equipo/internal/thintest TestContractTeamJobSettledStates
receipt: slow test 6.7s amadan.net/oficina/equipo/internal/thintest TestExplorePreviewsOff
receipt: slow test 4.06s amadan.net/oficina/equipo/internal/thintest TestContractTeamNudgePersonNeeds
receipt: slow test 3.92s amadan.net/oficina/equipo/internal/thintest TestContractPreviewHeldUntilPublishAnswer
receipt: slow test 2.73s amadan.net/oficina/equipo/internal/thintest TestContractTeamUpdatePersonNeeds
machine: 32 CPUs, load 38.16, cpu waiting 20.42%, memory waiting 0.00%, io waiting 0.16%
--- 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.001s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m56.269s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 9.53s amadan.net/oficina/equipo/internal/thintest TestContractRetryPreviewUnverifiedMerge
receipt: slow test 9.06s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 4.99s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotOffered
receipt: slow test 4.59s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
receipt: slow test 3.01s amadan.net/oficina/equipo/internal/thintest TestContractPausedJob
machine: 32 CPUs, load 45.79, cpu waiting 27.33%, memory waiting 0.00%, io waiting 0.23%
--- 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.359s, over the 45s its record on line 44 allows; reported only, timing fails on CI

receipt: test step 5m19.266s 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.359s amadan.net/oficina/equipo/internal/runner/thin
receipt: slow test 37.01s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeAnsweredByAnotherModel
receipt: slow test 36.86s amadan.net/oficina/equipo/internal/runner/thin TestModelsEngineeringProbesThenRunsTheStrongest
receipt: slow test 36.8s amadan.net/oficina/equipo/internal/runner/thin TestModelsUnhealthyRetriedOnDemand
receipt: slow test 18.48s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeRunsInsideTheAdmission
receipt: slow test 9.93s amadan.net/oficina/equipo/internal/runner/thin TestTimeoutKeepsNothingForAnOlderInstance
machine: 32 CPUs, load 4.02, cpu waiting 0.98%, 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 51.885s 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.816s amadan.net/oficina/equipo/internal/runner
receipt: slow test 30.78s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.03s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 57.60, cpu waiting 33.95%, memory waiting 0.00%, io waiting 0.73%
--- 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 59.729s 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 58.533s amadan.net/oficina/equipo/internal/runner
receipt: slow test 48.47s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 45.82s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.44s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.61s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 65.45, cpu waiting 38.51%, memory waiting 0.00%, io waiting 0.64%
--- 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 35.803s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 34.935s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.13s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.22s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.15s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 2.71s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 1.61s amadan.net/oficina/equipo/internal/runner TestReportPostsRetryExactRequest
machine: 32 CPUs, load 37.57, cpu waiting 21.31%, memory waiting 0.00%, io waiting 0.96%
--- 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 31.70
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/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: 3042 text files, 3277 matches, 48 failures
--- FAIL: TestDirectDeadReferencesRepository (2.36s)

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


receipt: test step 1m9.487s 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.317s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 28.73s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 28.72s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 26.46s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 23.8s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
receipt: slow test 23.62s amadan.net/oficina/equipo/internal/equipotest TestAuthorityRejectsMismatchedTarget
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/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: 3042 text files, 3277 matches, 48 failures
--- FAIL: TestDirectDeadReferencesRepository (2.26s)
FAIL
rastrillo-budget/v1 ran 2.261s
FAIL	amadan.net/oficina/equipo/internal/equipotest	2.418s
FAIL
machine: 32 CPUs, load 58.10, cpu waiting 34.82%, memory waiting 0.00%, io waiting 0.30%
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 31.70
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 2m13.819s 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 2m11.699s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 21.03s amadan.net/oficina/equipo/internal/equipotest TestProjectsFailuresRollBack
receipt: slow test 21.03s amadan.net/oficina/equipo/internal/equipotest TestProjectWritesRequireCurrentOwner
receipt: slow test 21.01s amadan.net/oficina/equipo/internal/equipotest TestProjectsReopen
receipt: slow test 20.95s amadan.net/oficina/equipo/internal/equipotest TestProjectRetryAndRevision
receipt: slow test 20.94s amadan.net/oficina/equipo/internal/equipotest TestProjectRequestActorAndUpdate
machine: 32 CPUs, load 30.67, cpu waiting 13.29%, memory waiting 0.00%, io waiting 0.10%
--- shard 14 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-r started 30s late; cpu waiting 40.7%, load 31.70
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 5m33.474s, over the 5m0s its record on line 15 allows; reported only, timing fails on CI

receipt: test step 5m39.354s 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 5m33.474s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 4m41.37s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 13.52s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 10.49s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 10.44s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 7.4s amadan.net/oficina/equipo/internal/equipotest TestRosterBootstrapOnce
machine: 32 CPUs, load 2.33, cpu waiting 0.42%, 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 31.70
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.772s 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.664s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 26.7s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 25.6s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 25.59s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 23.76s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettings
receipt: slow test 23.7s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsCurrentOwner
machine: 32 CPUs, load 58.10, cpu waiting 36.94%, memory waiting 0.00%, io waiting 0.32%
--- 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 31.70
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.062s 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 53.794s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 3.98s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 3.47s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 1.68s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.51s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3A
receipt: slow test 1.32s amadan.net/oficina/equipo/internal/plan3test TestPlanMigrationUpgrade
machine: 32 CPUs, load 65.65, cpu waiting 39.78%, memory waiting 0.00%, io waiting 0.40%
--- 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 42.2%, load 31.70
test lane rest: ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/diffscan ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/door ./internal/equipo/github ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/pause ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/push ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/idtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/claude/realcli ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/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/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/runnerproto: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/workspace: its inputs changed
--- FAIL amadan.net/oficina/equipo/internal/runner/provider/claude TestClaudeInitPolicy
=== RUN   TestClaudeInitPolicy
--- FAIL: TestClaudeInitPolicy (1.70s)

--- FAIL amadan.net/oficina/equipo/internal/runner/provider/claude TestClaudeInitPolicy/model
=== RUN   TestClaudeInitPolicy/model
    launcher_test.go:793: claude_turn_uncertain
--- FAIL: TestClaudeInitPolicy/model (0.14s)

--- FAIL amadan.net/oficina/equipo/internal/runner/provider/claude (package output)
FAIL
rastrillo-budget/v1 ran 30.838s
FAIL	amadan.net/oficina/equipo/internal/runner/provider/claude	31.823s

--- 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:309 Reason: File:s001.txt}
--- FAIL: TestTimeouts (0.62s)

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

budget note: internal/equipo took 2m23.07s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/equipo/chat took 23.667s, 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 11.364s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/idtest took 1m59.516s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/release took 39.712s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/runner/containment took 1m1.694s, over the 15s its record on line 40 allows; reported only, timing fails on CI
budget note: internal/runner/forge took 24.744s, over the 20s its record on line 35 allows; reported only, timing fails on CI
budget note: internal/runner/provider/claude/realcli took 16.502s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/runner/provider/pi took 1m22.647s, over the 1m0s its record on line 27 allows; reported only, timing fails on CI
budget note: internal/runner/render took 1m29.631s, over the 10s the default allows; reported only, timing fails on CI

receipt: test step 2m29.034s against a 60s target (the gate's other steps are not in this figure)
receipt: 27 packages ran, 41 cached, 16 without tests, 2 failed
receipt: slow package 2m23.07s amadan.net/oficina/equipo/internal/equipo
receipt: slow package 1m59.516s amadan.net/oficina/equipo/internal/idtest
receipt: slow package 1m29.631s amadan.net/oficina/equipo/internal/runner/render
receipt: slow package 1m22.647s amadan.net/oficina/equipo/internal/runner/provider/pi
receipt: slow package 1m10.353s amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow test 54.39s amadan.net/oficina/equipo/internal/idtest TestDoorRemembersOficinaID
receipt: slow test 50.32s amadan.net/oficina/equipo/internal/runner/render TestLaunchNeverClaimsAnUnprovenEnd
receipt: slow test 47.24s amadan.net/oficina/equipo/internal/idtest TestDoorOficinaSettingsUnreadableIsNoLoop
receipt: slow test 47.13s amadan.net/oficina/equipo/internal/idtest TestDoorNeverJudgesANativeSession
receipt: slow test 46.85s amadan.net/oficina/equipo/internal/idtest TestDoorStepUpIsLocal
rastrillo: budget test: go test failed
exit status 1
+ go test -tags testbuild -timeout 15m -v -run '^TestClaudeInitPolicy$/^model$' -count=1 ./internal/runner/provider/claude   (retry, once)
##############################################################################
FLAKE ./internal/runner/provider/claude:TestClaudeInitPolicy/model rest 4d095d2c7195bb15b9f9291151c9834734bc6196 0.14s 24.13
##############################################################################
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 '^TestTimeouts$' -count=1 ./internal/runner/webread   (retry, once)
##############################################################################
FLAKE ./internal/runner/webread:TestTimeouts rest 4d095d2c7195bb15b9f9291151c9834734bc6196 0.62s 24.13
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 24.13, cpu waiting 9.85%, memory waiting 0.00%, io waiting 0.07%
--- shard 18 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-chat: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$' ./internal/headless

receipt: test step 1m25.941s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m23.646s amadan.net/oficina/equipo/internal/headless
receipt: slow test 38.5s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 14.75s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 10.22s amadan.net/oficina/equipo/internal/headless TestBrowserChat
receipt: slow test 7.38s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 6.94s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
machine: 32 CPUs, load 65.65, cpu waiting 39.78%, memory waiting 0.00%, io waiting 0.40%
--- 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 1m32.593s 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 1m30.434s amadan.net/oficina/equipo/internal/headless
receipt: slow test 28.41s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 21.24s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 13.39s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 9.43s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
receipt: slow test 9.18s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
machine: 32 CPUs, load 63.27, cpu waiting 38.85%, memory waiting 0.00%, io waiting 0.36%
--- 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.717s 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.141s amadan.net/oficina/equipo/internal/headless
receipt: slow test 14.3s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 13.32s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 13.02s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 11.37s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
receipt: slow test 11.36s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsSignInEmail
machine: 32 CPUs, load 48.82, cpu waiting 29.07%, memory waiting 0.00%, io waiting 0.24%
--- shard 21 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-rest: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAskAfterMerge|TestBrowserCardAnswerSettlesAtBottom|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInEmail|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' ./internal/headless
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserCopyContinue
=== RUN   TestBrowserCopyContinue
time=2026-11-28T19:08:29.441Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-28T19:08:29.441Z level=INFO msg="startup phase done" phase=state_lock took=314µs
time=2026-11-28T19:08:29.441Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-28T19:08:29.442Z level=INFO msg="startup phase done" phase=claim_roots took=254µs
time=2026-11-28T19:08:29.442Z level=INFO msg="startup phase" phase=sweep
time=2026-11-28T19:08:29.519Z level=INFO msg="startup phase done" phase=sweep took=76.984ms
time=2026-11-28T19:08:29.521Z level=INFO msg="startup phase" phase=credentials
time=2026-11-28T19:08:29.522Z level=INFO msg="startup phase done" phase=credentials took=224µs
time=2026-11-28T19:08:29.522Z level=INFO msg="startup phase" phase=open_state
time=2026-11-28T19:08:29.612Z level=INFO msg="startup phase done" phase=open_state took=90.065ms
time=2026-11-28T19:08:29.613Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-28T19:08:29.617Z level=INFO msg=connecting host=127.0.0.1:43867 protocol=35
time=2026-11-28T19:08:29.619Z level=INFO msg=connected host=127.0.0.1:43867 took=1.582ms
time=2026-11-28T19:08:29.619Z level=INFO msg="capabilities gathering"
time=2026-11-28T19:08:29.620Z level=INFO msg="capabilities gathered" took=1.201ms tags=linux,claude,go
time=2026-11-28T19:08:29.622Z level=INFO msg="hello sent" protocol=35
time=2026-11-28T19:08:29.636Z 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.57s)

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


receipt: test step 1m42.468s 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.295s amadan.net/oficina/equipo/internal/headless
receipt: slow test 15.15s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
receipt: slow test 12.45s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 10.56s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 9.47s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 7.57s amadan.net/oficina/equipo/internal/headless TestBrowserRefreshRace
rastrillo: budget test: go test failed
exit status 1
+ go test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAskAfterMerge|TestBrowserCardAnswerSettlesAtBottom|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInEmail|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' -v -run '^TestBrowserCopyContinue$' -count=1 ./internal/headless   (retry, once)
##############################################################################
FLAKE ./internal/headless:TestBrowserCopyContinue browser-headless-rest 4d095d2c7195bb15b9f9291151c9834734bc6196 6.57s 58.10
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 54.81, cpu waiting 32.73%, memory waiting 0.00%, io waiting 0.28%
--- 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.569s 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.516s amadan.net/oficina/equipo/internal/equipo
receipt: slow test 1.88s amadan.net/oficina/equipo/internal/equipo TestBrowserPreviewPassExchange
receipt: slow test 630ms 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.999s 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.428s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 6.43s amadan.net/oficina/equipo/internal/equipotest TestBrowserGitHubManifestCSP
browser lane browser-rest: ./internal/idtest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserOficinaIDDoor|TestBrowserSmartDoor)$' ./internal/idtest
budget note: internal/idtest took 10.678s, over the 10s the default allows; reported only, timing fails on CI

receipt: test step 12.208s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 10.678s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 8.67s amadan.net/oficina/equipo/internal/idtest TestBrowserSmartDoor
receipt: slow test 2.01s 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.184s 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.501s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 2.5s 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.756s 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 3m32.96s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 25.2s 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.66s amadan.net/oficina/equipo/internal/thintest TestBrowserPlacementQuestionAndPending
receipt: slow test 9.11s amadan.net/oficina/equipo/internal/thintest TestBrowserRhythm
machine: 32 CPUs, load 9.94, cpu waiting 3.28%, 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.63s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.25s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 9.04s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 9.44s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 27.06s
+ 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   (58s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 14.27s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 11.87s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 10.68s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 17.96s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless   (22s)
ok ./internal/headless TestMixedVersions 19.42s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks   (3s)
ok ./internal/runner/checks TestCheckSandboxDeniedPathsTampering 0.78s
+ go test -tags testbuild -timeout 15m -v -run '^TestRunnerCancelAndSupersede$' ./internal/runner/thin   (2s)
ok ./internal/runner/thin TestRunnerCancelAndSupersede 0.06s
quarantine: 0 flaked (passed on the retry), 0 failed
machine: 32 CPUs, load 61.40, cpu waiting 38.51%, memory waiting 0.00%, io waiting 0.64%
--- shard 24 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
shard 24: make runner-host
python3 scripts/runner-prerequisites.py
CGO_ENABLED=0 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks

receipt: test step 13.719s 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.75s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 238ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 80ms amadan.net/oficina/equipo/internal/runner/provider/codex
receipt: slow package 1ms amadan.net/oficina/equipo/internal/runner/provider
receipt: slow package 1ms amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow test 5.46s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.81s 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 90ms 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.341s 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.269s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 300ms 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 TestNamespaceRecoveryCleansScratch
receipt: slow test 130ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceOpenCodeBinaryAfterAttestation
machine: 32 CPUs, load 24.70, cpu waiting 11.13%, memory waiting 0.00%, io waiting 1.29%
--- 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 31.70
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
reference scan: 3042 text files, 3277 matches, 48 failures
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
make[1]: *** [Makefile:238: runner-dead-references] Error 1
machine: 32 CPUs, load 31.70, cpu waiting 17.99%, memory waiting 0.00%, io waiting 1.02%
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 31.70
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 57.60, cpu waiting 35.36%, memory waiting 0.00%, io waiting 0.70%
--- 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 31.70
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 61.40, cpu waiting 36.56%, memory waiting 0.00%, io waiting 0.68%
--- 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 30.80
shard 28: make gitleaks
7:08PM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
7:08PM INF 1276 commits scanned.
7:08PM INF scanned ~69171913 bytes (69.17 MB) in 25.8s
7:08PM INF no leaks found
machine: 32 CPUs, load 61.40, cpu waiting 36.56%, memory waiting 0.00%, io waiting 0.68%

amadan: job failed at step check shards 12, 25 of 29 — its output is above, not at the tail of this log
diff --git a/internal/runner/render/descriptors_linux.go b/internal/runner/render/descriptors_linux.go
index 53cbaff9..e9554c14 100644
--- a/internal/runner/render/descriptors_linux.go
+++ b/internal/runner/render/descriptors_linux.go
@@ -12,8 +12,8 @@ import (
)
// fdKeep is the last descriptor bubblewrap is started with: 0, 1 and 2,
-// the browser and status pipes (3 to 5), the five binds (6 to 10) and
-// bubblewrap's info pipe (11).
+// the browser and status pipes (3 to 5), the four binds (6 to 9) and
+// bubblewrap's info pipe (10).
const fdKeep = fdInfo
// ExecMain is the runner's render-exec subcommand: the process the
diff --git a/internal/runner/render/driver.go b/internal/runner/render/driver.go
index c50823f5..ad19e611 100644
--- a/internal/runner/render/driver.go
+++ b/internal/runner/render/driver.go
@@ -31,19 +31,29 @@ var (
// Render renders pages of the site in cfg in one sandbox: for each, the
// viewport, the navigation, the wait for load and then network idle, the
-// capture (a PNG in cfg.Out), the title, console errors, failed loads,
-// same-site links that answer 404 and the accessibility outline. It
-// writes report.json to cfg.Out and returns the report.
+// capture, the title, console errors, failed loads, same-site links that
+// answer 404 and the accessibility outline. It writes each capture
+// (page-N.png) and report.json to out and returns the report.
+//
+// out is the runner's own directory, never in the sandbox: captures
+// arrive over the browser's pipe and the runner writes them. It must be
+// an empty directory, mode 0700, owned by this user and reached through
+// no symlink; anything else is refused before the sandbox starts.
//
// The call has CallTimeout and MemoryLimit: past either the sandbox is
// killed and the error is an *Error, CodeTimeout or CodeCrashed, as it
// is for a renderer or browser that dies. The report then holds the
// pages finished before. A tree that does not verify is the launch's
// *release.RendererError, and nothing runs.
-func Render(ctx context.Context, cfg LaunchConfig, pages []Page) (*Report, error) {
+func Render(ctx context.Context, cfg LaunchConfig, out string, pages []Page) (*Report, error) {
if err := checkPages(pages); err != nil {
return nil, err
}
+ root, err := openOut(out)
+ if err != nil {
+ return nil, err
+ }
+ defer root.Close()
began := time.Now()
ctx, cancel := context.WithTimeoutCause(ctx, callTimeout, errCallTimeout)
defer cancel()
@@ -55,18 +65,13 @@ func Render(ctx context.Context, cfg LaunchConfig, pages []Page) (*Report, error
return nil, err
}
defer s.Close()
- out, err := os.OpenRoot(cfg.Out)
- if err != nil {
- return nil, err
- }
- defer out.Close()
var over atomic.Bool
stopWatch := watchMemory(s, memoryLimit, func() {
over.Store(true)
cancel()
s.stop()
})
- report, err := drive(ctx, s.FromBrowser, s.ToBrowser, s.Site, out, pages)
+ report, err := drive(ctx, s.FromBrowser, s.ToBrowser, s.Site, root, pages)
stopWatch()
switch {
case err == nil:
@@ -82,7 +87,7 @@ func Render(ctx context.Context, cfg LaunchConfig, pages []Page) (*Report, error
}
closeErr := s.Close()
report.ElapsedMS = time.Since(began).Milliseconds()
- if werr := writeReport(out, report); werr != nil && err == nil {
+ if werr := writeReport(root, report); werr != nil && err == nil {
err = werr
}
if err == nil && closeErr != nil {
diff --git a/internal/runner/render/driver_real_linux_test.go b/internal/runner/render/driver_real_linux_test.go
index 4b0ae673..48b5b151 100644
--- a/internal/runner/render/driver_real_linux_test.go
+++ b/internal/runner/render/driver_real_linux_test.go
@@ -20,8 +20,9 @@ import (
)
// realConfig is a launch of the real browser, from the tree
-// EQUIPO_RENDERER_TREE names, over a copy of testdata/site.
-func realConfig(t *testing.T) LaunchConfig {
+// EQUIPO_RENDERER_TREE names, over a copy of testdata/site, and an
+// empty out directory for Render.
+func realConfig(t *testing.T) (LaunchConfig, string) {
t.Helper()
tree := os.Getenv("EQUIPO_RENDERER_TREE")
if tree == "" {
@@ -40,7 +41,7 @@ func realConfig(t *testing.T) LaunchConfig {
t.Logf("sandbox stderr:\n%s", stderr.Bytes())
}
})
- return LaunchConfig{Bwrap: bwrap, Binary: self, Tree: tree, Pin: hex.EncodeToString(sum[:]), Site: fixtureSite(t), Out: testOut(t), Stderr: &stderr}
+ return LaunchConfig{Bwrap: bwrap, Binary: self, Tree: tree, Pin: hex.EncodeToString(sum[:]), Site: fixtureSite(t), Stderr: &stderr}, testOut(t)
}
// fixtureSite copies testdata/site to a directory only this user can
@@ -95,7 +96,7 @@ func hasLoad(loads []FailedLoad, kind, url string) bool {
// The fixture site, six pages in one call: a console error, a CDN
// script, web fonts, broken links and a very tall page, full and not.
func TestRenderFixtureSite(t *testing.T) {
- cfg := realConfig(t)
+ cfg, out := realConfig(t)
pages := []Page{
{Path: "/", Viewport: Desktop},
{Path: "/console.html", Viewport: Phone},
@@ -105,16 +106,16 @@ func TestRenderFixtureSite(t *testing.T) {
{Path: "/tall.html", Viewport: Phone},
}
began := time.Now()
- report, err := Render(context.Background(), cfg, pages)
+ report, err := Render(context.Background(), cfg, out, pages)
if err != nil {
t.Fatal(err)
}
t.Logf("rendered %d pages in %v", len(report.Pages), time.Since(began))
- if onDisk := readReport(t, cfg.Out); onDisk.Schema != ReportSchema || len(onDisk.Pages) != len(pages) || onDisk.Error != "" {
+ if onDisk := readReport(t, out); onDisk.Schema != ReportSchema || len(onDisk.Pages) != len(pages) || onDisk.Error != "" {
t.Fatalf("report.json %+v", onDisk)
}
for i, p := range report.Pages {
- w, h := captureSize(t, cfg.Out, p.Capture)
+ w, h := captureSize(t, out, p.Capture)
if p.Capture != "page-"+strconv.Itoa(i+1)+".png" || w != p.CaptureWidth || h != p.CaptureHeight {
t.Errorf("page %d capture %q %dx%d, report %dx%d", i, p.Capture, w, h, p.CaptureWidth, p.CaptureHeight)
}
@@ -175,8 +176,8 @@ func siteOf(t *testing.T, p PageReport) string {
// A page that redirects itself to another host is not followed: the
// load shows as external blocked.
func TestRenderRedirectIsBlocked(t *testing.T) {
- cfg := realConfig(t)
- report, err := Render(context.Background(), cfg, []Page{{Path: "/redirect.html", Viewport: Desktop}})
+ cfg, out := realConfig(t)
+ report, err := Render(context.Background(), cfg, out, []Page{{Path: "/redirect.html", Viewport: Desktop}})
if err != nil {
t.Fatal(err)
}
@@ -191,11 +192,11 @@ func TestRenderRedirectIsBlocked(t *testing.T) {
// A script that never ends is the call's timeout, and the sandbox is
// killed.
func TestRenderNeverEndingScriptTimesOut(t *testing.T) {
- cfg := realConfig(t)
+ cfg, out := realConfig(t)
defer func(d time.Duration) { callTimeout = d }(callTimeout)
callTimeout = 15 * time.Second
began := time.Now()
- report, err := Render(context.Background(), cfg, []Page{{Path: "/", Viewport: Desktop}, {Path: "/forever.html", Viewport: Desktop}})
+ report, err := Render(context.Background(), cfg, out, []Page{{Path: "/", Viewport: Desktop}, {Path: "/forever.html", Viewport: Desktop}})
took := time.Since(began)
if ErrorCode(err) != CodeTimeout {
t.Fatalf("err %v", err)
@@ -203,7 +204,7 @@ func TestRenderNeverEndingScriptTimesOut(t *testing.T) {
if took > callTimeout+15*time.Second {
t.Fatalf("took %v", took)
}
- if report == nil || report.Error != CodeTimeout || len(report.Pages) != 1 || readReport(t, cfg.Out).Error != CodeTimeout {
+ if report == nil || report.Error != CodeTimeout || len(report.Pages) != 1 || readReport(t, out).Error != CodeTimeout {
t.Fatalf("report %+v", report)
}
t.Logf("%v after %v", err, took)
@@ -211,9 +212,9 @@ func TestRenderNeverEndingScriptTimesOut(t *testing.T) {
// A page that exhausts the renderer's memory is crashed.
func TestRenderCrashedRenderer(t *testing.T) {
- cfg := realConfig(t)
+ cfg, out := realConfig(t)
began := time.Now()
- report, err := Render(context.Background(), cfg, []Page{{Path: "/crash.html", Viewport: Desktop}})
+ report, err := Render(context.Background(), cfg, out, []Page{{Path: "/crash.html", Viewport: Desktop}})
if ErrorCode(err) != CodeCrashed {
t.Fatalf("err %v", err)
}
@@ -225,11 +226,11 @@ func TestRenderCrashedRenderer(t *testing.T) {
// A sandbox over its memory is killed, and the call is crashed.
func TestRenderOverMemoryIsCrashed(t *testing.T) {
- cfg := realConfig(t)
+ cfg, out := realConfig(t)
defer func(n int64) { memoryLimit = n }(memoryLimit)
// Less than the browser itself takes.
memoryLimit = 32 << 20
- report, err := Render(context.Background(), cfg, []Page{{Path: "/", Viewport: Desktop}})
+ report, err := Render(context.Background(), cfg, out, []Page{{Path: "/", Viewport: Desktop}})
var e *Error
if !errors.As(err, &e) || e.Code != CodeCrashed || e.Detail != errOverMemory.Error() {
t.Fatalf("err %v", err)
diff --git a/internal/runner/render/helpers_linux_test.go b/internal/runner/render/helpers_linux_test.go
index 588f9d0b..a96338c7 100644
--- a/internal/runner/render/helpers_linux_test.go
+++ b/internal/runner/render/helpers_linux_test.go
@@ -89,11 +89,42 @@ type probeReport struct {
Writes map[string]string
Paths []string
Redirects map[string]redirectResult
+ // Fill is how much "fill-tmp" wrote to /tmp before a write failed,
+ // and that failure.
+ Fill *fillResult
+}
+
+type fillResult struct {
+ Bytes int64
+ Err string
+}
+
+// fillTmp writes to /tmp in 1 MiB pieces until a write fails, at most
+// twice TmpSize.
+func fillTmp() *fillResult {
+ f, err := os.Create("/tmp/fill")
+ if err != nil {
+ return &fillResult{Err: err.Error()}
+ }
+ defer f.Close()
+ chunk := make([]byte, 1<<20)
+ r := &fillResult{}
+ for r.Bytes < 2*TmpSize {
+ n, err := f.Write(chunk)
+ r.Bytes += int64(n)
+ if err != nil {
+ r.Err = err.Error()
+ break
+ }
+ }
+ return r
}
// probeMain runs as the sandbox's first process in render-sandbox's
-// place and writes what it sees and reaches to /out/probe.json. Its
-// arguments are "dial=<host:port>" and "redirect=<url>".
+// place and sends what it sees and reaches, as one NUL-ended JSON
+// message, on the browser's pipe (descriptor 4): nothing the sandbox
+// writes outlives it. Its arguments are "dial=<host:port>",
+// "redirect=<url>" and "fill-tmp".
func probeMain(args []string) int {
r := probeReport{FDs: openFDs(), Env: os.Environ(), Dials: map[string]string{}, Writes: map[string]string{}, Redirects: map[string]redirectResult{}}
ifs, _ := net.Interfaces()
@@ -129,8 +160,11 @@ func probeMain(args []string) int {
r.Loopback = dialErr(ln.Addr().String())
}
var redirects []string
+ fill := false
for _, a := range args {
switch {
+ case a == "fill-tmp":
+ fill = true
case strings.HasPrefix(a, "dial="):
r.Dials[a[5:]] = dialErr(a[5:])
case strings.HasPrefix(a, "redirect="):
@@ -150,9 +184,10 @@ func probeMain(args []string) int {
create := func(p string) func() error {
return func() error { return os.WriteFile(p, []byte("x"), 0o644) }
}
- for _, p := range []string{"/site/new", "/usr/new", "/etc/fonts/new", "/new", "/out/new", "/tmp/new"} {
+ for _, p := range []string{"/site/new", "/usr/new", "/etc/fonts/new", "/new", "/tmp/new"} {
write("create "+p, create(p))
}
+ write("mkdir /out", func() error { return os.Mkdir("/out", 0o700) })
write("open /site/index.html", func() error {
f, err := os.OpenFile("/site/index.html", os.O_WRONLY, 0)
if err == nil {
@@ -165,8 +200,11 @@ func probeMain(args []string) int {
write("mkdir /site/d", func() error { return os.Mkdir("/site/d", 0o755) })
write("chmod /site/index.html", func() error { return os.Chmod("/site/index.html", 0o600) })
write("remove /site/index.html", func() error { return os.Remove("/site/index.html") })
+ if fill {
+ r.Fill = fillTmp()
+ }
b, _ := json.Marshal(r)
- if os.WriteFile(filepath.Join(OutDir, "probe.json"), b, 0o600) != nil {
+ if _, err := os.NewFile(fdBrowserOut, "report").Write(append(b, 0)); err != nil {
return 1
}
return 0
@@ -227,18 +265,17 @@ type browserReport struct {
Dir string
}
-// fakeBrowserMain plays the browser: it writes what it was given to
-// /out/browser.json, then answers NUL-ended messages on its pipe (read
-// on 3, written on 4): "get <url>" fetches the URL and replies with the
-// status and body, "post <url>" posts to it and replies with the status, "hang"
-// never returns, "spawn" starts a writer that outlives every pipe, "exit <n>" exits with n, anything else is echoed.
+// fakeBrowserMain plays the browser: it answers NUL-ended messages on
+// its pipe (read on 3, written on 4): "report" replies with what it was
+// given (browserReport, as JSON), "get <url>" fetches the URL and
+// replies with the status and body, "post <url>" posts to it and
+// replies with the status, "hang" never returns, "spawn" starts a writer
+// that outlives the browser and replies "spawned", "exit <n>" exits
+// with n, anything else is echoed.
func fakeBrowserMain(args []string) int {
r := browserReport{Args: args, Env: os.Environ(), FDs: openFDs()}
r.Dir, _ = os.Getwd()
- b, _ := json.Marshal(r)
- if os.WriteFile(filepath.Join(OutDir, "browser.json"), b, 0o600) != nil {
- return 3
- }
+ report, _ := json.Marshal(r)
in, out := os.NewFile(3, "in"), os.NewFile(4, "out")
read := bufio.NewReader(in)
for {
@@ -248,6 +285,8 @@ func fakeBrowserMain(args []string) int {
}
msg = strings.TrimSuffix(msg, "\x00")
switch {
+ case msg == "report":
+ out.Write(append(report, 0))
case strings.HasPrefix(msg, "get "):
reply := "error"
if resp, err := http.Get(msg[4:]); err == nil {
@@ -266,20 +305,16 @@ func fakeBrowserMain(args []string) int {
}
out.WriteString(reply + "\x00")
case msg == "spawn":
- // A process that leaves every pipe it was given and keeps
- // writing to /out until it is killed.
+ // A process in its own session that keeps writing a tick
+ // to the browser's pipe (its descriptor 3) until it is
+ // killed.
w := exec.Command(os.Args[0], "--writer")
w.SysProcAttr = &syscall.SysProcAttr{Setsid: true}
+ w.ExtraFiles = []*os.File{out}
reply := "spawned"
if err := w.Start(); err != nil {
reply = "error " + err.Error()
}
- for i := 0; i < 500 && reply == "spawned"; i++ {
- if st, err := os.Stat(filepath.Join(OutDir, "ticks")); err == nil && st.Size() > 0 {
- break
- }
- time.Sleep(10 * time.Millisecond)
- }
out.WriteString(reply + "\x00")
case msg == "hang":
// A browser that never ends on its own, even when its pipe
@@ -297,9 +332,10 @@ func fakeBrowserMain(args []string) int {
}
}
-// writerMain is the spawned writer: no pipe of the sandbox's (its 0, 1
-// and 2 are /dev/null), its own session, deaf to the signals a session
-// ending sends, appending to /out/ticks every millisecond.
+// writerMain is the spawned writer: its 0, 1 and 2 are /dev/null, its 3
+// the browser's pipe, in its own session, deaf to the signals a session
+// ending sends, writing a tick to 3 every millisecond whatever the
+// write returns.
func writerMain() int {
signal.Ignore(syscall.SIGHUP, syscall.SIGTERM, syscall.SIGINT)
// Many threads make its death take a while, so a Close that does not
@@ -312,10 +348,7 @@ func writerMain() int {
}
}()
}
- f, err := os.OpenFile(filepath.Join(OutDir, "ticks"), os.O_WRONLY|os.O_CREATE|os.O_APPEND, 0o600)
- if err != nil {
- return 1
- }
+ f := os.NewFile(3, "ticks")
for {
f.Write([]byte{'.'})
time.Sleep(time.Millisecond)
diff --git a/internal/runner/render/launch_linux.go b/internal/runner/render/launch_linux.go
index 11a2ecd9..3a70c9ce 100644
--- a/internal/runner/render/launch_linux.go
+++ b/internal/runner/render/launch_linux.go
@@ -32,19 +32,20 @@ const (
fdFonts = 7
fdBinary = 8
fdSite = 9
- fdOut = 10
// fdInfo is bubblewrap's --info-fd: it writes the sandbox's first
// process's PID (the PID namespace's init) there.
- fdInfo = 11
+ fdInfo = 10
)
// bwrapArgs is the sandbox's launch policy (task 1's spike, which ran the
// browser with its own sandbox on): every namespace unshared, so loopback
// is the only interface; the verified tree read only as /usr, with the
// loader paths as links into it, and its fontconfig at /etc/fonts; the
-// runner's binary read only; the site read only and /out read-write; a
-// tmpfs /tmp, a fresh /proc and bubblewrap's minimal /dev; the root
-// itself read only. No home, environment, credentials or runner state.
+// runner's binary read only; the site read only; a tmpfs /tmp of at most
+// TmpSize, a fresh /proc and bubblewrap's minimal /dev; the root itself
+// read only. Nothing the sandbox writes outlives it: captures come over
+// the browser's pipe and the runner writes them. No home, environment,
+// credentials or runner state.
func bwrapArgs(argv ...string) []string {
fd := strconv.Itoa
return append([]string{
@@ -58,8 +59,7 @@ func bwrapArgs(argv ...string) []string {
"--ro-bind-fd", fd(fdFonts), "/etc/fonts",
"--ro-bind-fd", fd(fdBinary), binaryPath,
"--ro-bind-fd", fd(fdSite), SiteDir,
- "--bind-fd", fd(fdOut), OutDir,
- "--tmpfs", "/tmp",
+ "--size", strconv.Itoa(TmpSize), "--tmpfs", "/tmp",
"--proc", "/proc",
"--dev", "/dev",
"--remount-ro", "/",
@@ -166,7 +166,7 @@ func start(ctx context.Context, cfg LaunchConfig, argv ...string) (*Sandbox, err
if err := ctx.Err(); err != nil {
return nil, err
}
- for _, p := range []string{cfg.Bwrap, cfg.Binary, cfg.Tree, cfg.Site, cfg.Out} {
+ for _, p := range []string{cfg.Bwrap, cfg.Binary, cfg.Tree, cfg.Site} {
if !filepath.IsAbs(p) || filepath.Clean(p) != p {
return nil, fmt.Errorf("render: launch path %q", p)
}
@@ -222,11 +222,6 @@ func start(ctx context.Context, cfg LaunchConfig, argv ...string) (*Sandbox, err
return fail(err)
}
files = append(files, site)
- out, err := pinOutDir(cfg.Out)
- if err != nil {
- return fail(err)
- }
- files = append(files, out)
s := &Sandbox{ToBrowser: toBrowser, FromBrowser: fromBrowser, done: make(chan struct{}), ready: make(chan status, 1), stderr: &bounded{max: 8192}, pidfd: -1}
s.stop = s.kill
@@ -235,7 +230,7 @@ func start(ctx context.Context, cfg LaunchConfig, argv ...string) (*Sandbox, err
cmd.Args[0] = binaryPath
cmd.Env = []string{}
cmd.Dir = "/"
- cmd.ExtraFiles = []*os.File{browserIn, browserOut, statusWrite, usr, fonts, binary, site, out, infoWrite}
+ cmd.ExtraFiles = []*os.File{browserIn, browserOut, statusWrite, usr, fonts, binary, site, infoWrite}
cmd.Stdout = s.stderr
cmd.Stderr = s.stderr
cmd.WaitDelay = 5 * time.Second
@@ -539,8 +534,8 @@ func pinSite(dir string) (*os.File, error) {
return f, err
}
-// pinOutDir is the output directory, as pinDir, and also private (0700)
-// and empty.
+// pinOutDir is Render's output directory, on the runner's side: as
+// pinDir, and also private (0700) and empty.
func pinOutDir(dir string) (*os.File, error) {
f, st, err := pinDir(dir)
if err != nil {
diff --git a/internal/runner/render/launch_linux_test.go b/internal/runner/render/launch_linux_test.go
index 7ffe48f5..5686f827 100644
--- a/internal/runner/render/launch_linux_test.go
+++ b/internal/runner/render/launch_linux_test.go
@@ -4,6 +4,7 @@ package render
import (
"bufio"
+ "bytes"
"context"
"crypto/sha256"
"debug/elf"
@@ -140,11 +141,11 @@ func testConfig(t *testing.T, browser bool) LaunchConfig {
b = self
}
tree, pin := testTree(t, b)
- return LaunchConfig{Bwrap: bwrap, Binary: self, Tree: tree, Pin: pin, Site: testSite(t), Out: testOut(t)}
+ return LaunchConfig{Bwrap: bwrap, Binary: self, Tree: tree, Pin: pin, Site: testSite(t)}
}
// runProbe runs the probe as the sandbox's first process and returns
-// its report.
+// the report it sends on the browser's pipe.
func runProbe(t *testing.T, cfg LaunchConfig, args ...string) probeReport {
t.Helper()
ctx, cancel := context.WithTimeout(context.Background(), time.Minute)
@@ -153,13 +154,13 @@ func runProbe(t *testing.T, cfg LaunchConfig, args ...string) probeReport {
if err != nil {
t.Fatal(err)
}
+ raw, rerr := readFrame(bufio.NewReader(s.FromBrowser), 64<<20)
if _, err = s.Wait(); err != nil {
t.Fatalf("probe: %v: %s", err, s.stderr.Bytes())
}
s.Close()
- raw, err := os.ReadFile(filepath.Join(cfg.Out, "probe.json"))
- if err != nil {
- t.Fatalf("probe report: %v: %s", err, s.stderr.Bytes())
+ if rerr != nil {
+ t.Fatalf("probe report: %v: %s", rerr, s.stderr.Bytes())
}
var r probeReport
if err = json.Unmarshal(raw, &r); err != nil {
@@ -172,9 +173,9 @@ func runProbe(t *testing.T, cfg LaunchConfig, args ...string) probeReport {
// host but the descriptors it binds, and the environment cleared.
func TestBwrapArgs(t *testing.T) {
want := "--unshare-all --unshare-user --die-with-parent --new-session --clearenv --cap-drop ALL" +
- " --info-fd 11 --ro-bind-fd 6 /usr --symlink usr/lib /lib --symlink usr/lib64 /lib64 --symlink usr/bin /bin" +
- " --ro-bind-fd 7 /etc/fonts --ro-bind-fd 8 /runner --ro-bind-fd 9 /site --bind-fd 10 /out" +
- " --tmpfs /tmp --proc /proc --dev /dev --remount-ro / --chdir / -- /runner render-sandbox"
+ " --info-fd 10 --ro-bind-fd 6 /usr --symlink usr/lib /lib --symlink usr/lib64 /lib64 --symlink usr/bin /bin" +
+ " --ro-bind-fd 7 /etc/fonts --ro-bind-fd 8 /runner --ro-bind-fd 9 /site" +
+ " --size 536870912 --tmpfs /tmp --proc /proc --dev /dev --remount-ro / --chdir / -- /runner render-sandbox"
got := bwrapArgs(Subcommand)
if strings.Join(got, " ") != want {
t.Fatalf("bwrap args\n got %s\nwant %s", strings.Join(got, " "), want)
@@ -300,13 +301,14 @@ func TestSandboxEnvironmentIsEmpty(t *testing.T) {
}
}
-// /site, the tree, the binary and the root are read only; /out and /tmp
-// are the only places the sandbox writes.
+// /site, the tree, the binary and the root are read only, and there is
+// no /out: /tmp, which ends with the sandbox, is the only place it
+// writes.
func TestSandboxSiteIsReadOnly(t *testing.T) {
cfg := testConfig(t, false)
r := runProbe(t, cfg)
for op, e := range r.Writes {
- writable := op == "create /out/new" || op == "create /tmp/new"
+ writable := op == "create /tmp/new"
switch {
case writable && e != "":
t.Errorf("%s: %s", op, e)
@@ -330,7 +332,7 @@ func TestSandboxSiteIsReadOnly(t *testing.T) {
func TestSandboxHoldsNoRunnerState(t *testing.T) {
cfg := testConfig(t, false)
r := runProbe(t, cfg)
- allowed := map[string]bool{"/": true, "/bin": true, "/lib": true, "/lib64": true, "/etc": true, "/etc/fonts": true, binaryPath: true, "/site": true, "/site/index.html": true, "/out": true, "/tmp": true, "/usr": true, "/proc": true, "/dev": true}
+ allowed := map[string]bool{"/": true, "/bin": true, "/lib": true, "/lib64": true, "/etc": true, "/etc/fonts": true, binaryPath: true, "/site": true, "/site/index.html": true, "/tmp": true, "/usr": true, "/proc": true, "/dev": true}
for _, p := range r.Paths {
if !allowed[p] {
t.Errorf("the sandbox shows %s", p)
@@ -402,6 +404,7 @@ func TestLaunchStartsTheBrowser(t *testing.T) {
if got := ask("post " + s.Site + "index.html"); got != "405" {
t.Fatalf("post %q", got)
}
+ raw := []byte(ask("report"))
s.ToBrowser.WriteString("exit 7\x00")
exit, err := s.Wait()
if err != nil || exit != (BrowserExit{Known: true, Code: 7}) {
@@ -410,10 +413,6 @@ func TestLaunchStartsTheBrowser(t *testing.T) {
if _, err = from.ReadByte(); err == nil {
t.Fatal("the browser's pipe is still open")
}
- raw, err := os.ReadFile(filepath.Join(cfg.Out, "browser.json"))
- if err != nil {
- t.Fatal(err)
- }
var b browserReport
if err = json.Unmarshal(raw, &b); err != nil {
t.Fatal(err)
@@ -513,26 +512,30 @@ func TestLaunchRefusesAnUnverifiedTree(t *testing.T) {
t.Run(name, func(t *testing.T) {
cfg := testConfig(t, false)
c.change(&cfg)
+ forked := noFork(t)
_, err := Launch(context.Background(), cfg)
var re *release.RendererError
if !errors.As(err, &re) || re.Health != c.health {
t.Fatalf("Launch: %v, want %s", err, c.health)
}
- if names, _ := os.ReadDir(cfg.Out); len(names) != 0 {
- t.Fatalf("something ran: %v", names)
+ if *forked {
+ t.Fatal("something ran")
}
})
}
}
+// noFork records whether the launcher forked, until the test ends.
+func noFork(t *testing.T) *bool {
+ t.Helper()
+ forked := new(bool)
+ testBeforeFork = func() { *forked = true }
+ t.Cleanup(func() { testBeforeFork = nil })
+ return forked
+}
+
func TestLaunchRefusesItsInputs(t *testing.T) {
base := testConfig(t, false)
- used := testOut(t)
- must(t, os.WriteFile(filepath.Join(used, "x"), nil, 0o600))
- open := testOut(t)
- must(t, os.Chmod(open, 0o755))
- link := filepath.Join(tempDir(t), "link")
- must(t, os.Symlink(testOut(t), link))
shared := testSite(t)
must(t, os.Chmod(shared, 0o775))
siteLink := filepath.Join(tempDir(t), "site-link")
@@ -548,14 +551,9 @@ func TestLaunchRefusesItsInputs(t *testing.T) {
"shared site": {func(c *LaunchConfig) { c.Site = shared }, "only this user can write"},
"root's site": {func(c *LaunchConfig) { c.Site = "/usr" }, "only this user can write"},
"symlinked site": {func(c *LaunchConfig) { c.Site = siteLink }, "symbolic links"},
- "relative out": {func(c *LaunchConfig) { c.Out = "out" }, "launch path"},
- "used out": {func(c *LaunchConfig) { c.Out = used }, "not empty"},
- "open out": {func(c *LaunchConfig) { c.Out = open }, "not private"},
- "symlinked out": {func(c *LaunchConfig) { c.Out = link }, "symbolic links"},
"unclean tree": {func(c *LaunchConfig) { c.Tree += "/" }, "launch path"},
} {
cfg := base
- cfg.Out = testOut(t)
c.change(&cfg)
s, err := Launch(context.Background(), cfg)
if err == nil {
@@ -690,13 +688,14 @@ func TestLaunchRefusesATreeReplacedAfterVerification(t *testing.T) {
must(t, os.WriteFile(filepath.Join(p, "lib/chromium/chromium-headless-shell"), []byte("#!/bin/sh\n"), 0o755))
}
defer func() { testAfterVerify = nil }()
+ forked := noFork(t)
_, err := Launch(context.Background(), cfg)
var re *release.RendererError
if !errors.As(err, &re) || re.Health != wire.ToolMismatch || !strings.Contains(re.Reason, "changed while it was verified") {
t.Fatalf("Launch: %v", err)
}
- if names, _ := os.ReadDir(cfg.Out); len(names) != 0 {
- t.Fatalf("something ran: %v", names)
+ if *forked {
+ t.Fatal("something ran")
}
})
}
@@ -743,8 +742,8 @@ func TestLaunchRefusesATreeOthersCanMove(t *testing.T) {
}
// When Close returns, every process of the sandbox has ended, even one
-// that left all the sandbox's pipes, started its own session and kept
-// writing to /out. Three rounds: a Close that does not wait returns while
+// that started its own session and kept writing to the browser's pipe,
+// which the test still reads after Close. Three rounds: a Close that does not wait returns while
// that writer still runs in most rounds, not all.
func TestCloseReturnsOnlyWhenEverythingEnded(t *testing.T) {
for round := 0; round < 3; round++ {
@@ -761,9 +760,20 @@ func closeAWriter(t *testing.T) {
if err != nil {
t.Fatal(err)
}
+ // The test's own reader of the browser's pipe outlives Close, so
+ // the pipe stays open to a writer that survives it.
+ ticks := dupReader(t, s.FromBrowser)
+ defer ticks.Close()
s.ToBrowser.WriteString("spawn\x00")
- if reply, err := bufio.NewReader(s.FromBrowser).ReadString(0); err != nil || reply != "spawned\x00" {
- t.Fatalf("spawn: %q %v", reply, err)
+ var seen []byte
+ ticks.SetReadDeadline(time.Now().Add(10 * time.Second))
+ for !bytes.Contains(seen, []byte("spawned\x00")) || !bytes.Contains(seen, []byte(".")) {
+ buf := make([]byte, 4096)
+ n, err := ticks.Read(buf)
+ if err != nil {
+ t.Fatalf("spawn: %q %v", seen, err)
+ }
+ seen = append(seen, buf[:n]...)
}
inside := descendants(s.cmd.Process.Pid)
t.Cleanup(func() {
@@ -774,11 +784,8 @@ func closeAWriter(t *testing.T) {
if err = s.Close(); err != nil {
t.Fatalf("Close: %v", err)
}
- ticks := filepath.Join(cfg.Out, "ticks")
- before, err := os.Stat(ticks)
- if err != nil {
- t.Fatal(err)
- }
+ // What was written before Close is taken at once; after it, nothing.
+ drain(ticks, time.Millisecond)
for _, n := range inside {
if alive(n) {
raw, _ := os.ReadFile(filepath.Join("/proc", strconv.Itoa(n), "status"))
@@ -786,8 +793,37 @@ func closeAWriter(t *testing.T) {
}
}
time.Sleep(100 * time.Millisecond)
- if after, err := os.Stat(ticks); err != nil || after.Size() != before.Size() {
- t.Fatalf("/out was still written after Close: %d then %v %v", before.Size(), after, err)
+ if n := drain(ticks, 20*time.Millisecond); n != 0 {
+ t.Fatalf("the browser's pipe was still written after Close: %d bytes", n)
+ }
+}
+
+// dupReader is a second reader of f's pipe, with its own deadlines.
+func dupReader(t *testing.T, f *os.File) *os.File {
+ t.Helper()
+ rc, err := f.SyscallConn()
+ if err != nil {
+ t.Fatal(err)
+ }
+ fd := -1
+ if cerr := rc.Control(func(raw uintptr) { fd, err = unix.FcntlInt(raw, unix.F_DUPFD_CLOEXEC, 0) }); cerr != nil || err != nil {
+ t.Fatal(cerr, err)
+ }
+ must(t, unix.SetNonblock(fd, true))
+ return os.NewFile(uintptr(fd), "ticks")
+}
+
+// drain reads what r holds, for at most d, and returns how much.
+func drain(r *os.File, d time.Duration) int {
+ r.SetReadDeadline(time.Now().Add(d))
+ total := 0
+ buf := make([]byte, 64<<10)
+ for {
+ n, err := r.Read(buf)
+ total += n
+ if err != nil {
+ return total
+ }
}
}
@@ -808,7 +844,7 @@ func TestLaunchRealBrowser(t *testing.T) {
sum := sha256.Sum256(manifest)
var stderr bounded
stderr.max = 64 << 10
- cfg := LaunchConfig{Bwrap: bwrap, Binary: self, Tree: tree, Pin: hex.EncodeToString(sum[:]), Site: testSite(t), Out: testOut(t), Stderr: &stderr}
+ cfg := LaunchConfig{Bwrap: bwrap, Binary: self, Tree: tree, Pin: hex.EncodeToString(sum[:]), Site: testSite(t), Stderr: &stderr}
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Minute)
defer cancel()
s, err := Launch(ctx, cfg)
diff --git a/internal/runner/render/memory_linux_test.go b/internal/runner/render/memory_linux_test.go
index 27887bd3..009a7ed6 100644
--- a/internal/runner/render/memory_linux_test.go
+++ b/internal/runner/render/memory_linux_test.go
@@ -3,10 +3,12 @@
package render
import (
+ "bufio"
"context"
"fmt"
"os"
"os/exec"
+ "path/filepath"
"strconv"
"strings"
"sync/atomic"
@@ -110,16 +112,11 @@ func TestSandboxHasTheMemoryLimit(t *testing.T) {
t.Fatal(err)
}
defer s.Close()
- // The fake browser writes browser.json once it runs.
- deadline := time.Now().Add(10 * time.Second)
- for {
- if _, err := os.Stat(cfg.Out + "/browser.json"); err == nil {
- break
- }
- if time.Now().After(deadline) {
- t.Fatal("the browser did not start")
- }
- time.Sleep(10 * time.Millisecond)
+ // The fake browser answers once it runs.
+ s.FromBrowser.SetReadDeadline(time.Now().Add(10 * time.Second))
+ s.ToBrowser.WriteString("ping\x00")
+ if reply, err := readFrame(bufio.NewReader(s.FromBrowser), 64); err != nil || string(reply) != "ping" {
+ t.Fatalf("the browser did not start: %q %v", reply, err)
}
want := fmt.Sprintf("%d", MemoryLimit)
var browser, sandbox bool
@@ -154,3 +151,62 @@ func TestSandboxHasTheMemoryLimit(t *testing.T) {
t.Fatalf("browser %v, render-sandbox %v found below bubblewrap", browser, sandbox)
}
}
+
+// The sandbox's /tmp holds at most TmpSize: a writer filling it gets
+// ENOSPC near the bound.
+func TestSandboxTmpIsBounded(t *testing.T) {
+ cfg := testConfig(t, false)
+ r := runProbe(t, cfg, "fill-tmp")
+ if r.Fill == nil || !strings.Contains(r.Fill.Err, "no space left on device") {
+ t.Fatalf("fill %+v", r.Fill)
+ }
+ if r.Fill.Bytes > TmpSize || r.Fill.Bytes < TmpSize-(8<<20) {
+ t.Fatalf("wrote %d bytes before %s, bound %d", r.Fill.Bytes, r.Fill.Err, TmpSize)
+ }
+}
+
+// Render's out directory is the runner's: refused, before any sandbox
+// starts, unless it is absolute, clean, empty, private, this user's and
+// reached through no symlink.
+func TestRenderRefusesItsOutDir(t *testing.T) {
+ // A launch that would start: only the out directory stops it.
+ cfg := testConfig(t, true)
+ used := testOut(t)
+ must(t, os.WriteFile(filepath.Join(used, "x"), nil, 0o600))
+ open := testOut(t)
+ must(t, os.Chmod(open, 0o755))
+ link := filepath.Join(tempDir(t), "link")
+ must(t, os.Symlink(testOut(t), link))
+ file := filepath.Join(tempDir(t), "file")
+ must(t, os.WriteFile(file, nil, 0o600))
+ forked := noFork(t)
+ for name, c := range map[string]struct{ dir, why string }{
+ "relative": {"out", "output path"},
+ "unclean": {testOut(t) + "/", "output path"},
+ "used": {used, "not empty"},
+ "open": {open, "not private"},
+ "symlinked": {link, "symbolic links"},
+ "a file": {file, "not a directory"},
+ "missing": {filepath.Join(tempDir(t), "absent"), "no such file"},
+ "root's": {"/usr", "only this user can write"},
+ } {
+ _, err := Render(context.Background(), cfg, c.dir, []Page{{Path: "/", Viewport: Phone}})
+ if err == nil || !strings.Contains(err.Error(), c.why) {
+ t.Errorf("%s: %v, want %q", name, err, c.why)
+ }
+ }
+ if *forked {
+ t.Fatal("a sandbox started")
+ }
+ // A good one is held and written through.
+ dir := testOut(t)
+ root, err := openOut(dir)
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer root.Close()
+ must(t, root.WriteFile("page-1.png", []byte("x"), 0o600))
+ if _, err := os.Stat(filepath.Join(dir, "page-1.png")); err != nil {
+ t.Fatal(err)
+ }
+}
diff --git a/internal/runner/render/out_linux.go b/internal/runner/render/out_linux.go
new file mode 100644
index 00000000..1888ae37
--- /dev/null
+++ b/internal/runner/render/out_linux.go
@@ -0,0 +1,24 @@
+//go:build linux
+
+package render
+
+import (
+ "fmt"
+ "os"
+ "path/filepath"
+)
+
+// openOut opens Render's output directory: an absolute, clean path to an
+// empty directory, mode 0700, owned by this user, reached through no
+// symlink (pinOutDir), held from then on by its descriptor.
+func openOut(dir string) (*os.Root, error) {
+ if !filepath.IsAbs(dir) || filepath.Clean(dir) != dir {
+ return nil, fmt.Errorf("render: output path %q", dir)
+ }
+ f, err := pinOutDir(dir)
+ if err != nil {
+ return nil, err
+ }
+ defer f.Close()
+ return os.OpenRoot(fmt.Sprintf("/proc/self/fd/%d", f.Fd()))
+}
diff --git a/internal/runner/render/out_other.go b/internal/runner/render/out_other.go
new file mode 100644
index 00000000..6603c780
--- /dev/null
+++ b/internal/runner/render/out_other.go
@@ -0,0 +1,8 @@
+//go:build !linux
+
+package render
+
+import "os"
+
+// openOut is os.OpenRoot elsewhere: Launch refuses to start off Linux.
+func openOut(dir string) (*os.Root, error) { return os.OpenRoot(dir) }
diff --git a/internal/runner/render/render.go b/internal/runner/render/render.go
index 1197c5c2..3ae7ce46 100644
--- a/internal/runner/render/render.go
+++ b/internal/runner/render/render.go
@@ -34,8 +34,6 @@ const (
BrowserPath = "/usr/lib/chromium/chromium-headless-shell"
// SiteDir holds the exported site, read only.
SiteDir = "/site"
- // OutDir is the one directory the sandbox can write that outlives it.
- OutDir = "/out"
// binaryPath is where the runner's own executable is bound, read only.
binaryPath = "/runner"
// browserHome is the browser's HOME and the parent of its profile:
@@ -74,6 +72,11 @@ func browserArgs() []string {
}
}
+// TmpSize bounds the sandbox's /tmp, a tmpfs (the browser's profile and
+// caches): a write past it fails with ENOSPC. tmpfs pages are memory no
+// process's resident set shows, so MemoryLimit does not cover them.
+const TmpSize = 512 << 20
+
// StartTimeout bounds how long Launch waits for the sandbox to report
// ready when LaunchConfig.StartTimeout is zero.
const StartTimeout = 30 * time.Second
@@ -94,9 +97,6 @@ type LaunchConfig struct {
// directory this user owns that nobody else can write, reached
// through no symlink.
Site string
- // Out is an empty directory, mode 0700, owned by this user and
- // reached through no symlink, bound read-write at /out.
- Out string
// StartTimeout bounds the wait for the sandbox to report ready; zero
// means StartTimeout.
StartTimeout time.Duration