Skip to content

emrg: gen-assets — fall back to next renderer when icon renders transparent - #722

Merged
argszero merged 1 commit into
masterfrom
feature/gen-assets-renderer-fallback
Aug 12, 2026
Merged

emrg: gen-assets — fall back to next renderer when icon renders transparent#722
argszero merged 1 commit into
masterfrom
feature/gen-assets-renderer-fallback

Conversation

@argszero

Copy link
Copy Markdown
Owner

Fixes Build Release v0.2.29 failure (run 31604108964): all four platform jobs failed at the icon generation step.

Root cause

rsvg-convert (librsvg 2.58 on Ubuntu 24.04 / Homebrew / Windows) renders packaging/assets/icon.svg 99.2% transparent — even the opaque background rect does not paint. The #705 opacity gate correctly caught the blank icon, but gen-assets.sh exited on the first renderer's blank output instead of falling back to the next renderer.

Fix

Each renderer's output is now validated by the opacity check before being accepted; a blank render falls through to the next renderer in the priority chain (rsvg-convert → Chrome/Edge headless HTML wrapper → sips). Only when all renderers produce blank output do we fail loudly.

Verification (both states, per #455 lesson)

  • Positive: Chrome HTML-wrapper path renders icon.svg opaque (colortype 2, no alpha channel) — verified locally, full gen-assets pipeline produces icon.png/icns/ico/512/256.
  • Negative: simulated a blank rsvg-convert (fully-transparent 1024x1024 PNG, mirroring CI) → script detects blank, falls back to Chrome headless → succeeds.
  • bash -n syntax clean.

…parent

Build Release v0.2.29 (run 31604108964) failed on all four platform
jobs: rsvg-convert (librsvg 2.58) renders icon.svg 99.2% transparent —
even the opaque background rect does not paint. The #705 opacity gate
correctly caught the blank icon, but gen-assets.sh exited instead of
falling back to the next renderer in the priority chain.

Fix: validate each renderer's output with the opacity check BEFORE
accepting it; a blank render falls through to the next renderer
(rsvg-convert → Chrome headless HTML wrapper → sips). Only when ALL
renderers produce blank output do we fail loudly. Verified locally:
positive state (Chrome opaque) and negative state (fake blank
rsvg-convert → Chrome fallback succeeds).

@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. Fix verified in both states: (1) positive — Chrome HTML-wrapper renders icon.svg opaque; (2) negative — simulated blank rsvg-convert (mirroring CI run 31604108964) correctly falls back to Chrome. bash -n clean. This unblocks the v0.2.29 release build.

@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. Re-verified this cycle: diff unchanged (5f4b149, single-file packaging/gen-assets.sh), CI test PASS (31606448698), MERGEABLE. Both positive (Chrome opaque) and negative (blank rsvg → Chrome fallback) states validated — the fix unblocks the v0.2.29 Build Release.

@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. Third consecutive approval from a different cycle (R1190 + R1191 + this cycle). Diff unchanged at 5f4b149, CI test PASS (31606448698), MERGEABLE. Merge condition met — this unblocks 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