You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Keep two formal Approve reviews required by the native main ruleset #440
Keep the approval requirement for PRs into main in GitHub’s protect-main ruleset, with required_approving_review_count: 2. Two distinct eligible reviewers must each submit Approve through GitHub’s PR review. GitHub determines whether each approval is still valid.
This decision supersedes the earlier plan in this thread to lower the native approval count and promote the independent-approvals observer from #441 to a required check. Remove the advisory observer, its review-event workflow and its commit status in #607. The native ruleset owns approval enforcement. GitHub’s existing handling of Request changes continues to apply.
Acceptance
Reviews on a PR
Expected result for the approval requirement
Two eligible reviewers each submit Approve, with empty review bodies or wording of their choice
Satisfied
One eligible reviewer submits Approve and another comments LGTM
One approval. A second Approve is still required.
Two reviewers comment LGTM or submit Comment reviews containing PASS
Zero approvals. Two Approve reviews are still required.
Review text has no role in the approval count. Meeting the two-approval requirement satisfies only that part of the ruleset. PR-only integration, stale-review dismissal, required checks including knowledge-model-policy, and the other branch protections continue to apply.
Thanks, the scope is clear. Here is what I checked against the current setup, and a few points I think the implementation and the cutover need to cover.
Current state. The protect-main ruleset (25528020) has a pull_request rule with required_approving_review_count: 2 and dismiss_stale_reviews_on_push: true, and required_status_checks contains only knowledge-model-policy (integration 15368). .agents/skills/review-pr/SKILL.md L71–74 describes this native two-approval rule. With the native rule, an outstanding Request changes from a write-access reviewer blocks the merge, which is the veto this issue wants to remove. As far as I know there is no ruleset switch to keep the approval count but ignore Request changes. So I assume the plan is: keep "require a pull request", lower the native count, and move the "two eligible approvals" logic into the new trusted check, made required. Please confirm that's the intended design. Also, in the verification, please confirm that with the lowered count an open Request changes really no longer blocks. I'm not sure GitHub behaves that way with a count of 0, so it should be tested rather than assumed.
Cutover order. Add the new check to required_status_checks (bound to the GitHub Actions integration, like knowledge-model-policy, so a plain commit status can't satisfy it) and see it pass and fail correctly on real PRs before lowering the native count. At no point should both gates be off. Please also record the ruleset before and after (JSON) in the issue, and confirm the bypass list is unchanged.
Points the check should define explicitly
Trust boundary. Run it like knowledge-model-policy.yml, i.e. pull_request_target, plus pull_request_review (submitted/edited/dismissed). It should never check out or execute PR code, and it should read reviews only through the API. It must re-run when a review arrives, not just on push. Otherwise a check that failed on push stays red after two approvals, or the reverse.
Current head. Count only reviews whose commit_id equals the current head SHA. Once the native count is lowered, dismiss_stale_reviews_on_push no longer protects the gate, so the check itself must enforce this.
One vote per reviewer, latest state wins. For each account, take the latest review that is APPROVED or CHANGES_REQUESTED. A later COMMENTED shouldn't erase an approval (GitHub's own semantics). DISMISSED doesn't count. This covers "a reviewer changing their own vote no longer contributes an approval".
Eligibility. Please state the mechanical rule: for example, write/maintain/admin permission at evaluation time, not the PR author, and how bot accounts are treated. Should a commit author or co-author on the PR also count as non-independent? SKILL.md L61–62 says "eligible independent account with recorded … delegation", but the check can probably only test permission and authorship. That gap should be written down.
LGTM. First non-empty line equals exactly LGTM (case-sensitive, after trimming whitespace/CRLF), evaluated on the review body's current text, because review bodies can be edited after submission.
Verification matrix I'd expect before the switch: 1 approval → fail; 2 eligible approvals → pass; 2 approvals + an open Request changes from a third reviewer → pass (with the Request changes still visible); approve, then the same reviewer requests changes → that vote counts 0; approval on an old head → not counted; lgtm or LGTM! → not counted; PR author's or ineligible account's approval → not counted; new push after 2 approvals → fail until re-approved.
Docs. SKILL.md L71–74 (and any contributor doc that describes the native rule) should be updated in the same change, so the documented gate matches the live one after cutover.
Decision — Confirm cutover design matrix; live switch blocked on #441 (Dong-bot as @Dong1017 delegate)
Recorded 2026-11-16. Authority: Dong-bot decision authority for @Dong1017 accept/decide. Thread basis: Amy design/cutover matrix (6872775957); implementation PR #441 head d61345347ad352c25cbd24e795e07f654bbbab21 (Amy CHANGES_REQUESTED).
Confirmed — intended design
Yes: keep require a pull request; lower the native required_approving_review_count; move “two distinct, eligible, current-head approvals with first non-empty line exactly LGTM” into a required trusted check (bound to the GitHub Actions integration, same shape as knowledge-model-policy). Preserve the other main protections. Request changes stays visible; once the native count no longer enforces it, an open Request changes must not veto merge — verify that behaviour with the lowered count rather than assuming it (Amy’s note).
Confirmed — cutover order
Land and exercise the check on real PRs (qualifying + non-qualifying) before any ruleset weakening.
Add the check to required_status_checks (GHA-bound) and see pass/fail correctly.
Then lower the native approving-review count.
Verify the merge box (incl. “2 approvals + open Request changes from a third reviewer → still mergeable”).
Record before/afterprotect-main ruleset JSON in this Issue; confirm bypass list unchanged.
At no point may both gates be off.
Confirmed — check semantics (Amy points 1–5)
Point
Steward confirm
Trust boundary
Trusted pull_request_target + pull_request_review (submitted/edited/dismissed); never check out/execute PR code; read reviews via API only; must re-run on review events
Current head
Count only reviews whose commit_id equals current head SHA
One vote / latest wins
Per account, latest APPROVED or CHANGES_REQUESTED; later COMMENTED does not erase; DISMISSED does not count
Eligibility
Mechanical rule at evaluation time: write/maintain/admin; not the PR author; exclude commit authors/committers on the PR. Document the gap vs SKILL “independent delegated account” language. Bot/App write approvals: decide explicitly in #441 (exclude [bot]/App with a test, or document that they count and why) — open CR item, not waived here
LGTM
First non-empty line equals exactly LGTM (case-sensitive, trim whitespace/CRLF) on the review body’s current text
Confirmed — verification matrix (pre-switch bar)
Accept Amy’s matrix as required before the live switch: 1 approval → fail; 2 eligible → pass; 2 + open Request changes (third reviewer) → pass with Request changes still visible; same reviewer approve→request changes → that vote counts 0; old-head approval → not counted; lgtm / LGTM! → not counted; author/ineligible → not counted; new push after 2 approvals → fail until re-approved. Plus Amy’s #441 CR follow-ups on spoofability and docs during the rollout window.
Docs
Update .agents/skills/review-pr/SKILL.md and docs/agent-collaboration.md so the documented gate matches the live gate after cutover. During the merge→cutover window, keep current Request-changes clearing guidance marked “until cutover” (or land the doc change with the ruleset switch) — matches #441 CR item 3.
Blocked — concrete next step
Live ruleset cutover remains blocked on #441 (CHANGES_REQUESTED at d6134534).
Next action:@zengchuang-hw address Amy’s CR items 1–3 on #441 (status spoofing proof or mitigation; bot/App eligibility rule + test/docs; until-cutover Request-changes docs), push, and request re-review. Steward will post ruleset before/after JSON and authorize the live switch only after #441 is merge-ready and the check has been proven on real PRs per the order above.
Status
Scope was already requester-accepted; labeling status:accepted for the confirmed design. Cutover execution is gated on #441, not on further design TBD.
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).
Decision: the formal cutover needs an exclusive trusted writer, and the shared github-actions[bot] identity (integration 15368) does not qualify. #441 can be reviewed as the observer phase on that basis. The native two-approval rule stays on ruleset 25528020 until the writer exists. The seed names no App ID, owner or date, so I'm not inventing them.
Accepted
A creator check is only for deduplication and is not proof of source. Any other workflow with checks/statuses: write could forge a pass under the shared identity.
A dedicated GitHub App, used by no other workflow, writes the check. Its App ID is set as the source of the required check in protect-main.
The App credential is reachable only by the approval-check workflow. The workflow never checks out PR code.
Real-PR negative proofs: a forged success from an external actor, and from another Actions workflow, must not satisfy the gate. Also your list: recheck after permission revocation, two approvals plus an open Request changes, merge box, ruleset JSON before and after, bypass list unchanged.
If any item is missing, the native rule stays.
Still open: a named config owner and schedule for creating the App. @Dong1017 or a repo admin should name them here. #440 stays blocked on that.
Details
This follows the earlier cutover-order decision on this thread: add the check first, lower the native count second, and never have both gates off. It adds only the source-binding prerequisite. Dong-bot (authorized delegate) recorded this from the thread. I did not read #441's diff or run anything. Code review and unit tests are not security verification.
flowchart LR
A["Review / PR events"] --> B["Trusted main reconciler"]
B --> C["Live head, review and permission reads"]
C --> D["Advisory approval status"]
D -.-> E["Native merge rules remain active"]
Loading
Delivered:Add an advisory independent-approval observer before cutover #441 squash-merged as actual main aacf55060ec606f82aede30dd716034759e69a8f. Signal workflow executes no PR code; writer checks out trusted main. Review count excludes author/commit contributors, Bot/App/unknown actors, stale heads, malformed LGTM and duplicate accounts. Shared-head split reconciliation includes the former SHA. This does not mechanically prove every issue-specific parent role or named review seat; the integrator still verifies those facts.
Limits:Keep two formal Approve reviews required by the native main ruleset #440 stays open. No exclusive writer/source binding, credential isolation, live spoof/revocation/dissent verification, merge-box/ruleset cutover or atomic merge-time permission guarantee is claimed. The shared Actions creator check is deduplication only. Advisory failure is not a new required merge check; native review and declaration rules remain active.
Integration record
Two eligible independent current-head formal LGTM accounts: Jiang 6016681941 and Dong 6016776887; live write+ permissions rechecked. Cursor Request changes 5902400079 was natively dismissed by Dong1017 at 06:55:50 UTC under that account's recorded request, after its independent reviews documented all fixes; the author did not dismiss it. The original review and dismissal reason remain visible. Scope-specific independence decisions 7091413632 / 7091506000 / 7091530223 apply to this phase-1 slice only; they do not waive #565 seats or another delivery's actual parent exclusion.
@zengchuang-hw proposal for the independent-approvals observer (#441), before anything is changed. Please confirm or adjust.
Problem. The observer requires the Approve body's first non-empty line to be exactly LGTM (case-sensitive). On its first live run, on #600, a genuine current-head Approve from a write-access, independent reviewer (dot's PASS) was not counted. Exact text matching breaks on wording, templates and casing ("LGTM.", "lgtm", "PASS", a bot header line), so as a future gate it would reject real approvals and push reviewers into ritual formatting.
Proposal. Let GitHub's review state be the verdict, and keep text only as a safety net:
Count an approval when it is a formal Approve on the current head, from a GitHub User with write access or higher, who is not the PR author or a commit author/committer (all unchanged from today).
Drop the exact-LGTM requirement.
Safety net: do not count an Approve whose first non-empty line states a negative verdict (DO NOT PASS, NO PASS, case-insensitive), and surface it in the status description as a contradictory review, so a mis-clicked Approve cannot pass.
Docs: docs/agent-collaboration.md keeps asking reviewers for an explicit PASS / DO NOT PASS verdict, but says the observer reads the Approve / Request changes state, not a fixed spelling.
The rest of the observer (bot/App exclusion, fresh reads before merge, later opinionated vote replaces earlier, advisory until the ruleset cutover) stays as is. If you agree, I'll open a small PR with the change and tests covering LGTM, PASS, an empty body, a bot header line, and a contradictory DO NOT PASS Approve.
changed the title [-]Require two independent approvals without a Request changes veto[/-][+]Keep two formal Approve reviews required by the native main ruleset[/+]on Nov 23, 2026
Activity
amy-why-3459 commentedon Nov 14, 2026
Thanks, the scope is clear. Here is what I checked against the current setup, and a few points I think the implementation and the cutover need to cover.
Current state. The
protect-mainruleset (25528020) has apull_requestrule withrequired_approving_review_count: 2anddismiss_stale_reviews_on_push: true, andrequired_status_checkscontains onlyknowledge-model-policy(integration 15368)..agents/skills/review-pr/SKILL.mdL71–74 describes this native two-approval rule. With the native rule, an outstanding Request changes from a write-access reviewer blocks the merge, which is the veto this issue wants to remove. As far as I know there is no ruleset switch to keep the approval count but ignore Request changes. So I assume the plan is: keep "require a pull request", lower the native count, and move the "two eligible approvals" logic into the new trusted check, made required. Please confirm that's the intended design. Also, in the verification, please confirm that with the lowered count an open Request changes really no longer blocks. I'm not sure GitHub behaves that way with a count of 0, so it should be tested rather than assumed.Cutover order. Add the new check to
required_status_checks(bound to the GitHub Actions integration, likeknowledge-model-policy, so a plain commit status can't satisfy it) and see it pass and fail correctly on real PRs before lowering the native count. At no point should both gates be off. Please also record the ruleset before and after (JSON) in the issue, and confirm the bypass list is unchanged.Points the check should define explicitly
knowledge-model-policy.yml, i.e.pull_request_target, pluspull_request_review(submitted/edited/dismissed). It should never check out or execute PR code, and it should read reviews only through the API. It must re-run when a review arrives, not just on push. Otherwise a check that failed on push stays red after two approvals, or the reverse.commit_idequals the current head SHA. Once the native count is lowered,dismiss_stale_reviews_on_pushno longer protects the gate, so the check itself must enforce this.APPROVEDorCHANGES_REQUESTED. A laterCOMMENTEDshouldn't erase an approval (GitHub's own semantics).DISMISSEDdoesn't count. This covers "a reviewer changing their own vote no longer contributes an approval".LGTM. First non-empty line equals exactlyLGTM(case-sensitive, after trimming whitespace/CRLF), evaluated on the review body's current text, because review bodies can be edited after submission.Verification matrix I'd expect before the switch: 1 approval → fail; 2 eligible approvals → pass; 2 approvals + an open Request changes from a third reviewer → pass (with the Request changes still visible); approve, then the same reviewer requests changes → that vote counts 0; approval on an old head → not counted;
lgtmorLGTM!→ not counted; PR author's or ineligible account's approval → not counted; new push after 2 approvals → fail until re-approved.Docs. SKILL.md L71–74 (and any contributor doc that describes the native rule) should be updated in the same change, so the documented gate matches the live one after cutover.
Dong1017 commentedon Nov 16, 2026
Decision — Confirm cutover design matrix; live switch blocked on #441 (Dong-bot as @Dong1017 delegate)
Recorded 2026-11-16. Authority: Dong-bot decision authority for
@Dong1017accept/decide. Thread basis: Amy design/cutover matrix (6872775957); implementation PR #441 headd61345347ad352c25cbd24e795e07f654bbbab21(Amy CHANGES_REQUESTED).Confirmed — intended design
Yes: keep require a pull request; lower the native
required_approving_review_count; move “two distinct, eligible, current-head approvals with first non-empty line exactlyLGTM” into a required trusted check (bound to the GitHub Actions integration, same shape asknowledge-model-policy). Preserve the other main protections. Request changes stays visible; once the native count no longer enforces it, an open Request changes must not veto merge — verify that behaviour with the lowered count rather than assuming it (Amy’s note).Confirmed — cutover order
required_status_checks(GHA-bound) and see pass/fail correctly.protect-mainruleset JSON in this Issue; confirm bypass list unchanged.At no point may both gates be off.
Confirmed — check semantics (Amy points 1–5)
pull_request_target+pull_request_review(submitted/edited/dismissed); never check out/execute PR code; read reviews via API only; must re-run on review eventscommit_idequals current head SHAAPPROVEDorCHANGES_REQUESTED; laterCOMMENTEDdoes not erase;DISMISSEDdoes not count[bot]/App with a test, or document that they count and why) — open CR item, not waived hereLGTMLGTM(case-sensitive, trim whitespace/CRLF) on the review body’s current textConfirmed — verification matrix (pre-switch bar)
Accept Amy’s matrix as required before the live switch: 1 approval → fail; 2 eligible → pass; 2 + open Request changes (third reviewer) → pass with Request changes still visible; same reviewer approve→request changes → that vote counts 0; old-head approval → not counted;
lgtm/LGTM!→ not counted; author/ineligible → not counted; new push after 2 approvals → fail until re-approved. Plus Amy’s #441 CR follow-ups on spoofability and docs during the rollout window.Docs
Update
.agents/skills/review-pr/SKILL.mdanddocs/agent-collaboration.mdso the documented gate matches the live gate after cutover. During the merge→cutover window, keep current Request-changes clearing guidance marked “until cutover” (or land the doc change with the ruleset switch) — matches #441 CR item 3.Blocked — concrete next step
Live ruleset cutover remains blocked on #441 (
CHANGES_REQUESTEDatd6134534).Next action: @zengchuang-hw address Amy’s CR items 1–3 on #441 (status spoofing proof or mitigation; bot/App eligibility rule + test/docs; until-cutover Request-changes docs), push, and request re-review. Steward will post ruleset before/after JSON and authorize the live switch only after #441 is merge-ready and the check has been proven on real PRs per the order above.
Status
Scope was already requester-accepted; labeling
status:acceptedfor the confirmed design. Cutover execution is gated on #441, not on further design TBD.zengchuang-hw commentedon Nov 22, 2026
已按 #441 的检视修正并同步 main,当前头
d5c6b9ccf236653c115189fcc407228a44e0b15a:恢复仍然生效的 Request changes 清除流程,review skill 与 main 完全一致;明确排除 Bot/App/未知 actor,补同 head 撤销权限后重新核对的回归。独立审批与 knowledge-policy 组 218 passed,Ruff 和当前 PR 增量空白检查通过。PR 定位已收窄为 advisory observer 的第一阶段交付,未更改现行 ruleset。当前 read-only ruleset 25528020 仍要求原生两票,必需状态仅 knowledge-model-policy;没有提前削弱保护。
仍需维护者决定的具体前置:可信状态源。 从 GitHub 的 workflow token 权限 与 required check 指定来源 App 规则推导,共享 github-actions[bot] 身份本身不能证明是哪一个 workflow 写入状态。当前实现的 creator 检查仅用于去重,不能作为安全来源证明。
@Dong1017 请确认正式 cutover 可使用的独占可信 writer(例如独立 App 及其绑定 ID),或记录配置责任人与排期。当前 PR 可按原分阶段方案先审 observer;正式切换仍必须完成外部 actor/其他 Actions workflow 伪造成功状态均不能满足 gate 的真实负测、撤销权限重查、两票加异议用例、merge box 和 ruleset 前后核对。缺任一项就保留原生规则,不把代码检视或单测当成安全验证完成。
Dong1017 commentedon Nov 22, 2026
Posted by Dong-bot, an automated agent acting on behalf of @Dong1017 (always-on-bot, model claude-sonnet-5-5).
Decision: the formal cutover needs an exclusive trusted writer, and the shared github-actions[bot] identity (integration 15368) does not qualify. #441 can be reviewed as the observer phase on that basis. The native two-approval rule stays on ruleset 25528020 until the writer exists. The seed names no App ID, owner or date, so I'm not inventing them.
Accepted
checks/statuses: writecould forge a pass under the shared identity.Required before the live switch
protect-main.Still open: a named config owner and schedule for creating the App. @Dong1017 or a repo admin should name them here. #440 stays blocked on that.
Details
This follows the earlier cutover-order decision on this thread: add the check first, lower the native count second, and never have both gates off. It adds only the source-binding prerequisite. Dong-bot (authorized delegate) recorded this from the thread. I did not read #441's diff or run anything. Code review and unit tests are not security verification.zengchuang-hw commentedon Nov 23, 2026
Delivered: advisory approval observation (phase 1 only)
aacf55060ec606f82aede30dd716034759e69a8f. Signal workflow executes no PR code; writer checks out trusted main. Review count excludes author/commit contributors, Bot/App/unknown actors, stale heads, malformed LGTM and duplicate accounts. Shared-head split reconciliation includes the former SHA. This does not mechanically prove every issue-specific parent role or named review seat; the integrator still verifies those facts.adb3d8ab, alongside the previously merged Apps CLI. Ready 45113049129 and post-merge lane 45127731627 passed. First actual-main writer 45127731620 succeeded: fix(apps): handle long WorkSwarm runtime-cache roots #604 received advisory2/2success, feat(benchmark): project P1 reports into capture drafts #5661/2failure, and ci: verify task YAML from the core wheel without extras #5760/2failure (its heading-first reviews correctly do not qualify).Integration record
Two eligible independent current-head formal LGTM accounts: Jiang 6016681941 and Dong 6016776887; live write+ permissions rechecked. Cursor Request changes 5902400079 was natively dismissed by Dong1017 at 06:55:50 UTC under that account's recorded request, after its independent reviews documented all fixes; the author did not dismiss it. The original review and dismissal reason remain visible. Scope-specific independence decisions 7091413632 / 7091506000 / 7091530223 apply to this phase-1 slice only; they do not waive #565 seats or another delivery's actual parent exclusion.
Dong1017 commentedon Nov 23, 2026
@zengchuang-hw proposal for the
independent-approvalsobserver (#441), before anything is changed. Please confirm or adjust.Problem. The observer requires the Approve body's first non-empty line to be exactly
LGTM(case-sensitive). On its first live run, on #600, a genuine current-head Approve from a write-access, independent reviewer (dot'sPASS) was not counted. Exact text matching breaks on wording, templates and casing ("LGTM.", "lgtm", "PASS", a bot header line), so as a future gate it would reject real approvals and push reviewers into ritual formatting.Proposal. Let GitHub's review state be the verdict, and keep text only as a safety net:
LGTMrequirement.DO NOT PASS,NO PASS, case-insensitive), and surface it in the status description as a contradictory review, so a mis-clicked Approve cannot pass.docs/agent-collaboration.mdkeeps asking reviewers for an explicit PASS / DO NOT PASS verdict, but says the observer reads the Approve / Request changes state, not a fixed spelling.The rest of the observer (bot/App exclusion, fresh reads before merge, later opinionated vote replaces earlier, advisory until the ruleset cutover) stays as is. If you agree, I'll open a small PR with the change and tests covering
LGTM,PASS, an empty body, a bot header line, and a contradictoryDO NOT PASSApprove.[-]Require two independent approvals without a Request changes veto[/-][+]Keep two formal Approve reviews required by the native main ruleset[/+]docs: count formal Approve reviews and use the guide's stop check in …
docs: count formal Approve reviews in merge-pr, not their body text
docs: count formal Approve reviews in merge-pr, not their body text