You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
with uat: expect image: (uat-plan.md §5) — visual checks are human checks today #3013
From #2950. src/Uat.w refuses expect image: with "is not implemented yet (uat-plan.md §5); record the check as 'expect (human):' meanwhile". Every UAT with a visual check (the raylib spiral, SDL) is a human check. Done when a scenario can state a reference image and a tolerance and the runner compares a captured frame. This issue is the open owner of the diagnostic until then.
Checked what stands between this issue and an implementation (main edb9863). The plan (docs/proposals/uat-plan.md §5) fixes the behaviour: expect image: PATH ~ FIXTURE [within N%], both PNGs decoded, pass when the sizes match and the mean absolute pixel difference is under the tolerance (2% by default), references regenerated only by with uat --record-images <name>. Three things it assumes are not there, and each is Eric's:
There is no PNG decoder. The plan says "std has the decoder"; lib/std has none (no file or symbol mentioning PNG; std.zlib gives the inflate half). A standard module comes from a migrated corpus, one source per module, so the question is which C library becomes std.png's engine (lodepng and libspng are the two single-purpose candidates; stb_image decodes more formats than this needs). That is a corpus decision, not something to hand-write inside the runner.
The spec words. §18.5d does not mention images; the plan's draft text does ("expect … lines for the exit status, output, files and images"), and it is marked for blessing.
The spiral has to grow a --capture PATH option for there to be a frame to compare. uat/fixtures are contract programs; the plan itself puts that change in a separate PR under "a spec change updates the example".
Nothing else is open: the runner already parses the line and refuses it by name, pointing here.
Labelling human attn needed for those three. Once the engine is chosen, the order is: migrate it, std.png with a decode to RGBA, the comparison and --record-images in src/Uat.with with its own fixtures, then the spiral.
Engine: libspng (it decodes through zlib, so std has one inflate; and the spiral's --capture writes a PNG, so the engine needs an encoder). Both properties to be confirmed against the pinned package before promoting. Yes to the plan's §18.5d words; yes to the spiral's --capture. Label removed.
Part 1 landed in PR #3655 (battery + :release-checks green):
Confirmed against pinned randy408/libspng v0.7.4 that it decodes/encodes through zlib (9 zlib calls bound directly to std.engines.zlib with zero duplicated zlib in libspng.o) and includes a full PNG encoder + decoder.
Promoted libspng v0.7.4 into lib/std/engines/libspng/ (D112 first promotion, 8th corpus, portable across all 6 targets), added general bundle-to-bundle dependency linking (Link.with transitive selection + build/wo.withbundle_deps), and shipped lib/std/png.with (decode_rgba, encode_rgba, read_rgba, write_rgba) with test/behavior/behav_3013_std_png.with.
Next: once a seed carrying §29.11 (keywords as struct fields, used by libspng/defs.with) is pinned in seed.lock, wire use std.png into src/Uat.with for expect image: + --record-images + §18.5d spec words, followed by spiral --capture.
Activity
#2950: the compiler's admissions: two comptime gaps closed, the rest …
ehartford commentedon Nov 24, 2026
Checked what stands between this issue and an implementation (main edb9863). The plan (
docs/proposals/uat-plan.md§5) fixes the behaviour:expect image: PATH ~ FIXTURE [within N%], both PNGs decoded, pass when the sizes match and the mean absolute pixel difference is under the tolerance (2% by default), references regenerated only bywith uat --record-images <name>. Three things it assumes are not there, and each is Eric's:stdhas the decoder";lib/stdhas none (no file or symbol mentioning PNG;std.zlibgives the inflate half). A standard module comes from a migrated corpus, one source per module, so the question is which C library becomesstd.png's engine (lodepng and libspng are the two single-purpose candidates; stb_image decodes more formats than this needs). That is a corpus decision, not something to hand-write inside the runner.expect …lines for the exit status, output, files and images"), and it is marked for blessing.--capture PATHoption for there to be a frame to compare.uat/fixturesare contract programs; the plan itself puts that change in a separate PR under "a spec change updates the example".Nothing else is open: the runner already parses the line and refuses it by name, pointing here.
Labelling
human attn neededfor those three. Once the engine is chosen, the order is: migrate it,std.pngwith a decode to RGBA, the comparison and--record-imagesinsrc/Uat.withwith its own fixtures, then the spiral.ehartford commentedon Nov 25, 2026
Ruled by Eric, 2026-11-25 (answers to briefs.md).
Engine: libspng (it decodes through zlib, so
stdhas one inflate; and the spiral's--capturewrites a PNG, so the engine needs an encoder). Both properties to be confirmed against the pinned package before promoting. Yes to the plan's §18.5d words; yes to the spiral's--capture. Label removed.ehartford commentedon Nov 27, 2026
Part 1 landed in PR #3655 (battery +
:release-checksgreen):randy408/libspngv0.7.4 that it decodes/encodes through zlib (9 zlib calls bound directly tostd.engines.zlibwith zero duplicated zlib inlibspng.o) and includes a full PNG encoder + decoder.libspngv0.7.4 intolib/std/engines/libspng/(D112 first promotion, 8th corpus, portable across all 6 targets), added general bundle-to-bundle dependency linking (Link.withtransitive selection +build/wo.withbundle_deps), and shippedlib/std/png.with(decode_rgba,encode_rgba,read_rgba,write_rgba) withtest/behavior/behav_3013_std_png.with.Next: once a seed carrying §29.11 (keywords as struct fields, used by
libspng/defs.with) is pinned inseed.lock, wireuse std.pngintosrc/Uat.withforexpect image:+--record-images+ §18.5d spec words, followed by spiral--capture.std.png: migrate libspng v0.7.4 over std.engines.zlib and support bun…