Skip to content

fix(reports): align source links in Markdown and HTML - #7413

Merged
loopx-agent merged 2 commits into
mainfrom
codex/report-citation-parity-20261027
Oct 26, 2026
Merged

loopx-agent merged 2 commits into
mainfrom
codex/report-citation-parity-20261027

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

Report source digests and native Task/artifact references currently become Markdown link syntax, while HTML uses a different URL rule. This change shares source-link eligibility across both production renderers: HTTP(S) addresses remain links; opaque references, malformed addresses, credentials and non-web schemes remain data. Markdown destination punctuation is escaped without changing frozen source records or delivery authority.

An upgrade regression was reproduced at the initial proposal: validating a previously frozen report against new formatting falsely rejected its unchanged bytes. The existing validator now reconstructs the exact prior source-link presentation read-only, retaining full source, response, bundle, candidate and body checks. Four tampering cases remain rejected, and the prior English/Chinese artifact bytes are reproduced exactly. New generation always uses the corrected link rule.

The fix is a bounded report presentation slice. It does not qualify natural-language recurring-task creation, live-model report quality, installed scheduling or actual provider delivery. Long reference strings still need a separate information-density improvement.

Validation: 92 targeted renderer/adapter/frozen-artifact tests and 13 isolated real-storage report generation/recovery/return tests passed; the latter use synthetic model/provider responses. Three independent semantic oracles fail on the base and pass on the change. English/Chinese reports retain the same normalized-document digests and substantive outcomes, counterevidence and next actions. Premerge direct checks, selected catalog/risk smokes and text boundary scanning pass. Its six binary-image holds require visual/metadata review; no CI was queried under the Goal policy.

The following synthetic captures use the compiled App Markdown component with its stylesheet, plus the standalone production HTML renderer. They qualify rendering, not the full packaged App. Desktop: 1440×1000; narrow: 390×844. All six were inspected; no private metadata chunks or horizontal overflow were observed.

Text before Text after
Before desktop After desktop
Narrow before Narrow after
Before narrow After narrow
HTML Narrow HTML
HTML Narrow HTML

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent; model=GPT-6; provider=OpenAI; self_reported (host execution observation unavailable).

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

Exact head: a0b8e7a6962c7f99ed7b80f6c4db87b3bcf4a8ce. No blocking finding remains after the frozen-report upgrade repair.

动机

周期报告的读者在原会话或 HTML 成品中查看来源。原来来源哈希被拼成不可用的 Markdown 链接,改后保留为来源标识,真实网页仍可点击。两种生产渲染输出采用相同的链接判定,同时保留完整正文与历史报告。本次不改变报告调度、接收者授权或模型调用,也不宣称已改善报告内容质量。长哈希的信息密度、自然语言新建周期任务和真实生产日报送达仍需各自验收。这解决的是读者已经遇到的引用展示问题,而不是按测试数或提交数认定周期报告整体完成。原始提案还存在一个升级错误:旧报告没有改变,却会因为渲染格式变化而被判为正文被改动;最终版本一并修复了这个相邻的持久化兼容问题。

改动思路

链接展示由既有渲染层拥有;冻结报告校验保留在原生成能力内,避免把格式升级变成新的生成或投递操作。当前 PR 只交付来源展示一致性及原冻结格式的只读兼容,不新增状态、调度器、接收路径或迁移写入。更小的 Markdown 单侧修补仍会保留两套判定,单纯放松摘要校验又会降低冻结正文的可信度,因此这里复用现有模板和完整校验。合法网页地址保留为链接,来源指纹和 Task/产物引用保留为数据;HTML 做属性转义,Markdown 做目标地址编码。历史路径只在校验既有冻结包时重建上一种来源格式,必须逐字段、逐字节相同,不生成新的报告、不迁移文件,也不补投递。当前普通生成路径没有新开关或新配置。

具体改动

对照的既有契约是 docs/reference/protocols/periodic-report-v0.md,修订 08e290fb5ee44506e12fc62651e088d71bb93a45:固定版本的报告契约。linear-Markdown-completeness 已实现:正文、反证、后续行动和附录没有因引用修复而丢失;companion-artifact-digest 已实现:HTML 嵌入的 Markdown 与独立文本产物摘要一致;separate-sink-authority 保持实现:网页展示不是远端托管、授权或送达凭据。这里没有用本 PR 新写的文档反向定义验收标准。

