oficina / equipo Public

Merge uses the agent-wide credential; local refusals are definite

Task tkbstr6cjl7h (amadan.net/paulca/nearys, created by the runner)
failed its merge four times with "merge outcome unknown: merge refused
by validation" though the hub was never contacted. The credential file
has per-repository entries only and no entry for nearys; push fell back
to the agent-wide credential, merge's FileCredentials.Credential did
not, and the local refusal was then wrapped as uncertain and retried.

A. One scoped lookup, fileForge.credential, now serves push, merge, CI
   reads and the start check: a repository's own entry, else (only for
   a repository already in scope: created here or listed by the hub
   with the agent-wide bearer) the agent-wide credential, the same one
   Create and the hub's list use, so it adds no reach. A repository
   with its own entry never falls back (an unusable entry is refused);
   a repository out of scope (a read grant, say) is refused by policy
   before any lookup. FileCredentials.Credential itself is unchanged
   and still refuses unlisted repositories for its other callers.
B. forge.NotSentError marks a refusal made before any merge request
   (scope, credential, HubMerge's own checks, routing). MergeBranch
   returns it as definite, without reconciling, and puts the record
   back to the phase it had (prepared), so a later Merge asks again.
   The step ends at once with reason merge_credential (new, in
   wire.StepReasons; copy pending review) and a log tail naming the
   repository, never a credential. Uncertain stays only for outcomes
   the hub may have acted on. Older instances record the reason as
   unknown.
C. At start, with repository creation on, each repository in
   created-repos.json is checked by the same lookup (files only, no hub
   call); a missing credential logs one fixed warning naming it.

Tests (written first, failing to compile before the change):
forge TestMergeBranchLocalRefusalIsDefinite,
TestHubMergeRefusesLocallyBeforeSending, TestNotSentNamesOnlyAValidRepository;
thin TestMergeCredentialFallsBackForCreatedRepos,
TestMergeCredentialStaysInScope, TestMergeStepLocalRefusal,
TestCheckCreatedCredentials.

Mutation checks (each guard broken, its test failed, then restored):
M1 no agent-wide fallback -> TestMergeCredentialFallsBackForCreatedRepos FAIL
M2 merge scope check dropped -> TestMergeCredentialStaysInScope FAIL
M3 own unusable entry falls back -> TestMergeCredentialStaysInScope FAIL
M4 NotSent treated as uncertain -> TestMergeBranchLocalRefusalIsDefinite FAIL
M5 record left at requested -> TestMergeBranchLocalRefusalIsDefinite FAIL
M6 no merge_credential reason -> TestMergeStepLocalRefusal FAIL
M7 local refusal retried -> TestMergeStepLocalRefusal FAIL
M8 HubMerge bearer refusal not NotSent ->
   TestHubMergeRefusesLocallyBeforeSending FAIL
M9 start check runs with creation off -> TestCheckCreatedCredentials FAIL
M10 start check silent -> TestCheckCreatedCredentials FAIL

Local: go test ./internal/runner/forge ./internal/wire/... (ok);
./internal/runner/thin -run 'Merge|Forge|Access|Remote|Push|CIHosted|
CIStatus|Create|Adopt|Startup|Clone|Catalog|Index|Reach' (ok);
./internal/thintest -run 'Merge|Review' (ok); ./internal/equipo
-run 'Copy|StepReasons' (ok); go vet, gofmt, make staticcheck clean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 6663c9f5ce7dd8d05934f45446fd165e33e2bef9 parent 927a031
10 files changed, +424 −20
  • docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md +1 −0
  • internal/equipo/copy.go +1 −0
  • internal/runner/forge/merge.go +56 −5
  • internal/runner/forge/merge_notsent_test.go +84 −0
  • internal/runner/thin/forge.go +66 −14
  • internal/runner/thin/forges.go +1 −1
  • internal/runner/thin/merge_credential_test.go +194 −0
  • internal/runner/thin/mergestep.go +8 −0
  • internal/runner/thin/run.go +3 −0
  • internal/wire/tasks.go +10 −0

CI failed — run details

CI log
=== prepare ===
ci-box: machine: aarch64, 32 CPUs, 62 GiB memory, kernel 7.0.0-1017-aws
ci-box: python 3.12.3; Docker version 29.1.3, build 29.1.3-0ubuntu3~24.04.2
ci-box: user namespaces allowed: 233151
ci-box: cgroup: cgroup2fs
ci-box: disk /home/ci/work/repos/oficina__equipo/wt/merge-credential-fallback: 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 2.2s
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.4s
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.6s
ci-box: opencode: installed and verified in 2.2s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 8.7s
ci-box: clone deepened in 3.8s
ci-box: file times set from content: 2989 files, 193 directories
ci-box: ready in 17.5s
=== copy ===
EQUIPO_RELEASE_COPY_CHECK=1 CGO_ENABLED=0 go test ./internal/equipotest -run '^TestReleaseCopyReviewed$' -count=1
ok  	amadan.net/oficina/equipo/internal/equipotest	0.149s
=== compile ===
go build ./...
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py compile
+ go build -tags testbuild ./...
  4.1s
+ go list -export -test -tags testbuild -f  ./...
  4.7s
+ go list -export -test -tags browser,testbuild -f  ./internal/equipo ./internal/headless ./internal/idtest ./internal/plan3test ./internal/thintest
  3.2s
rastrillo: budget size: 4 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 1m16.632s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m14.93s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m14.93s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 65.25, cpu waiting 39.87%, memory waiting 0.00%, io waiting 0.52%
--- 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 1m17.329s 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.606s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m15.6s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 65.25, cpu waiting 39.85%, memory waiting 0.00%, io waiting 0.50%
--- 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 1m17.478s 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.34s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m6.27s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 5s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 4.07s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 65.25, cpu waiting 39.87%, memory waiting 0.00%, io waiting 0.52%
--- 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 1m14.517s 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.674s amadan.net/oficina/equipo/internal/headless
receipt: slow test 36.13s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 18.88s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.15s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
receipt: slow test 8.52s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
machine: 32 CPUs, load 65.25, cpu waiting 39.87%, memory waiting 0.00%, io waiting 0.54%
--- 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 1m32.574s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m30.844s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m1.77s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.16s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 8.36s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 7s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 4.55s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
machine: 32 CPUs, load 61.98, cpu waiting 39.15%, memory waiting 0.00%, io waiting 0.39%
--- 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 2m43.115s 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 2m40.945s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m35.98s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistant
receipt: slow test 18.32s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 8.55s amadan.net/oficina/equipo/internal/headless TestHeadlessResearchHandoff
receipt: slow test 6.55s amadan.net/oficina/equipo/internal/headless TestHeadlessTurnBatching
receipt: slow test 6.42s amadan.net/oficina/equipo/internal/headless TestHeadlessBatchAfterRefusedReply
machine: 32 CPUs, load 26.32, cpu waiting 13.35%, 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 2m9.889s 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 2m8.033s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 8.4s amadan.net/oficina/equipo/internal/thintest TestContractTeamJobSettledStates
receipt: slow test 6.78s amadan.net/oficina/equipo/internal/thintest TestExplorePreviewsOff
receipt: slow test 3.83s amadan.net/oficina/equipo/internal/thintest TestContractPreviewHeldUntilPublishAnswer
receipt: slow test 3.69s amadan.net/oficina/equipo/internal/thintest TestContractTeamNudgePersonNeeds
receipt: slow test 2.45s amadan.net/oficina/equipo/internal/thintest TestResearchDoneFallsBack
machine: 32 CPUs, load 39.83, cpu waiting 22.58%, memory waiting 0.00%, io waiting 0.20%
--- 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 1m30.665s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m28.687s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 9.26s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 5.01s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotOffered
receipt: slow test 4.51s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
receipt: slow test 2.34s amadan.net/oficina/equipo/internal/thintest TestContractPublishNameTaken
receipt: slow test 2.34s amadan.net/oficina/equipo/internal/thintest TestContractPreview
machine: 32 CPUs, load 63.81, cpu waiting 39.32%, memory waiting 0.00%, io waiting 0.41%
--- 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 4m48.025s, over the 45s its record on line 44 allows; reported only, timing fails on CI

receipt: test step 4m53.69s 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 4m48.025s amadan.net/oficina/equipo/internal/runner/thin
receipt: slow test 37.04s amadan.net/oficina/equipo/internal/runner/thin TestModelsEngineeringProbesThenRunsTheStrongest
receipt: slow test 37.01s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeAnsweredByAnotherModel
receipt: slow test 36.82s amadan.net/oficina/equipo/internal/runner/thin TestModelsUnhealthyRetriedOnDemand
receipt: slow test 18.47s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeRunsInsideTheAdmission
receipt: slow test 6.9s amadan.net/oficina/equipo/internal/runner/thin TestOpenCodeStepsRealOpenCode
machine: 32 CPUs, load 3.64, cpu waiting 1.53%, memory waiting 0.00%, io waiting 0.00%
--- shard 9 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-bug: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestDirectBugWorkflow$|^TestEnrolKeepsTheRole$' ./internal/runner

receipt: test step 51.209s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 50.236s amadan.net/oficina/equipo/internal/runner
receipt: slow test 30.2s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.03s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 52.93, cpu waiting 33.73%, memory waiting 0.00%, io waiting 0.80%
--- shard 10 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-plans: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestPlanWorkflowCandidateOrder$|^TestPlanWorkflowFeature$|^TestCoordinatorRecoveryCallRefusalKeepsServing$|^TestCoordinatorRefusalMatrix$' ./internal/runner

receipt: test step 1m1.679s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m0.525s amadan.net/oficina/equipo/internal/runner
receipt: slow test 50.46s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 46.04s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.41s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.64s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 61.28, cpu waiting 38.98%, memory waiting 0.00%, io waiting 0.68%
--- 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.069s 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.199s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.14s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.32s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.14s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 2.75s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 1.61s amadan.net/oficina/equipo/internal/runner TestReportPostsRetryExactRequest
machine: 32 CPUs, load 33.14, cpu waiting 22.56%, memory waiting 0.00%, io waiting 1.02%
--- shard 12 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-a started 30s late; cpu waiting 39.5%, load 23.05
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 1m8.338s 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.337s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 28.1s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 28.07s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 25.78s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 23.24s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
receipt: slow test 22.85s amadan.net/oficina/equipo/internal/equipotest TestAuthorityReadsOneSnapshot
machine: 32 CPUs, load 58.54, cpu waiting 37.38%, memory waiting 0.00%, io waiting 0.36%
--- shard 13 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-e started 30s late; cpu waiting 39.8%, load 23.05
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 1m17.939s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m16.303s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 20.23s amadan.net/oficina/equipo/internal/equipotest TestProjectWritesRequireCurrentOwner
receipt: slow test 20.2s amadan.net/oficina/equipo/internal/equipotest TestProjectsFailuresRollBack
receipt: slow test 20.18s amadan.net/oficina/equipo/internal/equipotest TestProjectRejectsUnsafeBinding
receipt: slow test 20.16s amadan.net/oficina/equipo/internal/equipotest TestProjectOwnersAreMembers
receipt: slow test 20.09s amadan.net/oficina/equipo/internal/equipotest TestProjectsReopen
machine: 32 CPUs, load 55.05, cpu waiting 33.09%, memory waiting 0.00%, io waiting 0.31%
--- 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.5%, load 23.05
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 1m14.237s 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 1m9.15s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 15.36s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 13.44s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 10.44s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 10.4s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 7.34s amadan.net/oficina/equipo/internal/equipotest TestRosterBootstrapOnce
machine: 32 CPUs, load 55.05, cpu waiting 34.17%, memory waiting 0.00%, io waiting 0.32%
--- shard 15 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-rest started 30s late; cpu waiting 39.5%, load 23.05
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.934s 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.407s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 25.69s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 25.64s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 25.59s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 23.86s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsCurrentOwner
receipt: slow test 23.82s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsUpgrade
machine: 32 CPUs, load 58.54, cpu waiting 37.38%, memory waiting 0.00%, io waiting 0.36%
--- shard 16 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: plan3test started 30s late; cpu waiting 39.8%, load 23.05
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.33s)

