oficina / equipo Public

Renderer out of the instance: runners fetch it from the forge

The instance artifact grew to 374 MB with renderer.tar.gz embedded,
over CARLOS's 256 MiB ship limit. The instance no longer bundles the
renderer (bundle bounded at 160 MiB). Self-serve installs reuse a
verified tree or fetch the archive from a forge release
(renderer-<digest12>), verified by linked size, SHA-256, tree pin and
full tree before anything is written.

- One redirect to https only, no credentials; stall and total bounds.
- SOURCES lists each Debian source package and Chromium's source.
- publish-renderer.sh publishes or checks the asset with full GETs;
  staging-thin.py installs from the checked download.
- Upgrade, cutover, verify-installed and the Mac are unchanged.
- Astra: design and build reviews, round 3 READY.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Squashed from renderer-out-of-instance into main.
claude agent, operated by paul@keymail.dev d273f2547803f579a178bdefd6615633f28906db parent 4032121
28 files changed, +1,801 −245
  • .rastrillo/budgets.txt +1 −1
  • AGENTS.md +2 −0
  • Makefile +12 −1
  • docs/superpowers/specs/2026-11-30-renderer-out-of-instance.md +284 −0
  • internal/equipotest/runner_release_test.go +15 −5
  • internal/release/embedded_install_test.go +28 −7
  • internal/release/install.go +18 −6
  • internal/release/install_assets.go +4 −21
  • internal/release/install_test.go +5 −0
  • internal/release/renderer.go +49 −1
  • internal/release/renderer_assets_test.go +82 −51
  • internal/release/renderer_install.go +104 −1
  • internal/release/renderer_install_linux_test.go +78 −0
  • internal/release/renderer_publish_test.go +187 −0
  • internal/release/renderer_tree_test.go +94 −3
  • internal/release/staged_gate_test.go +17 −4
  • internal/runner/setup/install.go +167 −26
  • internal/runner/setup/install_test.go +33 −3
  • internal/runner/setup/renderer_install_test.go +166 −41
  • scripts/build-instance-release.sh +10 −3
  • scripts/build-renderer-tree.py +18 −0
  • scripts/publish-renderer.sh +121 −0
  • scripts/renderer-sources.py +153 −0
  • scripts/runner-install-manifest.py +6 −2
  • scripts/runner-reference-allowlist.json +99 −57
  • scripts/staged-artifacts.py +22 −2
  • scripts/staging-thin-test.py +13 −6
  • scripts/staging-thin.py +13 −4

CI passed — 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/main: Type  Size Avail | ext4   96G   84G
ci-box: disk /home/ci/.cache/equipo-ci-box: Type  Size Avail | ext4   96G   84G
ci-box: bwrap: fetched and verified in 0.3s
ci-box: claude: fetched and verified in 2.0s
ci-box: codex: fetched and verified in 3.4s
ci-box: codex-code-mode-host: fetched and verified in 1.4s
ci-box: libwrap: fetched and verified in 0.3s
ci-box: socat: fetched and verified in 0.4s
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
ci-box: image pulled in 9.8s
ci-box: pi: installed and verified in 7.3s
ci-box: opencode: installed and verified in 2.2s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 9.2s
ci-box: clone deepened in 6.8s
ci-box: file times set from content: 3750 files, 244 directories
ci-box: ready in 20.2s
=== 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.234s
=== compile ===
go build ./...
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py compile
+ go build -tags testbuild ./...
  6.0s
+ go list -export -test -tags testbuild -f  ./...
  6.3s
+ go list -export -test -tags browser,testbuild -f  ./internal/equipo ./internal/equipotest ./internal/headless ./internal/idtest ./internal/plan3test ./internal/thintest
  4.1s
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -version
staticcheck 2026.1 (v0.7.0)
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 -version
Go: go1.26.11
Scanner: govulncheck@v1.8.0
DB: https://vuln.go.dev
DB updated: 2026-11-24 15:56:00 +0000 UTC

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

receipt: test step 1m24.868s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m22.332s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m22.33s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 81.01, cpu waiting 45.59%, memory waiting 0.00%, io waiting 0.56%
--- shard 1 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-review: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadless$/^4_review$|^TestHeadless$/^2b_access$|^TestHeadless$/^runner_crash$|^TestHeadless$/^2b_first_message$|^TestHeadless$/^4_checks_honest$|^TestHeadless$/^7_stream_resume$|^TestHeadless$/^2b_notebook$|^TestHeadless$/^2b_move_in$|^TestHeadless$/^2b_desk_failure$|^TestHeadless$/^cancel$' ./internal/headless

receipt: test step 1m23.021s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m20.924s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m20.92s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 81.01, cpu waiting 45.47%, memory waiting 0.00%, io waiting 0.58%
--- 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 1m26.213s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m24.1s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m13.11s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 5.68s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 5.31s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 81.01, cpu waiting 45.47%, memory waiting 0.00%, io waiting 0.54%
--- 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 2m48.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 2m47.036s amadan.net/oficina/equipo/internal/headless
receipt: slow test 2m12.78s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 15.68s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.52s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
receipt: slow test 9.05s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
machine: 32 CPUs, load 33.33, cpu waiting 15.84%, memory waiting 0.00%, io waiting 0.13%
--- 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 1m43.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 1m40.618s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m9.86s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.41s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 8.71s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 7.5s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 5.14s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
machine: 32 CPUs, load 73.01, cpu waiting 42.83%, memory waiting 0.00%, io waiting 0.41%
--- 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 3m31.773s 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 3m29.688s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m44.88s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistant
receipt: slow test 23.49s amadan.net/oficina/equipo/internal/headless TestMacMixedVersions
receipt: slow test 21s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.64s amadan.net/oficina/equipo/internal/headless TestHeadlessResearchHandoff
receipt: slow test 7.74s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistantAttachments
machine: 32 CPUs, load 18.39, cpu waiting 7.63%, memory waiting 0.00%, io waiting 0.06%
--- 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 3m29.678s 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 3m27.032s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 15.73s amadan.net/oficina/equipo/internal/thintest TestTasklessHoldResumes
receipt: slow test 10.96s amadan.net/oficina/equipo/internal/thintest TestContractTeamJobSettledStates
receipt: slow test 6.68s amadan.net/oficina/equipo/internal/thintest TestExplorePreviewsOff
receipt: slow test 5.46s amadan.net/oficina/equipo/internal/thintest TestNudgeResumesHeldJob
receipt: slow test 5.43s amadan.net/oficina/equipo/internal/thintest TestAbilityHoldResumes
machine: 32 CPUs, load 19.64, cpu waiting 8.15%, memory waiting 0.00%, io waiting 0.06%
--- shard 7 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane thintest-contract: ./internal/thintest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^Test([^C]|C[^o]|Co[^n]|Con[^t])|^TestContract(Assistant|Outcome|Team|Handoff|HostAllowlist|HostIsPerPerson|Look|Use[A-Z]|RemoteCall|LanesRunAtOnce|NoMergeQuestionWhenGateMerges|PreviewHeldUntilPublishAnswer|PreviewNotHeldBelow19|PublishNeedsOwnerAnswer)' ./internal/thintest

receipt: test step 2m26.093s 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 2m23.332s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 9.44s amadan.net/oficina/equipo/internal/thintest TestContractRetryPreviewUnverifiedMerge
receipt: slow test 9.07s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 4.93s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
receipt: slow test 4.9s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotOffered
receipt: slow test 3.04s amadan.net/oficina/equipo/internal/thintest TestContractPausedJob
machine: 32 CPUs, load 43.81, cpu waiting 22.59%, memory waiting 0.00%, io waiting 0.20%
--- 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 7m33.864s, over the 45s its record on line 45 allows; reported only, timing fails on CI

receipt: test step 7m40.444s 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 7m33.864s amadan.net/oficina/equipo/internal/runner/thin
receipt: slow test 37.08s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeAnsweredByAnotherModel
receipt: slow test 36.94s amadan.net/oficina/equipo/internal/runner/thin TestModelsEngineeringProbesThenRunsTheStrongest
receipt: slow test 36.9s amadan.net/oficina/equipo/internal/runner/thin TestModelsUnhealthyRetriedOnDemand
receipt: slow test 33.26s amadan.net/oficina/equipo/internal/runner/thin TestWorkerHelloConnections
receipt: slow test 18.53s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeRunsInsideTheAdmission
machine: 32 CPUs, load 2.14, cpu waiting 0.12%, 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 50.701s 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 49.71s amadan.net/oficina/equipo/internal/runner
receipt: slow test 29.67s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.03s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 58.60, cpu waiting 33.72%, memory waiting 0.00%, io waiting 1.00%
--- 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 1m4.695s 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 1m3.351s amadan.net/oficina/equipo/internal/runner
receipt: slow test 53.42s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 46.66s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.42s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.49s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 78.42, cpu waiting 41.79%, memory waiting 0.00%, io waiting 0.79%
--- 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 41.546s 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 40.681s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.13s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 5.01s amadan.net/oficina/equipo/internal/runner TestEnrolCommitsTheCredentialLast
receipt: slow test 3.41s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 3.21s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.13s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
machine: 32 CPUs, load 44.04, cpu waiting 25.36%, memory waiting 0.00%, io waiting 1.18%
--- 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.0%, load 29.42
test lane equipotest-a: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test[A-D]|^TestQ' ./internal/equipotest

receipt: test step 1m16.413s 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 1m13.933s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 33.72s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 33.58s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 31.1s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 27.83s amadan.net/oficina/equipo/internal/equipotest TestAuthorityReadsOneSnapshot
receipt: slow test 27.75s amadan.net/oficina/equipo/internal/equipotest TestAuthorityFailureIsNotRevocation
machine: 32 CPUs, load 73.01, cpu waiting 40.68%, memory waiting 0.00%, io waiting 0.39%
--- 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.0%, load 29.42
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 2m24.606s 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 2m22.502s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 23.6s amadan.net/oficina/equipo/internal/equipotest TestProjectWritesRequireCurrentOwner
receipt: slow test 23.59s amadan.net/oficina/equipo/internal/equipotest TestProjectsFailuresRollBack
receipt: slow test 23.51s amadan.net/oficina/equipo/internal/equipotest TestProjectsAccountRevisionAndValidation
receipt: slow test 23.51s amadan.net/oficina/equipo/internal/equipotest TestProjectsReopen
receipt: slow test 23.49s amadan.net/oficina/equipo/internal/equipotest TestProjectRejectsUnsafeBinding
machine: 32 CPUs, load 31.47, cpu waiting 14.36%, memory waiting 0.00%, io waiting 0.12%
--- 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 39.0%, load 29.42
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 5m45.89s, over the 5m0s its record on line 15 allows; reported only, timing fails on CI

receipt: test step 5m51.977s 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 5m45.89s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 4m50.13s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 13.82s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 10.77s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 10.74s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 7.7s amadan.net/oficina/equipo/internal/equipotest TestRosterBootstrapOnce
machine: 32 CPUs, load 2.73, cpu waiting 0.44%, 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 39.0%, load 29.42
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 1m14.079s 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 1m11.828s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 30.35s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 29.9s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 29.8s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 27.57s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsRollbackAndUnavailable
receipt: slow test 27.5s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsUpgrade
machine: 32 CPUs, load 73.01, cpu waiting 42.83%, memory waiting 0.00%, io waiting 0.41%
--- 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 39.0%, load 29.42
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 1m0.122s 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.81s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 4.51s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 3.52s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 1.88s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.53s amadan.net/oficina/equipo/internal/plan3test TestInviteMigration
receipt: slow test 1.52s amadan.net/oficina/equipo/internal/plan3test TestOnboardingAccountMigration
machine: 32 CPUs, load 81.33, cpu waiting 44.86%, memory waiting 0.00%, io waiting 0.51%
--- 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 39.0%, load 29.42
test lane rest: ./cmd/equipo ./cmd/equipo-hosted-controller ./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/hostedclient ./internal/hostedctl ./internal/hostedwire ./internal/idtest ./internal/isolatedjob ./internal/isolatedjob/awsjob ./internal/isolatedjob/guardfixture ./internal/isolatedjob/isolatedjobtest ./internal/ownermodetest ./internal/release ./internal/release/renderertest ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/designstep ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mac/creds ./internal/runner/mac/denylist ./internal/runner/mac/fprobe ./internal/runner/mac/proc ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/pause ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/claude/realcli ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/render ./internal/runner/renderpage ./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/teamprobe ./internal/testci ./internal/toolproxy ./internal/websearch ./internal/websearch/websearchtest ./internal/websource ./internal/websource/guard ./internal/websource/hostaddrs ./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-hosted-controller ./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/hostedclient ./internal/hostedctl ./internal/hostedwire ./internal/idtest ./internal/isolatedjob ./internal/isolatedjob/awsjob ./internal/isolatedjob/guardfixture ./internal/isolatedjob/isolatedjobtest ./internal/ownermodetest ./internal/release ./internal/release/renderertest ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/designstep ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mac/creds ./internal/runner/mac/denylist ./internal/runner/mac/fprobe ./internal/runner/mac/proc ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/pause ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/claude/realcli ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/render ./internal/runner/renderpage ./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/teamprobe ./internal/testci ./internal/toolproxy ./internal/websearch ./internal/websearch/websearchtest ./internal/websource ./internal/websource/guard ./internal/websource/hostaddrs ./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/hostedclient: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/isolatedjob: 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/runner/workspace: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runnerproto: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/testci: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/pi: its inputs changed
budget note: internal/equipo took 2m58.984s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/equipo/chat took 51.898s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/equipo/github took 40.217s, 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 15.02s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/hostedctl took 31.81s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/idtest took 2m10.654s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/release took 53.274s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/runner/containment took 1m8.575s, over the 15s its record on line 41 allows; reported only, timing fails on CI
budget note: internal/runner/forge took 28.413s, over the 20s its record on line 36 allows; reported only, timing fails on CI
budget note: internal/runner/mac took 46.024s, over the 45s its record on line 44 allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/runner/mac/fprobe took 14.761s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/runner/provider/claude/realcli took 18.035s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/runner/render took 1m27.162s, over the 10s the default allows; reported only, timing fails on CI

