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++
setup: checksum verified line, .previous keeps its BUILD.json; update scripts drop the backup branch when the move fails
Niko1221b9aa4558a447
diff --git a/UPDATE.bat b/UPDATE.batindex 8f44e00bb..b2d9da3fe 100644--- a/UPDATE.bat+++ b/UPDATE.bat@@ -50,6 +50,7 @@ rem All of it in one block: cmd reads a .bat file while it runs it, and the git)call git checkout -q -B %%BR%% origin/mainif errorlevel 1 (+ call git branch -D %%BK%% >nul 2>nulecho.echo Could not move to the new history ^(the reason is above^): nothing was updated. By hand:echo git checkout -B main origin/maindiff --git a/setup.py b/setup.pyindex a14d6ebe8..be1c23e38 100644--- a/setup.py+++ b/setup.py@@ -2672,6 +2672,7 @@ def verify_engine_archive(z: Path, asset: str, base: str) -> None:got = h.hexdigest()drop_download(z)raise UnverifiedEngine(f"{z.name} has the wrong SHA-256 ({got}, expected {sha})")+ ok(f"{z.name}: SHA-256 checksum verified against GitHub's ({sha[:12]}...)")def engine_refused(asset: str, e: Exception, updating: bool) -> None:@@ -2735,6 +2736,17 @@ def install_unpacked(tmp: Path, eng: Path) -> None:shutil.move(str(prev / dst.name), str(dst))shutil.rmtree(prev, ignore_errors=True)raise+ # #1403 debt: get_prebuilt moved the old BUILD.json aside (BUILD.json.prev) instead of deleting it; it goes with the+ # engine it describes, so engine_version_of(.previous) says the version instead of "?"+ kept = eng / "BUILD.json.prev"+ if kept.exists():+ try:+ if moved and not (prev / "BUILD.json").exists():+ shutil.move(str(kept), str(prev / "BUILD.json"))+ else:+ kept.unlink()+ except OSError:+ passif moved:ok(f"the engine it replaced ({engine_version_of(prev)}) is kept in {prev}; ""setup.py --rollback-engine puts it back")@@ -2787,7 +2799,7 @@ def get_prebuilt(url_base, gpu, vision, updating=False, toolkit=13) -> Path | Nook("ready-made engine already installed")return engsay(f" Updating the ready-made engine ({meta.get('version')} -> {'.'.join(map(str, MIN_ENGINE))} or newer) ...")- info.unlink()+ info.replace(eng / "BUILD.json.prev") # kept for the .previous copyif not url_base:return Noneeng.mkdir(exist_ok=True)diff --git a/tools/test_setup_engine_keep.py b/tools/test_setup_engine_keep.pyindex 6667837c1..8b5c634ab 100644--- a/tools/test_setup_engine_keep.py+++ b/tools/test_setup_engine_keep.py@@ -52,6 +52,17 @@ class KeepPrevious(unittest.TestCase):self.assertEqual(setup.rollback_engine(), 0)self.assertEqual((self.eng / "strata.exe").read_bytes(), b"new")+ def test_previous_keeps_its_build_json_after_get_prebuilt_moved_it_aside(self):+ """get_prebuilt takes the old BUILD.json out of the way (BUILD.json.prev) before the unpack, so the+ engine kept in .previous still says its version instead of '?'."""+ engine(self.eng, "0.1.39", b"old")+ (self.eng / "BUILD.json").replace(self.eng / "BUILD.json.prev")+ engine(self.new, "0.1.40", b"new")+ setup.install_unpacked(self.new, self.eng)+ self.assertEqual(setup.engine_version_of(self.eng / ".previous"), "0.1.39")+ self.assertFalse((self.eng / "BUILD.json.prev").exists())+ self.assertEqual(setup.engine_version_of(self.eng), "0.1.40")+def test_one_generation_only(self):engine(self.eng, "0.1.38", b"a")for version, exe in (("0.1.39", b"b"), ("0.1.40", b"c")):diff --git a/update.sh b/update.shindex f397b446f..44773c821 100755--- a/update.sh+++ b/update.sh@@ -37,6 +37,8 @@ main() {echo "Moved to the new history. Your old commits are kept in the branch $bk."echo "Untracked files (models, settings, the engine) were not touched."else+ # the backup branch made a moment ago would make the by-hand `git branch pre-cleanup-backup` below fail+ git branch -D "$bk" >/dev/null 2>&1echo "Could not move to the new history (the reason is above): nothing was updated. By hand:"echo " git branch pre-cleanup-backup"echo " git checkout -B main origin/main"