Repository navigation
status: list every billable resource, not just the instance - #634
Merged
Merged
Conversation
spawn status reported the instance and nothing else, while a launch can also provision an FSx Lustre filesystem (1200 GiB minimum, ~$174/month), an EFS mount, and EBS volumes that keep billing while the instance is merely stopped. So the user's mental model of 'what am I paying for' was built from a structurally incomplete view. That is how #613 happened: the filesystem was the most expensive thing in the launch and the least visible thing in the tooling. --cost-limit is compute-only, --estimate-only didn't mention it, terminate didn't mention it, and status didn't either — every surface a user would naturally check was silent about the single largest line item. status now lists each billable resource with its rate, states explicitly that --cost-limit caps COMPUTE only, and marks the rows that keep billing after the instance is gone, with the commands to find and delete them. A stopped instance's EBS is called out as STILL BILLING while the compute row says it is not — 'stopped to save money' is the quietest form of the same surprise, and spored cannot act once stopped. Rates come from the tags spawn already wrote (spawn:price-per-hour, spawn:ebs-hourly-cost) rather than being re-derived, so this view cannot drift from what --cost-limit is actually enforced against (#533). An unpriced instance reads 'rate unknown', never $0.00. A provisioning filesystem (spawn:fsx-pending) counts, since that is the window #613 was reported from. The block is omitted entirely when the instance is the only billable thing — status already says that, and a redundant section is the noise that made the old reaper warning worthless. Also retires a hedge my own #624 made stale: status said the reaper was a backstop 'if deployed for your account', and the comment justifying it claimed coverage was not detectable from a launch account, citing the hardcoded pkg/doctor stub that #624 replaced. Both were wrong. The line now points at 'spawn doctor', which answers it, rather than making status pay for two AWS calls per invocation. Refs #615
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This was referenced Oct 3, 2026
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.
Refs #615.
Process note: I first committed this straight to
main(fd823ed) instead of opening a PR — my mistake, from checking outmainfor a clean base and forgetting to branch.mainhas been reverted (e9e26ae, no history rewrite) and this PR re-lands the same change through review. The content is unchanged.The gap
spawn statusreported the instance. A launch can also provision an FSx Lustre filesystem (1200 GiB minimum, ~$174/month), an EFS mount, and EBS volumes that keep billing while the instance is merely stopped. So the user's mental model of "what am I paying for" was built from a structurally incomplete view.That is how #613 happened. The filesystem was the most expensive thing in the launch and the least visible thing in the tooling:
--cost-limitis compute-only,--estimate-onlydidn't mention it,spawn terminatedidn't mention it, andspawn statusdidn't either. Every surface a user would naturally check was silent about the single largest line item.What it looks like
Design choices worth reviewing:
spawn:price-per-hour,spawn:ebs-hourly-cost) rather than being re-derived. That keeps this view from drifting from what--cost-limitis actually enforced against (--cost-limit is enforced against a fabricated rate: an $8 cap on g6e.xlarge does not fire until $74 #533), and costs no extra AWS calls on the common path.rate unknown, never$0.00. A fabricated or zeroed rate is how --cost-limit is enforced against a fabricated rate: an $8 cap on g6e.xlarge does not fire until $74 #533's cap silently stopped being enforceable.spawn:fsx-pending), because that is the exact window --fsx-lifecycle ephemeral did not reap the filesystem when the instance terminated (1.2 TiB left AVAILABLE and billing) #613 was reported from.sporedcannot act once stopped — the shape of the instance that sat 13 days past its TTL.statusalready says that, and a redundant section is precisely the noise that made the old always-on reaper warning worthless.~$174/month or moreis knowable without a describe and is far more useful than silence.Also: retires a hedge #624 made stale
spawn statussaid the reaper was a backstop "if deployed for your account", and the comment justifying it claimed coverage was not detectable from a launch account — citing the hardcodedpkg/doctorstub that #624 replaced. Both were wrong. The line now points atspawn doctor, which answers it definitively, rather than makingstatuspay for two AWS calls per invocation. (I'd rather fix a stale claim I created than leave it behind one PR later.)Tests
Nine cases, all pure (no AWS): the FSx row names the filesystem, lifecycle and cost floor; stopped EBS is flagged while compute is not; an unpriced instance says so and never renders zero; a pending filesystem appears and is labelled provisioning; EFS states its billing basis rather than implying free; the block is silent for compute-only and for untagged/nil instances;
Capped/OutlivesInstanceare correct per kind (storage must not claim to be covered by--cost-limit— that's the #616 confusion); andparseTagFloatrejects junk and negatives.Gates
gofmt·go vet·go build·go test ./...all green ·make check-docsclean ·staticcheckzero added (diffed by message).Suggested bump: MINOR (new output section). #616 — making
--cost-limitactually cover storage — remains the open behavioural question; this is the visibility half.