Update and Refresh an Existing Drift Baseline
Refresh a baseline with vg baseline only after reviewing and accepting the delta with vg scan --baseline. This resets the accepted normal without hiding genuine regressions.
A baseline should be refreshed only when drift has changed for a reason you accept, such as a deliberate major upgrade. Refreshing it casually would hide real regressions. This tutorial shows the safe way to update a baseline.
Prerequisites
- Vibgrate CLI installed (
npm i -g @vibgrate/cli) - An existing baseline at
.vibgrate/baseline.json
Steps
1. Review the current delta
See what changed since the last snapshot before you overwrite it:
vg scan --baseline .vibgrate/baseline.json
2. Confirm the change is intentional
Make sure every item in the delta is something you meant to accept. If anything is an unintended regression, fix it instead of baselining over it.
3. Refresh the baseline
Once the delta is fully understood and accepted, capture the new snapshot:
vg baseline
This overwrites the snapshot at .vibgrate/baseline.json with the current state.
4. Commit the refreshed baseline
Commit the updated baseline file so the team and CI share the new accepted normal.
5. Verify the reset delta
Scan again; the delta against the freshly written baseline should be zero.
Verification
After vg baseline, running vg scan --baseline .vibgrate/baseline.json reports a zero delta, confirming the snapshot now matches the current state.
Next Steps
- Document why each refresh happened in the commit message.
- Re-tighten any drift budget to match the new lower baseline.