Skip to content

Verify spored came up after a real launch (spawn:last-heartbeat), terminate if it did not (Go #1296/#1298) #109

Open

Description

@scttfrdmn

A real launch returns as soon as RunInstances does. Nothing in spawn-ts checks that spored came up, so a launch whose spored never starts (or crash-loops after starting) looks like a success while the instance has no on-instance TTL, idle or cost enforcement.

Go spawn verifies it by default after every Linux launch (spawn#1296, spawn#1298; cmd/launch_posthook.go verifySporedReadyOn at v0.149.0):

  • It polls ec2:DescribeInstances every 10 s for up to 5 min for the spawn:last-heartbeat tag spored writes on every tick (#1053). It also asks SSM as a second signal, but a missing or refused SSM is never the verdict.
  • A denied DescribeInstances is reported as "can't verify spored", not as "spored never came up" (#1126).
  • When verification fails, the launch fails, and since #1298 the instance is terminated unless --keep-on-error.

Evidence that spawn-ts has no equivalent: grep -rn heartbeat src returns nothing.

The parity PR (chore/go-parity-2026-10) narrows this. The bootstrap is now Go's v0.149.0 stub, which terminates the instance on any exit before spored is running (spawn_fatal_retire), and a launch that throws after RunInstances now terminates its instance. Two gaps are left: a spored that starts and then dies, and an instance whose bootstrap never runs at all (wrong AMI, no egress before the stub). Both are only caught by the TTL reaper, and only in accounts that deploy one.

Portable: a browser can poll DescribeInstances for the tag. The design question is where the wait lives. SpawnClient.launch resolving 1-5 minutes later is a large API change. The alternative is an unverified state on the instance that the monitor loop resolves, and that terminates on timeout unless keepOnError is set.

Activity

  1. added
    enhancement
    area: aws
    cost-safety
    on Oct 29, 2026
  2. added this to the Hardening milestone on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: awscost-safetyenhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions