← Back to Pull requests

[Flang] Github action to check for integration tests #221766

Merged
kiranchandramohan merged 1 files (116 lines) on Oct 20, 2026 13:57 UTC
View on GitHub
kiranchandramohan kiranchandramohan commented on Sep 07, 2026 15:48 UTC
Author

Adds a GitHub Actions workflow that comments on pull requests introducing -emit-llvm RUN lines under flang/test/ (integration tests). The informational reminder encourages focused tests, or a nearby explanation when LLVM IR generation is necessary. It updates or removes its comment as the PR changes.

The workflow uses pull_request_target to comment on fork PRs, inspects patches only through the GitHub API, and never checks out or executes PR code. It runs only in llvm/llvm-project, with write permission scoped to the commenting job. Also suppresses the zizmor warning for the intentional API-only use of pull_request_target, which never executes PR code and follows the existing security model in new-prs.yml.

Discussed in https://discourse.llvm.org/t/removing-or-reducing-redundant-messages-in-integration-tests/91591

Assisted-by: Codex

Co-authored-by: Eugene Epshteyn <eepshteyn@nvidia.com>

Diff: 116 lines (+116 / -0) across 1 files Reviewer: tstellar Review duration: 61808m
All Vouch review confidence checks passed
Residual risk 0.07 = Change Risk (0.31) × (1 − Review Confidence (0.77)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.31 · 116 lines diff across 1 files
0.31
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.57 · 5 substantive comment(s)
0.57
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
77%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.285
Real PR Conversation Timeline
24 items
llvmorg-github-actions[bot] llvmorg-github-actions[bot] commented on Sep 07, 2026 15:49 UTC
Bot

<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-github-workflow

Author: Kiran Chandramohan (kiranchandramohan)

<details>
<summary>Changes</summary>

---
Full diff: https://github.com/llvm/llvm-project/pull/221766.diff

1 Files Affected:

  • (added) .github/workflows/flang-integration-test-check.yml (+104)
  • ``````

    diff --git a/.github/workflows/flang-integration-test-check.yml b/.github/workflows/flang-integration-test-check.yml
    new file mode 100644
    index 0000000000000..452b650db0beb
    --- /dev/null
    +++ b/.github/workflows/flang-integration-test-check.yml
    @@ -0,0 +1,104 @@
    +name: Flang integration test check
    +
    +on:
    +  pull_request_target:
    +    types: [opened, synchronize, reopened]
    +    paths:
    +      - "flang/test/**"
    +
    +# This workflow only inspects file patches through the GitHub API. In
    +# particular, it must not check out or execute code from the pull request.
    +permissions:
    +  contents: read
    +  pull-requests: write
    +
    +jobs:
    +  check-for-full-pipeline-tests:
    +    runs-on: ubuntu-24.04
    +    steps:
    +      - name: Check for new full-pipeline test invocations
    +        uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
    +        with:
    +          script: |
    +            const marker = "<!-- flang-integration-test-check -->";
    +            const pr = context.payload.pull_request;
    +
    +            const files = await github.paginate(
    +              github.rest.pulls.listFiles,
    +              {
    +                owner: context.repo.owner,
    +                repo: context.repo.repo,
    +                pull_number: pr.number,
    +                per_page: 100,
    +              },
    +            );
    +
    +            const findings = [];
    +            for (const file of files) {
    +              if (!file.filename.startsWith("flang/test/") || !file.patch)
    +                continue;
    +
    +              // Only report newly added uses. Existing full-pipeline tests do
    +              // not need to be justified again when an unrelated line changes.
    +              const addsEmitLLVM = file.patch.split("\n").some(
    +                line => /^\+(?!\+\+)/.test(line) && /\bRUN:/.test(line) &&
    +                  /(^|\s)-emit-llvm(?=\s|=|$)/.test(line),
    +              );
    +              if (addsEmitLLVM)
    +                findings.push(`- \`${file.filename}\``);
    +            }
    +
    +            const comments = await github.paginate(
    +              github.rest.issues.listComments,
    +              {
    +                owner: context.repo.owner,
    +                repo: context.repo.repo,
    +                issue_number: pr.number,
    +                per_page: 100,
    +              },
    +            );
    +            const previous = comments.find(
    +              comment => comment.user.type === "Bot" && comment.body.includes(marker),
    +            );
    +
    +            if (findings.length === 0) {
    +              if (previous) {
    +                await github.rest.issues.deleteComment({
    +                  owner: context.repo.owner,
    +                  repo: context.repo.repo,
    +                  comment_id: previous.id,
    +                });
    +              }
    +              return;
    +            }
    +
    +            const body = [
    +              marker,
    +              "This pull request adds a Flang test invocation that exercises the compiler " +
    +                "pipeline through LLVM IR generation:",
    +              "",
    +              findings.join("\n"),
    +              "",
    +              "Please consider whether the same behavior can be covered by a focused test " +
    +                "that stops at the relevant compiler stage. If LLVM IR generation is " +
    +                "necessary, add a nearby, test-specific comment explaining why. See the " +
    +                "[Flang integration test guidance](https://github.com/llvm/llvm-project/blob/main/flang/test/Integration/README.md).",
    +              "",
    +              "_This is an informational reminder; it does not fail the workflow._",
    +            ].join("\n");
    +
    +            if (previous) {
    +              await github.rest.issues.updateComment({
    +                owner: context.repo.owner,
    +                repo: context.repo.repo,
    +                comment_id: previous.id,
    +                body,
    +              });
    +            } else {
    +              await github.rest.issues.createComment({
    +                owner: context.repo.owner,
    +                repo: context.repo.repo,
    +                issue_number: pr.number,
    +                body,
    +              });
    +            }
    
    
    ``````

    </details>

    github-advanced-security[bot] github-advanced-security[bot] commented on code on Sep 07, 2026 15:49 UTC
    Code Review
    .github/workflows/flang-integration-test-check.yml:1
    @@ -0,0 +1,104 @@
    +name: Flang integration test check
    +
    +on:
    +  pull_request_target:
    +    types: [opened, synchronize, reopened]
    +    paths:
    +      - "flang/test/**"
    +
    +# This workflow only inspects file patches through the GitHub API. In
    +# particular, it must not check out or execute code from the pull request.

    zizmor /

    use of fundamentally insecure workflow trigger: pull_request_target is almost always used insecurely

    Show more details

    tstellar tstellar approved these changes on Sep 22, 2026 16:14 UTC
    Approved Reviewer

    LGTM.

    tblah tblah approved these changes on Sep 22, 2026 16:35 UTC
    Approved Reviewer

    Thanks

    eugeneepshteyn eugeneepshteyn commented on Sep 22, 2026 16:38 UTC
    Contributor

    I'm running a couple of checks for this, please wait for my comment before merging.

    boomanaiden154 boomanaiden154 commented on code on Sep 22, 2026 17:08 UTC
    Code Review
    .github/workflows/flang-integration-test-check.yml:1
    @@ -0,0 +1,108 @@
    +name: Flang integration test check
    +
    +on:
    +  # This workflow needs pull_request_target so it can comment on pull requests
    +  # from forks. It only examines patches using the GitHub API and never checks

    Why can't we use the existing issue comment workflow to avoid this?

    boomanaiden154 boomanaiden154 requested changes on Sep 22, 2026 17:08 UTC
    Changes Requested Reviewer

    Requested changes.

    kiranchandramohan kiranchandramohan commented on code on Sep 22, 2026 17:15 UTC
    Code Review
    .github/workflows/flang-integration-test-check.yml:1
    @@ -0,0 +1,108 @@
    +name: Flang integration test check
    +
    +on:
    +  # This workflow needs pull_request_target so it can comment on pull requests
    +  # from forks. It only examines patches using the GitHub API and never checks

    Thanks @boomanaiden154 for the suggestion. Assuming you meant https://github.com/llvm/llvm-project/blob/main/.github/workflows/issue-write.yml. I will have a look to see whether i can modify the PR to use this.

    boomanaiden154 boomanaiden154 commented on code on Sep 22, 2026 18:54 UTC
    Code Review
    .github/workflows/issue-write.yml:1
    @@ -11,6 +11,7 @@ on:
           - "Test Issue Write"
           - "Check LLVM ABI annotations"
           - "Diff test-suite codegen"
    +      - "Flang integration test check"

    The change in this file needs to land in a separate PR if you want to test the flang-integration-test-check workflow in this PR.

    eugeneepshteyn eugeneepshteyn commented on code on Sep 22, 2026 18:55 UTC
    Code Review
    .github/workflows/flang-integration-test-check.yml:1
    @@ -0,0 +1,102 @@
    +name: Flang integration test check
    +
    +on:
    +  pull_request:
    +    types: [opened, synchronize, reopened]
    +    paths:
    +      - "flang/**"
    +      - ".github/workflows/flang-integration-test-check.yml"
    +
    +permissions:
    +  contents: read
    +  pull-requests: read
    +
    +jobs:
    +  check-for-full-pipeline-tests:
    +    if: github.repository == 'llvm/llvm-project'
    +    runs-on: ubuntu-24.04
    +    steps:
    +      - name: Check for new full-pipeline test invocations
    +        uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
    +        with:
    +          script: |
    +            const fs = require("fs");
    +            const marker = "<!-- flang-integration-test-check -->";
    +            const pr = context.payload.pull_request;
    +
    +            const files = await github.paginate(
    +              github.rest.pulls.listFiles,
    +              {
    +                owner: context.repo.owner,
    +                repo: context.repo.repo,
    +                pull_number: pr.number,
    +                per_page: 100,
    +              },
    +            );
    +
    +            const findings = [];
    +            for (const file of files) {
    +              if (!file.filename.startsWith("flang/test/") || !file.patch)
    +                continue;
    +
    +              // Only report newly added uses. Existing full-pipeline tests do
    +              // not need to be justified again when an unrelated line changes.
    +              const addsEmitLLVM = file.patch.split("\n").some(
    +                line => /^\+(?!\+\+)/.test(line) && /\bRUN:/.test(line) &&
    +                  /(^|\s)-emit-llvm(?=\s|=|$)/.test(line),
    +              );
    +              if (addsEmitLLVM)
    +                findings.push(`- \`${file.filename}\``);

    The detector re-flags tests it has already accepted, which contradicts the comment directly above it. Because a reindent or an added option appears as a removed/added pair, the + side alone still matches. Two patches that produce a reminder today:

    @@ -1,2 +1,2 @@
    -! RUN: %flang_fc1 -emit-llvm %s -o -
    +! RUN:  %flang_fc1 -emit-llvm %s -o -
    
    @@ -1,2 +1,2 @@
    -! RUN: %flang_fc1 -emit-llvm %s -o -
    +! RUN: %flang_fc1 -emit-llvm -O2 %s -o -
    

    Neither adds an invocation; the first only reindents and the second adds an option. Over the 2868 commits touching flang/test since 2024-01-01, the current rule flags 310 file-touches against 235 for a net count, and every one of the ~75 differences is an edit to an invocation that already existed.

    The same block is where three other things are worth fixing at once, hence a single suggestion.

    -emit-llvm-bc and -emit-obj are missed. -emit-llvm-bc is excluded only as an artifact of the (?=\s|=|$) lookahead, yet it is real (flang -fc1 -emit-llvm-bc succeeds) and is what flang/test/Integration/OpenMP/host-ir-flag.f90:9 uses. -emit-obj drives the pipeline further still.

    lit DEFINE: and REDEFINE: lines are invisible. They carry the only in-tree DEFINE'd -emit-llvm invocations, including two Integration/ tests this regex cannot see at all. flang/test/Integration/unroll-loops.f90 is one: its command lives on a DEFINE: line and its RUN lines only expand the substitution.

    The filename is interpolated into a code span unescaped. A path containing a backtick closes that span, so the remainder of the path is rendered as Markdown rather than shown literally. Given a file added at the first path below, the current code emits the second line, in which the team handle has escaped the code span and posts as a live mention authored by github-actions[bot]:

    flang/test/Integration/a`@llvm/pr-subscribers-flang`b.f90
    - `flang/test/Integration/a`@llvm/pr-subscribers-flang`b.f90`
    

    Counting flag tokens rather than lines also handles two invocations joined by && on a single RUN line. Two limits are worth stating in the comment, which is why the suggestion spells them out: removing a DEFINE:d invocation cancels detection of an added RUN: that carries one, and a rewritten invocation is not distinguished from a replaced one.

                  // lit directives that can carry a compiler invocation, and the flags
                  // that drive the pipeline at least as far as LLVM IR generation.
                  const directive = /\b(RUN|DEFINE|REDEFINE):/;
                  const fullPipeline = /(^|\s)(-emit-llvm(-bc)?|-emit-obj)(?=\s|=|$)/g;
    
                  // Only report net-new uses. Reindenting an existing line, or adding an
                  // option to it, shows up as a removed/added pair, so count both sides.
                  // Heuristic: counts flag tokens rather than lines, and cannot tell a
                  // rewritten invocation from a replaced one.
                  const lines = file.patch.split("\n");
                  const countFlags = line =>
                    directive.test(line) ? (line.match(fullPipeline) || []).length : 0;
                  const total = (ls, sign) => ls.filter(line => sign.test(line))
                    .reduce((n, line) => n + countFlags(line), 0);
                  if (total(lines, /^\+(?!\+\+)/) > total(lines, /^-(?!--)/))
                    findings.push(`- \`${file.filename.replace(/[`\r\n]/g, "'")}\``);
    

    Measured with the harness in the review summary, before → after: reindent create → no-op; added -O2 create → no-op; -emit-obj no-op → create; -emit-llvm-bc no-op → create; DEFINE: no-op → create; a genuinely new RUN: ... -emit-llvm stays create; and the injected path above comes back with the backticks replaced by apostrophes, so it stays inert. I also ran the real refactor in 6cb71d7e85d5, which turns four RUN: ... -emit-llvm lines into two DEFINE:d ones: the current rule flags that NFC commit, a per-directive counter also flags it, and a single token counter correctly does not.

    eugeneepshteyn eugeneepshteyn commented on code on Sep 22, 2026 18:55 UTC
    Code Review
    .github/workflows/flang-integration-test-check.yml:1
    @@ -0,0 +1,102 @@
    +name: Flang integration test check
    +
    +on:
    +  pull_request:
    +    types: [opened, synchronize, reopened]
    +    paths:
    +      - "flang/**"
    +      - ".github/workflows/flang-integration-test-check.yml"
    +
    +permissions:
    +  contents: read
    +  pull-requests: read
    +
    +jobs:
    +  check-for-full-pipeline-tests:
    +    if: github.repository == 'llvm/llvm-project'
    +    runs-on: ubuntu-24.04
    +    steps:
    +      - name: Check for new full-pipeline test invocations
    +        uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
    +        with:
    +          script: |
    +            const fs = require("fs");
    +            const marker = "<!-- flang-integration-test-check -->";
    +            const pr = context.payload.pull_request;
    +
    +            const files = await github.paginate(
    +              github.rest.pulls.listFiles,
    +              {
    +                owner: context.repo.owner,
    +                repo: context.repo.repo,
    +                pull_number: pr.number,
    +                per_page: 100,
    +              },
    +            );
    +
    +            const findings = [];
    +            for (const file of files) {
    +              if (!file.filename.startsWith("flang/test/") || !file.patch)
    +                continue;
    +
    +              // Only report newly added uses. Existing full-pipeline tests do
    +              // not need to be justified again when an unrelated line changes.
    +              const addsEmitLLVM = file.patch.split("\n").some(
    +                line => /^\+(?!\+\+)/.test(line) && /\bRUN:/.test(line) &&
    +                  /(^|\s)-emit-llvm(?=\s|=|$)/.test(line),
    +              );
    +              if (addsEmitLLVM)
    +                findings.push(`- \`${file.filename}\``);
    +            }
    +
    +            const comments = await github.paginate(
    +              github.rest.issues.listComments,
    +              {
    +                owner: context.repo.owner,
    +                repo: context.repo.repo,
    +                issue_number: pr.number,
    +                per_page: 100,
    +              },
    +            );
    +            const previous = comments.find(
    +              comment => comment.user.login === "github-actions[bot]" &&
    +                comment.body.includes(marker),
    +            );

    Small hardening on the lookup, now that it is the thing standing between this workflow and someone else's comment.

    comment.user.login throws if user is null, and comment.body.includes throws if body is null; either one fails the run. Measured on the current code:

    comment with null body   → TypeError: Cannot read properties of null (reading 'includes')
    comment with null user   → TypeError: Cannot read properties of null (reading 'login')
    

    startsWith is also strictly tighter than includes and costs nothing here, since both bodies this workflow writes begin with the marker. It keeps the guard robust against any future github-actions[bot] comment that happens to quote a patch containing the marker — pr-code-format.yml and pr-code-lint.yml both post diffs under that same login.

                const previous = comments.find(
                  comment => comment.user && comment.user.login === "github-actions[bot]" &&
                    typeof comment.body === "string" && comment.body.startsWith(marker),
                );
    

    With this, both cases above become clean no-ops and the existing behaviour is unchanged: the workflow's own comment is still found and updated, and this PR's real comment payload still yields no match.

    eugeneepshteyn eugeneepshteyn commented on code on Sep 22, 2026 18:55 UTC
    Code Review
    .github/workflows/flang-integration-test-check.yml:1
    @@ -0,0 +1,102 @@
    +name: Flang integration test check
    +
    +on:
    +  pull_request:
    +    types: [opened, synchronize, reopened]
    +    paths:
    +      - "flang/**"
    +      - ".github/workflows/flang-integration-test-check.yml"
    +
    +permissions:
    +  contents: read
    +  pull-requests: read
    +
    +jobs:
    +  check-for-full-pipeline-tests:
    +    if: github.repository == 'llvm/llvm-project'
    +    runs-on: ubuntu-24.04

    Worth adding a concurrency group and a timeout here. synchronize fires per push and pushes arrive in bursts, and there is no comment id on the create path, so two overlapping runs each upload an artifact and issue-write.yml runs twice, creating two reminder comments. I measured that on the previous revision's direct-write code as two createComment calls from two interleaved runs; the artifact hand-off moves where it happens but not whether it can.

    pr-code-format.yml sets both, keyed the same way:

        runs-on: ubuntu-24.04
        timeout-minutes: 10
        # Overlapping runs would each upload an artifact and each create a comment,
        # so serialize rather than cancel: an in-flight upload cannot be retracted.
        concurrency:
          group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
          cancel-in-progress: false
    

    I would suggest cancel-in-progress: false rather than pr-code-format.yml's true: cancellation is asynchronous and cannot retract an upload that is already in flight, whereas serializing is essentially free for a job that runs in seconds. Since the script reads live PR state by number, whichever run goes last leaves the correct final state, so only overlap matters and not ordering.

    eugeneepshteyn eugeneepshteyn commented on code on Sep 22, 2026 18:55 UTC
    Code Review
    .github/workflows/flang-integration-test-check.yml:1
    @@ -0,0 +1,102 @@
    +name: Flang integration test check
    +
    +on:
    +  pull_request:
    +    types: [opened, synchronize, reopened]
    +    paths:
    +      - "flang/**"
    +      - ".github/workflows/flang-integration-test-check.yml"
    +
    +permissions:
    +  contents: read
    +  pull-requests: read
    +
    +jobs:
    +  check-for-full-pipeline-tests:
    +    if: github.repository == 'llvm/llvm-project'
    +    runs-on: ubuntu-24.04
    +    steps:
    +      - name: Check for new full-pipeline test invocations
    +        uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
    +        with:
    +          script: |
    +            const fs = require("fs");
    +            const marker = "<!-- flang-integration-test-check -->";
    +            const pr = context.payload.pull_request;
    +
    +            const files = await github.paginate(
    +              github.rest.pulls.listFiles,
    +              {
    +                owner: context.repo.owner,
    +                repo: context.repo.repo,
    +                pull_number: pr.number,
    +                per_page: 100,
    +              },
    +            );
    +
    +            const findings = [];
    +            for (const file of files) {
    +              if (!file.filename.startsWith("flang/test/") || !file.patch)
    +                continue;

    Minor: files the API gives no patch for are skipped silently, so the reminder can be a false negative with nothing indicating it. listFiles omits patch for very large and binary files and caps out at 3000 entries.

                  if (!file.filename.startsWith("flang/test/"))
                    continue;
                  if (!file.patch) {
                    // The API omits `patch` for very large or binary files, and caps
                    // listFiles at 3000 entries. Say so rather than skipping silently.
                    core.notice(`Not checked (no patch text from the API): ${file.filename}`);
                    continue;
                  }
    

    Splitting the condition also makes the two reasons for skipping distinguishable. Measured: a file entry with no patch still produces no comment, and now also emits Not checked (no patch text from the API): flang/test/Integration/big.f90 in the run log.

    eugeneepshteyn eugeneepshteyn commented on Sep 22, 2026 19:21 UTC
    Reviewer

    These are all AI generated comments, but I found them interesting enough to share.

    kiranchandramohan kiranchandramohan commented on code on Sep 22, 2026 19:43 UTC
    Code Review
    .github/workflows/issue-write.yml:1
    @@ -11,6 +11,7 @@ on:
           - "Test Issue Write"
           - "Check LLVM ABI annotations"
           - "Diff test-suite codegen"
    +      - "Flang integration test check"
    kiranchandramohan kiranchandramohan commented on code on Sep 22, 2026 21:10 UTC
    Code Review
    .github/workflows/flang-integration-test-check.yml:1
    @@ -0,0 +1,102 @@
    +name: Flang integration test check
    +
    +on:
    +  pull_request:
    +    types: [opened, synchronize, reopened]
    +    paths:
    +      - "flang/**"
    +      - ".github/workflows/flang-integration-test-check.yml"
    +
    +permissions:
    +  contents: read
    +  pull-requests: read
    +
    +jobs:
    +  check-for-full-pipeline-tests:
    +    if: github.repository == 'llvm/llvm-project'
    +    runs-on: ubuntu-24.04

    Added the timeout in https://github.com/llvm/llvm-project/pull/221766/changes/34c0d9f3c7040b599067f61068b306b6c0880b8f

    Left out the concurrency part. It seems serializing the Flang jobs does not wait for their separate issue-write.yml jobs. Two sequential Flang runs can still prepare “create comment” artifacts before either writer posts.

    kiranchandramohan kiranchandramohan commented on code on Sep 22, 2026 21:11 UTC
    Code Review
    .github/workflows/flang-integration-test-check.yml:1
    @@ -0,0 +1,102 @@
    +name: Flang integration test check
    +
    +on:
    +  pull_request:
    +    types: [opened, synchronize, reopened]
    +    paths:
    +      - "flang/**"
    +      - ".github/workflows/flang-integration-test-check.yml"
    +
    +permissions:
    +  contents: read
    +  pull-requests: read
    +
    +jobs:
    +  check-for-full-pipeline-tests:
    +    if: github.repository == 'llvm/llvm-project'
    +    runs-on: ubuntu-24.04
    +    steps:
    +      - name: Check for new full-pipeline test invocations
    +        uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
    +        with:
    +          script: |
    +            const fs = require("fs");
    +            const marker = "<!-- flang-integration-test-check -->";
    +            const pr = context.payload.pull_request;
    +
    +            const files = await github.paginate(
    +              github.rest.pulls.listFiles,
    +              {
    +                owner: context.repo.owner,
    +                repo: context.repo.repo,
    +                pull_number: pr.number,
    +                per_page: 100,
    +              },
    +            );
    +
    +            const findings = [];
    +            for (const file of files) {
    +              if (!file.filename.startsWith("flang/test/") || !file.patch)
    +                continue;
    +
    +              // Only report newly added uses. Existing full-pipeline tests do
    +              // not need to be justified again when an unrelated line changes.
    +              const addsEmitLLVM = file.patch.split("\n").some(
    +                line => /^\+(?!\+\+)/.test(line) && /\bRUN:/.test(line) &&
    +                  /(^|\s)-emit-llvm(?=\s|=|$)/.test(line),
    +              );
    +              if (addsEmitLLVM)
    +                findings.push(`- \`${file.filename}\``);
    kiranchandramohan kiranchandramohan commented on code on Sep 22, 2026 21:11 UTC
    Code Review
    .github/workflows/flang-integration-test-check.yml:1
    @@ -0,0 +1,102 @@
    +name: Flang integration test check
    +
    +on:
    +  pull_request:
    +    types: [opened, synchronize, reopened]
    +    paths:
    +      - "flang/**"
    +      - ".github/workflows/flang-integration-test-check.yml"
    +
    +permissions:
    +  contents: read
    +  pull-requests: read
    +
    +jobs:
    +  check-for-full-pipeline-tests:
    +    if: github.repository == 'llvm/llvm-project'
    +    runs-on: ubuntu-24.04
    +    steps:
    +      - name: Check for new full-pipeline test invocations
    +        uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
    +        with:
    +          script: |
    +            const fs = require("fs");
    +            const marker = "<!-- flang-integration-test-check -->";
    +            const pr = context.payload.pull_request;
    +
    +            const files = await github.paginate(
    +              github.rest.pulls.listFiles,
    +              {
    +                owner: context.repo.owner,
    +                repo: context.repo.repo,
    +                pull_number: pr.number,
    +                per_page: 100,
    +              },
    +            );
    +
    +            const findings = [];
    +            for (const file of files) {
    +              if (!file.filename.startsWith("flang/test/") || !file.patch)
    +                continue;
    +
    +              // Only report newly added uses. Existing full-pipeline tests do
    +              // not need to be justified again when an unrelated line changes.
    +              const addsEmitLLVM = file.patch.split("\n").some(
    +                line => /^\+(?!\+\+)/.test(line) && /\bRUN:/.test(line) &&
    +                  /(^|\s)-emit-llvm(?=\s|=|$)/.test(line),
    +              );
    +              if (addsEmitLLVM)
    +                findings.push(`- \`${file.filename}\``);
    +            }
    +
    +            const comments = await github.paginate(
    +              github.rest.issues.listComments,
    +              {
    +                owner: context.repo.owner,
    +                repo: context.repo.repo,
    +                issue_number: pr.number,
    +                per_page: 100,
    +              },
    +            );
    +            const previous = comments.find(
    +              comment => comment.user.login === "github-actions[bot]" &&
    +                comment.body.includes(marker),
    +            );
    kiranchandramohan kiranchandramohan commented on code on Sep 22, 2026 21:13 UTC
    Code Review
    .github/workflows/flang-integration-test-check.yml:1
    @@ -0,0 +1,102 @@
    +name: Flang integration test check
    +
    +on:
    +  pull_request:
    +    types: [opened, synchronize, reopened]
    +    paths:
    +      - "flang/**"
    +      - ".github/workflows/flang-integration-test-check.yml"
    +
    +permissions:
    +  contents: read
    +  pull-requests: read
    +
    +jobs:
    +  check-for-full-pipeline-tests:
    +    if: github.repository == 'llvm/llvm-project'
    +    runs-on: ubuntu-24.04
    +    steps:
    +      - name: Check for new full-pipeline test invocations
    +        uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
    +        with:
    +          script: |
    +            const fs = require("fs");
    +            const marker = "<!-- flang-integration-test-check -->";
    +            const pr = context.payload.pull_request;
    +
    +            const files = await github.paginate(
    +              github.rest.pulls.listFiles,
    +              {
    +                owner: context.repo.owner,
    +                repo: context.repo.repo,
    +                pull_number: pr.number,
    +                per_page: 100,
    +              },
    +            );
    +
    +            const findings = [];
    +            for (const file of files) {
    +              if (!file.filename.startsWith("flang/test/") || !file.patch)
    +                continue;
    kiranchandramohan kiranchandramohan commented on Sep 22, 2026 21:15 UTC
    Author

    These are all AI generated comments, but I found them interesting enough to share.

    Thanks @eugeneepshteyn for all the suggestions. I believe, I have added all your suggestions except for the concurrency part. Since the PR changed before your comments, i was not able to apply your suggestions directly in Github. I have added you as co-author in the summary since you had several inline code suggestions.

    eugeneepshteyn eugeneepshteyn approved these changes on Sep 22, 2026 22:09 UTC
    Approved Reviewer

    LGTM, thank you!

    boomanaiden154 boomanaiden154 approved these changes on Sep 23, 2026 01:22 UTC
    Approved Reviewer

    LGTM. It would be nice if we could test this before landing, but that can sometimes be difficult.

    github-actions[bot] github-actions[bot] commented on Oct 20, 2026 11:41 UTC
    Bot

    <!-- flang-integration-test-check -->

    No additional full-pipeline test invocations were detected under flang/test/.

    Reviewers
    Assignees
    kiranchandramohan kiranchandramohan
    Labels
    risk: low confidence: 77.3% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 31.5% (LOW) · Higher = larger blast radius
    31.5%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 77.3% · Lower = rushed or shallow review
    77.3%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 7.1% · Safe to merge
    7.1%