fix(ci): 根治 #3071/#3060 — plugin-audit/plugin-dev 测试不再依赖已构建 dist;移除全部临时诊断#3075
Merged
Conversation
… + file-captured full-graph reproduction Round 1 finding: the isolated runs failed with 'Failed to resolve entry for package @objectstack/core' — but that round built NOTHING (this PR only touches ci.yml, so --affected built no packages), which contaminates the data point: the resolution failure is expected without dist. It DOES prove the zero-output mystery though — vitest output was captured fine when run outside turbo, so the real runs' silence is GH log-pipeline loss under burst, not a hang. Round 2: (a) isolated run now builds plugin-audit's dependency closure first — if this passes, the package itself is healthy on the runner; (b) reproduce the REAL scenario (full affected graph via an old TURBO_SCM_BASE) with turbo output captured to a file, then print the plugin-audit block and every FAIL line — the file capture cannot lose lines the way the live log stream does. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A1BtxNeUaGmvUYr8FwtUNu
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
… depend on built dist (#3071, #3060) Root cause of #3071, reproduced locally on a fresh unbuilt worktree: plugin-audit and plugin-dev were the only test suites with NO vitest.config — vitest resolved their workspace deps through package.json exports, i.e. dist/. Whether those tests even LOADED therefore depended on turbo build ordering and cache-restore integrity on the runner: 'Failed to resolve entry for package @objectstack/core', surfacing as the deterministic zero-output Test Core failure (the output itself was lost to the GH log pipeline under burst — proven by the #3073 isolated run). - Add vitest.config.ts with src aliases to both packages (the same convention plugin-hono-server et al. already use); verified green on a completely unbuilt tree — the exact CI condition. - plugin-dev (#3060): mock the ~10 heavy dynamic imports in the 'missing deps' test as genuinely missing (ERR_MODULE_NOT_FOUND factories) — the degradation branch is exercised for real and the full-parallel 15s timeout flake disappears; drop the inflated timeout. - Remove ALL TEMPORARY #3071 diagnostic steps from ci.yml (rounds 1+2); keep the --concurrency=4 resource cap with a trimmed comment (the OOM attribution in it was wrong — the real cause was unresolvable dist). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A1BtxNeUaGmvUYr8FwtUNu
Contributor
📓 Docs Drift CheckThis PR changes 2 package(s): 4 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:
|
…irst case pays the i18n cold start (#3071) With the #3071 src aliases the suite finally RUNS on CI, exposing the second layer: the first zh-CN case dynamically imports @objectstack/core + the translation bundle, and on a shared 4-vCPU runner that cold start measured 5015ms — just past vitest's 5s default (the next case took 2234ms, every warmed case ~1ms). Bound the cold start at 20s for the localized describe only. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A1BtxNeUaGmvUYr8FwtUNu
os-zhuang
marked this pull request as ready for review
July 16, 2026 15:55
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.
#3071 根因已定位并修复(本地在"全新未构建工作区"精确复现 CI 失败条件后验证)。
根因
plugin-audit与plugin-dev是仓库里仅有的没有 vitest 配置的测试套件:vitest 按各 workspace 依赖的package.json exports解析 —— 即dist/。于是"测试能否加载"取决于 runner 上 turbo 构建时序与缓存恢复的完整性,失败时报:这正是 Test Core 三次确定性静默失败的真身——错误输出本身被 GH 日志管道在输出洪峰下丢弃(#3073 的隔离运行证明输出在隔离时完好),制造了"零输出挂起"的假象。
修复
vitest.config.tssrc 别名(与 plugin-hono-server 等既有约定一致)——测试加载彻底与 dist 是否构建解耦。已在完全未构建的树(即 CI 失败条件)上验证:plugin-audit 38/38、plugin-dev 7/7。pnpm testload #3060 一并根治:plugin-dev"缺依赖优雅降级"测试把 ~10 个重量级动态 import mock 为真实缺失(ERR_MODULE_NOT_FOUND工厂)——降级分支被真实覆盖,满负载 15s 超时偶发消失,撤去放大的超时。--concurrency=4资源上限并修正其注释(原 OOM 归因不成立)。验证
Failed to resolve entry失败)--affected会真实执行两包测试Closes #3071, closes #3060。
🤖 Generated with Claude Code
https://claude.ai/code/session_01A1BtxNeUaGmvUYr8FwtUNu