Fix smoke gaps: recorder target + VK translation, player enum + null guard (#11)

This commit is contained in:
minsung
2026-04-07 17:30:53 +09:00
parent a0609f8f0e
commit 139fbbc0bc
10 changed files with 515 additions and 15 deletions

View File

@@ -0,0 +1,43 @@
# 2026-04-07 이슈 #11 — smoke gap fix (Generator)
- **관련 이슈**: #11
- **역할**: Generator
- **소요 시간**: ~45분
- **Context 사용량**: ~70k tokens
## 무엇을 했나
EG-BIM Modeler 스모크 테스트에서 노출된 4개 통합 갭 수정.
### recorder
- `KeyTranslator` 추가: Win32 VK → 문자/키 이름 (A-Z/0-9/F1-F24/Enter/Tab/Esc/Arrows/...). 대문자 컨벤션 채택.
- `DragCollapser.key_down` 재작성:
- 연속 printable key_down은 단일 `type` 스텝으로 누적 (`BOX` 등)
- 모디파이어(Ctrl/Shift/Alt/Win)는 상태 추적, 단독 스텝 미방출
- 조합 시 `ctrl+c` 형태의 `hotkey` 스텝
- 명명 키(enter/tab/...) → `hotkey` 스텝
- `ScenarioStep.RawVk` 필드 추가 (진단용)
- `Program.cs`:
- `[STAThread]` 추가 (UIA3 쓰레드 친화성)
- `unresolved_paths` (리졸버 실행 후 null) + `no_resolver_attempt` (키 이벤트/automation null) 분리 카운터
- `null_target_steps` 최종 집계 출력
- 키 이벤트는 의미 없는 좌표(0,0)로 리졸버 호출 방지
### player
- `StepKind.Wheel`, `StepKind.Focus` 추가
- `PlayerEngine.ExecuteStep`:
- null target + target 필요 종류(Click/Drag/Type/Focus)는 경고 후 skip (데스크탑 오클릭 방지)
- `Wheel`/`Focus` 케이스 no-op 로그 (이슈 #11 코멘트)
### 테스트
- `RecorderTests`: KeyTranslator, printable→"BOX", ctrl+c→hotkey
- `PlayerEngineTests`: NullTarget_Skips, Wheel/Focus 파싱, Wheel 실행
- `SmokeRegressionTests` 신규 파일: 실제 recorder output 모사 yaml → 전체 파이프라인
## 결과
- 빌드: 경고 0, 오류 0 (TreatWarningsAsErrors 유지)
- 테스트: 53 → 60 (전원 통과)
## 미결
- `Hotkey` 스텝에 target이 null일 때도 현재는 실행됨(모디파이어 전역 키 가정). 필요 시 추후 정책 조정.
- recorder 실사용에서 target이 여전히 null인 경우 root cause는 STA/automation 부재일 수 있어 smoke 재실행 확인 필요.