Organize dirty work from codex/workflow-reliability - #1346
Conversation
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in:16 minutes Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. 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: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (12)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:b8778f7025
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (record.state === "unreadable" && !leaseIsOldEnoughToRecover(lockPath)) { | ||
| throw new Error(`The primary-checkout ownership record is unreadable at ${lockPath}; mutation is blocked.`); | ||
| } | ||
| rmSync(lockPath, { recursive: true, force: true }); |
There was a problem hiding this comment.
Revalidate stale ownership before removing the lock
When two primary:mutate invocations encounter the same dead lease, both can read that stale owner before either removes the directory; after the first recreates the lock and writes its live lease, the second can execute this unconditional rmSync, delete the new lease, and acquire its own. Both callers may then run primary-checkout mutations concurrently, defeating the expected single-writer guarantee and risking overlapping branch-switch or merge operations. Revalidate the observed token/state atomically before removal, and add a barrier-based two-process stale-recovery test.
AGENTS.md reference: AGENTS.md:L468-L469
Useful? React with 👍 / 👎.
BigSimmo
commented
Jul 28, 2026
Reviewed at exact head b8778f7. Superseded by #1360 at the platform-family level. The proposed primary-checkout guard was rejected because stale-owner recovery can delete a newly acquired live lease. Source branch and worktree are preserved; this PR is closed only to remove the superseded review queue entry. |
Organizes current dirty work collected on branch codex/workflow-reliability.