Skip to content

Fix window-name test for tmux 3.7a/3.7b and add them to CI#698

Merged
tony merged 3 commits into
masterfrom
tmux-3.7a-and-b
Jul 4, 2026
Merged

Fix window-name test for tmux 3.7a/3.7b and add them to CI#698
tony merged 3 commits into
masterfrom
tmux-3.7a-and-b

Conversation

@tony

@tony tony commented Jul 3, 2026

Copy link
Copy Markdown
Member

Summary

  • Fix the window-name test to assert that : and . in window names are accepted. The old test expected tmux to reject them, which only the tmux 3.7 point release ever did — so it fails on tmux 3.7a/3.7b.
  • Add tmux 3.7a and 3.7b to the CI matrix so the grid exercises the 3.7 line's shipped patch releases.
  • Drop the superseded tmux 3.7 from the matrix — it is the lone release that rejects :/., which a pure acceptance assertion can't accommodate.

Root cause

tmux's window-name sanitization changed around the 3.7 release:

tmux version : / . in window names
3.2a – 3.6 accepted
3.7 (point release) rejected (invalid window name)
3.7a, 3.7b, master accepted again

The rejection was introduced just before 3.7 and reverted in 3.7a — upstream tmux commit 166267c8, "Allow :. in names again, forbidding them is overly pernickety." So it existed in exactly one release. Verified empirically on tmux 3.7b: project:frontend and app-v1.0 are accepted.

The test gated on has_gte_version("3.7"), expecting rejection for all >= 3.7. But libtmux's get_version() strips letter suffixes (re.sub(r"[a-z-]", "", version)), so 3.7, 3.7a, and 3.7b all compare equal to 3.7. libtmux cannot distinguish the point release from its patches, so on 3.7a/3.7b the test took the reject-expecting branch and failed with DID NOT RAISE.

Design decisions

  • Assert acceptance, not rejection. :/. names work on every tmux libtmux supports except the single superseded 3.7 release. Since get_version() can't detect literal 3.7 anyway, an unconditional acceptance assertion is both correct and the most the version API can express.
  • Represent the 3.7 line by 3.7a/3.7b, not 3.7. A pure acceptance test only stays green if no grid version rejects the names. 3.7a/3.7b are the patch releases users actually run (3.7 was superseded within days) and exercise the same 3.7-family gates (has_gte_version("3.7"), has_version("3.7")) identically.

Test plan

  • New test_new_window_name_colon_period_accepted[colon]/[period] pass on local tmux 3.7b
  • Full suite green locally (uv run pytest --reruns 0) — the only failures were pre-existing capture/timing flakes that pass when re-run serially
  • uv run ruff check . and ruff format . --check clean; uv run mypy src tests clean; just build-docs succeeds
  • CI grid exercises the new tmux 3.7a and 3.7b cells

tony added 3 commits July 3, 2026 18:14
why: The tmux 3.7 point release briefly rejected ':' and '.' in window
names, but 3.7a reverted it as "overly pernickety" (tmux 166267c8).
libtmux's version helpers strip the letter suffix, so get_version()
cannot tell 3.7 from 3.7a -- both report "3.7" -- and the old
has_gte_version("3.7") reject branch fails on tmux 3.7a/3.7b.

what:
- Replace test_new_window_name_invalid_on_3_7 with
  test_new_window_name_colon_period_accepted
- Assert new_window() accepts ':'/'.' names verbatim on all supported
  tmux (3.2a-3.6 and 3.7a onward)
- Drop the version-gated rejection expectation
why: tmux 3.7a/3.7b are the shipped patch releases users run; the 3.7
point release was superseded within days. 3.7 is also the lone release
that rejects ':'/'.' in window names (reverted in 3.7a), so keeping it
in the grid would conflict with the acceptance test.

what:
- Add tmux 3.7a and 3.7b to the test matrix
- Drop the superseded 3.7 point release
why: v0.60.0's suite asserts a window-name rejection only the tmux 3.7
point release enforced, so it fails on 3.7a/3.7b -- which downstream
packagers run against system tmux.

what:
- Add ### Development note under the 0.61.x placeholder
@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.89%. Comparing base (bb0f388) to head (f95afc3).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #698   +/-   ##
=======================================
  Coverage   51.89%   51.89%           
=======================================
  Files          25       25           
  Lines        3623     3623           
  Branches      733      733           
=======================================
  Hits         1880     1880           
  Misses       1439     1439           
  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

tony commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

@tony
tony merged commit eef9944 into master Jul 4, 2026
15 checks passed
@tony
tony deleted the tmux-3.7a-and-b branch July 4, 2026 00:00
tony added a commit to tmux-python/tmuxp that referenced this pull request Jul 4, 2026
libtmux 0.61.0 hardens support for the tmux 3.7 patch line. tmuxp
inherits the fix and adopts the one new helper it benefits from, so
`tmuxp debug-info` now reports the exact tmux patch release.

- **Bump**: libtmux `~=0.60.0` -> `~=0.61.0`; no breaking changes,
  tmux 3.2a-3.6 unaffected.
- **debug-info**: report the raw tmux version, keeping the
  point-release letter (`3.7a`/`3.7b`) via libtmux's new
  `get_version_str()`. `get_version()` strips the letter for numeric
  comparison, so bug reports previously lost the exact patch release
  -- which can differ in behavior.
- **Inherited fix**: libtmux's `Pane.break_pane()` keeps tmux's own
  default window name on tmux 3.7a/3.7b; tmuxp never calls
  `break_pane`, so this is behavior-only.

`plugin.py` keeps `get_version()` for `LooseVersion` version-gate
comparisons, where the letter suffix must not participate in ordering.

Release: https://github.com/tmux-python/libtmux/releases/tag/v0.61.0
Changelog: https://libtmux.git-pull.com/history.html#libtmux-0-61-0-2026-07-04
See also: tmux-python/libtmux#699, tmux-python/libtmux#698
Sign up for free to 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.

1 participant