From f989ccde579f6796300f2737a2df5546afbde1f0 Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Wed, 4 Mar 2026 18:44:29 +0530 Subject: [PATCH] fix: add post-parse guard for beta SDK version bumps Add a programmatic guard after parsing the AI response that rejects major bumps or versions >= 1.0.0 for beta SDKs. When triggered, the SDK is skipped with a warning instead of proceeding with an invalid version. --- src/Appwrite/Platform/Tasks/SDKs.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Appwrite/Platform/Tasks/SDKs.php b/src/Appwrite/Platform/Tasks/SDKs.php index 5aa5042739..715d322892 100644 --- a/src/Appwrite/Platform/Tasks/SDKs.php +++ b/src/Appwrite/Platform/Tasks/SDKs.php @@ -878,6 +878,12 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND return null; } + // Guard: beta SDKs must not be bumped to >= 1.0.0 + if ($isBeta && ($parsed['versionBump'] === 'major' || \version_compare($parsed['version'], '1.0.0', '>='))) { + Console::warning("Beta SDK {$language['name']} cannot have a major bump or version >= 1.0.0 (AI suggested {$parsed['version']}), skipping"); + return null; + } + Console::success("✓ Analysis complete"); Console::log(" Version: {$language['version']} → {$parsed['version']} ({$parsed['versionBump']} bump)"); Console::log(" Changelog:");