Repository navigation
chore(ci): merge queue 방출을 자동 처리한다 — 조용한 방출은 한 번 재투입, CI 실패는 실패 job 링크 코멘트 (#1892) - #1893
Merged
Merged
Conversation
…크 코멘트 (#1892) - merge-queue-dequeue.yml: pull_request_target dequeued 에서 default branch 의 스크립트만 실행한다. PR 코드는 체크아웃하지 않는다. - handle-merge-queue-dequeue.mjs: live 상태가 정본(MERGED·CLOSED·이미 큐면 무동작). 마지막 투입 이후의 큐 브랜치 merge_group run 에 실패·타임아웃 job 이 있으면 링크 코멘트, MANUAL·ALREADY_MERGED·MERGE(D) 는 무동작, 그 밖은 같은 head 당 한 번 재투입(마커 코멘트로 횟수). 재투입 전에 마커를 먼저 남긴다. - create-ci-config.test.mjs: pull_request_target 허용 목록에 넣고 같은 불변식(권한 비움·default branch ref·PR head 미참조·secrets 미참조)을 둘 다에 건다.
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.
📌𝘐𝘴𝘴𝘶𝘦𝘴
📎𝘞𝘰𝘳𝘬 𝘋𝘦𝘴𝘤𝘳𝘪𝘱𝘵𝘪𝘰𝘯
merge queue(#1477)에 넣은 PR 은 결과를 «보러 가야만» 알 수 있었다 — 조용히 방출되면 다시 넣어 줘야 하고, merge group CI 가 실패해도 PR 화면엔 «removed from the merge queue» 만 남는다. 그래서 MERGED 를 볼 때까지 PR 을 붙잡고 있어야 했다.
pull_request_target의dequeued이벤트로 그 둘을 자동 처리한다..github/workflows/merge-queue-dequeue.yml—pull_request_target: [dequeued].stack-integrity-notify.yml과 같은 경계: default branch 의 워크플로 정의·스크립트만 실행하고 PR 코드·artifact·cache 는 체크아웃하지 않는다.permissions: {}+ job 에만actions: read·contents/issues/pull-requests: write. 토큰은github.token..github/scripts/handle-merge-queue-dequeue.mjs— 판정 순서:gh-readonly-queue/<base>/pr-<N>-*) merge_group run 에 failure·timed_out job 이 있으면 → 실패 job 링크 코멘트, 재투입 없음. 큐 브랜치 이름은 head 가 아니라 base SHA 라 며칠 전 투입의 실패 run 도 같은 접두어로 잡히므로, timeline 의AddedToMergeQueueEvent시각으로 자른다(0904 feat(afternote): 수신자 선택 반환 채널을 복수로 열어 한 번에 N명 지정 (#1426) #1582 드라이런에서 확인).reason이 MANUAL·ALREADY_MERGED·MERGE(D) 면 무동작. reason 의 열거값은 GitHub 이 문서화하지 않았고 timeline 은failed_checks·merged소문자라 대문자로 맞춰 비교한다 — 그래서 실패 여부는 reason 이 아니라 ②의 데이터로 판정한다.enqueuePullRequest. 횟수는 마커 코멘트(<!-- merge-queue-dequeue:requeued head=<sha> -->)로 세고, 마커를 먼저 남긴 뒤 재투입한다(재투입 뒤 코멘트가 실패하면 다음 방출에서 두 번째 재투입이 나간다). 같은 head 의 두 번째 방출은 재투입 없이 코멘트만. 0902 에 감시 루프가 90초마다 맹목 재투입해 30분 헛돈 사고(fix(receiver): 재진입 갱신 결선의 잔재를 지우고 결선 소실을 가드로 막는다 (#1725) #1638·refactor(core): 라디오 단품 직접 사용을 막고 그룹 API 로 유도한다 (#1728) #1639)가 «한 번까지» 의 근거다.create-ci-config.test.mjs—pull_request_target허용 목록을 둘로 늘리고, 종전에stack-integrity-notify.yml에만 걸던 불변식(권한 비움·default branch ref·PR head 미참조·download-artifact/cache 미사용·secrets 미참조)을 둘 다에 건다.실측
failed_checks였다 — 폴링이 실패 job 을 못 본 것. 이 스크립트는 job 결론을 직접 읽으므로 같은 건에서 실패 링크 코멘트를 남긴다.#1582 reason=failed_checks head=3583c34 마지막투입=2026-09-04T08:06:03Z 실패job=1 → comment-failure— 오늘 17:06 투입·17:18 방출된 실제 건이 그대로 잡힌다.로컬:
node --test .github/scripts/*.test.mjs561/561 ·actionlint·scripts/repository-quality.sh통과.🧪 CI Test Plan
{ "androidTest": { "mode": "none", "reason": "워크플로 1개·정책 스크립트 1개·정책 테스트 2개(신규 1·목록 갱신 1)만 더한다. Android 소스·androidTest·navigation 경계·매니페스트·빌드 파일·managed-device 워크플로는 건드리지 않아 계측이 검증할 대상이 없다. 판정 로직은 node --test 로 fake API 위에서 전량 고정했고 실 API 는 dry-run 으로 읽기만 확인했다." } }📷𝘚𝘤𝘳𝘦𝘦𝘯𝘴𝘩𝘰𝘵
없음 — 워크플로·스크립트만.
💬𝘛𝘰 𝘙𝘦𝘷𝘪𝘦𝘸𝘦𝘳𝘴
dequeued를pull_request가 아니라pull_request_target으로 받는 이유: 충돌 PR 은 merge ref 가 없어pull_request워크플로가 트리거되지 않는다(fix(ci): base 와 충돌한 PR 은 pull_request CI 가 트리거되지 않아 최신 커밋이 미검증으로 방치 — 충돌 자동 감지·라벨 필요 #1028). 사유 판정과 코멘트에는 PR 코드가 필요 없다.reason문자열이 로그(reason=…)에 남는다. 값이 확인되면NO_ACTION_REASONS를 그 표기에 맞춰 좁힐 수 있다.