fix(harness-cli): Korean/CJK input under modifyOtherKeys — level 1 + decoder regression test#13
Merged
Merged
Conversation
…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>
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.
증상
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 분기는 codepoint32..126(ASCII)만 디코딩 → 한글 codepoint(예: '안' = U+C548 = 50504)는["err", ...]이벤트로 버려짐.같은 클래스 갭이 이미 한 번 잡혀 있었음 — kitty kbd protocol(
ESC[>1u)은 동일 이유로 비활성화 상태였으나, modifyOtherKeys Lv2 는 비활성화를 안 한 케이스.수정
plugins/harness-cli/main.hexa:3086—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 으로 유지.harness_cli_decoder_smoke회귀 케이스 추가: modifyOtherKeys 한글 시퀀스('안', cp=50504) →[decoder] keys 11/11→12/12.AGENTS.tapen4 카운트 갱신.핸드오프 (governance g7)
상류 디코더의 ASCII-천장 갭은 hexa-lang
inbox/patches/modifyotherkeys-non-ascii-decoder-gap.md로 핸드오프 — upstream 수정(printable 천장127→1114112)도 같은 세션에 적용. wilson level 1 은 그와 무관하게 안전한 보수적 선택으로 유지.검증
wilson buildOK (Darwin-arm64)wilson test23/23 PASS · FAIL 0[decoder] keys 12/12 PASS— 신규 한글 케이스가cp=50504로 정확히 디코딩 = 수정 동작 입증🤖 Generated with Claude Code