Skip to content

fix(pr-review): skip duplicate work covered by independent reviews - #6836

Merged
loopx-agent merged 2 commits into
mainfrom
codex/pr-review-peer-skip
Oct 18, 2026
Merged

loopx-agent merged 2 commits into
mainfrom
codex/pr-review-peer-skip

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

A contributor's ordinary GitHub review currently fails the agent's bilingual conclusion format and gets selected for another full review. This change separates submitted independent review activity from earned approval: source-complete activity by a non-author GitHub User associated as OWNER, MEMBER, COLLABORATOR or CONTRIBUTOR can cover duplicate review work on the current head.

  • Reuse the TypeScript review-history owner and expose an optional independent_review fact. Formal COMMENTED (including inline-only), APPROVED and CHANGES_REQUESTED submissions count as activity; issue comments, the author, bots, unknown provenance, old heads, pending-only and dismissed opinions do not.
  • Fetch the full paginated GitHub history and recheck the head/base after reading provenance. Dismissal retires that reviewer's coverage; missing or malformed metadata keeps the ordinary review runnable. Share the complete history reader with approval closeout.
  • An inventory-only covered row has no executable review plan. An explicit fresh exact-head audit can restore one for an open, non-Draft or merged PR. Strict approval body qualification, unresolved dissent, validation, readiness and merge authority retain their existing gates.
  • Update the existing CLI help, capability contract and thin host skill. There is no new configuration or UI; existing capability settings and their inheritance are unchanged.

This intentionally changes default queue selection for qualifying independent reviews. It does not authenticate a biological human or certify review quality. GitHub association is the provider-owned eligibility input; no reviewer-name allowlist or prose classification is added.

Validation at final abbc1f4b627310b240af4ace18b9d8d235654285, against target main 82f9c09bd61e26e458cecfd4cffeab2350359381:

  • Complete offline review/source modules: 527 passed, 43 skipped at the preceding implementation commit; the final commit changes only the existing smoke expectation, with all seven production file hashes unchanged. The skipped tests explicitly opt into paid live-model qualification and were not executed; no model-quality claim is made.
  • Ordinary noneditable base/head wheels through the isolated public CLI: 26 invocations, three newly covered activity states, nine negative parity cases, and the fresh-audit override. All seven changed installed production files match the reviewed source bytes. The final wheel also passed three CLI readbacks; eight additional exact-target cases cover inline reviews, unrelated inventory beyond the display cap, new subjects, prose/author impersonation resistance and coverage loss/recovery.
  • Provider-path tests cover pagination, later dismissal, account provenance, source failure/recovery and post-read head drift. Closeout tests preserve approval and dissent holds.
  • Configured Ruff and mypy, control-plane TypeScript typecheck, Chat/wheel builds, staged bilingual RFC gate, diff hygiene and public-boundary scan passed. Chat build retains its existing large-chunk warning.
  • Exact-scope change-quality receipt passes. Final standard Goal-bound premerge passed 6 direct checks and all 19 selected checks, without manual holds. An earlier premerge run found the old no-action token asserted by the existing command smoke; the final commit corrects that expectation, retaining the assertion and every selected check. CI observation is disabled by the managed review configuration; local validation and exact-head gates remain required.

Bounded refactoring: consolidate review pagination and extend the existing history adapter; defer broader review-policy restructuring. Full provenance adds a paginated history read and version readback for foreign-review PRs, reusing bounded fanout. No queue-latency or throughput improvement is claimed.

中文:按当前提交上、来源完整的非作者贡献者/维护者正式评审跳过重复审查,不要求对方使用本 Agent 的双语模板。作者自评、机器人、旧提交、待提交/已撤销评审及未知来源不触发跳过。该事实只覆盖重复工作,不构成通过结论,也不解除异议、验证或合并权限门槛;显式重新审查仍可执行。

Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>
Signed-off-by: LoopX Agent <337587101+loopx-agent@users.noreply.github.com>

@loopx-agent loopx-agent 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)

Reviewer: model_agent | gpt-6.1-sol | OpenAI | runtime_reported | reasoning_effort=max

动机

处理 PR 队列的维护者和 Agent 会遇到同一提交被重复完整审查的问题。例如贡献者已提交普通行内评审,旧流程仍因正文不符合本 Agent 的双语模板而再次生成全文审查计划;新流程读取合格账号的完整当前提交评审后,仅回读已有记录并继续队列。

普通安装包的 CLI 已验证合格记录不再生成执行计划,而作者自评、机器人、旧提交、未知身份和来源不全仍保留原处理路径。本改动不把第三方评审视为批准,不解除阻塞、验证或合并权限,也不声称已验证真实模型收益。本 PR 已完成代码与普通安装包验证;合并后的本机升级和实际来源回读尚待执行。

改动思路

应保留这套有界设计:GitHub provider 只提供完整事实,TypeScript 历史 owner 决定覆盖,队列消费投影,批准与合并仍由原有门负责。本 PR 边界是打通现有评审入口的重复工作覆盖、失败恢复和文档适配;不新增配置、权限、持久状态或独立页面。已有历史选择和 approval closeout 继续共用类型化 owner;本次只是增加“已有独立评审活动”的派生事实,不把正文格式校验改成宽松批准。该事实每次从 GitHub 计算,不需要人维护另一份状态或设置。普通的 COMMENTED、APPROVED、CHANGES_REQUESTED 都可能覆盖重复工作;批准结论与工作覆盖是不同判断。

下表对应审查提交 abbc1f4b627310b240af4ace18b9d8d235654285,是源码与执行结果的简要对照:

条件 队列结果 批准/合并影响
来源完整、当前提交、非作者 User、合格仓库关联身份 仅保留记录,不生成全文审查计划 不授予批准或合并权限
作者、Bot、未知身份、旧提交、来源不全 沿原流程处理 原有门保持
最近已提交活动被撤销或 head 改变 原覆盖失效 不清除其他评审者异议
明确请求 fresh audit 允许范围内重新生成证据计划 仍须独立验证和授权

不改动会继续因格式重复审查;放宽原批准模板会误改权限语义;用户名白名单无法表达通用来源。因此保留现有 owner 是更小且可回退的修复。额外分页读取有实际成本,已经复用原有有界并发,不宣称测得吞吐或延迟收益。

具体改动

关键代码讲解

  1. _attach_review_provenance 发现他人评审后读取完整 REST 历史,补齐账号类型和仓库关联身份,再核对 head/base。普通 gh pr view 不含这些身份事实;测试替换的只是 GitHub IO,真实 scan、归一化与类型化决策仍执行。读取失败或字段损坏不产生覆盖,版本漂移则拒绝混合快照。
  2. independentReview 按真实 review id 和提交时间选择各账号最近的已提交事件,仅接受当前 head、非作者、明确非 Bot 且关联身份为 OWNER/MEMBER/COLLABORATOR/CONTRIBUTOR 的记录。PENDING 不抹去已提交活动,DISMISSED 只撤回该账号覆盖;缺失或无法验证的来源不会跳过工作。这是 GitHub 账号来源判断,不是自然人认证。
  3. select_review_history 继续调用原有 RPC,返回原 index 和可选事实;_review_conclusion 原严格正文/作者 fallback 判断保留。审批 closeout 改用同一分页 reader,避免复制来源逻辑;活动与正式意见的 COMMENTED 差别有意分开,下一次资格政策只需改同一 TS owner。
  4. materialize_review_execution 消费 native action:覆盖行没有 plan/template/证据命令,并回读评审者、状态、原记录链接。已有严格批准仍走 readiness 路径。显式 fresh audit 可以重启覆盖行,新增 peer 路径限制为非 Draft 的 OPEN 或 MERGED,不把 CLOSED/Draft 变成绕过入口。原 CLI 帮助、双语能力文档与薄 skill 同步说明默认变化。

