Skip to Content
flowpact

FP801 · contract-missing

A workflow or local action has no contract in `.github/flowpact/` (check mode).

CodeNameCategoryDefault severityReported by
FP801contract-missingContracts🔴 errorcheck, the action's mode: check, the editor with contracts

What you see

In the boolean-values fixture:

✖  ERROR  FP801 contract-missing
  .github/actions/notify has no contract (expected .github/flowpact/contracts/actions/notify.contract.yaml)
  ▶ .github/actions/notify/action.yml:1:1

Why it matters

Without a locked contract, changes to its interface and wiring are not visible in review and cannot be checked.

How to fix

Run flowpact generate and commit the updated contracts. In CI, the flowpact action (check mode) attaches the regenerated contracts and a git apply-able patch to the run — see its job summary.

Example

# .github/workflows/deploy.yml is new, and .github/flowpact/contracts/ has no contract for it
on:
  workflow_call:
    inputs:
      environment: { type: string, required: true }

Accept one finding

When a finding is intended, accept it with a reason rather than turning the rule off. It is listed apart from the other findings, and comes back when the date passes (overrides):

.github/flowpact/flowpact.config.yml
overrides:
  - rule: FP801
    target: ".github/actions/notify"
    reason: Why it is acceptable here, at least 10 characters.
    expires: YYYY-MM-DD   # optional

target is the symbol the finding is about; to list them:

flowpact lint --format json | jq -r '.findings[] | select(.code == "FP801") | .symbol'

* matches within a path segment and ** across segments, so one entry accepts every finding whose symbol matches: target: '**#inputs.app-id' is that input in every workflow and action.

Change the severity

Change the severity (or turn the rule off) in .github/flowpact/flowpact.config.yml, by code or by name:

.github/flowpact/flowpact.config.yml
rules:
  FP801: off
  # or: contract-missing: error

Explain it in the terminal:

flowpact explain FP801
  • FP802 contract-outdated: The locked contract no longer matches the workflow — non-breaking changes to its interface or wiring.
  • FP804 orphan-contract: A contract file exists for a workflow or action that no longer exists.
  • Contracts

On this page