Repository navigation
Description
Raised by the maintainer: "spawn should have a check when it is used in a region that spored is not available." Investigated before filing; the gap is wider than a missing preflight, because when it bites, the user is told everything worked.
Six enabled regions have no spored bucket
Release publishes spored to 11 regional buckets (release.yaml). The dev account has 17 enabled regions. Enabled but no spawn-binaries-<region> bucket:
ap-northeast-2 ap-northeast-3 ap-south-1 eu-north-1 eu-west-3 sa-east-1
Nothing in spawn launch or spawn doctor checks this.
The fallback works only with public-internet egress
The bootstrap tries spawn-binaries-${REGION} then spawn-binaries-us-east-1 (pkg/launcher/bootstrap.go:372-373; Windows: cmd/launch_config.go:555). So in those six regions spored still installs — provided the instance can reach us-east-1's S3 over the public internet. An instance in a private subnet whose only S3 path is a gateway endpoint can reach its own region's S3 and never another region's, so in a bucket-less region it cannot get spored at all.
When both sources fail, the user is told it succeeded
The install is fail-closed (correctly), and the bootstrap aborts:
if ! spore_install_verified_spored "$BINARY" ...; then
echo "spored install failed — aborting bootstrap rather than running an unverified agent"
exit 1That exit 1 comes before the login user is created and its SSH key installed. The instance keeps running and billing with no in-instance lifecycle at all — no TTL, no idle stop, no cost-limit — and the out-of-band reaper backstops only the accounts it covers.
Meanwhile spawn launch waits for SSH by default (--wait-for-ssh=true), and waitForSSHReady (cmd/launch_posthook.go) is a TCP dial to port 22. sshd listens whether or not the bootstrap aborted, so the launch reports success.
The same silent path is reached by any install failure, not only missing regions: a bucket outage, a missing .sig, or a .sha256 that disagrees with its binary — which is exactly what #876's script would have produced in every region at once.
What to build
Two parts, and the second matters more:
- Preflight (the maintainer's ask). Before
RunInstances, check that spored is published for the target region. Source of truth should be Publish a spored region manifest at release time; truffle reads it instead of hardcoding #20's release-time manifest, so the check reads what was actually uploaded rather than a third hand-maintained list. With a manifest saying the region is absent: say so plainly, name the us-east-1 fallback and that it needs public-internet egress, and refuse when the launch is into a subnet with no route to the internet (determinable from the subnet's route table) unless explicitly overridden.spawn doctorshould report the same. - Post-launch detection. Don't call a launch successful until spored is actually running. spored already writes
spawn:last-heartbeat(No caller-facing way to wait for job completion without guessing a wall-clock deadline — OnComplete's sentinel is on-instance only, and task run --wait has the same guess-a-deadline flaw #497) about once a minute; the launch should wait for its first value, bounded, and on timeout say spored did not start — this instance has no TTL enforcement, with the console output as the next step. This catches every install failure, not only the region case.
The second is what turns a silent, indefinitely-billing instance into a visible failure, which is why it should not wait on #20.
Related: #20 (manifest), #876 (the script that would have broken installs everywhere), and the "everything dies eventually" invariant.
Activity
[-]spawn launch should check spored is available in the region, and notice when its install failed[/-][+]spored-availability preflight for regions without a bucket; spored verification is missing on Windows and possibly on non-single launch paths[/+]scttfrdmn commentedon Oct 13, 2026
Correction — the central claim of this issue is wrong for the default Linux path. I wrote that
spawn launchreports success after only a TCP check on port 22. It doesn't. I stopped reading at the SSH wait and missed the step immediately after it:verifySporedReadywaits for SSM, runs/usr/local/bin/spored status, and fails the launch if spored isn't running, honouring--terminate-on-error. So on the default Linux path a failed spored install is already loud. Retitled accordingly.What actually remains
RunInstances, which is cheaper and clearer.plat.OS != "windows", and the Windows bootstrap's install continues on failure (Verify spored on the Windows launch path, and fail closed #879 / GHSA-q59f-6gc3-qj2p). So a Windows spore without spored genuinely is silent.--wait-for-ssh=falseskips Step 10b. Documented escape hatch; fine, but worth one line in the flag help saying it also skips spored verification.launch_singlecallsverifySporedReady. A name-based grep finds no reference to it,spored statusorWaitForSSMOnlineincmd/launch_jobarray.go,cmd/launch_sweep.go,cmd/task.go,cmd/app.go,cmd/service.go,pkg/launcher/provision.goorlambda/sweep-orchestrator. Some may verify indirectly; each needs reading before anything is built. If any genuinely don't, the right fix is probably verifying from spored's side — the heartbeat tag (No caller-facing way to wait for job completion without guessing a wall-clock deadline — OnComplete's sentinel is on-instance only, and task run --wait has the same guess-a-deadline flaw #497) — rather than an SSM round-trip per instance, since sweeps and the Lambda orchestrator launch in bulk and cannot hold an SSM session per spore.I've updated the checklist below to match.
--wait-for-sshhelp: it also skips spored verification.scttfrdmn commentedon Oct 19, 2026
Status from #1196 (open, not merged):
spawn:last-heartbeattag as the main evidence on every OS. The writer is inpkg/agent/agent.gowith no build constraint and is called fromcheckAndAct; a gate checks this for GOOS=linux and windows. So a Windows spore whose spored never starts fails the launch after 10 min, and that no longer depends on SSM.--wait-for-ssh=false: still skips verification, as this issue's correction comment scopes it. It now prints that spored was not verified, the flag help says so, and--output jsoncarriesspored_verified: false.pkg/launcher, the sweep orchestrator) is also untouched.Verify spored by its heartbeat tag; report AccessDenied as AccessDeni…
Verify spored by its heartbeat tag; report AccessDenied as AccessDeni…
scttfrdmn commentedon Oct 20, 2026
The Windows part shipped in #1196 (v0.136.0): heartbeat verification covers Windows, and
--wait-for-ssh=falsenow says that spored wasn't verified. The bucket-less-region preflight needs the region manifest (#20), so this moves to Later.