Skip to content

feat(pr-review): configure CI waiting per machine or goal - #4452

Merged
huangruiteng merged 2 commits into
mainfrom
codex/pr-review-local-evidence
Sep 15, 2026
Merged

huangruiteng merged 2 commits into
mainfrom
codex/pr-review-local-evidence

Conversation

@huangruiteng

@huangruiteng huangruiteng commented Sep 15, 2026 •

Copy link
Copy Markdown
Collaborator

Behavior

Add pull_request_review.wait_for_ci to the existing capability configuration. The default remains true. An explicit false stops CI fetching, waiting instructions and CI readiness blockers while retaining required local validation, current-head approval, thread completeness and merge authority checks.

Machine and Goal editors share the same typed boolean. pr-review --goal-id GOAL uses the Goal's complete override, otherwise machine defaults. Save with configure-goal --goal-id GOAL --no-pr-review-wait-for-ci --execute; clear with --clear-pr-review-configuration --execute. No GitHub workflow or ruleset changes.

Includes CLI resolution, Goal save/readback/clear, the existing Dashboard editor with English/Chinese labels, packaged chat assets and refreshed vocabulary inventory. The owner requested this configurable policy and authorized self-merge. Only the requested Goal is configured off; the machine default remains on.

Validation

  • 178 review, configuration, API and queue tests passed.
  • Production PR-review CLI smoke, explicit Goal on/off isolation and typed negative cases passed.
  • Dashboard build/typecheck and capability configuration projection smoke passed.
  • Semantic vocabulary, Ruff, compile, docs governance and public-boundary/diff checks passed.
  • Final exact-scope quality receipt and risk-based local premerge are recorded in the final review.

An extra legacy frontend text-contract probe fails on the unchanged manager-question routing assertion on both base and head. It is outside the configuration validation set; no claim that this optional probe passed.

@huangruiteng huangruiteng 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.

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

详细中文评审

Exact head: 8699dd249da9e4e968823301a55dfb745184076a。Reviewed base: 6fccb5362d23807cf1910658d10fa5a29e177188。Review policy revision: 3。

动机

本地代码评审与必需验证已经完成时,旧实现仍因远端 CI 排队、缺失或失败阻塞批准/合并就绪,并要求 agent 继续查询或等待。维护者明确要求修复这一默认行为。单改技能文字无法消除机器阻塞;只删阻塞分支也会留下查询和等待指令,因此需要同时修改现有 capability、GitHub 读取和 host guidance。

改动思路

保持 pull-request-review 作为唯一评审契约 owner。repository_required_checks 明确指确切提交的仓库本地验证;GitHub CI 不再作为证据缺口或就绪依据。保留已有本地结果检查、提交绑定、有效评审、评论完整性和冲突检查。BLOCKED 是 GitHub 汇总保护状态,输出 admin_bypass_required 表示需要另行授权,grants_merge_authority 始终为 false。

旧输入中的检查摘要继续兼容读取,但不参与风险或就绪决策。没有新增 capability/provider、设置、状态存储、GitHub workflow 或 ruleset 变更;这不是 opt-in 功能,普通评审流程的默认变化已在契约、双语能力文档和技能中披露。

具体改动

13 个文件、128 行新增/71 行删除,覆盖既有 Python capability/GitHub/CLI、两处稳定验证、能力 README、review/merge 技能和 self-repair 模式。

  • github_source.DETAIL_FIELDS 和 fetch_github_pull_request 删除 statusCheckRollup,实际 GitHub 请求不读取 CI。
  • materialize_review_execution 的 evidence commands 保留 diff、内容、提交及 head readback,删除 CI 字段。
  • build_merge_readiness 删除四类 status-check 阻塞条件,保留陈旧 head/评审、未解决或读取不完整的 threads、冲突和未知 merge state;BLOCKED 只投影管理员合并要求。
  • _metadata_risk_hint、_main_regression_analysis 与 _risk_notes 删除 CI 驱动的风险/等待分支,同时删除不再使用的 helper 参数。这是本次未来维护性整理,未增加新抽象。
  • review_contract 的 validation matrix 明确本地验证来源,必需本地失败/跳过仍然阻塞;CLI help 和 host skill 同步,避免文案再次引导 agent 等待 CI。

正常路径:同一完整批准、评论已解决的合成 PR,在 CI 排队时,旧生产 CLI 返回 ready=false(pending/incomplete),新生产 CLI 返回 ready=true。反例:评审正文绑定旧提交,或评论未解决时,仍拒绝就绪。缺失、排队、失败 CI 的变形输入不改变风险/就绪结论。

对主干的风险

