Files
orca/.github/workflows
Neil ef788c80c7 test(terminal): assert wide-char buffer content across repaints (#15280)
* test(terminal): assert wide-char buffer content across repaints

The first reproduction for the Korean duplication asserted on the byte
stream a pty emits, and it passes on real Windows on both ConPTY
backends. The reporter's evidence says that is the wrong surface: their
copied text pastes doubled, so the corruption is in the buffer, and in
one run the command echo is doubled while that same command's output is
clean - text that was correct when it left the shell and went wrong
while being placed on screen. A redraw landing on the wrong cells emits
perfectly legitimate bytes, so no stream assertion can see it.

These assert buffer content instead, against a cell-level model of a
grid where one glyph spans two cells. The model shares no code with the
emulator, but its rules were chosen to match observed behaviour, so it
is a regression detector rather than a first-principles oracle - the
header says so rather than overclaiming.

The largest case is a cursor positioned onto the second cell of a
two-cell glyph, then erase-to-end-of-line, then rewrite, swept across
every row and column at widths 8 to 44. That is the only place a wide
character can be half addressed. Also covered: a whole row re-emitted
over wide characters, which is the shape a console redraw takes;
snapshot round-trip of a half-addressed buffer; and reflow across 148
width pairs, which is the resize the reporter uses as a workaround.

Nothing reproduces. The emulator blanks the orphaned half correctly at
every width and column, and reflow is lossless.

The two pty specs run in the existing Windows packaging job rather than
a new lane. A dedicated runner cost roughly four minutes, almost all of
it checkout and a native rebuild, to run thirteen seconds of tests, and
Windows minutes bill at double - the packaging job already installs the
same dependencies and already runs a Windows test step.

No production code changes. An earlier revision added an environment
variable to select the system ConPTY, and it is dropped: its only effect
would have been to let a user disable the fix for an earlier duplication
bug, it logged nothing so a support bundle could not confirm it took
effect, and the tests drive the backend directly without it.

Refs #15192

* test(terminal): share the wide-glyph predicate instead of copying its regex

The duplication detector carried its own copy of the range the grid
model already exports, so the two could drift and only one would be
updated.
2026-08-18 15:26:49 -07:00
..