Repository navigation
Conversation
nwparker
force-pushed
the
nwparker/ime-ci-matrix
branch
from
August 1, 2026 08:10
34f18bf to
8944e39
Compare
nwparker
force-pushed
the
nwparker/ime-ci-matrix
branch
from
August 1, 2026 08:12
8944e39 to
f9f116d
Compare
nwparker
force-pushed
the
nwparker/ime-ci-matrix
branch
from
August 1, 2026 08:20
f9f116d to
f81ddb4
Compare
nwparker
force-pushed
the
nwparker/ime-ci-matrix
branch
from
August 1, 2026 08:25
f81ddb4 to
ad5fb7f
Compare
nwparker
force-pushed
the
nwparker/ime-ci-matrix
branch
from
August 1, 2026 08:31
ad5fb7f to
eb37d04
Compare
nwparker
force-pushed
the
nwparker/ime-ci-matrix
branch
from
August 1, 2026 08:37
eb37d04 to
f58597d
Compare
nwparker
force-pushed
the
nwparker/ime-ci-matrix
branch
from
August 1, 2026 08:43
f58597d to
eda7c92
Compare
nwparker
force-pushed
the
nwparker/ime-ci-matrix
branch
from
August 1, 2026 08:50
eda7c92 to
ad092dc
Compare
nwparker
force-pushed
the
nwparker/ime-ci-matrix
branch
from
August 1, 2026 09:17
ad092dc to
001e1f2
Compare
nwparker
force-pushed
the
nwparker/ime-ci-matrix
branch
from
August 1, 2026 10:04
001e1f2 to
e54213a
Compare
nwparker
force-pushed
the
nwparker/ime-ci-matrix
branch
2 times, most recently
from
August 1, 2026 10:16
68f093b to
beec252
Compare
5 of 6 tasks
nwparker
force-pushed
the
nwparker/ime-ci-matrix
branch
3 times, most recently
from
August 1, 2026 23:44
0bac0f8 to
2070f71
Compare
nwparker
force-pushed
the
nwparker/ime-ci-matrix
branch
from
August 2, 2026 02:34
2070f71 to
8b3e205
Compare
nwparker
force-pushed
the
nwparker/ime-ci-matrix
branch
from
August 2, 2026 03:16
8b3e205 to
c3957db
Compare
nwparker
force-pushed
the
nwparker/ime-ci-matrix
branch
from
August 2, 2026 03:51
7693b52 to
1c510af
Compare
nwparker
force-pushed
the
nwparker/ime-ci-matrix
branch
from
August 2, 2026 04:09
1c510af to
f4300a1
Compare
The native suite only ever exercised ibus-hangul, so every non-Korean IME regression had to be caught by hand. Generalize the runner and spec over an engine profile and add ibus-libpinyin (Pinyin), ibus-anthy (Romaji/kana) and ibus-unikey (Telex) as matrix legs, covering the candidate-window, multi-commit and rule-based rewriting shapes that Hangul alone does not produce. Session config (apt package, GSettings, `ibus engine` name) and the keystroke scripts live in separate files because one is loaded by the Node runner and the other by the Playwright spec. They are joined only by the engine id, so the contract test asserts the two sets agree and that the workflow matrix covers exactly them. Only the hangul expectations have been recorded from a real run. The other three engines' committed glyphs are predicted from their input rules, so the exact-text oracle is `expect.soft` for them while the structural oracle stays hard: every repetition must produce identical bytes, in the engine's script, with xterm's onData matching what the PTY received. That is the half that actually detects the duplication and leaked-ASCII bugs, and it holds without knowing the glyphs. A first green run turns each `expectationsVerified` to true. fail-fast is off so a drifting libpinyin candidate cannot mask a hangul regression, and evidence uploads are per-engine because upload-artifact rejects a duplicate name.
Co-authored-by: Orca <[email protected]>
Co-authored-by: Orca <[email protected]>
Telex commits on a word boundary, not on Return, so the final syllable was still composing when Return fired and committed into the following line. No two repetitions agreed. The other three engines commit on Return. Co-authored-by: Orca <[email protected]>
Co-authored-by: Orca <[email protected]>
nwparker
force-pushed
the
nwparker/ime-ci-matrix
branch
from
August 2, 2026 04:49
1587d5b to
7ce99a7
Compare
This branch has not been deployed
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.
Summary
Generalizes the native IBus E2E suite from one hardcoded engine to a four-engine matrix, so the terminal IME path is exercised against genuinely different input methods rather than only Korean.
ibus-hangulibus-libpinyinibus-anthyibus-unikeyThese are exactly the four shapes the fixes in this stack reason about — #11896's idle ceiling exists because of anthy's multi-segment conversion, and the candidate-key guards exist because of libpinyin.
terminal-ibus-engine-profiles.mjsholds per-engine session config (GSettings schema, apt package).run-terminal-ibus-engine-e2e.mjs(renamed from the hangul-specific runner) is parameterized by--engine=.terminal-ibus-engine-input-profiles.tsholds the keystroke scripts and expected text.fail-fast: false, and uploads evidence under a per-engine artifact name.Status of the expectations
All four legs are green and all four assert hard. Run 30732014605 on the head of this branch:
hangul,libpinyin,anthy,unikey, every one passing both the structural oracle and the exact committed text.Getting there took three findings, each written up in its own section below, because they are the substance of this PR rather than incidental fixes:
ibusCLI, not a fault in this suite. Fixed by verifying selection with a read-back.libpinyinandanthywere transcribed rather than observed; both were reproduced independently and promoted.unikeyproduced a genuine ordering defect, in the keystroke script rather than in the app. Fixed and now verified.The two-tier oracle stays in place for engines added later:
A new engine lands with
expectationsVerified: false, asserts softly for one observational run so a distro dictionary difference reports the real text instead of a bare failure, and is promoted once seen green. Nothing currently uses the soft tier.The GSettings schema ids and key encodings are transcribed from each engine's upstream source for the version Ubuntu 22.04 ships — not read off an installed schema. A wrong id fails loudly in
configureEnginerather than silently mis-configuring. This is stated in the file header rather than left implicit, and all four have now selected and configured successfully in CI.fail-fast: falsematters independently: one engine's dictionary drifting must not mask a real regression in another.Screenshots
No visual change — CI only.
Testing
pnpm lintpnpm typecheckpnpm test— 9 passing contract tests interminal-ime-e2e-workflow.test.mjs, including a cross-file check that the engine ids in the workflow, the session profiles, and the input profiles all agree (they are joined only by that id at runtime, so a rename is otherwise invisible until CI)pnpm build— not runNot run locally: the native IBus suite itself, which requires Linux + X11 + IBus. It runs nightly and on manual dispatch.
AI Review Report
The subagent that first drafted the engine profiles overclaimed their provenance, stating the schema ids had been read from each engine's installed GSettings schema. They had not — no IBus sources were present locally. I verified this, and rewrote the file header to state the actual provenance and mark the entries unverified. Flagging it here because "CI config that looks verified but is not" is the kind of thing that quietly rots.
Cross-platform: this suite is Linux/X11-specific by nature (IBus + xdotool). It is gated to
ubuntu-22.04and does not affect macOS or Windows contributors. Note that this stack does not add macOS or Windows IME CI — there is no free runner with a scriptable IME on either, so those platforms remain covered by unit tests and recorded traces (#11895) only.Lifecycle hygiene is asserted by test: IBus processes are killed by process group, never by
killall/pkill, and--replaceis never passed — so the suite cannot disturb an IBus daemon it does not own.Security Audit
xfwm4, andxdotoolwith fixed argument lists; the only variable is the engine id, which is constrained to the four keys in the profile map. Process termination is scoped to the runner's own process group.pull_requesttrigger is removed (taking ci: run only changed E2E specs on pull requests #11834's change), so this runs only on schedule or manual dispatch — it cannot be triggered by an untrusted PR.permissions: contents: read, and checkout usespersist-credentials: false.Notes
Top of the stack. Base: #11897.
The follow-up this PR originally deferred — promoting the three soft-asserting engines after a green run — is done here rather than left open; the sections below are how.
Dispatch results, and the engine-selection fix
Dispatching the workflow (runs 30695084257, 30695394183, 30695559706) showed only one of the four legs selecting its engine:
hangul— green. Produces a real recorded trace. One repetition of it is committed as a fixture in test(ime): add a recorded-trace harness and one composition predicate #11895.libpinyin,anthy,unikey— red. All three failed identically atTimed out while selecting the IBus <name> engine, before any keystroke was typed, so the soft-assert tier above had never run.The cause is in the
ibusCLI, not in this suite.ibus engine <name>performs the D-BusSetGlobalEnginecall first and then invokessetxkbmapfrom the engine's declared XKB layout. When the engine declares no layout of its own, the CLI assembles an argument list with nothing in it and returns failure with nothing written to either stream — after the selection has already succeeded. Of the four engines onlyhanguldeclares a real layout (kr/kr104);libpinyinandanthydeclaredefaultand exit 1 silently, andunikeydeclares*, which makessetxkbmapitself fail and so at least produces a warning. Reproduced in a 22.04 container against all four engines: every one of them is correctly selected, andibus enginewith no argument reports the right engine in every case.The fix is to stop gating on the exit status and verify by read-back instead —
ibus enginewith no argument was already telling the truth. Both call sites do this now:waitForEnginein the runner, and the equivalent selection in the spec, whereexecFileSyncwas throwing on the same non-zero status. The spec's existingexpect(active).toBe(engine.ibusEngineName)assertion was already the correct oracle; it just never got the chance to run.Regression risk to the green leg is nil:
hangulstill runsibus engine hangul, which still exits 0 and still applies its layout. The read-back adds a condition it already satisfies on the first attempt.Two other hypotheses were disproved rather than left open. Preloading engines has no effect —
SetGlobalEnginenever consults that setting, and run 30695559706 failed identically. A focused input context is not required either: the daemon falls back to a fake context it creates and focuses at startup, and all four engines select with nothing focused.Two of the three unverified legs are now hard assertions
With selection fixed, the committed text for
libpinyinandanthywas reproduced independently in a 22.04 container — same engine versions, same GSettings, same keystroke scripts, sameIBUS_ENABLE_SYNC_MODE=1— usinghangulas a control, which reproduced한abc글codepoint for codepoint. Both matched the transcribed strings exactly (你好= U+4F60 U+597D,ひらがな= U+3072 U+3089 U+304C U+306A), three repetitions per run, identical across runs. Both are promoted toexpectationsVerified: true.unikeystays soft, and the reason is recorded in the profile rather than left as an open question. Its characters are right, but the grouping per repetition is not: underIBUS_ENABLE_SYNC_MODE=1the Return reaches the client before the engine commits the pending final word, soviệtlands after the newline and migrates into the next repetition —tiếng việt\nviệttiếng \nviệttiếng \nviệtrather than three identical lines. Deterministic, and it disappears with sync mode off.Unikey is the only one of the four where a single keypress must both trigger a commit and be forwarded: hangul's Return meets an already-empty preedit, anthy uses two Returns, libpinyin commits on space. So this is specific to that script, not a general property of the harness.
Worth flagging for reviewers: the per-repetition equality assertion in the spec is not gated on
expectationsVerified, so if this ordering carries to the real path the Unikey leg fails there first, before any text comparison. Flipping its flag would only obscure which oracle failed. The reproduction used a GTK text sink rather than Electron/xterm.js, so whether it carries is genuinely untested — the first observational run answers that on the real path, which is the cheapest way to find out.The observational run answered it: it carries
Run 30731720723, on the read-back fix.
hangul,anthyandlibpinyinall green — selection is fixed and the two promoted legs hold on the real path.unikeyfailed exactly where this section predicted: the structural equality oracle, before any text comparison.The received bytes decode to the predicted shape. Expected every repetition to equal
7469e1babf6e67200a(tiếng+\n); the run interleaved7669e1bb87747469e1babf6e67200a(việt+tiếng+\n) and7669e1bb87740a(việt+\n). So the trailing word commits into the following line through Electron and xterm.js just as it did through the GTK sink.No bytes are lost —
việt+tiếng \nis everything that was typed, in order. Nothing in the app can force an engine to commit, and the deferred-newline hold in #11896 cannot help here: Telex keeps a word open indefinitely rather than ending the composition, so the hold expires on its idle ceiling and forwards the newline, which is the correct thing for it to do. The defect was in the scenario, which asked Return to flush a preedit this engine never flushes on Return.Fixed by closing the word with a trailing space, so the commit trigger and the forwarded key are no longer the same keypress — the property this section already identified as unique to Unikey. Preferred over
IBUS_ENABLE_SYNC_MODE=0for that leg, which would have diverged its timing semantics from the other three and hidden the ordering rather than resolving it.expectedTextbecomestiếng việt.Run 30732014605, on that fix, is green on all four legs.
unikeyis promoted toexpectationsVerified: true— the last soft assertion in the matrix, and the string was verified rather than assumed, since a soft assertion still fails the test. So the matrix now asserts exactly what it observes, on every engine.Worth stating plainly what this leg did and did not find: no app defect. Every byte typed reached the PTY in order in both the failing and the passing run. What the failing run caught was a keystroke script that asked an engine to flush on a key it does not flush on. That is a real thing for this suite to catch — it is the difference between a harness that encodes one engine's habits and one that holds against four — but it should not be read as a terminal IME bug that this PR fixes.