fix(ext-ci): use browser_download_url + curl -f + ZIP magic check (XPI silently corrupt) #20
Reference in New Issue
Block a user
Delete Branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Root cause
The currently-deployed
:latestfrom PR #19's build silently shipped a corrupt XPI. Verified viacurl http://curator.traefik.internal/extension/fabledcurator-latest.xpireturning a 19-byte response:404 page not found.My build-web code in PR #19 had three compounding bugs:
/api/v1/.../releases/assets/<id>returns asset METADATA (JSON), not the binary blob. The correct download URL is the asset'sbrowser_download_urlfield.-fflag on curl — when the metadata endpoint returned 404 (or HTML), curl wrote the response body to the destination file with exit code 0. Build proceeded happily; docker image shipped a 19-byte text file masquerading as an XPI.Fix
browser_download_urlfromrelease.json(where the tag-lookup writes the asset metadata) and curl THAT URL.-fto the download curl so any HTTP error fails the build instead of writing the error body.PK(ZIP magic). If not, dump the file preview and exit 1. This is the defense-in-depth lesson banked from the "silent corruption shipped to production" failure mode.Bonus
In v26.05.25.5 also lives the sidecar
NN_prefix fix (0978fba) — that one's unrelated to the XPI install but addresses a much bigger silent failure (0 Posts in operator's DB despite 24 deep-refresh calls). Both ship together.🤖 Generated with Claude Code