fix(app): Windows stop check, size-based download progress, APPDATA in the data folder

Found running the app's admin commands on the game PC (Windows, RTX 5070
Ti): the full install, Strata started by the app downloading the 22.9 GB
model, the worker and Discord up, five spoken questions all answered.

- Windows refuses a connection to a closed local port only after about
  2 s, so the 2 s request timeout made every stop "not confirmed". The
  check now waits up to 10 s to connect and still counts only a refusal
  (not a timeout) as stopped.
- Strata 0.1.59 reports the model download as "X of Y GB"; percent()
  reads that, and the dashboard shows the current line's progress only
  (it had stayed on the engine download's 80 %).
- Strata and the NVIDIA shader cache write under %APPDATA% whatever
  STRATA_* says: the layout sets APPDATA inside the data folder on
  Windows, next to LOCALAPPDATA.

Roadmap: M5 step 5 done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-12 18:51:12 +09:00
parent ac8c30022d
commit 76144fb19b
4 changed files with 55 additions and 17 deletions

View File

@@ -130,8 +130,9 @@ reaches the screen.
- `system`: memory in use and total, and per NVIDIA GPU its use and VRAM (from `nvidia-smi`,
missing when there is none); sampled when the snapshot is taken, at most once a second.
- `llm`: the LLM's state (`off`, `starting`, `ready`, `failed`), whether the app runs it
(`managed`), and while starting Strata's last line and last percentage (the model download),
also before the services are up; a failure's reason in `note`.
(`managed`), and while starting Strata's last line and how far that line says it got (its
percentage, or `X of Y GB` for the model download; none on a line without progress), also before
the services are up; a failure's reason in `note`.
- `performance`: the performance stage (normal, gaming, paused, and why) comes with game
detection in M7; until then `null`.
@@ -162,8 +163,9 @@ The LLM itself (Qwen3.6-35B-A3B, about 23 GB) is downloaded by Strata on its fir
also while a server sends nothing (a download's part file stays, so the next try continues it).
- Folders go to commands as arguments or as the working folder, never inside a script's text.
- Every command runs with the layout's environment: `uv`'s cache and Pythons, `HF_HOME`
(`models/hf`), `NLTK_DATA` (`models/nltk`), temp files (`cache/tmp`) and Strata's folders, all
inside the data folder. Python comes from `uv` only. Output lines go to the `install` log tab.
(`models/hf`), `NLTK_DATA` (`models/nltk`), temp files (`cache/tmp`) and Strata's folders (on
Windows also `APPDATA` and `LOCALAPPDATA`, where Strata and the NVIDIA shader cache write
whatever `STRATA_*` says), all inside the data folder. Python comes from `uv` only. Output lines go to the `install` log tab.
- Downloads go to `<file>.part`, continue with an HTTP range after a break (a server without ranges
starts over), and are checked against the pinned SHA-256; a wrong checksum deletes the part.
- When every step is done, `uv`'s download cache is cleaned (the venvs hold copies).
@@ -188,7 +190,8 @@ start it first, so nothing answers before the brain can, and stop it last.
behind voice answers. Pictures are off until something in v2 sends one. Stopping the services
runs `strata launch --stop` (ended after 2 minutes, with everything it started) and then checks
that the port refuses connections; so does a failed or cancelled start, so nothing half-started
keeps graphics memory. Stopped means the port refuses connections (a stop command that fails
keeps graphics memory (each check waits up to 10 s to connect: Windows refuses a closed local
port only after about 2 s). Stopped means the port refuses connections (a stop command that fails
while it does counts as stopped); a timeout, an error status (a server still loading answers
503) or an answer that cannot be read is not a confirmed stop: the LLM is `failed` with the
reason, and the stop or the start reports it. The start's cancel is armed when the controller