railmux 0.4.0.dev12__tar.gz → 0.4.0.dev14__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {railmux-0.4.0.dev12/src/railmux.egg-info → railmux-0.4.0.dev14}/PKG-INFO +1 -1
- railmux-0.4.0.dev14/src/railmux/__init__.py +1 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/diagnostics.py +4 -1
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/tmux_server.py +19 -2
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14/src/railmux.egg-info}/PKG-INFO +1 -1
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_diagnostics.py +25 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_tmux_server.py +26 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_windows_msys2.py +1 -1
- railmux-0.4.0.dev12/src/railmux/__init__.py +0 -1
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/LICENSE +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/MANIFEST.in +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/README.md +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/pyproject.toml +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/setup.cfg +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/__main__.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/atomic_file.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/background_index.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/cli.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/codex_index.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/config.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/config_cli.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/discovery.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/display_transport.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/entrypoint.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/fast_display_client.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/fast_display_history.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/fast_display_input.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/fast_display_protocol.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/fast_display_server.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/favorites.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/fuzzy.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/help_workspace.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/launcher.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/legacy_sessions.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/local_clipboard.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/local_open.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/models.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/modes.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/mouse_manager.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/orphan_marker.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/pane_surface.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/path_codec.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/provider_paths.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/remote_config.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/renames.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/restart_state.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/runtime_config.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/scroll_agent.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/scroll_manager.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/selection_isolation.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/self_update.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/session_cache.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/session_index.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/setting_contracts.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/settings.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/ssh_args.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/ssh_compat.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/ssh_display_diagnostics.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/ssh_doctor.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/system_deps.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/terminal_status.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/tmux_binding_manager.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/tmux_ctl.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/tmux_health.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/tool_panes.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/transcript.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/ui/__init__.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/ui/_widgets.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/ui/app.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/ui/keymap.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/ui/modals.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/ui/projects_pane.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/ui/running_pane.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/ui/sessions_pane.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/ui/sidebar.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/ui/statusbar.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/ui/workspace.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/windows_bootstrap.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/windows_install_log.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/windows_msys2.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/windows_pacman.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux/windows_tmux_lifecycle.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux.egg-info/SOURCES.txt +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux.egg-info/dependency_links.txt +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux.egg-info/entry_points.txt +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux.egg-info/requires.txt +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/src/railmux.egg-info/top_level.txt +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_agent_workspace.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_atomic_file.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_background_index.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_cli.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_codex_delete.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_codex_index.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_codex_lineage.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_codex_transcript.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_config.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_config_cli.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_denested_transport_benchmark.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_discovery.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_display_transport.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_fast_full_window.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_focus_highlight.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_fullscreen_binding.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_fuzzy.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_help_agent.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_help_workspace.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_history_cleanup.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_keymap.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_launcher.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_layout_profile.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_legacy_sessions.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_local_clipboard.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_local_open.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_modals.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_mode_selection.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_modes.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_mouse_manager.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_new_project.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_options.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_orphan_recovery.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_pane_surface.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_path_codec.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_projects_pane.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_provider_paths.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_release_notes.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_release_workflow.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_remote_config.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_renames.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_restart_state.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_running_pane.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_running_sort.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_runtime_config.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_scroll_agent.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_scroll_manager.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_selection_isolation.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_self_update.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_session_cache.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_session_index.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_sessions_pane.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_setting_contracts.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_settings.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_sidebar.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_soft_quit.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_ssh_args.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_ssh_compat.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_ssh_display_benchmark.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_ssh_display_diagnostics.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_ssh_doctor.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_status.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_statusbar.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_system_deps.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_terminal_size.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_terminal_status.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_termux_local_touch.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_tmux_binding_manager.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_tmux_ctl.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_tmux_health.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_tmux_integration.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_tmux_status.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_tool_panes.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_transcript.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_utf8_state.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_web_demo_recorder.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_wheel_smoke.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_widgets.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_windows_bootstrap.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_windows_install_log.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_windows_pacman.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_windows_tmux_lifecycle.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_windows_wrapper_contract.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tests/test_yolo_prompt.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tools/denested_transport_benchmark.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tools/release_notes.py +0 -0
- {railmux-0.4.0.dev12 → railmux-0.4.0.dev14}/tools/wheel_smoke.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.4.0.dev14"
|
|
@@ -15,6 +15,7 @@ from typing import TextIO
|
|
|
15
15
|
from railmux import __version__
|
|
16
16
|
from railmux import legacy_sessions, tmux_health, tmux_server
|
|
17
17
|
from railmux.config import Config, ConfigError, default_config_path, load_config
|
|
18
|
+
from railmux.provider_paths import running_in_windows_wrapper
|
|
18
19
|
from railmux.runtime_config import normalized_command, runtime_environment
|
|
19
20
|
from railmux.ssh_display_diagnostics import (
|
|
20
21
|
SshDisplayDiagnostic,
|
|
@@ -204,8 +205,10 @@ def _dedicated_tmux_diagnostic(
|
|
|
204
205
|
)
|
|
205
206
|
if found is None:
|
|
206
207
|
return TmuxServerDiagnostic("unavailable")
|
|
208
|
+
source = os.environ if environ is None else environ
|
|
209
|
+
timeout = None if running_in_windows_wrapper(source) else 1.0
|
|
207
210
|
try:
|
|
208
|
-
target = tmux_server.discover_target(timeout=
|
|
211
|
+
target = tmux_server.discover_target(timeout=timeout, env=environ)
|
|
209
212
|
except tmux_server.TmuxClientServerMismatch:
|
|
210
213
|
return TmuxServerDiagnostic("client_server_mismatch")
|
|
211
214
|
except tmux_server.TmuxServerUnresponsive:
|
|
@@ -22,6 +22,8 @@ _SESSION_ID_RE = re.compile(r"[A-Za-z0-9-]{1,256}\Z")
|
|
|
22
22
|
_HISTORY_SOURCE_SCHEMA = 1
|
|
23
23
|
_TRANSCRIPT_SOURCE_SCHEMA = 1
|
|
24
24
|
_MAX_TRANSCRIPT_SOURCE_BYTES = 8192
|
|
25
|
+
_DEFAULT_DISCOVERY_TIMEOUT = 2.0
|
|
26
|
+
_WINDOWS_DISCOVERY_TIMEOUT = 5.0
|
|
25
27
|
|
|
26
28
|
|
|
27
29
|
class TmuxServerError(RuntimeError):
|
|
@@ -179,10 +181,25 @@ def current_target(
|
|
|
179
181
|
|
|
180
182
|
def discover_target(
|
|
181
183
|
*,
|
|
182
|
-
timeout: float =
|
|
184
|
+
timeout: float | None = None,
|
|
183
185
|
env: Mapping[str, str] | None = None,
|
|
184
186
|
) -> TmuxServerTarget | None:
|
|
185
|
-
"""Resolve the live dedicated server without starting a new server.
|
|
187
|
+
"""Resolve the live dedicated server without starting a new server.
|
|
188
|
+
|
|
189
|
+
MSYS2 tmux can need slightly more than two seconds to classify an
|
|
190
|
+
abandoned AF_UNIX pathname as having no live server. Give only the
|
|
191
|
+
managed Windows wrapper enough time to receive that authoritative result;
|
|
192
|
+
explicit watchdog probes retain their caller-selected bounds.
|
|
193
|
+
"""
|
|
194
|
+
if timeout is None:
|
|
195
|
+
from railmux.provider_paths import running_in_windows_wrapper
|
|
196
|
+
|
|
197
|
+
source = os.environ if env is None else env
|
|
198
|
+
timeout = (
|
|
199
|
+
_WINDOWS_DISCOVERY_TIMEOUT
|
|
200
|
+
if running_in_windows_wrapper(source)
|
|
201
|
+
else _DEFAULT_DISCOVERY_TIMEOUT
|
|
202
|
+
)
|
|
186
203
|
return _discover_label_target(socket_label(env), timeout=timeout, env=env)
|
|
187
204
|
|
|
188
205
|
|
|
@@ -6,6 +6,7 @@ from unittest.mock import MagicMock
|
|
|
6
6
|
|
|
7
7
|
from railmux.diagnostics import (
|
|
8
8
|
TmuxServerDiagnostic,
|
|
9
|
+
_dedicated_tmux_diagnostic,
|
|
9
10
|
_tool_diagnostic,
|
|
10
11
|
collect_doctor_snapshot,
|
|
11
12
|
run_doctor,
|
|
@@ -36,6 +37,30 @@ def test_version_preserves_tmux_letter_suffix(monkeypatch):
|
|
|
36
37
|
assert diagnostic.version == "3.2a"
|
|
37
38
|
|
|
38
39
|
|
|
40
|
+
def test_windows_doctor_allows_stale_socket_settle_without_changing_posix(
|
|
41
|
+
monkeypatch,
|
|
42
|
+
):
|
|
43
|
+
observed = []
|
|
44
|
+
monkeypatch.setattr(
|
|
45
|
+
"railmux.diagnostics.shutil.which", lambda *_args, **_kwargs: "tmux")
|
|
46
|
+
|
|
47
|
+
def discover(*, timeout, env):
|
|
48
|
+
observed.append((timeout, env))
|
|
49
|
+
return None
|
|
50
|
+
|
|
51
|
+
monkeypatch.setattr(
|
|
52
|
+
"railmux.diagnostics.tmux_server.discover_target", discover)
|
|
53
|
+
posix_env = {"PATH": "/bin"}
|
|
54
|
+
windows_env = {
|
|
55
|
+
"PATH": "/usr/bin",
|
|
56
|
+
"RAILMUX_WINDOWS_RUNTIME": "msys2",
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
assert _dedicated_tmux_diagnostic(posix_env).status == "not_running"
|
|
60
|
+
assert _dedicated_tmux_diagnostic(windows_env).status == "not_running"
|
|
61
|
+
assert observed == [(1.0, posix_env), (None, windows_env)]
|
|
62
|
+
|
|
63
|
+
|
|
39
64
|
def test_doctor_report_is_useful_and_redacts_user_values(
|
|
40
65
|
monkeypatch, tmp_path,
|
|
41
66
|
):
|
|
@@ -101,6 +101,32 @@ def test_discover_target_uses_explicit_label_and_times_out(monkeypatch):
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
|
|
104
|
+
@pytest.mark.parametrize(
|
|
105
|
+
("env", "expected_timeout"),
|
|
106
|
+
[
|
|
107
|
+
({}, 2.0),
|
|
108
|
+
({"RAILMUX_WINDOWS_RUNTIME": "msys2"}, 5.0),
|
|
109
|
+
],
|
|
110
|
+
)
|
|
111
|
+
def test_discover_target_allows_managed_msys_stale_socket_settle(
|
|
112
|
+
monkeypatch, env, expected_timeout,
|
|
113
|
+
):
|
|
114
|
+
observed = {}
|
|
115
|
+
|
|
116
|
+
def discover(label, *, timeout, env):
|
|
117
|
+
observed.update(label=label, timeout=timeout, env=env)
|
|
118
|
+
return None
|
|
119
|
+
|
|
120
|
+
monkeypatch.setattr(tmux_server, "_discover_label_target", discover)
|
|
121
|
+
|
|
122
|
+
assert tmux_server.discover_target(env=env) is None
|
|
123
|
+
assert observed == {
|
|
124
|
+
"label": "railmux",
|
|
125
|
+
"timeout": expected_timeout,
|
|
126
|
+
"env": env,
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
|
|
104
130
|
def test_discover_target_classifies_tmux_client_server_mismatch(monkeypatch):
|
|
105
131
|
monkeypatch.setattr(
|
|
106
132
|
subprocess,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.4.0.dev12"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|