Skip to content

Conversation

@Judahmeek
Copy link
Contributor

@Judahmeek Judahmeek commented Nov 16, 2025

Seeing if I can reproduce the CI results for 0b4dd06

Really just running over a lot of Chesterton's fences in order to refamiliarize myself with the codebase, especially CI.


This change is Reviewable

Summary by CodeRabbit

  • Chores

    • Improved CI caching for faster runs and updated trigger filters to skip docs and Pro-only paths.
    • Refined change-detection with more granular Pro-specific gating to avoid unnecessary jobs.
    • Adjusted integration testing matrix and trigger conditions for clearer job selection.
  • New Features

    • Added a manual "force run" workflow input to trigger full CI when needed.
    • Introduced a dedicated workflow for linting GitHub Actions.

@claude
Copy link

claude bot commented Nov 16, 2025

Code Review Summary

PR Type: Test PR (Empty Commit)

Overview

This PR contains an empty commit created to reproduce CI results from a previous commit. There are no code changes to review.

Review Findings

Code Quality: N/A - No code changes
Potential Bugs: N/A - No code changes
Performance: N/A - No code changes
Security: N/A - No code changes
Test Coverage: N/A - No code changes

CI Status

All CI checks are passing or appropriately skipped:

  • ✅ detect-changes completed successfully across all workflows
  • ⏭️ Pro integration tests, lint, and package tests appropriately skipped (no Pro changes)
  • 🔄 claude-review in progress

Observations

  1. Purpose: This appears to be a diagnostic PR to test CI behavior related to PR #1995 commit 0b4dd06

  2. CI Optimization: The CI workflows correctly detected no relevant changes and skipped unnecessary test runs, which is the expected behavior for an empty commit.

  3. Next Steps: Once the CI investigation is complete, this PR should be closed without merging since it contains no actual changes.

Recommendation

This is a valid test PR for CI debugging purposes. No code review feedback applicable. Close without merging once the CI investigation is complete.


Review conducted by Claude Code following repository conventions from CLAUDE.md

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 16, 2025

Warning

Rate limit exceeded

@Judahmeek has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 7 minutes and 33 seconds before requesting another review.

⌛ How to resolve this issue?

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

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

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

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

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 18c8ebb and a84e852.

📒 Files selected for processing (1)
  • .github/workflows/integration-tests.yml (5 hunks)

Walkthrough

Multiple CI workflows and the change-detection script were updated: path-based trigger ignores added, a force_run workflow_dispatch input introduced, Node setup caching switched to yarn, Actionlint centralized into a new workflow, and the change detector extended with granular React on Rails Pro flags and outputs.

Changes

Cohort / File(s) Summary
General CI workflow updates
.github/workflows/lint-js-and-ruby.yml, .github/workflows/package-js-tests.yml, .github/workflows/gem-tests.yml, .github/workflows/integration-tests.yml, .github/workflows/playwright.yml, .github/workflows/examples.yml
Add path-based ignores (e.g., react_on_rails_pro/**, packages/**, docs/ and Markdown patterns where applicable); add workflow_dispatch force_run input where present; adjust detect-changes conditions to consider force_run OR full-ci label; small comment-only edit in examples workflow.
Pro-specific workflows
.github/workflows/pro-integration-tests.yml, .github/workflows/pro-lint.yml, .github/workflows/pro-test-package-and-gem.yml
Add path-ignore patterns excluding docs/lib/spec/packages/react_on_rails; switch Node setup cache to yarn in multiple job steps; remove prior V8/cache workaround comments.
New actionlint workflow
.github/workflows/actionlint.yml
New workflow that conditionally detects changes to .github/workflows/**, caches/downloads actionlint, and runs actionlint only when workflow files changed.
CI change detector script
script/ci-changes-detector
Refactor to introduce granular Pro flags (PRO_LINT_CONFIG_CHANGED, PRO_RUBY_CHANGED, PRO_RSPEC_CHANGED, PRO_JS_CHANGED, PRO_DUMMY_CHANGED), remove PRO_CHANGED and WORKFLOWS_CHANGED, expand Pro path matching, update gating flags (RUN_PRO_LINT, RUN_PRO_TESTS, RUN_PRO_DUMMY_TESTS), and emit additional GitHub Actions/JSON outputs.

Sequence Diagram(s)

sequenceDiagram
    participant GH as GitHub Event
    participant Detector as script/ci-changes-detector
    participant WorkflowCond as Workflow Conditions
    participant Runner as GitHub Actions Runner

    GH->>Detector: event + changed paths + inputs (force_run, labels)
    Note over Detector: Classify changes into core and Pro categories\nSet flags (RUBY/JS/RSPEC/PRO_*)
    alt force_run = true OR full-ci label present
        Detector->>WorkflowCond: set run_all = true
    else
        Detector->>WorkflowCond: emit granular flags for gating
    end
    WorkflowCond->>Runner: enable/disable jobs (lint, tests, pro-tests, dummy)
    Runner->>Runner: execute enabled jobs
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

-重点审查项:

  • script/ci-changes-detector: pattern matching, new PRO_* flags, outputs and gating logic.
  • Workflows: consistent path-ignore lists, correct placement of force_run input, updated detect conditions.
  • actionlint workflow: diff detection, caching, conditional download/run steps.

Possibly related PRs

Suggested reviewers

  • justin808
  • alexeyr-ci2
  • AbanoubGhadban

Poem

🐇 I hopped through YAMLs, sniffed each changed line,
Ignored some paths, cached Node with yarn fine,
Pro flags now whisper where the changes hide,
Only curious jobs will spring open wide,
A rabbit cheers the CI — neat and concise! 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Enhance change detection & workflow triggers' directly reflects the core changes in the PR, which involve improving the CI change detection logic and updating workflow trigger filters across multiple files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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.

@claude
Copy link

claude bot commented Nov 16, 2025

PR Review: Test PR with empty commit

Overview

This PR updates GitHub Actions workflow configurations to add path filtering and workflow dispatch options. The changes aim to optimize CI runs by skipping workflows when irrelevant files change.


Code Quality & Best Practices

Strengths

  1. Consistent path filtering: The PR systematically adds paths-ignore filters across workflows to prevent unnecessary CI runs
  2. Good separation of concerns: Open source and Pro workflows properly ignore each other's directories
  3. Workflow dispatch enhancement: Added force_run input to multiple workflows for manual override capability

⚠️ Issues Found

1. Incomplete force_run implementation (Medium Priority)

Several workflows receive the force_run input but don't actually use it:

  • lint-js-and-ruby.yml
  • package-js-tests.yml
  • rspec-gem-specs.yml
  • playwright.yml

Expected behavior: These workflows should have a detect-changes job that respects the force_run input, similar to how other workflows handle it.

Recommendation: Either:

  • Add logic to use force_run in the detect-changes job, OR
  • Remove the force_run input if not intended to be used
2. Path filter inconsistency (Low Priority)

rspec-gem-specs.yml ignores all of packages/**, but this seems overly broad. The workflow previously had more specific exclusions:

# Before:
- 'packages/react-on-rails/src/**'
- 'node_package/src/**'

# After:
- 'packages/**'

Issue: Changes to packages/react-on-rails/package.json or other non-source files might be relevant for gem specs.

Recommendation: Consider being more specific with exclusions, or document why the broader exclusion is intentional.

3. ci-changes-detector script modification (Low Priority)

The change from:

.github/workflows/*)

to:

.github/workflows/*|rakelib/*)

Concern: Now changes to ANY file in rakelib/ will trigger WORKFLOWS_CHANGED=true, which may be overly broad. Not all rake tasks are workflow-related.

Recommendation: Be more specific about which rakelib files affect workflows (e.g., rakelib/examples.rake is already covered under generators).

4. Missing TODO comment (Low Priority)

examples.yml adds a TODO comment:

name: Generator tests # TODO needs to be duplicated for RoR Pro

Recommendation: Create a tracking issue for this TODO and reference it in the comment.


Performance Considerations

Positive Impact: The path filtering will significantly reduce unnecessary CI runs, saving compute resources and time.

⚠️ Risk: Overly aggressive filtering might skip important tests. Key areas to verify:

  • Changes to .github/workflows/ files themselves should still trigger relevant workflows
  • Dependency file changes (package.json, Gemfile) should trigger appropriate tests

Security Concerns

No security issues identified. The changes are configuration-only and don't introduce code execution risks.


Test Coverage

Missing: This PR lacks tests for the workflow changes. While workflow files are harder to test, consider:

  1. Testing the ci-changes-detector script with various file change scenarios
  2. Verifying that the path filters work as expected (you could manually test by creating PRs with different file changes)

Test plan suggestions:

  • Test with changes to react_on_rails_pro/ only → should skip open-source workflows
  • Test with changes to .github/workflows/ → should trigger appropriate workflows
  • Test with changes to docs/ only → should skip all code-related workflows
  • Test the force_run input on workflows that implement it

Additional Recommendations

  1. Verify path filters match ci-changes-detector logic: The path filters in workflows should align with the detection logic in the script
  2. Consider adding documentation: Document the CI optimization strategy in a CI.md or update CLAUDE.md
  3. File rename consistency: Good job renaming workflows for clarity (main.ymlintegration-tests.yml, etc.)

Summary

Approval Status: ⚠️ Approve with minor concerns

The changes are generally sound and will improve CI efficiency. However, the force_run inputs appear incomplete, and some path filters may be overly broad. I recommend addressing the force_run implementation before merging.

Priority fixes:

  1. Either implement or remove unused force_run inputs
  2. Test the path filtering with various change scenarios
  3. Consider tightening the rakelib/ trigger in ci-changes-detector

Review generated per CLAUDE.md guidelines. This PR contains configuration changes that improve CI efficiency but needs minor refinements before merging.

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

🧹 Nitpick comments (4)
.github/workflows/lint-js-and-ruby.yml (1)

16-22: Unused force_run input — recommend implementing bypass logic.

The force_run input is declared but not used in the detect-changes step. Compare with .github/workflows/integration-tests.yml line 48, which properly checks if [ "${{ inputs.force_run }}" = "true" ]. Add this logic to make the input functional.

         id: detect
         run: |
-          # If full-ci label is present, run everything
-          if [ "${{ steps.check-label.outputs.result }}" = "true" ]; then
+          # If force_run is true OR full-ci label is present, run everything
+          if [ "${{ inputs.force_run }}" = "true" ] || [ "${{ steps.check-label.outputs.result }}" = "true" ]; then
             echo "run_lint=true" >> "$GITHUB_OUTPUT"
.github/workflows/package-js-tests.yml (1)

20-26: Unused force_run input — recommend implementing bypass logic.

The force_run input is declared but not checked in the detect-changes step (lines 48–64). For consistency with other workflows and to make this input functional, add the force_run check: if [ "${{ inputs.force_run }}" = "true" ] || [ "${{ steps.check-label.outputs.result }}" = "true" ].

         id: detect
         run: |
-          # If full-ci label is present, run everything
-          if [ "${{ steps.check-label.outputs.result }}" = "true" ]; then
+          # If force_run is true OR full-ci label is present, run everything
+          if [ "${{ inputs.force_run }}" = "true" ] || [ "${{ steps.check-label.outputs.result }}" = "true" ]; then
             echo "run_lint=true" >> "$GITHUB_OUTPUT"
.github/workflows/examples.yml (1)

1-1: TODO comment in workflow name — consider tracking as an issue.

The appended TODO comment about duplicating this workflow for RoR Pro is useful context, but workflow names should remain clean for clarity. Consider creating a GitHub issue to track this work instead of embedding it in the workflow name.

-name: Generator tests # TODO needs to be duplicated for RoR Pro
+name: Generator tests

With a corresponding GitHub issue created to track the duplication work for Pro.

.github/workflows/playwright.yml (1)

9-15: Note: force_run input declared but has no effect in this workflow.

The force_run input is declared but this workflow lacks a detect-changes job or conditional logic that would consume it. Clarify intent: if this workflow should always run on workflow_dispatch, the input may be unnecessary. If you'd like to add smart change-detection (e.g., skip on docs-only changes), implement a detect-changes job and conditional if statements on jobs, similar to other workflows.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 12151f9 and a8f30e9.

📒 Files selected for processing (10)
  • .github/workflows/examples.yml (1 hunks)
  • .github/workflows/integration-tests.yml (2 hunks)
  • .github/workflows/lint-js-and-ruby.yml (1 hunks)
  • .github/workflows/package-js-tests.yml (1 hunks)
  • .github/workflows/playwright.yml (1 hunks)
  • .github/workflows/pro-gem-tests.yml (1 hunks)
  • .github/workflows/pro-integration-tests.yml (1 hunks)
  • .github/workflows/pro-lint.yml (1 hunks)
  • .github/workflows/rspec-gem-specs.yml (1 hunks)
  • script/ci-changes-detector (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: alexeyr-ci2
Repo: shakacode/react_on_rails PR: 1732
File: spec/dummy/client/app-react16/startup/ReduxSharedStoreApp.client.jsx:40-44
Timestamp: 2025-04-26T21:55:55.874Z
Learning: In the react_on_rails project, files under `app-react16` directories are copied/moved to corresponding `/app` directories during the conversion process (removing the `-react16` suffix), which affects their relative import paths at runtime.
Learnt from: Romex91
Repo: shakacode/react_on_rails PR: 1697
File: package-scripts.yml:28-28
Timestamp: 2025-02-12T16:38:06.537Z
Learning: The file `node_package/lib/ReactOnRails.full.js` is autogenerated during the build process and should not be present in the repository.
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1875
File: lib/react_on_rails/utils.rb:112-124
Timestamp: 2025-10-23T17:22:01.074Z
Learning: In React on Rails, when Pro is installed but not licensed, the intended behavior is to raise an error on boot. The `react_on_rails_pro?` method validates licenses and should raise errors early (including during path resolution in methods like `server_bundle?`) to enforce licensing requirements rather than failing later with obscure errors.
📚 Learning: 2025-02-12T16:38:06.537Z
Learnt from: Romex91
Repo: shakacode/react_on_rails PR: 1697
File: package-scripts.yml:28-28
Timestamp: 2025-02-12T16:38:06.537Z
Learning: The file `node_package/lib/ReactOnRails.full.js` is autogenerated during the build process and should not be present in the repository.

Applied to files:

  • .github/workflows/integration-tests.yml
  • .github/workflows/package-js-tests.yml
📚 Learning: 2025-04-26T21:55:55.874Z
Learnt from: alexeyr-ci2
Repo: shakacode/react_on_rails PR: 1732
File: spec/dummy/client/app-react16/startup/ReduxSharedStoreApp.client.jsx:40-44
Timestamp: 2025-04-26T21:55:55.874Z
Learning: In the react_on_rails project, files under `app-react16` directories are copied/moved to corresponding `/app` directories during the conversion process (removing the `-react16` suffix), which affects their relative import paths at runtime.

Applied to files:

  • .github/workflows/integration-tests.yml
📚 Learning: 2025-09-15T21:24:48.207Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1781
File: node_package/src/ClientSideRenderer.ts:82-95
Timestamp: 2025-09-15T21:24:48.207Z
Learning: In React on Rails, the force_load feature includes both explicit `data-force-load="true"` usage and the ability to hydrate components during the page loading state (`document.readyState === 'loading'`). Both capabilities require a Pro license, so the condition `!railsContext.rorPro && (isComponentForceLoaded || document.readyState === 'loading')` correctly gates both scenarios.

Applied to files:

  • .github/workflows/package-js-tests.yml
⏰ 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: build
  • GitHub Check: claude-review
🔇 Additional comments (11)
.github/workflows/integration-tests.yml (3)

1-1: Good workflow rename for clarity.

Renaming from "Main test" to "Integration Tests" better describes the workflow's scope and aligns with the PR's objective to organize CI workflows.


7-15: Appropriate path-ignore patterns for change detection.

The addition of react_on_rails_pro/** to both push and pull_request path-ignore entries aligns with the broader CI strategy to skip this workflow when only Pro-specific changes occur.


16-22: Well-implemented force_run input.

The force_run input is properly declared with sensible defaults (boolean, default false), and the detect-changes step correctly implements the logic to bypass change detection when triggered.

.github/workflows/pro-lint.yml (2)

7-19: Consistent path-ignore configuration with Pro-specific exclusions.

The path-ignore patterns exclude documentation, non-Pro packages, and test files, ensuring the Pro lint workflow only runs on meaningful changes to the Pro codebase.


21-26: Properly implemented force_run input with correct detect-changes logic.

The workflow correctly implements the force_run bypass pattern, allowing developers to override change detection when needed for debugging or manual CI runs.

.github/workflows/pro-gem-tests.yml (2)

7-12: Appropriate path-ignore patterns for Pro package tests.

Path-ignore entries exclude documentation, core library code, and main package code, ensuring the Pro tests workflow focuses only on Pro-specific changes.

Also applies to: 14-19


21-26: Force_run input properly integrated with change detection logic.

The workflow correctly implements the force_run input with proper detect-changes logic at line 53.

.github/workflows/pro-integration-tests.yml (1)

7-12: Consistent path-ignore patterns for Pro integration tests.

Path-ignore entries exclude documentation, core code, and non-Pro packages, aligning with the broader CI strategy to minimize unnecessary workflow runs on non-code changes.

Also applies to: 14-19

.github/workflows/examples.yml (1)

14-20: Force_run input properly implemented with bypass logic.

The workflow correctly handles the force_run input in the detect-changes step (line 46), ensuring developers can manually trigger full CI runs when needed.

.github/workflows/playwright.yml (1)

6-8: Added path-ignore patterns improve workflow efficiency.

The path-ignore entries for Markdown and docs ensure the Playwright E2E workflow skips unnecessary runs on documentation-only changes to master branch.

.github/workflows/rspec-gem-specs.yml (1)

10-11: LGTM! Path-ignore patterns are more maintainable.

Consolidating the ignore patterns from specific subdirectories (packages/react-on-rails/src/**, node_package/src/**) to broader top-level directories (packages/**) and adding react_on_rails_pro/** makes the configuration simpler and more maintainable.

Also applies to: 16-17

@claude
Copy link

claude bot commented Nov 16, 2025

Code Review

Thanks for working on optimizing the CI workflows! This PR makes sensible improvements to reduce unnecessary CI runs. Here's my detailed feedback:

✅ Strengths

  1. Smart path filtering: Adding react_on_rails_pro/** to the open-source workflows prevents unnecessary runs when only Pro code changes
  2. Consistent force_run inputs: Adding workflow_dispatch inputs across workflows improves manual testing capabilities
  3. Better workflow naming: Renaming files for clarity (main.yml → integration-tests.yml, etc.) improves discoverability
  4. Expanded change detection: Including rakelib/* in the ci-changes-detector makes sense since rake tasks affect CI behavior

⚠️ Issues Found

1. File Rename Will Break CI History (High Priority)

The PR renames workflow files which can break GitHub Actions history and branch protection rules. GitHub treats renamed workflow files as deletions + new workflows.

Recommendation: Only change the name: field (display name), NOT the filename. If filename changes are necessary, update branch protection rules first.

2. Inconsistent force_run Input Support

Verify that all workflows with force_run inputs actually check them in detect-changes logic.

3. Potential Issue: rakelib/* Pattern Too Broad

Line 117 in ci-changes-detector now triggers WORKFLOWS_CHANGED for ANY rakelib change. Should this be more granular?

4. TODO Comment in Production Code

Line 1 of examples.yml has an untracked TODO. Consider creating an issue and referencing it.

📊 Performance & Security

Performance: Path filtering should provide good CI time savings ✅
Security: No security issues identified ✅

Recommendations Summary

  1. Don't rename workflow files - only change the name: field
  2. Ensure all workflows with force_run inputs check them in detect-changes
  3. Clarify if rakelib/* should trigger all linting or be more specific
  4. Verify react_on_rails_pro/** exclusions are complete across all relevant workflows
  5. Convert TODO to tracked issue or add issue reference

Overall, this is a valuable optimization effort! The path filtering logic is sound, but the workflow file renames need careful consideration.

@claude
Copy link

claude bot commented Nov 16, 2025

Code Review

Thank you for this PR! This is a nice improvement to the CI optimization strategy. I've reviewed the changes and have the following feedback:

✅ Strengths

  1. Consistent Pattern: The addition of paths-ignore and force_run inputs follows a consistent pattern across all workflows, which improves maintainability.

  2. CI Efficiency: By adding path filtering to exclude irrelevant changes (docs, markdown files, Pro package from OSS workflows), this should reduce unnecessary CI runs.

  3. Better Workflow Names: Renaming workflows for clarity (main.yml to integration-tests.yml, pro-package-tests.yml to pro-gem-tests.yml, rspec-package-specs.yml to rspec-gem-specs.yml).

  4. Script Enhancement: The ci-changes-detector script now includes rakelib/ in workflow change detection, which is correct since rake tasks affect CI behavior.

🐛 Potential Issues

1. Inconsistent Pro Package Filtering (High Priority)

The OSS workflows correctly exclude react_on_rails_pro/, but the Pro workflows have overly broad exclusions that exclude ALL of lib/, spec/, and packages/.

Problem: Changes to core React on Rails code can affect the Pro package. Changes to lib/react_on_rails/helper.rb should trigger Pro tests, and changes to packages/react-on-rails/src/ could break Pro features since Pro depends on the OSS gem as a foundation.

Recommendation: Either remove these paths-ignore from Pro workflows entirely (safest), or use more specific exclusions.

2. Missing force_run Implementation in Some Workflows

While force_run input is added to several workflows, the detect-changes job doesn't always check it. The input is defined but never checked in lint-js-and-ruby.yml, package-js-tests.yml, and rspec-gem-specs.yml.

Fix: Add force_run check to all workflows that define it (see pro-lint.yml for reference implementation).

3. Playwright Workflow Doesn't Need Change Detection

playwright.yml adds paths-ignore and force_run input, but has no detect-changes job. This means the force_run input does nothing.

Recommendation: Either add change detection (like other workflows) or remove the unused force_run input.

4. TODO Comment Needs Action

The TODO comment about duplicating Generator tests for RoR Pro should either be addressed in this PR or tracked in an issue.

📊 Testing Recommendations

Before merging, please verify:

  1. Test Pro workflow triggers with a change to lib/react_on_rails/helper.rb
  2. Test path filtering with a docs-only change
  3. Test force_run by manually triggering a workflow

Overall Assessment

This is a solid foundation for CI optimization, but the Pro package path filtering needs attention before merge. The current exclusions could cause Pro CI to skip when it should run, potentially breaking Pro features.

Recommended Action:

  1. Remove or narrow the paths-ignore in Pro workflows
  2. Implement force_run checks in all workflows that define the input
  3. Test the changes with various file modification scenarios

Review generated by Claude Code following project conventions from CLAUDE.md

@claude
Copy link

claude bot commented Nov 16, 2025

I have reviewed PR #2020. Here are my findings:

Strengths:

  • CI efficiency improvements with paths-ignore filters
  • Consistent workflow_dispatch with force_run inputs
  • Pro package isolation from OSS changes
  • Change detector enhancement for rakelib/*

Critical Issues:

  1. File renames may not be properly tracked - verify git mv was used for main.yml, rspec-package-specs.yml, pro-package-tests.yml

  2. Incomplete workflow_dispatch - lint-js-and-ruby.yml and package-js-tests.yml have force_run input but do not check it in detect-changes

  3. Path filter too broad - rspec-gem-specs.yml now ignores all packages/** instead of just packages//src/

  4. playwright.yml missing pull_request trigger with path filters

  5. TODO comment in examples.yml needs action or issue tracking

Testing Recommendations:

  • Verify renamed workflows in GitHub Actions UI
  • Test path filters with docs-only and pro-only changes
  • Test manual triggers with force_run=true

Overall: Good optimization work but needs completion of workflow_dispatch logic and verification of git renames.

@Judahmeek Judahmeek changed the title Test PR with empty commit Enhance change detection & workflow triggers Nov 16, 2025
@claude
Copy link

claude bot commented Nov 16, 2025

PR Review: Test PR with empty commit

Overview

This PR implements CI optimization improvements by adding path-based filtering to GitHub Actions workflows and extracting actionlint into a separate workflow.

Critical Issues Found

1. JSON Syntax Error (script/ci-changes-detector:253)
Missing comma after line 253 in the JSON output. This will break CI when CI_JSON_OUTPUT=1.

2. Incorrect Workflow Name (actionlint.yml:1)
Named "Lint JS and Ruby" but only runs actionlint. Should be "Lint GitHub Actions".

3. Push Event Handling (actionlint.yml:36)
Uses github.event.pull_request.base.sha which is undefined on push events. Will fail for direct commits to master.

Strengths

  • Excellent separation of concerns with dedicated actionlint workflow
  • Comprehensive path filtering to reduce CI waste
  • Better granularity in ci-changes-detector script
  • Consistent workflow_dispatch inputs across all workflows

Recommendations

Before merging:

  1. Fix JSON syntax error (CRITICAL)
  2. Fix actionlint workflow name
  3. Handle push events properly in actionlint.yml
  4. Verify Node 22 cache issue is resolved before re-enabling cache
  5. Test ci-changes-detector with various scenarios

The architectural improvements are sound, but please address the critical issues first.

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 (2)
script/ci-changes-detector (1)

89-89: Verify generator file patterns match actual filenames.

A previous review noted that the generator patterns may have filename mismatches. Specifically:

  • rakelib/example_config.yml may need to be rakelib/examples_config.yml (plural)
  • rakelib/examples.rake may not exist

Run this script to verify the actual filenames:

#!/bin/bash
echo "=== Checking generator-related rakelib files ==="
fd -t f . rakelib/ | grep -E "(example|generator)"

echo ""
echo "=== Files referenced in pattern (line 89) ==="
echo "- rakelib/example_type.rb"
echo "- rakelib/example_config.yml"
echo "- rakelib/shakapacker_examples.rake"
.github/workflows/gem-tests.yml (1)

18-24: The force_run input is still not checked in the detect-changes job.

The force_run input was added but is never referenced in the workflow. Looking at lines 49-58, the detect-changes step only checks for the full-ci label but doesn't honor inputs.force_run.

Apply this diff to check the force_run input:

       - name: Detect relevant changes
         id: detect
         run: |
+          # If force_run is true OR full-ci label is present, run everything
+          if [ "${{ inputs.force_run }}" = "true" ] || [ "${{ steps.check-label.outputs.result }}" = "true" ]; then
-          # If full-ci label is present, run everything
-          if [ "${{ steps.check-label.outputs.result }}" = "true" ]; then
🧹 Nitpick comments (2)
.github/workflows/actionlint.yml (2)

1-1: Workflow name is misleading.

The workflow is named "Lint JS and Ruby" but only runs actionlint for GitHub Actions workflows. Consider renaming to "Lint GitHub Actions Workflows" or "Actionlint" to accurately reflect its purpose.

Apply this diff:

-name: Lint JS and Ruby
+name: Lint GitHub Actions Workflows

14-18: The force_run input is declared but never used.

The workflow declares a force_run input but never checks it. Since the workflow already gates execution on workflow file changes (line 37), the force_run input could be useful to bypass that check when needed.

Consider either:

  1. Using the input to skip the change detection (lines 33-48) when force_run is true, or
  2. Removing the unused input if it's not needed.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a8f30e9 and bc9bfc8.

📒 Files selected for processing (8)
  • .github/workflows/actionlint.yml (1 hunks)
  • .github/workflows/gem-tests.yml (1 hunks)
  • .github/workflows/lint-js-and-ruby.yml (2 hunks)
  • .github/workflows/main.yml (2 hunks)
  • .github/workflows/pro-integration-tests.yml (4 hunks)
  • .github/workflows/pro-lint.yml (2 hunks)
  • .github/workflows/pro-test-package-and-gem.yml (3 hunks)
  • script/ci-changes-detector (7 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • .github/workflows/lint-js-and-ruby.yml
  • .github/workflows/pro-lint.yml
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: alexeyr-ci2
Repo: shakacode/react_on_rails PR: 1732
File: spec/dummy/client/app-react16/startup/ReduxSharedStoreApp.client.jsx:40-44
Timestamp: 2025-04-26T21:55:55.874Z
Learning: In the react_on_rails project, files under `app-react16` directories are copied/moved to corresponding `/app` directories during the conversion process (removing the `-react16` suffix), which affects their relative import paths at runtime.
📚 Learning: 2025-10-23T17:22:01.074Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1875
File: lib/react_on_rails/utils.rb:112-124
Timestamp: 2025-10-23T17:22:01.074Z
Learning: In React on Rails, when Pro is installed but not licensed, the intended behavior is to raise an error on boot. The `react_on_rails_pro?` method validates licenses and should raise errors early (including during path resolution in methods like `server_bundle?`) to enforce licensing requirements rather than failing later with obscure errors.

Applied to files:

  • script/ci-changes-detector
📚 Learning: 2025-04-26T21:55:55.874Z
Learnt from: alexeyr-ci2
Repo: shakacode/react_on_rails PR: 1732
File: spec/dummy/client/app-react16/startup/ReduxSharedStoreApp.client.jsx:40-44
Timestamp: 2025-04-26T21:55:55.874Z
Learning: In the react_on_rails project, files under `app-react16` directories are copied/moved to corresponding `/app` directories during the conversion process (removing the `-react16` suffix), which affects their relative import paths at runtime.

Applied to files:

  • script/ci-changes-detector
  • .github/workflows/main.yml
📚 Learning: 2025-02-18T13:08:01.477Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1644
File: lib/react_on_rails/helper.rb:190-197
Timestamp: 2025-02-18T13:08:01.477Z
Learning: RSC support validation in React on Rails Pro is handled through a chain of validations:
1. Pro version check in `run_stream_inside_fiber`
2. RSC support check during pack generation via `ReactOnRailsPro.configuration.enable_rsc_support`
3. RSC support validation during component registration
This makes additional validation in the helper methods unnecessary.

Applied to files:

  • script/ci-changes-detector
📚 Learning: 2025-02-12T16:38:06.537Z
Learnt from: Romex91
Repo: shakacode/react_on_rails PR: 1697
File: package-scripts.yml:28-28
Timestamp: 2025-02-12T16:38:06.537Z
Learning: The file `node_package/lib/ReactOnRails.full.js` is autogenerated during the build process and should not be present in the repository.

Applied to files:

  • .github/workflows/main.yml
⏰ 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). (3)
  • GitHub Check: lint-js-and-ruby
  • GitHub Check: build
  • GitHub Check: claude-review
🔇 Additional comments (7)
.github/workflows/main.yml (1)

10-10: LGTM! Path-ignore additions align with Pro exclusion strategy.

Adding react_on_rails_pro/** to the path-ignore list is consistent with the broader CI optimization effort to separate React on Rails Pro workflows from the main integration tests.

Also applies to: 15-15

.github/workflows/gem-tests.yml (1)

10-11: LGTM! Path-ignore broadening is appropriate.

Expanding from specific source paths to packages/** and adding react_on_rails_pro/** simplifies the exclusion rules while maintaining the same intent of skipping gem tests when only package or Pro code changes.

Also applies to: 16-17

.github/workflows/pro-test-package-and-gem.yml (2)

86-86: Switching to yarn cache is a good improvement.

Enabling yarn caching will speed up these jobs now that the Node 22 V8 bug workaround is no longer needed.

Also applies to: 178-178


7-19: Path-ignore exclusions create a process gap—root lib changes won't trigger Pro tests despite Pro's dependency on the root gem.

The verification reveals a substantive concern. While the path-ignore patterns (lib/**, spec/**) are processed at the workflow level, the ci-changes-detector script enforces a deliberate separation: it only sets run_pro_tests=true when Pro-specific code changes (PRO_RUBY_CHANGED, PRO_RSPEC_CHANGED, PRO_JS_CHANGED), never when root lib/** changes (RUBY_CHANGED).

This creates a process gap: if a developer modifies only root lib/** (without touching Pro code), the entire workflow skips due to path-ignore patterns. More critically, the ci-changes-detector script contains no logic to trigger Pro tests when root lib/** changes—even if the workflow did run. Since Pro's gemspec explicitly declares a runtime dependency on the root react_on_rails gem, changes to root lib/** can affect Pro functionality but won't execute Pro tests.

Verify whether this design is intentional (i.e., Pro tests are isolated unit tests with integration tested elsewhere) or a missed edge case in change detection logic. If intentional, document this assumption. If not, consider adding a rule to ci-changes-detector that sets RUN_PRO_TESTS=true when root RUBY_CHANGED=true.

.github/workflows/pro-integration-tests.yml (2)

7-19: Verify that path-ignore exclusions won't skip necessary integration tests.

Similar to pro-test-package-and-gem.yml, this workflow excludes lib/**, spec/**, and packages/react_on_rails/**. The exclusion of packages/react_on_rails/** makes sense since Pro has its own package.

However, ensure that changes to root lib/** truly never affect Pro integration tests, especially if Pro depends on shared utilities or the base gem.

The same verification script from pro-test-package-and-gem.yml applies here—check for cross-references between root and Pro code.


86-86: Enabling yarn cache across all Node setup steps is a solid optimization.

Consistent caching will improve CI performance for all three jobs that use Node.

Also applies to: 173-173, 361-361

script/ci-changes-detector (1)

57-67: Pro-specific change tracking is well-structured.

The addition of granular Pro flags (PRO_LINT_CONFIG_CHANGED, PRO_RSPEC_CHANGED, PRO_JS_CHANGED, PRO_DUMMY_CHANGED) provides fine-grained control over which Pro CI jobs run, mirroring the structure used for the main React on Rails codebase. The logic correctly propagates these flags through the decision tree.

Also applies to: 107-140, 184-225

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@claude
Copy link

claude bot commented Nov 16, 2025

Code Review - PR #2020: Enhance change detection & workflow triggers

Overview

This PR makes significant improvements to CI/CD workflow efficiency by:

  • Adding a dedicated actionlint workflow
  • Improving path-based filtering across all workflows
  • Enhancing the change detection script with Pro-specific tracking
  • Re-enabling yarn caching (Node.js 22 V8 bug appears resolved)
  • Adding manual force_run override capability

🔍 Code Quality & Best Practices

✅ Strengths

  1. Separation of Concerns: Moving actionlint to its own workflow (.github/workflows/actionlint.yml) is excellent - it's triggered specifically on workflow changes
  2. Granular Change Detection: Enhanced ci-changes-detector script now properly distinguishes between open-source and Pro changes
  3. Smart Caching: Re-enabling yarn cache will improve CI performance
  4. Manual Override: Adding force_run workflow_dispatch input provides valuable debugging capability

⚠️ Issues Found

1. CRITICAL: Incorrect Workflow Name (actionlint.yml:1)

name: Lint JS and Ruby

This should be:

name: Actionlint

The current name conflicts with .github/workflows/lint-js-and-ruby.yml and is misleading.

2. CRITICAL: JSON Syntax Error (script/ci-changes-detector:253)

  "run_pro_tests": $RUN_PRO_TESTS
  "run_pro_dummy_tests": $RUN_PRO_DUMMY_TESTS  # Missing comma\!
}

Missing comma between these two lines will cause JSON parsing failures.

3. MEDIUM: Potential Git Fetch Failure (actionlint.yml:36-38)

BASE_SHA="${{ github.event.pull_request.base.sha || github.event.before }}"
if [ -n "$BASE_SHA" ]; then
  git fetch origin "$BASE_SHA" 2>/dev/null || true
fi

On initial pushes where github.event.before is all zeros, this will silently fail. The diff command on line 48 might then fail without 2>/dev/null protection.

4. MEDIUM: Incomplete Workflow Path Updates
The PR adds react_on_rails_pro/** to path-ignore in many workflows but not consistently:

  • ✅ Added to: lint-js-and-ruby.yml, main.yml, package-js-tests.yml
  • ❌ Missing from: gem-tests.yml uses packages/** but that's different
  • ❓ Verify: Does packages/** include packages/react-on-rails-pro/?

5. LOW: Inconsistent Comment (examples.yml:1)

name: Generator tests # TODO needs to be duplicated for RoR Pro

This TODO seems unrelated to the current PR changes. Should be tracked in a separate issue.

6. LOW: Workflow Name Inconsistency (main.yml:1)
Changed from "Main test" to "Integration Tests" - good improvement, but should also update in other locations referencing this workflow (docs, PR templates, etc.)

🐛 Potential Bugs

  1. JSON Syntax Error: The missing comma in the ci-changes-detector JSON output (line 253) will break any scripts parsing this output
  2. Git Diff Silent Failures: If the base SHA doesn't exist, the diff command might fail silently or behave unexpectedly

🔒 Security Concerns

✅ No security issues identified. The changes:

  • Use standard GitHub Actions syntax
  • Don't expose secrets or credentials
  • Maintain persist-credentials: false where appropriate

⚡ Performance Considerations

Positive improvements:

  1. Yarn caching re-enabled: Significant CI speedup (removed commented-out cache due to resolved Node 22 V8 bug)
  2. Path-based filtering: Prevents unnecessary workflow runs
  3. Dedicated actionlint workflow: Only runs when workflows change
  4. Shallow checkout (fetch-depth: 1): Faster checkout in actionlint workflow

🧪 Test Coverage

⚠️ Recommendations:

  1. Test the actionlint workflow by modifying a workflow file
  2. Verify JSON output from ci-changes-detector after fixing syntax error
  3. Test edge cases:
    • Initial commits (all-zero SHA)
    • Empty commits (like this PR)
    • Mixed open-source + Pro changes

📋 Specific Recommendations

  1. Fix immediately:

    • Change actionlint workflow name to "Actionlint"
    • Add missing comma in ci-changes-detector JSON output (line 253)
  2. Review before merge:

    • Verify path-ignore patterns are consistent across all workflows
    • Ensure packages/** pattern correctly excludes Pro package
    • Test actionlint workflow on initial commits
  3. Consider for follow-up:

    • Create issue for generator test Pro duplication TODO
    • Update documentation referencing renamed workflows
    • Add integration tests for ci-changes-detector script

🎯 Verdict

CHANGES REQUESTED - Two critical bugs must be fixed:

  1. Incorrect workflow name causing conflicts
  2. JSON syntax error breaking programmatic parsing

After these fixes, this is an excellent PR that will significantly improve CI efficiency. The enhanced change detection logic is well thought out, and the separation of actionlint is a good architectural decision.


Review conducted by Claude Code following repository conventions from CLAUDE.md
Automation note: Remember to run bundle exec rubocop before pushing fixes

@coderabbitai coderabbitai bot added the full-ci label Nov 16, 2025
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: 2

🧹 Nitpick comments (1)
.github/workflows/actionlint.yml (1)

50-58: Potential issue: incomplete error handling for API call failures.

If the curl request at line 50 fails (e.g., network timeout, rate limiting), actionlint_version is never populated in GITHUB_OUTPUT. This results in an incomplete cache key at line 66 (ubuntu-22.04-actionlint- with empty version). While the workflow still functions (the cache miss is handled at line 68), this leads to cache key pollution and prevents effective caching across runs.

Add explicit error handling and fallback logic:

  response=$(curl -sf https://api.github.com/repos/rhysd/actionlint/releases/latest)
  if [ $? -eq 0 ]; then
    actionlint_version=$(echo "$response" | jq -r .tag_name)
    if [ -z "$actionlint_version" ]; then
      echo "Failed to parse Actionlint version"
      exit 1
    fi
    echo "actionlint_version=\"$actionlint_version\"" >> "$GITHUB_OUTPUT"
+  else
+    echo "Warning: Failed to fetch Actionlint version from API; using fallback cache key"
+    echo "actionlint_version=\"latest\"" >> "$GITHUB_OUTPUT"
  fi

This ensures the cache key is always populated consistently, even if the API call fails.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bc9bfc8 and b9d243a.

📒 Files selected for processing (1)
  • .github/workflows/actionlint.yml (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: alexeyr-ci2
Repo: shakacode/react_on_rails PR: 1732
File: spec/dummy/client/app-react16/startup/ReduxSharedStoreApp.client.jsx:40-44
Timestamp: 2025-04-26T21:55:55.874Z
Learning: In the react_on_rails project, files under `app-react16` directories are copied/moved to corresponding `/app` directories during the conversion process (removing the `-react16` suffix), which affects their relative import paths at runtime.
⏰ 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). (3)
  • GitHub Check: lint-js-and-ruby
  • GitHub Check: build
  • GitHub Check: claude-review

@claude
Copy link

claude bot commented Nov 16, 2025

Code Review - PR #2020: Enhance change detection & workflow triggers

Summary

This PR enhances CI efficiency by improving change detection logic and adding path-based workflow triggers. The changes significantly reduce unnecessary CI runs while maintaining comprehensive test coverage.


✅ Strengths

  1. Excellent CI Optimization

    • Path-based ignores in workflows prevent unnecessary runs when irrelevant files change
    • The new force_run manual trigger is a great escape hatch for edge cases
    • Re-enabled Node.js/Yarn caching (now that the V8 bug is resolved) will speed up workflows
  2. Better Separation of Concerns

    • Moving actionlint to its own workflow (.github/workflows/actionlint.yml) is cleaner
    • Pro-specific workflows now properly ignore open-source changes and vice versa
    • Workflow file renames improve clarity (e.g., rspec-package-specs.ymlgem-tests.yml)
  3. Enhanced Change Detection Script

    • Better granularity with separate flags for Pro components (PRO_RUBY_CHANGED, PRO_JS_CHANGED, etc.)
    • More comprehensive file pattern matching (now includes workflow files themselves)
    • New run_pro_dummy_tests output for finer-grained control

⚠️ Issues & Concerns

1. Critical: Actionlint Workflow Title Mismatch

Location: .github/workflows/actionlint.yml:1

The workflow is named "Lint JS and Ruby" but it only runs actionlint for GitHub Actions workflows. This is confusing and could mislead developers.

Current:

name: Lint JS and Ruby

Should be:

name: Lint GitHub Actions Workflows

2. Potential Bug: Git Fetch Logic in Actionlint

Location: .github/workflows/actionlint.yml:29-37

For push events, github.event.before might be 0000000000000000000000000000000000000000 (initial commit or force push). The script doesn't handle this case, unlike the main ci-changes-detector script which checks for all-zeros SHA (line 12).

Risk: Could fail silently on initial commits or force pushes, potentially skipping actionlint when workflow files change.

Suggested Fix: Add validation similar to ci-changes-detector script

3. Missing Error Handling in Actionlint Workflow

Location: .github/workflows/actionlint.yml:41

If DIFF_BASE is invalid/empty, the git diff command silently succeeds and potentially skips linting. The workflow should fail loud if something goes wrong.

Suggestion: Add validation before running git diff

4. Inconsistent Path Ignores Across Workflows

The paths-ignore patterns vary across workflows:

  • integration-tests.yml ignores react_on_rails_pro/**
  • gem-tests.yml ignores packages/** (broader than before)
  • pro-* workflows ignore lib/** and spec/**

Question: Are these patterns thoroughly tested? Could shared Ruby code (e.g., in lib/) affect Pro?

Recommendation: Document the rationale for these ignores in CLAUDE.md or add comments in the workflow files.

5. Script Logic: Lint Trigger on SPEC_DUMMY_CHANGED

Location: script/ci-changes-detector:186

The lint job runs when SPEC_DUMMY_CHANGED=true. Should dummy app config changes (e.g., webpack config) trigger linting? This might be intentional, but worth verifying.

6. Missing Test Coverage for Script Changes

The ci-changes-detector script has significant logic changes but no automated tests.

Recommendation: Consider adding basic shellcheck/bats tests or at minimum manually test these scenarios:

  • Initial commit (all-zeros SHA)
  • Force push
  • Documentation-only changes
  • Pro-only changes
  • Mixed open-source + Pro changes
  • Changes to workflow files themselves

🔍 Additional Observations

Positive Changes

  1. Comment in examples.yml (line 1): Good TODO call-out for duplicating generator tests to Pro
  2. Consistent workflow_dispatch inputs across multiple workflows improves developer experience
  3. Removed outdated Node 22 cache workaround - good housekeeping since the V8 bug is fixed

Minor Suggestions

  1. Line 159 in ci-changes-detector: TODO comment about node-renderer tests - Should this be tracked in a GitHub issue?
  2. Duplicate comments in script (lines 130 and 136): Both say "Lint/format configuration" - should distinguish between open-source and Pro configs
  3. Workflow naming consistency: Consider prefixing Pro workflows with "Pro -" (e.g., "Pro - Integration Tests") for easier filtering in GitHub UI

🧪 Testing Recommendations

Before merging, verify:

  • Actionlint runs ONLY when .github/workflows/** changes
  • Pro workflows skip when only open-source files change
  • Open-source workflows skip when only Pro files change
  • force_run: true bypasses all path filtering
  • Script handles initial commits gracefully
  • Documentation-only changes properly skip CI

🎯 Verdict

Overall Assessment: This is a valuable optimization that will save CI resources and developer time. The core logic is sound, but there are a few issues that should be addressed before merging.

Priority Fixes:

  1. Fix actionlint workflow title (Critical - confusing)
  2. Add all-zeros SHA handling to actionlint workflow (High - potential silent failure)
  3. Validate DIFF_BASE in actionlint workflow (Medium - error handling)

Nice-to-haves:

  • Add tests for ci-changes-detector script
  • Document path-ignore rationale
  • Track node-renderer TODO in an issue

Recommendation: Fix the critical and high-priority issues, then merge. The nice-to-haves can be follow-up PRs.


Great work on improving CI efficiency! 🚀

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

♻️ Duplicate comments (1)
script/ci-changes-detector (1)

88-92: Fix generator config filename in pattern (still using singular form)

case pattern at Line 89 still matches rakelib/example_config.yml, but prior analysis showed the actual file is rakelib/examples_config.yml (plural). That means changes to the real config file won’t set GENERATORS_CHANGED=true, so generator-related CI won’t run as intended.

Suggested fix:

-    lib/generators/*|lib/generators/**/*|rakelib/example_type.rb|rakelib/example_config.yml|rakelib/shakapacker_examples.rake|.github/workflows/examples.yml)
+    lib/generators/*|lib/generators/**/*|rakelib/example_type.rb|rakelib/examples_config.yml|rakelib/shakapacker_examples.rake|.github/workflows/examples.yml)

You can confirm the filename with a quick scan:

#!/bin/bash
fd 'examples?_config\.yml' rakelib -a
🧹 Nitpick comments (2)
.github/workflows/lint-js-and-ruby.yml (1)

82-82: Double-check enabling Yarn cache for Node 22 vs integration-tests.yml

Here the lint job uses Node 22 with cache: yarn, but integration-tests.yml explicitly disables Yarn caching for Node 22 due to the referenced V8 bug in 22.21.0. If that issue is still relevant for this project, you may want the same “no cache on Node 22” behavior here, or at least a short comment explaining why caching is considered safe for linting.

Please confirm against the Node 22 / V8 issue you reference in integration-tests.yml (actions/setup-node + Yarn caching) that enabling the cache here won’t reintroduce flakiness, and adjust or document accordingly.

script/ci-changes-detector (1)

57-66: Pro change flags and gating logic are coherent and match the OSS side

The new PRO_* flags (PRO_RUBY_CHANGED, PRO_JS_CHANGED, PRO_RSPEC_CHANGED, PRO_DUMMY_CHANGED, PRO_LINT_CONFIG_CHANGED) and their RUN_PRO_* conditions form a clear, parallel structure to the non‑Pro flags:

  • Lint runs for any relevant code or lint-config changes (Pro or OSS).
  • Pro gem tests run on Pro Ruby/spec/JS changes but not on dummy-only changes.
  • Pro dummy integration runs on Pro dummy changes and on Pro Ruby/JS changes.

