test(update-notes): stop pinning the pre-transfer repository address - #4809
Conversation
The generator publishes pull links built from PULL_URL, which now names the canonical repository. The quality smoke still compared against a hand-copied pre-transfer address, so the deterministic draft check failed on every branch that ran it: both full-public-smokes and the biweekly update-note draft job are red on main with this same assertion. Assert the canonical address once, against PULL_URL itself, and build the expected bullet from that same value. The check keeps its teeth against a wrong address while a future repository move can no longer break it by copying the old one into an expectation. Refs loopx-project#4753 Signed-off-by: hahahahahayesyeseys <95999512+hahahahahayesyeseys@users.noreply.github.com>
|
Full |
huangruiteng
left a comment
There was a problem hiding this comment.
精确 head review:#4809 test(update-notes): stop pinning the pre-transfer repository address
- 审阅对象:
db08c4ee15199cd9e78b890d49688731740ca857(basemain9da19e673,作者 @hahahahahayesyseseys) - 变更面:
examples/update-notes-generator-quality-smoke.py(+5/-1) - 结论:无阻断发现,APPROVE
动机
更新说明生成器用自身的 PULL_URL 拼 pull 链接,指向迁移后的规范仓库 loopx-project/loopx;而质量 smoke 却把手抄的迁移前地址 huangruiteng/loopx 当作期望值。结果是生成器因为「做对了」而挂掉自己的检查。这不是假想问题:我在未改动的 main 9da19e673 上跑了同一脚本,直接在 validate_compact_ranking 断言失败,实际值正是规范地址;作者引用的公共 CI 运行(full-public-smokes (4, 440),run 35494985839)日志里也是同一条断言、同一串实际值。公共 lane 红着,后续每个 PR 都要替它做一次诊断。
改动思路
把「规范地址」收敛成 smoke 里唯一的一处字面量,并让它对着生成器自己的常量断言;其余期望一律从 module.PULL_URL 组合,这样将来再搬家只会挂一条断言,而不是让两份地址各自漂移。同时把首条 bullet 的期望从 startswith(手抄地址) 换成用同一个常量拼出的完整行(顺带把本来没断言的标题也覆盖上)。
具体改动
- 新增
assert module.PULL_URL == "https://github.com/loopx-project/loopx/pull",并加注释说明这是全文件唯一允许出现地址字面量的地方。 - 把
assert bullets[0].startswith("- [#38](https://github.com/huangruiteng/loopx/pull/38)")换成assert bullets[0] == f"- [#38]({module.PULL_URL}/38) feat: add issue-fix lifecycle"。 - 改完后
rg huangruiteng在该 smoke 与生成器里都不再有匹配。
对主干的风险
- 只动 smoke 期望:生成器输出、发布格式、发布流程、任何默认行为都没碰;仓库边界干净。
- 严格度提高:首条 bullet 由
startswith变成全等,意味着未来若有意扩展 bullet 格式,需要同步更新该期望。考虑这是「格式 smoke」,这正是它该有的强度,且失败时会打印全部 bullet 便于定位。 - 验证:base 上复现红、head 上
update notes generator quality smoke: ok(exit 0),并核对了远端失败 job 的日志确实同源。我没有跑整个 public smoke 舰队,也没跑双周 note 工作流,这是本次评审的诚实边界。
我的整体评价
正向、比例合适、且是修一条正在红的公共 lane:它移除的正是导致漂移的重复字面量,而不是把生成器改回错误地址或删掉断言。一个小提醒(非阻断):这是该期望的首次修复,不是重复犯错的补丁;未来搬仓库时请只改这一处常量。
English verdict: APPROVE - the smoke expectation no longer pins the pre-transfer address; reproduced red on unmodified main 9da19e6 (AssertionError with the canonical bullet as actual), green at the exact head db08c4e, corroborated by the failing CI job log, with the remaining risk being the intentional tightening from startswith to a composed equality.
Goal And Delivered Outcome
loopx-project/loopx. This is the half of that residue which is a test expectation rather than a shipped default, and it is currently red: the update-note generator builds pull links from its ownPULL_URL, which correctly names the canonical repository, while the quality smoke compared the rendered bullet against a hand-copied pre-transfer address. The generator is therefore failing its own check by being right.examples/update-notes-generator-quality-smoke.pyaborts invalidate_compact_rankingwith an assertion whose actual value is the canonical-address bullet; the same assertion is what fails today onmainin two lanes - full-public-smokes shard 4 and the biweekly draft-update-note-pr job. After, the smoke reportsok(regression_parityrow).main.Scope And Continuation
PULL_URL; every other expectation composes from that same value, so a future move cannot break this check by leaving a stale copy inside an expected string.mainfor a missing release-timeline version entry; that is release record content and belongs to its owner, so it is disclosed rather than edited here.Validation
regression_parityvalidate_compact_rankingwith the canonical-address bullet as the actual value, matching the two CI lanes above; the same command reportsokat headreal_entrypointintegrationstaticruff checkclean on the changed file;loopx check --scan-pathon it reports a clean public/private boundaryunitmain, disclosed above and intentionally out of scope.Frontend / Visual Evidence
Type of Change
LoopX Area
Technical Direction
Shared-authority RFC fixture impact
Boundary Checklist
.loopx/,.codex/goals/, and liveACTIVE_GOAL_STATE.md).none.Signed-off-bytrailer (git commit -s).