Skip to content

Skip main's lanes when the merge queue verified the commit - #518

Merged
yansfil merged 1 commit into
mainfrom
ci/skip-queue-verified-main
Oct 5, 2026
Merged

yansfil merged 1 commit into
mainfrom
ci/skip-queue-verified-main

Conversation

@yansfil

@yansfil yansfil commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

With the merge queue on, the queue's verify run checks the group commit, and the push that follows runs verify again on that same commit: merge commits make the group commit main's commit (#503: both runs on 356c5db).
That second run is a full run, 93.8 job-minutes and 23.2 macOS minutes (median, n=9), and it competes for this organization's 20-job, 5-macOS cap while the queue waits.
A push to main now asks the Actions API for a successful merge_group run of verify on its commit; with one, the plan names no lane and verify passes with every lane skipped.
The exception is a push that changed a file a CI cache key hashes (Cargo.lock, a Cargo.toml, a toolchain file, .cargo/, pnpm-lock.yaml, .github/workflows/): the caches save only from main and only under a new key, so it runs every lane as before.
The net under a lane a pull request's plan left out moves from every main run to nightly, which now calls verify with every lane.

Review

  • 판단해 주세요: what nightly covers against a full main run. Before this change nightly missed six of them; its verify call now runs every lane once a day:
main full run nightly before nightly after
policy (script suite, invariants) no verify
rust (whole workspace, Linux) no verify
web-checks no (builds the web shell only) verify
desktop-checks no verify
windows-check no verify
remote mailbox (in the macOS @platform lane) no verify
os-contract, desktop-e2e (macOS) yes yes, twice
web-e2e (Linux), @platform on macOS and Windows yes, as the whole suite per system yes, twice
  • 판단해 주세요: the call repeats the lanes nightly already ran (about 75 job-minutes, 23 of them macOS, at 18:00 UTC: Linux web e2e 39, desktop e2e 13.5, macOS @platform 9.4, Windows @platform 11.2, OS contract 2.4). A lane filter on the call would remove that but add a second way to plan; I kept one.
  • 판단해 주세요: what a skipped push no longer does. It saves no cache, which costs nothing while the key is unchanged (rust-cache saves only on a new key); a cache evicted under the 10 GB limit, or a runner image with a new rustc (part of the key, no file changes), waits for the next cache-key push or nightly.
  • 조심해서 볼 파일: .github/workflows/pr.yml plan job, failure path: a failed lookup, no queue run, an unfetchable base or no earlier passing push run each plan every lane with the reason in the plan output and summary; nothing skips silently.
  • 조심해서 볼 파일: scripts/ci-plan.py plan_push. A push compares from the last main commit whose push run passed, not github.event.before: GitHub replaces a pending run (25 of 43 main runs on 2026-10-05), and the replaced run's merges still have to be checked for cache keys.
  • 조심해서 볼 파일: concurrency.group is now ${{ github.workflow }}-.... For verify's own runs that is the same string as before (verify-...); a call from nightly is nightly-refs/heads/main, so it never replaces a push run's pending place.

Evidence

  • 확인한 것 (before, per merge): full main push runs of verify, measured from the runs' jobs (n=9, 2026-10-05): 93.8 job-minutes median (89-96), macOS 23.2 (19.4-25.0). On 2026-10-05, 17 of 43 main push runs ran their lanes and 26 were cancelled or replaced, so about 0.4 full runs per merge: about 37 job-minutes and 9.2 macOS minutes per merge.
  • 확인한 것 (after, per merge): a skipped push runs plan and verify only, 0.22 job-minutes (median of the same runs' two jobs), 0 macOS. Of the last 82 merged pull requests (Workspace 본문을 Agent Views, File Views, Tools 세 컬럼으로 나눕니다 #361-Fix the delegated canvas test's order and split the tab strip fit test, removing two @flaky tags #492), 19 touched a cache key (10 workflows, 5 pnpm-lock.yaml, 2 Cargo.toml, 2 Cargo.lock) and would still run every lane: at most 0.23 x 93.8 + 0.77 x 0.22 = 21.8 job-minutes and 5.4 macOS minutes per merge. Nightly adds one full run, about 94 job-minutes and 23 macOS minutes a day.
  • 확인한 것 (the step, real API): the plan step's shell, run in a detached checkout of 356c5db with this ci-plan.py and the live Actions API: base 769f34b (last passing push run), lanes=[], verified-by=https://github.com/modakbul-gongbang/hide/actions/runs/37304085037. The same planner over main's last eight merges skips only Make the process and lock wait tests wait for the child or the waiter #503 and runs every lane for the seven before it (six changed a workflow or Cargo.toml, one predates the queue).
  • 확인한 것 (tests): scripts/tests/test_ci_plan.py 35 pass. The new cases (verified push plans nothing; a wrong commit, a non-queue or failed run, a missing answer, an unfetchable base or no base plan every lane; a cache key two merges back plans every lane; every crate's Cargo.toml matches a pattern; verify passes a verified push only with every lane skipped) fail against main's ci-plan.py (3 failed). The whole scripts suite has 131 tests; actionlint is clean on every workflow.
  • 확인하지 못한 것: a real skipped push and a real nightly verify call happen only after merge. This merge changes .github/workflows/, so its own push runs every lane; the first skipped push and the next nightly go into the follow-up report with run numbers.

A push to main now asks the Actions API for a successful merge_group
run of verify on the same commit. With one, and no file a CI cache key
hashes changed since the last passing push run, the plan names no lane
and verify passes with every lane skipped. Without one, when the lookup
or the comparison fails, or when a cache key input changed (the caches
save only from main and only under a new key), every lane runs and the
plan says why.

Main's full run was the net under a lane a pull request's plan left
out; nightly now calls verify with every lane on main to keep that net.
@yansfil
yansfil added this pull request to the merge queue Oct 5, 2026
Merged via the queue into main with commit aaa49ab Oct 5, 2026
28 checks passed
@yansfil
yansfil deleted the ci/skip-queue-verified-main branch October 5, 2026 15:25
yansfil added a commit that referenced this pull request Oct 6, 2026
## Summary

The merge queue is off (its median from a green pull request to main was
47.6 minutes, of which 12.6 were work), so this removes the code and
text that existed only for it.
A push to main plans every lane again, as before the queue;
`merge_group` runs and their plan from `merge_group.base_sha` are gone.
Removed: the `merge_group` trigger, the push's Actions API lookup of a
queue run and its `actions: read` permission and `GH_TOKEN`, the push
base from the last passing push run, the cache key comparison
(`CACHE_KEYS`), `--queue-runs`, the `verified-by` output and the
verified-push branch of `aggregate`, and the docs and tests that
described them.
`scripts/ci-plan.py`, its test and `CONTRIBUTING.md` were changed only
by #500, #518 and #543, so they return to their state before #500;
`pr.yml`, `nightly.yml` and `docs/TESTING.md` are edited by hand to keep
#507 and #539.

## Review

- **판단해 주세요**: nightly's call of `verify` with every lane (#518) stays.
A push to main runs every lane again, but a lane it fails opens no
issue; the same failure in nightly's call opens or comments on the
nightly issue through the report job, and a lane that breaks with no
merge (a runner image, a toolchain, a service a test reaches) is found
within a day. It costs about 94 job-minutes a day, 23 of them macOS (a
full run of `verify`, median of 9 main runs). If that alert is not worth
it, the call, `workflow_call` and the concurrency group change go
together.
- **조심해서 볼 파일**: `.github/workflows/pr.yml` `concurrency.group` stays
`${{ github.workflow }}-...` for the call: `verify`'s own runs keep the
same group name as before, and nightly's call is
`nightly-refs/heads/main`, so it never takes a push run's pending place.

## Evidence

- **확인한 것**: `git grep -i 'merge
queue\|merge_group\|verified-by\|CACHE_KEYS\|queue-runs'` finds nothing
outside the local harness folder; `actions: read` remains only on
nightly's report job, which had it before.
- **확인한 것**: `scripts/ci-plan.py` and `scripts/tests/test_ci_plan.py`
equal their state at the parent of #500 except the added
`test_nightly_calls_verify_with_every_lane`, which fails when
`workflow_call` is removed from `pr.yml`; `python3 -m unittest
scripts/tests/test_ci_plan.py` 30 pass; the policy lane's commands pass
locally (`unittest discover` 129 tests, `nightly-report.test.cjs` 6, the
structural checks).
- **확인한 것**: `actionlint` is clean on every workflow.
- **확인한 것 (what the skip did while the queue was on)**: one main push
run planned no lane,
[37341893238](https://github.com/modakbul-gongbang/hide/actions/runs/37341893238):
2 jobs, 0.35 job-minutes; a full push run took 94.1 (macOS 25.3).
- **확인하지 못한 것**: this pull request changes `.github/workflows/`, so its
own run plans every lane; nightly's `verify` call has not run yet (the
first schedule after #518 is 18:00 UTC).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant