# v0.1.242 — QA-044 Recent/Open 세션 1회 무력화 진단 + 안전망

- 버전: v0.1.242
- 분류: 48th stable seal (v0.1.366) 일괄 봉인 사이클
- 다운로드: [factory00-windows-x64-v0.1.242.zip](../../downloads/archive/factory00-windows-x64-v0.1.242.zip) (archive 보존)
- 캡처: [qa-screenshots/v0.1.242/](../../qa-screenshots/v0.1.242/)

---

## 협업자 PM 보고
QA-044: [P0] 최우선. Open/Recent 세션당 단 1회 동작 후 무력화. 재현 100%.

## 가설별 진단 로그 추가
| 가설 | 진단 로그 패턴 |
|---|---|
| 1. silent throw (Parts.ToDictionary id 중복 등) | [QA-044 진단] ApplyTwnPayload FAIL: ArgumentException || 2. NativeFileDialog 모달 미표시 | cmd-open NativeFileDialog return path='NULL/취소' 매번 || 3. _currentTwnPath stuck (null byte 등) | cmd-open click _currentTwnPath='...' 첫/두번째 비교 || 4. 핸들러 자체 발화 안 됨 | cmd-open click 로그 부재 |
## fix (즉시 가능 부분)

### 1. ApplyTwnPayload 전체 try-catch + 진단 로그
기존: silent fail -> 2회 후 무력화 패턴
신규: ApplyTwnPayload (외부) + ApplyTwnPayloadCore (내부) 분리. 외부에서 전체 catch.`csharpvoid ApplyTwnPayload(payload) {
    Debug.Log("[QA-044 진단] ENTRY parts=N");
    try { ApplyTwnPayloadCore(payload); Debug.Log("EXIT OK"); }
    catch (Exception ex) {
        Debug.LogError("[QA-044 진단] FAIL: ...");
        FlashToast("Open 실패 (내부 오류): ...");
    }
}
`
### 2. Parts.ToDictionary id 중복 가드
기존: Parts.ToDictionary(p => p.id) — 중복 시 ArgumentException -> silent신규: 명시적 dict 빌드 + 중복 skip + 로그
`csharpvar byId = new Dictionary(Parts.Count);foreach (var p in Parts) {
    if (string.IsNullOrEmpty(p.id) || byId.ContainsKey(p.id)) { dupSkipped++; continue; }
    byId[p.id] = p;
}
`가능 원인: Edit Duplicate (QA-015) 또는 LoadProject 회귀로 id 중복 생성.

### 3. cmd-open click 진단 로그
- cmd-open click _currentTwnPath='{...}' — _currentTwnPath stuck 추적- cmd-open NativeFileDialog return path='...' — 다이얼로그 반환값 추적
## PM 회신 요청
협업자가 v0.1.242 zip 받아 2회차 Open 시도:
1. Console / Player.log에 [QA-044 진단] 라인 캡처2. 결과 패턴:
   - ENTRY -> FAIL = 내부 throw -> fix 가능   - cmd-open click 로그 부재 = 핸들러 자체 unsubscribe (드물지만 가능)   - NativeFileDialog return path='NULL/취소' = 다이얼로그 자체 미표시 (Win32 P/Invoke issue)
## 변경 파일
- Assets/Scripts/Game/Factory00Bootstrap.cs (+30라인)- ApplyTwnPayload 외부 try-catch wrapper (10라인)- ApplyTwnPayloadCore 신설 (기존 본체 분리)- Parts dict 중복 가드 (10라인)- cmd-open 진단 로그 2개 (2라인)
## 다음 사이클
- 협업자 진단 회신 후 root cause 확정 -> v0.1.243+ fix- 병행: v0.1.243 QA-021 Edit Duplicate 정책 정정


---

## 봉인 참조

본 사이클은 **48th stable seal (v0.1.366, 2026-05-24)** 일괄 봉인에 포함됨.

- journal: [2026-05-24-v0.1.298-366-48th-stable-seal.md](../../journal/2026-05-24-v0.1.298-366-48th-stable-seal.md)
- alias zip: [factory00-windows-x64-v0.1.366-stable.zip](../../downloads/factory00-windows-x64-v0.1.366-stable.zip) (170 MB)
