Repository navigation
fix: stop scans from downloading iCloud and other cloud placeholders - #74
Merged
Merged
Conversation
Reading a File Provider placeholder directory (SF_DATALESS) makes macOS download its content and blocks until the download ends; a scan sat 8 minutes in one such read under ~/Library/Mobile Documents. The shared walk now skips dataless directories like directories on another filesystem, and sizing does not open dataless files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…traversal docs - fileExtents skips files with no allocated blocks itself, covering the clone-source walk that had no guard; drop the call-site check and the exported fstree.Dataless. - SPEC gets one Traversal section stating every skip rule and the clean refusal; ARCHITECTURE drops a duplicated sizing bullet and a misplaced example; the decision records the measured iopolicy alternative. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
fstree) no longer reads a directory flaggedSF_DATALESS(macOS File Provider placeholder: iCloud Drive, Dropbox, …). It returns that directory as skipped, like a directory on another filesystem, socleanrefuses an artifact that contains one.fileExtentsno longer opens a file that has no allocated blocks. A dataless file has 0 blocks. The sizing walk already had this guard; the clone-source walk did not.cleanrefusal. SPEC previously had none of these..claude/rules/cleanup.mdlistsskip-dataless.mdwith the other traversal decisions.Why
Reading a dataless directory makes macOS download its content and blocks the read until the download ends.
clean --dry-runsat 8 minutes in one directory read under~/Library/Mobile Documents.The flag comes from the
lstatresult the walk already has, so the check adds no system call. Behaviour on Linux is unchanged.Verification
brctl evictwas run on an iCloud.epubdirectory. It stayed dataless through a scan of its folder and a full~scan. Before this change, one scan downloaded it.brctl evictreports 0 blocks.setiopolicy_np(IOPOL_MATERIALIZE_DATALESS_FILES_OFF)for the whole process. With it set, a directory read still downloaded for 17 s, and a file open still downloaded the file.go test -race -count=1 ./...,golangci-lint run ./...andGOOS=linux go build ./...all pass.Not covered
These paths can still download a placeholder file that sits inside a directory that is already downloaded:
git statusrun by gitignore protection, for projects inside iCloud-synced Desktop or Documents.node_modules/.modules.yamlreads.os.ReadDir(LLM model stores, Hugging Face cache, Xcode, code-sign clones) do not go throughfstree.Merge order
#72 and #73 still call
fileExtents(path, size). Whichever lands second must be rebased ontofileExtents(path, info), keeping the 0-block guard.Docs
docs/SPEC.md: new § Traversal.docs/ARCHITECTURE.md: § Shared traversal, § Sizing invariants, § Deletion Strategy.docs/decisions/skip-dataless.md.🤖 Generated with Claude Code