Skip to content

fix(harness-cli): Korean/CJK input under modifyOtherKeys — level 1 + decoder regression test#13

Merged
dancinlife merged 1 commit into
mainfrom
fix/korean-input-modifyotherkeys
May 18, 2026
Merged

fix(harness-cli): Korean/CJK input under modifyOtherKeys — level 1 + decoder regression test#13
dancinlife merged 1 commit into
mainfrom
fix/korean-input-modifyotherkeys

Conversation

@dancinlife
Copy link
Copy Markdown
Contributor

증상

wilson TUI 입력창( 프롬프트)에 한글을 타이핑하면 깨짐 — 영문은 정상이라 언어별 버그처럼 보였습니다. 사용자 신고 + git blame 추적으로 최근 수정건(eb27ffd8, 2026-05-13)으로 확정.

원인

harness_cli_term_modes_on 이 TUI 진입 시 xterm modifyOtherKeys level 2 (ESC[>4;2m) 를 켭니다. level 2 는 한글을 포함한 모든 printable 키를 CSI 27;<mod>;<codepoint>~ 로 재포장하는데, 상류 디코더(hexa-lang:self/tui/input.hexa)의 modifyOtherKeys 분기는 codepoint 32..126(ASCII)만 디코딩 → 한글 codepoint(예: '안' = U+C548 = 50504)는 ["err", ...] 이벤트로 버려짐.

같은 클래스 갭이 이미 한 번 잡혀 있었음 — kitty kbd protocol(ESC[>1u)은 동일 이유로 비활성화 상태였으나, modifyOtherKeys Lv2 는 비활성화를 안 한 케이스.

수정

  • plugins/harness-cli/main.hexa:3086ESC[>4;2mESC[>4;1m (level 1). level 1 은 Shift+Enter 같은 모호한 modified 키만 재포장하고 평범한 printable + IME-composed 텍스트는 raw UTF-8 로 통과 → 디코더의 정상 UTF-8 경로가 처리. Shift+Enter 는 level 1 + 기존 ESC+CR fallback 으로 유지.
  • harness_cli_decoder_smoke 회귀 케이스 추가: modifyOtherKeys 한글 시퀀스('안', cp=50504) → [decoder] keys 11/1112/12.
  • AGENTS.tape n4 카운트 갱신.

핸드오프 (governance g7)

상류 디코더의 ASCII-천장 갭은 hexa-lang inbox/patches/modifyotherkeys-non-ascii-decoder-gap.md 로 핸드오프 — upstream 수정(printable 천장 1271114112)도 같은 세션에 적용. wilson level 1 은 그와 무관하게 안전한 보수적 선택으로 유지.

검증

  • wilson build OK (Darwin-arm64)
  • wilson test 23/23 PASS · FAIL 0
  • [decoder] keys 12/12 PASS — 신규 한글 케이스가 cp=50504 로 정확히 디코딩 = 수정 동작 입증

🤖 Generated with Claude Code

…decoder regression test

TUI 입력창에 한글을 타이핑하면 깨지던 문제를 고칩니다. 영문은
멀쩡한데 한글만 깨져서 언어별 버그처럼 보였습니다.

원인: harness_cli_term_modes_on 이 TUI 진입 시 xterm modifyOtherKeys
level 2 (ESC[>4;2m) 를 켭니다. level 2 는 한글을 포함한 *모든* printable
키를 CSI 27;<mod>;<codepoint>~ 로 재포장하는데, 상류 디코더
(self/tui/input.hexa)의 modifyOtherKeys 분기는 codepoint 32..126(ASCII)만
풀 줄 알아서, 한글 codepoint(예: '안' = U+C548 = 50504)는 err 이벤트로
버려졌습니다.

fix: ESC[>4;2m → ESC[>4;1m (level 1). level 1 은 Shift+Enter 같은
모호한 modified 키만 재포장하고 평범한 printable + IME-composed 텍스트는
raw UTF-8 로 통과시켜, 디코더의 정상 UTF-8 경로가 처리합니다. Shift+Enter
는 level 1 + 기존 ESC+CR fallback 으로 그대로 동작합니다.

상류 디코더의 ASCII-천장 갭은 별도 inbox 노트로 핸드오프했고
(hexa-lang inbox/patches/modifyotherkeys-non-ascii-decoder-gap.md),
이번 세션에 upstream 수정도 적용했습니다 — wilson level 1 은 그와
무관하게 안전한 보수적 선택으로 유지합니다.

회귀 테스트: harness_cli_decoder_smoke 에 modifyOtherKeys 한글 케이스
('안', cp=50504) 추가 → [decoder] keys 11/11 → 12/12.

verify: wilson build OK · wilson test 23/23 PASS · [decoder] 12/12 PASS

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dancinlife dancinlife merged commit a1e1bf5 into main May 18, 2026
0 of 2 checks passed
@dancinlife dancinlife deleted the fix/korean-input-modifyotherkeys branch May 18, 2026 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant