fix(test): close echo race in the kitty detach integration test#10
Merged
Conversation
waitFor(KITTY-APP) could match the tty echo of the typed printf command, since the marker appeared literally in the command line. On slow runners the detach keys were then sent before the app enabled kitty keyboard mode, leaked into the window, and the test timed out waiting for a detach that never happened. Assemble the marker from two printf arguments so the echo never contains it, and print it after the kitty enable so visibility of the marker implies the daemon has processed the enable.
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.
The
kitty keyboard apps: encoded C-a still detachestest failed in the v0.3.0 release pipeline with a timeout.waitFor("KITTY-APP")matched the tty echo of the typed printf command (the marker appeared literally in the command line), so on a slow runner the CSI-u detach keys were sent before the app enabled kitty keyboard mode, leaked into the window, and no detach ever happened.Fix: assemble the marker from two printf arguments (
KITTY-%s+APP) so the echoed command never contains it, and print it after the\033[>1uenable so the marker becoming visible implies the daemon already processed the enable (same output chunk, enable first).Test-only change; shipped binaries are unaffected.
Decision log
sendcallsites: the cat/canvas roundtrips wait for the echo on purpose; no other test gates on output that also appears in its typed command.Testing
zig build test-all(Debug): 67/67 pass; integration suite run 3 more consecutive times clean.Generated with Coder Agents on behalf of @kylecarbs.