mirror of
https://github.com/stablyai/orca.git
synced 2026-09-29 08:03:20 +00:00
test: assert Wayland launch and register native Hangul evidence
This commit is contained in:
@@ -18573,6 +18573,97 @@
|
||||
"Other released version pairs remain untested; not a required PR check."
|
||||
],
|
||||
"demotionRule": "Keep experimental if any direction skips or fails; do not extend timeouts or retry to green."
|
||||
},
|
||||
{
|
||||
"id": "terminal-input.native-wayland-hangul-digit",
|
||||
"title": "Native Wayland Hangul terminating digits reach the PTY exactly once",
|
||||
"maturity": "experimental",
|
||||
"protection": "partial",
|
||||
"owner": "terminal-input",
|
||||
"layer": "electron-native-ime-e2e",
|
||||
"surfaces": [
|
||||
"native Hangul composition",
|
||||
"Wayland terminal input"
|
||||
],
|
||||
"platforms": [
|
||||
"linux"
|
||||
],
|
||||
"providers": [
|
||||
"local"
|
||||
],
|
||||
"coveredPlatforms": [
|
||||
"linux"
|
||||
],
|
||||
"coveredProviders": [
|
||||
"local"
|
||||
],
|
||||
"coverageNotes": "Ubuntu 22.04 nested GNOME and IBus Hangul drive three complete native executions in GitHub Actions. GNOME owns IBus; daemon and CLI share its default config discovery path.",
|
||||
"motivatingLinks": [
|
||||
"https://github.com/stablyai/orca/pull/19174"
|
||||
],
|
||||
"invariant": "Typing d k 1 Return through native IBus Hangul delivers exactly 아1 followed by newline without missing, duplicate, or reordered characters.",
|
||||
"oracle": "Three executions each assert three exact UTF-8 PTY lines. Verify the exact Playwright title, zero skips/retries, each individual native composition receipt, and the nested launch Wayland flag.",
|
||||
"commands": [
|
||||
"gh workflow run terminal-ime-e2e.yml",
|
||||
"gh run view 34074017928 --log",
|
||||
"pnpm exec playwright test --config tests/playwright.config.ts tests/e2e/terminal-hangul-terminating-digit-native.spec.ts --project=electron-headful --workers=1 --repeat-each=3 --retries=0 --reporter=list,json",
|
||||
"ORCA_BACKGROUND_LAUNCH=1 node_modules/.bin/vitest run --config config/vitest.config.ts config/scripts/terminal-ime-e2e-workflow.test.mjs"
|
||||
],
|
||||
"testFiles": [
|
||||
"tests/e2e/terminal-hangul-terminating-digit-native.spec.ts",
|
||||
"config/scripts/terminal-ime-e2e-workflow.test.mjs"
|
||||
],
|
||||
"assertionRefs": [
|
||||
{
|
||||
"file": "tests/e2e/terminal-hangul-terminating-digit-native.spec.ts",
|
||||
"assertions": [
|
||||
"a digit typed right after a Hangul syllable reaches the pty"
|
||||
]
|
||||
},
|
||||
{
|
||||
"file": "config/scripts/terminal-ime-e2e-workflow.test.mjs",
|
||||
"assertions": [
|
||||
"runs native Wayland independently with CJK fonts and retained evidence"
|
||||
]
|
||||
}
|
||||
],
|
||||
"evidenceRuns": [
|
||||
{
|
||||
"date": "2026-09-07",
|
||||
"runner": "ci",
|
||||
"platform": "linux",
|
||||
"command": "gh run view 34074017928 --log",
|
||||
"result": "passed",
|
||||
"summary": "Permanent runner passed three native executions, nine exact lines and zero skips/retries. Downloaded participation report and all three engagement receipts verified; compositor cleanup reported no remaining group members. Independent X11 job passed.",
|
||||
"durationSeconds": 76.61
|
||||
}
|
||||
],
|
||||
"runtimeBudget": {
|
||||
"p95Seconds": 1500,
|
||||
"scope": "CI job timeout including installation/build; measured p95 not established"
|
||||
},
|
||||
"flakeHistory": {
|
||||
"status": "soaking",
|
||||
"evidence": "Earlier diagnostic repetition had one unexplained missing Hangul commit. GNOME-owned diagnostic and corrected permanent runner each passed 3/3. Long-term soak is missing."
|
||||
},
|
||||
"redGreenEvidence": {
|
||||
"status": "partial",
|
||||
"evidence": "Original exact-byte assertions retained. Permanent startup failed until the GNOME config-discovery mismatch was corrected. No intentional production regression was introduced."
|
||||
},
|
||||
"performanceBudget": {
|
||||
"required": false,
|
||||
"evidence": "CI-only harness; no application runtime changes."
|
||||
},
|
||||
"promotionCriteria": [
|
||||
"Collect 100 soak runs across 14 days with no unexplained flakes.",
|
||||
"Exercise native Wayland desktops beyond nested GNOME before broadening the claim."
|
||||
],
|
||||
"knownGaps": [
|
||||
"Only Hangul terminating digits; no native candidate-selection or other input-method coverage claim.",
|
||||
"No macOS, Windows, SSH terminal, packaged build, or mixed-version claim.",
|
||||
"Default config paths are shared with GNOME on a disposable hosted CI runner; nested mode refuses non-GitHub-Actions execution."
|
||||
],
|
||||
"demotionRule": "Keep experimental on unexplained failures; retain exact bytes and participation checks without retries, skips, or longer deadlines."
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -115,12 +115,12 @@ function configureHangulEngine() {
|
||||
}
|
||||
}
|
||||
|
||||
async function waitForHangulEngine(ibusProcess) {
|
||||
async function waitForHangulEngine(sessionProcess) {
|
||||
let lastError = ''
|
||||
const deadline = Date.now() + 15_000
|
||||
while (Date.now() < deadline) {
|
||||
if (ibusProcess.exitCode !== null) {
|
||||
throw new Error(`ibus-daemon exited early with code ${ibusProcess.exitCode}`)
|
||||
if (sessionProcess.exitCode !== null) {
|
||||
throw new Error(`IME session process exited early with code ${sessionProcess.exitCode}`)
|
||||
}
|
||||
if (
|
||||
nestedWayland &&
|
||||
@@ -292,7 +292,7 @@ async function runInsideSession(evidenceDir) {
|
||||
testExitCode = await waitForExit(testProcess)
|
||||
} finally {
|
||||
if (ibusProcess?.pid) {
|
||||
evidence.ibusGroupBeforeCleanup = ibusProcess?.pid ? processGroupMembers(ibusProcess.pid) : []
|
||||
evidence.ibusGroupBeforeCleanup = processGroupMembers(ibusProcess.pid)
|
||||
evidence.ibusGroupAfterCleanup = await stopOwnedProcessGroup(ibusProcess.pid)
|
||||
}
|
||||
if (windowManagerProcess?.pid) {
|
||||
@@ -384,7 +384,7 @@ async function runInsideSession(evidenceDir) {
|
||||
|
||||
async function runOuter() {
|
||||
if (process.platform !== 'linux') {
|
||||
throw new Error('The native IBus Hangul E2E runner requires Linux/X11')
|
||||
throw new Error('The native IBus Hangul E2E runner requires Linux')
|
||||
}
|
||||
|
||||
const evidenceDir = mkdtempSync(path.join(os.tmpdir(), 'orca-terminal-ime-e2e-'))
|
||||
@@ -437,11 +437,11 @@ async function runOuter() {
|
||||
if (!sessionProcess.pid) {
|
||||
throw new Error('xvfb-run did not return a PID')
|
||||
}
|
||||
console.error(`[terminal-ime] started isolated X11 session PID ${sessionProcess.pid}`)
|
||||
console.error(`[terminal-ime] started isolated display session PID ${sessionProcess.pid}`)
|
||||
const exitCode = await waitForExit(sessionProcess)
|
||||
const remaining = await stopOwnedProcessGroup(sessionProcess.pid)
|
||||
if (remaining.length > 0) {
|
||||
throw new Error(`Owned X11 session processes survived cleanup: ${remaining.join('; ')}`)
|
||||
throw new Error(`Owned display session processes survived cleanup: ${remaining.join('; ')}`)
|
||||
}
|
||||
return exitCode
|
||||
}
|
||||
|
||||
@@ -190,6 +190,8 @@ test.describe('Hangul terminating digit @headful', () => {
|
||||
}))
|
||||
console.log(`[digit-diag] ${JSON.stringify(launchDiagnostics)}`)
|
||||
if (INJECTOR === 'nested') {
|
||||
expect(launchDiagnostics.ozonePlatform).toBe('wayland')
|
||||
expect(launchDiagnostics.waylandDisplay).toBeTruthy()
|
||||
// Under Wayland the app's ready-to-show never fires here, so the window
|
||||
// stays hidden and the compositor has nothing to give keyboard focus to.
|
||||
await electronApp.evaluate(({ BrowserWindow }) => {
|
||||
|
||||
Reference in New Issue
Block a user