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++

Test fixes after the 0.2.1 merges: the gfx1151 table parse stops before the iGPU set, the benchmark's model-card link is not a model-host fetch, docker/build.sh copies bench/prompts/standard-v1 for the Terminal package, the Docker script tests use Git bash with unix paths on Windows

Niko122130c64f09d7cf
diff --git a/docker/build.sh b/docker/build.sh
index c0a9a68cc..4dfaf56bb 100755
--- a/docker/build.sh
+++ b/docker/build.sh
@@ -58,7 +58,7 @@ trap cleanup EXIT
# 1. the Terminal's sources: exactly what packaging/package_terminal.py copies (the working tree, so local edits are in the image)
cd "$repo"
-paths="packaging bin strata.py strata_control strata_cli serve requirements.txt requirements-monitor.txt docs/MANAGEMENT_PROTOCOL.md docs/TERMINAL_LAUNCH.md data setup.py ref/load.py CMakeLists.txt"
+paths="packaging bin strata.py strata_control strata_cli serve requirements.txt requirements-monitor.txt docs/MANAGEMENT_PROTOCOL.md docs/TERMINAL_LAUNCH.md data bench/prompts/standard-v1 setup.py ref/load.py CMakeLists.txt"
if git rev-parse --git-dir >/dev/null 2>&1; then
# shellcheck disable=SC2086
{ git ls-files -z -- $paths ':(glob)tools/*.py'; } | tar --null -T - -cf - | tar -xf - -C "$ctx/terminal-src"
diff --git a/tests/terminal/test_docker_files.py b/tests/terminal/test_docker_files.py
index 86b5f2fee..dd215c064 100644
--- a/tests/terminal/test_docker_files.py
+++ b/tests/terminal/test_docker_files.py
@@ -14,18 +14,27 @@ import yaml
ROOT = Path(__file__).resolve().parents[2]
DOCKER = ROOT / "docker"
SH = shutil.which("sh")
+BASH = shutil.which("bash") # the full path: on Windows a bare "bash" can start the WSL launcher in System32 instead of Git bash
+CYGPATH = shutil.which("cygpath")
+
+
+def sh_path(p) -> str:
+ """The path as the shell reads it. Git bash on Windows wants /c/Users/..., not C:\\Users\\... (tar even takes `C:` for a host)."""
+ if CYGPATH is None:
+ return str(p)
+ return subprocess.run([CYGPATH, "-u", str(p)], capture_output=True, text=True, check=True).stdout.strip()
class Scripts(unittest.TestCase):
@unittest.skipIf(SH is None, "needs sh")
def test_shell_scripts_parse(self):
for name in ("entrypoint.sh", "strata-wrapper.sh", "healthcheck.sh", "build.sh", "publish.sh"):
- r = subprocess.run([SH, "-n", str(DOCKER / name)], capture_output=True, text=True)
+ r = subprocess.run([SH, "-n", sh_path(DOCKER / name)], capture_output=True, text=True)
self.assertEqual(r.returncode, 0, f"{name}: {r.stderr}")
- @unittest.skipIf(shutil.which("bash") is None, "needs bash")
+ @unittest.skipIf(BASH is None, "needs bash")
def test_smoke_test_parses_with_bash(self): # it is a bash script (process substitution), not POSIX sh
- r = subprocess.run(["bash", "-n", str(DOCKER / "smoke-test.sh")], capture_output=True, text=True)
+ r = subprocess.run([BASH, "-n", sh_path(DOCKER / "smoke-test.sh")], capture_output=True, text=True)
self.assertEqual(r.returncode, 0, r.stderr)
@unittest.skipIf(SH is None or shutil.which("tar") is None, "needs sh and tar")
@@ -39,7 +48,7 @@ class Scripts(unittest.TestCase):
(pkg / "strata").write_text("#!/bin/sh\n", encoding="utf-8")
(pkg / "strata").chmod(0o755)
ctx = Path(tmp) / "ctx"
- r = subprocess.run([SH, str(DOCKER / "build.sh"), "--flavor", "cuda", "--engine", str(pkg), "--ctx", str(ctx), "--ctx-only"],
+ r = subprocess.run([SH, sh_path(DOCKER / "build.sh"), "--flavor", "cuda", "--engine", sh_path(pkg), "--ctx", sh_path(ctx), "--ctx-only"],
capture_output=True, text=True)
self.assertEqual(r.returncode, 0, r.stdout + r.stderr)
self.assertTrue((ctx / "Dockerfile").is_file())
@@ -150,7 +159,7 @@ class Publishing(unittest.TestCase):
@unittest.skipIf(SH is None, "needs sh")
def test_publish_script_parses_and_defaults_to_not_pushing(self):
path = DOCKER / "publish.sh"
- self.assertEqual(subprocess.run([SH, "-n", str(path)], capture_output=True, text=True).returncode, 0)
+ self.assertEqual(subprocess.run([SH, "-n", sh_path(path)], capture_output=True, text=True).returncode, 0)
text = path.read_text(encoding="utf-8")
self.assertNotIn("\r", text)
self.assertIn('push=""', text) # no --push, no docker push
diff --git a/tools/test_setup_model_pins.py b/tools/test_setup_model_pins.py
index 1b5319592..e40aec46e 100644
--- a/tools/test_setup_model_pins.py
+++ b/tools/test_setup_model_pins.py
@@ -237,12 +237,17 @@ class InstalledModelsNeedNoNetwork(unittest.TestCase):
"""strata launch, serve, the monitor and the API reach no model host: the names are in setup.py and the install
tools only (and strata_control.acquisition refuses a download under STRATA_NO_ACQUIRE=1)."""
hosts = re.compile(r"huggingface\.co|hf-mirror|HF_ENDPOINT|modelscope|hf_hub_download", re.I)
+ # The one harmless mention: the model-card link a benchmark result file names. Nothing opens it. Dropping just
+ # that line from the scan keeps the rule exact for everything else.
+ harmless = ('MODEL_CARD_URL = "https://huggingface.co/Qwen/Qwen3.8-Flash-Next"',)
found = []
for folder in ("strata_cli", "serve", "strata_control"):
for p in (ROOT / folder).rglob("*.py"):
if "test" in p.name:
continue
text = p.read_text(encoding="utf-8", errors="replace")
+ for line in harmless:
+ text = text.replace(line, "")
if hosts.search(text):
found.append(str(p.relative_to(ROOT)))
self.assertEqual(found, [])
diff --git a/tools/test_setup_strix_halo.py b/tools/test_setup_strix_halo.py
index b6dcd36a9..dc2469872 100644
--- a/tools/test_setup_strix_halo.py
+++ b/tools/test_setup_strix_halo.py
@@ -122,7 +122,7 @@ class Gfx1103Switches(unittest.TestCase):
copies the gfx1151 hipBLASLt table's solutions 1176 / 1177 and so does not apply beside a gfx1103 table. The
engine keeps gfx1103 out of its own arch defaults, so setup writes this set."""
src = (ROOT / "src/core/arch_defaults.cpp").read_text(encoding="utf-8")
- tail = src.split("gfx_arch_is_gfx1151(gcn_arch)) return t;", 1)[1]
+ tail = src.split("gfx_arch_is_gfx1151(gcn_arch)) return t;", 1)[1].split("bool igpu_prompt_defaults_arch", 1)[0] # the gfx1151 function only, not the iGPU set below it
block = tail.rsplit("t = {", 1)[1].split("};", 1)[0] # the gfx1151 switch table
gfx1151 = dict(re.findall(r'\{"(STRATA_[A-Z0-9_]+)",\s*"([^"]+)"\}', block))
self.assertIn("STRATA_HCD_EXACT", gfx1151) # the parse found the gfx1151 block
@@ -139,7 +139,7 @@ class Gfx1150Switches(unittest.TestCase):
copies the gfx1151 hipBLASLt table's solutions 1176 / 1177 and so does not apply beside a gfx1150 table. The
engine keeps gfx1150 out of its own arch defaults (src/core/arch_defaults_test.cpp), so setup writes this set."""
src = (ROOT / "src/core/arch_defaults.cpp").read_text(encoding="utf-8")
- tail = src.split("gfx_arch_is_gfx1151(gcn_arch)) return t;", 1)[1]
+ tail = src.split("gfx_arch_is_gfx1151(gcn_arch)) return t;", 1)[1].split("bool igpu_prompt_defaults_arch", 1)[0] # the gfx1151 function only, not the iGPU set below it
block = tail.rsplit("t = {", 1)[1].split("};", 1)[0] # the gfx1151 switch table
gfx1151 = dict(re.findall(r'\{"(STRATA_[A-Z0-9_]+)",\s*"([^"]+)"\}', block))
self.assertIn("STRATA_HCD_EXACT", gfx1151) # the parse found the gfx1151 block