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 --- src/server/autodetect.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/server/autodetect.rs') diff --git a/src/server/autodetect.rs b/src/server/autodetect.rs index 1813ebd9..bd364a70 100644 --- a/src/server/autodetect.rs +++ b/src/server/autodetect.rs @@ -150,19 +150,22 @@ fn validate_running_server_compatibility() -> io::Result<()> { ))); }; - if status.protocol == Some(crate::protocol::PROTOCOL_VERSION) { + let endpoint_generation = status + .capabilities + .as_ref() + .and_then(|capabilities| capabilities.endpoint_protocol_generation); + if endpoint_generation == Some(crate::protocol::endpoint::ENDPOINT_PROTOCOL_GENERATION) { return Ok(()); } Err(io::Error::other(format!( - "Herdr was updated, but this session is still running the old server.\n\nserver: v{} protocol {}\nclient: v{} protocol {}\n\n{}", + "This session predates Herdr's stable endpoint protocol and needs one final server update.\n\nserver: v{} endpoint generation {}\nclient: v{} endpoint generation {}\n\n{}", status.version.as_deref().unwrap_or("unknown"), - status - .protocol + endpoint_generation .map(|value| value.to_string()) - .unwrap_or_else(|| "unknown".to_string()), + .unwrap_or_else(|| "unavailable".to_string()), crate::build_info::version(), - crate::protocol::PROTOCOL_VERSION, + crate::protocol::endpoint::ENDPOINT_PROTOCOL_GENERATION, crate::session::active_restart_after_update_guidance() ))) } -- cgit v1.2.3