installer: refuse another Equipo, put back on failure, run from home
Enrolling the Tito Studio (Mac user paulequipo) with production
(2026-11-28) found the user's live staging enrolment, after the
installer had already booted out the staging agent and rewritten
runner.env with production values; Enrol returned a bare
provider.ErrIdentity ("failed: provider_identity_mismatch") and
nothing put staging back, so the staging runner stayed down. Started
from an unreadable folder (sudo su without a dash), npm ci and
xcodebuild failed on the inherited working directory, so no srt.
- runner.EnrolledElsewhere: the check Enrol makes (live credential,
saved enrolment for another origin or instance, or unreadable),
shared with Enrol, lock-free and read-only.
- Mac installer: asks it before stopping the agent or writing
anything; says which Equipo in words (runner.mac.other_instance)
and changes nothing. After the stop, the binary, scanner, srt and
runner.env are moved aside (installBackup) until the enrolment is
done; any failure before then (download, checksum, config, enrol
error, Ctrl-C while waiting, enrolled as primary) puts them back and
bootstraps the agent again (context.WithoutCancel), saying so
(runner.mac.restored / runner.mac.not_restored). A stop that took
the agent out of launchd but found the lock held gives it back.
- Linux installer (installLinux with an injected host): same
precheck (runner.install.other_instance); runner.env and the unit
are kept aside and put back if it stops before enrolment.
- Both chdir to the user's home before running anything; npm ci runs
in the srt prefix, xcodebuild in home, system tools (launchctl, id,
dscl, scutil, systemctl, loginctl, bwrap) in /, go env in the root.
- enrolReport maps ErrIdentity to runner.enrol.identity, alone.
- Five new strings, COPY REVIEW PENDING (drafts for copy review).
Tests first (failed to build, then failed):
TestEnrolledElsewhere, TestInstallMacRefusesAnotherEquipo,
TestInstallMacPutsBackThePreviousRunner, TestInstallMacFirstFailure-
LeavesNoConfig, TestInstallMacAgainKeepsNothingAside,
TestInstallMacRunsFromItsHome, TestInstallMacIdentityInWords,
TestInstallLinuxRefusesAnotherEquipo, TestInstallLinuxPutsBackItsConfig,
TestSetupCommandsHaveTheirOwnDirectory, and a reload assertion in
TestInstallMacWhenTheRunnerWillNotStop.
Mutation checks (each broke one guard, ran the named test, restored):
M1 drop expiry check in EnrolledElsewhere: TestEnrolledElsewhere FAIL
M2 ignore instance id: TestEnrolledElsewhere/another_instance FAIL
M3 drop Mac precheck: TestInstallMacRefusesAnotherEquipo FAIL
M4 no restore: TestInstallMacPutsBackThePreviousRunner FAIL
M5 no reload: ...PutsBack/link_expired FAIL
M6 reload on the ended context: ...PutsBack/wait_stopped FAIL
M7 backup kept on success: TestInstallMacAgainKeepsNothingAside FAIL
M8 enrol failure returns without restore: ...PutsBack FAIL
M9 no chdir: TestInstallMacRunsFromItsHome FAIL
M10-M12 drop npm/xcodebuild/system Dir: ...RunsFromItsHome FAIL
M13 identity shown raw: TestInstallMacIdentityInWords FAIL
M14 drop Linux precheck: TestInstallLinuxRefusesAnotherEquipo FAIL
M15 Linux no put back: TestInstallLinuxPutsBackItsConfig FAIL
M16 Linux backup kept: TestInstallLinuxPutsBackItsConfig FAIL
M17 Linux no chdir: TestInstallLinuxPutsBackItsConfig FAIL
M18 setup command Dir: TestSetupCommandsHaveTheirOwnDirectory FAIL
M19 restore leaves new files: TestInstallMacFirstFailure... FAIL
M20 no give-back after a failed stop: ...WhenTheRunnerWillNotStop FAIL
Local: go test ./cmd/equipo-runner/ ./internal/runner/setup/ ok;
./internal/runner -run 'Budget|Enrol|Diagnostic' ok; copy tests in
./internal/equipo and ./internal/equipotest ok; darwin/arm64 vet ok;
staticcheck on the three packages clean; fmt-check, lanes-check,
runner-dead-references ok.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
16 files changed,
+1,102
−69
cmd/equipo-runner/enrol_report.go+20 −0cmd/equipo-runner/install.go+77 −15cmd/equipo-runner/install_backup.go+86 −0cmd/equipo-runner/install_config.go+4 −1cmd/equipo-runner/install_linux_safe_test.go+162 −0cmd/equipo-runner/install_mac.go+122 −35cmd/equipo-runner/install_mac_test.go+13 −1cmd/equipo-runner/install_safe_test.go+270 −0docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md+5 −0internal/equipo/copy.go+6 −0internal/runner/enrol.go+38 −2internal/runner/enrol_elsewhere_test.go+71 −0internal/runner/setup/install_test.go+9 −0internal/runner/setup/preflight.go+2 −2internal/runner/setup/service.go+11 −3scripts/runner-reference-allowlist.json+206 −10
CI failed — run details
CI log
=== prepare ===
ci-box: machine: aarch64, 32 CPUs, 62 GiB memory, kernel 7.0.0-1017-aws
ci-box: python 3.12.3; Docker version 29.1.3, build 29.1.3-0ubuntu3~24.04.2
ci-box: user namespaces allowed: 233151
ci-box: cgroup: cgroup2fs
ci-box: disk /home/ci/work/repos/oficina__equipo/wt/mac-install-safe: Type Size Avail | ext4 96G 86G
ci-box: disk /home/ci/.cache/equipo-ci-box: Type Size Avail | ext4 96G 86G
ci-box: bwrap: fetched and verified in 0.3s
ci-box: claude: fetched and verified in 1.4s
ci-box: codex: fetched and verified in 3.5s
ci-box: codex-code-mode-host: fetched and verified in 1.3s
ci-box: libwrap: fetched and verified in 0.3s
ci-box: socat: fetched and verified in 0.3s
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
ci-box: image pulled in 9.9s
ci-box: pi: installed and verified in 7.2s
ci-box: opencode: installed and verified in 2.3s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 8.6s
ci-box: clone deepened in 4.8s
ci-box: file times set from content: 3286 files, 213 directories
ci-box: ready in 18.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.151s
=== compile ===
go build ./...
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py compile
+ go build -tags testbuild ./...
3.4s
+ go list -export -test -tags testbuild -f ./...
4.7s
+ go list -export -test -tags browser,testbuild -f ./internal/equipo ./internal/equipotest ./internal/headless ./internal/idtest ./internal/plan3test ./internal/thintest
3.6s
rastrillo: budget size: 3 problem(s)
exit status 1
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -version
staticcheck 2026.1 (v0.7.0)
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 -version
Go: go1.26.11
Scanner: govulncheck@v1.8.0
DB: https://vuln.go.dev
DB updated: 2026-11-24 15:56:00 +0000 UTC
go run github.com/zricethezav/gitleaks/v8@v8.30.1 version
version is set by build process
=== check ===
--- shard 0 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-work: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadless$/^4c_rebase$|^TestHeadless$/^4b_ask$|^TestHeadless$/^4c_checks_card$|^TestHeadless$/^4_step_crash$' ./internal/headless
receipt: test step 1m19.988s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m18.178s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m18.18s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 58.24, cpu waiting 38.37%, memory waiting 0.00%, io waiting 0.63%
--- shard 1 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-review: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadless$/^4_review$|^TestHeadless$/^2b_access$|^TestHeadless$/^runner_crash$|^TestHeadless$/^2b_first_message$|^TestHeadless$/^4_checks_honest$|^TestHeadless$/^7_stream_resume$|^TestHeadless$/^2b_notebook$|^TestHeadless$/^2b_move_in$|^TestHeadless$/^2b_desk_failure$|^TestHeadless$/^cancel$' ./internal/headless
receipt: test step 1m18.858s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m17.051s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m17.05s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 59.91, cpu waiting 38.41%, memory waiting 0.00%, io waiting 0.65%
--- shard 2 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-connections: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadlessConnections$|^TestHeadlessTokenPasteEndToEnd$|^TestHeadlessTokenConnection$' ./internal/headless
receipt: test step 1m20.811s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m18.854s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m9.47s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 5.08s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 4.31s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 58.24, cpu waiting 38.37%, memory waiting 0.00%, io waiting 0.63%
--- 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 1m17.666s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m15.712s amadan.net/oficina/equipo/internal/headless
receipt: slow test 37.94s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 19.81s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.07s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
receipt: slow test 8.89s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
machine: 32 CPUs, load 59.91, cpu waiting 38.41%, memory waiting 0.00%, io waiting 0.65%
--- shard 4 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-guards: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadlessCopyRotation$|^TestHeadlessPolicyGuards$|^TestHeadlessRunnerKillLeavesNoCopies$|^TestHeadlessNewHouseRuleStartsFresh$|^TestHeadless$/^3_engineering$|^TestHeadless$/^3_step_cancel$|^TestHeadless$/^3_step_contained$|^TestHeadless$/^3_step_refused$|^TestHeadless$/^3_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless
receipt: test step 1m35.81s 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 1m33.918s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m4.01s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.49s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 8.33s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 7.17s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 4.92s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
machine: 32 CPUs, load 61.12, cpu waiting 37.16%, memory waiting 0.00%, io waiting 0.48%
--- 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 2m58.293s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 2m56.272s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m40.2s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistant
receipt: slow test 20.19s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.11s amadan.net/oficina/equipo/internal/headless TestHeadlessResearchHandoff
receipt: slow test 7.01s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistantAttachments
receipt: slow test 6.71s amadan.net/oficina/equipo/internal/headless TestHeadlessTurnBatching
machine: 32 CPUs, load 23.31, cpu waiting 10.32%, memory waiting 0.00%, io waiting 0.11%
--- shard 6 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane thintest: ./internal/thintest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test([^C]|C[^o]|Co[^n]|Con[^t])|^TestContract(Assistant|Outcome|Team|Handoff|HostAllowlist|HostIsPerPerson|Look|Use[A-Z]|RemoteCall|LanesRunAtOnce|NoMergeQuestionWhenGateMerges|PreviewHeldUntilPublishAnswer|PreviewNotHeldBelow19|PublishNeedsOwnerAnswer)' ./internal/thintest
receipt: test step 2m16.372s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 2m14.601s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 10.93s amadan.net/oficina/equipo/internal/thintest TestContractTeamJobSettledStates
receipt: slow test 6.74s amadan.net/oficina/equipo/internal/thintest TestExplorePreviewsOff
receipt: slow test 4.16s amadan.net/oficina/equipo/internal/thintest TestContractTeamNudgePersonNeeds
receipt: slow test 3.77s amadan.net/oficina/equipo/internal/thintest TestContractPreviewHeldUntilPublishAnswer
receipt: slow test 2.68s amadan.net/oficina/equipo/internal/thintest TestContractTeamUpdatePersonNeeds
machine: 32 CPUs, load 36.04, cpu waiting 20.20%, memory waiting 0.00%, io waiting 0.24%
--- shard 7 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane thintest-contract: ./internal/thintest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^Test([^C]|C[^o]|Co[^n]|Con[^t])|^TestContract(Assistant|Outcome|Team|Handoff|HostAllowlist|HostIsPerPerson|Look|Use[A-Z]|RemoteCall|LanesRunAtOnce|NoMergeQuestionWhenGateMerges|PreviewHeldUntilPublishAnswer|PreviewNotHeldBelow19|PublishNeedsOwnerAnswer)' ./internal/thintest
receipt: test step 1m58.049s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m56.319s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 9.57s amadan.net/oficina/equipo/internal/thintest TestContractRetryPreviewUnverifiedMerge
receipt: slow test 9.13s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 4.95s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotOffered
receipt: slow test 4.66s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
receipt: slow test 3.01s amadan.net/oficina/equipo/internal/thintest TestContractPausedJob
machine: 32 CPUs, load 47.37, cpu waiting 26.95%, memory waiting 0.00%, io waiting 0.33%
--- shard 8 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-thin: ./internal/runner/thin
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./internal/runner/thin
budget note: internal/runner/thin took 5m12.198s, over the 45s its record on line 44 allows; reported only, timing fails on CI
receipt: test step 5m17.832s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 5m12.198s amadan.net/oficina/equipo/internal/runner/thin
receipt: slow test 37.02s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeAnsweredByAnotherModel
receipt: slow test 36.89s amadan.net/oficina/equipo/internal/runner/thin TestModelsEngineeringProbesThenRunsTheStrongest
receipt: slow test 36.8s amadan.net/oficina/equipo/internal/runner/thin TestModelsUnhealthyRetriedOnDemand
receipt: slow test 18.48s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeRunsInsideTheAdmission
receipt: slow test 9.96s amadan.net/oficina/equipo/internal/runner/thin TestTimeoutKeepsNothingForAnOlderInstance
machine: 32 CPUs, load 3.07, cpu waiting 0.99%, memory waiting 0.00%, io waiting 0.01%
--- 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.388s 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.339s amadan.net/oficina/equipo/internal/runner
receipt: slow test 29.3s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.02s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 51.67, cpu waiting 31.46%, memory waiting 0.00%, io waiting 1.04%
--- 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 1m0.717s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 59.472s amadan.net/oficina/equipo/internal/runner
receipt: slow test 49.43s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 43.89s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.42s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.6s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 57.35, cpu waiting 36.49%, memory waiting 0.00%, io waiting 0.88%
--- shard 11 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-rest: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^TestDirectBugWorkflow$|^TestEnrolKeepsTheRole$|^TestPlanWorkflowCandidateOrder$|^TestPlanWorkflowFeature$|^TestCoordinatorRecoveryCallRefusalKeepsServing$|^TestCoordinatorRefusalMatrix$' ./internal/runner
receipt: test step 36.594s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 35.665s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.12s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.45s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.12s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 3.03s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 1.61s amadan.net/oficina/equipo/internal/runner TestReportPostsRetryExactRequest
machine: 32 CPUs, load 31.02, cpu waiting 21.19%, memory waiting 0.00%, io waiting 1.32%
--- shard 12 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-a started 30s late; cpu waiting 40.1%, load 22.50
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 1m9.8s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m7.877s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 29.07s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 28.98s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 26.69s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 23.91s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
receipt: slow test 23.6s amadan.net/oficina/equipo/internal/equipotest TestAuthorityProjectKinds
machine: 32 CPUs, load 57.50, cpu waiting 35.69%, memory waiting 0.00%, io waiting 0.45%
--- 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.7%, load 22.50
test lane equipotest-e: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test[E-P]' ./internal/equipotest
receipt: test step 2m14.456s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 2m12.416s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 20.99s amadan.net/oficina/equipo/internal/equipotest TestProjectsFailuresRollBack
receipt: slow test 20.97s amadan.net/oficina/equipo/internal/equipotest TestProjectsReopen
receipt: slow test 20.96s amadan.net/oficina/equipo/internal/equipotest TestProjectWritesRequireCurrentOwner
receipt: slow test 20.94s amadan.net/oficina/equipo/internal/equipotest TestProjectsSharedAndGrouped
receipt: slow test 20.94s amadan.net/oficina/equipo/internal/equipotest TestProjectBindingUniqueness
machine: 32 CPUs, load 28.89, cpu waiting 13.02%, memory waiting 0.00%, io waiting 0.15%
--- 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.7%, load 22.50
test lane equipotest-r: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestR' ./internal/equipotest
receipt: test step 1m18.293s 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 1m12.64s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 16.66s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 13.95s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 10.87s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 10.82s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 7.81s amadan.net/oficina/equipo/internal/equipotest TestRosterBootstrapOnce
machine: 32 CPUs, load 53.78, cpu waiting 31.43%, memory waiting 0.00%, io waiting 0.39%
--- shard 15 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-rest started 30s late; cpu waiting 40.1%, load 22.50
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 1m8.91s 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 1m6.898s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 26.16s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 25.28s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 25.25s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 23.3s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsCurrentOwner
receipt: slow test 23.26s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsUpgrade
machine: 32 CPUs, load 57.50, cpu waiting 35.69%, memory waiting 0.00%, io waiting 0.45%
--- shard 16 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: plan3test started 30s late; cpu waiting 40.1%, load 22.50
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
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/plan3test TestPlan3ReleaseBoundaries
=== RUN TestPlan3ReleaseBoundaries
--- FAIL: TestPlan3ReleaseBoundaries (0.32s)
--- FAIL amadan.net/oficina/equipo/internal/plan3test TestPlan3ReleaseBoundaries/inventory
=== RUN TestPlan3ReleaseBoundaries/inventory
plan3_release_test.go:22: entry has no copy review status or applicable acceptance runner.mac.other_instance
--- FAIL: TestPlan3ReleaseBoundaries/inventory (0.02s)
--- FAIL amadan.net/oficina/equipo/internal/plan3test (package output)
FAIL
rastrillo-budget/v1 ran 53.901s
FAIL amadan.net/oficina/equipo/internal/plan3test 54.278s
receipt: test step 56.23s 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 53.901s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 3.87s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 3.5s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 1.78s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.57s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3A
receipt: slow test 1.43s amadan.net/oficina/equipo/internal/plan3test TestInviteMigration
exit status 1
+ go test -tags testbuild -timeout 15m -v -run '^TestPlan3ReleaseBoundaries$/^inventory$' -count=1 ./internal/plan3test (retry, once)
FAILED TWICE ./internal/plan3test:TestPlan3ReleaseBoundaries/inventory plan3test
=== RUN TestPlan3ReleaseBoundaries
=== RUN TestPlan3ReleaseBoundaries/inventory
plan3_release_test.go:22: entry has no copy review status or applicable acceptance runner.mac.other_instance
--- FAIL: TestPlan3ReleaseBoundaries (0.02s)
--- FAIL: TestPlan3ReleaseBoundaries/inventory (0.02s)
FAIL
rastrillo-budget/v1 ran 17ms
FAIL amadan.net/oficina/equipo/internal/plan3test 0.226s
FAIL
machine: 32 CPUs, load 62.87, cpu waiting 38.27%, memory waiting 0.00%, io waiting 0.55%
make: *** [Makefile:113: ci-shard] Error 1
amadan: step check shard 16 of 29 failed: exit status 2
--- 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.7%, load 22.50
test lane rest: ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/diffscan ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/door ./internal/equipo/github ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/pause ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/push ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/idtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/claude/realcli ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/forgekey ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/diffscan ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/door ./internal/equipo/github ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/pause ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/push ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/idtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/claude/realcli ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/forgekey ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
cache miss: amadan.net/oficina/equipo/internal/chatmarkdown: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/copydesk: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/equipo/team: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/claude/realcli: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/forge: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/opencode: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/webread: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runnerproto: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/workspace: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/checks: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/containment: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/pi: its inputs changed
--- FAIL amadan.net/oficina/equipo/internal/runner/webread TestTimeouts
=== RUN TestTimeouts
fetch_test.go:537: s1: {Source:s1 Origin:paul Parent: URL:https://shop.example.com/slow-body Hops:[{URL:https://shop.example.com/slow-body Address:151.101.1.1 Status:200}] Address:151.101.1.1 Status:200 Type:text/plain Bytes:5 SHA256:2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824 Millis:300 Reason: File:s001.txt}
--- FAIL: TestTimeouts (0.61s)
--- FAIL amadan.net/oficina/equipo/internal/runner/webread (package output)
FAIL
rastrillo-budget/v1 ran 1.177s
FAIL amadan.net/oficina/equipo/internal/runner/webread 1.185s
budget note: internal/equipo took 2m22.886s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/equipo/chat took 29.303s, 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/github took 40.581s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/equipo/setup took 10.401s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/idtest took 1m56.285s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/release took 24.619s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/runner/containment took 49.54s, over the 15s its record on line 40 allows; reported only, timing fails on CI
budget note: internal/runner/provider/claude/realcli took 13.016s, over the 10s the default allows; reported only, timing fails on CI
receipt: test step 2m33.673s against a 60s target (the gate's other steps are not in this figure)
receipt: 21 packages ran, 47 cached, 16 without tests, 1 failed
receipt: slow package 2m22.886s amadan.net/oficina/equipo/internal/equipo
receipt: slow package 1m56.285s amadan.net/oficina/equipo/internal/idtest
receipt: slow package 1m7.569s amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow package 53.687s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 52.72s amadan.net/oficina/equipo/internal/runner/provider/pi
receipt: slow test 57.74s amadan.net/oficina/equipo/internal/idtest TestDoorRemembersOficinaID
receipt: slow test 48.9s amadan.net/oficina/equipo/internal/idtest TestDoorOficinaSettingsUnreadableIsNoLoop
receipt: slow test 48.56s amadan.net/oficina/equipo/internal/idtest TestDoorForgetsOficinaIDForARefusedSession
receipt: slow test 48.56s amadan.net/oficina/equipo/internal/idtest TestDoorStepUpIsLocal
receipt: slow test 48.28s amadan.net/oficina/equipo/internal/idtest TestDoorNeverJudgesANativeSession
rastrillo: budget test: go test failed
exit status 1
+ go test -tags testbuild -timeout 15m -v -run '^TestTimeouts$' -count=1 ./internal/runner/webread (retry, once)
##############################################################################
FLAKE ./internal/runner/webread:TestTimeouts rest 454226206cc80931ca13819985c26fbf0f800005 0.61s 21.52
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 20.28, cpu waiting 9.34%, memory waiting 0.00%, io waiting 0.10%
--- shard 18 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-chat: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$' ./internal/headless
receipt: test step 1m25.08s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m23.286s amadan.net/oficina/equipo/internal/headless
receipt: slow test 38.99s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 14.85s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 10.32s amadan.net/oficina/equipo/internal/headless TestBrowserChat
receipt: slow test 7.24s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 6.57s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
machine: 32 CPUs, load 62.87, cpu waiting 38.25%, memory waiting 0.00%, io waiting 0.57%
--- shard 19 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-work: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$' ./internal/headless
receipt: test step 1m33.395s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m31.341s amadan.net/oficina/equipo/internal/headless
receipt: slow test 28.94s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 21.51s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 13.46s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 9.41s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
receipt: slow test 9.34s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
machine: 32 CPUs, load 62.96, cpu waiting 37.61%, memory waiting 0.00%, io waiting 0.50%
--- shard 20 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-connections: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' ./internal/headless
receipt: test step 1m53.898s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m52.027s amadan.net/oficina/equipo/internal/headless
receipt: slow test 14.08s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 13.33s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 12.47s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 11.33s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsSignInEmail
receipt: slow test 11.32s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
machine: 32 CPUs, load 47.37, cpu waiting 28.63%, memory waiting 0.00%, io waiting 0.35%
--- 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
receipt: test step 1m39.158s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m37.31s amadan.net/oficina/equipo/internal/headless
receipt: slow test 15s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
receipt: slow test 13.52s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 11.24s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 9.39s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 7.38s amadan.net/oficina/equipo/internal/headless TestBrowserRefreshRace
machine: 32 CPUs, load 57.50, cpu waiting 35.69%, memory waiting 0.00%, io waiting 0.45%
--- 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.174s 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.416s amadan.net/oficina/equipo/internal/equipo
receipt: slow test 1.76s amadan.net/oficina/equipo/internal/equipo TestBrowserPreviewPassExchange
receipt: slow test 650ms amadan.net/oficina/equipo/internal/equipo TestBrowserPreviewBlocksNavigation
browser lane browser-rest: ./internal/equipotest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserGitHubManifestCSP)$' ./internal/equipotest
receipt: test step 8.018s 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.368s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 6.37s amadan.net/oficina/equipo/internal/equipotest TestBrowserGitHubManifestCSP
browser lane browser-rest: ./internal/idtest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserOficinaIDDoor|TestBrowserSmartDoor)$' ./internal/idtest
budget note: internal/idtest took 10.816s, over the 10s the default allows; reported only, timing fails on CI
receipt: test step 12.337s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 10.816s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 8.53s amadan.net/oficina/equipo/internal/idtest TestBrowserSmartDoor
receipt: slow test 2.29s 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 3.945s 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.217s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 2.22s amadan.net/oficina/equipo/internal/plan3test TestTeamsHierarchyBrowser
browser lane browser-rest: ./internal/thintest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAccessEmojiByline|TestBrowserAccessFinalOutcomes|TestBrowserAccessRequest|TestBrowserAccessReview|TestBrowserActivitySubjects|TestBrowserAutonomySettings|TestBrowserCoordinatorQueue|TestBrowserEmptyConversation|TestBrowserEndedNoteStaysGone|TestBrowserHousekeeping|TestBrowserInnerGallery|TestBrowserInnerScreens|TestBrowserInstantThinking|TestBrowserInstantThinkingQueued|TestBrowserMachines|TestBrowserPausedWork|TestBrowserPhoneIndex|TestBrowserPlacementQuestionAndPending|TestBrowserProjectPlacement|TestBrowserProjectsList|TestBrowserReportActionFeedback|TestBrowserReportNextSteps|TestBrowserReportThread|TestBrowserRhythm|TestBrowserRollup|TestBrowserRosterAlignment|TestBrowserRosterDecisionStates|TestBrowserRosterQuietDay|TestBrowserRosterReports|TestBrowserRosterSetAside|TestBrowserRosterSubchat|TestBrowserRosterThinking|TestBrowserRosterVisual|TestBrowserSettingsHousekeepingGroups|TestBrowserSettingsMenu|TestBrowserSettingsRail|TestBrowserSettingsSaveBar|TestBrowserSettingsShots|TestBrowserSettingsStayOnPage|TestBrowserSettingsTeams|TestBrowserShipsButtons|TestBrowserSpecialistRows|TestBrowserSpendFollowsAnswers|TestBrowserTaskRows|TestBrowserTeamPanel|TestBrowserThinkingCycles|TestBrowserThinkingLinesClear|TestBrowserThinkingSteady|TestBrowserThinkingWords|TestBrowserTokenRowEmail|TestBrowserTrackPulse|TestBrowserTrackStarCentre|TestBrowserTryAgain)$' ./internal/thintest
receipt: test step 3m35.583s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 3m32.68s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 25.91s amadan.net/oficina/equipo/internal/thintest TestBrowserAccessRequest
receipt: slow test 14.4s amadan.net/oficina/equipo/internal/thintest TestBrowserSettingsTeams
receipt: slow test 12.09s amadan.net/oficina/equipo/internal/thintest TestBrowserThinkingCycles
receipt: slow test 10.62s amadan.net/oficina/equipo/internal/thintest TestBrowserPlacementQuestionAndPending
receipt: slow test 9.24s amadan.net/oficina/equipo/internal/thintest TestBrowserRhythm
machine: 32 CPUs, load 7.70, cpu waiting 3.32%, memory waiting 0.00%, io waiting 0.06%
--- shard 23 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
shard 23: make test-quarantine
python3 scripts/ci-test.py quarantine
quarantine: 12 tests from scripts/ci-quarantine.txt; a failure is retried once, and a pass on the retry is reported as a flake
+ go test -tags testbuild -timeout 15m -v -run '^TestHeadlessConnections$/^A5_cancel_and_sign_out$|^TestHeadlessConnections$/^C4_claude_sign_in$|^TestHeadlessConnections$/^C5_engineering_failover$|^TestHeadlessConnections$/^C5_engineering_to_codex$|^TestHeadlessConnections$/^C5_engineering_waits$' ./internal/headless (52s)
ok ./internal/headless TestHeadlessConnections/A5_cancel_and_sign_out 4.67s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.22s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 8.50s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 8.62s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 26.71s
+ go test -tags testbuild -timeout 15m -v -run '^TestHeadlessConnections$/^C5_review_auth$|^TestHeadlessConnections$/^C5_review_failover$|^TestHeadlessConnections$/^C5_review_on_codex$|^TestHeadlessConnections$/^C5_review_other_family_first$' ./internal/headless (70s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 14.29s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 21.18s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 19.07s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 13.32s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless (21s)
ok ./internal/headless TestMixedVersions 18.52s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks (2s)
ok ./internal/runner/checks TestCheckSandboxDeniedPathsTampering 0.78s
+ go test -tags testbuild -timeout 15m -v -run '^TestRunnerCancelAndSupersede$' ./internal/runner/thin (2s)
ok ./internal/runner/thin TestRunnerCancelAndSupersede 0.05s
quarantine: 0 flaked (passed on the retry), 0 failed
machine: 32 CPUs, load 59.30, cpu waiting 38.04%, memory waiting 0.00%, io waiting 0.74%
--- shard 24 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
shard 24: make runner-host
python3 scripts/runner-prerequisites.py
CGO_ENABLED=0 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks
receipt: test step 12.845s 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.384s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 267ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 89ms amadan.net/oficina/equipo/internal/runner/provider/codex
receipt: slow package 1ms amadan.net/oficina/equipo/internal/runner/provider
receipt: slow package 0s amadan.net/oficina/equipo/internal/runner/provider/claude/realcli
receipt: slow test 5.17s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.75s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 350ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 260ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 100ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxToolchain
CGO_ENABLED=0 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run '^TestNamespace' -count=1 ./internal/runner/containment
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run '^TestNamespace' -count=1 ./internal/runner/containment
receipt: test step 3.492s 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.094s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 300ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 220ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof
receipt: slow test 140ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryCleansScratch
receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryReusedPID
machine: 32 CPUs, load 14.85, cpu waiting 8.92%, memory waiting 0.00%, io waiting 1.84%
--- 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.1%, load 22.50
shard 25: make runner-dead-references lanes-check build vet fmt-check spacing budget migration-check
python3 scripts/runner-dead-references.py
reference scan: 2998 text files, 3269 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
internal/equipo: 23931 source lines, over the 23925 its exemption (line 17) allows
internal/runner: 9283 test lines, over the 9212 its exemption (line 24) allows
internal/runner: 9969 source lines, over the 9936 its exemption (line 24) allows
rastrillo: budget size: 3 problem(s)
exit status 1
make[1]: *** [Makefile:75: budget] Error 1
machine: 32 CPUs, load 56.28, cpu waiting 37.58%, memory waiting 0.00%, io waiting 0.82%
make: *** [Makefile:113: ci-shard] Error 2
amadan: step check shard 25 of 29 failed: exit status 2
--- shard 26 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: staticcheck started 30s late; cpu waiting 40.1%, load 22.50
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 42.67, cpu waiting 28.87%, memory waiting 0.00%, io waiting 1.12%
--- 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.1%, load 22.50
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 51.67, cpu waiting 34.09%, memory waiting 0.00%, io waiting 0.97%
--- shard 28 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: gitleaks started 30s late; cpu waiting 40.1%, load 22.50
shard 28: make gitleaks
[90m3:45PM[0m [32mINF[0m [1mUnknown SCM platform. Use --platform to include links in findings.[0m [36mhost=[0mamadan.net
[90m3:45PM[0m [32mINF[0m [1m1263 commits scanned.[0m
[90m3:45PM[0m [32mINF[0m [1mscanned ~68813385 bytes (68.81 MB) in 25.2s[0m
[90m3:45PM[0m [32mINF[0m [1mno leaks found[0m
machine: 32 CPUs, load 54.42, cpu waiting 34.09%, memory waiting 0.00%, io waiting 0.97%
amadan: job failed at step check shards 16, 25 of 29 — its output is above, not at the tail of this log
diff --git a/cmd/equipo-runner/enrol_report.go b/cmd/equipo-runner/enrol_report.go| index bfbcac9b..f678d3f9 100644 |
| --- a/cmd/equipo-runner/enrol_report.go |
| +++ b/cmd/equipo-runner/enrol_report.go |
| @@ -9,6 +9,7 @@ import ( |
| "amadan.net/oficina/equipo/internal/equipo" |
| "amadan.net/oficina/equipo/internal/runner" |
| + "amadan.net/oficina/equipo/internal/runner/provider" |
| ) |
| // enrolReport tells the person how enrolment is going and keeps the same |
| @@ -66,6 +67,10 @@ func (r enrolReport) failed(err error) { |
| r.say("runner.enrol.expired") |
| case errors.Is(err, runner.ErrEnrolmentRefused): |
| r.say("runner.enrol.refused") |
| + case errors.Is(err, provider.ErrIdentity): |
| + // A saved enrolment this command does not match, in words, not |
| + // as its code (provider_identity_mismatch, 2026-11-28). |
| + r.say("runner.enrol.identity") |
| default: |
| detail := runner.EnrolDetail(err) |
| if detail == "" { |
| @@ -75,3 +80,18 @@ func (r enrolReport) failed(err error) { |
| r.say("runner.install.unavailable") |
| } |
| } |
| + |
| +// enrolledElsewhere is the line (otherKey with the other Equipo's |
| +// address, or runner.enrol.identity when the state does not say which) |
| +// for a runner state enrolled with another Equipo than origin and |
| +// instance; "" when it is not, or cannot be read (Enrol then says why). |
| +func enrolledElsewhere(state, origin, instance, otherKey string) (string, []any) { |
| + other, elsewhere, err := runner.EnrolledElsewhere(state, origin, instance) |
| + switch { |
| + case err != nil || !elsewhere: |
| + return "", nil |
| + case other == "": |
| + return "runner.enrol.identity", nil |
| + } |
| + return otherKey, []any{other} |
| +} |
diff --git a/cmd/equipo-runner/install.go b/cmd/equipo-runner/install.go| index 02540126..d95cac5f 100644 |
| --- a/cmd/equipo-runner/install.go |
| +++ b/cmd/equipo-runner/install.go |
| @@ -21,11 +21,40 @@ import ( |
| "amadan.net/rastrillo/rastrillo" |
| ) |
| +// linuxInstallHost is what installing on Linux touches; tests stand in. |
| +type linuxInstallHost struct { |
| + home func() (string, error) |
| + chdir func(string) error |
| + installable func() bool |
| + install func(context.Context, runnersetup.InstallOptions) (runnersetup.InstallResult, error) |
| + config func(root, origin, instance, version string, getenv func(string) string) (runner.Config, error) |
| + verify func(runner.Config) error |
| + enrol func(context.Context, runner.Config, io.Writer) error |
| + checkEnv func(root, origin, state string) error |
| +} |
| + |
| func installRunner(ctx context.Context, args []string, input io.Reader, out, errout io.Writer, getenv func(string) string) int { |
| + return installLinux(ctx, args, input, out, errout, getenv, linuxInstallHost{ |
| + home: os.UserHomeDir, chdir: os.Chdir, |
| + installable: func() bool { return release.BuildManifest().Installable() }, |
| + install: runnersetup.InstallUser, config: installConfig, |
| + verify: func(cfg runner.Config) error { return verifyInstalled(release.BuildManifest(), cfg) }, |
| + enrol: runner.Enrol, |
| + checkEnv: runnersetup.CheckServiceEnvironment, |
| + }) |
| +} |
| + |
| +// installLinux installs a runner under --root (default |
| +// ~/.local/share/equipo-runner), from the user's home. A root whose |
| +// runner is enrolled with another Equipo is refused before anything is |
| +// installed. The unit and the environment file a runner installed before |
| +// uses are kept aside until the enrolment is done, and put back if the |
| +// install stops before then; the running service is never stopped. |
| +func installLinux(ctx context.Context, args []string, input io.Reader, out, errout io.Writer, getenv func(string) string, h linuxInstallHost) int { |
| fail := func(key string) int { fmt.Fprintln(errout, equipo.RunnerSetupCopy(key)); return 1 } |
| flags := flag.NewFlagSet("install", flag.ContinueOnError) |
| flags.SetOutput(io.Discard) |
| - home, e := os.UserHomeDir() |
| + home, e := h.home() |
| if e != nil { |
| return fail("runner.install.destination") |
| } |
| @@ -33,55 +62,88 @@ func installRunner(ctx context.Context, args []string, input io.Reader, out, err |
| version := flags.String("release", "", "") |
| origin := flags.String("origin", "", "") |
| root := flags.String("root", filepath.Join(home, ".local/share/equipo-runner"), "") |
| - if flags.Parse(args) != nil || flags.NArg() != 0 || *instance == "" || *version != rastrillo.BuildVersion || !release.BuildManifest().Installable() { |
| + if flags.Parse(args) != nil || flags.NArg() != 0 || *instance == "" || *version != rastrillo.BuildVersion || !h.installable() { |
| return fail("runner.install.release") |
| } |
| - result, e := runnersetup.InstallUser(ctx, runnersetup.InstallOptions{Release: *version, Root: *root, InstanceOrigin: *origin}) |
| + // Everything runs from the user's home, never the folder the |
| + // installer was started from (which this user may not read). |
| + if h.chdir(home) != nil { |
| + return fail("runner.install.destination") |
| + } |
| + if key, a := enrolledElsewhere(filepath.Join(*root, "state"), *origin, *instance, "runner.install.other_instance"); key != "" { |
| + fmt.Fprintf(errout, equipo.RunnerSetupCopy(key)+"\n", a...) |
| + return 1 |
| + } |
| + // A root installed before: its unit and environment file are kept |
| + // aside until the enrolment is done. A new root has neither. |
| + var backup *installBackup |
| + if info, e := os.Lstat(*root); e == nil && info.IsDir() { |
| + if backup, e = newInstallBackup(*root); e != nil { |
| + return fail("runner.install.destination") |
| + } |
| + if e = backup.keep(filepath.Join(*root, "runner.env"), filepath.Join(*root, "equipo-runner.service")); e != nil { |
| + backup.restore() |
| + return fail("runner.install.destination") |
| + } |
| + } |
| + putBack := func() int { |
| + if backup != nil { |
| + backup.restore() |
| + } |
| + return 1 |
| + } |
| + abort := func(key string) int { fail(key); return putBack() } |
| + result, e := h.install(ctx, runnersetup.InstallOptions{Release: *version, Root: *root, InstanceOrigin: *origin}) |
| if e != nil { |
| for _, key := range result.Missing { |
| fmt.Fprintln(errout, equipo.RunnerSetupCopy(key)) |
| } |
| - return 1 |
| + return putBack() |
| } |
| reader := bufio.NewReader(input) |
| label, e := promptMachineLabel(reader, out, *root, *origin, *instance) |
| if e != nil { |
| - return fail("runner.install.unavailable") |
| + return abort("runner.install.unavailable") |
| } |
| fmt.Fprint(out, equipo.RunnerSetupCopy("runner.install.enrol")) |
| confirm, e := reader.ReadString('\n') |
| if e != nil || strings.TrimSpace(confirm) != "yes" { |
| - return fail("runner.install.unavailable") |
| + return abort("runner.install.unavailable") |
| } |
| // Runtime configuration stays explicit. The installer never guesses credential |
| // paths or creates a provider home. Task 17 supplies the local account setup. |
| - cfg, e := installConfig(*root, *origin, *instance, *version, getenv) |
| + cfg, e := h.config(*root, *origin, *instance, *version, getenv) |
| if e != nil { |
| - return fail("runner.install.config") |
| + return abort("runner.install.config") |
| } |
| if cfg.Origin != *origin || cfg.StateDir != filepath.Join(*root, "state") { |
| - return fail("runner.install.config") |
| + return abort("runner.install.config") |
| } |
| // The service starts the installed runner, not this one, and that |
| // runner looks for the scanner beside itself. |
| installed := cfg |
| installed.Executable = result.BinaryPath |
| - if result.BinaryPath == "" || verifyInstalled(release.BuildManifest(), installed) != nil { |
| - return fail("runner.install.release") |
| + if result.BinaryPath == "" || h.verify(installed) != nil { |
| + return abort("runner.install.release") |
| } |
| cfg.MachineLabel = label |
| report := enrolReport{errout: errout, log: filepath.Join(*root, "install.log")} |
| cfg.EnrolNotify = report.notify |
| - if e = runner.Enrol(ctx, cfg, out); e != nil { |
| + if e = h.enrol(ctx, cfg, out); e != nil { |
| report.failed(e) |
| - return 1 |
| + return putBack() |
| + } |
| + // Enrolled: the state now holds the credential this configuration |
| + // goes with, so the earlier one is not put back any more. |
| + if backup != nil { |
| + backup.drop() |
| } |
| // Use the already configured environment file. Never copy the invoking |
| // process's environment (which may contain credentials) into service metadata. |
| - if e = runnersetup.CheckServiceEnvironment(*root, cfg.Origin, cfg.StateDir); e != nil { |
| + if e = h.checkEnv(*root, cfg.Origin, cfg.StateDir); e != nil { |
| return fail("runner.install.config") |
| } |
| - result, e = runnersetup.InstallUser(ctx, runnersetup.InstallOptions{Release: *version, Root: *root, InstanceOrigin: *origin, EnableService: true}) |
| + result, e = h.install(ctx, runnersetup.InstallOptions{Release: *version, Root: *root, InstanceOrigin: *origin, EnableService: true}) |
| if e != nil { |
| for _, key := range result.Missing { |
| fmt.Fprintln(errout, equipo.RunnerSetupCopy(key)) |
diff --git a/cmd/equipo-runner/install_backup.go b/cmd/equipo-runner/install_backup.go| new file mode 100644 |
| index 00000000..8ef82439 |
| --- /dev/null |
| +++ b/cmd/equipo-runner/install_backup.go |
| @@ -0,0 +1,86 @@ |
| +package main |
| + |
| +import ( |
| + "os" |
| + "path/filepath" |
| + "strconv" |
| +) |
| + |
| +// installBackup keeps what an install replaces until the install is done: |
| +// each path is moved aside, into one private directory on the same disk, |
| +// before anything new is written there. A failed install puts every path |
| +// back as it was (what did not exist is removed again); one that worked |
| +// drops what was kept. |
| +type installBackup struct { |
| + dir string |
| + moved []movedAside |
| +} |
| + |
| +type movedAside struct { |
| + path, aside string |
| + existed bool |
| +} |
| + |
| +func newInstallBackup(within string) (*installBackup, error) { |
| + dir, err := os.MkdirTemp(within, ".install-previous-") |
| + if err != nil { |
| + return nil, err |
| + } |
| + return &installBackup{dir: dir}, nil |
| +} |
| + |
| +// keep moves path aside; a path that does not exist yet is noted, so a |
| +// failed install removes what it wrote there. |
| +func (b *installBackup) keep(paths ...string) error { |
| + for _, path := range paths { |
| + aside := filepath.Join(b.dir, strconv.Itoa(len(b.moved))) |
| + err := os.Rename(path, aside) |
| + if os.IsNotExist(err) { |
| + b.moved = append(b.moved, movedAside{path: path}) |
| + continue |
| + } |
| + if err != nil { |
| + return err |
| + } |
| + b.moved = append(b.moved, movedAside{path: path, aside: aside, existed: true}) |
| + } |
| + return nil |
| +} |
| + |
| +// kept reports whether anything existed before (a runner to put back). |
| +func (b *installBackup) kept() bool { |
| + for _, m := range b.moved { |
| + if m.existed { |
| + return true |
| + } |
| + } |
| + return false |
| +} |
| + |
| +// restore puts every path back, last kept first, and reports whether all |
| +// of them went back. What could not go back stays in the backup |
| +// directory, which is then kept. |
| +func (b *installBackup) restore() bool { |
| + ok := true |
| + for i := len(b.moved) - 1; i >= 0; i-- { |
| + m := b.moved[i] |
| + if err := os.RemoveAll(m.path); err != nil { |
| + ok = false |
| + continue |
| + } |
| + if m.existed && os.Rename(m.aside, m.path) != nil { |
| + ok = false |
| + } |
| + } |
| + if ok { |
| + ok = os.Remove(b.dir) == nil |
| + } |
| + b.moved = nil |
| + return ok |
| +} |
| + |
| +// drop removes what was kept: the install worked. |
| +func (b *installBackup) drop() { |
| + _ = os.RemoveAll(b.dir) |
| + b.moved = nil |
| +} |
diff --git a/cmd/equipo-runner/install_config.go b/cmd/equipo-runner/install_config.go| index 16ce1295..a9196fb5 100644 |
| --- a/cmd/equipo-runner/install_config.go |
| +++ b/cmd/equipo-runner/install_config.go |
| @@ -27,7 +27,10 @@ func installConfig(root, origin, instance, version string, getenv func(string) s |
| } |
| values["EQUIPO_GO_ROOT"] = getenv("EQUIPO_GO_ROOT") |
| if values["EQUIPO_GO_ROOT"] == "" { |
| - b, e := exec.Command(values["EQUIPO_GO_BINARY"], "env", "GOROOT").Output() |
| + cmd := exec.Command(values["EQUIPO_GO_BINARY"], "env", "GOROOT") |
| + // Its own working directory: go reads the one it is started in. |
| + cmd.Dir = root |
| + b, e := cmd.Output() |
| if e != nil { |
| return runner.Config{}, e |
| } |
diff --git a/cmd/equipo-runner/install_linux_safe_test.go b/cmd/equipo-runner/install_linux_safe_test.go| new file mode 100644 |
| index 00000000..ad3b45fd |
| --- /dev/null |
| +++ b/cmd/equipo-runner/install_linux_safe_test.go |
| @@ -0,0 +1,162 @@ |
| +package main |
| + |
| +import ( |
| + "bytes" |
| + "context" |
| + "fmt" |
| + "io" |
| + "os" |
| + "path/filepath" |
| + "strconv" |
| + "strings" |
| + "testing" |
| + |
| + "amadan.net/oficina/equipo/internal/equipo" |
| + "amadan.net/oficina/equipo/internal/runner" |
| + runnersetup "amadan.net/oficina/equipo/internal/runner/setup" |
| + "amadan.net/rastrillo/rastrillo" |
| +) |
| + |
| +type linuxRig struct { |
| + h linuxInstallHost |
| + home, root string |
| + installs int |
| + enrolled bool |
| + cwd string |
| +} |
| + |
| +func newLinuxRig(t *testing.T) *linuxRig { |
| + t.Helper() |
| + old := rastrillo.BuildVersion |
| + rastrillo.BuildVersion = "abc1234" |
| + t.Cleanup(func() { rastrillo.BuildVersion = old }) |
| + x := &linuxRig{home: t.TempDir()} |
| + x.root = filepath.Join(x.home, ".local/share/equipo-runner") |
| + x.h = linuxInstallHost{ |
| + home: func() (string, error) { return x.home, nil }, |
| + chdir: func(dir string) error { x.cwd = dir; return nil }, |
| + installable: func() bool { return true }, |
| + install: func(_ context.Context, o runnersetup.InstallOptions) (runnersetup.InstallResult, error) { |
| + if x.cwd != x.home { |
| + t.Errorf("installed from %q", x.cwd) |
| + } |
| + x.installs++ |
| + if err := os.MkdirAll(o.Root, 0700); err != nil { |
| + return runnersetup.InstallResult{}, err |
| + } |
| + if err := os.WriteFile(filepath.Join(o.Root, "equipo-runner.service"), []byte("unit for "+o.InstanceOrigin), 0600); err != nil { |
| + return runnersetup.InstallResult{}, err |
| + } |
| + return runnersetup.InstallResult{BinaryPath: filepath.Join(o.Root, "releases/abc1234/equipo-runner"), State: "installed"}, nil |
| + }, |
| + config: func(root, origin, instance, _ string, _ func(string) string) (runner.Config, error) { |
| + if err := os.WriteFile(filepath.Join(root, "runner.env"), []byte("EQUIPO_ORIGIN="+strconv.Quote(origin)+"\n"), 0600); err != nil { |
| + return runner.Config{}, err |
| + } |
| + return runner.Config{Origin: origin, InstanceID: instance, StateDir: filepath.Join(root, "state")}, nil |
| + }, |
| + verify: func(runner.Config) error { return nil }, |
| + enrol: func(context.Context, runner.Config, io.Writer) error { x.enrolled = true; return nil }, |
| + checkEnv: func(string, string, string) error { return nil }, |
| + } |
| + return x |
| +} |
| + |
| +func (x *linuxRig) install(origin, answer string) (int, string) { |
| + var out, errout bytes.Buffer |
| + code := installLinux(context.Background(), []string{"--release", "abc1234", "--origin", origin, "--instance", "team1"}, strings.NewReader("\n"+answer+"\n"), &out, &errout, func(string) string { return "" }, x.h) |
| + return code, errout.String() |
| +} |
| + |
| +// before is a runner installed for origin: its unit and environment file. |
| +func (x *linuxRig) before(t *testing.T, origin string) map[string]string { |
| + t.Helper() |
| + files := map[string]string{"runner.env": "EQUIPO_ORIGIN=" + strconv.Quote(origin) + "\n", "equipo-runner.service": "unit for " + origin} |
| + for name, body := range files { |
| + if err := os.MkdirAll(x.root, 0700); err != nil { |
| + t.Fatal(err) |
| + } |
| + if err := os.WriteFile(filepath.Join(x.root, name), []byte(body), 0600); err != nil { |
| + t.Fatal(err) |
| + } |
| + } |
| + return files |
| +} |
| + |
| +func (x *linuxRig) files(t *testing.T) map[string]string { |
| + t.Helper() |
| + got := map[string]string{} |
| + entries, err := os.ReadDir(x.root) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + for _, e := range entries { |
| + // The install log is the installer's own record. |
| + if e.IsDir() || e.Name() == "install.log" { |
| + continue |
| + } |
| + raw, _ := os.ReadFile(filepath.Join(x.root, e.Name())) |
| + got[e.Name()] = string(raw) |
| + } |
| + return got |
| +} |
| + |
| +// The Linux installer asks first too: a runner enrolled with another |
| +// Equipo is told so and nothing is installed, written or enrolled. |
| +func TestInstallLinuxRefusesAnotherEquipo(t *testing.T) { |
| + x := newLinuxRig(t) |
| + before := x.before(t, stagingOrigin) |
| + liveEnrolment(t, filepath.Join(x.root, "state"), stagingOrigin, "team1") |
| + code, errout := x.install("https://equipo.example", "yes") |
| + if code != 1 || !strings.Contains(errout, fmt.Sprintf(equipo.RunnerSetupCopy("runner.install.other_instance"), stagingOrigin)) { |
| + t.Fatalf("%d %q", code, errout) |
| + } |
| + if x.installs != 0 || x.enrolled || !mapsEqual(before, x.files(t)) { |
| + t.Fatalf("changed something: %d %v %v", x.installs, x.enrolled, x.files(t)) |
| + } |
| +} |
| + |
| +// What the installer rewrote before enrolling (the unit and the |
| +// environment file) is put back when it stops before the enrolment is |
| +// done; an install that enrols keeps the new ones and nothing aside. |
| +func TestInstallLinuxPutsBackItsConfig(t *testing.T) { |
| + for name, c := range map[string]struct { |
| + set func(*linuxRig) |
| + answer string |
| + }{ |
| + "link expired": {set: func(x *linuxRig) { |
| + x.h.enrol = func(context.Context, runner.Config, io.Writer) error { return runner.ErrEnrolmentExpired } |
| + }, answer: "yes"}, |
| + "not confirmed": {set: func(*linuxRig) {}, answer: "no"}, |
| + "not the release": {set: func(x *linuxRig) { x.h.verify = func(runner.Config) error { return errScanner } }, answer: "yes"}, |
| + } { |
| + t.Run(name, func(t *testing.T) { |
| + x := newLinuxRig(t) |
| + before := x.before(t, "https://equipo.example") |
| + c.set(x) |
| + if code, errout := x.install("https://equipo-next.example", c.answer); code != 1 { |
| + t.Fatalf("%d %q", code, errout) |
| + } |
| + if got := x.files(t); !mapsEqual(before, got) { |
| + t.Fatalf("not put back: %v", got) |
| + } |
| + if got := len(x.files(t)); got != 2 { |
| + t.Fatalf("left behind %v", x.files(t)) |
| + } |
| + if entries, _ := os.ReadDir(x.root); len(entries) > 3 { |
| + t.Fatalf("left behind %v", entries) |
| + } |
| + }) |
| + } |
| + x := newLinuxRig(t) |
| + x.before(t, "https://equipo.example") |
| + if code, errout := x.install("https://equipo-next.example", "yes"); code != 0 || !x.enrolled { |
| + t.Fatalf("%d %q", code, errout) |
| + } |
| + if got := x.files(t); got["runner.env"] != "EQUIPO_ORIGIN=\"https://equipo-next.example\"\n" || got["equipo-runner.service"] != "unit for https://equipo-next.example" { |
| + t.Fatalf("new config %v", got) |
| + } |
| + if entries, _ := os.ReadDir(x.root); len(entries) != 2 { |
| + t.Fatalf("left behind %v", entries) |
| + } |
| +} |
diff --git a/cmd/equipo-runner/install_mac.go b/cmd/equipo-runner/install_mac.go| index 533c3079..291ce1cc 100644 |
| --- a/cmd/equipo-runner/install_mac.go |
| +++ b/cmd/equipo-runner/install_mac.go |
| @@ -47,6 +47,9 @@ type macInstallHost struct { |
| // stopWait bounds the wait for a runner to stop (a minute). |
| stopWait time.Duration |
| firstLaunch func(ctx context.Context, home string) |
| + // chdir moves the installer into the user's home before it runs |
| + // anything there (os.Chdir). |
| + chdir func(dir string) error |
| } |
| // userEnv is environ for a program run as the user whose home is home and |
| @@ -67,39 +70,67 @@ func userEnv(environ []string, home, name string, extra ...string) []string { |
| return append(append(env, "HOME="+home, "USER="+name, "LOGNAME="+name), extra...) |
| } |
| +// Every program the installer runs is given its own working directory: |
| +// started from a folder this user cannot read (su without a dash), npm |
| +// and xcodebuild fail on the inherited one (2026-11-28). |
| + |
| +// systemCommand runs a system tool (id, dscl, scutil, launchctl) from /. |
| +func systemCommand(ctx context.Context, name string, args ...string) *exec.Cmd { |
| + cmd := exec.CommandContext(ctx, name, args...) |
| + cmd.Dir = "/" |
| + return cmd |
| +} |
| + |
| +// npmCICommand installs the pinned srt into prefix, run there, as the |
| +// user whose home is home. |
| +func npmCICommand(ctx context.Context, npm, prefix, home string) *exec.Cmd { |
| + cmd := exec.CommandContext(ctx, npm, "ci", "--prefix", prefix, "--ignore-scripts", "--omit=dev", "--no-audit", "--no-fund") |
| + cmd.Dir = prefix |
| + cmd.Env = userEnv(os.Environ(), home, filepath.Base(home), "PATH="+filepath.Dir(npm)+":/usr/bin:/bin") |
| + return cmd |
| +} |
| + |
| +// firstLaunchCommand is xcodebuild -runFirstLaunch, run in home as the |
| +// user whose home it is. |
| +func firstLaunchCommand(ctx context.Context, home string) *exec.Cmd { |
| + cmd := exec.CommandContext(ctx, "/usr/bin/xcodebuild", "-runFirstLaunch") |
| + cmd.Dir = home |
| + cmd.Env = userEnv(os.Environ(), home, filepath.Base(home)) |
| + return cmd |
| +} |
| + |
| func realMacInstallHost() macInstallHost { |
| self, _ := os.Executable() |
| - run := func(ctx context.Context, name string, args ...string) error { |
| - return exec.CommandContext(ctx, name, args...).Run() |
| - } |
| return macInstallHost{goos: goos(), goarch: goarch(), users: "/Users", self: self, scannerPin: release.GitleaksSHA256(), exec: func(ctx context.Context, name string, args ...string) (string, error) { |
| - out, err := exec.CommandContext(ctx, name, args...).Output() |
| + out, err := systemCommand(ctx, name, args...).Output() |
| return string(out), err |
| }, exposed: mac.Exposed, tools: mac.SRTTools, fetch: fetchTool, |
| verify: func(lib string) error { return mac.VerifyTools(lib, mac.PinnedTools(lib)) }, |
| npmCI: func(ctx context.Context, npm, prefix, home string) error { |
| - cmd := exec.CommandContext(ctx, npm, "ci", "--prefix", prefix, "--ignore-scripts", "--omit=dev", "--no-audit", "--no-fund") |
| - cmd.Env = userEnv(os.Environ(), home, filepath.Base(home), "PATH="+filepath.Dir(npm)+":/usr/bin:/bin") |
| - return cmd.Run() |
| + return npmCICommand(ctx, npm, prefix, home).Run() |
| + }, |
| + enrol: runner.Enrol, |
| + launchctl: func(ctx context.Context, args ...string) error { |
| + return systemCommand(ctx, "/bin/launchctl", args...).Run() |
| }, |
| - enrol: runner.Enrol, |
| - launchctl: func(ctx context.Context, args ...string) error { return run(ctx, "/bin/launchctl", args...) }, |
| firstLaunch: func(ctx context.Context, home string) { |
| c, cancel := context.WithTimeout(ctx, 10*time.Minute) |
| defer cancel() |
| - cmd := exec.CommandContext(c, "/usr/bin/xcodebuild", "-runFirstLaunch") |
| - cmd.Env = userEnv(os.Environ(), home, filepath.Base(home)) |
| - _ = cmd.Run() |
| + _ = firstLaunchCommand(c, home).Run() |
| }, |
| + chdir: os.Chdir, |
| } |
| } |
| // installMac installs a Mac worker for the user running it (Mac runners |
| // spec §3.2): refuses root, administrators, users without equipo in their name |
| -// and a readable foreign home; copies the verified runner into |
| +// and a readable foreign home; refuses, changing nothing, a user whose |
| +// runner is enrolled with another Equipo; copies the verified runner into |
| // ~/.local/lib/equipo-runner; installs the pinned srt; writes the |
| // environment file; enrols (the link Paul taps); then loads the launchd |
| -// agent, whose runner probes the Mac by itself. |
| +// agent, whose runner probes the Mac by itself. What a runner installed |
| +// before ran on is kept aside until the enrolment is done, and put back |
| +// and started again if anything stops the install before then. |
| func installMac(ctx context.Context, args []string, h macInstallHost, out, errout io.Writer) int { |
| say := func(key string, a ...any) { fmt.Fprintf(errout, equipo.RunnerSetupCopy(key)+"\n", a...) } |
| fail := func(key string, a ...any) int { say(key, a...); return 1 } |
| @@ -127,6 +158,11 @@ func installMac(ctx context.Context, args []string, h macInstallHost, out, errou |
| if err != nil || filepath.Base(home) != account.Name { |
| return fail("runner.install.destination") |
| } |
| + // The installer and everything it runs work from this home, never |
| + // the folder it was started from (which this user may not read). |
| + if h.chdir(home) != nil { |
| + return fail("runner.install.destination") |
| + } |
| others, err := mac.OtherHomes(h.users, home) |
| if err != nil { |
| return fail("runner.mac.homes_unknown") |
| @@ -146,39 +182,82 @@ func installMac(ctx context.Context, args []string, h macInstallHost, out, errou |
| conf := filepath.Join(home, ".config", "equipo-runner") |
| logs := filepath.Join(home, "Library", "Logs", "equipo-runner") |
| agents := filepath.Join(home, "Library", "LaunchAgents") |
| + // Paths are this user's, whichever Equipo it works for: a runner |
| + // enrolled with another one is said so before anything is stopped or |
| + // rewritten (the Studio's staging runner, 2026-11-28, was left down). |
| + if key, a := enrolledElsewhere(filepath.Join(share, "state"), *origin, *instance, "runner.mac.other_instance"); key != "" { |
| + return fail(key, a...) |
| + } |
| // A runner installed before is stopped first: nothing it uses is |
| // replaced under it, and its state lock is free for the enrolment |
| // check below (an existing, valid enrolment is kept as it is). If it |
| // does not stop, nothing at all is changed. |
| - if !stopRunner(ctx, h, domain+"/"+mac.AgentLabel, filepath.Join(share, "state")) { |
| + plist := filepath.Join(agents, mac.AgentLabel+".plist") |
| + stopped, tookDown := stopRunner(ctx, h, domain+"/"+mac.AgentLabel, filepath.Join(share, "state")) |
| + if !stopped { |
| + if tookDown { |
| + // Taken out of launchd but still holding its lock: launchd |
| + // gets it back as it was. |
| + _ = h.launchctl(context.WithoutCancel(ctx), "bootstrap", domain, plist) |
| + } |
| return fail("runner.mac.still_running") |
| } |
| + binary := filepath.Join(lib, "equipo-runner") |
| + scannerPath := filepath.Join(lib, "gitleaks") |
| + envFile := filepath.Join(conf, "runner.env") |
| + // From here until the enrolment is done, a failure puts back what the |
| + // runner installed before ran on and starts it again if it was |
| + // running. Its launchd agent is not touched before then. The context |
| + // may be the one the person ended (Ctrl-C while waiting for the |
| + // link): putting back still happens. |
| + var backup *installBackup |
| + abort := func(key string, a ...any) int { |
| + if key != "" { |
| + say(key, a...) |
| + } |
| + kept := backup != nil && backup.kept() |
| + restored := backup == nil || backup.restore() |
| + if restored && tookDown { |
| + restored = h.launchctl(context.WithoutCancel(ctx), "bootstrap", domain, plist) == nil |
| + } |
| + switch { |
| + case !restored: |
| + say("runner.mac.not_restored") |
| + case tookDown || kept: |
| + say("runner.mac.restored") |
| + } |
| + return 1 |
| + } |
| for _, d := range []string{lib, filepath.Join(share, "state"), filepath.Join(share, "work"), filepath.Join(share, "scratch"), conf, logs} { |
| if err := os.MkdirAll(d, 0700); err != nil { |
| - return fail("runner.install.destination") |
| + return abort("runner.install.destination") |
| } |
| } |
| if err := os.MkdirAll(agents, 0755); err != nil { |
| - return fail("runner.install.destination") |
| + return abort("runner.install.destination") |
| + } |
| + backup, err = newInstallBackup(share) |
| + if err != nil { |
| + return abort("runner.install.destination") |
| + } |
| + if err := backup.keep(binary, scannerPath, filepath.Join(lib, "srt"), envFile); err != nil { |
| + return abort("runner.install.destination") |
| } |
| - binary := filepath.Join(lib, "equipo-runner") |
| if err := copyPrivate(h.self, binary, 0700); err != nil { |
| - return fail("runner.install.destination") |
| + return abort("runner.install.destination") |
| } |
| scanner, err := h.fetch(ctx, *origin+"/releases/"+*version+"/darwin-arm64/gitleaks", 128<<20) |
| if err != nil { |
| - return fail("runner.install.release") |
| + return abort("runner.install.release") |
| } |
| if h.scannerPin == "" || fmt.Sprintf("%x", sha256.Sum256(scanner)) != h.scannerPin { |
| - return fail("runner.install.checksum") |
| + return abort("runner.install.checksum") |
| } |
| - scannerPath := filepath.Join(lib, "gitleaks") |
| if err := os.WriteFile(scannerPath, scanner, 0700); err != nil { |
| - return fail("runner.install.destination") |
| + return abort("runner.install.destination") |
| } |
| if !release.VerifyGitleaks(scannerPath, h.scannerPin) { |
| - _ = os.Remove(scannerPath) |
| - return fail("runner.install.checksum") |
| + return abort("runner.install.checksum") |
| } |
| values := map[string]string{"EQUIPO_ORIGIN": *origin, "EQUIPO_INSTANCE_ID": *instance, "EQUIPO_RUNNER_STATE_DIR": filepath.Join(share, "state"), "EQUIPO_WORKSPACE_ROOT": filepath.Join(share, "work"), "EQUIPO_SCRATCH_ROOT": filepath.Join(share, "scratch"), "EQUIPO_GIT_PATH": "/usr/bin/git"} |
| // srt and what it needs on macOS, all in the runner's own directory: |
| @@ -199,7 +278,7 @@ func installMac(ctx context.Context, args []string, h macInstallHost, out, errou |
| prefix := filepath.Join(lib, "srt") |
| pkg, lock := mac.SRTPackage() |
| if os.MkdirAll(prefix, 0700) != nil || os.WriteFile(filepath.Join(prefix, "package.json"), pkg, 0600) != nil || os.WriteFile(filepath.Join(prefix, "package-lock.json"), lock, 0600) != nil { |
| - return fail("runner.install.destination") |
| + return abort("runner.install.destination") |
| } |
| if err := h.npmCI(ctx, filepath.Join(filepath.Dir(fetched[mac.Node.Name]), "npm"), prefix, home); err != nil || h.verify(lib) != nil { |
| // Not installed, or not exactly the pinned srt, Node and |
| @@ -215,9 +294,8 @@ func installMac(ctx context.Context, args []string, h macInstallHost, out, errou |
| label = "Mac" |
| } |
| values["EQUIPO_MACHINE_LABEL"] = label |
| - envFile := filepath.Join(conf, "runner.env") |
| if err := writeEnvFile(envFile, values); err != nil { |
| - return fail("runner.install.config") |
| + return abort("runner.install.config") |
| } |
| cfg := runner.Config{Origin: *origin, InstanceID: *instance, StateDir: values["EQUIPO_RUNNER_STATE_DIR"], WorkspaceRoot: values["EQUIPO_WORKSPACE_ROOT"], ScratchRoot: values["EQUIPO_SCRATCH_ROOT"], GitPath: values["EQUIPO_GIT_PATH"], MachineLabel: label, Executable: binary, WorkerOnly: true} |
| // The line to open the link comes right before the link, and only |
| @@ -226,12 +304,14 @@ func installMac(ctx context.Context, args []string, h macInstallHost, out, errou |
| cfg.EnrolNotify = report.notify |
| if err := h.enrol(ctx, cfg, out); err != nil { |
| if errors.Is(err, runner.ErrEnrolledAsPrimary) { |
| - return fail("runner.needs_primary") |
| + return abort("runner.needs_primary") |
| } |
| report.failed(err) |
| - return 1 |
| + return abort("") |
| } |
| - plist := filepath.Join(agents, mac.AgentLabel+".plist") |
| + // Enrolled: the state now holds the credential this configuration |
| + // goes with, so the earlier one is not put back any more. |
| + backup.drop() |
| if err := os.WriteFile(plist, mac.LaunchAgent(binary, envFile, logs), 0644); err != nil { |
| return fail("runner.install.service") |
| } |
| @@ -323,16 +403,23 @@ func copyPrivate(src, dst string, mode os.FileMode) error { |
| // stopRunner stops a runner installed before and confirms it stopped: |
| // launchd no longer has the agent, and the runner's state lock is free. |
| -// It changes nothing itself; false means do not change anything. |
| -func stopRunner(ctx context.Context, h macInstallHost, service, state string) bool { |
| +// It changes nothing itself; not stopped means do not change anything. |
| +// tookDown is whether it took the agent out of launchd (which loads it |
| +// again if the install does not go ahead); a refused bootout did not. |
| +func stopRunner(ctx context.Context, h macInstallHost, service, state string) (stopped, tookDown bool) { |
| if h.launchctl(ctx, "print", service) != nil { |
| // Not loaded. Its lock must still be free: a runner started by |
| // hand holds it too. |
| - return lockFree(state) |
| + return lockFree(state), false |
| } |
| if h.launchctl(ctx, "bootout", service) != nil { |
| - return false |
| + return false, false |
| } |
| + return waitStopped(ctx, h, service, state), true |
| +} |
| + |
| +// waitStopped waits for a booted-out runner to be gone and its lock free. |
| +func waitStopped(ctx context.Context, h macInstallHost, service, state string) bool { |
| wait := h.stopWait |
| if wait <= 0 { |
| wait = time.Minute |
diff --git a/cmd/equipo-runner/install_mac_test.go b/cmd/equipo-runner/install_mac_test.go| index 90407c9e..3e03f5b9 100644 |
| --- a/cmd/equipo-runner/install_mac_test.go |
| +++ b/cmd/equipo-runner/install_mac_test.go |
| @@ -45,6 +45,8 @@ type macRig struct { |
| dsclHome string |
| loggedOut bool |
| childHomes []string |
| + // cwd is the directory the installer changed into ("" before it did). |
| + cwd string |
| } |
| func newMacRig(t *testing.T) *macRig { |
| @@ -106,7 +108,12 @@ func newMacRig(t *testing.T) *macRig { |
| cfg.EnrolNotify(runner.EnrolNotice{Waiting: true}) |
| return nil |
| }, |
| - launchctl: func(_ context.Context, args ...string) error { |
| + chdir: func(dir string) error { x.cwd = dir; return nil }, |
| + launchctl: func(ctx context.Context, args ...string) error { |
| + // launchctl is a program: a cancelled context never starts it. |
| + if ctx.Err() != nil { |
| + return ctx.Err() |
| + } |
| x.calls = append(x.calls, "launchctl "+strings.Join(args, " ")) |
| switch args[0] { |
| case "print": |
| @@ -410,6 +417,11 @@ func TestInstallMacWhenTheRunnerWillNotStop(t *testing.T) { |
| if _, err := os.Stat(filepath.Join(x.home, ".local/lib")); !os.IsNotExist(err) || len(x.fetched) != 0 || x.enrolled != nil { |
| t.Fatalf("%s: changed something", name) |
| } |
| + // A runner taken out of launchd that still holds its lock is |
| + // given back to launchd: nothing was changed. |
| + if x.loaded != (name != "held, not loaded") { |
| + t.Fatalf("%s: left unloaded: %v", name, x.calls) |
| + } |
| // A refused bootout is the answer: no waiting on it. |
| if name == "bootout fails" && x.calls[len(x.calls)-1] != "launchctl bootout gui/502/io.amadan.equipo-runner" { |
| t.Fatalf("waited after a failed bootout: %v", x.calls) |
diff --git a/cmd/equipo-runner/install_safe_test.go b/cmd/equipo-runner/install_safe_test.go| new file mode 100644 |
| index 00000000..f4ba8b80 |
| --- /dev/null |
| +++ b/cmd/equipo-runner/install_safe_test.go |
| @@ -0,0 +1,270 @@ |
| +package main |
| + |
| +import ( |
| + "bytes" |
| + "context" |
| + "fmt" |
| + "io" |
| + "os" |
| + "path/filepath" |
| + "slices" |
| + "strings" |
| + "testing" |
| + "time" |
| + |
| + "amadan.net/oficina/equipo/internal/equipo" |
| + "amadan.net/oficina/equipo/internal/runner" |
| + "amadan.net/oficina/equipo/internal/runner/provider" |
| + "amadan.net/oficina/equipo/internal/runnerproto" |
| +) |
| + |
| +const stagingOrigin = "https://equipo-staging.example" |
| + |
| +// liveEnrolment writes what an enrolled runner keeps in its state: a live |
| +// credential and the enrolment it came from (no record when origin is ""). |
| +func liveEnrolment(t *testing.T, state, origin, instance string) { |
| + t.Helper() |
| + if err := runnerproto.JournalCredentials(filepath.Join(state, "credentials.json"), runnerproto.CredentialRotation{Bearer: runnerproto.RunnerCredential{Version: 1, RunnerID: "r1", Token: "t", ExpiresAt: time.Now().Add(time.Hour)}}); err != nil { |
| + t.Fatal(err) |
| + } |
| + if origin == "" { |
| + return |
| + } |
| + record := map[string]any{"origin": origin, "label": "Tito Studio", "code": map[string]string{"instance_id": instance}} |
| + if err := runnerproto.JournalCredentials(filepath.Join(state, "enrolment.json"), record); err != nil { |
| + t.Fatal(err) |
| + } |
| +} |
| + |
| +func (x *macRig) installAt(ctx context.Context, origin, instance string) (int, string) { |
| + var out, errout bytes.Buffer |
| + code := installMac(ctx, []string{"--release", "abc1234", "--origin", origin, "--instance", instance}, x.h, &out, &errout) |
| + return code, errout.String() |
| +} |
| + |
| +// snapshot is what a runner installed before runs on: its binary, the |
| +// scanner beside it, its environment file and its launchd agent. |
| +func (x *macRig) snapshot(t *testing.T) map[string]string { |
| + t.Helper() |
| + got := map[string]string{} |
| + for _, p := range []string{".local/lib/equipo-runner/equipo-runner", ".local/lib/equipo-runner/gitleaks", ".config/equipo-runner/runner.env", "Library/LaunchAgents/io.amadan.equipo-runner.plist"} { |
| + raw, err := os.ReadFile(filepath.Join(x.home, p)) |
| + if err != nil { |
| + got[p] = "missing" |
| + continue |
| + } |
| + got[p] = string(raw) |
| + } |
| + return got |
| +} |
| + |
| +// installedBefore is a Mac with a runner for origin installed and running, |
| +// enrolled there; the next install brings a newer runner. |
| +func installedBefore(t *testing.T, origin string) *macRig { |
| + t.Helper() |
| + x := newMacRig(t) |
| + if code, errout := x.installAt(context.Background(), origin, "team1"); code != 0 { |
| + t.Fatalf("first install: %d %s", code, errout) |
| + } |
| + liveEnrolment(t, filepath.Join(x.home, ".local/share/equipo-runner/state"), origin, "team1") |
| + // Something only the earlier install wrote, so putting it back shows. |
| + env := filepath.Join(x.home, ".config/equipo-runner/runner.env") |
| + values := map[string]string{"EQUIPO_ORIGIN": origin, "EQUIPO_INSTANCE_ID": "team1", "EQUIPO_MACHINE_LABEL": "Before"} |
| + if err := writeEnvFile(env, values); err != nil { |
| + t.Fatal(err) |
| + } |
| + if err := os.WriteFile(x.h.self, []byte("#!newer runner\n"), 0700); err != nil { |
| + t.Fatal(err) |
| + } |
| + x.calls, x.fetched, x.enrolled, x.childHomes = nil, nil, nil, nil |
| + return x |
| +} |
| + |
| +// A Mac user already enrolled with another Equipo (the Studio's staging |
| +// runner, then a production install, 2026-11-28) is told so in words and |
| +// nothing is changed: its runner is not stopped, its environment file is |
| +// not rewritten, nothing is downloaded and nothing is enrolled. |
| +func TestInstallMacRefusesAnotherEquipo(t *testing.T) { |
| + for name, c := range map[string]struct { |
| + record string |
| + want string |
| + }{ |
| + "another origin": {stagingOrigin, fmt.Sprintf(equipo.RunnerSetupCopy("runner.mac.other_instance"), stagingOrigin)}, |
| + "origin not known": {"", equipo.RunnerSetupCopy("runner.enrol.identity")}, |
| + } { |
| + t.Run(name, func(t *testing.T) { |
| + x := installedBefore(t, stagingOrigin) |
| + state := filepath.Join(x.home, ".local/share/equipo-runner/state") |
| + if c.record == "" { |
| + if err := os.Remove(filepath.Join(state, "enrolment.json")); err != nil { |
| + t.Fatal(err) |
| + } |
| + } |
| + before := x.snapshot(t) |
| + code, errout := x.installAt(context.Background(), "https://equipo.example", "team1") |
| + if code != 1 || !strings.Contains(errout, c.want) || strings.Contains(errout, string(provider.ErrIdentity)) { |
| + t.Fatalf("%d %q", code, errout) |
| + } |
| + if len(x.calls) != 0 || !x.loaded || x.enrolled != nil || len(x.fetched) != 0 || len(x.childHomes) != 0 { |
| + t.Fatalf("changed something: calls %v loaded %v", x.calls, x.loaded) |
| + } |
| + if after := x.snapshot(t); !mapsEqual(before, after) { |
| + t.Fatalf("files changed:\n%v\n%v", before, after) |
| + } |
| + }) |
| + } |
| +} |
| + |
| +func mapsEqual(a, b map[string]string) bool { |
| + if len(a) != len(b) { |
| + return false |
| + } |
| + for k, v := range a { |
| + if b[k] != v { |
| + return false |
| + } |
| + } |
| + return true |
| +} |
| + |
| +// Anything that fails once the runner was stopped puts back what it ran |
| +// on, exactly, and starts it again: a link that expired, the person |
| +// stopping the wait (the context ends, the reload still happens), a |
| +// scanner that is not the pin, a Mac the instance takes for a primary. |
| +// A runner that was not running is put back and left stopped. |
| +func TestInstallMacPutsBackThePreviousRunner(t *testing.T) { |
| + for name, c := range map[string]struct { |
| + set func(*macRig, context.CancelFunc) |
| + want string |
| + notLoaded bool |
| + }{ |
| + "link expired": {set: func(x *macRig, _ context.CancelFunc) { |
| + x.h.enrol = func(context.Context, runner.Config, io.Writer) error { return runner.ErrEnrolmentExpired } |
| + }, want: "runner.enrol.expired"}, |
| + "wait stopped": {set: func(x *macRig, cancel context.CancelFunc) { |
| + x.h.enrol = func(ctx context.Context, _ runner.Config, _ io.Writer) error { cancel(); return ctx.Err() } |
| + }, want: "runner.install.unavailable"}, |
| + "scanner not the pin": {set: func(x *macRig, _ context.CancelFunc) { |
| + fetch := x.h.fetch |
| + x.h.fetch = func(ctx context.Context, url string, limit int64) ([]byte, error) { |
| + if strings.HasSuffix(url, "/gitleaks") { |
| + return []byte("tampered"), nil |
| + } |
| + return fetch(ctx, url, limit) |
| + } |
| + }, want: "runner.install.checksum"}, |
| + "taken for a primary": {set: func(x *macRig, _ context.CancelFunc) { |
| + x.h.enrol = func(context.Context, runner.Config, io.Writer) error { return runner.ErrEnrolledAsPrimary } |
| + }, want: "runner.needs_primary"}, |
| + "was not running": {set: func(x *macRig, _ context.CancelFunc) { |
| + x.loaded = false |
| + x.h.enrol = func(context.Context, runner.Config, io.Writer) error { return runner.ErrEnrolmentRefused } |
| + }, want: "runner.enrol.refused", notLoaded: true}, |
| + } { |
| + t.Run(name, func(t *testing.T) { |
| + x := installedBefore(t, "https://equipo.example") |
| + before := x.snapshot(t) |
| + ctx, cancel := context.WithCancel(context.Background()) |
| + defer cancel() |
| + c.set(x, cancel) |
| + code, errout := x.installAt(ctx, "https://equipo.example", "team1") |
| + if code != 1 || !strings.Contains(errout, equipo.RunnerSetupCopy(c.want)) || !strings.HasSuffix(errout, equipo.RunnerSetupCopy("runner.mac.restored")+"\n") { |
| + t.Fatalf("%d %q", code, errout) |
| + } |
| + if after := x.snapshot(t); !mapsEqual(before, after) { |
| + t.Fatalf("not put back:\n%v\n%v", before, after) |
| + } |
| + plist := filepath.Join(x.home, "Library/LaunchAgents/io.amadan.equipo-runner.plist") |
| + reloaded := len(x.calls) > 0 && x.calls[len(x.calls)-1] == "launchctl bootstrap gui/502 "+plist |
| + if c.notLoaded == reloaded || x.loaded == c.notLoaded { |
| + t.Fatalf("loaded %v calls %v", x.loaded, x.calls) |
| + } |
| + // Nothing kept aside is left behind. |
| + if entries, _ := os.ReadDir(filepath.Join(x.home, ".local/share/equipo-runner")); len(entries) != 3 { |
| + t.Fatalf("left behind %v", entries) |
| + } |
| + }) |
| + } |
| +} |
| + |
| +// A first install that fails leaves no configuration a later login would |
| +// start, and says nothing about putting a runner back. |
| +func TestInstallMacFirstFailureLeavesNoConfig(t *testing.T) { |
| + x := newMacRig(t) |
| + x.h.enrol = func(context.Context, runner.Config, io.Writer) error { return runner.ErrEnrolmentExpired } |
| + code, errout := x.installAt(context.Background(), "https://equipo.example", "team1") |
| + if code != 1 || strings.Contains(errout, equipo.RunnerSetupCopy("runner.mac.restored")) || slices.ContainsFunc(x.calls, func(c string) bool { return strings.HasPrefix(c, "launchctl bootstrap") }) { |
| + t.Fatalf("%d %q %v", code, errout, x.calls) |
| + } |
| + if _, err := os.Stat(filepath.Join(x.home, ".config/equipo-runner/runner.env")); !os.IsNotExist(err) { |
| + t.Fatal("environment file left behind") |
| + } |
| +} |
| + |
| +// An install that works replaces the earlier runner and keeps nothing of |
| +// it aside. |
| +func TestInstallMacAgainKeepsNothingAside(t *testing.T) { |
| + x := installedBefore(t, "https://equipo.example") |
| + if code, errout := x.installAt(context.Background(), "https://equipo.example", "team1"); code != 0 { |
| + t.Fatalf("%d %q", code, errout) |
| + } |
| + if got := x.snapshot(t)[".local/lib/equipo-runner/equipo-runner"]; got != "#!newer runner\n" { |
| + t.Fatalf("runner %q", got) |
| + } |
| + if entries, _ := os.ReadDir(filepath.Join(x.home, ".local/share/equipo-runner")); len(entries) != 3 { |
| + t.Fatalf("left behind %v", entries) |
| + } |
| +} |
| + |
| +// Started from a folder this user cannot read (sudo su without a dash, |
| +// 2026-11-28: npm and xcodebuild failed, so no checks sandbox), the |
| +// installer moves into the user's own home before it runs anything, and |
| +// every program it runs is given its own folder. |
| +func TestInstallMacRunsFromItsHome(t *testing.T) { |
| + x := newMacRig(t) |
| + npmCI, firstLaunch := x.h.npmCI, x.h.firstLaunch |
| + x.h.npmCI = func(ctx context.Context, npm, prefix, home string) error { |
| + if x.cwd != x.home { |
| + t.Errorf("npm ran in %q", x.cwd) |
| + } |
| + return npmCI(ctx, npm, prefix, home) |
| + } |
| + x.h.firstLaunch = func(ctx context.Context, home string) { |
| + if x.cwd != x.home { |
| + t.Errorf("xcodebuild ran in %q", x.cwd) |
| + } |
| + firstLaunch(ctx, home) |
| + } |
| + if code, errout := x.installAt(context.Background(), "https://equipo.example", "team1"); code != 0 { |
| + t.Fatalf("%d %q", code, errout) |
| + } |
| + // A home it cannot move into changes nothing. |
| + x = newMacRig(t) |
| + x.h.chdir = func(string) error { return os.ErrPermission } |
| + if code, errout := x.installAt(context.Background(), "https://equipo.example", "team1"); code != 1 || !strings.Contains(errout, equipo.RunnerSetupCopy("runner.install.destination")) || len(x.calls) != 0 { |
| + t.Fatalf("%d %q %v", code, errout, x.calls) |
| + } |
| + ctx := context.Background() |
| + if dir := npmCICommand(ctx, "/n/bin/npm", "/h/.local/lib/equipo-runner/srt", "/h").Dir; dir != "/h/.local/lib/equipo-runner/srt" { |
| + t.Fatalf("npm dir %q", dir) |
| + } |
| + if dir := firstLaunchCommand(ctx, "/h").Dir; dir != "/h" { |
| + t.Fatalf("xcodebuild dir %q", dir) |
| + } |
| + if dir := systemCommand(ctx, "/bin/launchctl", "print").Dir; dir != "/" { |
| + t.Fatalf("system tool dir %q", dir) |
| + } |
| +} |
| + |
| +// An identity Enrol cannot match is said in words, not as its code, and |
| +// stands alone. |
| +func TestInstallMacIdentityInWords(t *testing.T) { |
| + x := newMacRig(t) |
| + x.h.enrol = func(context.Context, runner.Config, io.Writer) error { |
| + return fmt.Errorf("enrol: %w", provider.ErrIdentity) |
| + } |
| + code, errout := x.installAt(context.Background(), "https://equipo.example", "team1") |
| + if code != 1 || !strings.Contains(errout, equipo.RunnerSetupCopy("runner.enrol.identity")) || strings.Contains(errout, string(provider.ErrIdentity)) || strings.Contains(errout, equipo.RunnerSetupCopy("runner.install.unavailable")) { |
| + t.Fatalf("%d %q", code, errout) |
| + } |
| +} |
diff --git a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md| index 05cf4945..dbb005a8 100644 |
| --- a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md |
| +++ b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md |
| @@ -6997,6 +6997,11 @@ records remain unchanged. |
| | `places.deploy_held` | Its deploy key is %s. | Places slice 1, Places page (Luna, codex gpt-5.6-luna, house rules) | COPY ACCEPTED BY DELEGATION (Luna, 2026-11-26) | |
| | `places.deploy_lost` | A deploy key named %s may still be live on CARLOS without Equipo holding it. You can revoke it in the CARLOS console. | Places slice 1, Places page (Luna, codex gpt-5.6-luna, house rules) | COPY ACCEPTED BY DELEGATION (Luna, 2026-11-26) | |
| | `places.deploy_none` | No deploy key yet: the first publish makes one. | Places slice 1, Places page (Luna, codex gpt-5.6-luna, house rules) | COPY ACCEPTED BY DELEGATION (Luna, 2026-11-26) | |
| +| `runner.mac.other_instance` | This Mac user already works for another Equipo (%s), so nothing was changed. To add this Mac to this team too, create another Standard user with ‘equipo’ in its account name and paste the command there. | Copy specialist | COPY REVIEW PENDING | |
| +| `runner.install.other_instance` | This runner already works for another Equipo (%s), so nothing was changed. To add this machine to this team too, run the install command as another user on this machine. | Copy specialist | COPY REVIEW PENDING | |
| +| `runner.enrol.identity` | This machine’s saved Equipo details don’t match this install command, so it was not added. Copy the install command from Equipo again and run it. | Copy specialist | COPY REVIEW PENDING | |
| +| `runner.mac.restored` | The runner that was on this Mac before is back as it was. | Copy specialist | COPY REVIEW PENDING | |
| +| `runner.mac.not_restored` | Equipo couldn’t put back the runner that was on this Mac before. Log out of this user and back in, then paste the command again. | Copy specialist | COPY REVIEW PENDING | |
| ## Task 21 |
diff --git a/internal/equipo/copy.go b/internal/equipo/copy.go| index 8f658ea9..3fdb2db3 100644 |
| --- a/internal/equipo/copy.go |
| +++ b/internal/equipo/copy.go |
| @@ -675,6 +675,12 @@ var pageCopy = map[string]string{ |
| // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context): runner.mac.installed |
| "runner.mac.installed": "This Mac is ready. It checks itself, then waits for work whenever this user is logged in.", |
| + "runner.mac.other_instance": "This Mac user already works for another Equipo (%s), so nothing was changed. To add this Mac to this team too, create another Standard user with ‘equipo’ in its account name and paste the command there.", // COPY REVIEW PENDING |
| + "runner.install.other_instance": "This runner already works for another Equipo (%s), so nothing was changed. To add this machine to this team too, run the install command as another user on this machine.", // COPY REVIEW PENDING |
| + "runner.enrol.identity": "This machine’s saved Equipo details don’t match this install command, so it was not added. Copy the install command from Equipo again and run it.", // COPY REVIEW PENDING |
| + "runner.mac.restored": "The runner that was on this Mac before is back as it was.", // COPY REVIEW PENDING |
| + "runner.mac.not_restored": "Equipo couldn’t put back the runner that was on this Mac before. Log out of this user and back in, then paste the command again.", // COPY REVIEW PENDING |
| + |
| // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context): invite.welcome |
| "invite.welcome": "Join the team", |
| // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context): invite.accept |
diff --git a/internal/runner/enrol.go b/internal/runner/enrol.go| index f24a7da4..71e88339 100644 |
| --- a/internal/runner/enrol.go |
| +++ b/internal/runner/enrol.go |
| @@ -52,8 +52,7 @@ func Enrol(ctx context.Context, c Config, output io.Writer) (resultErr error) { |
| return err |
| } |
| if time.Now().Before(old.Bearer.ExpiresAt) { |
| - var saved pendingEnrolment |
| - if privateJSON(filepath.Join(c.StateDir, "enrolment.json"), &saved) != nil || saved.Origin != c.Origin || saved.Code.InstanceID != c.InstanceID { |
| + if _, other := otherEnrolment(c.StateDir, c.Origin, c.InstanceID); other { |
| return provider.ErrIdentity |
| } |
| c.notify(EnrolNotice{Kept: true}) |
| @@ -339,6 +338,43 @@ func retryTransient(ctx context.Context, c Config, f func() error) error { |
| } |
| } |
| +// EnrolledElsewhere reports whether the runner state in stateDir holds a |
| +// live enrolment with another Equipo than origin and instanceID: the one |
| +// Enrol refuses with provider.ErrIdentity. It takes no lock and changes |
| +// nothing, so an installer asks it before it stops a running runner or |
| +// rewrites its configuration. other is that Equipo's origin, "" when the |
| +// state does not say which (Enrol refuses that too). |
| +func EnrolledElsewhere(stateDir, origin, instanceID string) (other string, elsewhere bool, err error) { |
| + path := filepath.Join(stateDir, "credentials.json") |
| + if _, err := os.Lstat(path); os.IsNotExist(err) { |
| + return "", false, nil |
| + } else if err != nil { |
| + return "", false, err |
| + } |
| + old, err := readCredentials(path) |
| + if err != nil { |
| + return "", false, err |
| + } |
| + if !time.Now().Before(old.Bearer.ExpiresAt) { |
| + return "", false, nil |
| + } |
| + other, elsewhere = otherEnrolment(stateDir, origin, instanceID) |
| + return other, elsewhere, nil |
| +} |
| + |
| +// otherEnrolment: whether the enrolment saved beside live credentials is |
| +// not for origin and instanceID (or cannot be read), and its origin. |
| +func otherEnrolment(stateDir, origin, instanceID string) (string, bool) { |
| + var saved pendingEnrolment |
| + if privateJSON(filepath.Join(stateDir, "enrolment.json"), &saved) != nil { |
| + return "", true |
| + } |
| + if saved.Origin != origin || saved.Code.InstanceID != instanceID { |
| + return saved.Origin, true |
| + } |
| + return "", false |
| +} |
| + |
| // EnrolDetail is what went wrong, in words, for the person and the |
| // install log: the cause under the diagnostic code, which carries no |
| // secrets (the device secret and tokens are only ever in request and |
diff --git a/internal/runner/enrol_elsewhere_test.go b/internal/runner/enrol_elsewhere_test.go| new file mode 100644 |
| index 00000000..8162faf4 |
| --- /dev/null |
| +++ b/internal/runner/enrol_elsewhere_test.go |
| @@ -0,0 +1,71 @@ |
| +package runner |
| + |
| +import ( |
| + "context" |
| + "errors" |
| + "path/filepath" |
| + "testing" |
| + "time" |
| + |
| + "amadan.net/oficina/equipo/internal/runner/provider" |
| + "amadan.net/oficina/equipo/internal/runnerproto" |
| +) |
| + |
| +// enrolledState writes what an enrolled runner keeps: its credential, |
| +// live until expires, and the enrolment it came from, for origin and |
| +// instance ("" origin writes no enrolment record). |
| +func enrolledState(t *testing.T, state, origin, instance string, expires time.Time) { |
| + t.Helper() |
| + if err := runnerproto.JournalCredentials(filepath.Join(state, "credentials.json"), runnerproto.CredentialRotation{Bearer: runnerproto.RunnerCredential{Version: 1, RunnerID: "r1", Token: "t", ExpiresAt: expires}}); err != nil { |
| + t.Fatal(err) |
| + } |
| + if origin == "" { |
| + return |
| + } |
| + if err := runnerproto.JournalCredentials(filepath.Join(state, "enrolment.json"), pendingEnrolment{Origin: origin, Label: "Mac", Code: runnerproto.DeviceCode{InstanceID: instance}}); err != nil { |
| + t.Fatal(err) |
| + } |
| +} |
| + |
| +// An installer asks, before it stops anything or rewrites the runner's |
| +// configuration, whether the state is enrolled with another Equipo: the |
| +// enrolment Enrol refuses (Tito Studio, 2026-11-28: a staging runner's |
| +// state, then a production install). It changes nothing and needs no lock. |
| +func TestEnrolledElsewhere(t *testing.T) { |
| + const prod, staging = "https://equipo.example", "https://equipo-staging.example" |
| + live, expired := time.Now().Add(time.Hour), time.Now().Add(-time.Hour) |
| + for _, c := range []struct { |
| + name string |
| + origin, instance string |
| + expires time.Time |
| + none bool |
| + want bool |
| + wantOrigin string |
| + }{ |
| + {name: "nothing enrolled", none: true}, |
| + {name: "this instance", origin: prod, instance: "team1", expires: live}, |
| + {name: "another origin", origin: staging, instance: "team1", expires: live, want: true, wantOrigin: staging}, |
| + {name: "another instance", origin: prod, instance: "team2", expires: live, want: true, wantOrigin: prod}, |
| + {name: "expired elsewhere", origin: staging, instance: "team1", expires: expired}, |
| + {name: "no enrolment record", origin: "", expires: live, want: true}, |
| + } { |
| + t.Run(c.name, func(t *testing.T) { |
| + state := filepath.Join(t.TempDir(), "state") |
| + if !c.none { |
| + enrolledState(t, state, c.origin, c.instance, c.expires) |
| + } |
| + other, elsewhere, err := EnrolledElsewhere(state, prod, "team1") |
| + if err != nil || elsewhere != c.want || other != c.wantOrigin { |
| + t.Fatalf("got %q %v %v", other, elsewhere, err) |
| + } |
| + // Enrol refuses exactly these, before asking anyone (the |
| + // others would ask: cancelled, they never reach the network). |
| + ctx, cancel := context.WithCancel(context.Background()) |
| + cancel() |
| + err = Enrol(ctx, Config{Origin: prod, InstanceID: "team1", StateDir: state}, nil) |
| + if c.want != errors.Is(err, provider.ErrIdentity) { |
| + t.Fatalf("enrol %v", err) |
| + } |
| + }) |
| + } |
| +} |
diff --git a/internal/runner/setup/install_test.go b/internal/runner/setup/install_test.go| index 72cc396c..52ed888b 100644 |
| --- a/internal/runner/setup/install_test.go |
| +++ b/internal/runner/setup/install_test.go |
| @@ -366,3 +366,12 @@ func TestInstallScannerDigestRefusesTampering(t *testing.T) { |
| t.Fatal("changed bundled scanner installed") |
| } |
| } |
| + |
| +// The programs setup runs (systemctl, loginctl, bwrap) are given their |
| +// own working directory, never the folder the installer was started |
| +// from, which this user may not read. |
| +func TestSetupCommandsHaveTheirOwnDirectory(t *testing.T) { |
| + if dir := command(context.Background(), "systemctl", "--user", "show-environment").Dir; dir != "/" { |
| + t.Fatalf("dir %q", dir) |
| + } |
| +} |
diff --git a/internal/runner/setup/preflight.go b/internal/runner/setup/preflight.go| index c06e56c4..c5e96fa9 100644 |
| --- a/internal/runner/setup/preflight.go |
| +++ b/internal/runner/setup/preflight.go |
| @@ -47,7 +47,7 @@ func containmentPreflight(ctx context.Context, binary string, m release.InstallM |
| } |
| return probeContainment(ctx, binary, m, probeHost{read: os.ReadFile, version: func(ctx context.Context) (string, error) { |
| - b, e := exec.CommandContext(ctx, "bwrap", "--version").Output() |
| + b, e := command(ctx, "bwrap", "--version").Output() |
| return string(b), e |
| }, namespace: namespaceProbe}) |
| } |
| @@ -94,7 +94,7 @@ func namespaceProbe(ctx context.Context, binary string, policy []string) error { |
| defer statusW.Close() |
| args := append([]string{}, policy...) |
| args = append(args, "--ro-bind", binary, "/equipo-probe", "--proc", "/proc", "--dev", "/dev", "--tmpfs", "/tmp", "--", "/equipo-probe", "__install_probe") |
| - cmd := exec.CommandContext(ctx, "bwrap", args...) |
| + cmd := command(ctx, "bwrap", args...) |
| cmd.Env = []string{} |
| cmd.ExtraFiles = []*os.File{statusW} |
| input, e := cmd.StdinPipe() |
diff --git a/internal/runner/setup/service.go b/internal/runner/setup/service.go| index 59c4e693..18a38df6 100644 |
| --- a/internal/runner/setup/service.go |
| +++ b/internal/runner/setup/service.go |
| @@ -9,15 +9,23 @@ import ( |
| "strings" |
| ) |
| +// command runs a system program from /, never the folder the installer |
| +// was started from (which this user may not read). |
| +func command(ctx context.Context, name string, args ...string) *exec.Cmd { |
| + cmd := exec.CommandContext(ctx, name, args...) |
| + cmd.Dir = "/" |
| + return cmd |
| +} |
| + |
| func systemdQuote(s string) string { return strconv.Quote(strings.ReplaceAll(s, "%", "%%")) } |
| func serviceUnit(binary, env string) string { |
| return "[Unit]\nDescription=equipo-runner\n[Service]\nType=simple\nEnvironmentFile=" + systemdQuote(env) + "\nExecStart=" + systemdQuote(strings.ReplaceAll(binary, "$", "$$")) + " run\nRestart=on-failure\nRestartSec=5\nTimeoutStopSec=45\nKillMode=control-group\nUMask=0077\nNoNewPrivileges=yes\n[Install]\nWantedBy=default.target\n" |
| } |
| func userServiceAvailable(ctx context.Context) bool { |
| - return exec.CommandContext(ctx, "systemctl", "--user", "show-environment").Run() == nil |
| + return command(ctx, "systemctl", "--user", "show-environment").Run() == nil |
| } |
| func readLingering(ctx context.Context) (bool, error) { |
| - b, e := exec.CommandContext(ctx, "loginctl", "show-user", strconv.Itoa(os.Getuid()), "--property=Linger", "--value").Output() |
| + b, e := command(ctx, "loginctl", "show-user", strconv.Itoa(os.Getuid()), "--property=Linger", "--value").Output() |
| if e != nil { |
| return false, e |
| } |
| @@ -32,7 +40,7 @@ func readLingering(ctx context.Context) (bool, error) { |
| } |
| func enableService(ctx context.Context, path string) error { |
| for _, args := range [][]string{{"--user", "link", path}, {"--user", "daemon-reload"}, {"--user", "enable", "equipo-runner.service"}, {"--user", "restart", "equipo-runner.service"}} { |
| - if e := exec.CommandContext(ctx, "systemctl", args...).Run(); e != nil { |
| + if e := command(ctx, "systemctl", args...).Run(); e != nil { |
| return e |
| } |
| } |
diff --git a/scripts/runner-reference-allowlist.json b/scripts/runner-reference-allowlist.json| index 1dc78ecd..aef64624 100644 |
| --- a/scripts/runner-reference-allowlist.json |
| +++ b/scripts/runner-reference-allowlist.json |
| @@ -6348,6 +6348,13 @@ |
| "count": 1, |
| "reason": "Runner executable/package or user-service identifier, retained for direct-launch installation and fixture verification." |
| }, |
| + { |
| + "path": "cmd/equipo-runner/install.go", |
| + "line_sha256": "84b1038e2e54c7d9e3234f98f5b29914113f1438ed5381e624fb5c1863a07e53", |
| + "match": "equipo-runner", |
| + "count": 1, |
| + "reason": "Runner executable/package or user-service identifier, retained for direct-launch installation and fixture verification." |
| + }, |
| { |
| "path": "cmd/equipo-runner/install.go", |
| "line_sha256": "10512c22475ccbc667de060cb3471893a31542253b03d05173948e8b6e2432bb", |
| @@ -6355,6 +6362,20 @@ |
| "count": 1, |
| "reason": "Runner executable/package or user-service identifier, retained for direct-launch installation and fixture verification." |
| }, |
| + { |
| + "path": "cmd/equipo-runner/install.go", |
| + "line_sha256": "3e563be1a13bda2f2bc1ec6fcfb17e447cac0dd7c094ac03ee4afe403bf2c4e7", |
| + "match": "equipo-runner", |
| + "count": 1, |
| + "reason": "Runner executable/package or user-service identifier, retained for direct-launch installation and fixture verification." |
| + }, |
| + { |
| + "path": "cmd/equipo-runner/install.go", |
| + "line_sha256": "53aed153ffaa020eb2d545011fbe36325022231cccdaa997a36e3d0a78a8afeb", |
| + "match": "equipo-runner", |
| + "count": 1, |
| + "reason": "Retained runner executable, versioned package or user-service path in release tooling, tests or operator steps." |
| + }, |
| { |
| "path": "docs/plan-3-acceptance.md", |
| "line_sha256": "626f399274cbf0b679257070e21ff3fdba65b820a275007b58a81db52387eb72", |
| @@ -9234,25 +9255,53 @@ |
| }, |
| { |
| "path": "cmd/equipo-runner/install_mac.go", |
| - "line_sha256": "32138154181821a0cfeaf81c250d782b121adffb3bf45f43ba7bbda38c9748a0", |
| + "line_sha256": "ecbf467e7e69e5c032145002e60a4be3d8ed3e76239ab37cbbacdd5e48f85e45", |
| + "match": "npm", |
| + "count": 1, |
| + "reason": "Mac runner (darwin worker): the runner executable, its launchd agent, install paths, the pinned srt package and Node it needs, and their tests and docs." |
| + }, |
| + { |
| + "path": "cmd/equipo-runner/install_mac.go", |
| + "line_sha256": "24610f4734a1c070a1f0c043aa7d57609e721087e6a0b76ef554e4f79b3961f4", |
| + "match": "npm", |
| + "count": 1, |
| + "reason": "Mac runner (darwin worker): the runner executable, its launchd agent, install paths, the pinned srt package and Node it needs, and their tests and docs." |
| + }, |
| + { |
| + "path": "cmd/equipo-runner/install_mac.go", |
| + "line_sha256": "79b4fba24377c05cae3104406b1d1bb6a210f2e363d8509dcbc89583db8a95dc", |
| "match": "npm", |
| "count": 2, |
| "reason": "Mac runner (darwin worker): the runner executable, its launchd agent, install paths, the pinned srt package and Node it needs, and their tests and docs." |
| }, |
| { |
| "path": "cmd/equipo-runner/install_mac.go", |
| - "line_sha256": "eb32df6f1e84078e5335ea88115756c024b7e09d01dcc4729830274bda0b1d00", |
| + "line_sha256": "c91819660322759c300d53938d466298bcfe4ac6466ebf8e51294d1ec18b6944", |
| "match": "npm", |
| "count": 1, |
| "reason": "Mac runner (darwin worker): the runner executable, its launchd agent, install paths, the pinned srt package and Node it needs, and their tests and docs." |
| }, |
| { |
| "path": "cmd/equipo-runner/install_mac.go", |
| - "line_sha256": "aee8ae7dce138c49dea7d8ec7e4f1f84ccf0844df80e26532a6bcae5428fbc3c", |
| + "line_sha256": "23fad91a670a364cf852489220bfb802cfc5eb631d768fd229e51c628482947d", |
| "match": "npm", |
| "count": 1, |
| "reason": "Mac runner (darwin worker): the runner executable, its launchd agent, install paths, the pinned srt package and Node it needs, and their tests and docs." |
| }, |
| + { |
| + "path": "cmd/equipo-runner/install_mac.go", |
| + "line_sha256": "32138154181821a0cfeaf81c250d782b121adffb3bf45f43ba7bbda38c9748a0", |
| + "match": "npm", |
| + "count": 2, |
| + "reason": "Mac runner (darwin worker): the runner executable, its launchd agent, install paths, the pinned srt package and Node it needs, and their tests and docs." |
| + }, |
| + { |
| + "path": "cmd/equipo-runner/install_mac.go", |
| + "line_sha256": "5840166f3bae69e3338d75b8423fb97abcb6ba1069cd385c9316f0452c9ba164", |
| + "match": "npm", |
| + "count": 2, |
| + "reason": "Mac runner (darwin worker): the runner executable, its launchd agent, install paths, the pinned srt package and Node it needs, and their tests and docs." |
| + }, |
| { |
| "path": "cmd/equipo-runner/install_mac.go", |
| "line_sha256": "a545789c59d37118a236e69803a3270a8a8c440b8d9a39abebd7a3a08da0a849", |
| @@ -10814,13 +10863,6 @@ |
| "count": 1, |
| "reason": "Progress log: names the retained runner executable and its release directory." |
| }, |
| - { |
| - "path": "cmd/equipo-runner/install.go", |
| - "line_sha256": "53aed153ffaa020eb2d545011fbe36325022231cccdaa997a36e3d0a78a8afeb", |
| - "match": "equipo-runner", |
| - "count": 1, |
| - "reason": "Retained runner executable, versioned package or user-service path in release tooling, tests or operator steps." |
| - }, |
| { |
| "path": "cmd/equipo-runner/verify_installed_test.go", |
| "line_sha256": "fe1aaaad5f08861498ccdb8137a0a126c39f2e8d1d48dceef824294f47bda845", |
| @@ -18394,5 +18436,159 @@ |
| "match": "Node", |
| "count": 1, |
| "reason": "Go AST traversal type for the API error copy guard." |
| + }, |
| + { |
| + "path": "cmd/equipo-runner/install_safe_test.go", |
| + "line_sha256": "4ef76f533c20c60e862aafeadc6560737818ced248c2acef9a27f2be87ca012f", |
| + "match": "equipo-runner", |
| + "count": 5, |
| + "reason": "Installer safety (2026-11-28): the runner's install paths and the pinned srt npm install, kept aside and put back, and their tests." |
| + }, |
| + { |
| + "path": "cmd/equipo-runner/install_safe_test.go", |
| + "line_sha256": "4c00ae3c5bff92520581acb7a90c0218b56a6290f4d48bc539bb61af74dd0251", |
| + "match": "equipo-runner", |
| + "count": 1, |
| + "reason": "Installer safety (2026-11-28): the runner's install paths and the pinned srt npm install, kept aside and put back, and their tests." |
| + }, |
| + { |
| + "path": "cmd/equipo-runner/install_safe_test.go", |
| + "line_sha256": "1064c1bf5e7f565c6108f202810dfdf5a34d7f6236293c282ed963cf5e82787c", |
| + "match": "equipo-runner", |
| + "count": 1, |
| + "reason": "Installer safety (2026-11-28): the runner's install paths and the pinned srt npm install, kept aside and put back, and their tests." |
| + }, |
| + { |
| + "path": "cmd/equipo-runner/install_safe_test.go", |
| + "line_sha256": "bcc6737a39e68dd9d6aa6e2e7098bd51791a860031d6f6b9d27ba62796146ccf", |
| + "match": "equipo-runner", |
| + "count": 1, |
| + "reason": "Installer safety (2026-11-28): the runner's install paths and the pinned srt npm install, kept aside and put back, and their tests." |
| + }, |
| + { |
| + "path": "cmd/equipo-runner/install_safe_test.go", |
| + "line_sha256": "74ddd38813e78a64c310ac34ff03129ce4cb89ef7de877b7b2c68676b7db97cb", |
| + "match": "equipo-runner", |
| + "count": 1, |
| + "reason": "Installer safety (2026-11-28): the runner's install paths and the pinned srt npm install, kept aside and put back, and their tests." |
| + }, |
| + { |
| + "path": "cmd/equipo-runner/install_safe_test.go", |
| + "line_sha256": "a4125af6510828005b40dfa2dc126e6a506bf7623842b7b64a85631bc57975a5", |
| + "match": "equipo-runner", |
| + "count": 1, |
| + "reason": "Installer safety (2026-11-28): the runner's install paths and the pinned srt npm install, kept aside and put back, and their tests." |
| + }, |
| + { |
| + "path": "cmd/equipo-runner/install_safe_test.go", |
| + "line_sha256": "2ff191cb0673b2cabe0d36e1aa3696592786ef74ebb1e1a5b0ca71ac3442ac2e", |
| + "match": "equipo-runner", |
| + "count": 1, |
| + "reason": "Installer safety (2026-11-28): the runner's install paths and the pinned srt npm install, kept aside and put back, and their tests." |
| + }, |
| + { |
| + "path": "cmd/equipo-runner/install_safe_test.go", |
| + "line_sha256": "c4eb5ea6410933b35ec0a466ebb0ea4ea4cc02e39ffd0f072e07e59448bbdddc", |
| + "match": "equipo-runner", |
| + "count": 2, |
| + "reason": "Installer safety (2026-11-28): the runner's install paths and the pinned srt npm install, kept aside and put back, and their tests." |
| + }, |
| + { |
| + "path": "cmd/equipo-runner/install_safe_test.go", |
| + "line_sha256": "2ced949e21341a0d5d6180ef214a4ece0dd10982553c880f78abf22619591230", |
| + "match": "equipo-runner", |
| + "count": 1, |
| + "reason": "Installer safety (2026-11-28): the runner's install paths and the pinned srt npm install, kept aside and put back, and their tests." |
| + }, |
| + { |
| + "path": "cmd/equipo-runner/install_safe_test.go", |
| + "line_sha256": "6a640deb075370071cdf92f6aee57e204a206cf47650bb6f037f8f055c3d435a", |
| + "match": "npm", |
| + "count": 1, |
| + "reason": "Installer safety (2026-11-28): the runner's install paths and the pinned srt npm install, kept aside and put back, and their tests." |
| + }, |
| + { |
| + "path": "cmd/equipo-runner/install_safe_test.go", |
| + "line_sha256": "3f9bcd2ee964d61cf6a60eb5f129d798fbc666c39e58c7e47d7325652de1b660", |
| + "match": "npm", |
| + "count": 2, |
| + "reason": "Installer safety (2026-11-28): the runner's install paths and the pinned srt npm install, kept aside and put back, and their tests." |
| + }, |
| + { |
| + "path": "cmd/equipo-runner/install_safe_test.go", |
| + "line_sha256": "c99a651be9c3fc72ee09b44d6bd1553e4e539994429dba59b00578f850635668", |
| + "match": "npm", |
| + "count": 2, |
| + "reason": "Installer safety (2026-11-28): the runner's install paths and the pinned srt npm install, kept aside and put back, and their tests." |
| + }, |
| + { |
| + "path": "cmd/equipo-runner/install_safe_test.go", |
| + "line_sha256": "042feaee0cb6b60feab2753178f07c00b098f999db0e19f6870485e5b403b50e", |
| + "match": "npm", |
| + "count": 1, |
| + "reason": "Installer safety (2026-11-28): the runner's install paths and the pinned srt npm install, kept aside and put back, and their tests." |
| + }, |
| + { |
| + "path": "cmd/equipo-runner/install_safe_test.go", |
| + "line_sha256": "de8add07a477bef730aeeaac1542fd7ec39791312ca5c2e81552989f64b4a7ff", |
| + "match": "npm", |
| + "count": 2, |
| + "reason": "Installer safety (2026-11-28): the runner's install paths and the pinned srt npm install, kept aside and put back, and their tests." |
| + }, |
| + { |
| + "path": "cmd/equipo-runner/install_safe_test.go", |
| + "line_sha256": "c56ac77ab1523079516cbbbabf39ae8eab2e451788a5c7446d4dba458f9963f4", |
| + "match": "npm", |
| + "count": 2, |
| + "reason": "Installer safety (2026-11-28): the runner's install paths and the pinned srt npm install, kept aside and put back, and their tests." |
| + }, |
| + { |
| + "path": "cmd/equipo-runner/install_safe_test.go", |
| + "line_sha256": "c56ac77ab1523079516cbbbabf39ae8eab2e451788a5c7446d4dba458f9963f4", |
| + "match": "equipo-runner", |
| + "count": 2, |
| + "reason": "Installer safety (2026-11-28): the runner's install paths and the pinned srt npm install, kept aside and put back, and their tests." |
| + }, |
| + { |
| + "path": "cmd/equipo-runner/install_safe_test.go", |
| + "line_sha256": "3ee162bbea0cda67c8fd1492143d5a05b35d341bfb01472bcb616d151f3b6c60", |
| + "match": "npm", |
| + "count": 1, |
| + "reason": "Installer safety (2026-11-28): the runner's install paths and the pinned srt npm install, kept aside and put back, and their tests." |
| + }, |
| + { |
| + "path": "cmd/equipo-runner/install_linux_safe_test.go", |
| + "line_sha256": "9c6127d8b5239e9fc3f39f9b6f3791e149931ce1f5ee92dd8386a69a9bade983", |
| + "match": "equipo-runner", |
| + "count": 1, |
| + "reason": "Installer safety (2026-11-28): the runner's install paths and the pinned srt npm install, kept aside and put back, and their tests." |
| + }, |
| + { |
| + "path": "cmd/equipo-runner/install_linux_safe_test.go", |
| + "line_sha256": "8fd21238afaeadc593ecf2ec24fdde751a1aaa8063392b77b6cbce5519ecbcf0", |
| + "match": "equipo-runner", |
| + "count": 1, |
| + "reason": "Installer safety (2026-11-28): the runner's install paths and the pinned srt npm install, kept aside and put back, and their tests." |
| + }, |
| + { |
| + "path": "cmd/equipo-runner/install_linux_safe_test.go", |
| + "line_sha256": "212b801bda217e8184186ceb72c0db22a1329c3acf589d2a053af759fd3663d1", |
| + "match": "equipo-runner", |
| + "count": 1, |
| + "reason": "Installer safety (2026-11-28): the runner's install paths and the pinned srt npm install, kept aside and put back, and their tests." |
| + }, |
| + { |
| + "path": "cmd/equipo-runner/install_linux_safe_test.go", |
| + "line_sha256": "75d27e74d1da3a4bb85660215576a34a9426eb9b62893d5887945118bacb5ad2", |
| + "match": "equipo-runner", |
| + "count": 1, |
| + "reason": "Installer safety (2026-11-28): the runner's install paths and the pinned srt npm install, kept aside and put back, and their tests." |
| + }, |
| + { |
| + "path": "cmd/equipo-runner/install_linux_safe_test.go", |
| + "line_sha256": "8edee8b510f511192904a97253019553ad78d889a652094c52480ea911a2f4eb", |
| + "match": "equipo-runner", |
| + "count": 1, |
| + "reason": "Installer safety (2026-11-28): the runner's install paths and the pinned srt npm install, kept aside and put back, and their tests." |
| } |
| ] |