--- 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 work.reason.merge_credential
--- FAIL: TestPlan3ReleaseBoundaries/inventory (0.01s)

--- FAIL amadan.net/oficina/equipo/internal/plan3test (package output)
FAIL
rastrillo-budget/v1 ran 53.265s
FAIL	amadan.net/oficina/equipo/internal/plan3test	53.552s


receipt: test step 54.913s 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.265s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 3.76s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 3.52s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 1.72s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.6s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3A
receipt: slow test 1.31s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorMessageSourcesUpgrade
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 work.reason.merge_credential
--- FAIL: TestPlan3ReleaseBoundaries (0.02s)
    --- FAIL: TestPlan3ReleaseBoundaries/inventory (0.02s)
FAIL
rastrillo-budget/v1 ran 19ms
FAIL	amadan.net/oficina/equipo/internal/plan3test	0.226s
FAIL
machine: 32 CPUs, load 63.01, cpu waiting 39.24%, memory waiting 0.00%, io waiting 0.44%
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.5%, load 23.05
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/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/door ./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/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/door ./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/runner/provider/claude/realcli: 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/containment: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/opencode: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/wire/wireschema: 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:308 Reason: File:s001.txt}
--- FAIL: TestTimeouts (0.66s)

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

budget note: internal/equipo took 53.69s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/equipo/chat took 20.241s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/equipo/setup took 11.705s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/idtest took 1m58.999s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/release took 37.921s, 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 50.022s, over the 15s its record on line 40 allows; reported only, timing fails on CI
budget note: internal/runner/forge took 22.789s, over the 20s its record on line 35 allows; reported only, timing fails on CI
budget note: internal/runner/provider/claude/realcli took 14.554s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/runner/workspace took 14.098s, over the 10s the default allows; reported only, timing fails on CI

