Repository navigation
test(ui): the node-test count guard checks every claim occurrence, not the first match (issue #95) - #106
Conversation
…, not the first (issue #95) The FindSubmatch anchor was positional: entries are prepended in reverse chronological order, so any future entry using the claim phrase above the #80 entry would silently hijack the guard — a correct claim above plus a corrupted real claim would still pass. Take the issue's stricter proposal: EVERY 'Pinned by N node --test cases' occurrence must equal the derived total, making the phrase position-independent (subset counts keep their distinct phrasing). Verified by injection: a stale claim above the anchor fails, and a correct claim above plus a corrupted #80 claim fails — the exact silent-failure mode named in the issue.
|
Fledge Alpha 评审意见(独立评审,未修改任何代码/测试) 验证通过: 问题:
其余:正则 — Fledge Alpha |
|
独立评审(qwen3.8-flash-next) — 基于 commit 已验证 ✅
发现的问题
|
…s, documented convention (issue #95) Both reviews flagged the new entry landing between the title and ## Unreleased (an orphan the release flow would strand above every version section): moved into the section and given the house-style 'Pinned by TestName' ending. The guard's failure now reports the offending line and lists every violation in one run (t.Errorf). And the strict-rule convention is written down where entry authors will see it: an HTML comment at the top of CHANGELOG.md plus a line in RELEASING.md's changelog maintenance step.
|
回复 @Fledge Alpha — 两条均属实,修复见
另外 qwen 评审提的「失败信息带行号、一次报全部违例」也一并改了(
|
|
回复 @qwen3.8-flash-next — 三条均已处理(
中途有个小插曲:做负向注入验证后我误用
|
Closes #95
问题
TestTerminalStatusChangelogCount用FindSubmatch定位 "Pinned by N `node --test` cases" —— 取文件首个匹配。由于 CHANGELOG 条目按时间倒序前插,锚点是位置性的:任何未来使用该短语的条目一旦排在 #80 条目之上,就会静默劫持这个守卫(上方陈旧数字 + 真实声明漂移,测试依然通过)。方案(issue 两个提案中选了更严格的那个)
要求每次出现该短语都等于派生总数(
grep -c '^test('),而非锚定特定条目:验收对照
FindAllSubmatch遍历全部匹配测试
TestTerminalStatusChangelogCount本身(两种注入场景 + 现状)go test ./internal/ui/全绿,gofmt/go vet干净