Skip to Content
flowpact

Adopt it in an existing repository

A first run with many findings: fix what matters first, accept the rest with a reason and an expiry date, then turn flowpact on in CI.

A first run on a repository that has grown for years can list dozens of findings. Most are real: values that arrive empty, secrets that never reach the workflow that reads them. This is one order that works: see how many there are, fix the errors, accept the rest with a reason and a date, and keep new ones out with CI.

See how many there are

npx flowpact lint --hide-info

The summary at the end counts the findings per severity and lists the most frequent codes. To count them per rule:

npx flowpact lint --format json | jq -r '.findings[].code' | sort | uniq -c | sort -rn

Fix the errors first

Errors are what breaks or silently skips work: a matrix leg that gets an empty value, a required input or secret a caller does not pass, a secret read without being declared, a call GitHub rejects. Warnings are what may, or what is left over: an optional input without a default that decides an if:, an input or output nothing reads. Take one rule at a time:

npx flowpact lint --only FP401       # one rule
npx flowpact explain FP401           # why it matters, how to fix it, an example

Each rule's page has the same.

Accept what can wait, with a reason and a date

A finding you cannot fix now goes into the config as an override: the rule, what it is about, why it is acceptable, and until when.

.github/flowpact/flowpact.config.yml
overrides:
  - rule: FP105
    target: .github/workflows/deploy.yml#inputs.region
    reason: Every caller passes region; the default is added in the next deploy rework.
    expires: 2026-12-31
    owner: '@platform-team'

target is the finding's symbol, and file matches every finding in a file or under a path. To list the symbols:

npx flowpact lint --format json | jq -r '.findings[] | "\(.code)  \(.symbol // .loc.file)"'

Accepted findings move to a list of their own, with their reasons. When the date passes, the finding comes back with FP901; an override that no longer matches anything is FP902, and one that expires within two weeks FP903.

Change a rule that does not fit

When a whole rule does not fit how your repository works, change its severity rather than accepting each finding:

.github/flowpact/flowpact.config.yml
rules:
  FP105: info         # listed, never fails a run
  needs-without-data: warning   # an opt-in rule, named instead of numbered

Each rule can be error, warning, info or off, by code or name (Configuration).

Keep new findings out

Run it on every pull request. With the GitHub Action, findings become annotations on the lines a pull request changes, and the step fails on errors (fail-on: warning also fails on warnings, never on nothing):

.github/workflows/flowpact.yml
name: flowpact
on: pull_request
permissions:
  contents: read
jobs:
  flowpact:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7       # pin to a commit SHA
      - uses: ciatlas/flowpact@v0.29    # pin to a commit SHA

Make the job a required status check once the errors are gone. See Run on pull requests.

Check the calls into other repositories

When your workflows call workflows or actions in other repositories, record their interfaces and commit the lockfile, so those calls are checked too:

npx flowpact remotes update

Then run flowpact remotes update --dry-run --fail-on breaks on a schedule, to hear when a moved tag breaks one of your calls (A scheduled drift check).

If other repositories call your workflows or actions, contracts and impact mode come next: they keep a change that breaks those callers out of a patch release.

On this page