Repository navigation
[PR] ci: add real npm layout e2e for self-update (#6643 regression class now covered by CI) | ci: 自更新补真实 npm 布局 e2e(#6643 回归类从此 CI 兜底) - #6676
Merged
Conversation
…sion class) The update code paths were only covered by unit tests with hand-built directories and by the real-model gate Lane X, which materializes a REAL npm global install. #6643 (pre-#6340 atomic-swap rewrite) made every in-place update on an npm-layout install fail 100% — cp-onto-existing- backup hit libuv's self-copy guard on the relative node_modules/.bin symlinks — and no CI lane caught it. New tests/e2e/e2e-selfupdate-cli.test.ts in the existing hermetic registry lane (ACP_TEST_REGISTRY=1, ci-registry.yml, ubuntu+windows): publish a fixture package with a bin-bearing dependency (so npm lays down a real relative .bin symlink tree), npm install -g it, then run the REAL CLI 'bili update' and assert the version advances on disk + in 'bili --version', plus a clean no-op second update. Verified: - green on master (fix in place) in the bili-gate container (node 22 / npm 10) - red with #6643 reverted: exact gate failure signature 'backup of current install failed ... ERR_FS_CP_EINVAL ... node_modules/.bin/mime' - green locally (node 25 / npm 11 writes absolute .bin links — trap inert, flow still exercised)
Contributor
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.9959-pr.6676.c7f16c5This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr6676.tgz
npm install -g packageInstall instructions are refreshed on each push. |
Contributor
📦 Merged Build PublishedThis merge to master was published as npm install -g billion-context@0.0.1198-master.8964c1f # this exact build
npm install -g billion-context@master # always the newest merged build
|
This was referenced Nov 14, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
这是啥问题?
bili update原地自更新的代码之前没有任何跑真实 npm 安装布局的测试:单测全是手工搭目录,真实 npm 全局安装只有真模型 gate 的 X lane 覆盖。所以 #6643 那个「npm 布局下原地自更新 100% 失败」的回归(备份目录复用 + 相对.bin符号链接触发 libuv 自拷贝保护,ERR_FS_CP_EINVAL)一路漏到了 gate 才被发现。修了什么
新增
tests/e2e/e2e-selfupdate-cli.test.ts,挂到现有的 hermetic registry lane(ACP_TEST_REGISTRY=1,ci-registry.yml,ubuntu + windows):npm install -g生成真实的相对.bin符号链接树——正是触发 [PR] In-place auto-update 100% failure fix: Backup must not exist prior to atomic swap (Gate Lane X repro) | 就地自动更新 100% 失败修复:备份不能先于原子交换存在(门禁 Lane X 复现) #6643 回归的布局;bili update(不是直接调内部函数);bili --version报告新版本、第二次 update 干净 no-op。验证
backup of current install failed (install left untouched): SystemError [ERR_FS_CP_EINVAL] ... node_modules/.bin/mime;.bin链接,陷阱不触发,但完整更新流程仍被覆盖)。能合并吗?
能。只加一个测试文件 + ci-registry.yml 运行列表加一行,零产品代码改动。建议合入,之后这类回归进不了主干。