Skip to Content
flowpact

Impact mode

For publishers of reusable workflows and actions — check that the release impact a pull request declares covers what its changes require, so consumers never get a breaking change as a patch.

Impact mode fails a pull request that declares a smaller release than its changes need, such as a fix: title on a change that renames a job or removes an output of a published reusable workflow.

It grades every change callers can see as major, minor, patch or none, and compares that with the declared impact: by default the pull request's Conventional Commits title, which release tools such as release-please read from the squash commit. In the GitHub Action, turn it on with impact: auto (setup).

Callers pin a tag such as @v1 and take every release in it. Rename a job, and their branch protection waits forever for the old check name (Expected — Waiting for status to be reported), while nothing fails in your repository.

flowpact impact --base origin/main --title "fix: tidy the test job"
flowpact impact failing with FP810: declared patch (the title “fix: tidy the test job”), but a removed output and a renamed check in test.yml require major
A fix: title on a change that requires a major release.

What is graded

Only published units, the ones other repositories call:

  • every reusable workflow (on: workflow_call), except files whose name starts with _ (_build.yml), the convention for internal ones;
  • the action at the repository's root (action.yml, what uses: owner/repo@ref runs);
  • or, instead, what impact.publish lists, such as */action.yml in a repository of several actions (**/action.yml includes the root one).

Your own CI workflows and .github/actions/** are not graded. An internal workflow counts where a published one calls it, since its check names appear under the caller's.

Change to a published unitRequired impact
A check name is gone: a job renamed or removed, its id changed when it has no name, a matrix key or value changed or removed, ${{ }} added to or removed from name, a nested call removedmajor
Job id renamed, check name unchangednone
A new check name (a new job or matrix value)minor
workflow_call input or secret removed, made required or added as required, input type changed, choice option removedmajor
Output removed (callers read '')major
An artifact uploaded with actions/upload-artifact, by the unit or by what it runs, is no longer uploaded under that name: a caller's job that downloads it failsmajor (uncertain when the name is chosen at run time)
An output set on every run is now set only when an if: that reads a context holds: callers read '' otherwisemajor, uncertain (FP814)
Optional input, secret or output addedminor
Input default changedminor
Reusable workflow or action moved or deleted, or workflow_call removedmajor
A published unit no longer parsesmajor
A job, its own or a called workflow's, needs a new or higher permissions: scope: callers that grant less fail when the run starts. A job that calls a workflow and sets permissions: (or whose workflow does) requests them for all of it, so only its own countmajor
Action runs.using changed (node20 → node24)major
A job, its own or a called workflow's, needs a runner label or group it did not need ([self-hosted, gpu]): callers without one never start itmajor
A job's runners are now chosen at run time (runs-on: ${{ inputs.runner }})major, uncertain (FP814)
Another GitHub-hosted image (ubuntu-22.04 → ubuntu-24.04), or fewer runner labelspatch
A job gains, changes or loses its environment:: the caller's environment of that name, its protection rules and secrets, now applies or no longer doesminor (uncertain when the name is chosen at run time)
A new third-party action or workflow inside a published unit: callers' allow-lists and SHA-pinning policies applyminor
Nothing above, but the jobs or steps changed, the unit's or those of what it runs (comments, formatting and key order aside)patch
Narrower permissions, descriptions, workflow_dispatch inputsnone

Callers' branch protection is not visible from your repository, so every check name a published workflow reports counts as required. Names are compared as GitHub forms them. A name built from the workflow's inputs is compared by its template: Test ${{ inputs.os }} → Tests ${{ inputs.os }} is a rename, whatever callers pass.

Only some units

flowpact impact actions/deploy --base origin/main --title "$PR_TITLE"

Paths (files or directories) grade only the published units within them. flowpact impact, lint --impact and check --impact take them, as do the action's paths input and the API. Use them where each unit is released on its own, such as one job per action. This narrows the gate: a breaking change outside the paths passes.

Prefer directories (actions/) to files. A removed or renamed unit is graded only when its old path is among the paths: after a move from actions/old to actions/new, flowpact impact actions/new grades the new unit (minor) but not the removal (major).

Where the declared impact comes from

Exactly one source is authoritative (impact.declaredBy): the one your release tool reads.

SourceFromMeans
explicit--expect, action input expected-impactas given
title (default)--title, or the pull request title in GitHub Actionstype!: → major, feat → minor, fix / perf → patch, other types → none
labels--labels, or the pull request labels in GitHub Actionssemver:major / semver:minor / semver:patch / semver:none
  • The title describes the squash commit. A title that is not a Conventional Commit is not declared, even when a semver:* label is set.
  • Other sources are advisory. One that declares more (a semver:major label on a fix: title) is an error: the release tool would cut a patch.
  • Release pull requests (release-please's chore(main): release 0.3.0, or the autorelease: pending label) compare everything since the last release tag with the proposed version. release-please's settings for the root package apply: bump-minor-pre-major (before 1.0, 0.2.0 → 0.3.0 is a major release), bump-patch-for-minor-pre-major, include-v-in-tag and component tags (my-action-v0.2.0).
  • Without a declaration, flowpact reports the required impact (FP813) and does not fail.

Declaring more than needed is never an error, since a release may hold changes flowpact does not grade. Nor is a patch change under a none declaration.

Findings

CodeSeverityReported when
FP810 impact-under-declarederrorThe changes require more than declared (at least minor).
FP811 impact-declaration-conflicterrorAn advisory source declares more than the authoritative one.
FP812 impact-over-declaredinfoThe declaration is bigger than the changes require.
FP813 impact-undeclaredinfoNothing is declared; the required impact is reported.
FP814 impact-uncertainwarningA change depends on something flowpact cannot evaluate (a check name built from vars or the event, a runtime matrix, an output that is now set only when an if: holds). Not counted unless impact.uncertain: fail.

The baseline

RunCompared with
--base <ref> / action input base-refthat ref
pull_requestthe base commit of the pull request
pushthe commit before the push (a new branch or tag is skipped)
release pull requestthe last release tag (see above)
anything elseorigin/HEAD, else origin/main, else origin/master

merge_group runs are skipped (the pull request was checked), and so is a run whose baseline is the checked-out commit.

Using it

GitHub Action

on:
  pull_request:
    # edited / labeled: re-check when the title or the labels change
    types: [opened, edited, synchronize, reopened, labeled, unlabeled]

jobs:
  flowpact:
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@v7
      - uses: ciatlas/flowpact@v0.29
        with:
          impact: auto   # off (default) | auto | on
  • auto turns impact mode on for pull requests in repositories that publish a workflow or action. With the paths input, it skips a run when none is within them.
  • On a shallow checkout, the action fetches the base commit (and the release tags, for a release pull request) itself. contents: read is enough, and persist-credentials: false works.
  • The job summary gets an Impact section, and the outputs required-impact, declared-impact and impact-ok let later steps react.
  • Use pull_request. flowpact refuses pull_request_target, which checks out the default branch.

CLI

flowpact impact --base origin/main --title "$PR_TITLE"     # only the impact verdict
flowpact check --impact --base origin/main --expect minor  # everything check does, plus impact
OptionDescription
[paths…]Grade only the published workflows and actions within these files or directories (Only some units). Default: every published one.
--base <ref>Baseline (default: the pull request base in GitHub Actions, else origin/HEAD). It must be in the clone (git fetch).
--expect <level>Declared impact: none, patch, minor or major.
--title <text>Pull request title to read the declaration from.
--labels <a,b>Pull request labels.

--format json adds an impact section to the report: the baseline, the required and declared impact, ok, and every graded change.

Configuration

.github/flowpact/flowpact.config.yml
impact:
  publish: [.github/workflows/reusable-*.yml, '*/action.yml'] # what other repositories use
  declaredBy: title                                            # explicit | title | labels
  labels: { major: breaking, minor: enhancement }              # label names per level
  types: { feat: minor, fix: patch, perf: patch, deps: patch } # Conventional Commits types
  uncertain: warn                                              # warn | fail

The impact settings are read from the baseline, so a pull request cannot relax its own check: changed settings apply once it is merged. So are the severities and overrides of impact mode's rules (FP810–FP814): the pull request's own rules: cannot switch them off, its overrides cannot accept their findings, and no ignore comment can. ignore counts only where both sides match it (above). A base config applies under the baseline's config too, and alone when the baseline has no valid config.

How check names are formed

Verified against the check runs GitHub reported for a lab repository with one workflow per case (fixtures/checknames-lab; a test requires an exact match):

  • A job's check name is its name:, trimmed, or the job id when it has no name or a blank one. The workflow name and file name are not part of it.
  • A matrix job gets the suffix (value1, value2), unless its name is dynamic: text around an expression (Lit ${{ 'X' }}) or an expression that reads anything (${{ matrix.os }}) gets none, so such names can collide. A name that is a single literal expression (${{ 'Only' }}) keeps the suffix.
  • The suffix lists the matrix dimensions in declared order. Keys an include adds to existing combinations are not shown; combinations an include creates show all their values. null and '' are skipped, objects and arrays are flattened, and numbers are formatted like .NET (3.10 → 3.1, 1e15 → 1E+15).
  • A job in a called workflow reports caller job / callee job, with one more / per nesting level. Callee names can read the caller's with: values.
  • A job skipped by its if:, or because a job it needs failed, reports one check with its raw name, and a skipped caller reports no / callee checks at all.

On this page