Skip to content

Fix fetch script platform/architecture/format detection bugs#349

Merged
kmturley merged 1 commit into
mainfrom
fix/fetch-script-detection-bugs
Jul 9, 2026
Merged

Fix fetch script platform/architecture/format detection bugs#349
kmturley merged 1 commit into
mainfrom
fix/fetch-script-detection-bugs

Conversation

@kmturley

@kmturley kmturley commented Jul 9, 2026

Copy link
Copy Markdown
Member

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(): unbounded win substring 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.zip etc.) 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(): armhf mapped to x32 instead of arm32. riscv64 had no valid registry architecture value but silently defaulted to x64 — now returns null and the asset is skipped instead of mislabeled.
  • inferContains(): VST2 was always tagged as generic vst, but the registry enum requires platform-specific values (vst=Mac, so=Linux, dll=Windows). Now derived per-file from the detected system.
  • Assets skipped for any reason are now printed as a warning instead of disappearing with no trace.
  • Empty release bodies now produce a non-empty changes fallback instead of failing schema validation.

AGENTS.md:

  • Added a contains enum reference table (the au/component mixup 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).
  • Added guidance on verifying "latest" is actually the right release channel, and cross-checking asset counts against gh release view.
  • Documented that "no image anywhere" and "no binaries at all (build-it-yourself)" are failure conditions to report, not to force through with a placeholder.

Test plan

  • npm run check passes (lint, build, tests)
  • Re-ran the fetch script against DEL2 — the previously-dropped ubuntu-20.04.zip Linux asset is now included
  • Re-ran the fetch script against baconpaul/airwin2rack — the macOS .dmg is now tagged mac only (was [win, mac]), and the arm64ec Windows zip is now tagged arm64ec (was arm64)

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.
@kmturley kmturley merged commit be984a0 into main Jul 9, 2026
6 checks passed
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