fix(cmux-next media): a pin change also drops Xcode's build description
On 10-19, 14 of the 22 failed cmux NEXT media tours died 30-40 s into the build with fatal error: module file '.../Build/Intermediates.noindex/ExplicitPrecompiledModules/Darwin-*.pcm' not found (for example job 118285853270). In all 14, the build step had just printed binary pins changed (...): clearing precompiled modules. That clear comes from media_module_cache_stamp.py (#21971). I counted the failure logs: every Darwin-pcm failure except one (a disk-full run) follows a clear.
The clear deletes the explicit module dirs. Xcode's build description (Build/Intermediates.noindex/XCBuildData) still records those modules as built, so Xcode doesn't schedule them again, and clang can't find the Darwin pcm. With this change the clear also removes XCBuildData, so Xcode plans the build again. The Swift driver keeps its incremental state elsewhere in Intermediates.noindex, and that stays.
This build is slower than a warm one. It only happens when a binary pin changes, and those tours fail today.
Changelog
none
Test
python3 tests/test_ci_media_module_cache_stamp.py (needs pyyaml)
- base (test commit only):
FAIL: dropping the modules also drops the build description that lists them - head:
all media module cache stamp checks passed
Observed / Not run
Observed: the test above, red then green. I matched the 14 pcm-missing failure logs to their clear lines (logs from the 10-19 tour sweep).
Not run: a real Xcode build after a clear with this change. That would take a cold app build on a PR runner mini. The first tour after a pin change on feat-cmux-next will confirm it, and I'll check that run.
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes cmux NEXT media tours dying 30-40 s into the build with Darwin-*.pcm not found after a binary pin change. Clearing the precompiled modules left Xcode's build description (Build/Intermediates.noindex/XCBuildData) recording them as built, so the next build asked clang for a module that no longer existed. The clear now also removes XCBuildData, so Xcode plans the build again; the Swift driver's incremental state in Intermediates.noindex stays.