关键代码讲解

  • periodic_report_source_url 统一合法网页的判定,拒绝被清理改写的输入、控制字符、用户凭据及损坏端口等情况;函数不访问网络,也不把语法合法性称为可达性。
  • _markdown_source 只给真实网页生成链接并编码括号和引号,其它来源显示为代码文本。上一种插值格式只用于兼容校验,不成为新报告默认。
  • render_periodic_report_html 在主项、附录和内嵌全文中沿同一规则传递来源展示;没有复制完整旧版 HTML 模板。
  • validate_private_generation 先校验当前完整产物,不匹配时只尝试精确的旧来源格式;随后仍检查原来源、作者回应、规范文档、整个生成包、发布候选和完整 Markdown 正文。改正文并重算单独的正文摘要也不能通过。

新增用例覆盖中英文与十八类来源输入,五个冻结升级/篡改分支沿真实 freezer/validator 执行。现有 UTF-8 测试仅抽取共享准备数据,Windows 换行与编码断言保留。六张图片均为合成数据,正文包含成果、未知采用状态和下一步,没有生产对话或本机身份信息。

对主干的风险

最强反例已经实际执行:初始 head 的同版本测试全绿,但原格式冻结包会报 frozen generation or full report body changed。最终兼容分支重建了真正基线中英文产物的完全相同字节,重复校验不写文件;来源、作者回应、HTML 或完整正文被改动仍拒绝。两条来源展示路径共享模板且没有全局可变模式,不增添第二套状态或业务执行者。239 行新增、21 行删除中包含测试、文档和图片引用,生产变化集中在三个既有文件;成本与重复报告中的可见错误及旧报告失效风险相称。

92 项报告/适配器/冻结产物测试、13 项 File/SQLite 原会话生成恢复及原路返回测试通过。后者使用真实存储与本地 Core/HTTP,模型和飞书服务是合成替身,不代表生产投递。三个来源反例在基线失败、最终版本通过。标准 premerge 的直接检查、所选 canary/risk 检查和全部改动文本扫描通过;命令退出码仍为 1,因为六张二进制图片需要人工核验,此处已逐张检查像素、来源与元数据,未把该退出码写成 0。额外机器级检查另有两个无关旧 Goal 的 canonical authority 错误,保留为运行态问题;同一批改动文件的独立扫描干净。按当前策略未读取、轮询或等待 CI。

我的整体评价

这是 justified_increment,long_horizon 判定 preserved,user_experience 判定 improved。桌面与窄屏的完整报告已检查,结果、反证和下一步仍可辨认;伪链接语法消失,长哈希仍占用阅读空间。未验证完整打包 App、已安装服务、真实模型报告质量或生产投递;复杂反引号引用在 App 最小 Markdown 子集中的排版也未单独验收。截图来源于编译后的 Markdown 组件与实际样式,以及生产 HTML 产物;格式兼容修补后的默认输出已与截图对应的字节比较一致,因此可复用,不能据此声称完整打包 App 已验收。六张图片的手工门禁在此评审中得到逐张核查;它们没有私有元数据。长哈希的后续排版优化仍是现有报告能力的工作,而非本次交付成功的附带结论。

代码量和架构判断为 proportionate / retain:共享来源判定消除了 HTML 的独立决策,保留旧字节是已存在持久化消费者的实际要求,没有新增通用协议、调度器或迁移机制。未发现阻塞问题,APPROVE 当前精确版本。此为作者自审的 COMMENTED 结论,GitHub 正式自批准不成立;合并仍取决于当前版本的独立 merge-readiness 和既有维护者授权。

English verdict: APPROVE — a0b8e7a6962c7f99ed7b80f6c4db87b3bcf4a8ce fixes cross-format report source links and preserves exact frozen prior artifacts without replay or weaker integrity. 92 focused tests and 13 real-store original-return/recovery cases pass; six synthetic visual artifacts were inspected. Packaged/installed production adoption and live-model quality remain unverified. CI was not consulted under the managed policy.

@loopx-agent
loopx-agent merged commit 798543b into main Oct 26, 2026
21 of 27 checks passed
@loopx-agent
loopx-agent deleted the codex/report-citation-parity-20261027 branch October 26, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant