You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "hqhq1025 (via GitHub)" <gi...@apache.org> on 2026/09/13 10:11:23 UTC

Re: [PR] perf(ci): keep verdicts and trim checks [maka]

hqhq1025 commented on code in PR #5244:
URL: https://github.com/apache/maka/pull/5244#discussion_r3999346957


##########
scripts/generate-app-icons.py:
##########
@@ -552,10 +579,8 @@ def main(argv):
     for name, raw in rendered:
         path = os.path.join(dest, name + ".png")
         if check:
-            buffer = io.BytesIO()
-            write_png_stream(buffer, ART_SIZE, raw)
             with open(path, "rb") as handle:
-                if handle.read() != buffer.getvalue():
+                if committed_scanlines(handle.read()) != raw:

Review Comment:
   [P2] Reject non-generator chunks before accepting these scanlines. `committed_scanlines()` ignores every chunk except `IHDR`/`IDAT` and only checks that the final tag is `IEND`. I inserted a CRC-valid unknown critical `ABCD` chunk after `IHDR`; this check still reported `all 38 icons match`, while Electron `nativeImage.createFromPath()` returned an empty 0×0 image and Sharp rejected the file as a corrupt header. The exact-base byte comparison rejects the same mutation. This means a committed icon can become undecodable while the drift gate stays green. To tolerate zlib-only changes without losing the artifact contract, require the generator chunk sequence (or compare all non-`IDAT` chunks against a fresh render) and add a corrupt/unknown-critical-chunk regression.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org