receipt: test step 2m13.077s against a 60s target (the gate's other steps are not in this figure)
receipt: 24 packages ran, 41 cached, 17 without tests, 1 failed
receipt: slow package 1m58.999s amadan.net/oficina/equipo/internal/idtest
receipt: slow package 1m8.974s amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow package 58.076s amadan.net/oficina/equipo/internal/runner/provider/pi
receipt: slow package 55.459s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 53.69s amadan.net/oficina/equipo/internal/equipo
receipt: slow test 54.78s amadan.net/oficina/equipo/internal/idtest TestDoorRemembersOficinaID
receipt: slow test 46.57s amadan.net/oficina/equipo/internal/idtest TestDoorNeverJudgesANativeSession
receipt: slow test 46.14s amadan.net/oficina/equipo/internal/idtest TestDoorForgetsOficinaIDForARefusedSession
receipt: slow test 46.07s amadan.net/oficina/equipo/internal/idtest TestDoorOficinaSettingsUnreadableIsNoLoop
receipt: slow test 44.75s amadan.net/oficina/equipo/internal/idtest TestDoorStepUpIsLocal
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 6663c9f5ce7dd8d05934f45446fd165e33e2bef9 0.66s 24.29
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 24.29, cpu waiting 12.92%, memory waiting 0.00%, io waiting 0.11%
--- 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.637s 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.725s amadan.net/oficina/equipo/internal/headless
receipt: slow test 39.23s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 14.94s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 10.09s amadan.net/oficina/equipo/internal/headless TestBrowserChat
receipt: slow test 7.16s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 6.29s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
machine: 32 CPUs, load 63.01, cpu waiting 39.24%, memory waiting 0.00%, io waiting 0.44%
--- 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 1m29.85s 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 1m28.372s amadan.net/oficina/equipo/internal/headless
receipt: slow test 27.52s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 20.5s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 13.22s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 9.2s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
receipt: slow test 9.08s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
machine: 32 CPUs, load 63.81, cpu waiting 39.15%, memory waiting 0.00%, io waiting 0.39%
--- 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 1m52.317s 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 1m50.53s amadan.net/oficina/equipo/internal/headless
receipt: slow test 13.43s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 13.39s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 12.05s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 11.29s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsSignInEmail
receipt: slow test 11.25s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
machine: 32 CPUs, load 52.24, cpu waiting 30.07%, memory waiting 0.00%, io waiting 0.28%
--- 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|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInEmail|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' ./internal/headless
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserCopyContinue
=== RUN   TestBrowserCopyContinue
time=2026-11-25T19:56:15.892Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-25T19:56:15.892Z level=INFO msg="startup phase done" phase=state_lock took=259µs
time=2026-11-25T19:56:15.892Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-25T19:56:15.893Z level=INFO msg="startup phase done" phase=claim_roots took=252µs
time=2026-11-25T19:56:15.893Z level=INFO msg="startup phase" phase=sweep
time=2026-11-25T19:56:15.945Z level=INFO msg="startup phase done" phase=sweep took=51.907ms
time=2026-11-25T19:56:15.945Z level=INFO msg="startup phase" phase=credentials
time=2026-11-25T19:56:15.945Z level=INFO msg="startup phase done" phase=credentials took=216µs
time=2026-11-25T19:56:15.945Z level=INFO msg="startup phase" phase=open_state
time=2026-11-25T19:56:16.017Z level=INFO msg="startup phase done" phase=open_state took=71.645ms
time=2026-11-25T19:56:16.018Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-25T19:56:16.021Z level=INFO msg=connecting host=127.0.0.1:44125 protocol=29
time=2026-11-25T19:56:16.024Z level=INFO msg=connected host=127.0.0.1:44125 took=3.123ms
time=2026-11-25T19:56:16.024Z level=INFO msg="capabilities gathering"
time=2026-11-25T19:56:16.025Z level=INFO msg="capabilities gathered" took=1.112ms tags=linux,claude,go
time=2026-11-25T19:56:16.028Z level=INFO msg="hello sent" protocol=29
time=2026-11-25T19:56:16.035Z level=INFO msg=welcome protocol=29 role=primary generation=1
    browser_copy_test.go:90: waiting for !document.querySelector('[data-copy-continue]'): context deadline exceeded (last evaluation: context deadline exceeded)
--- FAIL: TestBrowserCopyContinue (6.44s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m31.964s
FAIL	amadan.net/oficina/equipo/internal/headless	92.191s


receipt: test step 1m33.688s 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 1m31.964s amadan.net/oficina/equipo/internal/headless
receipt: slow test 14.85s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
receipt: slow test 11.42s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 9.63s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 9.37s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 7.73s amadan.net/oficina/equipo/internal/headless TestBrowserNotebookLook
exit status 1
+ go test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAskAfterMerge|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInEmail|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' -v -run '^TestBrowserCopyContinue$' -count=1 ./internal/headless   (retry, once)
##############################################################################
FLAKE ./internal/headless:TestBrowserCopyContinue browser-headless-rest 6663c9f5ce7dd8d05934f45446fd165e33e2bef9 6.44s 61.98
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 58.54, cpu waiting 37.38%, memory waiting 0.00%, io waiting 0.36%
--- 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)$' ./internal/equipo

receipt: test step 2.118s 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 479ms amadan.net/oficina/equipo/internal/equipo
receipt: slow test 480ms amadan.net/oficina/equipo/internal/equipo TestBrowserPreviewBlocksNavigation
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.655s, over the 10s the default allows; reported only, timing fails on CI

receipt: test step 12.066s 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.655s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 8.54s amadan.net/oficina/equipo/internal/idtest TestBrowserSmartDoor
receipt: slow test 2.11s 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.647s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 2.069s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 2.07s 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 3m36.591s 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 3m34.982s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 23.04s amadan.net/oficina/equipo/internal/thintest TestBrowserAccessRequest
receipt: slow test 14.42s amadan.net/oficina/equipo/internal/thintest TestBrowserSettingsTeams
receipt: slow test 12.01s amadan.net/oficina/equipo/internal/thintest TestBrowserThinkingCycles
receipt: slow test 10.61s amadan.net/oficina/equipo/internal/thintest TestBrowserPlacementQuestionAndPending
receipt: slow test 8.86s amadan.net/oficina/equipo/internal/thintest TestBrowserRhythm
machine: 32 CPUs, load 8.64, cpu waiting 3.89%, memory waiting 0.00%, io waiting 0.02%
--- shard 23 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
shard 23: make test-quarantine
python3 scripts/ci-test.py quarantine
quarantine: 12 tests from scripts/ci-quarantine.txt; a failure is retried once, and a pass on the retry is reported as a flake
+ go test -tags testbuild -timeout 15m -v -run '^TestHeadlessConnections$/^A5_cancel_and_sign_out$|^TestHeadlessConnections$/^C4_claude_sign_in$|^TestHeadlessConnections$/^C5_engineering_failover$|^TestHeadlessConnections$/^C5_engineering_to_codex$|^TestHeadlessConnections$/^C5_engineering_waits$' ./internal/headless   (53s)
ok ./internal/headless TestHeadlessConnections/A5_cancel_and_sign_out 4.66s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.16s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 9.13s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 8.14s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 26.80s
+ 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   (62s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 14.37s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 20.22s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 10.13s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 15.11s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless   (21s)
ok ./internal/headless TestMixedVersions 18.98s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks   (2s)
ok ./internal/runner/checks TestCheckSandboxDeniedPathsTampering 0.81s
+ 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 61.28, cpu waiting 39.24%, memory waiting 0.00%, io waiting 0.66%
--- shard 24 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
shard 24: make runner-host
python3 scripts/runner-prerequisites.py
CGO_ENABLED=0 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks

receipt: test step 14.014s 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 8.331s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 188ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 85ms 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 6.05s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.69s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 460ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 190ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 100ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxToolchain
CGO_ENABLED=0 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.61s 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.137s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 310ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 220ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof
receipt: slow test 130ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryCleansScratch
receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceExitStatus
machine: 32 CPUs, load 16.72, cpu waiting 12.08%, memory waiting 0.00%, io waiting 1.38%
--- shard 25 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: runner-dead-references started 30s late; cpu waiting 39.5%, load 23.05
shard 25: make runner-dead-references lanes-check build vet fmt-check spacing budget migration-check
python3 scripts/runner-dead-references.py
reference scan: 2702 text files, 3210 matches, 0 failures
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: 22565 source lines, over the 22564 its exemption (line 17) allows
internal/runner/thin: 22907 test lines, over the 22713 its exemption (line 41) allows
internal/runner/thin: 28541 source lines, over the 28478 its exemption (line 41) allows
internal/wire: 6956 source lines, over the 6946 its exemption (line 18) allows
rastrillo: budget size: 4 problem(s)
exit status 1
make[1]: *** [Makefile:75: budget] Error 1
machine: 32 CPUs, load 64.14, cpu waiting 39.87%, memory waiting 0.00%, io waiting 0.59%
make: *** [Makefile:113: ci-shard] Error 2

amadan: step check shard 25 of 29 failed: exit status 2
--- shard 26 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: staticcheck started 30s late; cpu waiting 39.5%, load 23.05
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 59.91, cpu waiting 36.67%, memory waiting 0.00%, io waiting 0.75%
--- shard 27 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: govulncheck started 30s late; cpu waiting 39.5%, load 23.05
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 0 vulnerabilities in packages you import and 3
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 33.14, cpu waiting 22.56%, memory waiting 0.00%, io waiting 1.02%
--- shard 28 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: gitleaks started 30s late; cpu waiting 39.8%, load 23.05
shard 28: make gitleaks
7:56PM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
7:56PM INF 1152 commits scanned.
7:56PM INF scanned ~65813538 bytes (65.81 MB) in 24s
7:56PM INF no leaks found
machine: 32 CPUs, load 59.91, cpu waiting 35.34%, memory waiting 0.00%, io waiting 0.78%

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/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
index 2d0d402b..7157310e 100644
--- a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
+++ b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
@@ -6904,6 +6904,7 @@ records remain unchanged.
| `api.already_running` | A request to run this work is already in progress. | A second Run now for the same hold (paused work review S2) | COPY ACCEPTED BY DELEGATION (Luna, 2026-11-24) |
| `api.offer_changed` | The option to run this work has changed. Check the current option, then try again. | A Run now tap whose offer changed since the page was drawn (paused work re-review R1) | COPY ACCEPTED BY DELEGATION (Luna, 2026-11-24) |
| `work.pause.run_now_may_bill` | This may use a plan that bills per use. | Under plain Run it now anyway, for an older runner, when a pay-per-use connection could take it (re-review R1) | COPY ACCEPTED BY DELEGATION (Luna, 2026-11-24) |
+| `work.reason.merge_credential` | the runner has no Amadan credential for this repository | Copy specialist | COPY REVIEW PENDING |
## Task 21
diff --git a/internal/equipo/copy.go b/internal/equipo/copy.go
index 824e399e..f87a4799 100644
--- a/internal/equipo/copy.go
+++ b/internal/equipo/copy.go
@@ -1057,6 +1057,7 @@ var pageCopy = map[string]string{
"work.reason.merge_forbidden": "Equipo may not merge in this repository", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
"work.reason.merge_failed": "Amadan did not merge it", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
"work.reason.merge_unborn_default": "the first merge into this empty repository needs an Amadan update", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-11)
+ "work.reason.merge_credential": "the runner has no Amadan credential for this repository", // COPY REVIEW PENDING
"chat.card.merge_question": "Merge %s without checks?", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
"chat.card.merge": "Merge", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
"chat.card.wait": "Wait for checks", // COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)
diff --git a/internal/runner/forge/merge.go b/internal/runner/forge/merge.go
index e0c78c4d..a4280c87 100644
--- a/internal/runner/forge/merge.go
+++ b/internal/runner/forge/merge.go
@@ -39,8 +39,41 @@ var (
// the hub refused to make the first merge (unborn_default, or
// is_default once a rebuild pointed its HEAD at the task branch).
ErrMergeUnbornDefault = errors.New("forge: the hub cannot make the first merge into an empty repository")
+ // ErrMergeNoCredential: the runner has no usable forge credential for
+ // the repository (none in the credential file, and it is not one the
+ // agent-wide credential serves), so it refused the merge itself.
+ ErrMergeNoCredential = errors.New("forge: no usable forge credential for the repository")
)
+// NotSentError is a merge Equipo refused itself before any merge request
+// left for the hub: a definite refusal, never "outcome unknown", since the
+// hub cannot have acted on it. Only code that has sent no merge request
+// returns one.
+type NotSentError struct {
+ // Repo is the repository refused, "" when it is not a valid hub key.
+ Repo string
+ Err error
+}
+
+func (e *NotSentError) Error() string {
+ repo := e.Repo
+ if repo == "" {
+ repo = "this repository"
+ }
+ return fmt.Sprintf("%v (%s; refused by the runner, no merge request was sent)", e.Err, repo)
+}
+
+func (e *NotSentError) Unwrap() error { return e.Err }
+
+// NotSent is err as a refusal made before the merge request, naming repo
+// only when it is a valid hub repository.
+func NotSent(repo string, err error) error {
+ if !validRepository(repo) {
+ repo = ""
+ }
+ return &NotSentError{Repo: repo, Err: err}
+}
+
// HubError is the hub's answer to a merge it did not make: its HTTP
// status, its machine-readable reason (the JSON "reason") and its
// sentence (the JSON "error", or a page's text), both redacted and
@@ -65,7 +98,8 @@ func hubError(res MergeResult, err error) error {
// uncertain is ErrMergeUncertain with what is known of why: the hub's
// answer when it gave one, else the cause's words. Only the words: a
-// cause's own identity (a local refusal, say) never decides the outcome.
+// cause's own identity never decides the outcome (MergeBranch settles a
+// NotSentError, the one refusal known to have sent nothing, before this).
func uncertain(res MergeResult, cause error) error {
switch {
case res.Status != 0:
@@ -149,16 +183,20 @@ type hubMergeBody struct {
// HubMerge sends one merge request to the hub with the agent's bearer.
// A transport failure or an unreadable answer is an error: the caller
-// cannot know whether the merge happened.
+// cannot know whether the merge happened. What it refuses before sending
+// is a NotSentError.
func HubMerge(ctx context.Context, client *http.Client, hub string, cred Credential, repo, branch string, req MergeRequest) (MergeResult, error) {
- if !validRepository(repo) || !validRef(branch) || cred.Bearer == "" || strings.ContainsAny(cred.Bearer, "\r\n") {
- return MergeResult{}, ErrMergeRefused
+ if !validRepository(repo) || !validRef(branch) {
+ return MergeResult{}, NotSent(repo, ErrMergeRefused)
+ }
+ if cred.Bearer == "" || strings.ContainsAny(cred.Bearer, "\r\n") {
+ return MergeResult{}, NotSent(repo, ErrMergeNoCredential)
}
parts := strings.Split(strings.TrimPrefix(repo, "amadan.net/"), "/")
body, _ := json.Marshal(req)
hr, err := http.NewRequestWithContext(ctx, http.MethodPost, strings.TrimRight(hub, "/")+"/api/v1/repos/"+url.PathEscape(parts[0])+"/"+url.PathEscape(parts[1])+"/branches/"+url.PathEscape(branch)+"/merge", bytes.NewReader(body))
if err != nil {
- return MergeResult{}, ErrMergeRefused
+ return MergeResult{}, NotSent(repo, ErrMergeRefused)
}
hr.Header.Set("Authorization", "Bearer "+cred.Bearer)
hr.Header.Set("Content-Type", "application/json")
@@ -401,6 +439,7 @@ func MergeBranch(ctx context.Context, m BranchMerge) (MergeOutcome, error) {
return MergeOutcome{}, ErrMergeUncertain
}
}
+ before := rec.Phase
if err := m.Confirm(ctx); err != nil {
return MergeOutcome{}, fmt.Errorf("%w: confirming the lease: %v", ErrMergeUncertain, err)
}
@@ -412,6 +451,18 @@ func MergeBranch(ctx context.Context, m BranchMerge) (MergeOutcome, error) {
m.beforeRequest()
}
res, rerr := m.Request(ctx, MergeRequest{ExpectSHA: m.Commit, Message: m.Message, Strategy: m.Strategy, Agent: m.Agent})
+ var notSent *NotSentError
+ if errors.As(rerr, &notSent) {
+ // Refused here before anything left for the hub: definite, and
+ // nothing to reconcile. The record goes back to where it was
+ // (prepared, unless an earlier request may be with the hub), so a
+ // later Merge asks as usual.
+ rec.Phase = before
+ if err := m.save(rec); err != nil {
+ return MergeOutcome{}, ErrMergeUncertain
+ }
+ return MergeOutcome{}, rerr
+ }
if rerr == nil && res.Merged {
rec.Phase, rec.SHA, rec.Into = mergeMerged, res.SHA, firstOf(res.Into, st.Default)
if err := m.save(rec); err != nil {
diff --git a/internal/runner/forge/merge_notsent_test.go b/internal/runner/forge/merge_notsent_test.go
new file mode 100644
index 00000000..b452f1bc
--- /dev/null
+++ b/internal/runner/forge/merge_notsent_test.go
@@ -0,0 +1,84 @@
+package forge
+
+import (
+ "context"
+ "errors"
+ "net/http"
+ "net/http/httptest"
+ "strings"
+ "sync/atomic"
+ "testing"
+)
+
+// TestMergeBranchLocalRefusalIsDefinite: a merge Equipo refuses itself
+// before any request leaves for the hub (no usable credential, say) is a
+// definite refusal with its own reason, never "outcome unknown": the
+// remote is not read again to reconcile, the record goes back to the phase
+// it had (prepared), and a later call asks the hub as usual.
+func TestMergeBranchLocalRefusalIsDefinite(t *testing.T) {
+ h := &fakeHub{head: strings.Repeat("a", 40), answer: mergeNow}
+ m := newMerge(t, h)
+ var inspects atomic.Int32
+ m.Inspect = func(ctx context.Context) (RemoteState, error) { inspects.Add(1); return h.inspect(ctx) }
+ refusing := m
+ refusing.Request = func(context.Context, MergeRequest) (MergeResult, error) {
+ return MergeResult{}, NotSent(m.Repo, ErrMergeNoCredential)
+ }
+ _, err := MergeBranch(context.Background(), refusing)
+ if !errors.Is(err, ErrMergeNoCredential) || errors.Is(err, ErrMergeUncertain) {
+ t.Fatalf("local refusal: %v", err)
+ }
+ if !strings.Contains(err.Error(), m.Repo) || strings.Contains(err.Error(), "outcome unknown") {
+ t.Fatalf("local refusal words: %v", err)
+ }
+ if inspects.Load() != 1 {
+ t.Fatalf("a local refusal read the remote %d times", inspects.Load())
+ }
+ if rec, ok, _ := m.load(); !ok || rec.Phase != mergePrepared {
+ t.Fatalf("record after a local refusal: %+v", rec)
+ }
+ out, err := MergeBranch(context.Background(), m)
+ if err != nil || out.Source != SourceHub || len(h.requests) != 1 {
+ t.Fatalf("after the refusal %+v %v (%d requests)", out, err, len(h.requests))
+ }
+}
+
+// TestNotSentNamesOnlyAValidRepository: the refusal's words name the
+// repository only when it is a valid hub key.
+func TestNotSentNamesOnlyAValidRepository(t *testing.T) {
+ if err := NotSent("amadan.net/../x\nInjected", ErrMergeRefused); strings.Contains(err.Error(), "Injected") || !errors.Is(err, ErrMergeRefused) {
+ t.Fatalf("invalid repository named: %v", err)
+ }
+}
+
+// TestHubMergeRefusesLocallyBeforeSending: HubMerge's own refusals (no
+// bearer, a bad repository or branch) are made before any request and
+// say so; the hub is never contacted.
+func TestHubMergeRefusesLocallyBeforeSending(t *testing.T) {
+ var hits atomic.Int32
+ srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { hits.Add(1); w.WriteHeader(500) }))
+ defer srv.Close()
+ req := MergeRequest{ExpectSHA: strings.Repeat("a", 40), Strategy: "merge"}
+ for _, c := range []struct {
+ cred Credential
+ repo, branch string
+ want error
+ }{
+ {Credential{Agent: "equipo~p@example.com"}, "amadan.net/oficina/sample", "equipo/tk1-x", ErrMergeNoCredential},
+ {Credential{Agent: "equipo~p@example.com", Bearer: "a\nb"}, "amadan.net/oficina/sample", "equipo/tk1-x", ErrMergeNoCredential},
+ {Credential{Agent: "equipo~p@example.com", Bearer: "token"}, "github.com/x/y", "equipo/tk1-x", ErrMergeRefused},
+ {Credential{Agent: "equipo~p@example.com", Bearer: "token"}, "amadan.net/oficina/sample", "bad..ref", ErrMergeRefused},
+ } {
+ _, err := HubMerge(context.Background(), srv.Client(), srv.URL, c.cred, c.repo, c.branch, req)
+ var ns *NotSentError
+ if !errors.Is(err, c.want) || !errors.As(err, &ns) || errors.Is(err, ErrMergeUncertain) {
+ t.Fatalf("%+v %s %s: %v", c.cred.Agent, c.repo, c.branch, err)
+ }
+ if strings.Contains(err.Error(), "token") {
+ t.Fatalf("bearer in the refusal: %v", err)
+ }
+ }
+ if hits.Load() != 0 {
+ t.Fatalf("the hub was contacted %d times", hits.Load())
+ }
+}
diff --git a/internal/runner/thin/forge.go b/internal/runner/thin/forge.go
index 156c80a3..59de50c7 100644
--- a/internal/runner/thin/forge.go
+++ b/internal/runner/thin/forge.go
@@ -11,6 +11,7 @@ import (
"errors"
"fmt"
"io"
+ "log/slog"
"net/http"
"os"
"os/exec"
@@ -168,17 +169,62 @@ func (f *fileForge) Remote(ctx context.Context, repo string, use Use) (workspace
}
func (f *fileForge) remoteCredential(ctx context.Context, repo string) (workspace.Remote, error) {
- names, _ := f.creds.RepositoryNames()
- if !slices.Contains(names, repo) {
- // Created or reachable through the agent's namespace grant: the
- // agent-wide git password serves them.
- c, err := f.agent(ctx)
- if err != nil || c.GitPassword == "" {
- return workspace.Remote{}, workspace.ErrGitPassword
+ if names, _ := f.creds.RepositoryNames(); slices.Contains(names, repo) {
+ return f.creds.Resolve(ctx, repo)
+ }
+ // Created or reachable through the agent's namespace grant: the
+ // agent-wide git password serves them.
+ c, err := f.credential(ctx, repo)
+ if err != nil || c.GitPassword == "" {
+ return workspace.Remote{}, workspace.ErrGitPassword
+ }
+ return workspace.Remote{URL: "https://" + repo, GitPassword: c.GitPassword}, nil
+}
+
+// credential is the forge credential for repo, which the caller has
+// already found in scope (Repos for writes, Reachable for reads): its own
+// entry in the credential file, or else, for a repository the runner
+// created or the agent reaches through a grant, the agent-wide credential
+// (the one Create and the hub's list use, so it adds no reach). A
+// repository with its own entry never falls back: an unusable entry is
+// refused, not replaced. Push, merge, CI reads and the start check all
+// use this one lookup.
+func (f *fileForge) credential(ctx context.Context, repo string) (forge.Credential, error) {
+ names, err := f.creds.RepositoryNames()
+ if err != nil {
+ return forge.Credential{}, err
+ }
+ if slices.Contains(names, repo) {
+ return f.creds.Credential(ctx, repo)
+ }
+ if !forgekey.ValidHub(repo) {
+ return forge.Credential{}, forge.ErrMergeNoCredential
+ }
+ c, err := f.creds.Agent(ctx)
+ if err != nil {
+ return forge.Credential{}, err
+ }
+ c.Remote = "https://" + repo
+ return c, nil
+}
+
+// createdNoCredential is the start check's warning for a repository the
+// runner created that has no usable credential (its merges are refused).
+const createdNoCredential = "created repository has no usable forge credential; merges there will be refused"
+
+// checkCreated warns, once per repository, about each repository this
+// runner created that the merge lookup finds no usable credential for.
+// Only with repository creation on; it reads the files, never the hub,
+// and logs the repository, never a credential.
+func (f *fileForge) checkCreated(ctx context.Context, log *slog.Logger) {
+ if !f.enabled || log == nil {
+ return
+ }
+ for _, repo := range f.createdRepos() {
+ if c, err := f.credential(ctx, repo); err != nil || c.Bearer == "" {
+ log.Warn(createdNoCredential, "repo", repo)
}
- return workspace.Remote{URL: "https://" + repo, GitPassword: c.GitPassword}, nil
}
- return f.creds.Resolve(ctx, repo)
}
// list asks the hub which repositories the agent may write to, at most
@@ -315,16 +361,22 @@ func (f *fileForge) adopt(repo string) error {
return ErrAdopted
}
+// errOutOfScope: the repository is not in the credential file, not one
+// the runner created and not one the hub lists as the agent's (a read
+// grant, say). A policy refusal: no credential may be used for it.
+var errOutOfScope = fmt.Errorf("%w: not a repository this runner's agent may write", forge.ErrMergeRefused)
+
// Merge sends the hub the merge request with the agent's credential for
-// repo (its own entry, or the agent-wide one).
+// repo (its own entry, or the agent-wide one, as push uses). Without one
+// it refuses before contacting the hub (forge.NotSent).
func (f *fileForge) Merge(ctx context.Context, repo, branch string, req forge.MergeRequest) (forge.MergeResult, error) {
f.list(ctx)
if !slices.Contains(f.Repos(), repo) {
- return forge.MergeResult{}, forge.ErrMergeRefused
+ return forge.MergeResult{}, forge.NotSent(repo, errOutOfScope)
}
- c, err := f.creds.Credential(ctx, repo)
+ c, err := f.credential(ctx, repo)
if err != nil {
- return forge.MergeResult{}, forge.ErrMergeRefused
+ return forge.MergeResult{}, forge.NotSent(repo, forge.ErrMergeNoCredential)
}
return forge.HubMerge(ctx, f.client, f.hub, c, repo, branch, req)
}
@@ -353,7 +405,7 @@ func (f *fileForge) ciCredential(ctx context.Context, repo string) (forge.Creden
if !slices.Contains(f.Repos(), repo) {
return forge.Credential{}, forge.ErrCIRead
}
- c, err := f.creds.Credential(ctx, repo)
+ c, err := f.credential(ctx, repo)
if err != nil {
return forge.Credential{}, forge.ErrCIRead
}
diff --git a/internal/runner/thin/forges.go b/internal/runner/thin/forges.go
index c2828e79..fc3b7cda 100644
--- a/internal/runner/thin/forges.go
+++ b/internal/runner/thin/forges.go
@@ -96,7 +96,7 @@ func (f *Forges) Propose(ctx context.Context, p Proposal) (ProposalRef, error) {
func (f *Forges) Merge(ctx context.Context, repo, branch string, req forge.MergeRequest) (forge.MergeResult, error) {
fg, key, err := f.route(repo)
if err != nil {
- return forge.MergeResult{}, errors.Join(forge.ErrMergeRefused, err)
+ return forge.MergeResult{}, forge.NotSent(repo, errors.Join(forge.ErrMergeRefused, err))
}
return fg.Merge(ctx, key, branch, req)
}
diff --git a/internal/runner/thin/merge_credential_test.go b/internal/runner/thin/merge_credential_test.go
new file mode 100644
index 00000000..fb548054
--- /dev/null
+++ b/internal/runner/thin/merge_credential_test.go
@@ -0,0 +1,194 @@
+package thin
+
+import (
+ "bytes"
+ "context"
+ "errors"
+ "fmt"
+ "log/slog"
+ "net/http"
+ "net/http/httptest"
+ "os"
+ "path/filepath"
+ "strings"
+ "sync"
+ "testing"
+ "time"
+
+ "amadan.net/oficina/equipo/internal/runner/forge"
+ "amadan.net/oficina/equipo/internal/wire"
+)
+
+// mergeCredRig is a runner forge whose credential file has per-repository
+// entries only (no agent-wide api), as on the runner of tkbstr6cjl7h, and
+// whose state lists created as a repository it made. The hub lists listed
+// as writable and records every merge request's path and bearer.
+type mergeCredRig struct {
+ f *fileForge
+ mu sync.Mutex
+ merges []string
+}
+
+func newMergeCredRig(t *testing.T, file string, created, listed []string) *mergeCredRig {
+ t.Helper()
+ rig := &mergeCredRig{}
+ srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ if r.Method == http.MethodGet && r.URL.Path == "/api/v1/repos" {
+ var parts []string
+ for _, repo := range listed {
+ p := strings.Split(strings.TrimPrefix(repo, "amadan.net/"), "/")
+ parts = append(parts, fmt.Sprintf(`{"ns":%q,"name":%q}`, p[0], p[1]))
+ }
+ fmt.Fprintf(w, `{"repos":[%s]}`, strings.Join(parts, ","))
+ return
+ }
+ if r.Method == http.MethodPost && strings.HasSuffix(r.URL.Path, "/merge") {
+ rig.mu.Lock()
+ rig.merges = append(rig.merges, r.URL.EscapedPath()+" "+r.Header.Get("Authorization"))
+ rig.mu.Unlock()
+ fmt.Fprintf(w, `{"merged":true,"sha":%q,"into":"main","branch_closed":true}`, strings.Repeat("8", 40))
+ return
+ }
+ w.WriteHeader(http.StatusNotFound)
+ }))
+ t.Cleanup(srv.Close)
+ dir := t.TempDir()
+ p := filepath.Join(dir, "amadan.json")
+ if err := os.WriteFile(p, []byte(file), 0600); err != nil {
+ t.Fatal(err)
+ }
+ rig.f = NewFileForge(p, dir, true).(*fileForge)
+ rig.f.hub, rig.f.client = srv.URL, srv.Client()
+ for _, repo := range created {
+ if err := rig.f.record(repo); err != nil {
+ t.Fatal(err)
+ }
+ }
+ return rig
+}
+
+func (rig *mergeCredRig) requests() []string {
+ rig.mu.Lock()
+ defer rig.mu.Unlock()
+ return append([]string(nil), rig.merges...)
+}
+
+const perRepoOnly = `{"agent":"equipo~owner@example.com","repositories":{"amadan.net/paulca/first":{"api":"api-first","git":"git-first"},"amadan.net/paulca/stale":{"git":"git-stale"}}}`
+
+var mergeReq = forge.MergeRequest{ExpectSHA: strings.Repeat("a", 40), Strategy: "merge", Agent: forge.AgentMeta{Session: "equipo-tk1", Harness: "equipo", Host: "test"}}
+
+// TestMergeCredentialFallsBackForCreatedRepos: a repository the runner
+// created, absent from the credential file, merges with the agent-wide
+// credential, the one push and Create use for it.
+func TestMergeCredentialFallsBackForCreatedRepos(t *testing.T) {
+ rig := newMergeCredRig(t, perRepoOnly, []string{"amadan.net/paulca/nearys"}, nil)
+ res, err := rig.f.Merge(context.Background(), "amadan.net/paulca/nearys", "equipo/tk1-x", mergeReq)
+ if err != nil || !res.Merged {
+ t.Fatalf("created repository: %+v %v", res, err)
+ }
+ if got := rig.requests(); len(got) != 1 || got[0] != "/api/v1/repos/paulca/nearys/branches/equipo%2Ftk1-x/merge Bearer api-first" {
+ t.Fatalf("merge requests %q", got)
+ }
+ // The hub's CI is read with the same credential.
+ if c, err := rig.f.ciCredential(context.Background(), "amadan.net/paulca/nearys"); err != nil || c.Bearer != "api-first" || c.Remote != "https://amadan.net/paulca/nearys" {
+ t.Fatalf("CI credential %+v %v", c.Remote, err)
+ }
+ // A repository the hub lists as writable by the agent is in scope too.
+ rig = newMergeCredRig(t, perRepoOnly, nil, []string{"amadan.net/paulca/listed"})
+ if _, err := rig.f.Merge(context.Background(), "amadan.net/paulca/listed", "equipo/tk1-x", mergeReq); err != nil || len(rig.requests()) != 1 {
+ t.Fatalf("listed repository: %v %q", err, rig.requests())
+ }
+}
+
+// TestMergeCredentialStaysInScope: a repository that is neither in the
+// credential file, nor created here, nor listed by the hub is refused by
+// policy before any request; one whose own entry is unusable never falls
+// back to the agent-wide credential. Both refusals are definite and name
+// the repository, never a credential.
+func TestMergeCredentialStaysInScope(t *testing.T) {
+ rig := newMergeCredRig(t, perRepoOnly, []string{"amadan.net/paulca/nearys"}, []string{"amadan.net/paulca/listed"})
+ for repo, want := range map[string]error{"amadan.net/paulca/unrelated": forge.ErrMergeRefused, "amadan.net/paulca/stale": forge.ErrMergeNoCredential} {
+ _, err := rig.f.Merge(context.Background(), repo, "equipo/tk1-x", mergeReq)
+ var ns *forge.NotSentError
+ if !errors.Is(err, want) || !errors.As(err, &ns) || errors.Is(err, forge.ErrMergeUncertain) {
+ t.Fatalf("%s: %v", repo, err)
+ }
+ if !strings.Contains(err.Error(), repo) || strings.Contains(err.Error(), "api-") || strings.Contains(err.Error(), "git-") {
+ t.Fatalf("%s: refusal words %q", repo, err)
+ }
+ if _, err := rig.f.ciCredential(context.Background(), repo); err == nil {
+ t.Fatalf("%s: CI credential out of scope", repo)
+ }
+ }
+ if got := rig.requests(); len(got) != 0 {
+ t.Fatalf("out-of-scope merge reached the hub: %q", got)
+ }
+ // No agent-wide credential at all: a created repository is refused too.
+ rig = newMergeCredRig(t, `{"agent":"equipo~owner@example.com","repositories":{}}`, []string{"amadan.net/paulca/nearys"}, nil)
+ if _, err := rig.f.Merge(context.Background(), "amadan.net/paulca/nearys", "equipo/tk1-x", mergeReq); !errors.Is(err, forge.ErrMergeNoCredential) || len(rig.requests()) != 0 {
+ t.Fatalf("no agent credential: %v", err)
+ }
+}
+
+// TestMergeStepLocalRefusal: a merge refused on the runner before the hub
+// was contacted ends the step at once (one attempt, no retries) with its
+// own reason, and the log tail names the repository, not "outcome
+// unknown"; the forge record is back at prepared.
+func TestMergeStepLocalRefusal(t *testing.T) {
+ old := mergeBackoff
+ mergeBackoff = time.Millisecond
+ t.Cleanup(func() { mergeBackoff = old })
+ e, f, r, _ := hubRig(t)
+ f.answer = func(int, func() (forge.MergeResult, error)) (forge.MergeResult, error) {
+ return forge.MergeResult{}, forge.NotSent(r.Repo, forge.ErrMergeNoCredential)
+ }
+ rep := e.Exec(context.Background(), r, func(wire.StepReport) {})
+ if rep.State != wire.StepFailed || rep.Reason != "merge_credential" || !rep.Termination || f.requests != 1 {
+ t.Fatalf("report %+v (%d requests)", rep, f.requests)
+ }
+ if !strings.Contains(rep.LogTail, r.Repo) || strings.Contains(rep.LogTail, "outcome unknown") {
+ t.Fatalf("log tail %q", rep.LogTail)
+ }
+ paths, _ := filepath.Glob(filepath.Join(e.root(), "merge", "merge-*.json"))
+ if len(paths) != 1 {
+ t.Fatalf("merge records %v", paths)
+ }
+ if raw, err := os.ReadFile(paths[0]); err != nil || !strings.Contains(string(raw), `"phase":"prepared"`) {
+ t.Fatalf("record %s %v", raw, err)
+ }
+ // A later Merge tap asks the hub again and lands it.
+ f.answer = nil
+ if rep := e.Exec(context.Background(), r, func(wire.StepReport) {}); rep.State != wire.StepDone || f.requests != 2 {
+ t.Fatalf("again %+v (%d requests)", rep, f.requests)
+ }
+}
+
+// TestCheckCreatedCredentials: at start, with repository creation on,
+// every repository the runner created is checked for a usable credential
+// by the merge lookup; each missing one gets one fixed warning naming it,
+// and no credential is logged.
+func TestCheckCreatedCredentials(t *testing.T) {
+ var buf bytes.Buffer
+ log := slog.New(slog.NewTextHandler(&buf, nil))
+ rig := newMergeCredRig(t, perRepoOnly, []string{"amadan.net/paulca/nearys"}, nil)
+ rig.f.checkCreated(context.Background(), log)
+ if buf.Len() != 0 {
+ t.Fatalf("warned with a usable credential: %s", buf.String())
+ }
+ rig = newMergeCredRig(t, `{"agent":"equipo~owner@example.com","repositories":{}}`, []string{"amadan.net/paulca/nearys", "amadan.net/paulca/other"}, nil)
+ rig.f.checkCreated(context.Background(), log)
+ out := buf.String()
+ if strings.Count(out, createdNoCredential) != 2 || !strings.Contains(out, "amadan.net/paulca/nearys") || !strings.Contains(out, "amadan.net/paulca/other") || !strings.Contains(out, "level=WARN") {
+ t.Fatalf("warnings %s", out)
+ }
+ if len(rig.requests()) != 0 {
+ t.Fatal("the check contacted the hub")
+ }
+ // Creation off: nothing is checked.
+ buf.Reset()
+ rig.f.enabled = false
+ rig.f.checkCreated(context.Background(), log)
+ if buf.Len() != 0 {
+ t.Fatalf("checked with creation off: %s", buf.String())
+ }
+}
diff --git a/internal/runner/thin/mergestep.go b/internal/runner/thin/mergestep.go
index 4b39a078..eb3d184d 100644
--- a/internal/runner/thin/mergestep.go
+++ b/internal/runner/thin/mergestep.go
@@ -104,6 +104,9 @@ func (e *Engineer) mergeStep(ctx context.Context, r stepRow, progress func(wire.
cctx, cancel := context.WithTimeout(mctx, 3*time.Minute)
out, err = forge.MergeBranch(cctx, m)
cancel()
+ // Only an outcome the hub may have acted on is tried again: a
+ // refusal made here before contacting it (forge.NotSentError) is
+ // not uncertain and ends the step.
if maskDetail != "" || notAuthorized || !errors.Is(err, forge.ErrMergeUncertain) || uncertain+1 >= mergeAttempts {
break
}
@@ -159,6 +162,11 @@ func (e *Engineer) mergeStep(ctx context.Context, r stepRow, progress func(wire.
return fail("merge_forbidden")
case errors.Is(err, forge.ErrMergeUnbornDefault):
return fail(wire.ReasonMergeUnbornDefault)
+ case errors.Is(err, forge.ErrMergeNoCredential):
+ // Refused on this runner before the hub was contacted: no
+ // credential serves the repository. The log tail names it.
+ e.logDetail("merge", err)
+ return fail(wire.ReasonMergeCredential)
case errors.Is(err, forge.ErrMergeRefused):
return fail("policy_rejected")
}
diff --git a/internal/runner/thin/run.go b/internal/runner/thin/run.go
index 3315e656..9a431dba 100644
--- a/internal/runner/thin/run.go
+++ b/internal/runner/thin/run.go
@@ -196,6 +196,9 @@ func Run(ctx context.Context, c runner.Config, o Options) error {
if fg == nil {
ff := NewFileForge(c.AmadanCredentialPath, c.StateDir, !o.NoCreate).(*fileForge)
ff.accessTargets = state.accessReadTargets
+ // Each repository it created must have a credential its merges
+ // can use; say which do not, before a merge finds out.
+ ff.checkCreated(ctx, o.Logger)
fg, err = NewForges(ff)
if err != nil {
return err
diff --git a/internal/wire/tasks.go b/internal/wire/tasks.go
index 2d8ed289..a9b474df 100644
--- a/internal/wire/tasks.go
+++ b/internal/wire/tasks.go
@@ -1046,6 +1046,10 @@ var StepReasons = map[string]bool{
// merge_not_authorized: the instance refused the merge request's
// confirmation (merge authority); nothing was sent to the hub.
"merge_not_authorized": true,
+ // The runner has no usable forge credential for the repository and
+ // refused the merge itself; nothing was sent to the hub
+ // (ReasonMergeCredential).
+ ReasonMergeCredential: true,
// Previews (protocol 9): the runner is too old (settled at its
// connection); the account's 20 temporary apps are taken; the task's
// preview expired and its name is still in the Trash; the config is
@@ -1126,3 +1130,9 @@ const MaxSimilarTasks = 3
// the first merge (before amadan#139). Nothing merged; it waits on the
// platform, never retried on its own (protocol 8).
const ReasonMergeUnbornDefault = "merge_unborn_default"
+
+// ReasonMergeCredential: the runner refused a merge step before contacting
+// the hub because no forge credential it holds serves the repository. A
+// definite refusal: nothing was sent, and a later Merge may try again
+// once the credential is there. An older instance records it as unknown.
+const ReasonMergeCredential = "merge_credential"