fix(scripts): check-i18n-coverage 的构建前置改为真检查,不再让第一个 example 顶罪 - #6032
Queued
hotlong wants to merge 1 commit into
Queued
fix(scripts): check-i18n-coverage 的构建前置改为真检查,不再让第一个 example 顶罪#6032hotlong wants to merge 1 commit into
hotlong wants to merge 1 commit into
Conversation
`scripts/check-i18n-coverage.mjs` 与 #5217 修的门禁是 lint.yml 里紧邻的两步, 带着同一句只写在注释里的前置("Requires the workspace build")。在装完依赖但 未构建的 worktree 里,它抛一个未捕获异常 + node 栈: Error: os lint produced no output for examples/app-crm/objectstack.config.ts 成因只有一个,而且不在那个文件里:门禁跑的是构建产物,oclif 从 dist/commands 解析 `os lint`,CLI 没 build 时什么也不输出 —— app-crm 只是恰好第一个被处理。 诊断把读者送进一个完全无辜的示例配置。 改动与 #5217 落地形状同构: - 进入 per-config 循环之前一次前置判定(探测 oclif 真正要加载的命令文件), 失败时一条前置结论 + 一句修法,并声明「什么都没测量」; - 循环内保留签名安全网,覆盖探测看不见的 stale/partial dist,首个 config 即 中止,并明说该 config 不是成因; - 两个纯分类器(oclifCommandFileFor / looksLikeMissingCliCommand)提取到 scripts/cli-build-prerequisite.mjs 共享,check-i18n-bundles.mjs 改为 import —— 两份拷贝就是两套事实来源(#5186),而 oclif 硬换行这类知识只会被改一边; - 补 --self-test(语料逐字录自本仓未构建实跑),并按仓内惯例接进 package.json 的 check:i18n-coverage,否则自测永远不跑。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BDmDsu2575gDxeMCxXhDE3
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
hotlong
marked this pull request as ready for review
August 6, 2026 15:28
hotlong
added this pull request to the merge queue
Aug 6, 2026
Any commits made after this event will not be merged.
Contributor
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 31117146174 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 失败的 job(日志抽取,best effort):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 6, 2026
os-zhuang
added this pull request to the merge queue
Aug 6, 2026
Any commits made after this event will not be merged.
Contributor
|
队列管家原样重投(Routine
⛔ 未改代码、未切 ready/draft、未重跑(rerun 复用原合并 ref,对此类红无意义)。 Generated by Claude Code |
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.
Fixes #5862
问题
scripts/check-i18n-coverage.mjs与 #5217 修的门禁是lint.yml里紧邻的两步,并且带着同一句只写在注释里的前置声明("Requires the workspace build (it runs the built CLI)")。在装完依赖但未构建的 worktree 里实跑,它给出的是一个未捕获异常加一段 node 栈:成因只有一个,而且不在那个文件里:门禁跑的是构建产物
packages/cli/bin/run.js,oclif 从dist/commands解析os lint,CLI 没 build 时什么也不输出。examples/app-crm/objectstack.config.ts只是恰好第一个被处理的配置,替整个环境顶了罪 —— 排障时的第一手读数在说谎。CI 永远命中不到(
Build workspace packages排在这两步之前),这也正是它能活下来的原因:唯一会遇到它的人,是在本地复现红色 i18n CI 的人,恰好是错误首诊代价最高的时刻。改动(与 #5217 落地形状同构)
oclif.commands.target推导,而不是写死),失败时给一条前置结论 + 一句修法,并明确声明什么都没测量、baseline 一字未动(含--update)。dist:命令文件在、但构建产物已答不上这个 id)。首个 config 即中止,并且消息里点名该 config 不是成因,正好把原缺陷反过来。--self-test—— 语料逐字录自本仓未构建实跑,并按仓内惯例接进package.json的check:i18n-coverage(--self-test && 门禁,与check:i18n/check:nul-bytes/check:doc-authoring一致)。不接线的话自测永远不跑,本身就是这仓反复付过学费的 phantom check。为什么选「提取共享」而不是「照抄两份」
两个纯函数提取到新的
scripts/cli-build-prerequisite.mjs,check-i18n-bundles.mjs改为 import。理由:command … not found硬换行成两三行(本仓实测,长路径会拆到第三行),逐行正则一条也匹配不到 —— 这正是「读起来正确」的那个实现。两份拷贝就是两套事实来源(check:durability-log-level结构性看不见「读接缝把故障答成空值」这一类 —— #4825 / #5108 全家都在闸门盲区里 #5186 先例)。check-i18n-bundles.mjs只少了两个函数体、多了一条 import,其余行为逐字未变(见下方实测的前置消息比对)。申报文件面的扩面说明(认领时已预期):
scripts/check-i18n-bundles.mjs(改 import)与新增的scripts/cli-build-prerequisite.mjs属于共享路线的必要扩面;package.json一行是--self-test的接线,否则新增自测不进 CI。⛔ 未碰lint.yml。一处诚实的修正:修法不能只说一半
按 issue 建议的
pnpm exec turbo run build --filter=@objectstack/cli实跑后,前置确实清掉了(app-crm 正常计数),但墙只是往后挪了一格 —— 这个门禁不同于隔壁的 bundles 门禁,它还要 lintexamples/*,而 example 配置会按名字 import 其它 workspace 包:所以修法按两个宽度给:
CLI_BUILD_FIX是清掉「本次实际检查了什么」的最小命令(探测只测了 CLI,就不许替整棵树背书);紧跟一行说明从未构建过的树要pnpm build。少这一行,新消息就变成「同一个缺陷、晚一步发生」。实测
origin/main代码)node scripts/check-i18n-coverage.mjs--update… --updatepnpm build)pnpm check:i18n-coverageOK (12 config(s), 660 baselined untranslated string(s), none new).(EXIT=0)pnpm check:i18n(#5217 门禁)OK (9 package(s) …)(EXIT=0)pnpm check:i18n前置消息--self-test×2pnpm lint(CI ESLint job 首步)、pnpm check:nul-bytes均为 EXIT=0。Changeset
scripts-only,根包 private,不发布任何东西 —— 走
skip-changeset标签(照 #5986 先例),不写 changeset。Generated by Claude Code