Repository navigation
[docs] Fix the icon's mast punching through the dish at small sizes - #1466
Merged
Merged
Conversation
The app icon's mount post was drawn 3 units too tall. The dish is an arc centred at (100, 96) with a 19-wide stroke, so at the post's x=82 the dish band spans y 134.5 to 154.8. The post is 14 wide with a round cap, which reaches 7 above its endpoint: before y1=141 -> top edge 134.0, 0.5 past the dish's inner edge after y1=144 -> top edge 137.0, 2.5 inside the band So the post broke out through the concave face of the dish and left a nick in the silhouette at the neck. At 512px that sliver is invisible; at 16px one device pixel spans about 8.6 units, so it smeared into a visible pinch at the waist. Only the icon drawing is affected -- the mark, both lockups and the social card are unchanged, and their files are untouched here. Regenerated from the updated logo kit: favicon.svg, the 16/32 PNGs, apple-touch-icon, and the 192/512/512-maskable PWA icons. favicon.ico is repacked to 16/32/48/64 from the kit's per-size renders, as before, since the kit still ships a 16x16-only .ico. cloudprober-avatar-512.png is rebuilt with the recipe it was created with: cloudprober-icon-ondark.svg at 62% of a 512x512 opaque #0F2A43 tile. The 62% was reconfirmed by re-rendering the old icon and matching it against the current avatar across a 55-70% sweep.
manugarg
added a commit
that referenced
this pull request
Sep 7, 2026
Replaces mark.py and build_final.py with build_logo.py, a single self-contained generator. The previous two files were helpers with no driver: no main, no file writing, no rasterisation, plus absolute paths from the sandbox they were written in. build_logo.py supersedes both, so they go. It builds the whole kit -- 17 SVGs, the PNG renders, the favicon set, favicon.ico, the apple-touch and maskable icons, the social card and the web manifest -- from the geometry constants at the top of the file plus the font. Verified reproducible: building into a clean directory reproduces all 42 generated files in docs/brand byte-for-byte, including every PNG and the ICO. Only site.webmanifest changes in this commit, reformatted by the generator's json.dump; it is semantically identical to what it replaces. README.md and PREVIEW.png are the two files here that are not generated. The --out and --font defaults are anchored to the script's own location rather than the caller's cwd, so `python3 tools/logogen/build_logo.py` rebuilds docs/brand in place from anywhere in the tree. --verify guards the invariants that are easy to break, and exits non-zero when one fails. Confirmed by reintroducing the #1466 defect: setting ICON_POST_TOP back to 141 is caught three independent ways -- the constant itself, the stale y1="141" surviving in all four icon SVGs, and a rasterised column-by-column measurement finding the post breaking the dish surface in 84 columns. It also checks that no SVG carries live text or a font dependency, that all four favicon.ico planes are true renders at their own size rather than upsamples, and that apple-touch-icon.png is 180x180 and opaque. Both READMEs now describe the real workflow, including which docs/static file each artwork file publishes to, since rebuilding docs/brand does not by itself change anything the site serves.
manugarg
added a commit
that referenced
this pull request
Sep 7, 2026
* [docs] Track the logo kit and its geometry in the repo
Until now the logo existed in the repo only as rendered output under
docs/static. The geometry that generates it lived outside version control,
which is why the recent icon fix had to be made by hand-editing a rendered
SVG rather than changing a parameter and rebuilding.
The kit splits along what each part is for:
docs/brand/ the artwork -- all 17 SVG variants, the PNG renders, the
favicon set, PREVIEW.png, and the usage rules in README.md
tools/logogen/ mark.py (mark and icon geometry), build_final.py (wordmark
outlining and lockup layout) and the weight-600 IBM Plex
Sans instance they build from
A generator under tools/ writing into docs/ matches what tools/gen_config_docs.sh
already does, and the tools/logogen/ subdirectory follows tools/genprotofacade/.
Named docs/brand rather than docs/logo to keep it distinct from
docs/static/logo, which holds the published copies the site actually serves.
Hugo publishes only content/ and static/, so docs/brand is not picked up by
the site build or the gh-pages tree.
Two fixes to build_final.py, which carried absolute paths from the sandbox it
was written in and could not run anywhere else:
sys.path.insert(0,'/home/claude/final') -> the script's own directory
FONT="/home/claude/fonts/IBMPlexSans-600.ttf" -> alongside the script
The README claimed build_final.py "produces every file from the mark geometry
plus the font". It does not: the module is helpers only -- horizontal(),
stacked(), frame(), recolor(), square() -- with no main, no file writing and
no rasterisation, because the driver that called them was never exported.
That section now says so plainly and tells the reader to keep mark.py in step
with any hand-edit, so the geometry and the artwork do not drift. The driver
is still to come.
The artwork here is byte-identical to the copies under docs/static, verified
across all 13 published assets, and mark.py's FAV geometry carries the y1=144
mast fix that shipped in #1466.
* [docs] Add the logo build driver and drop the helper-only scripts
Replaces mark.py and build_final.py with build_logo.py, a single
self-contained generator. The previous two files were helpers with no driver:
no main, no file writing, no rasterisation, plus absolute paths from the
sandbox they were written in. build_logo.py supersedes both, so they go.
It builds the whole kit -- 17 SVGs, the PNG renders, the favicon set,
favicon.ico, the apple-touch and maskable icons, the social card and the web
manifest -- from the geometry constants at the top of the file plus the font.
Verified reproducible: building into a clean directory reproduces all 42
generated files in docs/brand byte-for-byte, including every PNG and the ICO.
Only site.webmanifest changes in this commit, reformatted by the generator's
json.dump; it is semantically identical to what it replaces. README.md and
PREVIEW.png are the two files here that are not generated.
The --out and --font defaults are anchored to the script's own location rather
than the caller's cwd, so `python3 tools/logogen/build_logo.py` rebuilds
docs/brand in place from anywhere in the tree.
--verify guards the invariants that are easy to break, and exits non-zero when
one fails. Confirmed by reintroducing the #1466 defect: setting ICON_POST_TOP
back to 141 is caught three independent ways -- the constant itself, the stale
y1="141" surviving in all four icon SVGs, and a rasterised column-by-column
measurement finding the post breaking the dish surface in 84 columns. It also
checks that no SVG carries live text or a font dependency, that all four
favicon.ico planes are true renders at their own size rather than upsamples,
and that apple-touch-icon.png is 180x180 and opaque.
Both READMEs now describe the real workflow, including which docs/static file
each artwork file publishes to, since rebuilding docs/brand does not by itself
change anything the site serves.
* [docs] Address review on the logo kit
Blocking:
Untrack tools/logogen/__pycache__. The two .pyc files were bytecode of
mark.py and build_final.py -- the helper scripts the previous commit removed
-- and embedded absolute source paths from the machine that compiled them,
which contradicts this branch's own claim that no absolute paths remain. They
were produced by an import check while those files still existed, swept in by
`git add tools/logogen`, and not carried out by the later deletion.
.gitignore's scheme is "ignore everything, unignore anything with an
extension" (* / !*.* / !*/), so *.pyc was unignored by default and nothing
would have stopped this recurring. Added explicit __pycache__/ and *.pyc
rules at the end, where they take precedence, and confirmed via
git check-ignore. No bytecode remains tracked anywhere in the repo.
Minor:
- --instance-from with the default --font wrote over the tracked
IBMPlexSans-600.ttf, so the documented command silently rewrote a committed
file. It now refuses unless --font names an explicit target. Anchoring
--font to the script directory in the previous commit is what made this
reachable; before that it landed in the caller's cwd.
- Dropped the fixed /tmp scratch paths (_at, _mk, _og, _v, _t), which broke on
Windows and let concurrent runs clobber each other. cairosvg returns PNG
bytes when write_to is omitted, so these now go through io.BytesIO and no
scratch file is created at all.
- verify()'s docstring described running against an extracted archive, a mode
that does not exist because --verify always rebuilds first. It now describes
what the function actually does.
- The live-text check in build() was an assert, stripped under python -O. It
is now an explicit raise. Confirmed the build still passes under -O.
Re-verified after all of the above: a clean build still reproduces all 42
generated files byte-for-byte, --verify passes, and reintroducing
ICON_POST_TOP=141 is still caught six ways including the 84-column dish
measurement, exiting non-zero.
Also corrects the count used in the branch's earlier message: docs/brand
publishes 14 assets into docs/static, not 13. The earlier figure omitted
favicon.ico. All 14 verified byte-identical.
* [docs] Clean up SonarCloud findings in the logo generator
Nine of the thirteen open findings, all fixed in code rather than suppressed.
Output is unchanged: a clean rebuild still reproduces all 42 generated files
byte-for-byte, --verify passes, and the ICON_POST_TOP=141 regression is still
caught with the same 84-column measurement.
python:S6729 x4 -- np.where() with only a condition is np.nonzero(). Swapped,
and lifted the repeated column slices into locals while there, which is what
made the comprehension unreadable in the first place.
python:S1192 x3 -- "cloudprober-icon.svg", "cloudprober-icon-white.svg" and
"image/png" were repeated across the SVG table, the raster steps and the
verifier. Now ICON_SVG, ICON_WHITE_SVG and PNG_MIME.
python:S3776 -- verify() had a cognitive complexity of 26 against a limit of
15. Split into _check_svg_text, _check_post_clears_dish, _check_ico and
_check_apple_touch, each returning its own failures; verify() now just
concatenates them. Also gives each check a docstring saying why it exists,
and makes the SVG walk sorted so a failure list is deterministic.
python:S125 -- flagged the trailing comment on INK_CENTROID as commented-out
code. It was a false positive with a real cause: "measured, not eyeballed;
mass is low-left" happens to parse as valid Python, since "mass is low-left"
is "mass is (low - left)". Reworded so it no longer parses, which is cheaper
than carrying a suppression for it.
Also closes python:S1481 and the ten python:S5443 /tmp findings, which the
previous commit had already fixed.
Left open: four pythonsecurity:S8707 on --out reaching the filesystem.
* [ci] Scope out S8707 for the logo build script
The four pythonsecurity:S8707 findings on tools/logogen/build_logo.py are
false positives. The rule flags CLI arguments reaching the filesystem, and
targets agent-executed code handling untrusted input. build_logo.py is a
developer build tool run by hand from a checkout: --out is the operator's own
choice of output directory, and every filename joined onto it is a hardcoded
literal -- the all_svgs() keys, "site.webmanifest", ICON_SVG, and the svg/png/
favicon subdirectory names. Nothing untrusted is ever concatenated into a
path, so there is no traversal to defend against; the only thing --out
controls is where the tool writes, which is what the flag is for.
Suppressed narrowly, by rule and by file, rather than excluding tools/ from
analysis, so anything else added there is still scanned.
Also drops e2 from the multicriteria list, which named a criterion that was
never defined -- pre-existing, and harmless, but it makes the list read as if
a rule went missing.
* [ci] Match the existing resourceKey glob style for the S8707 ignore
The plain relative path did not take effect -- the analysis still reported
the four pythonsecurity:S8707 issues. Both working entries in this file use a
leading ** glob, so use the same form. Only one build_logo.py exists in the
repo, so this stays as narrow as the path did.
* [ci] Fix the issue-ignore property name: issues -> issue
The suppression added for pythonsecurity:S8707 had no effect, and neither the
plain path nor a ** glob for resourceKey changed that. The resourceKey was
never the problem: the property name was.
Sonar's key is sonar.issue.ignore.multicriteria, singular. This file has used
the plural sonar.issues.ignore.multicriteria since it was written, and Sonar
silently ignores unknown properties, so the whole block has been dead config.
That means e1 (go:S1313|1186|1192|3776 in tests) and e3 (secrets:S6652 in
tests) have never suppressed anything either.
Worth noting why this was not obvious: querying the API for go:S1192 shows 7
issues and none in _test.go files, which looks like e1 working. It is not --
**/*_test.go is in sonar.exclusions and sonar.test.inclusions, so those files
are scoped as test code and were never going to raise it.
Renamed all seven occurrences. The two pre-existing entries will now do what
they were written to do, which can only remove findings, never add them.
Per Sonar's docs this exclusion covers vulnerabilities, so e4 should now take
effect on the four S8707 findings.
* [ci] Exclude the logo build script from coverage
With the issue-ignore property fixed, the quality gate is down to one failing
condition: new_coverage 0.0% against an 80% threshold.
No test can fix that. The project sets sonar.go.coverage.reportPaths and
nothing else -- there is no sonar.python.coverage.reportPaths -- so Python
coverage is never reported to Sonar at all, and any new .py file reads as 0%
and fails the gate. The existing Python under probes/external/serverutils/py
escapes it only by not being new code.
build_logo.py is a developer build tool that is not part of the shipped
binary, which is the same rationale already applied to **/cmd/*.go and
examples/** in this list. Excluded by directory rather than by a wider
tools/**/*.py so that anything else added under tools/ still has to make its
own case.
Note this is a coverage exclusion, not an analysis exclusion: the file is
still fully scanned for bugs, smells and vulnerabilities.
---------
Co-authored-by: manugarg <[email protected]>
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.
The app icon's mount post was drawn 3 units too tall, so it broke out through
the concave face of the dish and left a nick in the silhouette at the neck.
The dish is an arc centred at (100, 96) with a 19-wide stroke, so at the post's
x=82the dish band spans y 134.5 to 154.8. The post is 14 wide with a roundcap, which reaches 7 above its endpoint:
At 512px that sliver is invisible. At 16px one device pixel spans about 8.6
units, so antialiasing smeared it into a visible pinch at the waist.
The whole change upstream is one number, in
cloudprober-icon.svgandcloudprober-icon-ondark.svg:Only the icon drawing is affected. The mark, both lockups and the social card
are unchanged, and their files are untouched here.
What's regenerated
favicon.svg,favicon-16x16.png,favicon-32x32.png,apple-touch-icon.pnglogo/cloudprober-icon-192.png,-512.png,-512-maskable.pngfavicon.ico, repacked to 16/32/48/64 from the kit's per-size renders, asbefore — the kit still ships a 16x16-only
.ico. Each frame was verifiedpixel-exact against its source PNG.
logo/cloudprober-avatar-512.png, rebuilt with the recipe it was createdwith:
cloudprober-icon-ondark.svgat 62% of a 512x512 opaque#0F2A43tile. The 62% was reconfirmed by re-rendering the old icon and matching it
against the current avatar across a 55-70% sweep.
site.webmanifestneeds no change. Every asset reference in the site waschecked —
favicons.html,params.toml(images,schemaLogo),layouts/index.html, rootREADME.md— and everything icon-derived isrefreshed here.
Follow-up
The avatar still has to be uploaded by hand at Organization settings ->
Profile -> Profile picture; merging this only updates the copy in the repo.