fix(crewmail): 쪽지 선점을 mkdir 게이트로 — 윈도우 rename 동시 성공(이중 배달) 근본 수정 - #237
Open
beyondworks wants to merge 4 commits into
Open
fix(crewmail): 쪽지 선점을 mkdir 게이트로 — 윈도우 rename 동시 성공(이중 배달) 근본 수정#237beyondworks wants to merge 4 commits into
beyondworks wants to merge 4 commits into
Conversation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
배경 — 윈도우 CI 간헐 실패 (run 31085690668)
test/crewmail.test.mjs"선점 경합" 테스트가 windows-latest에서 간헐 실패(actual 2 !== expected 1 — 이중 배달). 제보 가설 ①(윈도우 rename 의미론 차이 = 진짜 제품 결함) / ②(테스트 플레이크) 중 ①로 확정.근본 원인 (윈도우 CI 직접 재현으로 실증)
rename(msg.json → msg.json.claimed)단독 — "rename은 원자적이라 승자 1명" 전제.MoveFileExW단일 호출이지만(v1.51 원문 대조), **MoveFileEx 자체가 내부적으로 "소스 핸들 열기 → 핸들 기반 rename"**이라, 두 호출이 겹치면 둘 다 rename 전에 소스 핸들을 열고 — 핸들은 파일을 따라가므로 — 둘 다 성공한다.deliverCrewMail2개 동시)는 483/500 이중 배달. CI "간헐"은 두 rename의 시간적 겹침 여부일 뿐.수정
pendingBySlug)은.json/.claimed접미만 보므로.gate는 배달 대상에 혼입되지 않음.테스트
검증 (windows-latest 직접 실행, run 31087493311)
기각한 가설
🤖 Generated with Claude Code