Skip to content

ci: keep Dylint required check reportable#12415

Merged
zkochan merged 2 commits into
mainfrom
dylint-required
Jun 15, 2026
Merged

ci: keep Dylint required check reportable#12415
zkochan merged 2 commits into
mainfrom
dylint-required

Conversation

@zkochan

@zkochan zkochan commented Jun 15, 2026

Copy link
Copy Markdown
Member

Summary

  • remove workflow-level path filters from Pacquet CI so required checks are always created
  • add an in-workflow change detector that skips expensive Rust jobs when Rust CI is irrelevant
  • keep manual dispatch running the full Rust CI path

Checks

  • actionlint .github/workflows/pacquet-ci.yml
  • git diff --check
  • pre-push hook: pnpm run compile-only and pnpm run lint --quiet

Written by an agent (Codex, GPT-5).

Summary by CodeRabbit

Release Notes

  • Chores
    • Updated the CI/CD workflow to evaluate changes more reliably and run Rust-related checks only when relevant files are modified.
    • Expanded gating logic to better control when verification steps run, including improved handling when change detection can’t be determined.

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1265b2d3-7a41-4dfa-ad67-2f278203b5f8

📥 Commits

Reviewing files that changed from the base of the PR and between 34d28b7 and 0db982f.

📒 Files selected for processing (1)
  • .github/workflows/pacquet-ci.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/pacquet-ci.yml

📝 Walkthrough

Walkthrough

The pacquet-ci.yml workflow drops path-based trigger filters and instead introduces a dedicated changes job using dorny/paths-filter to detect Rust file modifications. All downstream CI jobs (test, clippy, doc, typos, deny, format, dylint) are gated behind the resulting rust output, with dylint additionally handling change-detection failure via an early-exit step.

Changes

Path-filtered CI gating for Rust jobs

Layer / File(s) Summary
Trigger rework and changes job
.github/workflows/pacquet-ci.yml
Removes paths filters from push/pull_request triggers, adds pull-requests: read permission, and introduces the changes job with dorny/paths-filter that exposes a rust boolean output.
Conditional gates on clippy, doc, typos, deny, format
.github/workflows/pacquet-ci.yml
Adds needs: changes and matching if: conditions to five downstream jobs, restricting execution to runs where Rust files changed or the trigger is workflow_dispatch.
dylint gating with failure handling
.github/workflows/pacquet-ci.yml
Updates dylint's needs/if logic to handle a failed changes job and adds an early-exit step that emits an error if Rust change detection could not be determined.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 Hoppity-hop through the CI lane,
No more running when nothing's changed!
A rust flag flips, the jobs stand by,
Only real diffs let the workflows fly.
The bunny saves cycles — oh my, oh my! 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main change: keeping the Dylint required check reportable by refactoring the CI workflow's path filtering strategy.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dylint-required

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.

@zkochan zkochan marked this pull request as ready for review June 15, 2026 06:51
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Jun 15, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 🎨 UX issues (0) 🔗 Cross-repo conflicts (0)

Grey Divider


Action required

