Skip to content

Fix critical billing and analysis data-loss regressions#104

Draft
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/critical-bug-investigation-debf
Draft

Fix critical billing and analysis data-loss regressions#104
cursor[bot] wants to merge 2 commits into
mainfrom
cursor/critical-bug-investigation-debf

Conversation

@cursor

@cursor cursor Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Preserve existing analysis blueprints during failed reruns by deleting prior rows only after replacement blueprints are successfully inserted.
  • Harden credit mutations with atomic SQL updates, add Stripe webhook credit idempotency, and refund App Idea Chat / Pattern Analyzer charges on post-deduction failures.
  • Require authenticated ownership for the legacy analysis endpoint and mask locked blueprint internals server-side for free-tier API/page payloads.

Validation

  • pnpm exec tsc --noEmit
  • pnpm exec eslint lib/credits.ts lib/queries.ts lib/blueprint-access.ts app/api/stripe/webhook/route.ts app/api/analyses/[id]/run/route.ts app/api/app-idea-chat/route.ts app/api/pattern-analyzer/route.ts app/api/analyses/[id]/analyze/route.ts app/api/analyses/[id]/route.ts app/api/analyses/[id]/blueprints/route.ts app/dashboard/analyses/[id]/page.tsx (passes with the pre-existing lib/queries.ts warning)
  • Temporary mocked runtime harness passed: blueprint masking, App Idea Chat refund on parse failure, legacy auth-before-billing, failed rerun preserving old blueprints, and atomic/idempotent credit SQL shape.
Open in Web View Automation 

cursoragent and others added 2 commits June 22, 2026 11:09
Co-authored-by: Cole Collins <DealPatrol@users.noreply.github.com>
Co-authored-by: Cole Collins <DealPatrol@users.noreply.github.com>
@vercel

vercel Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
repo-app-architect Ready Ready Preview, Comment Jun 22, 2026 11:14am
repofuse Ready Ready Preview, Comment, Open in v0 Jun 22, 2026 11:14am
v0-repo-app-architect Ready Ready Preview, Comment, Open in v0 Jun 22, 2026 11:14am

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant