Skip to content

xcode: clean XcodeBuildMCP DerivedData - #155

Closed
omartio wants to merge 1 commit into
momenbasel:mainfrom
omartio:feat/xcodebuildmcp-derived-data
Closed

omartio wants to merge 1 commit into
momenbasel:mainfrom
omartio:feat/xcodebuildmcp-derived-data

Conversation

@omartio

@omartio omartio commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds XcodeBuildMCP-managed DerivedData to the existing Xcode Junk cleanup category.

  • Discovers both the legacy shared ~/Library/Developer/XcodeBuildMCP/DerivedData directory and current workspace-scoped workspaces/<workspace-key>/DerivedData directories.
  • Cleans only DerivedData while preserving workspace logs, state, locks, result bundles, and test products.
  • Rejects symlinked managed storage, managed-to-managed retargeting, and administrator escalation specifically for XcodeBuildMCP DerivedData.
  • Keeps the existing category title, description, and localizations unchanged.

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)

Automated verification:

  • xcodebuildmcp macos test --project-path ./PureMac.xcodeproj --scheme PureMac --configuration Debug --output json
  • 28 tests passed, 0 failed, 0 warnings, 0 errors.
  • git diff --check passed.

Screenshots

CleanShot 2026-08-14 at 12 45 29@2x

@omartio
omartio marked this pull request as draft August 14, 2026 10:47
Discover legacy and workspace-scoped managed DerivedData while leaving logs, state, locks, result bundles, and test products untouched. Validate exact managed paths and reject symlink escapes before normal or privileged deletion.
@omartio
omartio force-pushed the feat/xcodebuildmcp-derived-data branch from 89c1478 to 155c017 Compare August 14, 2026 11:39
@omartio
omartio marked this pull request as ready for review August 14, 2026 11:40
@momenbasel

Copy link
Copy Markdown
Owner

Closing after maintainer safety review; this cannot merge in its current form.

Release-blocking findings:

  • P1: XcodeBuildMCP DerivedData entries default to selected and participate in scheduled Xcode Junk auto-clean, without an age cutoff or coordination with the lifecycle lock. An active build directory could be deleted unattended.
  • P1: these new targets are removed irreversibly, conflicting with the documented Trash/review safety contract.
  • P2: ScanEngine canonicalizes a symlinked home while CleaningEngine builds ordinary allowlisted roots from the uncanonicalized home. That can regress existing non-MCP cleanup validation.
  • Coverage does not exercise scheduled auto-clean or a held lifecycle lock.

A safe redesign should make these rows opt-in, exclude them from scheduled cleanup, coordinate with XcodeBuildMCP lifecycle locking, canonicalize the home consistently, and add regression tests for active builds and symlinked homes.

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