Skip to content

fix(cloud-apps): DEPLOY_FRONTEND honest not-live status + UPDATE cache invalidation - #11835

Merged
lalalune merged 2 commits into
developfrom
fix/apps-deploy-status-cache-v2
Jul 3, 2026
Merged

fix(cloud-apps): DEPLOY_FRONTEND honest not-live status + UPDATE cache invalidation#11835
lalalune merged 2 commits into
developfrom
fix/apps-deploy-status-cache-v2

Conversation

@NubsCarson

Copy link
Copy Markdown
Member

3 of the 7 confirmed bugs from the 07-02 Fable adversarial apps-surface scan (the HIGH withdraw bug already merged as #11810; the 3 BOOK_INFLUENCER money bugs are next).

  • MED — DEPLOY_FRONTEND false 'live' claim (deploy-frontend.ts): claimed "v{N} is now live" unconditionally, but a publish can settle into ready (built, not serving) where activation failed/pended. Now branches on deployment.status === "active" — truthful live copy only when active, else "built but NOT yet live (status: X)". Matters for the demo: 'host an app frontend' shouldn't tell the user it's live when it isn't.
  • LOW ×2 — missing cache invalidation (update-app.ts, update-monetization.ts): both mutated app state without invalidateAppsCache(runtime) → stale provider context ~60s (documented invariant; every sibling mutating action calls it). Added.

Evidence: plugin-cloud-apps 288 pass / 0 fail; biome clean on all 3 files. No behavior change on the happy (active) path. Fixed inline (Fable-5 credit-limited until 08:10 UTC); the scan's Fable run authored the spec. — [cloud-frontdoor]

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6f844e24-d9a0-4f86-9249-679f523537b1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/apps-deploy-status-cache-v2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@NubsCarson

Copy link
Copy Markdown
Member Author

Heads-up from the Bug-6 follow-up session: the earlier attempt at these same fixes is still on origin/fix/apps-deploy-status-and-cache (ad38439, no PR — superseded by this v2). Two things in it may be worth salvaging before it's deleted:

  1. Tests (218 lines) — v1 carried deploy-frontend.test.ts (+146), update-app.test.ts (+40), update-monetization.test.ts (+32) covering exactly the behaviors this PR fixes (non-active status → no "live" claim; update actions invalidate the cache). This PR ships src-only; the "288 pass" here is the pre-existing suite, with no new regression coverage for the fixed behavior. Note v1's tests assert v1's implementation (see 2), so they'd need adapting, not cherry-picking.
  2. Activation retry + failure semantics — v1 also made one explicit activateAppFrontend() attempt when the publish settles non-active, and returned success: false, reason: "not_active" for a not-live outcome, vs this PR's text-only honesty with the result still reported as a successful action. Worth a deliberate choice rather than a silent drop.

No file overlap with #11855 (frozen-target confirm guard, Bug 6 of the same scan), which is now open separately.

— nubs-cloud [cloud-frontdoor]

NubsCarson and others added 2 commits July 3, 2026 03:48
…idation on UPDATE_APP/UPDATE_MONETIZATION

Three confirmed bugs from the 07-02 Fable adversarial apps-surface scan:

- MED: DEPLOY_FRONTEND claimed 'v{N} is now live' unconditionally after
  deployAppFrontend, but the deployment can settle into a 'ready' (built, not
  serving) state where activation failed/pended. Reporting that as live is a
  lie the user acts on. Now branch on deployment.status === 'active': live copy
  only when truly active; otherwise report 'built but NOT yet live (status: X)'.
- LOW: UPDATE_APP and UPDATE_MONETIZATION mutated app state without calling
  invalidateAppsCache(runtime), so the ~60s provider WeakMap cache served stale
  name/description/monetization to the next turn (documented cache-invalidation
  invariant; every other mutating action already calls it). Added the eviction.

plugin-cloud-apps: 288 pass / 0 fail; biome clean.
@lalalune
lalalune force-pushed the fix/apps-deploy-status-cache-v2 branch from ad0f84c to 347945e Compare July 3, 2026 10:56

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

@lalalune

lalalune commented Jul 3, 2026

Copy link
Copy Markdown
Member

Rebased on current develop, added the missing regression coverage, and pushed 347945eb5d.

Validation run from /home/shaw/eliza-worktrees/pr-11835-cloud-apps:

  • bun test plugins/plugin-cloud-apps/__tests__/deploy-frontend.test.ts — pass, 9 tests
  • bun test plugins/plugin-cloud-apps/__tests__/deploy-frontend.test.ts plugins/plugin-cloud-apps/__tests__/update-app.test.ts plugins/plugin-cloud-apps/__tests__/update-monetization.test.ts — pass, 34 tests / 88 expects
  • bun run --cwd plugins/plugin-cloud-apps test — pass, 321 tests / 953 expects
  • git diff --check origin/develop...HEAD — pass

I also ran bun run --cwd plugins/plugin-cloud-apps typecheck. It is still blocked by an unrelated existing SDK surface mismatch in the ad campaign actions, even after bun run --cwd packages/cloud/sdk build:

  • src/actions/ad-attribution.ts: getAdCampaignAttribution missing on ElizaCloudClient
  • src/actions/ad-campaigns.ts: missing SDK exports CampaignDaypartingSchedule, CampaignPerformanceReportResponse, CreateCampaignReportShareResponse, DuplicateAdCampaignInput
  • src/actions/ad-campaigns.ts: missing client methods updateAdCampaignDayparting, duplicateAdCampaign, getAdCampaignPerformanceReport, createAdCampaignReportShare

The changed actions/tests for this PR are covered by the plugin test suite above.

@lalalune
lalalune merged commit c076ebd into develop Jul 3, 2026
35 of 38 checks passed
@lalalune
lalalune deleted the fix/apps-deploy-status-cache-v2 branch July 3, 2026 10:57
@NubsCarson

Copy link
Copy Markdown
Member Author

Thanks @lalalune — confirmed you rebased + added the regression coverage (347945e, 9+ tests) and merged. The superseded v1 branch fix/apps-deploy-status-and-cache (ad38439) is safe to delete — v2 (this) ships src-only and your added tests cover it. — [cloud-frontdoor]

@claude

claude Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Claude encountered an error —— View job


I'll analyze this and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants