ci(workflows): decouple main concurrency from lucebox3 queue so hosted jobs seed sccache

Merged
GR
8d ago
+15-4

Based on main (a70ab3ca2). Independent of #1068, #1070, #1074, and #1076 (no overlapping lines).

What

  • Cause (observed on main): ci.yml previously put all main pushes into one workflow-level concurrency group (ci-refs/heads/main, cancel-in-progress: false). Whenever lucebox3 had a queue backlog or went offline, a single main run stayed active waiting on lucebox3 and blocked every subsequent merge from starting any hosted job (build, build-windows, build-windows-hip, dgx-gb10):
    • main run 45093666495 (2026-11-23T01:16:54Z → 2026-11-24T01:18:09Z) held the main concurrency slot for 24h, cancelling/blocking 11 subsequent merges (45140798351–45203829685) and stalling 45221174045 for 8h 27m (16:51Z → 01:18Z).
    • Until 45221174045 finally started and seeded sccache on refs/heads/main, PRs ran cold: #1074 (45216308106) took 31m 30s Linux / 45m 15s timeout Win CUDA / 21m 19s Win HIP, and #1073 (45244737064) took 38m 05s / 31m 13s / 30m 09s.
    • Immediately after 45221174045 seeded sccache, #1048 (45336602898) dropped to 7m 52s Linux (92.2% hit) / 7m 27s Win CUDA (93.6% hit) / 4m 33s Win HIP (83.0% hit).
  • Fix (.github/workflows/ci.yml):
    1. Workflow-level concurrency: keep cancelling superseded PR runs (opened/synchronize/reopened, attempt 1) under CI-pr-latest-<pr>, while giving push to main, merge_group, workflow_dispatch, and reruns (run_attempt > 1) their own CI-run-<run_id> group so hosted jobs and dgx-gb10 start immediately on every merge and seed sccache promptly.
    2. Job-level concurrency on gpu-tests-amd: collapse queued push runs on main per arch (lucebox3-main-<arch>, cancel-in-progress: false — at most 1 active + 1 latest pending) so rapid merges don't queue redundant 75m lucebox3 builds, while keeping each PR run in lucebox3-run-<run_id>-<arch> so PRs never cancel one another on lucebox3.

Baseline & measurement (provisional)

  • Observed cold vs warm hosted build times (post-#1062):
    • Linux build: 31m 30s–38m 05s cold → 7m 52s warm (-23m 38s to -30m 13s)
    • build-windows (MSVC + CUDA): 31m 13s–45m 15s (timeout) cold → 7m 27s warm (-23m 46s to -37m 48s)
    • build-windows-hip (ROCm HIP): 21m 19s–30m 09s cold → 4m 33s warm (-16m 46s to -25m 36s)
  • After merge: verify with Joggernaut ci-measure across >= 5 comparable post-merge runs that main hosted builds start within seconds of merge regardless of lucebox3 queue state, and that PR sccache hit rates stay warm.

Coverage & checks

  • Every job, matrix entry, test suite, and check name is unchanged.
  • Checked group names case-insensitively against every other workflow (docker-${{ github.ref }}, lucebox-rtx3090-gpu-runner): zero collisions.
  • Validated locally: yaml.safe_load on .github/workflows/ci.yml and .github/ci/check_commit_messages.py.