Repository navigation
feat: verify spored came up on launch; fail if it didn't (#50) - #251
Merged
Merged
Conversation
spored installs asynchronously via cloud-init, so a failed install (bad download, checksum/arch mismatch, network) left a "running" instance with NO lifecycle agent — no TTL enforcement, no idle stop, no completion handling. That is a cost-control hole: a spored-less instance has no TTL safety net (the #47 zombie class). When launch waits for readiness (--wait-for-ssh, the default), it now verifies `spored status` responds over SSM (verifySporedReady, polled to a 3m deadline; SSM works for keyed and keyless instances) and fails loudly if spored never came up, pointing the user to inspect (spawn connect) or terminate it. - --require-spored (default true): the check; disable with --require-spored=false. - --terminate-on-error (default false): auto-terminate the agentless instance instead of leaving it running for inspection. - Linux only (Windows readiness is password-data based, separate path). Closes #50.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #50. spored installs asynchronously via cloud-init, so a failed install (bad download, checksum/arch mismatch, network) left a "running" instance with no lifecycle agent — no TTL enforcement, no idle stop, no completion handling. That's a cost-control hole: a spored-less instance has no TTL safety net (the #47 zombie class), and
spawn launchreported success.Change
When launch waits for readiness (
--wait-for-ssh, the default), it now verifiesspored statusresponds over SSM and fails loudly if spored never came up:verifySporedReadypollsspored statusover SSM (works for both keyed and keyless instances) to a 3-minute deadline.--require-spored(default true): the check; disable with--require-spored=false.--terminate-on-error(default false): auto-terminate the agentless instance instead of leaving it for inspection.spawn connect/spawn terminatecommands.Verification
make checkgreen; Tier 0 coverage gate green (rebuiltbin/spawn). The happy path is exercised by the existing live e2e launches; the failure path is a bounded SSM poll that returns an error → the launch returns non-zero (the #16 wiring, verified this session).Part of the pre-epic batch; releases together with #222/#214/#246/#79/#247/#248.