有意改变的边界是:远端 CI 失败不会再阻塞此 capability 的决定;本地必需验证仍需真实完成,GitHub 自身保护规则和管理员权限不由此代码授予。没有运行中 Goal、quota、scheduler、authority store、前端或 Lark 配置变化;因没有新增交互或配置,前端无需伴随修改。

验证:114 项确定性 pytest 通过;生产 pr-review-command-smoke.py 通过;同一 fixture 在 immutable base/head 的真实 CLI 返回值已比较,除时间戳外完整输出保留;Ruff、Python compile、docs-governance、diff/public-boundary 通过。风险 premerge 的 18 项选中检查和 3 项直接检查全部通过,无失败、跳过的必需检查或 manual hold。8 项低频 live-model qualification 未启用,不属于本次确定性修复的必需验证,未声称模型行为实验通过。

精确范围质量回执 cqr_369193e8164ed5f7e3ac 已验证有效;fingerprint 369193e8164ed5f7e3aca0a5b3dc9503cfab48454e96065d95f752fc4378ed0f,13 files,safe-fix allowed/applied、1 pass,0 blocker/warning/advisory。复用现有 owner 与测试夹具,没有引入第二套状态规则;本地结果检查器也已通过。

我的整体评价

APPROVE。这个修复直接消除已证实的等待原因,同时保持本地证据、当前提交评审和权限边界;范围完整且可用单个提交回滚。维护者已明确授权此行为修复及自合并,本次也不查询或等待 CI。

English verdict: APPROVE at exact head 8699dd249da9e4e968823301a55dfb745184076a. The capability no longer requests or waits for CI; local required evidence, current-head approval and thread/conflict gates remain. 114 deterministic tests, the production CLI smoke, same-fixture baseline/head comparison, all 18 premerge checks and 3 direct checks passed with a valid exact-scope quality receipt. No remaining blocker; admin bypass still requires explicit owner authority.

Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
@huangruiteng
huangruiteng force-pushed the codex/pr-review-local-evidence branch from 8699dd2 to 0eb12c4 Compare September 15, 2026 12:58
@huangruiteng huangruiteng changed the title fix(pr-review): use local validation without consulting CI feat(pr-review): configure CI waiting per machine or goal Sep 15, 2026

@huangruiteng huangruiteng 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.

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

详细中文评审

APPROVE。此评审覆盖配置化后的完整最终实现,取代先前提交的无条件关闭方案。

Exact head: 0eb12c4fdba5b9c66612d8b59e49ca35d613aace。Reviewed base: 19a69abd6c5cb96988d884f2956a0dca54e2969e。Review policy revision: 3。

动机

原有评审 capability 无法按 Goal 控制是否等待 CI,已经完成的本地评审仍可能因远端排队被反复延迟。维护者进一步明确要求:把等待行为做成配置,只对指定 Goal 关闭。因此最终实现保留默认 CI 行为,提供一个显式布尔开关,避免对其他 Goal 改变默认值。

改动思路

复用现有 pull_request_review machine namespace、原子 Goal override、configure-goal 事务和 Dashboard capability editor。新 wait_for_ci 默认 true;pr-review --goal-id GOAL 读取完整目标覆盖,未覆盖时采用机器默认。完整 Goal namespace 包括 review priority;局部修改保留已有目标值,新覆盖使用 capability 默认,清除后恢复机器默认。

关闭时,一个解析后的布尔值同时控制 GitHub 请求、评审指令和 merge-readiness。必需本地验证、当前提交评审、评论完整性、冲突检查及外部写入授权都保留。没有新增 provider、服务、后台任务,亦未修改 GitHub workflow 或 ruleset。

具体改动

完整范围为 33 个文件,分为配置 owner/事务、评审执行、UI/打包、验证及文档:

  • machine_defaults 为已有 schema 增加可选布尔值,缺失时为 true;字符串、整数及 null 不能被当作关闭。
  • goal_configuration.resolve_configuration 统一解析目标/机器设置;apply_change 通过现有 configure-goal 保存或清除目标覆盖,没有旁路修改 registry。
  • --pr-review-wait-for-ci / --no-pr-review-wait-for-ci / --clear-pr-review-configuration 提供写入和恢复入口,pr-review --goal-id 在任何 GitHub 读取前解析目标,并在载荷中回显实际配置。
  • attach_pr_review_details 和 readiness readback 仅在配置开启时请求 statusCheckRollup;materialize_review_execution 与 canonical review contract 也遵循同一值。
  • build_merge_readiness 保留原有默认 CI 检查,关闭时才跳过 CI 条件;BLOCKED 仅投影需另行授权的管理员合并要求,grants_merge_authority=false 不变。
  • 共享 capability editor/API 支持 machine 和 Goal,增加“Wait for CI / 等待 CI”标签,复用已有 boolean 控件和保存/清除流程。已重建 packaged chat,并更新 generated vocabulary inventory,避免新 schema/module 和条件化字段导致清单过期。
  • 技能、CLI help、能力文档和 self-repair 模式改为读取配置,文档包含关闭、读取、验证和清除命令。

正常路径:目标保存 false 后,同一份“有效当前评审、评论已解决、CI 排队”的合成输入返回就绪;另一个无覆盖的目标仍按默认规则阻塞。清除目标覆盖后恢复继承。反例:非法配置、缺失目标、陈旧评审、未解决或读取不完整的评论依然失败。

对主干的风险

最重要的隔离要求是目标 opt-out 不能泄漏到其他目标,也不能被 UI 默认值覆盖。178 项 pytest 覆盖评审、配置、API、队列、save/readback/clear、两个目标的差异以及非法布尔输入,全部通过。生产 CLI 在 immutable base/head 使用相同 fixture 比较:默认路径除时间戳及新加入的两个策略说明字段外,完整输出相同;明确关闭的目标才移除 CI 阻塞。

Dashboard build/typecheck 与 capability configuration smoke 通过,后者明确验证 false 不会被 true 默认值覆盖,且 envelope 字段不会进入目标写入。Ruff、Python compile、docs-governance、词表 freshness/drift、公私边界和 diff 检查通过。最终本地 premerge 的 19 项选中检查及 3 项直接检查全部通过,无必需检查失败/跳过或 manual hold。没有 Lark 独立配置入口需要伴随修改,也没有首屏布局变化。

额外运行的旧 frontend text-contract probe 在未改动的 manager-question 路由断言上失败,基线与最终版本同样失败;它不属于本次配置的必需验证集,未将其声称为通过。低频 live-model qualification 未启用,未声称完成模型行为实验。

精确范围质量回执:cqr_2b082ca4c21d45a234ea,fingerprint 2b082ca4c21d45a234eaff462b340d239c913326a9fb1f03b4682ffdb2fecebe,33 files;safe-fix allowed/applied、1 pass,0 blocker/warning/advisory,verify valid。本地完整评审结果检查器通过。

我的整体评价

APPROVE。最终设计保留其他目标的默认行为,并完成配置、执行和 UI 的共同交付。未来维护性整理采用现有 namespace、priority enum、原子配置语义和 editor,未引入独立 settings 框架或第二套权限规则。已将维护者指定的 Goal 设为 wait_for_ci=false 并回读,机器默认未关闭;本次也按该目标配置执行,不再查询或等待 CI。合并仍基于维护者明确授权。

English verdict: APPROVE at exact head 0eb12c4fdba5b9c66612d8b59e49ca35d613aace. CI waiting is now configurable through the existing machine/Goal capability editor and CLI, defaults to true, and is disabled only for the requested Goal. Default full-output parity, 178 tests, packaged Dashboard build/configuration smoke, vocabulary checks, all 19 premerge checks and 3 direct checks passed with a valid exact-scope receipt. An optional pre-existing manager-route text assertion fails equally on base/head and is disclosed. Required local evidence and merge authority remain intact.

@huangruiteng

Copy link
Copy Markdown
Collaborator Author

最终配置化评审已发布并回读:0eb12c4fdba5b9c66612d8b59e49ca35d613aace。wait_for_ci 默认 true,仅指定 Goal 设为 false;机器默认未修改。

合并前额外验证:本提交与最新主干 53fed471e 的实际合并无冲突,完整 vocabulary smoke 通过,40 项直接评审/Goal 配置集成测试通过。当前提交完整评审及质量回执有效,未解决 review threads 为 0。主干前进导致 GitHub/本地 readiness 的 branch freshness 要求仍提示更新;维护者已明确授权自合并,依据上述实际集成证据使用 admin bypass,不把该提示改写成通过。

最终本地 premerge 的 19 项检查与 3 项直接检查通过;此前 178 项测试、Dashboard 打包及配置 smoke 通过。没有必需本地验证失败或人工暂停;额外旧前端文本断言的 baseline/head 同样失败已在完整评审披露。此次按照所选 Goal 的 false 配置,不查询或等待 CI。

English: Exact-head review/readback and quality qualification are complete. The conflict-free integration with current main passed the vocabulary smoke and 40 focused integration tests. Owner-authorized admin bypass uses this integration evidence for the remaining branch-freshness requirement. CI waiting stays enabled by default and is disabled only for the requested Goal.

@huangruiteng
huangruiteng merged commit 4f33d5a into main Sep 15, 2026
24 checks passed
@huangruiteng
huangruiteng deleted the codex/pr-review-local-evidence branch September 15, 2026 13:06
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