Skip to content

ci: reuse the merge-queue verdict on main and trim coverage/sbt work - #1355

Merged
Mikola Lysenko (mikolalysenko) merged 11 commits into
mainfrom
ci/avoid-redundant-validation
Oct 10, 2026
Merged

Mikola Lysenko (mikolalysenko) merged 11 commits into
mainfrom
ci/avoid-redundant-validation

Conversation

@mikolalysenko

@mikolalysenko Mikola Lysenko (mikolalysenko) commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Reworked on top of main's lean CI (#1375) and Depot runners (#1362). Main now runs PR, merge_group and push CI in a lean scope, and it already includes this PR's Gradle Windows change. This PR now carries only the pieces that still save CI minutes on that structure. The required checks ci-ok and clippy keep their names, and ci-ok still needs every job.

Kept

  • Reuse the merge-queue verdict on push to main (biggest saver). clippy runs scripts/ci-reuse-merge-group.py with actions: read. The script makes one bounded API read (15 s timeout) for a successful merge_group run of ci.yml on the identical SHA, from a gh-readonly-queue/main/ branch of this repository. If it finds one:
    • The push run still compiles so the main-only caches (save-if: github.ref == 'refs/heads/main') stay warm: cargo test --no-run in test, coverage (under the llvm-cov env) and cargo-old-toolchains. The e2e builders and the node-addon build run as before.
    • It skips the test steps and the test-only jobs the queue already ran: e2e, e2e-extended, e2e-windows, e2e-macos, cargo-vex-matrix{,-windows,-macos}, yarn-classic-matrix, yarn-berry-e2e{,-macos} and docker-base/coverage-docker.
    • Jobs the merge queue never runs still run: test-release, e2e-full, yarn-berry-full and cargo-vex-matrix-full. The Linux e2e bundle is still uploaded for them.
    • hosted-e2e still runs on every push, as main's LEAN SCOPE note requires.
    • API errors, timeouts, malformed payloads, missing evidence, direct pushes, PRs, nightlies and dispatches all fall back to the full run.
  • Coverage summary from the existing LCOV export (scripts/ci-lcov-summary.py). It replaces the second cargo llvm-cov report --summary-only pass, which merged the profiles and scanned the instrumented objects again, on the critical-path coverage job. The summary reports line, function and branch totals (LCOV has no LLVM region totals).
  • Runtime-balanced Windows test shards (scripts/ci-test-shard.py + scripts/ci-test-durations.json) and a slimmer sbt warm-up for coverage-docker's blocking slice (Dockerfile.sbt SBT_WARM_TOOLS, with sbt 1.2.8/1.13.0 only). Both apply only in full scope now. Nightly and the compatibility workflows keep the full sbt, Mill and scala-cli warm-ups.

Dropped

Validation

  • python3 -B -m unittest discover -s scripts/tests: 316 tests OK (1 existing skip). This includes new contract tests for the reuse wiring, the reuse script, the LCOV summary and the timed shards.
  • actionlint .github/workflows/ci.yml: the same 165 findings as main (all the existing expression "not defined in object type" warnings), with no new kinds or messages.
  • PyYAML parse: ci-ok needs all 30 other jobs. Every needs.X.outputs.reuse reference resolves to a direct needs that exports reuse.

Fixes #1170
Fixes #1174
Fixes #1225
Refs #1182

🤖 Generated with Claude Code

Reuse successful same-SHA merge-group verdicts on main while retaining cache writers and the full tier. Keep Gradle PR coverage on the supported boundary lines, balance expensive hosted cases, and group short e2e jobs without losing filters or tool-version guards.

Balance Windows tests from measured durations, retain line-table backtraces, avoid duplicate workspace builds and coverage reports, and trim the blocking sbt warm set.
@mikolalysenko Mikola Lysenko (mikolalysenko) added the ci-perf CI / merge-queue performance finding (profiler routine) label Oct 9, 2026
Retain the new Bun shared bundled-record test in the grouped e2e matrix. Run the new Rust setup retry script under Bash in the Windows addon job.
@mikolalysenko

Copy link
Copy Markdown
Collaborator Author

[final reviewer] Auto-merge is off. Tanmay Singla (@Tanmay182003), two non-merge commits landed after your approval at bb74536e:

  • c0438a6a ci: build platform addons in parallel with test shards (ci.yml + scheduling test, +31/-14)
  • 662d7111 ci: overlap independent Gradle agent suites (ci.yml, scripts/ci-e2e-*.py + tests, +101/-42)