规范依据是改动前的 loopx/capabilities/pr_review_queue/README.md,固定修订 82f9c09bd61e26e458cecfd4cffeab2350359381 的 Source Reads 段,而不是本 PR 改写后的文字。C1:严格批准格式与作者 COMMENTED 标题仍由原正文测试和 closeout 约束。C2:同一类型化历史 owner、各账号意见和撤销语义保持;分页和顺序变换的三种来源形状得到相同完整行。C3:换 head 需新证据,无格式的异议仍可见,来源记录不授予撤回或合并权限。新的重复活动覆盖是当前维护者要求的默认改变,并已用普通安装包作反事实验证。

验证包括完整离线评审/来源模块 527 通过、43 个明确 opt-in 的实时模型资格项跳过;基线与实现普通不可编辑 wheel 的 26 次 CLI 调用、最终 wheel 三次读回、八项公开 exact-target 范围/恢复验证和三种生产来源分页/顺序形状。基线会对三类合格活动再次生成全文计划,改后不再生成;九类不合格/来源不全输入保持原结论诊断和动作。最终 head 与模块测试修订的七个生产文件字节完全一致,仅追加既有 smoke 期望修复。

最终标准 premerge 的 6 项直接检查、19 项选定检查全部通过,无人工 hold;包括双语 RFC、公开边界及现有端到端命令 smoke。当前范围的 change-quality receipt 有效,配置化 Ruff/mypy、TS 类型检查及正常 Chat/wheel 构建通过。更早的 ce99d83 premerge 暴露旧 no-action token 的断言遗漏,最终提交只修正该期望,未删断言、改限额或跳过检查。按解析后的配置未查询、轮询或等待 CI。

对主干的风险

主要风险是把不完整、旧的或伪装的记录误当覆盖。来源层的完整分页、账号类型、关联身份和版本复核,配合类型化精确匹配及否定用例限制了它。标题/正文声称“维护者已通过”、作者即使具有 OWNER 身份,都不能建立覆盖;新增 PR 和超过显示上限的无关项目不会改变明确目标的结果。源丢失时恢复原处理,来源恢复或新提交的合格评审可继续,显式 fresh audit 也保留可控恢复路径。

GitHub User 可能由自动化使用;这次按账号事实去重,不证明评审质量。CHANGES_REQUESTED 可表示“已有独立评审活动”,但仍是阻塞意见,closeout 的三类状态用例都保留 exact approval 缺失/异议/授权门。没有新增配置、数据库、quota、权限、外部写入或 UI 布局;已检查既有机器/Goal 能力编辑器,沿原会话/CLI 入口交付。额外 REST 读取的延迟未作量化,构建原有大 chunk 警告保留;实时模型行为、长期成本和实际本机采用不在这些离线证据中。

我的整体评价

没有发现阻塞性的代码或当前验证问题。当前交付是有用且有界的增量:代码和普通安装包已经实现可用的重复审查覆盖,撤销、换头、未知来源、明确重审及批准边界均有反例支持;本机升级与实际来源读回仍是合并后的同一授权交付步骤。本轮没有把测试数、记录或 context delivery 当成长期收益证明。已有恢复类经验仅采纳“从普通用户任务检查可用结果”的方法,其恢复 RFC 场景对本 PR 不适用,不继承历史结论或声称记忆效用已证实。

设计保持同域复用:共用历史 reader 与 owner,不引入另一套状态或设置;更大规模的评审架构调整没有当前必要性。合并仍需要精确 head 的公开评审、有效本地验证、readiness 回读和维护者授权,覆盖事实不能替代这些步骤。

English verdict: APPROVE — abbc1f4b627310b240af4ace18b9d8d235654285. Independent current-head contributor/maintainer review activity covers duplicate work without earning approval or clearing dissent. Final local premerge passed 6 direct and 19 selected checks; offline review/source tests passed 527 with 43 opt-in live-model skips, and ordinary-wheel counterfactuals passed. Native host upgrade/readback follows merge; CI was not consulted under the configured policy.

@loopx-agent
loopx-agent merged commit 8220f4c into main Oct 18, 2026
15 of 28 checks passed
@loopx-agent
loopx-agent deleted the codex/pr-review-peer-skip branch October 18, 2026 18:28
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