Repository navigation
Limit agent PR workflow triggers - #2394
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (75)
📝 WalkthroughWalkthroughAcross 73 GitHub Actions workflows, Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 6
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
.github/workflows/check_teensy36_size.yml (1)
25-33:⚠️ Potential issue | 🟡 MinorWatch the binary-size template this job actually uses.
Line 33 invokes
build_template_binary_size.yml, but Line 26 only watchesbuild_template.yml. With the PR trigger removed, edits to the binary-size reusable workflow can land onmasterwithout automatically rerunning this size check.Proposed fix
- - '.github/workflows/build_template.yml' + - '.github/workflows/build_template_binary_size.yml'🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/check_teensy36_size.yml around lines 25 - 33, The workflow watches the wrong reusable-workflow file: the job uses ./.github/workflows/build_template_binary_size.yml (the line with uses: ./.github/workflows/build_template_binary_size.yml) but the watched-files list only includes .github/workflows/build_template.yml; update the watched files array at the top of the YAML to include '.github/workflows/build_template_binary_size.yml' (and remove or keep '.github/workflows/build_template.yml' as appropriate) so edits to the binary-size reusable workflow will retrigger this job..github/workflows/check_teensy35_size.yml (1)
25-33:⚠️ Potential issue | 🟡 MinorWatch the binary-size template this job actually uses.
Line 33 invokes
build_template_binary_size.yml, but Line 26 only watchesbuild_template.yml. With the PR trigger removed, edits to the binary-size reusable workflow can land onmasterwithout automatically rerunning this size check.Proposed fix
- - '.github/workflows/build_template.yml' + - '.github/workflows/build_template_binary_size.yml'🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/check_teensy35_size.yml around lines 25 - 33, In the check_teensy35_size.yml workflow the paths watched list references '.github/workflows/build_template.yml' but the job uses the reusable workflow 'build_template_binary_size.yml', so add '.github/workflows/build_template_binary_size.yml' to the watched paths (alongside or instead of the existing build_template.yml entry) so changes to the binary-size reusable workflow will retrigger this job; update the paths array in check_teensy35_size.yml to include the exact filename 'build_template_binary_size.yml' referenced by the job.
🧹 Nitpick comments (9)
.github/workflows/build_nano_every.yml (1)
3-5: Stalepull_requestreference in concurrency config.With the
pull_requesttrigger removed,cancel-in-progresswill always befalse. Consider simplifying to a constant (or dropping the conditional) to avoid confusion for future readers. Not blocking.♻️ Suggested simplification
concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.event_name == 'pull_request' }} + cancel-in-progress: false🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/build_nano_every.yml around lines 3 - 5, The concurrency block uses a conditional for cancel-in-progress referencing github.event_name == 'pull_request' which is stale now that the pull_request trigger is removed; update the concurrency config by replacing cancel-in-progress: ${{ github.event_name == 'pull_request' }} with a constant (e.g., cancel-in-progress: false) or remove the cancel-in-progress line entirely so the concurrency block (group, cancel-in-progress) no longer contains a misleading conditional; ensure you reference the same keys (concurrency, group, cancel-in-progress) when making the change..github/workflows/build_esp32dev_idf4.4.yml (1)
5-5: Stalepull_requestreference in concurrency config.Since the
pull_requesttrigger was removed,github.event_name == 'pull_request'will never be true here, socancel-in-progressis effectively alwaysfalse. Consider simplifying to an explicit boolean (or dropping the expression) to avoid confusion for future readers.Proposed tweak
concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.event_name == 'pull_request' }} + cancel-in-progress: false🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/build_esp32dev_idf4.4.yml at line 5, The concurrency setting uses a stale expression "github.event_name == 'pull_request'" so cancel-in-progress is always false; update the cancel-in-progress key to an explicit boolean (e.g., set cancel-in-progress: true) or remove the expression entirely to avoid confusion—edit the line containing cancel-in-progress and replace the expression with the chosen literal true/false (or delete the key) so the concurrency config is explicit and accurate..github/workflows/build_teensy32.yml (1)
3-5: Stalepull_requestreference in concurrency.With the
pull_requesttrigger removed,cancel-in-progresswill now always evaluate tofalse. Consider simplifying (e.g., drop the condition or set it tofalseexplicitly) to avoid confusion for future readers.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/build_teensy32.yml around lines 3 - 5, The concurrency block's cancel-in-progress condition uses the removed pull_request trigger so it always evaluates to false; update the concurrency configuration (the concurrency group and cancel-in-progress fields) by either removing the conditional and setting cancel-in-progress: false explicitly or simplifying to just omit cancel-in-progress, so the concurrency block (specifically the concurrency group and cancel-in-progress setting) no longer contains the stale ${{ github.event_name == 'pull_request' }} expression..github/workflows/build_esp8266.yml (1)
3-5: Stalepull_requestreference inconcurrency.cancel-in-progress.With the
pull_requesttrigger removed,github.event_name == 'pull_request'will never be true, socancel-in-progressis effectively alwaysfalse. Consider simplifying or switching to a more meaningful condition (e.g., cancel on non-master refs) for clarity.♻️ Suggested simplification
concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.event_name == 'pull_request' }} + cancel-in-progress: false🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/build_esp8266.yml around lines 3 - 5, The cancel-in-progress expression under the concurrency block is a stale check (github.event_name == 'pull_request') that will always be false now; update the concurrency.cancel-in-progress setting in the workflow to a meaningful condition or a simple boolean so it actually cancels redundant runs — modify the concurrency.group/cancel-in-progress entries (symbols: concurrency, group, cancel-in-progress) to either set cancel-in-progress: true for general cancellation or replace the expression with a relevant check (for example evaluating github.ref to skip main/master) so behavior is clear and effective..github/workflows/build_stm103tb.yml (1)
3-8: Optional: simplify now-deadcancel-in-progressexpression.With
pull_requestremoved,github.event_name == 'pull_request'will always evaluate tofalse, so in-progress runs (e.g., fromworkflow_dispatchorpush) will never be cancelled. If that's intended, consider hard-codingcancel-in-progress: falsefor clarity; otherwise pick the behavior you want for manual/master runs.♻️ Proposed tidy-up
concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.event_name == 'pull_request' }} + cancel-in-progress: false🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/build_stm103tb.yml around lines 3 - 8, The current concurrency block uses a tautological expression for cancel-in-progress ("${{ github.event_name == 'pull_request' }}") which is now always false since pull_request is removed; update the concurrency configuration by replacing the dynamic expression with an explicit value: either set cancel-in-progress: false to make the intent clear, or replace the condition with the desired static behavior (e.g., true) for non-PR runs; modify the concurrency keys (group and cancel-in-progress) in the concurrency block so the workflow_dispatch/push behavior is explicit and unambiguous..github/workflows/build_blackpill_stm32f4.yml (1)
5-5: Stalepull_requestreference in concurrency config.With the
pull_requesttrigger removed,cancel-in-progresswill always evaluate tofalse(since this workflow now only runs onpushtomasterand manualworkflow_dispatch). Consider simplifying to a constant, or set it totrueforworkflow_dispatchruns if that's desirable.♻️ Suggested simplification
concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.event_name == 'pull_request' }} + cancel-in-progress: false🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/build_blackpill_stm32f4.yml at line 5, The concurrency config's cancel-in-progress uses a stale expression referencing pull_request which is no longer a trigger; update the cancel-in-progress value to a constant (e.g., true or false) or an expression that matches current triggers (push/workflow_dispatch). Locate the concurrency block in .github/workflows/build_blackpill_stm32f4.yml and replace cancel-in-progress: ${{ github.event_name == 'pull_request' }} with a fixed boolean (for example cancel-in-progress: true to allow cancelling in-progress runs) or another appropriate condition that reflects workflow_dispatch if desired..github/workflows/build_teensyLC.yml (1)
5-8: Nit: stalecancel-in-progressexpression.Since
pull_requestis no longer a trigger,github.event_name == 'pull_request'will always evaluate tofalse, effectively disabling cancel-in-progress. If that's intended, consider simplifying tocancel-in-progress: falsefor clarity; otherwise set it totrueforpush/manual dispatch. Same observation applies to the other workflows in this PR that droppedpull_request(build_rp2350B.yml,build_nucleo_f429zi.yml,build_digix.yml,build_esp32dev_idf3.3.yml,build_clone_and_compile.yml).🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/build_teensyLC.yml around lines 5 - 8, The cancel-in-progress expression uses a stale condition (github.event_name == 'pull_request') which now always evaluates false because pull_request is not a trigger; update the cancel-in-progress setting in this workflow (and the other affected workflows: build_rp2350B.yml, build_nucleo_f429zi.yml, build_digix.yml, build_esp32dev_idf3.3.yml, build_clone_and_compile.yml) to be explicit—either set cancel-in-progress: false if you intend to disable it, or set cancel-in-progress: true (or a condition matching the current triggers such as push or workflow_dispatch) so it actually cancels in-progress runs. Ensure you change the value for the cancel-in-progress key rather than leaving the outdated github.event_name == 'pull_request' expression..github/workflows/build_linux.yml (1)
31-72: Dead PR-merge logic left behind after removingpull_requesttrigger.With
pull_requestremoved, this workflow only runs onpushtomaster(or manual dispatch). The two-checkout "trusted base + PR code" scheme becomes degenerate:
- Line 34:
github.event.repository.default_branch || 'master'→ checks outmaster.- Line 40:
github.event.pull_request.head.sha || github.sha→ on a push event,pull_request.head.shais empty so this falls back togithub.sha, i.e. the same master commit. Both checkouts yield the same tree; thecp -r pr-code/... trusted/...merging is a no-op.- Line 64:
github.event.pull_request.head.repo.full_nameis empty on push, so thebuild_config.pycopy branch is always skipped.Since the untrusted-PR-isolation rationale no longer applies, consider simplifying to a single
actions/checkoutand dropping thetrusted/pr-codesplit and merge step, or re-add this workflow to the PR allowlist if its purpose was actually to gate untrusted PR code. Leaving the current structure in place works but is misleading and fragile for future edits.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/build_linux.yml around lines 31 - 72, The workflow contains dead PR-merge logic: the two checkout steps named "Checkout trusted base branch code" and "Checkout PR code" plus the "Merge safe source files from PR" block rely on github.event.pull_request values that are empty on push events, so they become no-ops and misleading; fix by either (A) simplifying to a single actions/checkout@v4 (remove the second checkout step and the whole merge/copy block that references pr-code and github.event.pull_request.*) so the job runs against the single checked-out tree, or (B) restore the pull_request trigger to the workflow if its intent is to test untrusted PR code (keep the existing two-checkout + merge logic intact); update or remove references to github.event.pull_request.head.* and the conditional that checks github.event.pull_request.head.repo.full_name accordingly (see step names "Checkout trusted base branch code", "Checkout PR code", and "Merge safe source files from PR").ci/tools/gh/limit_agent_pr_workflows.py (1)
242-244: Use explicit loops for collected workflow results.The new code uses generator/list comprehension style where the repository standard asks for explicit loops for debuggability.
As per coding guidelines, “Use explicit loops instead of list comprehensions for code clarity and debuggability.”
♻️ Proposed loop-based rewrite
def workflow_files(workflows_dir: Path) -> list[Path]: - files = [*workflows_dir.glob("*.yml"), *workflows_dir.glob("*.yaml")] - return sorted(path for path in files if path.is_file()) + files: list[Path] = [] + for path in workflows_dir.glob("*.yml"): + if path.is_file(): + files.append(path) + for path in workflows_dir.glob("*.yaml"): + if path.is_file(): + files.append(path) + return sorted(files) @@ - results = [ - transform_workflow(path, allow_pr=path.name in allowlist) - for path in workflow_files(workflows_dir) - ] - changed = [result for result in results if result.changed] + results: list[WorkflowResult] = [] + for path in workflow_files(workflows_dir): + results.append(transform_workflow(path, allow_pr=path.name in allowlist)) + + changed: list[WorkflowResult] = [] + for result in results: + if result.changed: + changed.append(result)Also applies to: 296-300
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ci/tools/gh/limit_agent_pr_workflows.py` around lines 242 - 244, The workflow_files function currently builds and filters workflow Paths using a combined list/generator comprehension; refactor it to use explicit loops: iterate over workflows_dir.glob("*.yml") and workflows_dir.glob("*.yaml"), append each Path to a list only if path.is_file(), then sort that list and return it. Update the same pattern in the other similar workflow-collection block later in the file (the second aggregation of workflow Paths) so both places follow the explicit-loop style for debuggability.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/build_esp_extra_libs.yml:
- Line 5: The current cancel-in-progress expression (cancel-in-progress: ${{
github.event_name == 'pull_request' }}) is always false because the pull_request
trigger was removed; change it to a static true (cancel-in-progress: true) or
replace the condition with an appropriate event check that matches your triggers
(e.g., include github.event_name == 'workflow_run' if you want to cancel runs
triggered by workflow_run) so that the workflow actually cancels superseded
runs; update the cancel-in-progress line accordingly where the
cancel-in-progress key is defined.
In @.github/workflows/header-perf.yml:
- Around line 8-10: The push trigger currently lists both branches in the
workflow definition (the push: branches: [master, main] block); remove "main" so
pushes only target "master" by updating the push branches array to include only
"master" (keep workflow_dispatch unchanged) to ensure the workflow no longer
runs on main pushes.
In `@ci/tools/gh/limit_agent_pr_workflows.py`:
- Around line 141-153: The current ensure_event_branches_master bail-out returns
whenever a branches or branches-ignore key exists without validating its
contents; update ensure_event_branches_master to read the actual branch list
under the event (use the found event object from find_on_block and helpers like
has_nested_key/get_nested_value or parse the YAML subsection) and validate that
branches are strictly scoped to "master" (and that branches-ignore does not
permit non-master pushes), and if the list contains other branches replace or
rewrite the underlying lines to enforce branches: [master] (apply the same
validation and replacement logic for branches-ignore), referencing the
ensure_event_branches_master function, the event variable returned by
find_on_block, and the has_nested_key check to locate where to add the content
validation and replacement.
- Around line 247-283: parse_args currently requires a list[str] and main uses a
default None parameter, violating the repo convention; change parse_args to
accept an optional argv parameter (e.g., argv: list[str] | None = None) and
inside it use sys.argv[1:] when argv is None, and change main to require an
explicit argv parameter with no default (e.g., main(argv: list[str]) -> int) and
pass that argv into parse_args; update any internal calls accordingly so
parse_args and main match the repository's required signatures and
type-annotation rules.
- Around line 36-54: Import the typechecked decorator from typeguard and apply
it to the three dataclasses by adding `@typechecked` immediately before the
existing `@dataclass` for EventBlock, OnBlock, and WorkflowResult; ensure you add
the import (e.g., from typeguard import typechecked) near the other imports and
place `@typechecked` above each class declaration (i.e., before `@dataclass`) so
EventBlock, OnBlock, and WorkflowResult are all type-checked at runtime.
---
Outside diff comments:
In @.github/workflows/check_teensy35_size.yml:
- Around line 25-33: In the check_teensy35_size.yml workflow the paths watched
list references '.github/workflows/build_template.yml' but the job uses the
reusable workflow 'build_template_binary_size.yml', so add
'.github/workflows/build_template_binary_size.yml' to the watched paths
(alongside or instead of the existing build_template.yml entry) so changes to
the binary-size reusable workflow will retrigger this job; update the paths
array in check_teensy35_size.yml to include the exact filename
'build_template_binary_size.yml' referenced by the job.
In @.github/workflows/check_teensy36_size.yml:
- Around line 25-33: The workflow watches the wrong reusable-workflow file: the
job uses ./.github/workflows/build_template_binary_size.yml (the line with uses:
./.github/workflows/build_template_binary_size.yml) but the watched-files list
only includes .github/workflows/build_template.yml; update the watched files
array at the top of the YAML to include
'.github/workflows/build_template_binary_size.yml' (and remove or keep
'.github/workflows/build_template.yml' as appropriate) so edits to the
binary-size reusable workflow will retrigger this job.
---
Nitpick comments:
In @.github/workflows/build_blackpill_stm32f4.yml:
- Line 5: The concurrency config's cancel-in-progress uses a stale expression
referencing pull_request which is no longer a trigger; update the
cancel-in-progress value to a constant (e.g., true or false) or an expression
that matches current triggers (push/workflow_dispatch). Locate the concurrency
block in .github/workflows/build_blackpill_stm32f4.yml and replace
cancel-in-progress: ${{ github.event_name == 'pull_request' }} with a fixed
boolean (for example cancel-in-progress: true to allow cancelling in-progress
runs) or another appropriate condition that reflects workflow_dispatch if
desired.
In @.github/workflows/build_esp32dev_idf4.4.yml:
- Line 5: The concurrency setting uses a stale expression "github.event_name ==
'pull_request'" so cancel-in-progress is always false; update the
cancel-in-progress key to an explicit boolean (e.g., set cancel-in-progress:
true) or remove the expression entirely to avoid confusion—edit the line
containing cancel-in-progress and replace the expression with the chosen literal
true/false (or delete the key) so the concurrency config is explicit and
accurate.
In @.github/workflows/build_esp8266.yml:
- Around line 3-5: The cancel-in-progress expression under the concurrency block
is a stale check (github.event_name == 'pull_request') that will always be false
now; update the concurrency.cancel-in-progress setting in the workflow to a
meaningful condition or a simple boolean so it actually cancels redundant runs —
modify the concurrency.group/cancel-in-progress entries (symbols: concurrency,
group, cancel-in-progress) to either set cancel-in-progress: true for general
cancellation or replace the expression with a relevant check (for example
evaluating github.ref to skip main/master) so behavior is clear and effective.
In @.github/workflows/build_linux.yml:
- Around line 31-72: The workflow contains dead PR-merge logic: the two checkout
steps named "Checkout trusted base branch code" and "Checkout PR code" plus the
"Merge safe source files from PR" block rely on github.event.pull_request values
that are empty on push events, so they become no-ops and misleading; fix by
either (A) simplifying to a single actions/checkout@v4 (remove the second
checkout step and the whole merge/copy block that references pr-code and
github.event.pull_request.*) so the job runs against the single checked-out
tree, or (B) restore the pull_request trigger to the workflow if its intent is
to test untrusted PR code (keep the existing two-checkout + merge logic intact);
update or remove references to github.event.pull_request.head.* and the
conditional that checks github.event.pull_request.head.repo.full_name
accordingly (see step names "Checkout trusted base branch code", "Checkout PR
code", and "Merge safe source files from PR").
In @.github/workflows/build_nano_every.yml:
- Around line 3-5: The concurrency block uses a conditional for
cancel-in-progress referencing github.event_name == 'pull_request' which is
stale now that the pull_request trigger is removed; update the concurrency
config by replacing cancel-in-progress: ${{ github.event_name == 'pull_request'
}} with a constant (e.g., cancel-in-progress: false) or remove the
cancel-in-progress line entirely so the concurrency block (group,
cancel-in-progress) no longer contains a misleading conditional; ensure you
reference the same keys (concurrency, group, cancel-in-progress) when making the
change.
In @.github/workflows/build_stm103tb.yml:
- Around line 3-8: The current concurrency block uses a tautological expression
for cancel-in-progress ("${{ github.event_name == 'pull_request' }}") which is
now always false since pull_request is removed; update the concurrency
configuration by replacing the dynamic expression with an explicit value: either
set cancel-in-progress: false to make the intent clear, or replace the condition
with the desired static behavior (e.g., true) for non-PR runs; modify the
concurrency keys (group and cancel-in-progress) in the concurrency block so the
workflow_dispatch/push behavior is explicit and unambiguous.
In @.github/workflows/build_teensy32.yml:
- Around line 3-5: The concurrency block's cancel-in-progress condition uses the
removed pull_request trigger so it always evaluates to false; update the
concurrency configuration (the concurrency group and cancel-in-progress fields)
by either removing the conditional and setting cancel-in-progress: false
explicitly or simplifying to just omit cancel-in-progress, so the concurrency
block (specifically the concurrency group and cancel-in-progress setting) no
longer contains the stale ${{ github.event_name == 'pull_request' }} expression.
In @.github/workflows/build_teensyLC.yml:
- Around line 5-8: The cancel-in-progress expression uses a stale condition
(github.event_name == 'pull_request') which now always evaluates false because
pull_request is not a trigger; update the cancel-in-progress setting in this
workflow (and the other affected workflows: build_rp2350B.yml,
build_nucleo_f429zi.yml, build_digix.yml, build_esp32dev_idf3.3.yml,
build_clone_and_compile.yml) to be explicit—either set cancel-in-progress: false
if you intend to disable it, or set cancel-in-progress: true (or a condition
matching the current triggers such as push or workflow_dispatch) so it actually
cancels in-progress runs. Ensure you change the value for the cancel-in-progress
key rather than leaving the outdated github.event_name == 'pull_request'
expression.
In `@ci/tools/gh/limit_agent_pr_workflows.py`:
- Around line 242-244: The workflow_files function currently builds and filters
workflow Paths using a combined list/generator comprehension; refactor it to use
explicit loops: iterate over workflows_dir.glob("*.yml") and
workflows_dir.glob("*.yaml"), append each Path to a list only if path.is_file(),
then sort that list and return it. Update the same pattern in the other similar
workflow-collection block later in the file (the second aggregation of workflow
Paths) so both places follow the explicit-loop style for debuggability.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 2fb268e8-3d3c-45be-899f-b7e8ec0c2574
📒 Files selected for processing (87)
.github/workflows/arduino_library_lint.yml.github/workflows/avr8js_uno_test.yml.github/workflows/build.yml.github/workflows/build_adafruit_feather_nrf52840_sense.yml.github/workflows/build_adafruit_xiaoblesense.yml.github/workflows/build_apollo3_red.yml.github/workflows/build_apollo3_thing_explorable.yml.github/workflows/build_atmega8a.yml.github/workflows/build_attiny1604.yml.github/workflows/build_attiny1616.yml.github/workflows/build_attiny4313.yml.github/workflows/build_attiny85.yml.github/workflows/build_attiny88.yml.github/workflows/build_blackpill_stm32f4.yml.github/workflows/build_bluepill.yml.github/workflows/build_clone_and_compile.yml.github/workflows/build_digix.yml.github/workflows/build_due.yml.github/workflows/build_esp32_i2s_ws2812.yml.github/workflows/build_esp32c2.yml.github/workflows/build_esp32c3.yml.github/workflows/build_esp32c5.yml.github/workflows/build_esp32c6.yml.github/workflows/build_esp32dev.yml.github/workflows/build_esp32dev_idf3.3.yml.github/workflows/build_esp32dev_idf4.4.yml.github/workflows/build_esp32dev_namespace.yml.github/workflows/build_esp32h2.yml.github/workflows/build_esp32p4.yml.github/workflows/build_esp32s2.yml.github/workflows/build_esp32s3.yml.github/workflows/build_esp32wroom.yml.github/workflows/build_esp8266.yml.github/workflows/build_esp_extra_libs.yml.github/workflows/build_giga_r1.yml.github/workflows/build_linux.yml.github/workflows/build_maple_map.yml.github/workflows/build_mgm240s_thingplusmatter.yml.github/workflows/build_nano_every.yml.github/workflows/build_nrf52840_dk.yml.github/workflows/build_nrf52_xiaoblesense.yml.github/workflows/build_nucleo_f429zi.yml.github/workflows/build_nucleo_f439zi.yml.github/workflows/build_rgbw.yml.github/workflows/build_rp2040.yml.github/workflows/build_rp2350.yml.github/workflows/build_rp2350B.yml.github/workflows/build_stm103tb.yml.github/workflows/build_teensy30.yml.github/workflows/build_teensy31.yml.github/workflows/build_teensy32.yml.github/workflows/build_teensy35.yml.github/workflows/build_teensy36.yml.github/workflows/build_teensy40.yml.github/workflows/build_teensy41.yml.github/workflows/build_teensy41_ofled.yml.github/workflows/build_teensyLC.yml.github/workflows/build_teensy_octo.yml.github/workflows/build_uno_r4_wifif.yml.github/workflows/build_wasm.yml.github/workflows/build_wasm_compilers.yml.github/workflows/build_yun.yml.github/workflows/check_attiny85.yml.github/workflows/check_bluepill_size.yml.github/workflows/check_esp32_size.yml.github/workflows/check_teensy30_size.yml.github/workflows/check_teensy31_size.yml.github/workflows/check_teensy32_size.yml.github/workflows/check_teensy35_size.yml.github/workflows/check_teensy36_size.yml.github/workflows/check_teensy41_size.yml.github/workflows/check_teensylc_size.yml.github/workflows/check_uno_size.yml.github/workflows/docker_build_compiler.yml.github/workflows/docker_compiler_template.yml.github/workflows/example_test_linux.yml.github/workflows/example_test_macos.yml.github/workflows/example_test_windows.yml.github/workflows/header-perf.yml.github/workflows/iwyu.yml.github/workflows/qemu_esp32c3_test.yml.github/workflows/qemu_esp32dev_test.yml.github/workflows/qemu_esp32s3_test.yml.github/workflows/unit_test_linux.yml.github/workflows/unit_test_macos.yml.github/workflows/unit_test_windows.ymlci/tools/gh/limit_agent_pr_workflows.py
💤 Files with no reviewable changes (4)
- .github/workflows/avr8js_uno_test.yml
- .github/workflows/qemu_esp32dev_test.yml
- .github/workflows/qemu_esp32c3_test.yml
- .github/workflows/qemu_esp32s3_test.yml
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} |
There was a problem hiding this comment.
cancel-in-progress condition is now dead after PR trigger removal.
With no pull_request trigger, this expression is always false, so superseded runs won’t be canceled.
Suggested fix
- cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+ cancel-in-progress: true🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/build_esp_extra_libs.yml at line 5, The current
cancel-in-progress expression (cancel-in-progress: ${{ github.event_name ==
'pull_request' }}) is always false because the pull_request trigger was removed;
change it to a static true (cancel-in-progress: true) or replace the condition
with an appropriate event check that matches your triggers (e.g., include
github.event_name == 'workflow_run' if you want to cancel runs triggered by
workflow_run) so that the workflow actually cancels superseded runs; update the
cancel-in-progress line accordingly where the cancel-in-progress key is defined.
| workflow_dispatch: | ||
| push: | ||
| branches: [master, main] |
There was a problem hiding this comment.
Scope push triggers to master only.
Line 10 still includes main, so this workflow can run automatically on main pushes despite the PR objective to keep push workflows scoped to master.
Suggested fix
on:
workflow_dispatch:
push:
- branches: [master, main]
+ branches: [master]📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| workflow_dispatch: | |
| push: | |
| branches: [master, main] | |
| workflow_dispatch: | |
| push: | |
| branches: [master] |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/header-perf.yml around lines 8 - 10, The push trigger
currently lists both branches in the workflow definition (the push: branches:
[master, main] block); remove "main" so pushes only target "master" by updating
the push branches array to include only "master" (keep workflow_dispatch
unchanged) to ensure the workflow no longer runs on main pushes.
| @dataclass(frozen=True) | ||
| class EventBlock: | ||
| name: str | ||
| start: int | ||
| end: int | ||
| indent: int | ||
|
|
||
|
|
||
| @dataclass(frozen=True) | ||
| class OnBlock: | ||
| start: int | ||
| end: int | ||
| indent: int | ||
| child_indent: int | ||
| events: dict[str, EventBlock] | ||
|
|
||
|
|
||
| @dataclass | ||
| class WorkflowResult: |
There was a problem hiding this comment.
🛠️ Refactor suggestion | 🟠 Major
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Check whether a typechecked provider such as typeguard is already declared.
# Expected: dependency/config reference for typeguard, or confirm which project-approved decorator to use.
rg -n -C2 '\btypeguard\b|\btypechecked\b' pyproject.toml requirements*.txt setup.py setup.cfg tox.ini . || trueRepository: FastLED/FastLED
Length of output: 6761
🏁 Script executed:
cat -n ci/tools/gh/limit_agent_pr_workflows.pyRepository: FastLED/FastLED
Length of output: 11986
Add @typechecked decorator to all three dataclasses.
typeguard>=4.4.4 is already declared in pyproject.toml. Import it and apply the decorator to EventBlock, OnBlock, and WorkflowResult following the established pattern: @typechecked before @dataclass.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@ci/tools/gh/limit_agent_pr_workflows.py` around lines 36 - 54, Import the
typechecked decorator from typeguard and apply it to the three dataclasses by
adding `@typechecked` immediately before the existing `@dataclass` for EventBlock,
OnBlock, and WorkflowResult; ensure you add the import (e.g., from typeguard
import typechecked) near the other imports and place `@typechecked` above each
class declaration (i.e., before `@dataclass`) so EventBlock, OnBlock, and
WorkflowResult are all type-checked at runtime.
| def find_on_block(lines: list[str]) -> OnBlock | None: | ||
| on_start = None | ||
| on_indent = 0 | ||
| for index, line in enumerate(lines): | ||
| if line.strip() == "on:": | ||
| on_start = index | ||
| on_indent = line_indent(line) | ||
| break | ||
|
|
||
| if on_start is None: | ||
| return None | ||
|
|
||
| on_end = len(lines) | ||
| for index in range(on_start + 1, len(lines)): | ||
| stripped = lines[index].strip() | ||
| if not stripped or stripped.startswith("#"): | ||
| continue | ||
| if line_indent(lines[index]) <= on_indent: | ||
| on_end = index | ||
| break | ||
|
|
||
| child_indent = 2 | ||
| for index in range(on_start + 1, on_end): | ||
| stripped = lines[index].strip() | ||
| if not stripped or stripped.startswith("#"): | ||
| continue | ||
| indent = line_indent(lines[index]) | ||
| if indent > on_indent: | ||
| child_indent = indent | ||
| break | ||
|
|
||
| events: dict[str, EventBlock] = {} | ||
| event_starts: list[tuple[str, int]] = [] | ||
| for index in range(on_start + 1, on_end): | ||
| line = lines[index] | ||
| if line_indent(line) != child_indent: | ||
| continue | ||
| match = EVENT_RE.match(line.strip()) | ||
| if match: | ||
| event_starts.append((match.group(1), index)) | ||
|
|
||
| for position, (name, start) in enumerate(event_starts): | ||
| end = event_starts[position + 1][1] if position + 1 < len(event_starts) else on_end | ||
| events[name] = EventBlock(name=name, start=start, end=end, indent=child_indent) | ||
|
|
||
| return OnBlock( | ||
| start=on_start, | ||
| end=on_end, | ||
| indent=on_indent, | ||
| child_indent=child_indent, | ||
| events=events, | ||
| ) |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Identify workflow trigger shapes this text parser is likely to miss.
# Expected: no output. Any output should be reviewed before relying on --check.
python - <<'PY'
from pathlib import Path
import re
workflow_dir = Path(".github/workflows")
if not workflow_dir.is_dir():
raise SystemExit("missing .github/workflows")
for path in sorted([*workflow_dir.glob("*.yml"), *workflow_dir.glob("*.yaml")]):
text = path.read_text(encoding="utf-8")
for lineno, line in enumerate(text.splitlines(), start=1):
if re.match(r"^\s*['\"]?on['\"]?\s*:\s*\S", line):
print(f"{path}:{lineno}: inline or quoted on key: {line}")
if re.match(r"^\s*pull_request\s*:\s*\S", line):
print(f"{path}:{lineno}: inline pull_request config: {line}")
PYRepository: FastLED/FastLED
Length of output: 41
Implement fail-fast error handling for unsupported YAML on: block shapes.
The find_on_block() function returns None when it cannot find a literal block-style on: key, silently treating the workflow as having no trigger configuration. This violates the guideline: "Never use silent fallbacks for missing critical resources—always fail fast with descriptive errors."
While the current repository workflows do not use inline on: keys or quoted variants that would be missed by this parser, the code structure itself violates the fail-fast principle. Replace the silent fallback with an explicit error when the on: block cannot be parsed, or implement a proper YAML round-trip parser that handles all valid trigger formats.
Applies to: 218-224
| def ensure_event_branches_master( | ||
| lines: list[str], event_name: str, changes: list[str] | ||
| ) -> list[str]: | ||
| on_block = find_on_block(lines) | ||
| if on_block is None: | ||
| return lines | ||
| event = on_block.events.get(event_name) | ||
| if event is None: | ||
| return lines | ||
| if has_nested_key(lines, event, "branches") or has_nested_key( | ||
| lines, event, "branches-ignore" | ||
| ): | ||
| return lines |
There was a problem hiding this comment.
Validate existing branch filters instead of only checking that one exists.
Line 150 returns unchanged for any existing branches or branches-ignore, so push.branches: [develop] or branches-ignore would pass even though the policy says pushes should remain scoped to master. The same helper is also used for allowlisted pull_request triggers.
🔧 Suggested direction
- if has_nested_key(lines, event, "branches") or has_nested_key(
- lines, event, "branches-ignore"
- ):
- return lines
+ if has_nested_key(lines, event, "branches-ignore"):
+ raise ValueError(
+ f"{event_name} uses branches-ignore; expected branches limited to master"
+ )
+ if has_nested_key(lines, event, "branches"):
+ # Parse/validate the existing branch list and rewrite or fail unless it is exactly master.
+ return lines🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@ci/tools/gh/limit_agent_pr_workflows.py` around lines 141 - 153, The current
ensure_event_branches_master bail-out returns whenever a branches or
branches-ignore key exists without validating its contents; update
ensure_event_branches_master to read the actual branch list under the event (use
the found event object from find_on_block and helpers like
has_nested_key/get_nested_value or parse the YAML subsection) and validate that
branches are strictly scoped to "master" (and that branches-ignore does not
permit non-master pushes), and if the list contains other branches replace or
rewrite the underlying lines to enforce branches: [master] (apply the same
validation and replacement logic for branches-ignore), referencing the
ensure_event_branches_master function, the event variable returned by
find_on_block, and the has_nested_key check to locate where to add the content
validation and replacement.
| def parse_args(argv: list[str]) -> argparse.Namespace: | ||
| parser = argparse.ArgumentParser( | ||
| description="Limit GitHub Actions pull_request triggers to the agent PR allowlist." | ||
| ) | ||
| parser.add_argument( | ||
| "--workflows-dir", | ||
| type=Path, | ||
| default=Path(".github/workflows"), | ||
| help="Directory containing workflow .yml/.yaml files.", | ||
| ) | ||
| parser.add_argument( | ||
| "--allow-pr", | ||
| action="append", | ||
| default=[], | ||
| metavar="FILENAME", | ||
| help="Additional workflow filename allowed to keep pull_request.", | ||
| ) | ||
| parser.add_argument( | ||
| "--apply", | ||
| action="store_true", | ||
| help="Rewrite workflow files. Without this flag, only print the planned changes.", | ||
| ) | ||
| parser.add_argument( | ||
| "--check", | ||
| action="store_true", | ||
| help="Return a non-zero exit code if any workflow would change.", | ||
| ) | ||
| parser.add_argument( | ||
| "--print-allowlist", | ||
| action="store_true", | ||
| help="Print the effective PR allowlist and exit.", | ||
| ) | ||
| return parser.parse_args(argv) | ||
|
|
||
|
|
||
| def main(argv: list[str] | None = None) -> int: | ||
| args = parse_args(sys.argv[1:] if argv is None else argv) |
There was a problem hiding this comment.
🛠️ Refactor suggestion | 🟠 Major
Align CLI signatures with the repository parser convention.
parse_args should accept an optional argument list, and main currently violates the no-default-parameter rule with argv = None.
As per coding guidelines, “parse_args functions MUST accept an optional list[str] parameter for testing flexibility” and “All function parameters MUST have explicit type annotations and MUST NOT have default values.”
♻️ Proposed signature cleanup
-def parse_args(argv: list[str]) -> argparse.Namespace:
+def parse_args(argv: list[str] | None) -> argparse.Namespace:
@@
-def main(argv: list[str] | None = None) -> int:
- args = parse_args(sys.argv[1:] if argv is None else argv)
+def main(argv: list[str] | None) -> int:
+ args = parse_args(argv)
@@
if __name__ == "__main__":
- raise SystemExit(main())
+ raise SystemExit(main(None))🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@ci/tools/gh/limit_agent_pr_workflows.py` around lines 247 - 283, parse_args
currently requires a list[str] and main uses a default None parameter, violating
the repo convention; change parse_args to accept an optional argv parameter
(e.g., argv: list[str] | None = None) and inside it use sys.argv[1:] when argv
is None, and change main to require an explicit argv parameter with no default
(e.g., main(argv: list[str]) -> int) and pass that argv into parse_args; update
any internal calls accordingly so parse_args and main match the repository's
required signatures and type-annotation rules.
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (4)
ci/tools/gh/limit_agent_pr_workflows.py (4)
140-152:⚠️ Potential issue | 🟠 MajorValidate existing branch filters before accepting them.
This currently treats any existing
branchesorbranches-ignorekey as compliant. A workflow withpush.branches: [develop]orbranches-ignorewould pass even though the policy requiresmasterscoping.🔧 Suggested direction
- if has_nested_key(lines, event, "branches") or has_nested_key( - lines, event, "branches-ignore" - ): - return lines + if has_nested_key(lines, event, "branches-ignore"): + raise ValueError( + f"{event_name} uses branches-ignore; expected branches limited to master" + ) + if has_nested_key(lines, event, "branches"): + # Parse/validate the existing branch values and rewrite or fail unless + # they are exactly ["master"]. + return lines🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ci/tools/gh/limit_agent_pr_workflows.py` around lines 140 - 152, The current ensure_event_branches_master function incorrectly treats any existing branches or branches-ignore key as compliant; change it to validate their values: for an event with a "branches" key (use event and has_nested_key), parse the branch list and ensure "master" is present—if not, add "master" to that list; for a "branches-ignore" key, parse its list and ensure it does NOT contain "master"—if it does, remove "master" from that ignore list or replace the key with a compliant "branches: ['master']" entry; update the lines buffer accordingly instead of early-returning when has_nested_key is true so the function enforces the required master scoping.
75-85:⚠️ Potential issue | 🟠 MajorFail fast when the workflow trigger block cannot be parsed.
Returning
Nonesilently skips files with missing or unsupportedon:shapes, so--checkcan pass without enforcing policy on those workflows.Run this read-only check to find workflow trigger shapes this parser may skip:
#!/bin/bash # Description: Find workflow files with inline/quoted/non-block trigger shapes. # Expected: no output, or explicit parser support/fail-fast handling for every match. python - <<'PY' from pathlib import Path import re workflow_dir = Path(".github/workflows") if not workflow_dir.is_dir(): raise SystemExit("missing .github/workflows") for path in sorted([*workflow_dir.glob("*.yml"), *workflow_dir.glob("*.yaml")]): text = path.read_text(encoding="utf-8") for lineno, line in enumerate(text.splitlines(), start=1): if re.match(r"^\s*['\"]?on['\"]?\s*:\s*\S", line): print(f"{path}:{lineno}: inline or quoted on key: {line}") if re.match(r"^\s*pull_request\s*:\s*\S", line): print(f"{path}:{lineno}: inline pull_request config: {line}") PYBased on learnings, “Never use silent fallbacks for missing critical resources - always fail fast with descriptive errors”.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ci/tools/gh/limit_agent_pr_workflows.py` around lines 75 - 85, The parser currently returns None from find_on_block when it can't find or parse an on: trigger, allowing --check to silently skip workflows; change find_on_block to fail fast by raising a descriptive exception (e.g., ValueError or a custom ParseError) instead of returning None, and modify the function signature to accept contextual info (like the workflow path or raw text) so the error message can include which file/lines failed; update any callers of find_on_block to let the exception propagate (or catch and surface it as a non-zero check failure) so missing/unsupported on: shapes cause the CI check to fail rather than be ignored.
246-282: 🛠️ Refactor suggestion | 🟠 MajorAlign CLI signatures with the repository parser convention.
parse_argsshould accept optional argv for tests, whilemainshould not use a default parameter value.♻️ Proposed signature cleanup
-def parse_args(argv: list[str]) -> argparse.Namespace: +def parse_args(argv: list[str] | None) -> argparse.Namespace: @@ - return parser.parse_args(argv) + return parser.parse_args(sys.argv[1:] if argv is None else argv) @@ -def main(argv: list[str] | None = None) -> int: - args = parse_args(sys.argv[1:] if argv is None else argv) +def main(argv: list[str] | None) -> int: + args = parse_args(argv) @@ if __name__ == "__main__": - raise SystemExit(main()) + raise SystemExit(main(None))As per coding guidelines, “parse_args functions MUST accept an optional list[str] parameter for testing flexibility” and “All function parameters MUST have explicit type annotations and MUST NOT have default values.”
Also applies to: 319-320
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ci/tools/gh/limit_agent_pr_workflows.py` around lines 246 - 282, Change parse_args to accept an optional argv by updating its signature to parse_args(argv: list[str] | None = None) and inside it call parser.parse_args(argv if argv is not None else sys.argv[1:]); then remove the default on main by changing main to def main(argv: list[str]) -> int and call args = parse_args(argv) so main no longer has a default parameter and parse_args supports tests via an optional argv.
17-17: 🛠️ Refactor suggestion | 🟠 MajorAdd
@typecheckedto the dataclasses.
EventBlock,OnBlock, andWorkflowResultare missing runtime type validation decorators.Run this read-only check to confirm the project-approved provider before applying the decorator:
#!/bin/bash # Description: Verify whether typeguard/typechecked is already declared or used. # Expected: dependency/config references for typeguard or existing project usage of `@typechecked`. fd -a '^(pyproject\.toml|requirements.*\.txt|setup\.(py|cfg)|tox\.ini)$' . \ -x rg -n -C2 '\b(typeguard|typechecked)\b' {} || true rg -n -C2 '@typechecked|from typeguard import typechecked|import typeguard' . || true♻️ Proposed fix
from dataclasses import dataclass from pathlib import Path +from typeguard import typechecked + DEFAULT_PR_ALLOWLIST = frozenset( @@ -@dataclass(frozen=True) +@typechecked +@dataclass(frozen=True) class EventBlock: @@ -@dataclass(frozen=True) +@typechecked +@dataclass(frozen=True) class OnBlock: @@ -@dataclass +@typechecked +@dataclass class WorkflowResult:Based on learnings, “Use typechecked decorator with dataclass for runtime type validation”.
Also applies to: 35-54
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ci/tools/gh/limit_agent_pr_workflows.py` at line 17, Add runtime type validation by importing and applying the `@typechecked` decorator from typeguard to each dataclass: put "from typeguard import typechecked" at the top (if not already present) and add `@typechecked` immediately above the `@dataclass` for EventBlock, OnBlock, and WorkflowResult (the dataclass declarations in this file). Before committing, run the provided read-only check script to confirm the project uses typeguard/typechecked so you don’t introduce an unapproved dependency.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@ci/tools/gh/limit_agent_pr_workflows.py`:
- Around line 21-30: DEFAULT_PR_ALLOWLIST is missing "arduino_library_lint.yml"
so the PR workflow checker will treat that workflow as disallowed; update the
frozenset DEFAULT_PR_ALLOWLIST in limit_agent_pr_workflows.py to include
"arduino_library_lint.yml" alongside the existing entries (unit_test_linux.yml,
example_test_linux.yml, build_uno.yml, build_esp32s3.yml, build_teensy41.yml,
build_wasm.yml) so the list matches the policy and the pull_request trigger for
arduino_library_lint.yml is preserved.
- Around line 241-243: The function workflow_files uses list and generator
comprehensions which violate the style rule; replace them with explicit loops:
build the files list by iterating over workflows_dir.glob("*.yml") and
workflows_dir.glob("*.yaml") and append each Path to a list, then iterate that
list and append only path.is_file() entries to the result before returning;
apply the same explicit-loop replacement for the other comprehension occurrences
in this module that create filtered workflow lists (look for similar uses
building and filtering Path lists).
---
Duplicate comments:
In `@ci/tools/gh/limit_agent_pr_workflows.py`:
- Around line 140-152: The current ensure_event_branches_master function
incorrectly treats any existing branches or branches-ignore key as compliant;
change it to validate their values: for an event with a "branches" key (use
event and has_nested_key), parse the branch list and ensure "master" is
present—if not, add "master" to that list; for a "branches-ignore" key, parse
its list and ensure it does NOT contain "master"—if it does, remove "master"
from that ignore list or replace the key with a compliant "branches: ['master']"
entry; update the lines buffer accordingly instead of early-returning when
has_nested_key is true so the function enforces the required master scoping.
- Around line 75-85: The parser currently returns None from find_on_block when
it can't find or parse an on: trigger, allowing --check to silently skip
workflows; change find_on_block to fail fast by raising a descriptive exception
(e.g., ValueError or a custom ParseError) instead of returning None, and modify
the function signature to accept contextual info (like the workflow path or raw
text) so the error message can include which file/lines failed; update any
callers of find_on_block to let the exception propagate (or catch and surface it
as a non-zero check failure) so missing/unsupported on: shapes cause the CI
check to fail rather than be ignored.
- Around line 246-282: Change parse_args to accept an optional argv by updating
its signature to parse_args(argv: list[str] | None = None) and inside it call
parser.parse_args(argv if argv is not None else sys.argv[1:]); then remove the
default on main by changing main to def main(argv: list[str]) -> int and call
args = parse_args(argv) so main no longer has a default parameter and parse_args
supports tests via an optional argv.
- Line 17: Add runtime type validation by importing and applying the
`@typechecked` decorator from typeguard to each dataclass: put "from typeguard
import typechecked" at the top (if not already present) and add `@typechecked`
immediately above the `@dataclass` for EventBlock, OnBlock, and WorkflowResult
(the dataclass declarations in this file). Before committing, run the provided
read-only check script to confirm the project uses typeguard/typechecked so you
don’t introduce an unapproved dependency.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: b7ec5353-5366-4391-834c-a1b6900d28a8
📒 Files selected for processing (2)
.github/workflows/arduino_library_lint.ymlci/tools/gh/limit_agent_pr_workflows.py
✅ Files skipped from review due to trivial changes (1)
- .github/workflows/arduino_library_lint.yml
| DEFAULT_PR_ALLOWLIST = frozenset( | ||
| { | ||
| "unit_test_linux.yml", | ||
| "example_test_linux.yml", | ||
| "build_uno.yml", | ||
| "build_esp32s3.yml", | ||
| "build_teensy41.yml", | ||
| "build_wasm.yml", | ||
| } | ||
| ) |
There was a problem hiding this comment.
Add arduino_library_lint.yml to the default PR allowlist.
The linked policy lists seven allowed PR workflows, but this constant only has six. As written, the checker will treat arduino_library_lint.yml as disallowed and remove/fail its pull_request trigger.
🐛 Proposed fix
DEFAULT_PR_ALLOWLIST = frozenset(
{
"unit_test_linux.yml",
"example_test_linux.yml",
+ "arduino_library_lint.yml",
"build_uno.yml",
"build_esp32s3.yml",
"build_teensy41.yml",
"build_wasm.yml",
}
)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@ci/tools/gh/limit_agent_pr_workflows.py` around lines 21 - 30,
DEFAULT_PR_ALLOWLIST is missing "arduino_library_lint.yml" so the PR workflow
checker will treat that workflow as disallowed; update the frozenset
DEFAULT_PR_ALLOWLIST in limit_agent_pr_workflows.py to include
"arduino_library_lint.yml" alongside the existing entries (unit_test_linux.yml,
example_test_linux.yml, build_uno.yml, build_esp32s3.yml, build_teensy41.yml,
build_wasm.yml) so the list matches the policy and the pull_request trigger for
arduino_library_lint.yml is preserved.
| def workflow_files(workflows_dir: Path) -> list[Path]: | ||
| files = [*workflows_dir.glob("*.yml"), *workflows_dir.glob("*.yaml")] | ||
| return sorted(path for path in files if path.is_file()) |
There was a problem hiding this comment.
🛠️ Refactor suggestion | 🟠 Major
Replace comprehensions with explicit loops.
These list/generator comprehensions violate the repository Python style rule.
♻️ Proposed refactor
def workflow_files(workflows_dir: Path) -> list[Path]:
- files = [*workflows_dir.glob("*.yml"), *workflows_dir.glob("*.yaml")]
- return sorted(path for path in files if path.is_file())
+ files: list[Path] = []
+ for path in workflows_dir.glob("*.yml"):
+ if path.is_file():
+ files.append(path)
+ for path in workflows_dir.glob("*.yaml"):
+ if path.is_file():
+ files.append(path)
+ return sorted(files)
@@
- results = [
- transform_workflow(path, allow_pr=path.name in allowlist)
- for path in workflow_files(workflows_dir)
- ]
- changed = [result for result in results if result.changed]
+ results: list[WorkflowResult] = []
+ for path in workflow_files(workflows_dir):
+ results.append(transform_workflow(path, allow_pr=path.name in allowlist))
+
+ changed: list[WorkflowResult] = []
+ for result in results:
+ if result.changed:
+ changed.append(result)As per coding guidelines, “Use explicit loops instead of list comprehensions for code clarity and debuggability”.
Also applies to: 295-299
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@ci/tools/gh/limit_agent_pr_workflows.py` around lines 241 - 243, The function
workflow_files uses list and generator comprehensions which violate the style
rule; replace them with explicit loops: build the files list by iterating over
workflows_dir.glob("*.yml") and workflows_dir.glob("*.yaml") and append each
Path to a list, then iterate that list and append only path.is_file() entries to
the result before returning; apply the same explicit-loop replacement for the
other comprehension occurrences in this module that create filtered workflow
lists (look for similar uses building and filtering Path lists).
82c7d75 to
d60f093
Compare
d60f093 to
4d7a7ab
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (6)
ci/tools/gh/limit_agent_pr_workflows.py (6)
246-282: 🛠️ Refactor suggestion | 🟠 MajorCLI signatures violate repo conventions.
parse_argsmust accept an optionallist[str] | Nonefor testing flexibility.mainuses a default value (argv: list[str] | None = None), which violates "All function parameters MUST have explicit type annotations and MUST NOT have default values." Move thesys.argv[1:]fallback intoparse_argsand havemaintakeargvwith no default; update the__main__guard to callmain(None)ormain(sys.argv[1:])accordingly.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ci/tools/gh/limit_agent_pr_workflows.py` around lines 246 - 282, The CLI signatures violate repo conventions: change parse_args to accept argv: list[str] | None and move the sys.argv fallback into parse_args (i.e., inside parse_args, if argv is None set argv = sys.argv[1:]), and remove the default value from main so its signature is main(argv: list[str] | None) with no default; update the __main__ guard to call main(None) (or pass sys.argv[1:] explicitly) accordingly; update references to parse_args(main's argv) so parse_args is called with the argv passed into main.
241-243: 🛠️ Refactor suggestion | 🟠 MajorReplace list/generator comprehensions with explicit loops.
As per coding guidelines ("Use explicit loops instead of list comprehensions for code clarity and debuggability"), rewrite the comprehensions in
workflow_files(line 242–243) and inmain(lines 295–299) as explicitforloops.Also applies to: 295-299
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ci/tools/gh/limit_agent_pr_workflows.py` around lines 241 - 243, Rewrite the list/generator comprehensions in workflow_files and in main to use explicit for-loops: in workflow_files (function workflow_files) replace the combined glob comprehension that builds files and the sorted generator expression that filters path.is_file() with two explicit loops that first extend a files list with results of workflows_dir.glob("*.yml") and workflows_dir.glob("*.yaml"), then build a new list by iterating over files and appending only those where path.is_file(), and finally return sorted(...) of that filtered list; similarly in main (the block around where files/workflows are collected at lines ~295–299) replace any list or generator comprehensions with equivalent for-loops that append items to a list, preserving the same order and semantics.
75-94:⚠️ Potential issue | 🟠 MajorSilent fallback when
on:block is unparseable.
find_on_blockreturnsNonefor any workflow whose top-levelon:key isn't a literal block scalar (e.g., inlineon: push, quoted"on":, or unusual indentation). Callers then silently skip the file, which violates the "fail fast with descriptive errors" rule. Current repo workflows happen to all use block form, but a raised error (or at minimum a stderr warning and non-zero exit via--check) would prevent future drift from silently bypassing the policy.
35-57: 🛠️ Refactor suggestion | 🟠 MajorMissing
@typecheckedon dataclasses.As per coding guidelines ("Use
@typecheckeddecorator with@dataclassfor runtime type validation"),EventBlock,OnBlock, andWorkflowResultshould be decorated with@typechecked(fromtypeguard, already a project dep) above@dataclass.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ci/tools/gh/limit_agent_pr_workflows.py` around lines 35 - 57, The dataclasses EventBlock, OnBlock, and WorkflowResult lack runtime type validation; add the `@typechecked` decorator from typeguard above each `@dataclass` declaration (decorate EventBlock, OnBlock, and WorkflowResult) and ensure you import typechecked (from typeguard import typechecked) at the top of the file so the runtime type checks are enabled for their fields.
21-30:⚠️ Potential issue | 🟡 MinorAllowlist diverges from the linked issue (7 vs. 6 workflows).
The linked issue
#2393listsarduino_library_lint.ymlas one of seven allowed PR workflows, but thisDEFAULT_PR_ALLOWLISTcontains only six. The PR description states Arduino library lint is intentionally kept as push/manual only, so please confirm the issue's policy is the one being superseded — otherwise running--applywill silently strip apull_requesttrigger that was supposed to remain. Consider adding a short comment here recording that the divergence is deliberate.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ci/tools/gh/limit_agent_pr_workflows.py` around lines 21 - 30, The DEFAULT_PR_ALLOWLIST currently lists six workflows but the linked issue `#2393` lists seven (including arduino_library_lint.yml), so either update the frozenset DEFAULT_PR_ALLOWLIST to include "arduino_library_lint.yml" to match the issue, or explicitly document the intentional divergence by adding a short inline comment next to DEFAULT_PR_ALLOWLIST referencing issue `#2393` and stating that arduino_library_lint.yml is intentionally excluded (push/manual only) so the apply step won't remove a pull_request trigger unexpectedly; modify DEFAULT_PR_ALLOWLIST or add the comment accordingly.
140-152:⚠️ Potential issue | 🟠 Major
ensure_event_branches_masterdoesn't validate existing branch filters.If a workflow already has
push.branches: [develop]orbranches-ignore: [master], this function returns unchanged and the policy ("push scoped to master") is silently bypassed. Validate the contents of any existingbranches/branches-ignorekey and rewrite or fail when they don't matchmaster.
🧹 Nitpick comments (3)
.github/workflows/build_nrf52_xiaoblesense.yml (1)
3-5: Stalepull_requestreference in concurrency.With the
pull_requesttrigger removed,cancel-in-progresswill always evaluate tofalse. Consider simplifying to a constant (e.g.,false, ortrueif you want to cancel superseded master runs) to avoid confusion for future readers.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/build_nrf52_xiaoblesense.yml around lines 3 - 5, The concurrency section uses cancel-in-progress: ${{ github.event_name == 'pull_request' }} which is now always false because the pull_request trigger was removed; change the cancel-in-progress value to an explicit boolean (e.g., set cancel-in-progress to false or true) in the concurrency block so the intent is clear and no longer depends on github.event_name or the pull_request string; update the concurrency keys (group, cancel-in-progress) accordingly to remove the stale expression..github/workflows/build_atmega8a.yml (1)
3-11: Stalecancel-in-progresscondition after removingpull_requesttrigger.With the
pull_requesttrigger removed,github.event_namecan only bepushorworkflow_dispatch, socancel-in-progresswill always evaluate tofalse. Not a functional bug, but consider simplifying for clarity.♻️ Suggested simplification
concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.event_name == 'pull_request' }} + cancel-in-progress: false🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/build_atmega8a.yml around lines 3 - 11, The concurrency block's cancel-in-progress condition is now redundant because the `pull_request` trigger was removed; update the `concurrency` configuration (the group and cancel-in-progress keys) to a simpler form by removing the conditional expression using `github.event_name` and set `cancel-in-progress` to a boolean (likely true if you want to cancel prior runs on the same ref) or remove the key entirely if not needed; edit the `concurrency` stanza that contains `group: ${{ github.workflow }}-${{ github.ref }}` and `cancel-in-progress: ${{ github.event_name == 'pull_request' }}` to the simplified form..github/workflows/build_wasm_compilers.yml (1)
5-5: Stalepull_requestreference in concurrency config.With the
pull_requesttrigger removed,cancel-in-progresswill always evaluate tofalse(onlypush/workflow_dispatchremain). Consider simplifying to a literal, or enabling cancellation for dispatch/push as intended. Likewise, step names such as "Checkout PR code" (Line 39) and thegithub.event.pull_request.head.shafallback (Line 42) are now dead paths — the fallbackgithub.shais always used — and could be cleaned up for clarity.Proposed simplification
concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.event_name == 'pull_request' }} + cancel-in-progress: false🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/build_wasm_compilers.yml at line 5, The concurrency block uses cancel-in-progress: ${{ github.event_name == 'pull_request' }} which is stale now that pull_request trigger is removed; replace that expression with a literal (true or false) depending on desired behavior (e.g., cancel-in-progress: true to enable cancellation for push/workflow_dispatch), and remove or update dead PR-specific items: rename the step "Checkout PR code" to a generic "Checkout code" and remove the unused fallback reference to github.event.pull_request.head.sha (replace usages with github.sha) so that the workflow and steps (concurrency cancel-in-progress, step name, and SHA reference) are consistent and no longer rely on pull_request data.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@ci/tools/gh/limit_agent_pr_workflows.py`:
- Around line 246-282: The CLI signatures violate repo conventions: change
parse_args to accept argv: list[str] | None and move the sys.argv fallback into
parse_args (i.e., inside parse_args, if argv is None set argv = sys.argv[1:]),
and remove the default value from main so its signature is main(argv: list[str]
| None) with no default; update the __main__ guard to call main(None) (or pass
sys.argv[1:] explicitly) accordingly; update references to parse_args(main's
argv) so parse_args is called with the argv passed into main.
- Around line 241-243: Rewrite the list/generator comprehensions in
workflow_files and in main to use explicit for-loops: in workflow_files
(function workflow_files) replace the combined glob comprehension that builds
files and the sorted generator expression that filters path.is_file() with two
explicit loops that first extend a files list with results of
workflows_dir.glob("*.yml") and workflows_dir.glob("*.yaml"), then build a new
list by iterating over files and appending only those where path.is_file(), and
finally return sorted(...) of that filtered list; similarly in main (the block
around where files/workflows are collected at lines ~295–299) replace any list
or generator comprehensions with equivalent for-loops that append items to a
list, preserving the same order and semantics.
- Around line 35-57: The dataclasses EventBlock, OnBlock, and WorkflowResult
lack runtime type validation; add the `@typechecked` decorator from typeguard
above each `@dataclass` declaration (decorate EventBlock, OnBlock, and
WorkflowResult) and ensure you import typechecked (from typeguard import
typechecked) at the top of the file so the runtime type checks are enabled for
their fields.
- Around line 21-30: The DEFAULT_PR_ALLOWLIST currently lists six workflows but
the linked issue `#2393` lists seven (including arduino_library_lint.yml), so
either update the frozenset DEFAULT_PR_ALLOWLIST to include
"arduino_library_lint.yml" to match the issue, or explicitly document the
intentional divergence by adding a short inline comment next to
DEFAULT_PR_ALLOWLIST referencing issue `#2393` and stating that
arduino_library_lint.yml is intentionally excluded (push/manual only) so the
apply step won't remove a pull_request trigger unexpectedly; modify
DEFAULT_PR_ALLOWLIST or add the comment accordingly.
---
Nitpick comments:
In @.github/workflows/build_atmega8a.yml:
- Around line 3-11: The concurrency block's cancel-in-progress condition is now
redundant because the `pull_request` trigger was removed; update the
`concurrency` configuration (the group and cancel-in-progress keys) to a simpler
form by removing the conditional expression using `github.event_name` and set
`cancel-in-progress` to a boolean (likely true if you want to cancel prior runs
on the same ref) or remove the key entirely if not needed; edit the
`concurrency` stanza that contains `group: ${{ github.workflow }}-${{ github.ref
}}` and `cancel-in-progress: ${{ github.event_name == 'pull_request' }}` to the
simplified form.
In @.github/workflows/build_nrf52_xiaoblesense.yml:
- Around line 3-5: The concurrency section uses cancel-in-progress: ${{
github.event_name == 'pull_request' }} which is now always false because the
pull_request trigger was removed; change the cancel-in-progress value to an
explicit boolean (e.g., set cancel-in-progress to false or true) in the
concurrency block so the intent is clear and no longer depends on
github.event_name or the pull_request string; update the concurrency keys
(group, cancel-in-progress) accordingly to remove the stale expression.
In @.github/workflows/build_wasm_compilers.yml:
- Line 5: The concurrency block uses cancel-in-progress: ${{ github.event_name
== 'pull_request' }} which is stale now that pull_request trigger is removed;
replace that expression with a literal (true or false) depending on desired
behavior (e.g., cancel-in-progress: true to enable cancellation for
push/workflow_dispatch), and remove or update dead PR-specific items: rename the
step "Checkout PR code" to a generic "Checkout code" and remove the unused
fallback reference to github.event.pull_request.head.sha (replace usages with
github.sha) so that the workflow and steps (concurrency cancel-in-progress, step
name, and SHA reference) are consistent and no longer rely on pull_request data.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d374ab5a-2fbe-4e4a-9308-d01b9ca52aec
📒 Files selected for processing (87)
.github/workflows/arduino_library_lint.yml.github/workflows/avr8js_uno_test.yml.github/workflows/build.yml.github/workflows/build_adafruit_feather_nrf52840_sense.yml.github/workflows/build_adafruit_xiaoblesense.yml.github/workflows/build_apollo3_red.yml.github/workflows/build_apollo3_thing_explorable.yml.github/workflows/build_atmega8a.yml.github/workflows/build_attiny1604.yml.github/workflows/build_attiny1616.yml.github/workflows/build_attiny4313.yml.github/workflows/build_attiny85.yml.github/workflows/build_attiny88.yml.github/workflows/build_blackpill_stm32f4.yml.github/workflows/build_bluepill.yml.github/workflows/build_clone_and_compile.yml.github/workflows/build_digix.yml.github/workflows/build_due.yml.github/workflows/build_esp32_i2s_ws2812.yml.github/workflows/build_esp32c2.yml.github/workflows/build_esp32c3.yml.github/workflows/build_esp32c5.yml.github/workflows/build_esp32c6.yml.github/workflows/build_esp32dev.yml.github/workflows/build_esp32dev_idf3.3.yml.github/workflows/build_esp32dev_idf4.4.yml.github/workflows/build_esp32dev_namespace.yml.github/workflows/build_esp32h2.yml.github/workflows/build_esp32p4.yml.github/workflows/build_esp32s2.yml.github/workflows/build_esp32s3.yml.github/workflows/build_esp32wroom.yml.github/workflows/build_esp8266.yml.github/workflows/build_esp_extra_libs.yml.github/workflows/build_giga_r1.yml.github/workflows/build_linux.yml.github/workflows/build_maple_map.yml.github/workflows/build_mgm240s_thingplusmatter.yml.github/workflows/build_nano_every.yml.github/workflows/build_nrf52840_dk.yml.github/workflows/build_nrf52_xiaoblesense.yml.github/workflows/build_nucleo_f429zi.yml.github/workflows/build_nucleo_f439zi.yml.github/workflows/build_rgbw.yml.github/workflows/build_rp2040.yml.github/workflows/build_rp2350.yml.github/workflows/build_rp2350B.yml.github/workflows/build_stm103tb.yml.github/workflows/build_teensy30.yml.github/workflows/build_teensy31.yml.github/workflows/build_teensy32.yml.github/workflows/build_teensy35.yml.github/workflows/build_teensy36.yml.github/workflows/build_teensy40.yml.github/workflows/build_teensy41.yml.github/workflows/build_teensy41_ofled.yml.github/workflows/build_teensyLC.yml.github/workflows/build_teensy_octo.yml.github/workflows/build_uno_r4_wifif.yml.github/workflows/build_wasm.yml.github/workflows/build_wasm_compilers.yml.github/workflows/build_yun.yml.github/workflows/check_attiny85.yml.github/workflows/check_bluepill_size.yml.github/workflows/check_esp32_size.yml.github/workflows/check_teensy30_size.yml.github/workflows/check_teensy31_size.yml.github/workflows/check_teensy32_size.yml.github/workflows/check_teensy35_size.yml.github/workflows/check_teensy36_size.yml.github/workflows/check_teensy41_size.yml.github/workflows/check_teensylc_size.yml.github/workflows/check_uno_size.yml.github/workflows/docker_build_compiler.yml.github/workflows/docker_compiler_template.yml.github/workflows/example_test_linux.yml.github/workflows/example_test_macos.yml.github/workflows/example_test_windows.yml.github/workflows/header-perf.yml.github/workflows/iwyu.yml.github/workflows/qemu_esp32c3_test.yml.github/workflows/qemu_esp32dev_test.yml.github/workflows/qemu_esp32s3_test.yml.github/workflows/unit_test_linux.yml.github/workflows/unit_test_macos.yml.github/workflows/unit_test_windows.ymlci/tools/gh/limit_agent_pr_workflows.py
💤 Files with no reviewable changes (4)
- .github/workflows/avr8js_uno_test.yml
- .github/workflows/qemu_esp32dev_test.yml
- .github/workflows/qemu_esp32s3_test.yml
- .github/workflows/qemu_esp32c3_test.yml
✅ Files skipped from review due to trivial changes (25)
- .github/workflows/build_esp_extra_libs.yml
- .github/workflows/build.yml
- .github/workflows/build_rp2350B.yml
- .github/workflows/arduino_library_lint.yml
- .github/workflows/build_clone_and_compile.yml
- .github/workflows/unit_test_linux.yml
- .github/workflows/build_wasm.yml
- .github/workflows/build_attiny85.yml
- .github/workflows/example_test_linux.yml
- .github/workflows/build_esp32s3.yml
- .github/workflows/build_teensy41.yml
- .github/workflows/build_teensy41_ofled.yml
- .github/workflows/docker_build_compiler.yml
- .github/workflows/build_nucleo_f429zi.yml
- .github/workflows/build_esp32wroom.yml
- .github/workflows/docker_compiler_template.yml
- .github/workflows/build_stm103tb.yml
- .github/workflows/build_blackpill_stm32f4.yml
- .github/workflows/check_teensy30_size.yml
- .github/workflows/build_esp8266.yml
- .github/workflows/build_esp32dev_namespace.yml
- .github/workflows/build_maple_map.yml
- .github/workflows/check_teensy32_size.yml
- .github/workflows/build_adafruit_feather_nrf52840_sense.yml
- .github/workflows/iwyu.yml
🚧 Files skipped from review as they are similar to previous changes (52)
- .github/workflows/build_nrf52840_dk.yml
- .github/workflows/build_digix.yml
- .github/workflows/build_nucleo_f439zi.yml
- .github/workflows/build_esp32dev_idf3.3.yml
- .github/workflows/build_attiny1604.yml
- .github/workflows/check_esp32_size.yml
- .github/workflows/build_esp32_i2s_ws2812.yml
- .github/workflows/example_test_macos.yml
- .github/workflows/build_teensy30.yml
- .github/workflows/build_bluepill.yml
- .github/workflows/build_teensy32.yml
- .github/workflows/build_apollo3_red.yml
- .github/workflows/build_esp32c3.yml
- .github/workflows/build_esp32c5.yml
- .github/workflows/build_attiny88.yml
- .github/workflows/check_teensylc_size.yml
- .github/workflows/build_rp2040.yml
- .github/workflows/example_test_windows.yml
- .github/workflows/check_teensy36_size.yml
- .github/workflows/build_teensy36.yml
- .github/workflows/build_adafruit_xiaoblesense.yml
- .github/workflows/build_rgbw.yml
- .github/workflows/build_giga_r1.yml
- .github/workflows/build_nano_every.yml
- .github/workflows/build_attiny4313.yml
- .github/workflows/check_attiny85.yml
- .github/workflows/build_due.yml
- .github/workflows/build_esp32dev_idf4.4.yml
- .github/workflows/build_teensy_octo.yml
- .github/workflows/unit_test_macos.yml
- .github/workflows/build_teensy35.yml
- .github/workflows/build_rp2350.yml
- .github/workflows/build_yun.yml
- .github/workflows/build_apollo3_thing_explorable.yml
- .github/workflows/build_esp32dev.yml
- .github/workflows/build_esp32c2.yml
- .github/workflows/build_mgm240s_thingplusmatter.yml
- .github/workflows/build_uno_r4_wifif.yml
- .github/workflows/build_teensy31.yml
- .github/workflows/build_attiny1616.yml
- .github/workflows/build_teensyLC.yml
- .github/workflows/unit_test_windows.yml
- .github/workflows/build_esp32s2.yml
- .github/workflows/build_esp32h2.yml
- .github/workflows/header-perf.yml
- .github/workflows/check_uno_size.yml
- .github/workflows/check_bluepill_size.yml
- .github/workflows/build_teensy40.yml
- .github/workflows/build_esp32c6.yml
- .github/workflows/build_esp32p4.yml
- .github/workflows/check_teensy31_size.yml
- .github/workflows/check_teensy35_size.yml
Summary
pull_requesttrigger blocksci/tools/gh/limit_agent_pr_workflows.pyas a dry-run/apply/check helper for the same narrow policyPR allowlist after this change
.github/workflows/unit_test_linux.yml.github/workflows/example_test_linux.yml.github/workflows/build_uno.yml.github/workflows/build_esp32s3.yml.github/workflows/build_teensy41.yml.github/workflows/build_wasm.ymlValidation
python -m py_compile ci/tools/gh/limit_agent_pr_workflows.pypython ci/tools/gh/limit_agent_pr_workflows.py --checkpull_requesttriggers are limited to the six allowlisted workflows abovegit diff --check -- .github/workflows ci/tools/gh/limit_agent_pr_workflows.pyCloses #2393
Summary by CodeRabbit
Chores