This keeps the Pro CI behavior explicit and avoids over-triggering on docs-only changes. The comment on GENERATORS_CHANGED about duplicating to Pro is a fine future enhancement but not a blocker.

Also applies to: 160-171, 176-185, 186-216, 218-225

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b9d243a and a48a222.

📒 Files selected for processing (8)
  • .github/workflows/actionlint.yml (1 hunks)
  • .github/workflows/gem-tests.yml (2 hunks)
  • .github/workflows/integration-tests.yml (2 hunks)
  • .github/workflows/lint-js-and-ruby.yml (3 hunks)
  • .github/workflows/package-js-tests.yml (2 hunks)
  • .github/workflows/playwright.yml (1 hunks)
  • .github/workflows/pro-test-package-and-gem.yml (3 hunks)
  • script/ci-changes-detector (7 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • .github/workflows/package-js-tests.yml
  • .github/workflows/playwright.yml
  • .github/workflows/actionlint.yml
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-10-23T17:22:01.074Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1875
File: lib/react_on_rails/utils.rb:112-124
Timestamp: 2025-10-23T17:22:01.074Z
Learning: In React on Rails, when Pro is installed but not licensed, the intended behavior is to raise an error on boot. The `react_on_rails_pro?` method validates licenses and should raise errors early (including during path resolution in methods like `server_bundle?`) to enforce licensing requirements rather than failing later with obscure errors.

Applied to files:

  • script/ci-changes-detector
📚 Learning: 2025-02-12T16:38:06.537Z
Learnt from: Romex91
Repo: shakacode/react_on_rails PR: 1697
File: package-scripts.yml:28-28
Timestamp: 2025-02-12T16:38:06.537Z
Learning: The file `node_package/lib/ReactOnRails.full.js` is autogenerated during the build process and should not be present in the repository.

Applied to files:

  • .github/workflows/integration-tests.yml
📚 Learning: 2025-04-26T21:55:55.874Z
Learnt from: alexeyr-ci2
Repo: shakacode/react_on_rails PR: 1732
File: spec/dummy/client/app-react16/startup/ReduxSharedStoreApp.client.jsx:40-44
Timestamp: 2025-04-26T21:55:55.874Z
Learning: In the react_on_rails project, files under `app-react16` directories are copied/moved to corresponding `/app` directories during the conversion process (removing the `-react16` suffix), which affects their relative import paths at runtime.

Applied to files:

  • .github/workflows/integration-tests.yml
⏰ 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). (5)
  • GitHub Check: build-dummy-app-webpack-test-bundles
  • GitHub Check: build-dummy-app-webpack-test-bundles
  • GitHub Check: lint-js-and-ruby
  • GitHub Check: build
  • GitHub Check: claude-review
