This guide explains how to enforce a maximum acceptable drift level using the --drift-budget flag on a Vibgrate scan. It is for teams that want a hard ceiling on drift in CI and for leaders defining a measurable quality bar.
Overview
The DriftScore runs from 0 to 100, where higher means more upgrade drift. A drift budget is the maximum DriftScore you are willing to tolerate. When you pass --drift-budget, the scan compares the measured DriftScore against your budget and fails when the budget is exceeded.
Step-by-step
Set a budget of 60, meaning the scan should fail if the DriftScore rises above 60:
vg scan --drift-budget 60
In CI, a non-zero exit from a budget breach stops the pipeline, turning drift into an enforceable gate.
Choosing a budget
Start by scanning today to learn your current DriftScore, then set the budget at or slightly below that number so drift cannot get worse without notice. Tighten the budget over time as you pay down drift. Pair this with a baseline so you can also track the delta between scans.
Combining gates
The drift budget controls the overall score gate. To gate on the severity of individual findings instead, use --fail-on. The two can be used together for layered enforcement.
Related
See the failing on severity guide, the drift baselines and fitness functions article, the DriftScore concept page, and the scan command reference.