Skip to content

fix(tests): fix flaky test_capture_pane_flags[join_wrapped_numbers] - #655

Open
tony wants to merge 2 commits into
masterfrom
fix/flaky-join-wrapped-numbers-test
Open

fix(tests): fix flaky test_capture_pane_flags[join_wrapped_numbers]#655
tony wants to merge 2 commits into
masterfrom
fix/flaky-join-wrapped-numbers-test

Conversation

@tony

@tonytony commented Apr 1, 2026

Copy link
Copy Markdown
Member

Summary

  • Fix race condition in test_capture_pane_flags[join_wrapped_numbers] where the completion marker was detected in the shell command echo before the command actually executed

Test plan

  • uv run py.test tests/test_pane_capture_pane.py -v — all 19 tests pass
  • CI passes

Fixes#654

@tony
tony marked this pull request as ready for review April 1, 2026 23:58
@codecov

codecovBot commented Apr 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.36%. Comparing base (d8b7127) to head (a468e8e).

Additional details and impacted files
@@ Coverage Diff @@## master #655 +/- ##
==========================================
- Coverage 52.44% 52.36% -0.09% 
==========================================
Files 26 26 Lines 3726 3726 Branches 747 747 ==========================================
- Hits 1954 1951 -3 - Misses 1468 1471 +3 
Partials 304 304 

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tony
tonyforce-pushed the fix/flaky-join-wrapped-numbers-test branch from 0cecae7 to 7bb49f0CompareApril 26, 2026 10:22
@tony
tonyforce-pushed the fix/flaky-join-wrapped-numbers-test branch from 7bb49f0 to 33e94abCompareMay 10, 2026 16:02
@tony
tonyforce-pushed the fix/flaky-join-wrapped-numbers-test branch from 33e94ab to cb5ebd4CompareMay 30, 2026 11:54
@tony
tonyforce-pushed the fix/flaky-join-wrapped-numbers-test branch from cb5ebd4 to 6c451e1CompareJuly 4, 2026 13:40
tony added 2 commits July 18, 2026 05:25
why: The command_complete() check matched the marker string inside the shell
command echo line ($ printf ... echo "__DONE_...") before the command actually
executed. On slower systems or CI, this race condition caused the test to
capture the pane before seq produced output.
what:
- Change marker detection to skip lines starting with $ (shell prompt echo)
- Marker now only matches when it appears as actual command output
Fixes#654
@tony
tonyforce-pushed the fix/flaky-join-wrapped-numbers-test branch from 6c451e1 to a468e8eCompareJuly 18, 2026 11:02
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky test: test_capture_pane_flags[join_wrapped_numbers] matches marker in command echo

1 participant

@tony