From 3aa60efaae80f8577b4595c478933564a0234ac2 Mon Sep 17 00:00:00 2001 From: ranxianglei Date: Wed, 21 Oct 2026 13:57:06 +0800 Subject: [PATCH] gate: isolate the npm metadata cache per run (Lane U stale-latest false red) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The dsh copy's dist-tags read went through the shared ~/.npm/_cacache: a previous round's packument (latest=) kept being served for >60s after this round published the new candidate — long enough to fail the up-to-date assertion inside the 240s poll window. Per-run NPM_CONFIG_CACHE under baseDir makes every registry read fresh. --- scripts/release-gate-local.mjs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/release-gate-local.mjs b/scripts/release-gate-local.mjs index 20bf759258..24d27b8606 100644 --- a/scripts/release-gate-local.mjs +++ b/scripts/release-gate-local.mjs @@ -261,6 +261,11 @@ async function main() { XDG_STATE_HOME: path.join(baseDir, "xdg/state"), XDG_CACHE_HOME: path.join(baseDir, "xdg/cache"), XDG_DATA_HOME: path.join(baseDir, "xdg/data"), + // npm metadata cache must be per-run: a shared ~/.npm/_cacache lets the + // dsh copy's dist-tags read serve a STALE latest from a previous round + // (observed: latest= for >60s after this round's publish, + // long enough to fail Lane U's up-to-date assertion inside the 240s poll). + NPM_CONFIG_CACHE: path.join(baseDir, "npm-cache"), BILI_PROVIDER_REWRITES: "", PI_PROVIDER: "", BILI_GATE_KEY: "gate-local",