Skip to content

Serve the Chocolatey icon from a CDN, pinned to the release tag - #178

Merged
donislawdev merged 1 commit into
masterfrom
fix/chocolatey-icon-cdn
Sep 5, 2026
Merged

Serve the Chocolatey icon from a CDN, pinned to the release tag#178
donislawdev merged 1 commit into
masterfrom
fix/chocolatey-icon-cdn

Conversation

@donislawdev

Copy link
Copy Markdown
Owner

The Chocolatey package's iconUrl was <repo>/raw/master/bean.png, and that address is
refused by moderation: github.com/<owner>/<repo>/raw/... is treated exactly as
raw.githubusercontent.com, and neither counts as a CDN. It held the 0.5.0 submission back.

The branch was the second fault in the same line, and nothing had reported it. An icon
pinned to master follows whatever that branch does next, under a package that is already
approved and out of reach - so the fix pins to the tag as well as moving to a CDN.

The address is now ICON_URL in tools/build_packages.py, built from the same repository
and tag that already produce the download URL, so the version is still typed in exactly one
place. The renderer's existing two-way placeholder test is half the pin: an unused entry and
an unknown placeholder both fail.

Measured before the change, because a CDN address is a claim about someone else's server:
jsDelivr answers 200, image/png, 21155 bytes - the same count the github.com address
returns, so this moves the address and not the picture. Every URL in the rendered manifests
was then re-checked and all of them answer 200. WinGet manifests carry no icon field at all
and are untouched.

Guard: test_packaging.py::test_the_chocolatey_icon_is_a_pinned_cdn_url refuses both faults

  • the host and a missing tag - and it is registered in MUTATIONS. The mutation was run
    rather than written: 5 of 5 packaging mutations caught, this one by its own test.

🤖 Generated with Claude Code

`iconUrl` was `<repo>/raw/master/bean.png`. Chocolatey's moderation treats
`github.com/<owner>/<repo>/raw/...` exactly as `raw.githubusercontent.com`, and
neither counts as a CDN, so the 0.5.0 submission could not be approved.

The branch was the second fault, and nothing had reported it: an icon on `master`
follows whatever that branch does next, under a package that is already approved
and out of reach. The address now comes from `ICON_URL`, built from the same
repository and tag that already produce the download URL, so the version is still
typed in one place.

Measured before changing anything, because a CDN address is a claim about someone
else's server: jsDelivr answers 200, image/png, 21155 bytes - the same count the
github.com address returns, so this moves the address and not the picture. WinGet
manifests carry no icon field and are untouched.

Guard: `test_packaging.py::test_the_chocolatey_icon_is_a_pinned_cdn_url` refuses
both faults - the host and the missing tag - plus an entry in `MUTATIONS`. The
mutation was run rather than assumed: 5 of 5 packaging mutations caught.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@donislawdev
donislawdev merged commit a302a1e into master Sep 5, 2026
14 checks passed
@donislawdev
donislawdev deleted the fix/chocolatey-icon-cdn branch September 5, 2026 06:18
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