Repository navigation
Real-AWS bootstrap fix + launch validation (#2, #17) - #18
Merged
Merged
Conversation
Pre-launch audit against real AWS found the launch path could never self- terminate an instance — it would strand billing. Fixed all four gaps, then validated a real launch (t4g.nano, us-east-1, 10-min TTL, explicit terminate + leak-check; ~$0.0001). - userdata.ts: spored install now mirrors the Go bootstrap — arch detection (amd64/arm64), region from IMDS, download from the regional S3 bucket (spawn-binaries-<region>, us-east-1 fallback, prefixed+legacy paths), SHA256 verify, atomic install. The old GitHub-release URL 404'd and was amd64-only. - ec2.ts: attach IamInstanceProfile (new option) so spored can DescribeTags + TerminateInstances; resolve latest AL2023 AMI via DescribeImages per arch when spec.ami is absent; export archForInstanceType. - Tests updated: bootstrap S3/arch/checksum assertions, IAM-profile + AMI-resolve + arch-inference cases. 194 tests.
This was referenced Jul 21, 2026
Merged
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.
Resolves the long-gated #2 (real-AWS launch validation) and fixes #17 (broken bootstrap) found in the process.
What the pre-launch audit found (before spending anything)
The EC2 path was only ever tested against substrate, which doesn't execute user-data — hiding four gaps that meant a real launch would strand a billing instance, never self-terminating:
DescribeTags/TerminateInstances.Fixes
userdata.ts— install spored the way the Go tool does: arch detect, region from IMDS, downloadspored-linux-<arch>fromspawn-binaries-<region>S3 (us-east-1 fallback, prefixed+legacy paths), SHA256 verify, atomic install. Verified the S3 binary is anonymously downloadable.ec2.ts— newiamInstanceProfileoption threaded intoRunInstances;resolveAmiviaDescribeImages(latest AL2023 per arch) whenspec.amiis empty;archForInstanceType.Real launch (approved envelope)
Launched
i-0ad2d762fe1d21f8e— t4g.nano, us-east-1,spored-instance-profile, 10-min TTL — reached running with a resolved arm64 AL2023 AMI (ami-00b18f89b5bdfb338), then explicitly terminated + leak-checked: instanceterminated, no orphaned volumes. Spend ≈ $0.0001.Honest caveat: I validated launch → running → the prerequisites for self-termination (correct binary/arch/IAM/AMI), and terminated at ~90s rather than idling a paid instance for the full 10 min to watch spored fire the TTL. Full unattended-TTL observation is noted as a follow-up on #2.
194 tests, typecheck + build green.