Skip to content

tests(fix): Wait for rendered pane output - #837

Draft
tony wants to merge 1 commit into
masterfrom
test/rendered-output-readiness
Draft

tony wants to merge 1 commit into
masterfrom
test/rendered-output-readiness

Conversation

@tony

@tony tony commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Capture flag tests can accept echo "__DONE_join_wrapped_numbers__" from terminal input before the shell produces the numbers. The split-pane environment test can also index an empty capture immediately after send_keys. Both failures occurred during the independent CI cache repair in #835.

Wait for a complete marker row assembled by the shell, and for each expected environment value. The checks retain the existing capture assertions and expire after one second. This matches the native distinction between injecting input and capturing the pane grid. Library behavior and the tmux compatibility floor are unchanged.

Validation

  • The affected cases pass on tmux 3.2a, 3.6, and 3.8 with reruns disabled; the existing 3.4-only flag case remains skipped on 3.2a.
  • A gated shell proves the old predicate accepts echoed input before execution; the new predicate succeeds only after release and rendered output.
  • Shortened numeric output, an absent completion marker, and incorrect environment values each fail the corresponding test.
  • Ruff format/lint, mypy, and just build-docs pass.
  • Full configured pytest, including doctests: FAIL on tmux 3.6 with reruns disabled. Failures are recorded below.
  • Hosted CI at the PR head: FAIL. tmux 3.2a and 3.3a pass; 3.4, 3.5, 3.6, 3.7a, and 3.7b fail before pytest because cached binaries require missing NCURSES6_TINFO_6.4.current. The development-tmux job reports success through continue-on-error, but hits the same loader error and never runs pytest. CodeQL passes; codecov/project fails. Duplicate PR build and release jobs are skipped.
Full-suite failure in unchanged code Baseline check
test_capture_pane_start: captures empty text before the expected prompt Reproduced from an extracted copy of current master.
test_new_session_start_directory_pathlib: reads the launch directory instead of the requested directory Reproduced from an extracted copy of current master.
test_new_window_start_directory_pathlib: reads the launch directory instead of the requested directory Passed the focused master check; the full-suite failure remains unresolved.

This draft keeps those failures visible. Native cache repair remains in #835 and broader tmux 3.8 compatibility remains in #825; neither sibling branch is included here.

@codecov

codecov Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 56.87%. Comparing base (c7ba4d3) to head (b1fc099).
⚠️ Report is 30 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #837      +/-   ##
==========================================
- Coverage   56.94%   56.87%   -0.08%     
==========================================
  Files          29       29              
  Lines        4267     4267              
  Branches      855      855              
==========================================
- Hits         2430     2427       -3     
- Misses       1530     1533       +3     
  Partials      307      307              

☔ 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
tony force-pushed the test/rendered-output-readiness branch from 59bc0f5 to 116b0ab Compare November 7, 2026 01:59
@tony
tony force-pushed the test/rendered-output-readiness branch 3 times, most recently from c494c74 to 8f28701 Compare November 22, 2026 14:54
why: Echoed command text can satisfy the capture fixture before its
output exists, and an early capture can miss a split pane's environment
value. Both races cause intermittent test failures.

what:
- Assemble the capture marker in the shell and match its complete row
- Wait for each environment value instead of assuming prompt timing
- Reuse bounded polling and retain the capture flag assertions
@tony
tony force-pushed the test/rendered-output-readiness branch from 8f28701 to b1fc099 Compare November 22, 2026 19:27
@tony tony added the area: observation Waits, capture, snapshots, subscriptions label Nov 24, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: observation Waits, capture, snapshots, subscriptions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant