Skip to content

fix: 建立高信号代码审查边界 - #7

Merged
HyxiaoGe merged 5 commits into
masterfrom
fix/review-convergence-v1
Aug 13, 2026
Merged

HyxiaoGe merged 5 commits into
masterfrom
fix/review-convergence-v1

Conversation

@HyxiaoGe

@HyxiaoGe HyxiaoGe commented Aug 13, 2026 •

Copy link
Copy Markdown
Owner

改动

  • 按 OpenAI 官方 Code Review 定位,把官方审查收缩为高信号 P0/P1 风险探测。
  • 阻塞项必须同时满足:当前 PR 引入、当前可达、违反明确验收标准并造成具体后果。
  • P2/P3、理论加固、更多 fixture、lint/措辞/命名和无当前影响的重构默认不报告、不阻塞、不复审。
  • 根 AGENTS.md 与项目模板均加入正反 few-shot,明确什么应报告、什么不应报告。
  • 删除原有审查轮数、最新 HEAD 认证和措辞状态机及其五个 fixture;required CI 继续作为确定性门禁。

根因

此前把 Codex 的建议当成必须清零的合并门禁,导致每次修复都会产生新 HEAD,再触发完整审查,形成 review churn。官方文档实际建议只发布高优先级风险、保持两三条简洁且项目特有的规则,并把机械检查留给 CI。

处置边界

  • P0/P1:满足当前可达影响证据时默认阻塞。
  • P2/P3:默认不阻塞;只有维护者给出可复现证据并明确升级后才进入当前 PR。
  • 非阻塞 finding 回复处置依据后解决 thread,不修改代码、不自动建 Issue、不触发新 Review。
  • 阻塞修复只有显著改变原风险面时才请求一次定向 Review;再次出现新阻塞项则拆分或收窄 PR。

验证

  • bash tests/test-audit.sh
  • shellcheck tests/test-audit.sh scripts/*.sh
  • bash -n tests/test-audit.sh scripts/*.sh
  • ruff check scripts/audit_github_baseline.py
  • ruff format --check scripts/audit_github_baseline.py
  • Python 编译检查
  • 82 个 YAML 文件解析
  • git diff --check

本变更不修改业务代码、GitHub 权限、workflow、branch protection 或部署行为。最新提交不再触发完整 Codex Review;以现有 findings 的处置记录、契约测试与 required CI 完成闭环。

背景:大型 PR 在逐提交触发官方 Review 时出现重复审查、范围扩张和 reaction 驱动的 review churn。

改动:定义稳定 HEAD、single-flight、两轮预算、文字通过停止条件和大型需求拆分边界,并同步模板、维护文档及防回退 fixture。

验证:基线 fixture、ShellCheck、Ruff、Python 编译、82 个 YAML 解析和 git diff --check 通过。

Co-Authored-By: Codex <noreply@anthropic.com>
@HyxiaoGe
HyxiaoGe marked this pull request as ready for review August 13, 2026 07:36

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1ef3b4704d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/test-audit.sh Outdated
Comment thread contracts/codex-code-review.md Outdated

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1ef3b4704d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/test-audit.sh Outdated
背景:PR #7 的 Automatic Review 与人工兜底发生竞态,且首轮 Review 指出重试语义和反例 fixture 存在边界缺口。

改动:加入至少 15 分钟等待、发送前复查、明确失败或超时仅重试一次;移除脱离上下文的禁用子串,并让三个反例各自只命中一个目标违规。

验证:基线 fixture、ShellCheck、Ruff、Python 编译、82 个 YAML 解析和 git diff --check 通过。

Co-Authored-By: Codex <noreply@anthropic.com>

Copy link
Copy Markdown
Owner Author

@codex review

最终复审说明:上一阶段因 Automatic Review 与人工兜底相差 19 秒发生竞态,旧 HEAD 1ef3b47 意外产生两份结果;三条 findings 已集中修复并由 CI 验证。本次只对稳定 HEAD c519fed 请求一次最终复审,不再追求 reaction 或重复确认。

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c519fedf20

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread AGENTS.md Outdated
Comment thread tests/test-audit.sh Outdated
背景:最终复审指出根规则仍残留同一 HEAD 绝对一次上限,且措辞黑名单无法识别等价冲突策略。

改动:统一根规则与模板的失败重试语义;以完整六条权威段落做精确一致性校验,三个反例分别只变异一个规则位置。

验证:基线 fixture、ShellCheck、Ruff、Python 编译、82 个 YAML 解析和 git diff --check 通过。

Co-Authored-By: Codex <noreply@anthropic.com>

Copy link
Copy Markdown
Owner Author

@codex review for regressions in the two addressed review comments only: same-HEAD failed-request retry consistency, and exact synchronization of the authoritative six-rule convergence section.

第三轮例外说明:上一轮两条 P2 都是当前公共契约的自洽性问题,若不修复会让新项目继承冲突规则。本次仅复核稳定 HEAD 51ff161 的这两个修复点;新的非阻塞 P2 不再自动扩展本 PR 范围。

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 51ff161750

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/test-audit.sh Outdated
HyxiaoGe and others added 2 commits August 13, 2026 16:21
背景:定向复审指出测试只比较顶层列表项,夹入冲突正文仍可能绕过权威规则同步校验。

改动:改为比较规范化后的完整章节,并加入列表间冲突段落反例。

验证:基线 fixture、ShellCheck、Bash 语法、Ruff、Python 编译、82 个 YAML 解析和 git diff --check 通过。

Co-Authored-By: Codex <noreply@anthropic.com>
背景:实际 PR 验证表明,把所有 P2 建议当成阻塞项并要求修改后复审会造成 review churn,与官方高信号 P0/P1 定位不符。

改动:以当前可达影响定义阻塞项,P2/P3 默认不报告也不阻塞;为根规则和项目模板加入正反 few-shot,删除审查轮数与措辞状态机及其 fixture。

验证:基线 fixture、ShellCheck、Bash 语法、Ruff、Python 编译、82 个 YAML 解析和 git diff --check 通过。

Co-Authored-By: Codex <noreply@anthropic.com>
@HyxiaoGe HyxiaoGe changed the title fix: 建立收敛式代码审查规则 fix: 建立高信号代码审查边界 Aug 13, 2026
@HyxiaoGe
HyxiaoGe merged commit 66e5a86 into master Aug 13, 2026
1 check passed
@HyxiaoGe
HyxiaoGe deleted the fix/review-convergence-v1 branch August 13, 2026 10:15
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