fix(mountsync): preserve scoped write path case#232
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesScope Normalization and Case-Insensitive Matching
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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.
Code Review
This pull request modifies scopeGrantsWrite in internal/mountsync/syncer.go to preserve the case of the path segment in scopes, making path authorization case-sensitive while keeping the plane, resource, and action segments case-insensitive. It also adds corresponding unit tests in internal/mountsync/syncer_test.go to verify this behavior. There are no review comments, so I have no feedback to provide.
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. |
|
Reviewed PR #232 and made one scoped fix: internal/mountsync/syncer_test.go now delegates I checked the local bot-review artifacts; they were stale or already resolved and included files outside this PR’s actual surface. I did not run Go tests because |
|
✅ pr-reviewer applied fixes — committed and pushed Reviewed PR #232 and made one scoped fix: internal/mountsync/syncer_test.go now delegates I checked the local bot-review artifacts; they were stale or already resolved and included files outside this PR’s actual surface. I did not run Go tests because |
There was a problem hiding this comment.
✅ pr-reviewer applied fixes — committed and pushed 009cfb6 to this PR. The notes below describe what changed.
Reviewed PR #232 and made one scoped fix: internal/mountsync/syncer_test.go now delegates canWritePathForScope to the production scopeGrantsWrite matcher, preventing parser drift around SplitN, fs:manage, and case-insensitive scope segments.
I checked the local bot-review artifacts; they were stale or already resolved and included files outside this PR’s actual surface. I did not run Go tests because go/gofmt are not installed in this environment.
Summary
scopeGrantsWriteplane:resource:actionmatching case-insensitiveFixes #231.
Context
The Tier-2 production scoped-writeback harness exposed that mountsync lowercased the full write scope before comparing its path segment to the case-preserved remote path. Narrow write scopes over real repo paths such as
README.md,LAYOUT.md, or CamelCase directories could therefore deny the member's own in-scope writeback.ClaudeGateB also audited the Cloud TS read-side matcher: it already preserves scope path case and only lowercases non-path scope metadata. This change restores Go write-side parity with the already-correct read-side semantics.
Verification
go test ./internal/mountsync -run TestScopeGrantsWritePreservesPathCase -count=1failed on origin/main before this fixgo test ./internal/mountsync -run 'TestScopeGrantsWritePreservesPathCase|TestCanWritePathWithRelayauthScopes|TestCanWritePathWithShortScopes' -count=1go test ./internal/mountsync -run 'TestScopeGrantsWritePreservesPathCase' -count=1go test ./internal/mountsync -count=1