Skip to content

Conversation

@Malmahrouqi3
Copy link
Contributor

@Malmahrouqi3 Malmahrouqi3 commented Dec 15, 2025

User description

User description

User description

Description

It has not yet been viable to do so with containers, so I resorted to occupying the CI frontier run to do the job which is easy to debug and monitor without much of manual handling. I recycled the same steps to revive old release herein which should hopefully workflow. (v4.8.0-v.5.1.3) for gpu-acc, and (v5.1.0-v5.1.3) for gpu-mp.


PR Type

Enhancement, Other


Description

  • Refactored benchmark workflow to support arbitrary Frontier releases

  • Removed Phoenix cluster testing and multiple CI workflows

  • Added release dispatcher workflow for batch benchmarking

  • Simplified benchmark script to focus on Frontier GPU acceleration


Diagram Walkthrough

flowchart LR
  A["Removed Workflows<br/>Phoenix, Docker, Docs<br/>Tests, Coverage, etc."] --> B["Simplified bench.yml<br/>Frontier GPU only<br/>Manual tag input"]
  C["New release.yml<br/>Release Dispatcher<br/>Batch tag processing"] --> B
  B --> D["Benchmark Results<br/>Frontier GPU Acc/MP"]
Loading

File Walkthrough

Relevant files
Configuration changes
1 files
bench.yml
Refactored benchmark workflow for Frontier releases           
+86/-72 
Enhancement
1 files
release.yml
New release dispatcher workflow for batch benchmarks         
+91/-0   
Miscellaneous
17 files
bench.sh
Removed Phoenix-specific benchmark script                               
+0/-35   
submit-bench.sh
Removed Phoenix benchmark submission script                           
+0/-64   
submit.sh
Removed Phoenix job submission script                                       
+0/-64   
test.sh
Removed Phoenix test execution script                                       
+0/-25   
cleanliness.yml
Removed code cleanliness check workflow                                   
+0/-127 
coverage.yml
Removed coverage check workflow                                                   
+0/-50   
deploy-tap.yml
Removed Homebrew tap deployment workflow                                 
+0/-120 
docker.yml
Removed containerization workflow                                               
+0/-132 
docs.yml
Removed documentation build workflow                                         
+0/-84   
formatting.yml
Removed code formatting check workflow                                     
+0/-19   
homebrew.yml
Removed Homebrew formula test workflow                                     
+0/-259 
line-count.yml
Removed line count analysis workflow                                         
+0/-54   
lint-source.yml
Removed source linting workflow                                                   
+0/-53   
lint-toolchain.yml
Removed toolchain linting workflow                                             
+0/-22   
pmd.yml
Removed PMD code duplication detection workflow                   
+0/-131 
spelling.yml
Removed spell check workflow                                                         
+0/-17   
test.yml
Removed comprehensive test suite workflow                               
+0/-162 


CodeAnt-AI Description

Benchmark Frontier releases from CI and dispatch across tag ranges

What Changed

  • Added a workflow to run benchmarks for a specified release tag (bench.yml now takes a tag and runs Frontier GPU benchmarks comparing that tag against the PR workspace)
  • Reworked benchmark job steps to build the master code from the provided tag, prepare a Docker/build context, and run parallel Frontier benchmarks; artifacts and logs are archived per-tag
  • Removed many legacy CI workflows and Phoenix helper scripts; added a release dispatcher workflow that triggers bench.yml for every tag in a given range and waits for each run to complete

Impact

✅ Can benchmark a specific release tag on Frontier from the Actions UI
✅ Run benchmarks across a range of release tags automatically
✅ Archive Frontier benchmark logs per tag

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Summary by CodeRabbit

  • Chores

    • Removed a large set of CI workflows and auxiliary automation: benchmarking, testing, coverage, docs publishing, formatting, linting, spelling, containerization, Homebrew packaging, line-count/PMD checks, and job-submission/benchmark scripts.
  • New Features

    • Added a new benchmarking workflow targeting the Frontier cluster for Frontier-specific benchmark runs.

✏️ Tip: You can customize this high-level summary in your review settings.


PR Type

Enhancement, Other


Description

  • Removed multiple CI workflows (test, coverage, docs, formatting, etc.)

  • Created new bench-frontier.yml for benchmarking arbitrary Frontier releases

  • Deleted old Phoenix-specific benchmark scripts and submission utilities

  • Simplified benchmark infrastructure to focus on Frontier GPU acceleration


Diagram Walkthrough

flowchart LR
  A["Old Workflows<br/>test.yml, bench.yml<br/>coverage.yml, docs.yml<br/>etc."] -->|Removed| B["Simplified CI"]
  C["Phoenix Scripts<br/>bench.sh, submit.sh<br/>test.sh"] -->|Deleted| B
  D["New bench-frontier.yml<br/>Arbitrary tag support<br/>Frontier GPU only"] -->|Added| B
  B --> E["Frontier Release<br/>Benchmarking"]
Loading

File Walkthrough

Relevant files
Enhancement
1 files
bench-frontier.yml
New Frontier release benchmarking workflow                             
+144/-0 
Miscellaneous
18 files
bench.yml
Removed old benchmark workflow                                                     
+0/-124 
test.yml
Removed test suite workflow                                                           
+0/-162 
cleanliness.yml
Removed code cleanliness check workflow                                   
+0/-127 
coverage.yml
Removed coverage check workflow                                                   
+0/-50   
deploy-tap.yml
Removed Homebrew tap deployment workflow                                 
+0/-120 
docker.yml
Removed Docker containerization workflow                                 
+0/-132 
docs.yml
Removed documentation build workflow                                         
+0/-84   
formatting.yml
Removed code formatting check workflow                                     
+0/-19   
homebrew.yml
Removed Homebrew formula test workflow                                     
+0/-259 
line-count.yml
Removed lines of code counting workflow                                   
+0/-54   
lint-source.yml
Removed source code linting workflow                                         
+0/-53   
lint-toolchain.yml
Removed toolchain linting workflow                                             
+0/-22   
pmd.yml
Removed PMD code duplication detection workflow                   
+0/-131 
spelling.yml
Removed spell check workflow                                                         
+0/-17   
bench.sh
Removed Phoenix GPU benchmark script                                         
+0/-35   
submit-bench.sh
Removed Phoenix benchmark submission script                           
+0/-64   
submit.sh
Removed Phoenix job submission script                                       
+0/-64   
test.sh
Removed Phoenix test execution script                                       
+0/-25   

Copilot AI review requested due to automatic review settings December 15, 2025 17:45
@codeant-ai
Copy link
Contributor

codeant-ai bot commented Dec 15, 2025

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 15, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

Removes most GitHub Actions workflows and Phoenix SLURM helper scripts, and adds a Frontier-only benchmark workflow triggered by tag/dispatch. No source-level public or exported API declarations were changed. (28 words)

Changes

