Skip to content

fix(launch): --estimate-only runs constraint validation (#124) - #140

Merged
scttfrdmn merged 1 commit into
mainfrom
fix/124-estimate-only-validation
Jun 13, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
fix/124-estimate-only-validation

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

--estimate-only short-circuited before the #110 pre-flight constraint validation, so it printed a cost estimate even for a config that couldn't actually launch (e.g. --efa on a non-EFA instance type). That defeats the point of the flag — the cheapest way to check a constraint was to attempt a real launch.

Fix: run preflightInstanceConstraints (EFA / hibernation / MPI / placement-group) before the estimate. An impossible config now surfaces the same actionable error and exits non-zero; a viable one estimates as before.

Verified live (dev account):

  • t3.micro --efa --estimate-only → does not support EFA, exit 1 (was: 'Estimate complete', exit 0)
  • m7i.large --estimate-only → estimate prints normally

Added a Tier 1 e2e regression (TestTier1_EstimateOnlyValidatesConstraints). make check green. Closes #124.

Aside (out of scope, pre-existing): make build-spored compiles cmd/spored/main.go alone instead of ./cmd/spored/, so it breaks on symbols defined in sibling files. Not touched here; worth a separate issue.

#124)

--estimate-only short-circuited before the #110 pre-flight validation, so it
printed a cost estimate even for a config that couldn't launch (e.g. --efa on a
non-EFA type). Run preflightInstanceConstraints before the estimate so an
impossible config surfaces the same actionable error and a non-zero exit —
making --estimate-only the safe way to validate a config without spending.

Add a Tier 1 e2e regression (t3.micro --efa --estimate-only must fail with the
EFA error, not print 'Estimate complete'). Verified live.
@codecov

codecov Bot commented Jun 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/launch.go 0.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@scttfrdmn
scttfrdmn merged commit 16338b9 into main Jun 13, 2026
2 of 3 checks passed
@scttfrdmn
scttfrdmn deleted the fix/124-estimate-only-validation branch June 13, 2026 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

--estimate-only skips #110 constraint validation; should dry-run it before the cost estimate

1 participant