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.
Make _webi/builds-cacher.js and _webi/transform-releases.js read
exclusively from ~/.cache/webi/legacy/<name>.json and remove every code
path that fetched from upstream or wrote to disk. The Go cache daemon
(webicached) is now the sole writer; the Node server is a thin reader.
builds-cacher.js:
- Resolve cache files via Os.homedir() + '/.cache/webi/legacy/' instead
of the cacheDir argument. Drop the 'caches' constructor parameter.
- Remove getLatestBuilds / getLatestBuildsInner — they require()d
per-package releases.js modules, fetched upstream, and wrote
<yyyy-mm>/<name>.json + .updated.txt to disk.
- Remove the process.nextTick stale-refresh hook in _doGetPackages.
Cold reads return what's on disk; if the file is missing, return
empty meta instead of fetching.
- Remove freshenRandomPackage and its supporting state
(bc._staleNames, bc._freshenTimeout, bc._staleAge). The hourly
background freshener competed with webicached for the same files.
- In getProjectTypeByEntry, decide selfhosted vs valid by probing for
the cache file rather than require()-ing releases.js. Drop the
not_found / 'PROBLEM/SOLUTION/npm clean-install' diagnostic in
getProjectsByType — the cache-file probe replaces the module-load
failure mode.
transform-releases.js:
- Remove Releases.get and the _normalize import. Replace
getCachedReleases's fetch+race+stale-age machinery with a single
Fs.readFile of ~/.cache/webi/legacy/<pkg>.json.
- Drop the in-process version re-sort in createFormatsSorter; the
cache file is already version-sorted by webicached, so the sorter
only re-orders within the same version.
No callers' public signatures change. Every other file is untouched —
the per-package releases.js modules, _common/*.js fetchers, and
_webi/normalize.js still exist on disk but are no longer reachable
from the request path.