Repository navigation
test(e2e): close the captured line for a chord that emits no terminator - #13277
kunsanglee wants to merge 1 commit into
Conversation
`commits the preedit before physical Ctrl+Enter` has never passed. It fails the same way at stablyai#13128's own commit, which introduced it, as it does on today's main: `Expected: 1, Received: 0`. The cause is the harness, not the product. `terminal-ime-byte-reader` emits a capture only when it finds `0x0a`, and it splits on nothing else. The Shift+Enter row ends in CR, the tty converts it, the line closes. Ctrl+Enter sends CSI-u, which carries no line terminator at all, so the line never closes and the reader times out at zero captures however correct the bytes were. A plain Return now follows the chord for that row, and the expectation carries the LF it produces. Sending it unmodified is safe because the chord already committed the preedit — the assertion's leading `하 하 하` is what proves it, since a surviving preedit would eat the Return and put its own commit ahead of the chord's bytes. Also drops the `renderer` field. Its comment claimed both forms were asserted, but nothing ever read it; the CR-to-LF evidence the comment was reaching for is what the `pty` expectation's trailing LF already carries. The spec is gated behind `ORCA_E2E_NATIVE_MACOS_KOREAN=1`, which CI does not set, so this only ever ran for someone who opted in locally. Verified by hand on macOS 26.5.1 with 2-Set Korean: 2/2 on three consecutive runs. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01Mu6j33LNsd4Mvv8a1NuFoo
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe macOS Korean chord test now documents PTY capture requirements and adds a 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Closing: obsolete, not deferred.
The harness defect itself is worth remembering if the spec ever comes back: |
What
terminal-macos-korean-chord-commit-native.spec.ts › commits the preedit before physical Ctrl+Enterhas never passed. Its sibling row, Shift+Enter, always has.Why it could not pass
terminal-ime-byte-reader.tsemits a capture only when it finds a newline, andit splits on nothing else:
The Shift+Enter row ends in CR, the tty converts it to LF, the line closes, one
capture. Ctrl+Enter sends CSI-u (
ESC [ 13 ; 5 u), which carries no lineterminator at all — so the line never closes and the reader times out at zero
captures no matter what the product sent.
Expected: 1, Received: 0.This is a harness defect, not a product one. The bytes were always arriving.
Bisect
main(6da7b8e9cf): fails17b3dff3c4— refactor(terminal): return IME composition ownership to xterm #13128, the commit that introduced the spec: fails identicallyIt stays green in CI because the spec is gated behind
ORCA_E2E_NATIVE_MACOS_KOREAN=1, which CI does not set. It only runs for someonewho opts in locally, which is why it took a second machine reporting it to
surface.
The fix
A plain Return follows the chord for the row whose bytes do not end a line, and
the expectation carries the LF it produces. Sending it unmodified is safe because
the chord already committed the preedit — the assertion's leading
하 하 하iswhat proves that, since a surviving preedit would eat the Return and put its own
commit ahead of the chord's bytes.
This is the same idiom the parked-terminal and cursor-chord specs use to get a
line out of this reader.
Also drops the
rendererfield from the chord table. Its comment claimed bothforms were asserted; nothing ever read it. The CR-to-LF evidence that comment was
reaching for is exactly what the
ptyexpectation's trailing LF already carries,so the claim now matches the code.
Verification
Run by hand on macOS 26.5.1 with 2-Set Korean and Accessibility granted:
2/2 passed on three consecutive runs. Before the change, the same machine
reproduced the reported failure at all three commits above.
oxlint,pnpm typecheck, andcheck:max-lines-ratchetclean.Test-only. No product code touched.