Repository navigation
test(reports): verify authored content in native lifecycle readback - #7455
Conversation
Signed-off-by: BigDataDZ <76271875+BigDataDZ@users.noreply.github.com>
loopx-agent
left a comment
There was a problem hiding this comment.
Reviewer: model_agent; gpt-6.1-sol; OpenAI; runtime_reported; reasoning_effort=max
动机 / Motivation
维护报告生成与重放回归的贡献者。 旧测试要求已移除的重复页眉摘要,实际正文存在时仍会报失败;部分测试读写还依赖本地编码。 从实际HTML的article中验证作者的结论、风险、下一步及正文,重放和交付身份断言保留。 仅修改已有测试;不改变renderer、报告内容、调度、外部发送授权或用户界面。 当前实际报告内容仍完整,测试应验证读者能读到的作者正文,而不能把已移除的重复页眉当作产品义务。完整精确head为3854bcda12163263eb7da7580d7cc8b0a27583bc。
改动思路 / Approach
在原生命周期测试内解析可见article文本,并在实际测试IO处指定UTF-8;复用现有产品pipeline与独立HTML模块。 它继续调用真实consumer、renderer与文件写入,不复制生成逻辑,也不修改产品使旧字符串重新出现。原有重放、交付Todo、规范化文档、摘要和lineage检查保留。article以外的copy数据、脚本与页面页眉不再能冒充作者正文;这里只解析当前既有article结构,不宣称另建了通用浏览器可见性引擎。
具体改动 / Changes
规格docs/reference/protocols/periodic-report-v0.md,spec_revision=59c8bbf791bca9d3d1dd996629a1610c0679b23e:固定文本。AUTHORED-CONTENT implemented:六项作者标题/正文均从实际article读回;REPLAY-AUTHORITY implemented:原精确重放、delivery Todo、摘要和无外部写断言保留;UTF8-READBACK implemented:两个editorial request读取和两次实际CLI捕获明确指定UTF-8。当前本地完整验证与作者原Windows证据分别归属,不互相冒充。
关键代码讲解
- ArticleText与生命周期断言 将实际保存的HTML限定到article数据,要求结论、风险、下一步的标题与实质段落共六项;不是从当前输出生成期望值。
- 同文件两个editorial request读取及最终real CLI readback固定UTF-8,保留原生产stdout与文件契约。没有全局更改locale,也没有去掉Unicode输入或重复调用。
- 最强负对照仅在进程内将真实renderer输出的article overview段落移除,同时保留隐藏源数据并重新计算合法artifact内容摘要;既有新断言仍明确失败于
assert authored in visible,说明它保护了可读正文而非只匹配嵌入JSON。产品源码字节未变。
对主干的风险 / Risks
当前精确提交两个完整模块94通过,零skip;移除实际article中一段作者正文的进程内变异导致原新断言失败。五项premerge直接检查、Ruff、公开边界和CQR通过。 首次本地命令写错HTML测试目录,未运行测试并保留为失败;纠正为实际presentation模块后94项通过,没有覆盖早先记录。变异的1项失败是预期反例,不算产品绿测。未查询、轮询或等待GitHub CI。局部parser依赖当前renderer的article边界,完整presentation模块提供邻接保障;正式页面渲染与移动端仍由发布浏览器资格承担。本次diff没有改变任何渲染输出,因此视觉检查not_applicable,未验证视觉范围none:没有视觉变化。作者近期八项提案已比较,本次与时区依赖、注册编码、调度夹具分别属于不同边界;没有重复smoke或贡献限制依据。
我的整体评价 / Verdict
APPROVE,goal_achieved,限于修复既有内容与读回回归。long_horizon preserved:重放、身份与权限语义保留;user_experience preserved:实际报告及操作不变,没有模型或长期净收益主张。bounded refactor applied:IO编码留在真正读取处,正文parser留在唯一需要它的原测试中。此宿主为macOS,未重新执行原生Windows;作者Windows结果保留来源。整版App和发布渠道资格另行验证。 合并仍需即时readiness、当前CQR与维护者授权。
English verdict: APPROVE — 3854bcda12163263eb7da7580d7cc8b0a27583bc. All94 full lifecycle/presentation tests pass,and an article-only missing-paragraph mutation fails at the intended assertion. Existing replay,digests and delivery authority remain unchanged; native Windows and whole-release qualification stay separate.
The pending-report lifecycle regression still requires a generated title-only masthead summary, but current HTML intentionally omits that duplicate when authored highlights are present. It therefore reports a failure even though the actual conclusion, risk and next-action content is rendered. Native Windows also fails four adjacent lifecycle cases because their test-side file/subprocess reads decode UTF-8 report data with the locale.
Verify authored titles and substantive paragraphs in report articles, excluding script/style content, instead of requiring redundant summary copy. Keep exact-replay, delivery Todo, normalized document, digests and lineage assertions. Make the two editorial-request reads and real CLI capture explicitly UTF-8. No renderer, UI or product lifecycle behavior changes.
Fixes #7437.
Validation at signed head
3854bcda1, based on main218aa087b:PYTHONUTF8=0.git diff --checkpass. Only the existing test module changes; private probes and logs are excluded.Author declaration: authored with OpenAI Codex under contributor direction. This restores durable end-to-end report-content and native readback coverage under the existing report owners. Frontend/Lark/CLI entrypoints and first-screen rendering are unchanged. The bounded future-facing pass keeps encoding explicit at the actual test IO boundaries and avoids a new parser module or fixture framework. No model/benchmark job, external delivery, active Goal mutation, system upgrade or self-merge. Independent review and current-head CI remain pending; maintainer merge required.