feat: catalog breadth — curated dev/app caches + process guards - #3
Open
gor3a wants to merge 3 commits into
Open
feat: catalog breadth — curated dev/app caches + process guards#3gor3a wants to merge 3 commits into
gor3a wants to merge 3 commits into
Conversation
dscan is now a sibling of dotai instead of nested under it, shifting the relative path to the upstream powersched CLI source.
Remove the broad ~/Library/Caches and ~/.cache SAFE rows; replace with curated SAFE dev-cache subdirs and REVIEW (Trash, recoverable) app-cache rows. Add Entry.GuardProcess + guarded() so high-churn caches lock while their tool runs. Browser rows target cache subdirs only, never a profile root or cookies/history.
One ps snapshot per scan (fail-open); guarded entries downgrade to Keep while their process runs. Skip a catalog path nested under an already covered path so no row double-counts.
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
Refines dscan's cache catalog from a coarse blind sweep into a curated, tiered set, and adds a running-process guard.
~/Library/Caches(macOS) and~/.cache(Linux)Safesweeps; replaced with curated SAFE dev-cache subdirs (Xcode DeviceSupport/Archives, go-build, Homebrew, Yarn, CocoaPods, SwiftPM, Playwright, pip, uv, node-gyp, cargo/git) and REVIEW app-cache rows (Spotify/Slack/Teams/Zoom/Discord/Figma/Obsidian/Notion/Claude/ChatGPT + Chrome cache subdirs). NewEntry.GuardProcess+guarded().pssnapshot per scan (fail-open) downgrades a guarded entry (Xcode DerivedData) toKEEPwhile its tool runs;isDescendantsuppresses any nested catalog path so nothing double-counts.Why refine, not append
An adversarial review found the naive additive approach unsound: app-cache dirs nest under the broad
~/Library/CachesSaferow, so their "REVIEW → Trash → recoverable" promise was illusory (the parentrm -rf'd them) and bytes double-counted. Curated rows with no broad parent fix this. Trade-off: unlisted caches are no longer blind-swept (Mole's curated model) — safer, legible, recoverable.Safety
Cookies,Login Data,History,Bookmarks,Local Storage,Local State(asserted by a denylist test).REVIEW→ Trash (recoverable). Dropped~/go/pkg/mod(read-only files →os.RemoveAllEACCES) and~/.docker/buildx(not the build cache).Tests
go build+go vet+go test ./...→ 91 pass. New tests: catalog breadth/denylist/dup (darwin+linux),procsunits, and a realScanAllguard test via an injected snapshot seam.