Stack Specification
Section 15

Testing & quality

The canvas is where regressions hurt most. Golden tests and a performance harness are non‑negotiable.

15.1 — Test layers

LayerToolingWhat it covers
Unitflutter_testPure logic — bitset ops, region indexing, palette state.
Widgetflutter_testLibrary cards, palette strip, paywall sheet, settings.
Goldenflutter_test goldensCanvas renders for fixed artworks at fixed zoom levels.
Integrationintegration_test + PatrolEnd‑to‑end: open free artwork, colour, sync, sign in.
PerformanceCustom harnessOpen a 2 000‑region artwork, record frame times, fail CI on regression.
BackendVitest / pgTAPRLS policies, function behaviour, validation rules.

15.2 — Test artworks

Three fixture artworks are checked into the repo: a 50‑region tutorial piece, a 500‑region typical piece, and a 2 000‑region stress piece. All goldens and performance benchmarks reference these.