fix(version): 按完整提交区分同号历史开发说明
build / build (push) Successful in 1m4s

历史分支中存在两条开发号 0.1.1;归档选择按 SHA 匹配,保留原编号与冲突标签。
增加同号前置说明遮蔽及错 SHA 不复用回归,标签计划使用相同精确选择方式。
已运行:定向 Go 测试、快照工具临时仓正反例及整仓 make verify;未部署。
This commit is contained in:
姚章浩
2026-10-18 18:18:43 +08:00
parent 013ce4a24e
commit 74ba737b1e
5 changed files with 38 additions and 10 deletions
@@ -55,6 +55,14 @@ func TestHistoricDevelopmentArchiveBindsExactCommit(t *testing.T) {
t.Fatal("archived notes missing")
}
}
// Parallel branch histories may legitimately have the same derived number.
input.DeliveryArchive = strings.ReplaceAll(archive, shaB, strings.Repeat("c", 40)) + "\n" + archive
result = DeriveVersions(input)
for _, v := range result.Records {
if v.CommitSHA == shaB && !strings.Contains(v.ReleaseNotes, "historic delivery notes") {
t.Fatal("same-number archive hid notes for exact commit")
}
}
input.DeliveryArchive = strings.ReplaceAll(archive, shaB, strings.Repeat("c", 40))
result = DeriveVersions(input)
for _, v := range result.Records {