oficina / equipo Public

renderer: build the tree, its MANIFEST and renderer.tar.gz; link the pin

What changed
- scripts/build-renderer-tree.py PIN TAR [--tree DIR]: fetches every
  amd64 deb of internal/release/renderer.json (snapshot.debian.org URL,
  size and SHA-256 checked), unpacks their data.tar members in pin order
  into one tree, writes MANIFEST (one line per entry, sorted by path:
  "dir <path>", "file <path> <sha256> <mode>", "link <path> <target>")
  and a deterministic renderer.tar.gz holding MANIFEST and the tree
  (path order, uid/gid 0, no names, mtime 0, PAX; gzip with no name and
  mtime 0). Prints the MANIFEST's SHA-256. Refuses: a bad hash or size,
  a non-snapshot URL, a link that climbs out of the tree (resolved
  through links, not lexically) or names nothing in it, a member path
  outside the tree or through a link, two packages disagreeing about a
  path, names with white space or control characters, a deb shipping
  MANIFEST, and a pin whose program is not an executable file. A refused
  build leaves no tar and no scratch tree.
- Debian's absolute links (fontconfig-config's 20 /etc/fonts/conf.d ->
  /usr/share/fontconfig links, by policy) are rewritten to the same path
  relative to the link, then must resolve like any other; an absolute
  target outside the tree fails. File modes are 0755 or 0644.
- internal/release/renderer.go: rendererSHA256 (ldflag) and
  RendererPin(), which reports wire.ToolUnpinned when nothing (or a
  malformed digest) was linked.
- Makefile release-runner builds renderer.tar.gz into the runner release
  and links -X internal/release.rendererSHA256=<MANIFEST sha256> into the
  Linux runner only. InstallTarget gains RendererSHA256
  (renderer_sha256); runner-install-manifest.py records it from the tar's
  MANIFEST; staged-artifacts.py holds the Linux target to that tar (it
  compared the target dict exactly, so make release would otherwise
  refuse every new build).
- Tests: synthetic debs built in Go (ar + data.tar.gz), the script's
  fetch replaced in a python prelude; no unit test downloads. The
  equipotest release harness stubs the script and checks the ldflag and
  the install manifest. Allowlist line hash and equipotest size record
  (+1 line) updated.

Test commands
  CGO_ENABLED=0 go test ./internal/release/ -run 'TestRendererTree|TestRendererPinUnpinned' -count=1
  CGO_ENABLED=0 go test ./internal/release/ -count=1
  CGO_ENABLED=0 go test ./internal/equipotest/ -run 'TestRunnerReleaseContract|TestReleasePinsAndProvenance|TestReleaseBuildsFromOneCommit' -count=1

RED
- TestRendererTree*: "testci: declare ../../scripts/build-renderer-tree.py:
  no such file or directory"; TestRendererPinUnpinned: linked "": got ""
  "", want "" "unpinned" (and the same for a malformed digest).
- TestOnboardingInstallPackaging: "renderer pin missing from release";
  TestStagedArtifactsGate: staged_gate_test.go:125 exit status 1 (the
  gate refused the target with renderer_sha256); equipotest release-runner
  clean: missing build "... -X ...release.rendererSHA256=...".

GREEN
- ok internal/release (all tests), ok internal/equipotest (the release
  tests above). Darwin cross build and vet gates pass.

Mutations (guard broken -> test that failed -> restored)
- hash check off -> Refuses/bad_deb_hash; size check off -> wrong_deb_size;
  URL prefix off -> not_a_snapshot_URL (first version survived: the test
  matched a traceback; tightened the message and fixture, then killed)
- climb-out check off -> escaping_link, escaping_through_a_link,
  absolute_link_climbing_out; lexical instead of link-following
  resolution -> escaping_through_a_link
- absolute rewrite off -> IsDeterministic; absolute links unchecked ->
  absolute_link_outside_the_tree; dangling allowed -> same
- path through a link allowed -> a_path_through_a_link; disagreement
  allowed -> two_packages_disagree; member path check off ->
  path_climbing_out, absolute_path; name check off -> a_name_the_MANIFEST;
  MANIFEST name allowed -> the_tree's_own_MANIFEST; program check off ->
  no_program
- tar mtime from the clock, tar owner from the process, gzip mtime
  default, gzip name set, tar order unsorted, MANIFEST unsorted, raw deb
  modes -> each IsDeterministic
- partial tar not removed -> Refuses/escaping_link ("left .partial")
- RendererPin without the digest check -> TestRendererPinUnpinned
- Makefile ldflag removed -> TestReleasePinsAndProvenance/release-runner;
  install target field removed -> TestOnboardingInstallPackaging;
  staged gate not reading the tar -> TestStagedArtifactsGate
All restored; file checksums matched afterwards.

Real run (internal/release/renderer.json, scratch in $TMPDIR, deleted)
- 98 packages, 2316 entries (486 dir, 1698 file, 132 link), 66 s.
- MANIFEST sha256 8f27c7adf358cd4c9f31fb16a06449ecf67696864f35b54005574b0a9ce8dae8
- renderer.tar.gz 230650088 bytes, sha256
  52782d2339b5ec2510c28cd336aebda8cea1acfee0a79a20d285b73b3ef48265;
  a second build (no --tree) was byte-identical.
- scripts/renderer-spike.sh render on the kept tree: browser exit 0,
  PNG 1440x900, pixel (0,0) #3366cc.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 09a70065c278a84b6f9772f7127cd1c375b37bec parent 3c40537
12 files changed, +867 −13
  • .rastrillo/budgets.txt +1 −1
  • Makefile +7 −1
  • internal/equipotest/runner_release_test.go +3 −2
  • internal/release/install.go +4 −1
  • internal/release/install_test.go +9 −1
  • internal/release/renderer.go +19 −0
  • internal/release/renderer_tree_test.go +436 −0
  • internal/release/staged_gate_test.go +4 −1
  • scripts/build-renderer-tree.py +353 −0
  • scripts/runner-install-manifest.py +14 −2
  • scripts/runner-reference-allowlist.json +1 −1
  • scripts/staged-artifacts.py +16 −3

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   85G
ci-box: disk /home/ci/.cache/equipo-ci-box: Type  Size Avail | ext4   96G   85G
ci-box: bwrap: fetched and verified in 0.3s
ci-box: claude: fetched and verified in 1.7s
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 10.0s
ci-box: pi: installed and verified in 7.6s
ci-box: opencode: installed and verified in 2.3s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 8.6s
ci-box: clone deepened in 6.1s
ci-box: file times set from content: 3291 files, 213 directories
ci-box: ready in 19.9s
=== 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.145s
=== compile ===
go build ./...
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py compile
+ go build -tags testbuild ./...
  5.4s
+ go list -export -test -tags testbuild -f  ./...
  5.1s
+ 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
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/headless TestHeadless
=== RUN   TestHeadless
--- FAIL: TestHeadless (68.66s)

--- FAIL amadan.net/oficina/equipo/internal/headless TestHeadless/4c_rebase
=== RUN   TestHeadless/4c_rebase
time=2026-11-28T17:14:06.195Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-28T17:14:06.195Z level=INFO msg="startup phase done" phase=state_lock took=165µs
time=2026-11-28T17:14:06.195Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-28T17:14:06.196Z level=INFO msg="startup phase done" phase=claim_roots took=354µs
time=2026-11-28T17:14:06.196Z level=INFO msg="startup phase" phase=sweep
time=2026-11-28T17:14:06.233Z level=INFO msg="startup phase done" phase=sweep took=37.489ms
time=2026-11-28T17:14:06.233Z level=INFO msg="startup phase" phase=credentials
time=2026-11-28T17:14:06.233Z level=INFO msg="startup phase done" phase=credentials took=113µs
time=2026-11-28T17:14:06.233Z level=INFO msg="startup phase" phase=open_state
time=2026-11-28T17:14:06.275Z level=INFO msg="startup phase done" phase=open_state took=41.131ms
time=2026-11-28T17:14:06.275Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-28T17:14:06.276Z level=INFO msg=connecting host=127.0.0.1:46777 protocol=35
time=2026-11-28T17:14:06.278Z level=INFO msg=connected host=127.0.0.1:46777 took=2.238ms
time=2026-11-28T17:14:06.279Z level=INFO msg="capabilities gathering"
time=2026-11-28T17:14:06.282Z level=INFO msg="capabilities gathered" took=3.371ms tags=linux,claude,go
time=2026-11-28T17:14:06.283Z level=INFO msg="hello sent" protocol=35
time=2026-11-28T17:14:06.287Z level=INFO msg=welcome protocol=35 role=primary generation=1
time=2026-11-28T17:14:07.136Z level=INFO msg="connection checked" connection=claude-1 state=healthy
time=2026-11-28T17:14:11.010Z level=INFO msg="kept sessions" kept=1 bytes=2939 expired=0
time=2026-11-28T17:14:16.556Z level=INFO msg="kept sessions" kept=2 bytes=5145 expired=0
    merge_test.go:245: steps [engineering:done checks:passed review:approve merge:merge_conflict engineering:queued], want [engineering:done checks:passed review:approve merge:merge_conflict engineering:done checks:passed review:approve merge:done] (in_progress )
time=2026-11-28T17:14:16.664Z level=WARN msg="step clone" err="signal: killed"
time=2026-11-28T17:14:16.664Z level=WARN msg="step sweep" err=cancelled
time=2026-11-28T17:14:16.664Z level=WARN msg="kept sessions" err=cancelled
--- FAIL: TestHeadless/4c_rebase (10.95s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m8.656s
FAIL	amadan.net/oficina/equipo/internal/headless	68.953s


receipt: test step 1m10.776s 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 1m8.656s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m8.66s amadan.net/oficina/equipo/internal/headless TestHeadless
exit status 1
+ go test -tags testbuild -timeout 15m -run '^TestHeadless$/^4c_rebase$|^TestHeadless$/^4b_ask$|^TestHeadless$/^4c_checks_card$|^TestHeadless$/^4_step_crash$' -v -run '^TestHeadless$/^4c_rebase$' -count=1 ./internal/headless   (retry, once)
##############################################################################
FLAKE ./internal/headless:TestHeadless/4c_rebase headless-work 09a70065c278a84b6f9772f7127cd1c375b37bec 10.95s 59.50
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 57.14, cpu waiting 36.18%, memory waiting 0.00%, io waiting 0.35%
--- 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 1m18.27s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m16.097s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m16.1s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 57.94, cpu waiting 36.58%, memory waiting 0.00%, io waiting 0.43%
--- 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 1m18.636s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m16.502s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m7.26s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 4.95s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 4.29s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 56.10, cpu waiting 36.58%, memory waiting 0.00%, io waiting 0.43%
--- 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 1m16.418s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m14.181s amadan.net/oficina/equipo/internal/headless
receipt: slow test 36.93s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 19.15s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.08s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
receipt: slow test 9.02s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
machine: 32 CPUs, load 57.94, cpu waiting 36.60%, memory waiting 0.00%, io waiting 0.44%
--- 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 1m34.771s 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.249s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m2.18s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.58s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 8.28s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 7.38s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 4.82s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
machine: 32 CPUs, load 54.81, cpu waiting 35.88%, memory waiting 0.00%, io waiting 0.34%
--- 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 2m56.972s 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 2m54.276s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m38.15s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistant
receipt: slow test 20.16s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.15s amadan.net/oficina/equipo/internal/headless TestHeadlessResearchHandoff
receipt: slow test 7.18s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistantAttachments
receipt: slow test 6.69s amadan.net/oficina/equipo/internal/headless TestHeadlessTurnBatching
machine: 32 CPUs, load 24.41, cpu waiting 10.01%, memory waiting 0.00%, io waiting 0.07%
--- shard 6 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane thintest: ./internal/thintest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test([^C]|C[^o]|Co[^n]|Con[^t])|^TestContract(Assistant|Outcome|Team|Handoff|HostAllowlist|HostIsPerPerson|Look|Use[A-Z]|RemoteCall|LanesRunAtOnce|NoMergeQuestionWhenGateMerges|PreviewHeldUntilPublishAnswer|PreviewNotHeldBelow19|PublishNeedsOwnerAnswer)' ./internal/thintest

receipt: test step 2m15.665s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 2m13.153s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 11.07s amadan.net/oficina/equipo/internal/thintest TestContractTeamJobSettledStates
receipt: slow test 6.74s amadan.net/oficina/equipo/internal/thintest TestExplorePreviewsOff
receipt: slow test 4.12s amadan.net/oficina/equipo/internal/thintest TestContractPreviewHeldUntilPublishAnswer
receipt: slow test 3.95s amadan.net/oficina/equipo/internal/thintest TestContractTeamNudgePersonNeeds
receipt: slow test 2.64s amadan.net/oficina/equipo/internal/thintest TestContractTeamUpdatePersonNeeds
machine: 32 CPUs, load 34.85, cpu waiting 19.35%, 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
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/thintest TestContractChecksPlacedOnTheWorker
=== RUN   TestContractChecksPlacedOnTheWorker
    placement_contract_test.go:272: waiting for send_pack: failed to get reader: context deadline exceeded
--- FAIL: TestContractChecksPlacedOnTheWorker (45.29s)

--- FAIL amadan.net/oficina/equipo/internal/thintest (package output)
FAIL
rastrillo-budget/v1 ran 2m37.177s
FAIL	amadan.net/oficina/equipo/internal/thintest	157.435s


receipt: test step 2m39.889s 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 2m37.177s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 45.29s amadan.net/oficina/equipo/internal/thintest TestContractChecksPlacedOnTheWorker
receipt: slow test 9.29s amadan.net/oficina/equipo/internal/thintest TestContractRetryPreviewUnverifiedMerge
receipt: slow test 8.88s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 4.85s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotOffered
receipt: slow test 4.57s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
exit status 1
+ go 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)' -v -run '^TestContractChecksPlacedOnTheWorker$' -count=1 ./internal/thintest   (retry, once)
##############################################################################
FLAKE ./internal/thintest:TestContractChecksPlacedOnTheWorker thintest-contract 09a70065c278a84b6f9772f7127cd1c375b37bec 45.29s 27.05
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 27.05, cpu waiting 13.07%, memory waiting 0.00%, io waiting 0.10%
--- 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 5m12.421s, over the 45s its record on line 44 allows; reported only, timing fails on CI

receipt: test step 5m18.199s 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 5m12.421s amadan.net/oficina/equipo/internal/runner/thin
receipt: slow test 37.06s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeAnsweredByAnotherModel
receipt: slow test 36.9s amadan.net/oficina/equipo/internal/runner/thin TestModelsEngineeringProbesThenRunsTheStrongest
receipt: slow test 36.82s 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.89s amadan.net/oficina/equipo/internal/runner/thin TestTimeoutKeepsNothingForAnOlderInstance
machine: 32 CPUs, load 4.06, cpu waiting 0.96%, 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.109s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 50.107s amadan.net/oficina/equipo/internal/runner
receipt: slow test 30.07s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.03s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 57.08, cpu waiting 32.86%, memory waiting 0.00%, io waiting 0.69%
--- 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 58.901s 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 57.568s amadan.net/oficina/equipo/internal/runner
receipt: slow test 47.57s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 43.18s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.42s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.56s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 57.15, cpu waiting 36.09%, memory waiting 0.00%, io waiting 0.60%
--- shard 11 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-rest: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^TestDirectBugWorkflow$|^TestEnrolKeepsTheRole$|^TestPlanWorkflowCandidateOrder$|^TestPlanWorkflowFeature$|^TestCoordinatorRecoveryCallRefusalKeepsServing$|^TestCoordinatorRefusalMatrix$' ./internal/runner

receipt: test step 36.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 35.117s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.13s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.27s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.12s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 2.79s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 1.61s amadan.net/oficina/equipo/internal/runner TestReportPostsRetryExactRequest
machine: 32 CPUs, load 33.10, cpu waiting 21.92%, memory waiting 0.00%, io waiting 0.88%
--- 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 39.8%, load 25.19
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
        reference scan: 3003 text files, 3232 matches, 3 failures
--- FAIL: TestDirectDeadReferencesRepository (2.33s)

--- FAIL amadan.net/oficina/equipo/internal/equipotest (package output)
FAIL
rastrillo-budget/v1 ran 1m6.981s
FAIL	amadan.net/oficina/equipo/internal/equipotest	67.379s


receipt: test step 1m9.172s 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 1m6.981s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 28.55s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 28.49s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 26.29s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 23.52s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
receipt: slow test 23.45s amadan.net/oficina/equipo/internal/equipotest TestAuthProductionConfig
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
        reference scan: 3003 text files, 3232 matches, 3 failures
--- FAIL: TestDirectDeadReferencesRepository (2.23s)
FAIL
rastrillo-budget/v1 ran 2.229s
FAIL	amadan.net/oficina/equipo/internal/equipotest	2.391s
FAIL
machine: 32 CPUs, load 52.02, cpu waiting 31.81%, memory waiting 0.00%, io waiting 0.28%
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 39.8%, load 25.19
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.414s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 2m11.209s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 20.21s amadan.net/oficina/equipo/internal/equipotest TestProjectsFailuresRollBack
receipt: slow test 20.18s amadan.net/oficina/equipo/internal/equipotest TestProjectsReopen
receipt: slow test 20.18s amadan.net/oficina/equipo/internal/equipotest TestProjectWritesRequireCurrentOwner
receipt: slow test 20.11s amadan.net/oficina/equipo/internal/equipotest TestProjectOwnersAreMembers
receipt: slow test 20.1s amadan.net/oficina/equipo/internal/equipotest TestProjectKindsAndDefaultBranch
machine: 32 CPUs, load 25.28, cpu waiting 12.64%, memory waiting 0.00%, io waiting 0.10%
--- shard 14 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-r started 30s late; cpu waiting 38.6%, load 25.19
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 5m31.943s, over the 5m0s its record on line 15 allows; reported only, timing fails on CI

receipt: test step 5m37.379s 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 5m31.943s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 4m40.71s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 12.85s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 9.82s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 9.74s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 6.72s amadan.net/oficina/equipo/internal/equipotest TestRosterBootstrapOnce
machine: 32 CPUs, load 2.39, cpu waiting 0.41%, 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 38.6%, load 25.19
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.854s 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.715s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 25.69s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 25.69s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 25.07s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 23.88s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsUpgrade
receipt: slow test 23.83s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsRollbackAndUnavailable
machine: 32 CPUs, load 52.02, cpu waiting 33.69%, memory waiting 0.00%, io waiting 0.30%
--- 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 38.6%, load 25.19
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 55.636s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 53.286s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 3.94s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 3.44s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 1.82s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.58s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3A
receipt: slow test 1.31s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorMessageSourcesUpgrade
machine: 32 CPUs, load 56.89, cpu waiting 36.93%, memory waiting 0.00%, io waiting 0.39%
--- 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 38.6%, load 25.19
test lane rest: ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/diffscan ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/door ./internal/equipo/github ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/pause ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/push ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/idtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/claude/realcli ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/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/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/provider/opencode: 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
cache miss: amadan.net/oficina/equipo/internal/testci: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/pi: its inputs changed
budget note: internal/equipo took 2m21.501s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/equipo/chat took 22.358s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/equipo/github took 40.581s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/equipo/setup took 10.58s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/idtest took 1m50.45s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/release took 35.925s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/runner/containment took 57.836s, over the 15s its record on line 40 allows; reported only, timing fails on CI
budget note: internal/runner/forge took 22.439s, over the 20s its record on line 35 allows; reported only, timing fails on CI
budget note: internal/runner/provider/claude/realcli took 13.727s, over the 10s the default allows; reported only, timing fails on CI

