Skip to content

with uat: expect image: (uat-plan.md §5) — visual checks are human checks today #3013

Open

Description

@ehartford

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.

Activity

  1. added
    spec-gap
    on Nov 3, 2026
  2. added a commit that references this issue on Nov 3, 2026
  3. ehartford commented on Nov 24, 2026

    @ehartford
    ContributorAuthor

    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:

    1. 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.
    2. 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.
    3. 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.

  4. ehartford commented on Nov 25, 2026

    @ehartford
    ContributorAuthor

    Ruled by Eric, 2026-11-25 (answers to briefs.md).

    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.

  5. ehartford commented on Nov 27, 2026

    @ehartford
    ContributorAuthor

    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.with bundle_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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    spec-gap

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions