test(cli): verify TUI rendering without fixed UI text - #13693
Merged
Conversation
marius-kilocode
enabled auto-merge
September 2, 2026 12:04
WebReflection
approved these changes
Sep 2, 2026
This was referenced Sep 6, 2026
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.
What Problem This Solves
The rendered CLI smoke test added in #13598 could fail after a healthy startup. It waited for
Ask anything..., sent Ctrl+P, and expectedCommands. First-run provider setup could take focus or replace the palette, which caused the macOS Intel and Linux ARM64 validation jobs in run 33534471714 to time out.The original requirement remains: a process that starts but leaves the TUI blank must not pass release validation. Process liveness,
--version, and a successful headless command are not sufficient.Why This Change Was Made
Read the current terminal screen with the existing VT parser instead of matching application copy or concatenating stripped output. Type a random suffix, move to the start of the input, insert a random prefix, and require the composed value on screen. That value is never sent as one input string, so plain terminal echo cannot satisfy the editing check.
Keep the fixture isolated and offline with a dummy provider. Retry input acquisition within the existing deadline to handle delayed focus. Preserve diagnostic detection, early-exit failures, and process-tree cleanup. Ignore hidden terminal control-string payloads so capability queries cannot count as rendered text.
Move the TUI-specific check beside its CLI command so it can reuse the existing terminal parser without adding a core-to-CLI dependency. Keep the real-PTY regression tests in the explicit Linux, macOS, and Windows workflow steps.
User Impact
Release validation still rejects a blank or unresponsive TUI, but no longer depends on placeholder text, command-palette wording, or first-run provider onboarding. No production TUI startup hooks, real credentials, or model requests are needed. The existing Alpine and Windows ARM64 PTY exclusions are unchanged.
Evidence
__pty-smokecommand ten times successfully. The binary remains 179 MiB as reported bydu -h.Manual test: run
KILO_PTY_SMOKE=1 <compiled-cli> --pure __pty-smoke. The check must complete without credentials or submitted prompts. On Unix, useSHELL=/bin/bashif the local default shell is Fish.