Skip to content

test(e2e): Tier 2 test for launcher.Provision (catches the #127/#130 class) - #133

Merged
scttfrdmn merged 3 commits into
mainfrom
test/live-provision-smoke
Jun 13, 2026
Merged

scttfrdmn merged 3 commits into
mainfrom
test/live-provision-smoke

Conversation

@scttfrdmn

@scttfrdmn scttfrdmn commented Jun 13, 2026 •

Copy link
Copy Markdown
Contributor

Tier 0 (substrate) accepts malformed user-data (#127) and an empty KeyName (#130) — so it green-lit both bugs that broke every headless launch. This adds a Tier 2 e2e test (-tags=e2e_tier2) that drives launcher.Provision directly (the keyless/SSM-only library path lagotto's poller takes) against real AWS, and reuses the existing tier cleanup (terminate-by-name + reaper + TTL).

Fits the existing tier system rather than a bespoke env gate: Tier 0 = substrate, Tiers 1–3 = real AWS by cost; a single real instance is Tier 2. It's the first library-level (vs CLI-binary) tier test.

Verified live twice (us-east-1, t3.small): launched → running → terminated, independently leak-checked clean each time. Excluded from the default build/CI by the build tag.

Substrate accepts malformed user-data (#127) and an empty KeyName (#130), so it
missed both blockers that broke every headless launch. Add a real-AWS test
(SPAWN_LIVE_PROVISION_TEST=1) that drives launcher.Provision exactly as lagotto
does — keyless/SSM-only — and terminates the instance in a defer. Verified live:
launched + terminated i-03c5aef4... in us-east-1, leak-checked clean. Skipped by
default so CI is unaffected.
@codecov

codecov Bot commented Jun 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Replace the bespoke SPAWN_LIVE_PROVISION_TEST env gate with the existing e2e
tier system: a //go:build e2e_tier2 test that drives launcher.Provision (the
headless/keyless library path lagotto uses) and reuses the tier cleanup
(terminate-by-name + reaper + TTL). Tier 0/substrate accepts the malformed
user-data (#127) and empty KeyName (#130) that broke real launches, so this
belongs at Tier 2 (single real instance) alongside the CLI-driven Tier 2 tests.
Verified live: launched + terminated i-07b8d192..., leak-checked clean.
@scttfrdmn scttfrdmn changed the title test(launcher): real-AWS Provision smoke test (catches the #127/#130 class) test(e2e): Tier 2 test for launcher.Provision (catches the #127/#130 class) Jun 13, 2026
@scttfrdmn
scttfrdmn merged commit facb457 into main Jun 13, 2026
3 checks passed
@scttfrdmn
scttfrdmn deleted the test/live-provision-smoke branch June 13, 2026 01:12
scttfrdmn added a commit that referenced this pull request Aug 10, 2026
truffle v0.49.0 (carrying #133 QuotaInfo.SpotUsage and #134
Capabilities.VCPUs) is now released, so this PR no longer needs the
local-path replace directive. go.mod now pins the real tag; verified
the full build/test suite (including TestCatalogValid and the new
sweep-quota tests) against it, not the local checkout.
scttfrdmn added a commit that referenced this pull request Aug 10, 2026
…al quota (#493)

* feat(launch): --max-concurrent-auto derives sweep concurrency from real quota

The sweep orchestrator's wave mechanism (pkg/sweep +
lambda/sweep-orchestrator) already polls active-instance count and
launches min(available, remaining) -- a real batch/wait-for-room
primitive. But its ceiling (state.MaxConcurrent) was always a number
the caller had to already know, via --max-concurrent or the arbitrary
default-10 fallback when a sweep auto-enables --detach.

--max-concurrent-auto queries truffle's quota client for headroom
(quota - current usage) per instance family, in the region the sweep
is about to launch in, and converts vCPU headroom to an instance
count via the real per-type vCPU count (truffle#134's new
Capabilities.VCPUs, not a guessed size suffix). A heterogeneous
sweep's derived ceiling is the MINIMUM across every distinct
(instance type, spot/on-demand) combination present in the sweep, so
a scarce family can't be silently outvoted by a roomier one.

Real-world motivation: a 10-shard fleet launch with no concurrency
guardrail hit an account's real ceiling (a G/VT Spot quota of 64
vCPUs, saturated by 8 running g7e.2xlarge instances) with zero prior
warning; the actual launches then failed with
MaxSpotInstanceCountExceeded.

Not yet wired into `spawn resume`'s equivalent override -- tracked as
a follow-up, since resume already has a recorded region and is a
smaller retrofit.

BLOCKED: go.mod carries a TEMPORARY local replace directive for
truffle, since this code depends on truffle#133 (QuotaInfo.SpotUsage)
and truffle#134 (Capabilities.VCPUs), both unreleased. Must be
resolved to a real tag before merge.

Fixes #492.

* chore: drop temporary truffle replace, pin real v0.49.0

truffle v0.49.0 (carrying #133 QuotaInfo.SpotUsage and #134
Capabilities.VCPUs) is now released, so this PR no longer needs the
local-path replace directive. go.mod now pins the real tag; verified
the full build/test suite (including TestCatalogValid and the new
sweep-quota tests) against it, not the local checkout.
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.

1 participant