FLOW_IMBALANCE
FLOW_IMBALANCE is a lint warning: a Sankey intermediate node receives a different total flow than it emits, leaving part of its height without a matching ribbon.
What triggers it. A node appears as both a link target and source, but the sum of incoming values differs from the sum of outgoing values beyond floating-point tolerance.
How to fix it. Balance the incoming and outgoing values, or add an explicit remainder link so every unit of flow has a named destination.
Minimal reproducer
This source triggers FLOW_IMBALANCE — checked at build time against the same engine the editor runs.
sankey-beta
Supply,Hub,10
Hub,Used,7
Open this reproducer in the editor
Run am verify diagram.mmd --json, inspect this code, and apply the smallest source or typed mutation that clears it. If it persists after two mechanical attempts, return the warning and ask for human review.
In the cloned repo, am is bun run bin/am.ts.
Machine-readable: this page as Markdown.
Back to all warning codes, or open a blank editor to try a fix.