Repository navigation
ci(merge-order-guard): 스택 PR 의 blocked_by 위반을 주석대로 경고로 낮춘다 [base: develop] - #1159
Merged
Merged
Conversation
가드 주석은 「base 가 develop/main 이 아닌 스택 PR 은 경고로만 남긴다」 고 이미 명시하고 있었다. 그런데 코드는 base 를 보고 경고 한 줄을 찍은 뒤, blocked_by 검사는 base 와 무관하게 그대로 돌려 `fail=1` 을 만들었다. 주석이 서술한 의도가 구현되지 않은 채로 남아 있었다. 그 결과가 #863 이다. base 가 `feat/735` 인 스택 PR 인데, 부모 이슈 #735 가 열려 있다는 이유로 required check 인 `guard` 가 수명 내내 red 다. 주석이 막으려던 바로 그 상태 — 「목록에서 진짜 CI 실패와 구분되지 않는다」 — 가 실제로 벌어졌다. 스택 PR 은 develop 로 직접 머지되지 않는다. base 가 develop 로 이관되는 순간 이 가드가 다시 돌아 error 로 막으므로, 경고로 낮춰도 순서 강제력은 그대로다. 실측 (가드 스크립트를 떼어내 `gh` 스텁으로 분기별 실행): base=feat/735 → exit 0, warning 2건 base=develop → exit 1, error 1건 base=main → exit 1, error 1건
Sadturtleman
approved these changes
Aug 26, 2026
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.
Closes #1059
문제
merge-order-guard.yml주석은 이미 이렇게 적혀 있다.그런데 코드는 그 의도를 구현하지 않았다.
case "$BASE_REF"로 경고 한 줄을 찍기만 하고, 이어지는blocked_by검사는 base 와 무관하게 그대로 돌아fail=1을 만든다.실제 피해자가 #863 이다. base 가
feat/735인 스택 PR 인데, 부모 이슈 #735 가 열려 있다는 이유만으로 required check 인guard가 수명 내내 red 다. 주석이 막으려던 상태가 그대로 벌어졌다.변경
stacked플래그를 세워, blocked_by 위반을 만났을 때 스택 PR 이면::warning::, base 가develop/main이면 종전대로::error::+fail=1.스택 PR 은 develop 로 직접 머지되지 않는다. base 가 develop 로 이관되는 순간 이 가드가 다시 돌아 error 로 막으므로, 순서 강제력은 그대로다.
검증
가드 스크립트를 워크플로에서 떼어내
gh를 스텁으로 갈아끼우고 base 별로 실행했다 (closing 이슈 #849 → 열린 blocker #735 시나리오):feat/735developmainother/xbash -n(가드 run 스크립트) OKnode --test .github/scripts/lint-workflow-policy.test.mjs→ 6 pass / 0 fail리뷰어에게