Verify product changes end-to-end on dev
Part of the epic "Hosting: let users change their products". Plan = Task 5740, PRD = Task 5738, architecture = Task 5739 §6. Every other child of this epic has merged and deployed to dev. This child proves the feature LIVE on the dev console and FIXES any defect it finds, with a PR per fix following the normal delivery rules. If nothing needs fixing, settle as a no-PR terminal with the observed evidence.
## Original ask (verbatim, operator Task 5722)
> "user should be able to change his products: dedicated hosting can change to any other instance type and increase the storage to any other offered option. From billing prospective it means that the old product ended and the new started. But technically it is done without reprovisioning the machine. however some of the instance types might be incompatible, in that case ask the user for confirmation and reprovision"
> Follow-up: "Instance type change: no draining the node. change instantly."
## Done-means oracles of the epic (verbatim)
- D1 "On a live hosting, increasing storage from the UI grows the volume and the filesystem with the node staying online. `df /` on the host shows the new size, and the subscription shows the old storage item ended and the new one started."
- D2 "Changing to a compatible instance type takes effect immediately with no drain wait, keeps the same instance id, and the node comes back online on the new type (`aws ec2 describe-instances`)."
- D3 "Picking an incompatible type shows a confirmation that names the reprovision. Declining changes nothing; confirming reprovisions."
## Acceptance owned live (PRD, verbatim)
- AC-3.1 "After confirming a larger size: EBS `ModifyVolume` is issued; the node itself grows its root partition and filesystem (growpart, then resize2fs or xfs_growfs); no reboot; no reprovision. The nodes stay `online` and enabled throughout, and running sessions continue. Verify: on a dev live hosting: 1. Before: `df -h /` and `uptime`. 2. Change storage 50 → 100 GB in the UI. 3. After: `df -h /` shows about 100 GB, `uptime` has not reset, the node stays Online in Nodes, and a running session is still alive."
- AC-3.2 "The hosting page's **Hosting** field reads the new size (for example, "Dedicated · t4g.small · 100 GB") only after that report arrives; until then it shows "Resizing storage". Verify: watch the page on dev during the flow."
- AC-4.1 "On confirming a compatible type: no drain wait. StopInstances is issued at once, then ModifyInstanceAttribute InstanceType, then StartInstances. The instance id is unchanged, and `describe-instances` reports the new `InstanceType`. All the hosting's nodes return to `online` and enabled, with no operator action. Verify: 1. On dev, note the instance id. 2. Change t4g.small → t4g.medium. 3. … same id with `InstanceType` t4g.medium. 4. Nodes show Online on dev. The time from confirm to Stop is seconds, not a drain."
- AC-5.3 "On confirm, billing swaps (AC-2.1), then a new machine launches through the existing Dedicated launch path with the new type, the hosting's storage and an image of the new architecture. The old instance is terminated. The hosting keeps its id and name, and its nodes come back online under the same names on the new host. Verify: on dev, confirm t4g → t3. … a NEW instance id of type t3.* running, and the old one terminated. Nodes are Online on dev with the same names."
- AC-2.5 "At the next renewal, the hosting bills only the new Prices, once. Verify: use a Stripe test clock advanced past the period end and observe one renewal invoice line per new Price (stripe.md test-clock recipe)."
Also re-check live (verbatim verify steps):
- AC-1.1 "On dev.jaah.ai, open Billing → Products → the Dedicated hosting and see the button. Open a Shared hosting and a cancelled one and see no button."
- AC-1.2 "Open the dialog at desktop and phone width on dev and screenshot it. Check that every `rental_prices` instance and storage row appears and that each label is fully readable."
- AC-2.1 "In the console Billing page (Subscription and Invoices), observe the new item and price and the proration invoice lines."
- AC-2.2 "compare the dialog value with the invoice on dev."
- AC-2.3 "With test card 9995 (or 3-D Secure 3184, abandoned) … do it on dev; `describe-instances` and `df /` are unchanged."
- AC-4.2 "screenshot of the dialog with a session running."
- AC-5.1 "on dev, a t4g hosting shows t3.* types labelled."
- AC-5.2 "on dev, decline, then check that no new invoice was made, `describe-instances` is unchanged, and the row is unchanged."
**How to observe (architecture D-J).** The hub rule is to operate Jaah only through the UI. Read the instance id and type, the root size and "up since" from the hosting page's **Machine** field. Read the confirm-to-stop timing and "old instance terminated" from the change's step timeline. That is the UI equivalent of `df /`, `uptime` and `describe-instances`. An AWS CLI read is optional corroboration only.
**Oracle host.** Use `app.dev.jaah.ai`. `dev.jaah.ai` resolves to private IPs that are not reachable from runner nodes.
**Preconditions (architecture §6). Check each in the console first:**
1. dev has a hosting connection and a purchasable Dedicated size. If absent, set it up via Products › Hosting terms.
2. The connection pins NO `ami_id`, otherwise t4g → t3 is not offered (FU-6). If one is pinned, clear it for the test and restore it afterwards.
3. Create a fresh test org whose Stripe customer sits on a test clock BEFORE its first billing action (the `docs/integrations/stripe.md` recipe). Buy the test hosting with a test card.
4. Add a runner account to the test tenant (System › Credentials › Runners), and start a session on the hosting's node so it is running when each change begins.
5. **Critic addition.** Confirm in the console that the dev hosting host runs a jaahd version that includes `host.grow_root`. Auto-update is per-node and may be off. If the version is stale, update it first, so a stale node is never mistaken for a product defect.
**Project instruction.** While testing in the UI, note anything broken, inconvenient or worse than other parts of the system, and file it as a task with itemized 1–2 sentence suggestions.
Credentials & reach (architecture §6, verbatim rows):
- "AC-1.1, 1.2, 2.2, 3.1, 3.2, 4.1, 4.2, 5.1–5.3 in the browser (D1–D3) | `jaah/debug/main/operator-login` (operator; switches to a tenant) | dev console `app.dev.jaah.ai` | **verified**: the credential is on the roster and `task_credential_get` succeeded. `POST /api/auth/login` on `app.dev.jaah.ai` accepted it (200, user profile returned) from h2."
- "AC-2.1, 2.3, 2.5: Stripe test-mode invoices, test cards 9995/3184, test clock | `jaah/system/stripe-jaah-dev-sk` (test-mode secret) | Stripe API (test mode) | **verified** … The in-console Billing pages are the primary read. The key is used only for the test-clock recipe in `docs/integrations/stripe.md` … no Jaah state is read or changed with the key."
- "AC-4.1 / 5.3 instance id + type; AC-3.1 disk size | none beyond the operator login: read from the hosting page's **Machine** field (D-J) | dev console | **verified**"
- "AC-3.1 "a running session is still alive", AC-4.2 dialog with a running session | `jaah/system/anthropic_api_key`, added in the dev console as a runner account on the test tenant's hosting node (System › Credentials › Runners) | dev console + the hosting's node | **verified**"
- "AC-3.1 "uptime has not reset" | none: the **Machine** field's `up_since` (host `btime`) | dev console | **verified**"
- "AC-4.1 "confirm to Stop is seconds"; AC-5.3 "old instance terminated" | none: the change's step timeline (`ChangeOut.steps`) on the hosting page | dev console | **verified**"
Never write any credential value anywhere: not in the report, a PR or a summary.
Out of scope:
- No new features beyond fixing defects that block these oracles.
- Do NOT re-price or reconcile existing hostings (aws1-3).
- Do NOT change any Jaah state outside the console.
- Clean up afterwards: delete the test hosting and restore any pinned AMI.
- Epic (verbatim): "Out of scope: shrinking storage. Shared (co-located) hosting tier changes. Customer-owned cloud connections (non-hosting cloud nodes). Auto-tagging and SSM instance profiles (Task 5725). Any existing hosting's record or billing reconciliation."
- PRD (verbatim): "NC-5 No migration or reconciliation of existing hostings' records or billing (for example, re-pricing aws1-3 after the hand resize in Task 5722)."
Done means (each with screenshots or observed values in the report):
- D1 / AC-3.1: storage 50 → 100 GB from the UI. The Machine root size shows about 100 GB, `up_since` is unchanged, the node stays Online throughout, and the running session is still alive.
- AC-3.2: the Hosting field shows the old size plus "Resizing storage" until the report arrives, then the new size.
- AC-2.1 / AC-2.2: Billing shows the old storage item ended and the new one started, plus one proration invoice whose total equals the dialog's due-now amount to the cent.
- D2 / AC-4.1: t4g.small → t4g.medium. The Machine field shows the SAME instance id and t4g.medium, the step timeline shows confirm → stop within seconds, and the nodes are back Online with no operator action.
- AC-4.2: a dialog screenshot with a running session shows the interruption sentence and the count.
- D3 / AC-5.1 / AC-5.2: t3.* types are labelled "Needs a new machine". The second confirmation names the new machine, what is lost and what is kept. Declining makes no new invoice and leaves the Machine field and the row unchanged.
- AC-5.3: confirming t4g → t3 shows a NEW instance id of type t3.*, the old instance terminated in the timeline, and the nodes Online with the same names.
- AC-2.3: card 9995 shows the decline sentence inline and changes nothing. Abandoned 3184 changes nothing, and completing it carries the change through.
- AC-2.5: after the test clock is advanced past the period end, the renewal invoice has exactly one line per new Price.
- AC-1.1 / AC-1.2: the button is present on the Dedicated hosting and absent on Shared and cancelled ones. Desktop and phone screenshots show every catalogue row, fully readable labels and no horizontal overflow.
- Every defect found is fixed via a merged PR whose Jaah Deploy succeeded, then re-verified.
Outcome
Verified hosting product changes live on dev. Fixed 3 defects (PRs #5040, #5053, #5062), all merged and deployed. All oracles pass except AC-2.5, which lacks a Stripe key for dev's billing account. UX suggestions are in the report; coder can't file tasks.
Artifacts
Activity
- Draft
- Ready
- Runner started
- Awaiting response
- Awaiting response
- Runner resumed
- Runner ended (done)