hosted slice 2: review fixes, Task 32 progress record
The fix wave's order of work, red runs, green runs and mutations U1 to U40, under "## Task 32" in HOSTED-SLICE2-PROGRESS.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+80
−0
docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md+80 −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/hosted-runners-2: Type Size Avail | ext4 96G 84G
ci-box: disk /home/ci/.cache/equipo-ci-box: Type Size Avail | ext4 96G 84G
ci-box: bwrap: fetched and verified in 0.3s
ci-box: claude: fetched and verified in 2.6s
ci-box: codex: fetched and verified in 4.7s
ci-box: codex-code-mode-host: fetched and verified in 2.5s
ci-box: libwrap: fetched and verified in 0.3s
ci-box: socat: fetched and verified in 0.3s
ci-box: tofu: fetched and verified in 2.0s
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.5s
ci-box: opencode: installed and verified in 2.3s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 9.8s
ci-box: clone deepened in 5.1s
ci-box: file times set from content: 4044 files, 303 directories
ci-box: ready in 20.1s
=== copy ===
EQUIPO_RELEASE_COPY_CHECK=1 CGO_ENABLED=0 go test ./internal/equipotest -run '^TestReleaseCopyReviewed$' -count=1
--- FAIL: TestReleaseCopyReviewed (0.09s)
task_pages_test.go:236: COPY REVIEW REQUIRED: copy-status.py verify found copy pending review or stale bookkeeping
FAIL
rastrillo-budget/v1 ran 89ms
FAIL amadan.net/oficina/equipo/internal/equipotest 0.244s
FAIL
make: *** [Makefile:322: copy-release-check] Error 1
amadan: step copy failed: exit status 2
amadan: job failed at step copy — its output is above, not at the tail of this log
diff --git a/docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md b/docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md| index 5fd233ac..f3c8a86f 100644 |
| --- a/docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md |
| +++ b/docs/superpowers/plans/HOSTED-SLICE2-PROGRESS.md |
| @@ -3107,3 +3107,83 @@ Mutation checks (each applied alone, restored byte for byte and checked): |
| - T6b the same, through ops and the real plan-check. `TestAdoptionBesideManagedDependency`: exit 1 | fix3_test.go:225: ops tf network destroy-network = 99, want 0: | restored |
| - T7 plan-check: an importing dependency passes. `Adopt.test_dependency_that_imports_changes_or_moves_refused`: exit 1 | AssertionError: [] is not true : the plan was accepted | restored |
| - T8 a bare group is an unknown command. `TestPlanInvocationsParse`: exit 1 | fix1_test.go:576: ops vms (a name in prose) is not a command its parser knows: usage: unknown command "vms"; commands: assert, block, bucket create, bucket delete, bucket empty, bundle, cloudtrail stop-logging, connector create, connector delete, estimate, fac | restored |
| + |
| +## Task 32 |
| + |
| +### Task 32 fix wave (whole-branch review t32-r1.md; rulings task-32-fixwave.md) |
| + |
| +Six findings, base `d67ba3db`. Report: `.superpowers/sdd/2026-11-30-hosted-runners-slice-2/task-32-fixwave-report.md`. Mutations continue the R (fix round 1), S (round 2) and T (after-cap) series as U1 to U40. |
| + |
| +Order of work, stated plainly. Where a red run needed new names to compile, a skeleton came first with no behaviour (named per finding below), and existing tests passed on it. Tests written after their code are listed as such, each proven by a mutation. |
| + |
| +- Finding 1 (M8 at start and placement): red-first. The placement rig's `enrol` now goes through `HostedEnrolAdmit`, as production enrolment does, and existing tests passed on it before the red run. |
| +- Finding 6 (tfvars host): red-first. |
| +- Finding 4 (image caller role). Skeleton: `Provider.CallerAccount` became `CallerIdentity` (account and ARN), `Target.Caller` and `-expect-role`, with the account check unchanged and fixtures given the approved caller. Not red-first: `TestWrongRoleRefusedBeforeImageCall`, `TestExpectRoleRequired` and `TestPublishRefusesOtherRoleThroughSDK` cover the same check at the command and SDK layers and were written after it. `TestExpectedCallerRequired` was written with the red tests but first run after the fix. |
| +- Finding 5 (pre-run identities). Skeleton: `Inventory.VPCs`, `Gateways` and `DefaultVPC` (not yet read) and `fakeCloud.inv`. Not red-first: `TestPreRunFactsOnlyBeforeTheRun`, which guards the new "only before the first intent" rule (the old code recorded nothing). Two older tests changed with the intended shape: fix1_test.go's "inventory pages" no longer pins the `is-default=false` filter and answers `DescribeInternetGateways`; fix3_test.go's `TestInventoryBudgetsTwoPages` answers `DescribeInternetGateways`. |
| +- Finding 2 (fence lifecycle). Skeleton: `Cloud.DetachRolePolicy`, `TerminateInstance` and `RebootInstance` (the fake records them; the adapter stubs answer "not built"), the three commands registered with "not built" bodies, `awsCommands` cases, and the fake's attachment state. Not red-first: `TestSafeStopNeverUnfences` (a regression guard; the old code has no unfence) and `TestUnfenceNeedsKnownImages` (added after the implementation). |
| +- Finding 3 (plan versus CLIs). Two behaviour-preserving refactors came first, and existing tests passed after each: certify's `run` became `parseCommand` plus the command, and the image tool's became `parseInvocation` (check, step, aws). Not red-first: the parse-time argument checks came before `TestParseChecksArguments`. `ops controller reboot` was written with `unfence.go` before `TestControllerReboot`; that test was then run red against the skeleton's stub body. `TestPlanImgInvocationsParse` was green on its first valid run, because finding 4 had already put `-expect-role` in the wrapper; its earlier runs failed only on the helper (untyped placeholders, `$P` not a directory). |
| + |
| +RED (Go: `CGO_ENABLED=0 go test ./<pkg> -run '<the new tests>' -count=1`): |
| +- TestHostedStartNeedsCurrentAdmission: hosted_start_test.go:84: H1 after withdrawn certificate: "" <nil>, want withdrawn (all seven spoilers) |
| +- TestHostedPlacementNeedsCurrentAdmission: hosted_start_test.go:109: after withdrawn certificate: s1 placed "" on "H1", want waiting hosted (all seven) |
| +- TestTfvarsInstanceHostAsManifest: t32_test.go:45: tfvars --instance-host equipo.amadan.net = 1 (written false), want accepted (and notamadan.net); t32_test.go:48: tfvars --instance-host -bad.example.com = 0 (written true), want refused |
| +- TestSameAccountWrongRoleRefused: caller_test.go:50: list as arn:aws:sts::111122223333:assumed-role/AnotherRole/equipo-hosted-bringup = <nil>, want a guard refusal (publish and delete went on to image calls; connector-wait panicked on the fake's empty list) |
| +- TestGuardPrintsBoundRole: t32_test.go:66: guard -print-role = 1: usage: guard takes no arguments |
| +- TestPreRunGatewayAccounted: t32_test.go:121: the inventory recorded no pre-run facts (both cases) |
| +- TestInventoryListsVPCsAndGateways: t32_test.go:30: VPCs listed with filters [is-default false]; t32_test.go:70: VPCs [], default "", 2 non-default |
| +- TestFenceToDestroy: t32_test.go:191: ops tf services destroy-services = 0, want 99 |
| +- TestUnfenceNeedsSettlementAfterTheLastFence, TestUnfenceNeedsAFence, TestUnfenceReadsBack: ops controller terminate = 1, want 0 (the stub) |
| +- TestDestroyServicesRefusesUnreadAttachment: t32_test.go:270: ops tf services destroy-services = 0, want 99 |
| +- TestDetachTerminateRebootShapes: t32_test.go:103: DetachRolePolicy: not built |
| +- TestControllerReboot (against the stub): t32_test.go:336: ops controller reboot --enabled 1 --controller https://198.51.100.7 = 1, want 0 |
| +- TestPlanCertInvocationsParse: plan_test.go:33: cert reload --restart: flag provided but not defined: -restart; cert launch ... --pin: flag provided but not defined: -pin; cert sign ... -key x: -key and -key-id are required; cert verify -cert certificate.json -pub x: flag provided but not defined: -pub; cert alert-test ... --pin: flag provided but not defined: -pin |
| + |
| +GREEN: |
| +- Targeted runs of every package touched, each `-count=1`, all ok: `./internal/equipo/chat` (whole package), `./internal/equipo/hostedrun` (whole package, the 200-seed simulation included), `./internal/equipo -run 'Hosted|Enrol|Renew'`, `./internal/hostedops/...`, `./internal/isolatedjob/awsjob/opsaws`, `./internal/isolatedjob/awsjob/imageaws`, `./internal/hostedimage`, `./cmd/equipo-hosted-image`, `./cmd/equipo-hosted-certify` and `./cmd/equipo-hosted-ops`. The dispatcher fakes needed two corrections: their admission and job views had answered `deadline_in_ms` 0, so a job's deadline was "now" at launch (the real controller answers the time left), and the rig's SQL enrolment had skipped the enrolment image. |
| +- `nice -n 19 make build vet budget lanes-check fmt-check hosted-infra-check`: exit 0. `make hosted-chain-test`: ok, 75 s. staticcheck v0.7.0 is clean over the touched packages. |
| +- `CGO_ENABLED=0 GOOS=darwin GOARCH=arm64` and `GOOS=windows` builds of each `./cmd/*` package: every hosted command builds for both targets. The Linux-only commands fail as before and are untouched here: equipo-tool-proxy and equipo-vm-init on both targets, and equipo and equipo-runner on Windows. |
| +- Budgets raised with reasons: `size internal/equipo/chat 47593 22648`, `size internal/hostedops 6960` (measured 6955). |
| + |
| +Mutation checks (each applied alone by a script, `CGO_ENABLED=0 go test ./<pkg> -run <Test> -count=1`, restored byte for byte and compared): |
| +- U1 Authorize ignores the admission. `TestHostedStartNeedsCurrentAdmission`: exit 1 | hosted_start_test.go:84: H1 after withdrawn certificate: "" <nil>, want withdrawn | restored |
| +- U2 placement ignores the admission. `TestHostedPlacementNeedsCurrentAdmission`: exit 1 | hosted_start_test.go:109: after withdrawn certificate: s1 placed "" on "H1", want waiting hosted | restored |
| +- U3 no deadline check. `TestHostedStartNeedsCurrentAdmission/deadline`: exit 1 | hosted_start_test.go:84: H1 after deadline passed: "" <nil>, want withdrawn | restored |
| +- U4 no freshness check. `TestHostedStartNeedsCurrentAdmission/stale`: exit 1 | hosted_start_test.go:84: H1 after stale admission: "" <nil>, want withdrawn | restored |
| +- U5 the suffix check back. `TestTfvarsInstanceHostAsManifest`: exit 1 | t32_test.go:45: tfvars --instance-host equipo.amadan.net = 1 (written false), want accepted: | restored |
| +- U6 the manifest check skipped. `TestTfvarsInstanceHostAsManifest`: exit 1 | t32_test.go:48: tfvars --instance-host amadan.net = 0 (written true), want refused: | restored |
| +- U7 the caller ARN not compared. `TestSameAccountWrongRoleRefused`: exit 1 | caller_test.go:52: publish as arn:aws:sts::111122223333:assumed-role/AnotherRole/equipo-hosted-bringup = transport: GetMicrovmImageVersion failed before an answer came back, want a guard refusal | restored |
| +- U8 no expected-caller check. `TestExpectedCallerRequired`: exit 1 | caller_test.go:82: publish expecting "" = guard: the caller is "arn:aws:sts::111122223333:assumed-role/OrganizationAccountAccessRole/equipo-hosted-bringup", but this run is bound to with calls [CallerIdentity], want a usage refusal and no call | restored |
| +- U9 the ARN not compared, through the command. `TestWrongRoleRefusedBeforeImageCall`: exit 1 | main_test.go:385: list as another role = 0, stdout "{\"Items\":null}\n", stderr ""; want a guard refusal | restored |
| +- U10 the ARN not compared, through the SDK. `TestPublishRefusesOtherRoleThroughSDK`: exit 1 | imageaws_test.go:350: Publish = <nil>, want a guard refusal | restored |
| +- U11 the expected caller's account not checked. `TestExpectedCallerRequired`: exit 1 | caller_test.go:82: publish expecting "arn:aws:sts::444455556666:assumed-role/OrganizationAccountAccessRole/equipo-hosted-bringup" = guard: ..., want a usage refusal and no call | restored |
| +- U12 the adapter reports the approved ARN, not STS's. `TestPublishRefusesOtherRoleThroughSDK`: exit 1 | imageaws_test.go:350: Publish = <nil>, want a guard refusal | restored |
| +- U13 ops does not enforce the bound caller. `TestGuardPrintsBoundRole`: exit 1 | t32_test.go:75: guard -print-role as another role = 0, printed "arn:aws:sts::149757027610:assumed-role/OrganizationAccountAccessRole/equipo-hosted-bringup\n"; want 99 and nothing | restored |
| +- U14 -print-role prints more than the ARN. `TestGuardPrintsBoundRole`: exit 1 | t32_test.go:69: guard -print-role printed "guard: arn:aws:sts::149757027610:assumed-role/OrganizationAccountAccessRole/equipo-hosted-bringup\n", want only "arn:aws:sts::149757027610:assumed-role/OrganizationAccountAccessRole/equipo-hosted-bringup\n" | restored |
| +- U15 pre-run gateways not accounted. `TestPreRunGatewayAccounted`: exit 1 | t32_test.go:126: ops tf reconcile network = 99, want 0: | restored |
| +- U16 a PRE-RUN entry after the first intent counted. `TestPreRunFactsOnlyBeforeTheRun`: exit 1 | t32_test.go:147: a pre-run fact journalled after the run began was accounted | restored |
| +- U17 the inventory records pre-run facts after the run began. `TestPreRunFactsOnlyBeforeTheRun`: exit 1 | t32_test.go:143: an inventory after the run began recorded pre-run facts: | restored |
| +- U18 gateways not listed. `TestInventoryListsVPCsAndGateways`: exit 1 | t32_test.go:73: gateways [], want both over two pages, attached or not | restored (a first try left an unused variable and did not compile; redone) |
| +- U19 VPCs not listed. `TestInventoryListsVPCsAndGateways`: exit 1 | t32_test.go:70: VPCs [], default "vpc-0default", 1 non-default; want both over two pages, the default marked, 1 | restored |
| +- U20 gateways not journalled PRE-RUN. `TestPreRunGatewayAccounted`: exit 1 | t32_test.go:121: the inventory recorded no pre-run facts: | restored |
| +- U21 a host that is not terminated accepted. `TestFenceToDestroy`: exit 1 | t32_test.go:201: ops unfence = 0, want 99: | restored |
| +- U22 a settlement before the last fence accepted. `TestUnfenceNeedsSettlementAfterTheLastFence`: exit 1 | t32_test.go:231: ops unfence = 0, want 99: | restored |
| +- U23 no fence needed. `TestUnfenceNeedsAFence`: exit 1 | t32_test.go:245: ops unfence = 0, want 99: | restored |
| +- U24 the detach not read back. `TestUnfenceReadsBack`: exit 1 | t32_test.go:273: ops unfence = 0, want 99: | restored |
| +- U25 destroy-services does not check the attachment. `TestFenceToDestroy`: exit 1 | t32_test.go:195: ops tf services destroy-services = 0, want 99: | restored |
| +- U26 an unread attachment taken as detached. `TestDestroyServicesRefusesUnreadAttachment`: exit 1 | t32_test.go:288: ops tf services destroy-services = 0, want 99: | restored |
| +- U27 safe-stop unfences. `TestSafeStopNeverUnfences`: exit 1 | t32_test.go:303: safe-stop unfenced: [AttachRolePolicy equipo-hosted-controller arn:aws:iam::149757027610:policy/equipo-hosted-deny-launches RolePolicyAttached equipo-hosted-controller StopInstance i-0ctl InstanceState i-0ctl ListVMs ...] | restored |
| +- U28 a fenced controller rebooted. `TestControllerReboot`: exit 1 | t32_test.go:361: ops controller reboot --enabled 1 --controller https://198.51.100.7 = 0, want 99: | restored |
| +- U29 the reboot does not wait for the wanted switch. `TestControllerReboot`: exit 1 | t32_test.go:352: reboot: calls [RebootInstance i-0ctl], 1 status reads: | restored |
| +- U30 terminate skips the call. `TestFenceToDestroy`: exit 1 | t32_test.go:205: ops controller terminate = 99, want 0: | restored |
| +- U31 an unresolved image creation ignored. `TestUnfenceNeedsKnownImages`: exit 1 | t32_test.go:259: ops unfence = 0, want 99: | restored |
| +- U32 the adapter's detach not mapped to not found. `TestDetachTerminateRebootShapes`: exit 1 | t32_test.go:106: detach from a missing role = operation error IAM: DetachRolePolicy, api error NoSuchEntity: , want not found | restored |
| +- U33 the plan's alert-test with --pin. `TestPlanCertInvocationsParse`: exit 1 | plan_test.go:33: 2026-11-30-hosted-prod-account-plan.md: cert alert-test -controller https://198.51.100.7 --pin ...: flag provided but not defined: -pin | restored |
| +- U34 the plan's img wrapper without -expect-role. `TestPlanImgInvocationsParse`: exit 1 | plan_test.go:27: the account plan's img wrapper passes ["-account" "149757027610" "-region" "eu-west-1" "-prefix" "equipo-hosted-prod-r1"]; want the global flags with -expect-role | restored |
| +- U35 sign's -key and -key-id not checked at parse. `TestParseChecksArguments`: exit 1 | plan_test.go:63: sign without -key: <nil>, want a refusal naming it required | restored |
| +- U36 controller flags not checked at parse. `TestParseChecksArguments`: exit 1 | plan_test.go:63: alert-test without -controller: <nil>, want a refusal naming it required | restored |
| +- U37 launch not checked at parse. `TestParseChecksArguments`: exit 1 | plan_test.go:63: launch without -image: <nil>, want a refusal naming it required | restored |
| +- U38 code spans read one line only. `TestPlanCertInvocationsParse`: exit 1 | plan_test.go:38: only 3 literal cert invocations read; the account plan has at least launch, judge, sign, verify, reload and alert-test | restored (a first try named text the helper did not hold; redone) |
| +- U39 the plan's sign without -key-id. `TestPlanCertInvocationsParse`: exit 1 | plan_test.go:33: ... cert sign -evidence evidence.json -release image-manifest.json -controller-pub controller.pub -key /home/paul/equipo-cert/paul-cert-1 -out certificate.json: -key and -key-id are required | restored |
| +- U40 the plan's img delete with an unknown flag. `TestPlanImgInvocationsParse`: exit 1 | plan_test.go:48: ... delete --arn arn:aws:lambda:eu-west-1:149757027610:microvm-image:equipo-hosted-prod-r1 --wait: usage: flag provided but not defined: -wait | restored |
| + |
| +Seen while working, not changed: `TestConcurrentRequestersJoinOneRecovery` (Task 33 after-cap) fails about once in 20 to 40 runs under load (average load near 50): requesters ended [block 99 operator 99], want the block 99 and the operator 0. It fails at the same rate on `d67ba3db` without these changes. |