feat(session): auto-scope DerivedData per workspace/project path#341
Open
codeman9 wants to merge 4 commits intogetsentry:mainfrom
Open
feat(session): auto-scope DerivedData per workspace/project path#341codeman9 wants to merge 4 commits intogetsentry:mainfrom
codeman9 wants to merge 4 commits intogetsentry:mainfrom
Conversation
When derivedDataPath is not explicitly set but workspacePath or projectPath is known, the session store computes a workspace-scoped subdirectory under DerivedData using a name+hash scheme (e.g. MyApp-4ee6552f04c9). This prevents concurrent sessions building different clones of the same project from colliding on a shared build directory. Closes getsentry#340
commit: |
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a720f17. Configure here.
…ed state Internal read-then-write operations (setDefaultsForProfile, clearForProfile) now use getRawForProfile to avoid persisting the computed derivedDataPath. This ensures the value is recomputed when workspacePath or projectPath changes.
The header fallback now reads derivedDataPath from the session store so the displayed path matches the actual build location when using workspace-scoped DerivedData.
… summary Same issue as the pipeline header — formatToolPreflight falls back to the flat default when derivedDataPath is not in the preflight params. Now reads from the session store as a fallback.
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.

When
derivedDataPathis not explicitly set butworkspacePathorprojectPathis known in session defaults, the session store now computes a workspace-scoped subdirectory under the default DerivedData root using a<name>-<hash>scheme (e.g.MyApp-4ee6552f04c9).This prevents concurrent MCP sessions (or CLI invocations) building different clones of the same project from colliding on a shared build directory. Previously all sessions shared a single flat
~/Library/Developer/XcodeBuildMCP/DerivedData, which caused corrupted incremental builds when multiple agents worked on separate clones in parallel.The isolation is handled entirely in the session store's
getAllForProfile()as a computed default.resolveEffectiveDerivedDataPathand all tool implementations are unchanged. An explicitly setderivedDataPath(via session defaults or env var) always takes precedence.Closes #340