From 70067a620e11d5c3198943da135e8cda54479aa3 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Fri, 8 May 2026 11:36:44 -0600 Subject: [PATCH] fix(api): only apply libc filter when caller pinned a meaningful libc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit filterReleases unconditionally rejected libc=musl entries unless the host was libc=musl, even when the caller never specified a libc in the request. serve-releases.js defaults the libc parameter to 'libc' (the catch-all glibc-host bucket the installer-side resolver uses), so the website's release table and the WEBI_RELEASES probe were both stripped of every musl entry that the cache actually contained — even though the installer would happily consider those builds on a glibc host (its waterfall is [none, gnu, musl, libc]). Treat libc='libc' (and missing) as 'no preference' so the filter only runs when the caller pinned a real libc (musl, gnu, msvc, etc.). Specific-libc queries (?libc=musl, ?libc=gnu) still filter exactly as before. --- _webi/transform-releases.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/_webi/transform-releases.js b/_webi/transform-releases.js index 068d59f..88b27a5 100644 --- a/_webi/transform-releases.js +++ b/_webi/transform-releases.js @@ -112,7 +112,10 @@ async function filterReleases( } } - if (rel.libc !== 'none') { + // libc='libc' is serve-releases.js's default when the caller + // didn't pin one — treat it as 'no preference', not a filter. + let isMeaningfulLibc = libc && libc !== 'libc' && rel.libc !== 'none'; + if (isMeaningfulLibc) { let releaseRequiresMusl = rel.libc === 'musl'; // goal: handle non-glibc (Alpine / Docker / musl) let osHasMusl = libc === 'musl';