Skip to content

Mac: DerivedData and simulator devices on the scratch drive - #709

Merged
ejc3 merged 1 commit into
mainfrom
mac-build-scratch
Oct 27, 2026
Merged

ejc3 merged 1 commit into
mainfrom
mac-build-scratch

Conversation

@ejc3

@ejc3 ejc3 commented Oct 27, 2026

Copy link
Copy Markdown
Owner

The Mac's internal disk kept dropping under the 12 GB floor builds need. Builds already write to the scratch drive, but Xcode's DerivedData and the simulator devices did not.

  • scripts/mac/install.zsh: when ~/.config/mac-setup/deriveddata names a folder on a mounted disk, set Xcode's IDECustomDerivedDataLocation to it, so every xcodebuild without -derivedDataPath builds there. With no file, or the drive unplugged, nothing changes (a warning names the unmounted path).
  • README.md ("MacBook: The scratch drive"): documents the DerivedData setting and the simulator devices now living on the drive behind a symlink: the two one-time steps at the Mac CoreSimulator needs first (volume ownership on, and Full Disk Access for CoreSimulatorService), how to check the drive with a throwaway device set, and how to move and verify a device set.

Already applied on the owner's Mac by hand (the README states what it now has): the DerivedData setting, the managed TMPDIR block from main's mac-setup.sh, and the simulator move (72 GB; free space on the internal disk 18 GB → 88 GB; 42 devices listed before and after; a throwaway device created and booted through the symlink).

Not covered by an automated test: the install step needs macOS defaults; it was exercised by setting the same default by hand on the Mac.

… there, with what CoreSimulator needs first

mac-setup sets Xcode's IDECustomDerivedDataLocation from
~/.config/mac-setup/deriveddata when its disk is mounted. The README records the
simulator move (a symlink to the scratch drive), the two one-time steps at the Mac
it depends on (volume ownership and Full Disk Access for CoreSimulatorService),
and how to move and verify it.
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2b47f668-8cfd-4fd3-b51c-734378cea226
Commits

Reviewing files that changed from the base of the PR and between 52716a5 and 59e6e8d.

Files selected for processing: 2
  • README.md
  • scripts/mac/install.zsh
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T06:34:32.140811Z 59e6e8d PR opened
🔒 Security Review ✅ Completed 2026-10-27T13:09:02.874813Z 59e6e8d Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

ejc3 commented Oct 27, 2026

Copy link
Copy Markdown
Owner Author

@codex security review

ejc3 commented Oct 27, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

ejc3 commented Oct 27, 2026

Copy link
Copy Markdown
Owner Author

@greptileai review

@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review

Security review completed. No security issues were found in this pull request.

Reviewed commit: 59e6e8d606

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

ejc3 commented Oct 27, 2026

Copy link
Copy Markdown
Owner Author

Independent HIGH code/security review and exact-head Codex code/security reviews pass at 59e6e8d. Required CI passed; no unresolved review threads. CodeRabbit is quota-limited and Greptile did not respond; neither is counted as an approval.

Read-only verification through the established ARM → Mac route confirms the configured path and Xcode preference are both /Volumes/Scratch/DerivedData on a mounted, writable APFS volume. CoreSimulator/Devices already points to the writable scratch destination. No installer, simulator move, service restart or device launch is needed. Merging records the working setup.

@ejc3
ejc3 merged commit 111ac15 into main Oct 27, 2026
3 checks passed

ejc3 commented Oct 27, 2026

Copy link
Copy Markdown
Owner Author

The combined deployment is complete at e4e019d. Terraform apply succeeded, followed by a full 2,524-resource plan with exit 0 / no changes. /infra/applied-status is published clean for this commit.

Read-only Mac checks confirmed both the configured DerivedData path and Xcode preference point to the mounted, writable scratch volume, and the existing simulator symlink points to its writable scratch destination. The live setup already matched this change; no installer or simulator move was required.

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