GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — command(feat[timeout]) Add opt-in per-call deadlines by tony · Pull Request #807 · tmux-python/libtmux

Conversation

@tony

@tony tony commented Nov 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

A tmux command can wait indefinitely when the expected signal never arrives. tmux_cmd and the four object cmd facades now accept an optional per-call timeout in seconds. Defaults and returned command results retain their current behavior. For example, server.cmd("wait-for", "ready", timeout=0.5) raises exc.TmuxTimeout if its client exceeds the bound; timeout=None waits indefinitely.

Expiry kills and reaps only the client this call spawned, closes its pipes, and raises exc.TmuxTimeout. An accepted server mutation may remain; the call never retries it. Large finite bounds use safe native wait slices under one monotonic deadline and one client.

Timed object commands refuse custom server dispatchers and injected engines before effects, including dispatchers that accept arbitrary keywords while discarding the requested bound. Untimed custom routing remains unchanged.

The exception matches the inspected engine proposal's name, base, fields, message and suppressed native cause. This PR imports no unmerged engine code, changes no tmux minimum, and adds no server-wide default. Shared workflow budgets, async cancellation, channel-wait deadlines and the wider engine migration remain separate slices.

The minimum remains tmux 3.2a. Its ordinary channel wait blocks for a signal; this deadline bounds the owned client.

Related to #689 and #629. This is a focused alternative to the broader timeout proposals in #735 and #757; it builds directly from current master with sibling branches absent.

Validation:

  • New deadline cases fail before implementation and pass afterward.
  • Removing reaping deliberately makes the owned-client regression fail.
  • Custom-dispatch regressions fail before the guard and when the guard is deliberately removed.
  • Large-deadline overflow and same-client wait-slice regressions fail before repair and pass afterward.
  • Public command consumers, common doctests, Ruff, mypy, and the repository documentation build pass.
  • Full configured pytest suite on stable tmux 3.8: FAIL. Its failures and failure messages match unchanged master; tests fail with tmux 3.8 #775 separately tracks the hooks, popup and floating-pane corrections. The complete failing run is retained with retries disabled.

Local evidence covers Linux/WSL, Python 3.15, and client-and-daemon pairs verified as tmux 3.2a and stable 3.8. The local development 3.8a build is recorded separately. Hosted checks at fa3f91cd67e3798979f90f7f476836e5c32f24e4 remain FAIL: tmux 3.3a pass; 3.2a, 3.4, 3.5, 3.6, 3.7a, 3.7b fail. CodeQL passes; codecov/project fails. The development-tmux job allows failures and is not full-suite pass evidence. The 3.2a failure is the existing capture test accepting an echoed, unexecuted completion marker; the other stable failures include the cached-binary ABI problem tracked in #825. The failed mandatory full-suite gate keeps this delivery slice unfinished. No macOS CI or qualification work is added, and existing support is preserved.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@tony tony added this to libtmux Nov 1, 2026
@tony tony mentioned this pull request Nov 1, 2026
Operationalize typed operations and engines (follow-up to #688) #689
Open
@codecov

codecov Bot commented Nov 1, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.10638% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.81%. Comparing base (03c4c4b) to head (9b3cc43).

Files with missing lines Patch % Lines
src/libtmux/common.py 85.71% 2 Missing and 1 partial ⚠️
src/libtmux/exc.py 60.00% 2 Missing ⚠️
src/libtmux/server.py 77.77% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #807      +/-   ##
==========================================
+ Coverage   52.37%   52.81%   +0.43%     
==========================================
  Files          26       26              
  Lines        3729     3770      +41     
  Branches      747      756       +9     
==========================================
+ Hits         1953     1991      +38     
- Misses       1472     1474       +2     
- Partials      304      305       +1     

☔ 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.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tony tony moved this to In Progress in libtmux Nov 1, 2026
This was referenced Nov 1, 2026
server(feat[wait]) Bound ordinary channel waits #809
Open
Server.wait_for() has no timeout, so a pane that never signals hangs forever #732
Open
Retain immutable pane capture observations #810
Open
Snapshot / frame dataclass #370
Open
[Agentic DX] libtmux: consolidated roadmap (core + async + engines) #629
Open
tony added a commit that referenced this pull request Nov 1, 2026
@tony
CHANGES(docs) Optional command deadlines (#807)
cb62f88
why: Readers need product notes before adopting this change.

what:
- Describe optional command deadlines in the unreleased changelog
- Reference PR #807
@tony
tony force-pushed the rmux-py-command-deadline branch from 6b92875 to cb62f88 Compare November 1, 2026 13:51
tony added 6 commits November 6, 2026 19:40
@tony
command(feat[timeout]) Add opt-in per-call deadlines
51cd8ec
why: A tmux client waiting indefinitely can block its caller after the expected signal is lost.
what:
- Add optional deadlines to command facades while preserving blocking defaults
- Reap timed-out clients and retain the engine-compatible timeout exception
- Keep large finite bounds within native wait ranges under one deadline
- Verify connection scope, retained mutations and cleanup regressions
@tony
tests(fix[timeout]) Match the subprocess communicate signature
315bcf8
why: CI checks the full tree and rejects a fixture wrapper with a different keyword signature.
what:
- Preserve communicate's input keyword in the real-process test wrapper
- Replace method assignment with the existing monkeypatch fixture
@tony
CHANGES(docs) Optional command deadlines (#807)
1c70551
why: Readers need product notes before adopting this change.

what:
- Describe optional command deadlines in the unreleased changelog
- Reference PR #807
@tony
command(fix[timeout]): Refuse unbounded dispatch
f988eff
why: A custom server dispatcher accepting arbitrary keywords can
silently discard an object command deadline and perform the operation
without the caller's requested bound.

what:
- Reject timed forwarding to custom dispatchers and injected engines
- Preserve unbounded routing and command result identity
- Cover instance, class, and subclass dispatch and document refusal
@tony
py(deps[dev]) Raise Ruff floor to 0.17.3
a59bf96
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
@tony
CHANGES(docs): Record the Ruff development floor
9b3cc43
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 rmux-py-command-deadline branch from fa3f91c to 9b3cc43 Compare November 7, 2026 02:17

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

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

libtmux
Status: In Progress

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@tony
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.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.