Fix fetch script platform/architecture/format detection bugs#349
Merged
Conversation
Discovered while batch-adding ~40 plugins from the awesome-linux-clap-list: - inferSystems(): "win" substring matched inside product names like "airWINdows" and "darWIN.dmg" with no left-boundary check, tagging Mac-only installers as also Windows. Also added ubuntu/debian/fedora distro-name detection — filenames without a literal "linux" substring were silently dropped as unrecognized (this caused several real Linux release assets to go missing entirely: crrshrr, DEL2, Penare, vitalium-verb all had this happen). - inferArchitectures(): armhf was mapped to x32 instead of arm32. riscv64 fell through to a silent x64 default — there's no registry architecture value for RISC-V, so it now returns null and the caller skips the asset instead of mislabeling it. - inferContains(): VST2 was always tagged generically as "vst", but the registry enum requires platform-specific values (vst=Mac, so=Linux, dll=Windows). Now derived from each file's detected system. - main(): assets skipped for any reason (unrecognized platform, unsupported architecture) are now printed as a warning instead of disappearing with no trace. - Empty release bodies now fall back to "<tag> release." for the required `changes` field instead of producing an empty string that fails schema validation. Also expands AGENTS.md with the manual-verification steps that can't be automated: the correct PluginFormat enum reference (component, not au), verifying "latest" is actually the right release channel, cross-checking asset counts, and treating "no image anywhere" / "no binaries at all" as failure conditions rather than something to force through.
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.
Summary
Bugs found and fixed while batch-adding ~40 plugins from the awesome-linux-clap-list. Every one of these was verified against real repos during that batch (reproductions in the PR discussion if useful).
src/fetch.ts:
inferSystems(): unboundedwinsubstring match false-positived inside product names ("airWINdows", "darWIN.dmg"), tagging Mac-only installers as also Windows. Fixed with a left-boundary check.inferSystems(): filenames using a distro name (ubuntu-22.04.zipetc.) instead of the literal word "linux" were silently dropped — real Linux binaries for crrshrr, DEL2, Penare, and vitalium-verb went missing this way. Added ubuntu/debian/fedora detection.inferArchitectures():armhfmapped tox32instead ofarm32.riscv64had no valid registry architecture value but silently defaulted tox64— now returnsnulland the asset is skipped instead of mislabeled.inferContains(): VST2 was always tagged as genericvst, but the registry enum requires platform-specific values (vst=Mac,so=Linux,dll=Windows). Now derived per-file from the detected system.changesfallback instead of failing schema validation.AGENTS.md:
containsenum reference table (theau/componentmixup isn't a script bug — it's easy to hand-type the human abbreviation instead of the schema value, so it's now called out explicitly).gh release view.Test plan
npm run checkpasses (lint, build, tests)ubuntu-20.04.zipLinux asset is now included.dmgis now taggedmaconly (was[win, mac]), and thearm64ecWindows zip is now taggedarm64ec(wasarm64)