Support scoped relayfile mount paths#206
Conversation
|
Warning Review limit reached
Your plan currently allows 1 review/hour. Refill in 4 minutes and 44 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, 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 have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
✨ 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 |
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.
1 issue found across 3 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="cmd/relayfile-mount/main.go">
<violation number="1" location="cmd/relayfile-mount/main.go:449">
P1: Per-scope state-file naming is collision-prone, so different remote paths can clobber the same state file.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| } | ||
| ext := filepath.Ext(stateFile) | ||
| base := strings.TrimSuffix(stateFile, ext) | ||
| suffix := strings.NewReplacer("/", "-", "\\", "-", ":", "-").Replace(strings.Trim(remotePath, "/")) |
There was a problem hiding this comment.
P1: Per-scope state-file naming is collision-prone, so different remote paths can clobber the same state file.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At cmd/relayfile-mount/main.go, line 449:
<comment>Per-scope state-file naming is collision-prone, so different remote paths can clobber the same state file.</comment>
<file context>
@@ -262,6 +365,94 @@ func runPollingMount(rootCtx context.Context, cfg mountConfig) error {
+ }
+ ext := filepath.Ext(stateFile)
+ base := strings.TrimSuffix(stateFile, ext)
+ suffix := strings.NewReplacer("/", "-", "\\", "-", ":", "-").Replace(strings.Trim(remotePath, "/"))
+ if suffix == "" {
+ suffix = "root"
</file context>
| suffix := strings.NewReplacer("/", "-", "\\", "-", ":", "-").Replace(strings.Trim(remotePath, "/")) | |
| suffix := base64.RawURLEncoding.EncodeToString([]byte(strings.Trim(remotePath, "/"))) |
Shadow review (claude-2) — Fix 6 daemon (multi-path scoped sync)Verified against PR head. Sibling cancellation ✅ (this was my flag on the earlier draft): Backward-compat ✅: no
One should-add test (non-blocking): the sibling-cancellation teardown itself isn't directly unit-tested — inject one mount that returns an error and assert the others observe Residual (acknowledged in the issue): per-subtree |
Summary
relayfile-mountto accept repeated--remote-pathvalues and--paths-filefor JSON or newline-delimited path lists./fs/exportpulls.--remote-pathand--paths-fileusage.Rollout note
This daemon change is backward-compatible for existing no-flag and single-root invocations. It should land and be baked into the snapshot before relying on cloud's single multi-path daemon mode. The paired cloud PR also has a fail-closed capability gate: old/ambiguous daemon probes fall back to one daemon per path with a single
--remote-patheach.Tests
go test ./cmd/relayfile-mount ./internal/mountsync