Repository navigation
fix(platform): 스택 PR 의 merge queue 재투입을 REST merge-async 로 보내고 결과를 확인한다 (#2177) - #2178
Merged
Merged
Conversation
merge-async 는 202 pending 과 uuid 를 돌려주고 결과는 GET merge-async/{uuid} 로만 보인다.
5초 간격 최대 24회 폴링해 enqueued·merged 면 성공, failed 면 예외로 job 을 red 로 남긴다.
끝까지 pending 이면 live 큐 상태를 다시 읽어 없으면 예외다.
merge-async 는 downstack 의 열린 PR 까지 함께 넣으므로, 스택 위쪽 PR 의 재투입은 아래 PR 의
판정(실패 job 이면 재투입 안 함)을 덮는다. PR base 가 스택 base 와 같은 밑단만 재투입하고,
위쪽은 마커 없는 안내 코멘트만 남긴다. decide() 판정표는 그대로다.
give-up 코멘트에 스택 여부에 맞는 수동 투입 명령을 붙이고, 결과와 스텝 요약에 스택 번호와
재투입 수단을 남긴다.
Sadturtleman
approved these changes
Oct 4, 2026
Sadturtleman
left a comment
Collaborator
There was a problem hiding this comment.
스택 밑단만 merge-async(merge_queue, sha 고정)로 재투입하고 결과를 폴링·live 재조회로 확인하는 흐름이 맞습니다. stack.baseRefName 필드도 실제 조회로 확인했습니다. 승인합니다.
koongmai
approved these changes
Oct 4, 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 #2177
읽을 곳:
.github/scripts/handle-merge-queue-dequeue.mjs의enqueueStacked,isStackBottom,handleDequeue의 requeue 분기. 테스트는 같은 이름의.test.mjs에서 "2026-09-27 #2177" 절.변경
stack { number baseRefName }를 얹는다. stack 이 null 이면 비스택이고 종전 GraphQLenqueuePullRequest경로 그대로다.PUT /repos/{owner}/{repo}/pulls/{n}/merge-async에merge_action: "merge_queue",sha: <판정한 head>로 보낸다.GET .../merge-async/{uuid}를 5초 간격 최대 24회 읽는다. enqueued·merged 면 성공, failed 면 예외로 job 이 red 로 남는다. 끝까지 pending 이면 live 큐 상태를 다시 읽어 큐에 없으면 예외다. 200(이미 큐)은 폴링 없이 끝난다.comment-stack-upper다.decide()와NO_ACTION_REASONS, 마커 선기록 순서는 바꾸지 않았다. MERGE_CONFLICT 사유는 지금처럼 한 번 재투입하고 다시 빠지면 give-up 코멘트다.gh stack merge <N> --yes, 아니면gh pr merge <N> --repo ...다.gh pr merge는 스택 PR 을 거부하고,gh stack에는--repo플래그가 없다(gh 2.85).근거
enqueuePullRequest가 UNPROCESSABLE "This pull request is part of a stack and must be enqueued using the asynchronous merge REST API" 로 죽었고, 마커 코멘트만 남아 다음 방출은 give-up 이 됐다.pullRequest.stack이 null 로 온다(build(app): app 이 직접 쓰지 않는 feature:afternote:domain 의존을 빼고 Nav2 회귀 주석을 고친다 (#2172) #2176, docs(afternote,receiver): Nav3 이관 뒤 코드와 어긋난 KDoc·주석을 고친다 (#2170) #2171, chore(deps): bump the github-actions-updates group with 4 updates (#2139) #2138 조회).merge-order-stack-integrity.mjs가 같은 필드를 이미 쓴다.검증
node --test .github/scripts/handle-merge-queue-dequeue.test.mjs31건 통과(13건에서 늘었다).node --test .github/scripts/*.test.mjs767건 중 766 통과, 1 skip, 실패 0.PUT .../pulls/2123/merge-async에 무효merge_action을 보내 422 로 허용값(default, direct_merge, merge_queue)을 확인했다. 실제 큐 투입은 쏘지 않았다.리뷰어에게
재투입(merge-async) → enqueued ...줄과mergeQueueEntry생성을 본다.CI Test Plan
{"androidTest": {"mode": "none", "reason": "CI 정책 스크립트(.github/scripts)와 그 node 테스트만 바꿨다. Android 소스, androidTest, 경계 경로 변경 없음."}}