Skip to main content

Interpret Baseline Diff Output

Read the delta from vg scan --baseline to separate new drift from carried-over drift, and use --format json for a detailed, scriptable view. Act on new items, not the ones already accepted.

Difficulty
Beginner
Duration
13 minutes
Steps
5

A baseline-relative scan does more than print a number; it tells you what changed. Reading it well is the difference between fixing a real regression and chasing drift that was already there. This tutorial walks through the diff output.

Prerequisites

  • Vibgrate CLI installed (npm i -g @vibgrate/cli)
  • An existing baseline at .vibgrate/baseline.json

Steps

1. Run a baseline scan

vg scan --baseline .vibgrate/baseline.json

2. Locate the delta in the output

Find the part of the output that compares the current DriftScore to the baseline. This delta is the headline: positive means drift grew, zero means no change.

3. Separate new from carried-over drift

The diff distinguishes drift that is new since the snapshot from drift that already existed in the baseline. Prioritize the new items; the carried-over items were already accepted when the baseline was taken.

4. Export as JSON for detail

For a machine-readable, line-by-line view, request JSON output:

vg scan --baseline .vibgrate/baseline.json --format json

This is ideal for scripting or feeding into other tooling.

5. Verify your reading

Fix one new-drift item, re-scan, and confirm the delta shrinks by exactly that item, proving you read the diff correctly.

Verification

After addressing a new-drift item, the baseline-relative delta decreases and the exit code reflects whether any new drift remains. The JSON output should mirror what the text summary reported.

Next Steps

  • Add a drift budget so the delta also enforces an absolute ceiling.
  • Generate a shareable report from the scan artifact with vg report.

Prerequisites

  • Vibgrate CLI installed
  • An existing baseline

Steps

  • 1
    Run a baseline scan
  • 2
    Locate the delta in the output
  • 3
    Separate new from carried-over drift
  • 4
    Export as JSON for detail
  • 5
    Verify your reading

Category

Vibgrate