Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

launch: a reason joined after 'The engine could not be installed.' starts with a capital; test

Niko122100a2cfa079c1
diff --git a/strata_cli/launch/runner.py b/strata_cli/launch/runner.py
index c309ea0f7..e3f7b92f9 100644
--- a/strata_cli/launch/runner.py
+++ b/strata_cli/launch/runner.py
@@ -81,6 +81,11 @@ def missing_file(failure: str) -> bool:
return failure.startswith(("ModuleNotFoundError", "ImportError", "FileNotFoundError"))
+def capital(text: str) -> str:
+ """A reason that was written to stand alone ("the update feed could not be read: ...") starts the sentence it is joined to with a capital."""
+ return text[:1].upper() + text[1:]
+
+
class LaunchError(RuntimeError):
"""A step could not be done. `text` says what it means; `next` says what to do."""
@@ -615,6 +620,7 @@ class Runner:
why = str(res["error"])
break
why = why or (tail[-1] if tail else "")
+ why = capital(why) # (joined after a sentence: "the update feed could not be read ..." starts a new one)
raise LaunchError("The engine could not be installed." + (f" {why}" if why else ""),
"Check your internet connection, or point Strata at an update source with --feed, then try again.", 6)
self.emit("engine", "The engine is installed.", 100)
diff --git a/tests/terminal/test_launch.py b/tests/terminal/test_launch.py
index 657a1cc43..bff3b199f 100644
--- a/tests/terminal/test_launch.py
+++ b/tests/terminal/test_launch.py
@@ -970,6 +970,12 @@ class FlagsCommand(unittest.TestCase):
self.assertEqual(code, 0) # the preset's own key
self.assertTrue(out.strip().startswith("sk-strata-"))
+ def test_a_reason_joined_after_a_sentence_starts_with_a_capital(self):
+ from strata_cli.launch.runner import capital
+ self.assertEqual(capital("the update feed could not be read: no route"), "The update feed could not be read: no route")
+ self.assertEqual(capital("Already fine."), "Already fine.")
+ self.assertEqual(capital(""), "")
+
def test_launch_error_is_one_plain_sentence(self):
from strata_cli.launch.runner import LaunchError
with mock.patch.object(Runner, "run", side_effect=LaunchError("The engine could not be installed.", "Check your internet.", 6)):