fix(cli): back up corrupt state/config files instead of silently resetting#8337
fix(cli): back up corrupt state/config files instead of silently resetting#8337DavidWells wants to merge 1 commit into
Conversation
…tting A malformed .netlify/state.json or global config.json (which holds auth tokens) was silently ignored and could be silently wiped, losing the project link or credentials with no trace. The corrupt file is now copied to <file>.corrupt.<mtime> with a stderr warning naming both paths before the command proceeds.
|
Warning Review limit reached
Next review available in: 43 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: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Split from #8300 (9 of 9).
What
A malformed
.netlify/state.jsonor globalconfig.json(which holds auth tokens) was silently ignored — and could be silently wiped on the next write, losing the project link or credentials with no trace. Now the corrupt file is backed up to<file>.corrupt.<mtime>with a stderr warning naming both paths and a recovery hint, then the command proceeds as before:Why it helps agents
An agent that interrupts a write (or a human that hand-edits a config) shouldn't lose state invisibly. Silent resets produce confusing downstream failures ("why am I suddenly unlinked?") that are expensive to diagnose; a named backup makes the failure observable and recoverable.
Testing