1. Rust CI skipped on script changes ✓ Resolved 🐞 Bug ≡ Correctness
Description
The new changes filter does not include .github/scripts/**, but the Rust test job executes
.github/scripts/measure-command.mjs; PRs changing only that script will run the workflow yet skip
all Rust jobs. This can let CI-critical script regressions merge without exercising the Rust
pipeline.
Code

.github/workflows/pacquet-ci.yml[R48-64]

+          filters: |
+            rust:
+              - 'pacquet/**'
+              - 'pnpr/**'
+              - 'Cargo.toml'
+              - 'Cargo.lock'
+              - 'rust-toolchain.toml'
+              - 'rustfmt.toml'
+              - 'deny.toml'
+              - 'dylint.toml'
+              - '.taplo.toml'
+              - '.typos.toml'
+              - 'justfile'
+              - '.cargo/**'
+              - '.github/actions/rustup/**'
+              - '.github/actions/binstall/**'
+              - '.github/workflows/pacquet-ci.yml'
Evidence
The changes job’s rust: filter list excludes .github/scripts/**, while the test job runs
node .github/scripts/measure-command.mjs and is gated on needs.changes.outputs.rust == 'true',
so script-only changes will skip Rust CI.

.github/workflows/pacquet-ci.yml[28-65]
.github/workflows/pacquet-ci.yml[66-70]
.github/workflows/pacquet-ci.yml[130-155]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The new Rust change detector omits `.github/scripts/**`, but Rust CI jobs execute scripts from that directory. As a result, changes to those scripts can cause the workflow to run while skipping the Rust jobs, reducing coverage and potentially allowing CI breakage to merge.
### Issue Context
The `test` job runs `node .github/scripts/measure-command.mjs ...`, but `changes` only marks Rust CI relevant when files match the `rust:` filter list.
### Fix Focus Areas
- .github/workflows/pacquet-ci.yml[44-65]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Dylint failure fallback bypassed ✓ Resolved 🐞 Bug ☼ Reliability
Description
dylint is intended to run when changes fails (via needs.changes.result != 'success') and emit
an explicit error, but as a needs: changes dependent it may not get scheduled on changes failure
without an always()-style override. This undermines the stated goal of keeping the required Dylint
check reportable when change detection breaks.
Code

.github/workflows/pacquet-ci.yml[R310-318]

+    needs: changes
+    if: ${{ !cancelled() && (github.event_name == 'workflow_dispatch' || needs.changes.outputs.rust == 'true' || needs.changes.result != 'success') }}
 runs-on: ubuntu-latest
 steps:
+      - name: Verify change detection
+        if: ${{ needs.changes.result != 'success' }}
+        run: |
+          echo "::error::Unable to determine whether Rust CI should run."
+          exit 1
Evidence
The job-level if includes needs.changes.result != 'success' and the first step tries to error in
that case, but the job is still declared with needs: changes, so the error-reporting path is at
risk of being skipped when changes fails.

.github/workflows/pacquet-ci.yml[308-319]
.github/workflows/pacquet-ci.yml[28-65]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The `dylint` job attempts to run when the `changes` job fails by checking `needs.changes.result != 'success'`, but because it depends on `changes`, it may be skipped on upstream failure unless the job-level condition explicitly opts into running after failures.
### Issue Context
The workflow adds a "Verify change detection" step that should fail the job when change detection is unavailable; ensure this step can run even when `changes` fails.
### Fix Focus Areas
- .github/workflows/pacquet-ci.yml[308-319]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Jun 15, 2026

Copy link
Copy Markdown

PR Summary by Qodo

CI: make Pacquet required checks always reportable via in-workflow change detection
⚙️ Configuration changes ✨ Enhancement 🕐 20-40 Minutes

Grey Divider

Walkthroughs

Description
• Remove workflow-level path filters so required checks are always created on PRs.
• Add a change-detection job to skip Rust CI jobs when Rust-relevant files didn’t change.
• Ensure manual dispatch always runs full Rust CI; fail Dylint if change detection fails.
Diagram
graph TD
  A["GitHub event (PR/push/manual)"] --> B["changes job (detect Rust changes)"] --> C{"Rust CI relevant?"}
  C -->|"yes"| D["Rust CI jobs (test/clippy/doc/etc.)"] --> E["Dylint job"]
  C -->|"no"| F["Skip Rust CI jobs"] --> E
  B -->|"detection failed"| G["Dylint fails with error"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Split into two workflows (always-on required check + conditional Rust CI)
  • ➕ Keeps required checks always created without relying on job-level conditionals
  • ➕ Rust CI can remain path-filtered at the workflow trigger level
  • ➖ More workflows to maintain and reason about
  • ➖ Harder to keep concurrency/cancellation behavior consistent across workflows
2. Use GitHub Actions built-in `paths` on jobs (where possible) instead of paths-filter
  • ➕ Avoids third-party action dependency
  • ➕ Simplifies permissions and checkout requirements
  • ➖ Job-level paths support is limited/nonexistent compared to workflow triggers
  • ➖ Doesn’t fully solve required-check creation if the entire workflow is filtered out
3. Compute changes via GitHub API (PR files) in a custom step
  • ➕ No third-party action; fine-grained control over edge cases
  • ➕ Can avoid full checkout in some cases
  • ➖ More bespoke code to maintain
  • ➖ API pagination/rate limits and auth nuances increase complexity

Recommendation: The chosen approach (remove workflow-level path filters and add an explicit change-detection job) is the best fit for the primary goal: required checks must always be created so they can report “skipped” vs never existing. The added guard in Dylint to fail when change detection fails is a good safety net; keep the filter list aligned with what the Rust jobs actually depend on to avoid false skips.

Grey Divider

File Changes

Other (1)
pacquet-ci.yml Move Rust relevance filtering into a changes job; keep required checks reportable +64/-35

Move Rust relevance filtering into a changes job; keep required checks reportable

• Removes workflow-level path filters for pull_request and push to ensure checks are always created. Adds a 'changes' job using 'dorny/paths-filter' (or a manual-dispatch override) and gates expensive Rust jobs on its output, while making Dylint run with 'always()' and explicitly fail if change detection cannot be computed.

.github/workflows/pacquet-ci.yml


Grey Divider

Qodo Logo

Comment thread .github/workflows/pacquet-ci.yml
Comment thread .github/workflows/pacquet-ci.yml
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Jun 15, 2026

Copy link
Copy Markdown

Code Review by Qodo

Grey Divider

New Review Started

This review has been superseded by a new analysis

Grey Divider

Qodo Logo

@zkochan zkochan marked this pull request as draft June 15, 2026 06:59
@zkochan zkochan marked this pull request as ready for review June 15, 2026 06:59
@qodo-free-for-open-source-projects

qodo-free-for-open-source-projects Bot commented Jun 15, 2026

Copy link
Copy Markdown

Code review by qodo was updated up to the latest commit 0db982f

@zkochan zkochan merged commit bc13e49 into main Jun 15, 2026
22 checks passed
@zkochan zkochan deleted the dylint-required branch June 15, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant