[GH-ISSUE #5412] [Other] strata update test start runs on the system interpreter: ModuleNotFoundError: No module named 'jinja2', and the log it tells us to attach was never written #3235

Open
opened 2026-11-07 14:39:03 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @werewolfvit on GitHub (Nov 6, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5412

  • Area: [Other] (anything else, including setup and installation)
  • Desktop app, Terminal or source: Source (START-HERE.bat, setup.sh or a build)
  • Strata version: Strata 0.2.11 · engine 0.1.55 → 0.1.57 · source checkout at commit 9f7d977d220e9fdf2ec53cf2620cdadac1cfb24e
  • Graphics card, memory and system: Radeon RX 7900 XTX 24 GB · 63 GB RAM · Windows 11 Pro (10.0.26300), AMD driver 32.0.31041.5005
  • Model, size and settings: Qwen3.8-Flash-Next Gyro-M TQ2_0 (run config strata-gyro-gyro-m.json), 131072 context, pictures on
  • Reproduction status: Reproduced locally

What happened

A Windows source checkout whose dependencies are installed in E:\Strata\.venv, but not in the global python
on PATH. I ran the update with the global interpreter:

PS E:\Strata> python .\strata.py update --force
Strata update (https://github.com/Niko1221/Strata/releases/latest/download/strata-feed.json)
  Reading the signed update feed
  downloading engine 0.1.57 windows-x86_64-hip-rdna3: 100%  (282 of 282 MB)
  Unpacking 0.1.57 windows-x86_64-hip-rdna3
  Checking the package signature and every file
  Test-starting engine 0.1.57 windows-x86_64-hip-rdna3 before switching to it
Feed sequence 121, signed by 5d1bc23abbeffd0d
Engine  0.1.55   NOT changed: The new engine 0.1.57 did not start correctly on this computer, so it was not
installed. Your current engine is unchanged. The engine reported a problem while it started. Run
`strata update --force` to try again; if it fails again, report it with the log.
Dsv41   no DeepSeek engine installed
Control 0.1.57   up to date

Three things are wrong here, and only the first is mine:

1. update does not check the interpreter's packages, and blames the engine. The engine binary is fine —
the failure is in Strata's own Python code, before the engine is launched. The test start goes
updater.default_test_start → runtime.start → runtime._launch, which spawns
[sys.executable, "-m", "serve.server", ...] (strata_control/runtime.py:984); strata_cli/cli.py:785
_launch_plan does from serve.server import ...; serve/server.py:63 imports serve.frontend;
serve/frontend.py:28 is import jinja2. With the global interpreter:

  File "E:\Strata\serve\server.py", line 63, in <module>
    from serve.frontend import (THINK_END, ChatTemplate, Event, OutputParser, ...)
  File "E:\Strata\serve\frontend.py", line 28, in <module>
    import jinja2
ModuleNotFoundError: No module named 'jinja2'

strata.py::_preflight guards SERVER_PACKAGES = ("jinja2", "yaml", "regex", "psutil", "requests", "numpy", "PIL")
only for command in ("serve", "bench") (strata.py:14-31), so update gets no typed error, and the
except Exception in default_test_start turns this into
TestStartFailed("0.1.57", "ModuleNotFoundError: No module named 'jinja2'"). TestStartFailed.plain then falls
into its generic branch and says "The engine reported a problem while it started" — pointing at a broken engine
on this PC, and at strata update --force, which fails identically. The state file keeps the real reason, but
nothing shows it:

// E:\Strata\engine-feed\.updates\state.json (before the retry)
"engine": { "active": "0.1.55-windows-x86_64-hip-rdna3",
            "failed": { "0.1.57": { "reason": "ModuleNotFoundError: No module named 'jinja2'" } } }

Six attempts in a row failed this way, each one saying the new engine was the problem.

2. The log the message tells me to attach does not exist. The engine log is written by the engine process,
which never started here, so _keep_log had nothing to save and _keep_records kept only the run config. What
is really in .updates/logs:

E:\Strata\engine-feed\.updates\state.json                                2518 B
E:\Strata\engine-feed\.updates\logs\test-start-0.1.55.log                6113 B
E:\Strata\engine-feed\.updates\logs\test-start-0.1.57-failed\run.json    1883 B   <- the only artifact of the failure

No test-start-0.1.57.log, no engine.log, no runtime records; the sandbox
(E:\Strata\engine-feed\.s\20d4\t-lwo453eu\) is deleted right after (#3654). So "report it with the log" asks
for a file that was never written, and the file that does exist holds the run config but not the traceback — the
interpreter and the traceback are exactly the part worth reporting.

3. Nothing says which interpreter ran the update. python .\strata.py update and
.venv\Scripts\python.exe .\strata.py update behave completely differently, and the summary line
("Engine 0.1.55 NOT changed") names neither. With the venv interpreter the same update installs 0.1.57 on the
first try.

Smallest steps or command that reproduce it

# a source checkout whose dependencies live in .venv only
cd E:\Strata
python -m pip uninstall jinja2            # or a bare global interpreter that never had them
python .\strata.py update --force         # test start fails: ModuleNotFoundError: No module named 'jinja2'
Get-ChildItem engine-feed\.updates\logs -Recurse   # no test-start-0.1.57.log, only the failed run.json
.venv\Scripts\python.exe .\strata.py update --force  # installs 0.1.57 and writes test-start-0.1.57.log

Logs

Failed attempt — .updates/logs/test-start-0.1.57-failed/run.json (abridged; _scrub already removed the keys):

{ "exe": "component:strata-engine", "cwd": "E:\\Strata", "backend": "hip", "host": "127.0.0.1", "port": 65202,
  "model_name": "qwen3.8-flash-next-gyro-gyro-m", "gpu": 0,
  "log": "E:\\Strata\\engine-feed\\.s\\20d4\\t-lwo453eu\\engine.log",
  "args": ["--pack", "E:\\Strata-data\\packs\\gyro-gyro-m", "--native", "...\\Qwen3.8-Flash-Next-Gyro-M-TQ2_0.gguf", "..."] }

Successful retry with the venv interpreter — .updates/logs/test-start-0.1.57.log (7244 B), the same engine and
card starting and answering the one-token probe:

load ... 131072 context, int8 KV ... 1 generated in 24 ms ... server ready

strata --version (venv): strata 0.2.11 (build 0.1.57; python 3.13.13 at E:\Strata\.venv\Scripts\python.exe)

What I expected

  • update to hit _preflight the way serve does — "the interpreter is missing packages the API server
    needs"
    — or default_test_start to put the interpreter into the reason, e.g.
    ModuleNotFoundError: No module named 'jinja2' from <sys.executable>, so the plain sentence cannot read as an
    engine defect.
  • When the failure happens before the process starts, the hint to point at something that exists (the reason line
    from state.json, the traceback, the interpreter) instead of a log file that was never created.
Originally created by @werewolfvit on GitHub (Nov 6, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5412 - **Area:** `[Other]` (anything else, including setup and installation) - **Desktop app, Terminal or source:** Source (START-HERE.bat, setup.sh or a build) - **Strata version:** Strata 0.2.11 · engine 0.1.55 → 0.1.57 · source checkout at commit `9f7d977d220e9fdf2ec53cf2620cdadac1cfb24e` - **Graphics card, memory and system:** Radeon RX 7900 XTX 24 GB · 63 GB RAM · Windows 11 Pro (10.0.26300), AMD driver 32.0.31041.5005 - **Model, size and settings:** Qwen3.8-Flash-Next Gyro-M TQ2_0 (run config `strata-gyro-gyro-m.json`), 131072 context, pictures on - **Reproduction status:** Reproduced locally ## What happened A Windows source checkout whose dependencies are installed in `E:\Strata\.venv`, but not in the global `python` on `PATH`. I ran the update with the global interpreter: ``` PS E:\Strata> python .\strata.py update --force Strata update (https://github.com/Niko1221/Strata/releases/latest/download/strata-feed.json) Reading the signed update feed downloading engine 0.1.57 windows-x86_64-hip-rdna3: 100% (282 of 282 MB) Unpacking 0.1.57 windows-x86_64-hip-rdna3 Checking the package signature and every file Test-starting engine 0.1.57 windows-x86_64-hip-rdna3 before switching to it Feed sequence 121, signed by 5d1bc23abbeffd0d Engine 0.1.55 NOT changed: The new engine 0.1.57 did not start correctly on this computer, so it was not installed. Your current engine is unchanged. The engine reported a problem while it started. Run `strata update --force` to try again; if it fails again, report it with the log. Dsv41 no DeepSeek engine installed Control 0.1.57 up to date ``` Three things are wrong here, and only the first is mine: **1. `update` does not check the interpreter's packages, and blames the engine.** The engine binary is fine — the failure is in Strata's own Python code, before the engine is launched. The test start goes `updater.default_test_start` → `runtime.start` → `runtime._launch`, which spawns `[sys.executable, "-m", "serve.server", ...]` (`strata_control/runtime.py:984`); `strata_cli/cli.py:785` `_launch_plan` does `from serve.server import ...`; `serve/server.py:63` imports `serve.frontend`; `serve/frontend.py:28` is `import jinja2`. With the global interpreter: ``` File "E:\Strata\serve\server.py", line 63, in <module> from serve.frontend import (THINK_END, ChatTemplate, Event, OutputParser, ...) File "E:\Strata\serve\frontend.py", line 28, in <module> import jinja2 ModuleNotFoundError: No module named 'jinja2' ``` `strata.py::_preflight` guards `SERVER_PACKAGES = ("jinja2", "yaml", "regex", "psutil", "requests", "numpy", "PIL")` only for `command in ("serve", "bench")` (`strata.py:14-31`), so `update` gets no typed error, and the `except Exception` in `default_test_start` turns this into `TestStartFailed("0.1.57", "ModuleNotFoundError: No module named 'jinja2'")`. `TestStartFailed.plain` then falls into its generic branch and says *"The engine reported a problem while it started"* — pointing at a broken engine on this PC, and at `strata update --force`, which fails identically. The state file keeps the real reason, but nothing shows it: ```json // E:\Strata\engine-feed\.updates\state.json (before the retry) "engine": { "active": "0.1.55-windows-x86_64-hip-rdna3", "failed": { "0.1.57": { "reason": "ModuleNotFoundError: No module named 'jinja2'" } } } ``` Six attempts in a row failed this way, each one saying the new engine was the problem. **2. The log the message tells me to attach does not exist.** The engine log is written by the engine process, which never started here, so `_keep_log` had nothing to save and `_keep_records` kept only the run config. What is really in `.updates/logs`: ``` E:\Strata\engine-feed\.updates\state.json 2518 B E:\Strata\engine-feed\.updates\logs\test-start-0.1.55.log 6113 B E:\Strata\engine-feed\.updates\logs\test-start-0.1.57-failed\run.json 1883 B <- the only artifact of the failure ``` No `test-start-0.1.57.log`, no `engine.log`, no runtime records; the sandbox (`E:\Strata\engine-feed\.s\20d4\t-lwo453eu\`) is deleted right after (#3654). So *"report it with the log"* asks for a file that was never written, and the file that does exist holds the run config but not the traceback — the interpreter and the traceback are exactly the part worth reporting. **3. Nothing says which interpreter ran the update.** `python .\strata.py update` and `.venv\Scripts\python.exe .\strata.py update` behave completely differently, and the summary line ("Engine 0.1.55 NOT changed") names neither. With the venv interpreter the same update installs 0.1.57 on the first try. ## Smallest steps or command that reproduce it ```powershell # a source checkout whose dependencies live in .venv only cd E:\Strata python -m pip uninstall jinja2 # or a bare global interpreter that never had them python .\strata.py update --force # test start fails: ModuleNotFoundError: No module named 'jinja2' Get-ChildItem engine-feed\.updates\logs -Recurse # no test-start-0.1.57.log, only the failed run.json .venv\Scripts\python.exe .\strata.py update --force # installs 0.1.57 and writes test-start-0.1.57.log ``` ## Logs Failed attempt — `.updates/logs/test-start-0.1.57-failed/run.json` (abridged; `_scrub` already removed the keys): ```json { "exe": "component:strata-engine", "cwd": "E:\\Strata", "backend": "hip", "host": "127.0.0.1", "port": 65202, "model_name": "qwen3.8-flash-next-gyro-gyro-m", "gpu": 0, "log": "E:\\Strata\\engine-feed\\.s\\20d4\\t-lwo453eu\\engine.log", "args": ["--pack", "E:\\Strata-data\\packs\\gyro-gyro-m", "--native", "...\\Qwen3.8-Flash-Next-Gyro-M-TQ2_0.gguf", "..."] } ``` Successful retry with the venv interpreter — `.updates/logs/test-start-0.1.57.log` (7244 B), the same engine and card starting and answering the one-token probe: ``` load ... 131072 context, int8 KV ... 1 generated in 24 ms ... server ready ``` `strata --version` (venv): `strata 0.2.11 (build 0.1.57; python 3.13.13 at E:\Strata\.venv\Scripts\python.exe)` ## What I expected - `update` to hit `_preflight` the way `serve` does — *"the interpreter <path> is missing packages the API server needs"* — or `default_test_start` to put the interpreter into the reason, e.g. `ModuleNotFoundError: No module named 'jinja2' from <sys.executable>`, so the plain sentence cannot read as an engine defect. - When the failure happens before the process starts, the hint to point at something that exists (the reason line from `state.json`, the traceback, the interpreter) instead of a log file that was never created.
Author
Owner

@github-actions[bot] commented on GitHub (Nov 6, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Fill in "Area".
  • Fill in "Desktop app, Terminal or source?".
  • Fill in "Reproduction status".
  • Fill in "Strata version".
  • Fill in "Graphics card, memory and system".

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6689496562 --> @github-actions[bot] commented on GitHub (Nov 6, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Fill in "Area". - [ ] Fill in "Desktop app, Terminal or source?". - [ ] Fill in "Reproduction status". - [ ] Fill in "Strata version". - [ ] Fill in "Graphics card, memory and system". Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
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#3235
No description provided.