Repository navigation
fix: resolve flaky PTY/timing issues in integration tests - #1459
Merged
Merged
Conversation
Remove timing assertion from test_list_progressive_api, increase switch_picker stabilization timeouts from 10s to 30s, add content-presence fallback for skim cosmetic redraws, and fix incorrect expected content in test_switch_picker_respects_list_config. Co-Authored-By: Claude <[email protected]>
worktrunk-bot
approved these changes
Mar 12, 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.
Three root causes of intermittent PTY test failures under CI load:
Timing assertion in
test_list_progressive_api—total_duration < 5sfails under load due to the 1s minimum drain wait. Removed (tests correctness, not performance).Insufficient stabilization timeout in switch_picker tests — skim's async item loading can exceed 10s under heavy CI. Increased to 30s (fast 10ms polling means no slowdown in normal case).
Stability vs content race in
wait_for_stable_with_content— requiredscreen_unchanged_500ms AND content_presentsimultaneously, but skim's cosmetic redraws (cursor positioning, border repaints) kept resetting the stability timer. Addedcontent_found_atfallback: once expected content has been continuously present for 500ms, accept stability regardless of cosmetic redraws. Also panics with diagnostics when expected content never appears (previously warned silently, leading to confusing snapshot mismatches).Bonus: fixed incorrect expected content
"│orphan-branch"→"orphan-branch"intest_switch_picker_respects_list_config(orphan-branch is in the list panel, not adjacent to the border). Previously masked by the silent timeout.