Skip to content

ci: partition heavy EGS test modules for parallel execution#77

Closed
loothero wants to merge 10 commits intomainfrom
feat/ci-test-partitioning
Closed

ci: partition heavy EGS test modules for parallel execution#77
loothero wants to merge 10 commits intomainfrom
feat/ci-test-partitioning

Conversation

@loothero
Copy link
Member

@loothero loothero commented Mar 8, 2026

Summary

  • Uses snforge --partition INDEX/TOTAL to split heavy Embeddable Game Standard modules across multiple parallel runners
  • token: 1×32-core → 4×8-core partitions
  • minigame/metagame/registry: 1×8-core → 2×4-core partitions each
  • Eliminates all ubuntu-latest-32 and ubuntu-latest-8 EGS runners
  • Doubles EGS fuzzer runs from 32 → 64
  • Total jobs: 16 → 22 (cheaper runners, better parallelism)
  • Codecov merges partitioned coverage uploads via same flag name
  • Updates codecov.yml after_n_builds from 16 → 22
  • Updates AGENTS.md CI matrix documentation

Test plan

  • Verify validate-config step passes (22 module: lines == after_n_builds: 22)
  • Verify all 22 test jobs pass (partitioned + non-partitioned)
  • Verify Codecov receives and merges all coverage uploads correctly
  • Verify job names display correctly: test (token 1/4) for partitioned, test (leaderboard) for non-partitioned
  • Compare wall-clock time vs recent main CI runs for EGS modules

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Dynamic, partition-aware CI test matrix generation for scalable parallel test runs.
    • Test jobs now include partition metadata in display names and support partitioned execution.
  • Chores

    • Adjusted CI validation to use matrix entry counts and updated codecov threshold to match (148 entries).
    • Toolchain dependency updated to a newer snforge/starknet-foundry version.
  • Documentation

    • Expanded CI guidance and matrix documentation to reflect the new 148-entry, partitioned workflow.

Use snforge --partition to split token (4 partitions), minigame,
metagame, and registry (2 partitions each) across multiple cheaper
runners. This eliminates ubuntu-latest-32 and ubuntu-latest-8 runners
for EGS while doubling fuzzer runs from 32 to 64.

Jobs: 16 → 22 (all on ubuntu-latest-4/8 instead of 32-core runners)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 8, 2026 19:23
@loothero loothero requested a review from starknetdev as a code owner March 8, 2026 19:23
@coderabbitai
Copy link

coderabbitai bot commented Mar 8, 2026

Warning

Rate limit exceeded

@loothero has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 20 minutes and 56 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1348d508-0139-463f-86a6-5f16ff05feb1

📥 Commits

Reviewing files that changed from the base of the PR and between e8ed76f and 33a266b.

📒 Files selected for processing (3)
  • .github/workflows/module-catalog.sh
  • AGENTS.md
  • codecov.yml
📝 Walkthrough

Walkthrough

Replaces static per-module CI matrices with a dynamic module-catalog-based matrix generator that emits per-entry JSON (including partition and fuzzer_runs). CI workflows now build the matrix in a setup job, pass it to test jobs, support partitioned test execution, and update codecov notification thresholds and docs to match the new matrix entry count.

Changes

Cohort / File(s) Summary
CI workflow orchestration
.github/workflows/main-ci.yml, .github/workflows/pr-ci.yml
Reworked CI to generate a dynamic test matrix in a setup job (build-matrix), expose test_matrix output, and consume it with matrix: ${{ fromJson(needs.setup.outputs.test_matrix) }}. Test job names now include partition notation; test runner logic updated to compute PARTITION_FLAG and TEST_FILTER for partitioned runs. Removed prior static matrix and workspace-compile verification step.
Module catalog
.github/workflows/module-catalog.sh
New shell module catalog script providing add() and grouped helpers (add_egs, add_metagame, add_economy, add_utilities, add_presets, add_all_modules) to build the JSON matrix entries (package, module, runner, fuzzer_runs, partition, total_partitions).
Documentation / CI metadata
AGENTS.md, codecov.yml
Docs and CI guidance updated to reflect the new matrix shape and entry count (148 entries across partitions). codecov.yml notify.after_n_builds bumped to 148 and annotated to note it must match matrix entry count including partitions. AGENTS.md updated with module-catalog workflow guidance and partition strategy.
Tooling / dependency pins
.tool-versions, Scarb.toml
Bumped snforge / starknet-foundry binding from v0.55.0 → v0.57.0 (tool/version pin updates in both files).
Small test change
packages/testing/src/constants.cairo
Trivial comment text adjustment: "Edge case values" → "Edge-case values".

