Skip to content

[PR] gate: isolate npm metadata cache per run (Lane U stale-latest false red) - #4114

Merged
ranxianglei merged 1 commit into
masterfrom
2026-10-21_gate-npm-cache-isolation
Oct 21, 2026
Merged

ranxianglei merged 1 commit into
masterfrom
2026-10-21_gate-npm-cache-isolation

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

(ai: zhipuai-lb/glm-5.3)

什么坏了

第二轮评审 gate(基 5c2f24a):Lane U 1/2——「registry latest read」断言读到旧值 latest=0.1.203-master-review.1(本轮发布的是 .2),240s 轮询窗内没等到新值。

根因

dsh 副本的 dist-tags 读取走了跨轮共享的 ~/.npm/_cacache:上一轮 fetch 的 packument 缓存(<5min TTL)持续供旧 latest(实测发布后 >60s 仍是 .1)。产品行为全对(managed 跳过原地自更 ✅、读 latest 并比较 ✅;发布后直查 verdaccio latest 已是 .2),纯 gate 环境污染。

修法

childEnv 增加 NPM_CONFIG_CACHE: path.join(baseDir, "npm-cache")——每轮独立 npm 缓存,注册表读取必新鲜。与已有的 XDG_*/DSH_HOME 隔离同款思路,5 行。

验证

node --check 过;下一轮 gate 实测(评审后跑 Lane U 即验)。

…se red)

The dsh copy's dist-tags read went through the shared ~/.npm/_cacache:
a previous round's packument (latest=<old candidate>) 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.
@ranxianglei ranxianglei changed the title gate: isolate npm metadata cache per run (Lane U stale-latest false red) [PR] gate: isolate npm metadata cache per run (Lane U stale-latest false red) Oct 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-21_gate-npm-cache-isolation (3aa60ef)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.4904-pr.4114.af8bb3d

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Option B — Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr4114.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei
ranxianglei merged commit 5f3b1e6 into master Oct 21, 2026
38 of 41 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.714-master.5f3b1e6 (rolling master tag).

npm install -g billion-context@0.0.714-master.5f3b1e6  # this exact build
npm install -g billion-context@master  # always the newest merged build

npm view billion-context@master prints the current version at any time.

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