Repository navigation
feat(factory): medium and high risk PRs merge only after one human approval on the head (AGT-4881) - #912
Open
unohee wants to merge 1 commit into
Open
feat(factory): medium and high risk PRs merge only after one human approval on the head (AGT-4881)#912unohee wants to merge 1 commit into
unohee wants to merge 1 commit into
Conversation
…proval on the head (AGT-4881) The risk guard now lets a medium or high change through when at least one reviewer's latest decisive review is APPROVED on the head SHA, is a GitHub User, is not the PR author and is not a factory account. An empty factory account list trusts no approval. The other guards still apply.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
무엇
risk 가드를 확장한다:
low는 그대로 통과,medium/high는 head SHA 에 사람 승인이 1건 이상 있을 때만 통과. 나머지 세 가드는 그대로 적용된다.사람 승인 판정(
humanApprovalOnHead):commitId == head SHA.User. 타입이 없으면 사람 아님.automationAccounts, 대소문자 무시)에 없음. 여기 agent 들은 user type 이User인 계정으로도 움직이므로 타입만으로는 증명이 안 된다. 목록이 비어 있으면 어떤 승인도 믿지 않는다(fail-closed).author,prReviews,automationAccounts필드 추가.왜
AGT-4803: low 가 아닌 변경은 자동 머지하면 안 되지만, 사람이 승인하면 steward 가 머지를 이어받아야 한다. 하위 이슈 스펙대로 "1건 이상"(상위 이슈의 "exactly one" 아님).
검증
npx vitest run src/automation/mergeStewardGuards.test.ts— 33 tests 통과 (신규 10).npm run typecheck,oxlint0 errors.남은 것