{"record":{"id":"4747a001bad75530","repo":"stablyai/orca","slug":"terminal-input-and-scroll-stayed-responsive-withou","errorCode":null,"errorMessage":"Terminal input and scroll stayed responsive without the fix on this host.","messagePattern":"Terminal input and scroll stayed responsive without the fix on this host\\.","errorType":"exception","errorClass":"MissingReproductionError","httpStatus":null,"severity":"warning","filePath":"config/scripts/verify-linux-wayland-gpu-sandbox.mjs","lineNumber":298,"sourceCode":"\n    logPhase('window.first')\n    page = await runWithTimeout('first renderer window', () => app.firstWindow(), timeoutMs)\n    logPhase('window.load')\n    await runWithTimeout(\n      'renderer domcontentloaded',\n      () => page.waitForLoadState('domcontentloaded'),\n      rendererSetupTimeoutMs\n    )\n    logPhase('window.loaded')\n    const ptyId = await setupTerminal(page, repoPath, logPhase)\n    terminalExerciseStarted = true\n    logPhase('exercise.start')\n    const scroll = await assertScrollbackBufferWorks(page, ptyId, runId, logPhase)\n    const typedMarkers = await assertKeyboardInputWorks(page, ptyId, repoPath, runId, logPhase)\n    const gpuCrashLines = stderrLines.filter((line) => gpuCrashPattern.test(line))\n\n    if (mode === 'expect-repro') {\n      throw new MissingReproductionError(\n        'Terminal input and scroll stayed responsive without the fix on this host.'\n      )\n    }\n    if (gpuCrashLines.length > 0) {\n      throw new Error(`GPU crash evidence appeared in stderr:\\n${gpuCrashLines.join('\\n')}`)\n    }\n\n    console.log(\n      JSON.stringify(\n        {\n          mode,\n          phase: validationState.phase,\n          waylandDisplay: process.env.WAYLAND_DISPLAY ?? null,\n          xdgSessionType: process.env.XDG_SESSION_TYPE ?? null,\n          switches: commandLineSwitches,\n          scroll,\n          typedMarkers,\n          gpuCrashLines","sourceCodeStart":280,"sourceCodeEnd":316,"githubUrl":"https://github.com/stablyai/orca/blob/1136503c6a231a16dce8f921f6fadb63d181e8db/config/scripts/verify-linux-wayland-gpu-sandbox.mjs#L280-L316","documentation":"Thrown by the Linux Wayland GPU sandbox verification script when running in --mode=expect-repro and the terminal input and scrollback exercises completed without freezing. In expect-repro mode the test deliberately exercises the unfixed code path to confirm the bug reproduces on this host; if the terminal stays responsive, the bug is absent and the test cannot validate that a subsequent fix actually addresses it. This is a MissingReproductionError, a custom Error subclass defined locally in the script (verify-linux-wayland-gpu-sandbox.mjs:31).","triggerScenarios":"Running the script with --mode=expect-repro on a host where the GPU sandbox crash does not occur (e.g. a host with a different GPU driver, a newer Chromium version that already handles the bug, or running under X11 instead of Wayland). The throw fires at line 298 only after assertScrollbackBufferWorks and assertKeyboardInputWorks both succeed without the terminal wedging.","commonSituations":"Running the verification on a CI runner whose GPU/driver combination does not exhibit the Wayland GPU sandbox crash; running on a host where XDG_SESSION_TYPE is not wayland; the GPU crash only manifests under specific Mesa/Chromium version combinations and this host has a different one; the fix was already cherry-picked into the branch being tested.","solutions":["Confirm the host is actually running a Wayland session: echo $XDG_SESSION_TYPE should print wayland and $WAYLAND_DISPLAY should be set.","Verify the GPU driver and Mesa version match a known-reproducible configuration; if the host's stack is newer, switch to a runner or container with the vulnerable combination.","If the bug genuinely cannot reproduce on any available host, run with --mode=verify-fix instead — that mode asserts the terminal stays responsive and does not require reproduction.","Check whether the fix commit is already on the branch under test (git log --oneline for the GPU sandbox fix); if so, the expect-repro mode is the wrong mode for this branch."],"exampleFix":"// before — running on a host where the bug doesn't reproduce\n//   node config/scripts/verify-linux-wayland-gpu-sandbox.mjs --mode=expect-repro\n//\n// after — use verify-fix mode which expects the terminal to stay responsive\n//   node config/scripts/verify-linux-wayland-gpu-sandbox.mjs --mode=verify-fix","handlingStrategy":"validation","validationCode":"// Before running the script, validate the host can reproduce the bug.\n// Check Wayland session is active.\nfunction canReproduceOnThisHost() {\n  const session = process.env.XDG_SESSION_TYPE\n  const display = process.env.WAYLAND_DISPLAY\n  if (session !== 'wayland' || !display) {\n    return false // bug only reproduces under Wayland\n  }\n  return true\n}\n\n// Choose mode based on host capability\nconst mode = canReproduceOnThisHost() ? 'expect-repro' : 'verify-fix'\nconsole.log(`Using --mode=${mode}`)","typeGuard":null,"tryCatchPattern":"// MissingReproductionError is a known, expected outcome in expect-repro mode.\n// The script itself handles it in its own catch block (hasBaseReproductionEvidence).\n// External callers should treat it as a non-fatal signal, not a crash.\ntry {\n  await runVerification({ mode: 'expect-repro' })\n} catch (error) {\n  if (error.message.includes('stayed responsive without the fix')) {\n    console.warn('Bug did not reproduce on this host — use --mode=verify-fix instead')\n    process.exit(0) // non-fatal for orchestration\n  }\n  throw error\n}","preventionTips":["Document which GPU/driver/compositor combinations are known to reproduce the bug so CI runners can be selected accordingly.","Default to --mode=verify-fix in CI and only use --mode=expect-repro on dedicated reproduction hosts.","Log XDG_SESSION_TYPE and WAYLAND_DISPLAY at the start of the script to quickly diagnose missing reproduction."],"tags":["wayland","gpu-sandbox","ci-gate","terminal","playwright","reproducibility"],"backgroundTag":null,"analyzedSha":"1136503c6a231a16dce8f921f6fadb63d181e8db","analyzedAt":"2026-08-12T23:15:58.167Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}