Skip to content

Visual testing 7/8: regression mode against accepted renders #717

Description

@nathanacurtis

Parent: #588 — step 7 of 8.

Problem

Fidelity testing needs a Figma token and a captured design baseline. That is the differentiated thing, and it is also a wall in front of a customer who just wants to know whether today's regeneration broke yesterday's output.

There is a second, much cheaper question the same machinery answers: did this change alter any render at all, measured against the last renders we accepted. No Figma access, no manifest staleness, no variant join ambiguity — and it is what the original zero-flake measurement actually measured: 142 of 142 stories, three full runs, exactly 0 differing pixels on unchanged stories.

Potential solution(s)

  • An accepted-render tree beside the Figma baselines, keyed identically.
  • specs testing visual accept [--components <keys...>] [--all] promotes renders from the current run into it.
  • specs testing visual diff --against accepted scores against it — the flag already exists from step 5; this makes it work.
  • accept refuses in fidelity mode, with a sentence saying why. Percy and Chromatic are built around approving a changed snapshot; here the Figma export is the design, and a render that disagrees with it is wrong by definition. An accept that could write over a Figma baseline would turn the tool into one that agrees with whatever the emitter last did.

Acceptance criteria

  • accept followed immediately by a diff against accepted reports 0 differing pixels across the board.
  • A deliberate single-property change to one emitted stylesheet, re-shot, is reported as a failure against accepted with a non-zero pixel count on exactly the affected pairs.
  • accept with neither a component scope nor --all refuses rather than promoting everything.
  • accept while the configured mode is fidelity refuses with an explanation and writes nothing.
  • Regression mode runs end to end with no Figma token in the environment.

Case data

  • Territory: cli
  • Size: m

Notes

Depends on step 5. Independent of steps 6 and 8.

Activity

  1. self-assigned this
    on Oct 8, 2026
  2. nathanacurtis commented on Oct 8, 2026

    @nathanacurtis
    MemberAuthor

    Built and verified on feature/testing-visual in specs (commit 0198a8e), on top of feature/compositions-cli. Validation evidence is in the commit message; #718 carries the remaining fixture sweep and docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

clispecs-cli commandstestingspecs-testing parity validation

Type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions