fix(ui): retry lifecycle lock cleanup - #562
Conversation
|
Warning Review limit reached
Next review available in: 36 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. 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: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughLifecycle lock cleanup now retries temporary lock contention up to five times with 10 ms delays. A subprocess test verifies cleanup succeeds after the lock becomes available. ChangesLifecycle lock cleanup
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ui/src-tauri/src/lifecycle.rs`:
- Around line 617-625: Update the callback passed to
remove_lock_if_owned_with_retry to write the release signal and wait for child
termination there, storing the resulting exit status for reuse. After the helper
returns, assert the stored status instead of waiting on child again, while
preserving the saw_contention assertion.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 437bc051-33da-462a-8de7-66cf89bd1308
📒 Files selected for processing (1)
ui/src-tauri/src/lifecycle.rs
Summary
WouldBlocklock contention.Root cause
remove_lock_if_ownedreturned immediately onWouldBlock, so a short-lived shutdown race could leave the current instance's lock record uncleared.Validation
TAURI_CONFIG='{"bundle":{"externalBin":[]}}' cargo test -p airp-ui lifecycle::tests:: --locked— 18 passedcargo fmt --all -- --checkgit diff --checkRelated to #478.
Summary by CodeRabbit