Add private mount state directory support#216
Conversation
|
Warning Review limit reached
More reviews will be available in 15 minutes and 26 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
✨ 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 |
There was a problem hiding this comment.
Code Review
This pull request introduces a robust state path resolution and validation mechanism for relayfile mounts, adding support for custom state directories (--state-dir) and mount kinds (--mount-kind), while quarantining legacy state files outside the local mount root. The code review highlights critical issues: sharing a single explicit state file across concurrent scoped mounts can lead to state corruption, and using os.Rename to move legacy state files can fail with EXDEV across different filesystems. Additionally, the reviewer suggests making the legacy quarantine step non-fatal on failure and simplifying the home directory lookup logic.
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. |
|
Addressed the Gemini review feedback in 86c6134:\n\n- reject sharing one explicit --state-file across multiple concurrent scoped mounts; users should use --state-dir for scoped mounts\n- make legacy quarantine robust across filesystems by falling back from rename to copy/remove\n- keep quarantine non-fatal at Syncer startup; it now warns and continues\n\nRe-ran: go test ./internal/mountsync ./cmd/relayfile-mount ./cmd/relayfile-cli -count=1 |
There was a problem hiding this comment.
2 issues found across 7 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Summary
--state-dir, exact--state-fileoverride precedence, and mount-kind-separated state IDsrelayfile-mountcommand surfaces on private state outside the mounted tree, while preserving legacy in-root defaults for direct internalNewSyncerembeddersScope
Relayfile-first implementation for the PR #1289 mount-state path recursion spec. Cloud mount-script wiring, snapshot pinning, and deploy/release follow-ups are intentionally left for the next sequence.
Tests
go test ./internal/mountsync ./cmd/relayfile-mount ./cmd/relayfile-cli -count=1