Skip to content

P1: Add baseline/grandfather mode for enterprise adoption #35

@EffortlessSteven

Description

@EffortlessSteven

Problem

Diffguard has no baseline mode. Teams with existing codebases cannot adopt without immediately failing on all pre-existing violations. This is the #1 enterprise adoption blocker.

Impact

  • Teams cannot adopt diffguard on repos with any existing violations
  • Forces teams to either ignore all violations or fix everything before adopting
  • Uncompetitive with tools that support baseline comparison

Proposed design

Add --baseline flag to check command:
diffguard check --base main --baseline previous-receipt.json

When --baseline is provided:

  1. Run checks normally
  2. Compare findings against baseline receipt fingerprint
  3. Exit code 0 if only pre-existing violations found
  4. Exit code 2 if NEW violations found (only new violations in output)
  5. Optional: --report-mode=new-only to ONLY report new findings

Acceptance Criteria

  • --baseline flag accepts path to previous receipt JSON
  • Only NEW findings trigger failure
  • Output clearly distinguishes new vs existing violations
  • Tests cover: no baseline, baseline with no new findings, baseline with new findings
  • Snapshots cover the new output modes

Metadata

Metadata

Assignees

No one assigned

    Labels

    conveyor/gate-completeConveyor gate-complete — managed by hermesconveyor/mode-fullConveyor mode-full — managed by hermes

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions