fix(mount): converge first empty-revision bootstrap#362
Conversation
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
|
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 Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe revision gate now recognizes an initial empty revision while refusing later unversioned delete passes after bootstrap. Tests cover revision advancement, persisted bootstrap state, successful convergence, mirrored files, and absence of snapshot-delete blocking. ChangesBootstrap revision gate
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
|
@codex review |
Relayfile Eval ReviewRun: Passed: 4 | Needs human: 0 | Reviewable: 0 | Missing output: 0 | Failed: 0 | Skipped: 0 Human Review CasesNo reviewable human-review cases captured Relayfile output. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bbc8ea8c4b
ℹ️ 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 observed == "" { | ||
| return false | ||
| return last == "" |
There was a problem hiding this comment.
Keep empty revisions out of generic ordering
This helper is also used by githubWorkingTreePathCandidatePreferred (internal/mountsync/syncer.go:7150), where it is expected to mean “strictly newer.” When a GitHub working-tree fallback has no resolved HeadSHA and two tracked @<sha>.json records map to the same local file with empty revisions, the sorted later path now replaces the earlier one merely because both revisions are empty. A subsequent local write is therefore routed to a different, potentially stale remote object. Keep the empty/empty bootstrap exception in the snapshot-delete gate rather than changing the shared revision ordering predicate.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in a766328 (current follow-up commit). revisionAdvances("", "") is again false and has an explicit RED/GREEN assertion so GitHub candidate ordering remains strict. The empty/empty exception now exists only inside the snapshot-delete gate while BootstrapComplete == false; the end-to-end first-observation convergence regression and the established-mirror unversioned-delete refusal both remain green. Full go test ./... -count=1, go vet ./..., and diff check pass.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a766328639
ℹ️ 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".
| revisionAdvanced := revisionAdvances(s.state.LastAppliedRevision, observedRevision) | ||
| if strings.TrimSpace(observedRevision) == "" && | ||
| strings.TrimSpace(s.state.LastAppliedRevision) == "" && | ||
| !s.state.BootstrapComplete { | ||
| revisionAdvanced = true |
There was a problem hiding this comment.
Keep unversioned observations out of tombstone confirmation
When a pre-existing tombstone is present (for example, a state file created before BootstrapComplete existed), this makes the first empty-revision bootstrap enter the destructive pass and observePendingDelete will increment its attempt count and delete the local file immediately. An empty revision is explicitly an unknown snapshot signal, so a partial/unreliable unversioned listing can now supply the second tombstone confirmation even though it is not a strictly advancing revision; previously this path was refused. Limit this exception to completion bookkeeping or ensure unversioned observations cannot create or confirm tombstones.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 37ca7f9. The first empty-revision bootstrap now returns before tombstone creation or confirmation, while still allowing the caller to persist BootstrapComplete. Added a regression that seeds a tracked local file plus a legacy one-attempt tombstone and proves the unversioned bootstrap preserves both file/state and leaves the tombstone unchanged. Generic revisionAdvances remains strict, and later unversioned observations remain blocked. Full go test ./... and go vet ./... pass.
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Fixes #360.
PR #361 added the persisted stall guard but did not implement the issue's root empty/empty revision advancement. This completes Track A:
BootstrapCompleteto keep later unversioned listings from confirming destructive deletesValidation:
revisionAdvances("", "")and one blocked first observationgo test ./... -count=1go vet ./...git diff --check