Cohort / File(s) Summary
Removed General CI & Test Workflows
/.github/workflows/test.yml, /.github/workflows/coverage.yml, /.github/workflows/line-count.yml
Deleted matrixed build/test workflows, Codecov coverage job, and line-diff counting workflow.
Removed Linting / Static Checks
/.github/workflows/lint-source.yml, /.github/workflows/lint-toolchain.yml, /.github/workflows/pmd.yml
Removed grep/PMD-based source lints and toolchain lint job.
Removed Docs / Formatting / Spelling
/.github/workflows/docs.yml, /.github/workflows/formatting.yml, /.github/workflows/spelling.yml
Deleted Doxygen docs build/publish, formatting check, and spelling workflow.
Removed Container / Homebrew / Deploy
/.github/workflows/docker.yml, /.github/workflows/deploy-tap.yml, /.github/workflows/homebrew.yml
Removed multi-arch container build/manifests, Homebrew tap deploy, and Homebrew formula test workflows.
Removed Benchmark Orchestration & Cleanliness
/.github/workflows/bench.yml, /.github/workflows/cleanliness.yml
Deleted broad benchmark orchestration and cleanliness/warnings-comparison workflow.
Removed Phoenix scripts
/.github/workflows/phoenix/*
/.github/workflows/phoenix/bench.sh, /.github/workflows/phoenix/submit.sh, /.github/workflows/phoenix/submit-bench.sh, /.github/workflows/phoenix/test.sh
Deleted SLURM submission, benchmark runner, and Phoenix GPU/test helper scripts.
Added Frontier-specific Benchmark Workflow
/.github/workflows/bench-frontier.yml
New tag-dispatch Frontier benchmark workflow: clones PR and master@tag, prepares build context, runs master build and benchmarks on self-hosted Frontier runners, prints and archives logs.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant User as Trigger (manual/tag)
  participant GH as GitHub Actions (Frontier runner)
  participant PR as PR repo (checkout)
  participant Master as Master repo (checkout@tag)
  participant Build as Build script (mfc.sh)
  participant Bench as Benchmark runner
  participant Art as Artifact storage

  Note over User,GH: workflow_dispatch with tag input
  User->>GH: dispatch(tag)
  GH->>PR: checkout PR repo (path=pr)
  GH->>Master: checkout master@tag (path=master)
  GH->>Master: prepare build context / copy sources
  GH->>Build: run master build (mfc.sh)
  Build-->>GH: build logs/artifacts
  GH->>Bench: run benchmarks (master build on Frontier)
  Bench-->>GH: benchmark logs/results
  GH->>Art: upload archived logs/artifacts
  Art-->>User: artifacts available
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Pay attention to:
    • /.github/workflows/bench-frontier.yml — checkout order, handling of master@tag, workspace copying, parallel build/benchmark commands, artifact naming/paths, runner labels and timeouts.
    • Removed Phoenix scripts and any remaining references in docs or tooling.

Possibly related PRs

Suggested reviewers

  • sbryngelson
  • wilfonba

Poem

🐇 I hopped through CI with nimble feet,

pruned old workflows tidy and neat,
Phoenix scripts tucked under a stone,
Frontier now hums on its tagged throne,
Logs bundled up — I munch a fresh beet.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is largely incomplete relative to the template. It lacks structured sections like 'Type of change', 'Scope', 'How Has This Been Tested', and most checklist items, despite being a substantial infrastructure change affecting multiple workflows. Complete the PR description by filling in the template sections, particularly 'Type of change' (with checkboxes), 'Scope', testing details, and relevant checklist items to meet repository standards.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title '[Experimental PR] Benchmark any Frontier Release on the CI' clearly summarizes the main change—adding capability to benchmark arbitrary Frontier releases from CI—and is specific enough to understand the primary objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9626e6c and fa29525.

📒 Files selected for processing (1)
  • .github/workflows/bench-frontier.yml (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-11-24T21:50:46.909Z
Learnt from: CR
Repo: MFlowCode/MFC PR: 0
File: .cursor/rules/mfc-agent-rules.mdc:0-0
Timestamp: 2025-11-24T21:50:46.909Z
Learning: Draft a step-by-step plan before making changes; build after each step using `./mfc.sh build -t pre_process simulation -j $(nproc)`

Applied to files:

  • .github/workflows/bench-frontier.yml
🪛 actionlint (1.7.9)
.github/workflows/bench-frontier.yml

28-28: label "frontier" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "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-xl", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "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)


36-36: label "frontier" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "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-xl", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "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)


63-63: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Oak Ridge | Frontier (CCE) (gpu-omp)
  • GitHub Check: Oak Ridge | Frontier (CCE) (gpu-acc)

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.

@qodo-code-review
Copy link
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 4 🔵🔵🔵🔵⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Possible Issue

The workflow has duplicate/overlapping checkout steps and inconsistent paths: one actions/checkout@v4 step appears to intend path: pr but the YAML indentation suggests it may not be applied; later another actions/checkout@v3 checks out again into pr. This can lead to unexpected workspace state (e.g., pr missing, overwritten, or using different action versions) and makes subsequent cp commands brittle.

- name: Clone - PR
  uses: actions/checkout@v4
  with:
    path: pr          

- name: Clone - Master
  uses: actions/checkout@v4
  with:
    repository: MFlowCode/MFC
    ref: ${{ github.event.inputs.tag }}
    path: master

- name: Checkout PR repo
  uses: actions/checkout@v3
  with:
    path: pr
Possible Issue

The “Prepare Docker context” step copies from mfc/* into master/, but the only clones shown are into pr/ and master/. If mfc/ is not created in this job, these copy operations will fail and the build context will be wrong. Also, rewriting master/toolchain/dependencies/CMakeLists.txt via sed and injecting a full SILO block is fragile and can silently produce invalid CMake if patterns drift.

- name: Prepare Docker context
  run: |
    sudo fallocate -l 8G /swapfile
    sudo chmod 600 /swapfile
    sudo mkswap /swapfile
    sudo swapon /swapfile
    sudo mkdir -p /home/runner/tmp
    export TMPDIR=/home/runner/tmp
    free -h

    sudo mkdir -p master
    sudo chmod 777 master
    rm -rf master/*
    cp -r mfc/* master/
    cp -r mfc/.git master/.git
    cp pr/.github/Dockerfile master/
    cp pr/.github/.dockerignore master/
    cp pr/toolchain/dependencies/Silo.patch master/toolchain/dependencies/Silo.patch
    cp pr/.github/scripts/run_parallel_benchmarks.sh master/.github/scripts/run_parallel_benchmarks.sh

- name: Replace old SILO block in CMakeLists.txt
  run: |
    if [ -f master/toolchain/pyproject.toml ]; then
        sed -i 's/"cantera",/"cantera==3.0.1",/g' master/toolchain/pyproject.toml
    fi

    sed -i '/# SILO/,/^endif()/{
        r /dev/stdin
        d
    }' master/toolchain/dependencies/CMakeLists.txt <<'EOF'
    # SILO
    if (MFC_SILO)
        find_package(SILO)
        if (SILO_FOUND)
            message(STATUS "SILO found.")
            add_custom_target(silo)
        else()
            find_package(Git REQUIRED)

            ExternalProject_Add(silo
                GIT_REPOSITORY "https://github.com/LLNL/Silo"
                GIT_TAG        9af504ef4fb79153e1fbf3bdb75421b6b65f6dc4
                GIT_PROGRESS   ON
                PATCH_COMMAND  "${GIT_EXECUTABLE}" stash
                            && "${GIT_EXECUTABLE}" apply "${CMAKE_SOURCE_DIR}/Silo.patch"
                CMAKE_ARGS     -DSILO_ENABLE_SHARED=OFF
                              -DSILO_ENABLE_SILOCK=OFF
                              -DSILO_ENABLE_BROWSER=OFF
                              -DFIND_LIBRARY_USE_LIB64_PATHS=ON
                              "-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}"
                              "-DCMAKE_FIND_ROOT_PATH=${CMAKE_FIND_ROOT_PATH}"
                              "-DCMAKE_FIND_PACKAGE_REDIRECTS_DIR=${CMAKE_FIND_PACKAGE_REDIRECTS_DIR}"
                              "-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}"
                              "$<$<STREQUAL:${CMAKE_Fortran_COMPILER_ID},Cray>:-DCMAKE_MODULE_PATH=${CMAKE_SOURCE_DIR}/../cmake/cce>"
            )
          endif()
    endif()
    EOF
    docker buildx create --name mfcbuilder --driver docker-container --use
CI Flooding

The dispatcher runs on both push and pull_request to main and then can fan out into multiple bench.yml dispatches, waiting for each run to complete. This risks overwhelming CI/Frontier runners, and the run-selection logic (picking the most recent queued/in_progress run) can associate the wrong run ID when multiple dispatches happen close together or other users dispatch bench.yml concurrently.

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]
  workflow_dispatch:
    inputs:
      from_tag:
        description: 'Start tag (e.g. v4.3.0)'
        required: false
        default: 'v5.1.3'
      to_tag:
        description: 'End tag (e.g. v5.1.3)'
        required: false
        default: 'v5.1.3'
env:
  FROM_TAG: ${{ github.event.inputs.from_tag || 'v5.1.3' }}
  TO_TAG: ${{ github.event.inputs.to_tag || 'v5.1.3' }}

jobs:
  dispatch:
    runs-on: ubuntu-latest
    steps:
      - name: Get tags in range
        id: tags
        run: |
          git clone --quiet https://github.com/MFlowCode/MFC.git mfc
          cd mfc
          git fetch --tags
          TAGS=$(git tag --sort=creatordate)
          TAGS_IN_RANGE=$(awk "/^${{ env.FROM_TAG }}$/,/^${{ env.TO_TAG }}$/" <<< "$TAGS" | grep -v '^$')
          echo "tags=$(echo $TAGS_IN_RANGE | tr '\n' ' ')" >> $GITHUB_OUTPUT

      - name: Dispatch bench.yml for each tag
        uses: actions/github-script@v7
        with:
          script: |
            const tags = '${{ steps.tags.outputs.tags }}'.split(' ').filter(Boolean);
            for (const tag of tags) {
              await github.rest.actions.createWorkflowDispatch({
                owner: context.repo.owner,
                repo: context.repo.repo,
                workflow_id: 'bench.yml',
                ref: context.ref.replace('refs/heads/', ''),
                inputs: { tag }
              });

              let runId = null;
              for (let i = 0; i < 60; i++) { // Try for up to 300 seconds
                const runs = await github.rest.actions.listWorkflowRuns({
                  owner: context.repo.owner,
                  repo: context.repo.repo,
                  workflow_id: 'bench.yml',
                  event: 'workflow_dispatch',
                  per_page: 5
                });
                // Find the most recent queued or in_progress run
                const found = runs.data.workflow_runs.find(run =>
                  ['queued', 'in_progress'].includes(run.status)
                );
                if (found) {
                  runId = found.id;
                  break;
                }
                await new Promise(resolve => setTimeout(resolve, 5000));
              }
              if (!runId) {
                core.setFailed(`Could not find workflow run for tag ${tag}`);
                return;
              }

              let completed = false;
              while (!completed) {
                const run = await github.rest.actions.getWorkflowRun({
                  owner: context.repo.owner,
                  repo: context.repo.repo,
                  run_id: runId
                });
                if (run.data.status === 'completed') {
                  if (run.data.conclusion !== 'success') {
                    core.setFailed(`Workflow for tag ${tag} failed with conclusion: ${run.data.conclusion}`);
                    return;
                  }
                  completed = true;
                } else {
                  await new Promise(resolve => setTimeout(resolve, 15000));
                }
              }

@codeant-ai codeant-ai bot added the size:L This PR changes 100-499 lines, ignoring generated files label Dec 15, 2025
@codeant-ai
Copy link
Contributor

codeant-ai bot commented Dec 15, 2025

CodeAnt AI finished reviewing your PR.

@codeant-ai
Copy link
Contributor

codeant-ai bot commented Dec 15, 2025

💡 Enhance Your PR Reviews

We noticed that 3 feature(s) are not configured for this repository. Enabling these features can help improve your code quality and workflow:

🚦 Quality Gates

Status: Quality Gates are not enabled at the organization level
Learn more about Quality Gates

🎫 Jira Ticket Compliance

Status: Jira credentials file not found. Please configure Jira integration in your settings
Learn more about Jira Integration

⚙️ Custom Rules

Status: No custom rules configured. Add rules via organization settings or .codeant/review.json in your repository
Learn more about Custom Rules


Want to enable these features? Contact your organization admin or check our documentation for setup instructions.

Copy link
Contributor

Choose a reason for hiding this comment

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

High-level Suggestion

The PR's removal of most CI workflows to support historical benchmarking is a major issue. The new method uses fragile sed and cp commands; a better approach is using containerization for reproducible builds without sacrificing CI quality. [High-level, importance: 10]

Solution Walkthrough:

Before:

# .github/workflows/bench.yml
on:
  workflow_dispatch:
    inputs:
      tag: required

jobs:
  benchmark:
    steps:
      - checkout PR code to 'pr/'
      - checkout code for specified 'tag' to 'master/'

      # Manually patch the old code in 'master/'
      - run: |
          cp pr/some_new_script.sh master/
          cp pr/some_new_config.patch master/
          sed -i 's/old_thing/new_thing/' master/some_config_file
          sed -i '/# START_BLOCK/,/# END_BLOCK/{...}' master/CMakeLists.txt

      - name: Build & Bench
        run: (cd master && ./build.sh)

After:

# .github/workflows/bench.yml
# (Keep existing CI for PRs, e.g., test.yml, lint.yml)

# For historical benchmarking:
on:
  workflow_dispatch:
    inputs:
      tag: required

jobs:
  benchmark:
    steps:
      - name: Build and push container for the specific tag
        uses: docker/build-push-action@v6
        with:
          context: .
          # Dockerfile would handle version-specific dependencies
          file: ./.github/dockerfiles/Dockerfile.${{ inputs.tag }}
          push: true
          tags: my-repo/mfc:${{ inputs.tag }}

      - name: Run benchmark using the container
        run: docker run my-repo/mfc:${{ inputs.tag }} ./run_benchmark.sh

Comment on lines 41 to 56
- name: Clone - PR
uses: actions/checkout@v4
with:
path: pr
path: pr

- name: Clone - Master
uses: actions/checkout@v4
with:
repository: MFlowCode/MFC
ref: master
ref: ${{ github.event.inputs.tag }}
path: master

- name: Checkout PR repo
uses: actions/checkout@v3
with:
path: pr
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: Remove the redundant actions/checkout@v3 step for the pr directory in the bench.yml workflow, as it is already checked out by a preceding actions/checkout@v4 step. [general, importance: 6]

Suggested change
- name: Clone - PR
uses: actions/checkout@v4
with:
path: pr
path: pr
- name: Clone - Master
uses: actions/checkout@v4
with:
repository: MFlowCode/MFC
ref: master
ref: ${{ github.event.inputs.tag }}
path: master
- name: Checkout PR repo
uses: actions/checkout@v3
with:
path: pr
- name: Clone - PR
uses: actions/checkout@v4
with:
path: pr
- name: Clone - Master
uses: actions/checkout@v4
with:
repository: MFlowCode/MFC
ref: ${{ github.event.inputs.tag }}
path: master

Comment on lines 36 to 91
- name: Dispatch bench.yml for each tag
uses: actions/github-script@v7
with:
script: |
const tags = '${{ steps.tags.outputs.tags }}'.split(' ').filter(Boolean);
for (const tag of tags) {
await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'bench.yml',
ref: context.ref.replace('refs/heads/', ''),
inputs: { tag }
});

let runId = null;
for (let i = 0; i < 60; i++) { // Try for up to 300 seconds
const runs = await github.rest.actions.listWorkflowRuns({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'bench.yml',
event: 'workflow_dispatch',
per_page: 5
});
// Find the most recent queued or in_progress run
const found = runs.data.workflow_runs.find(run =>
['queued', 'in_progress'].includes(run.status)
);
if (found) {
runId = found.id;
break;
}
await new Promise(resolve => setTimeout(resolve, 5000));
}
if (!runId) {
core.setFailed(`Could not find workflow run for tag ${tag}`);
return;
}

let completed = false;
while (!completed) {
const run = await github.rest.actions.getWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: runId
});
if (run.data.status === 'completed') {
if (run.data.conclusion !== 'success') {
core.setFailed(`Workflow for tag ${tag} failed with conclusion: ${run.data.conclusion}`);
return;
}
completed = true;
} else {
await new Promise(resolve => setTimeout(resolve, 15000));
}
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: To prevent a race condition in the release.yml workflow, filter the dispatched workflow runs by actor: context.actor. This ensures the script monitors the correct run, even if multiple workflows are triggered simultaneously. [possible issue, importance: 8]

Suggested change
- name: Dispatch bench.yml for each tag
uses: actions/github-script@v7
with:
script: |
const tags = '${{ steps.tags.outputs.tags }}'.split(' ').filter(Boolean);
for (const tag of tags) {
await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'bench.yml',
ref: context.ref.replace('refs/heads/', ''),
inputs: { tag }
});
let runId = null;
for (let i = 0; i < 60; i++) { // Try for up to 300 seconds
const runs = await github.rest.actions.listWorkflowRuns({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'bench.yml',
event: 'workflow_dispatch',
per_page: 5
});
// Find the most recent queued or in_progress run
const found = runs.data.workflow_runs.find(run =>
['queued', 'in_progress'].includes(run.status)
);
if (found) {
runId = found.id;
break;
}
await new Promise(resolve => setTimeout(resolve, 5000));
}
if (!runId) {
core.setFailed(`Could not find workflow run for tag ${tag}`);
return;
}
let completed = false;
while (!completed) {
const run = await github.rest.actions.getWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: runId
});
if (run.data.status === 'completed') {
if (run.data.conclusion !== 'success') {
core.setFailed(`Workflow for tag ${tag} failed with conclusion: ${run.data.conclusion}`);
return;
}
completed = true;
} else {
await new Promise(resolve => setTimeout(resolve, 15000));
}
}
}
- name: Dispatch bench.yml for each tag
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const tags = '${{ steps.tags.outputs.tags }}'.split(' ').filter(Boolean);
for (const tag of tags) {
await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'bench.yml',
ref: context.ref.replace('refs/heads/', ''),
inputs: { tag }
});
let runId = null;
for (let i = 0; i < 60; i++) { // Try for up to 300 seconds
await new Promise(resolve => setTimeout(resolve, 5000));
const runs = await github.rest.actions.listWorkflowRuns({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'bench.yml',
event: 'workflow_dispatch',
actor: context.actor,
per_page: 5
});
// Find the most recent queued or in_progress run initiated by this actor
const found = runs.data.workflow_runs.find(run =>
['queued', 'in_progress'].includes(run.status)
);
if (found) {
runId = found.id;
break;
}
}
if (!runId) {
core.setFailed(`Could not find workflow run for tag ${tag}`);
return;
}
let completed = false;
while (!completed) {
await new Promise(resolve => setTimeout(resolve, 15000));
const run = await github.rest.actions.getWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: runId
});
if (run.data.status === 'completed') {
if (run.data.conclusion !== 'success') {
core.setFailed(`Workflow for tag ${tag} failed with conclusion: ${run.data.conclusion}`);
return;
}
completed = true;
}
}
}

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 19 files

Prompt for AI agents (all 2 issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name=".github/workflows/bench.yml">

<violation number="1" location=".github/workflows/bench.yml:71">
P0: Reference to non-existent `mfc/` directory. The workflow checks out to `pr/` and `master/` but these lines try to copy from `mfc/` which doesn&#39;t exist. This will cause the workflow to fail.</violation>

<violation number="2" location=".github/workflows/bench.yml:125">
P0: Missing required `${{ matrix.interface }}` argument. The `run_parallel_benchmarks.sh` script requires exactly 3 arguments (device, interface, cluster) and will fail with exit code 1 when only 2 are provided.</violation>
</file>

Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR

sudo mkdir -p master
sudo chmod 777 master
rm -rf master/*
cp -r mfc/* master/
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 15, 2025

Choose a reason for hiding this comment

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

P0: Reference to non-existent mfc/ directory. The workflow checks out to pr/ and master/ but these lines try to copy from mfc/ which doesn't exist. This will cause the workflow to fail.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/bench.yml, line 71:

<comment>Reference to non-existent `mfc/` directory. The workflow checks out to `pr/` and `master/` but these lines try to copy from `mfc/` which doesn&#39;t exist. This will cause the workflow to fail.</comment>

<file context>
@@ -81,44 +41,98 @@ jobs:
+          sudo mkdir -p master
+          sudo chmod 777 master
+          rm -rf master/*
+          cp -r mfc/* master/
+          cp -r mfc/.git master/.git
+          cp pr/.github/Dockerfile master/
</file context>

✅ Addressed in 2a7df55

run: |
(cd pr && . ./mfc.sh load -c ${{ matrix.flag }} -m g)
(cd pr && ./mfc.sh bench_diff ../master/bench-${{ matrix.device }}-${{ matrix.interface }}.yaml ../pr/bench-${{ matrix.device }}-${{ matrix.interface }}.yaml)
run: bash master/.github/scripts/run_parallel_benchmarks.sh ${{ matrix.device }} ${{ matrix.cluster }}
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Dec 15, 2025

Choose a reason for hiding this comment

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

P0: Missing required ${{ matrix.interface }} argument. The run_parallel_benchmarks.sh script requires exactly 3 arguments (device, interface, cluster) and will fail with exit code 1 when only 2 are provided.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/bench.yml, line 125:

<comment>Missing required `${{ matrix.interface }}` argument. The `run_parallel_benchmarks.sh` script requires exactly 3 arguments (device, interface, cluster) and will fail with exit code 1 when only 2 are provided.</comment>

<file context>
@@ -81,44 +41,98 @@ jobs:
-        run: |
-          (cd pr &amp;&amp; . ./mfc.sh load -c ${{ matrix.flag }} -m g)
-          (cd pr &amp;&amp; ./mfc.sh bench_diff ../master/bench-${{ matrix.device }}-${{ matrix.interface }}.yaml ../pr/bench-${{ matrix.device }}-${{ matrix.interface }}.yaml)
+        run: bash master/.github/scripts/run_parallel_benchmarks.sh ${{ matrix.device }} ${{ matrix.cluster }}
 
       - name: Print Logs
</file context>
Suggested change
run: bash master/.github/scripts/run_parallel_benchmarks.sh ${{ matrix.device }} ${{ matrix.cluster }}
run: bash master/.github/scripts/run_parallel_benchmarks.sh ${{ matrix.device }} ${{ matrix.interface }} ${{ matrix.cluster }}
Fix with Cubic

Copy link
Contributor

@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: 7

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8ae42aa and e2af6f8.

📒 Files selected for processing (19)
  • .github/workflows/bench.yml (3 hunks)
  • .github/workflows/cleanliness.yml (0 hunks)
  • .github/workflows/coverage.yml (0 hunks)
  • .github/workflows/deploy-tap.yml (0 hunks)
  • .github/workflows/docker.yml (0 hunks)
  • .github/workflows/docs.yml (0 hunks)
  • .github/workflows/formatting.yml (0 hunks)
  • .github/workflows/homebrew.yml (0 hunks)
  • .github/workflows/line-count.yml (0 hunks)
  • .github/workflows/lint-source.yml (0 hunks)
  • .github/workflows/lint-toolchain.yml (0 hunks)
  • .github/workflows/phoenix/bench.sh (0 hunks)
  • .github/workflows/phoenix/submit-bench.sh (0 hunks)
  • .github/workflows/phoenix/submit.sh (0 hunks)
  • .github/workflows/phoenix/test.sh (0 hunks)
  • .github/workflows/pmd.yml (0 hunks)
  • .github/workflows/release.yml (1 hunks)
  • .github/workflows/spelling.yml (0 hunks)
  • .github/workflows/test.yml (0 hunks)
💤 Files with no reviewable changes (17)
  • .github/workflows/phoenix/submit.sh
  • .github/workflows/docs.yml
  • .github/workflows/line-count.yml
  • .github/workflows/phoenix/submit-bench.sh
  • .github/workflows/pmd.yml
  • .github/workflows/lint-source.yml
  • .github/workflows/spelling.yml
  • .github/workflows/deploy-tap.yml
  • .github/workflows/test.yml
  • .github/workflows/coverage.yml
  • .github/workflows/cleanliness.yml
  • .github/workflows/docker.yml
  • .github/workflows/phoenix/bench.sh
  • .github/workflows/phoenix/test.sh
  • .github/workflows/lint-toolchain.yml
  • .github/workflows/homebrew.yml
  • .github/workflows/formatting.yml
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-11-24T21:50:46.909Z
Learnt from: CR
Repo: MFlowCode/MFC PR: 0
File: .cursor/rules/mfc-agent-rules.mdc:0-0
Timestamp: 2025-11-24T21:50:46.909Z
Learning: After each successful build step, run focused tests using `./mfc.sh test -j $(nproc) -f EA8FA07E -t 9E2CA336` instead of running all tests

Applied to files:

  • .github/workflows/bench.yml
📚 Learning: 2025-11-24T21:50:46.909Z
Learnt from: CR
Repo: MFlowCode/MFC PR: 0
File: .cursor/rules/mfc-agent-rules.mdc:0-0
Timestamp: 2025-11-24T21:50:46.909Z
Learning: Draft a step-by-step plan before making changes; build after each step using `./mfc.sh build -t pre_process simulation -j $(nproc)`

Applied to files:

  • .github/workflows/bench.yml
🪛 actionlint (1.7.9)
.github/workflows/bench.yml

54-54: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🔇 Additional comments (1)
.github/workflows/bench.yml (1)

79-83: The sed pattern for cantera pinning is ineffective and won't modify any dependencies.

The sed command on line 81 searches for "cantera", (without version specification), but:

  • In the PR's pyproject.toml: cantera is specified as "cantera>=3.1.0", (different format)
  • In releases v4.8.0–v5.1.3: cantera dependency doesn't exist in their pyproject.toml files

As written, the sed command is a no-op and never actually pins any version. Either the pattern should match the actual dependency format (e.g., s/"cantera[^"]*",/"cantera==3.0.1",/g), or this sed command can be removed as it has no effect.

Likely an incorrect or invalid review comment.

Comment on lines 10 to 17
from_tag:
description: 'Start tag (e.g. v4.3.0)'
required: false
default: 'v5.1.3'
to_tag:
description: 'End tag (e.g. v5.1.3)'
required: false
default: 'v5.1.3'
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Clarify input descriptions to match defaults.

The from_tag input description says "(e.g. v4.3.0)" but the default is 'v5.1.3'. For consistency, either:

  • Update the description to match the default range (e.g., "e.g., v5.1.0"), or
  • Adjust the default if v4.3.0 is the intended start of the benchmark range.

The PR summary mentions benchmarking v4.8.0–v5.1.3, so the description may be outdated.

       from_tag:
-        description: 'Start tag (e.g. v4.3.0)'
+        description: 'Start tag (e.g. v4.8.0)'
         required: false
         default: 'v5.1.3'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
from_tag:
description: 'Start tag (e.g. v4.3.0)'
required: false
default: 'v5.1.3'
to_tag:
description: 'End tag (e.g. v5.1.3)'
required: false
default: 'v5.1.3'
from_tag:
description: 'Start tag (e.g. v4.8.0)'
required: false
default: 'v5.1.3'
to_tag:
description: 'End tag (e.g. v5.1.3)'
required: false
default: 'v5.1.3'
🤖 Prompt for AI Agents
In .github/workflows/release.yml around lines 10–17 the from_tag/to_tag input
descriptions show examples that don’t match the configured defaults or the PR
benchmark range; update the descriptions and/or defaults so they are consistent.
Specifically either change the example in from_tag to match the default (e.g.,
"e.g., v5.1.3") or, if the intended benchmark range is v4.8.0–v5.1.3, set
from_tag default to 'v4.8.0' and adjust the description examples for both inputs
to reflect that range (e.g., "e.g., v4.8.0" and "e.g., v5.1.3").

Comment on lines 50 to 72
let runId = null;
for (let i = 0; i < 60; i++) { // Try for up to 300 seconds
const runs = await github.rest.actions.listWorkflowRuns({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'bench.yml',
event: 'workflow_dispatch',
per_page: 5
});
// Find the most recent queued or in_progress run
const found = runs.data.workflow_runs.find(run =>
['queued', 'in_progress'].includes(run.status)
);
if (found) {
runId = found.id;
break;
}
await new Promise(resolve => setTimeout(resolve, 5000));
}
if (!runId) {
core.setFailed(`Could not find workflow run for tag ${tag}`);
return;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

find . -name "release.yml" -o -name "release.yaml" | head -20

Repository: MFlowCode/MFC

Length of output: 170


🏁 Script executed:

fd -e yml -e yaml | grep -E "release|workflow" | head -20

Repository: MFlowCode/MFC

Length of output: 39


🏁 Script executed:

git ls-files .github/workflows/ 2>/dev/null || ls -la .github/workflows/ 2>/dev/null || echo "Checking alternative paths..."

Repository: MFlowCode/MFC

Length of output: 301


🏁 Script executed:

cat -n .github/workflows/release.yml

Repository: MFlowCode/MFC

Length of output: 3882


Fix run detection to match the correct dispatched run and handle PR contexts.

The current logic has three critical issues:

  1. Race condition: When dispatching multiple tags sequentially (lines 42–68), if tag1's run is still queued when tag2 is dispatched, the code detects tag1's run again instead of waiting for tag2's run. The listWorkflowRuns call doesn't filter by the tag input passed to dispatch.

  2. Missing tag validation: Although inputs: { tag } is sent with the dispatch (line 47), the run detection (lines 60–62) only checks status and doesn't verify the run matches the current tag. Multiple concurrent or sequential dispatches can cause cross-tag mismatches.

  3. Broken ref handling for PR contexts (line 46): Using context.ref.replace('refs/heads/', '') fails for pull requests where context.ref is refs/pull/XXX/merge. This leaves an invalid ref that will cause dispatch to fail.

Filter runs by both status and inputs.tag to ensure the correct dispatched run is detected, and use the full context.ref or detect PR contexts separately for the dispatch parameter.

Comment on lines 74 to 90
let completed = false;
while (!completed) {
const run = await github.rest.actions.getWorkflowRun({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: runId
});
if (run.data.status === 'completed') {
if (run.data.conclusion !== 'success') {
core.setFailed(`Workflow for tag ${tag} failed with conclusion: ${run.data.conclusion}`);
return;
}
completed = true;
} else {
await new Promise(resolve => setTimeout(resolve, 15000));
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

# First, locate and examine the release.yml file
find . -name "release.yml" -type f | head -20

Repository: MFlowCode/MFC

Length of output: 88


🏁 Script executed:

# Read the release.yml file to understand the full context around lines 74-90
cat -n .github/workflows/release.yml

Repository: MFlowCode/MFC

Length of output: 3882


Add timeout to run completion polling and clarify failure behavior.

The while loop (lines 74–90) has no maximum iteration count or timeout. If a dispatched run hangs indefinitely, this workflow will also hang, consuming the runner. Add a safety timeout and consider whether stopping on the first failure is the intended behavior (e.g., should all tags be attempted even if one fails?).

Consider revising the completion polling to include a timeout:

let completed = false;
let maxWaitTime = 24 * 60 * 60 * 1000; // 24 hours in milliseconds
let elapsed = 0;
const pollInterval = 15000; // 15 seconds

while (!completed) {
  const run = await github.rest.actions.getWorkflowRun({...});
  if (run.data.status === 'completed') {
    if (run.data.conclusion !== 'success') {
      core.setFailed(`Workflow for tag ${tag} failed with conclusion: ${run.data.conclusion}`);
      return; // Consider: should this stop the entire job, or just this tag?
    }
    completed = true;
  } else {
    elapsed += pollInterval;
    if (elapsed > maxWaitTime) {
      core.setFailed(`Workflow for tag ${tag} timed out after 24 hours`);
      return;
    }
    await new Promise(resolve => setTimeout(resolve, pollInterval));
  }
}

Also document whether the all-or-nothing failure mode is intentional (stop on first failure) or if all tags should be attempted.

@Malmahrouqi3 Malmahrouqi3 force-pushed the benchmark-all-releases-on-frontier-runner branch from e2af6f8 to 2a7df55 Compare December 15, 2025 17:54
Copy link
Contributor

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

This PR removes most existing CI workflows and introduces a new experimental release.yml dispatcher to benchmark Frontier releases (v4.8.0-v5.1.3 for GPU-ACC and v5.1.0-v5.1.3 for GPU-MP) by orchestrating sequential runs of a simplified bench.yml workflow. The PR focuses on enabling historical release benchmarking without containers, using the existing Frontier CI infrastructure.

Key Changes

  • Removed 15+ existing CI workflows (test, lint, docs, coverage, etc.)
  • Added new release.yml workflow dispatcher for sequential tag-based benchmarking
  • Simplified bench.yml to benchmark a single release tag on Frontier only
  • Removed Phoenix-specific test and benchmark scripts

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
.github/workflows/test.yml Deleted entire test suite workflow (GitHub/Phoenix/Frontier testing)
.github/workflows/spelling.yml Deleted spell check workflow
.github/workflows/release.yml Added dispatcher to orchestrate benchmarks across release tags
.github/workflows/pmd.yml Deleted source code duplication detection workflow
.github/workflows/phoenix/test.sh Deleted Phoenix test execution script
.github/workflows/phoenix/submit.sh Deleted Phoenix job submission script
.github/workflows/phoenix/submit-bench.sh Deleted Phoenix benchmark submission script
.github/workflows/phoenix/bench.sh Deleted Phoenix benchmark execution script
.github/workflows/lint-toolchain.yml Deleted toolchain linting workflow
.github/workflows/lint-source.yml Deleted source code linting workflow
.github/workflows/line-count.yml Deleted lines of code tracking workflow
.github/workflows/homebrew.yml Deleted Homebrew formula testing workflow
.github/workflows/formatting.yml Deleted code formatting check workflow
.github/workflows/docs.yml Deleted documentation build/publish workflow
.github/workflows/docker.yml Deleted container image build workflow
.github/workflows/deploy-tap.yml Deleted Homebrew tap deployment workflow
.github/workflows/coverage.yml Deleted code coverage tracking workflow
.github/workflows/cleanliness.yml Deleted compiler warning cleanliness workflow
.github/workflows/bench.yml Simplified to benchmark single Frontier release tag

workflow_dispatch:
inputs:
from_tag:
description: 'Start tag (e.g. v4.3.0)'
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

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

The version format should use 'v5.1.3' consistently. However, line 11 shows 'v4.3.0' as an example in the description which doesn't match the stated range of v4.8.0-v5.1.3 mentioned in the PR description.

Suggested change
description: 'Start tag (e.g. v4.3.0)'
description: 'Start tag (e.g. v4.8.0)'

Copilot uses AI. Check for mistakes.
});

let runId = null;
for (let i = 0; i < 60; i++) { // Try for up to 300 seconds
Copy link

Copilot AI Dec 15, 2025

Choose a reason for hiding this comment

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

The comment states 'up to 300 seconds' but the loop runs 60 times with a 5-second delay (line 67), which totals 300 seconds. However, if the workflow is found early, the timeout is not 300 seconds. The comment should clarify this is the maximum timeout.

Suggested change
for (let i = 0; i < 60; i++) { // Try for up to 300 seconds
for (let i = 0; i < 60; i++) { // Try for up to 300 seconds (maximum), exit earlier if found

Copilot uses AI. Check for mistakes.
Copy link
Contributor

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Contributor

@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: 7

♻️ Duplicate comments (1)
.github/workflows/release.yml (1)

74-90: Add timeout to run completion polling to prevent indefinite hangs.

Lines 74–90 poll for run completion in an infinite loop with no maximum iteration count or timeout. If a dispatched run hangs indefinitely, this workflow will also hang and consume the runner.

Add a timeout safety check:

  let completed = false;
+ let maxWaitTime = 24 * 60 * 60 * 1000; // 24 hours in milliseconds
+ let startTime = Date.now();
  while (!completed) {
    const run = await github.rest.actions.getWorkflowRun({
      owner: 'Malmahrouqi3',
      repo: 'MFC-mo2',
      run_id: runId
    });
    if (run.data.status === 'completed') {
      if (run.data.conclusion !== 'success') {
        core.setFailed(`Workflow for tag ${tag} failed with conclusion: ${run.data.conclusion}`);
        return;
      }
      completed = true;
    } else {
+     if (Date.now() - startTime > maxWaitTime) {
+       core.setFailed(`Workflow for tag ${tag} timed out after 24 hours`);
+       return;
+     }
      await new Promise(resolve => setTimeout(resolve, 15000));
    }
  }
🧹 Nitpick comments (2)
.github/workflows/bench-frontier.yml (1)

39-40: Update deprecated Node.js version to a supported LTS release.

Lines 39–40 force the workflow to use Node 16, which is now outdated. GitHub Actions recommends Node 20 or 22 for modern runtime compatibility and security.

Apply this diff:

-      ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
+      ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node20
-      ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

This also removes the insecure flag, which is no longer needed with a current Node version.

.github/workflows/release.yml (1)

10-17: Align input descriptions and defaults with PR benchmarking range.

Line 11 shows example "v4.3.0" but the default is "v5.1.3", and the PR summary states the benchmarking range is v4.8.0–v5.1.3. The mismatch creates confusion about the intended default behavior.

Apply this diff to align the descriptions with the stated benchmarking range:

      from_tag:
-       description: 'Start tag (e.g. v4.3.0)'
+       description: 'Start tag (e.g. v4.8.0)'
        required: false
        default: 'v5.1.3'

Alternatively, if v4.8.0 is the intended default start, update line 13 to default: 'v4.8.0' as well.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 896ae5a and 437451d.

📒 Files selected for processing (2)
  • .github/workflows/bench-frontier.yml (1 hunks)
  • .github/workflows/release.yml (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-11-24T21:50:46.909Z
Learnt from: CR
Repo: MFlowCode/MFC PR: 0
File: .cursor/rules/mfc-agent-rules.mdc:0-0
Timestamp: 2025-11-24T21:50:46.909Z
Learning: Draft a step-by-step plan before making changes; build after each step using `./mfc.sh build -t pre_process simulation -j $(nproc)`

Applied to files:

  • .github/workflows/bench-frontier.yml
🪛 actionlint (1.7.9)
.github/workflows/bench-frontier.yml

21-21: label "frontier" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "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-xl", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "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)


55-55: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🔇 Additional comments (1)
.github/workflows/bench-frontier.yml (1)

128-139: Verify artifact archival paths match expected benchmark outputs.

Lines 133–139 archive logs and benchmark results using wildcard paths. Ensure that:

  1. master/bench-${{ matrix.device }}.* actually produces files named bench-gpu.* (or similar).
  2. master/build/benchmarks/* exists and contains the expected output.

If the benchmark script doesn't produce these files, the archival will silently skip them. Consider adding a verification step beforehand.

Comment on lines 79 to 117
- name: Replace old SILO block in CMakeLists.txt
run: |
if [ -f master/toolchain/pyproject.toml ]; then
sed -i 's/"cantera",/"cantera==3.0.1",/g' master/toolchain/pyproject.toml
fi

sed -i '/# SILO/,/^endif()/{
r /dev/stdin
d
}' master/toolchain/dependencies/CMakeLists.txt <<'EOF'
# SILO
if (MFC_SILO)
find_package(SILO)
if (SILO_FOUND)
message(STATUS "SILO found.")
add_custom_target(silo)
else()
find_package(Git REQUIRED)

ExternalProject_Add(silo
GIT_REPOSITORY "https://github.com/LLNL/Silo"
GIT_TAG 9af504ef4fb79153e1fbf3bdb75421b6b65f6dc4
GIT_PROGRESS ON
PATCH_COMMAND "${GIT_EXECUTABLE}" stash
&& "${GIT_EXECUTABLE}" apply "${CMAKE_SOURCE_DIR}/Silo.patch"
CMAKE_ARGS -DSILO_ENABLE_SHARED=OFF
-DSILO_ENABLE_SILOCK=OFF
-DSILO_ENABLE_BROWSER=OFF
-DFIND_LIBRARY_USE_LIB64_PATHS=ON
"-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}"
"-DCMAKE_FIND_ROOT_PATH=${CMAKE_FIND_ROOT_PATH}"
"-DCMAKE_FIND_PACKAGE_REDIRECTS_DIR=${CMAKE_FIND_PACKAGE_REDIRECTS_DIR}"
"-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}"
"$<$<STREQUAL:${CMAKE_Fortran_COMPILER_ID},Cray>:-DCMAKE_MODULE_PATH=${CMAKE_SOURCE_DIR}/../cmake/cce>"
)
endif()
endif()
EOF
docker buildx create --name mfcbuilder --driver docker-container --use
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# Find the CMakeLists.txt file and check SILO block
fd -t f "CMakeLists.txt" --path "*/toolchain/dependencies/*" | head -20

Repository: MFlowCode/MFC

Length of output: 290


🏁 Script executed:

# Search for SILO block pattern in CMakeLists files
rg "# SILO" -A 5 --type cmake

Repository: MFlowCode/MFC

Length of output: 418


🏁 Script executed:

# Check for Silo.patch file location
fd -t f "Silo.patch"

Repository: MFlowCode/MFC

Length of output: 90


🏁 Script executed:

# Check pyproject.toml for cantera reference
fd -t f "pyproject.toml" --path "*/toolchain/*"

Repository: MFlowCode/MFC

Length of output: 290


🏁 Script executed:

# Verify the pattern in the workflow file itself
cat -n .github/workflows/bench-frontier.yml | sed -n '79,117p'

Repository: MFlowCode/MFC

Length of output: 2266


🏁 Script executed:

# Get the full SILO block to verify it ends with endif()
rg "# SILO" -A 50 --type cmake toolchain/dependencies/CMakeLists.txt | head -60

Repository: MFlowCode/MFC

Length of output: 2114


🏁 Script executed:

# Check the exact structure around the SILO block
cat toolchain/dependencies/CMakeLists.txt | grep -n "SILO" -A 40 | head -50

Repository: MFlowCode/MFC

Length of output: 1735


🏁 Script executed:

# Verify the directory structure for the patch file
ls -la toolchain/dependencies/ | grep -i patch

Repository: MFlowCode/MFC

Length of output: 116


🏁 Script executed:

# Check if there's a pyproject.toml in toolchain/
ls -la toolchain/ | grep -i pyproject

Repository: MFlowCode/MFC

Length of output: 121


🏁 Script executed:

# Check if there's a Silo.patch at the root level
find . -name "Silo.patch" -type f

Repository: MFlowCode/MFC

Length of output: 92


🏁 Script executed:

# Check the pyproject.toml content to understand Cantera requirement
cat toolchain/pyproject.toml

Repository: MFlowCode/MFC

Length of output: 1196


🏁 Script executed:

# Check how other patches are referenced in CMakeLists.txt
rg "PATCH_COMMAND" -B 5 -A 2 --type cmake

Repository: MFlowCode/MFC

Length of output: 741


Fix two critical issues in the SILO replacement and Cantera version pinning.

  1. Silo.patch path is incorrect (line 103): The patch file is located at toolchain/dependencies/Silo.patch, but the sed replacement uses "${CMAKE_SOURCE_DIR}/Silo.patch", which resolves to master/Silo.patch. The PATCH_COMMAND will fail because the file doesn't exist at the root. Change to "${CMAKE_SOURCE_DIR}/toolchain/dependencies/Silo.patch".

  2. Cantera sed pattern won't match (line 82): The sed pattern s/"cantera",/"cantera==3.0.1",/g searches for "cantera", but the actual pyproject.toml contains "cantera>=3.1.0",. The pattern won't match, so the replacement won't occur and the version won't be pinned to 3.0.1.

🤖 Prompt for AI Agents
.github/workflows/bench-frontier.yml lines 79–117: two fixes — update the
PATCH_COMMAND path to point to the actual patch at
toolchain/dependencies/Silo.patch instead of "${CMAKE_SOURCE_DIR}/Silo.patch",
and broaden the sed pattern used to pin Cantera so it matches the existing
version-specifier (e.g. "cantera>=3.1.0",) rather than only "cantera",; change
the sed invocation to match any "cantera..." token and replace it with
"cantera==3.0.1" so the version is actually pinned.

Comment on lines 26 to 34
- name: Get tags in range
id: tags
run: |
git clone --quiet https://github.com/MFlowCode/MFC.git mfc
cd mfc
git fetch --tags
TAGS=$(git tag --sort=creatordate)
TAGS_IN_RANGE=$(awk "/^${{ env.FROM_TAG }}$/,/^${{ env.TO_TAG }}$/" <<< "$TAGS" | grep -v '^$')
echo "tags=$(echo $TAGS_IN_RANGE | tr '\n' ' ')" >> $GITHUB_OUTPUT
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cat -n .github/workflows/release.yml | head -50

Repository: MFlowCode/MFC

Length of output: 1930


🏁 Script executed:

cat -n .github/workflows/release.yml | sed -n '35,80p'

Repository: MFlowCode/MFC

Length of output: 2172


🏁 Script executed:

#!/bin/bash

# Simulate tag list (sorted by date)
TAGS=$(cat <<'EOF'
v5.0.0
v5.1.0
v5.1.1
v5.1.2
v5.1.3
v5.2.0
EOF
)

echo "=== Test 1: Both tags exist ==="
FROM_TAG="v5.1.1"
TO_TAG="v5.1.3"
RESULT=$(awk "/^$FROM_TAG$/,/^$TO_TAG$/" <<< "$TAGS" | grep -v '^$')
echo "Result: '$RESULT'"
echo "Empty: $([ -z "$RESULT" ] && echo 'YES' || echo 'NO')"

echo ""
echo "=== Test 2: FROM_TAG doesn't exist ==="
FROM_TAG="v5.0.5"
TO_TAG="v5.1.3"
RESULT=$(awk "/^$FROM_TAG$/,/^$TO_TAG$/" <<< "$TAGS" | grep -v '^$')
echo "Result: '$RESULT'"
echo "Empty: $([ -z "$RESULT" ] && echo 'YES' || echo 'NO')"

echo ""
echo "=== Test 3: TO_TAG doesn't exist ==="
FROM_TAG="v5.1.1"
TO_TAG="v5.3.0"
RESULT=$(awk "/^$FROM_TAG$/,/^$TO_TAG$/" <<< "$TAGS" | grep -v '^$')
echo "Result: '$RESULT'"
echo "Empty: $([ -z "$RESULT" ] && echo 'YES' || echo 'NO')"

echo ""
echo "=== Test 4: Both tags don't exist ==="
FROM_TAG="v4.0.0"
TO_TAG="v6.0.0"
RESULT=$(awk "/^$FROM_TAG$/,/^$TO_TAG$/" <<< "$TAGS" | grep -v '^$')
echo "Result: '$RESULT'"
echo "Empty: $([ -z "$RESULT" ] && echo 'YES' || echo 'NO')"

Repository: MFlowCode/MFC

Length of output: 338


Add validation to ensure both FROM_TAG and TO_TAG exist before extracting the range.

Lines 33–34 use awk to extract tags between FROM_TAG and TO_TAG, but don't validate that both endpoints exist. The awk range filter has critical failure modes:

  • If FROM_TAG doesn't exist, it returns an empty result (silent failure—no tags are dispatched).
  • If TO_TAG doesn't exist, it returns all tags from FROM_TAG to the end of the list (incorrect range—potentially dispatching unintended releases).

Add validation to detect these conditions and fail explicitly:

if ! echo "$TAGS" | grep -q "^${{ env.FROM_TAG }}$"; then
  echo "::error::FROM_TAG '${{ env.FROM_TAG }}' not found in repository tags"
  exit 1
fi
if ! echo "$TAGS" | grep -q "^${{ env.TO_TAG }}$"; then
  echo "::error::TO_TAG '${{ env.TO_TAG }}' not found in repository tags"
  exit 1
fi

Insert these checks after line 32 (after fetching tags) to catch missing tags before the range extraction.

🤖 Prompt for AI Agents
.github/workflows/release.yml around lines 26 to 34: the workflow extracts a tag
range using awk but doesn’t verify that FROM_TAG and TO_TAG actually exist,
which can produce silent or incorrect results; after fetching tags, add checks
that grep for exact FROM_TAG and TO_TAG in the TAGS list and if either is
missing emit a GitHub Actions error message and exit with non-zero status so the
job fails fast before running the awk range extraction.

Comment on lines 42 to 48
await github.rest.actions.createWorkflowDispatch({
owner: 'Malmahrouqi3',
repo: 'MFC-mo2',
workflow_id: 'bench-frontier.yml',
ref: 'benchmark-all-releases-on-frontier-runner',
inputs: { tag }
});
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Fix hardcoded repository references to use dynamic context values.

Lines 43–44 hardcode the owner as 'Malmahrouqi3' and repo as 'MFC-mo2', which appears to be a fork or development repository. This will break on merge to the main MFlowCode/MFC repository. Use dynamic context values instead:

              await github.rest.actions.createWorkflowDispatch({
-               owner: 'Malmahrouqi3',
-               repo: 'MFC-mo2',
+               owner: context.repo.owner,
+               repo: context.repo.repo,
                workflow_id: 'bench-frontier.yml',
-               ref: 'benchmark-all-releases-on-frontier-runner',
+               ref: context.ref.replace(/^refs\/(heads|pull\/\d+)\//, ''),
                inputs: { tag }
              });

Also fix line 46: the string replace for context.ref doesn't handle PR contexts (e.g., refs/pull/XXX/merge). Use a more robust replacement or detect the event type.

🤖 Prompt for AI Agents
In .github/workflows/release.yml around lines 42–48, replace the hardcoded
owner/repo values and the fragile ref handling: use the GitHub Action context
repo values (github.context.repo.owner and github.context.repo.repo) instead of
'Malmahrouqi3'/'MFC-mo2', and compute the ref robustly by checking
github.context.ref — if it startsWith 'refs/pull/' use
github.context.payload.pull_request.head.ref (or head.sha) otherwise strip
'refs/heads/' from github.context.ref — then pass that computed ref into
createWorkflowDispatch.

Comment on lines 50 to 68
let runId = null;
for (let i = 0; i < 60; i++) { // Try for up to 300 seconds
const runs = await github.rest.actions.listWorkflowRuns({
owner: 'Malmahrouqi3',
repo: 'MFC-mo2',
workflow_id: 'bench-frontier.yml',
event: 'workflow_dispatch',
per_page: 5
});
// Find the most recent queued or in_progress run
const found = runs.data.workflow_runs.find(run =>
['queued', 'in_progress'].includes(run.status)
);
if (found) {
runId = found.id;
break;
}
await new Promise(resolve => setTimeout(resolve, 5000));
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

cat -n .github/workflows/release.yml | sed -n '40,75p'

Repository: MFlowCode/MFC

Length of output: 1774


🌐 Web query:

GitHub Actions REST API listWorkflowRuns run object inputs parameter

💡 Result:

Short answer: The workflow run objects returned by the REST "list workflow runs" / "get workflow run" endpoints do not include the workflow_dispatch "inputs" values. Those inputs are available inside the running workflow via github.event.inputs (or in job logs) but are not exposed as a run property in the REST responses — you must record them yourself (e.g., set the run-name, write to logs/artifacts, or store them elsewhere) if you need to retrieve them later via the API. [1][2][3]

Sources:

  • REST API workflow runs (list/get) — response fields do not include inputs. [1]
  • Create a workflow dispatch (shows inputs are sent to workflow via event payload). [2]
  • Community/Stack Overflow discussion noting inputs aren’t returned by the API and must be extracted from logs or recorded. [3]

🌐 Web query:

GitHub Actions workflow_dispatch workflow_run_name custom run name filtering

💡 Result:

Short answer

  • You can set a custom workflow run title for workflow_dispatch using run-name (supports expressions and inputs). [1][2]
  • You cannot filter a workflow_run trigger by that run-name; workflow_run filtering only supports workflow names, types and branch-related filters (not run title). [2]
    Workarounds
  • Have the upstream workflow include a distinct ID in run-name and then use the REST API (List workflow runs) to find runs by name and act on the matching run programmatically. [1][2]
  • Or have the upstream job directly trigger the downstream workflow with a payload (repository_dispatch or use an action that discovers the dispatched run-id) so the downstream gets the metadata it needs instead of relying on workflow_run-name filtering. [3]

Sources
[1] GitHub Actions — run-name docs (workflow run naming).
[2] GitHub Actions — events that trigger workflows / workflow_run filtering (shows supported filters).
[3] Marketplace action and community examples for dispatching workflows / discovering run-id (workarounds).


🌐 Web query:

GitHub REST API listWorkflowRuns filter by run name or head_branch

💡 Result:

Short answer: You can filter server‑side by branch (query param branch) but there is no REST query parameter to filter directly by a workflow run's "name" (displayTitle) or a "head_branch" field — you must fetch runs and filter client‑side. You can also list runs for a specific workflow (by workflow_id or filename) and use other supported params like actor, event, head_sha, status, created. [1][2]

Example: list runs for a repo filtered by branch (server side)
curl -H "Accept: application/vnd.github+json"
-H "Authorization: Bearer $TOKEN"
"https://api.github.com/repos/OWNER/REPO/actions/runs?branch=my-branch"

Then filter by run name in your script (jq example):
... | jq '.workflow_runs[] | select(.name=="My run name")'

Docs: REST API parameters and supported filters. [1]
gh CLI notes (shows workflow-name and branch flags / fields like headBranch in output). [2]

Sources:
[1] GitHub REST API — Actions: List workflow runs (parameters list).
[2] GitHub CLI gh run list (flags and JSON fields).


Proposed fix is technically infeasible; the GitHub REST API does not expose workflow dispatch inputs in listWorkflowRuns response.

Lines 50–68 correctly identify a race condition when multiple tags are dispatched sequentially—both runs can queue simultaneously and the detection may match the wrong run. However, the suggested fix using run.inputs?.tag === tag won't work because the GitHub REST API does not include inputs in the run object returned by listWorkflowRuns. Workflow dispatch inputs are only accessible inside the running workflow via github.event.inputs, not via the REST API.

To fix this race condition, consider:

  • Setting a unique run-name in createWorkflowDispatch (e.g., run-name: tag-${tag}) and filtering client-side by run.name
  • Or using head_sha or another unique identifier if available
  • Or implementing a repository_dispatch with a stored payload to track the dispatched run ID

The issue itself is critical and valid, but the proposed solution needs adjustment.

@Malmahrouqi3
Copy link
Contributor Author

Malmahrouqi3 commented Dec 15, 2025

Workflows (Release Dispatcher: to trigger, sequence, and monitor all jobs, Benchmark Frontier Releases: to be triggered and run bench on whatever MFC release) shall be as-is. They might need an approval to be recognized or such, but will deprecate for now for being as envisioned.

Send off 10 releases at a time with restricted concurrency regardless of order, meaning one will only run while others sit idle till their turn.

@Malmahrouqi3 Malmahrouqi3 reopened this Dec 16, 2025
@codeant-ai
Copy link
Contributor

codeant-ai bot commented Dec 16, 2025

CodeAnt AI is running Incremental review


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@qodo-code-review
Copy link
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 4 🔵🔵🔵🔵⚪
🧪 No relevant tests
🔒 Security concerns

Supply chain / runner hardening:
The workflow explicitly enables insecure Node (ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true) and forces Node16, which is EOL. Also, it pulls and executes external code from a user-provided workflow_dispatch tag (arbitrary ref) and runs shell commands with sudo. This increases risk of executing untrusted code on the runner if the workflow is accessible. Consider restricting workflow_dispatch to trusted actors/environments, pinning to known tags/allowlist, and removing the insecure Node allowance.

⚡ Recommended focus areas for review

Duplicate Checkout

The workflow checks out the PR repo twice into the same path: pr (once with actions/checkout@v4 and again with actions/checkout@v3). This is redundant and can also mask issues if the second checkout changes the working tree unexpectedly (e.g., different defaults, submodules, fetch depth).

- name: Clone - PR
  uses: actions/checkout@v4
  with:
    path: pr          

- name: Clone - Master
  uses: actions/checkout@v4
  with:
    repository: MFlowCode/MFC
    ref: ${{ env.BENCH_TAG }}
    path: master

- name: Checkout PR repo
  uses: actions/checkout@v3
  with:
    path: pr
Possible Issue

The “Prepare Docker context” step copies from mfc/* and mfc/.git, but the checked out directories appear to be pr and master. If mfc is not guaranteed to exist on the runner, this will fail or copy unintended content. Also, creating master/ with sudo and then rm -rf master/* could wipe the checked-out master repo contents before later steps use it.

- name: Prepare Docker context
  run: |
    sudo fallocate -l 8G /swapfile
    sudo chmod 600 /swapfile
    sudo mkswap /swapfile
    sudo swapon /swapfile
    sudo mkdir -p /home/runner/tmp
    export TMPDIR=/home/runner/tmp
    free -h

    sudo mkdir -p master
    sudo chmod 777 master
    rm -rf master/*
    cp -r mfc/* master/
    cp -r mfc/.git master/.git
    cp pr/.github/Dockerfile master/
    cp pr/.github/.dockerignore master/
    cp pr/toolchain/dependencies/Silo.patch master/toolchain/dependencies/Silo.patch
    cp pr/.github/scripts/run_parallel_benchmarks.sh master/.github/scripts/run_parallel_benchmarks.sh
Missing Tests

The PR deletes multiple CI workflows (tests/lint/coverage/etc.) and adds a benchmarking workflow, but does not add/adjust any tests or a lightweight validation path. If this is introducing a new “simulation/benchmark dispatcher” capability, consider adding at least workflow-level checks (e.g., actionlint, shellcheck) or unit/integration tests to ensure the benchmark script inputs/outputs and tag dispatch behavior remain stable.

on:
  push:
  pull_request:
  workflow_dispatch:
    inputs:
      tag:
        description: 'tag to Benchmark'
        required: true
        default: 'v5.1.3'

Copy link
Contributor

Choose a reason for hiding this comment

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

High-level Suggestion

The PR removes almost all CI/CD workflows for testing, linting, and deployment. It is suggested to restore these critical quality gates and add the new benchmarking workflow separately, rather than replacing the entire CI system. [High-level, importance: 10]

Solution Walkthrough:

Before:

// .github/workflows/ directory structure in this PR
- bench.yml
- cleanliness.yml
- coverage.yml
- docker.yml
- docs.yml
- formatting.yml
- test.yml
- ... (10+ other workflow files removed)

+ bench-frontier.yml // A single, specialized workflow is added

After:

// .github/workflows/ directory structure after applying the suggestion
bench.yml
cleanliness.yml
coverage.yml
docker.yml
docs.yml
formatting.yml
test.yml
... (all existing workflows are kept)

+ bench-frontier.yml // The new workflow is added alongside existing ones

Comment on lines 49 to 64
- name: Clone - PR
uses: actions/checkout@v4
with:
path: pr

- name: Clone - Master
uses: actions/checkout@v4
with:
repository: MFlowCode/MFC
ref: ${{ env.BENCH_TAG }}
path: master

- name: Checkout PR repo
uses: actions/checkout@v3
with:
path: pr
Copy link
Contributor

@qodo-code-review qodo-code-review bot Dec 16, 2025

Choose a reason for hiding this comment

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

Suggestion: Remove the redundant Checkout PR repo step. The repository is already checked out in the preceding Clone - PR step. [general, importance: 4]

Suggested change
- name: Clone - PR
uses: actions/checkout@v4
with:
path: pr
- name: Clone - Master
uses: actions/checkout@v4
with:
repository: MFlowCode/MFC
ref: ${{ env.BENCH_TAG }}
path: master
- name: Checkout PR repo
uses: actions/checkout@v3
with:
path: pr
- name: Clone - PR
uses: actions/checkout@v4
with:
path: pr
- name: Clone - Master
uses: actions/checkout@v4
with:
repository: MFlowCode/MFC
ref: ${{ env.BENCH_TAG }}
path: master

Comment on lines +125 to +128
- name: Setup & Build
run: |
(cd master && ${{ matrix.build_script }}) &
wait %1
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: Simplify the Setup & Build step by removing the unnecessary backgrounding (&) and wait %1. The build script can be run directly in the foreground. [general, importance: 3]

Suggested change
- name: Setup & Build
run: |
(cd master && ${{ matrix.build_script }}) &
wait %1
- name: Setup & Build
run: |
cd master && ${{ matrix.build_script }}

Copy link
Contributor

@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 (5)
.github/workflows/bench-frontier.yml (5)

61-64: Remove duplicate and deprecated checkout step.

This checkout step is redundant with lines 49-52 and uses the deprecated actions/checkout@v3. Remove this entire step.

-      - name: Checkout PR repo
-        uses: actions/checkout@v3
-        with:
-          path: pr
-

79-80: Fix references to non-existent mfc/ directory.

The workflow checks out code to pr/ and master/ paths, but these lines attempt to copy from a non-existent mfc/ directory. This will cause runtime failure.

-          cp -r mfc/* master/
-          cp -r mfc/.git master/.git

Based on the workflow logic, you likely need to copy from pr/ or the master/ path already contains the checked-out code and these lines should be removed entirely.


89-89: Fix sed pattern to match actual Cantera version specifier.

The sed pattern searches for "cantera", but the actual pyproject.toml contains "cantera>=3.1.0",. The pattern won't match, so the version won't be pinned.

-              sed -i 's/"cantera",/"cantera==3.0.1",/g' master/toolchain/pyproject.toml
+              sed -i 's/"cantera[^"]*"/"cantera==3.0.1"/g' master/toolchain/pyproject.toml

110-110: Fix incorrect Silo.patch path reference.

The patch file is copied to toolchain/dependencies/Silo.patch (line 83), but this PATCH_COMMAND references ${CMAKE_SOURCE_DIR}/Silo.patch (root directory). The build will fail when applying the patch.

-                      PATCH_COMMAND  "${GIT_EXECUTABLE}" stash
-                                  && "${GIT_EXECUTABLE}" apply "${CMAKE_SOURCE_DIR}/Silo.patch"
+                      PATCH_COMMAND  "${GIT_EXECUTABLE}" stash
+                                  && "${GIT_EXECUTABLE}" apply "${CMAKE_SOURCE_DIR}/toolchain/dependencies/Silo.patch"

131-131: Add missing matrix.interface argument to benchmark script.

The run_parallel_benchmarks.sh script requires 3 arguments (device, interface, cluster), but only 2 are provided. This will cause the script to fail.

-        run: bash master/.github/scripts/run_parallel_benchmarks.sh ${{ matrix.device }} ${{ matrix.cluster }}
+        run: bash master/.github/scripts/run_parallel_benchmarks.sh ${{ matrix.device }} ${{ matrix.interface }} ${{ matrix.cluster }}
🧹 Nitpick comments (1)
.github/workflows/bench-frontier.yml (1)

32-39: Clarify interface naming: "omp" vs "mp".

The PR objectives mention benchmarking "gpu-mp" (v5.1.0–v5.1.3), but this commented-out matrix entry uses interface: omp. Verify whether "mp" and "omp" both refer to OpenMP, or if there's a naming inconsistency that should be corrected before uncommenting.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 437451d and e8ea2ba.

📒 Files selected for processing (1)
  • .github/workflows/bench-frontier.yml (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-11-24T21:50:46.909Z
Learnt from: CR
Repo: MFlowCode/MFC PR: 0
File: .cursor/rules/mfc-agent-rules.mdc:0-0
Timestamp: 2025-11-24T21:50:46.909Z
Learning: Draft a step-by-step plan before making changes; build after each step using `./mfc.sh build -t pre_process simulation -j $(nproc)`

Applied to files:

  • .github/workflows/bench-frontier.yml
🪛 actionlint (1.7.9)
.github/workflows/bench-frontier.yml

47-47: could not parse as YAML: mapping values are not allowed in this context

(syntax-check)

🪛 YAMLlint (1.37.1)
.github/workflows/bench-frontier.yml

[error] 47-47: syntax error: mapping values are not allowed here

(syntax)

🔇 Additional comments (1)
.github/workflows/bench-frontier.yml (1)

44-46: Verify the necessity of forcing Node 16.

The workflow forces the use of Node 16 and allows insecure versions. Node 16 reached end-of-life in September 2023. Confirm this is required for Frontier runner compatibility and cannot be upgraded.

If this is a hard requirement due to the self-hosted runner environment, consider documenting the reason in a comment:

    env:
      # Frontier runner requires Node 16 due to [specific constraint]
      ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
      ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true

Comment on lines 76 to 84
sudo mkdir -p master
sudo chmod 777 master
rm -rf master/*
cp -r mfc/* master/
cp -r mfc/.git master/.git
cp pr/.github/Dockerfile master/
cp pr/.github/.dockerignore master/
cp pr/toolchain/dependencies/Silo.patch master/toolchain/dependencies/Silo.patch
cp pr/.github/scripts/run_parallel_benchmarks.sh master/.github/scripts/run_parallel_benchmarks.sh
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Reconsider the master directory preparation logic.

Lines 54-59 check out code to master/, but line 78 immediately deletes all content with rm -rf master/*. This removes the checked-out code before the subsequent copy operations. Combined with the non-existent mfc/ references (lines 79-80), this entire preparation section appears fundamentally broken.

If the master checkout at lines 54-59 already contains the necessary code, consider removing the directory recreation and copy operations, and only copy the additional files needed (Dockerfile, .dockerignore, patches, scripts) from pr/ into master/.

          sudo mkdir -p /home/runner/tmp
          export TMPDIR=/home/runner/tmp
          free -h
-          
-          sudo mkdir -p master
-          sudo chmod 777 master
-          rm -rf master/*
-          cp -r mfc/* master/
-          cp -r mfc/.git master/.git
+
+          # Copy additional files from PR into master
           cp pr/.github/Dockerfile master/
           cp pr/.github/.dockerignore master/
           cp pr/toolchain/dependencies/Silo.patch master/toolchain/dependencies/Silo.patch
           cp pr/.github/scripts/run_parallel_benchmarks.sh master/.github/scripts/run_parallel_benchmarks.sh

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
.github/workflows/bench-frontier.yml lines 76-84: the script recreates and wipes
the master directory and tries to copy from a non-existent mfc/ which removes
the previously checked-out code; instead, remove the mkdir/chmod/rm -rf master/*
and the cp mfc/* / mfc/.git lines, and only copy the specific additional files
from pr/ into the existing master/ (Dockerfile, .dockerignore, patches,
scripts). Ensure the earlier checkout step actually populates master/ and, if
not, adjust the checkout to target master/ before copying the additional files.

Comment on lines +127 to +128
(cd master && ${{ matrix.build_script }}) &
wait %1
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Fix incorrect wait syntax for bash.

Line 128 uses wait %1, which is Windows cmd syntax. In bash, use wait (no arguments) to wait for all background jobs, or wait $! for the last background process.

Apply this diff:

          (cd master && ${{ matrix.build_script }}) & 
-         wait %1
+         wait
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
(cd master && ${{ matrix.build_script }}) &
wait %1
(cd master && ${{ matrix.build_script }}) &
wait
🤖 Prompt for AI Agents
In .github/workflows/bench-frontier.yml around lines 127 to 128, the workflow
uses Windows cmd style wait syntax `wait %1`; replace it with the correct bash
form—either `wait` to wait for all background jobs or `wait $!` to wait for the
last background process depending on intent—so change the line to use the
appropriate bash wait and ensure the background job invocation remains `(cd
master && ${{ matrix.build_script }}) &` before the wait.

@Malmahrouqi3
Copy link
Contributor Author

The workflow was not recognized for syntax errors which is fixed now.

@Malmahrouqi3
Copy link
Contributor Author

gotta love the queue for the self-hosted runners.

Removed unnecessary Docker context preparation steps and simplified the workflow.
Copy link
Contributor

@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: 1

♻️ Duplicate comments (5)
.github/workflows/bench-frontier.yml (5)

61-64: Remove redundant checkout step using deprecated actions/checkout@v3.

Lines 49-52 already clone the PR repository to path pr using actions/checkout@v4. This step is redundant and uses the deprecated v3 version which actionlint has flagged.

      - name: Clone - Master
        uses: actions/checkout@v4
        with:
          repository: MFlowCode/MFC
          ref: ${{ env.BENCH_TAG }}
          path: master

-     - name: Checkout PR repo
-       uses: actions/checkout@v3
-       with:
-         path: pr
-
       - name: Prepare context

73-75: Cantera sed pattern won't match the actual pyproject.toml content.

The sed pattern s/"cantera",/"cantera==3.0.1",/g searches for "cantera", but the actual pyproject.toml contains "cantera>=3.1.0",. The replacement won't occur.

-            sed -i 's/"cantera",/"cantera==3.0.1",/g' master/toolchain/pyproject.toml
+            sed -i 's/"cantera[^"]*",/"cantera==3.0.1",/g' master/toolchain/pyproject.toml

94-95: Silo.patch path in PATCH_COMMAND is incorrect.

CMAKE_SOURCE_DIR typically resolves to the project root (master/), not the current CMakeLists.txt directory. The patch at master/toolchain/dependencies/Silo.patch won't be found at ${CMAKE_SOURCE_DIR}/Silo.patch.

Use CMAKE_CURRENT_SOURCE_DIR instead:

-                     PATCH_COMMAND  "${GIT_EXECUTABLE}" stash
-                                 && "${GIT_EXECUTABLE}" apply "${CMAKE_SOURCE_DIR}/Silo.patch"
+                     PATCH_COMMAND  "${GIT_EXECUTABLE}" stash
+                                 && "${GIT_EXECUTABLE}" apply "${CMAKE_CURRENT_SOURCE_DIR}/Silo.patch"

110-113: Fix incorrect wait %1 syntax for non-interactive bash.

wait %1 is job control syntax that requires an interactive shell. In GitHub Actions (non-interactive), use wait (all jobs) or wait $! (last background job).

       - name: Setup & Build
         run: |
           (cd master && ${{ matrix.build_script }}) & 
-          wait %1
+          wait $!

Alternatively, remove the unnecessary backgrounding entirely if sequential execution is acceptable.


115-116: Missing required ${{ matrix.interface }} argument.

The run_parallel_benchmarks.sh script requires 3 arguments (device, interface, cluster), but only 2 are provided.

-        run: bash master/.github/scripts/run_parallel_benchmarks.sh ${{ matrix.device }} ${{ matrix.cluster }}
+        run: bash master/.github/scripts/run_parallel_benchmarks.sh ${{ matrix.device }} ${{ matrix.interface }} ${{ matrix.cluster }}
🧹 Nitpick comments (1)
.github/workflows/bench-frontier.yml (1)

7-15: Overly broad triggers for a resource-intensive benchmark workflow.

Triggering benchmarks on every push and pull_request will consume significant self-hosted Frontier runner time. Consider restricting to:

  • workflow_dispatch only (on-demand)
  • Or add path filters / branch restrictions to limit runs
 on:
-  push:
-  pull_request:
+  push:
+    branches: [master]
+    paths:
+      - 'src/**'
+      - 'toolchain/**'
+  pull_request:
+    branches: [master]
+    paths:
+      - 'src/**'
+      - 'toolchain/**'
   workflow_dispatch:
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e8ea2ba and f29513f.

📒 Files selected for processing (1)
  • .github/workflows/bench-frontier.yml (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-11-24T21:50:46.909Z
Learnt from: CR
Repo: MFlowCode/MFC PR: 0
File: .cursor/rules/mfc-agent-rules.mdc:0-0
Timestamp: 2025-11-24T21:50:46.909Z
Learning: Draft a step-by-step plan before making changes; build after each step using `./mfc.sh build -t pre_process simulation -j $(nproc)`

Applied to files:

  • .github/workflows/bench-frontier.yml
🪛 actionlint (1.7.9)
.github/workflows/bench-frontier.yml

27-27: label "frontier" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "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-xl", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "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)


62-62: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🔇 Additional comments (2)
.github/workflows/bench-frontier.yml (2)

66-69: LGTM!

The file copy operations correctly inject the PR's patch file and benchmark script into the master checkout for the build.


118-129: LGTM!

The if: always() ensures logs are printed even on failure, and the artifact upload correctly captures benchmark results.

Comment on lines +44 to +47
env:
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
BENCH_TAG: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag != '' && github.event.inputs.tag || 'v5.1.3' }}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cat -n .github/workflows/bench-frontier.yml

Repository: MFlowCode/MFC

Length of output: 5526


🌐 Web query:

Node.js 16 end of life EOL date GitHub Actions

💡 Result:

  • Node.js 16 upstream EOL: September 11, 2023. [1]
  • GitHub Actions runner EOL (Node16 removed): November 12, 2024. [2]

🏁 Script executed:

# Search for any comments or documentation about why Node16 is forced
rg -i "node16|node version|unsecure" .github/workflows/ -B 2 -A 2

Repository: MFlowCode/MFC

Length of output: 568


🏁 Script executed:

# Check git history for context on why this was added
git log --oneline --all -- .github/workflows/bench-frontier.yml | head -20

Repository: MFlowCode/MFC

Length of output: 129


🏁 Script executed:

# Check for any issues, comments, or discussions about Node20 upgrade
rg -i "node20|node version|upgrade.*runner|frontier.*node" --type md --type txt

# Search for any configuration or documentation about runner setup
find . -name "*.md" -o -name "*.txt" | xargs grep -l -i "frontier\|node" 2>/dev/null | head -10

Repository: MFlowCode/MFC

Length of output: 522


🏁 Script executed:

# Look for any recent issues or PRs mentioning this
git log --all --oneline --grep="node\|frontier" -i | head -20

Repository: MFlowCode/MFC

Length of output: 1099


🏁 Script executed:

# Search specifically for when Node16 forcing was added to this workflow
git log -p --all -- .github/workflows/bench-frontier.yml | grep -A 5 -B 5 "ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION" | head -30

Repository: MFlowCode/MFC

Length of output: 39


🏁 Script executed:

# Check if there are any open issues or discussions about Node version
rg "ACTIONS_ALLOW_USE_UNSECURE" -B 5 -A 5

Repository: MFlowCode/MFC

Length of output: 39


🏁 Script executed:

# Look for Frontier runner documentation or setup notes
find . -path "*frontier*" -name "*.sh" -o -path "*frontier*" -name "*.md" | head -20

Repository: MFlowCode/MFC

Length of output: 253


Upgrade the Frontier runner to support Node20 or newer.

Node.js 16 reached end of life on November 12, 2024. GitHub Actions no longer includes Node16 in the runner, making the use of ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16 and ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true a security concern. These environment variables force a deprecated, unsupported Node.js version and bypass security protections.

Remove these environment variables and update the self-hosted Frontier runner to support Node20 or later.

🤖 Prompt for AI Agents
In .github/workflows/bench-frontier.yml around lines 44 to 47, remove the
environment variables forcing Node16 (ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION
and ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION) and stop overriding runner Node
versions in the workflow; instead update the self-hosted Frontier runner(s) to
install and support Node20+ (or use a GitHub-hosted runner that already provides
Node20), verify workflows run under Node20, and then delete those env entries
and any references that bypass runner security.

Comment out the Frontier cluster configuration and change checkout reference to master.
@codeant-ai
Copy link
Contributor

codeant-ai bot commented Dec 16, 2025

CodeAnt AI is running Incremental review


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

Copy link
Contributor

@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: 1

♻️ Duplicate comments (4)
.github/workflows/bench-frontier.yml (4)

44-46: Node.js 16 is EOL and poses a security risk.

Lines 45-46 force the use of Node.js 16, which reached end of life in November 2024, and explicitly allow unsecure versions. This is a major security concern that has been flagged in previous reviews.

The self-hosted Frontier runner must be upgraded to support Node20 or later. Remove these environment variable overrides once the runner is updated.


61-64: Remove redundant checkout step using deprecated action version.

This step duplicates the checkout at lines 49-52 and uses the deprecated actions/checkout@v3. The PR repository is already checked out to the pr path in the first step.

Remove lines 61-64 entirely:

       - name: Clone - Master
         uses: actions/checkout@v4
         with:
           repository: MFlowCode/MFC
           ref: master
           path: master

-      - name: Checkout PR repo
-        uses: actions/checkout@v3
-        with:
-          path: pr
-
       - name: Setup & Build

66-69: Fix incorrect wait syntax for bash.

Line 69 uses wait %1, which is Windows cmd syntax. In bash (the shell used by GitHub Actions on Linux runners), the correct syntax is wait (to wait for all background jobs) or wait $! (for the last background process).

Apply this diff:

       - name: Setup & Build
         run: |
           (cd master && ${{ matrix.build_script }}) & 
-          wait %1
+          wait

71-72: Add missing matrix.interface argument to benchmark script.

The run_parallel_benchmarks.sh script requires three arguments: device, interface, and cluster. This call only passes two arguments (device and cluster), which will cause the script to fail at runtime.

Apply this diff:

       - name: Bench (Master)
-        run: bash master/.github/scripts/run_parallel_benchmarks.sh ${{ matrix.device }} ${{ matrix.cluster }}
+        run: bash master/.github/scripts/run_parallel_benchmarks.sh ${{ matrix.device }} ${{ matrix.interface }} ${{ matrix.cluster }}
🧹 Nitpick comments (1)
.github/workflows/bench-frontier.yml (1)

47-47: Consider simplifying the BENCH_TAG expression.

The current ternary-style expression is correct but could be simplified using GitHub Actions' logical OR shorthand. This would make it more readable and idiomatic.

Apply this diff for a cleaner expression:

-      BENCH_TAG: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag != '' && github.event.inputs.tag || 'v5.1.3' }}
+      BENCH_TAG: ${{ github.event.inputs.tag || 'v5.1.3' }}

Note: This works because github.event.inputs.tag is only defined when workflow_dispatch is triggered, and GitHub Actions treats empty strings as falsy in the || operator.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eebe250 and d15c914.

📒 Files selected for processing (1)
  • .github/workflows/bench-frontier.yml (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-11-24T21:50:46.909Z
Learnt from: CR
Repo: MFlowCode/MFC PR: 0
File: .cursor/rules/mfc-agent-rules.mdc:0-0
Timestamp: 2025-11-24T21:50:46.909Z
Learning: Draft a step-by-step plan before making changes; build after each step using `./mfc.sh build -t pre_process simulation -j $(nproc)`

Applied to files:

  • .github/workflows/bench-frontier.yml
🪛 actionlint (1.7.9)
.github/workflows/bench-frontier.yml

27-27: label "frontier" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "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-xl", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "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)


62-62: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

Comment on lines +54 to +59
- name: Clone - Master
uses: actions/checkout@v4
with:
repository: MFlowCode/MFC
ref: master
path: master
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Wrong git ref: should checkout the tag, not master branch.

This workflow benchmarks a specific release tag, but line 58 checks out the master branch instead of ${{ env.BENCH_TAG }}. This defeats the entire purpose of the workflow—you'll be benchmarking the master branch every time instead of the specified release.

Apply this diff to fix:

       - name: Clone - Master
         uses: actions/checkout@v4
         with:
           repository: MFlowCode/MFC
-          ref: master
+          ref: ${{ env.BENCH_TAG }}
           path: master
🤖 Prompt for AI Agents
.github/workflows/bench-frontier.yml lines 54-59: the checkout step currently
uses ref: master which causes the workflow to benchmark the master branch
instead of the intended release tag; update the checkout ref to use the
BENCH_TAG environment variable (ref: ${{ env.BENCH_TAG }}) so the workflow
checks out the specified tag, leaving repository and path as-is.

Added a new configuration for the Frontier cluster with OpenMP interface and updated the benchmark script call to include the interface parameter.
Copy link
Contributor

@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: 1

♻️ Duplicate comments (3)
.github/workflows/bench-frontier.yml (3)

58-58: Fix git ref to checkout the specified release tag, not master.

The workflow is designed to benchmark a specific release tag (from BENCH_TAG), but this line checks out the master branch instead. This defeats the purpose of the workflow—every benchmark will test master instead of the intended release.

Apply this diff to fix the ref:

       - name: Clone - Master
         uses: actions/checkout@v4
         with:
           repository: MFlowCode/MFC
-          ref: master
+          ref: ${{ env.BENCH_TAG }}
           path: master

</comment_end>


69-69: Fix incorrect wait syntax for bash.

The syntax wait %1 is Windows cmd syntax and will fail in bash. In bash, use wait to wait for all background jobs or wait $! to wait for the last background process.

Apply this diff:

          (cd master && ${{ matrix.build_script }}) & 
-         wait %1
+         wait

</comment_end>


61-64: Remove redundant and deprecated checkout step.

This step duplicates the PR checkout from lines 49-52 and uses the deprecated actions/checkout@v3 which is no longer supported by GitHub Actions. The PR repository is already checked out at the correct path.

Apply this diff to remove the redundant step:

       - name: Clone - Master
         uses: actions/checkout@v4
         with:
           repository: MFlowCode/MFC
           ref: master
           path: master
-
-      - name: Checkout PR repo
-        uses: actions/checkout@v3
-        with:
-          path: pr

       - name: Setup & Build

</comment_end>

🧹 Nitpick comments (1)
.github/workflows/bench-frontier.yml (1)

66-69: Consider simplifying by removing unnecessary backgrounding.

The build script is backgrounded and then immediately waited for, which is equivalent to running it in the foreground. Unless there's a specific reason for this pattern, the step can be simplified.

       - name: Setup & Build
         run: |
-          (cd master && ${{ matrix.build_script }}) & 
-          wait
+          cd master && ${{ matrix.build_script }}

</comment_end>

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d15c914 and 9626e6c.

📒 Files selected for processing (1)
  • .github/workflows/bench-frontier.yml (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-11-24T21:50:46.909Z
Learnt from: CR
Repo: MFlowCode/MFC PR: 0
File: .cursor/rules/mfc-agent-rules.mdc:0-0
Timestamp: 2025-11-24T21:50:46.909Z
Learning: Draft a step-by-step plan before making changes; build after each step using `./mfc.sh build -t pre_process simulation -j $(nproc)`

Applied to files:

  • .github/workflows/bench-frontier.yml
🪛 actionlint (1.7.9)
.github/workflows/bench-frontier.yml

27-27: label "frontier" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "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-xl", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "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)


35-35: label "frontier" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2025", "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-xl", "macos-latest-xlarge", "macos-latest-large", "macos-26-xlarge", "macos-26", "macos-15-intel", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "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)


62-62: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Oak Ridge | Frontier (CCE) (gpu-omp)
  • GitHub Check: Oak Ridge | Frontier (CCE) (gpu-acc)

Comment on lines +44 to +46
env:
ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Upgrade runner to support Node20 or remove deprecated Node16 override.

Node.js 16 reached end of life on November 12, 2024 and is no longer supported by GitHub Actions. Forcing Node16 with ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true bypasses security protections and exposes the workflow to known vulnerabilities.

Update the self-hosted Frontier runner to support Node20 or later, then remove these environment variables.

</comment_end>

🤖 Prompt for AI Agents
.github/workflows/bench-frontier.yml lines 44-46: the workflow forces Node16 by
setting ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION and
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION which is deprecated and insecure; either
upgrade the self-hosted Frontier runner to a Node20+ environment and then remove
these two environment variables from the workflow, or if upgrade cannot be
completed immediately, replace the override with a documented temporary comment
and an action that enforces a supported Node version (Node20) on the runner;
ensure the final change removes both ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION
and ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION entries and that the runner is
verified to support Node20 before committing.

@codeant-ai
Copy link
Contributor

codeant-ai bot commented Dec 16, 2025

CodeAnt AI is running Incremental review


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@codeant-ai
Copy link
Contributor

codeant-ai bot commented Dec 17, 2025

CodeAnt AI is running Incremental review


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@Malmahrouqi3
Copy link
Contributor Author

Malmahrouqi3 commented Dec 17, 2025

Will resort to old-school bash scripts and take down this PR due to the countless out-of-countrol limitations e.g. CI, scale, debugging, and many others as some versions require specific revival treatments. It was a good learning experience tho.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Possible security concern Review effort 4/5 size:L This PR changes 100-499 lines, ignoring generated files

Development

Successfully merging this pull request may close these issues.

1 participant