You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Launching roles (portal, sweep, CI smoke) can't write the lifecycle lease, so idle teardown never sees regional activity #1672
After spawn setup-account (main, post-#1669) in dev 435415984226, the global lease scope is ACTIVE (epoch 1, written by the admin run). But the principals that actually launch spores there can't write spore-host-lifecycle. Simulated dynamodb:UpdateItem and dynamodb:ConditionCheckItem on arn:aws:dynamodb:us-east-1:435415984226:table/spore-host-lifecycle:
Role
Lease write
Defined in
OrganizationAccountAccessRole
allowed (admin)
—
SpawnSweepCrossAccountRole
implicitDeny
scripts/setup-sweep-cross-account-role.sh
spore-portal-launch
implicitDeny
spore-host/infra/tofu/portal-oidc/main.tf
spore-portal-e2e
implicitDeny
portal-oidc
GitHubActions-spawn-ts-live-smoke
implicitDeny
spawn-ts CI
Each launch path calls lifecyclemark.Mark (for example pkg/aws/client.go:663 and cmd/launch_sweep.go:1407). Without the grant the call fails silently, so regional scopes are never marked. The production reaper's account-idle sweep (v0.168.0, report mode) then logs lease unavailable … skipped for every region; first run 2026-11-20 20:31 UTC.
This fails safe: the account is never idle-torn-down. It also means leave-no-trace never fires for spores launched by the portal, sweeps or CI.
The dev account has no IAM groups or users, so the attach-group-policy hint from setup-account doesn't apply.
Fix
Have each role's provisioner attach arn:aws:iam::<acct>:policy/spore-host/spawn-user-lifecycle, or carry the same statement inline. Do this in the role's source, not out of band, so a re-apply doesn't drop it:
the sweep cross-account role script;
the portal-oidc Tofu (launch and e2e roles);
the spawn-ts smoke role.
Then confirm in report logs that the regional scopes go ACTIVE, then IDLE.
Do not grant it to anything tagged spore-host:role=service in infra 966362334030, since that account has no lease. Never anything touching 942542972736.
I traced the code each role in the table runs. None of the four calls lifecyclemark.Mark, so granting them the lease would add unused grants and would not make a regional scope go ACTIVE:
SpawnSweepCrossAccountRole: the sweep orchestrator never marks, by design. The CLI marks every sweep region and global before it invokes the orchestrator (cmd/launch_sweep.go:1407), and the reaper counts an unfinished sweep or schedule record as activity. An uncalled grant would also fail TestSweepCrossAccountRoleGrantsOnlyWhatTheOrchestratorCalls.
GitHubActions-spawn-ts-live-smoke: it launches through spawn-ts, which has no DynamoDB client and no lease code. The role also isn't codified anywhere.
The dev regions are "lease unavailable" because no creator that marks has created there since v0.168.0. The launches there come from spawn-ts (live smoke, portal e2e setup) or from orchestrator sweeps.
spawn-instance-nested-*: --nested-spawn children do call Mark, and the role isn't granted the lease. I left it ungranted, with the reason recorded in the gate, for the owner to decide. A live head keeps its own region active, so only a child launched into another region is unfenced.
spawn doctor's check now makes the mark's transaction (ConditionCheckItem plus UpdateItem). Before, it tried UpdateItem alone and passed an identity that could not mark.
The coverage gates now attribute a mark to the role that would run it.
Activity
scttfrdmn commentedon Nov 25, 2026
I traced the code each role in the table runs. None of the four calls
lifecyclemark.Mark, so granting them the lease would add unused grants and would not make a regional scope go ACTIVE:SpawnSweepCrossAccountRole: the sweep orchestrator never marks, by design. The CLI marks every sweep region and global before it invokes the orchestrator (cmd/launch_sweep.go:1407), and the reaper counts an unfinished sweep or schedule record as activity. An uncalled grant would also failTestSweepCrossAccountRoleGrantsOnlyWhatTheOrchestratorCalls.spore-portal-launchandspore-portal-e2e: both read-only by decision (SAM packages the entire CodeUri directory, so the ttl-reaper deploys at 75.7 MiB instead of ~7 MiB (and would ship .deploy-params.yaml) #645). They create nothing, and spore-host'siam-policy-source.test.tsfails on any write.GitHubActions-spawn-ts-live-smoke: it launches through spawn-ts, which has no DynamoDB client and no lease code. The role also isn't codified anywhere.The dev regions are "lease unavailable" because no creator that marks has created there since v0.168.0. The launches there come from spawn-ts (live smoke, portal e2e setup) or from orchestrator sweeps.
Follow-ups:
spawn resumere-invokes the orchestrator without marking the sweep's regions.AWS_DEV_ROLE_ARNruns spawn v0.168.0 launches in dev and isn't codified. Fix it by attachingspore-host/spawn-user-lifecycle, or by codifying the role.spawn-instance-nested-*:--nested-spawnchildren do call Mark, and the role isn't granted the lease. I left it ungranted, with the reason recorded in the gate, for the owner to decide. A live head keeps its own region active, so only a child launched into another region is unfenced.Draft PR #1676:
spawn doctor's check now makes the mark's transaction (ConditionCheckItemplusUpdateItem). Before, it triedUpdateItemalone and passed an identity that could not mark.fix(doctor): in a region with no lease table, probe the control regio…
deps(security): bump go.opentelemetry.io/otel to v1.47.0 (GO-2026-697…
deps(security): bump the OTel trace exporters to v1.47.0 with otel (#…
fix(doctor): no false pass in a table-less region; agree with Mark ou…