receipt: test step 2m30.223s against a 60s target (the gate's other steps are not in this figure)
receipt: 30 packages ran, 39 cached, 16 without tests, 0 failed
receipt: slow package 2m21.501s amadan.net/oficina/equipo/internal/equipo
receipt: slow package 1m50.45s amadan.net/oficina/equipo/internal/idtest
receipt: slow package 1m7.378s amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow package 57.836s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow package 53.184s amadan.net/oficina/equipo/internal/runner/provider/pi
receipt: slow test 56s amadan.net/oficina/equipo/internal/idtest TestDoorRemembersOficinaID
receipt: slow test 47.09s amadan.net/oficina/equipo/internal/idtest TestDoorOficinaSettingsUnreadableIsNoLoop
receipt: slow test 46.85s amadan.net/oficina/equipo/internal/idtest TestDoorStepUpIsLocal
receipt: slow test 45.69s amadan.net/oficina/equipo/internal/idtest TestDoorNeverJudgesANativeSession
receipt: slow test 45.63s amadan.net/oficina/equipo/internal/idtest TestDoorForgetsOficinaIDForARefusedSession
machine: 32 CPUs, load 22.62, cpu waiting 9.37%, 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 1m24.987s 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.099s amadan.net/oficina/equipo/internal/headless
receipt: slow test 38.78s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 14.72s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 10.14s amadan.net/oficina/equipo/internal/headless TestBrowserChat
receipt: slow test 7.55s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 6.52s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
machine: 32 CPUs, load 56.89, cpu waiting 36.93%, memory waiting 0.00%, io waiting 0.39%
--- 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 1m31.55s 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 1m29.585s amadan.net/oficina/equipo/internal/headless
receipt: slow test 28.3s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 21.14s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 13.37s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 9.27s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
receipt: slow test 8.68s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
machine: 32 CPUs, load 57.14, cpu waiting 35.88%, memory waiting 0.00%, io waiting 0.34%
--- 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 1m53.28s 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 1m51.665s amadan.net/oficina/equipo/internal/headless
receipt: slow test 14.36s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 13.36s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 13.2s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 11.17s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsSignInEmail
receipt: slow test 11.05s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
machine: 32 CPUs, load 43.66, cpu waiting 26.51%, memory waiting 0.00%, io waiting 0.23%
--- 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-28T17:13:55.132Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-28T17:13:55.132Z level=INFO msg="startup phase done" phase=state_lock took=68µs
time=2026-11-28T17:13:55.132Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-28T17:13:55.132Z level=INFO msg="startup phase done" phase=claim_roots took=85µs
time=2026-11-28T17:13:55.132Z level=INFO msg="startup phase" phase=sweep
time=2026-11-28T17:13:55.182Z level=INFO msg="startup phase done" phase=sweep took=49.478ms
time=2026-11-28T17:13:55.182Z level=INFO msg="startup phase" phase=credentials
time=2026-11-28T17:13:55.182Z level=INFO msg="startup phase done" phase=credentials took=107µs
time=2026-11-28T17:13:55.182Z level=INFO msg="startup phase" phase=open_state
time=2026-11-28T17:13:55.234Z level=INFO msg="startup phase done" phase=open_state took=52.524ms
time=2026-11-28T17:13:55.235Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-28T17:13:55.236Z level=INFO msg=connecting host=127.0.0.1:35313 protocol=35
time=2026-11-28T17:13:55.239Z level=INFO msg=connected host=127.0.0.1:35313 took=2.759ms
time=2026-11-28T17:13:55.239Z level=INFO msg="capabilities gathering"
time=2026-11-28T17:13:55.246Z level=INFO msg="capabilities gathered" took=7.012ms tags=linux,claude,go
time=2026-11-28T17:13:55.250Z level=INFO msg="hello sent" protocol=35
time=2026-11-28T17:13:55.257Z 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.54s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m39.409s
FAIL	amadan.net/oficina/equipo/internal/headless	99.621s


receipt: test step 1m41.214s 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 1m39.409s amadan.net/oficina/equipo/internal/headless
receipt: slow test 15.11s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
receipt: slow test 13.32s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 10.48s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 9.35s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 7.34s 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 09a70065c278a84b6f9772f7127cd1c375b37bec 6.54s 52.02
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 49.06, cpu waiting 30.90%, memory waiting 0.00%, io waiting 0.27%
--- 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.348s 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.495s amadan.net/oficina/equipo/internal/equipo
receipt: slow test 1.84s amadan.net/oficina/equipo/internal/equipo TestBrowserPreviewPassExchange
receipt: slow test 660ms amadan.net/oficina/equipo/internal/equipo TestBrowserPreviewBlocksNavigation
browser lane browser-rest: ./internal/equipotest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserGitHubManifestCSP)$' ./internal/equipotest

receipt: test step 8.234s 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.538s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 6.53s amadan.net/oficina/equipo/internal/equipotest TestBrowserGitHubManifestCSP
browser lane browser-rest: ./internal/idtest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserOficinaIDDoor|TestBrowserSmartDoor)$' ./internal/idtest
budget note: internal/idtest took 11.245s, over the 10s the default allows; reported only, timing fails on CI

receipt: test step 12.823s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 11.245s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 9.18s amadan.net/oficina/equipo/internal/idtest TestBrowserSmartDoor
receipt: slow test 2.06s 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.04s 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.344s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 2.34s 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 3m33.936s 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 3m31.378s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 24.44s amadan.net/oficina/equipo/internal/thintest TestBrowserAccessRequest
receipt: slow test 14.4s amadan.net/oficina/equipo/internal/thintest TestBrowserSettingsTeams
receipt: slow test 12.08s amadan.net/oficina/equipo/internal/thintest TestBrowserThinkingCycles
receipt: slow test 10.69s amadan.net/oficina/equipo/internal/thintest TestBrowserPlacementQuestionAndPending
receipt: slow test 9.27s amadan.net/oficina/equipo/internal/thintest TestBrowserRhythm
machine: 32 CPUs, load 9.26, cpu waiting 3.22%, 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   (52s)
ok ./internal/headless TestHeadlessConnections/A5_cancel_and_sign_out 4.78s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.25s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 8.28s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 8.68s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 26.41s
+ 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   (70s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 14.19s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 21.05s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 19.47s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 12.41s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless   (21s)
ok ./internal/headless TestMixedVersions 18.57s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks   (2s)
ok ./internal/runner/checks TestCheckSandboxDeniedPathsTampering 0.79s
+ go test -tags testbuild -timeout 15m -v -run '^TestRunnerCancelAndSupersede$' ./internal/runner/thin   (2s)
ok ./internal/runner/thin TestRunnerCancelAndSupersede 0.05s
quarantine: 0 flaked (passed on the retry), 0 failed
machine: 32 CPUs, load 59.50, cpu waiting 36.94%, memory waiting 0.00%, io waiting 0.51%
--- shard 24 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
shard 24: make runner-host
python3 scripts/runner-prerequisites.py
CGO_ENABLED=0 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks

receipt: test step 12.848s 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.472s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 204ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 112ms amadan.net/oficina/equipo/internal/runner/provider/codex
receipt: slow package 2ms amadan.net/oficina/equipo/internal/runner/provider
receipt: slow package 1ms amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow test 5.27s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.75s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 350ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 200ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/provider/codex TestDirectJournalAdapterBarrier
CGO_ENABLED=0 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run '^TestNamespace' -count=1 ./internal/runner/containment
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run '^TestNamespace' -count=1 ./internal/runner/containment

receipt: test step 4.187s 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.087s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 290ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 200ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof
receipt: slow test 130ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReapsOrphans
receipt: slow test 130ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryCleansScratch
machine: 32 CPUs, load 18.59, cpu waiting 10.17%, memory waiting 0.00%, io waiting 1.23%
--- shard 25 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: runner-dead-references started 30s late; cpu waiting 38.6%, load 25.19
shard 25: make runner-dead-references lanes-check build vet fmt-check spacing budget migration-check
python3 scripts/runner-dead-references.py
reference scan: 3003 text files, 3232 matches, 3 failures
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
make[1]: *** [Makefile:238: runner-dead-references] Error 1
machine: 32 CPUs, load 25.19, cpu waiting 16.69%, memory waiting 0.00%, io waiting 0.97%
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 39.8%, load 25.19
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 57.08, cpu waiting 34.07%, memory waiting 0.00%, io waiting 0.67%
--- 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 38.6%, load 25.19
shard 27: make govulncheck
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 ./...
=== Symbol Results ===

No vulnerabilities found.

Your code is affected by 0 vulnerabilities.
This scan also found 1 vulnerability in packages you import and 10
vulnerabilities in modules you require, but your code doesn't appear to call
these vulnerabilities.
Use '-show verbose' for more details.
machine: 32 CPUs, load 57.08, cpu waiting 34.07%, memory waiting 0.00%, io waiting 0.67%
--- shard 28 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: gitleaks started 30s late; cpu waiting 38.6%, load 25.19
shard 28: make gitleaks
5:13PM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
5:13PM INF 1269 commits scanned.
5:13PM INF scanned ~68920071 bytes (68.92 MB) in 23.9s
5:13PM INF no leaks found
machine: 32 CPUs, load 57.08, cpu waiting 34.07%, memory waiting 0.00%, io waiting 0.67%

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/.rastrillo/budgets.txt b/.rastrillo/budgets.txt
index f8c47b83..e200a2ff 100644
--- a/.rastrillo/budgets.txt
+++ b/.rastrillo/budgets.txt
@@ -16,7 +16,7 @@ time internal/equipotest 300s Final fix package rerun measured 187.035s (review
size internal/equipo 23925 - Preview grants, retry/timeline, no-access merges, kept work, check-db copy, notification actions, places page and its superseded card, GitHub owner routes; measured 23925 source lines.
size internal/wire 8171 - Protocol 31 facts, 32 unfinished work, task evidence, CI units, notification inputs, 33 Assistant files, 34 places, 35 diffs; measured 8171 source lines.
-size internal/equipotest - 12683 GitHub connect value search, lifecycle and sweep-log contracts; Task 21 migration fixtures and Rastrillo asset contract; measured 0/12683 source/test lines.
+size internal/equipotest - 12684 GitHub connect value search, lifecycle and sweep-log contracts; Task 21 migration fixtures, Rastrillo asset contract, renderer pin link; measured 0/12684 source/test lines.
time internal/runner/checks 90s CI worker measured 44.553s (44.6s rounded);
time internal/runner 330s Plan 3 CI repair measured 292.120s for the full package (controller CI 472.184s).
diff --git a/Makefile b/Makefile
index 3c06c7a0..51d8d739 100644
--- a/Makefile
+++ b/Makefile
@@ -275,6 +275,11 @@ direct-release-check:
# binary carries its commit (go version -m), the tool proxy too.
TOOL_PROXY_SHA256 = $$(sha256sum $(RUNNER_RELEASE_DIR)/equipo-tool-proxy | cut -d ' ' -f 1)
GITLEAKS_SHA256 = $$(sha256sum $(RUNNER_RELEASE_DIR)/gitleaks | cut -d ' ' -f 1)
+# The renderer tree (scripts/build-renderer-tree.py, from the pinned debs
+# of internal/release/renderer.json) is named by its MANIFEST: that
+# digest is linked into the Linux runner as gitleaks' is, and recorded in
+# the install manifest's Linux target. A Mac runner has no renderer.
+RENDERER_SHA256 = $$(tar -xzOf $(RUNNER_RELEASE_DIR)/renderer.tar.gz MANIFEST | sha256sum | cut -d ' ' -f 1)
RELEASE_LDFLAGS = -s -w -X amadan.net/rastrillo/rastrillo.BuildVersion=$$(git rev-parse --short HEAD) -X amadan.net/oficina/equipo/internal/release.toolProxySHA256=$(TOOL_PROXY_SHA256)
release-runner: copy-release-check direct-release-check
@@ -286,8 +291,9 @@ release-runner: copy-release-check direct-release-check
@mkdir -p $(RUNNER_RELEASE_DIR)/darwin-arm64
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -mod=readonly -trimpath -o $(abspath $(RUNNER_RELEASE_DIR))/darwin-arm64/gitleaks github.com/zricethezav/gitleaks/v8
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags "-s -w" -o $(RUNNER_RELEASE_DIR)/equipo-tool-proxy ./cmd/equipo-tool-proxy
+ python3 scripts/build-renderer-tree.py internal/release/renderer.json $(RUNNER_RELEASE_DIR)/renderer.tar.gz
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath \
- -ldflags "$(RELEASE_LDFLAGS) -X amadan.net/oficina/equipo/internal/release.gitleaksSHA256=$(GITLEAKS_SHA256)" \
+ -ldflags "$(RELEASE_LDFLAGS) -X amadan.net/oficina/equipo/internal/release.gitleaksSHA256=$(GITLEAKS_SHA256) -X amadan.net/oficina/equipo/internal/release.rendererSHA256=$(RENDERER_SHA256)" \
-o $(RUNNER_RELEASE_DIR)/equipo-runner ./cmd/equipo-runner
scripts/no-fake-worker.sh $(RUNNER_RELEASE_DIR)/equipo-runner
@mkdir -p $(RUNNER_RELEASE_DIR)/darwin-arm64
diff --git a/internal/equipotest/runner_release_test.go b/internal/equipotest/runner_release_test.go
index 8cf3afd9..945b2e7b 100644
--- a/internal/equipotest/runner_release_test.go
+++ b/internal/equipotest/runner_release_test.go
@@ -97,6 +97,7 @@ func runnerPackagingScenarios(t *testing.T, target string, scenarios []string) {
"carlos": "#!/bin/sh\nexit 99\n",
}
scripts["go"] = strings.Replace(scripts["go"], "version) rev=abc1234;", `version) case "$3" in */gitleaks) printf '\tmod\tgithub.com/zricethezav/gitleaks/v8\tv8.30.1\th1:fixture\n'; exit 0;; esac; rev=abc1234;`, 1)
+ scripts["../scripts/build-renderer-tree.py"] = "import gzip, hashlib, io, sys, tarfile\nassert sys.argv[1] == 'internal/release/renderer.json' and sys.argv[2].endswith('-abc1234/renderer.tar.gz')\nm = b'dir usr\\n'\nwith gzip.open(sys.argv[2], 'wb') as g, tarfile.open(fileobj=g, mode='w|') as t:\n i = tarfile.TarInfo('MANIFEST'); i.size = len(m); t.addfile(i, io.BytesIO(m))\nprint(hashlib.sha256(m).hexdigest())\n" // a tree of one directory: the script itself is tested in internal/release
for name, script := range scripts {
executionMust(t, os.WriteFile(filepath.Join(bin, name), []byte(script), 0700))
}
@@ -161,7 +162,7 @@ func runnerPackagingScenarios(t *testing.T, target string, scenarios []string) {
flags := "-s -w -X amadan.net/rastrillo/rastrillo.BuildVersion=abc1234 -X amadan.net/oficina/equipo/internal/release.toolProxySHA256=" + proxy
for _, build := range []string{
"linux/amd64\nbuild\n-trimpath\n-ldflags\n-s -w\n-o\nreleases/equipo-runner-linux-amd64-abc1234/equipo-tool-proxy\n./cmd/equipo-tool-proxy\n",
- "linux/amd64\nbuild\n-trimpath\n-ldflags\n" + flags + " -X amadan.net/oficina/equipo/internal/release.gitleaksSHA256=" + digest(filepath.Join(dir, "gitleaks")) + "\n-o\nreleases/equipo-runner-linux-amd64-abc1234/equipo-runner\n",
+ "linux/amd64\nbuild\n-trimpath\n-ldflags\n" + flags + " -X amadan.net/oficina/equipo/internal/release.gitleaksSHA256=" + digest(filepath.Join(dir, "gitleaks")) + " -X amadan.net/oficina/equipo/internal/release.rendererSHA256=" + fmt.Sprintf("%x", sha256.Sum256([]byte("dir usr\n"))) + "\n-o\nreleases/equipo-runner-linux-amd64-abc1234/equipo-runner\n",
"darwin/arm64\nbuild\n-trimpath\n-ldflags\n" + flags + " -X amadan.net/oficina/equipo/internal/release.gitleaksSHA256=" + digest(filepath.Join(dir, "darwin-arm64", "gitleaks")) + "\n-o\nreleases/equipo-runner-linux-amd64-abc1234/darwin-arm64/equipo-runner\n",
} {
if !strings.Contains(string(raw), build) {
@@ -193,7 +194,7 @@ func runnerPackagingScenarios(t *testing.T, target string, scenarios []string) {
var install release.InstallManifest
readJSON(filepath.Join(dir, "install-manifest.json"), &install)
runner, mac := digest(filepath.Join(dir, "equipo-runner")), digest(filepath.Join(dir, "darwin-arm64/equipo-runner"))
- if install.Validate("abc1234") != nil || !reflect.DeepEqual(install.Release, shipped) || install.RunnerSHA256 != runner || !reflect.DeepEqual(install.Targets, map[string]release.InstallTarget{release.TargetLinux: {RunnerSHA256: runner, ToolProxySHA256: proxy, GitleaksSHA256: digest(filepath.Join(dir, "gitleaks"))}, release.TargetDarwin: {RunnerSHA256: mac, GitleaksSHA256: digest(filepath.Join(dir, "darwin-arm64", "gitleaks"))}}) {
+ if install.Validate("abc1234") != nil || !reflect.DeepEqual(install.Release, shipped) || install.RunnerSHA256 != runner || !reflect.DeepEqual(install.Targets, map[string]release.InstallTarget{release.TargetLinux: {RunnerSHA256: runner, ToolProxySHA256: proxy, GitleaksSHA256: digest(filepath.Join(dir, "gitleaks")), RendererSHA256: fmt.Sprintf("%x", sha256.Sum256([]byte("dir usr\n")))}, release.TargetDarwin: {RunnerSHA256: mac, GitleaksSHA256: digest(filepath.Join(dir, "darwin-arm64", "gitleaks"))}}) {
t.Fatalf("install manifest %+v", install)
}
if _, err := os.Stat(filepath.Join(dir, "evidence")); !os.IsNotExist(err) {
diff --git a/internal/release/install.go b/internal/release/install.go
index a16ad9fa..eeb72bc4 100644
--- a/internal/release/install.go
+++ b/internal/release/install.go
@@ -26,9 +26,12 @@ type InstallManifest struct {
Targets map[string]InstallTarget `json:"targets,omitempty"`
}
-// InstallTarget is one platform's runner and tool proxy digests.
+// InstallTarget is one platform's runner and tool proxy digests, and on
+// Linux the renderer tree's: the SHA-256 of renderer.tar.gz's MANIFEST,
+// the pin linked into that runner (rendererSHA256).
type InstallTarget struct {
GitleaksSHA256 string `json:"gitleaks_sha256,omitempty"`
+ RendererSHA256 string `json:"renderer_sha256,omitempty"`
RunnerSHA256 string `json:"runner_sha256"`
ToolProxySHA256 string `json:"tool_proxy_sha256,omitempty"`
}
diff --git a/internal/release/install_test.go b/internal/release/install_test.go
index 277b09a5..15266da2 100644
--- a/internal/release/install_test.go
+++ b/internal/release/install_test.go
@@ -33,6 +33,7 @@ func TestOnboardingInstallPackaging(t *testing.T) {
write("equipo-runner", binary)
write("gitleaks", binary)
write("equipo-tool-proxy", []byte("fixture helper"))
+ renderer := writeRendererTar(t, filepath.Join(root, "renderer.tar.gz"), "dir usr\n")
script, e := os.ReadFile("../../packaging/install/install-v1.sh")
if e != nil {
t.Fatal(e)
@@ -54,6 +55,11 @@ func TestOnboardingInstallPackaging(t *testing.T) {
if manifest.Gitleaks != GitleaksVersion || manifest.Targets[TargetLinux].GitleaksSHA256 != fmt.Sprintf("%x", sha256.Sum256(binary)) {
t.Fatal("scanner missing from release", manifest)
}
+ // The Linux target names the renderer tree by its MANIFEST, the pin
+ // the runner is linked with.
+ if manifest.Targets[TargetLinux].RendererSHA256 != renderer {
+ t.Fatal("renderer pin missing from release", manifest)
+ }
if manifest.RunnerSHA256 != fmt.Sprintf("%x", sha256.Sum256(binary)) {
t.Fatal("checksum mismatch")
}
@@ -170,6 +176,7 @@ func TestInstallPackagingDarwinTarget(t *testing.T) {
write("install-v1.sh", []byte("#!/bin/sh\n"))
write("darwin-arm64/equipo-runner", []byte("mac runner"))
write("darwin-arm64/gitleaks", []byte("mac scanner"))
+ writeRendererTar(t, filepath.Join(root, "renderer.tar.gz"), "dir usr\n")
testci.Files(t, "../../scripts/runner-install-manifest.py")
if b, e := exec.Command("python3", "../../scripts/runner-install-manifest.py", root, "fixture-16").CombinedOutput(); e != nil {
t.Fatalf("packaging %v %s", e, b)
@@ -180,7 +187,8 @@ func TestInstallPackagingDarwinTarget(t *testing.T) {
t.Fatalf("linux manifest broken: %s", raw)
}
mac, err := manifest.DarwinTarget("fixture-16")
- if err != nil || mac.RunnerSHA256 != fmt.Sprintf("%x", sha256.Sum256([]byte("mac runner"))) || mac.ToolProxySHA256 != "" {
+ // A Mac worker has no tool proxy and no renderer.
+ if err != nil || mac.RunnerSHA256 != fmt.Sprintf("%x", sha256.Sum256([]byte("mac runner"))) || mac.ToolProxySHA256 != "" || mac.RendererSHA256 != "" {
t.Fatalf("darwin target %+v %v", mac, err)
}
if linux := manifest.Targets["linux/amd64"]; linux.RunnerSHA256 != manifest.RunnerSHA256 {
diff --git a/internal/release/renderer.go b/internal/release/renderer.go
new file mode 100644
index 00000000..8aa73f09
--- /dev/null
+++ b/internal/release/renderer.go
@@ -0,0 +1,19 @@
+package release
+
+import "amadan.net/oficina/equipo/internal/wire"
+
+// Linked from the release's renderer tree (Makefile, release-runner):
+// the SHA-256 of its MANIFEST, as scripts/build-renderer-tree.py printed
+// it. Only the Linux runner has one.
+var rendererSHA256 string
+
+// RendererPin is the renderer pin linked into this build. With none, or
+// a malformed one, it is "" and health is wire.ToolUnpinned: no tree on
+// disk can be checked against it. With a pin, health is "" and the tree
+// decides.
+func RendererPin() (pin, health string) {
+ if !sha256Hex(rendererSHA256) {
+ return "", wire.ToolUnpinned
+ }
+ return rendererSHA256, ""
+}
diff --git a/internal/release/renderer_tree_test.go b/internal/release/renderer_tree_test.go
new file mode 100644
index 00000000..199d630d
--- /dev/null
+++ b/internal/release/renderer_tree_test.go
@@ -0,0 +1,436 @@
+package release
+
+import (
+ "archive/tar"
+ "bytes"
+ "compress/gzip"
+ "crypto/sha256"
+ "encoding/hex"
+ "encoding/json"
+ "fmt"
+ "io"
+ "os"
+ "os/exec"
+ "path/filepath"
+ "slices"
+ "strings"
+ "testing"
+ "time"
+
+ "amadan.net/oficina/equipo/internal/testci"
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// debMember is one entry of a fixture deb's data.tar: a file (body), a
+// link (link) or a directory (dir).
+type debMember struct {
+ name, body, link string
+ mode int64
+ dir bool
+}
+
+// fixtureDeb is a small Debian package as dpkg-deb builds one: an ar
+// archive of debian-binary, control.tar.gz and data.tar.gz. Its members
+// carry a build machine's owner and times, which the tree must not keep.
+func fixtureDeb(t *testing.T, members []debMember) []byte {
+ t.Helper()
+ targz := func(members []debMember) []byte {
+ var b bytes.Buffer
+ gz := gzip.NewWriter(&b)
+ tw := tar.NewWriter(gz)
+ for _, m := range members {
+ h := &tar.Header{Name: m.name, Mode: m.mode, Uid: 1000, Gid: 1000, Uname: "builder", Gname: "builder", ModTime: time.Unix(1764000000, 0)}
+ switch {
+ case m.dir:
+ h.Typeflag = tar.TypeDir
+ case m.link != "":
+ h.Typeflag, h.Linkname = tar.TypeSymlink, m.link
+ default:
+ h.Typeflag, h.Size = tar.TypeReg, int64(len(m.body))
+ }
+ if err := tw.WriteHeader(h); err != nil {
+ t.Fatal(err)
+ }
+ if _, err := io.WriteString(tw, m.body); err != nil {
+ t.Fatal(err)
+ }
+ }
+ if err := tw.Close(); err != nil {
+ t.Fatal(err)
+ }
+ if err := gz.Close(); err != nil {
+ t.Fatal(err)
+ }
+ return b.Bytes()
+ }
+ var ar bytes.Buffer
+ ar.WriteString("!<arch>\n")
+ member := func(name string, body []byte) {
+ fmt.Fprintf(&ar, "%-16s%-12d%-6d%-6d%-8o%-10d`\n", name, 1764000000, 0, 0, 0o100644, len(body))
+ ar.Write(body)
+ if len(body)%2 == 1 {
+ ar.WriteByte('\n')
+ }
+ }
+ member("debian-binary", []byte("2.0\n"))
+ member("control.tar.gz", targz([]debMember{{name: "./control", body: "Package: fixture\n", mode: 0o644}}))
+ member("data.tar.gz", targz(members))
+ return ar.Bytes()
+}
+
+// rendererFixture is a pin of three small packages (in the pin's sorted
+// order) and their debs by URL: the browser, a fonts config whose links
+// are absolute as Debian writes them (one top-level directory to
+// another), and a loader. The fonts link's target comes from a later
+// package; two packages ship the same directory and one identical file.
+type rendererFixture struct {
+ packages map[string][]debMember
+ order []string
+ edit func(p *rendererPackage)
+}
+
+func newRendererFixture() *rendererFixture {
+ return &rendererFixture{
+ order: []string{"chromium-headless-shell", "fontconfig-config", "fonts-fixture", "libc6"},
+ packages: map[string][]debMember{
+ "chromium-headless-shell": {
+ {name: "./", dir: true, mode: 0o755},
+ {name: "./usr/", dir: true, mode: 0o755},
+ {name: "./usr/lib/", dir: true, mode: 0o755},
+ {name: "./usr/lib/chromium/", dir: true, mode: 0o755},
+ {name: "./usr/lib/chromium/chromium-headless-shell", body: "browser", mode: 0o755},
+ // No ./usr/bin/ member: its directory is implied.
+ {name: "./usr/bin/chromium-headless-shell", link: "../lib/chromium/chromium-headless-shell", mode: 0o777},
+ {name: "./usr/share/doc/shared/copyright", body: "same words", mode: 0o644},
+ },
+ "fontconfig-config": {
+ {name: "./etc/", dir: true, mode: 0o755},
+ {name: "./etc/fonts/", dir: true, mode: 0o755},
+ {name: "./etc/fonts/conf.d/", dir: true, mode: 0o755},
+ {name: "./etc/fonts/conf.d/10-fixture.conf", link: "/usr/share/fontconfig/conf.avail/10-fixture.conf", mode: 0o777},
+ },
+ "fonts-fixture": {
+ {name: "./usr/share/fontconfig/conf.avail/10-fixture.conf", body: "<fontconfig/>", mode: 0o664},
+ {name: "./usr/share/doc/shared/copyright", body: "same words", mode: 0o644},
+ },
+ "libc6": {
+ {name: "./usr/", dir: true, mode: 0o755},
+ {name: "./usr/lib64/", dir: true, mode: 0o755},
+ {name: "./usr/lib64/ld-linux-x86-64.so.2", body: "loader", mode: 0o4775},
+ },
+ },
+ }
+}
+
+// write puts the pin and its debs in dir and returns the pin's path and
+// the URL-to-file map the script's fetch reads.
+func (f *rendererFixture) write(t *testing.T, dir string) (string, map[string]string) {
+ t.Helper()
+ pin := rendererPin{Version: "1.0-1", Snapshots: map[string]string{"debian": "20990101T000000Z"}, Program: "usr/lib/chromium/chromium-headless-shell"}
+ urls := map[string]string{}
+ for _, name := range f.order {
+ deb := fixtureDeb(t, f.packages[name])
+ sum := sha256.Sum256(deb)
+ p := rendererPackage{Package: name, Version: "1.0-1", Architecture: "amd64",
+ URL: fmt.Sprintf("https://snapshot.debian.org/archive/debian/20990101T000000Z/pool/main/%c/%s/%s_1.0-1_amd64.deb", name[0], name, name),
+ SHA256: hex.EncodeToString(sum[:]), Size: int64(len(deb)), Base: name == "libc6"}
+ path := filepath.Join(dir, name+".deb")
+ if err := os.WriteFile(path, deb, 0o600); err != nil {
+ t.Fatal(err)
+ }
+ if f.edit != nil {
+ f.edit(&p)
+ }
+ urls[p.URL] = path
+ pin.AMD64 = append(pin.AMD64, p)
+ }
+ raw, err := json.Marshal(pin)
+ if err != nil {
+ t.Fatal(err)
+ }
+ path := filepath.Join(dir, "renderer.json")
+ if err = os.WriteFile(path, raw, 0o600); err != nil {
+ t.Fatal(err)
+ }
+ return path, urls
+}
+
+// buildRendererTree runs scripts/build-renderer-tree.py on the fixture,
+// its fetch reading the fixture debs instead of the network. clock, when
+// set, is what the script's time.time returns: the output must not
+// depend on it.
+func buildRendererTree(t *testing.T, pin string, urls map[string]string, out string, clock float64, extra ...string) (string, string, error) {
+ t.Helper()
+ fixture, err := json.Marshal(urls)
+ if err != nil {
+ t.Fatal(err)
+ }
+ const prelude = `
+import importlib.util, json, os, sys, time
+if float(sys.argv[2]):
+ time.time = lambda: float(sys.argv[2])
+ os.umask(0o077)
+spec = importlib.util.spec_from_file_location("tree", "../../scripts/build-renderer-tree.py")
+m = importlib.util.module_from_spec(spec)
+spec.loader.exec_module(m)
+urls = json.loads(sys.argv[1])
+m.fetch = lambda url: open(urls[url], "rb").read()
+sys.exit(m.main(sys.argv[3:]))
+`
+ cmd := exec.Command("python3", append([]string{"-I", "-c", prelude, string(fixture), fmt.Sprint(clock), pin, out}, extra...)...)
+ cmd.Env = append(os.Environ(), "PYTHONDONTWRITEBYTECODE=1")
+ var stdout, stderr bytes.Buffer
+ cmd.Stdout, cmd.Stderr = &stdout, &stderr
+ err = cmd.Run()
+ return stdout.String(), stderr.String(), err
+}
+
+// The release's renderer: every pinned deb unpacked into one tree, listed
+// by MANIFEST (one line per entry, sorted by path), both in a gzip tar
+// whose bytes depend only on the pin. A Debian absolute link becomes the
+// same path relative to the link, so no entry points out of the tree.
+func TestRendererTreeIsDeterministic(t *testing.T) {
+ testci.Files(t, "../../scripts/build-renderer-tree.py")
+ testci.Tools(t, "python3")
+ dir := t.TempDir()
+ pin, urls := newRendererFixture().write(t, dir)
+ first, second := filepath.Join(dir, "a", "renderer.tar.gz"), filepath.Join(dir, "b", "renderer.tar.gz")
+ for _, d := range []string{filepath.Dir(first), filepath.Dir(second)} {
+ if err := os.Mkdir(d, 0o700); err != nil {
+ t.Fatal(err)
+ }
+ }
+ pinA, stderr, err := buildRendererTree(t, pin, urls, first, 0)
+ if err != nil {
+ t.Fatalf("build: %v\n%s", err, stderr)
+ }
+ // Another clock and umask: the same bytes.
+ pinB, stderr, err := buildRendererTree(t, pin, urls, second, 4102444800)
+ if err != nil {
+ t.Fatalf("build again: %v\n%s", err, stderr)
+ }
+ a, _ := os.ReadFile(first)
+ b, _ := os.ReadFile(second)
+ if len(a) == 0 || !bytes.Equal(a, b) || pinA != pinB {
+ t.Fatalf("two builds of one pin differ: %d and %d bytes, pins %q %q", len(a), len(b), pinA, pinB)
+ }
+ // gzip: no file name, no time (RFC 1952: FLG, then MTIME).
+ if a[0] != 0x1f || a[1] != 0x8b || a[3] != 0 || !bytes.Equal(a[4:8], []byte{0, 0, 0, 0}) {
+ t.Fatalf("gzip header % x", a[:10])
+ }
+ sum := func(s string) string { h := sha256.Sum256([]byte(s)); return hex.EncodeToString(h[:]) }
+ want := strings.Join([]string{
+ "dir etc",
+ "dir etc/fonts",
+ "dir etc/fonts/conf.d",
+ "link etc/fonts/conf.d/10-fixture.conf ../../../usr/share/fontconfig/conf.avail/10-fixture.conf",
+ "dir usr",
+ "dir usr/bin",
+ "link usr/bin/chromium-headless-shell ../lib/chromium/chromium-headless-shell",
+ "dir usr/lib",
+ "dir usr/lib/chromium",
+ "file usr/lib/chromium/chromium-headless-shell " + sum("browser") + " 0755",
+ "dir usr/lib64",
+ "file usr/lib64/ld-linux-x86-64.so.2 " + sum("loader") + " 0755",
+ "dir usr/share",
+ "dir usr/share/doc",
+ "dir usr/share/doc/shared",
+ "file usr/share/doc/shared/copyright " + sum("same words") + " 0644",
+ "dir usr/share/fontconfig",
+ "dir usr/share/fontconfig/conf.avail",
+ "file usr/share/fontconfig/conf.avail/10-fixture.conf " + sum("<fontconfig/>") + " 0644",
+ }, "\n") + "\n"
+
+ gz, err := gzip.NewReader(bytes.NewReader(a))
+ if err != nil {
+ t.Fatal(err)
+ }
+ if gz.Name != "" || !gz.ModTime.IsZero() {
+ t.Fatalf("gzip header names %q at %v", gz.Name, gz.ModTime)
+ }
+ tr := tar.NewReader(gz)
+ var names []string
+ var manifest string
+ for {
+ h, err := tr.Next()
+ if err == io.EOF {
+ break
+ }
+ if err != nil {
+ t.Fatal(err)
+ }
+ // A directory's tar name ends in a slash; its path does not.
+ name := strings.TrimSuffix(h.Name, "/")
+ names = append(names, name)
+ if h.Uid != 0 || h.Gid != 0 || h.Uname != "" || h.Gname != "" || h.ModTime.Unix() != 0 {
+ t.Errorf("%s: owner %d:%d %q:%q, time %v", h.Name, h.Uid, h.Gid, h.Uname, h.Gname, h.ModTime)
+ }
+ body, _ := io.ReadAll(tr)
+ var line string
+ switch h.Typeflag {
+ case tar.TypeDir:
+ line = "dir " + name
+ if h.Mode != 0o755 {
+ t.Errorf("%s: mode %o", h.Name, h.Mode)
+ }
+ case tar.TypeSymlink:
+ line = "link " + h.Name + " " + h.Linkname
+ case tar.TypeReg:
+ if h.Name == "MANIFEST" {
+ manifest = string(body)
+ if h.Mode != 0o644 {
+ t.Errorf("MANIFEST mode %o", h.Mode)
+ }
+ continue
+ }
+ line = fmt.Sprintf("file %s %s %04o", h.Name, sum(string(body)), h.Mode)
+ default:
+ t.Errorf("%s: type %c", h.Name, h.Typeflag)
+ }
+ // Every entry is the MANIFEST line that names it.
+ if !strings.Contains(want, line+"\n") {
+ t.Errorf("tar entry %q is not in the MANIFEST", line)
+ }
+ }
+ if manifest != want {
+ t.Fatalf("MANIFEST:\n%s\nwant:\n%s", manifest, want)
+ }
+ if !slices.IsSorted(names) || len(names) != strings.Count(want, "\n")+1 || names[0] != "MANIFEST" {
+ t.Fatalf("tar entries %v", names)
+ }
+ // The script prints the MANIFEST's SHA-256: the pin the runner is linked with.
+ if pinA != sum(manifest)+"\n" {
+ t.Fatalf("printed %q, MANIFEST is %s", pinA, sum(manifest))
+ }
+
+ // --tree keeps the unpacked tree, its MANIFEST at the root.
+ tree := filepath.Join(dir, "tree")
+ if _, stderr, err = buildRendererTree(t, pin, urls, filepath.Join(dir, "c.tar.gz"), 0, "--tree", tree); err != nil {
+ t.Fatalf("build with --tree: %v\n%s", err, stderr)
+ }
+ kept, _ := os.ReadFile(filepath.Join(tree, "MANIFEST"))
+ link, _ := os.Readlink(filepath.Join(tree, "etc/fonts/conf.d/10-fixture.conf"))
+ if string(kept) != want || link != "../../../usr/share/fontconfig/conf.avail/10-fixture.conf" {
+ t.Fatalf("kept tree: MANIFEST %q, link %q", kept, link)
+ }
+ if font, err := os.ReadFile(filepath.Join(tree, "etc/fonts/conf.d/10-fixture.conf")); err != nil || string(font) != "<fontconfig/>" {
+ t.Fatalf("the kept tree's link does not reach its target: %q %v", font, err)
+ }
+}
+
+// A deb that is not the pinned one, or a tree that would point outside
+// itself, builds nothing: no tar, no scratch tree left beside it.
+func TestRendererTreeRefuses(t *testing.T) {
+ testci.Files(t, "../../scripts/build-renderer-tree.py")
+ testci.Tools(t, "python3")
+ add := func(pkg string, m debMember) func(f *rendererFixture) {
+ return func(f *rendererFixture) { f.packages[pkg] = append(f.packages[pkg], m) }
+ }
+ for _, c := range []struct {
+ name, want string
+ change func(f *rendererFixture)
+ }{
+ {"bad deb hash", "SHA-256", func(f *rendererFixture) {
+ f.edit = func(p *rendererPackage) {
+ if p.Package == "libc6" {
+ p.SHA256 = strings.Repeat("0", 64)
+ }
+ }
+ }},
+ {"wrong deb size", "bytes", func(f *rendererFixture) {
+ f.edit = func(p *rendererPackage) {
+ if p.Package == "fonts-fixture" {
+ p.Size++
+ }
+ }
+ }},
+ {"not a snapshot URL", "want a snapshot.debian.org .deb URL", func(f *rendererFixture) {
+ f.edit = func(p *rendererPackage) {
+ p.URL = strings.Replace(p.URL, "https://snapshot.debian.org/", "http://snapshot.debian.org/", 1)
+ }
+ }},
+ {"escaping link", "climbs out of the tree", add("libc6", debMember{name: "./usr/lib64/passwd", link: "../../../etc/passwd", mode: 0o777})},
+ {"escaping through a link", "climbs out of the tree", func(f *rendererFixture) {
+ add("libc6", debMember{name: "./usr/up", link: "..", mode: 0o777})(f)
+ add("libc6", debMember{name: "./usr/out", link: "up/..", mode: 0o777})(f)
+ }},
+ {"absolute link outside the tree", "names nothing in the tree", add("libc6", debMember{name: "./usr/lib64/sh", link: "/bin/sh", mode: 0o777})},
+ {"absolute link climbing out", "climbs out of the tree", add("libc6", debMember{name: "./usr/lib64/root", link: "/../../etc", mode: 0o777})},
+ {"path climbing out", "not a path inside the tree", add("libc6", debMember{name: "./usr/../../evil", body: "x", mode: 0o644})},
+ {"absolute path", "not a path inside the tree", add("libc6", debMember{name: "/etc/evil", body: "x", mode: 0o644})},
+ {"a path through a link", "through a link", func(f *rendererFixture) {
+ add("libc6", debMember{name: "./usr/lib64/host", link: "../lib", mode: 0o777})(f)
+ add("libc6", debMember{name: "./usr/lib64/host/evil", body: "x", mode: 0o644})(f)
+ }},
+ {"two packages disagree", "disagree", add("libc6", debMember{name: "./usr/share/doc/shared/copyright", body: "other words", mode: 0o644})},
+ {"a name the MANIFEST cannot hold", "not a path inside the tree", add("libc6", debMember{name: "./usr/two words", body: "x", mode: 0o644})},
+ {"the tree's own MANIFEST", "MANIFEST", add("libc6", debMember{name: "./MANIFEST", body: "file x", mode: 0o644})},
+ {"no program", "usr/lib/chromium/chromium-headless-shell", func(f *rendererFixture) {
+ f.packages["chromium-headless-shell"][4].mode = 0o644
+ }},
+ } {
+ t.Run(c.name, func(t *testing.T) {
+ t.Parallel()
+ dir := t.TempDir()
+ f := newRendererFixture()
+ c.change(f)
+ pin, urls := f.write(t, dir)
+ out := filepath.Join(dir, "out")
+ if err := os.Mkdir(out, 0o700); err != nil {
+ t.Fatal(err)
+ }
+ stdout, stderr, err := buildRendererTree(t, pin, urls, filepath.Join(out, "renderer.tar.gz"), 0)
+ if err == nil || !strings.Contains(stderr, c.want) || stdout != "" {
+ t.Fatalf("got %v, stdout %q, stderr %q; want a refusal naming %q", err, stdout, stderr, c.want)
+ }
+ if left, _ := os.ReadDir(out); len(left) != 0 {
+ t.Fatalf("a refused build left %v", left)
+ }
+ })
+ }
+}
+
+// A runner built without a renderer pin linked reports its renderer
+// unpinned, whatever is on disk; so does a malformed pin.
+func TestRendererPinUnpinned(t *testing.T) {
+ saved := rendererSHA256
+ t.Cleanup(func() { rendererSHA256 = saved })
+ pin := strings.Repeat("ab", 32)
+ for linked, want := range map[string][2]string{
+ "": {"", wire.ToolUnpinned},
+ "not a digest": {"", wire.ToolUnpinned},
+ strings.ToUpper(pin): {"", wire.ToolUnpinned},
+ pin: {pin, ""},
+ } {
+ rendererSHA256 = linked
+ if got, health := RendererPin(); got != want[0] || health != want[1] {
+ t.Errorf("linked %q: got %q %q, want %q %q", linked, got, health, want[0], want[1])
+ }
+ }
+}
+
+// writeRendererTar writes a renderer.tar.gz holding only a MANIFEST with
+// the given text, as packaging fixtures need one, and returns its SHA-256.
+func writeRendererTar(t *testing.T, path, manifest string) string {
+ t.Helper()
+ var b bytes.Buffer
+ gz := gzip.NewWriter(&b)
+ tw := tar.NewWriter(gz)
+ if err := tw.WriteHeader(&tar.Header{Name: "MANIFEST", Mode: 0o644, Size: int64(len(manifest))}); err != nil {
+ t.Fatal(err)
+ }
+ if _, err := io.WriteString(tw, manifest); err != nil {
+ t.Fatal(err)
+ }
+ if err := tw.Close(); err != nil {
+ t.Fatal(err)
+ }
+ if err := gz.Close(); err != nil {
+ t.Fatal(err)
+ }
+ if err := os.WriteFile(path, b.Bytes(), 0o600); err != nil {
+ t.Fatal(err)
+ }
+ sum := sha256.Sum256([]byte(manifest))
+ return hex.EncodeToString(sum[:])
+}
diff --git a/internal/release/staged_gate_test.go b/internal/release/staged_gate_test.go
index 538ea2ce..eab261f3 100644
--- a/internal/release/staged_gate_test.go
+++ b/internal/release/staged_gate_test.go
@@ -40,6 +40,7 @@ func TestStagedArtifactsGate(t *testing.T) {
must(os.MkdirAll(filepath.Join(runner, "darwin-arm64"), 0700))
write(filepath.Join(runner, "darwin-arm64", "equipo-runner"), "mac runner")
write(filepath.Join(runner, "darwin-arm64", "gitleaks"), "mac scanner")
+ renderer := writeRendererTar(t, filepath.Join(runner, "renderer.tar.gz"), "dir usr\n")
gate := func(verb string, args ...string) error {
return exec.Command("python3", append([]string{filepath.Join(root, "scripts", "staged-artifacts.py"), verb, "abc1234"}, args...)...).Run()
}
@@ -49,7 +50,7 @@ func TestStagedArtifactsGate(t *testing.T) {
released := func(proxy, linux, mac string) {
release := `{"schema":3,"binaries":[{"name":"bwrap","sha256":"` + hash("bwrap") + `"},{"name":"equipo-tool-proxy","sha256":"` + hash(proxy) + `"}]}`
write(filepath.Join(runner, "manifest.json"), release)
- write(filepath.Join(runner, "install-manifest.json"), `{"gitleaks":"v8.30.1","version":"abc1234","runner_sha256":"`+hash(linux)+`","release":`+release+`,"targets":{"linux/amd64":{"runner_sha256":"`+hash(linux)+`","tool_proxy_sha256":"`+hash(proxy)+`","gitleaks_sha256":"`+hash("scanner")+`"},"darwin/arm64":{"runner_sha256":"`+hash(mac)+`","gitleaks_sha256":"`+hash("mac scanner")+`"}}}`)
+ write(filepath.Join(runner, "install-manifest.json"), `{"gitleaks":"v8.30.1","version":"abc1234","runner_sha256":"`+hash(linux)+`","release":`+release+`,"targets":{"linux/amd64":{"runner_sha256":"`+hash(linux)+`","tool_proxy_sha256":"`+hash(proxy)+`","gitleaks_sha256":"`+hash("scanner")+`","renderer_sha256":"`+renderer+`"},"darwin/arm64":{"runner_sha256":"`+hash(mac)+`","gitleaks_sha256":"`+hash("mac scanner")+`"}}}`)
}
write(filepath.Join(runner, "COMMIT"), "abc1234full\n")
bin := t.TempDir()
@@ -85,6 +86,7 @@ echo go1.26.11
"another runner": func() { released("proxy", "another runner", "mac runner") },
"another Mac runner": func() { released("proxy", "runner", "another mac runner") },
"another commit": func() { write(filepath.Join(runner, "COMMIT"), "def5678full\n") },
+ "another renderer": func() { writeRendererTar(t, filepath.Join(runner, "renderer.tar.gz"), "dir etc\n") },
} {
change()
if gate("manifest") == nil {
@@ -92,6 +94,7 @@ echo go1.26.11
}
released("proxy", "runner", "mac runner")
write(filepath.Join(runner, "COMMIT"), "abc1234full\n")
+ writeRendererTar(t, filepath.Join(runner, "renderer.tar.gz"), "dir usr\n")
}
t.Setenv("FIXTURE_SCANNER_VERSION", "v8.30.0")
if gate("manifest") == nil {
diff --git a/scripts/build-renderer-tree.py b/scripts/build-renderer-tree.py
new file mode 100755
index 00000000..d18beed7
--- /dev/null
+++ b/scripts/build-renderer-tree.py
@@ -0,0 +1,353 @@
+#!/usr/bin/env python3
+"""Build the renderer a release ships: renderer.tar.gz, one tree of the
+pinned packages and its MANIFEST.
+
+ scripts/build-renderer-tree.py PIN TAR [--tree DIR]
+
+PIN is internal/release/renderer.json. Every amd64 package it pins is
+fetched from its snapshot URL and refused unless its size and SHA-256 are
+the pin's. Their data members are unpacked, in the pin's order, into one
+tree, and MANIFEST lists every entry of it, one line each, sorted by path
+(relative to the tree's root, MANIFEST itself not listed):
+
+ dir <path>
+ file <path> <sha256> <mode>
+ link <path> <target>
+
+A file's mode is 0755 when its owner could execute it and 0644 otherwise:
+nothing is group or world writable, setuid or setgid. A link's target is
+relative and resolves, through any links on the way, to an entry inside
+the tree. Debian links one top-level directory to another with an
+absolute target (fontconfig-config's /etc/fonts/conf.d); the tree is the
+renderer's root, so such a target is written as the same path relative to
+the link, and must then resolve like any other. The build refuses a
+target that climbs out of the tree or names nothing in it, a member path
+that is not inside the tree or goes through a link, a name the MANIFEST
+cannot hold (white space, control characters), two packages that
+disagree about a path, and a pin whose program is not an executable file.
+
+TAR holds MANIFEST and the tree, in path order, with no owner and no
+times: the same pin gives the same bytes. It is written whole or not at
+all. The tree is unpacked in a scratch directory beside TAR and removed,
+unless --tree names a new directory to keep it in. The MANIFEST's SHA-256,
+printed on stdout, is the pin make release-runner links into the Linux
+runner (internal/release rendererSHA256).
+"""
+import gzip
+import hashlib
+import io
+import json
+import os
+import re
+import shutil
+import sys
+import tarfile
+import tempfile
+import urllib.request
+from concurrent.futures import ThreadPoolExecutor
+
+SNAPSHOT = "https://snapshot.debian.org/archive/"
+DIGEST = re.compile(r"[0-9a-f]{64}")
+LINK_DEPTH = 40
+
+
+class Refused(Exception):
+ pass
+
+
+def fetch(url):
+ with urllib.request.urlopen(url, timeout=600) as r:
+ return r.read()
+
+
+def packages_of(pin):
+ if "arm64" in pin or not isinstance(pin.get("amd64"), list) or not pin["amd64"]:
+ raise Refused("the pin must list amd64 packages, and only amd64")
+ packages = pin["amd64"]
+ names = [p.get("package") for p in packages]
+ if names != sorted(set(names)):
+ raise Refused("the pin's packages are not sorted and unique")
+ for p in packages:
+ url = p.get("url")
+ if not (isinstance(url, str) and url.startswith(SNAPSHOT) and url.endswith(".deb")
+ and isinstance(p.get("sha256"), str) and DIGEST.fullmatch(p["sha256"])
+ and isinstance(p.get("size"), int) and p["size"] > 0):
+ raise Refused("%s: want a snapshot.debian.org .deb URL, a SHA-256 and a size" % p.get("package"))
+ return packages
+
+
+def checked(p):
+ """The deb the pin names: its bytes, or a refusal."""
+ data = fetch(p["url"])
+ if len(data) != p["size"]:
+ raise Refused("%s: got %d bytes, the pin says %d" % (p["package"], len(data), p["size"]))
+ if hashlib.sha256(data).hexdigest() != p["sha256"]:
+ raise Refused("%s: SHA-256 is not the pin's" % p["package"])
+ return data
+
+
+def data_member(name, deb):
+ """The data.tar of a deb (an ar archive), opened."""
+ if deb[:8] != b"!<arch>\n":
+ raise Refused("%s: not a deb" % name)
+ i, members = 8, {}
+ while i < len(deb):
+ header = deb[i:i + 60]
+ if len(header) != 60 or header[58:60] != b"`\n":
+ raise Refused("%s: a broken ar header" % name)
+ member = header[:16].decode("ascii", "replace").strip().rstrip("/")
+ size = int(header[48:58])
+ members.setdefault(member, deb[i + 60:i + 60 + size])
+ i += 60 + size + (size & 1)
+ if not members.get("debian-binary", b"").startswith(b"2."):
+ raise Refused("%s: not a format 2 deb" % name)
+ data = [m for m in members if m.startswith("data.tar")]
+ modes = {"data.tar": "r:", "data.tar.gz": "r:gz", "data.tar.xz": "r:xz"}
+ if len(data) != 1 or data[0] not in modes:
+ raise Refused("%s: want one data.tar, .tar.gz or .tar.xz member, got %s" % (name, data))
+ return tarfile.open(fileobj=io.BytesIO(members[data[0]]), mode=modes[data[0]])
+
+
+def holdable(s):
+ """Whether s fits in a MANIFEST field: no white space or control
+ characters, and valid UTF-8."""
+ try:
+ s.encode("utf-8")
+ except UnicodeEncodeError:
+ return False
+ return bool(s) and not any(c.isspace() or ord(c) < 0x20 or ord(c) == 0x7f for c in s)
+
+
+def member_path(name):
+ """A data.tar member's path inside the tree ("" for its root), or None
+ when it is not one."""
+ if name in (".", "./"):
+ return ""
+ if name.startswith("./"):
+ name = name[2:]
+ name = name.rstrip("/")
+ parts = name.split("/")
+ if name.startswith("/") or not holdable(name) or any(p in ("", ".", "..") for p in parts):
+ return None
+ return name
+
+
+class Tree:
+ """The unpacked tree: entries by path, mirrored on disk under root."""
+
+ def __init__(self, root):
+ self.root = root
+ self.entries = {} # path -> ("dir",) | ("file", sha256, mode) | ("link", target)
+ self.owner = {}
+
+ def disk(self, path):
+ return os.path.join(self.root, *path.split("/"))
+
+ def parents(self, path, package):
+ parts = path.split("/")
+ for i in range(1, len(parts)):
+ parent = "/".join(parts[:i])
+ e = self.entries.get(parent)
+ if e is None:
+ self.entries[parent], self.owner[parent] = ("dir",), package
+ os.mkdir(self.disk(parent))
+ os.chmod(self.disk(parent), 0o755)
+ elif e[0] != "dir":
+ raise Refused("%s (%s): goes through a link or file of %s" % (path, package, self.owner[parent]))
+
+ def add(self, package, m, archive):
+ path = member_path(m.name)
+ if path is None:
+ raise Refused("%s: %r is not a path inside the tree the MANIFEST can hold" % (package, m.name))
+ if path == "":
+ if not m.isdir():
+ raise Refused("%s: the tree's root is not a directory" % package)
+ return
+ if path == "MANIFEST":
+ raise Refused("%s: ships MANIFEST, the tree's own list" % package)
+ self.parents(path, package)
+ if m.isdir():
+ entry, body = ("dir",), None
+ elif m.issym():
+ target = m.linkname
+ if target.startswith("/"):
+ # The tree is the renderer's root: the same path, relative.
+ target = "../" * path.count("/") + target.lstrip("/")
+ if not holdable(target):
+ raise Refused("%s (%s): link target %r is not one the MANIFEST can hold" % (path, package, m.linkname))
+ entry, body = ("link", target), None
+ elif m.isfile():
+ body = archive.extractfile(m).read()
+ entry = ("file", hashlib.sha256(body).hexdigest(), 0o755 if m.mode & 0o100 else 0o644)
+ else:
+ raise Refused("%s (%s): only files, directories and links belong in the tree" % (path, package))
+ old = self.entries.get(path)
+ if old is not None:
+ if old != entry:
+ raise Refused("%s: %s and %s disagree about it" % (path, self.owner[path], package))
+ return
+ self.entries[path], self.owner[path] = entry, package
+ disk = self.disk(path)
+ if entry[0] == "dir":
+ os.mkdir(disk)
+ os.chmod(disk, 0o755)
+ elif entry[0] == "link":
+ os.symlink(entry[1], disk)
+ else:
+ fd = os.open(disk, os.O_WRONLY | os.O_CREAT | os.O_EXCL | os.O_NOFOLLOW, 0o600)
+ with os.fdopen(fd, "wb") as f:
+ f.write(body)
+ os.chmod(disk, entry[2])
+
+ def resolve(self, start, target, depth=0):
+ """Where target, read in directory start (a list of names), leads:
+ a list of names from the root, every step an entry of the tree."""
+ if depth > LINK_DEPTH:
+ raise Refused("too many links")
+ here = list(start)
+ names = [n for n in target.split("/") if n not in ("", ".")]
+ for i, name in enumerate(names):
+ if name == "..":
+ if not here:
+ raise Refused("climbs out of the tree")
+ here.pop()
+ continue
+ path = "/".join(here + [name])
+ e = self.entries.get(path)
+ if e is None:
+ raise Refused("%s names nothing in the tree" % path)
+ if e[0] == "link":
+ here = self.resolve(here, e[1], depth + 1)
+ else:
+ here.append(name)
+ if i < len(names) - 1 and self.kind(here) != "dir":
+ raise Refused("%s is not a directory" % "/".join(here))
+ return here
+
+ def kind(self, names):
+ return "dir" if not names else self.entries["/".join(names)][0]
+
+ def check(self, program):
+ problems = []
+ for path, e in sorted(self.entries.items()):
+ if e[0] == "link":
+ try:
+ self.resolve(path.split("/")[:-1], e[1])
+ except Refused as r:
+ problems.append("%s -> %s (%s): %s" % (path, e[1], self.owner[path], r))
+ try:
+ end = "/".join(self.resolve([], program))
+ ok = self.entries[end][0] == "file" and self.entries[end][2] == 0o755
+ except (Refused, KeyError):
+ ok = False
+ if not ok:
+ problems.append("%s: the pin's program is not an executable file in the tree" % program)
+ if problems:
+ raise Refused("\n".join(problems))
+
+ def manifest(self):
+ lines = []
+ for path, e in sorted(self.entries.items()):
+ if e[0] == "dir":
+ lines.append("dir %s\n" % path)
+ elif e[0] == "link":
+ lines.append("link %s %s\n" % (path, e[1]))
+ else:
+ lines.append("file %s %s %04o\n" % (path, e[1], e[2]))
+ return "".join(lines).encode("utf-8")
+
+
+def write_tar(tree, manifest, out):
+ """Write the tar to out: MANIFEST and every entry in path order, no
+ owner, no times, gzip with no name or time."""
+ def info(path, mode, kind=tarfile.REGTYPE, size=0, link=""):
+ ti = tarfile.TarInfo(path)
+ ti.type, ti.mode, ti.size, ti.linkname = kind, mode, size, link
+ ti.mtime, ti.uid, ti.gid, ti.uname, ti.gname = 0, 0, 0, "", ""
+ return ti
+ entries = dict(tree.entries)
+ entries["MANIFEST"] = None
+ with gzip.GzipFile(filename="", mode="wb", fileobj=out, compresslevel=9, mtime=0) as gz:
+ with tarfile.open(fileobj=gz, mode="w|", format=tarfile.PAX_FORMAT, encoding="utf-8") as tar:
+ for path in sorted(entries):
+ e = entries[path]
+ if e is None:
+ tar.addfile(info(path, 0o644, size=len(manifest)), io.BytesIO(manifest))
+ elif e[0] == "dir":
+ tar.addfile(info(path, 0o755, tarfile.DIRTYPE))
+ elif e[0] == "link":
+ tar.addfile(info(path, 0o777, tarfile.SYMTYPE, link=e[1]))
+ else:
+ with open(tree.disk(path), "rb") as f:
+ tar.addfile(info(path, e[2], size=os.fstat(f.fileno()).st_size), f)
+
+
+def build(pin_path, tar_path, keep):
+ with open(pin_path) as f:
+ pin = json.load(f)
+ packages = packages_of(pin)
+ program = pin.get("program")
+ if not isinstance(program, str) or member_path(program) in (None, ""):
+ raise Refused("the pin names no program")
+ out_dir = os.path.dirname(os.path.abspath(tar_path))
+ with ThreadPoolExecutor(max_workers=4) as pool:
+ debs = list(pool.map(checked, packages))
+ if keep:
+ os.mkdir(keep, 0o755)
+ root, scratch = keep, None
+ else:
+ scratch = tempfile.mkdtemp(prefix=".renderer-tree-", dir=out_dir)
+ root = scratch
+ fd, partial = tempfile.mkstemp(prefix=".renderer-", suffix=".tar.gz.partial", dir=out_dir)
+ try:
+ tree = Tree(root)
+ for p, deb in zip(packages, debs):
+ with data_member(p["package"], deb) as archive:
+ for m in archive:
+ tree.add(p["package"], m, archive)
+ tree.check(program)
+ manifest = tree.manifest()
+ if keep:
+ with open(os.path.join(keep, "MANIFEST"), "wb") as f:
+ f.write(manifest)
+ with os.fdopen(fd, "wb") as out:
+ fd = None
+ write_tar(tree, manifest, out)
+ os.chmod(partial, 0o644)
+ os.replace(partial, tar_path)
+ partial = None
+ except BaseException:
+ if keep:
+ shutil.rmtree(keep, ignore_errors=True)
+ raise
+ finally:
+ if fd is not None:
+ os.close(fd)
+ if partial is not None:
+ os.unlink(partial)
+ if scratch is not None:
+ shutil.rmtree(scratch, ignore_errors=True)
+ files = sum(1 for e in tree.entries.values() if e[0] == "file")
+ print("renderer: %d packages, %d entries (%d files), %s: %d bytes" % (
+ len(packages), len(tree.entries), files, tar_path, os.path.getsize(tar_path)), file=sys.stderr)
+ return hashlib.sha256(manifest).hexdigest()
+
+
+def main(argv):
+ keep = None
+ if len(argv) == 4 and argv[2] == "--tree":
+ keep = argv[3]
+ elif len(argv) != 2:
+ print(__doc__, file=sys.stderr)
+ return 2
+ try:
+ print(build(argv[0], argv[1], keep))
+ except Refused as r:
+ for line in str(r).splitlines():
+ print("build-renderer-tree: refused: " + line, file=sys.stderr)
+ return 1
+ return 0
+
+
+if __name__ == "__main__":
+ sys.exit(main(sys.argv[1:]))
diff --git a/scripts/runner-install-manifest.py b/scripts/runner-install-manifest.py
index 0c3eeeee..5f825ebc 100644
--- a/scripts/runner-install-manifest.py
+++ b/scripts/runner-install-manifest.py
@@ -1,5 +1,6 @@
#!/usr/bin/env python3
-"""Record what one release build produced: the runner and tool proxy digests.
+"""Record what one release build produced: the runner and tool proxy digests,
+and on Linux the renderer tree's pin.
The source manifest (internal/release/manifest.json, copied into the
release directory) pins the programs this repository does not build. This
@@ -13,6 +14,7 @@ import json
import pathlib
import re
import sys
+import tarfile
root, version = pathlib.Path(sys.argv[1]), sys.argv[2]
assert re.fullmatch(r"[a-zA-Z0-9][a-zA-Z0-9._-]{0,79}", version)
@@ -21,6 +23,15 @@ def digest(path):
return hashlib.sha256(path.read_bytes()).hexdigest()
+def renderer_pin(path):
+ """The SHA-256 of renderer.tar.gz's MANIFEST: the renderer pin make
+ release-runner linked into the Linux runner."""
+ with tarfile.open(path, "r:gz") as tar:
+ member = tar.getmember("MANIFEST")
+ assert member.isfile()
+ return hashlib.sha256(tar.extractfile(member).read()).hexdigest()
+
+
release = json.loads((root / "manifest.json").read_text())
assert release["schema"] == 3
assert [b["name"] for b in release["binaries"]] == ["claude", "codex", "codex-code-mode-host", "bwrap"]
@@ -33,7 +44,8 @@ release["binaries"].append({"name": "equipo-tool-proxy", "version": release["lau
# stay the Linux runner's for older bootstraps; a Mac worker's files are
# under darwin-arm64/ and it is listed only when they are there.
targets = {"linux/amd64": {"runner_sha256": digest(root / "equipo-runner"),
- "tool_proxy_sha256": digest(root / "equipo-tool-proxy"), "gitleaks_sha256": digest(root / "gitleaks")}}
+ "tool_proxy_sha256": digest(root / "equipo-tool-proxy"), "gitleaks_sha256": digest(root / "gitleaks"),
+ "renderer_sha256": renderer_pin(root / "renderer.tar.gz")}}
mac = root / "darwin-arm64"
if (mac / "equipo-runner").is_file():
targets["darwin/arm64"] = {"runner_sha256": digest(mac / "equipo-runner"), "gitleaks_sha256": digest(mac / "gitleaks")}
diff --git a/scripts/runner-reference-allowlist.json b/scripts/runner-reference-allowlist.json
index 1dc78ecd..9cc5811e 100644
--- a/scripts/runner-reference-allowlist.json
+++ b/scripts/runner-reference-allowlist.json
@@ -15863,7 +15863,7 @@
},
{
"path": "internal/equipotest/runner_release_test.go",
- "line_sha256": "1ac32b594199d307cb8e269de100234f5f8ffdb3fe4efe7020bfb850e2529cfa",
+ "line_sha256": "b4e2946cbbed5bd4883137a4e37953bc05f16ef428c4019d1cda93b4b67890ce",
"match": "equipo-runner",
"count": 2,
"reason": "Fable follow-up: pinned runner scanner packaging and existing runtime integration."
diff --git a/scripts/staged-artifacts.py b/scripts/staged-artifacts.py
index 59e2ae50..44cbe6fc 100755
--- a/scripts/staged-artifacts.py
+++ b/scripts/staged-artifacts.py
@@ -16,7 +16,8 @@ the Go version and the SHA-256 of every artifact. It refuses unless every
binary says it was built from that commit, unmodified (go version -m:
vcs.revision, vcs.modified=false), and the runner release agrees with
itself: the tool proxy the release manifest records and the runner
-digests in the install manifest are the bytes on disk.
+digests in the install manifest are the bytes on disk, and the renderer
+pin it records is the MANIFEST of the renderer.tar.gz beside them.
`verify` recomputes every hash and refuses unless the artifacts are the
ones the provenance manifest names, at the commit it names.
@@ -32,6 +33,7 @@ import json
from pathlib import Path
import subprocess
import sys
+import tarfile
import time
ROOT = Path(__file__).resolve().parent.parent
@@ -95,6 +97,16 @@ def scanner_from_pin(path):
and not any(row and row[0] == '=>' for row in records))
+def renderer_pin(path):
+ """The SHA-256 of renderer.tar.gz's MANIFEST, the pin linked into the
+ Linux runner (scripts/build-renderer-tree.py)."""
+ with tarfile.open(path, 'r:gz') as tar:
+ member = tar.getmember('MANIFEST')
+ if not member.isfile():
+ raise ValueError('MANIFEST is not a file')
+ return hashlib.sha256(tar.extractfile(member).read()).hexdigest()
+
+
def self_consistent(version, sums, commit):
"""The runner release names its own bytes: one build, one set of digests."""
runner = ROOT / 'releases' / f'equipo-runner-linux-amd64-{version}'
@@ -106,10 +118,11 @@ def self_consistent(version, sums, commit):
return (proxies == [sums['tool_proxy']] and install['release'] == release and install['version'] == version
and install['gitleaks'] == 'v8.30.1'
and install['runner_sha256'] == sums['runner']
- and targets['linux/amd64'] == {'runner_sha256': sums['runner'], 'tool_proxy_sha256': sums['tool_proxy'], 'gitleaks_sha256': sums['gitleaks']}
+ and targets['linux/amd64'] == {'runner_sha256': sums['runner'], 'tool_proxy_sha256': sums['tool_proxy'], 'gitleaks_sha256': sums['gitleaks'],
+ 'renderer_sha256': renderer_pin(runner / 'renderer.tar.gz')}
and targets['darwin/arm64'] == {'runner_sha256': sums['darwin_runner'], 'gitleaks_sha256': sums['darwin_gitleaks']}
and (runner / 'COMMIT').read_text().strip() == commit), release
- except (OSError, ValueError, KeyError, TypeError):
+ except (OSError, ValueError, KeyError, TypeError, tarfile.TarError):
return False, None