Repository navigation
fix(cloud): price the dashboard size cards and name the rate's region - #36666
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks. The change is display-only, it adds a price figure that a parity test keeps in sync, and none of the recorded decisions conflict with it. Notes
[DESIGN-REVIEWED] 97abda5 Description read[DESCRIPTION-READ] da7baca8c557f31e6c3da10f9026eb445bb03c78386619880161e13333554194 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. The price figure and Region already lived in Notes
What this change shipsInventory (6 items) — 4 justifiedIntent: a new user can see roughly what each cloud crew size costs, on the dashboard and in the CLI, and is told when that is the us-east-1 rate. FIX.
[FIRST-PRINCIPLES-REVIEWED] 97abda5 Description read[DESCRIPTION-READ] df6b41aa958b0dc32c565d14470a701a95c8b9c96ff63cdd8ca41af257fcdccc That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks: the blind reader read the price line correctly and was sure of it, and the screenshots cover all six cards, the Region note, dark theme and the 390 px width. Notes
[UX-REVIEWED] 97abda5 Description read[DESCRIPTION-READ] be625ad7a3c21ab91a8d4aa21f81ddeecc835b3283c694e0339630bc0c278397 That sha256 names everything this verdict read: the PR description, plus the 9 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
Code change approver recommendation: A person should decideWhy: the decider estimates an 8% chance that this change introduces a defect, within the 12% limit for approving on its own, but it is held at tier 2: 23 files, more than 20. Display-only change that puts the same us-east-1 price figures on the dashboard size cards and the CLI, with a Region note for other Regions. The six dashboard prices match sizes.py, and the extended parity test now guards prices, PRICE_REGION and the 30-day month. Hand-checked hourly and monthly rounding comes out the same on both surfaces. The CLI region is validated before price_basis is called, and the dashboard Region defaults to us-east-1. No other code uses SizeTier, and no spec forbids a dollar figure on the dashboard (only the docstring said so, and the PR updates it). New tests cover the CLI line in both Region cases, the Ctrl+C warning and the dashboard card and note. CI is fully green. Tier: 2, held for a person: 23 files, more than 20. An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit |
The dashboard's launch size cards showed no price, and the CLI printed the us-east-1 on-demand rate for every Region without saying so. Each card shows the same approximate hourly and monthly figure the CLI prints, plus the --size key the CLI takes for it. When another Region is picked, both surfaces say the figure is the us-east-1 on-demand rate and that other Regions may differ. The UI parity test holds the cards' prices and that Region to cloud/sizes.py. Closes #32338
|
Rebased: main moved in docs/system-specs/modules/cloud.md, src/kiro_crew/cloud/wizard.py, test/test_cloud_wizard.py, website/src/i18n/en.context.json, website/src/pages/settings/RemoteCrewPanel.tsx, website/src/i18n/locales/*.json since this head went green (c22557c -> ce21fa1); CI re-running. GitHub reported this PR as conflicting: main added the [operator: bolichen97] |
3c0e2c7 to
97abda5
Compare
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Review checks on head 97abda5:
- The CLI region note comes from one
price_basis()helper. It runs only after the Region has been validated. - The dashboard check
region.trim() !== PRICE_REGIONmatches the trimmed Region the launch request sends. - I worked the hourly figure and the 720-hour monthly figure for all six tiers by hand, and they match the CLI.
- All 13 locales keep their placeholders.
- The new tests fail on a revert, on both sides of each predicate.
What works well: the parity test now pins each card's price, PRICE_REGION and the 30-day month to cloud/sizes.py. If one surface changes without the other, CI fails.
Optional:
- Add one line to the body saying this replaces the old "dashboard shows no dollar figure" docstring from #2059, as #32338 asks.
- The Proof line names an older head (f39e8c9c97e0) and lists only the parity cases. If you re-run it, name current head 97abda5 and the wizard sa-east-1 case, the Ctrl+C warning test and the vitest case.
- #38622 edits the same import list in
RemoteCrewPanelLaunch.tsx. Whichever PR lands second needs a small rebase.
Problem / Motivation
Goal: Before Launch, a new user sees the same approximate price for each cloud crew size on the dashboard and in the CLI, and is told when that price is the us-east-1 rate rather than their Region's.
The dashboard's size cards (Settings → Remote Crew → Set up a new one) show no price at all, so "what will this cost me?" goes unanswered. The CLI does print a price, but it is the us-east-1 on-demand rate for every Region and never says so:
--region sa-east-1prints the same~$0.13/hr · ~$96/moas us-east-1. The cards' names (Light / Development / Power) also do not tell a user which--sizevalue each one is.Why it matters
The price is the question a new user asks before creating an EC2 instance in their own AWS account. Today the dashboard leaves it blank and the CLI can answer it with a number that is wrong for their Region, with nothing saying it is an estimate for another Region.
Not a goal
cloud/sizes.pyalready carries.What changed (motivation → approach → change)
~$0.33/hr · ~$235/mo if left running (approx)and--size balanced(approx)(approx; us-east-1 on-demand rate, other Regions may differ)about $0.33/hr~$0.33/hrwith the same basis in bracketsThe cause is that the per-size price lived only in
cloud/sizes.py: the dashboard's own size table (remoteCrewPanelModel.ts) never carried it, and nothing recorded which Region the figure was read for. The dashboard table now carries the sameapproxUsdPerHrfigures and the Region they are for (PRICE_REGION,us-east-1), and the existing UI parity test holds both, and the 30-day month, equal tosizes.py. The size card formats the figures through the locale seam (fmtCurrency), names the price to screen readers as the card's description, and shows the--sizekey as a code constant in a<code>element, since it is typed into a terminal and must never be translated. Two catalog strings land inwebsite/src/i18n/locales/in all 12 languages, with translator context inen.context.json;sizes.price_basis(region)gives the CLI its wording.docs/system-specs/modules/cloud.mddescribes the shared figure.Backwards compatibility
Compatible: display text only; no flag, config key, API field or launch behaviour changes.
Removes nothing: the existing price line, specs, billing note and calculator link all stay.
Tests
test/test_cloud_sizes_ui_parity.py: every card'sapproxUsdPerHrequals the tier'sapprox_usd_per_hr, and the panel'sPRICE_REGIONand month length matchsizes.py.test/test_cloud_wizard.py: with--size light, the price line names the us-east-1 rate in sa-east-1 and does not in us-east-1; the Ctrl+C warning carries the same basis.website/src/test/RemoteCrewPanelLaunchForm.test.tsx: the Development card shows--size balancedin a<code>element and has~$0.33/hr · ~$235/mo if left running (approx)as its accessible description, and the Region note appears only once the Region is changed to sa-east-1.Proof: PROVEN test/test_cloud_sizes_ui_parity.py::test_the_panel_tables_were_parsed, test/test_cloud_sizes_ui_parity.py::test_panel_tier_matches_sizes_py[balanced], test/test_cloud_sizes_ui_parity.py::test_panel_tier_matches_sizes_py[balanced-x86], test/test_cloud_sizes_ui_parity.py::test_panel_tier_matches_sizes_py[light], test/test_cloud_sizes_ui_parity.py::test_panel_tier_matches_sizes_py[light-x86] (head f39e8c9c97e0)
prove.py ran on a Linux host's commit of this exact tree (
d494d26e); with the production hunks reverted, the new wizard test (sa-east-1 case) andtest_panel_prices_name_the_same_region_and_month_as_sizes_pyfail too, and the new vitest case fails with thewebsite/src/pages/and catalog changes reverted. All pass on the fix.Determinism: the three changed backend test files (67 tests) passed 3 times in a row and once in a shuffled order (seed 32338);
RemoteCrewPanelLaunchForm.test.tsxandRemoteCrewPanel.test.tsx(81 tests) passed 3 times and once with--sequence.shuffle --sequence.seed=32338.Manual verification
Run on Ubuntu 24.04 (Linux, x86_64) from this tree. CLI through
wizard.launchwith only the session-manager-plugin prompt, the existing-launch lookup and the deploy stubbed, answering n at the confirmation:On the base both Regions printed the same
(approx)line. Dashboard in an isolated test-mode gateway, Settings → Remote Crew → Set up a new one, with Playwright: all six cards (arm64 and x86_64) carry their price and a<code>--sizekey, each card's accessible description is its price line, the Region note shows only for sa-east-1, and no card overflows at 390 px. Picking Power setsaria-pressedand the intercepted launch request carriessize_key: "power"(it never reached AWS).Screenshots / video
Before (base), us-east-1: specs only.
After, us-east-1: price and
--sizekey on each card, no Region note.After, sa-east-1: the Region note above the cards.
Dark theme, the x86_64 lane, and 390 px wide
Related Issues
Closes #32338
Sibling sweep
Swept: git grep -n "approx_usd_per_hr|monthly_estimate|summary()" -- src/kiro_crew/cloud
Sibling: src/kiro_crew/cloud/wizard.py -- changed here
Sibling: src/kiro_crew/cloud/sizes.py -- not affected --
SizeTier.summary()feeds the size menu and theSize:line, which the based price line follows directlyPattern harvest
Not generalizable: the defect is one figure duplicated in two tables without the fact it depends on, and the existing parity test is the guard; it now compares that fact too.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)