From ffb022549d30929e3fdb6443c225a1c612dfa102 Mon Sep 17 00:00:00 2001 From: Samit Basu Date: Thu, 12 Nov 2026 13:58:37 -0800 Subject: [PATCH] CLAUDE.md: the goldens run in cargo xtask ci The golden-images note still said the check was not in ci; since #136 (and #151's single workspace test build) it is. cargo xtask snapshots stays the focused re-run and update tool; --clean also removes .old.png. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01PWiKKe8zfqGfVMCSC5L3up --- CLAUDE.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 74b92ad3..5b36a73c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -166,13 +166,14 @@ copying this file elsewhere. input, so one-frame-stale layout shows there. `web` needs a `wasm-bindgen` CLI matching `Cargo.lock`; it prints the install command if not. - Golden images (`tests/snapshots/`, rendered by `tests/it/snapshots.rs` behind the - `snapshots` cargo feature) are checked with `cargo xtask snapshots`, which - forces Mesa lavapipe so every machine renders the same pixels. It is not in - `cargo xtask ci` yet. After a change that can move pixels, run it; on a - mismatch open the `.diff.png` files it prints. If the change is intended, + `snapshots` cargo feature) are checked by `cargo xtask ci`, whose test step + builds the workspace with that feature and renders on Mesa lavapipe so every + machine draws the same pixels. `cargo xtask snapshots` runs only the goldens, + for a focused re-run or an update. On a mismatch open the `.diff.png` files + either prints. If the change is intended, `cargo xtask snapshots --update` regenerates the goldens and lists the added, modified and removed ones: look at each image (the PNG diff is the review, as in a code diff) before committing, and say in the commit message what changed and why. Never update goldens to silence a failure. - `--filter NAME` limits the run to goldens whose test name starts with `NAME`; `--clean` deletes stray `.new.png` and - `.diff.png` files. + `--filter NAME` limits the run to goldens whose test name starts with `NAME`; `--clean` deletes stray `.new.png`, + `.diff.png` and `.old.png` files.