🔇 Additional comments (7)
.github/workflows/pro-test-package-and-gem.yml (3)

7-12: Good: Path-ignore filters reduce unnecessary CI runs for non-Pro changes.

The filters correctly exclude Markdown, documentation, main package, and test directories. This aligns with the workflow's Pro-specific focus and prevents CI overhead from commits that don't affect Pro package builds.

Also applies to: 14-19


86-87: Good: Node cache setup improvements unlock Yarn caching for Node 22.

Replacing the previous explicit cache setting with cache: yarn and proper cache-dependency-path glob is cleaner and resolves the prior V8-related blocker. The glob pattern react_on_rails_pro/**/yarn.lock correctly targets Pro package dependencies.

Also applies to: 178-179


22-26: Verification complete: ci-changes-detector script correctly implements all required functionality.

The script exists, is executable, and properly outputs all expected environment variables (run_pro_lint, run_pro_tests, docs_only). Parameter handling correctly processes the BASE_REF argument with fallback to origin/master, includes validation checks, and integrates properly with the git diff logic. The implementation supports the workflow's Pro-specific change detection as intended.

.github/workflows/integration-tests.yml (1)

1-15: Workflow rename and Pro path-ignore look consistent

Renaming to “Integration Tests” and ignoring react_on_rails_pro/** for push/PR cleanly scopes this workflow to the OSS dummy app and aligns with the separate Pro workflows. Nothing concerning here.

.github/workflows/gem-tests.yml (1)

10-24: force_run wiring and broader path filters match the intended CI behavior

Adding packages/** and react_on_rails_pro/** to paths-ignore keeps this gem workflow focused on Ruby-only changes, while the new workflow_dispatch.force_run input is correctly honored in the detect step to bypass change detection and turn on all run_* flags / disable docs_only.

This now matches the “Force run all jobs (bypass detect-changes)” description and the full‑CI label semantics.

To be safe, trigger this workflow via Run workflow with force_run checked once and confirm both dependency levels run as expected on the branch you care about.

Also applies to: 49-51

.github/workflows/lint-js-and-ruby.yml (1)

10-22: Lint workflow now follows the same force_run / Pro scoping pattern

Ignoring react_on_rails_pro/** for push/PR and adding the workflow_dispatch.force_run input, then honoring it in the detect step to flip all run_* flags, keeps this workflow focused on OSS changes while still allowing a manual “run everything” escape hatch. This aligns nicely with the gem and package workflows.

It’s worth doing a quick manual workflow_dispatch run with force_run enabled to confirm detect-changes sets run_lint to true and the build job runs regardless of file changes.

Also applies to: 46-47

script/ci-changes-detector (1)

165-171: Pro-related summaries and outputs are aligned and JSON is valid

The updated “Changed file categories” and “Recommended CI jobs” sections now clearly call out the Pro categories and RUN_PRO_* decisions, and the new run_pro_lint, run_pro_tests, and run_pro_dummy_tests values are exported both via $GITHUB_OUTPUT and the CI_JSON_OUTPUT block (with the comma after "run_pro_tests" fixed).

This keeps human-readable logs, workflow outputs, and any JSON consumers in sync.

Also applies to: 218-225, 237-239, 253-254

@claude
Copy link

claude bot commented Nov 16, 2025

PR Review: Enhance change detection & workflow triggers

Overview

This PR improves CI efficiency by:

  • Adding granular path-based change detection
  • Re-enabling yarn caching (Node.js 22 V8 bug is resolved)
  • Adding workflow_dispatch triggers with force_run options
  • Extracting actionlint to a dedicated workflow
  • Improving path ignore patterns across workflows

✅ Strengths

  1. Improved CI Efficiency: Path-based ignores will prevent unnecessary workflow runs for doc-only changes
  2. Better Caching: Re-enabling yarn cache will significantly speed up CI builds
  3. Manual Trigger Support: workflow_dispatch with force_run provides good developer flexibility
  4. Better Separation of Concerns: Extracting actionlint to its own workflow improves modularity
  5. Consistent Patterns: Applying path ignores consistently across all workflows

🔍 Issues & Concerns

1. Critical: Missing paths-ignore in actionlint.yml

# .github/workflows/actionlint.yml
on:
  pull_request:
    paths: 
      - '.github/workflows/**'

Issue: Using paths instead of paths-ignore means this workflow ONLY runs when workflow files change. However, the workflow already has its own change detection logic (check-workflows step). This creates redundancy and could cause the workflow to not run when expected.

Recommendation: Either:

  • Remove the paths filter and rely on the internal change detection
  • Or simplify by removing the internal change detection and just use paths

Preferred approach: Keep paths and remove the redundant check-workflows step for simplicity.

2. Bash Safety: Potential issues in actionlint.yml

The bash script has some safety concerns:

  • The || true suppresses all errors, making debugging difficult
  • github.event.before on push events can be unreliable for the first push to a new branch
  • Variable handling could be more robust

3. Logic Issue: ci-changes-detector Pro path handling

Shell glob patterns in case statements do not support ** the same way as other tools. The pattern matching should be verified.

Recommendation: Test this locally with actual file paths to ensure patterns match correctly.

4. Potential Race Condition: Caching actionlint

If the curl request to GitHub API fails or returns an empty version, actionlint_version will be empty, creating an invalid cache key. The PR does add error handling for this, which is good.

5. Documentation: Missing workflow rename documentation

Several workflows were renamed:

  • main.ymlintegration-tests.yml
  • rspec-package-specs.ymlgem-tests.yml
  • pro-package-tests.ymlpro-test-package-and-gem.yml

Recommendation: Update any documentation that references these workflow names, particularly in:

  • CLAUDE.md
  • README.md
  • Any CI debugging scripts (like bin/ci-rerun-failures)

📊 Performance Considerations

  1. Yarn Cache Re-enablement: Excellent - this should reduce CI time by 30-60 seconds per job
  2. Path-based Filtering: Good - will skip entire workflow runs for doc changes
  3. Actionlint Caching: Good - prevents repeated downloads

Estimated CI Time Savings: 2-5 minutes per PR (depending on which workflows are skipped)

🔒 Security Considerations

  1. No major security concerns - the changes are configuration-focused
  2. Good: Using persist-credentials: false in actionlint checkout
  3. Good: Using shallow fetches (fetch-depth: 1) where appropriate

🧪 Test Coverage

Issue: This PR changes CI behavior but does not include tests for the ci-changes-detector script changes.

Recommendation: Consider adding a test suite for script/ci-changes-detector to verify the pattern matching logic works correctly.

📝 Additional Recommendations

  1. Add CHANGELOG entry: This is a user-visible improvement (faster CI) - though according to CLAUDE.md, this might be considered infrastructure/dev-only

  2. Validate workflow syntax: Run actionlint locally before merging

  3. Test the change detection logic: Manually verify with various file change scenarios

  4. Consider adding comments in complex workflows: The detect-changes job logic could benefit from inline comments explaining the detection strategy

  5. Verify bin/ci-rerun-failures compatibility: The workflow renames might affect this script if it hardcodes workflow names

✅ Pre-merge Checklist

  • Run actionlint on all modified workflow files
  • Test ci-changes-detector script with various file change scenarios
  • Verify workflows still trigger correctly for relevant changes
  • Update CI-related documentation if workflows are referenced by name
  • Verify bin/ci-rerun-failures still works with renamed workflows

Overall Assessment

Quality: 7/10
Impact: High (positive - will save significant CI time)
Risk: Medium (changes core CI behavior, needs thorough testing)

The PR is well-intentioned and addresses real pain points. The main concerns are around the actionlint workflow having redundant logic (both paths filter and internal change detection), and ensuring the renamed workflows do not break existing tooling.

The most critical item to address is clarifying the actionlint workflow strategy - either use the paths filter OR the internal change detection, but having both is redundant and potentially confusing.


Review generated with context from CLAUDE.md project guidelines

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 (1)
script/ci-changes-detector (1)

101-101: Wrong workflow filename reference.

Line 101 references .github/workflows/integration-tests.yml, but according to previous review comments, the actual workflow file should be .github/workflows/main.yml.

Apply this diff:

-    spec/dummy/*|spec/dummy/**/*|.github/workflows/integration-tests.yml)
+    spec/dummy/*|spec/dummy/**/*|.github/workflows/main.yml)
🧹 Nitpick comments (1)
script/ci-changes-detector (1)

159-159: Address the TODO for node-renderer tests.

The TODO comment indicates that node-renderer test detection is missing. If node-renderer tests exist and should trigger CI jobs, add the appropriate detection pattern and flag.

Do you want me to help identify where node-renderer tests are located and generate the detection logic for them?

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a48a222 and 01fe3e4.

📒 Files selected for processing (2)
  • .github/workflows/actionlint.yml (1 hunks)
  • script/ci-changes-detector (7 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-10-23T17:22:01.074Z
Learnt from: AbanoubGhadban
Repo: shakacode/react_on_rails PR: 1875
File: lib/react_on_rails/utils.rb:112-124
Timestamp: 2025-10-23T17:22:01.074Z
Learning: In React on Rails, when Pro is installed but not licensed, the intended behavior is to raise an error on boot. The `react_on_rails_pro?` method validates licenses and should raise errors early (including during path resolution in methods like `server_bundle?`) to enforce licensing requirements rather than failing later with obscure errors.

Applied to files:

  • script/ci-changes-detector
📚 Learning: 2025-04-26T21:55:55.874Z
Learnt from: alexeyr-ci2
Repo: shakacode/react_on_rails PR: 1732
File: spec/dummy/client/app-react16/startup/ReduxSharedStoreApp.client.jsx:40-44
Timestamp: 2025-04-26T21:55:55.874Z
Learning: In the react_on_rails project, files under `app-react16` directories are copied/moved to corresponding `/app` directories during the conversion process (removing the `-react16` suffix), which affects their relative import paths at runtime.

Applied to files:

  • script/ci-changes-detector
⏰ 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). (5)
  • GitHub Check: build-dummy-app-webpack-test-bundles
  • GitHub Check: build-dummy-app-webpack-test-bundles
  • GitHub Check: build
  • GitHub Check: lint-js-and-ruby
  • GitHub Check: claude-review
🔇 Additional comments (3)
script/ci-changes-detector (3)

206-216: LGTM: Pro job determination logic mirrors non-Pro implementation.

The Pro-specific job determination logic correctly mirrors the non-Pro implementation:

  • RUN_PRO_LINT triggers on Pro config, Ruby, JS, or dummy changes
  • RUN_PRO_TESTS triggers on Pro Ruby, RSpec, or JS changes
  • RUN_PRO_DUMMY_TESTS triggers on Pro dummy, Ruby, or JS changes

This ensures Pro changes are gated appropriately while maintaining consistency with the existing non-Pro logic.


228-257: LGTM: Pro outputs correctly integrated into GitHub Actions and JSON.

The Pro-specific outputs are properly integrated:

  • GitHub Actions output includes run_pro_lint, run_pro_tests, and run_pro_dummy_tests
  • JSON output correctly formatted with proper comma placement
  • User-facing messages clearly identify Pro-specific jobs

89-89: All referenced rakelib filenames are correct and present in the repository.

The verification confirms that rakelib/example_type.rb, rakelib/examples_config.yml, and rakelib/shakapacker_examples.rake all exist. No issues found in line 89.

@Judahmeek
Copy link
Contributor Author

@CodeRabbit resolve

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 16, 2025

✅ Actions performed

