Repository navigation
Conversation
A pure decision over a PR snapshot with four fail-closed guards: required checks green on the head SHA, risk low, no open sibling PR touching the same files, reviewer approved and the run complete. Evidence recorded on another commit, missing or truncated counts as a failure. dryRun: false throws; there is no merge path. Each guard has a test that the PR it refuses is let through once that guard is removed.
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.
무엇
src/automation/mergeStewardGuards.ts— merge steward 의 판정만 하는 순수 함수 (AGT-4803 하위). 실제 머지·GitHub 호출·프로세스 실행 경로는 없다.가드 4개, 전부 fail-closed:
success. 빈 required 집합은 거부(AGT-4414), 다른 커밋에서만 녹색이면 거부, 같은 head 에서 재실행이 실패/pending 이면 거부.low이고 head SHA 에서 분류된 것. unknown/없음/이전 SHA 는 거부. (AGT-4804 feat(publish): classify each change's risk as low/medium/high from its final diff (AGT-4804) #884 를 import 하지 않고 같은 3단계 타입을 로컬로 둔다. PR 본문의## Risk는 worker 가 고칠 수 있어 읽지 않는다 — 입력은 run 기록에서 와야 한다.).openswarm-preserved등)은isBookkeepingPath로 제외.approve, completenesscomplete, 둘 다 head SHA 기준. 제목의[partial]도 거부. reviewer 기록이 없으면 거부(AGT-4806 이 아직 안 들어온 동안 fail-closed).evaluateMergeSteward(snapshot)은 항상 4개 전부를 돌린다.dryRun: false는 조용히 무시하지 않고 throw.headSha가 붙고,isDecisionCurrent로 head 가 바뀌면 무효.formatStewardDecision이 판정과 사유를 한 줄로 기록.왜
AGT-4803: worker·publisher 는 머지하면 안 되고(AGT-4414), 무인 공장의 머지 경로는 사람보다 엄격해야 한다. 이번 이슈는 그 판정만 dry-run 으로 먼저 만든다.
검증
npx vitest run src/automation/mergeStewardGuards.test.ts— 23 tests 통과.[partial]제목 각각 테스트.siblingWorkFormat외에는 import 하지 않고 child_process/fetch/merge 호출이 없음을 고정.npm run typecheck,oxlint0 errors.남은 것
openswarm steward --dry-runCLI 배선은 이 PR 범위 밖.