FP804 · orphan-contract
A contract file exists for a workflow or action that no longer exists.
| Code | Name | Category | Default severity | Reported by |
|---|---|---|---|---|
FP804 | orphan-contract | Contracts | 🔴 error | check, the action's mode: check, the editor with contracts |
What you see
In the contracts-drift fixture:
✖ ERROR FP804 orphan-contract
Contract .github/flowpact/contracts/workflows/nightly.contract.yml describes .github/workflows/nightly.yml which no longer exists
▶ .github/flowpact/contracts/workflows/nightly.contract.yml:1:1Why it matters
If the workflow was removed or renamed, anything still calling it (including other repositories) breaks — the stale contract is the last record of that interface.
How to fix
Confirm nothing depends on the removed workflow, then run flowpact generate to delete the contract.
Example
# .github/workflows/nightly.yml was deleted; its contract is still there
# .github/flowpact/contracts/workflows/nightly.contract.yaml
kind: workflow
path: .github/workflows/nightly.ymlAccept 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):
overrides:
- rule: FP804
target: ".github/workflows/nightly.yml"
reason: Why it is acceptable here, at least 10 characters.
expires: YYYY-MM-DD # optionaltarget is the symbol the finding is about; to list them:
flowpact lint --format json | jq -r '.findings[] | select(.code == "FP804") | .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:
rules:
FP804: off
# or: orphan-contract: errorExplain it in the terminal:
flowpact explain FP804