fix: add trailing slash to NIGHTLY_RELEASES_DIR path - #1035
Conversation
|
Happy for this to land immediately as an errata fix 👍 |
|
export from a frontier model session. i am including for review for those that know the code better than me Investigation: v27 nightlies missing from nodejs.org/download/nightly/Re: [nodejs/release-cloudflare-worker#1034](#1034) TL;DRSince #1002 (Aug 17), the worker serves directory listings for The harden-runner egress warnings appear unrelated. Symptoms (from #1034)
Root cause1. KV is authoritative for these prefixes, with no fallback[#1002](2876418) enabled In if (path.startsWith(prefix)) {
return await kvProvider.readDirectory(path); // KV miss -> undefined -> 404
}There is no fallback to R2/S3 listing. Any directory that isn't in KV returns 404. Per-directory KV keys are written only by 2. The nightly refresh from #1019 writes the wrong key#1019 added nightly to export const RELEASE_DIR = 'nodejs/release/';
export const DOCS_DIR = 'nodejs/docs/';
export const NIGHTLY_RELEASES_DIR = 'nodejs/nightly'; // <- missing trailing slash
The scheduled 3. New version subdirectories are never listedEven with the slash fixed, the scheduled run (no version argument) lists The same staleness should apply to every other Why this isn't more widely noticedOnly directory listings go through KV. File downloads use Tooling such as nvm, fnm, Egress warnings (harden-runner)These are most likely unrelated:
It's still worth checking which endpoints are being flagged, but as a separate item. The logs require sign-in and were not reviewed here. How to confirm
If those checks don't match, the mechanism above is wrong, and the KV contents should be examined directly. Proposed fixes
|
Possible fix for #1034. I have something else to look at here.... see LONG comment below
A frontier coding agent assisted in this analysis.