Sequence Diagram(s)

mermaid
sequenceDiagram
actor Dev
rect rgba(200,200,255,0.5)
participant GitHubActions as "GitHub Actions"
end
rect rgba(200,255,200,0.5)
participant SetupJob as "setup job (build-matrix)"
participant ModuleCatalog as "module-catalog.sh"
end
rect rgba(255,220,200,0.5)
participant TestJob as "test job (matrix consumer)"
participant Codecov as "codecov notification"
end

Dev->>GitHubActions: push / PR triggers workflow
GitHubActions->>SetupJob: run setup job
SetupJob->>ModuleCatalog: source module-catalog.sh
ModuleCatalog--)SetupJob: JSON matrix (entries with partition info)
SetupJob->>GitHubActions: outputs.test_matrix (string)
GitHubActions->>TestJob: start test job with matrix from setup outputs
TestJob->>TestJob: compute PARTITION_FLAG and TEST_FILTER, run partitioned tests
TestJob->>Codecov: upload/report build
Codecov--)GitHubActions: notify when after_n_builds reached

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • starknetdev

Poem

🐰
I hopped through scripts and CI lanes,
Built a matrix from catalog veins,
Partitions split to share the load,
One hundred forty-eight hops on the road,
Sniffing green checks, I celebrate with grains!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: partitioning heavy EGS test modules for parallel execution across multiple CI runners.
Description check ✅ Passed The PR description covers key changes, scope, test plan, and objectives, but the validation checklist is incomplete with unchecked boxes and missing commands run documentation.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/ci-test-partitioning

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly refactors the Continuous Integration (CI) pipeline for Embeddable Game Standard (EGS) modules. By introducing parallel execution for computationally intensive modules like token, minigame, metagame, and registry, it aims to reduce overall CI wall-clock time and optimize resource utilization. The changes involve partitioning these modules across multiple, smaller runners, adjusting fuzzer run counts, and updating documentation and Codecov configuration to support the new parallel structure.

Highlights

  • CI Optimization: Implemented snforge --partition INDEX/TOTAL to distribute heavy Embeddable Game Standard (EGS) modules across multiple parallel runners, improving CI efficiency.
  • Runner Configuration: Reconfigured the token module to use 4 partitions on ubuntu-latest-8 runners instead of a single ubuntu-latest-32 runner.
  • Runner Configuration: Reconfigured minigame, metagame, and registry modules to use 2 partitions each on ubuntu-latest-4 runners, moving from single ubuntu-latest-32 runners.
  • Fuzzer Runs: Doubled EGS fuzzer runs from 32 to 64 for partitioned modules.
  • Job Count: Increased the total number of CI jobs from 16 to 22, utilizing cheaper runners and enhancing parallelism.
  • Code Coverage: Ensured Codecov correctly merges coverage uploads from partitioned jobs.
  • Configuration Update: Updated codecov.yml to reflect the new total of 22 builds for after_n_builds.
  • Documentation: Updated AGENTS.md to document the new CI matrix and partitioning strategy.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • AGENTS.md
    • Updated guidance for memory-intensive modules to include partitioning with --partition INDEX/TOTAL.
    • Revised the codecov.yml build count explanation to account for partitioned matrix entries.
    • Modified the "Current Matrix" table to reflect the new runner assignments, increased fuzzer runs, and added a "Partitions" column for token, minigame, metagame, and registry modules.
  • codecov.yml
    • Changed the after_n_builds value from 16 to 22.
    • Updated the accompanying comment to clarify that after_n_builds must equal the total matrix entry count, including partitioned modules.
Ignored Files
  • Ignored by pattern: .github/workflows/** (2)
    • .github/workflows/main-ci.yml
    • .github/workflows/pr-ci.yml
Activity
  • The author has outlined a test plan to verify the changes, including validating the validate-config step, ensuring all 22 test jobs pass, confirming Codecov merges correctly, checking job name display, and comparing wall-clock times.
  • The pull request is currently awaiting review and verification of the implemented changes.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates CI to run heavy Embeddable Game Standard (EGS) test modules in parallel partitions using snforge test --partition, aiming to improve throughput and reduce reliance on very large runners while keeping Codecov aggregation consistent with the expanded matrix.

Changes:

  • Partition EGS-heavy modules in both main-ci and pr-ci test matrices and update job naming to show partition indices.
  • Adjust Codecov aggregation expectations by updating after_n_builds and aligning validation messaging from “modules” → “matrix entries”.
  • Refresh CI matrix documentation in AGENTS.md to reflect partitioning and runner sizing guidance.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

File Description
codecov.yml Updates after_n_builds to match the new total matrix entry count (including partitions).
AGENTS.md Documents the new partitioned CI matrix and runner guidance for heavy modules.
.github/workflows/pr-ci.yml Generates a partition-aware matrix, updates job naming, and passes --partition to snforge test.
.github/workflows/main-ci.yml Expands the main test matrix with partition fields and applies --partition to test execution.

Comment on lines +168 to +173
- package: game_components_embeddable_game_standard
module: token
runner: ubuntu-latest-32
fuzzer_runs: 32
runner: ubuntu-latest-8
fuzzer_runs: 64
partition: 1
total_partitions: 4
Copy link

Copilot AI Mar 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description says it “eliminates all ubuntu-latest-32 and ubuntu-latest-8 EGS runners”, but the EGS token partitions here still run on ubuntu-latest-8. Update the PR description (or adjust the runner choice) so the documented CI changes match what’s actually implemented.

Copilot uses AI. Check for mistakes.
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively partitions heavy EGS test modules to improve CI parallelism and efficiency. The configuration changes in codecov.yml and the documentation updates in AGENTS.md are consistent with this goal. However, I've noted a significant reduction in fuzzer runs for the metagame and registry modules as a side effect of this partitioning, which could impact test thoroughness. My review includes a comment with a suggestion to address this.

AGENTS.md Outdated
Comment on lines +142 to +143
| `embeddable_game_standard` | `metagame` | `ubuntu-latest-4` | 64 | 2 |
| `embeddable_game_standard` | `registry` | `ubuntu-latest-4` | 64 | 2 |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The number of fuzzer runs for the metagame and registry modules has been reduced from 256 to 64 per partition. With 2 partitions each, the total number of fuzzer runs is now 128 (64 * 2), which is a 50% reduction from the previous configuration. This could decrease the effectiveness of fuzz testing for these modules. To restore the original level of fuzzing, consider increasing the runs per partition to 128.

Suggested change
| `embeddable_game_standard` | `metagame` | `ubuntu-latest-4` | 64 | 2 |
| `embeddable_game_standard` | `registry` | `ubuntu-latest-4` | 64 | 2 |
| `embeddable_game_standard` | `metagame` | `ubuntu-latest-4` | 128 | 2 |
| `embeddable_game_standard` | `registry` | `ubuntu-latest-4` | 128 | 2 |

loothero and others added 4 commits March 8, 2026 12:33
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Partition all 11 modules that took >60s into 2 partitions each
  (only distribution stays at 1 — it ran in 54s)
- Remove `scarb build --workspace` from setup job; snforge test
  already compiles and each test job checks for warnings
- Jobs: 22 → 33 (all on ubuntu-latest-4, except token on -8)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/main-ci.yml:
- Around line 161-182: Add an actionlint configuration file that defines the
custom self-hosted runner labels to silence unknown-label warnings: create an
actionlint.yaml file containing a self-hosted-runner block with labels listing
"ubuntu-latest-4" and "ubuntu-latest-8" so actionlint recognizes these runner
labels used in the workflow; ensure the file is committed to the repository root
where actionlint will pick it up.

In `@codecov.yml`:
- Around line 4-7: The codecov.yml entry after_n_builds: 33 is static and causes
PR CI validation failures when pr-ci.yml generates a smaller dynamic matrix
(matrix_count); update the setup by either (A) splitting configuration into two
codecov configs (one for main branch with after_n_builds: 33 and one for PRs
with the correct smaller or absent after_n_builds) or (B) replace the static
after_n_builds usage with Codecov conditional flags/projects so codecov_count is
computed per-run to match pr-ci.yml's dynamic matrix_count; modify codecov.yml
(after_n_builds) and the PR workflow validation logic so they align with
pr-ci.yml's NEED_* dynamic matrix behavior.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b80d5058-71eb-4ab5-8dce-2d18ca6d5201

📥 Commits

Reviewing files that changed from the base of the PR and between 21a52e1 and d609fbc.

📒 Files selected for processing (5)
  • .github/workflows/main-ci.yml
  • .github/workflows/pr-ci.yml
  • AGENTS.md
  • codecov.yml
  • packages/testing/src/constants.cairo

Comment on lines +161 to +182
runner: ubuntu-latest-8
fuzzer_runs: 64
partition: 1
total_partitions: 4
- package: game_components_embeddable_game_standard
module: minigame
module: token
runner: ubuntu-latest-8
fuzzer_runs: 32
fuzzer_runs: 64
partition: 2
total_partitions: 4
- package: game_components_embeddable_game_standard
module: metagame
module: token
runner: ubuntu-latest-8
fuzzer_runs: 32
fuzzer_runs: 64
partition: 3
total_partitions: 4
- package: game_components_embeddable_game_standard
module: registry
module: token
runner: ubuntu-latest-8
fuzzer_runs: 32
# Metagame
fuzzer_runs: 64
partition: 4
total_partitions: 4
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if actionlint config exists
if [ -f .github/actionlint.yaml ]; then
  echo "actionlint.yaml exists:"
  cat .github/actionlint.yaml
else
  echo "No actionlint.yaml found. Runner labels may need to be configured."
fi

# Check for any runner configuration
fd -t f 'actionlint' .github/

Repository: Provable-Games/game-components

Length of output: 140


🏁 Script executed:

# Search for all runner label references in CI workflows
rg "runner:" .github/workflows/ -A 1 -B 1 | head -100

# Check what runner labels are used throughout the CI
rg "ubuntu-latest" .github/workflows/

Repository: Provable-Games/game-components

Length of output: 9603


🌐 Web query:

GitHub Actions standard runner labels ubuntu-latest cores 2024 2025

💡 Result:

Standard GitHub-hosted runner labels (Ubuntu)

  • ubuntu-latest (x64), ubuntu-24.04 (x64), ubuntu-22.04 (x64)
  • ubuntu-24.04-arm, ubuntu-22.04-arm (arm64)
  • ubuntu-slim (x64, single-CPU container runner) (docs.github.com)

How many CPU cores does ubuntu-latest have?

GitHub’s “standard runners” have different specs for public vs private repos:

  • Public repositories: ubuntu-latest = 4 CPU cores, 16 GB RAM (docs.github.com)
  • Private repositories: ubuntu-latest = 2 CPU cores, 8 GB RAM (docs.github.com)

What did ubuntu-latest point to in 2024 vs 2025?

  • GitHub announced ubuntu-latest would migrate from Ubuntu 22.04 → 24.04 during Sep 23, 2024 to Oct 30, 2024. (github.blog)
  • The actions/runner-images announcement issue states the rollout schedule as Dec 5, 2024 → Jan 17, 2025, making Ubuntu 24.04 the default behind ubuntu-latest by completion. (github.com)

Related (not “standard”): larger runner core-count labels

If you meant the explicit core-size labels (larger runners), GitHub provides labels like:

  • ubuntu-latest-4-cores (and other sizes) (github.blog)

Citations:


Add actionlint.yaml configuration to suppress runner label warnings.

The repository uses custom runner labels (ubuntu-latest-8 and ubuntu-latest-4) that are not part of GitHub's standard runner set (which uses formats like ubuntu-latest, ubuntu-24.04, or ubuntu-latest-X-cores). Since no actionlint.yaml currently exists, linting tools will flag these as unknown labels. Add the following configuration to suppress these warnings:

# .github/actionlint.yaml
self-hosted-runner:
  labels:
    - ubuntu-latest-4
    - ubuntu-latest-8
🧰 Tools
🪛 actionlint (1.7.11)

[error] 161-161: label "ubuntu-latest-8" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2025-vs2026", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26-large", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xlarge", "macos-14-large", "macos-14", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)


[error] 167-167: label "ubuntu-latest-8" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2025-vs2026", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26-large", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xlarge", "macos-14-large", "macos-14", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)


[error] 173-173: label "ubuntu-latest-8" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2025-vs2026", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26-large", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xlarge", "macos-14-large", "macos-14", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)


[error] 179-179: label "ubuntu-latest-8" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "windows-2025-vs2026", "windows-2022", "windows-11-arm", "ubuntu-slim", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-24.04-arm", "ubuntu-22.04", "ubuntu-22.04-arm", "macos-latest", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26-large", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xlarge", "macos-14-large", "macos-14", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file

(runner-label)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/main-ci.yml around lines 161 - 182, Add an actionlint
configuration file that defines the custom self-hosted runner labels to silence
unknown-label warnings: create an actionlint.yaml file containing a
self-hosted-runner block with labels listing "ubuntu-latest-4" and
"ubuntu-latest-8" so actionlint recognizes these runner labels used in the
workflow; ensure the file is committed to the repository root where actionlint
will pick it up.

loothero and others added 4 commits March 8, 2026 13:04
Replace all non-standard runners (4-core, 8-core) with ubuntu-latest
(standard 2-core) by scaling partition counts proportionally:
- 4-core modules → 4× partitions (e.g., 2→8)
- 8-core EGS modules → 8× partitions (e.g., 4→32 for token)

Extract shared module catalog into module-catalog.sh sourced by both
main-ci.yml and pr-ci.yml. Update snforge to v0.57.0 for --partition
support. Total: 148 jobs across 16 modules, all on standard runners.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
GitHub Actions runs bash with set -eo pipefail. The pattern
`[ cond ] && fn` exits 1 when the condition is false, killing
the step. Use if/then/fi instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The snforge CLI was updated to 0.57.0 in .tool-versions but the
snforge_std library dependency in Scarb.toml was still pinned to
v0.55.0, causing a version mismatch warning.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Scale partition counts to match original runner sizes:
- 32-core/8-core modules (EGS) → 8 partitions
- 4-core modules (all others) → 4 partitions

Total: 80 jobs across 16 modules, all on standard runners.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

♻️ Duplicate comments (1)
codecov.yml (1)

4-7: ⚠️ Potential issue | 🟠 Major

after_n_builds: 148 is still incompatible with PR CI’s dynamic upload count.

pr-ci.yml only uploads coverage for the package groups selected by NEED_*, so a utilities-only or presets-only PR will produce far fewer uploads than 148. With one shared Codecov config, PR notifications/status can end up waiting on builds that were never scheduled.

How does Codecov's `notify.after_n_builds` behave when a workflow uploads fewer reports than the configured count, and is a separate PR-vs-main configuration recommended for dynamic GitHub Actions matrices?
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@codecov.yml` around lines 4 - 7, The Codecov notify threshold after_n_builds
is set to a fixed 148 which is incompatible with pr-ci.yml's dynamic upload
count controlled by NEED_* (some PRs upload far fewer reports), so change the
configuration to avoid waiting for nonexistent uploads: either remove or set
after_n_builds to 0 (disable waiting) and rely on default behavior, or split
configs so main CI uses after_n_builds=148 while PR runs use a PR-specific
config with notify disabled; update codecov.yml (after_n_builds) and the PR
workflow invocation (pr-ci.yml / NEED_* usage) accordingly so PR runs no longer
block waiting for 148 uploads.
🧹 Nitpick comments (1)
.github/workflows/module-catalog.sh (1)

15-20: Drop runner from the catalog or wire it back into runs-on.

Both workflows now hardcode runs-on: ubuntu-latest, so the runner property emitted here is dead config. That makes future per-module runner changes easy to “update” in the catalog without any effect.

♻️ One way to keep the catalog honest
-    '. + [range($total) | {package:$p, module:$m, runner:"ubuntu-latest", fuzzer_runs:$f, partition:(. + 1), total_partitions:$total}]')
+    '. + [range($total) | {package:$p, module:$m, fuzzer_runs:$f, partition:(. + 1), total_partitions:$total}]')
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/module-catalog.sh around lines 15 - 20, The add() function
is emitting a dead runner field into INCLUDES (the jq expression in add() adds
runner:"ubuntu-latest"), which is unused because workflows hardcode runs-on;
remove the runner property from the jq object so the catalog no longer contains
stale runner data (or alternatively, if you prefer to preserve per-module
runners, wire the emitted runner value into the workflows' runs-on field
instead); update the jq expression inside add() (the '. + [range($total) |
{package:$p, module:$m, fuzzer_runs:$f, partition:(. + 1),
total_partitions:$total}]' part) and ensure any consumers that expected runner
are adjusted accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/main-ci.yml:
- Around line 225-237: The test step currently pipes "snforge test ... | tee
/tmp/test.log" so the workflow can return tee's exit code; fix this by enabling
pipefail before the pipeline (add "set -o pipefail" or equivalent at the top of
the same shell block that runs the PARTITION_FLAG/TEST_FILTER variable setup and
the "snforge test ... | tee /tmp/test.log" command) so that the step fails when
"snforge test" fails.

In @.github/workflows/module-catalog.sh:
- Around line 22-65: The matrix is over-sharding modules causing 148 jobs;
update the partition counts in add_egs, add_metagame, add_economy,
add_utilities, and add_presets so they produce the intended ~22 jobs (e.g.,
remove aggressive sharding by setting the partition/count fields to 1 for most
modules and only keep larger splits where explicitly intended), adjusting the
numeric pairs passed to add (the total_partitions/partition_count arguments) to
match the documented rollout and then verify add_all_modules expands to ~22
entries.

In @.github/workflows/pr-ci.yml:
- Around line 411-423: The CI step "Run tests with coverage" currently pipes the
snforge test invocation to tee which masks the test exit status; enable shell
pipefail for that run block so the pipeline returns snforge's exit code (e.g.,
add set -o pipefail or set -euo pipefail at the start of the run script) or
alternatively capture the exit of the snforge test command and explicitly exit
with it after tee (use PIPESTATUS[0] to propagate snforge's exit status) so the
step fails when snforge test fails; apply this change around the snforge test
invocation that writes to /tmp/test.log.

---

Duplicate comments:
In `@codecov.yml`:
- Around line 4-7: The Codecov notify threshold after_n_builds is set to a fixed
148 which is incompatible with pr-ci.yml's dynamic upload count controlled by
NEED_* (some PRs upload far fewer reports), so change the configuration to avoid
waiting for nonexistent uploads: either remove or set after_n_builds to 0
(disable waiting) and rely on default behavior, or split configs so main CI uses
after_n_builds=148 while PR runs use a PR-specific config with notify disabled;
update codecov.yml (after_n_builds) and the PR workflow invocation (pr-ci.yml /
NEED_* usage) accordingly so PR runs no longer block waiting for 148 uploads.

---

Nitpick comments:
In @.github/workflows/module-catalog.sh:
- Around line 15-20: The add() function is emitting a dead runner field into
INCLUDES (the jq expression in add() adds runner:"ubuntu-latest"), which is
unused because workflows hardcode runs-on; remove the runner property from the
jq object so the catalog no longer contains stale runner data (or alternatively,
if you prefer to preserve per-module runners, wire the emitted runner value into
the workflows' runs-on field instead); update the jq expression inside add()
(the '. + [range($total) | {package:$p, module:$m, fuzzer_runs:$f, partition:(.
+ 1), total_partitions:$total}]' part) and ensure any consumers that expected
runner are adjusted accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7e246f62-697d-43cc-8f53-4789d6c6b9b3

📥 Commits

Reviewing files that changed from the base of the PR and between d609fbc and e8ed76f.

📒 Files selected for processing (7)
  • .github/workflows/main-ci.yml
  • .github/workflows/module-catalog.sh
  • .github/workflows/pr-ci.yml
  • .tool-versions
  • AGENTS.md
  • Scarb.toml
  • codecov.yml

Comment on lines 225 to +237
- name: Run tests with coverage
run: |
if [ "${{ matrix.package }}" = "game_components_${{ matrix.module }}" ]; then
snforge test -p ${{ matrix.package }} --fuzzer-runs ${{ matrix.fuzzer_runs }} --coverage 2>&1 | tee /tmp/test.log
else
snforge test -p ${{ matrix.package }} "::${{ matrix.module }}::" --fuzzer-runs ${{ matrix.fuzzer_runs }} --coverage 2>&1 | tee /tmp/test.log
PARTITION_FLAG=""
if [ "${{ matrix.total_partitions }}" != "1" ]; then
PARTITION_FLAG="--partition ${{ matrix.partition }}/${{ matrix.total_partitions }}"
fi

TEST_FILTER=""
if [ "${{ matrix.package }}" != "game_components_${{ matrix.module }}" ]; then
TEST_FILTER="::${{ matrix.module }}::"
fi

snforge test -p ${{ matrix.package }} $TEST_FILTER --fuzzer-runs ${{ matrix.fuzzer_runs }} $PARTITION_FLAG --coverage 2>&1 | tee /tmp/test.log
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

This test step can also pass on failing snforge runs.

Line 237 pipes the test command into tee, so without set -o pipefail the workflow reports tee’s exit code instead of snforge test’s.

🛠️ Minimal fix
       - name: Run tests with coverage
         run: |
+          set -o pipefail
           PARTITION_FLAG=""
           if [ "${{ matrix.total_partitions }}" != "1" ]; then
             PARTITION_FLAG="--partition ${{ matrix.partition }}/${{ matrix.total_partitions }}"
           fi
🧰 Tools
🪛 actionlint (1.7.11)

[error] 226-226: shellcheck reported issue in this script: SC2086:info:11:92: Double quote to prevent globbing and word splitting

(shellcheck)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/main-ci.yml around lines 225 - 237, The test step
currently pipes "snforge test ... | tee /tmp/test.log" so the workflow can
return tee's exit code; fix this by enabling pipefail before the pipeline (add
"set -o pipefail" or equivalent at the top of the same shell block that runs the
PARTITION_FLAG/TEST_FILTER variable setup and the "snforge test ... | tee
/tmp/test.log" command) so that the step fails when "snforge test" fails.

Comment on lines 411 to +423
- name: Run tests with coverage
run: |
if [ "${{ matrix.package }}" = "game_components_${{ matrix.module }}" ]; then
snforge test -p ${{ matrix.package }} --fuzzer-runs ${{ matrix.fuzzer_runs }} --coverage 2>&1 | tee /tmp/test.log
else
snforge test -p ${{ matrix.package }} "::${{ matrix.module }}::" --fuzzer-runs ${{ matrix.fuzzer_runs }} --coverage 2>&1 | tee /tmp/test.log
PARTITION_FLAG=""
if [ "${{ matrix.total_partitions }}" != "1" ]; then
PARTITION_FLAG="--partition ${{ matrix.partition }}/${{ matrix.total_partitions }}"
fi

TEST_FILTER=""
if [ "${{ matrix.package }}" != "game_components_${{ matrix.module }}" ]; then
TEST_FILTER="::${{ matrix.module }}::"
fi

snforge test -p ${{ matrix.package }} $TEST_FILTER --fuzzer-runs ${{ matrix.fuzzer_runs }} $PARTITION_FLAG --coverage 2>&1 | tee /tmp/test.log
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Test failures can be hidden by the tee pipeline.

Line 423 returns tee’s status unless pipefail is enabled, so a failing snforge test partition can still leave the step green.

🛠️ Minimal fix
       - name: Run tests with coverage
         run: |
+          set -o pipefail
           PARTITION_FLAG=""
           if [ "${{ matrix.total_partitions }}" != "1" ]; then
             PARTITION_FLAG="--partition ${{ matrix.partition }}/${{ matrix.total_partitions }}"
           fi
🧰 Tools
🪛 actionlint (1.7.11)

[error] 412-412: shellcheck reported issue in this script: SC2086:info:11:92: Double quote to prevent globbing and word splitting

(shellcheck)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/pr-ci.yml around lines 411 - 423, The CI step "Run tests
with coverage" currently pipes the snforge test invocation to tee which masks
the test exit status; enable shell pipefail for that run block so the pipeline
returns snforge's exit code (e.g., add set -o pipefail or set -euo pipefail at
the start of the run script) or alternatively capture the exit of the snforge
test command and explicitly exit with it after tee (use PIPESTATUS[0] to
propagate snforge's exit status) so the step fails when snforge test fails;
apply this change around the snforge test invocation that writes to
/tmp/test.log.

@loothero loothero closed this Mar 8, 2026
@loothero loothero deleted the feat/ci-test-partitioning branch March 8, 2026 20:49
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.

2 participants