script/lib/icons.js draws the toolbar mark and writes each PNG with node's own zlib (IHDR, one IDAT, IEND, filter type 0), with no new dependency and no fetch. make icons runs it for every size manifest/chrome.json declares and leaves alone a file that already holds the drawn image, so running it does not rewrite the committed icons. tests/icons.test.js requires each committed file to hold exactly the image it draws.
What the diff does not show:
The coordinates were never recorded on #376; they were read back out of the committed PNGs. With them every pixel matches at all four sizes, and the four committed files are unchanged.
Colour and alpha round a half to the even neighbour, as the committed files were made; Math.round would change some pixels by one.
The reader in the generator refuses a bad signature, a wrong CRC-32 and any chunk but IHDR, IDAT and IEND. It compares rows with their filter type byte, so a file using another filter does not match even where its pixels do.
Disclosures:
Deviation: the test compares the decoded image (IHDR and every pixel), not the file bytes, because node's bundled zlib cannot reproduce the stock zlib compression of the committed files.
Judgement call: that decision was recorded by the repo manager at #378 (comment), not by the owner.
Optional notes: the duplicated manifest paths in build.js are folded in; the build-time PNG content check is not.
Model: opus-5-5
Closes https://git.eeqj.de/sneak/AutistMask/issues/378.
`script/lib/icons.js` draws the toolbar mark and writes each PNG with node's own `zlib` (IHDR, one IDAT, IEND, filter type 0), with no new dependency and no fetch. `make icons` runs it for every size `manifest/chrome.json` declares and leaves alone a file that already holds the drawn image, so running it does not rewrite the committed icons. `tests/icons.test.js` requires each committed file to hold exactly the image it draws.
What the diff does not show:
- The coordinates were never recorded on https://git.eeqj.de/sneak/AutistMask/pulls/376; they were read back out of the committed PNGs. With them every pixel matches at all four sizes, and the four committed files are unchanged.
- Colour and alpha round a half to the even neighbour, as the committed files were made; `Math.round` would change some pixels by one.
- The reader in the generator refuses a bad signature, a wrong CRC-32 and any chunk but IHDR, IDAT and IEND. It compares rows with their filter type byte, so a file using another filter does not match even where its pixels do.
Disclosures:
- Deviation: the test compares the decoded image (IHDR and every pixel), not the file bytes, because node's bundled zlib cannot reproduce the stock zlib compression of the committed files.
- Judgement call: that decision was recorded by the repo manager at https://git.eeqj.de/sneak/AutistMask/issues/378#issuecomment-131108, not by the owner.
- Optional notes: the duplicated manifest paths in `build.js` are folded in; the build-time PNG content check is not.
Model: opus-5-5
script/lib/icons.js draws the mark from geometry read back out of the
committed PNGs, since the coordinates were never recorded, and writes each
PNG with node's own zlib. `make icons` runs it and leaves alone a file that
already holds the drawn image.
tests/icons.test.js requires each committed file to hold exactly that
image: the same IHDR and every pixel. The compressed bytes are not
compared, because node's bundled zlib does not compress as the stock zlib
that made the committed files did; the decision is recorded on the issue.
build.js copies the manifests from MANIFEST_SOURCES instead of naming the
two paths a second time.
Model: opus-5-5
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #378.
script/lib/icons.jsdraws the toolbar mark and writes each PNG with node's ownzlib(IHDR, one IDAT, IEND, filter type 0), with no new dependency and no fetch.make iconsruns it for every sizemanifest/chrome.jsondeclares and leaves alone a file that already holds the drawn image, so running it does not rewrite the committed icons.tests/icons.test.jsrequires each committed file to hold exactly the image it draws.What the diff does not show:
Math.roundwould change some pixels by one.Disclosures:
build.jsare folded in; the build-time PNG content check is not.Model: opus-5-5
189bd3f4batof76785f4ddPASS
Model: opus-5-5