Skip to content

Limit agent PR workflows to the lightweight CI allowlist #2393

Closed

Description

@zackees

Problem

Agent-authored PRs were fanning out across many GitHub Actions workflows because most board/example/unit workflows included a pull_request trigger. Representative workflows already restricted push to master; the costly part was the broad PR trigger surface.

PR allowlist

Only these workflows should run automatically on PRs:

  • Linux unit tests: .github/workflows/unit_test_linux.yml
  • Linux example tests: .github/workflows/example_test_linux.yml
  • UNO board build: .github/workflows/build_uno.yml
  • ESP32-S3 board build: .github/workflows/build_esp32s3.yml
  • Teensy 4.1 board build: .github/workflows/build_teensy41.yml
  • Arduino library lint: .github/workflows/arduino_library_lint.yml
  • WASM build: .github/workflows/build_wasm.yml

Windows and macOS unit/example workflows should stay available through push to master and manual dispatch, but should not run automatically on PRs. Same principle for other board builds.

Design

  • Remove pull_request triggers from active workflows outside the allowlist.
  • Keep or add push.branches: [master] for workflows that have push triggers.
  • Keep or add workflow_dispatch so standalone active workflows have manual Actions buttons.
  • Do not add new manual buttons to workflow_call templates unless they already define usable dispatch inputs; otherwise the button can appear runnable while missing caller-provided inputs.
  • Preserve workflow paths filters so master pushes remain scoped.
  • Add a repo script to apply/check the policy repeatably: ci/tools/gh/limit_agent_pr_workflows.py.

Local validation

  • python -m py_compile ci/tools/gh/limit_agent_pr_workflows.py
  • python ci/tools/gh/limit_agent_pr_workflows.py --check
  • Parsed all active workflow YAML files successfully.
  • Remaining pull_request trigger blocks are limited to the seven allowlisted workflows above.

Note

The ESP32-S3 allowlist item is interpreted as the board build (build_esp32s3.yml), not the QEMU workflow.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions