feat(mount): by-state aliases + lazy GitHub materialization (issue #106 PR 3)#120
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, 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 the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. 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 (10)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🔴 applyRemoteSnapshot deletes previously-tracked lazy-repo files during full pull
When lazyRepos is enabled, pullRemoteFullExport (internal/mountsync/syncer.go:1592) and pullRemoteFullTree (internal/mountsync/syncer.go:1647) both filter out files under github/repos/<owner>/<repo>/... from the remoteFiles map. However, applyRemoteSnapshot at lines 1709-1715 iterates all tracked state files and calls applyRemoteDelete for any path absent from remoteFiles. This means if a daemon previously tracked GitHub repo files (e.g., ran with LazyRepos: false), and is then restarted with LazyRepos: true, the next full pull will treat those tracked files as "deleted remotely" and remove them from disk and tracking state — even though they still exist on the server. The applyRemoteDelete function (internal/mountsync/syncer.go:2002-2031) deletes the local file if the hash matches and unconditionally removes the tracking entry.
(Refers to lines 1709-1715)
Was this helpful? React with 👍 or 👎 to provide feedback.
4781f2a to
e46891c
Compare
… PR 3) - mountfuse: add by-state alias segment to layout, plumb LazyMaterialize cache through FuseClient with mountfuse.LazyMaterializeClient delegation, surface LazyMaterialize anchor in LayoutMarkdown, and cover the new paths in fuse_test (lazy fires once, retries after error, no-ops when remote does not implement; by-state alias resolves). - mountsync: gate eager issue fetches behind LazyRepos with subtree guards, cover LazyReposSkipsEagerFetchOfIssuesOnStartup, LazyReposOffStillFetchesIssues, and IsUnderLazyGithubRepoSubtree. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… alias trees) Adds a "Mount layout" section between the bash example and "Why files", showing the canonical <slug>__<id> naming convention, _index.json files, the four alias trees (by-title / by-id / by-name / by-state), and the lazy-materialization path for GitHub repo subtrees that ship with #106. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
e46891c to
5a435fb
Compare
Summary
Wave 3 of issue #106 mount layout improvements (stacked on PRs #115, #116, #117):
by-statealias segment added tointernal/mountfuse/layout.gowithLayoutMarkdown+ anchor-test coverage.mountfuse.LazyMaterializeCache(Mark/Wait/Resolve/Forget),FuseClient.LazyMaterializedelegation, andmountsync.LazyReposSkipsEagerFetchOfIssuesOnStartupgating with subtree-guard test.TestLazyMaterializeFiresOnceOnRepoStat,TestLazyMaterializeRetriesAfterError,TestLazyMaterializeNoOpWhenRemoteDoesNotImplement,TestFuseAliasByStateResolves,TestLazyReposOffStillFetchesIssues,TestIsUnderLazyGithubRepoSubtree.Stack
This is the top of the wave-3 stack. Merge order: #115 → #116 → #117 → this.
Test plan
go test ./internal/mountfuse/... ./internal/mountsync/...passes