Skip to content

fix(ci): 根治 #3071/#3060 — plugin-audit/plugin-dev 测试不再依赖已构建 dist;移除全部临时诊断 - #3075

Merged
os-zhuang merged 3 commits into
mainfrom
claude/objectql-protocol-layering-s2sn67
Jul 16, 2026
Merged

fix(ci): 根治 #3071/#3060 — plugin-audit/plugin-dev 测试不再依赖已构建 dist;移除全部临时诊断#3075
os-zhuang merged 3 commits into
mainfrom
claude/objectql-protocol-layering-s2sn67

Conversation

@os-zhuang

@os-zhuangos-zhuang commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

#3071 根因已定位并修复(本地在"全新未构建工作区"精确复现 CI 失败条件后验证)。

根因

plugin-auditplugin-dev 是仓库里仅有的没有 vitest 配置的测试套件:vitest 按各 workspace 依赖的 package.json exports 解析 —— 即 dist/。于是"测试能否加载"取决于 runner 上 turbo 构建时序与缓存恢复的完整性,失败时报:

Failed to resolve entry for package "@objectstack/core"

这正是 Test Core 三次确定性静默失败的真身——错误输出本身被 GH 日志管道在输出洪峰下丢弃(#3073 的隔离运行证明输出在隔离时完好),制造了"零输出挂起"的假象。

修复

  1. 两包补上 vitest.config.ts src 别名(与 plugin-hono-server 等既有约定一致)——测试加载彻底与 dist 是否构建解耦。已在完全未构建的树(即 CI 失败条件)上验证:plugin-audit 38/38、plugin-dev 7/7。
  2. flaky: plugin-dev "init with mocked context" times out (15s) under full-parallel pnpm test load #3060 一并根治:plugin-dev"缺依赖优雅降级"测试把 ~10 个重量级动态 import mock 为真实缺失(ERR_MODULE_NOT_FOUND 工厂)——降级分支被真实覆盖,满负载 15s 超时偶发消失,撤去放大的超时。
  3. 移除 ci.yml 全部 TEMPORARY 诊断步骤(#3071 诊断与修复:plugin-audit#test 在托管 runner 上静默失败 #3073 进 main 的 round 1 + 本分支 round 2);保留 --concurrency=4 资源上限并修正其注释(原 OOM 归因不成立)。

验证

  • 未构建树:plugin-audit 38/38、plugin-dev 7/7(修复前:同款 Failed to resolve entry 失败)
  • 本 PR 的 Test Core 触及两包与 ci.yml,--affected 会真实执行两包测试

Closes#3071, closes#3060

🤖 Generated with Claude Code

https://claude.ai/code/session_01A1BtxNeUaGmvUYr8FwtUNu

… + 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
@vercel

vercelBot commented Jul 16, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
specReadyReadyPreview, CommentJul 16, 2026 3:54pm

Request Review

… 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
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 2 package(s): @objectstack/plugin-audit, @objectstack/plugin-dev.

4 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/deployment/production-readiness.mdx(via @objectstack/plugin-audit)
  • content/docs/getting-started/cli.mdx(via @objectstack/plugin-audit)
  • content/docs/plugins/packages.mdx(via @objectstack/plugin-audit, @objectstack/plugin-dev)
  • content/docs/releases/implementation-status.mdx(via @objectstack/plugin-audit)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

@os-zhuangos-zhuang changed the title #3071 诊断 round 2:修正取数条件 + 文件捕获全图复现(将随根因修复移除全部临时步骤)fix(ci): 根治 #3071/#3060 — plugin-audit/plugin-dev 测试不再依赖已构建 dist;移除全部临时诊断Jul 16, 2026
…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
os-zhuang marked this pull request as ready for review July 16, 2026 15:55
@os-zhuang
os-zhuang merged commit 95e0bb8 into mainJul 16, 2026
16 checks passed
@os-zhuang
os-zhuang deleted the claude/objectql-protocol-layering-s2sn67 branch July 16, 2026 15:56
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants

@os-zhuang@claude