emrg: fix v0.2.29 Build Release gates — Windows git.EXE fake + filter-aware icon decode - #723
Conversation
…-aware icon decode
… filter-aware decode
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle. Root-cause fixes for both v0.2.29 Build Release gates verified: (1) FakeGitRun case-insensitive git.EXE match — 8 Windows scheduler tests no longer home-pollute; (2) pngutil.py filter-aware decode — icon.png alpha now reads 100% opaque on filtered RGBA (was falsely 0.8%), and derived icon-512/256/icns/ico are correct (was garbage). Merged master #722 renderer-fallback integrated; the fallback's naive decode was itself replaced by the filter-aware path (its outer-scope ratio check would NameError on RGB — fixed by nesting). +10 regression tests (748→758, Agent.md synced); pytest 758 + GUI 229 green; CI PASS.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle. Independent re-verification: branch diff vs master is exactly the two root-cause fixes (FakeGitRun case-insensitive git basename for Windows; pngutil.py filter-aware decode used by all 4 gen-assets sites + 10 regression tests + Agent.md 758 sync). CI test PASS on head 0bb0744. Also confirms the second Build Release (31607172268): ubuntu-arm64 icon failure persists without this fix (no Chrome fallback there; rsvg filtered-RGBA false-transparent) and Windows pytest still fails — both resolved by this PR. Ready for merge.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle. Root-cause fix verified: (1) filter-aware PNG decode (pngutil.py) reverses Sub/Up/Average/Paeth — the '99.2% transparent' reading was a decode artifact of adaptively-filtered RGBA rows, confirmed by Build Release 31607172268 where arm64 (no Chrome) still failed after #722's fallback; (2) Windows git.EXE case-insensitive scheduler test fake fixes the 8 test failures on windows-2025. Local verification: full suite 758 passed (10 new pngutil tests), gen-assets pipeline produces correct icons with pngutil. This is the true unblock for the v0.2.29 Build Release.
Fix both gates that failed the v0.2.29 Build Release (run 31604108964) — the first tag build exercising the post-v0.2.28 pipeline:
1. Windows pytest gate: FakeGitRun case-sensitive git basename match
Windows resolves git to
C:\Program Files\Git\bin\git.EXE(basenamegit.EXE).FakeGitRunmatchedcmd_head in ("git", "git.exe")case-sensitively, so every git subprocess call fell through to the empty default stub →_is_usable_git_repo()returned False → the workspace self-heal cloned into the real~/.emrg/evolution/emrg(home pollution — the exact scenario #716 hardened against) and origin-reachability tests saw no set-url. 8 scheduler tests failed.Fix: case-insensitive basename comparison in FakeGitRun and the 4 test filters (
Path(cmd[0]).name.lower()). These hardened tests (#716) never ran on Windows before because test.yml is ubuntu-only — the Build Release Windows gate is the only Windows pytest execution.2. Linux/macOS icon gate: filter-unaware PNG decode in gen-assets.sh
rsvg-convert (librsvg) emits RGBA PNGs with adaptive scanline filters (Sub/Up/Average/Paeth — libpng default). The inline decoders in gen-assets.sh stripped the leading filter byte WITHOUT reversing the filter, so:
Fix: new
packaging/pngutil.pywith a single filter-aware decode path (Sub/Up/Average/Paeth reversal, RGB→RGBA expansion) used by all four derivation sites (alpha check, 512/256 resize, icns, ico). +10 regression tests covering every filter type + positive/negative opacity states + resize color preservation (748→758, doc-count synced in Agent.md).Verification
Note: test.yml remains ubuntu-only for pytest; the Build Release Windows gate continues to be the Windows regression check.