Skip to content

fix(auth): raise bootstrap function timeout — provisioning 504s real signups - #254

Merged
ejay-dev merged 1 commit into
mainfrom
fix/bootstrap-max-duration
Jun 12, 2026
Merged

fix(auth): raise bootstrap function timeout — provisioning 504s real signups#254
ejay-dev merged 1 commit into
mainfrom
fix/bootstrap-max-duration

Conversation

@ejay-dev

Copy link
Copy Markdown
Owner

Summary

Incident-grade fix found during post-deploy verification: /api/auth/bootstrap (first-login workspace provisioning via recoverUserWorkspace) times out on production with "Vercel Runtime Timeout Error" — the route has no maxDuration, so it gets the platform default (~15s), which provisioning against the prod DB exceeds. This 504s real new-user signups, not just tests.

Evidence:

  • Critical-path smoke (new user → onboarding → dashboard) failed twice against prod with Bootstrap failed: 504
  • Prod runtime logs show Vercel Runtime Timeout Error on POST /api/auth/bootstrap
  • Unauthenticated probe returns 401 in <1s — route healthy, only the provisioning path exceeds the limit

Fix: export const maxDuration = 60 — same pattern vercel.json already applies to heavy cron routes (300s). One line, no behavior change.

Verification

  • npm run typecheck — pass
  • Post-merge: re-run e2e/critical-path-smoke.spec.ts against production to confirm the new-user journey completes

🤖 Generated with Claude Code

…signups

/api/auth/bootstrap runs full workspace provisioning/recovery
(recoverUserWorkspace) on first login. With no maxDuration the route gets
the platform default (~15s) and times out against the production DB —
"Vercel Runtime Timeout Error" observed in prod runtime logs 2026-06-13,
reproduced twice by the critical-path smoke (new-user journey, 504 both
runs). Unauthenticated probes return 401 in <1s, so the route itself is
healthy; only the provisioning path exceeds the limit.

Raise to 60s, matching the pattern vercel.json already applies to the
heavy cron routes (300s).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ejay-dev
ejay-dev merged commit 0ad576c into main Jun 12, 2026
1 of 2 checks passed
@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
forma-os Building Building Preview, Comment Jun 12, 2026 4:50pm

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@ejay-dev, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 5 minutes and 49 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 27f38ba9-dffa-44c3-8771-c6d5f3402c99

📥 Commits

Reviewing files that changed from the base of the PR and between 95c70d5 and aa90c28.

📒 Files selected for processing (1)
  • app/api/auth/bootstrap/route.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/bootstrap-max-duration

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 and usage tips.

@github-actions

Copy link
Copy Markdown

♿ Accessibility Test Results

PASSED - No critical accessibility issues found

Tests Performed:

  • WCAG 2.1 AA compliance validation
  • Cross-browser accessibility testing
  • Keyboard navigation testing
  • Screen reader compatibility
  • Color contrast validation

Artifacts: Download the accessibility reports from the "Artifacts" section for detailed results.

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