Skip to content

Add a baseline audit: rank baselined files by estimated savings #26

Description

@mathiasgrimm

Idea

A way to inspect the baseline debt: which baselined files are worth pulling back into the gate, ranked by what optimizing them would actually buy. Something like glimpse baseline --audit or glimpse analyze --include-baselined.

Why

The baseline mixes two kinds of entries: files glimpse actually worked on (via: convert|optimize|resize|thumbnail) and files that were bulk-accepted on day one (via: analyze). The via field (#24) tells you why an entry exists, but not what it is worth: a bulk-accepted file at 3% estimated savings is fine where it is, while one at 85% is the debt worth burning down.

What it should do

  • Re-analyze baselined files (they are normally skipped) and report estimated savings per file, sorted biggest saver first, like the analyze <dir> table.
  • Show each entry's via, so accepted debt and processed files are distinguishable at a glance.
  • --json output for scripting.
  • Read-only: it must not touch the baseline; acting on a finding is still optimize/convert (which re-record automatically) or analyze --update-baseline.

Open questions

  • New subcommand (glimpse baseline ..., leaving room for future baseline tooling) vs a flag on analyze?
  • Should a --min-savings threshold filter the noise?

Came out of the review discussion on #24, alongside #25 (glimpse init).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions