Skip to content

Report FSEvents history and Spotlight index storage on macOS - #77

Open
huntharo wants to merge 3 commits into
mainfrom
feat/macos-system-metadata
Open

huntharo wants to merge 3 commits into
mainfrom
feat/macos-system-metadata

Conversation

@huntharo

@huntharo huntharo commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

macOS scans can omit substantial storage when .fseventsd or .Spotlight-V100 cannot be read. The scanners already retained these Data-volume stores, but Overview had no named categories or indication that their sizes were unavailable. This change adds Filesystem event history (FSEvents) and Spotlight search index to Overview.

Both scanners collect allocated regular-file bytes during the existing walk, independently of the largest-folder display limit. The categories resolve the owning mount through the scan's existing mount/firmlink plan, including mounts outside /Volumes and nested volumes. Startup stores retain canonical Data-volume paths; other stores use the path through which the scan reads them. Hardlinks remain deduplicated across the scan, and category bytes remain part of scanned file bytes rather than extra APFS volume or snapshot totals. Metadata stores are walked again during JS smart rescans because directory mtimes do not establish that their file contents are unchanged. Coverage and sizes survive scan-history round trips.

Failed or unobserved collection remains unavailable; partial counts are labeled incomplete. Unresolved mounts and older scans without recorded volume paths remain unavailable rather than inferring that stores are outside the scan. Native enumeration errors lack paths, so an unknown-path error conservatively prevents either category from claiming completeness. Guidance explains how to scan the relevant volume, grant Full Disk Access for privacy restrictions, and obtain an administrator's read-only measurement if root-only filesystem permissions still block access. The existing APFS card also keeps failed snapshot and purgeable-capacity collection distinct from an empty list or zero.

Optional guidance explains Apple's supported, root-only FSEvents retention API and its consequences for backup/sync clients, plus Spotlight exclusions, rebuilding, and the search tradeoff of disabling indexing. These are visibility and guidance changes: no purge, index deletion, indexing changes, privileged prompts, or helpers are added.

Overview categories and optional guidance — isolated macOS fixture

Overview showing FSEvents storage and Spotlight scan coverage

Validation was run locally on macOS; Playwright used Node 24 and isolated profiles/fixture trees.

Validation Result
bun run typecheck Passed
bun run test --maxWorkers=4 1,233 passed, 4 skipped
cargo test --manifest-path native/diskhound-native-scanner/Cargo.toml 123 passed
playwright test e2e/mac-system-metadata.spec.ts e2e/shared-storage.spec.ts 7 passed
Native debug, renderer, and Electron builds Passed
Guidance expand/collapse/remount I/O budget 0 reads, writes, subprocesses, and IPC
Metadata tracking and mount-resolution scaling at N and 8N Operation counts stayed within the linear-growth limits

Regression coverage includes custom mounts under /Users, both firmlink spellings, nested volumes, descendant scans, unresolved mounts, allocated sizes below hotspot limits, cross-category hardlinks, denied/partial collection, stores changing without directory-mtime changes, old history, snapshot/purgeable unknown states, and the native scanner-to-Overview flow. Category bytes are file allocation, not guaranteed reclaimable space; directory metadata, shared APFS blocks, and snapshots can differ from physical disk usage.

@huntharo
huntharo force-pushed the feat/macos-system-metadata branch from 854dfd6 to bc6243a Compare October 14, 2026 20:14
huntharo pushed a commit that referenced this pull request Oct 22, 2026
…ee-lock

Show removal results with the approval and serialize worktree removal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant