ci(nightly): use the managed fleet compiler cache

Closed
TE
4d ago
+182-47

Leo: “it feels like you guys always forget about incremental builds and the external ssds”.

NEXT nightly enabled only its local Xcode compilation cache even when its owned runner had the managed fleet CAS. Reuse the admission build’s existing integration: probe the managed socket, accept only its allowlisted plugin settings, keep the fixed CAS path, and retain local caching when unavailable. Prefix mapping and cache diagnostics now come from the same helper for both callers. The warm-source table records SSD CAS usage.

The existing dedicated runner keeps incremental DerivedData under its current invalidation rules; other runners retain their existing package/compiler caches and R2 restore. A helper change invalidates dedicated DerivedData. This changes no runner trust, permissions, signing policy, or product-reuse eligibility. Cold measurements skip the remote cache.

Validation at beb297ffb5f5a77c7c7f539476c3c9f85df42c84: 6 fixture-socket tests (healthy, absent, failed, incomplete, and disabled integration, plus the workflow’s actual command against a recording Xcode stub); 18 product-reuse tests; 19 incremental-state tests; 35 canonical-root tests (1 skipped); 12 warm-source tests; 2 workflow-size tests; the compiler-cache shell guard; test-execution registry and prepush checks all pass. These are portable tests with no real compiler. The remote command passed in fast-check run 41268775421, tested SHA beb297ffb5f5a77c7c7f539476c3c9f85df42c84, snapshot 9ea5a7caf92513acf3f71026edee2b6e47eb6eaa, exit 0 in 12.348 s. The automatic fallback replaced cancelled run 41268547028. Independent review pending.

Performance: no wall-time or Blacksmith-minute reduction claimed; this change routes cache traffic, not jobs. Live cache-hit and land-to-publish measurements remain required after rollout.

MetricBeforeAfterDeltaHarness
Shared CAS route in nightly compile with healthy managed nodeabsentenabledone shared routefixture socket + recorded Xcode argv
Build wall timenot measured for this changenot measuredunknownnext live nightly

Prior art: #29842 restored R2 caches for non-dedicated NEXT workers; retained. The existing admission integration at c12e934c6ad4 is extracted without changing its allowed settings. #20166’s app-target cache exception remains intact.

Agent session: agent session
🤖 Generated with Claude Code