fix(site): align LHTB publication contract - #4712
Conversation
Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
huangruiteng
left a comment
There was a problem hiding this comment.
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
Reviewed exact head: 2ac8a4224e285e0b9ef73148d4722f387cf0730a
No blocking findings.
动机
本 PR 修复 #4709 合入后已复现的发布范围红测,并落实经首屏预览确认的文案层级:核心标题只突出 LoopX 相对 Plain 与原生 Goal 的均分优势,完整通过数 7/7/4 继续保留在正文。基线 main 的 focused pytest 为 1 failed, 3 passed;本 head 为 4 passed,两个请求均完整交付。
改动思路
改动直接落在现有两个 owner,没有新增抽象或第二份数据源。data.json 与 armLabels / armKinds 继续表达五臂实验全集;mechanismRows 明确表达 plain、native_goal、new_heartbeat 三个主比较臂。lhtb-copy.json 继续同时承载标题和正文,标题负责主结论,正文保留均分、7/7/4 与完整验收边界。
正向路径是:选择中英文 locale → 读取 lhtb-copy.json → 渲染新标题和原正文 → focused pytest、Vite build、share-bundle 与浏览器矩阵验证。负向路径是:任一 locale 的标题、正文证据、五臂全集或三臂主叙事漂移时,focused pytest 直接失败。
具体改动
apps/presentation/site/src/lhtb-copy.json:英文标题改为 “Higher mean reward than Plain and native Goal.”,中文标题改为“均分高于 Plain 和原生 Goal。”;正文的 7/7/4 与验收边界原样保留。benchmark/tests/test_publication_scope.py:把原先过载的arms拆成all_arms与main_comparison_arms,分别校验五臂数据/标签和三臂主叙事;新增中英文标题精确断言与正文 7/7/4 证据断言。
关键代码讲解
en.resultTitle/zh.resultTitle与相邻resultBody:只调整信息层级,不改变任何实验数值;真实中英文首屏已在提交前由维护者确认。test_lhtb_published_data_and_bilingual_copy_share_scope:用两个显式闭集表达两个不同合同,避免再次用五臂数据范围覆盖三臂主叙事;同时保证标题精简不会删除正文证据。
对主干的风险
风险较低且局限于 LHTB 公共页面和 focused test。没有修改 benchmark 数据、评分、task semantics、runner、权限、持久化或控制面行为。最强回归场景是未来编辑把历史臂重新误当主叙事,或精简标题时删掉正文证据;新增断言会直接拦截。
验证:
- baseline focused pytest:
1 failed, 3 passed(成功复现已知问题) - exact-head focused pytest:
4 passed - Ruff、
git diff --check、DCO:通过 - public-site TypeScript/Vite build、design baseline:通过
- bilingual Blog index smoke:通过,3 组中英文章
- frontstage share-bundle smoke:通过
- desktop/mobile browser navigation matrix:通过
- public/private boundary scan:通过
- premerge canary:6/6 selected checks 通过;仅保留 benchmark-sensitive 的人工维护者复核标记。本 PR 不改 benchmark 执行或评分,且用户已明确授权本次自合并。
远端 CI 在审查时仍运行中;按维护者明确指示,本次不等待它结束,未将其表述为已通过。
语义与 CI 对齐
该 head 复用当前五臂实验 vocabulary,同时明确三臂展示子集,没有创建新协议或改变既有评分语义。基线失败与修复后通过构成直接的前后对照;标题和正文的中英文语义也由真实页面截图验证。
我的整体评价
这是一个单目的、可回滚的小型公共文案/测试修复,直接修复主干红测并改善首屏信息层级。代码体量与问题成比例,测试覆盖了正向结果与关键负向漂移,未发现阻断项。未来相关 refactor 无需在本 PR 扩张;当前 owner 与显式集合已经足够清晰。
English verdict: APPROVE - Exact head 2ac8a4224e285e0b9ef73148d4722f387cf0730a fixes the main regression by separating five-arm source coverage from the three-arm primary narrative, preserves the 7/7/4 evidence below the approved bilingual headings, and passes focused, build, bundle, browser, boundary, and 6/6 selected canary validation; remote CI was explicitly not awaited.
Summary
Validation
origin/main:1 failed, 3 passedinbenchmark/tests/test_publication_scope.py4 passed3 paired articles)Scope and risk
This changes only public LHTB copy and its focused publication-scope test. It does not change benchmark data, scoring, task semantics, runners, permissions, or control-plane behavior. The first-screen English and Chinese previews were reviewed and approved before commit.