You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
Filed unassigned while implementing #4968 (PR #4969). 不在那个 PR 范围内(它是区间跟进,这是门自身的报告完整性)。
现象
全仓有两个「生成器模板区间 = 仓内区间」的 ratchet 测试:
packages/cli/src/__tests__/app-generator.test.ts — sources every range from this repo instead of inventing one,13 个名字(DEPENDENCY_ANCHORS)
packages/create-plugin/src/__tests__/templates.test.ts:356 — sources every devDependency range from this repo instead of inventing them,8 个名字(DEV_DEPENDENCY_ANCHORS)
两者都是在 for 循环里逐名 expect,而 expect 失败即抛,所以一次只报第一个不匹配的名字。表是插入序遍历的,于是「谁先漂」还取决于名字在表里的位置,而不是严重性。
then re-read both test files for any other range they pin that this morning's other five bumps have already moved — shiki, maplibre-gl, react-hook-form and next all landed in the same window and only the first mismatch in each file is reported.
当时靠人工「再读一遍两个文件」补上,机制没改;七天后同一个盲区又让第二处模板藏了一轮。
建议修法
把逐名 expect 改成累积后一次断言,保留现有的信息量。cli 侧大意:
constdrifted: string[]=[];for(const[name,anchor]ofObject.entries(DEPENDENCY_ANCHORS)){// ... 前置断言(根里必须存在 / 仓内必须一致)保持立即抛,它们是仓库事实而非漂移if(generated!==expected){drifted.push(`${generator} manifest's ${name}: ${generated} should be ${expected}`);}}expect(drifted).toEqual([]);
要点两条:
前置断言与漂移断言要分开。 「name must exist in the root manifest」「in-repo manifests disagree on name … settle on one range first」是关于仓库状态的前提,立即抛是对的;只有值不匹配这一类该累积。
两个文件都要改,否则跨包盲区还在 —— 这正是今天那处的成因。
顺带:两处的 anchor 表都值得在同一次里加一句注释,说明「门只判本表内的名字」,以及新增模板依赖必须同时进表(完整性门已经在管这个,但两条规则分居两个 it 里,读的时候不明显)。
packages/cli/src/__tests__/app-generator.test.ts
× sources every range from this repo instead of inventing one
routed manifest's lucide-react must match its in-repo range:
expected '^1.29.0' to be '^1.31.0'
× writes a manifest whose @object-ui ranges name this CLI version
expected '^1.29.0' to be '^1.31.0'
packages/create-plugin/src/__tests__/templates.test.ts
× sources every devDependency range from this repo instead of inventing them
@testing-library/jest-dom range must match the repo root:
expected '^7.0.0' to be '^7.0.1'
Activity
yinlianghui commentedon Aug 17, 2026
这一族今天又活了一次:
main现在(@590dd6356)在两个 shard 上红。 不另立卡(#4098 是同一缺陷的上一轮,已关;本卡持有这一族的「逐名 expect、一轮修一个」观察),把实测记在这里。在 #3832 的 PR(#4975)分支上把
origin/mainmerge 进来后本地复现,与该 PR 的改动无关(它只动ComponentInput.type与五处声明,不碰任何 package.json / 模板):来源:今天两轮 dependabot —— #4946(patch-updates,
lucide-react1.29→1.31)与 #4948(dev-dependencies,@testing-library/jest-dom7.0.0→7.0.1)。两轮都只移了仓内区间,没移生成器模板里的那份副本。同一次 merge 里第三条红是 #4911(spec 17.0.0 GA 的
$like/$ilike,packages/fields的FilterConditionField.operators.test.ts)—— 那张卡已经开着,main把@objectstack/spec从^17.0.0-rc.6推到^17.0.0之后它就是活的。也就是说
main今天有 三条 红、跨三个包,全部由「pin 前移、跟随面没跟」造成 —— 正好是本卡说的「一轮修一个」在同一天里撞了三次。对本卡的判据没有新增,只是又一个实测样本;顺带给后面所有基于今天 main 的 PR 一个归因,免得每个 agent 都当成自己的红重查一遍(#4975 就查了一轮)。Generated by Claude Code
yinlianghui commentedon Aug 17, 2026
认领(objectui 车道分片 PM,会话
session_01GTRjn8xBqp75dk7kFupVRt,批次 20 补席,替换前提证伪关卡的 #4017):branchclaude/issue-4974-anchor-cumulative-report。按卡面建议实施:两处生成器锚规则(app-generator.test.ts / templates.test.ts)从「逐名 expect 首败即抛」改累积断言(一轮报全部漂移),前置断言与漂移断言分开;#4098/#4968 两次事故的「一轮修一个」形状即验收反例。Generated by Claude Code
test(cli,create-plugin): 两处生成器锚规则改累积报全部漂移,前置与漂移分开 (objectstack-ai#4974)…
test(cli,create-plugin): 两处生成器锚规则改累积报全部漂移,前置与漂移分开 (objectstack-ai#4974)…