Coordinator: restage a warm copy refused as containment
Production 2026-11-20 (5a6755bb, token connection): every second turn on one coordinator process failed CheckCopy with containment, so the person saw "could not answer" and the next turn, cold, worked. The copy is checked before launch and again at the first turn, so the first check after the CLI has run is the second turn's. A warm copy refused as containment is discarded with its process and never used again; the turn stages a fresh copy once, as the next turn did, and runs on it. A fresh copy that is refused still fails the turn. The runner's log also dropped the reason: sanitize matched the wrapped provider.Error and printed only provider_account_containment. A containment error now carries its fixed category (always a literal, never a path) and the log prints it, so the changed entry is named.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 files changed,
+187
−21
internal/runner/provider/accounts.go+18 −2internal/runner/provider/token_test.go+18 −0internal/runner/thin/claude.go+49 −19internal/runner/thin/copy_restage_test.go+102 −0
CI cancelled — superseded by a newer push — 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/coordinator-copy-containment: Type Size Avail | ext4 96G 87G ci-box: disk /home/ci/.cache/equipo-ci-box: Type Size Avail | ext4 96G 87G ci-box: bwrap: fetched and verified in 0.3s ci-box: claude: fetched and verified in 1.6s ci-box: codex: fetched and verified in 3.6s ci-box: codex-code-mode-host: fetched and verified in 1.3s ci-box: libwrap: fetched and verified in 0.3s ci-box: socat: fetched and verified in 0.3s npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead ci-box: image pulled in 9.8s ci-box: pi: installed and verified in 7.7s ci-box: opencode: installed and verified in 1.9s ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 8.6s ci-box: clone deepened in 3.0s ci-box: file times set from content: 2727 files, 174 directories ci-box: ready in 16.6s === 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.242s === compile === go build ./... RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py compile + go build -tags testbuild ./... 5.1s + go list -export -test -tags testbuild -f ./... 5.0s + go list -export -test -tags browser,testbuild -f ./internal/equipo ./internal/headless ./internal/idtest ./internal/plan3test ./internal/thintest 2.9s rastrillo: budget size: 3 problem(s) exit status 1 go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -version staticcheck 2026.1 (v0.7.0) go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 -version Go: go1.26.11 Scanner: govulncheck@v1.8.0 DB: https://vuln.go.dev DB updated: 2026-11-11 02:51:11 +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 amadan: job cancelled — a newer push superseded it --- 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 amadan: job cancelled — a newer push superseded it --- 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 amadan: job cancelled — a newer push superseded it --- 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 amadan: job cancelled — a newer push superseded it --- 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_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless amadan: job cancelled — a newer push superseded it --- 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_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless amadan: job cancelled — a newer push superseded it --- 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 amadan: job cancelled — a newer push superseded it --- 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 amadan: job cancelled — a newer push superseded it --- 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 amadan: job cancelled — a newer push superseded it --- 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 amadan: job cancelled — a newer push superseded it --- 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 amadan: job cancelled — a newer push superseded it --- shard 11 of 29 --- RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard test lane runner-rest: ./internal/runner timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner) + go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^TestDirectBugWorkflow$|^TestEnrolKeepsTheRole$|^TestPlanWorkflowCandidateOrder$|^TestPlanWorkflowFeature$|^TestCoordinatorRecoveryCallRefusalKeepsServing$|^TestCoordinatorRefusalMatrix$' ./internal/runner receipt: test step 35.715s against a 60s target (the gate's other steps are not in this figure) receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed receipt: slow package 34.797s amadan.net/oficina/equipo/internal/runner receipt: slow test 5.15s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation receipt: slow test 3.35s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff receipt: slow test 3.13s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing receipt: slow test 2.44s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness receipt: slow test 1.61s amadan.net/oficina/equipo/internal/runner TestCoordinatorTransientRefusalKeepsServing machine: 32 CPUs, load 32.56, cpu waiting 19.79%, memory waiting 0.00%, io waiting 1.62% --- 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 37.1%, load 25.56 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 amadan: job cancelled — a newer push superseded it --- 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 37.1%, load 25.56 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 amadan: job cancelled — a newer push superseded it --- 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 37.1%, load 25.56 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 amadan: job cancelled — a newer push superseded it --- 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 37.1%, load 25.56 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 amadan: job cancelled — a newer push superseded it --- 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 37.1%, load 25.56 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 amadan: job cancelled — a newer push superseded it --- 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 36.7%, load 25.56 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/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/personapi ./internal/equipo/planning ./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/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/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/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/personapi ./internal/equipo/planning ./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/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/wireschema ./internal/wire/wiretest ./tools/drive cache miss: amadan.net/oficina/equipo/internal/copydesk: its inputs changed cache miss: amadan.net/oficina/equipo/internal/runner/forge: its inputs changed cache miss: amadan.net/oficina/equipo/internal/equipo/team: its inputs changed amadan: job cancelled — a newer push superseded it --- 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 amadan: job cancelled — a newer push superseded it --- 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 amadan: job cancelled — a newer push superseded it --- 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 amadan: job cancelled — a newer push superseded it --- 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|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 amadan: job cancelled — a newer push superseded it --- 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.063s 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 497ms amadan.net/oficina/equipo/internal/equipo receipt: slow test 500ms 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)$' ./internal/idtest receipt: test step 2.978s 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 1.601s amadan.net/oficina/equipo/internal/idtest receipt: slow test 1.6s 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.071s 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 1.834s amadan.net/oficina/equipo/internal/plan3test receipt: slow test 1.83s 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|TestBrowserHousekeeping|TestBrowserInnerGallery|TestBrowserInnerScreens|TestBrowserInstantThinking|TestBrowserInstantThinkingQueued|TestBrowserMachines|TestBrowserPhoneIndex|TestBrowserPlacementQuestionAndPending|TestBrowserProjectPlacement|TestBrowserProjectsList|TestBrowserReportActionFeedback|TestBrowserReportNextSteps|TestBrowserReportThread|TestBrowserRollup|TestBrowserRosterAlignment|TestBrowserRosterDecisionStates|TestBrowserRosterQuietDay|TestBrowserRosterReports|TestBrowserRosterSetAside|TestBrowserRosterSubchat|TestBrowserRosterThinking|TestBrowserRosterVisual|TestBrowserSettingsHousekeepingGroups|TestBrowserSettingsMenu|TestBrowserSettingsRail|TestBrowserSettingsSaveBar|TestBrowserSettingsShots|TestBrowserSettingsStayOnPage|TestBrowserSettingsTeams|TestBrowserShipsButtons|TestBrowserSpecialistRows|TestBrowserSpendFollowsAnswers|TestBrowserTaskRows|TestBrowserTeamPanel|TestBrowserThinkingCycles|TestBrowserThinkingLinesClear|TestBrowserThinkingWords|TestBrowserTokenRowEmail|TestBrowserTrackStarCentre)$' ./internal/thintest amadan: job cancelled — a newer push superseded it --- 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 amadan: job cancelled — a newer push superseded it --- shard 24 of 29 --- RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard shard 24: make runner-host python3 scripts/runner-prerequisites.py CGO_ENABLED=0 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks + go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks receipt: test step 13.403s against a 60s target (the gate's other steps are not in this figure) receipt: 4 packages ran, 0 cached, 3 without tests, 0 failed receipt: slow package 7.751s amadan.net/oficina/equipo/internal/runner/checks receipt: slow package 178ms amadan.net/oficina/equipo/internal/runner/provider/claude receipt: slow package 83ms amadan.net/oficina/equipo/internal/runner/provider/codex receipt: slow package 5ms amadan.net/oficina/equipo/internal/runner/provider receipt: slow package 1ms amadan.net/oficina/equipo/internal/runner/provider/pi receipt: slow test 5.58s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture receipt: slow test 1.71s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths receipt: slow test 350ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache receipt: slow test 180ms 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.921s 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.929s amadan.net/oficina/equipo/internal/runner/containment receipt: slow test 280ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch receipt: slow test 180ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceExitStatus receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryCleansScratch machine: 32 CPUs, load 14.05, cpu waiting 10.57%, memory waiting 0.00%, io waiting 2.19% --- 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 36.7%, load 25.56 shard 25: make runner-dead-references lanes-check build vet fmt-check budget migration-check python3 scripts/runner-dead-references.py reference scan: 2441 text files, 2846 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 amadan: job cancelled — a newer push superseded it --- 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 37.1%, load 25.56 shard 26: make staticcheck go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./... amadan: job cancelled — a newer push superseded it --- 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 37.1%, load 25.56 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 5 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 32.56, cpu waiting 21.53%, memory waiting 0.00%, io waiting 1.57% --- 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 37.1%, load 25.56 shard 28: make gitleaks [90m8:32AM[0m [32mINF[0m [1mUnknown SCM platform. Use --platform to include links in findings.[0m [36mhost=[0mamadan.net amadan: job cancelled — a newer push superseded it
diff --git a/internal/runner/provider/accounts.go b/internal/runner/provider/accounts.go| index edd6a829..066a8620 100644 |
| --- a/internal/runner/provider/accounts.go |
| +++ b/internal/runner/provider/accounts.go |
| @@ -8,7 +8,6 @@ import ( |
| "encoding/hex" |
| "encoding/json" |
| "errors" |
| - "fmt" |
| "io" |
| "os" |
| "os/user" |
| @@ -900,6 +899,23 @@ func (l *AccountLease) PreflightFingerprint(ctx context.Context) (string, error) |
| return hex.EncodeToString(sum[:]), nil |
| } |
| +// containmentError is ErrContainment with its fixed category. Every |
| +// category is a literal in this package, never a path or provider output. |
| +type containmentError struct{ reason string } |
| + |
| +func (e containmentError) Error() string { return string(ErrContainment) + ": " + e.reason } |
| +func (e containmentError) Unwrap() error { return ErrContainment } |
| + |
| func accountContainment(reason string) error { |
| - return fmt.Errorf("%w: %s", ErrContainment, reason) |
| + return containmentError{reason} |
| +} |
| + |
| +// ContainmentReason is a containment refusal's fixed category, safe to |
| +// log; "" for any other error. |
| +func ContainmentReason(err error) string { |
| + var c containmentError |
| + if errors.As(err, &c) { |
| + return c.reason |
| + } |
| + return "" |
| } |
diff --git a/internal/runner/provider/token_test.go b/internal/runner/provider/token_test.go| index 8a9a129d..47798190 100644 |
| --- a/internal/runner/provider/token_test.go |
| +++ b/internal/runner/provider/token_test.go |
| @@ -118,3 +118,21 @@ func TestClaudeTokenIdentity(t *testing.T) { |
| t.Fatal(err) |
| } |
| } |
| + |
| +// A containment refusal keeps its fixed category: the runner's log needs |
| +// it to say what changed in a copy, and it is never a path. |
| +func TestContainmentKeepsItsReason(t *testing.T) { |
| + l := openTokenCopy(t, tokenFixture(t)) |
| + // A signed-in CLI records the account in its native config. |
| + writeFake(t, filepath.Join(l.Binding().Home, ".claude.json"), `{"oauthAccount":{"emailAddress":"a@example.com","accountUuid":"u1"}}`) |
| + err := l.CheckCopy(context.Background()) |
| + if !errors.Is(err, ErrContainment) { |
| + t.Fatalf("changed account metadata accepted: %v", err) |
| + } |
| + if got := ContainmentReason(err); got != "runtime_claude_identity" { |
| + t.Fatalf("reason %q", got) |
| + } |
| + if got := ContainmentReason(ErrPolicy); got != "" { |
| + t.Fatalf("a policy refusal has containment reason %q", got) |
| + } |
| +} |
diff --git a/internal/runner/thin/claude.go b/internal/runner/thin/claude.go| index cb80a226..1d79d4a3 100644 |
| --- a/internal/runner/thin/claude.go |
| +++ b/internal/runner/thin/claude.go |
| @@ -206,6 +206,8 @@ type claudeCoordinator struct { |
| // turn, so the next message finds a fresh process (no cold start). |
| warm *time.Timer |
| idleAt time.Time |
| + // launch starts the process; nil is start. Tests replace it. |
| + launch func(context.Context) error |
| } |
| const ( |
| @@ -277,6 +279,9 @@ func (c *coordBase) log(msg string, err error) { |
| // sanitize keeps only provider error codes: no paths or provider output. |
| func sanitize(err error) string { |
| + if reason := provider.ContainmentReason(err); reason != "" { |
| + return string(provider.ErrContainment) + ": " + reason |
| + } |
| var p provider.Error |
| if errors.As(err, &p) { |
| return string(p) |
| @@ -349,6 +354,47 @@ func reasonFor(err error) string { |
| return "account_unavailable" |
| } |
| +// ready gives the turn a process whose runtime copy passes its check, |
| +// whether it started for this turn, and the turn's time limit; or the |
| +// turn's failure reason. A warm copy refused as containment is discarded |
| +// with its process, never used again, and a fresh copy is staged once, |
| +// as the next turn would (2026-11-20: every second turn failed). A fresh |
| +// copy that is refused fails the turn. |
| +func (c *claudeCoordinator) ready(ctx context.Context) (bool, time.Duration, string) { |
| + launch := c.launch |
| + if launch == nil { |
| + launch = c.start |
| + } |
| + cold := c.proc == nil |
| + for { |
| + if c.proc == nil { |
| + if err := launch(ctx); err != nil { |
| + c.log("coordinator start", err) |
| + if ctx.Err() != nil { |
| + return cold, 0, "cancelled" |
| + } |
| + return cold, 0, reasonFor(err) |
| + } |
| + } |
| + p := c.proc |
| + limit := min(c.o.MaxTurn, time.Until(p.lease.FreshUntil())-c.o.Margin) |
| + if limit < minTurn { |
| + c.stop(true) |
| + return cold, 0, "account_unavailable" |
| + } |
| + err := p.lease.CheckCopy(ctx) |
| + if err == nil { |
| + return cold, limit, "" |
| + } |
| + c.log("coordinator copy", err) |
| + c.stop(false) |
| + if cold || !errors.Is(err, provider.ErrContainment) || ctx.Err() != nil { |
| + return cold, 0, reasonFor(err) |
| + } |
| + cold = true |
| + } |
| +} |
| + |
| func (c *claudeCoordinator) Turn(ctx context.Context, in TurnInput, emit func(string)) TurnResult { |
| c.mu.Lock() |
| defer c.mu.Unlock() |
| @@ -379,27 +425,11 @@ func (c *claudeCoordinator) Turn(ctx context.Context, in TurnInput, emit func(st |
| } |
| } |
| } |
| - cold := c.proc == nil |
| - if c.proc == nil { |
| - if err := c.start(ctx); err != nil { |
| - c.log("coordinator start", err) |
| - if ctx.Err() != nil { |
| - return TurnResult{Reason: "cancelled"} |
| - } |
| - return TurnResult{Reason: reasonFor(err)} |
| - } |
| + cold, limit, reason := c.ready(ctx) |
| + if reason != "" { |
| + return TurnResult{Reason: reason} |
| } |
| p = c.proc |
| - limit := min(c.o.MaxTurn, time.Until(p.lease.FreshUntil())-c.o.Margin) |
| - if limit < minTurn { |
| - c.stop(true) |
| - return TurnResult{Reason: "account_unavailable"} |
| - } |
| - if err := p.lease.CheckCopy(ctx); err != nil { |
| - c.log("coordinator copy", err) |
| - c.stop(false) |
| - return TurnResult{Reason: reasonFor(err)} |
| - } |
| var catalog []wire.RepoInfo |
| if c.o.Catalog != nil { |
| catalog = c.o.Catalog() |
diff --git a/internal/runner/thin/copy_restage_test.go b/internal/runner/thin/copy_restage_test.go| new file mode 100644 |
| index 00000000..1af7ffa4 |
| --- /dev/null |
| +++ b/internal/runner/thin/copy_restage_test.go |
| @@ -0,0 +1,102 @@ |
| +package thin |
| + |
| +import ( |
| + "context" |
| + "encoding/json" |
| + "errors" |
| + "os" |
| + "path/filepath" |
| + "testing" |
| + "time" |
| + |
| + "amadan.net/oficina/equipo/internal/runner/provider" |
| +) |
| + |
| +// tokenLease stages a real runtime copy of a fake token home. |
| +func tokenLease(t *testing.T) *provider.AccountLease { |
| + t.Helper() |
| + root := t.TempDir() |
| + home := filepath.Join(root, "claude-1") |
| + if err := os.Mkdir(home, 0700); err != nil { |
| + t.Fatal(err) |
| + } |
| + id := provider.Identity{AccountID: "token:claude-1", HomeID: "enrolled-home", ProviderVersion: provider.ClaudeVersion} |
| + raw, _ := json.Marshal(id) |
| + for name, data := range map[string][]byte{provider.IdentityFile: raw, provider.TokenFile: []byte("sk-ant-oat01-canary")} { |
| + if err := os.WriteFile(filepath.Join(home, name), data, 0600); err != nil { |
| + t.Fatal(err) |
| + } |
| + } |
| + b := provider.Binding{ID: "claude-1", Home: home, AccountID: id.AccountID, Provider: "claude", Token: true, Expected: id, RuntimeRoot: filepath.Join(root, "homes")} |
| + l, err := provider.OpenRuntimeCopy(context.Background(), b, func(context.Context, provider.Binding) (provider.Identity, error) { return id, nil }, time.Second) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + t.Cleanup(func() { l.Close() }) |
| + return l |
| +} |
| + |
| +// changeCopy writes what a signed-in CLI records in its native config, |
| +// which the copy's check refuses as containment. |
| +func changeCopy(t *testing.T, l *provider.AccountLease) { |
| + t.Helper() |
| + path := filepath.Join(l.Binding().Home, ".claude.json") |
| + if err := os.WriteFile(path, []byte(`{"oauthAccount":{"emailAddress":"a@example.com","accountUuid":"u1"}}`), 0600); err != nil { |
| + t.Fatal(err) |
| + } |
| +} |
| + |
| +// The log keeps a containment refusal's fixed category. |
| +func TestSanitizeKeepsContainmentReason(t *testing.T) { |
| + l := tokenLease(t) |
| + changeCopy(t, l) |
| + err := l.CheckCopy(context.Background()) |
| + if got := sanitize(err); got != "provider_account_containment: runtime_claude_identity" { |
| + t.Fatalf("logged %q", got) |
| + } |
| + if got := sanitize(provider.ErrPolicy); got != "provider_policy_rejected" { |
| + t.Fatalf("logged %q", got) |
| + } |
| +} |
| + |
| +// Production 2026-11-20: every second turn on one coordinator process |
| +// failed CheckCopy with containment, and the person saw "could not |
| +// answer". A warm copy that fails containment is discarded with its |
| +// process; the turn restages a fresh copy once, as the next turn would, |
| +// and runs on it. A fresh copy that fails too fails the turn. |
| +func TestWarmCopyContainmentRestagesOnce(t *testing.T) { |
| + c := &claudeCoordinator{coordBase: coordBase{o: ClaudeOptions{MaxTurn: 5 * time.Minute, Margin: time.Minute}}} |
| + var leases []*provider.AccountLease |
| + spoil := false |
| + c.launch = func(context.Context) error { |
| + if len(leases) == 3 { |
| + return errors.New("restaged again") |
| + } |
| + l := tokenLease(t) |
| + if spoil { |
| + changeCopy(t, l) |
| + } |
| + leases = append(leases, l) |
| + c.proc = &claudeProcess{lease: l} |
| + return nil |
| + } |
| + cold, _, reason := c.ready(context.Background()) |
| + if !cold || reason != "" || len(leases) != 1 { |
| + t.Fatalf("first turn: cold %v reason %q launches %d", cold, reason, len(leases)) |
| + } |
| + // The first turn ran; the session changed its copy. |
| + changeCopy(t, leases[0]) |
| + cold, _, reason = c.ready(context.Background()) |
| + if reason != "" || !cold || len(leases) != 2 || c.proc == nil || c.proc.lease != leases[1] { |
| + t.Fatalf("second turn: cold %v reason %q launches %d", cold, reason, len(leases)) |
| + } |
| + if err := leases[0].CheckCopy(context.Background()); !errors.Is(err, provider.ErrAccountMaintenance) { |
| + t.Fatalf("the changed copy was kept: %v", err) |
| + } |
| + // A fresh copy that fails its check is not retried again. |
| + changeCopy(t, leases[1]) |
| + spoil = true |
| + if _, _, reason = c.ready(context.Background()); reason != "policy_rejected" || len(leases) != 3 || c.proc != nil { |
| + t.Fatalf("fresh copy refused: reason %q launches %d", reason, len(leases)) |
| + } |
| +} |