Repository navigation
Centralize durable job lifecycle state - #23
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
Next review available in: 48 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Free Run ID: 📒 Files selected for processing (15)
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
3845401 to
2eb0a18
Compare
2eb0a18 to
c351218
Compare
4bc8f6f to
234e57d
Compare
Co-Authored-By: Claude <noreply@anthropic.com>
c351218 to
2aba186
Compare
Refs #16
User-facing problem
Refreshing a queued, generating, or failed job lost meaningful state because realtime was treated as truth. Terminal writers used different refund identities and could expose inconsistent lifecycle behavior.
Implementation summary
${jobId}_terminal_refundidentity and conditional status updates so only one competing terminal path can refund.getStatusreturning safe fields only; internal diagnostics never enter the API response.Migration notes
0018_equal_bullseye.sqladds lifecycle columns and backfills stage/timestamps/errors/retryability/refund state from existing jobs and credit transactions. No production migration was run.Security and financial invariants
Status lookup includes job ID and authenticated owner ID. Terminal state updates require an expected nonterminal prior state. Complete and failed are terminal. A terminal transition and refund share one transaction, and the ledger source ID is canonical and unique. Raw diagnostics remain server-only.
Tests run
pnpm test(17 tests, including every allowed/rejected transition and canonical refund identity)pnpm typecheckpnpm lintwith non-secret production placeholderspnpm format:checkgit diff --checkpnpm build(18 routes)Checks not run and why
Stack dependency and merge order
Stack PR 4 of 5. Base:
launch/15-config-ci. Merge #13, #14, #15, #16, then #19.Known limitations
Partial preview state remains realtime-only; durable recovery guarantees lifecycle/status and the final manifest, not every intermediate frame. Retry execution itself remains future issue #17; this PR records whether failure is retryable.
Rollback implications
Revert the UI/API writers before dropping lifecycle columns. Dropping them discards diagnostic/timestamp history; credit ledger refunds remain durable and should never be reversed by schema rollback.
🤖 Generated with Claude Code