[PR #4293] [GUI] Wait longer for desktop model load and adopt engines after startup_wait_expired #4987

Open
opened 2026-11-07 16:31:49 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/4293
Author: @JasperGuWP
Created: 10/27/2026
Status: 🔄 Open

Base: main ← Head: fix/desktop-startup-wait-timeout


📝 Commits (1)

  • d6a06fa [GUI] Keep watching /health when Control's start wait runs out

📊 Changes

2 files changed (+32 additions, -4 deletions)

View changed files

📝 apps/host/server/native-control.mjs (+16 -4)
📝 apps/host/tests/packaged-control.test.mjs (+16 -0)

📄 Description

## Problem and result

On Windows (RTX 3090 24 GB + 128 GB RAM) loading Qwen3.8-Flash-Next IQ3_S from the packaged desktop app, Control returned startup_wait_expired while the engine was still pinning ~47 GiB of experts into RAM (~7–8 minutes at ~0.11 GiB/s).

Before: the desktop UI marked the instance failed and chat in the app failed, while the engine kept running and became ready on http://127.0.0.1:<port>/ — so the engine's web page could chat and the app could not.

After this change: a Control whose wait runs out no longer fails the load. The engine is left loading and the host keeps watching /health for as long as the start asked Control to wait, so a late-ready engine is adopted instead of thrown away.

none

Approach

  • On startup_wait_expired (exit 8), keep the engine and continue /health polling instead of stopping it and marking the model failed. The check runs before the reasons that mark a load failed, the GPU-in-use sentence included. Other failures are unchanged.
  • The /health deadline follows the wait the start actually asked for, not a fixed five minutes, so the two cannot disagree. A late load is no longer cut short by a shorter deadline in the app.
  • The second-try path reads the same answer: a wait that ran out is not a reason to try again (the engine is still loading, not crashed).
  • The start wait itself is not part of this change. startWaitFor (0.2.9, #3459 #4191) sizes it by the model and asks for the ceiling the installed Control really takes, which is what the fixed 600 s in the first version of this branch stood in for. Rebased onto 0.2.10, that part is dropped rather than duplicated.
  • control-runtime's start default stays at 300 s (also dropped after the rebase: the sizes in #3459 make callers pass an explicit wait).

No default model choice, API shape, or engine binary change.

Validation

Passed:

  • node --test tests/packaged-control.test.mjs — 32 of 32, including a new test: a packaged start whose Control answers startup_wait_expired once stays on one try, stops nothing, stops nothing twice, and reports the model ready.
  • node --check on the edited file.
  • node scripts/test.mjs — 1331 of 1457 pass. The two failures (ui-do.test.mjs) are on main too: they compare store.ts read with CRLF against a \n assertion, and this checkout has CRLF line endings.

Failed:
none

Not run:

  • A full desktop reload of IQ3_S against this exact commit (a ~10 min load on that machine).
  • CUDA/HIP/SYCL/Metal rebuilds (host JS only; no engine sources touched).

Limits

  • Only startup_wait_expired keeps waiting on /health. A genuine engine crash or a real start failure stays an error.
  • Loading still ends at the wait the Control takes (up to 1800 s depending on the installed Control). A model that needs longer than that needs a smaller quant, not a longer wait.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/4293 **Author:** [@JasperGuWP](https://github.com/JasperGuWP) **Created:** 10/27/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/desktop-startup-wait-timeout` --- ### 📝 Commits (1) - [`d6a06fa`](https://github.com/Niko1221/Strata/commit/d6a06fa6b055a9b579e0c9539ef45531ce08f6b9) [GUI] Keep watching /health when Control's start wait runs out ### 📊 Changes **2 files changed** (+32 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `apps/host/server/native-control.mjs` (+16 -4) 📝 `apps/host/tests/packaged-control.test.mjs` (+16 -0) </details> ### 📄 Description ## Problem and result On Windows (RTX 3090 24 GB + 128 GB RAM) loading Qwen3.8-Flash-Next IQ3_S from the packaged desktop app, Control returned `startup_wait_expired` while the engine was still pinning ~47 GiB of experts into RAM (~7–8 minutes at ~0.11 GiB/s). **Before:** the desktop UI marked the instance failed and chat in the app failed, while the engine kept running and became ready on `http://127.0.0.1:<port>/` — so the engine's web page could chat and the app could not. **After this change:** a Control whose wait runs out no longer fails the load. The engine is left loading and the host keeps watching `/health` for as long as the start asked Control to wait, so a late-ready engine is adopted instead of thrown away. ## Related discussion none ## Approach - On `startup_wait_expired` (exit 8), keep the engine and continue `/health` polling instead of stopping it and marking the model failed. The check runs before the reasons that mark a load failed, the GPU-in-use sentence included. Other failures are unchanged. - The `/health` deadline follows the wait the start actually asked for, not a fixed five minutes, so the two cannot disagree. A late load is no longer cut short by a shorter deadline in the app. - The second-try path reads the same answer: a wait that ran out is not a reason to try again (the engine is still loading, not crashed). - The start wait itself is **not** part of this change. `startWaitFor` (0.2.9, #3459 #4191) sizes it by the model and asks for the ceiling the installed Control really takes, which is what the fixed 600 s in the first version of this branch stood in for. Rebased onto 0.2.10, that part is dropped rather than duplicated. - `control-runtime`'s `start` default stays at 300 s (also dropped after the rebase: the sizes in #3459 make callers pass an explicit wait). No default model choice, API shape, or engine binary change. ## Validation **Passed:** - `node --test tests/packaged-control.test.mjs` — 32 of 32, including a new test: a packaged start whose Control answers `startup_wait_expired` once stays on one try, stops nothing, stops nothing twice, and reports the model ready. - `node --check` on the edited file. - `node scripts/test.mjs` — 1331 of 1457 pass. The two failures (`ui-do.test.mjs`) are on `main` too: they compare `store.ts` read with CRLF against a `\n` assertion, and this checkout has CRLF line endings. **Failed:** none **Not run:** - A full desktop reload of IQ3_S against this exact commit (a ~10 min load on that machine). - CUDA/HIP/SYCL/Metal rebuilds (host JS only; no engine sources touched). ## Limits - Only `startup_wait_expired` keeps waiting on `/health`. A genuine engine crash or a real start failure stays an error. - Loading still ends at the wait the Control takes (up to 1800 s depending on the installed Control). A model that needs longer than that needs a smaller quant, not a longer wait. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#4987
No description provided.