Skip to main content
Use CI gates when you want the build to fail if confirmed structural waste crosses a limit.

Threshold flags

  • --fail-above-waste-rate <n> fails with exit code 3 when structuralWasteRate is above the threshold
  • --fail-above-waste-usd <n> fails with exit code 3 when confirmed wasteSpendUsd is above the threshold
These thresholds only use confirmed waste, not directional opportunity findings. If you also want the audit recorded remotely, use one command:
xerg audit pushes before threshold checks run, so the audit still gets sent even if the command ultimately exits with code 3.

Examples

Waste rate gate:
Absolute USD gate:
Remote gate:

Exit codes

GitHub Actions example

Adjust the command if your audit needs explicit paths, SSH access, or a Railway target.