Skip to content

Fail app builds on generation or push errors#86

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-investigation-5721
Draft

Fail app builds on generation or push errors#86
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/critical-bug-investigation-5721

Conversation

@cursor

@cursor cursor Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Bug and impact

The /api/build-app stream could report done even when Claude failed to generate a file or GitHub/GitLab rejected a file push. Users would see “Built!” and receive a repo link even though the repo contained placeholder error files or was missing files.

Root cause

The per-file generation loop converted generation exceptions into # Error generating ... file content, and the GitHub/GitLab push helpers only logged non-OK responses instead of throwing. The loop incremented the pushed counter and emitted success regardless.

Fix

  • Deduplicate generated file paths before building the repo file list.
  • Throw on GitHub/GitLab push failures with the platform error message.
  • Stop the SSE stream with an explicit error event when generation or push fails, instead of emitting done.

Validation

  • pnpm exec tsc --noEmit
  • pnpm exec eslint app/api/build-app/route.ts
  • Mocked runtime verification of POST /api/build-app covering generation failure, push failure, duplicate path dedupe, and successful completion.
Open in Web View Automation 

Co-authored-by: Cole Collins <DealPatrol@users.noreply.github.com>
@vercel

vercel Bot commented Jun 9, 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 9, 2026 11:10am
repofuse Ready Ready Preview, Comment, Open in v0 Jun 9, 2026 11:10am
v0-repo-app-architect Ready Ready Preview, Comment, Open in v0 Jun 9, 2026 11:10am

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