From 477cc61548388a2891135447832116e14a75357a Mon Sep 17 00:00:00 2001 From: harsh mahajan Date: Mon, 10 Aug 2026 10:25:28 +0530 Subject: [PATCH 1/3] fix(specs): fail the task when a spec cannot be generated The CLI reports a throw through its error hooks and then carries on, so a spec that failed to generate left the task reporting success. The missing file was met further down the pipeline, by the SDK build, which reads a spec that isn't there as specs never having been run -- pointing at the wrong step and hiding the reason in one marked green. A platform that cannot be generated now says so and stops, which is what lets the SDK preview workflow catch it here rather than in cloud. --- src/Appwrite/Platform/Tasks/Specs.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Tasks/Specs.php b/src/Appwrite/Platform/Tasks/Specs.php index 45208d234d..0957537a47 100644 --- a/src/Appwrite/Platform/Tasks/Specs.php +++ b/src/Appwrite/Platform/Tasks/Specs.php @@ -779,7 +779,12 @@ class Specs extends Action $parsedSpecs = $specs->parse(); $this->verifyParsedSpec($parsedSpecs); } catch (\RuntimeException $e) { - throw new \RuntimeException("Spec generation failed for {$platform} ({$format}): " . $e->getMessage(), 0, $e); + // The CLI reports a throw and carries on, so a spec that + // failed to generate leaves the task reporting success and + // the missing file is met further down the pipeline, where + // it reads as specs never having been run. + Console::error("Spec generation failed for {$platform} ({$format}): " . $e->getMessage()); + Console::exit(1); } $encodedSpecs = \json_encode($parsedSpecs, JSON_PRETTY_PRINT); From 78f48bb9748202180d39f53b9f0ec7f0c08f5ece Mon Sep 17 00:00:00 2001 From: harsh mahajan Date: Mon, 10 Aug 2026 10:26:39 +0530 Subject: [PATCH 2/3] style(specs): keep the note to one line --- src/Appwrite/Platform/Tasks/Specs.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Appwrite/Platform/Tasks/Specs.php b/src/Appwrite/Platform/Tasks/Specs.php index 0957537a47..dbeced4a24 100644 --- a/src/Appwrite/Platform/Tasks/Specs.php +++ b/src/Appwrite/Platform/Tasks/Specs.php @@ -779,10 +779,7 @@ class Specs extends Action $parsedSpecs = $specs->parse(); $this->verifyParsedSpec($parsedSpecs); } catch (\RuntimeException $e) { - // The CLI reports a throw and carries on, so a spec that - // failed to generate leaves the task reporting success and - // the missing file is met further down the pipeline, where - // it reads as specs never having been run. + // A throw is reported and carried on from, so stop here Console::error("Spec generation failed for {$platform} ({$format}): " . $e->getMessage()); Console::exit(1); } From 9103230f5aabac15d04a5de389c33bc5a9d5c67f Mon Sep 17 00:00:00 2001 From: harsh mahajan Date: Mon, 10 Aug 2026 10:32:14 +0530 Subject: [PATCH 3/3] fix(specs): return after exiting so the analyzer sees the stop --- src/Appwrite/Platform/Tasks/Specs.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Appwrite/Platform/Tasks/Specs.php b/src/Appwrite/Platform/Tasks/Specs.php index dbeced4a24..0bbb9dcd02 100644 --- a/src/Appwrite/Platform/Tasks/Specs.php +++ b/src/Appwrite/Platform/Tasks/Specs.php @@ -782,6 +782,7 @@ class Specs extends Action // A throw is reported and carried on from, so stop here Console::error("Spec generation failed for {$platform} ({$format}): " . $e->getMessage()); Console::exit(1); + return; } $encodedSpecs = \json_encode($parsedSpecs, JSON_PRETTY_PRINT);