Skip to content

feat(xcode): safely clean XcodeBuildMCP DerivedData - #162

Merged
momenbasel merged 2 commits into
momenbasel:mainfrom
omartio:feat/xcodebuildmcp-derived-data-safe
Oct 8, 2026
Merged

momenbasel merged 2 commits into
momenbasel:mainfrom
omartio:feat/xcodebuildmcp-derived-data-safe

Conversation

@omartio

@omartio omartio commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds XcodeBuildMCP-managed DerivedData to PureMac Xcode Junk cleanup while preserving the existing cleanup safety contract.

  • Discovers legacy and per-workspace XcodeBuildMCP DerivedData paths only.
  • Requires explicit manual selection for XcodeBuildMCP DerivedData; rows are never auto-selected.
  • Scheduled cleanup respects selection and additionally requires data older than 7 days without an active lifecycle lock. Scheduled scans leave MCP rows unselected.
  • Re-checks and atomically acquires the workspace lifecycle lock before moving data to Trash.
  • Keeps workspace logs, state, result bundles, test products, and locks intact.
  • Canonicalizes symlinked homes consistently between scanning and cleaning.

Type of change

  • Bug fix
  • New feature
  • Performance improvement
  • UI/UX enhancement
  • Documentation
  • Other (describe)

Testing

  • Tested on macOS Ventura (13.x)
  • Tested on macOS Sonoma (14.x)
  • Tested on macOS Sequoia (15.x)
  • Full macOS test suite: 120 tests passed
  • Regression coverage for manual selection, scheduled selection handling, recent data, active lifecycle locks, symlinked homes, and workspace state preservation

Screenshots

Not applicable.

@omartio
omartio marked this pull request as ready for review August 22, 2026 18:14
@omartio
omartio force-pushed the feat/xcodebuildmcp-derived-data-safe branch from ffcdc60 to 84d1157 Compare September 28, 2026 07:06
@momenbasel
momenbasel merged commit 7410b1a into momenbasel:main Oct 8, 2026
2 checks passed
@momenbasel

Copy link
Copy Markdown
Owner

Landed in #184 with your authorship (84d1157, 7410b1a) plus three fixes from review, each with real-fixture tests. The cloud provider denylist from #142 now follows the canonical home this PR introduced into both engines (5b055ea); without it a symlinked home surfaced Library/Caches/com.apple.bird and CloudStorage as ordinary user caches and deleted them, which the probe reproduced. The legacy shared DerivedData root moves to the Trash without waiting for a per-workspace lock it could never acquire (24a10a4). The renamed MobileBuildMCP state directory from v2.7.1 is managed alongside the old one (c34aeea). The lock protocol was verified byte for byte against the tool's source (directory name, owner.json fields, 10 minute lease, purpose string), and the README now says the lock coordinates with the tool's purge rather than detecting a running build. All four findings from #155 are resolved. Ships in 3.1.0.

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.

2 participants