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++
Start failures: plain, correct messages from the engine's exit code (missing DLL, bad DLL, crash, blocked, file missing); low memory only with evidence; no memory retry for non-memory failures
Niko1221d7347cdde6c6
diff --git a/apps/host/server/native-control.mjs b/apps/host/server/native-control.mjsindex 8a3ce5e07..f4b114c30 100644--- a/apps/host/server/native-control.mjs+++ b/apps/host/server/native-control.mjs@@ -51,7 +51,8 @@ export function createNativeControl({directory,requests=()=>[],changed=()=>{},spconst modelArena=id=>({arenaGb:(snapshot.catalog?.families??[]).flatMap(f=>f.sizes??[]).find(s=>s.id===id)?.experts_gb});/* A start that ends with `server_exited` carries the engine's last log line with it; the app turns the code into words andkeeps this text under "Details" (src/lib/plain-errors.ts). */- function humanStartError(error){const text=String(error?.message??error),tail=error?.output?.log_tail;return tail&&!text.includes(tail)?`${text}: ${tail}`:text;}+ function exitCodeText(code){const n=Number(code);if(!Number.isFinite(n)||n===0)return '';const u=n<0?n+2**32:n;return u>=0x80000000?`exit code 0x${u.toString(16).toUpperCase().padStart(8,'0')}`:`exit code ${u}`;}+ function humanStartError(error){const text=String(error?.message??error),tail=error?.output?.log_tail,code=exitCodeText(error?.output?.engine_exit_code);const head=code&&!text.includes(code)?`${text} (${code})`:text;return tail&&!head.includes(tail)?`${head}: ${tail}`:head;}/* A run config the app's install job wrote names files inside the app's own Control folder (`cwd`, `--expert-profile`). When theapp is reinstalled to another folder, or an update moves Control, those absolute paths point at nothing and every installedmodel breaks. At every read of the installed models, a path that ends up inside a folder called `control` that no longerdiff --git a/apps/host/server/native-resources.mjs b/apps/host/server/native-resources.mjsindex 519d020cb..5dcf7baa5 100644--- a/apps/host/server/native-resources.mjs+++ b/apps/host/server/native-resources.mjs@@ -45,6 +45,9 @@ export function resourceSettings(config,hardware,profile,model={}){technical line for Details. The caller tries once and never again, and does not save this config. */export function saferStart(config,hardware,model,failure){const text=String(failure??'');+ // A start that died for a reason that is not memory (a missing or bad DLL, a crash, a blocked file) is not helped by a memory setting, and must not be called a memory failure.+ if(/0xC0000135|0xC000007B|0xC0000142|0xC000001D|0xC0000005|0xC0000409|0xC0000022|error while loading shared libraries|cannot open shared object file|\bENOENT\b|exit code 127|exit code 139|illegal instruction/i.test(text))return null;+ const ranOut=/out of memory|memory guard|\boom\b|\bkilled\b|exit code 137|cannot allocate|not enough memory|bad_alloc|insufficient memory/i.test(text),first=ranOut?'The first start ran out of memory':'The first start did not finish';if(!/server_exited|exited before|died before|engine stopped|pinned-memory-exhausted|mapped staging|out of memory|memory guard|\bkilled\b/i.test(text))return null;const args=[...(config.args??[])],env={...(config.env??{})};const ram=Number(hardware?.ram_gb)||0,arena=Number(model?.arenaGb)||0;@@ -61,10 +64,10 @@ export function saferStart(config,hardware,model,failure){if(at>=0){const next=Math.floor((Number(args[at+1])||0)*.7);if(next<8)return null;args[at+1]=String(next);- return {config:{...config,args},words:`The first start ran out of memory, so Strata started again and keeps less of the model in RAM (${next} GB); more of it is read from the SSD, which is slower.`,detail:`--resident-budget-gib ${next}`};+ return {config:{...config,args},words:`${first}, so Strata started again and keeps less of the model in RAM (${next} GB); more of it is read from the SSD, which is slower.`,detail:`--resident-budget-gib ${next}`};}if(!(ram>0&&arena>0))return null;const budget=Math.max(8,Math.floor(ram*.5)-4);if(budget>=arena)return null;args.push('--resident-budget-gib',String(budget));- return {config:{...config,args},words:`The first start ran out of memory, so Strata started again in low-memory mode: ${budget} GB of the model stays in RAM and the rest is read from the SSD. It is slower, but it should load.`,detail:`--resident-budget-gib ${budget}`};+ return {config:{...config,args},words:`${first}, so Strata started again in low-memory mode: ${budget} GB of the model stays in RAM and the rest is read from the SSD. It is slower, but it should load.`,detail:`--resident-budget-gib ${budget}`};}diff --git a/apps/host/src/lib/plain-errors.ts b/apps/host/src/lib/plain-errors.tsindex ecbed5e8c..a08f28a3b 100644--- a/apps/host/src/lib/plain-errors.ts+++ b/apps/host/src/lib/plain-errors.ts@@ -17,7 +17,16 @@ const MEMORY_NEXT = 'Close other programs and try again, or choose “Leave 20%const RULES: Rule[] = [{ kind: 'picture-reading', match: /vision files|picture reading/i, message: 'Picture reading isn’t available for this model.', next: 'Turn off picture reading and try again.' },{ kind: 'access', match: /PermissionError|access is denied|can.t open its settings file/i, message: 'Strata can’t open its settings file.', next: 'Run Strata once as yourself (not as administrator) or press Repair.' },- { kind: 'memory', match: /server_exited|engine stopped|exited before|died before|out of memory|memory guard|\boom\b|killed/i, message: MEMORY, next: MEMORY_NEXT },+ // A start that died: the exit code or the engine's own last line says why. Say "low on memory" only when that evidence is there+ // (2026-10-17: a missing DLL, 0xC0000135, was reported as "ran low on memory" and told the tester to free RAM).+ { kind: 'dll-missing', match: /0xC0000135|3221225781|-1073741515|STATUS_DLL_NOT_FOUND|error while loading shared libraries|cannot open shared object file|Library not loaded/i, message: 'The engine could not start because one of its program files is missing on this computer.', next: 'Reinstall Strata (the installer includes it) or press Repair. Closing other programs will not help.' },+ { kind: 'dll-bad', match: /0xC000007B|3221225595|-1073741701|0xC0000142|3221225794|0xC000012F|bad image/i, message: 'The engine could not start because one of its program files does not fit this computer or is damaged.', next: 'Reinstall Strata or press Repair. If it keeps happening, update your graphics driver.' },+ { kind: 'cpu-unsupported', match: /0xC000001D|3221225501|illegal instruction|SIGILL/i, message: 'The engine needs a newer processor feature than this computer has.', next: 'Open Details and share them when you ask for help.' },+ { kind: 'crash', match: /0xC0000005|3221225477|0xC0000409|3221226505|segmentation fault|SIGSEGV|exit code 139/i, message: 'The engine crashed while starting.', next: 'Restart the PC and try again. If it keeps happening, update your graphics driver and open Details when you ask for help.' },+ { kind: 'blocked', match: /0xC0000022|3221225506|\bEACCES\b|\bEPERM\b|operation not permitted/i, message: 'Windows or your security software stopped the engine from starting.', next: 'Allow Strata in your security software, then try again.' },+ { kind: 'file-missing', match: /\bENOENT\b|no such file or directory|cannot find the (?:file|path)|0x80070002|exit code 127|file not found/i, message: 'Strata could not find a file it needs to start the engine.', next: 'Reinstall Strata or press Repair.' },+ { kind: 'memory', match: /out of memory|memory guard|\boom\b|\bkilled\b|exit code 137|cannot allocate memory|not enough memory|bad_alloc|pinned-memory-exhausted|mapped staging|cudaErrorMemoryAllocation|insufficient memory/i, message: MEMORY, next: MEMORY_NEXT },+ { kind: 'start-failed', match: /server_exited|engine stopped|exited before|died before/i, message: 'The model stopped while starting.', next: 'Try again. If it keeps happening, open Details and share them when you ask for help.' },{ kind: 'slow-load', match: /loading took more than/i, message: 'Loading is taking too long.', next: 'The PC may be short on memory. Close other programs and try again.' },{ kind: 'engine-missing', match: /no engine for this pc|engine component|never downloads an engine|engine .*not installed|no strata engine/i, message: 'Strata’s engine for this computer isn’t installed yet.', next: 'It is added when you download a model. Download your model again to add it.' },{ kind: 'network', match: /cannot reach|could not reach|can't reach|timed out|econn|enotfound|getaddrinfo|urlopen|connection (?:reset|refused|aborted)|network is unreachable/i, message: 'The download couldn’t reach the internet.', next: 'Check your connection, then press Resume download.' },diff --git a/apps/host/src/locales/de.json b/apps/host/src/locales/de.jsonindex 423ad693a..c1e525bb6 100644--- a/apps/host/src/locales/de.json+++ b/apps/host/src/locales/de.json@@ -3125,5 +3125,18 @@"s3129": "Das war ein Beispieldurchlauf, während die App ihren Host nicht erreichen konnte.","s3130": "Startet noch","s3131": "Time-skip braucht eine fertig gestartete App. Versuche es gleich noch einmal.",- "s3132": "Arbeitet an einer Kopie deiner Dateien."+ "s3132": "Arbeitet an einer Kopie deiner Dateien.",+ "s3133": "Die Engine konnte nicht starten, weil auf diesem Computer eine ihrer Programmdateien fehlt.",+ "s3134": "Installiere Strata neu (das Installationsprogramm enthält die Datei) oder drücke auf Reparieren. Andere Programme zu schließen hilft nicht.",+ "s3135": "Die Engine konnte nicht starten, weil eine ihrer Programmdateien nicht zu diesem Computer passt oder beschädigt ist.",+ "s3136": "Installiere Strata neu oder drücke auf Reparieren. Wenn es weiter passiert, aktualisiere den Grafiktreiber.",+ "s3137": "Die Engine braucht eine neuere Prozessorfunktion, als dieser Computer hat.",+ "s3138": "Öffne die Details und teile sie mit, wenn du um Hilfe bittest.",+ "s3139": "Die Engine ist beim Starten abgestürzt.",+ "s3140": "Starte den Computer neu und versuche es erneut. Wenn es weiter passiert, aktualisiere den Grafiktreiber und öffne die Details, wenn du um Hilfe bittest.",+ "s3141": "Windows oder deine Sicherheitssoftware hat den Start der Engine verhindert.",+ "s3142": "Erlaube Strata in deiner Sicherheitssoftware und versuche es dann erneut.",+ "s3143": "Strata hat eine Datei nicht gefunden, die zum Starten der Engine nötig ist.",+ "s3144": "Installiere Strata neu oder drücke auf Reparieren.",+ "s3145": "Das Modell wurde beim Starten angehalten."}diff --git a/apps/host/src/locales/en.json b/apps/host/src/locales/en.jsonindex 6bea29201..33a2d9c57 100644--- a/apps/host/src/locales/en.json+++ b/apps/host/src/locales/en.json@@ -3125,5 +3125,18 @@"s3129": "This was a sample run made while the app could not reach its host.","s3130": "Still starting up","s3131": "Time-skip needs the app to finish starting. Try again in a moment.",- "s3132": "Working on a copy of your files."+ "s3132": "Working on a copy of your files.",+ "s3133": "The engine could not start because one of its program files is missing on this computer.",+ "s3134": "Reinstall Strata (the installer includes it) or press Repair. Closing other programs will not help.",+ "s3135": "The engine could not start because one of its program files does not fit this computer or is damaged.",+ "s3136": "Reinstall Strata or press Repair. If it keeps happening, update your graphics driver.",+ "s3137": "The engine needs a newer processor feature than this computer has.",+ "s3138": "Open Details and share them when you ask for help.",+ "s3139": "The engine crashed while starting.",+ "s3140": "Restart the PC and try again. If it keeps happening, update your graphics driver and open Details when you ask for help.",+ "s3141": "Windows or your security software stopped the engine from starting.",+ "s3142": "Allow Strata in your security software, then try again.",+ "s3143": "Strata could not find a file it needs to start the engine.",+ "s3144": "Reinstall Strata or press Repair.",+ "s3145": "The model stopped while starting."}diff --git a/apps/host/src/locales/es.json b/apps/host/src/locales/es.jsonindex 028e39a77..78cd50927 100644--- a/apps/host/src/locales/es.json+++ b/apps/host/src/locales/es.json@@ -3125,5 +3125,18 @@"s3129": "Esto fue una ejecución de ejemplo hecha cuando la app no podía conectar con su host.","s3130": "Todavía arrancando","s3131": "Time-skip necesita que la app termine de arrancar. Inténtalo de nuevo en un momento.",- "s3132": "Trabajando en una copia de tus archivos."+ "s3132": "Trabajando en una copia de tus archivos.",+ "s3133": "El motor no pudo iniciarse porque falta uno de sus archivos de programa en este equipo.",+ "s3134": "Reinstala Strata (el instalador lo incluye) o pulsa Reparar. Cerrar otros programas no ayudará.",+ "s3135": "El motor no pudo iniciarse porque uno de sus archivos de programa no es compatible con este equipo o está dañado.",+ "s3136": "Reinstala Strata o pulsa Reparar. Si sigue pasando, actualiza el controlador de la tarjeta gráfica.",+ "s3137": "El motor necesita una función de procesador más reciente que la de este equipo.",+ "s3138": "Abre Detalles y compártelos cuando pidas ayuda.",+ "s3139": "El motor se bloqueó al iniciarse.",+ "s3140": "Reinicia el equipo e inténtalo de nuevo. Si sigue pasando, actualiza el controlador de la tarjeta gráfica y abre Detalles cuando pidas ayuda.",+ "s3141": "Windows o tu software de seguridad impidió que el motor se iniciara.",+ "s3142": "Permite Strata en tu software de seguridad y vuelve a intentarlo.",+ "s3143": "Strata no encontró un archivo que necesita para iniciar el motor.",+ "s3144": "Reinstala Strata o pulsa Reparar.",+ "s3145": "El modelo se detuvo al iniciarse."}diff --git a/apps/host/src/locales/ja.json b/apps/host/src/locales/ja.jsonindex 5fbbc1ed5..fa3a3d147 100644--- a/apps/host/src/locales/ja.json+++ b/apps/host/src/locales/ja.json@@ -3125,5 +3125,18 @@"s3129": "これは、アプリがホストに接続できなかったときに作られたサンプル実行です。","s3130": "まだ起動中です","s3131": "Time-skip を使うには、アプリの起動が終わっている必要があります。少し待ってからもう一度お試しください。",- "s3132": "ファイルのコピーで作業しています。"+ "s3132": "ファイルのコピーで作業しています。",+ "s3133": "このパソコンでエンジンのプログラムファイルが1つ見つからないため、エンジンを起動できませんでした。",+ "s3134": "Strata を再インストールするか(インストーラーに含まれています)、「修復」を押してください。他のプログラムを閉じても解決しません。",+ "s3135": "エンジンのプログラムファイルの1つがこのパソコンに合っていないか、破損しているため、起動できませんでした。",+ "s3136": "Strata を再インストールするか「修復」を押してください。それでも直らない場合は、グラフィックドライバーを更新してください。",+ "s3137": "エンジンには、このパソコンのプロセッサにない新しい機能が必要です。",+ "s3138": "「詳細」を開き、ヘルプを求めるときに共有してください。",+ "s3139": "エンジンの起動中にクラッシュしました。",+ "s3140": "パソコンを再起動してもう一度お試しください。それでも直らない場合は、グラフィックドライバーを更新し、ヘルプを求めるときに「詳細」を開いてください。",+ "s3141": "Windows またはセキュリティソフトがエンジンの起動を止めました。",+ "s3142": "セキュリティソフトで Strata を許可してから、もう一度お試しください。",+ "s3143": "エンジンの起動に必要なファイルが Strata に見つかりませんでした。",+ "s3144": "Strata を再インストールするか「修復」を押してください。",+ "s3145": "モデルの起動中に停止しました。"}diff --git a/apps/host/src/locales/ko.json b/apps/host/src/locales/ko.jsonindex bfd95bc6d..649138834 100644--- a/apps/host/src/locales/ko.json+++ b/apps/host/src/locales/ko.json@@ -3125,5 +3125,18 @@"s3129": "앱이 호스트에 연결할 수 없을 때 만들어진 예시 실행입니다.","s3130": "아직 시작하는 중입니다","s3131": "Time-skip을 쓰려면 앱이 완전히 시작되어야 합니다. 잠시 후 다시 시도해 주세요.",- "s3132": "파일 사본으로 작업하고 있습니다."+ "s3132": "파일 사본으로 작업하고 있습니다.",+ "s3133": "이 컴퓨터에 엔진의 프로그램 파일 하나가 없어서 엔진을 시작하지 못했습니다.",+ "s3134": "Strata를 다시 설치하거나(설치 프로그램에 포함되어 있습니다) '복구'를 누르세요. 다른 프로그램을 닫아도 도움이 되지 않습니다.",+ "s3135": "엔진의 프로그램 파일 하나가 이 컴퓨터와 맞지 않거나 손상되어 엔진을 시작하지 못했습니다.",+ "s3136": "Strata를 다시 설치하거나 '복구'를 누르세요. 계속되면 그래픽 드라이버를 업데이트하세요.",+ "s3137": "엔진에는 이 컴퓨터의 프로세서에 없는 더 새로운 기능이 필요합니다.",+ "s3138": "'세부 정보'를 열어 도움을 요청할 때 함께 공유하세요.",+ "s3139": "엔진이 시작하는 중에 충돌했습니다.",+ "s3140": "PC를 다시 시작한 뒤 다시 시도하세요. 계속되면 그래픽 드라이버를 업데이트하고, 도움을 요청할 때 '세부 정보'를 여세요.",+ "s3141": "Windows 또는 보안 소프트웨어가 엔진 시작을 막았습니다.",+ "s3142": "보안 소프트웨어에서 Strata를 허용한 뒤 다시 시도하세요.",+ "s3143": "엔진을 시작하는 데 필요한 파일을 Strata가 찾지 못했습니다.",+ "s3144": "Strata를 다시 설치하거나 '복구'를 누르세요.",+ "s3145": "모델이 시작하는 중에 멈췄습니다."}diff --git a/apps/host/src/locales/pt.json b/apps/host/src/locales/pt.jsonindex 0ecef2657..d088dd87f 100644--- a/apps/host/src/locales/pt.json+++ b/apps/host/src/locales/pt.json@@ -3125,5 +3125,18 @@"s3129": "Esta foi uma execução de exemplo feita quando o app não conseguia alcançar o host.","s3130": "Ainda iniciando","s3131": "O Time-skip precisa que o app termine de iniciar. Tente de novo em instantes.",- "s3132": "Trabalhando em uma cópia dos seus arquivos."+ "s3132": "Trabalhando em uma cópia dos seus arquivos.",+ "s3133": "O motor não pôde iniciar porque falta um dos seus arquivos de programa neste computador.",+ "s3134": "Reinstale o Strata (o instalador o inclui) ou clique em Reparar. Fechar outros programas não ajuda.",+ "s3135": "O motor não pôde iniciar porque um dos seus arquivos de programa não serve para este computador ou está danificado.",+ "s3136": "Reinstale o Strata ou clique em Reparar. Se continuar acontecendo, atualize o driver da placa de vídeo.",+ "s3137": "O motor precisa de um recurso de processador mais novo do que o deste computador.",+ "s3138": "Abra os Detalhes e compartilhe-os ao pedir ajuda.",+ "s3139": "O motor travou ao iniciar.",+ "s3140": "Reinicie o computador e tente de novo. Se continuar acontecendo, atualize o driver da placa de vídeo e abra os Detalhes ao pedir ajuda.",+ "s3141": "O Windows ou o seu software de segurança impediu o motor de iniciar.",+ "s3142": "Permita o Strata no seu software de segurança e tente de novo.",+ "s3143": "O Strata não encontrou um arquivo de que precisa para iniciar o motor.",+ "s3144": "Reinstale o Strata ou clique em Reparar.",+ "s3145": "O modelo parou ao iniciar."}diff --git a/apps/host/src/locales/ru.json b/apps/host/src/locales/ru.jsonindex f2d6266c5..7659e6cd1 100644--- a/apps/host/src/locales/ru.json+++ b/apps/host/src/locales/ru.json@@ -3125,5 +3125,18 @@"s3129": "Это был пробный запуск, сделанный, когда приложение не могло связаться со своим хостом.","s3130": "Приложение ещё запускается","s3131": "Для Time-skip приложение должно полностью запуститься. Повторите попытку через минуту.",- "s3132": "Работаю над копией ваших файлов."+ "s3132": "Работаю над копией ваших файлов.",+ "s3133": "Движок не удалось запустить: на этом компьютере отсутствует один из его программных файлов.",+ "s3134": "Переустановите Strata (установщик включает этот файл) или нажмите «Восстановить». Закрытие других программ не поможет.",+ "s3135": "Движок не удалось запустить: один из его программных файлов не подходит этому компьютеру или повреждён.",+ "s3136": "Переустановите Strata или нажмите «Восстановить». Если это повторяется, обновите драйвер видеокарты.",+ "s3137": "Движку нужна более новая функция процессора, чем есть у этого компьютера.",+ "s3138": "Откройте «Подробности» и приложите их, когда будете просить о помощи.",+ "s3139": "Движок аварийно завершился при запуске.",+ "s3140": "Перезагрузите компьютер и попробуйте снова. Если это повторяется, обновите драйвер видеокарты и откройте «Подробности», когда будете просить о помощи.",+ "s3141": "Windows или ваша защитная программа не дала движку запуститься.",+ "s3142": "Разрешите Strata в защитной программе и попробуйте снова.",+ "s3143": "Strata не нашла файл, нужный для запуска движка.",+ "s3144": "Переустановите Strata или нажмите «Восстановить».",+ "s3145": "Модель остановилась при запуске."}diff --git a/apps/host/src/locales/zh.json b/apps/host/src/locales/zh.jsonindex 17d7c3655..48007894d 100644--- a/apps/host/src/locales/zh.json+++ b/apps/host/src/locales/zh.json@@ -3125,5 +3125,18 @@"s3129": "这是应用无法连接主机时生成的示例运行。","s3130": "仍在启动","s3131": "Time-skip 需要应用先完成启动。请稍后再试。",- "s3132": "正在处理你的文件副本。"+ "s3132": "正在处理你的文件副本。",+ "s3133": "引擎无法启动,因为这台电脑上缺少它的一个程序文件。",+ "s3134": "请重新安装 Strata(安装程序包含该文件)或点击“修复”。关闭其他程序没有帮助。",+ "s3135": "引擎无法启动,因为它的某个程序文件与这台电脑不匹配或已损坏。",+ "s3136": "请重新安装 Strata 或点击“修复”。如果问题仍然出现,请更新显卡驱动。",+ "s3137": "引擎需要这台电脑的处理器所没有的较新功能。",+ "s3138": "请打开“详细信息”,并在求助时一并提供。",+ "s3139": "引擎在启动时崩溃了。",+ "s3140": "请重启电脑后重试。如果问题仍然出现,请更新显卡驱动,并在求助时打开“详细信息”。",+ "s3141": "Windows 或您的安全软件阻止了引擎启动。",+ "s3142": "请在安全软件中允许 Strata,然后重试。",+ "s3143": "Strata 找不到启动引擎所需的文件。",+ "s3144": "请重新安装 Strata 或点击“修复”。",+ "s3145": "模型在启动时停止了。"}diff --git a/apps/host/tests/component-updates.test.mjs b/apps/host/tests/component-updates.test.mjsindex 86eaaaeaf..d0d3c3f87 100644--- a/apps/host/tests/component-updates.test.mjs+++ b/apps/host/tests/component-updates.test.mjs@@ -164,6 +164,7 @@ function fixture({ withApp = false, update } = {}) {const root = mkdtempSync(join(tmpdir(), 'strata-update-ops-'));const install = join(root, 'install'), data = join(root, 'data');mkdirSync(install, { recursive: true });+ process.env.STRATA_INSTALL_DIR = install; // the app's own install folder: the host always names it to Controlconst config = join(install, 'strata-iq2_xs.json');writeFileSync(config, JSON.stringify({ exe: 'component:strata-engine', tokenizer: join(install, 'tok'), args: ['--max-context', '32768'], model_name: 'Qwen', port: 8080 }));const calls = [];diff --git a/apps/host/tests/parallel-default.test.mjs b/apps/host/tests/parallel-default.test.mjsindex 79a2cafe9..0253c010d 100644--- a/apps/host/tests/parallel-default.test.mjs+++ b/apps/host/tests/parallel-default.test.mjs@@ -92,6 +92,7 @@ function fixture({ failStarts = 0, config = {} } = {}) {const root = mkdtempSync(join(tmpdir(), 'strata-par-test-'));const install = join(root, 'install'), data = join(root, 'data');mkdirSync(install, { recursive: true });+ process.env.STRATA_INSTALL_DIR = install; // the app's own install folder: the host always names it to Controlconst path = join(install, 'strata-iq3_s.json');writeFileSync(path, JSON.stringify({ exe: 'component:strata-engine', tokenizer: join(install, 'tok'), args: ['--max-context', '32768', '--mtp', '/m', '--spec', '4'], model_name: 'Qwen iq3_s', port: 8080, ...config }));const saved = []; const calls = [];diff --git a/apps/host/tests/plain-errors.test.mjs b/apps/host/tests/plain-errors.test.mjsindex fbb9c840f..b77a8de19 100644--- a/apps/host/tests/plain-errors.test.mjs+++ b/apps/host/tests/plain-errors.test.mjs@@ -9,9 +9,16 @@ const built = await build({ stdin: { contents: "export * from './src/lib/plain-econst { plainFailure, plainFailureText, setTranslationLanguage } = await import(`data:text/javascript;base64,${Buffer.from(built.outputFiles[0].text).toString('base64')}`);const cases = [- ['server_exited', 'memory', /ran low on memory/],+ ['server_exited', 'start-failed', /model stopped while starting\./],+ ['server_exited (exit code 0xC0000135)', 'dll-missing', /program files is missing/],+ ['server_exited (exit code 0xC000007B)', 'dll-bad', /does not fit this computer or is damaged/],+ ['server_exited (exit code 0xC0000005)', 'crash', /crashed while starting/],+ ['server_exited (exit code 0xC000001D)', 'cpu-unsupported', /newer processor feature/],+ ['spawn C:/x/strata.exe ENOENT', 'file-missing', /could not find a file/],+ ['server_exited (exit code 0xC0000022)', 'blocked', /security software stopped/],['server_exited: memory guard: 5.1 GiB of RAM free is under the 6 GiB limit', 'memory', /ran low on memory/],- ['Engine stopped (exit 3). Open diagnostics or reload.', 'memory', /ran low on memory/],+ ['server_exited (exit code 137): Killed', 'memory', /ran low on memory/],+ ['Engine stopped (exit 3). Open diagnostics or reload.', 'start-failed', /model stopped while starting\./],['Loading took more than five minutes. Check the engine log and free memory.', 'slow-load', /taking too long/],['No engine for this PC was found in C:/x/components: the component folder holds no engine package. The app never downloads an engine while it starts or serves.', 'engine-missing', /engine for this computer isn’t installed yet/],['cannot reach huggingface.co (<urlopen error [Errno 11001] getaddrinfo failed>)', 'network', /couldn’t reach the internet/],@@ -30,7 +37,7 @@ for (const [raw, kind, message] of cases) {assert.match(f.message, message);assert.ok(f.next, 'a next step');assert.equal(f.detail, raw.trim(), 'the original text stays for Details');- assert.doesNotMatch(f.message, /server_exited|exit \d|component-missing|Traceback/);+ assert.doesNotMatch(f.message, /server_exited|exit \d|component-missing|Traceback|0x[0-9A-F]{8}/);});}@@ -53,5 +60,7 @@ test('every plain message and next step is translated in all eight languages', (}setTranslationLanguage('de');assert.notEqual(plainFailureText('server_exited').message, plainFailure('server_exited').message);+ // a missing DLL is never described as low memory+ assert.doesNotMatch(plainFailure('server_exited (exit code 0xC0000135)').message + plainFailure('server_exited (exit code 0xC0000135)').next, /memory|Leave 20/i);setTranslationLanguage('en');});diff --git a/strata_control/runtime.py b/strata_control/runtime.pyindex a5837537a..c88a94551 100644--- a/strata_control/runtime.py+++ b/strata_control/runtime.py@@ -823,7 +823,9 @@ class Host:return {**base, "ok": False, "state": "failed", "error": self.last_error, "exit_code": 6}return {**base, "state": "stopped"}if child.poll() is not None:- return {**base, "ok": False, "state": "failed", "exit_code": child.returncode,+ # engine_exit_code: how the engine process ended (Windows: 0xC0000135 = a DLL was not found); `exit_code` is+ # Control's own and the start command overwrites it with 6, so the engine's code travels under its own name.+ return {**base, "ok": False, "state": "failed", "exit_code": child.returncode, "engine_exit_code": child.returncode,"error": self.last_error or "server_exited", "log_tail": self._log_tail()}if self.ready_path is not None:try: