Files
airdef/tools
chexit d9431468c1
build / mod (push) Has been cancelled
gen_models --check: compare PNGs by their pixels, not their bytes (#92)
With Pillow installable again, build.yml failed one step later: on the Linux
runner 171 generated PNGs (every item icon) differed from the committed
files. Their pixels are identical (sha256 of the decoded rasters matches
the macOS ones byte for byte); only the deflate stream differs, because the
zlib inside the Pillow wheel is built per platform and Python version. The
manifest's byte hashes are not portable, so the check could only pass where
the assets had been generated.

--check now treats a PNG whose bytes differ as unchanged when it decodes to
the same mode, size and pixels, and only while the file still matches its
manifest row: a hand-edited file stays a conflict. Writing (a run without
--check) and the manifest stay byte-exact.

Verified: a copy of airdef-mod with all 175 manifest PNGs re-encoded
(stored blocks) and the manifest rows updated passes --check; the real tree
still reports no differences; tools/test_gen_assets.py OK (13 tests, two
new: a re-encoded icon is accepted and then rewritten by a real run, another
picture and a hand-edited icon are still reported).
2026-11-23 22:31:21 +03:00
..