Add tmux version detection and a capture-format drift guard#282
Merged
Conversation
79049bc to
f2baf94
Compare
3ca87ff to
ebc1990
Compare
f2baf94 to
eb748fe
Compare
c4b2262 to
fcf1910
Compare
eb748fe to
2e4fb8a
Compare
fcf1910 to
f09babd
Compare
2e4fb8a to
aa9c340
Compare
f09babd to
6b16c61
Compare
aa9c340 to
022ca0b
Compare
6b16c61 to
d6cf1a5
Compare
022ca0b to
a7dab8a
Compare
d6cf1a5 to
b49300e
Compare
89e338c to
695663d
Compare
069fe07 to
ba11a30
Compare
695663d to
428c742
Compare
There was no tmux version or capability detection anywhere in the codebase, so version-variant tmux output degraded silently. The pane-mode snapshot capture in particular lists a fixed set of format fields and, if a tmux version renames or reorders them, parsePaneModeState quietly returns HasState:false — a snapshot that always looks "no mode state" with nothing pointing at the version mismatch. Add internal/tmux/version.go: ServerVersion() (parsing `tmux -V`), ParseTmuxVersion, and TmuxVersion.AtLeast for capability comparisons, with table-driven unit tests covering version parsing and comparison across 3.2a/3.6a/3.10/next-builds/garbage. Add a real-tmux guard test that captures a live pane and asserts the mode state parses (HasState), failing loudly with the detected version if the hardcoded format ever drifts — turning silent degradation into a diagnosable failure. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
428c742 to
5bca605
Compare
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.
Close-the-loop stack — PR 11/12
Problem
There was no tmux version or capability detection anywhere in the codebase, so version-variant tmux output degraded silently. The pane-mode snapshot capture lists a fixed set of format fields; if a tmux version renames/reorders them,
parsePaneModeStatequietly returnsHasState:false— a snapshot that always looks like "no mode state," with nothing pointing at the version mismatch.Change
internal/tmux/version.go:ServerVersion()(parsestmux -V),ParseTmuxVersion, andTmuxVersion.AtLeastfor capability comparisons.3.2a/3.6a/3.10/next-3.5/ garbage.HasState), failing loudly with the detected version if the hardcoded format ever drifts.Test
All pass 2/2 locally vs tmux 3.6a (unit tests are pure; the guard + sanity test use real tmux). Runs under PR 5's version matrix, so the format guard is checked on both 3.2a and 3.6a.
🤖 Generated with Claude Code