From cc88b3b8e5bb9f7d9f23ed6ae85a52fd7b5b9ed6 Mon Sep 17 00:00:00 2001 From: Can Celik Date: Wed, 2 Sep 2026 02:45:20 +0300 Subject: feat: add stable client endpoint compatibility (#3509) * feat: add stable client endpoint compatibility * fix: keep portable-pty patch checks composable * ci: run maintenance checks in pull requests * fix: reject endpoint errors from terminal clients * feat: keep compatible servers running across updates --- .../0002-windows-raw-command-tail.patch | 11 +++++++---- ...003-reject-malformed-windows-environments.patch | 4 ++-- vendor/portable-pty/src/cmdbuilder.rs | 22 +++++++++++----------- 3 files changed, 20 insertions(+), 17 deletions(-) (limited to 'vendor') diff --git a/vendor/patches/portable-pty/0002-windows-raw-command-tail.patch b/vendor/patches/portable-pty/0002-windows-raw-command-tail.patch index a9d40743..f2dec1e3 100644 --- a/vendor/patches/portable-pty/0002-windows-raw-command-tail.patch +++ b/vendor/patches/portable-pty/0002-windows-raw-command-tail.patch @@ -86,10 +86,10 @@ index 0000000..0000000 100644 // Ensure that the command line is nul terminated too! cmdline.push(0); Ok((exe, cmdline)) -@@ -820,4 +846,27 @@ mod tests { - cmd.env_remove("cARGO_pKG_aUTHORS"); - assert!(cmd.get_env("CARGO_PKG_AUTHORS").is_none()); +@@ -810,6 +836,29 @@ mod tests { + } } +- + + #[cfg(windows)] + #[test] @@ -113,4 +113,7 @@ index 0000000..0000000 100644 + assert!(command.ends_with(r#"/d /c echo "hi""#), "{}", command); + assert!(!command.contains(r#"\"hi\""#), "{}", command); + } - } ++ + #[cfg(windows)] + #[test] + fn test_env_case_insensitive_override() { diff --git a/vendor/patches/portable-pty/0003-reject-malformed-windows-environments.patch b/vendor/patches/portable-pty/0003-reject-malformed-windows-environments.patch index d2f7c4ae..4cf188ab 100644 --- a/vendor/patches/portable-pty/0003-reject-malformed-windows-environments.patch +++ b/vendor/patches/portable-pty/0003-reject-malformed-windows-environments.patch @@ -153,8 +153,8 @@ index 385fe81c..b214bb6d 100644 block @@ -869,4 +916,65 @@ mod tests { - assert!(command.ends_with(r#"/d /c echo "hi""#), "{}", command); - assert!(!command.contains(r#"\"hi\""#), "{}", command); + cmd.env_remove("cARGO_pKG_aUTHORS"); + assert!(cmd.get_env("CARGO_PKG_AUTHORS").is_none()); } + + #[cfg(windows)] diff --git a/vendor/portable-pty/src/cmdbuilder.rs b/vendor/portable-pty/src/cmdbuilder.rs index a9395f41..e4a9edc7 100644 --- a/vendor/portable-pty/src/cmdbuilder.rs +++ b/vendor/portable-pty/src/cmdbuilder.rs @@ -883,17 +883,6 @@ mod tests { } } - #[cfg(windows)] - #[test] - fn test_env_case_insensitive_override() { - let mut cmd = CommandBuilder::new("dummy"); - cmd.env("Cargo_Pkg_Authors", "Not Wez"); - assert!(cmd.get_env("cargo_pkg_authors") == Some(OsStr::new("Not Wez"))); - - cmd.env_remove("cARGO_pKG_aUTHORS"); - assert!(cmd.get_env("CARGO_PKG_AUTHORS").is_none()); - } - #[cfg(windows)] #[test] fn raw_arg_appends_unescaped_windows_command_tail() { @@ -917,6 +906,17 @@ mod tests { assert!(!command.contains(r#"\"hi\""#), "{}", command); } + #[cfg(windows)] + #[test] + fn test_env_case_insensitive_override() { + let mut cmd = CommandBuilder::new("dummy"); + cmd.env("Cargo_Pkg_Authors", "Not Wez"); + assert!(cmd.get_env("cargo_pkg_authors") == Some(OsStr::new("Not Wez"))); + + cmd.env_remove("cARGO_pKG_aUTHORS"); + assert!(cmd.get_env("CARGO_PKG_AUTHORS").is_none()); + } + #[cfg(windows)] #[test] fn windows_environment_rejects_malformed_entries() { -- cgit v1.2.3