fix: 闸评论三缺口打包修——P3 桶/保尾截断/成功落盘(#31/#32/#33) - #44
Merged
Merged
Conversation
R1 (1×P1+4×P2+3×P3): 报告落盘提前至审查成功后(重试/gave_up/评论禁用路径均留原文); 评论缓存改保尾截断(重试评论尾部 VERDICT/marker 存活);轮转只认报告命名白名单 (tmp/无关文件不误删、不占名额);写失败 best-effort 清理 tmp;旧 state 三长 counts 兼容钉测;reports_dir 三来源配置测试;注释/README 同步。 R2 (2×P2+3×P3): 落盘写块扩捕 Exception(孤立代理字符 UnicodeEncodeError 不炸成功 审查);GATE_STATE_FILE 派生不再碾掉配置显式 reports_dir(GATE_REPORTS_DIR > 显式 配置 > 派生);白名单 \Z 收紧;轮转测试混入真实生成文件防格式漂移;截断前剥旧 _TRUNC_MARK 防重试评论双截断标记。 精简 pass: derive_reports_dir 派生合一 / sev 内联+死守卫删除 / group(4) or 0 惯用法×4 / repo_tag 内联 / _seed_reports 测试 helper。 471 passed + 28 subtests; ruff 0 告警。
Owner
Author
双审 + 精简轮记录(548df1a)按质量线「无 P0/P1/P2」跑完 code-reviewer 两轮 + simplifier 一轮: R1(1×P1 + 4×P2 + 3×P3)→ 全修
R2(2×P2 + 3×P3)→ 全修
simplifier(-15 行): derive_reports_dir 派生合一、sev 内联+死守卫删除、 验证:471 passed + 28 subtests(基线 463 + 新增 8);ruff 0 告警;R2 审查员复核确认九项 R1 修复无回归,截断不变量/防伪不变量/向后兼容三项亮点保持。 |
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.
Closes #31
Closes #32
Closes #33
裁定号:#3697
变更摘要
[review-gate] ZCode 闸严重度桶缺 P3:marker schema 写死 P0/P1/P2,P3 finding 被表头静默丢弃 #31 严重度桶缺 P3:
_RE_ZOB_VERDICT增加可选 P3 组,历史旧格式(无 P3)向后兼容正常解析;_RE_P3兜底正则,prose 解析支持四桶,缺失 P3 时缺省计 0;_RE_ZOB_MARK_LINE同步可选化并对齐一致性校验。[review-gate] 评论体超 max_body 截断掐尾:zob-verdict 审计锚点随尾丢失,下游无法再对账 #32 截断掐尾丢锚点 → 掐中段保首尾:
build_comment_body分配头部与尾部预算(TRUNC_TAIL_BUDGET = 1024,覆盖 VERDICT 结论行与 zob-verdict marker);[review-gate] 成功审查不落盘原始报告:state.json report=None,轮转后原始 verdict 只剩评论一份 #33 成功审查不落盘 → 落盘+轮转:
~/.local/state/zcode-review-gate/reports/<owner>__<repo>#<pr>-<sha12>.md;report_path并将report字段置 None(防 state 文件膨胀);report_path字段平滑读写)。验证结论
pytest tests/ -q463 passed, 28 subtests passed(F6 基线 447 + 本卡新增 16);ruff check6 路径 0 告警;~/materials/zob-31-33/completion.md。