Comments resolved and changes approved.

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

🧹 Nitpick comments (1)
.github/workflows/integration-tests.yml (1)

68-75: Simplify matrix exclude logic with clearer syntax and eliminate duplication across jobs.

The exclude blocks in both build-dummy-app-webpack-test-bundles (lines 68–75) and dummy-app-integration-tests (lines 161–165) are identical and use nested ternary operators that are valid in GitHub Actions but difficult to parse and maintain. The pattern conditionally sets each matrix dimension to either its target value or an empty string, which works around GitHub Actions' lack of conditional support in matrix definitions.

Recommended improvements:

  1. Add a clarifying comment explaining that the empty-string fallback is intentional (matrix exclude requires all fields to match, so unset values prevent exclusion).
  2. Consider consolidating the exclude logic into a single reusable format or extracting the repeated condition to a workflow-level variable if the workflow engine supports it.
  3. Alternatively, generate the matrix dynamically in a preceding job and pass it via fromJSON (per GitHub Actions best practices) if this pattern needs to be reused or becomes more complex.

The parametric matrix in the first job is already cleaner than the include-based approach in the second job; applying similar patterns consistently would improve readability.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 01fe3e4 and a95a528.

📒 Files selected for processing (1)
  • .github/workflows/integration-tests.yml (4 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-02-12T16:38:06.537Z
Learnt from: Romex91
Repo: shakacode/react_on_rails PR: 1697
File: package-scripts.yml:28-28
Timestamp: 2025-02-12T16:38:06.537Z
Learning: The file `node_package/lib/ReactOnRails.full.js` is autogenerated during the build process and should not be present in the repository.

Applied to files:

  • .github/workflows/integration-tests.yml
📚 Learning: 2025-04-26T21:55:55.874Z
Learnt from: alexeyr-ci2
Repo: shakacode/react_on_rails PR: 1732
File: spec/dummy/client/app-react16/startup/ReduxSharedStoreApp.client.jsx:40-44
Timestamp: 2025-04-26T21:55:55.874Z
Learning: In the react_on_rails project, files under `app-react16` directories are copied/moved to corresponding `/app` directories during the conversion process (removing the `-react16` suffix), which affects their relative import paths at runtime.

Applied to files:

  • .github/workflows/integration-tests.yml
🔇 Additional comments (3)
.github/workflows/integration-tests.yml (3)

1-22: Workflow enhancements align with Pro-aware CI strategy.

The workflow name clarification, paths-ignore additions for react_on_rails_pro/**, and new force_run input are consistent with the broader CI modernization. The new input enables manual override of change detection, which is useful for debugging or forcing full CI runs.


90-97: Node 22 cache workaround can likely be removed—bug was fixed in v22.21.1.

The V8-related crash in Node v22.21.0 was fixed in v22.21.1 (released Oct 28, 2025). The current conditional cache disable for all Node 22 versions appears overly broad. Verify which specific Node 22.x releases are tested in matrix.node-version—if none are 22.21.0, the workaround and its comments can be removed entirely.


47-58: Verification confirms the refactored conditional logic is correct.

The BASE_REF assignment uses a valid fallback chain (pull_request.base.sha → before → origin/master), and script/ci-changes-detector integration is working as expected. The script properly outputs all flags (including docs_only) via internal GITHUB_OUTPUT handling, and all standard outputs are correctly exposed in the job's output definitions for downstream consumption. The PRO_* outputs generated by the script are unused in the workflow but do not cause issues.

@justin808
Copy link
Member

@claude review this PR

@claude
Copy link

claude bot commented Nov 16, 2025

Claude Code is working…

I'll analyze this and get back to you.

View job run

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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a95a528 and 18c8ebb.

📒 Files selected for processing (1)
  • .github/workflows/integration-tests.yml (4 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-02-12T16:38:06.537Z
Learnt from: Romex91
Repo: shakacode/react_on_rails PR: 1697
File: package-scripts.yml:28-28
Timestamp: 2025-02-12T16:38:06.537Z
Learning: The file `node_package/lib/ReactOnRails.full.js` is autogenerated during the build process and should not be present in the repository.

Applied to files:

  • .github/workflows/integration-tests.yml
📚 Learning: 2025-04-26T21:55:55.874Z
Learnt from: alexeyr-ci2
Repo: shakacode/react_on_rails PR: 1732
File: spec/dummy/client/app-react16/startup/ReduxSharedStoreApp.client.jsx:40-44
Timestamp: 2025-04-26T21:55:55.874Z
Learning: In the react_on_rails project, files under `app-react16` directories are copied/moved to corresponding `/app` directories during the conversion process (removing the `-react16` suffix), which affects their relative import paths at runtime.

Applied to files:

  • .github/workflows/integration-tests.yml
⏰ 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). (6)
  • GitHub Check: build-dummy-app-webpack-test-bundles
  • GitHub Check: lint-js-and-ruby
  • GitHub Check: build
  • GitHub Check: build-dummy-app-webpack-test-bundles
  • GitHub Check: build-dummy-app-webpack-test-bundles (3.2, 20, minimum)
  • GitHub Check: claude-review
🔇 Additional comments (3)
.github/workflows/integration-tests.yml (3)

10-10: Paths-ignore additions align with broader CI gating.

Adding react_on_rails_pro/** to paths-ignore for both push and pull_request triggers is consistent with the PR objective to enhance change detection and gating. This prevents unnecessary workflow runs when only Pro-related files change.

Also applies to: 15-15


96-96: Node.js cache workaround for V8 bug is reasonable.

The conditional cache bypass for Node 22 (cache: ${{ matrix.node-version != '22' && 'yarn' || '' }}) is well-documented and appropriate given the noted V8 issue.

Also applies to: 182-182


55-58: Review comment is based on incorrect assumptions about the workflow architecture.

In PR context, workflow_dispatch inputs like force_run are not available in the event payload and conditions resolve as false. However, the code correctly handles this by checking steps.check-label.outputs.result (which is available in PRs), not relying on the inaccessible input alone.

More importantly: the detector is not being skipped for Pro filtering. Pro-related filtering happens in separate Pro workflows (pro-integration-tests.yml, pro-lint.yml, pro-test-package-and-gem.yml), each with their own detect-changes job that independently handles Pro outputs. Skipping the detector in integration-tests.yml when force_run or full-ci is set does not prevent Pro-related outputs—Pro workflows run their own detector calls.

The conditional logic is correct: when all tests should run (force_run=true or full-ci label present), set all outputs to true; otherwise, run the detector. This applies independently per workflow.

Likely an incorrect or invalid review comment.

@Judahmeek Judahmeek merged commit cf005af into master Nov 16, 2025
24 checks passed
@Judahmeek Judahmeek deleted the judahmeek/empty branch November 16, 2025 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants