Skip to content

Remove the independent-approvals CI check and rely on native reviews - #607

Merged
zengchuang-hw merged 2 commits into
mainfrom
fix/count-formal-approve-reviews
Nov 23, 2026
Merged

zengchuang-hw merged 2 commits into
mainfrom
fix/count-formal-approve-reviews

Conversation

@zengchuang-hw

@zengchuang-hw zengchuang-hw commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Refs #440

Remove the advisory independent-approvals commit status. GitHub's active protect-main ruleset already requires two formal Approve reviews from distinct eligible accounts and dismisses stale approvals on reviewable changes. The sole required status check is knowledge-model-policy.

  • Remove the status writer and the dedicated review-event workflow that triggered it.
  • Remove their standalone Python evaluator, its tests, and the rollout instructions.
  • Update reviewer and integrator guidance to count formal Approve submissions regardless of their text. A comment saying LGTM contributes zero approvals. Blocking Request changes reviews follow GitHub's native rules.

Verification. Inspected the published commit tree and the ten remaining workflow definitions. Neither the retired status writer nor its trigger is referenced by those workflows. Checked the active ruleset independently. Existing runs and statuses can remain visible in GitHub history. The removal takes effect for new events once it reaches main.

Count eligible current-head Approve reviews regardless of wording and keep
approval enforcement in the native main ruleset. Update the reviewer and
integrator guidance and cover the approval-count examples in tests.

Agent-assisted-by: Codex (implementation and tests)
Signed-off-by: zengchuang <zengchuang3@huawei.com>
Dong1017
Dong1017 previously approved these changes Nov 23, 2026

@Dong1017 Dong1017 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).

PR review verdict — PASS
Reviewed base 65f7149 and head 07db27c (full diff, 4 files). No prior formal reviews or Request changes are seeded on this head.

Verified against the governing issue (#440, body updated 2026-11-23T09:29Z)

  • The #440 acceptance matrix says review text has no role in the approval count. It gives these results: two Approves with any body count 2, one Approve plus one LGTM comment counts 1, and two Comment reviews count 0. The new parametrized test test_only_formal_approvals_count_regardless_of_body covers exactly those three rows.
  • tools/check_independent_approvals.py (read at head):
    • body is dropped from the GraphQL selection and from review_candidates.
    • The remaining gates are unchanged. They are state == APPROVED, authorCanPushToRepository, a current-head commit.oid, __typename == "User" and no [bot] suffix. PR-author and commit author/committer exclusion still runs in evaluate.
    • A COMMENTED review cannot count, because the state check runs first.
  • The status description is now prefixed "Advisory:". The docstring and comments no longer imply an enforcing gate. This matches #440's decision that the native protect-main ruleset (2 approvals) stays authoritative.
  • docs/agent-collaboration.md and .agents/skills/review-pr/SKILL.md now agree with the code on three points. Approve is counted by state, not wording. Comment reviews with LGTM or PASS contribute zero. DO NOT PASS still uses Request changes.
  • Dropping the "rollout (not active)" section is consistent with the #440 decision that superseded the cutover plan. The new "Advisory approval status" section keeps the important limits. Those are the count-only report, the fact that two approvals can coexist with an open Request changes, and the instruction to use the merge box.

Non-blocking notes

  • Dong1017's 07:30Z proposal in #440 suggested a safety net that would not count an Approve whose body says DO NOT PASS or NO PASS. This PR omits it. The current #440 body says review text has no role, so I read that as superseded. The author or owner should say so explicitly if it is meant to be dropped.
  • I did not check whether other files outside this diff still mention the exact LGTM first-line rule. Examples are docs/contributing.md, PR templates and workflow comments. A quick repo-wide search before merge would settle it. The excerpt shipped with Dong-bot's own review skill still carries the old wording, but that is not part of this repo diff.

Not verified here: I did not run tests or Ruff. I am relying on the PR's claim of 19 passing tests and a clean Ruff run, and repo CI was pending when the PR was opened. I did not exercise the live GitHub GraphQL latestOpinionatedReviews behavior.

Eligibility: this Approve comes from Dong-bot, the authorized delegate acting under Dong1017's account. Dong1017 proposed the design in #440. Whether this vote counts as one of the two independent approvals is for the integrator to decide under the recorded #441 and #597 handling. The ruleset still needs two eligible approvals and green required checks.


@Dong1017 Dong1017 added area:process Repo-wide process, governance, privacy and security rules kind:task Bounded delivery task with a delegated slice labels Nov 23, 2026

@jiangkuaixue123 jiangkuaixue123 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

改了什么

这份 PR 对齐 #440 的最新决定:合入 main 仍靠 GitHub 原生 ruleset(分支保护规则集)要求 2 个正式 Approve(批准审查);旁边的 independent-approvals 观察器只做统计提示,不再盯审查正文里有没有写死的 LGTM。

具体变动:

  1. tools/check_independent_approvals.py:GraphQL(GitHub 的查询接口)不再拉 body;review_candidates 只按「当前 head 上的 APPROVED + 有写权限的真人账号 + 排除作者/提交者」计数。状态描述加上 Advisory:,标明这是建议性状态,不是硬门槛。
  2. tests/test_independent_approvals.py:用参数化用例覆盖 #440 验收表三行(两个任意正文的 Approve → 2;Approve + 评论式 LGTM → 1;两个 Comment → 0),并去掉旧的「首行必须是 LGTM」断言。
  3. docs/agent-collaboration.md / .agents/skills/review-pr/SKILL.md:审查指南改为「PASS 就提交 Approve」;删掉已过时的「observer 升格为强制检查」rollout 段,改成「Advisory approval status」说明。

问题或风险

未发现影响正确性、安全或声明行为的实质缺陷。

资格过滤(APPROVED、当前 head、可推送、User 且非 bot、排除贡献者)仍在 review_candidates / evaluate 里,逻辑与 #440 验收矩阵一致。我在本地把本 PR 的两份 Python 文件跑了 tests/test_independent_approvals.py:与本次改动相关的用例全部通过(缺仓库 workflow YAML 导致的那 1 个环境性失败可忽略)。

非阻塞建议:合入前可再扫一眼仓库外是否还有私有 agent 模板仍写「首行 LGTM」——本仓库 AGENTS.md / docs/contributing.md / README.md 在本 head 上已无该表述。

结论

Approve。 改动范围小、与 #440 决策一致,观察器与文档不再和原生 ruleset 打架;无阻塞问题。未合并。

Reviewed base 65f7149f17f4759b459340a5f64746b6d747f2fd and head 07db27ce4940e855ab68c5aefd1768a1ba6ecf86(4 files)。

@jiangkuaixue123 jiangkuaixue123 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

PR review verdict — PASS
Reviewed base 65f7149f17f4759b459340a5f64746b6d747f2fd and head 07db27ce4940e855ab68c5aefd1768a1ba6ecf86.

改了什么

这次是在对齐「正式批准」和观察器(observer,用来统计谁批准了 PR 的小工具)的计数规则。

  1. tools/check_independent_approvals.py:统计时不再要求审查正文第一行必须是精确的 LGTM;只要是对当前提交的正式 Approve、账号有写权限、且不是作者/提交者/机器人,就算一票。GraphQL 查询也去掉了用不上的 body 字段;状态描述改成以 Advisory: 开头,明确它只是参考,真正拦合并的还是仓库的 native ruleset(分支保护规则)。
  2. 文档与审查技能(docs/agent-collaboration.md、.agents/skills/review-pr/SKILL.md):审查通过时直接点 Approve 即可,不再要求正文写 LGTM;说明普通评论或 Comment 审查即使写了 LGTM/PASS 也不算批准。
  3. 测试:补了 PR 说明里的三组回归(两票空/自由正文 Approve=2;一票 Approve + 一票 Comment=1;两票 Comment=0),并去掉只针对旧 LGTM 正文规则的用例。

明显问题或风险

未发现影响正确性、安全或声明行为的实质缺陷。

review_candidates 仍先过滤 state == APPROVED、当前 head、写权限与 User 类型,去掉的只是正文门槛,不会把 Comment 审查误计为批准。本地跑通 tests/test_independent_approvals.py 共 19 项。knowledge-model-policy 已是 success;部分 full-check / host-compatibility 当时仍在跑,属 CI 进度,不构成对本 diff 的否决理由。

小建议(非阻塞):合入后观察器描述会带上 Advisory: 前缀;合入前 main 上的工作流仍会打出旧文案,属预期。

结论

批准。 改动范围清楚,行为与文档一致,正式 Approve 与 ruleset 计数对齐,观察器仍保持顾问角色。

Retire the review-event signal and status writer together with their
standalone evaluator and tests. Keep the native two-review requirement
and the guidance for submitting formal approvals.

Agent-assisted-by: Codex (implementation and verification)
Signed-off-by: zengchuang <zengchuang3@huawei.com>
@zengchuang-hw zengchuang-hw changed the title Count formal Approve reviews regardless of review text Remove the independent-approvals CI check and rely on native reviews Nov 23, 2026

@jiangkuaixue123 jiangkuaixue123 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

PR review verdict — PASS
Reviewed base 65f7149f17f4759b459340a5f64746b6d747f2fd and head 887d4d865e5d9de6d6dbbf07a4f106c197905f24.

改了什么

相对上一版(只改「正式 Approve 怎么计数」),这次按 #440 的最新决定,直接拆掉旁路观察器,合入门槛只留 GitHub 原生 ruleset(分支保护规则集:要 2 个正式 Approve)。

具体变动(6 个文件,+11/−416):

  1. 删除 .github/workflows/independent-approvals.yml 与 approval-review-event.yml(写 commit status 的工作流,以及触发它的审查事件信号)。
  2. 删除 tools/check_independent_approvals.py 与 tests/test_independent_approvals.py(独立审批统计脚本和测试)。
  3. 文档/技能对齐:docs/agent-collaboration.md、.agents/skills/review-pr/SKILL.md 改为「PASS 就提交 Approve,正文写不写都行」;普通评论或 Comment 审查即使写了 LGTM/PASS 也不算批准;删掉已过时的 observer rollout(观察器升格为强制检查)段落。

我在当前 head 上核对过:工作流目录里已无上述两个 YAML(还剩 10 个),tools/ 里也没有 check_independent_approvals.py。knowledge-model-policy 已是 success。

明显问题或风险

未发现影响正确性、安全或声明行为的实质缺陷。

  • 与 #440 决策正文一致:「Remove the advisory observer… in #607」;原生 ruleset 仍要求 2 票,Request changes 仍走 GitHub 原生规则。
  • 合入前 main 上的旧工作流仍可能给这个 head 打出 independent-approvals 状态(当前可见 failure: 0/2),合入后对新事件才会停写;PR 说明也写了历史 status 可留在 GitHub 里。这不构成对本 diff 的否决理由,因为该 context 本来就不是唯一必过检查(必过的是 knowledge-model-policy)。
  • 删测试后,仓库里不再有旁路计数的回归网;依赖的是 ruleset 本身,与 #440 接受矩阵一致。

结论

批准(Approve)。 范围清楚,行为与 #440 决策一致:旁路观察器整套移除,正式批准只认原生 Approve。未合并。

@jiangkuaixue123 jiangkuaixue123 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

PR review verdict — PASS
Reviewed base 65f7149f17f4759b459340a5f64746b6d747f2fd and head 887d4d865e5d9de6d6dbbf07a4f106c197905f24.

改了什么

这次是在落实 #440 的最新决定:合入 main 的批准要求只由 GitHub 原生 ruleset(分支保护规则集)执行,要求两个合格审查者各提交一次正式 Approve(批准审查);原来那个只做统计提示的 independent-approvals 观察器(observer,用来打 commit status 的辅助检查)整套拆掉。

具体变动(相对前一版头 07db27ce 是更大的方向调整):

  1. 删除 .github/workflows/independent-approvals.yml、.github/workflows/approval-review-event.yml(触发与状态写入工作流)。
  2. 删除 tools/check_independent_approvals.py 及 tests/test_independent_approvals.py(评估器与单测)。
  3. 更新 docs/agent-collaboration.md、.agents/skills/review-pr/SKILL.md:PASS 直接提交 Approve 即可;正文不再要求首行 LGTM;普通评论 / Comment 审查写 LGTM/PASS 也不算批准;删掉已过时的 observer rollout 段落。

当前 head 上 workflows 目录剩 10 个定义,已无上述两个工作流;tools/ 下也无 check_independent_approvals.py。

明显问题或风险

未发现影响正确性、安全或声明行为的实质缺陷。

与 #440 Decision/验收表一致:批准计数只看正式 Approve 状态,不看审查正文;Request changes(要求修改)仍由 GitHub 原生规则处理。必需状态检查仍是 knowledge-model-policy(本 head 已 success)。

非阻塞说明:在本 PR 合入 main 之前,main 上旧的观察器工作流仍会对新事件写出 independent-approvals status(本 head 上仍能看到 failure:0/2);PR 说明已指出历史 status 可保留、合入后新事件才停止写入,这属预期行为,不构成否决理由。部分 full-check / host-compatibility 当时仍在跑,属 CI 进度。

结论

批准。 删除范围清晰、文档与 #440 决策一致,批准执行回归到原生 ruleset,无阻塞问题。未合并。

Copy link
Copy Markdown
Contributor Author

@Dong1017 could you re-review 887d4d86 and submit a formal Approve if it looks good? This revision removes the independent-approvals workflow and its trigger. The native main ruleset still requires two approving reviews.

@Dong1017 Dong1017 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

PR review verdict — PASS

Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).

Reviewed base 65f7149f17f4759b459340a5f64746b6d747f2fd and head 887d4d865e5d9de6d6dbbf07a4f106c197905f24. I read the full diff, which is complete (6 files). This PR touches .github/workflows/approval-review-event.yml and .github/workflows/independent-approvals.yml, so a human maintainer's Approve is still required. This review posts as a COMMENT. It is not an Approve and not an independent vote, in line with the earlier #371 and #597 records.

Verified

  • Removals: the diff deletes both workflows, tools/check_independent_approvals.py and tests/test_independent_approvals.py. That is the whole status-writer chain: the pull_request_review signal, the workflow_run / pull_request_target / push writer, the evaluator and its tests.
  • No dangling references: .github/workflows/ at head has 10 entries (ci-draft, ci-merge, ci-nightly, ci-ready, knowledge-model-policy, release, and four skill-eval files). None is the removed writer or its trigger. I did not grep the whole tree, but the deleted test was the only file in the diff that imported the evaluator.
  • Guidance: docs/agent-collaboration.md and .agents/skills/review-pr/SKILL.md now say:
    • PASS means submit Approve, and the body wording is irrelevant.
    • Conversation comments and Comment reviews count as zero approvals, even if they say LGTM or PASS.
    • Request changes follows GitHub's native rules.
    • The integrator checks eligibility, blocking reviews and required checks.
  • Stale text: the stale "exact LGTM first line" and "body rules" wording is gone from the SKILL file (read at head, 77 lines). The docs/agent-collaboration.md hunk replaces the "eligibility and body rules" phrase, and the "Independent-approval check rollout (not active)" section is removed.
  • Merge gate: it is unchanged. The PR body cites the protect-main ruleset (2 approvals, stale-approval dismissal), with knowledge-model-policy as the only required status check. I did not re-query the ruleset myself.
  • Prior reviews: @jiangkuaixue123 has two APPROVED reviews on this exact head. They count as one reviewer. There is no outstanding CHANGES_REQUESTED.

Non-blocking

  • Until this reaches main, the old workflow can still write independent-approvals statuses (a 0/2 failure is visible on this head). Historical statuses stay in GitHub's history. That context is not a required check, so it does not block merge.
  • Deleting the tests removes the regression net for the observer. That follows from retiring it.
  • I did not run tests or CI. CI status was not seeded, so I make no claim about it.

Remaining before merge: a human maintainer's formal Approve on 887d4d86, a second eligible independent approval to meet the ruleset's 2, and green required checks. I'll re-read if the author pushes again.


@zengchuang-hw
zengchuang-hw merged commit f53b2a9 into main Nov 23, 2026
14 of 15 checks passed
Dong1017 added a commit that referenced this pull request Nov 23, 2026
…review-pr

Align with #440 and the open #607: the two approvals are formal GitHub
Approve reviews from distinct eligible accounts on the current head; the
review body's wording, including LGTM, no longer counts. The identity
line now starts every comment and review. The independent-approvals
observer section says it is advisory, not an approval count, and is
removed by #607. review-pr now applies the guide's full stop check
instead of naming only the PR and its governing Issue.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
Dong1017 added a commit that referenced this pull request Nov 23, 2026
Align the merge and review entries with #440 and the open #607: two
formal Approve reviews from distinct eligible accounts on the current
head; the body's wording, including LGTM, is not a counting condition.
The other merge checks are unchanged.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
Dong1017 added a commit that referenced this pull request Nov 23, 2026
Resolve .agents/skills/review-pr/SKILL.md by keeping #607's wording (Approve
counts regardless of the body text) plus this branch's identity line in the
example. Resolve docs/agent-collaboration.md by keeping this branch's merge
queue paragraph and dropping the advisory independent-approval section, since
#607 removes the observer itself.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
Dong1017 added a commit that referenced this pull request Nov 23, 2026
Align the merge and review entries with #440 and the open #607: two
formal Approve reviews from distinct eligible accounts on the current
head; the body's wording, including LGTM, is not a counting condition.
The other merge checks are unchanged.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
Dong1017 added a commit that referenced this pull request Nov 23, 2026
* docs: add collaboration skills and slim the agent entry page

Agents each read the collaboration guide and applied it differently,
because review-pr was the only collaboration skill. Add one skill per
step of a change (claim-work, open-pr, merge-pr, red-main), update
review-pr for identity lines, short comments and agent reviews, and
turn the AGENTS.md collaboration part into one-line pointers. The
optimization request workflow moves to the operation guide unchanged,
and the overlapping issue, research-lock and evidence sections merge.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: check assignee, status and stacked base in the claim and merge skills

claim-work now checks that the Issue has an assignee and status:accepted,
and that the claimer is the deciding agent or works under its delegation,
before claiming. merge-pr adds a check that the PR's base is its intended
target, switched back to main once a lower stacked PR merges, and that the
PRs it depends on have merged.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: use bot:stop and complete the merge-pr preconditions

Rename agent:stop to bot:stop in the skills and the entry page. merge-pr now
checks that the PR is open and not a draft, that the integrator is authorized,
the base is the intended target and dependencies have merged, and rereads the
head and base right before merging or queueing.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: leave high-risk merges to maintainers and recheck base and approvals in merge-pr

The merge skill now reports a high-risk PR as needing a human maintainer
to merge and never as merge-ready, matching the collaboration guide.
Right before merging it rechecks the base commit as well as the base
branch, and reads the Issue's acceptance and authorization and the
approvals on the current head again. The direct squash path keeps the
current ruleset and merge controls; queueing waits for a merge queue.
Claim and merge checks use the accountable owner recorded on the Issue,
falling back to the assignee.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: honor unlifted stop comments in the claim, review and merge skills

The skills now treat a human's stop comment on the PR or its governing
Issue like bot:stop until a human lifts it or adds the label there, and
merge-pr rechecks both right before merging, matching the guide.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: let maintainer accounts approve and agents merge high-risk PRs in the skills

Follow the #570 policy change: review-pr lets a maintainer account, including
its agent, give the maintainer approval on a high-risk PR, and merge-pr check
9 now only requires at least one approval from a maintainer account before
the normal flow. AGENTS.md drops the human-merge wording.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: list the audit fields in the merge-pr record for high-risk PRs

The merge record comment on a high-risk PR lists the reviewed head, the
approving accounts with review links, and the merge SHA and merging
account, matching the guide.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: have the skills write the fixed merge-audit and recovery lines and count outside authors' votes

merge-pr writes the merge-audit line itself right after a high-risk merge
and, for an author without write access, counts only maintainer-account
approvals; open-pr adds the recovery line when a revert cannot undo an
external effect, and review-pr requests it when missing.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: record the maintainer approver in the merge-audit line

The merge-pr record now has the maintainer field from the guide, naming
the approving account that held repository write permission at merge time.

