ci(workflows): add compiler caching, scope box_step, split megakernel, and extend PR selection

Merged
GR
9d ago
+428-177

Summary

Part 3 of the CI optimization series (from the 150-run audit: PR wall time p50 4h41m, p95 27h40m; lucebox3 wait p50 1h22m, p95 19h18m; hosted builds 22–32m each).

Folded into 2 clean commits:

  1. ci(plan): extend PR path selection to all jobs (.github/ci/ci_plan.py, .github/ci/test_ci_plan.py)
    • Extends .github/ci/ci_plan.py (75 passing unit tests, including a negative hidden-change test) to gate python, cpp, megakernel, windows, dgx, gpu, qwen38, and ds41 on PRs while failing open (!= 'false') on unknown paths or errors.
  2. ci(workflows): add ccache/sccache, scope box_step, split megakernel, and wire PR plan (.github/workflows/ci.yml, .github/workflows/commit-style.yml)
    • Self-hosted (lucebox3 + dgx-gb10): bootstraps SHA256-verified static ccache v4.14.3 on lucebox3 ($HOME/.cache/lucebox-ci-ccache, CCACHE_NOHASHDIR=true) with -j"$(nproc)" and optional -G Ninja; scopes box_step.sh strictly to GPU-using steps; removes needs: [uv-workspace] (-72s dead wait) and unused submodules: recursive.
    • Hosted Linux & Windows: enables mozilla-actions/sccache-action (SCCACHE_GHA_ENABLED=true), drops unused submodules: recursive where -DLUCE_ENABLE_BSA=OFF, and adds filter: blob:none to commit-style.yml.
    • Python & megakernel: enables setup-uv cache + single --extra dev sync + --no-sync ruff/pytest; splits build-megakernel out of Linux build into a parallel job.
    • Merge queue & security: adds merge_group trigger (--full), wires all jobs to plan, and sets top-level permissions: { contents: read }.

Recommended Merge Order

  • Merge #1060 (ci/docker-ghcr-cache) first (and clear old buildkit-blob-* GHA caches) so the 10 GB Actions cache quota has headroom for sccache + uv caches.
  • Combines cleanly with #1061 (perf/fast-gpu-and-cpu-tests, zero merge conflicts).