Troubleshooting
What to do when flowpact finds nothing to analyze, reports more than you expected, or cannot read a remote workflow, in the terminal, the editor and GitHub Actions.
Find what you see below. Each answer has a link you can share (the icon beside its title). For anything not listed, run with debug logging.
Running flowpact
flowpact analyzes the repository in the current directory, and found neither a workflow under .github/workflows nor
a local action there. It exits with code 2. Run it at the root of the repository, or point at it:
npx flowpact lint --root path/to/repositoryThat is common on a large repository, and it does not mean they are all urgent. Adopt it in an existing repository says where to start: fix the errors first, accept what can wait with a reason and a date, and keep new findings out from then on.
Accept that one finding with an override: it names the rule and the symbol or file,
and needs a reason, which stays next to it in the repository. Add expires to see it again on a date. A rule's page
shows the override that accepts its finding, under Accept one finding. To change a rule everywhere, set its severity under
rules: instead (Change a rule that does not fit).
Plugins run code from the repository, so they are skipped:
- by the CLI with
--no-plugins; - by the GitHub Action on
pull_request_targetandworkflow_run, unless itspluginsinput istrue; - by the editor in an untrusted workspace (Restricted Mode), or with
flowpact.pluginsoff.
The run warns about the rules: and overrides: entries of rules it did not load
(Rules that are not loaded). In the editor, run flowpact: Restart
Language Server after you edit a plugin: a loaded plugin stays loaded.
In the editor
- The extension starts its server when the workspace has workflows or an
action.yml, or when you open one. - A file is analyzed with its repository: the nearest folder above it with a
.githubfolder, else the root of its git repository. A file in neither gets no findings. - A rule may be hidden: by
flowpact.hiddenRules, or, forFP502–FP505, byflowpact.overlappingRuleswhile GitHub's own Actions extension checks the file (Settings).
The flowpact output channel (flowpact: Show Output) and the language status item next to the file type show the server's state. Set the log level to Debug (Developer: Set Log Level…) to see each stage of the analysis.
In GitHub Actions
The workflow has a paths: filter, and the pull request touches none of those paths: GitHub skips the workflow and
leaves a required check pending, so the pull request cannot merge. Run a required check on every pull request
(No paths filter on a required check).
When other repositories' pull requests wait on a check of a workflow you publish, a job was probably renamed: impact mode grades that change as major.
GitHub limits how many annotations a step can show. The job summary lists the first max-findings findings (raise it
if needed); the SARIF and JSON reports list every finding (Annotations).
Pull requests from forks get a read-only token, so the SARIF upload only works for branches in the repository itself.
The job that uploads needs security-events: write, and actions: read in a private repository
(Permissions).
- On GitHub Enterprise Server, actions cannot upload artifacts this way. Set
upload-contracts: false: the patch is still written, and thepatchoutput has its path on the runner. - Already exists: another step or matrix job in the run uploaded an artifact with the same name. Give each one its
own
artifact-name.
The run goes on either way: the failure is a warning.
A message such as origin/main is not available in this clone. Fetch it first comes from the CLI on a shallow
checkout: fetch the baseline (git fetch origin main), or check out with fetch-depth: 0. The action fetches the base
commit itself.
Impact mode is skipped, and says why, on merge_group runs (the pull request was graded), on a push that creates a
branch or tag, and when the baseline is the checked-out commit. Without base-ref, it refuses pull_request_target,
which checks out the default branch: run it on pull_request (The baseline).
Calls into other repositories
flowpact does not know those workflows' interfaces yet. Record them, and commit the lockfile:
npx flowpact remotes updateFrom then on, those calls are checked like local ones. To check them in CI without a lockfile, set remotes: fetch on
the action (In CI).
The bot moved a reference to another version (@v2 → @v3), and the lockfile still records the old one. Run
flowpact remotes update in the bot's pull request, or let the action grade it: see
Renovate and Dependabot for both setups.
The message says why: a token that cannot read the repository, a used-up rate limit, the network.
When a reference is not fetched lists each message and what
to do. flowpact already sends a request again after a timeout, a server error or GitHub's request to slow down. Run
with -v for a line per reference, with the commit it resolved to or why it was not fetched.
No check fails with the new version, but part of the change is out of the checks' reach for that call: an expression
passed to an input that is now a boolean or number, a new secret under secrets: inherit, or an output of a
JavaScript or Docker action that is no longer declared. The line under the call says which; read the release notes for
that part (When a version changes).
FP614 says why when flowpact cannot use the file, and so does remotes update: flowpact reads
versions v0.0.x of its schema, and a file that does not parse is not used. It covers only the workflows it lists: a reference that only other workflows use resolves
as usual, and so does a reusable workflow call, which GitHub does not lock
(GitHub's actions.lock).
Shared workflows
Do not merge contract files by hand. Resolve the conflicts in the workflow files, then regenerate: flowpact generate
overwrites the conflicted contracts, conflict markers and all (Merge conflicts).
npx flowpact generate
git add .github/flowpact/Still stuck
Run with debug logging. It logs every stage of the analysis to stderr: the config, the files, each job's matrix, and each rule with its findings (Debug mode and logging).
| Where | How |
|---|---|
| Terminal | npx flowpact lint --debug |
| GitHub Actions | Re-run the job with debug logging, or set FLOWPACT_DEBUG: 1 in the step's env |
| Editor | Developer: Set Log Level… → Debug, then flowpact: Show Output |
Exit code 3 is an internal error: please open an issue with the debug
output. To report a vulnerability, see Security.