fix(spec): check:react-declaration-parity 无 MANIFEST 时报错退出,门禁台账改记「此处跑不了」(#4690) - #5959
Merged
Merged
Conversation
…不了」(#4690) The gate had no path on which it could go red: it is in no workflow, and a manual run without MANIFEST printed a warning and exited 0. Measured first, before wiring anything: the manifest cannot be produced in this repo. Its only producer drives a real browser at objectui's built console (`window.__MANIFEST`); packages/console/dist/ is gitignored, build-console.sh deliberately does not dump one, and the published @objectstack/console tarball carries no sdui.manifest.json (16.1.0: 513 files, 0 `sdui` matches). Wiring a lint.yml step would have wired a permanently-skipping step. - missing / nonexistent / malformed / empty MANIFEST now exit 1 with a prescription naming the producer, independent of --strict (that flag prices a divergence; this is "no comparison happened"). - check:generated moves it from NO_GENERATOR into a new EXTERNAL_INPUT_REQUIRED bucket recording the missing input and its runner, whose honesty is enforced: reconciliation fails if gen-sdui-manifest.sh stops invoking the gate. - Tests assert EXIT CODES: a fabricated registry-only input and a vanished block each exit non-zero naming themselves; an accepted state still exits 0. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01559M8FVm6W6vDLABL3jvdW
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Contributor
📓 Docs Drift CheckNo hand-written docs reference the 0 changed package(s). ✅ |
baozhoutao
marked this pull request as ready for review
August 6, 2026 13:11
baozhoutao
enabled auto-merge
August 6, 2026 13:11
This was referenced Aug 6, 2026
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 #4690
前提复核(先证伪,再动手)
三条现象在
origin/main(72bd873)上全部成立:git grep -l check:react-declaration-parity origin/main -- .github/workflows/pnpm --filter @objectstack/spec check:react-declaration-parity⚠ … manifest unavailable … — skipping./exit=0check:generated把它与另外 7 个并列为「deliberately not run」check-generated.ts的NO_GENERATORPM 裁决的分叉判据:MANIFEST 在本仓 CI 里拿不到(实测,非推断)
脚本要的是 objectui 的
sdui.manifest.json。唯一生产者是 objectui 的scripts/dump-public-manifest.mjs:用 Playwright chromium 打开构建后 console 的dev/manifest-dump.html,读window.__MANIFEST—— registry 是浏览器应用(plugin-map / charts 拉浏览器专属依赖),Node 侧枚举不出来。逐个核对本仓候选来源:packages/console/只跟踪 4 个文件,dist/在.gitignore里 —— 没有任何签入副本(git ls-files | grep sdui.manifest为空);scripts/build-console.sh(ci.yml 真正会跑的那个)故意不产出 manifest,自己的收尾注释就写着不能把浏览器拖进 console 构建;@objectstack/consoletarball 里也没有:16.1.0 共 513 个文件,sdui命中 0;里面的dist/manifest.json是 PWA manifest。也就是说连 CLI 的@objectstack/console/dist/sdui.manifest.json兜底都解析不到东西;pnpm sdui:manifest或装 Playwright(showcase-smoke 装的那份与此无关)。结论走 PM 裁决的第二支:不把一个必然 skip 的步骤接进
lint.yml—— 那只是给同一个缺陷套上 CI 外衣。因此本 PR 没有改.github/workflows/lint.yml(#5827 的同文件冲突面归零)。改了什么
MANIFEST、路径不存在、JSON 读不动、dump 里零个 component —— 四条路径统统exit 1,并打印可执行的处方(pnpm sdui:manifest、OBJECTUI_ROOT=../objectui pnpm objectui:build、以及它需要的浏览器)。刻意不受--strict支配:那个 flag 决定「有分歧」值多少钱,而这里是另一件事 —— 根本没发生比较。把它挂到 flag 上等于把 check:react-declaration-parity 是唯一没接进任何 workflow 的源码审计门禁,且无 MANIFEST 时静默 skip 退出 0 —— 它现在永远不可能红 #4690 的洞往下挪一层。空 dump 是同族的新增覆盖:objectui 的 dumper 本就拒绝写空 manifest,这里对应地拒绝读,而不是把每个 block 都报成 missing。check:generated把它从NO_GENERATOR(可跑、只是本聚合器不跑)移进新的EXTERNAL_INPUT_REQUIRED,记录缺的输入与它的生产者,并打印cannot run here: check:react-declaration-parity — needs MANIFEST=…; runs in scripts/gen-sdui-manifest.sh。沿用EXPLICIT_GENERATORS(check:authorable-surface在--check模式下也会重写authorable-surface.base.json—— 一次纯核验会改工作区,且任何无关 PR 都能因此静默推进删除门的锚点 #5358/fix(spec): 重锚 authorable-surface.base.json 改为显式动作 —— 构建不再顺手推进删除门的锚点 #5807)的先例:分类带一条被强制的断言,而不只是一个标签 —— 若scripts/gen-sdui-manifest.sh不再于非注释行调用该门禁,reconciliation 直接红。被记成「在别处跑」却哪里都不跑,正是这个分类要暴露的洞。check:generated跑不了的门禁、manifest 从哪来、以及「不要靠重新加回 skip 来消红」。「这个门禁能红」本身是可验证的(#4804/#4777 的验收杠)
原有测试全部只读报文文本,而
run()按设计吞掉退出码 —— 也就是说它们对一个「永远 exit 0」的脚本同样会绿,那恰好就是这个门禁当时的状态。新增的 describe 断言退出码:反向验证(方向事先预判为红,实测即红):
a missing MANIFEST is a failure, not a skip与a MANIFEST path that does not exist fails loudly两条转红,AssertionError 里就是旧的manifest unavailable — skipping.。另外两条「跑不了」用例保持绿是如实的:旧分支从来只覆盖「未设/不存在」,畸形 JSON 当年是未捕获抛栈、空 dump 当年直接 exit 0,它们不可能靠还原这条分支变红。gen-sdui-manifest.sh里的调用注释掉 →check:generated --reconcile-onlyexit 1:EXTERNAL_INPUT_REQUIRED says … runs via scripts/gen-sdui-manifest.sh, which no longer invokes it.(注释行不算数,这正是「非注释行」判定要挡的伪证据。)验证
authorable-surface.base.json未出现在改动清单里(逐文件核对过git status)。Changeset
@objectstack/spec: patch—— 依 #4472 先例(同一个脚本的上一次改动就是 patch changeset),因为对任何手工跑它的人来说行为是可见变化:以前静默退 0,现在带处方红。遗留
manifest 在 CI 里究竟该从哪来(在本仓 workflow 里 clone objectui 并加浏览器 / 让 objectui 发布 manifest 制品 / 在 objectui 侧做 Node 端 dump),是一个带成本的架构决定,已按 PM 裁决 (c) 另行开单记录测量数据,不在本 PR 内猜。
Generated by Claude Code