Agent-assisted-by: DSH / deepseek-v4.1-flash (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: bind the merge to the checked head and verify recovery in merge-pr

merge-pr now squash-merges with the checked head as the expected head
(--match-head-commit, or sha on the REST endpoint) and starts over if
GitHub refuses it, and its final reread also rechecks open Request
changes reviews. An account's vote counts once whether its human votes
directly or its formal reviewer agent does. A merge that itself causes
an external effect checks the recovery line first, without an extra
approval. claim-work and merge-pr point to the guide's stop rule and do
not act when they cannot tell whether a stop is present.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: let a maintainer account's agent integrate in merge-pr

The integration path no longer says only a human maintainer: you may
integrate when you act for a maintainer account.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: require and verify an Admin-role approval in merge-pr

On a high-risk PR, merge-pr now needs one approval from an account whose
repository role is Admin, checked right before merging with the
collaborator permission API (role_name must be admin); Maintain and
Write approvals count toward the two but not as that one. The
merge-audit line records admin=@<login>. review-pr and AGENTS.md say
the same. Decision: #570 (issuecomment-7078247553).

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: check the high-risk approver list in merge-pr

Check 9 now reads .github/high-risk-approvers.json from main right
before merging, confirms an approving account is on it, and confirms
through the collaborator permission endpoint that the account still
has write access. The merge-audit line records approver=@<login>.
review-pr and the AGENTS.md merge entry follow the list instead of
the Admin role.
Decision: #570 (issuecomment-7078872219).

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: read the approver list at the checked main commit in merge-pr

Check 9 now reads .github/high-risk-approvers.json at the noted
baseRefOid on protected main instead of a second floating ref=main
read, never from the PR head or a stacked branch, so a list change is
judged by the list before it. If the list or the permission cannot be
read, do not merge. The bootstrap stays in the guide and is linked,
not repeated. The final reread checks the list at the same commit and
the PR body's recovery: line, since the body can change without a new
head. merge-audit gains list=<baseRefOid>. review-pr points to the
same rule.
Review: #572 (12:18Z Dong1017, 12:19Z zengchuang-hw).

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: name the bootstrap list= value in merge-pr

The merge-audit list= field is the baseRefOid the list was read from,
or list=bootstrap-570 only for the one-time bootstrap merge described
in the guide.
Review: #571 (12:56Z zengchuang-hw).

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: accept a cursor[bot] approval as one vote in merge-pr on non-high-risk PRs

Check 5 now accepts a cursor[bot] Approve on the current head as one of
the two approvals when check 9 finds the PR is not high-risk; the other
still comes from an account with write access, and a cursor[bot]
Request changes is still handled as a blocker. On a high-risk PR, or
when that cannot be told, it does not count. The AGENTS.md review and
merge lines say the same.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: drop the cursor[bot] vote from merge-pr

This reverts 8d25b9d. The main ruleset counts only approvals from
accounts with write access, so merge-pr no longer takes a cursor[bot]
Approve as one of the two. Its Request changes is still handled under
check 7.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: split binding and advisory Request changes in merge-pr

The guide makes cursor[bot] reviews advisory, but check 7 and the final
reread still required every Request changes to be turned into Approve
or dismissed, so a reasoned answer to an advisory review could never
clear it. Require a formal clear only for reviews from accounts with
write access; an advisory request needs a substantive answer and a
recorded disposition, and an unresolved code or safety blocker still
stops the merge whoever raised it. Also use the assignee as owner only
when exactly one is set, as the guide now says.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: dismiss an advisory review that GitHub still blocks on in merge-pr

Follow the guide: an advisory review such as cursor[bot]'s still needs
a substantive answer and a recorded disposition, and if GitHub's merge
state still shows the PR blocked by it on the current head, someone the
guide allows dismisses it with the reason recorded before merging. The
final recheck now includes GitHub's merge state.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: check a stop on every ancestor Issue in the collaboration skills

merge-pr, review-pr and claim-work now check the PR, its linked Issues and
each Issue's sub-issue parent chain for a stop, and treat an unreadable
chain as stopped, matching the stop rule in the collaboration guide.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: use the guide's stop check in the collaboration skills

claim-work, review-pr and merge-pr now point to the guide's single stop
check and its stop chain (governing or delegating Issues and their real
ancestors) instead of each naming its own scope, so a background link no
longer blocks a review or merge while a stopped parent still does.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: count formal Approve reviews in merge-pr, not their body text

Align the merge and review entries with #440 and the open #607: two
formal Approve reviews from distinct eligible accounts on the current
head; the body's wording, including LGTM, is not a counting condition.
The other merge checks are unchanged.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

---------

Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
Dong1017 added a commit that referenced this pull request Nov 24, 2026
… gates (#571)

* docs: let agents carry work end to end, with human stop and high-risk gates

The guide assumed humans make delegation, scope, rule and waiver
decisions. Agents now do most of the work, so let them make those
decisions on the record, and keep humans to setting direction through
Issues, approving high-risk changes and stopping work. Adds the agent
safeguards this relies on: cross-agent approval, a merge queue as the
last gate, revert-first on a red main, the agent:stop label, and the
earlier claim, identity and comment rules.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: bound agent decisions, define stop scope and align approval format

Keep scope and exception decisions within the recorded delegation and the
Issue's direction, require the Issue owner's approval before expanding
scope, and list the controls no agent may waive. A stop on an Issue now
also covers its linked PRs, queued merges and delegated work; agents
recheck it before each side effect and do not act when the state is
unknown.

An Approve keeps LGTM alone on its first non-empty line and puts the
identity line next; the review skill now says the same. Agents may submit
formal reviews without a separate human delegation.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: keep the non-waivable list to the key gates and add decider rules

Leave scope decisions within an Issue's direction to the agent, recorded
with a reason, and send only a change of direction back to the owner, so
agents wait on people less. The list of controls no agent may waive keeps
four items: independent review with two approvals, a human Approve for
high-risk changes, agent:stop and permission/ruleset controls.

Add one deciding agent per Issue, Comment-only reviews by agents on
high-risk PRs, and one formal reviewer agent per account. A claim without
a stated time allows 24 hours. Separate agent accounts stay a proposal,
starting with a Dong-bot pilot.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: tie Issue governance to assignee and status labels

Name the assignee as the accountable owner and the formal agent working
for that account as the deciding agent; with several agents under one
account only its formal agent decides. Unassigned Issues are not started.

In the labels table, status:proposed means discussion only, and work
starts at status:accepted, when the direction is settled. Discussion within
the direction continues and the deciding agent settles it with a reason;
a change of direction goes back to the Issue owner. agent:stop applies at
any status.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: rename the stop label to bot:stop, adopt bot:reviewed and make the merge queue conditional

Rename agent:stop to bot:stop so the stop switch fits the group:value rule.
Manage bot:reviewed in labels.json as an informational agent review mark and
drop the external-labels exception, its check and its tests: the app that
owned bot-reviewed has not applied it since 2026-11-04. Make the merge queue
paragraph conditional on the queue being enabled; until then the current
ruleset and merge controls apply.

The repository rename of bot-reviewed and the creation of bot:stop happen
after this PR merges, so the nightly drift check does not report them early.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: keep the external-labels exception until the label migration

Restore .github/external-labels.json, its check, its tests and its
paragraph in the collaboration guide, partly reverting the previous
commit, and drop bot:reviewed from labels.json and the labels table.
Moving bot-reviewed to a managed bot:reviewed label is left to the
label-reduction PR, so the exception stays until that migration lands.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: have maintainers merge high-risk PRs and settle when bot:stop applies

High-risk PRs still need two approvals, one from a human maintainer, but
agents no longer approve, merge or queue them: a human maintainer merges
each one, because on shared accounts an approval cannot prove a human gave
it. Counting approvals returns once agents have their own accounts.

Say when bot:stop becomes usable and that an Issue owner's stop comment
counts until then. Drop the promise that a stop also halts queued merges:
there is no queue yet, and whoever enables one names who removes stopped
entries and verifies it. During rollout the accountable owner is the one
the Issue records, falling back to the assignee.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: keep comment stop requests in effect until lifted or moved to bot:stop

A human's stop comment on an Issue or PR no longer expires once the
bot:stop label exists: it holds until a human lifts it there or bot:stop
is added to the same object, and every pre-push, review and merge
recheck looks for both. A final stop check before queueing becomes part
of enabling a merge queue. AGENTS.md now names the recorded owner, with
the assignee as fallback, instead of an assigned Issue.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: count maintainer-account approvals on high-risk PRs and track them after the fact

Apply the policy change recorded on #570: high-risk PRs still need two
independent approvals with at least one from a maintainer account, whose
agent may give it; the approval and the merge carry identity lines for
later audit, and misuse is reverted, recorded and tightened after the
fact. Withdraw the human-maintainer Approve and personal-merge rules and
the separate-account pilot proposal.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: list the audit fields for high-risk merges and record recovery for irreversible effects

Per the #570 policy change, the high-risk merge comment lists the reviewed
head, the approving accounts with review links, and the merge SHA and
account; maintainer authority is the repository permission at merge time.
Changes whose external effects a revert cannot undo state the recovery
owner and containment steps on the PR beforehand.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: make the audit and recovery lines agent-written fixed fields and count outside authors' votes

The merging agent writes a fixed merge-audit line at merge time, and the
author or its agent writes a fixed recovery line in the PR body when a
revert cannot undo an external effect; reviewer agents request it when
missing, with no new approval gate. A maintainer account is one with write
access when it acts; for an outside author both approvals come from
maintainer accounts. No step waits on a human, so a bot pipeline can check
these rules later.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: record the maintainer approver in the merge-audit line

The merge-audit line now names the approving account that held repository
write permission at merge time, so an audit can tell which approval carried
maintainer authority.

Agent-assisted-by: DSH / deepseek-v4.1-flash (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: check stop comments in review-pr and say who lifts a stop

The review skill now checks unlifted human stop comments as well as the
label and does not submit when it cannot tell, matching the guide, so
this PR is consistent if it merges before the skills PR. The guide says
only the human who posted a stop or a maintainer account may lift or
migrate it, recorded by a comment on the same Issue or PR, and that a
stop stays in effect when the evidence is unclear.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: require an Admin-role approval on high-risk PRs

At least one of the two high-risk approvals now comes from an account
whose repository role is Admin at merge time (its agent may give it);
Maintain and Write accounts still count toward the two but not as that
one. Write access no longer makes an account a maintainer. The
merge-audit line records admin=@<login> as verified at merge time.
Decision: #570 (issuecomment-7078247553).

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: take the high-risk approval from a named approver list

At least one of the two high-risk approvals now comes from an account
on .github/high-risk-approvers.json (david6666666, zengchuang-hw,
amy-why-3459, Dong1017, hsliuustc0106) that still has write access at
merge time; its agent may give it. Other accounts count toward the two
but not as that one. Changing the list is itself a high-risk change.
The merge-audit line records approver=@<login>. This replaces the
Admin-role rule.
Decision: #570 (issuecomment-7078872219).

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: pin the effective approver list and align who lifts a stop

The PR that creates .github/high-risk-approvers.json is approved once
against the five accounts recorded in #570 under the existing
repository controls. After that only the copy in the protected main
commit the merging agent verifies right before the merge counts, never
the PR head or a stacked branch, so a list change is judged by the
list in effect before it. If the list or the approver's write access
cannot be read, the agent does not merge. The merge-audit line gains
list=<sha>. review-pr points to the same rule.

The stop rule, the labels table and the bot:stop description now say
the same thing: a human adds the label (or a maintainer account's agent
for a human, linking that request), and the human who stopped or a
maintainer account, including its agent, lifts it.
Review: #571 (12:16Z zengchuang-hw, 12:17Z Dong1017).

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: keep lifting a stop human-only and say what list= records at bootstrap

Only a human lifts a stop: the human who stopped the work or a
maintainer acting in person, never an agent, including a maintainer
account's agent, as decided on #570 and left unchanged by the later
amendment. Adding the label for a human or migrating a recorded human
stop comment keeps the stop in force and is not lifting it, so a
maintainer account's agent may still do either. The labels table row
and the bot:stop description say the same.

For the one-time bootstrap merge, which has no list on main,
merge-audit records list=bootstrap-570 and links the #570 record.
Review: #571 (12:56Z zengchuang-hw).

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: let a cursor[bot] approval count as one vote on non-high-risk PRs

A bot reviewer went offline for budget limits, which left PRs waiting
for a second approval from an account with write access. On a PR that
is not high-risk, a cursor[bot] Approve on the current head now counts
as one of the two approvals; the other still comes from an account with
write access. A cursor[bot] Request changes is still a blocker.
High-risk PRs keep both approvals from eligible accounts with write
access and the listed approver.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: add Bounty-hunter to the high-risk approver list

Record the addition requested for the high-risk approver list. Write access for the account is being arranged separately with a repository admin; the list only accepts an approver that still has write access at merge time.

Agent-assisted-by: bothouse / jingyu (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: give each issue one parent and its own completion condition

Linked task issues listed each other as remaining work and stayed open
until a shared acceptance, so none could close on its own. Add a working
rule: at most one parent attached as a GitHub sub-issue, one-way acyclic
dependencies, only the parent lists children and holds joint acceptance,
and each child names the PR(s) or check that completes it. The scoped
task template now asks for the parent and that completion condition.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: keep cursor[bot] reviews advisory and out of the two approvals

This reverts the cursor[bot] exception from 71777a0. The main ruleset
counts only approvals from reviewers with write access, so a cursor[bot]
Approve cannot be one of the two. Its reviews stay advisory; the ruleset
does not block on its Request changes, but under these rules it is still
answered before merge.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: add linyueqian to the high-risk approver list

Record the addition requested for the high-risk approver list. The account has repository write access today; the list still only accepts an approver that has write access at merge time.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* Revert "docs: give each issue one parent and its own completion condition"

This reverts commit da07c31.

The issue parent, dependency and completion rule was not settled in
#570 and does not belong in this PR. It moves to its own PR from main,
where the scoped task template also says a standalone task may leave
the parent blank.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: fall back to the assignee as owner only when exactly one is set

GitHub Issues can have several assignees, and the rollout fallback did
not say which of them owns scope changes and exceptions. Use the
assignee as accountable owner only when exactly one is set; with
several (or none) and no recorded owner, the Issue has no accountable
owner until one is recorded explicitly.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: recheck GitHub's merge state for an advisory Request changes

A cursor[bot] review is advisory under these rules, but GitHub can
still report the PR as blocked by its Request changes (as on #441).
Instead of saying the ruleset never blocks on it, recheck GitHub's
merge state on the current head before merging; if the advisory review
still blocks, clear it the way a blocking Request changes is cleared
and record who dismissed it and the disposition of each point.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: check a stop on every ancestor Issue before acting

A stop on a parent Issue covers its sub-issues and their PRs, so the
action-time check now walks each linked Issue's sub-issue parent chain.
If any Issue in that chain cannot be read, the agent treats the work as
stopped and records the unreadable Issue on the PR.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: limit the stop check to the governing chain and its real ancestors

The stop check now covers the PR, the Issues that govern or delegated the
work (the PR body's Refs/Closes scope source, or where the work was
delegated) and their sub-issue ancestors. An Issue linked only as
background is outside the chain, so it neither stops the work nor has to
be readable, while an unreadable Issue inside the chain still stops it.
Two examples state the expected outcome.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: count formal Approve reviews and use the guide's stop check in review-pr

Align with #440 and the open #607: the two approvals are formal GitHub
Approve reviews from distinct eligible accounts on the current head; the
review body's wording, including LGTM, no longer counts. The identity
line now starts every comment and review. The independent-approvals
observer section says it is advisory, not an approval count, and is
removed by #607. review-pr now applies the guide's full stop check
instead of naming only the PR and its governing Issue.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: fix the comment order — identity line first, then the conclusion

Working rule 8 asked comments to start with a one-line conclusion while
AGENTS.md and the review-pr example start every comment and review with the
acting-agent identity line. State one order: the identity line is the first
line, the one-line conclusion the first substantive line after it.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: add collaboration skills and slim the agent entry page (#572)

* docs: add collaboration skills and slim the agent entry page

Agents each read the collaboration guide and applied it differently,
because review-pr was the only collaboration skill. Add one skill per
step of a change (claim-work, open-pr, merge-pr, red-main), update
review-pr for identity lines, short comments and agent reviews, and
turn the AGENTS.md collaboration part into one-line pointers. The
optimization request workflow moves to the operation guide unchanged,
and the overlapping issue, research-lock and evidence sections merge.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: check assignee, status and stacked base in the claim and merge skills

claim-work now checks that the Issue has an assignee and status:accepted,
and that the claimer is the deciding agent or works under its delegation,
before claiming. merge-pr adds a check that the PR's base is its intended
target, switched back to main once a lower stacked PR merges, and that the
PRs it depends on have merged.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: use bot:stop and complete the merge-pr preconditions

Rename agent:stop to bot:stop in the skills and the entry page. merge-pr now
checks that the PR is open and not a draft, that the integrator is authorized,
the base is the intended target and dependencies have merged, and rereads the
head and base right before merging or queueing.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: leave high-risk merges to maintainers and recheck base and approvals in merge-pr

The merge skill now reports a high-risk PR as needing a human maintainer
to merge and never as merge-ready, matching the collaboration guide.
Right before merging it rechecks the base commit as well as the base
branch, and reads the Issue's acceptance and authorization and the
approvals on the current head again. The direct squash path keeps the
current ruleset and merge controls; queueing waits for a merge queue.
Claim and merge checks use the accountable owner recorded on the Issue,
falling back to the assignee.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: honor unlifted stop comments in the claim, review and merge skills

The skills now treat a human's stop comment on the PR or its governing
Issue like bot:stop until a human lifts it or adds the label there, and
merge-pr rechecks both right before merging, matching the guide.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: let maintainer accounts approve and agents merge high-risk PRs in the skills

Follow the #570 policy change: review-pr lets a maintainer account, including
its agent, give the maintainer approval on a high-risk PR, and merge-pr check
9 now only requires at least one approval from a maintainer account before
the normal flow. AGENTS.md drops the human-merge wording.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: list the audit fields in the merge-pr record for high-risk PRs

The merge record comment on a high-risk PR lists the reviewed head, the
approving accounts with review links, and the merge SHA and merging
account, matching the guide.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: have the skills write the fixed merge-audit and recovery lines and count outside authors' votes

merge-pr writes the merge-audit line itself right after a high-risk merge
and, for an author without write access, counts only maintainer-account
approvals; open-pr adds the recovery line when a revert cannot undo an
external effect, and review-pr requests it when missing.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: record the maintainer approver in the merge-audit line

The merge-pr record now has the maintainer field from the guide, naming
the approving account that held repository write permission at merge time.

Agent-assisted-by: DSH / deepseek-v4.1-flash (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: bind the merge to the checked head and verify recovery in merge-pr

merge-pr now squash-merges with the checked head as the expected head
(--match-head-commit, or sha on the REST endpoint) and starts over if
GitHub refuses it, and its final reread also rechecks open Request
changes reviews. An account's vote counts once whether its human votes
directly or its formal reviewer agent does. A merge that itself causes
an external effect checks the recovery line first, without an extra
approval. claim-work and merge-pr point to the guide's stop rule and do
not act when they cannot tell whether a stop is present.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: let a maintainer account's agent integrate in merge-pr

The integration path no longer says only a human maintainer: you may
integrate when you act for a maintainer account.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: require and verify an Admin-role approval in merge-pr

On a high-risk PR, merge-pr now needs one approval from an account whose
repository role is Admin, checked right before merging with the
collaborator permission API (role_name must be admin); Maintain and
Write approvals count toward the two but not as that one. The
merge-audit line records admin=@<login>. review-pr and AGENTS.md say
the same. Decision: #570 (issuecomment-7078247553).

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: check the high-risk approver list in merge-pr

Check 9 now reads .github/high-risk-approvers.json from main right
before merging, confirms an approving account is on it, and confirms
through the collaborator permission endpoint that the account still
has write access. The merge-audit line records approver=@<login>.
review-pr and the AGENTS.md merge entry follow the list instead of
the Admin role.
Decision: #570 (issuecomment-7078872219).

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: read the approver list at the checked main commit in merge-pr

Check 9 now reads .github/high-risk-approvers.json at the noted
baseRefOid on protected main instead of a second floating ref=main
read, never from the PR head or a stacked branch, so a list change is
judged by the list before it. If the list or the permission cannot be
read, do not merge. The bootstrap stays in the guide and is linked,
not repeated. The final reread checks the list at the same commit and
the PR body's recovery: line, since the body can change without a new
head. merge-audit gains list=<baseRefOid>. review-pr points to the
same rule.
Review: #572 (12:18Z Dong1017, 12:19Z zengchuang-hw).

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: name the bootstrap list= value in merge-pr

The merge-audit list= field is the baseRefOid the list was read from,
or list=bootstrap-570 only for the one-time bootstrap merge described
in the guide.
Review: #571 (12:56Z zengchuang-hw).

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: accept a cursor[bot] approval as one vote in merge-pr on non-high-risk PRs

Check 5 now accepts a cursor[bot] Approve on the current head as one of
the two approvals when check 9 finds the PR is not high-risk; the other
still comes from an account with write access, and a cursor[bot]
Request changes is still handled as a blocker. On a high-risk PR, or
when that cannot be told, it does not count. The AGENTS.md review and
merge lines say the same.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: drop the cursor[bot] vote from merge-pr

This reverts 8d25b9d. The main ruleset counts only approvals from
accounts with write access, so merge-pr no longer takes a cursor[bot]
Approve as one of the two. Its Request changes is still handled under
check 7.

Agent-assisted-by: Claude Code / claude-opus-5-5 (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: split binding and advisory Request changes in merge-pr

The guide makes cursor[bot] reviews advisory, but check 7 and the final
reread still required every Request changes to be turned into Approve
or dismissed, so a reasoned answer to an advisory review could never
clear it. Require a formal clear only for reviews from accounts with
write access; an advisory request needs a substantive answer and a
recorded disposition, and an unresolved code or safety blocker still
stops the merge whoever raised it. Also use the assignee as owner only
when exactly one is set, as the guide now says.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: dismiss an advisory review that GitHub still blocks on in merge-pr

Follow the guide: an advisory review such as cursor[bot]'s still needs
a substantive answer and a recorded disposition, and if GitHub's merge
state still shows the PR blocked by it on the current head, someone the
guide allows dismisses it with the reason recorded before merging. The
final recheck now includes GitHub's merge state.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: check a stop on every ancestor Issue in the collaboration skills

merge-pr, review-pr and claim-work now check the PR, its linked Issues and
each Issue's sub-issue parent chain for a stop, and treat an unreadable
chain as stopped, matching the stop rule in the collaboration guide.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: use the guide's stop check in the collaboration skills

claim-work, review-pr and merge-pr now point to the guide's single stop
check and its stop chain (governing or delegating Issues and their real
ancestors) instead of each naming its own scope, so a background link no
longer blocks a review or merge while a stopped parent still does.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: count formal Approve reviews in merge-pr, not their body text

Align the merge and review entries with #440 and the open #607: two
formal Approve reviews from distinct eligible accounts on the current
head; the body's wording, including LGTM, is not a counting condition.
The other merge checks are unchanged.

Agent-assisted-by: bothouse / claude (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

---------

Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

* docs: guard collaboration merges against state changes

Keep native auto-merge off for managed PRs and protect the high-risk approver list through integration.

Agent-assisted-by: Codex (implementer)
Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>

---------

Signed-off-by: Dong1017 <55723162+Dong1017@users.noreply.github.com>
@Dong1017
Dong1017 deleted the fix/count-formal-approve-reviews branch November 24, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:process Repo-wide process, governance, privacy and security rules kind:task Bounded delivery task with a delegated slice

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants