Compare Two Drift Baselines to Measure Change
Keep multiple baseline files and run vg scan --baseline against each to measure how much upgrade drift moved between two points in time. The gap between deltas is your drift change.
By keeping more than one baseline file, you can scan your current code against each and read off how much drift changed between the two snapshots. This is useful for measuring the impact of a sprint, a quarter, or a major upgrade.
Prerequisites
- Vibgrate CLI installed (
npm i -g @vibgrate/cli) - Two baseline snapshots saved at distinct paths
Steps
1. Save two dated baselines
Create a baseline, then later create another, saving each under its own path so both survive. The most recent always defaults to .vibgrate/baseline.json:
vg baseline
Copy the file to a dated name such as .vibgrate/baseline-q1.json before generating the next one.
2. Scan against the older baseline
Measure your current code relative to the older snapshot:
vg scan --baseline .vibgrate/baseline-q1.json
3. Scan against the newer baseline
Now measure relative to the newer snapshot:
vg scan --baseline .vibgrate/baseline.json
4. Compare the two deltas
The difference between the two deltas tells you how much drift accumulated between the snapshots. A larger delta against the older baseline means drift grew over that span.
5. Verify the measurement
Re-run both scans to confirm the deltas are stable and reproducible.
Verification
Two baseline-relative scans against different snapshot files produce two deltas. The gap between them is your drift change for the period.
Next Steps
- Push results to Vibgrate Cloud for a charted trend instead of manual deltas.
- Re-baseline to make the newer snapshot your enforced reference.