Skip to content

emrg: fix v0.2.29 Build Release gates — Windows git.EXE fake + filter-aware icon decode - #723

Merged
argszero merged 2 commits into
masterfrom
feature/fix-win-ci-icon-alpha
Aug 12, 2026
Merged

emrg: fix v0.2.29 Build Release gates — Windows git.EXE fake + filter-aware icon decode#723
argszero merged 2 commits into
masterfrom
feature/fix-win-ci-icon-alpha

Conversation

@argszero

Copy link
Copy Markdown
Owner

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 (basename git.EXE). FakeGitRun matched cmd_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:

  • the transparency check (added in emrg: fix transparent Windows installer icon (rant 2026-08-12T17:25:28) #705, first run on this build) read filter deltas as alpha → a fully opaque icon falsely reported "99.2% transparent" → all Linux/macOS build jobs failed;
  • the area-average resize/icns/ico decoders produced garbage color artifacts from filtered input (silently wrong icons in shipped builds — verified: committed icon-512.png was garbage).

Fix: new packaging/pngutil.py with 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

  • pytest 758 passed, GUI 229 pass, import + CLI green
  • gen-assets.sh full pipeline runs clean locally (Chrome renderer): icon.png 100% opaque, regenerated icon-512 matches true area-average
  • Transparent-render negative state still fails the alpha check

Note: test.yml remains ubuntu-only for pytest; the Build Release Windows gate continues to be the Windows regression check.

@argszero argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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 argszero left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant