FUI9011: Fragment definition drifted from its component source

critical

An authored fragment or contract documents props that no longer match the component source.

Details

diagnostic
{
  "code": "FUI9011",
  "ruleId": "fragment/source-drift",
  "category": "System",
  "defaultSeverity": "critical",
  "lifecycle": "experimental",
  "fixAvailable": false,
  "evidenceRequired": false
}

Guidance

## What it means

The compiler compared an authored definition (`.fragment` or `.contract.json`) with the props it extracted from the component source. FUI9011 fires when those two records disagree. Evidence names the component and the drift class:

- a documented prop was removed from source - a `.contract.json` omitted a locally declared source prop - a documented type does not match the extracted type - a documented default does not match the extracted default - source extraction failed, so drift could not be verified (fail-closed)

v3 `props` entries are optional annotations, so silence about a source prop is not drift there. `.contract.json` still has to document the local prop surface.

## How to resolve it

Update the authored definition so it matches the source, or change the source so it matches the definition — pick the record that is supposed to win. Do not regenerate a contract to hide identity churn, and do not exclude the component's file to skip the comparison.

When source extraction itself failed, fix the extract error first; the fail-closed FUI9011 will clear once the compiler can see the source again.

When an exception is intentional, attach a line-level, reasoned suppression from the [configuration reference](/cloud/verdicts#in-source).

## Verify the change

Run `npx @usefragments/cli check --changed --format agent`, confirm the drift classes in the evidence are gone, then run `npx @usefragments/cli check --changed --ci`.

Intentional exception? Use a narrow, reasoned directive from the in-source exception reference.

Next steps

  • RulesThe rules that emit FUI codes.
  • ExceptionsIn-source allows and Cloud exceptions.