📚 docs(governance): 强化 Issue/PR 元数据编码与证据规范 - #150
Merged
Merged
Conversation
Owner
Author
实现完成(2026-09-09)当前结论治理提交 变更与设计取舍
验证与证据
兼容性与下一步
|
Owner
Author
验证完成(2026-09-09)当前结论本地完整 unit suite 和本次修改文件的 Ruff 检查均通过;PR #148 与 Issue #149 的远端正文经 API 拉取后分别通过 变更与设计取舍
验证与证据
兼容性与下一步
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联 Issue
Closes #149
本 PR 建立 Issue、PR 和提交元数据的可执行规范,修复历史正文不可审计的问题。
背景(Situation)
历史 PR/Issue 出现章节缺失、字面量转义、控制字符和连续问号,导致 GitHub 展示不可读,验证结果与实验边界难以追溯。旧 metadata job 只检查少量标题和章节信号,空章节或模板内容仍可能进入审查。
任务(Task)
统一 Gitmoji + Conventional Commits 标题、PR 七段正文、Issue bug/feature 正文和阶段性回帖粒度;提供 UTF-8、章节顺序、非空内容和关联 Issue 的自动校验,不改变运行时 API。
行动(Action)
验证(Verification)
环境:Windows;Python 3.10.1;pytest 9.0.3;Ruff。
实验与证据(Evidence)
校验输入覆盖合法 UTF-8、替代字符、连续问号、字面量转义、控制字符和模板内容。章节解析按 Markdown heading 定位并截取到下一个 heading,HTML 注释不会伪造正文;空章节、乱序章节和缺少 Closes/Refs 会明确失败。Issue 表单与手工 Markdown 的章节形式均有回归。
兼容性、风险与回滚
校验器是开发门禁,不改变运行时公共 API;严格门禁可能拒绝历史简短正文,应编辑正文修复而非绕过。Issue event workflow 只提供校验入口。恢复提交 ea00722 可撤销本主题;后续清理历史开放 PR 正文并在合并前核验 required checks。