Repository navigation
test(pm2): 移除冷启动真实 pm2 God 的大注册表用例 - #1875
Merged
Merged
Conversation
该用例(#1026 引入)在 CI runner 上冷启动真实 pm2 God 时,warmup `pm2 status` 确定性地 exit 1:node vitest 分片与 bun-test 两条独立 腿首跑及一次 rerun 均复现,10403 个其它用例全过;本地(root/非 root、 node/bun)无法复现。 仓库测试惯例本就不冷启动真实 God:legacy-pm2-reaper 用 fake pm2、 desktop-pm2-apps 对同一 helper 用 mock spawn(注释明言要避免真 daemonize)。本用例是唯一例外,且它守护的 write-callback 修复属于 #956 已在 master 的遗留桌面 observer(现代插件服务已改用内置 supervisor,pm2 也不再是直接依赖,整条遗留路径后续会删除)。 删除后覆盖不缺口: - helper 的编排逻辑仍由 mock spawn 的 desktop-pm2-apps 测试覆盖; - 「大输出写完再 exit」的通用契约由 stdout-flush 的 2 MiB 真实管道 回归与 ask 的 50 万字符端到端回归守住(两者 CI 稳定绿)。 Co-Authored-By: Claude Code <noreply@anthropic.com>
deepcoldy
requested review from
47seek,
LucasIcarus,
xiaoxueSunn and
xiongz-c
as code owners
October 13, 2026 13:15
|
🚀 Released in v3.43.0 |
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.
改了什么
删除
test/pm2-readonly-jlist.test.ts(#1026 引入,79 行)。该用例真实冷启动一个 pm2 God 并连起 6 个进程造 >200KB 注册表,再 spawn 只读 jlist helper 校验不截断。为什么
该用例在 GitHub CI 上确定性失败:warmup
pm2 status(test 第 49 行)在 runner 上约 84ms 直接exit 1。test (3/3)分片与bun-test两条独立腿首跑均红;对失败作业 rerun 一次后两腿再次失败——非 flake。仓库测试惯例本就不冷启动真实 pm2 God:
legacy-pm2-reaper使用 fake pm2(注释明确写着要避免真连上导致 daemonize 一个 God),desktop/desktop-pm2-apps对同一 helper 用 mock spawn。本用例是全仓唯一真起 God 的例外。它守护的
pm2-readonly-client.tswrite-callback 修复属于 #956 已在 master 的遗留桌面 observer(该文件自述:Legacy desktop runtimes may still have PM2 on disk;现代插件服务已改用内置 supervisor,pm2 也不再是 package.json 直接依赖,遗留路径后续会删除)。删除后覆盖是否有缺口
无:
test/desktop/desktop-pm2-apps.test.ts覆盖(CI 稳定绿);test/stdout-flush.test.ts(2 MiB 真实管道 + 300ms 背压)与test/ask-cli.test.ts(50 万字符 comment 端到端)守住,两者均不依赖 pm2、CI 稳定绿。纯测试删除,
-79单行净删,不动任何生产代码。影响面
仅测试。可解除 #1026 合入后 master 主 CI 的持续红灯;#1873(relay mirror 大载荷回归)rebase 到本提交后即可干净通过。
验证
bunx vitest run --project unit test/stdout-flush.test.ts test/ask-cli.test.ts test/desktop/desktop-pm2-apps.test.ts:3 文件 29 通过;🤖 Generated with Claude Code