Skip to content

options(fix): Preserve user-option strings - #826

Open
tony wants to merge 3 commits into
masterfrom
fix/759-user-options
Open

tony wants to merge 3 commits into
masterfrom
fix/759-user-options

Conversation

@tony

@tony tony commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Preserve user-option strings in single and bulk reads.
  • Keep built-in numeric and boolean conversions unchanged.
  • Document explicit conversion for callers relying on the old coercion.

An option such as @count="123" previously read back as the integer 123, so a user-supplied identity stopped comparing equal to its stored value. show_option() and show_options() now return "123", "on", "off" and the empty string unchanged. This follows tmux 3.2a's user-option string storage; the compatibility floor remains 3.2a.

The correction covers server, session, window and pane options, global session/window defaults, and named inherited reads. Runnable guide and migration examples show the corrected value and explicit conversion when an application needs a number or boolean.

Test plan

  • Both public read methods preserve the four string values across applicable scopes.
  • Existing built-in option conversions and configured options doctests pass.
  • Independently restoring either old conversion makes the corresponding scope regressions fail.
  • Native checks verify both client and daemon on tmux 3.2a and stable 3.8.
  • Ruff format/lint, mypy and just build-docs pass.
  • Full configured pytest on stable 3.8 is FAIL: the failure IDs and messages match unchanged master. The separate compatibility PR tmux(fix[3.8]): Support hooks and terminal fixtures #825 addresses the hooks, popup and floating-pane failures. This branch includes no sibling changes or retries.
  • Hosted checks at 0d8c9fea8c2b3b6d994d95b6f97ea9fdf64c247e remain FAIL: tmux 3.2a and 3.3a pass; 3.4, 3.5, 3.6, 3.7a and 3.7b fail. Both CodeQL analyses and the aggregate pass; codecov/project fails. The existing cached-binary ABI problem is tracked by tmux(fix[3.8]): Support hooks and terminal fixtures #825. The development-tmux job reports success despite failing to start pytest because of that ABI problem; it is not a passing test run. Maintainer review remains pending.

Addresses #759. The failed mandatory full-suite gate keeps delivery partial; maintainer review remains pending.

@codecov

codecov Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 52.50%. Comparing base (03c4c4b) to head (55752f4).

Files with missing lines Patch % Lines
src/libtmux/options.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #826      +/-   ##
==========================================
+ Coverage   52.37%   52.50%   +0.13%     
==========================================
  Files          26       26              
  Lines        3729     3733       +4     
  Branches      747      748       +1     
==========================================
+ Hits         1953     1960       +7     
+ Misses       1472     1469       -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 added 3 commits November 6, 2026 19:37
why: tmux stores user options as strings, but reading values such as
"123" or "off" changed their types and broke round trips.

what:
- Preserve @ values in single and bulk option reads across scopes
- Cover inherited reads and retain built-in option conversions
- Document string results and explicit conversion for callers
why: Keep development and CI linting on the same Ruff release,
including corrected f-string conversions and safer lint fixes.

what:
- Raise Ruff floors in the development and lint dependency groups
- Lock Ruff 0.17.3 with its published source and wheel hashes

Ruff release notes:
https://github.com/astral-sh/ruff/releases/tag/0.17.2
https://github.com/astral-sh/ruff/releases/tag/0.17.3
why: Contributors need the lint-tool requirement alongside other
development environment changes.

what:
- Document the Ruff 0.17.3 minimum for development and lint checks
@tony
tony force-pushed the fix/759-user-options branch from 0d8c9fe to 55752f4 Compare November 7, 2026 02:00

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant