fix(cli): agent-UX + billing-visibility follow-ups (RND-590/592/593/594/595)#166
Open
mpjunior92 wants to merge 7 commits into
Open
fix(cli): agent-UX + billing-visibility follow-ups (RND-590/592/593/594/595)#166mpjunior92 wants to merge 7 commits into
mpjunior92 wants to merge 7 commits into
Conversation
…tatuses Align the deploy SKILL.md agent guidance and the --wait flag help text with the shipped behavior: --wait only blocks while the app is transitioning (Deploying/Upgrading/etc.) and returns immediately for already-settled statuses (Running/Stopped/Terminated/Suspended/Failed). Completes the agent-facing docs acceptance criterion; the command, --wait timeout handling, and 502/503/504 retry already landed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Enumerate the caller's apps on-chain (getAllAppsByDeveloper), filter out terminated, resolve profile names via the coordinator-DB-backed /info, and error (exit 2) when a live app already uses the requested name — pointing to 'app upgrade <addr>'. --force-new bypasses. The check is fail-open: any read failure warns and proceeds rather than blocking a legitimate deploy. Fixes the duplicate-billable-app leak where the name check only consulted the local YAML registry, so a clean machine/CI (empty registry) never detected an existing same-named app and silently provisioned a second one. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
After `app upgrade`, poll the release digest until it matches the digest just deployed (or warn "indexer propagation in progress"), so an agent never reads the stale pre-upgrade digest and retries an already-successful upgrade. The expected digest is surfaced out of the SDK (prepareRelease -> PreparedUpgrade -> CLI) so an exact target is known on both the verifiable (sha256:) and non-verifiable (0x bytes32) paths; reconcileReleaseDigest normalizes either form. Adds the reconcileReleaseDigest SDK helper (polls getApp, never throws on timeout) and exposes it on the app module. Verified root cause in compute-tee: GET /apps/:id serves the digest from a Ponder indexer via GraphQL POST with no cache layer (API code has no cache on this path; the GCP HTTP LB has enable_cdn=false). So re-reading -- not cache-busting -- is the fix; the ticket's --fresh/--no-cache criterion is dropped as a no-op against this backend. Closes RND-593. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…p info When DOMAIN is unset the app runs but nothing binds ports 80/443, so HTTP(S) requests are refused with no signal — a "Running" web app that is unreachable. - deploy/upgrade now warn pre-flight (after the env file is finalized, so an inline --env DOMAIN=... still counts as on) when isTlsEnabledFromEnvFile is false, pointing to `ecloud compute app configure tls`. - app info shows a static TLS line (gated behind a showTls option so it stays out of the denser app list). DOMAIN is encrypted (private env), so the line is informational rather than a live on/off read. No behavior change when DOMAIN is set. Closes RND-594. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…llet billing status previously printed one ambiguous "Credits" line (the Stripe balance) and a lone wallet-ETH line, so an agent couldn't tell applied promo credit from spendable funds. Now it shows a grouped funds block: - Credits (Stripe): Promotional (+expiry), Paid, Total — pulled from the billing-api 3-way split (new SDK billing.getAccountCredits → the deployed GET /accounts/:eth/credits route), not recomputed in the CLI — with a note that Stripe credits are separate from the on-chain wallet. - Wallet (<env>): ETH (gas) + USDC (via getTopUpInfo, 6 decimals). Each read is best-effort: a failure warns and degrades (credits → single Stripe line; wallet → omit), and core subscription status always prints. Verified live against both deployed billing-API versions: compute-tee (sepolia/mainnet prod, GCP) and ecloud-platform (sepolia-dev, AWS) — both return the promotional/paid/total split on the unprefixed /accounts/:eth/credits route. Closes RND-595. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… ETH Two display fixes in `billing status`, surfaced while testing RND-595: 1. Line items: the Stripe description format is '<qty> × <SKU> (at $price / month)', but the renderer took the last two words as the SKU, yielding garbage like 'Compute (/ month)): ...'. Now parse the SKU with a regex (verbatim fallback if it stops matching) and use the structured quantity/price/subtotal fields. Price is the hourly rate (verified against the published pricing table; the description's '/ month' text is a Stripe-side mislabel), so 'hours × $price/hour' is preserved. Dropped the dead sepolia/mainnet branch. 2. Wallet ETH: render at most 4 decimal places (e.g. 0.0989 ETH) instead of the full 18-decimal wei value — the leading digits are what matter for gas. Both extracted as pure, unit-tested helpers in billingFormat.ts. Live-verified on sepolia (compute-tee); line items are a no-op on sepolia-dev (ecloud-platform returns none).
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.
Follow-up CLI/SDK fixes on top of #164, addressing five UX/DX tickets plus a billing-display bug. Each ticket is its own commit; live-verified against both deployed backends (compute-tee on sepolia/mainnet, ecloud-platform on sepolia-dev).
Changes
RND-590 — deploy guards against duplicate same-named billable apps (
59c69d9)deployenumerated name collisions only against the local YAML registry, so a clean machine/CI (empty registry) silently provisioned a second billable app. Now enumerates the callers apps on-chain (getAllAppsByDeveloper), resolves profile names via/info, and errors (exit 2, pointing toapp upgrade) when a live app already uses the name.--force-new` bypasses. The check is fail-open: a read failure warns and proceeds.RND-592 —
app status --waitdocs (c435144)Align the deploy skill guidance and
--waithelp text with shipped behavior:--waitonly blocks while the app is transitioning and returns immediately for settled statuses.RND-593 — reconcile release digest after upgrade (
b19e4ad)After
app upgrade, the release digest is served by a lagging Ponder indexer, so an agent could read the old digest and retry a successful upgrade. NewreconcileReleaseDigestSDK helper polls until the reported digest matches the just-deployed one (or warns "propagation in progress", exit 0). The digest is surfaced out of the SDK so the exact target is known on both verifiable and non-verifiable paths.--fresh(from the ticket) was dropped after verifying in the server source that the digest comes from a GraphQL POST with no cache layer — re-reading, not cache-busting, is the fix.RND-594 — surface TLS-off (DOMAIN unset) (
3158617)When
DOMAINis unset the app runs but nothing binds ports 80/443, with no signal.deploy/upgradenow warn pre-flight;app infoshows a static TLS line (gated so it stays out of the denserapp list). DOMAIN is encrypted, so the info line is informational.RND-595 — billing status credit split (
6785e88)billing statusprinted one ambiguous "Credits" line. Now shows a grouped funds block: Promotional (+expiry) / Paid / Total from the billing-api 3-way split (new SDKgetAccountCredits), plus Wallet ETH + USDC — with a note that Stripe credits are separate from on-chain funds. Each read is best-effort.Billing display fix (
1ed75f5) + reconcile doc (cfcd923)Pre-existing line-item bug: the renderer took the last two words of the Stripe description as the SKU, yielding garbage like
Compute (/ month)). Now parses the SKU correctly and uses structured price/quantity fields; preserves the (correct) hourly rate, verified against the published pricing table. Also shortens wallet ETH display to 4 dp.New
billing statusoutputThe old format collapsed all of this into a single ambiguous
Credits: $19.98line, with line items rendered asCompute (/ month)).Testing
billing status(both backends),app status --wait(both), and the credit split / line items with a real wallet.🤖 Generated with Claude Code