The PR is also CONFLICTING with main right now. Please take another look at those two commits once the conflict is fixed; I'll re-arm auto-merge after a fresh approval on a green head.


Generated by Claude Code

Applies #1362's runs-on mapping to this branch's ci.yml and compatibility
workflows: Linux jobs map to depot-ubuntu-24.04-4 / depot-ubuntu-22.04-4
unless the repository variable DISABLE_DEPOT_RUNNERS=true. The two PRs
touch the same workflow files, so carrying the mapping here lets them
land back to back without a conflict eviction.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Main now runs PR, merge_group and push CI in the lean scope (#1375) on
Depot runners (#1362), and already carries this PR's Gradle Windows
change. Every conflicted workflow and test file takes main's version.
Only the pieces that still save minutes on that structure are re-applied.

Kept:
- Merge-queue verdict reuse on push to main. clippy runs
  scripts/ci-reuse-merge-group.py (actions: read), which looks for a
  successful merge_group run of ci.yml for the identical SHA from a
  gh-readonly-queue/main/ branch of this repository. When it finds one, the
  push run still compiles to refresh the main-only caches (cargo test
  --no-run in test, coverage under the llvm-cov env and
  cargo-old-toolchains; the e2e builders and node-addon build as before)
  but skips test steps and the test-only jobs the queue already ran: e2e,
  e2e-extended, e2e-windows, e2e-macos, the cargo-vex and yarn lean jobs and
  docker-base. Jobs the queue never runs (test-release, e2e-full,
  yarn-berry-full, cargo-vex-matrix-full) keep running, so the Linux e2e
  bundle still uploads. API errors, timeouts, bad payloads, missing
  evidence and direct pushes all fall back to the full run. hosted-e2e is
  left running on every push, as main's LEAN SCOPE note requires.
- Coverage summary from the existing LCOV export
  (scripts/ci-lcov-summary.py) instead of a second `cargo llvm-cov
  report --summary-only` pass over the instrumented objects. coverage is
  the critical-path job.
- Runtime-balanced Windows test shards (scripts/ci-test-shard.py with
  scripts/ci-test-durations.json) and the slimmer sbt warm-up for
  coverage-docker's blocking slice (Dockerfile.sbt SBT_WARM_TOOLS). Both
  only affect full-scope runs now.

Dropped:
- e2e row packing (ci-e2e-groups.py, ci-e2e-run.py, grouped e2e jobs,
  e2e-gradle-mid) and their tests: main split e2e into lean `e2e` and
  full-only `e2e-extended` instead.
- The Gradle compat changes (already on main via #1375).
- The ci-ok `!cancelled()` condition and the node-addon OS matrix: they
  don't apply cleanly to main's design and aren't needed for the savings
  above.
- The per-workflow Depot runs-on edits, which main landed in #1362.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@mikolalysenko Mikola Lysenko (mikolalysenko) changed the title ci: reduce duplicate validation and shorten merge-queue checks ci: reuse the merge-queue verdict on main and trim coverage/sbt work Oct 9, 2026
@mikolalysenko

Copy link
Copy Markdown
Collaborator Author

Tanmay Singla (@Tanmay182003) Wenxin Jiang (@Wenxin-Jiang) heads-up: the scope of this PR changed after your approval. I merged main (lean CI #1375 and Depot runners #1362) and dropped the e2e row packing, the Gradle changes and the ci-ok cancellation tweak. What's left is reusing the merge-queue verdict on push to main, the LCOV-based coverage summary, Windows shard balancing and the sbt warm-up slimming (details in the updated description). Could you take another look?

@mikolalysenko

Copy link
Copy Markdown
Collaborator Author

Enqueued on the existing approval at the maintainer's direction (the maintainer reviewed the reworked scope). It merges cleanly with current main, and the merge queue re-validates it against main before landing.

Merged via the queue into main with commit d877fc4 Oct 10, 2026
97 of 101 checks passed
@mikolalysenko
Mikola Lysenko (mikolalysenko) deleted the ci/avoid-redundant-validation branch October 10, 2026 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-perf CI / merge-queue performance finding (profiler routine)

Projects

None yet

2 participants