Repository navigation
ci: run three PR guards only when the PR touches their paths - #2597
Conversation
…ch their paths Three PR guards ran a full runner on every push to every PR, though only a PR touching their files can change their answer. On 10-24 the rebase wave put 165 runs in the Actions queue and the merge-group build waited 16+ minutes for a runner. Path filters cut 3 of the ~8 workflows each ordinary push starts. None is a required check, so a skipped run never blocks a PR; the push-to-main arms are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V7T2fgquLRaqaYiGLC6Dey
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Filter guard workflow triggers .github/workflows/adr-numbering-guard.yml, .github/workflows/package-version-guard.yml, .github/workflows/review-checklist-numbering-guard.yml |
The ADR guard filters push and pull request events by relevant paths. The package version guard and review checklist guard add path filters to pull requests. The checklist guard's push behavior is unchanged. |
Priority:
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Other
Possibly related issues
- Issue 1373 concerns the Package Version Guard's run behavior. This PR adds path filters to that workflow but does not change branch protection.
- Issue 1402 concerns ADR number validation. This PR filters the ADR guard by ADR document and verification script changes.
- Issue 1414 concerns concurrent additions to the review checklist. This PR filters the checklist guard by changes to that file.
Possibly related PRs
- Team-Commonly/commonly#2462: Both PRs address path-based CI execution. This PR adds filters to three guard workflows, while
#2462discusses the test gate and does not modify these workflows.
Merge Risk: 
Minimal · up to 079fa
-
This change only narrows when three guard workflows run on pull requests, so routine PRs that touch none of their paths no longer consume runners. No behavior change or concrete merge risk was found.
Pre-merge checks: 
4
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Usage-based review receipt
- Mode: Continue automatically
- Reviewed files: 3
- Waived: $0.75 (charged $0.00)
- View usage details
Note
This review exceeded your plan’s limits and used usage-based reviews—free during trial, billed after paid activation unless disabled. Manage usage-based reviews.
Comment @coderabbitai help to get the list of available commands.
lilyshen0722
left a comment
There was a problem hiding this comment.
#2597 at exact head 079fa42 — CODE PASS
The ADR guard's PR filter covers docs/adr/**, its verifier script and its workflow. The checklist guard covers the rule file, its verifier script and its workflow. The package guard covers both published package trees, including each src and package.json, plus its workflow. These are all files the three PR checks read or whose changes can alter their answers. The ADR and checklist push: main trigger blocks and jobs are unchanged; the package guard had no main-push arm. The three YAML files parse with the expected types and paths, and git diff --check passes.
Credit to @lily-shen for the exact-head gate ask and SRE for the scoped workflow change.
Written by Sable, a Commonly agent — https://commonly.me/v2/pods/6a692a1be833c668acdb84cf
GATE: PASS
Three PR guards now run only when a PR touches the files they check.
Why. On 10-24 the rebase wave put 165 runs in the Actions queue, and the five merge-group builds enqueued at 07:38Z were still waiting for runners 16 minutes later. Cancel-in-progress is already set on 9 of the 11 PR workflows, so superseded runs weren't the problem. The volume was: every push to every PR starts about 8 workflows, and three of them can't change their answer unless the PR touches their files.
docs/adr/**,scripts/verify-adr-numbering.js, its own workflowdocs/development/review-checklist.md,scripts/verify-numbered-rules.js, its own workflowcli/**,commonly-mcp/**, its own workflowWhat doesn't change.
Test & Coverage, and none of these is it, so a skipped guard never blocks a PR or the merge queue.editedstays in the trigger types. The path filter is evaluated against the PR's full diff, so a retargeted stacked PR that touches these paths still runs.Checks. All three files parse, with
typesandpathsread back. Nothing in the repo pins these trigger blocks; the only references are prose in two scripts and two docs.Rollback. Revert this commit.
🤖 Generated with Claude Code
https://claude.ai/code/session_01V7T2fgquLRaqaYiGLC6Dey