Skip to Content
flowpact

FP805 · contract-invalid

A contract file cannot be read (invalid YAML or schema), usually because it was edited by hand or merged badly.

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

Why it matters

An unreadable contract cannot be compared, so drift and breaking changes go unnoticed.

How to fix

Contracts are generated: resolve the merge by running flowpact generate instead of editing the file.

Example

# .github/flowpact/contracts/workflows/deploy.contract.yaml after a merge
interface:
  inputs:
<<<<<<< HEAD
    environment:
=======
    env:
>>>>>>> main

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: FP805
    target: <the finding's symbol>
    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 == "FP805") | .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:
  FP805: off
  # or: contract-invalid: error

Explain it in the terminal:

flowpact explain FP805
  • FP802 contract-outdated: The locked contract no longer matches the workflow — non-breaking changes to its interface or wiring.
  • Contracts

On this page