Summary
Add a reproducible CJK/Unicode conformance and competitor benchmark suite so Hunk can substantiate—or reject—a “best-in-class CJK support” claim with correctness, rendering, portability, and performance evidence.
Hunk already has strong internal coverage in:
benchmarks/terminal-width.ts
benchmarks/non-ascii-stream.ts
benchmarks/wrapped-cjk.ts
- Unicode-focused unit and PTY tests
However, benchmarks/competitors.ts uses an ASCII-oriented synthetic corpus and discards rendered output. It measures successful completion and latency, but cannot detect cell misalignment, grapheme splitting, clipping, pathname escaping, or data loss.
Proposed scope
Fixture corpus
Include isolated and mixed-source cases for:
- Han, hiragana, katakana, Hangul, Hangul Jamo, and fullwidth forms
- halfwidth kana plus dakuten/handakuten
- NFC/NFD combining sequences and leading combining marks
- supplementary-plane Han
- emoji modifiers, flags, keycaps, VS15/VS16, and ZWJ sequences
- East Asian Ambiguous characters
- tabs adjacent to wide and zero-width clusters
- exact-boundary and very long lines
- CJK/emoji filenames, renames, and copies
Tool adapters
Start with:
- Hunk
- delta
- difftastic
- Lumen (
jnsahaj/lumen)
- diffnav
- plain Git as the semantic baseline
Keep stdout renderers and full-screen TUIs in separate performance classes.
Oracles
- Verify semantic preservation against a fixture manifest.
- Detect style/control boundaries inside extended grapheme clusters.
- Parse or capture the final PTY cell grid and assert gutters, separators, wrapping, and clipping.
- Save raw output and exact tool/config/version metadata instead of discarding it.
- Treat screenshots as supplementary evidence, not the sole correctness oracle.
Acceptance criteria
- A deterministic fixture generator and machine-readable expected manifest are checked in.
- One command runs the Hunk conformance suite without network access.
- Optional competitor adapters run when pinned binaries are available and report clear skips otherwise.
- Results distinguish hard correctness failures from rendering differences and performance.
- TUI metrics include first stable frame and interaction latency; filter metrics include process-to-EOF throughput and RSS.
- Raw samples and median/p95 summaries are emitted in a reviewable format.
- The initial CI/local gate covers a fixed Linux PTY; documentation describes the expanded kitty/WezTerm/iTerm2/Windows Terminal and ambiguous-width matrix needed for a public best-in-class claim.
Summary
Add a reproducible CJK/Unicode conformance and competitor benchmark suite so Hunk can substantiate—or reject—a “best-in-class CJK support” claim with correctness, rendering, portability, and performance evidence.
Hunk already has strong internal coverage in:
benchmarks/terminal-width.tsbenchmarks/non-ascii-stream.tsbenchmarks/wrapped-cjk.tsHowever,
benchmarks/competitors.tsuses an ASCII-oriented synthetic corpus and discards rendered output. It measures successful completion and latency, but cannot detect cell misalignment, grapheme splitting, clipping, pathname escaping, or data loss.Proposed scope
Fixture corpus
Include isolated and mixed-source cases for:
Tool adapters
Start with:
jnsahaj/lumen)Keep stdout renderers and full-screen TUIs in separate performance classes.
Oracles
Acceptance criteria