fix(doctests): ship a 256x256 placeholder icon, per the LGX icon contract - #82
Merged
Conversation
…ract
nix-bundle-lgx 6fb5d5b ("feat: add requirement for icons with manifest
0.4.0") validates the packaged icon straight out of the PNG IHDR: exactly
256x256, required for `type == "ui_qml"`. The tutorials embed a base64
placeholder that is 64x64, so `nix build '.#lgx'` now fails for calc_ui:
ERROR: icon does not match the Logos icon standard.
expected: PNG, exactly 256x256
actual: PNG, 64x64
That one rejection is the whole of the red run (208 passed, 3 failed):
`result-lgx/` is never created, so `Install the UI plugin` fails on a
literal `result-lgx/*.lgx`, and basecamp then launches without the plugin
("No clickable element found with text 'calc_ui'").
Regenerate the placeholder at 256x256, keeping the same solid #2ECC71. It
is now a 1-bit palette PNG rather than RGBA, which makes the embedded blob
shorter than the one it replaces (280 -> 144 base64 chars, 209 -> 106
bytes) despite the 16x pixel count.
The C++ UI tutorial carried the same 64x64 blob and was passing only
because its chain never reaches an `.#lgx` step — fixed here too, before
it surfaces.
Verified by extracting bundle.sh's validator verbatim and running the
tutorials' own `- run:` command through it: the old icon is rejected with
the exact CI error text, the new one passes.
outputs/*.md are hand-maintained (they carry deliberate /0.2.0 flake pins
that the generator does not emit), so the mirrored edits there are by hand
rather than regenerated.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
📊 Tutorial execution reportRendered tutorial alongside the commands actually run and their output (updated each run, commit Pages can take a minute to update after the run finishes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's red
Tutorial Testsfails on both ubuntu and macOS — onmasteras well as on #81. 208 passed, 3 failed, and all three are one cause cascading:nix build '.#lgx'dies forcalc_ui, soresult-lgx/is never created;Install the UI pluginthen fails on a literalresult-lgx/*.lgx; basecamp launches without the plugin and the UI step ends withclick("calc_ui"): No clickable element found.Why now
Not a regression in the tutorial — an upstream contract it had not yet tracked. nix-bundle-lgx
6fb5d5b("feat: add requirement for icons with manifest 0.4.0") validates the icon from a fixed-offset PNGIHDRread. Perlogos-package/docs/spec.md#icon-contractthe icon must be exactly 256x256 and is required fortype == "ui_qml"— which is exactlycalc_ui. The tutorials embed a 64x64 base64 placeholder.The change
Regenerated the placeholder at 256x256, same solid
#2ECC71. It is now a 1-bit palette PNG rather than RGBA, so the embedded blob is shorter than the one it replaces — 280 → 144 base64 chars, 209 → 106 bytes — despite 16x the pixels.Updated all six embed sites (the executed
- run:and the displayedcode_block:in each spec, plus each generated doc), the two committed icon copies, the64×64comment, and the surrounding prose so a reader is told the size is a hard requirement.The C++ UI tutorial carried the same 64x64 blob and was passing only because its chain never reaches an
.#lgxstep. Fixed here too, before it surfaces.Verification
Rather than eyeballing dimensions, I extracted
bundle.sh's validator verbatim and ran the tutorials' own- run:command through it:Also: both specs still parse as YAML; an independent re-parse of the PNG confirms 256x256, every pixel
#2ECC71, all chunk CRCs valid;file(1)and a real decoder agree.Note on
outputs/*.mdThese are hand-maintained, not regenerated — they carry deliberate
/0.2.0flake pins thatlogos-doctest generatedoes not emit (and CI's Verify markdown generation only checks that generation succeeds; it never diffs). So the doc edits here are mirrored by hand; regenerating wholesale would strip those pins.🤖 Generated with Claude Code