receipt: test step 3m4.303s against a 60s target (the gate's other steps are not in this figure)
receipt: 35 packages ran, 50 cached, 22 without tests, 0 failed
receipt: slow package 2m58.984s amadan.net/oficina/equipo/internal/equipo
receipt: slow package 2m10.654s amadan.net/oficina/equipo/internal/idtest
receipt: slow package 1m27.162s amadan.net/oficina/equipo/internal/runner/render
receipt: slow package 1m17.734s amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow package 1m8.575s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 1m3.73s amadan.net/oficina/equipo/internal/idtest TestDoorRemembersOficinaID
receipt: slow test 55.15s amadan.net/oficina/equipo/internal/idtest TestDoorOficinaSettingsUnreadableIsNoLoop
receipt: slow test 55.04s amadan.net/oficina/equipo/internal/idtest TestDoorForgetsOficinaIDForARefusedSession
receipt: slow test 54.88s amadan.net/oficina/equipo/internal/idtest TestDoorStepUpIsLocal
receipt: slow test 53.42s amadan.net/oficina/equipo/internal/idtest TestDoorNeverJudgesANativeSession
machine: 32 CPUs, load 18.39, cpu waiting 7.38%, memory waiting 0.00%, io waiting 0.05%
--- 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 1m27.106s 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 1m25.225s amadan.net/oficina/equipo/internal/headless
receipt: slow test 39.27s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 14.91s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 10.8s amadan.net/oficina/equipo/internal/headless TestBrowserChat
receipt: slow test 7.49s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 7.09s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
machine: 32 CPUs, load 81.33, cpu waiting 45.19%, memory waiting 0.00%, io waiting 0.53%
--- 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
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
=== RUN   TestBrowserRailFollowsWork
time=2026-11-30T14:50:29.011Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-30T14:50:29.011Z level=INFO msg="startup phase done" phase=state_lock took=63µs
time=2026-11-30T14:50:29.011Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-30T14:50:29.011Z level=INFO msg="startup phase done" phase=claim_roots took=85µs
time=2026-11-30T14:50:29.011Z level=INFO msg="startup phase" phase=sweep
time=2026-11-30T14:50:29.054Z level=INFO msg="startup phase done" phase=sweep took=42.863ms
time=2026-11-30T14:50:29.054Z level=INFO msg="startup phase" phase=credentials
time=2026-11-30T14:50:29.054Z level=INFO msg="startup phase done" phase=credentials took=116µs
time=2026-11-30T14:50:29.054Z level=INFO msg="startup phase" phase=open_state
time=2026-11-30T14:50:29.108Z level=INFO msg="startup phase done" phase=open_state took=53.744ms
time=2026-11-30T14:50:29.108Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-30T14:50:29.109Z level=INFO msg=connecting host=127.0.0.1:35801 protocol=38
time=2026-11-30T14:50:29.110Z level=INFO msg=connected host=127.0.0.1:35801 took=1.143ms
time=2026-11-30T14:50:29.110Z level=INFO msg="capabilities gathering"
time=2026-11-30T14:50:29.111Z level=INFO msg="capabilities gathered" took=425µs tags=linux,claude,go
time=2026-11-30T14:50:29.112Z level=INFO msg="hello sent" protocol=38
time=2026-11-30T14:50:29.119Z level=INFO msg=welcome protocol=38 role=primary generation=1
time=2026-11-30T14:50:30.120Z level=INFO msg="connection checked" connection=claude-1 state=healthy
time=2026-11-30T14:50:37.440Z level=INFO msg="kept sessions" kept=1 bytes=2885 expired=0
time=2026-11-30T14:50:41.641Z level=INFO msg="kept sessions" kept=2 bytes=5037 expired=0
time=2026-11-30T14:50:42.582Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-30T14:50:42.582Z level=INFO msg="startup phase done" phase=state_lock took=231µs
time=2026-11-30T14:50:42.582Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-30T14:50:42.582Z level=INFO msg="startup phase done" phase=claim_roots took=225µs
time=2026-11-30T14:50:42.582Z level=INFO msg="startup phase" phase=sweep
time=2026-11-30T14:50:42.630Z level=INFO msg="startup phase done" phase=sweep took=47.625ms
time=2026-11-30T14:50:42.630Z level=INFO msg="startup phase" phase=credentials
time=2026-11-30T14:50:42.630Z level=INFO msg="startup phase done" phase=credentials took=227µs
time=2026-11-30T14:50:42.630Z level=INFO msg="startup phase" phase=open_state
time=2026-11-30T14:50:42.700Z level=INFO msg="startup phase done" phase=open_state took=69.829ms
time=2026-11-30T14:50:42.701Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-30T14:50:42.703Z level=INFO msg=connecting host=127.0.0.1:46871 protocol=38
time=2026-11-30T14:50:42.705Z level=INFO msg=connected host=127.0.0.1:46871 took=1.078ms
time=2026-11-30T14:50:42.705Z level=INFO msg="capabilities gathering"
time=2026-11-30T14:50:42.706Z level=INFO msg="capabilities gathered" took=512µs tags=linux,claude,go
time=2026-11-30T14:50:42.709Z level=INFO msg="hello sent" protocol=38
time=2026-11-30T14:50:42.714Z level=INFO msg=welcome protocol=38 role=primary generation=1
time=2026-11-30T14:50:45.114Z level=INFO msg="connection checked" connection=claude-1 state=healthy
    browser_review_test.go:57: waiting for document.querySelector('#rail [data-specialist="engineering"]')?.dataset.state==='working' && document.querySelector('#rail [data-specialist="engineering"]').querySelector('[equipo-nav-task]')?.textContent==='Slow sidebar change' && document.querySelector('#nav-tasks [data-count]')?.textContent==='1': context deadline exceeded (last evaluation: context deadline exceeded)
time=2026-11-30T14:50:48.700Z level=WARN msg="step clone" err="signal: killed"
time=2026-11-30T14:50:48.700Z level=WARN msg="step sweep" err=cancelled
time=2026-11-30T14:50:48.700Z level=WARN msg="kept sessions" err=cancelled
--- FAIL: TestBrowserRailFollowsWork (20.68s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m32.542s
FAIL	amadan.net/oficina/equipo/internal/headless	92.739s


receipt: test step 1m34.419s 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 1m32.542s amadan.net/oficina/equipo/internal/headless
receipt: slow test 27.07s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 20.68s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 13.69s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 11.81s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
receipt: slow test 10.23s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
rastrillo: budget test: go test failed
exit status 1
+ go test -tags browser,testbuild -timeout 15m -run '^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$' -v -run '^TestBrowserRailFollowsWork$' -count=1 ./internal/headless   (retry, once)
##############################################################################
FLAKE ./internal/headless:TestBrowserRailFollowsWork browser-headless-work d273f2547803f579a178bdefd6615633f28906db 20.68s 78.58
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 60.85, cpu waiting 35.05%, memory waiting 0.00%, io waiting 0.32%
--- 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 1m57.437s 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 1m55.506s amadan.net/oficina/equipo/internal/headless
receipt: slow test 15.47s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 13.48s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 13.1s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 11.46s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsSignInEmail
receipt: slow test 11.22s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
machine: 32 CPUs, load 60.85, cpu waiting 34.00%, memory waiting 0.00%, io waiting 0.31%
--- shard 21 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-rest: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAskAfterMerge|TestBrowserCardAnswerSettlesAtBottom|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInEmail|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' ./internal/headless
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserCopyContinue
=== RUN   TestBrowserCopyContinue
time=2026-11-30T14:50:56.192Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-30T14:50:56.192Z level=INFO msg="startup phase done" phase=state_lock took=247µs
time=2026-11-30T14:50:56.192Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-30T14:50:56.192Z level=INFO msg="startup phase done" phase=claim_roots took=183µs
time=2026-11-30T14:50:56.192Z level=INFO msg="startup phase" phase=sweep
time=2026-11-30T14:50:56.250Z level=INFO msg="startup phase done" phase=sweep took=57.821ms
time=2026-11-30T14:50:56.250Z level=INFO msg="startup phase" phase=credentials
time=2026-11-30T14:50:56.251Z level=INFO msg="startup phase done" phase=credentials took=204µs
time=2026-11-30T14:50:56.251Z level=INFO msg="startup phase" phase=open_state
time=2026-11-30T14:50:56.311Z level=INFO msg="startup phase done" phase=open_state took=60.1ms
time=2026-11-30T14:50:56.312Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-30T14:50:56.313Z level=INFO msg=connecting host=127.0.0.1:42829 protocol=38
time=2026-11-30T14:50:56.315Z level=INFO msg=connected host=127.0.0.1:42829 took=1.818ms
time=2026-11-30T14:50:56.315Z level=INFO msg="capabilities gathering"
time=2026-11-30T14:50:56.316Z level=INFO msg="capabilities gathered" took=538µs tags=linux,claude,go
time=2026-11-30T14:50:56.316Z level=INFO msg="hello sent" protocol=38
time=2026-11-30T14:50:56.325Z level=INFO msg=welcome protocol=38 role=primary generation=1
    browser_copy_test.go:90: waiting for !document.querySelector('[data-copy-continue]'): context deadline exceeded (last evaluation: <nil>)
--- FAIL: TestBrowserCopyContinue (6.60s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m45.941s
FAIL	amadan.net/oficina/equipo/internal/headless	106.199s


receipt: test step 1m47.648s 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 1m45.941s amadan.net/oficina/equipo/internal/headless
receipt: slow test 15.43s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
receipt: slow test 14.39s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 10.95s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 9.67s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 7.86s amadan.net/oficina/equipo/internal/headless TestBrowserRefreshRace
exit status 1
+ go test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAskAfterMerge|TestBrowserCardAnswerSettlesAtBottom|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInEmail|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' -v -run '^TestBrowserCopyContinue$' -count=1 ./internal/headless   (retry, once)
##############################################################################
FLAKE ./internal/headless:TestBrowserCopyContinue browser-headless-rest d273f2547803f579a178bdefd6615633f28906db 6.60s 69.16
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 64.66, cpu waiting 36.16%, memory waiting 0.00%, io waiting 0.34%
--- 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.277s 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.586s amadan.net/oficina/equipo/internal/equipo
receipt: slow test 1.99s amadan.net/oficina/equipo/internal/equipo TestBrowserPreviewPassExchange
receipt: slow test 590ms 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.218s 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.528s 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.229s, over the 10s the default allows; reported only, timing fails on CI

receipt: test step 12.818s 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.229s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 8.98s amadan.net/oficina/equipo/internal/idtest TestBrowserSmartDoor
receipt: slow test 2.25s 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.362s 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.575s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 2.57s 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|TestBrowserAskMacOffline|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 3m41.872s 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 3m38.868s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 27.16s amadan.net/oficina/equipo/internal/thintest TestBrowserAccessRequest
receipt: slow test 14.37s amadan.net/oficina/equipo/internal/thintest TestBrowserSettingsTeams
receipt: slow test 12.1s amadan.net/oficina/equipo/internal/thintest TestBrowserThinkingCycles
receipt: slow test 10.72s amadan.net/oficina/equipo/internal/thintest TestBrowserPlacementQuestionAndPending
receipt: slow test 9.42s amadan.net/oficina/equipo/internal/thintest TestBrowserRhythm
machine: 32 CPUs, load 10.17, cpu waiting 3.79%, memory waiting 0.00%, io waiting 0.04%
--- shard 23 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
shard 23: make test-quarantine
python3 scripts/ci-test.py quarantine
quarantine: 12 tests from scripts/ci-quarantine.txt; a failure is retried once, and a pass on the retry is reported as a flake
+ go test -tags testbuild -timeout 15m -v -run '^TestHeadlessConnections$/^A5_cancel_and_sign_out$|^TestHeadlessConnections$/^C4_claude_sign_in$|^TestHeadlessConnections$/^C5_engineering_failover$|^TestHeadlessConnections$/^C5_engineering_to_codex$|^TestHeadlessConnections$/^C5_engineering_waits$' ./internal/headless   (54s)
ok ./internal/headless TestHeadlessConnections/A5_cancel_and_sign_out 4.84s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.26s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 8.84s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 9.28s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 27.65s
+ 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   (61s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 14.50s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 12.06s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 10.56s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 21.47s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless   (22s)
ok ./internal/headless TestMixedVersions 19.62s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks   (2s)
ok ./internal/runner/checks TestCheckSandboxDeniedPathsTampering 0.83s
+ go test -tags testbuild -timeout 15m -v -run '^TestRunnerCancelAndSupersede$' ./internal/runner/thin   (2s)
first attempt failed: TestRunnerCancelAndSupersede; output tail:
=== RUN   TestRunnerCancelAndSupersede
time=2026-11-30T14:50:05.660Z level=INFO msg=connecting host=127.0.0.1:43477 protocol=38
time=2026-11-30T14:50:05.661Z level=INFO msg=connected host=127.0.0.1:43477 took=710µs
time=2026-11-30T14:50:05.662Z level=INFO msg="hello sent" protocol=38
time=2026-11-30T14:50:05.662Z level=INFO msg=welcome protocol=1 role=primary generation=3
    contract_test.go:298: waiting for ack, got {"id":"rzm3maht2ln-1","type":"turn","data":{"turn_id":"t_wait","attempt":1,"state":"cancelled","reason":"cancelled"}}
--- FAIL: TestRunnerCancelAndSupersede (0.06s)
FAIL
rastrillo-budget/v1 ran 59ms
FAIL	amadan.net/oficina/equipo/internal/runner/thin	0.078s
FAIL
+ go test -tags testbuild -timeout 15m -v -run '^TestRunnerCancelAndSupersede$' -count=1 ./internal/runner/thin   (retry, once)
##############################################################################
FLAKE ./internal/runner/thin:TestRunnerCancelAndSupersede quarantine d273f2547803f579a178bdefd6615633f28906db 0.06s 7.94
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
quarantine: 1 flaked (passed on the retry), 0 failed
quarantine flake: TestRunnerCancelAndSupersede
machine: 32 CPUs, load 78.42, cpu waiting 41.28%, memory waiting 0.00%, io waiting 0.82%
--- shard 24 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
shard 24: make runner-host
python3 scripts/runner-prerequisites.py
CGO_ENABLED=0 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks

receipt: test step 13.066s 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.599s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 196ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 75ms 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.26s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.81s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 400ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 190ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 100ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxToolchain
CGO_ENABLED=0 EQUIPO_REQUIRE_USER_SESSION=1 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run '^TestNamespace' -count=1 ./internal/runner/containment
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run '^TestNamespace' -count=1 ./internal/runner/containment

receipt: test step 4.38s 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.285s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 270ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 210ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof
receipt: slow test 140ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryCleansScratch
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceExitStatus
machine: 32 CPUs, load 24.99, cpu waiting 10.85%, memory waiting 0.00%, io waiting 1.71%
--- shard 25 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: runner-dead-references started 30s late; cpu waiting 40.4%, load 29.42
shard 25: make runner-dead-references lanes-check build vet fmt-check spacing budget migration-check
python3 scripts/runner-dead-references.py
reference scan: 3462 text files, 3968 matches, 0 failures
python3 native/scripts/check-share.py
Share packaging, keychain-only boundary and reviewed copy verified
python3 scripts/ci-test.py check
lanes: 18 lanes and 5 browser lanes run every test once; 20-check@29
CGO_ENABLED=0 go build ./...
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o /dev/null ./cmd/equipo-runner
go vet ./...
go vet -tags testbuild ./internal/runner/thin ./internal/headless
GOOS=darwin GOARCH=arm64 go vet ./cmd/equipo-runner/... ./internal/runner/... ./internal/wire/... ./internal/release/...
go tool fiesta spacing -skip tokens.css internal/equipo/static
go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget size
budget size: 117 directories within budget
CGO_ENABLED=0 go test ./internal/equipo -run '^TestMigrationModels$' -count=1
ok  	amadan.net/oficina/equipo/internal/equipo	2.917s
machine: 32 CPUs, load 81.33, cpu waiting 45.47%, memory waiting 0.00%, io waiting 0.54%
--- 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.0%, load 29.42
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 74.71, cpu waiting 39.10%, memory waiting 0.00%, io waiting 0.87%
--- shard 27 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: govulncheck started 30s late; cpu waiting 40.4%, load 29.42
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 77.74, cpu waiting 43.06%, memory waiting 0.00%, io waiting 0.71%
--- 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 39.0%, load 29.42
shard 28: make gitleaks
2:50PM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
2:51PM INF 1325 commits scanned.
2:51PM INF scanned ~74877367 bytes (74.88 MB) in 27.5s
2:51PM INF no leaks found
machine: 32 CPUs, load 74.71, cpu waiting 37.95%, memory waiting 0.00%, io waiting 0.90%
=== perf ===
go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -require TestPerfScreens,TestPerfBoot -tags perf -count=1 -p 1 -parallel 1 -run '^TestPerf' ./...
perf: GET /: median 1.053ms, worst 1.115ms, budget 150ms
perf: GET /api/runner/protocol: median 87µs, worst 97µs, budget 150ms
perf: GET /api/v1/account-setups/{id}: median 617µs, worst 666µs, budget 150ms
perf: GET /api/v1/accounts: median 440µs, worst 456µs, budget 150ms
perf: GET /api/v1/auth/devices: median 452µs, worst 493µs, budget 150ms
perf: GET /api/v1/budgets: median 489µs, worst 532µs, budget 150ms
perf: GET /api/v1/capabilities: median 252µs, worst 282µs, budget 150ms
perf: GET /api/v1/cards/{id}: median 1.307ms, worst 1.392ms, budget 150ms
perf: GET /api/v1/connections: median 588µs, worst 623µs, budget 150ms
perf: GET /api/v1/connections/{id}: median 548µs, worst 596µs, budget 150ms
perf: GET /api/v1/conversation: median 939µs, worst 969µs, budget 150ms
perf: GET /api/v1/conversation/cards: median 1.5ms, worst 1.549ms, budget 150ms
perf: GET /api/v1/coordinator: median 1.811ms, worst 1.859ms, budget 150ms
perf: GET /api/v1/invites/{id}: median 463µs, worst 498µs, budget 150ms
perf: GET /api/v1/journey: median 8.659ms, worst 8.86ms, budget 150ms
perf: GET /api/v1/me: median 473µs, worst 502µs, budget 150ms
perf: GET /api/v1/me/settings: median 551µs, worst 611µs, budget 150ms
perf: GET /api/v1/needs-you: median 8.52ms, worst 8.758ms, budget 150ms
perf: GET /api/v1/notifications: median 1.596ms, worst 1.645ms, budget 150ms
perf: GET /api/v1/onboarding: median 380µs, worst 418µs, budget 150ms
perf: GET /api/v1/people: median 431µs, worst 468µs, budget 150ms
perf: GET /api/v1/playbooks: median 560µs, worst 615µs, budget 150ms
perf: GET /api/v1/playbooks/{id}: median 508µs, worst 562µs, budget 150ms
perf: GET /api/v1/playbooks/{id}/template-diff: median 809µs, worst 859µs, budget 150ms
perf: GET /api/v1/preferences: median 724µs, worst 769µs, budget 150ms
perf: GET /api/v1/projects/{id}: median 435µs, worst 460µs, budget 150ms
perf: GET /api/v1/projects/{id}/settings: median 565µs, worst 583µs, budget 150ms
perf: GET /api/v1/roster: median 441µs, worst 473µs, budget 150ms
perf: GET /api/v1/runners/{id}: median 420µs, worst 450µs, budget 150ms
perf: GET /api/v1/specialists: median 7.628ms, worst 7.967ms, budget 150ms
perf: GET /api/v1/specialists/{id}: median 7.518ms, worst 7.647ms, budget 150ms
perf: GET /api/v1/specialists/{id}/template-diff: median 823µs, worst 857µs, budget 150ms
perf: GET /api/v1/tasks/{id}/plan: median 1.086ms, worst 1.13ms, budget 150ms
perf: GET /api/v1/tasks/{id}/thread: median 690µs, worst 750µs, budget 150ms
perf: GET /api/v1/teams: median 415µs, worst 454µs, budget 150ms
perf: GET /api/v1/templates: median 584µs, worst 613µs, budget 150ms
perf: GET /api/v1/templates/{id}: median 437µs, worst 460µs, budget 150ms
perf: GET /auth/callback: median 74µs, worst 83µs, budget 150ms
perf: GET /auth/devices/{id}: median 3.992ms, worst 4.051ms, budget 150ms
perf: GET /auth/verify: median 79µs, worst 113µs, budget 150ms
perf: GET /connections: median 4.248ms, worst 4.393ms, budget 150ms
perf: GET /conversation: median 8.75ms, worst 11.525ms, budget 150ms
perf: GET /conversation/connections: median 259µs, worst 343µs, budget 150ms
perf: GET /conversation/notebook: median 248µs, worst 299µs, budget 150ms
perf: GET /conversation/settings: median 4.725ms, worst 4.84ms, budget 150ms
perf: GET /conversation/settings/autonomy: median 4.601ms, worst 4.732ms, budget 150ms
perf: GET /conversation/settings/connections: median 7.544ms, worst 7.719ms, budget 150ms
perf: GET /conversation/settings/connections/add: median 7.672ms, worst 7.806ms, budget 150ms
perf: GET /conversation/settings/copy: median 4.59ms, worst 4.82ms, budget 150ms
perf: GET /conversation/settings/github: median 4.214ms, worst 4.344ms, budget 150ms
perf: GET /conversation/settings/housekeeping: median 4.773ms, worst 4.859ms, budget 150ms
perf: GET /conversation/settings/machines: median 5.3ms, worst 5.42ms, budget 150ms
perf: GET /conversation/settings/machines/add: median 5.106ms, worst 5.336ms, budget 150ms
perf: GET /conversation/settings/notebook: median 4.059ms, worst 4.128ms, budget 150ms
perf: GET /conversation/settings/places: median 4.169ms, worst 4.243ms, budget 150ms
perf: GET /conversation/settings/thinking: median 4.612ms, worst 4.652ms, budget 150ms
perf: GET /github/connect/installation: median 163µs, worst 188µs, budget 150ms
perf: GET /github/connect/manifest: median 157µs, worst 180µs, budget 150ms
perf: GET /housekeeping: median 4.376ms, worst 4.447ms, budget 150ms
perf: GET /invites/new: median 606µs, worst 629µs, budget 150ms
perf: GET /invites/{id}: median 646µs, worst 670µs, budget 150ms
perf: GET /jobs: median 3.95ms, worst 4.048ms, budget 150ms
perf: GET /jobs/{id}: median 5.208ms, worst 5.392ms, budget 150ms
perf: GET /journey: median 11.908ms, worst 12.017ms, budget 150ms
perf: GET /nav/rail: median 3.64ms, worst 6.201ms, budget 150ms
perf: GET /needs-you: median 11.706ms, worst 11.959ms, budget 150ms
perf: GET /onboarding: median 4.677ms, worst 4.748ms, budget 150ms
perf: GET /people: median 4.013ms, worst 4.102ms, budget 150ms
perf: GET /playbook-suggestions/{suggestion}: median 5.225ms, worst 5.336ms, budget 150ms
perf: GET /playbooks: median 4.737ms, worst 4.798ms, budget 150ms
perf: GET /playbooks/new: median 4.838ms, worst 4.88ms, budget 150ms
perf: GET /playbooks/{id}: median 5.547ms, worst 5.592ms, budget 150ms
perf: GET /playbooks/{id}/edit: median 5.53ms, worst 5.612ms, budget 150ms
perf: GET /playbooks/{id}/template-diff: median 4.748ms, worst 4.859ms, budget 150ms
perf: GET /preferences: median 4.915ms, worst 4.967ms, budget 150ms
perf: GET /preferences/sources/{source}: median 4.669ms, worst 6.658ms, budget 150ms
perf: GET /projects: median 6.449ms, worst 6.489ms, budget 150ms
perf: GET /projects/accounts: median 4.224ms, worst 4.301ms, budget 150ms
perf: GET /projects/new: median 4.156ms, worst 4.265ms, budget 150ms
perf: GET /projects/{id}: median 10.814ms, worst 11.087ms, budget 150ms
perf: GET /projects/{id}/edit: median 4.305ms, worst 4.384ms, budget 150ms
perf: GET /runners/enrol: median 5.007ms, worst 5.068ms, budget 150ms
perf: GET /settings: median 4.023ms, worst 4.158ms, budget 150ms
perf: GET /settings/coordinator: median 5.949ms, worst 6.139ms, budget 150ms
perf: GET /settings/devices: median 3.954ms, worst 4.088ms, budget 150ms
perf: GET /settings/recovery: median 4.026ms, worst 4.325ms, budget 150ms
perf: GET /settings/recovery/release: median 4.071ms, worst 4.207ms, budget 150ms
perf: GET /settings/thinking: median 240µs, worst 271µs, budget 150ms
perf: GET /signed-out: median 264µs, worst 318µs, budget 150ms
perf: GET /signin: median 263µs, worst 296µs, budget 150ms
perf: GET /specialists/new: median 3.961ms, worst 4.051ms, budget 150ms
perf: GET /specialists/{key}: median 13.515ms, worst 13.747ms, budget 150ms
perf: GET /specialists/{key}/edit: median 4.721ms, worst 4.856ms, budget 150ms
perf: GET /specialists/{key}/template-diff: median 4.788ms, worst 4.948ms, budget 150ms
perf: GET /tasks: median 7.124ms, worst 7.281ms, budget 150ms
perf: GET /tasks/new: median 4.177ms, worst 4.243ms, budget 150ms
perf: GET /tasks/{id}: median 6.793ms, worst 6.981ms, budget 150ms
perf: GET /tasks/{id}/merge: median 6.129ms, worst 9.398ms, budget 150ms
perf: GET /tasks/{id}/move: median 5.946ms, worst 6.096ms, budget 150ms
perf: GET /tasks/{id}/plan: median 6.239ms, worst 6.37ms, budget 150ms
perf: GET /tasks/{id}/preview: median 1.693ms, worst 1.764ms, budget 150ms
perf: GET /tasks/{id}/questions/{question}: median 5.695ms, worst 5.756ms, budget 150ms
perf: GET /tasks/{id}/rendered-change: median 5.211ms, worst 5.265ms, budget 150ms
perf: GET /tasks/{id}/rendered-change/{hash}.png: median 4.743ms, worst 4.786ms, budget 150ms
perf: GET /tasks/{id}/thread: median 8.283ms, worst 8.348ms, budget 150ms
perf: GET /team/{specialist}: median 5.031ms, worst 5.081ms, budget 150ms
perf: GET /teams: median 12.289ms, worst 13.882ms, budget 150ms
perf: GET /templates: median 4.521ms, worst 4.676ms, budget 150ms
perf: GET /usage: median 5.49ms, worst 5.514ms, budget 150ms
perf: GET /work: median 4.019ms, worst 4.156ms, budget 150ms
perf: GET /auth/devices/{id}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /connections: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/autonomy: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/connections: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/connections/add: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/copy: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/github: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/housekeeping: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/machines: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/machines/add: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/notebook: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/places: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/thinking: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /housekeeping: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /invites/new: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /invites/{id}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /jobs: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /jobs/{id}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /journey: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /nav/rail: 0 bytes of framework CSS and JS, gzipped; 16000-byte budget
perf: GET /needs-you: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /onboarding: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /people: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /playbook-suggestions/{suggestion}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /playbooks: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /playbooks/new: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /playbooks/{id}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /playbooks/{id}/edit: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /playbooks/{id}/template-diff: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /preferences: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /preferences/sources/{source}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /projects: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /projects/accounts: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /projects/new: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /projects/{id}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /projects/{id}/edit: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /runners/enrol: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /settings: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /settings/coordinator: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /settings/devices: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /settings/recovery: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /settings/recovery/release: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /signed-out: 30270 bytes of framework CSS and JS, gzipped; 40000-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /specialists/new: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /specialists/{key}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /specialists/{key}/edit: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /specialists/{key}/template-diff: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/new: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/merge: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/move: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/plan: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/preview: 25954 bytes of framework CSS and JS, gzipped; 40000-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/questions/{question}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/rendered-change: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/thread: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /team/{specialist}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /teams: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /templates: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /usage: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /work: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: cold boot: median 164ms of [163.035114ms 163.917817ms 164.128862ms], budget 500ms

receipt: test step 59.274s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 112 without tests, 0 failed
receipt: slow package 10.971s amadan.net/oficina/equipo/internal/equipotest
receipt: slow package 0s amadan.net/oficina/equipo/cmd/equipo
receipt: slow package 0s amadan.net/oficina/equipo/cmd/equipo-hosted-controller
receipt: slow package 0s amadan.net/oficina/equipo/cmd/equipo-runner
receipt: slow package 0s amadan.net/oficina/equipo/cmd/equipo-tool-proxy
receipt: slow test 10.42s amadan.net/oficina/equipo/internal/equipotest TestPerfScreens
receipt: slow test 550ms amadan.net/oficina/equipo/internal/equipotest TestPerfBoot
=== cache ===
ci-box: build cache /home/ci/work/repos/oficina__equipo/cache/go-build: 5.33 GiB in 31322 files
ci-box: module cache /home/ci/work/repos/oficina__equipo/cache/go-mod: 1.29 GiB in 46648 files
ci-box: build cache over 4.0 GiB: dropped 1.42 GiB this job did not read, kept 3.90 GiB

landed from renderer-out-of-instance

diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt
index fb6bf29c..df5f6f81 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 24735 - Preview, retry, merges, kept work, check-db, notifications, places, GitHub routes, installer, abilities, lookups, Mac waits, slice F codes, D1, probe details, Design's copy, /api/team; measured 24735.
size internal/wire 9726 - Protocols 31 to 35 (facts, diffs, evidence, CI units, files, places), abilities, 36 lookups, 37 Mac Engineering, 38 Design, unproven and probe detail codes; measured 9726.
-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 - 12693 GitHub connect value search, lifecycle and sweep-log contracts; Task 21 migration fixtures, Rastrillo asset contract, renderer archive link; measured 0/12693 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/AGENTS.md b/AGENTS.md
index c76bbbbe..d4d03005 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -48,6 +48,8 @@ Never log credentials or sign-in links in production.
Production upgrades: an agent runs `scripts/upgrade-thin.sh <version> --execute` (and its rollback) itself, then tells Paul. With a green staging run and no waiver it needs no one's go (Paul, 2026-11-20). A waiver is Paul's decision; once he approves one, the agent still runs the upgrade, not Paul (Paul, 2026-11-22). The cutover scripts and anything needing the owner's sign-in (enrolment links, revoking machines) stay with Paul.
+The page renderer is not in the instance (it would pass the platform's 256 MiB ship cap). A release whose `renderer.tar.gz` changed is published before staging with `scripts/publish-renderer.sh publish <the runner release directory>`: the archive and its `SOURCES` on the forge, under the tag linked into the runner. Staging downloads and checks it (`publish-renderer.sh check`) before it installs anything, and refuses an unpublished one. Self-serve installs fetch it from there.
+
Use Rastrillo v0.45.0 APIs from the pinned module cache. Resolve activation,
open one database, construct the app, clear `opts.DBPath`, then serve.
The database closes on shutdown and on failed app construction.
diff --git a/Makefile b/Makefile
index 38db5c98..7ea6de8a 100644
--- a/Makefile
+++ b/Makefile
@@ -280,6 +280,17 @@ GITLEAKS_SHA256 = $$(sha256sum $(RUNNER_RELEASE_DIR)/gitleaks | cut -d ' ' -f 1)
# 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)
+# The archive itself is not in the instance (it would pass the platform's
+# 256 MiB ship cap): the Linux runner fetches it from its forge release,
+# renderer-<first 12 of its SHA-256> (internal/release RendererForge), and
+# checks its digest and size, linked here from the same file. A withdrawn
+# release's bytes are published again as renderer-<12>-<RENDERER_REVISION>
+# (r2, r3, ...): set it for that build. scripts/publish-renderer.sh
+# publishes the kit's archive and SOURCES under the linked tag.
+RENDERER_ARCHIVE_SHA256 = $$(sha256sum $(RUNNER_RELEASE_DIR)/renderer.tar.gz | cut -d ' ' -f 1)
+RENDERER_ARCHIVE_SIZE = $$(stat -c %s $(RUNNER_RELEASE_DIR)/renderer.tar.gz)
+RENDERER_REVISION ?=
+RENDERER_TAG = renderer-$$(sha256sum $(RUNNER_RELEASE_DIR)/renderer.tar.gz | cut -c 1-12)$(if $(RENDERER_REVISION),-$(RENDERER_REVISION))
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
@@ -293,7 +304,7 @@ release-runner: copy-release-check direct-release-check
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) -X amadan.net/oficina/equipo/internal/release.rendererSHA256=$(RENDERER_SHA256)" \
+ -ldflags "$(RELEASE_LDFLAGS) -X amadan.net/oficina/equipo/internal/release.gitleaksSHA256=$(GITLEAKS_SHA256) -X amadan.net/oficina/equipo/internal/release.rendererSHA256=$(RENDERER_SHA256) -X amadan.net/oficina/equipo/internal/release.rendererArchiveSHA256=$(RENDERER_ARCHIVE_SHA256) -X amadan.net/oficina/equipo/internal/release.rendererArchiveSize=$(RENDERER_ARCHIVE_SIZE) -X amadan.net/oficina/equipo/internal/release.rendererTag=$(RENDERER_TAG)" \
-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/docs/superpowers/specs/2026-11-30-renderer-out-of-instance.md b/docs/superpowers/specs/2026-11-30-renderer-out-of-instance.md
new file mode 100644
index 00000000..d6c59574
--- /dev/null
+++ b/docs/superpowers/specs/2026-11-30-renderer-out-of-instance.md
@@ -0,0 +1,284 @@
+# The page renderer out of the instance (design note)
+
+Status: rev 4, built on this branch. Rev 2 was approved by the
+coordinating session (2026-11-30). Rev 3 adds the host probe's findings and
+the SOURCES record. Rev 4 folds in Astra's build round 1 (below). Branch
+`renderer-out-of-instance` off main dd66ff0c. Rev 1 had one Astra review
+(NOT READY, 4 Important, 2 Minor). Its findings are folded in below and
+listed at the end. It was not reviewed again.
+
+## Problem
+
+dd66ff0c's instance artifact is 374 MB. `scripts/build-instance-release.sh`
+copies the Linux runner's `renderer.tar.gz` (230,650,088 bytes) into
+`internal/release/bundled`, which `//go:embed bundled/*` links into the
+instance so it can serve `/releases/<version>/renderer.tar.gz`. CARLOS caps
+one ship at 256 MiB (carlos/platform `internal/console/apicli.go:1827`), so
+`carlos deploy` answers 413. Ruling (a): the renderer stops riding inside
+the instance binary, and the runner gets it separately, verified as install
+verifies it today. No chunked deploys, no split binary.
+
+## Who reads the instance's copy today
+
+Only the self-serve install: `install-v1.sh` runs the runner's
+`setup.installUser` (`internal/runner/setup/install.go`). It fetches
+`<origin>/releases/<v>/renderer.tar.gz` when no verified tree for the
+linked pin is on disk, and requires the archive's MANIFEST digest to equal
+both the pin linked into the runner (`release.rendererSHA256`) and the
+install manifest's `targets.linux.renderer_sha256`.
+
+The operator paths never touch it. `scripts/upgrade-thin.sh`,
+`cutover-thin.sh`, `cutover-finish-thin.sh` and `staging-thin.py` run
+the runner's `install-renderer <kit>/renderer.tar.gz` from the release
+kit, after `renderer_linked` checks the MANIFEST digest against the runner.
+The Mac updater (`thin/mac.go`) fetches only darwin assets, and a Mac has no
+renderer. `verify-installed` reads the tree on disk and renders the fixture.
+
+So the change is confined to where the self-serve install gets the archive,
+and to what the instance embeds and serves.
+
+## Decision: a release asset on the forge, addressed by the archive
+
+Each renderer archive is published once as a release on the amadan forge,
+in oficina/equipo, and the runner knows exactly which one:
+
+- The archive digest `rendererArchiveSHA256` is linked into the Linux
+ runner beside the tree pin (`rendererSHA256`), from the same kit file
+ (Makefile `release-runner`).
+- So is a release tag `rendererTag`: `renderer-<first 12 of the archive
+ digest>`, or `renderer-<12>-r<n>` if an earlier publication of the same
+ bytes was withdrawn (see below).
+- The forge origin and repository path are constants in the runner
+ (`https://amadan.net/oficina/equipo/-/releases/`), not data. The runner
+ builds the URL itself: origin + tag + `/renderer.tar.gz`. Nothing the
+ instance or the install manifest says can point it elsewhere.
+
+The asset is the kit's `renderer.tar.gz`, byte for byte. The forge says
+"anyone who can see the repo can download a file", and the repo is public.
+
+The addressing is by archive bytes, not by tree pin. A builder or
+compression change can keep the MANIFEST and change the archive. It then
+gets its own tag rather than colliding with the published one. Most
+releases change neither, link the same tag and publish nothing.
+
+### What the install manifest records
+
+`targets.linux` gains `renderer_archive_sha256` and
+`renderer_archive_size` beside `renderer_sha256` (the tree pin,
+unchanged). They are informational for the instance and for operators. The
+runner checks them against its own linked values and refuses a
+disagreement (`runner.install.checksum`). No URL is recorded.
+
+### Trust does not move
+
+The runner checks, in order, before anything of the runner is written:
+
+1. the download is exactly `renderer_archive_size` bytes (bounded by
+ `RendererArchiveMax`, 384 MiB) and its SHA-256 is the linked archive
+ digest
+2. the archive's MANIFEST digest is the linked tree pin
+ (`RendererArchivePin`, as today)
+3. the unpacked tree verifies in full before it is renamed into place
+ (`InstallRenderer` and `VerifyRenderer`, as today). The MANIFEST check
+ alone does not cover payload bytes.
+
+Redirects: the forge answers the asset URL with `302` to a presigned S3
+URL (host probe, 2026-11-30: `s3.eu-west-1.amazonaws.com`, five-minute
+expiry). So the runner follows exactly one redirect, only from the fixed
+forge URL, and only to an `https` URL with no credentials in it. A second
+redirect, a non-https target or any other status is
+`runner.install.release`. The target host is not pinned: the bytes are
+checked by size and digest, and the presigned host is the forge's storage
+detail. A HEAD, or a ranged GET, is never sent. The forge counts a
+redirect it issues as a download (the probe's HEAD made the release
+impossible to undo).
+
+### The download
+
+One private scratch file (`O_TMPFILE`, or a 0600 file in the install's own
+scratch directory) keeps a single descriptor throughout. The response body
+is copied through a hash, bounded at size + 1. A short read, an overlong
+read, a cancelled context or a failed check deletes the scratch and stops.
+After step 1 the descriptor is rewound for step 2, then again for
+unpacking. The deadline is per transfer, with a long overall bound (for
+example 20 minutes) and a stall timeout, not `fetchRelease`'s 2 minutes. No
+230 MB buffer stays in memory, as one does today.
+
+## What changes, by path
+
+**Instance.** `build-instance-release.sh` stops copying `renderer.tar.gz`
+into the bundle. `install_assets.go` stops requiring it, checking its pin
+and serving it, so `/releases/<v>/renderer.tar.gz` is a 404, as any unknown
+name is. `TestBundledInstallAssets` and the bundle tests drop it. Expected
+artifact size is back near 152 MB. A test bounds the bundle (for example
+the sum of embedded files under 200 MiB) so this cannot regress silently.
+
+**Self-serve install** (`setup/install.go`):
+
+- A tree already verified for the pin is kept and nothing is fetched (as
+ today).
+- Otherwise, if the previous release directory beside it has a tree that
+ verifies for the same pin, it is copied (not hardlinked:
+ `VerifyRenderer` refuses files with more than one link) into a scratch
+ directory, verified and renamed into place. Nothing is fetched.
+- Otherwise the runner fetches its own URL (above), streams to scratch and
+ checks 1-3.
+- Failure keys stay as they are, with no new copy: unreachable means
+ `runner.install.release`, a wrong digest, size or pin means
+ `runner.install.checksum`, and nothing of the runner is written (the
+ order today: renderer unpacked and verified before any runner file).
+
+**Upgrade, cutover, staging** (operator, agent-run): no change. They
+already install from the kit's `renderer.tar.gz` and verify it against the
+runner.
+
+**verify-installed:** no change. The tree is beside the runner, as today.
+
+**Mac:** no change.
+
+## Offline, outage, mismatch
+
+- A runner that already has the tree for its pin needs nothing. Its
+ restarts and Design work never fetch.
+- A new install, or a new pin, while amadan.net is unreachable fails
+ closed, as an install fails today when the instance is unreachable
+ (`runner.install.release`). The old tree and the old release stay.
+- A mismatch at any of 1-3 refuses (`runner.install.checksum`), writes
+ nothing, and the scratch is removed.
+- A runner whose tree is missing or wrong still runs Engineering. Its
+ renderer health says so, and Design waits (`design_renderer`, the
+ existing copy), as today.
+- A withdrawn asset (forge `release withdraw`) makes new installs of that
+ pin fail closed. The fix is a new renderer pin and release, as for any
+ bad build.
+
+## The release kit and the release step
+
+- `make release-runner` keeps building `renderer.tar.gz` into the kit (the
+ operator scripts need it). It links the tree pin, the archive digest and
+ `rendererTag` into the Linux runner.
+- Provenance: `scripts/staged-artifacts.py` records the hashes of
+ `renderer.tar.gz` and of `install-manifest.json` in its `artifacts()`
+ when the kit is staged, and verifies them on every later use. Then the
+ kit's archive and manifest cannot both be swapped after staging while
+ the instance embeds the originals.
+- New step `scripts/publish-renderer.sh <kit>`. It reads the tag linked
+ into the kit's runner. If that release exists, it downloads the asset
+ unauthenticated and requires its SHA-256 to equal the kit's. Otherwise it
+ tags the current commit, runs `amadan release create <tag>
+ <kit>/renderer.tar.gz` and checks the upload the same way. It needs
+ writer access (an agent account's token, or a PAT in CI).
+- Ordering: `staging-thin.py` runs the same check, a full unauthenticated
+ GET of the published asset and its digest against the staged provenance,
+ never a HEAD, as a prerequisite before it installs anything. Staging installs from the kit, so without this an unpublished
+ asset would only show at a user's install. Production promotion goes
+ through staging, so it cannot ship before the asset exists.
+- Withdrawal: if a published asset must be withdrawn, the same bytes are
+ republished as `renderer-<12>-r<n+1>`. A new runner build links that tag,
+ and an Equipo release follows. Runners already installed keep their
+ verified trees.
+
+## Alternatives considered
+
+- **Build the tree on the runner from the pinned debs** (98 packages,
+ 171 MB, from snapshot.debian.org by sha256). It needs no new hosting,
+ and `ulikunitz/xz` is already a dependency. But it means a Go port of
+ `build-renderer-tree.py` whose MANIFEST must match byte for byte (or
+ replacing the Python with it). It also means 98 requests per install to
+ a service that asks not to be used as a mirror, and regular mirrors drop
+ pinned Chromium builds within weeks. Kept as a possible later fallback.
+- **A separate CARLOS ship for the archive.** 230.6 MB is 90% of the
+ 256 MiB cap, so a Chromium update could cross it. That is the same limit
+ again.
+- **Object storage outside CARLOS** (an S3 bucket, like the platform's CI
+ mirror). New infrastructure, and it steps around the platform.
+
+## Host probe (done 2026-11-30)
+
+The forge accepted a 251,658,240-byte (240 MiB) random blob as release
+`probe-size-20261130` in 1 min 49 s, and reported the same SHA-256. An
+unauthenticated HEAD answered `302` to presigned S3. That HEAD counted as a
+download, so the release could not be undone: an owner withdraws it. The
+full anonymous transfer is proven when staging installs from the published
+asset (below).
+
+## SOURCES: what we distribute
+
+Publishing the archive makes us a public distributor of the Debian
+packages in it and of Chromium. The renderer release therefore carries a
+second asset, `SOURCES`, and its notes say so in one line ("The page
+renderer: Debian packages and Chromium headless shell <version>. Where
+each one's source is: SOURCES.").
+
+`SOURCES` is generated from `internal/release/renderer.json`, the same
+pinned list the archive is built from, by
+`scripts/renderer-sources.py <renderer.json> <SOURCES>`, so it cannot
+drift. It is deterministic text:
+
+- a header: the Chromium headless-shell version (`renderer.json`
+ `version`), and its source package on snapshot.debian.org
+ (`https://snapshot.debian.org/package/chromium/<version>/`, which links
+ the `.dsc` and upstream tarballs)
+- one line per amd64 package, in the pin's order: package, exact version,
+ architecture, the snapshot URL of the binary it was built from, and its
+ source package page
+ (`https://snapshot.debian.org/package/<source>/<source version>/`)
+
+A package's source name and version are not in `renderer.json` today
+(its `package` is the binary). The generator reads them from each `.deb`'s
+`control` (`Source:` field, which defaults to the binary's name and
+version), which the archive build already fetches and checks by sha256.
+So `build-renderer-tree.py` writes `SOURCES` beside `renderer.tar.gz` in
+the same run, and `scripts/renderer-sources.py` is the function it calls.
+A test checks `SOURCES` lists exactly the pinned packages.
+`publish-renderer.sh` uploads both assets. Its check (full GET, digest)
+covers `SOURCES` too, against the kit's copy.
+
+## Astra rev 1 findings and what changed
+
+- Important, URL policy: an https URL from data permits any destination.
+ Now the URL is built from a runner constant and a linked tag, and
+ only one redirect, from the forge to https, is followed (rev 3).
+- Important, provenance: staged artifacts did not record the archive or
+ the manifest. Both are now recorded and re-verified.
+- Important, identity: a tree pin does not identify the compressed bytes.
+ Now addressed by the archive digest, with a revision suffix after a
+ withdrawal.
+- Important, ordering and hosting: now a full-size upload is proven first,
+ and staging requires the published asset as a prerequisite.
+- Minor, download lifecycle: specified (one descriptor, bounded, rewound,
+ scratch removed on any failure), and the full-tree check is kept.
+- Minor, hardlinks: tree reuse copies.
+
+## Tests the build would add
+
+- install builds the URL from the linked tag only, follows one redirect to
+ https and refuses a second, a non-https target or a credentialed URL, and
+ refuses a wrong size, archive digest or tree pin, and a truncated or
+ cancelled download, with nothing written and the scratch gone. It keeps
+ a verified tree without fetching, and copies one from the previous
+ release.
+- the instance bundle has no renderer and stays under its bound; the
+ instance answers 404 for it.
+- manifest validation requires the archive digest and size on Linux, and
+ install refuses a manifest that disagrees with the linked values.
+- `staged-artifacts.py` refuses a kit whose archive or manifest changed
+ after staging.
+- `publish-renderer.sh` refuses a published asset that differs from the
+ kit.
+
+## Astra build round 1 (on rev 3) and what changed
+
+- Important, provenance: adding the archive and the install manifest to
+ `artifacts()` would send them through the Go build-information check.
+ Now every artifact is hashed, and only binaries are asked for build
+ information (`NOT_BINARIES`). The exact Linux-target comparison
+ includes the archive's digest and size.
+- Important, SOURCES lacked provenance. It is now one of the staged
+ artifacts, hashed and re-verified like the archive.
+- Minor, tagging: `publish-renderer.sh` tags the kit's `COMMIT`, never the
+ checkout, and refuses a forge tag on another commit.
+- Minor, size: the archive size is linked into the runner
+ (`rendererArchiveSize`) from the same file, and `RendererAsset.Valid`
+ requires `0 < size <= RendererArchiveMax`.
+
diff --git a/internal/equipotest/runner_release_test.go b/internal/equipotest/runner_release_test.go
index 38173252..02d1a69d 100644
--- a/internal/equipotest/runner_release_test.go
+++ b/internal/equipotest/runner_release_test.go
@@ -90,14 +90,14 @@ func runnerPackagingScenarios(t *testing.T, target string, scenarios []string) {
"git": "#!/bin/sh\ncase \"$1\" in diff) [ \"$SCENARIO\" != dirty ];; rev-parse) echo abc1234;; ls-files) if [ \"$SCENARIO\" = untracked ]; then echo unsafe.go; fi;; status) if [ \"$SCENARIO\" = dirty ]; then echo ' M tracked'; fi; if [ \"$SCENARIO\" = untracked ]; then echo '?? unsafe.go'; fi; if [ -e changed-during-build ]; then echo '?? changed-during-build'; fi;; clone) for a; do last=$a; done; mkdir -p \"$last\" && cp -R . \"$last\";; esac\n",
// Each build writes its own bytes, so every artifact has its own digest.
// go version -m reports the commit a binary says it was built from.
- "go": "#!/bin/sh\ncase \"$1\" in env) echo go1.26.11;; version) rev=abc1234; mod=false; if [ \"$SCENARIO\" = vcs_revision ]; then rev=def5678; fi; if [ \"$SCENARIO\" = vcs_modified ]; then mod=true; fi; if [ \"$SCENARIO\" != vcs_missing ]; then printf '%s: go1.26.11\\n\\tpath\\tfixture\\n\\tbuild\\tvcs.revision=%s\\n\\tbuild\\tvcs.modified=%s\\n' \"$3\" \"$rev\" \"$mod\"; fi;; test) [ \"$SCENARIO\" != copy ];; build) if [ \"$SCENARIO\" = changed_during_build ]; then touch changed-during-build; fi; if [ \"$GOOS/$GOARCH\" = linux/arm64 ]; then test -f internal/release/bundled/install-manifest.json || exit 97; test -f internal/release/bundled/renderer.tar.gz || exit 96; fi; printf '%s\\n' \"$GOOS/$GOARCH\" \"$@\" >> \"$CAPTURE\"; while [ $# -gt 0 ]; do if [ \"$1\" = -o ]; then shift; printf 'built %s for %s\\n' \"$1\" \"$GOOS/$GOARCH\" > \"$1\"; fi; shift; done;; esac\n",
+ "go": "#!/bin/sh\ncase \"$1\" in env) echo go1.26.11;; version) rev=abc1234; mod=false; if [ \"$SCENARIO\" = vcs_revision ]; then rev=def5678; fi; if [ \"$SCENARIO\" = vcs_modified ]; then mod=true; fi; if [ \"$SCENARIO\" != vcs_missing ]; then printf '%s: go1.26.11\\n\\tpath\\tfixture\\n\\tbuild\\tvcs.revision=%s\\n\\tbuild\\tvcs.modified=%s\\n' \"$3\" \"$rev\" \"$mod\"; fi;; test) [ \"$SCENARIO\" != copy ];; build) if [ \"$SCENARIO\" = changed_during_build ]; then touch changed-during-build; fi; if [ \"$GOOS/$GOARCH\" = linux/arm64 ]; then test -f internal/release/bundled/install-manifest.json || exit 97; test ! -e internal/release/bundled/renderer.tar.gz || exit 96; fi; printf '%s\\n' \"$GOOS/$GOARCH\" \"$@\" >> \"$CAPTURE\"; while [ $# -gt 0 ]; do if [ \"$1\" = -o ]; then shift; printf 'built %s for %s\\n' \"$1\" \"$GOOS/$GOARCH\" > \"$1\"; fi; shift; done;; esac\n",
"codex": "#!/bin/sh\n[ \"$SCENARIO\" != codex ] && echo 'codex-cli 0.165.0'\n",
"bwrap": "#!/bin/sh\nif [ \"$SCENARIO\" = bwrap ]; then echo 'bubblewrap 0.10.0'; else echo 'bubblewrap 0.11.0'; fi\n",
"systemctl": "#!/bin/sh\nexit 98\n",
"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
+ 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))\nopen(sys.argv[2].rsplit('/', 1)[0] + '/SOURCES', 'w').write('sources\\n')\nprint(hashlib.sha256(m).hexdigest())\n" // a tree of one directory, and its SOURCES: the script itself is tested in internal/release
for name, script := range scripts {
executionMust(t, os.WriteFile(filepath.Join(bin, name), []byte(script), 0700))
}
@@ -155,6 +155,12 @@ func runnerPackagingScenarios(t *testing.T, target string, scenarios []string) {
executionMust(t, err)
return fmt.Sprintf("%x", sha256.Sum256(b))
}
+ size := func(path string) int64 {
+ t.Helper()
+ info, err := os.Stat(path)
+ executionMust(t, err)
+ return info.Size()
+ }
proxy := digest(filepath.Join(dir, "equipo-tool-proxy"))
// The tool proxy is built first, plainly; both runners are then
// linked with the digest of that build (Mac runners spec §3.1:
@@ -162,7 +168,10 @@ 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")) + " -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",
+ "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"))) +
+ // The archive the runner fetches from the forge: its digest,
+ // size and the tag its digest names.
+ " -X amadan.net/oficina/equipo/internal/release.rendererArchiveSHA256=" + digest(filepath.Join(dir, "renderer.tar.gz")) + " -X amadan.net/oficina/equipo/internal/release.rendererArchiveSize=" + fmt.Sprint(size(filepath.Join(dir, "renderer.tar.gz"))) + " -X amadan.net/oficina/equipo/internal/release.rendererTag=renderer-" + digest(filepath.Join(dir, "renderer.tar.gz"))[:12] + "\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) {
@@ -194,7 +203,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")), RendererSHA256: fmt.Sprintf("%x", sha256.Sum256([]byte("dir usr\n")))}, 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"))), RendererArchiveSHA256: digest(filepath.Join(dir, "renderer.tar.gz")), RendererArchiveSize: size(filepath.Join(dir, "renderer.tar.gz"))}, 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) {
@@ -215,7 +224,8 @@ func runnerPackagingScenarios(t *testing.T, target string, scenarios []string) {
SHA256 map[string]string
}
readJSON(instance+".manifest.json", &made)
- if made.Version != "abc1234" || made.Commit != "abc1234" || made.Go != "go1.26.11" || !reflect.DeepEqual(made.Release, shipped) || !reflect.DeepEqual(made.SHA256, map[string]string{"instance": digest(instance), "runner": runner, "tool_proxy": proxy, "darwin_runner": mac, "gitleaks": digest(filepath.Join(dir, "gitleaks")), "darwin_gitleaks": digest(filepath.Join(dir, "darwin-arm64", "gitleaks"))}) {
+ if made.Version != "abc1234" || made.Commit != "abc1234" || made.Go != "go1.26.11" || !reflect.DeepEqual(made.Release, shipped) || !reflect.DeepEqual(made.SHA256, map[string]string{"instance": digest(instance), "runner": runner, "tool_proxy": proxy, "darwin_runner": mac, "gitleaks": digest(filepath.Join(dir, "gitleaks")), "darwin_gitleaks": digest(filepath.Join(dir, "darwin-arm64", "gitleaks")),
+ "renderer_archive": digest(filepath.Join(dir, "renderer.tar.gz")), "renderer_sources": digest(filepath.Join(dir, "SOURCES")), "install_manifest": digest(filepath.Join(dir, "install-manifest.json"))}) {
t.Fatalf("provenance manifest %+v", made)
}
if _, err := os.Stat(instance + ".evidence"); !os.IsNotExist(err) {
diff --git a/internal/release/embedded_install_test.go b/internal/release/embedded_install_test.go
index 9d28b599..5a87ec38 100644
--- a/internal/release/embedded_install_test.go
+++ b/internal/release/embedded_install_test.go
@@ -167,13 +167,7 @@ func TestBundledInstallAssets(t *testing.T) {
if !a.CachedAvailable() {
t.Fatal("bundled release unavailable")
}
- names := installAssetNames
- // The renderer the Linux runner installs beside itself (amd64).
- if m.Targets[TargetLinux].RendererSHA256 == "" {
- t.Fatal("the bundled release names no renderer")
- }
- names = append(names[:len(names):len(names)], RendererArchive)
- for _, name := range names {
+ for _, name := range installAssetNames {
w := httptest.NewRecorder()
a.ServeHTTP(w, httptest.NewRequest("GET", "/releases/"+m.Version+"/"+name, nil))
want, e := fs.ReadFile(files, name)
@@ -181,4 +175,31 @@ func TestBundledInstallAssets(t *testing.T) {
t.Fatal("bundled HTTP asset", name, w.Code, e)
}
}
+ // The release names the renderer the Linux runner installs (its tree
+ // pin, archive digest and size), but the instance neither carries nor
+ // serves it: the runner fetches it from the forge.
+ if linux := m.Targets[TargetLinux]; linux.RendererSHA256 == "" || linux.RendererArchiveSHA256 == "" || linux.RendererArchiveSize <= 0 {
+ t.Fatal("the bundled release names no renderer")
+ }
+ if _, err := fs.Stat(files, RendererArchive); err == nil {
+ t.Fatal("the renderer is bundled into the instance")
+ }
+ w := httptest.NewRecorder()
+ a.ServeHTTP(w, httptest.NewRequest("GET", "/releases/"+m.Version+"/"+RendererArchive, nil))
+ if w.Code != 404 {
+ t.Fatalf("the instance serves the renderer: %d", w.Code)
+ }
+ // And everything bundled stays well under the platform's ship cap.
+ var total int64
+ fs.WalkDir(files, ".", func(_ string, d fs.DirEntry, err error) error {
+ if err == nil && !d.IsDir() {
+ if info, err := d.Info(); err == nil {
+ total += info.Size()
+ }
+ }
+ return nil
+ })
+ if total > 160<<20 {
+ t.Fatalf("the bundle is %d bytes, over 160 MiB", total)
+ }
}
diff --git a/internal/release/install.go b/internal/release/install.go
index eeb72bc4..fa5c0c50 100644
--- a/internal/release/install.go
+++ b/internal/release/install.go
@@ -27,13 +27,19 @@ type InstallManifest struct {
}
// 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).
+// Linux the renderer's: the SHA-256 of renderer.tar.gz's MANIFEST, the
+// pin linked into that runner (rendererSHA256), and the archive's own
+// SHA-256 and size (rendererArchiveSHA256, rendererArchiveSize). The
+// archive is published on the forge, not served by the instance; these
+// say which one, and the runner refuses a manifest that disagrees with
+// what is linked into it.
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"`
+ GitleaksSHA256 string `json:"gitleaks_sha256,omitempty"`
+ RendererSHA256 string `json:"renderer_sha256,omitempty"`
+ RendererArchiveSHA256 string `json:"renderer_archive_sha256,omitempty"`
+ RendererArchiveSize int64 `json:"renderer_archive_size,omitempty"`
+ RunnerSHA256 string `json:"runner_sha256"`
+ ToolProxySHA256 string `json:"tool_proxy_sha256,omitempty"`
}
// The Mac worker's target and where its files are served, under
@@ -102,6 +108,12 @@ func (m InstallManifest) Validate(version string) error {
if !ValidInstallVersion(version) || m.Version != version || m.Target != TargetLinux || !sha256Hex(m.RunnerSHA256) || linux.RunnerSHA256 != m.RunnerSHA256 || linux.ToolProxySHA256 != m.Release.ToolProxySHA256() || !m.Release.Installable() || !reflect.DeepEqual(m.NamespaceArgs, provider.NamespaceArguments()) {
return errManifest
}
+ // A renderer pin comes with its archive's digest and size, and an
+ // archive with a pin.
+ archive := linux.RendererArchiveSHA256 != "" || linux.RendererArchiveSize != 0
+ if archive != (linux.RendererSHA256 != "") || archive && (!sha256Hex(linux.RendererSHA256) || !sha256Hex(linux.RendererArchiveSHA256) || linux.RendererArchiveSize <= 0 || linux.RendererArchiveSize > RendererArchiveMax) {
+ return errManifest
+ }
return nil
}
diff --git a/internal/release/install_assets.go b/internal/release/install_assets.go
index 35ae39f7..3edaa32b 100644
--- a/internal/release/install_assets.go
+++ b/internal/release/install_assets.go
@@ -78,8 +78,6 @@ func (a *InstallAssets) open(name string) (installFile, error) {
switch name {
case "install-manifest.json", "install-v1.sh":
limit = 1 << 20
- case RendererArchive:
- limit = RendererArchiveMax
}
if e != nil || !i.Mode().IsRegular() || i.Size() > limit {
f.Close()
@@ -182,24 +180,9 @@ func (a *InstallAssets) Available() bool {
return false
}
}
- // The renderer the Linux runner installs beside itself: its MANIFEST,
- // the archive's first member, is the pin the release recorded (and
- // linked into the runner, which checks the whole tree against it).
- if want := m.Targets[TargetLinux].RendererSHA256; want != "" {
- f, err := a.open(RendererArchive)
- if err != nil {
- return false
- }
- files[RendererArchive] = f
- got, err := RendererArchivePin(f)
- if err != nil || got != want {
- return false
- }
- infos[RendererArchive], err = f.Stat()
- if err != nil {
- return false
- }
- }
+ // The page renderer is not served here: the Linux runner fetches it
+ // from the forge (RendererForge), checked against what is linked into
+ // it. An instance carrying it would pass the platform's ship cap.
// The Mac worker: listed, present and matching, or not served at all.
if t, e := m.DarwinTarget(a.Version); e == nil {
mac := map[string]installFile{}
@@ -245,7 +228,7 @@ func (a *InstallAssets) ServeHTTP(w http.ResponseWriter, r *http.Request) {
prefix := "/releases/" + a.Version + "/"
name := strings.TrimPrefix(r.URL.Path, prefix)
mac := slices.Contains(darwinAssetNames, name)
- if !strings.HasPrefix(r.URL.Path, prefix) || (r.Method != "GET" && r.Method != "HEAD") || (name != "install-v1.sh" && name != "install-manifest.json" && name != "equipo-runner" && name != "equipo-tool-proxy" && name != "gitleaks" && name != RendererArchive && !mac) {
+ if !strings.HasPrefix(r.URL.Path, prefix) || (r.Method != "GET" && r.Method != "HEAD") || (name != "install-v1.sh" && name != "install-manifest.json" && name != "equipo-runner" && name != "equipo-tool-proxy" && name != "gitleaks" && !mac) {
w.WriteHeader(http.StatusNotFound)
return
}
diff --git a/internal/release/install_test.go b/internal/release/install_test.go
index 15266da2..d44aec66 100644
--- a/internal/release/install_test.go
+++ b/internal/release/install_test.go
@@ -60,6 +60,11 @@ func TestOnboardingInstallPackaging(t *testing.T) {
if manifest.Targets[TargetLinux].RendererSHA256 != renderer {
t.Fatal("renderer pin missing from release", manifest)
}
+ // And the archive by its own digest and size: what the runner fetches
+ // from the forge.
+ if tarball, err := os.ReadFile(filepath.Join(root, "renderer.tar.gz")); err != nil || manifest.Targets[TargetLinux].RendererArchiveSHA256 != fmt.Sprintf("%x", sha256.Sum256(tarball)) || manifest.Targets[TargetLinux].RendererArchiveSize != int64(len(tarball)) {
+ t.Fatal("renderer archive missing from release", manifest.Targets[TargetLinux], err)
+ }
if manifest.RunnerSHA256 != fmt.Sprintf("%x", sha256.Sum256(binary)) {
t.Fatal("checksum mismatch")
}
diff --git a/internal/release/renderer.go b/internal/release/renderer.go
index 8aa73f09..3a2ee7d6 100644
--- a/internal/release/renderer.go
+++ b/internal/release/renderer.go
@@ -1,6 +1,11 @@
package release
-import "amadan.net/oficina/equipo/internal/wire"
+import (
+ "regexp"
+ "strconv"
+
+ "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
@@ -17,3 +22,46 @@ func RendererPin() (pin, health string) {
}
return rendererSHA256, ""
}
+
+// Linked from the same kit file as rendererSHA256 (Makefile,
+// release-runner): the archive's own SHA-256 and size, and the forge
+// release tag it is published under (renderer-<first 12 of that digest>,
+// or renderer-<12>-r<n> after a withdrawal). Only the Linux runner has
+// them.
+var rendererArchiveSHA256, rendererArchiveSize, rendererTag string
+
+// RendererForge is where every published renderer archive is, by tag:
+// <RendererForge><tag>/renderer.tar.gz. A constant of the runner, never
+// data: nothing an instance or a manifest says can point it elsewhere.
+const RendererForge = "https://amadan.net/oficina/equipo/-/releases/"
+
+// RendererAsset is the published archive a runner fetches when it has no
+// verified tree: the tree pin it unpacks to, the archive's digest and size,
+// and its forge tag.
+type RendererAsset struct {
+ Pin, SHA256 string
+ Size int64
+ Tag string
+}
+
+// URL is the archive's address on the forge.
+func (a RendererAsset) URL() string { return RendererForge + a.Tag + "/" + RendererArchive }
+
+// rendererTagPattern is renderer-<12 hex>, with an optional -r<n>.
+var rendererTagPattern = regexp.MustCompile(`^renderer-([0-9a-f]{12})(-r[1-9][0-9]{0,2})?$`)
+
+// Valid: a tree pin, an archive digest, a size within RendererArchiveMax
+// and a tag naming that digest.
+func (a RendererAsset) Valid() bool {
+ m := rendererTagPattern.FindStringSubmatch(a.Tag)
+ return sha256Hex(a.Pin) && sha256Hex(a.SHA256) && a.Size > 0 && a.Size <= RendererArchiveMax && m != nil && m[1] == a.SHA256[:12]
+}
+
+// LinkedRendererAsset is the asset linked into this build, and whether it
+// is whole and valid (only a Linux release runner has one).
+func LinkedRendererAsset() (RendererAsset, bool) {
+ pin, _ := RendererPin()
+ size, err := strconv.ParseInt(rendererArchiveSize, 10, 64)
+ a := RendererAsset{Pin: pin, SHA256: rendererArchiveSHA256, Size: size, Tag: rendererTag}
+ return a, err == nil && a.Valid()
+}
diff --git a/internal/release/renderer_assets_test.go b/internal/release/renderer_assets_test.go
index a7c76217..cbc4bb49 100644
--- a/internal/release/renderer_assets_test.go
+++ b/internal/release/renderer_assets_test.go
@@ -7,14 +7,16 @@ import (
"net/http/httptest"
"os"
"path/filepath"
+ "strings"
"testing"
"amadan.net/oficina/equipo/internal/release/renderertest"
"amadan.net/oficina/equipo/internal/runner/provider"
)
-// rendererAssets is a release directory as the instance serves one, its
-// Linux target naming the renderer archive beside the runner.
+// rendererAssets is a release directory as the instance serves one: its
+// Linux target names the renderer (pin, archive digest and size), and a
+// renderer.tar.gz lies beside the runner, as in a release kit.
func rendererAssets(t *testing.T) (*InstallAssets, string, []byte) {
t.Helper()
root := t.TempDir()
@@ -33,7 +35,7 @@ func rendererAssets(t *testing.T) (*InstallAssets, string, []byte) {
sum := func(b []byte) string { return fmt.Sprintf("%x", sha256.Sum256(b)) }
manifest := InstallManifest{Version: "fixture-16", Target: TargetLinux, RunnerSHA256: sum(runner), NamespaceArgs: provider.NamespaceArguments(), Release: m,
Targets: map[string]InstallTarget{
- TargetLinux: {RunnerSHA256: sum(runner), ToolProxySHA256: sum(proxy), GitleaksSHA256: sum(scanner), RendererSHA256: pin},
+ TargetLinux: {RunnerSHA256: sum(runner), ToolProxySHA256: sum(proxy), GitleaksSHA256: sum(scanner), RendererSHA256: pin, RendererArchiveSHA256: sum(archive), RendererArchiveSize: int64(len(archive))},
TargetDarwin: {RunnerSHA256: sum([]byte("mac runner"))},
}}
raw, err := json.Marshal(manifest)
@@ -56,77 +58,106 @@ func getAsset(a *InstallAssets, name string) (int, string) {
return w.Code, w.Body.String()
}
-// The instance serves renderer.tar.gz with the Linux runner when its
-// MANIFEST is the pin the release recorded; a Mac worker has none.
-func TestInstallAssetsServeTheRendererOnLinux(t *testing.T) {
- a, _, archive := rendererAssets(t)
- if code, body := getAsset(a, RendererArchive); code != 200 || body != string(archive) {
- t.Fatalf("renderer archive %d", code)
- }
- if code, _ := getAsset(a, "darwin-arm64/equipo-runner"); code != 200 {
- t.Fatalf("mac runner %d", code)
+// The instance never serves the renderer, even with one beside the
+// runner: the runner fetches it from the forge. The rest of the release
+// is served as before.
+func TestInstallAssetsNeverServeTheRenderer(t *testing.T) {
+ a, _, _ := rendererAssets(t)
+ for _, name := range []string{RendererArchive, "darwin-arm64/" + RendererArchive} {
+ if code, _ := getAsset(a, name); code != 404 {
+ t.Fatalf("%s served: %d", name, code)
+ }
}
- if code, _ := getAsset(a, "darwin-arm64/"+RendererArchive); code != 404 {
- t.Fatalf("a Mac renderer served: %d", code)
+ for _, name := range []string{"equipo-runner", "install-manifest.json", "darwin-arm64/equipo-runner"} {
+ if code, _ := getAsset(a, name); code != 200 {
+ t.Fatalf("%s: %d", name, code)
+ }
}
}
-// A renderer archive that is missing, or whose MANIFEST is not the pin
-// the release recorded, makes the release unavailable, as a changed
-// runner does.
-func TestInstallAssetsRefuseAnotherRenderer(t *testing.T) {
+// The release is available without a renderer archive and whatever one
+// lies there: nothing of the instance reads it.
+func TestInstallAssetsNeedNoRenderer(t *testing.T) {
for name, change := range map[string]func(root string) error{
"missing": func(root string) error { return os.Remove(filepath.Join(root, RendererArchive)) },
- "another tree": func(root string) error {
- other, _ := renderertest.Archive(renderertest.Small()[:4])
- return os.WriteFile(filepath.Join(root, RendererArchive), other, 0o600)
- },
"not an archive": func(root string) error {
return os.WriteFile(filepath.Join(root, RendererArchive), []byte("not gzip"), 0o600)
},
} {
t.Run(name, func(t *testing.T) {
a, root, _ := rendererAssets(t)
- if !a.Available() {
- t.Fatal("the fixture release is unavailable")
- }
if err := change(root); err != nil {
t.Fatal(err)
}
- if a.Available() {
- t.Fatal("available with", name)
- }
- if code, _ := getAsset(a, RendererArchive); code != 503 {
- t.Fatalf("served with %s: %d", name, code)
+ if !a.Available() {
+ t.Fatal("unavailable with the renderer", name)
}
})
}
}
-// The asset reader allows renderer.tar.gz up to 384 MiB and every other
-// file the usual 128 MiB.
-func TestInstallAssetsBoundTheRendererAt384MiB(t *testing.T) {
+// A Linux target's renderer pin comes with its archive's digest and size,
+// and they with it; the size is bounded by RendererArchiveMax.
+func TestInstallManifestRendererArchive(t *testing.T) {
a, root, _ := rendererAssets(t)
- for _, c := range []struct {
- name string
- size int64
- ok bool
- }{
- {RendererArchive, 384 << 20, true},
- {RendererArchive, 384<<20 + 1, false},
- {"equipo-runner", 128 << 20, true},
- {"equipo-runner", 128<<20 + 1, false},
- {"gitleaks", 200 << 20, false},
+ raw, err := os.ReadFile(filepath.Join(root, "install-manifest.json"))
+ if err != nil {
+ t.Fatal(err)
+ }
+ var good InstallManifest
+ if err = json.Unmarshal(raw, &good); err != nil || good.Validate(a.Version) != nil {
+ t.Fatalf("fixture manifest: %v", err)
+ }
+ for name, edit := range map[string]func(*InstallTarget){
+ "no renderer at all": func(l *InstallTarget) { l.RendererSHA256, l.RendererArchiveSHA256, l.RendererArchiveSize = "", "", 0 },
+ "pin only": func(l *InstallTarget) { l.RendererArchiveSHA256, l.RendererArchiveSize = "", 0 },
+ "archive only": func(l *InstallTarget) { l.RendererSHA256 = "" },
+ "no size": func(l *InstallTarget) { l.RendererArchiveSize = 0 },
+ "over the bound": func(l *InstallTarget) { l.RendererArchiveSize = RendererArchiveMax + 1 },
+ "at the bound": func(l *InstallTarget) { l.RendererArchiveSize = RendererArchiveMax },
+ "a bad digest": func(l *InstallTarget) { l.RendererArchiveSHA256 = "ABC" },
} {
- if err := os.Truncate(filepath.Join(root, c.name), c.size); err != nil {
- t.Fatal(err)
- }
- f, err := a.open(c.name)
- if (err == nil) != c.ok {
- t.Fatalf("%s at %d bytes: %v", c.name, c.size, err)
+ var m InstallManifest
+ json.Unmarshal(raw, &m)
+ linux := m.Targets[TargetLinux]
+ edit(&linux)
+ m.Targets[TargetLinux] = linux
+ ok := name == "no renderer at all" || name == "at the bound"
+ if (m.Validate(a.Version) == nil) != ok {
+ t.Errorf("%s: valid %v", name, !ok)
}
- if f != nil {
- f.Close()
+ }
+}
+
+// The asset linked into a runner is whole: a tree pin, an archive digest,
+// a size within the bound and a tag naming that digest; its address is on
+// the forge, built from the tag alone.
+func TestRendererAsset(t *testing.T) {
+ sum := strings.Repeat("ab", 32)
+ good := RendererAsset{Pin: strings.Repeat("cd", 32), SHA256: sum, Size: 230650088, Tag: "renderer-" + sum[:12]}
+ if !good.Valid() || good.URL() != "https://amadan.net/oficina/equipo/-/releases/renderer-abababababab/renderer.tar.gz" {
+ t.Fatalf("%+v %s", good.Valid(), good.URL())
+ }
+ republished := good
+ republished.Tag += "-r2"
+ if !republished.Valid() {
+ t.Fatal("a republished tag refused")
+ }
+ for name, edit := range map[string]func(*RendererAsset){
+ "another digest's tag": func(a *RendererAsset) { a.Tag = "renderer-" + strings.Repeat("0", 12) },
+ "a tag with a path": func(a *RendererAsset) { a.Tag += "/../x" },
+ "revision zero": func(a *RendererAsset) { a.Tag += "-r0" },
+ "no pin": func(a *RendererAsset) { a.Pin = "" },
+ "no size": func(a *RendererAsset) { a.Size = 0 },
+ "over the bound": func(a *RendererAsset) { a.Size = RendererArchiveMax + 1 },
+ } {
+ a := good
+ edit(&a)
+ if a.Valid() {
+ t.Errorf("%s: valid", name)
}
}
+ if _, ok := LinkedRendererAsset(); ok {
+ t.Fatal("a test build has a renderer asset linked")
+ }
}
diff --git a/internal/release/renderer_install.go b/internal/release/renderer_install.go
index 5ed9d48c..2886e914 100644
--- a/internal/release/renderer_install.go
+++ b/internal/release/renderer_install.go
@@ -74,6 +74,26 @@ var oldTree = regexp.MustCompile(`^[0-9a-f]{12}$`)
// for an archive or tree that is not the pinned one) or the error of the
// disk.
func InstallRenderer(runnerDir string, archive io.Reader, pin string) (string, error) {
+ return installTree(runnerDir, pin, func(tmp string) error { return unpackRenderer(tmp, archive, pin) })
+}
+
+// CopyRenderer installs, as InstallRenderer does, a copy of the tree at
+// from, which must verify for pin first: an earlier release's tree, so a
+// new release beside it needs nothing fetched. Files are copied, never
+// linked (VerifyRenderer refuses a file with more than one link), and the
+// copy is verified whole before it is renamed into place.
+func CopyRenderer(runnerDir, from, pin string) (string, error) {
+ if err := VerifyRenderer(from, pin); err != nil {
+ return "", err
+ }
+ return installTree(runnerDir, pin, func(tmp string) error { return copyTree(tmp, from) })
+}
+
+// installTree is InstallRenderer's and CopyRenderer's shared part: fill
+// writes a candidate tree into a new directory beside the tree's place,
+// which is verified and renamed into place; a tree there that already
+// verifies is kept and fill never runs. Then every other tree is removed.
+func installTree(runnerDir, pin string, fill func(tmp string) error) (string, error) {
if !sha256Hex(pin) {
return "", &RendererError{Health: wire.ToolUnpinned, Reason: "no renderer pin is linked into this runner"}
}
@@ -98,7 +118,7 @@ func InstallRenderer(runnerDir string, archive io.Reader, pin string) (string, e
os.RemoveAll(tmp)
}
}()
- if err = unpackRenderer(tmp, archive, pin); err != nil {
+ if err = fill(tmp); err != nil {
return "", err
}
if err = os.Chmod(tmp, 0o755); err != nil {
@@ -122,6 +142,89 @@ func InstallRenderer(runnerDir string, archive io.Reader, pin string) (string, e
return final, nil
}
+// testCopyHook runs between copyTree's Lstat of a file and its open
+// (tests only).
+var testCopyHook func(path string)
+
+// copyTree copies the tree at from into the empty directory dir:
+// directories, regular files (their bytes, in new files) and symbolic
+// links, each with its mode; anything else, or more entries or bytes than
+// a tree may hold, is refused. VerifyRenderer then checks the copy.
+func copyTree(dir, from string) error {
+ root, err := os.OpenRoot(dir)
+ if err != nil {
+ return err
+ }
+ defer root.Close()
+ src, err := os.OpenRoot(from)
+ if err != nil {
+ return err
+ }
+ defer src.Close()
+ var total, count int64
+ return fs.WalkDir(src.FS(), ".", func(name string, d fs.DirEntry, err error) error {
+ if err != nil || name == "." {
+ return err
+ }
+ if count++; count > rendererEntriesMax {
+ return rendererMismatch("", "more than %d entries", rendererEntriesMax)
+ }
+ info, err := src.Lstat(name)
+ if err != nil {
+ return err
+ }
+ mode := info.Mode()
+ switch {
+ case mode.IsDir():
+ if err = root.Mkdir(name, 0o700); err != nil {
+ return err
+ }
+ return root.Chmod(name, mode.Perm())
+ case mode.IsRegular():
+ if total += info.Size(); total > rendererUnpackedMax {
+ return rendererMismatch(name, "more bytes than any renderer tree holds")
+ }
+ if testCopyHook != nil {
+ testCopyHook(filepath.Join(from, name))
+ }
+ // Opened without following a link or blocking (a FIFO swapped
+ // in after Lstat), and held to what Lstat saw: the same regular
+ // file, exactly its size, nothing beyond it.
+ in, err := src.OpenFile(name, os.O_RDONLY|syscall.O_NOFOLLOW|syscall.O_NONBLOCK, 0)
+ if err != nil {
+ return err
+ }
+ defer in.Close()
+ opened, err := in.Stat()
+ if err != nil || !opened.Mode().IsRegular() || !os.SameFile(opened, info) || opened.Size() != info.Size() {
+ return rendererMismatch(name, "changed while it was copied")
+ }
+ out, err := root.OpenFile(name, os.O_WRONLY|os.O_CREATE|os.O_EXCL, 0o600)
+ if err != nil {
+ return err
+ }
+ defer out.Close()
+ if n, err := io.CopyN(out, in, info.Size()); err != nil || n != info.Size() {
+ return rendererMismatch(name, "copied %d of %d bytes: %v", n, info.Size(), err)
+ }
+ if n, _ := in.Read(make([]byte, 1)); n != 0 {
+ return rendererMismatch(name, "grew while it was copied")
+ }
+ if err = out.Chmod(mode.Perm()); err != nil {
+ return err
+ }
+ return out.Close()
+ case mode&fs.ModeSymlink != 0:
+ target, err := src.Readlink(name)
+ if err != nil {
+ return err
+ }
+ return root.Symlink(target, name)
+ }
+ return rendererMismatch(name, "is not a directory, file or link")
+ })
+}
+
// rendererParent makes <runner dir>/renderer/ (0755, whatever the umask)
// unless it exists, and checks it is a directory, not a link, owned by
// this user or root, that nobody else can write.
diff --git a/internal/release/renderer_install_linux_test.go b/internal/release/renderer_install_linux_test.go
index 271319c7..16dcda9a 100644
--- a/internal/release/renderer_install_linux_test.go
+++ b/internal/release/renderer_install_linux_test.go
@@ -12,6 +12,7 @@ import (
"strings"
"syscall"
"testing"
+ "time"
"amadan.net/oficina/equipo/internal/release/renderertest"
"amadan.net/oficina/equipo/internal/wire"
@@ -395,3 +396,80 @@ func TestRendererArchivePin(t *testing.T) {
}
}
}
+
+// CopyRenderer copies a verified tree as new files (none linked to the
+// original), and the copy verifies.
+func TestCopyRendererCopies(t *testing.T) {
+ from := installDir(t)
+ archive, pin := renderertest.Archive(renderertest.Small())
+ src, err := InstallRenderer(from, bytes.NewReader(archive), pin)
+ if err != nil {
+ t.Fatal(err)
+ }
+ dir := installDir(t)
+ tree, err := CopyRenderer(dir, src, pin)
+ if err != nil || VerifyRenderer(tree, pin) != nil {
+ t.Fatalf("copy: %v", err)
+ }
+ if _, err = CopyRenderer(installDir(t), filepath.Join(from, "nothing"), pin); err == nil {
+ t.Fatal("copied a tree that does not verify")
+ }
+}
+
+// A file swapped between copyTree's Lstat and its open, for a FIFO (which
+// a blocking open would wait on forever) or a longer file, refuses the
+// copy at once, and nothing is left in place.
+func TestCopyRendererRefusesASwappedFile(t *testing.T) {
+ for name, swap := range map[string]func(path string) error{
+ "a FIFO": func(path string) error {
+ if err := os.Remove(path); err != nil {
+ return err
+ }
+ return syscall.Mkfifo(path, 0o644)
+ },
+ "a longer file": func(path string) error {
+ f, err := os.OpenFile(path, os.O_WRONLY|os.O_APPEND, 0)
+ if err != nil {
+ return err
+ }
+ defer f.Close()
+ _, err = f.Write([]byte("more"))
+ return err
+ },
+ } {
+ t.Run(name, func(t *testing.T) {
+ from := installDir(t)
+ archive, pin := renderertest.Archive(renderertest.Small())
+ src, err := InstallRenderer(from, bytes.NewReader(archive), pin)
+ if err != nil {
+ t.Fatal(err)
+ }
+ swapped := false
+ testCopyHook = func(path string) {
+ if !swapped && filepath.Base(path) != "MANIFEST" {
+ swapped = true
+ if err := swap(path); err != nil {
+ t.Error(err)
+ }
+ }
+ }
+ defer func() { testCopyHook = nil }()
+ // VerifyRenderer of the source runs first, before the hook can
+ // change it; the copy must then refuse on its own.
+ dir := installDir(t)
+ done := make(chan error, 1)
+ go func() { _, err := CopyRenderer(dir, src, pin); done <- err }()
+ select {
+ case err = <-done:
+ case <-time.After(10 * time.Second):
+ t.Fatal("the copy blocked")
+ }
+ if err == nil || !swapped {
+ t.Fatalf("copied with %s swapped in (swapped %v): %v", name, swapped, err)
+ }
+ if _, err := os.Lstat(RendererTree(dir, pin)); !os.IsNotExist(err) {
+ t.Fatalf("a tree left in place: %v", err)
+ }
+ })
+ }
+}
diff --git a/internal/release/renderer_publish_test.go b/internal/release/renderer_publish_test.go
new file mode 100644
index 00000000..5fd323d2
--- /dev/null
+++ b/internal/release/renderer_publish_test.go
@@ -0,0 +1,187 @@
+package release
+
+import (
+ "crypto/sha256"
+ "encoding/hex"
+ "fmt"
+ "os"
+ "os/exec"
+ "path/filepath"
+ "strings"
+ "testing"
+
+ "amadan.net/oficina/equipo/internal/release/renderertest"
+ "amadan.net/oficina/equipo/internal/testci"
+)
+
+// publishRig is a release kit, the repository it was built from (with a
+// bare origin), and stub curl, amadan and go: the forge is a directory of
+// published assets by tag, amadan release create copies into it and logs,
+// and go version -m reports the tag linked into the kit's runner.
+type publishRig struct {
+ t *testing.T
+ repo, kit, forge, log, commit string
+ archive, sources, tag, pinJSON string
+ origin string
+ env []string
+}
+
+func newPublishRig(t *testing.T) *publishRig {
+ t.Helper()
+ testci.Files(t, "../../scripts/publish-renderer.sh", "../../scripts/renderer-sources.py")
+ testci.Tools(t, "git", "python3", "sh")
+ r := &publishRig{t: t, repo: t.TempDir(), kit: t.TempDir(), forge: t.TempDir(), log: filepath.Join(t.TempDir(), "log")}
+ run := func(dir string, args ...string) string {
+ t.Helper()
+ cmd := exec.Command(args[0], args[1:]...)
+ cmd.Dir = dir
+ cmd.Env = append(os.Environ(), "GIT_AUTHOR_NAME=t", "GIT_AUTHOR_EMAIL=t@example.com", "GIT_COMMITTER_NAME=t", "GIT_COMMITTER_EMAIL=t@example.com", "GIT_CONFIG_GLOBAL=/dev/null")
+ out, err := cmd.CombinedOutput()
+ if err != nil {
+ t.Fatalf("%v: %v\n%s", args, err, out)
+ }
+ return strings.TrimSpace(string(out))
+ }
+ origin := t.TempDir()
+ run(origin, "git", "init", "-q", "--bare")
+ run(r.repo, "git", "init", "-q", "-b", "main")
+ r.pinJSON = `{"version":"1.0-1","amd64":[{"package":"chromium-headless-shell","version":"1.0-1","architecture":"amd64","url":"https://snapshot.debian.org/archive/debian/20990101T000000Z/pool/main/c/chromium/chromium-headless-shell_1.0-1_amd64.deb","sha256":"` + strings.Repeat("a", 64) + `","size":1}]}`
+ os.MkdirAll(filepath.Join(r.repo, "internal", "release"), 0o755)
+ os.WriteFile(filepath.Join(r.repo, "internal", "release", "renderer.json"), []byte(r.pinJSON), 0o644)
+ run(r.repo, "git", "add", "-A")
+ run(r.repo, "git", "commit", "-q", "-m", "pin")
+ run(r.repo, "git", "remote", "add", "origin", origin)
+ r.commit = run(r.repo, "git", "rev-parse", "HEAD")
+ // A later commit: the kit is not the current checkout.
+ run(r.repo, "git", "commit", "-q", "--allow-empty", "-m", "later")
+
+ archive, pin := renderertest.Archive(renderertest.Small())
+ r.archive = string(archive)
+ r.sources = "The page renderer: Chromium headless shell 1.0-1, from Debian.\nChromium source: https://snapshot.debian.org/package/chromium/1.0-1/\n\n" +
+ "chromium-headless-shell 1.0-1 amd64 https://snapshot.debian.org/archive/debian/20990101T000000Z/pool/main/c/chromium/chromium-headless-shell_1.0-1_amd64.deb https://snapshot.debian.org/package/chromium/1.0-1/\n"
+ sum := sha256.Sum256([]byte(r.archive))
+ r.tag = "renderer-" + hex.EncodeToString(sum[:])[:12]
+ archiveSum := hex.EncodeToString(sum[:])
+ manifest := fmt.Sprintf(`{"targets":{"linux/amd64":{"renderer_sha256":%q,"renderer_archive_sha256":%q,"renderer_archive_size":%d}}}`, pin, archiveSum, len(archive))
+ for name, body := range map[string]string{"renderer.tar.gz": r.archive, "SOURCES": r.sources, "equipo-runner": "runner", "install-manifest.json": manifest, "COMMIT": r.commit + "\n"} {
+ os.WriteFile(filepath.Join(r.kit, name), []byte(body), 0o644)
+ }
+ bin := t.TempDir()
+ stub := func(name, body string) { os.WriteFile(filepath.Join(bin, name), []byte("#!/bin/sh\n"+body), 0o755) }
+ // curl: the last argument is the URL; --output names where to write;
+ // prints the status as --write-out asks.
+ stub("curl", `out=; for a; do [ "$prev" = --output ] && out=$a; prev=$a; url=$a; done
+echo "curl $*" >> `+r.log+`
+path=`+r.forge+`/${url#https://amadan.net/oficina/equipo/-/releases/}
+if [ -f "$path" ]; then cp "$path" "$out"; printf 200; else : > "$out"; printf 404; fi
+`)
+ // amadan release create -repo R -notes-file N TAG FILE...
+ stub("amadan", `echo "amadan $*" >> `+r.log+`
+tag=$7; shift 7; mkdir -p `+r.forge+`/$tag; for f; do cp "$f" `+r.forge+`/$tag/; done
+`)
+ // go version -m: what is linked into the kit's runner; FIXTURE_*
+ // changes one of it.
+ stub("go", `printf '%s: go1.26.11\n\tbuild\t-ldflags="-s -w -X amadan.net/oficina/equipo/internal/release.rendererSHA256=%s -X amadan.net/oficina/equipo/internal/release.rendererArchiveSHA256=%s -X amadan.net/oficina/equipo/internal/release.rendererArchiveSize=%s -X amadan.net/oficina/equipo/internal/release.rendererTag=%s"\n' "$3" "${FIXTURE_PIN-`+pin+`}" "${FIXTURE_SUM-`+archiveSum+`}" "${FIXTURE_SIZE-`+fmt.Sprint(len(archive))+`}" "${FIXTURE_TAG-`+r.tag+`}"
+`)
+ r.env = append(os.Environ(), "PATH="+bin+string(os.PathListSeparator)+os.Getenv("PATH"), "GIT_CONFIG_GLOBAL=/dev/null", "GIT_AUTHOR_NAME=t", "GIT_AUTHOR_EMAIL=t@example.com", "GIT_COMMITTER_NAME=t", "GIT_COMMITTER_EMAIL=t@example.com")
+ r.origin = origin
+ return r
+}
+
+func (r *publishRig) run(args ...string) (string, error) {
+ script, _ := filepath.Abs("../../scripts/publish-renderer.sh")
+ cmd := exec.Command("bash", append([]string{script}, args...)...)
+ cmd.Dir = r.repo
+ cmd.Env = r.env
+ out, err := cmd.CombinedOutput()
+ return string(out), err
+}
+
+func (r *publishRig) logged() string { b, _ := os.ReadFile(r.log); return string(b) }
+
+// publish puts the kit's archive and SOURCES on the forge under the tag
+// linked into its runner, tagging the kit's commit (not the checkout),
+// then downloads both in full and compares them. A second publish only
+// checks; check mode downloads into a directory.
+func TestPublishRenderer(t *testing.T) {
+ r := newPublishRig(t)
+ if out, err := r.run("publish", r.kit); err != nil {
+ t.Fatalf("publish: %v\n%s", err, out)
+ }
+ if !strings.Contains(r.logged(), "amadan release create -repo oficina/equipo -notes-file ") || !strings.Contains(r.logged(), r.tag+" "+filepath.Join(r.kit, "renderer.tar.gz")+" "+filepath.Join(r.kit, "SOURCES")) {
+ t.Fatalf("no release created:\n%s", r.logged())
+ }
+ out, err := exec.Command("git", "--git-dir", r.origin, "rev-parse", r.tag+"^{commit}").Output()
+ if err != nil || strings.TrimSpace(string(out)) != r.commit {
+ t.Fatalf("the forge's tag names %q, not the kit's commit %s: %v", out, r.commit, err)
+ }
+ for _, name := range []string{"renderer.tar.gz", "SOURCES"} {
+ if b, _ := os.ReadFile(filepath.Join(r.forge, r.tag, name)); string(b) == "" {
+ t.Fatalf("%s not published", name)
+ }
+ }
+ os.Remove(r.log)
+ if out, err := r.run("publish", r.kit); err != nil || strings.Contains(r.logged(), "amadan release") {
+ t.Fatalf("second publish: %v\n%s\n%s", err, out, r.logged())
+ }
+ dir := filepath.Join(t.TempDir(), "downloaded")
+ if out, err := r.run("check", r.kit, dir); err != nil {
+ t.Fatalf("check: %v\n%s", err, out)
+ }
+ if b, _ := os.ReadFile(filepath.Join(dir, "renderer.tar.gz")); string(b) != r.archive {
+ t.Fatalf("check downloaded %q", b)
+ }
+ if !strings.Contains(r.logged(), "curl --silent") {
+ t.Fatalf("curl's arguments not logged:\n%s", r.logged())
+ }
+ if strings.Contains(r.logged(), " -I ") || strings.Contains(r.logged(), "--head") || strings.Contains(r.logged(), "--range") || strings.Contains(r.logged(), " -r ") {
+ t.Fatalf("a HEAD or ranged request:\n%s", r.logged())
+ }
+}
+
+// A published asset that differs from the kit, a tag that is not the
+// archive's, SOURCES that are not the pinned packages', and check with
+// nothing published: refused, and nothing is created.
+func TestPublishRendererRefuses(t *testing.T) {
+ for name, c := range map[string]struct {
+ set func(r *publishRig) []string
+ args func(r *publishRig) []string
+ }{
+ "a different published archive": {func(r *publishRig) []string {
+ os.MkdirAll(filepath.Join(r.forge, r.tag), 0o755)
+ os.WriteFile(filepath.Join(r.forge, r.tag, "renderer.tar.gz"), []byte("other bytes"), 0o644)
+ os.WriteFile(filepath.Join(r.forge, r.tag, "SOURCES"), []byte(r.sources), 0o644)
+ return nil
+ }, nil},
+ "a tag naming another archive": {func(r *publishRig) []string { return []string{"FIXTURE_TAG=renderer-000000000000"} }, nil},
+ "no linked tag": {func(r *publishRig) []string { return []string{"FIXTURE_TAG="} }, nil},
+ "another linked size": {func(r *publishRig) []string { return []string{"FIXTURE_SIZE=1"} }, nil},
+ "another linked digest": {func(r *publishRig) []string { return []string{"FIXTURE_SUM=" + strings.Repeat("0", 64)} }, nil},
+ "another linked pin": {func(r *publishRig) []string { return []string{"FIXTURE_PIN=" + strings.Repeat("0", 64)} }, nil},
+ "a manifest recording another size": {func(r *publishRig) []string {
+ raw, _ := os.ReadFile(filepath.Join(r.kit, "install-manifest.json"))
+ os.WriteFile(filepath.Join(r.kit, "install-manifest.json"), []byte(strings.Replace(string(raw), `"renderer_archive_size":`, `"renderer_archive_size":1`, 1)), 0o644)
+ return nil
+ }, nil},
+ "SOURCES not the pin's": {func(r *publishRig) []string {
+ os.WriteFile(filepath.Join(r.kit, "SOURCES"), []byte(strings.Replace(r.sources, "1.0-1 amd64", "9.9-9 amd64", 1)), 0o644)
+ return nil
+ }, nil},
+ "check with nothing published": {func(r *publishRig) []string { return nil }, func(r *publishRig) []string { return []string{"check", r.kit, t.TempDir()} }},
+ } {
+ t.Run(name, func(t *testing.T) {
+ r := newPublishRig(t)
+ r.env = append(r.env, c.set(r)...)
+ args := []string{"publish", r.kit}
+ if c.args != nil {
+ args = c.args(r)
+ }
+ if out, err := r.run(args...); err == nil {
+ t.Fatalf("passed:\n%s", out)
+ }
+ if strings.Contains(r.logged(), "amadan release create") {
+ t.Fatalf("created a release:\n%s", r.logged())
+ }
+ })
+ }
+}
diff --git a/internal/release/renderer_tree_test.go b/internal/release/renderer_tree_test.go
index b05db76d..b5babc7a 100644
--- a/internal/release/renderer_tree_test.go
+++ b/internal/release/renderer_tree_test.go
@@ -32,7 +32,7 @@ type debMember struct {
// 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 {
+func fixtureDeb(t *testing.T, members []debMember, control string) []byte {
t.Helper()
targz := func(members []debMember) []byte {
var b bytes.Buffer
@@ -73,7 +73,7 @@ func fixtureDeb(t *testing.T, members []debMember) []byte {
}
}
member("debian-binary", []byte("2.0\n"))
- member("control.tar.gz", targz([]debMember{{name: "./control", body: "Package: fixture\n", mode: 0o644}}))
+ member("control.tar.gz", targz([]debMember{{name: "./control", body: control, mode: 0o644}}))
member("data.tar.gz", targz(members))
return ar.Bytes()
}
@@ -87,6 +87,7 @@ type rendererFixture struct {
packages map[string][]debMember
order []string
edit func(p *rendererPackage)
+ control func(name, control string) string
}
func newRendererFixture() *rendererFixture {
@@ -129,7 +130,16 @@ func (f *rendererFixture) write(t *testing.T, dir string) (string, map[string]st
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])
+ // Its control file, as Debian's: the browser is built from the
+ // chromium source package, the others from their own.
+ control := "Package: " + name + "\nVersion: 1.0-1\nArchitecture: amd64\n"
+ if name == "chromium-headless-shell" {
+ control += "Source: chromium\n"
+ }
+ if f.control != nil {
+ control = f.control(name, control)
+ }
+ deb := fixtureDeb(t, f.packages[name], control)
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),
@@ -451,3 +461,84 @@ func writeRendererTar(t *testing.T, path, manifest string) string {
sum := sha256.Sum256([]byte(manifest))
return hex.EncodeToString(sum[:])
}
+
+// The build writes SOURCES beside the archive, from the same checked
+// debs: the Chromium version and its source, and per package its version,
+// architecture, deb and source package on snapshot.debian.org.
+// renderer-sources.py check accepts it, and refuses it changed.
+func TestRendererTreeWritesSources(t *testing.T) {
+ testci.Files(t, "../../scripts/build-renderer-tree.py", "../../scripts/renderer-sources.py")
+ testci.Tools(t, "python3")
+ dir := t.TempDir()
+ pin, urls := newRendererFixture().write(t, dir)
+ out := filepath.Join(dir, "out", "renderer.tar.gz")
+ os.Mkdir(filepath.Dir(out), 0o755)
+ if _, stderr, err := buildRendererTree(t, pin, urls, out, 0); err != nil {
+ t.Fatalf("build: %v\n%s", err, stderr)
+ }
+ sources := filepath.Join(dir, "out", "SOURCES")
+ raw, err := os.ReadFile(sources)
+ if err != nil {
+ t.Fatal(err)
+ }
+ snap := "https://snapshot.debian.org/archive/debian/20990101T000000Z/pool/main/"
+ want := "The page renderer: Chromium headless shell 1.0-1, from Debian.\n" +
+ "Chromium source: https://snapshot.debian.org/package/chromium/1.0-1/\n\n" +
+ "chromium-headless-shell 1.0-1 amd64 " + snap + "c/chromium-headless-shell/chromium-headless-shell_1.0-1_amd64.deb https://snapshot.debian.org/package/chromium/1.0-1/\n" +
+ "fontconfig-config 1.0-1 amd64 " + snap + "f/fontconfig-config/fontconfig-config_1.0-1_amd64.deb https://snapshot.debian.org/package/fontconfig-config/1.0-1/\n" +
+ "fonts-fixture 1.0-1 amd64 " + snap + "f/fonts-fixture/fonts-fixture_1.0-1_amd64.deb https://snapshot.debian.org/package/fonts-fixture/1.0-1/\n" +
+ "libc6 1.0-1 amd64 " + snap + "l/libc6/libc6_1.0-1_amd64.deb https://snapshot.debian.org/package/libc6/1.0-1/\n"
+ if string(raw) != want {
+ t.Fatalf("SOURCES:\n%s\nwant:\n%s", raw, want)
+ }
+ check := func(path string) error {
+ return exec.Command("python3", "-I", "../../scripts/renderer-sources.py", "check", pin, path).Run()
+ }
+ if err := check(sources); err != nil {
+ t.Fatalf("check refused the build's SOURCES: %v", err)
+ }
+ for name, edit := range map[string]func(string) string{
+ "a package dropped": func(s string) string { return strings.Replace(s, "libc6 1.0-1", "", 1) },
+ "another version": func(s string) string { return strings.Replace(s, "libc6 1.0-1 amd64", "libc6 1.0-2 amd64", 1) },
+ "another header": func(s string) string { return strings.Replace(s, "shell 1.0-1,", "shell 2.0-1,", 1) },
+ } {
+ bad := filepath.Join(dir, name)
+ os.WriteFile(bad, []byte(edit(want)), 0o600)
+ if check(bad) == nil {
+ t.Errorf("check accepted SOURCES with %s", name)
+ }
+ }
+}
+
+// A deb whose control file is not the pinned package and version, or
+// names no chromium source for the browser, is refused: SOURCES is never
+// written from a guess, and neither is the archive.
+func TestRendererTreeRefusesAnotherControl(t *testing.T) {
+ testci.Files(t, "../../scripts/build-renderer-tree.py", "../../scripts/renderer-sources.py")
+ testci.Tools(t, "python3")
+ for name, edit := range map[string]func(pkg, control string) string{
+ "another version": func(pkg, c string) string {
+ if pkg == "libc6" {
+ return strings.Replace(c, "1.0-1", "1.0-9", 1)
+ }
+ return c
+ },
+ "the browser from another source": func(pkg, c string) string { return strings.Replace(c, "Source: chromium", "Source: other", 1) },
+ } {
+ t.Run(name, func(t *testing.T) {
+ dir := t.TempDir()
+ f := newRendererFixture()
+ f.control = edit
+ pin, urls := f.write(t, dir)
+ out := filepath.Join(dir, "renderer.tar.gz")
+ if _, _, err := buildRendererTree(t, pin, urls, out, 0); err == nil {
+ t.Fatal("built")
+ }
+ for _, p := range []string{out, filepath.Join(dir, "SOURCES")} {
+ if _, err := os.Stat(p); !os.IsNotExist(err) {
+ t.Fatalf("%s written: %v", p, err)
+ }
+ }
+ })
+ }
+}
diff --git a/internal/release/staged_gate_test.go b/internal/release/staged_gate_test.go
index eab261f3..01b67c58 100644
--- a/internal/release/staged_gate_test.go
+++ b/internal/release/staged_gate_test.go
@@ -4,6 +4,7 @@ import (
"crypto/sha256"
"encoding/hex"
"encoding/json"
+ "fmt"
"os"
"os/exec"
"path/filepath"
@@ -41,6 +42,7 @@ func TestStagedArtifactsGate(t *testing.T) {
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")
+ write(filepath.Join(runner, "SOURCES"), "sources")
gate := func(verb string, args ...string) error {
return exec.Command("python3", append([]string{filepath.Join(root, "scripts", "staged-artifacts.py"), verb, "abc1234"}, args...)...).Run()
}
@@ -48,9 +50,12 @@ func TestStagedArtifactsGate(t *testing.T) {
// What make release-runner leaves: the release manifest with the tool
// proxy it built, and the install manifest with every target's digests.
released := func(proxy, linux, mac string) {
+ tarball, err := os.ReadFile(filepath.Join(runner, "renderer.tar.gz"))
+ must(err)
+ archive := `,"renderer_archive_sha256":"` + hash(string(tarball)) + `","renderer_archive_size":` + fmt.Sprint(len(tarball))
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")+`","renderer_sha256":"`+renderer+`"},"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+`"`+archive+`},"darwin/arm64":{"runner_sha256":"`+hash(mac)+`","gitleaks_sha256":"`+hash("mac scanner")+`"}}}`)
}
write(filepath.Join(runner, "COMMIT"), "abc1234full\n")
bin := t.TempDir()
@@ -87,14 +92,22 @@ echo go1.26.11
"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") },
+ // The same tree, other archive bytes: the recorded digest is not
+ // the file's.
+ "another archive": func() {
+ f, err := os.OpenFile(filepath.Join(runner, "renderer.tar.gz"), os.O_APPEND|os.O_WRONLY, 0)
+ must(err)
+ f.Write([]byte{0})
+ f.Close()
+ },
} {
change()
if gate("manifest") == nil {
t.Fatal("a provenance manifest written for a release with " + name)
}
+ writeRendererTar(t, filepath.Join(runner, "renderer.tar.gz"), "dir usr\n")
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 {
@@ -131,11 +144,11 @@ echo go1.26.11
raw, err := os.ReadFile(instance + ".manifest.json")
must(err)
must(json.Unmarshal(raw, &made))
- if made.Version != "abc1234" || made.Commit != "abc1234full" || made.Go != "go1.26.11" || made.SHA256["instance"] != hash("instance") || made.SHA256["runner"] != hash("runner") || made.SHA256["tool_proxy"] != hash("proxy") || made.SHA256["darwin_runner"] != hash("mac runner") || made.SHA256["gitleaks"] != hash("scanner") || made.SHA256["darwin_gitleaks"] != hash("mac scanner") {
+ if made.Version != "abc1234" || made.Commit != "abc1234full" || made.Go != "go1.26.11" || made.SHA256["instance"] != hash("instance") || made.SHA256["runner"] != hash("runner") || made.SHA256["tool_proxy"] != hash("proxy") || made.SHA256["darwin_runner"] != hash("mac runner") || made.SHA256["gitleaks"] != hash("scanner") || made.SHA256["darwin_gitleaks"] != hash("mac scanner") || made.SHA256["renderer_sources"] != hash("sources") || made.SHA256["renderer_archive"] == "" || made.SHA256["install_manifest"] == "" {
t.Fatalf("provenance manifest %s", raw)
}
// Each artifact is held to the build that recorded it.
- for _, path := range []string{instance, filepath.Join(runner, "equipo-runner"), filepath.Join(runner, "equipo-tool-proxy"), filepath.Join(runner, "darwin-arm64", "equipo-runner"), filepath.Join(runner, "gitleaks"), filepath.Join(runner, "darwin-arm64", "gitleaks")} {
+ for _, path := range []string{instance, filepath.Join(runner, "equipo-runner"), filepath.Join(runner, "equipo-tool-proxy"), filepath.Join(runner, "darwin-arm64", "equipo-runner"), filepath.Join(runner, "gitleaks"), filepath.Join(runner, "darwin-arm64", "gitleaks"), filepath.Join(runner, "SOURCES"), filepath.Join(runner, "renderer.tar.gz"), filepath.Join(runner, "install-manifest.json")} {
kept, err := os.ReadFile(path)
must(err)
write(path, "rebuilt")
diff --git a/internal/runner/setup/install.go b/internal/runner/setup/install.go
index 6f7c6517..fa06f710 100644
--- a/internal/runner/setup/install.go
+++ b/internal/runner/setup/install.go
@@ -32,14 +32,19 @@ type InstallResult struct {
var errUnavailable = errors.New("runner.install.unavailable")
type installHost struct {
- scannerPin, rendererPin string
- manifest release.Manifest
- home, goos, goarch string
- fetch func(context.Context, string, int64) ([]byte, error)
- preflight func(context.Context, string, release.InstallManifest) []string
- service func(context.Context, string) error
- lingering func(context.Context) (bool, error)
- serviceAvailable func(context.Context) bool
+ scannerPin string
+ renderer release.RendererAsset
+ manifest release.Manifest
+ home, goos, goarch string
+ fetch func(context.Context, string, int64) ([]byte, error)
+ // fetchRenderer downloads the renderer archive at url into a new
+ // private file in scratch, at most size+1 bytes, and returns it open
+ // at its start (fetchRendererArchive).
+ fetchRenderer func(ctx context.Context, url string, size int64, scratch string) (*os.File, error)
+ preflight func(context.Context, string, release.InstallManifest) []string
+ service func(context.Context, string) error
+ lingering func(context.Context) (bool, error)
+ serviceAvailable func(context.Context) bool
}
func InstallUser(ctx context.Context, opts InstallOptions) (InstallResult, error) {
@@ -47,8 +52,8 @@ func InstallUser(ctx context.Context, opts InstallOptions) (InstallResult, error
if err != nil {
return InstallResult{State: "unavailable", Missing: []string{"runner.install.destination"}}, errUnavailable
}
- rendererPin, _ := release.RendererPin()
- return installUser(ctx, opts, installHost{scannerPin: release.GitleaksSHA256(), rendererPin: rendererPin, manifest: release.BuildManifest(), home: home, goos: runtime.GOOS, goarch: runtime.GOARCH, fetch: fetchRelease, preflight: containmentPreflight, service: enableService, lingering: readLingering, serviceAvailable: userServiceAvailable})
+ renderer, _ := release.LinkedRendererAsset()
+ return installUser(ctx, opts, installHost{scannerPin: release.GitleaksSHA256(), renderer: renderer, manifest: release.BuildManifest(), home: home, goos: runtime.GOOS, goarch: runtime.GOARCH, fetch: fetchRelease, fetchRenderer: fetchRendererArchive, preflight: containmentPreflight, service: enableService, lingering: readLingering, serviceAvailable: userServiceAvailable})
}
func installUser(ctx context.Context, o InstallOptions, h installHost) (r InstallResult, err error) {
r = InstallResult{Version: o.Release, State: "unavailable"}
@@ -138,29 +143,42 @@ func installUser(ctx context.Context, o InstallOptions, h installHost) (r Instal
return fail("runner.install.checksum")
}
dir := filepath.Join(o.Root, "releases", o.Release)
- // The page renderer, unpacked beside the runner: its MANIFEST must be
- // the pin linked into this runner and the one the release recorded.
- // A tree already there that verifies (the second run, after
- // enrolment) is kept and nothing is fetched for it.
- if h.rendererPin == "" || h.rendererPin != m.Targets[release.TargetLinux].RendererSHA256 {
+ // The page renderer, beside the runner. The archive this runner
+ // installs is linked into it (release.LinkedRendererAsset): its tree
+ // pin, digest, size and forge tag, which the release's manifest must
+ // repeat. A tree already there that verifies (the second run, after
+ // enrolment) is kept; one an earlier release here has is copied;
+ // otherwise the archive is fetched from the forge, never from the
+ // instance, and checked whole before anything is unpacked.
+ asset, linux := h.renderer, m.Targets[release.TargetLinux]
+ if !asset.Valid() || asset.Pin != linux.RendererSHA256 || asset.SHA256 != linux.RendererArchiveSHA256 || asset.Size != linux.RendererArchiveSize {
return fail("runner.install.checksum")
}
- var renderer []byte
- if release.VerifyRenderer(release.RendererTree(dir, h.rendererPin), h.rendererPin) != nil {
- renderer, e = h.fetch(ctx, base+release.RendererArchive, release.RendererArchiveMax)
- if e != nil {
- return fail("runner.install.release")
- }
- if pin, pe := release.RendererArchivePin(bytes.NewReader(renderer)); pe != nil || pin != h.rendererPin {
- return fail("runner.install.checksum")
+ var archive *os.File
+ reuse := ""
+ if release.VerifyRenderer(release.RendererTree(dir, asset.Pin), asset.Pin) != nil {
+ if reuse = earlierTree(o.Root, o.Release, asset.Pin); reuse == "" {
+ if archive, e = h.fetchRenderer(ctx, asset.URL(), asset.Size, scratch); e != nil {
+ return fail("runner.install.release")
+ }
+ defer archive.Close()
+ if !archiveMatches(archive, asset) {
+ return fail("runner.install.checksum")
+ }
}
}
if !privateDirectory(dir) {
return fail("runner.install.destination")
}
- // Unpacked and verified before any of the runner's files is written.
- if renderer != nil {
- if _, e = release.InstallRenderer(dir, bytes.NewReader(renderer), h.rendererPin); e != nil {
+ // Unpacked (or copied) and verified before any of the runner's files
+ // is written.
+ if archive != nil || reuse != "" {
+ if archive != nil {
+ _, e = release.InstallRenderer(dir, archive, asset.Pin)
+ } else {
+ _, e = release.CopyRenderer(dir, reuse, asset.Pin)
+ }
+ if e != nil {
var mismatch *release.RendererError
if errors.As(e, &mismatch) {
return fail("runner.install.checksum")
@@ -349,3 +367,126 @@ func fetchRelease(ctx context.Context, url string, limit int64) ([]byte, error)
}
return b, nil
}
+
+// earlierTree is a renderer tree for pin that verifies in another release
+// directory under root (an earlier install's), or "". At most a few
+// release directories are looked at.
+func earlierTree(root, version, pin string) string {
+ entries, err := os.ReadDir(filepath.Join(root, "releases"))
+ if err != nil {
+ return ""
+ }
+ for i, d := range entries {
+ if i >= 32 {
+ break
+ }
+ name := d.Name()
+ if name == version || !d.IsDir() || !release.ValidInstallVersion(name) {
+ continue
+ }
+ tree := release.RendererTree(filepath.Join(root, "releases", name), pin)
+ if info, err := os.Lstat(tree); err == nil && info.IsDir() && release.VerifyRenderer(tree, pin) == nil {
+ return tree
+ }
+ }
+ return ""
+}
+
+// archiveMatches: f holds exactly the asset's size in bytes, with its
+// SHA-256, and the archive's MANIFEST is its tree pin. f is left at its
+// start.
+func archiveMatches(f *os.File, a release.RendererAsset) bool {
+ if _, err := f.Seek(0, io.SeekStart); err != nil {
+ return false
+ }
+ h := sha256.New()
+ n, err := io.Copy(h, io.LimitReader(f, a.Size+1))
+ if err != nil || n != a.Size || hex.EncodeToString(h.Sum(nil)) != a.SHA256 {
+ return false
+ }
+ if _, err := f.Seek(0, io.SeekStart); err != nil {
+ return false
+ }
+ pin, err := release.RendererArchivePin(f)
+ if err != nil || pin != a.Pin {
+ return false
+ }
+ _, err = f.Seek(0, io.SeekStart)
+ return err == nil
+}
+
+// Bounds on the renderer download: it may take long on a slow link, but
+// not stall. rendererTransport is nil (the default) but in tests.
+var (
+ rendererDownloadMax = 30 * time.Minute
+ rendererDownloadStall = 2 * time.Minute
+ rendererTransport http.RoundTripper
+)
+
+// fetchRendererArchive downloads the archive at url (the forge's fixed
+// address) into a new private file in scratch. The forge answers with a
+// redirect to its storage: exactly one is followed, and only to an https
+// URL without credentials. The body is read at most to size+1 bytes, and
+// a download that makes no progress for rendererDownloadStall, or runs
+// past rendererDownloadMax, is abandoned. A failure removes the file.
+func fetchRendererArchive(ctx context.Context, url string, size int64, scratch string) (_ *os.File, err error) {
+ ctx, cancel := context.WithTimeout(ctx, rendererDownloadMax)
+ defer cancel()
+ c := http.Client{Transport: rendererTransport, CheckRedirect: func(req *http.Request, via []*http.Request) error {
+ if len(via) > 1 || req.URL.Scheme != "https" || req.URL.User != nil || req.URL.Host == "" {
+ return errUnavailable
+ }
+ return nil
+ }}
+ req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil)
+ if err != nil {
+ return nil, err
+ }
+ // The stall bound covers the wait for each response's headers too.
+ stall := time.AfterFunc(rendererDownloadStall, cancel)
+ defer stall.Stop()
+ resp, err := c.Do(req)
+ if err != nil {
+ return nil, err
+ }
+ defer resp.Body.Close()
+ if resp.StatusCode != http.StatusOK {
+ return nil, errUnavailable
+ }
+ f, err := os.CreateTemp(scratch, "renderer-*.tar.gz")
+ if err != nil {
+ return nil, err
+ }
+ defer func() {
+ if err != nil {
+ f.Close()
+ os.Remove(f.Name())
+ }
+ }()
+ stall.Reset(rendererDownloadStall)
+ n, err := io.Copy(f, progress{io.LimitReader(resp.Body, size+1), func() { stall.Reset(rendererDownloadStall) }})
+ if err != nil {
+ return nil, err
+ }
+ if n != size {
+ return nil, errUnavailable
+ }
+ if _, err = f.Seek(0, io.SeekStart); err != nil {
+ return nil, err
+ }
+ return f, nil
+}
+
+// progress calls moved after every read that returned bytes.
+type progress struct {
+ r io.Reader
+ moved func()
+}
+
+func (p progress) Read(b []byte) (int, error) {
+ n, err := p.r.Read(b)
+ if n > 0 {
+ p.moved()
+ }
+ return n, err
+}
diff --git a/internal/runner/setup/install_test.go b/internal/runner/setup/install_test.go
index fd477c6d..9547a907 100644
--- a/internal/runner/setup/install_test.go
+++ b/internal/runner/setup/install_test.go
@@ -47,18 +47,19 @@ func installFixture(t *testing.T) (InstallOptions, installHost, *int) {
built.Binaries = append(built.Binaries[:4:4], release.BinaryDigest{Name: "equipo-tool-proxy", Version: built.LauncherVersion, SHA256: proxySum})
// And the renderer archive, whose MANIFEST is the pin linked into the runner.
archive, rendererPin := renderertest.Archive(renderertest.Small())
- m := release.InstallManifest{Version: "fixture-16", Target: "linux/amd64", RunnerSHA256: runnerSum, NamespaceArgs: provider.NamespaceArguments(), Release: built, Targets: map[string]release.InstallTarget{release.TargetLinux: {RunnerSHA256: runnerSum, ToolProxySHA256: proxySum, GitleaksSHA256: runnerSum, RendererSHA256: rendererPin}}}
+ asset := assetOf(archive, rendererPin)
+ m := release.InstallManifest{Version: "fixture-16", Target: "linux/amd64", RunnerSHA256: runnerSum, NamespaceArgs: provider.NamespaceArguments(), Release: built, Targets: map[string]release.InstallTarget{release.TargetLinux: {RunnerSHA256: runnerSum, ToolProxySHA256: proxySum, GitleaksSHA256: runnerSum, RendererSHA256: rendererPin, RendererArchiveSHA256: asset.SHA256, RendererArchiveSize: asset.Size}}}
raw, err := json.Marshal(m)
if err != nil {
t.Fatal(err)
}
calls := new(int)
- h := installHost{scannerPin: runnerSum, rendererPin: rendererPin, manifest: m.Release, home: home, goos: "linux", goarch: "amd64", fetch: func(_ context.Context, url string, _ int64) ([]byte, error) {
+ h := installHost{scannerPin: runnerSum, renderer: asset, fetchRenderer: forgeFetch(t, archive, nil), manifest: m.Release, home: home, goos: "linux", goarch: "amd64", fetch: func(_ context.Context, url string, _ int64) ([]byte, error) {
if strings.HasSuffix(url, "install-manifest.json") {
return raw, nil
}
if strings.HasSuffix(url, "/"+release.RendererArchive) {
- return archive, nil
+ t.Errorf("fetched the renderer from the instance: %s", url)
}
if strings.HasSuffix(url, "equipo-tool-proxy") {
return []byte("fixture tool proxy"), nil
@@ -381,3 +382,32 @@ func TestSetupCommandsHaveTheirOwnDirectory(t *testing.T) {
t.Fatalf("dir %q", dir)
}
}
+
+// assetOf is the asset linked into a runner for archive: its tree pin,
+// digest, size and the tag its digest names.
+func assetOf(archive []byte, pin string) release.RendererAsset {
+ sum := fmt.Sprintf("%x", sha256.Sum256(archive))
+ return release.RendererAsset{Pin: pin, SHA256: sum, Size: int64(len(archive)), Tag: "renderer-" + sum[:12]}
+}
+
+// forgeFetch is a fetchRenderer that answers with body, as the forge
+// would, writing it to a new file in scratch; it records each URL asked
+// for in urls (when not nil).
+func forgeFetch(t *testing.T, body []byte, urls *[]string) func(context.Context, string, int64, string) (*os.File, error) {
+ return func(_ context.Context, url string, size int64, scratch string) (*os.File, error) {
+ if urls != nil {
+ *urls = append(*urls, url)
+ }
+ f, err := os.CreateTemp(scratch, "renderer-*.tar.gz")
+ if err != nil {
+ return nil, err
+ }
+ if len(body) > int(size)+1 {
+ body = body[:size+1]
+ }
+ if _, err = f.Write(body); err == nil {
+ _, err = f.Seek(0, 0)
+ }
+ return f, err
+ }
+}
diff --git a/internal/runner/setup/renderer_install_test.go b/internal/runner/setup/renderer_install_test.go
index e7ab1075..0ed04ca0 100644
--- a/internal/runner/setup/renderer_install_test.go
+++ b/internal/runner/setup/renderer_install_test.go
@@ -5,97 +5,222 @@ package runnersetup
import (
"context"
"encoding/json"
+ "errors"
+ "net/http"
+ "net/http/httptest"
"os"
"path/filepath"
"strings"
+ "syscall"
"testing"
+ "time"
"amadan.net/oficina/equipo/internal/release"
"amadan.net/oficina/equipo/internal/release/renderertest"
)
-// The installer fetches renderer.tar.gz with the runner, holds its
-// MANIFEST to the pin linked into the runner and to the one the release
-// recorded, and unpacks it beside the runner as
-// renderer/<first 12 of pin>/, the tree VerifyRenderer accepts.
+// The installer fetches renderer.tar.gz from the forge, at the address
+// built from the tag linked into the runner (never from the instance),
+// holds it to the linked size, digest and pin and to what the release
+// recorded, and unpacks it beside the runner as renderer/<first 12 of
+// pin>/, the tree VerifyRenderer accepts.
func TestInstallIncludesVerifiedRenderer(t *testing.T) {
o, h, _ := installFixture(t)
+ var urls []string
+ archive, _ := renderertest.Archive(renderertest.Small())
+ h.fetchRenderer = forgeFetch(t, archive, &urls)
r, err := installUser(context.Background(), o, h)
if err != nil {
t.Fatal(err)
}
- tree := release.RendererTree(filepath.Dir(r.BinaryPath), h.rendererPin)
- if err = release.VerifyRenderer(tree, h.rendererPin); err != nil {
+ want := release.RendererForge + h.renderer.Tag + "/renderer.tar.gz"
+ if len(urls) != 1 || urls[0] != want {
+ t.Fatalf("fetched %v, want [%s]", urls, want)
+ }
+ tree := release.RendererTree(filepath.Dir(r.BinaryPath), h.renderer.Pin)
+ if err = release.VerifyRenderer(tree, h.renderer.Pin); err != nil {
t.Fatalf("no verified renderer beside the runner: %v", err)
}
// A retry (the installer runs twice: before enrolment and after)
// finds the tree verified and fetches nothing for it.
- fetch := h.fetch
- h.fetch = func(ctx context.Context, url string, limit int64) ([]byte, error) {
- if strings.HasSuffix(url, "/"+release.RendererArchive) {
- t.Error("fetched the renderer again for a verified tree")
- }
- return fetch(ctx, url, limit)
+ urls = nil
+ if _, err = installUser(context.Background(), o, h); err != nil || len(urls) != 0 {
+ t.Fatalf("retry: fetched %v: %v", urls, err)
}
- if _, err = installUser(context.Background(), o, h); err != nil {
+}
+
+// A new release beside an earlier one with the same renderer copies its
+// tree, fetching nothing: files copied, not linked, and verified.
+func TestInstallCopiesAnEarlierTree(t *testing.T) {
+ o, h, _ := installFixture(t)
+ if _, err := installUser(context.Background(), o, h); err != nil {
t.Fatal(err)
}
+ var urls []string
+ h.fetchRenderer = forgeFetch(t, nil, &urls)
+ h.fetch = editManifest(h.fetch, func(m *release.InstallManifest) { m.Version = "fixture-17" })
+ o.Release = "fixture-17"
+ r, err := installUser(context.Background(), o, h)
+ if err != nil || len(urls) != 0 {
+ t.Fatalf("second release: fetched %v: %v", urls, err)
+ }
+ tree := release.RendererTree(filepath.Dir(r.BinaryPath), h.renderer.Pin)
+ if err = release.VerifyRenderer(tree, h.renderer.Pin); err != nil {
+ t.Fatalf("copied tree: %v", err)
+ }
+ links := 0
+ filepath.Walk(tree, func(p string, info os.FileInfo, err error) error {
+ if err == nil && info.Mode().IsRegular() && info.Sys().(*syscall.Stat_t).Nlink != 1 {
+ links++
+ }
+ return nil
+ })
+ if links != 0 {
+ t.Fatalf("%d files of the copy are linked to another", links)
+ }
}
-// Another archive, one whose files are not its MANIFEST's, a release
-// that recorded another pin or none, and a runner with no pin linked:
-// refused before the runner or the renderer is written.
+// Each check refuses before the runner or the renderer is written: the
+// download's size or digest, its MANIFEST, its files, what the release
+// recorded and what the runner has linked.
func TestInstallRendererRefusesAnotherTree(t *testing.T) {
+ small, pin := renderertest.Archive(renderertest.Small())
other, otherPin := renderertest.Archive(renderertest.Small()[:4])
// The pin's MANIFEST, over a file with other bytes than it lists.
changed := renderertest.Small()
changed[len(changed)-1].Body = "changed"
tampered := renderertest.ArchiveOf(changed, renderertest.Manifest(renderertest.Small()))
- for name, change := range map[string]func(*installHost){
- "another archive": func(h *installHost) { h.fetch = swap(h.fetch, release.RendererArchive, other) },
- "not an archive": func(h *installHost) { h.fetch = swap(h.fetch, release.RendererArchive, []byte("not gzip")) },
- "a changed file": func(h *installHost) { h.fetch = swap(h.fetch, release.RendererArchive, tampered) },
- "recorded another pin": func(h *installHost) {
- h.fetch = editManifest(h.fetch, func(m *release.InstallManifest) {
- linux := m.Targets[release.TargetLinux]
- linux.RendererSHA256 = otherPin
- m.Targets[release.TargetLinux] = linux
- })
- },
- "recorded none": func(h *installHost) {
+ // The same tree and size, other bytes (the gzip header's time): only
+ // the archive digest tells them apart.
+ retimed := append([]byte{}, small...)
+ retimed[4] ^= 0xff
+ // link makes the runner's linked asset, and the release's record,
+ // say archive with pin: every check before the one under test passes.
+ link := func(h *installHost, archive []byte, pin string) {
+ h.renderer = assetOf(archive, pin)
+ h.fetchRenderer = forgeFetch(t, archive, nil)
+ h.fetch = editManifest(h.fetch, func(m *release.InstallManifest) {
+ linux := m.Targets[release.TargetLinux]
+ linux.RendererSHA256, linux.RendererArchiveSHA256, linux.RendererArchiveSize = pin, h.renderer.SHA256, h.renderer.Size
+ m.Targets[release.TargetLinux] = linux
+ })
+ }
+ record := func(edit func(*release.InstallTarget)) func(*installHost) {
+ return func(h *installHost) {
h.fetch = editManifest(h.fetch, func(m *release.InstallManifest) {
linux := m.Targets[release.TargetLinux]
- linux.RendererSHA256 = ""
+ edit(&linux)
m.Targets[release.TargetLinux] = linux
})
- },
- "runner linked another pin": func(h *installHost) { h.rendererPin = otherPin },
- "runner linked none": func(h *installHost) { h.rendererPin = "" },
+ }
+ }
+ for name, c := range map[string]struct {
+ change func(*installHost)
+ key string
+ }{
+ "other bytes": {func(h *installHost) { h.fetchRenderer = forgeFetch(t, other, nil) }, "runner.install.checksum"},
+ "same tree, other bytes": {func(h *installHost) { h.fetchRenderer = forgeFetch(t, retimed, nil) }, "runner.install.checksum"},
+ "short": {func(h *installHost) { h.fetchRenderer = forgeFetch(t, small[:len(small)-1], nil) }, "runner.install.checksum"},
+ "long": {func(h *installHost) { h.fetchRenderer = forgeFetch(t, append(append([]byte{}, small...), 0), nil) }, "runner.install.checksum"},
+ "another tree's MANIFEST": {func(h *installHost) { link(h, other, pin) }, "runner.install.checksum"},
+ "a changed file": {func(h *installHost) { link(h, tampered, pin) }, "runner.install.checksum"},
+ "not an archive": {func(h *installHost) { link(h, []byte("not gzip"), pin) }, "runner.install.checksum"},
+ "recorded another pin": {record(func(l *release.InstallTarget) { l.RendererSHA256 = otherPin }), "runner.install.checksum"},
+ "recorded another archive": {record(func(l *release.InstallTarget) { l.RendererArchiveSHA256 = strings.Repeat("a", 64) }), "runner.install.checksum"},
+ "recorded another size": {record(func(l *release.InstallTarget) { l.RendererArchiveSize++ }), "runner.install.checksum"},
+ "runner linked another pin": {func(h *installHost) { h.renderer.Pin = otherPin }, "runner.install.checksum"},
+ "runner linked another tag": {func(h *installHost) { h.renderer.Tag = "renderer-000000000000" }, "runner.install.checksum"},
+ "runner linked none": {func(h *installHost) { h.renderer = release.RendererAsset{} }, "runner.install.checksum"},
+ "forge unreachable": {func(h *installHost) {
+ h.fetchRenderer = func(context.Context, string, int64, string) (*os.File, error) { return nil, errors.New("offline") }
+ }, "runner.install.release"},
} {
t.Run(name, func(t *testing.T) {
o, h, calls := installFixture(t)
- pin := h.rendererPin
- change(&h)
+ pin := h.renderer.Pin
+ c.change(&h)
r, err := installUser(context.Background(), o, h)
- if err == nil || r.State != "unavailable" || strings.Join(r.Missing, ",") != "runner.install.checksum" || *calls != 0 {
+ if err == nil || r.State != "unavailable" || strings.Join(r.Missing, ",") != c.key || *calls != 0 {
t.Fatalf("installed with %s: %+v %v", name, r, err)
}
dir := filepath.Join(o.Root, "releases", o.Release)
for _, p := range []string{release.RendererTree(dir, pin), release.RendererTree(dir, otherPin), filepath.Join(dir, "equipo-runner")} {
if _, err := os.Lstat(p); !os.IsNotExist(err) {
- t.Fatalf("a renderer tree at %s: %v", p, err)
+ t.Fatalf("written at %s: %v", p, err)
}
}
})
}
}
-func swap(fetch func(context.Context, string, int64) ([]byte, error), name string, body []byte) func(context.Context, string, int64) ([]byte, error) {
- return func(ctx context.Context, url string, limit int64) ([]byte, error) {
- if strings.HasSuffix(url, "/"+name) {
- return body, nil
+// fetchRendererArchive follows the forge's one redirect to https storage,
+// and refuses a second, a plain-http or credentialed target, another
+// status, a wrong length and a stalled body, leaving no file behind.
+func TestFetchRendererArchive(t *testing.T) {
+ body := []byte("renderer archive bytes")
+ storage := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ switch r.URL.Path {
+ case "/object":
+ w.Write(body)
+ case "/again":
+ http.Redirect(w, r, "/object", http.StatusFound)
+ case "/noheaders":
+ // Withholds the response's headers.
+ <-r.Context().Done()
+ case "/stall":
+ w.Header().Set("Content-Length", "22")
+ w.Write(body[:4])
+ w.(http.Flusher).Flush()
+ <-r.Context().Done()
+ default:
+ w.WriteHeader(http.StatusNotFound)
+ }
+ }))
+ defer storage.Close()
+ plain := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Write(body) }))
+ defer plain.Close()
+ forge := httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ to := map[string]string{"/ok": storage.URL + "/object", "/twice": storage.URL + "/again", "/http": plain.URL + "/object",
+ "/creds": strings.Replace(storage.URL, "https://", "https://user:pw@", 1) + "/object", "/stall": storage.URL + "/stall", "/noheaders": storage.URL + "/noheaders"}[r.URL.Path]
+ if r.URL.Path == "/gone" {
+ w.WriteHeader(http.StatusNotFound)
+ return
+ }
+ http.Redirect(w, r, to, http.StatusFound)
+ }))
+ defer forge.Close()
+ old, oldStall, oldMax := rendererTransport, rendererDownloadStall, rendererDownloadMax
+ rendererTransport, rendererDownloadStall, rendererDownloadMax = forge.Client().Transport, 200*time.Millisecond, 8*time.Second
+ defer func() { rendererTransport, rendererDownloadStall, rendererDownloadMax = old, oldStall, oldMax }()
+
+ scratch := t.TempDir()
+ f, err := fetchRendererArchive(context.Background(), forge.URL+"/ok", int64(len(body)), scratch)
+ if err != nil {
+ t.Fatal(err)
+ }
+ got, _ := os.ReadFile(f.Name())
+ f.Close()
+ if string(got) != string(body) {
+ t.Fatalf("got %q", got)
+ }
+ os.Remove(f.Name())
+ for _, c := range []struct {
+ path string
+ size int64
+ }{{"/twice", int64(len(body))}, {"/http", int64(len(body))}, {"/creds", int64(len(body))}, {"/gone", int64(len(body))}, {"/ok", int64(len(body)) - 1}, {"/ok", int64(len(body)) + 1}, {"/stall", int64(len(body))}, {"/noheaders", int64(len(body))}} {
+ began := time.Now()
+ if f, err := fetchRendererArchive(context.Background(), forge.URL+c.path, c.size, scratch); err == nil {
+ f.Close()
+ t.Errorf("%s (size %d) was accepted", c.path, c.size)
+ }
+ // A stall, body or headers, ends at the stall bound, not the
+ // overall one.
+ if took := time.Since(began); took > 5*time.Second {
+ t.Errorf("%s took %v", c.path, took)
}
- return fetch(ctx, url, limit)
+ }
+ if left, _ := os.ReadDir(scratch); len(left) != 0 {
+ t.Fatalf("left in scratch: %v", left)
}
}
diff --git a/scripts/build-instance-release.sh b/scripts/build-instance-release.sh
index b9fe40ab..e7535e86 100755
--- a/scripts/build-instance-release.sh
+++ b/scripts/build-instance-release.sh
@@ -10,9 +10,10 @@ bundle=internal/release/bundled
mkdir "$bundle"
trap 'rm -rf "$bundle"' EXIT
trap 'exit 1' HUP INT TERM
-# renderer.tar.gz is the page renderer the Linux (amd64) runner installs
-# beside itself; the asset reader allows it 384 MiB.
-for name in install-manifest.json equipo-runner equipo-tool-proxy gitleaks renderer.tar.gz install-v1.sh; do
+# The page renderer (renderer.tar.gz) is not bundled: the Linux runner
+# fetches it from its forge release (internal/release RendererForge). The
+# platform caps one ship at 256 MiB, and the renderer alone is ~230 MB.
+for name in install-manifest.json equipo-runner equipo-tool-proxy gitleaks install-v1.sh; do
cp "$source/$name" "$bundle/$name"
done
# The Mac worker's runner, served under darwin-arm64/ (it has no tool proxy).
@@ -20,6 +21,12 @@ mkdir "$bundle/darwin-arm64"
for name in equipo-runner gitleaks; do
cp "$source/darwin-arm64/$name" "$bundle/darwin-arm64/$name"
done
+# Everything embedded stays well under the ship cap (a bound, not the cap).
+bundled=$(du -sb "$bundle" | cut -f 1)
+if [ "$bundled" -gt $((160 << 20)) ]; then
+ echo "build-instance-release: the bundle is $bundled bytes, over 160 MiB" >&2
+ exit 1
+fi
# The instance serves only the tool proxy of its own build: its digest is
# linked in, as it is into the runners (Makefile, RELEASE_LDFLAGS).
proxy=$(sha256sum "$source/equipo-tool-proxy" | cut -d ' ' -f 1)
diff --git a/scripts/build-renderer-tree.py b/scripts/build-renderer-tree.py
index bce6d954..4218a151 100755
--- a/scripts/build-renderer-tree.py
+++ b/scripts/build-renderer-tree.py
@@ -32,6 +32,10 @@ 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).
+
+SOURCES is written beside TAR in the same run, from the same checked debs
+(scripts/renderer-sources.py): each package, its version and where its
+source is. It is published with the archive.
"""
import gzip
import hashlib
@@ -45,6 +49,11 @@ import tarfile
import tempfile
import urllib.request
from concurrent.futures import ThreadPoolExecutor
+import importlib.util
+
+_spec = importlib.util.spec_from_file_location("renderer_sources", os.path.join(os.path.dirname(os.path.abspath(__file__)), "renderer-sources.py"))
+renderer_sources = importlib.util.module_from_spec(_spec)
+_spec.loader.exec_module(renderer_sources)
SNAPSHOT = "https://snapshot.debian.org/archive/"
DIGEST = re.compile(r"[0-9a-f]{64}")
@@ -296,6 +305,10 @@ def build(pin_path, tar_path, keep):
out_dir = os.path.dirname(os.path.abspath(tar_path))
with ThreadPoolExecutor(max_workers=4) as pool:
debs = list(pool.map(checked, packages))
+ try:
+ sources = renderer_sources.sources(pin, debs).encode("utf-8")
+ except renderer_sources.Refused as r:
+ raise Refused(str(r))
if keep:
os.mkdir(keep, 0o755)
root, scratch = keep, None
@@ -322,6 +335,11 @@ def build(pin_path, tar_path, keep):
fd = None
write_tar(tree, manifest, out)
os.chmod(partial, 0o644)
+ sources_path = os.path.join(out_dir, "SOURCES")
+ with open(sources_path + ".partial", "wb") as f:
+ f.write(sources)
+ os.chmod(sources_path + ".partial", 0o644)
+ os.replace(sources_path + ".partial", sources_path)
os.replace(partial, tar_path)
partial = None
except BaseException:
diff --git a/scripts/publish-renderer.sh b/scripts/publish-renderer.sh
new file mode 100755
index 00000000..81c14050
--- /dev/null
+++ b/scripts/publish-renderer.sh
@@ -0,0 +1,121 @@
+#!/usr/bin/env bash
+# Publish the page renderer a release kit holds, or check the published one.
+#
+# scripts/publish-renderer.sh publish <kit>
+# scripts/publish-renderer.sh check <kit> <dir>
+#
+# <kit> is a runner release directory (make release-runner):
+# renderer.tar.gz, SOURCES, equipo-runner and COMMIT. The Linux runner in
+# it fetches renderer.tar.gz from the forge release whose tag is linked
+# into it (internal/release rendererTag), at
+# https://amadan.net/oficina/equipo/-/releases/<tag>/renderer.tar.gz,
+# never from the instance. Both modes first require that everything
+# linked into the kit's runner about the renderer (tree pin, archive
+# digest, size and tag) and what the kit's install manifest records are
+# the kit's archive, that the tag names its digest, and that SOURCES lists
+# exactly the pinned packages of the kit's commit.
+#
+# publish: if the release exists, check it (below). Otherwise tag the
+# kit's commit (never the current checkout), push the tag, create the
+# release with renderer.tar.gz and SOURCES (scripts/renderer-sources.py
+# wrote SOURCES with the archive), and check it. Needs writer access to
+# oficina/equipo.
+#
+# check: download both assets in full, without credentials, into <dir>,
+# and require each to be the kit's file byte for byte. Never a HEAD or a
+# ranged request: the forge counts a redirect it issues as a download.
+# staging-thin.py runs it before it installs anything, and installs the
+# renderer from the downloaded copy.
+set -euo pipefail
+
+FORGE=https://amadan.net/oficina/equipo/-/releases
+REPO=oficina/equipo
+AMADAN=${AMADAN:-amadan}
+GO=${GO:-go}
+
+die() { echo "publish-renderer: $*" >&2; exit 1; }
+sum() { sha256sum "$1" | cut -d ' ' -f 1; }
+
+[[ $# -ge 2 ]] || die "usage: publish <kit> | check <kit> <dir>"
+verb=$1 kit=$2
+case $verb in
+publish) [[ $# -eq 2 ]] || die "usage: publish <kit>" ;;
+check) [[ $# -eq 3 ]] || die "usage: check <kit> <dir>"; out=$3 ;;
+*) die "usage: publish <kit> | check <kit> <dir>" ;;
+esac
+for f in renderer.tar.gz SOURCES equipo-runner install-manifest.json COMMIT; do
+ [[ -f $kit/$f && ! -L $kit/$f ]] || die "$kit/$f is missing"
+done
+commit=$(cat "$kit/COMMIT")
+[[ $commit =~ ^[0-9a-f]{40}$ ]] || die "$kit/COMMIT is not a commit"
+archive_sum=$(sum "$kit/renderer.tar.gz")
+sources_sum=$(sum "$kit/SOURCES")
+
+# What is linked into the kit's runner, as go version -m reports its build.
+build=$("$GO" version -m "$kit/equipo-runner")
+linked() { grep -o "internal/release\.$1=[^ \"]*" <<<"$build" | head -1 | cut -d = -f 2 || true; }
+tag=$(linked rendererTag)
+[[ $tag =~ ^renderer-([0-9a-f]{12})(-r[1-9][0-9]{0,2})?$ ]] || die "no renderer tag is linked into $kit/equipo-runner"
+[[ ${BASH_REMATCH[1]} == "${archive_sum:0:12}" ]] || die "the linked tag $tag does not name $kit/renderer.tar.gz ($archive_sum)"
+pin=$(tar -xzOf "$kit/renderer.tar.gz" MANIFEST | sha256sum | cut -d ' ' -f 1) || die "$kit/renderer.tar.gz has no MANIFEST"
+size=$(stat -c %s "$kit/renderer.tar.gz")
+[[ $(linked rendererSHA256) == "$pin" ]] || die "the tree pin linked into $kit/equipo-runner is not $kit/renderer.tar.gz's ($pin)"
+[[ $(linked rendererArchiveSHA256) == "$archive_sum" ]] || die "the archive digest linked into $kit/equipo-runner is not $kit/renderer.tar.gz's"
+[[ $(linked rendererArchiveSize) == "$size" ]] || die "the archive size linked into $kit/equipo-runner is not $kit/renderer.tar.gz's ($size)"
+python3 -I -c 'import json, sys
+t = json.load(open(sys.argv[1]))["targets"]["linux/amd64"]
+sys.exit((t.get("renderer_sha256"), t.get("renderer_archive_sha256"), t.get("renderer_archive_size")) != (sys.argv[2], sys.argv[3], int(sys.argv[4])))' \
+ "$kit/install-manifest.json" "$pin" "$archive_sum" "$size" || die "$kit/install-manifest.json does not record $kit/renderer.tar.gz"
+
+# SOURCES lists exactly the pinned packages of the kit's commit.
+scratch=$(mktemp -d "${TMPDIR:-/tmp}/publish-renderer.XXXXXX")
+trap 'rm -rf "$scratch"' EXIT
+git show "$commit:internal/release/renderer.json" >"$scratch/renderer.json" || die "no renderer.json at $commit"
+python3 -I "$(dirname "$0")/renderer-sources.py" check "$scratch/renderer.json" "$kit/SOURCES" || die "$kit/SOURCES is not the pinned packages'"
+
+# fetch NAME DEST: the published asset, whole, following the forge's
+# redirect to its storage. Prints the HTTP status ("404" when there is
+# none).
+fetch() {
+ curl --silent --show-error --location --max-redirs 1 --proto '=https' --proto-redir '=https' \
+ --max-time 1800 --output "$2" --write-out '%{http_code}' "$FORGE/$tag/$1"
+}
+
+# check_into DIR: both assets downloaded into DIR are the kit's.
+check_into() {
+ local dir=$1 name status
+ for name in renderer.tar.gz SOURCES; do
+ status=$(fetch "$name" "$dir/$name") || die "downloading $tag/$name failed"
+ [[ $status == 200 ]] || die "$FORGE/$tag/$name answered $status"
+ cmp -s "$dir/$name" "$kit/$name" || die "the published $tag/$name is not $kit/$name"
+ done
+ echo "publish-renderer: $tag matches $kit (renderer.tar.gz $archive_sum, SOURCES $sources_sum)"
+}
+
+if [[ $verb == check ]]; then
+ mkdir -p "$out"
+ check_into "$out"
+ exit 0
+fi
+
+# publish: an existing release is only checked, never replaced.
+status=$(fetch renderer.tar.gz "$scratch/existing") || die "asking the forge for $tag failed"
+if [[ $status == 200 ]]; then
+ check_into "$scratch"
+ exit 0
+fi
+[[ $status == 404 ]] || die "$FORGE/$tag/renderer.tar.gz answered $status"
+
+# The tag names the kit's commit, on the forge too.
+remote=$(git ls-remote --tags origin "refs/tags/$tag" | cut -f 1)
+if [[ -z $remote ]]; then
+ git tag "$tag" "$commit" 2>/dev/null || [[ $(git rev-parse "$tag^{commit}") == "$commit" ]] || die "a local tag $tag names another commit"
+ git push origin "refs/tags/$tag"
+elif [[ $remote != "$commit" ]]; then
+ die "the forge's tag $tag names $remote, not the kit's $commit"
+fi
+version=$(head -1 "$kit/SOURCES" | sed -n 's/^The page renderer: Chromium headless shell \([^,]*\), from Debian\.$/\1/p')
+[[ -n $version ]] || die "$kit/SOURCES has no Chromium version"
+printf '%s\n' "The page renderer: Debian packages and Chromium headless shell $version. Where each one's source is: SOURCES." >"$scratch/notes.md"
+"$AMADAN" release create -repo "$REPO" -notes-file "$scratch/notes.md" "$tag" "$kit/renderer.tar.gz" "$kit/SOURCES"
+check_into "$scratch"
diff --git a/scripts/renderer-sources.py b/scripts/renderer-sources.py
new file mode 100755
index 00000000..a1e73359
--- /dev/null
+++ b/scripts/renderer-sources.py
@@ -0,0 +1,153 @@
+#!/usr/bin/env python3
+"""SOURCES: what the published page renderer distributes, and where each
+part's source is.
+
+ scripts/renderer-sources.py check PIN SOURCES
+
+The renderer archive (scripts/build-renderer-tree.py) holds Debian
+packages, Chromium's headless shell among them. Publishing it makes us
+their distributor, so its forge release carries SOURCES beside it. SOURCES
+is made by build-renderer-tree.py in the same run as the archive, from the
+same pinned list (internal/release/renderer.json) and the same checked
+debs, so it cannot drift: sources(pin, debs) here. It is plain text:
+
+ The page renderer: Chromium headless shell <version>, from Debian.
+ Chromium source: https://snapshot.debian.org/package/chromium/<version>/
+
+ <package> <version> <architecture> <deb URL> <source package URL>
+ ...
+
+one line per pinned amd64 package, in the pin's order. A package's source
+name and version are its deb's control file's Source field (the package's
+own name and version when it has none).
+
+`check` refuses SOURCES unless it is exactly what the pin's packages give
+for every field the pin holds: the header's version and, per line and in
+order, package, version, architecture and URL, with a source URL on
+snapshot.debian.org. publish-renderer.sh runs it before an upload.
+"""
+import io
+import json
+import re
+import sys
+import tarfile
+from urllib.parse import quote
+
+SNAPSHOT_PACKAGE = "https://snapshot.debian.org/package/"
+
+
+class Refused(Exception):
+ pass
+
+
+def ar_members(name, deb):
+ """The members of a deb (an ar archive), by name."""
+ 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)
+ return members
+
+
+def control_of(name, deb):
+ """The deb's control fields (Package, Version, Source, ...)."""
+ members = ar_members(name, deb)
+ modes = {"control.tar": "r:", "control.tar.gz": "r:gz", "control.tar.xz": "r:xz"}
+ found = [m for m in members if m in modes]
+ if len(found) != 1:
+ raise Refused("%s: want one control.tar, .tar.gz or .tar.xz member" % name)
+ with tarfile.open(fileobj=io.BytesIO(members[found[0]]), mode=modes[found[0]]) as tar:
+ for m in tar:
+ if m.name in ("./control", "control") and m.isfile():
+ text = tar.extractfile(m).read().decode("utf-8")
+ break
+ else:
+ raise Refused("%s: no control file" % name)
+ fields, last = {}, None
+ for line in text.splitlines():
+ if line[:1] in (" ", "\t") and last:
+ continue
+ key, sep, value = line.partition(":")
+ if sep:
+ last = key.strip()
+ fields[last] = value.strip()
+ return fields
+
+
+def source_of(p, control):
+ """(source name, source version) of a pinned package, from its control."""
+ if control.get("Package") != p["package"] or control.get("Version") != p["version"]:
+ raise Refused("%s: its control says %s %s" % (p["package"], control.get("Package"), control.get("Version")))
+ m = re.fullmatch(r"([a-z0-9][a-z0-9+.-]*)(?: \(([^()\s]+)\))?", control.get("Source", p["package"]))
+ if not m:
+ raise Refused("%s: a Source field %r" % (p["package"], control.get("Source")))
+ return m.group(1), m.group(2) or p["version"]
+
+
+def source_url(name, version):
+ return SNAPSHOT_PACKAGE + quote(name, safe="") + "/" + quote(version, safe="~:+") + "/"
+
+
+def header(pin, chromium_version):
+ return ("The page renderer: Chromium headless shell %s, from Debian.\n"
+ "Chromium source: %s\n\n" % (pin["version"], source_url("chromium", chromium_version)))
+
+
+def sources(pin, debs):
+ """SOURCES for pin's amd64 packages, debs their checked bytes in order."""
+ packages = pin["amd64"]
+ if len(debs) != len(packages):
+ raise Refused("want one deb per pinned package")
+ lines, chromium = [], None
+ for p, deb in zip(packages, debs):
+ name, version = source_of(p, control_of(p["package"], deb))
+ if p["package"] == "chromium-headless-shell":
+ if name != "chromium":
+ raise Refused("chromium-headless-shell is built from %s, not chromium" % name)
+ chromium = version
+ lines.append(" ".join([p["package"], p["version"], p["architecture"], p["url"], source_url(name, version)]))
+ if chromium is None:
+ raise Refused("the pin has no chromium-headless-shell")
+ return header(pin, chromium) + "\n".join(lines) + "\n"
+
+
+def check(pin, text):
+ """Refuse SOURCES unless it is what pin's packages give."""
+ packages = pin["amd64"]
+ head, sep, body = text.partition("\n\n")
+ if not sep or not head.startswith("The page renderer: Chromium headless shell %s, from Debian.\nChromium source: %schromium/" % (pin["version"], SNAPSHOT_PACKAGE)):
+ raise Refused("SOURCES' header is not the pin's")
+ rows = body.splitlines()
+ if len(rows) != len(packages) or not text.endswith("\n"):
+ raise Refused("SOURCES lists %d packages, the pin %d" % (len(rows), len(packages)))
+ for p, row in zip(packages, rows):
+ f = row.split(" ")
+ if len(f) != 5 or f[:4] != [p["package"], p["version"], p["architecture"], p["url"]] or not f[4].startswith(SNAPSHOT_PACKAGE):
+ raise Refused("SOURCES' line for %s is not the pin's: %r" % (p["package"], row))
+
+
+def main(argv):
+ if len(argv) != 3 or argv[0] != "check":
+ print(__doc__, file=sys.stderr)
+ return 2
+ with open(argv[1]) as f:
+ pin = json.load(f)
+ with open(argv[2], encoding="utf-8") as f:
+ text = f.read()
+ try:
+ check(pin, text)
+ except Refused as r:
+ print("renderer-sources: refused: %s" % r, 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 5f825ebc..2246b0da 100644
--- a/scripts/runner-install-manifest.py
+++ b/scripts/runner-install-manifest.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
"""Record what one release build produced: the runner and tool proxy digests,
-and on Linux the renderer tree's pin.
+and on Linux the renderer tree's pin and its archive's digest and size.
The source manifest (internal/release/manifest.json, copied into the
release directory) pins the programs this repository does not build. This
@@ -43,9 +43,13 @@ release["binaries"].append({"name": "equipo-tool-proxy", "version": release["lau
# Every platform's runner (Mac runners spec 3.1). The top-level fields
# 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.
+# The renderer: its tree pin, and the archive's own digest and size (the
+# runner fetches it from the forge, not the instance, and checks both).
+archive = root / "renderer.tar.gz"
targets = {"linux/amd64": {"runner_sha256": digest(root / "equipo-runner"),
"tool_proxy_sha256": digest(root / "equipo-tool-proxy"), "gitleaks_sha256": digest(root / "gitleaks"),
- "renderer_sha256": renderer_pin(root / "renderer.tar.gz")}}
+ "renderer_sha256": renderer_pin(archive),
+ "renderer_archive_sha256": digest(archive), "renderer_archive_size": archive.stat().st_size}}
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 efad0e55..b4201130 100644
--- a/scripts/runner-reference-allowlist.json
+++ b/scripts/runner-reference-allowlist.json
@@ -15812,13 +15812,6 @@
"count": 2,
"reason": "Fable follow-up: pinned runner scanner packaging and existing runtime integration."
},
- {
- "path": "internal/release/staged_gate_test.go",
- "line_sha256": "fb9169abfe7d706c7c0f4d4a42ef768456cfd6be1f1c1ff9da04af0e67a28a72",
- "match": "equipo-runner",
- "count": 2,
- "reason": "Fable follow-up: pinned runner scanner packaging and existing runtime integration."
- },
{
"path": "docs/api/equipo-v1.openapi.json",
"line_sha256": "ce892a21ae5ab451537c7c410dc20804ff36c90b1a497e798bf56151903ce3c3",
@@ -22275,7 +22268,7 @@
},
{
"path": "internal/equipotest/runner_release_test.go",
- "line_sha256": "b4e2946cbbed5bd4883137a4e37953bc05f16ef428c4019d1cda93b4b67890ce",
+ "line_sha256": "86f45d6c9c3e34447e5c24bc21293ed9de88cc3fc3fabfbafa0824cf57f6a067",
"match": "equipo-runner",
"count": 2,
"reason": "Fable follow-up: pinned runner scanner packaging and existing runtime integration."
@@ -22357,13 +22350,6 @@
"count": 3,
"reason": "Dynamic specialists slice 1 task 7: the page renderer the release ships beside the runner, installed by install-renderer and checked by verify-installed."
},
- {
- "path": "internal/release/install_assets.go",
- "line_sha256": "c8dbe720dff22aba3fe4ba0d6a0e280d824a0c24266344068dc83739a2d2e388",
- "match": "equipo-runner",
- "count": 1,
- "reason": "Dynamic specialists slice 1 task 7: the page renderer the release ships beside the runner, installed by install-renderer and checked by verify-installed."
- },
{
"path": "internal/release/renderer_assets_test.go",
"line_sha256": "793696f062e772771c1536cee1c07d79aa404de6e573a9fe87fe87a8fbf3c58c",
@@ -22371,13 +22357,6 @@
"count": 1,
"reason": "Dynamic specialists slice 1 task 7: the page renderer the release ships beside the runner, installed by install-renderer and checked by verify-installed."
},
- {
- "path": "internal/release/renderer_assets_test.go",
- "line_sha256": "9370c39559592bf4e9d27e65094c3822a10982811e65971536d54a0a7d4ae725",
- "match": "equipo-runner",
- "count": 1,
- "reason": "Dynamic specialists slice 1 task 7: the page renderer the release ships beside the runner, installed by install-renderer and checked by verify-installed."
- },
{
"path": "internal/release/renderer_assets_test.go",
"line_sha256": "a7c6f0d0fccc139c3a24dcdef8c391bc4029b2a5ee6afa9958f4b49f5f1a912b",
@@ -22385,20 +22364,6 @@
"count": 1,
"reason": "Dynamic specialists slice 1 task 7: the page renderer the release ships beside the runner, installed by install-renderer and checked by verify-installed."
},
- {
- "path": "internal/release/renderer_assets_test.go",
- "line_sha256": "df34cc4089b8428d633fca94405d1e002ed8f6bbbcdbe158e139a05466fa1298",
- "match": "equipo-runner",
- "count": 1,
- "reason": "Dynamic specialists slice 1 task 7: the page renderer the release ships beside the runner, installed by install-renderer and checked by verify-installed."
- },
- {
- "path": "internal/release/renderer_assets_test.go",
- "line_sha256": "e15a665cf2a0e2e2a46c038cbd1ac1b78cd941dff69462a05fc68c6e03b03a9c",
- "match": "equipo-runner",
- "count": 1,
- "reason": "Dynamic specialists slice 1 task 7: the page renderer the release ships beside the runner, installed by install-renderer and checked by verify-installed."
- },
{
"path": "internal/release/renderer_scripts_test.go",
"line_sha256": "12b6510ce8fbbe65cc5ab76d99e21b3a4f7b61664ac56401cc2f67e0e2d9ef3e",
@@ -22455,13 +22420,6 @@
"count": 1,
"reason": "Dynamic specialists slice 1 task 7: the page renderer the release ships beside the runner, installed by install-renderer and checked by verify-installed."
},
- {
- "path": "scripts/build-instance-release.sh",
- "line_sha256": "530a58ef9d90985f55337003d8187d629df9d63e3b70ed347faca8c12311cdc0",
- "match": "equipo-runner",
- "count": 1,
- "reason": "Dynamic specialists slice 1 task 7: the page renderer the release ships beside the runner, installed by install-renderer and checked by verify-installed."
- },
{
"path": "scripts/cutover-finish-thin.sh",
"line_sha256": "12260be6ca928cae632e2bdf2195fe44fc00e11cf2ee2680ed7e01c217e839be",
@@ -22518,20 +22476,6 @@
"count": 1,
"reason": "Dynamic specialists slice 1 task 7: the page renderer the release ships beside the runner, installed by install-renderer and checked by verify-installed."
},
- {
- "path": "scripts/staging-thin.py",
- "line_sha256": "0c8c2cb081a78882e8678e89719608f8bd2572afa6fee63aa74ed896816545ea",
- "match": "equipo-runner",
- "count": 1,
- "reason": "Dynamic specialists slice 1 task 7: the page renderer the release ships beside the runner, installed by install-renderer and checked by verify-installed."
- },
- {
- "path": "scripts/staging-thin-test.py",
- "line_sha256": "4bfdbdfc446082debb3015067a44f748edd0f28daef7b17b00d2750f99686612",
- "match": "equipo-runner",
- "count": 1,
- "reason": "Dynamic specialists slice 1 task 7: the page renderer the release ships beside the runner, installed by install-renderer and checked by verify-installed."
- },
{
"path": "scripts/upgrade-thin.sh",
"line_sha256": "12260be6ca928cae632e2bdf2195fe44fc00e11cf2ee2680ed7e01c217e839be",
@@ -22972,5 +22916,103 @@
"match": "equipo-runner",
"count": 1,
"reason": "Dynamic specialists slice 1 task 21: a fake page renderer's launch configuration naming the retained runner executable path; test data, no new runtime dependency."
+ },
+ {
+ "path": "internal/release/install_assets.go",
+ "line_sha256": "5b1c39eda80a58debe54efeb61a6c7a6bb813ce7b0af92beccadfbab3a1f9e25",
+ "match": "equipo-runner",
+ "count": 1,
+ "reason": "Runner executable/package or user-service identifier, retained for direct-launch installation and fixture verification."
+ },
+ {
+ "path": "internal/release/renderer_assets_test.go",
+ "line_sha256": "69a8b1718538bced6e549a102692542313a22b070998f3f67ef416454535bbee",
+ "match": "equipo-runner",
+ "count": 2,
+ "reason": "Dynamic specialists slice 1 task 7: the page renderer the release ships beside the runner, installed by install-renderer and checked by verify-installed."
+ },
+ {
+ "path": "internal/release/staged_gate_test.go",
+ "line_sha256": "f8bdb3b512fe2af1ed226715b7243666f1cdfed264e316e899f56ac4ac19d383",
+ "match": "equipo-runner",
+ "count": 2,
+ "reason": "Staged-artifact gate test: the released runner binary path it hashes."
+ },
+ {
+ "path": "scripts/build-instance-release.sh",
+ "line_sha256": "773bdf97410e36ff1f295fc71b95c17cb3601f95631211612bcfae4e3cbbdb0a",
+ "match": "equipo-runner",
+ "count": 1,
+ "reason": "Fable follow-up: pinned runner scanner packaging and existing runtime integration."
+ },
+ {
+ "path": "scripts/publish-renderer.sh",
+ "line_sha256": "b771102631e53880ef59b2b7205148676c212391cb91e5c794edd1ca262107ff",
+ "match": "equipo-runner",
+ "count": 1,
+ "reason": "Retained runner executable name in the page renderer's forge publish and check tooling (renderer out of the instance)."
+ },
+ {
+ "path": "scripts/publish-renderer.sh",
+ "line_sha256": "cacb0ce3596424430de2771a2d6d6aa1a687c9c9306bf05d25cc62d8cadb5942",
+ "match": "equipo-runner",
+ "count": 1,
+ "reason": "Retained runner executable name in the page renderer's forge publish and check tooling (renderer out of the instance)."
+ },
+ {
+ "path": "scripts/staging-thin-test.py",
+ "line_sha256": "d826390cf4d2c3ab7ab319feb717288f089b85e4094c442cef5e22485d560162",
+ "match": "equipo-runner",
+ "count": 1,
+ "reason": "Staging release test: a fake runner release's file names, to check the preview scanner is installed beside the runner and held to its digest."
+ },
+ {
+ "path": "scripts/staging-thin.py",
+ "line_sha256": "fddde0e2f585d9e093820469ffab1aa5816335cdfbd269c335d0c8ba8e78f9f3",
+ "match": "equipo-runner",
+ "count": 1,
+ "reason": "Thin v1 staging gate: the staging runner unit, its state root, the production runner config it reads binary paths from, and the runner binary it builds (spec 7)."
+ },
+ {
+ "path": "internal/release/renderer_publish_test.go",
+ "line_sha256": "4f517e11a059b6cc9c259e5a3f866e8b9b8658ef0de5170accfc82620db8948a",
+ "match": "equipo-runner",
+ "count": 1,
+ "reason": "Retained runner executable name in the page renderer's forge publish and check tooling (renderer out of the instance)."
+ },
+ {
+ "path": "scripts/publish-renderer.sh",
+ "line_sha256": "3e2ce04554ebb50fbf642ec9adc52dd960bc7067a0bace649eda47ffe9524da0",
+ "match": "equipo-runner",
+ "count": 1,
+ "reason": "Retained runner executable name in the page renderer's forge publish and check tooling (renderer out of the instance)."
+ },
+ {
+ "path": "scripts/publish-renderer.sh",
+ "line_sha256": "70aa552ecbee5b0f5e4d8a2ab0d23769cdfd6947c8de63e530691281a10cab97",
+ "match": "equipo-runner",
+ "count": 1,
+ "reason": "Retained runner executable name in the page renderer's forge publish and check tooling (renderer out of the instance)."
+ },
+ {
+ "path": "scripts/publish-renderer.sh",
+ "line_sha256": "7eb527d34cf00455e3edcb72237ae724811daf778a96b3f625cfd5f3a2050563",
+ "match": "equipo-runner",
+ "count": 1,
+ "reason": "Retained runner executable name in the page renderer's forge publish and check tooling (renderer out of the instance)."
+ },
+ {
+ "path": "scripts/publish-renderer.sh",
+ "line_sha256": "973c376e4fde4542bfe416191270d3c02176b83e74551ccbf6bc916bbeb76649",
+ "match": "equipo-runner",
+ "count": 1,
+ "reason": "Retained runner executable name in the page renderer's forge publish and check tooling (renderer out of the instance)."
+ },
+ {
+ "path": "scripts/publish-renderer.sh",
+ "line_sha256": "cbc5ae108299bc0d402f0bd83cb0cfb3fe6784603074091ce690c8ccbd0df66c",
+ "match": "equipo-runner",
+ "count": 1,
+ "reason": "Retained runner executable name in the page renderer's forge publish and check tooling (renderer out of the instance)."
}
]
diff --git a/scripts/staged-artifacts.py b/scripts/staged-artifacts.py
index 44cbe6fc..eb725810 100755
--- a/scripts/staged-artifacts.py
+++ b/scripts/staged-artifacts.py
@@ -17,7 +17,10 @@ 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, and the renderer
-pin it records is the MANIFEST of the renderer.tar.gz beside them.
+pin it records is the MANIFEST of the renderer.tar.gz beside them, whose
+digest and size it records too. The renderer archive, its SOURCES and the
+install manifest are hashed with the binaries (they are not built from
+the commit, so they are not asked for build information).
`verify` recomputes every hash and refuses unless the artifacts are the
ones the provenance manifest names, at the commit it names.
@@ -50,9 +53,22 @@ def artifacts(version, instance=None):
# Both targets (Mac runners spec 3.1): the Mac worker's bytes are
# part of what production receives.
'darwin_runner': runner / 'darwin-arm64' / 'equipo-runner',
+ # Not binaries: the renderer archive and SOURCES the forge release
+ # publishes (the runner fetches the archive there, not from the
+ # instance), and the install manifest the instance embeds, which
+ # names the archive. Frozen here, so neither can change after
+ # staging while the instance keeps the original.
+ 'renderer_archive': runner / 'renderer.tar.gz',
+ 'renderer_sources': runner / 'SOURCES',
+ 'install_manifest': runner / 'install-manifest.json',
}
+# The artifacts that are files, not Go binaries: hashed, never asked for
+# build information.
+NOT_BINARIES = ('renderer_archive', 'renderer_sources', 'install_manifest')
+
+
def digests(version, instance=None):
out = {}
for name, path in artifacts(version, instance).items():
@@ -119,7 +135,9 @@ def self_consistent(version, sums, commit):
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'],
- 'renderer_sha256': renderer_pin(runner / 'renderer.tar.gz')}
+ 'renderer_sha256': renderer_pin(runner / 'renderer.tar.gz'),
+ 'renderer_archive_sha256': sums['renderer_archive'],
+ 'renderer_archive_size': (runner / 'renderer.tar.gz').stat().st_size}
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, tarfile.TarError):
@@ -164,6 +182,8 @@ def main():
print(f'refused: the {version} runner release does not name its own bytes', file=sys.stderr)
return 1
for name, path in artifacts(version, instance).items():
+ if name in NOT_BINARIES:
+ continue
if not (scanner_from_pin(path) if name in ('gitleaks', 'darwin_gitleaks') else built_from(path, commit)):
print(f'refused: the {name} binary does not say it was built from {commit}, unmodified', file=sys.stderr)
return 1
diff --git a/scripts/staging-thin-test.py b/scripts/staging-thin-test.py
index 503cd4aa..04eb9d84 100644
--- a/scripts/staging-thin-test.py
+++ b/scripts/staging-thin-test.py
@@ -336,9 +336,11 @@ class ReleaseTest(unittest.TestCase):
self.assertTrue(os.access(scanner, os.X_OK))
def test_build_installs_the_renderer_beside_the_runner(self):
- # The staged runner unpacks the release's renderer.tar.gz beside
- # itself (install-renderer); verify-installed then checks the tree
- # and renders the fixture page with it.
+ # The published renderer is downloaded in full and held to the
+ # release (publish-renderer.sh check), after provenance and before
+ # anything is installed; the staged runner unpacks that download
+ # beside itself (install-renderer); verify-installed then checks
+ # the tree and renders the fixture page with it.
with scratch() as folder:
repo, root = Path(folder) / 'repo', Path(folder) / 'root'
built = self.release(repo, 'abc1234')
@@ -349,11 +351,16 @@ class ReleaseTest(unittest.TestCase):
patch.object(staging, 'run', return_value='') as run:
staging.build()
calls = [c.args[0] for c in run.call_args_list]
- install = [str(root / 'releases/abc1234/equipo-runner'), 'install-renderer', str(built / 'renderer.tar.gz')]
+ published = root / 'releases/abc1234/published-renderer'
+ check = ['scripts/publish-renderer.sh', 'check', str(built), str(published)]
+ install = [str(root / 'releases/abc1234/equipo-runner'), 'install-renderer', str(published / 'renderer.tar.gz')]
+ self.assertIn(check, calls)
self.assertIn(install, calls)
- # After the provenance check, which holds the runner to the release.
+ # After the provenance check, which holds the runner to the
+ # release, and the published asset's check.
verify = ['python3', 'scripts/staged-artifacts.py', 'verify', 'abc1234']
- self.assertLess(calls.index(verify), calls.index(install))
+ self.assertLess(calls.index(verify), calls.index(check))
+ self.assertLess(calls.index(check), calls.index(install))
def test_provenance_holds_the_scanner_to_the_release(self):
with scratch() as folder:
diff --git a/scripts/staging-thin.py b/scripts/staging-thin.py
index 3775a114..c5b8f061 100755
--- a/scripts/staging-thin.py
+++ b/scripts/staging-thin.py
@@ -204,10 +204,19 @@ def build():
for name in ('equipo-runner', 'equipo-tool-proxy', 'gitleaks'):
shutil.copy2(release / name, runner / name)
provenance(sha)
- # And the page renderer beside it, unpacked by the staged runner from
- # the release's archive and held to the pin linked into it (both
- # staging runners use it); verify-installed renders a page with it.
- run([str(runner / 'equipo-runner'), 'install-renderer', str(release / 'renderer.tar.gz')])
+ # The page renderer as users get it: published on the forge under the
+ # tag linked into the runner (scripts/publish-renderer.sh publish).
+ # Downloaded in full, without credentials (never a HEAD: the forge
+ # counts a redirect as a download), and required to be the release's
+ # bytes, which provenance just held to the build. A release whose
+ # renderer is not published stops here, before staging installs
+ # anything, so production cannot ship without it.
+ published = runner / 'published-renderer'
+ run(['scripts/publish-renderer.sh', 'check', str(release), str(published)], timeout=2400)
+ # Unpacked by the staged runner from that download and held to the pin
+ # linked into it (both staging runners use it); verify-installed
+ # renders a page with it.
+ run([str(runner / 'equipo-runner'), 'install-renderer', str(published / 'renderer.tar.gz')])
print(f'built {sha}: {instance_binary(sha)} and {runner}')
return sha