From a2924b32b2a53846b5aa2a7896a279a53f975626 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 4 Oct 2026 18:02:22 +0000 Subject: [PATCH] voelin-core: claim the generic signed client version, as before native_version() took the first signed version containing "3.6" (3.6.0, build 1647595742, from 2022) while its documentation and its test said the generic tuple (3.?.? [Build: 5680278000]); the test failed. Main sent the generic one (tsclientlib's default), whose build passes a server's minimum client version; a real old build may be refused. Each platform's generic tuple again, matched exactly (not the Windows DEBUG one). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01FEpqsPES27Eacue91u3d2Q --- crates/voelin-core/src/versions.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/voelin-core/src/versions.rs b/crates/voelin-core/src/versions.rs index 89b7f41..c9e21fd 100644 --- a/crates/voelin-core/src/versions.rs +++ b/crates/voelin-core/src/versions.rs @@ -10,6 +10,9 @@ use tsclientlib::Version; const VERSIONS_CSV: &str = include_str!("../../proto/tsproto-structs/declarations/Versions.csv"); +/// The signed generic version of every platform, tsclientlib's default. +const GENERIC_VERSION: &str = "3.?.? [Build: 5680278000]"; + #[derive(Clone, Debug, PartialEq, Eq)] pub struct KnownVersion { pub version: String, @@ -92,9 +95,11 @@ fn compatibility_version(os: &str) -> Result { "ios" => "iOS", _ => bail!("no signed compatibility version for operating system {os:?}"), }; + // The library's generic version: its build passes servers' minimum client + // version, which a real (older) build such as 3.6.0 may not. known_versions() .into_iter() - .find(|version| version.platform == platform && version.version.contains("3.6")) + .find(|version| version.platform == platform && version.version == GENERIC_VERSION) .with_context(|| format!("missing signed compatibility version for {platform}"))? .to_version() }