Skip to content

ci: add nightly main snapshots without expanding push queues (CI-MAIN-SIGNAL) - #771

Merged
aslan2142 merged 1 commit into
ProjectLeonida:mainfrom
djrolfes:djrolfes-ci-main-signal
Nov 25, 2026
Merged

aslan2142 merged 1 commit into
ProjectLeonida:mainfrom
djrolfes:djrolfes-ci-main-signal

Conversation

@djrolfes

@djrolfes djrolfes commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Claimed: CI-MAIN-SIGNAL (coordination).

Depends on: none.

Revised after review: bounded nightly snapshots

The original per-push run_id proposal is withdrawn. It prevented replacement of queued merges but expanded runner demand without making results arrive sooner.

This replacement keeps all existing push/PR concurrency expressions and cancellation behavior unchanged:

  • Add one daily default-branch CI snapshot at 03:23 UTC.
  • Add one daily Runtime snapshot at 03:53 UTC, staggered after CI.
  • Scheduled runs already have separate schedule-<run_id> groups, so queued pushes cannot replace them.
  • No changes to No Game Data, jactionlint or XMA2 concurrency. There is no competing per-push policy for ci: add a concurrency group to xma2-decoder.yml (CI-XMA2-CONCURRENCY) #608 to adopt.

This adds two scheduled workflow invocations per day, not full CI/Runtime work for every merge. Schedules run only from the default branch after merge. They may still queue, be delayed or fail; this does not promise immediate results, a green run, or coverage of every intermediate merge.

Accuracy correction

“Zero completed runs” in the original description was incorrect. The reviewer's historical 40-run sample contained 37 cancelled, one completed failure and two pending, with no green run in that sample. Those are the review's measurements, not a new claim about current Actions history.

Tested at 325ce06eb

Base e18b59a5b; clean merge-tree against 5da72d19f.

  • New standard-library schedule/concurrency tests: 6 passed. Controls fail without schedules and when the expensive per-push run_id policy is reintroduced.
  • CI-registration tests: 16 passed; No Game Data workflow tests: 3 passed.
  • PyYAML 6.0.3 parses all four relevant workflows.
  • Exact pinned jactionlint 2.6.0, correctness profile, network disabled: zero findings on the two changed workflows, both baseline and candidate. Shellcheck is not installed locally, so its 36 unchanged shell scripts were not checked.
  • Compileall, changed-file scanner and diff checks pass.
  • Known baseline failure, not waived: test_runtime_paths.py passes 4/5 on both main baseline and candidate. tools/conformance/** is missing from Runtime's path filters despite a CMake dependency; existing ci: the Runtime workflow starts on tools/conformance/** (CI-RUNTIME-PATHS-CONFORMANCE) #1657 owns the correction. This PR does not hide or disable that check.

Hosted workflow execution and an actual scheduled run remain unverified. A passing label check is not full CI.

Independent cleanup branches

#782, #789 and #794 have been rebuilt independently from main, each with only its own cleanup commit. The original concurrency commit and sibling cleanup commits were removed, so their Depends on: none declarations are now accurate.

GPUs tested: n/a; workflow/test-only change, Linux, no game files.

AI-assisted: yes. Original heads preserved; same PR/branch updated with an explicit old-head lease.

TuroYT added a commit to TuroYT/leonida-continuation that referenced this pull request Nov 24, 2026
… will

A push keyed on the ref made two pushes to main share one group, and GitHub
keeps at most one pending run per group, so a queued main run was replaced
by a newer one. The group now uses the PR number or the run id, which is the
shape ProjectLeonida#771 gives ci.yml, jactionlint.yml, no-game-data.yml and runtime.yml.

CI-XMA2-CONCURRENCY
@moffington

Copy link
Copy Markdown
Contributor

Reviewed 9e7bbff72 and confirmed a clean trial merge against main at d0da7dade.

The current cancellation problem is substantial:

  • CI: 37/40 main push runs cancelled.
  • No Game Data: 19/20 cancelled.
  • Runtime: 17/20 cancelled.

Local expression simulation confirms unique concurrency groups for successive pushes, preserved per-PR cancellation, and no cross-workflow group collisions. Triggers and permissions remain unchanged.

All four modified YAML files parse successfully. The 23 existing workflow checks also pass on main. Full actionlint/jactionlint validation remains unverified locally, and hosted checks await maintainer approval.

The increased runner backlog is a legitimate trade-off, but the concurrency change itself looks correct.

LGTM, pending hosted checks.

@MoonEyes

Copy link
Copy Markdown
Collaborator

The expression does what the PR says. I parsed all four files with PyYAML and simulated the group: two pushes to main now get distinct groups (ci-push-<run_id>), two runs of the same PR still share ci-pull_request- and cancel each other, and different PRs don't interact.

Two points before merging:

  1. Cost. The old group capped main at 1 running + 1 pending run per workflow. With run_id, every push runs in full. Measured today: 40 CI push runs on main between 09:26 and 13:44 UTC (about 9/h). A main CI run is 8 jobs (1 macOS, 2 Windows), about 47 job-minutes (run 45369028646), and Runtime adds 5 jobs, about 40 job-minutes (run 45360188231). Jobs already wait about 50 min to start, and macos-python waited 174 min. In a merge burst this could add about 10 runners of continuous main load, plus about 18 macOS jobs/h, on top of 109 PR runs since 09:00. Coalescing with a scheduled main run, or a unique group only in ci.yml, would restore the signal without an unbounded queue.

  2. Accuracy. Of the last 40 CI push runs on main, 37 were cancelled, 1 completed (failure) and 2 are pending. Over 7 days: 141 cancelled, 11 failed, 0 succeeded. So main has no green run, rather than "zero completed".

Consistency: #608 adds the old pattern ((github.event_name == 'push' && github.ref)) to xma2-decoder.yml. Whichever option lands, the two PRs should use the same one.

AI-assisted review (Claude Code).

@aslan2142

Copy link
Copy Markdown
Collaborator

Thanks. The expression change is correct: push runs get …-push-<run_id>, PR runs keep …-pull_request-<number> with cancel-in-progress: true, and it merges cleanly onto current main. MoonEyes's cost point and the #608 consistency point are still open; besides those:

  • It won't make the main result arrive sooner. The old group never cancels the run that holds it, only the pending one (median life 12 s today). The CI run holding the main group now (45405317016) has been queued, waiting for runners, since 13:37Z. With per-sha groups, each main run joins the same queue (about 664 queued runs) and finishes hours later, while PR runs wait behind it.
  • The cost is unbounded. At about 200 merges a day this adds about 440 runs, about 2,000 jobs and about 12,000 job-minutes a day, which is roughly 8 runners and 1.7 macOS runners busy around the clock.
  • A bounded option: keep the current group for ci.yml and runtime.yml and add a schedule: trigger (every 6 h, or nightly). The existing expression already gives a scheduled run its own …-schedule-<run_id> group, so merges can't replace it. Per-sha groups for no-game-data.yml (1 job, seconds) and jactionlint.yml (rare) are cheap and could stay as they are here.
  • mask_channels: make the --json staging deletable when a replace fails (MASK-CHANNELS-STAGE-CLEANUP) #782, story_index: make the staging file deletable when a replace fails (STORY-INDEX-STAGE-CLEANUP) #789 and rpf9_names: make the staging file deletable when a replace fails (RPF9-NAMES-STAGE-CLEANUP) #794 already contain this PR's commit but say Depends on: none. Merging any of them would land this concurrency change under an unrelated title. Please rebase them off it, or mark them Depends on: #771.
  • The hosted checks on 9e7bbff72 are action_required, so jactionlint hasn't run on this change yet.

AI-assisted (Claude Code, Claude Opus 5.5).

Address CI-MAIN-SIGNAL review cost concerns with one staggered daily CI and Runtime snapshot, using their existing schedule-specific run groups. Keep push/PR cancellation and coalescing unchanged; do not expand every merge into full runner work. Synthetic schedule/expression controls included. AI-assisted.
@djrolfes
djrolfes force-pushed the djrolfes-ci-main-signal branch from 9e7bbff to 325ce06 Compare November 25, 2026 19:48
@djrolfes djrolfes changed the title ci: give push runs their own concurrency group so every merge to main completes (CI-MAIN-SIGNAL) ci: add nightly main snapshots without expanding push queues (CI-MAIN-SIGNAL) Nov 25, 2026
@djrolfes

Copy link
Copy Markdown
Contributor Author

Thanks @MoonEyes @aslan2142 @moffington. Addressed the concerns in replacement head 325ce06:

Local evidence: six new schedule/group tests with negative controls, 16 CI-registration tests and three workflow tests pass; YAML parses; pinned jactionlint 2.6.0 correctness reports no findings on baseline/candidate. Shellcheck was unavailable and its 36 unchanged scripts were not checked. Runtime-path tests retain the identical main failure for missing tools/conformance/** (4/5 pass); no check was disabled. Hosted CI/scheduled execution remain unverified, and the label check is not full CI. Full details in the updated body. AI-assisted; original heads preserved and explicit leases used.

@aslan2142
aslan2142 merged commit cb69950 into ProjectLeonida:main Nov 25, 2026
@aslan2142

Copy link
Copy Markdown
Collaborator

Merged, thanks! The scheduled snapshots are the bounded option: ordinary pushes keep coalescing, and two runs a day give main a real signal.

AI-assisted (Claude Code, Claude Opus 5.5).

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.

4 participants