Repository navigation
fix(review): align publication checks with author conclusion readback - #7188
Conversation
Signed-off-by: LoopX Agent <337587101+loopx-agent@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 · max
Approval conclusion (author-owned PR; GitHub blocks formal self-approval)
动机
维护者或作者在提交完整评审、准备合并时会遇到这项检查。
此前,作者评审缺少准确结论标题也能通过提交前检查,直到合并时才被拒绝;现在同一份正文在发布前就得到一致的反馈,可以改正标题后继续原评审。
相同输入已通过真实结果检查命令、发布结论读取和合并检查验证;正确作者结论和独立正式评审仍可使用。
本次范围是既有评审规则及其声明的一致性;检查通过不证明分析语义正确、页面美观、评审独立性或合并授权。
评审基线是 0d55a3d8a22f3dece6a135aa817ed5ec04a26a0a 的 loopx/capabilities/pr_review_queue/README.md,逐项核对 author-owned conclusions 与 decision_text_assessment 两个既有要求。本次完整审查 d9db6d8348c069f0fbc48ac03c71adbe2d46d7db 的七个文件,没有沿用早先批准。
改动思路
复用现有正文 owner 足以统一两个检查入口;保留一份精确标题规则和原正式状态判断,比增加新的评审状态或配置更直接。
本 PR 完成发布前与读回规则一致性及条件字段声明,不扩展 UI、模型语义判断、审批或合并权限。
原有 Python 正文解析器已经处理注释与代码块,两个实际调用方共用它的标题匹配;契约统一声明有意改变指令含义时所需的授权字段。实际 GitHub 身份、正式评审状态和 typed history/readiness authority 保持在原 owner,没有新增状态、provider、配置或通用框架。
| 同一输入 | 原提交前检查 | 当前提交前与读回 |
|---|---|---|
| 作者标题缺失、近似、相反或藏在注释/代码块 | 可以放过 | 拒绝;改正原正文后继续 |
| 正确作者结论或独立正式评审 | 各有合法路径 | 合法路径保持 |
| 有意改变指令含义 | 要求授权字段却未列入契约 | 原要求明确声明 |
此表概括合成输入经过真实命令和生产读取方的结果,不证明评审内容真实。
具体改动
author_owned_review_title_matches只匹配与英文 verdict 对应的可见精确标题,沿用现有注释及 fenced code 解析;标题常量随规则放入原正文模块。check_review_result对 packet 声明的作者分支检查标题;pr_review._review_conclusion复用同一规则,仍要求 COMMENTED、当前 head 和完整双语正文。独立评审的正式状态要求未放松。_check_decision_text消费DECISION_TEXT_ASSESSMENT.fields_by_verdict中原有的authorization_basis要求。equivalent 不额外要授权字段,not_applicable 仍需要范围和理由,其他证据要求没有删除。- 既有公开 CLI 测试核对契约回读,新增成对场景覆盖两类作者结论、独立评审和错/缺/隐藏标题。README 披露拒绝变化和限制,policy 从23升至24,旧保存结果按当前契约重新准备,已发布历史不被改写。
对主干的风险
最强反例是修复作者标题后误拦独立评审,或只改提交前检查却仍在读回接受隐藏示例。回归直接使用真实 result-check 命令及生产 conclusion/readiness:原生产代码上8个新反例失败、4个合法场景通过;相同 fixture 与测试在本 head 全部12个通过。五个相关套件共374例通过,包含正文、正式状态、旧/错误 head、模型身份、历史和 closeout;输入文件字节保持,无外部发布或模型调用。六个变更 Python 文件的 Ruff 通过。
标准及带 Goal 策略的 premerge 均通过,无失败或人工挂起;包含编译、现有维护性与语义规则、调用方合同及公开边界。质量凭据 cqr_62ed10ba9f974484a35e 精确读回有效。既有 mypy 配置只覆盖未变更文件,本次不运行无关 TS/PG/完整平台矩阵。按当前 wait_for_ci=false 未查询、轮询或等待远端 CI。
本地保存的 packet 不能认证远端作者或证据真伪,发布和合并前仍需新鲜 head、正式状态、讨论和权限检查。本次没有声称模型理解、视觉效果或安装采用已经成立;它们各有独立验收。回滚为一份有界提交,没有数据迁移或自动重写历史。
我的整体评价
APPROVE。该有界修复使原规则在真实调用链中一致,并减少重复知识。未来重构检查已应用到同一正文 owner;进一步迁移语言或增加配置没有当前收益,不纳入本 PR。没有发现当前精确 head 的阻断项。
已检查本 PR 全部生产差异,仅涉及评审命令与正文校验器,没有改动渲染页面、布局、控件或样式。因此视觉评审不适用;研究页实际可读性及中文语义不由这次校验通过来认证。此为作者自己完成的评审,COMMENTED 记录批准结论,不构成独立验收或新授权。合并仍须既有明确授权及该未变 head 的 closeout/readiness。
English verdict: APPROVE — head d9db6d8348c069f0fbc48ac03c71adbe2d46d7db aligns author-conclusion checks before publication and during readback, and declares the existing conditional authorization field. Paired CLI cases fail on baseline and pass on this head; 374 domain regressions, scoped Ruff and premerge pass. Evidence truth, visual quality, independent acceptance and merge authority remain separate.
Goal And Delivered Outcome
An author could pass
pr-review --check-resultwith an incomplete or wrong author-conclusion title, then have the same review rejected by merge readiness. Publication checks now use the same visible, exact title as published-review readback. Correct author approvals, author requests for changes and independent formal reviews retain their respective paths.The existing instruction-semantics check also required
authorization_basisforintentional_change_validatedwithout listing that field in its structured contract. The contract now declares the conditional field and the checker consumes that declaration. Policy revision 24 requires a fresh result under the current contract; published review history is not rewritten.Author Declaration
COMMENTEDconclusions carry the matching exact title and complete bilingual bodyfields_by_verdict; public CLI contract readback and conditional-field regressionsScope And Continuation
Complete within this scope. The existing review-body module owns the title constants and matcher for both callers, removing duplicate knowledge. Hidden comments and fenced examples cannot supply a visible conclusion. Independent formal-state, exact-head, evidence, reviewer-identity and merge-authority checks remain in their existing owners. No new module, state owner, provider or permissions.
This closes the bounded publication/readback defect. Broader research-page language and visual-quality qualification remains separate; consistent checks do not prove that an analysis is correct or a page is readable.
Validation
d9db6d8348c069f0fbc48ac03c71adbe2d46d7db, targetmain.No remote CI was fetched, polled or awaited under the current Goal's
wait_for_ci=false. The unchanged head has a published author-owned COMMENTED approval, a clear approval closeout and ready merge readback. Installed CLI validation adopted merged commit7f01e00fa8a7951fbb7fe83e877e75c66391e204: policy 24, 15 valid/invalid fixture cases, all four changed production files equal to reviewed source, and live readback of the merged review as valid without a duplicate review action. The existing installer warning about stale promotion-readiness evidence remains; full native App/platform/release qualification is not claimed. Model understanding, independent semantic judgment and visual quality are not inferred from these tests.Frontend / Visual Evidence
UI impact: none. The changed surface is the existing review CLI contract and its validators; no rendered page, controls, stylesheet or native window changed. Browser screenshots are not applicable to this slice.
Type And Boundary
Bug fix, documentation and focused regression coverage in the existing pull-request-review capability; roadmap S8/S12 engineering delivery. Shared-authority migration/promotion: not applicable.