The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
fix: schliesse die drei Blocker aus review-integ.md (A1, B1, C1)
purple5c76974f9985
diff --git a/.github/workflows/release.yml b/.github/workflows/release.ymlindex e48c9165..b9cbb2fa 100644--- a/.github/workflows/release.yml+++ b/.github/workflows/release.yml@@ -29,6 +29,25 @@ env:# keeps old versions up.VULKAN_SDK_VERSION: '1.4.313.2'+ # BLOCKER A1 (review-integ.md, Teil (a)): the boot-smoke steps below used to+ # pull this file from `resolve/main`, a moving pointer, with no hash check,+ # no size check and no timeout on the curl call, precisely the shape that+ # hung a step for six hours on 2026-08-15 (see the Linux-deps step's own+ # comment further down) and, unlike that step, against a THIRD PARTY host+ # rather than apt. Pinned here to one commit of ggml-org/models and its+ # file's sha256, both read from the same huggingface.co page, not typed+ # from memory:+ # https://huggingface.co/ggml-org/models/tree/main/tinyllamas (revision)+ # https://huggingface.co/ggml-org/models/blob/main/tinyllamas/stories260K.gguf (sha256, shown as its LFS OID)+ # Size: 1,185,376 bytes (~1.2 MB). License: MIT, this exact checkpoint+ # traces to karpathy/tinyllamas on Hugging Face, whose model card states+ # "License: mit"; ggml-org/models' own README states these files are+ # "Various models to be used in llama.cpp CI workflow. Do not use it in+ # production.", exactly this use and never a shipped/bundled asset. Bump+ # both values together, from that same page, when the pin needs to move.+ STORIES260K_REVISION: '499bc8821c6b12b4e53c5bffcb21ec206f212d81'+ STORIES260K_SHA256: '270cba1bd5109f42d03350f60406024560464db173c0e387d91f0426d3bd256d'+jobs:# The Latest flag comes off FIRST, before anything is gated or built.#@@ -87,6 +106,16 @@ jobs:build-tauri:needs: gate+ # BLOCKER A1 (review-integ.md): this job had no ceiling of its own, so it+ # ran up to GitHub's 360-minute default. ci.yml's own tauri-build job+ # (comment right above its identical timeout) already carries this exact+ # fix for this exact incident: "A hung bundler must fail loudly rather+ # than burn the 6-hour job ceiling, the way the Linux lane did on+ # 2026-08-15" (see this job's boot-smoke steps below). This job additionally+ # signs the bundle and builds every installer target (NSIS, MSI, deb,+ # AppImage) that ci.yml's own tauri-build does not, so its ceiling is+ # wider than that job's 60 minutes rather than equal to it.+ timeout-minutes: 90strategy:fail-fast: falsematrix:@@ -253,6 +282,10 @@ jobs:- name: Boot-smoke from a moved directory (K1, BLOCKER B3/B6)if: matrix.sidecar_triple == 'x86_64-unknown-linux-gnu'shell: bash+ # BLOCKER A1: bounds the whole step, not only the curl call below, so+ # a hang anywhere in it (the model-load poll included) fails within+ # minutes instead of riding the job's own 90-minute ceiling out.+ timeout-minutes: 5run: |set -euo pipefailmoved="$RUNNER_TEMP/moved-away-from-build-tree"@@ -267,13 +300,41 @@ jobs:# first: cheap, and its own log line names every backend that# loaded (useful when the model-load step below fails and the# reason is "which backend" rather than "did anything load").- ( cd "$moved/llama" && "$bin" --list-devices )+ #+ # F-a2 (review-integ.md): the printed device LIST itself is not+ # proof, because llama.cpp's --list-devices handler (common/arg.cpp)+ # deliberately EXCLUDES CPU devices from what it prints+ # (`if (ggml_backend_dev_type(dev) != GGML_BACKEND_DEVICE_TYPE_CPU)`),+ # so a CPU module could fail to load and this list would look+ # identical. What DOES prove it, even in a release (NDEBUG) build+ # where ggml_backend_load_all() passes silent=true, is the loader's+ # own success line: ggml-backend-reg.cpp's load_backend() logs+ # "loaded %s backend from %s" unconditionally, outside the+ # `if (!silent)` guard that only gates the FAILURE/skip messages.+ # Capture stderr (GGML_LOG goes there) and require that line, named+ # for CPU specifically.+ ( cd "$moved/llama" && "$bin" --list-devices ) >/tmp/list-devices.log 2>&1 || {+ cat /tmp/list-devices.log+ echo "FAIL: --list-devices exited non-zero" >&2+ exit 1+ }+ cat /tmp/list-devices.log+ grep -qi "loaded CPU backend from" /tmp/list-devices.log || {+ echo "FAIL: ggml_backend_load_all() never logged a loaded CPU backend; no ggml-cpu-* module was found in $moved/llama" >&2+ exit 1+ }# Tiny (~1.2 MB) public GGUF so /health proves a real model load# (and therefore a real CPU-backend load), not just the HTTP- # layer or the exe's own DT_NEEDED resolution.+ # layer or the exe's own DT_NEEDED resolution. Pinned, hashed and+ # bounded: see BLOCKER A1 above the env: block at the top of this+ # file for the full sourcing and the license.model="$RUNNER_TEMP/stories260K.gguf"- [ -f "$model" ] || curl -fsSL --retry 3 -o "$model" \- "https://huggingface.co/ggml-org/models/resolve/main/tinyllamas/stories260K.gguf"+ if [ ! -f "$model" ]; then+ curl -fsSL --retry 3 --max-time 60 -o "$model" \+ "https://huggingface.co/ggml-org/models/resolve/${STORIES260K_REVISION}/tinyllamas/stories260K.gguf"+ fi+ echo "${STORIES260K_SHA256} $model" | sha256sum -c - \+ || { echo "FAIL: stories260K.gguf did not match the pinned sha256" >&2; exit 1; }( cd "$moved/llama" && "$bin" --host 127.0.0.1 --port 8129 -m "$model" >/tmp/boot-smoke.log 2>&1 ) &pid=$!trap 'kill "$pid" 2>/dev/null || true' EXIT@@ -304,19 +365,41 @@ jobs:- name: "Boot-smoke: real model load plus /health (K1, Nachbesserung N5)"if: matrix.sidecar_triple == 'x86_64-pc-windows-msvc'shell: pwsh+ # BLOCKER A1: see the Linux step above for why this step needs its+ # own ceiling, not only the download's --max-time.+ timeout-minutes: 5run: |$bin = (Resolve-Path "src-tauri\bin\lu-llama-server-${{ matrix.sidecar_triple }}.exe").Path$runDir = (Resolve-Path "src-tauri\resources\llama\${{ matrix.sidecar_triple }}").PathPush-Location $runDir- & $bin --list-devices- if ($LASTEXITCODE -ne 0) { throw "llama-server --list-devices exited $LASTEXITCODE (run from $runDir)" }+ $listLog = "$env:RUNNER_TEMP\list-devices.log"+ & $bin --list-devices *> $listLog+ $listExit = $LASTEXITCODE+ Get-Content $listLog+ if ($listExit -ne 0) { throw "llama-server --list-devices exited $listExit (run from $runDir)" }+ # F-a2 (review-integ.md): the printed device list itself excludes+ # CPU on purpose (llama.cpp common/arg.cpp's --list-devices handler+ # skips GGML_BACKEND_DEVICE_TYPE_CPU), so it cannot prove a CPU+ # module loaded. ggml-backend-reg.cpp's load_backend() logs+ # "loaded %s backend from %s" on every success unconditionally+ # (the `if (!silent)` guard only gates the failure/skip messages,+ # even in a release/NDEBUG build), so that line is the real proof.+ if (-not (Select-String -Path $listLog -Pattern "loaded CPU backend from" -Quiet)) {+ throw "ggml_backend_load_all() never logged a loaded CPU backend; no ggml-cpu-*.dll was found in $runDir"+ }Pop-Location+ # Pinned, hashed and bounded: see BLOCKER A1 above the env: block+ # at the top of this file for the full sourcing and the license.$model = "$env:RUNNER_TEMP\stories260K.gguf"if (-not (Test-Path $model)) {- curl.exe -fsSL --retry 3 -o $model `- "https://huggingface.co/ggml-org/models/resolve/main/tinyllamas/stories260K.gguf"+ curl.exe -fsSL --retry 3 --max-time 60 -o $model `+ "https://huggingface.co/ggml-org/models/resolve/$env:STORIES260K_REVISION/tinyllamas/stories260K.gguf"if ($LASTEXITCODE -ne 0) { throw "smoke model download failed" }}+ $actualHash = (Get-FileHash -Path $model -Algorithm SHA256).Hash+ if ($actualHash.ToLower() -ne $env:STORIES260K_SHA256.ToLower()) {+ throw "stories260K.gguf did not match the pinned sha256 (expected $env:STORIES260K_SHA256, got $actualHash)"+ }$proc = Start-Process -FilePath $bin -ArgumentList "--host","127.0.0.1","--port","8129","-m",$model -WorkingDirectory $runDir -PassThru -NoNewWindow$ok = $falseforeach ($i in 1..40) {diff --git a/.github/workflows/sidecar-windows.yml b/.github/workflows/sidecar-windows.ymlindex 124b3457..e3bb9ebc 100644--- a/.github/workflows/sidecar-windows.yml+++ b/.github/workflows/sidecar-windows.yml@@ -29,9 +29,24 @@ env:# kept building. Keep the two lanes in sync.LLAMA_BUILD_CACHE: 'D:/lb'+ # BLOCKER A1 (review-integ.md, Teil (a)): same pin as release.yml's env:+ # block, for the same reason (see the comment there for the full sourcing:+ # commit and sha256 both read off huggingface.co, size and MIT license+ # named). Bump both files together; there is no shared config between these+ # two separate workflow files to enforce that today (same limitation as+ # VULKAN_SDK_VERSION two lines up, F-c2).+ STORIES260K_REVISION: '499bc8821c6b12b4e53c5bffcb21ec206f212d81'+ STORIES260K_SHA256: '270cba1bd5109f42d03350f60406024560464db173c0e387d91f0426d3bd256d'+jobs:sidecar-windows:runs-on: windows-latest+ # BLOCKER A1: this job had no ceiling, so a hang anywhere in it (the boot+ # smoke's own download included) could ride GitHub's 360-minute default+ # out, the exact shape that hung release.yml's Linux lane for six hours+ # on 2026-08-15. This job builds one platform with no signing step, so+ # its ceiling sits below release.yml's build-tauri (90 minutes).+ timeout-minutes: 45steps:- name: Checkout repository@@ -64,6 +79,8 @@ jobs:- name: Boot smoke — real model load + /healthshell: pwsh+ # BLOCKER A1: bounds the whole step, including the download.+ timeout-minutes: 5run: |$bin = (Resolve-Path "src-tauri\bin\lu-llama-server-x86_64-pc-windows-msvc.exe").Pathif (-not (Test-Path $bin)) { throw "sidecar binary missing" }@@ -82,16 +99,31 @@ jobs:& $bin --versionif ($LASTEXITCODE -ne 0) { throw "llama-server --version exited $LASTEXITCODE (run from $runDir)" }Pop-Location- # Tiny (~1.2 MB) public GGUF so /health proves a real model load,- # not just the HTTP layer. Lands in the cached build root, so the- # sidecar cache step keeps it across runs.+ # Pinned, hashed and bounded: see BLOCKER A1 in this file's env:+ # block for the sourcing and the license. Tiny (~1.2 MB) public+ # GGUF so /health proves a real model load, not just the HTTP+ # layer. Lands in the cached build root, so the sidecar cache step+ # keeps it across runs.$model = "D:\lb\stories260K.gguf"if (-not (Test-Path $model)) {- curl.exe -fsSL --retry 3 -o $model `- "https://huggingface.co/ggml-org/models/resolve/main/tinyllamas/stories260K.gguf"+ curl.exe -fsSL --retry 3 --max-time 60 -o $model `+ "https://huggingface.co/ggml-org/models/resolve/$env:STORIES260K_REVISION/tinyllamas/stories260K.gguf"if ($LASTEXITCODE -ne 0) { throw "smoke model download failed" }}- $proc = Start-Process -FilePath $bin -ArgumentList "--host","127.0.0.1","--port","8129","-m",$model -WorkingDirectory $runDir -PassThru -NoNewWindow+ $actualHash = (Get-FileHash -Path $model -Algorithm SHA256).Hash+ if ($actualHash.ToLower() -ne $env:STORIES260K_SHA256.ToLower()) {+ throw "stories260K.gguf did not match the pinned sha256 (expected $env:STORIES260K_SHA256, got $actualHash)"+ }+ # F-a2 (review-integ.md): --version exits before+ # ggml_backend_load_all() ever runs (it cannot prove a CPU module+ # loaded, which is why /health below carries the real proof), and+ # --list-devices' own printed list excludes CPU on purpose+ # (llama.cpp common/arg.cpp). What DOES name a loaded CPU module+ # unconditionally, even in a release/NDEBUG build, is+ # ggml-backend-reg.cpp's load_backend() success log line, so the+ # server's own stderr is captured here and checked for it.+ $serverLog = "$env:RUNNER_TEMP\boot-smoke.log"+ $proc = Start-Process -FilePath $bin -ArgumentList "--host","127.0.0.1","--port","8129","-m",$model -WorkingDirectory $runDir -PassThru -NoNewWindow -RedirectStandardOutput "$serverLog.out" -RedirectStandardError "$serverLog.err"$ok = $falseforeach ($i in 1..40) {Start-Sleep -Milliseconds 400@@ -101,8 +133,16 @@ jobs:} catch { }}Stop-Process -Id $proc.Id -Force -ErrorAction SilentlyContinue- if (-not $ok) { throw "llama-server /health never came up" }- Write-Host "OK - sidecar boots from the resource layout, loads a model and answers /health"+ if (-not $ok) {+ Write-Host "---- llama-server output ----"+ Get-Content "$serverLog.out","$serverLog.err" -ErrorAction SilentlyContinue+ throw "llama-server /health never came up"+ }+ if (-not (Select-String -Path "$serverLog.out","$serverLog.err" -Pattern "loaded CPU backend from" -Quiet -ErrorAction SilentlyContinue)) {+ Get-Content "$serverLog.out","$serverLog.err" -ErrorAction SilentlyContinue+ throw "ggml_backend_load_all() never logged a loaded CPU backend; no ggml-cpu-*.dll was found in $runDir"+ }+ Write-Host "OK - sidecar boots from the resource layout, loads a model, answers /health, and logged a loaded CPU backend"- name: Upload sidecar artifactuses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2diff --git a/src-tauri/src/commands/engine.rs b/src-tauri/src/commands/engine.rsindex 2f8ee599..4d0c8db3 100644--- a/src-tauri/src/commands/engine.rs+++ b/src-tauri/src/commands/engine.rs@@ -1394,6 +1394,33 @@ fn log_cpu_features_once() {});}+/// Counts the CPU-variant modules actually sitting in the sidecar's backend+/// folder (the same folder `resolve_engine_backend_dir` points at and+/// `ggml_backend_load_all()` dlopens from at runtime), by the same+/// loader-exact naming `backend_marker_filename` and `verify-sidecar-isa.sh`+/// use ("[lib]ggml-cpu-<variant>.[dll|so]").+///+/// K1 (3.0.1, BLOCKER C1): after the sidecar rebuild the bundled build ships+/// one variant per instruction-set floor instead of one AVX2-only binary, so+/// a CPU that still faults on its first opcode is no longer explained by "the+/// build requires AVX2" (Runde 3 disproved that: `verify-sidecar-isa.sh`+/// disassembles the baseline variant and the exe itself and fails the build+/// if either contains an AVX-or-above instruction). The far more likely cause+/// is that this installation's copy of the folder counted here is short one+/// or more files: a partial install, or an antivirus scanner that quarantined+/// an unsigned `ggml-cpu-*` module (the exact pattern generic packer+/// heuristics flag, review-integ.md Teil (a), Punkt 6). Counting the folder+/// is what tells those two cases apart in the message instead of guessing.+fn count_cpu_backend_modules(dir: &Path) -> usize {+ let prefix = if cfg!(target_os = "windows") { "ggml-cpu-" } else { "libggml-cpu-" };+ std::fs::read_dir(dir)+ .into_iter()+ .flatten()+ .filter_map(|entry| entry.ok())+ .filter(|entry| entry.file_name().to_string_lossy().starts_with(prefix))+ .count()+}+/// The MEASURED names of the instruction sets this CPU is missing, out of/// the six the bundled sidecar's build actually requires (AVX, AVX2, BMI2,/// FMA, F16C, SSE4.2): pure, so `start_failure_message` can name exactly@@ -1806,6 +1833,7 @@ pub(crate) fn start_failure_message(port: u16,budget: Duration,second: SecondAttempt,+ backend_dir: Option<&Path>,) -> String {let head = if is_illegal_instruction_exit(failure.exit_code) || is_sigill(failure.signal) {// K1 Runde 2, Punkt D: both the GPU and the CPU-only path run the@@ -1814,21 +1842,27 @@ pub(crate) fn start_failure_message(// go in this one sentence, since the log line stderr would otherwise// add is empty: the child never gets far enough to print anything.//- // The review rejected the old wording on three counts, all fixed- // here: it named a competing product ("use Ollama") instead of a- // path inside LU itself; it said "for example AVX2" instead of the- // MEASURED missing features this machine actually has (`AVX2` may- // not even be the one missing on a given box); and it only ever- // fired on Windows, `exit_code` having no way to see a Linux SIGILL.+ // BLOCKER C1 (review-integ.md, Teil (c)): this used to say "the+ // bundled engine's build requires" the named instruction set and told+ // the user to wait for "a build with broader CPU support". Both+ // sentences were true against the pre-sidecar-rebuild engine and are+ // false against this one: K1 ships one CPU-code-path variant per+ // instruction-set floor, chosen at startup, and+ // `verify-sidecar-isa.sh` disassembles the baseline variant on every+ // build to prove it contains no AVX-or-above opcode. A crash here+ // therefore does not mean no build exists for this CPU; it means+ // something about THIS installation is broken. Counting the backend+ // folder (`count_cpu_backend_modules`) tells the two likely breakages+ // apart instead of guessing between them.let missing = missing_cpu_features();let missing_sentence = if missing.is_empty() {// The probe itself found nothing missing (or is not applicable,// non-x86_64): still true that the binary faulted on its first// opcode, just without a named cause to add.- "This CPU is missing an instruction set the bundled engine's build requires.".to_string()+ "This CPU is missing an instruction set the loaded CPU module needs.".to_string()} else {format!(- "This CPU is missing {} the bundled engine's build requires.",+ "This CPU is missing {} the loaded CPU module needs.",if missing.len() == 1 {format!("the {} instruction set", missing[0])} else {@@ -1836,11 +1870,34 @@ pub(crate) fn start_failure_message(})};+ let module_count = backend_dir.map(count_cpu_backend_modules);+ let repair_sentence = match module_count {+ // No backend folder at all, or the folder is empty of CPU+ // modules: the installation is missing files outright.+ Some(0) | None => {+ " The engine's own folder has none of the separate CPU builds it ships for older \+ processors, which usually means an incomplete install or a security scanner \+ quarantining an unsigned file it does not recognise. Reinstall Locally \+ Uncensored, or check your antivirus software's quarantine for a file named \+ ggml-cpu, then try again."+ .to_string()+ }+ // Some modules are present, so the install is not simply empty:+ // the one this CPU needs is missing or was skipped, which points+ // more at antivirus removal of a single file than a wholesale+ // failed install.+ Some(n) => format!(+ " The engine's own folder holds {n} of the separate CPU builds it ships for older \+ processors, but not the one this CPU can run, which points at a security scanner \+ having quarantined that one file rather than a failed install. Reinstall Locally \+ Uncensored, or check your antivirus software's quarantine for a file named \+ ggml-cpu, then try again."+ ),+ };format!("The LU Engine exited immediately with an illegal-instruction fault. {missing_sentence} \- The app did not retry, since the same binary would fail the same way again. Until a \- build with broader CPU support is available, use LU Cloud or a custom endpoint for this \- machine instead: open Settings, AI Backends and switch away from the LU Engine. \+ The app did not retry, since the same binary would fail the same way again.{repair_sentence} \+ LU Cloud or a custom endpoint (Settings, AI Backends) stay available in the meantime. \Check Settings, Troubleshoot for the CPU features line in the log.")} else if failure.port_taken {@@ -2313,7 +2370,7 @@ fn start_after_stop(if !failure.died {// The budget ran out with the child still alive: it is loading slowly,// not failing. Retrying would just spend the budget twice.- return Err(start_failure_message(&failure, port, deadline, SecondAttempt::SameOffload));+ return Err(start_failure_message(&failure, port, deadline, SecondAttempt::SameOffload, backend_dir.as_deref()));}if is_illegal_instruction_exit(failure.exit_code) || is_sigill(failure.signal) {@@ -2332,7 +2389,7 @@ fn start_after_stop(signal = failure.signal.unwrap_or_default(),"the LU Engine crashed with an illegal-instruction fault, skipping the pointless second attempt");- return Err(start_failure_message(&failure, port, deadline, SecondAttempt::SameOffload));+ return Err(start_failure_message(&failure, port, deadline, SecondAttempt::SameOffload, backend_dir.as_deref()));}tracing::warn!(target: "engine", port, "the first start attempt exited before it served, retrying once");@@ -2434,7 +2491,7 @@ fn start_after_stop(answer["cpuOnly"] = serde_json::json!(offload_was_tried);Ok(answer)}- Err(second) => Err(start_failure_message(&second, retry_port, deadline, second_attempt)),+ Err(second) => Err(start_failure_message(&second, retry_port, deadline, second_attempt, backend_dir.as_deref())),}}@@ -4335,11 +4392,11 @@ mod tests {port_taken: false,stderr: "ggml_backend_cuda_buffer_type_alloc_buffer: allocating 9216.00 MiB on device 0: cudaMalloc failed: out of memory".into(),exit_code: None, signal: None };- let same = start_failure_message(&out_of_memory, 8127, Duration::from_secs(60), SecondAttempt::SameOffload);+ let same = start_failure_message(&out_of_memory, 8127, Duration::from_secs(60), SecondAttempt::SameOffload, None);assert!(same.contains("It was tried twice"), "{same}");assert!(same.contains("set GPU Layers to 0"), "{same}");- let cpu = start_failure_message(&out_of_memory, 8127, Duration::from_secs(60), SecondAttempt::CpuOnly);+ let cpu = start_failure_message(&out_of_memory, 8127, Duration::from_secs(60), SecondAttempt::CpuOnly, None);assert!(cpu.contains("The LU Engine exited before serving on port 8127."), "{cpu}");assert!(cpu.contains("Tried with GPU offload and again on CPU."), "{cpu}");assert!(!cpu.contains("GPU Layers"), "the way out was already taken:\n{cpu}");@@ -5606,7 +5663,7 @@ mod tests {stderr: KAPUTTE_VERSION_STDERR.into(),exit_code: None, signal: None };let msg = with_note_on_top(- &start_failure_message(&f, 8127, Duration::from_secs(60), SecondAttempt::SameOffload),+ &start_failure_message(&f, 8127, Duration::from_secs(60), SecondAttempt::SameOffload, None),RESTORED_NOTE,);let notiz = msg.find(RESTORED_NOTE).expect("the note is gone");@@ -6001,7 +6058,7 @@ mod tests {port_taken: false,stderr: "bind: Address already in use".into(),exit_code: None, signal: None };- let msg = start_failure_message(&failure, 8127, Duration::from_secs(60), SecondAttempt::SameOffload);+ let msg = start_failure_message(&failure, 8127, Duration::from_secs(60), SecondAttempt::SameOffload, None);assert!(msg.contains("could not open port 8127"), "{msg}");assert!(!msg.contains("Reinstall"),@@ -6013,7 +6070,7 @@ mod tests {port_taken: false,stderr: "something went wrong".into(),exit_code: None, signal: None };- assert!(start_failure_message(&other, 8127, Duration::from_secs(60), SecondAttempt::SameOffload).contains("Reinstall"));+ assert!(start_failure_message(&other, 8127, Duration::from_secs(60), SecondAttempt::SameOffload, None).contains("Reinstall"));}#[test]@@ -6026,7 +6083,7 @@ mod tests {assert!(!stderr_blames_the_port(oom));assert!(stderr_blames_the_gpu(oom));let failure = StartFailure { died: true, port_taken: false, stderr: oom.into() , exit_code: None, signal: None };- let msg = start_failure_message(&failure, 8127, Duration::from_secs(60), SecondAttempt::SameOffload);+ let msg = start_failure_message(&failure, 8127, Duration::from_secs(60), SecondAttempt::SameOffload, None);assert!(msg.contains("GPU Layers to 0"), "the way out has to survive: {msg}");assert!(!msg.contains("could not open port"), "{msg}");}@@ -6061,7 +6118,7 @@ mod tests {// out of the graphics-card answer.assert!(!stderr_blames_the_gpu(stderr), "a banner is not a defect");let failure = StartFailure { died: true, port_taken: false, stderr: stderr.into() , exit_code: None, signal: None };- let msg = start_failure_message(&failure, 8127, Duration::from_secs(60), SecondAttempt::SameOffload);+ let msg = start_failure_message(&failure, 8127, Duration::from_secs(60), SecondAttempt::SameOffload, None);assert!(msg.contains("could not open port 8127"), "{msg}");assert!(!msg.contains("GPU Layers"), "a busy port is not freed by CPU mode: {msg}");}@@ -6103,7 +6160,7 @@ mod tests {// its budget spends the same budget again (up to 10 minutes on a big// GGUF) and re-runs the ComfyUI and Ollama evictions each time.let slow = StartFailure { died: false, port_taken: false, stderr: String::new() , exit_code: None, signal: None };- let msg = start_failure_message(&slow, 8127, Duration::from_secs(60), SecondAttempt::SameOffload);+ let msg = start_failure_message(&slow, 8127, Duration::from_secs(60), SecondAttempt::SameOffload, None);assert!(msg.contains("did not become healthy"),"the frontend matches on this phrase: {msg}"@@ -6117,7 +6174,7 @@ mod tests {"something went wrong",] {let died = StartFailure { died: true, port_taken: false, stderr: stderr.into() , exit_code: None, signal: None };- let m = start_failure_message(&died, 8127, Duration::from_secs(60), SecondAttempt::SameOffload);+ let m = start_failure_message(&died, 8127, Duration::from_secs(60), SecondAttempt::SameOffload, None);assert!(!m.contains("did not become healthy"), "{m}");}}@@ -6204,15 +6261,21 @@ mod tests {exit_code: Some(ILLEGAL_INSTRUCTION_EXIT_CODE),signal: None,};- let msg = start_failure_message(&f, 8127, Duration::from_secs(60), SecondAttempt::SameOffload);+ let msg = start_failure_message(&f, 8127, Duration::from_secs(60), SecondAttempt::SameOffload, None);assert!(!msg.contains("0xC000001D"), "no OS-specific status code: {msg}");assert!(!msg.contains("STATUS_ILLEGAL_INSTRUCTION"), "{msg}");assert!(!msg.contains("for example AVX2"), "the guess is gone: {msg}");assert!(!msg.contains("Ollama"), "no competing product named: {msg}");- assert!(msg.contains("LU Cloud"), "an in-app action is offered: {msg}");+ // BLOCKER C1 (review-integ.md): after the sidecar rebuild, "the+ // bundled engine's build requires X" and "until a build with broader+ // CPU support is available" are both false, K1 shipped exactly that+ // broader build. The message must not claim the build itself lacks+ // support for this CPU any more.+ assert!(!msg.contains("build requires"), "the build-lacks-support claim is gone: {msg}");+ assert!(!msg.contains("broader CPU support"), "{msg}");+ assert!(msg.contains("LU Cloud"), "the cloud stays available, but not as the only answer: {msg}");assert!(msg.contains("did not retry"), "{msg}");assert!(!msg.contains("tried twice"), "no second try ran: {msg}");- assert!(!msg.contains("Reinstall"), "the cause is known, not generic: {msg}");assert!(!regex::Regex::new(r"\d+\.\d+\.\d+").unwrap().is_match(&msg),"no version number in an update promise: {msg}"@@ -6221,11 +6284,117 @@ mod tests {// Negative control: an ordinary death (no illegal-instruction exit// code, no signal) is unaffected and keeps its own wording.let ordinary = StartFailure { exit_code: None, signal: None, ..f };- let ordinary_msg =- start_failure_message(&ordinary, 8127, Duration::from_secs(60), SecondAttempt::SameOffload);+ let ordinary_msg = start_failure_message(+ &ordinary,+ 8127,+ Duration::from_secs(60),+ SecondAttempt::SameOffload,+ None,+ );assert!(!ordinary_msg.contains("illegal-instruction"), "{ordinary_msg}");}+ /// BLOCKER C1 (review-integ.md, Teil (c)): with no backend folder to+ /// count at all (`None`, mirroring a fresh or broken install where+ /// `resolve_engine_backend_dir` found nothing), the message must point at+ /// an incomplete installation or antivirus quarantine and offer a+ /// reinstall, not repeat the old "wait for a broader build" claim.+ #[test]+ fn illegal_instruction_with_no_backend_dir_blames_the_installation() {+ let f = StartFailure {+ died: true,+ port_taken: false,+ stderr: String::new(),+ exit_code: Some(ILLEGAL_INSTRUCTION_EXIT_CODE),+ signal: None,+ };+ let msg = start_failure_message(&f, 8127, Duration::from_secs(60), SecondAttempt::SameOffload, None);+ assert!(msg.contains("Reinstall Locally Uncensored"), "{msg}");+ assert!(msg.to_lowercase().contains("antivirus"), "{msg}");+ assert!(msg.contains("none of the separate CPU builds"), "{msg}");+ }++ /// Negative control for the two cases `count_cpu_backend_modules` tells+ /// apart: a folder that holds every expected CPU variant still crashed,+ /// so the wording must not claim the folder is empty (that would send a+ /// user with a genuinely complete install looking for files that are+ /// already there), while still pointing at antivirus/reinstall rather+ /// than at "no build exists for this CPU".+ #[test]+ fn illegal_instruction_with_a_full_backend_dir_does_not_claim_it_is_empty() {+ let dir = tempfile::tempdir().unwrap();+ let names: &[&str] = if cfg!(target_os = "windows") {+ &["ggml-cpu-x64.dll", "ggml-cpu-sse42.dll", "ggml-cpu-haswell.dll"]+ } else {+ &["libggml-cpu-x64.so", "libggml-cpu-sse42.so", "libggml-cpu-haswell.so"]+ };+ for name in names {+ std::fs::write(dir.path().join(name), b"stub").unwrap();+ }+ let f = StartFailure {+ died: true,+ port_taken: false,+ stderr: String::new(),+ exit_code: Some(ILLEGAL_INSTRUCTION_EXIT_CODE),+ signal: None,+ };+ let msg = start_failure_message(+ &f,+ 8127,+ Duration::from_secs(60),+ SecondAttempt::SameOffload,+ Some(dir.path()),+ );+ assert!(msg.contains("Reinstall Locally Uncensored"), "{msg}");+ assert!(msg.to_lowercase().contains("antivirus"), "{msg}");+ assert!(msg.contains("holds 3 of the separate CPU builds"), "{msg}");+ assert!(!msg.contains("none of the separate CPU builds"), "a full folder is not an empty one: {msg}");++ // Negative control: an EMPTY folder (created but never populated) is+ // reported as empty, not as "3 of the separate CPU builds".+ let empty_dir = tempfile::tempdir().unwrap();+ let empty_msg = start_failure_message(+ &f,+ 8127,+ Duration::from_secs(60),+ SecondAttempt::SameOffload,+ Some(empty_dir.path()),+ );+ assert!(empty_msg.contains("none of the separate CPU builds"), "{empty_msg}");+ assert!(!empty_msg.contains("holds 3"), "{empty_msg}");+ }++ /// `count_cpu_backend_modules` itself, isolated from the message+ /// wording: loader-exact prefix, not a bare substring match, and unaware+ /// of `ggml-base`/`ggml-vulkan`/the exe sitting in the same folder.+ #[test]+ fn count_cpu_backend_modules_counts_only_the_cpu_variants() {+ let dir = tempfile::tempdir().unwrap();+ let prefix = if cfg!(target_os = "windows") { "ggml-cpu-" } else { "libggml-cpu-" };+ let ext = if cfg!(target_os = "windows") { "dll" } else { "so" };+ for variant in ["x64", "sse42", "haswell"] {+ std::fs::write(dir.path().join(format!("{prefix}{variant}.{ext}")), b"stub").unwrap();+ }+ // Siblings that must NOT be counted: the shared runtime, the GPU+ // backend, and the exe itself.+ let base = if cfg!(target_os = "windows") { "ggml-base.dll" } else { "libggml-base.so" };+ let vulkan = if cfg!(target_os = "windows") { "ggml-vulkan.dll" } else { "libggml-vulkan.so" };+ std::fs::write(dir.path().join(base), b"stub").unwrap();+ std::fs::write(dir.path().join(vulkan), b"stub").unwrap();+ assert_eq!(count_cpu_backend_modules(dir.path()), 3);++ // Negative control: a directory holding only the non-CPU siblings+ // counts as zero, not as "found something".+ let siblings_only = tempfile::tempdir().unwrap();+ std::fs::write(siblings_only.path().join(base), b"stub").unwrap();+ std::fs::write(siblings_only.path().join(vulkan), b"stub").unwrap();+ assert_eq!(count_cpu_backend_modules(siblings_only.path()), 0);++ // A directory that does not exist at all behaves like an empty one+ // instead of panicking (a stale or unresolved backend_dir).+ assert_eq!(count_cpu_backend_modules(&dir.path().join("does-not-exist")), 0);+ }+#[test]fn a_linux_sigill_is_recognised_the_same_way_the_windows_exit_code_is() {// K1 Runde 2, Punkt D: `ExitStatus::code()` reads `None` for BOTH "no@@ -6245,7 +6414,7 @@ mod tests {exit_code: None,signal: Some(SIGILL),};- let msg = start_failure_message(&f, 8127, Duration::from_secs(60), SecondAttempt::SameOffload);+ let msg = start_failure_message(&f, 8127, Duration::from_secs(60), SecondAttempt::SameOffload, None);assert!(msg.contains("illegal-instruction"), "SIGILL reads as the same crash: {msg}");assert!(msg.contains("did not retry"), "{msg}");assert!(!msg.contains("0xC000001D"), "{msg}");@@ -6330,7 +6499,7 @@ mod tests {port_taken: false,stderr: "ggml_cuda_init: failed to initialize CUDA: no kernel image is available for execution on the device".into(),exit_code: None, signal: None };- let msg = start_failure_message(&f, 8127, Duration::from_secs(60), SecondAttempt::SameOffload);+ let msg = start_failure_message(&f, 8127, Duration::from_secs(60), SecondAttempt::SameOffload, None);assert!(msg.contains("exited again"), "{msg}");assert!(msg.contains("tried twice"), "{msg}");assert!(msg.contains("GPU Layers to 0"), "{msg}");@@ -6345,7 +6514,7 @@ mod tests {port_taken: false,stderr: "llama_model_load: error loading model: unknown model architecture 'wanx'".into(),exit_code: None, signal: None };- let msg = start_failure_message(&f, 8127, Duration::from_secs(60), SecondAttempt::SameOffload);+ let msg = start_failure_message(&f, 8127, Duration::from_secs(60), SecondAttempt::SameOffload, None);assert!(msg.contains("could not read the model file"), "{msg}");assert!(!msg.contains("GPU Layers"), "{msg}");}@@ -6374,7 +6543,7 @@ srv llama_server: exiting due to model loading error";port_taken: false,stderr: KAPUTTE_GGUF_STDERR.into(),exit_code: None, signal: None };- let msg = start_failure_message(&f, 8127, Duration::from_secs(60), SecondAttempt::SameOffload);+ let msg = start_failure_message(&f, 8127, Duration::from_secs(60), SecondAttempt::SameOffload, None);assert!(msg.contains("could not read the model file"), "{msg}");assert!(!msg.contains("GPU Layers"), "{msg}");assert!(!msg.contains("graphics-card"), "{msg}");@@ -6592,7 +6761,7 @@ srv llama_server: exiting due to model loading error";port_taken: false,stderr: KAPUTTE_VERSION_STDERR.into(),exit_code: None, signal: None };- let msg = start_failure_message(&f, 8127, Duration::from_secs(60), SecondAttempt::SameOffload);+ let msg = start_failure_message(&f, 8127, Duration::from_secs(60), SecondAttempt::SameOffload, None);assert!(msg.contains("could not read the model file"), "{msg}");assert!(!msg.contains("GPU Layers"), "{msg}");assert!(!msg.contains("graphics-card"), "{msg}");@@ -6609,7 +6778,7 @@ srv llama_server: exiting due to model loading error";port_taken: false,stderr: "ggml_backend_cuda_buffer_type_alloc_buffer: allocating 9216.00 MiB on device 0: cudaMalloc failed: out of memory\nllama_model_load: error loading model: unable to allocate CUDA0 buffer\nllama_model_load_from_file_impl: failed to load model".into(),exit_code: None, signal: None };- let msg = start_failure_message(&f, 8127, Duration::from_secs(60), SecondAttempt::SameOffload);+ let msg = start_failure_message(&f, 8127, Duration::from_secs(60), SecondAttempt::SameOffload, None);assert!(msg.contains("GPU Layers"), "{msg}");assert!(!msg.contains("could not read the model file"), "{msg}");}@@ -6617,7 +6786,7 @@ srv llama_server: exiting due to model loading error";#[test]fn a_stranger_on_the_port_keeps_its_own_message() {let f = StartFailure { died: true, port_taken: true, stderr: String::new() , exit_code: None, signal: None };- let msg = start_failure_message(&f, 8127, Duration::from_secs(60), SecondAttempt::SameOffload);+ let msg = start_failure_message(&f, 8127, Duration::from_secs(60), SecondAttempt::SameOffload, None);assert!(msg.contains("occupying the port"), "{msg}");assert!(!msg.contains("tried twice"), "{msg}");}@@ -6625,7 +6794,7 @@ srv llama_server: exiting due to model loading error";#[test]fn a_slow_load_still_reports_the_budget_and_never_claims_a_crash() {let f = StartFailure { died: false, port_taken: false, stderr: String::new() , exit_code: None, signal: None };- let msg = start_failure_message(&f, 8127, Duration::from_secs(220), SecondAttempt::SameOffload);+ let msg = start_failure_message(&f, 8127, Duration::from_secs(220), SecondAttempt::SameOffload, None);assert!(msg.contains("did not become healthy on port 8127 within 220s"), "{msg}");assert!(!msg.contains("exited"), "{msg}");}@@ -6643,7 +6812,7 @@ srv llama_server: exiting due to model loading error";port_taken: false,stderr: "lu-llama-server: error while loading shared libraries: libvulkan.so.1: cannot open shared object file: No such file or directory".into(),exit_code: None, signal: None };- let msg = start_failure_message(&f, 8127, Duration::from_secs(60), SecondAttempt::SameOffload);+ let msg = start_failure_message(&f, 8127, Duration::from_secs(60), SecondAttempt::SameOffload, None);assert!(msg.contains("libvulkan.so.1"), "{msg}");assert!(!msg.contains("GPU Layers"), "{msg}");// The engine's own last words still ride along for a bug report.@@ -6729,7 +6898,7 @@ srv llama_server: exiting due to model loading error";port_taken: false,stderr: "ggml_vulkan: no devices found".into(),exit_code: None, signal: None };- let msg = start_failure_message(&f, 8127, Duration::from_secs(60), SecondAttempt::SameOffload);+ let msg = start_failure_message(&f, 8127, Duration::from_secs(60), SecondAttempt::SameOffload, None);assert!(msg.contains("GPU Layers to 0"), "{msg}");assert!(!msg.contains("apt install"), "{msg}");// And an empty stderr names no library at all.diff --git a/src/lib/release-notes.ts b/src/lib/release-notes.tsindex 95814626..ae20e54a 100644--- a/src/lib/release-notes.ts+++ b/src/lib/release-notes.ts@@ -120,6 +120,7 @@ export const RELEASE_NOTES: ReleaseNote[] = [version: '3.0.1',headline: 'A GPU without a measured free reading gets a safer plan, and Linux/AppImage installs stop losing environment variables to it',lines: [+ 'The local engine now picks its CPU code path at startup, so older processors without AVX2 can run local models instead of the engine exiting right after start.','On a GPU where the free VRAM could not actually be measured (no nvidia-smi, for instance), the LU Engine used to plan layers as if the whole card were sitting empty and log "N MiB are free" for a number that was really the total size, other programs included. It now takes a bigger safety margin on that weaker reading and logs it correctly as total capacity, not free memory, so a start plans fewer layers rather than too many.','Linux AppImage: a foreign program the app starts (git, a system Python, pip, ffmpeg, nvidia-smi, the coding agent shell, and now every program the Character Trainer starts too) no longer inherits the AppImage runtime\'s own LD_LIBRARY_PATH, PYTHONHOME and related variables. That inheritance made a perfectly healthy system Python fail to import ssl or find its standard library, with a diagnosis that pointed at a broken Python install rather than the real cause.','On a platform where pip refuses to write into the system Python (Arch, Debian 12+, Fedora 38+, Ubuntu 23.04+), the isolated venv LU already built there no longer dies at the first pip call, and the same fix keeps the Coding Agent\'s own terminal from picking up the same poisoned environment for every git, pip or python command typed into it.',@@ -132,7 +133,6 @@ export const RELEASE_NOTES: ReleaseNote[] = ['The LU Engine crashing immediately on an old CPU now says which instruction set is missing, measured from the CPU itself rather than guessed, and stops retrying the same binary a second time since it would only fail the same way again.','The engine startup probe\'s log line read as if a model that is still loading, one that is thinking, and one that has genuinely failed all looked the same. The wording for each case is distinct now.','The CI check that runs on every pull request now fails independently on each platform instead of one platform\'s failure hiding whatever the other platform would have found.',- 'If you moved the Character Trainer\'s folder to a different drive in Settings, pip, Hugging Face and PyTorch now cache into that same folder instead of quietly filling up the system drive again. Left on the default location, nothing changes: your existing caches stay exactly where they already are, so this never triggers a second multi gigabyte download on its own.',],},],