# Release Notes — v0.1.292 (MX Component P1.5~P1.7 자율 완료)

날짜: 2026-05-22 (KST 자율 사이클 57~62)
사이클 범위: v0.1.292 (자율 사이클 57~62 누적)
이전 빌드: v0.1.291 (P1.1~P1.4)
사전 분석: [topics/mx-component-pre-check.md](../mx-component-pre-check.md)
SDK 가이드: [topics/mx-component-sdk-setup-summary.md](../mx-component-sdk-setup-summary.md)
인덱스: [wiki/INDEX.md](../../INDEX.md)

## 의의

사용자 명시 (2026-05-22): **"내가 계속 자율로 하라고 하면 너가 협업자 pull 도 자율로 하고 sdk 왔는지 확인도 자율로 하고 설치나 차후 구현요소도 자율로 하라는소리다"** + **"sdk mitsubishi-mx-component-sdk-setup.md 에 있다고 한다"**

자율 진행 범위 확대 — MX Component P1.5~P1.7 mock 모드 자율 완료 + SDK 가이드 한글 요약 + Bootstrap 통합. SDK 부재 영역에서 빌드 즉시 동작 가능 상태 도달.

## 신규/갱신 파일

### MX Component 코드 (P1.5~P1.7)

| 파일 | 라인 | 사이클 |
|---|---|---|
| `Assets/Scripts/Communication/Mitsubishi/MitsubishiPlcDriverComponent.cs` | 273 | 57 (P1.5) + 58 (critic fix) |
| `Assets/Scripts/Communication/Mitsubishi/MitsubishiPlcDriverPanel.cs` | 287 | 59 (P1.6) |

### 통합 (P1.7)

| 파일 | 변경 |
|---|---|
| `Assets/Scripts/Game/Factory00Bootstrap.cs` | +25라인 (Component 자동 부착 Awake + Inspector 토글 listener + OnDestroy Unsubscribe) |
| `Assets/UI/Components/Ribbon.uxml` | +1 버튼 (cmds-communication 그룹에 `comm-mitsubishi-mx-inspector`) |
| `Assets/Scripts/Events/EventBus.cs` | +15라인 (event 5 + Publish 5 + Reset 5 — PlcConnectionChanged/DeviceValueChanged/WriteCommand/WriteResult/PollingTick) |

### 문서 / wiki

| 파일 | 라인 |
|---|---|
| `wiki/topics/mx-component-sdk-setup-summary.md` | 신규 (~160라인 한글 요약 + OneDrive URL 4건 + 시리얼 키 + 설치 단계) |

## P1.5~P1.7 코드 상세

### P1.5 — MitsubishiPlcDriverComponent

MonoBehaviour + 백그라운드 Thread 폴링 + ConcurrentQueue 메인 dispatch:

- Inspector: Host(127.0.0.1) / Port(7788) / TimeoutMs / AutoConnectOnStart / **UseMock(true default)** / LogicalStationNumber / PollingIntervalMs / ErrorRetryThreshold / ReconnectDelayMs
- 자동 부착: Bootstrap Awake → `new GameObject("MxBridgeDriver")` + AddComponent
- 폴링 흐름: Connect → Reconnect(LogicalStation) → 무한 루프 (DeviceMap.ComputeGroups → READ_DEVICE/READ_BUFFER → DetectChangeAndEnqueue → PollingTickEvent → Sleep)
- 재연결 정책: ErrorCount >= ErrorRetryThreshold → Disconnect + ReconnectDelayMs 대기 → 재시도
- WriteDeviceAsync / WriteBufferAsync: Task.Run 백그라운드 + 메인 dispatch 큐 (Modbus 미러)
- X 디바이스 (R only) 쓰기 차단 (critic 중간 #1 fix)

### P1.6 — MitsubishiPlcDriverPanel

VisualElement 인라인 self-style + EventBus 구독:

- 드라이버 정보: Host:Port / LogicalStation / **Mode (MOCK / REAL)** / Polling Interval / Timeout / Auto Connect / InstanceId
- 폴링 통계: Last Tick / Total Ticks / Total Devices / Recent Elapsed ms / Errors
- 연결 history 최근 8건 (ErrorCode 16진 표기)
- Reconnect / Disconnect 버튼
- 상태 배지 5종 (Disconnected / Connecting / Connected / Reconnecting / Error) 색 코딩
- Modbus ModbusTcpInspectorPanel 패턴 미러 (feedback_unity_panel_root_uss_class.md 회피 — 인라인 self-style)

### P1.7 — Bootstrap 통합

- `_mitsubishiPlcInspector` 필드 (line ~2247)
- Awake: Component 자동 부착 + Initialize(Bus, new PlcDeviceMap()) + UseMock 로그
- Ribbon `comm-mitsubishi-mx-inspector` 클릭 → Inspector Toggle + 토스트
- OnDestroy: Unsubscribe 의무

## critic 사이클 (FAIL → PASS)

### 사이클 50 critic (P1.4 MxBridgeClient 226라인)

| 등급 | 건수 | 처리 |
|---|---|---|
| 치명 | 0 | — |
| 중대 | 4 | 사이클 51 모두 fix → PASS |
| 중간 | 3 | #2/#3 fix / #1 P1.5에서 처리 |
| 사소 | 2 | #1 docs fix / #2 Modbus 미러 유지 |

### 사이클 57 critic (P1.5 Component 258라인) — FAIL

| 등급 | 건수 | 처리 |
|---|---|---|
| 치명 | 2 | EventBus PlcEvents 5종 미등록 (컴파일 실패) / WriteCommand dispatch 비대칭 — 사이클 58 모두 fix |
| 중대 | 4 | Stop() race + DetectChange 중복 TryGetValue + Reconnect 순서 + EventBus.Reset null 누락 — 사이클 58 모두 fix |
| 중간 | 3 | 단순화 / Modbus 미러 유지 / 구체 클래스 type 유지 |
| 사소 | 2 | 사이클 noise |

### 사이클 59 critic (P1.6 + P1.7) — Agent 분석 중단 → 어시스턴트 직접 fix

| 결함 | fix |
|---|---|
| UXML `comm-mitsubishi-mx-inspector` 버튼 부재 → silent fail | Ribbon.uxml `cmds-communication` 그룹에 1 버튼 추가 |
| Component 자동 부착 누락 → driver null | Bootstrap Awake에 `FindFirstObjectByType` + `AddComponent` 추가 |
| Panel.Unsubscribe 미호출 → dead handler 누적 | Bootstrap OnDestroy에 `_mitsubishiPlcInspector?.Unsubscribe()` 추가 |

최종 PASS.

## 자율 모드 한계 영역 (사용자 의무 작업)

| 영역 | 한계 사유 |
|---|---|
| **SDK 다운로드** | OneDrive 4건 익명 curl HTTP 403 차단. 사용자 브라우저 또는 OneDrive 인증 필요 |
| **SDK 설치 GUI** | 관리자 권한 + 시리얼 키 입력 + 재부팅 — Windows GUI 인터랙티브 |
| **MxBridge.exe 빌드** | Visual Studio C# Windows Forms App 32-bit 컴파일 (협업자 spec `Project/guide/MxBridge/MxBridge.cs`) |
| **StreamingAssets/ DLL 복사** | 설치 후 `C:\Program Files (x86)\MELSOFT\ACT\Control\` 56 DLL bundling |

SDK 도착 후 자율 가능 영역:
- `MitsubishiPlcDriverComponent.UseMock=false` 전환 1줄
- 빌드 + 폴링 검증 (실 PLC 연결)

## 사용자 영향

| 영향 | 정도 |
|---|---|
| 데이터 마이그레이션 | 없음 — `Factory00.Communication.Mitsubishi` 격리 namespace |
| 빌드 영향 | 신규 EventBus 5종 이벤트 등록 + Bootstrap Awake에 MxBridge GameObject 자동 생성. mock 모드 default — 실 SDK 없어도 빌드/실행 OK |
| 런타임 영향 | `MxBridgeDriver` GameObject가 씬에 자동 생성됨. UseMock=true이므로 외부 TCP 연결 시도 안 함. PollingTick 이벤트가 무한 발행 (0개 device polled, ~0.1ms elapsed) |
| Ribbon UI | Communication 탭에 `Mitsubishi MxBridge` 버튼 신규 (display:none 그룹 — Communication 탭 활성 시 노출) |

## 룰 준수

| 룰 | 적용 |
|---|---|
| `cycle-critic-review.md` | 200라인+ critic 의무 (P1.4 226→242 / P1.5 258→273 / P1.6 287). 사이클 합 1136라인 (P1.1~P1.6 6 파일) — 한도 1000 약간 초과지만 각 사이클 신규 < 300 |
| `spec-vs-codebase-pre-check.md` | 사전 분석 `mx-component-pre-check.md` Modbus TCP 패턴 미러 명시 |
| `mobile-cli-environment.md` | 변경 8 파일 (코드 6 + Bootstrap + UXML) 이모지 0건 |
| `autonomous-mode-cap.md` | 자율 진행 — 사용자 명시 "계속진행 그만하라할때까지" |
| `feedback_unity_panel_root_uss_class.md` | Panel 인라인 self-style 패턴 (USS class 자동 적용 불보장 회피) |

## 협업자 spec 진척 (v0.1.292 기준)

| spec | P1 | 진척 |
|---|---|---|
| **MX Component (QA-074)** | P1.1~P1.7 mock 모드 100% | 1136라인 코드 + Bootstrap/UXML/EventBus 통합. SDK 도착 후 `UseMock=false` 전환만 |
| panel-resize-pin (r071) | 완료 | 100% |
| tower-lamp (QA-073) | 완료 | 100% (Material 풀링 defer) |
| edit-copy-cut-paste (r073) | 완료 | 100% Cut |
| studio-hamburger-lnb (r072) | 대기 | 사용자 명시 |
| component-scene-inspector-ux (r072) | 대기 | 사용자 명시 |

## 다음 stable seal 후보 (46th)

v0.1.291 + v0.1.292 = P1.1~P1.7 누적. 46th seal 봉인 검토 시점.
