[PR #5492] [CLOSED] [TUI] update: a saved run config naming a deleted Control folder blocked every later engine update #5466

Closed
opened 2026-11-07 21:43:28 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/5492
Author: @bgD91
Created: 11/7/2026
Status: ❌ Closed

Base: main ← Head: fix/update-test-start-control-paths


📝 Commits (1)

  • 93f0a5f The update's test start follows the saved model's Control paths before staging: a config naming the Control version folder that a previous update deleted failed every later engine update (#4891). Test: an engine update after such a deletion installs and selects the new engine again.

📊 Changes

2 files changed (+30 additions, -2 deletions)

View changed files

📝 strata_control/updater.py (+6 -2)
📝 tests/terminal/test_updater.py (+24 -0)

📄 Description

Problem and result

Strata has been stuck on engine 0.1.57 after the last update. Every strata update ends with:

The new engine 0.1.58 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.

I tried five times, with and without --force. The kept log (%LOCALAPPDATA%\Strata\components\.updates\logs\test-start-0.1.58.log) has the reason: the saved run config of one of my models points into a Control version folder that an earlier update deleted, and the test start rejects that config:

... was removed by an update (components\control\0.1.55\data\expert-profile-coder.bin); run setup again

The model itself starts and answers fine, so the setup looks healthy and only the update refuses. After five attempts state.json records 0.1.58 as failed, so even a plain strata update refuses until --force.

How to reach the same state: set up a model while Control 0.1.55 is current, let a Control update delete control/0.1.55, then run strata update. From then on every engine version fails the same way, whatever the model or the backend.

Before: the update fails at the test start and records the version as failed. After: the test start runs the staged engine with the current Control's files and the engine installs and switches.

none: a bug fix in code that #4891 (d0d31a41) added, with no default, feature or refactor to agree. Searching the issues for "removed by an update" and for "test start" returns nothing.

Approach

default_test_start resolves the run config once, in memory, before it is copied into the sandbox: cfg_paths.resolve_config(cfg) right after the read, before exe is rewritten to component:strata-engine. The saved config on disk is never written. Engine paths still land on the staged engine: resolve_config turns them relative and runtime.start re-points them inside the sandbox, as it already does today.

Why it breaks: #4891 taught a start to follow an update, and that works outside the updater. The updater's test start runs with STRATA_COMPONENTS_DIR pointed at the staging folder (.s/<hex>/, which holds only engine/<new>), so cfg_paths.resolve_path has no Control folder to point the stale path at, runtime.start raises, and nothing is switched. Before #4891 those paths were never checked, which is why this machine installed 0.1.55 and 0.1.56 with configs naming control\0.1.50, a folder deleted in October.

The wider alternative is a Control fallback in cfg_paths.resolve_path, mirroring _dsv41_path (cfg_paths.py:102-116), which already maps a retired DeepSeek version folder to the active one: any consumer that resolves a saved config with STRATA_COMPONENTS_DIR moved elsewhere has the same blind spot. I kept the change on the updater side because it leaves the default start path byte identical, and the staging folder is the only place with no Control folder.

Validation

Revision 93f0a5fc on main 146df3c4, one Windows 11 build 26300 desktop, CUDA 13 backend.

Passed:

  • .venv/Scripts/python.exe -m unittest tests.terminal.test_updater tests.terminal.test_cfg_paths at 93f0a5fc: Ran 63 tests, OK (2 skipped).
  • The new RemovedControlVersion case at 93f0a5fc: the update reports status updated, test start mode full, and the new engine selected. It builds a components folder with control/0.1.57 in active.json and a run config naming control/0.1.55/data/expert-profile-coder.bin, then calls updater.run_update(ctx, control=False).
  • Recovery on the reporting machine, whose installed Control 0.1.58 does not contain this patch: strata_control.cfg_paths.repair([...]) over the 10 saved run configs, then strata update --force --stop-model --start-again. Result: state.json shows engine.active = 0.1.58-windows-x86_64-cuda-cuda13, engine.failed = {}, previous = 0.1.57-.... That run shows the workaround, not this fix.

Failed:

  • The same new test at 146df3c4, without this change, same command: AssertionError: Tuples differ: (6, 'failed') != (0, 'updated'), with the engine result error: 'The new engine 0.1.46 did not start correctly on this computer, so it was not installed. Your current engine is unchanged. ...' and exit_code: 6.
  • On the machine, 5 attempts at 0.1.58 failed that way before the configs were repaired (engine.failed in state.json, and the kept test-start-0.1.58.log named the deleted Control path).

Not run:

  • An update with control: true, which is the step that deletes the older Control folder, on real hardware. The test covers an engine-only update, which is the state that folder deletion leaves behind.
  • The desktop app's own update path. It drives the same updater, that is inference from reading the code, not observation.
  • No C++, CUDA, HIP, SYCL or Metal file is touched, so no backend build was run and none is needed.

Limits

One machine and one model shape: a coder pack whose profile file (--control-vector-scaled) sits inside the Control version folder. The change points such a path at the active Control, which is what a normal start does; the deleted Control's data is gone either way. A saved config that is never started and never test started keeps its stale path, so a machine that is already blocked still needs one of: start the model once, or strata_control.cfg_paths.repair([...]) over the configs and then strata update --force.


🔄 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/5492 **Author:** [@bgD91](https://github.com/bgD91) **Created:** 11/7/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/update-test-start-control-paths` --- ### 📝 Commits (1) - [`93f0a5f`](https://github.com/Niko1221/Strata/commit/93f0a5fc506c77e506d78c6862c0f9f53c570175) The update's test start follows the saved model's Control paths before staging: a config naming the Control version folder that a previous update deleted failed every later engine update (#4891). Test: an engine update after such a deletion installs and selects the new engine again. ### 📊 Changes **2 files changed** (+30 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `strata_control/updater.py` (+6 -2) 📝 `tests/terminal/test_updater.py` (+24 -0) </details> ### 📄 Description ## Problem and result Strata has been stuck on engine 0.1.57 after the last update. Every `strata update` ends with: > The new engine 0.1.58 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. I tried five times, with and without `--force`. The kept log (`%LOCALAPPDATA%\Strata\components\.updates\logs\test-start-0.1.58.log`) has the reason: the saved run config of one of my models points into a Control version folder that an earlier update deleted, and the test start rejects that config: > ... was removed by an update (components\control\0.1.55\data\expert-profile-coder.bin); run setup again The model itself starts and answers fine, so the setup looks healthy and only the update refuses. After five attempts `state.json` records 0.1.58 as failed, so even a plain `strata update` refuses until `--force`. How to reach the same state: set up a model while Control 0.1.55 is current, let a Control update delete `control/0.1.55`, then run `strata update`. From then on every engine version fails the same way, whatever the model or the backend. Before: the update fails at the test start and records the version as failed. After: the test start runs the staged engine with the current Control's files and the engine installs and switches. ## Related discussion none: a bug fix in code that #4891 (d0d31a41) added, with no default, feature or refactor to agree. Searching the issues for "removed by an update" and for "test start" returns nothing. ## Approach `default_test_start` resolves the run config once, in memory, before it is copied into the sandbox: `cfg_paths.resolve_config(cfg)` right after the read, before `exe` is rewritten to `component:strata-engine`. The saved config on disk is never written. Engine paths still land on the staged engine: `resolve_config` turns them relative and `runtime.start` re-points them inside the sandbox, as it already does today. Why it breaks: #4891 taught a start to follow an update, and that works outside the updater. The updater's test start runs with `STRATA_COMPONENTS_DIR` pointed at the staging folder (`.s/<hex>/`, which holds only `engine/<new>`), so `cfg_paths.resolve_path` has no Control folder to point the stale path at, `runtime.start` raises, and nothing is switched. Before #4891 those paths were never checked, which is why this machine installed 0.1.55 and 0.1.56 with configs naming `control\0.1.50`, a folder deleted in October. The wider alternative is a Control fallback in `cfg_paths.resolve_path`, mirroring `_dsv41_path` (cfg_paths.py:102-116), which already maps a retired DeepSeek version folder to the active one: any consumer that resolves a saved config with `STRATA_COMPONENTS_DIR` moved elsewhere has the same blind spot. I kept the change on the updater side because it leaves the default start path byte identical, and the staging folder is the only place with no Control folder. ## Validation Revision 93f0a5fc on main 146df3c4, one Windows 11 build 26300 desktop, CUDA 13 backend. **Passed:** - `.venv/Scripts/python.exe -m unittest tests.terminal.test_updater tests.terminal.test_cfg_paths` at 93f0a5fc: Ran 63 tests, OK (2 skipped). - The new `RemovedControlVersion` case at 93f0a5fc: the update reports status `updated`, test start mode `full`, and the new engine selected. It builds a components folder with `control/0.1.57` in `active.json` and a run config naming `control/0.1.55/data/expert-profile-coder.bin`, then calls `updater.run_update(ctx, control=False)`. - Recovery on the reporting machine, whose installed Control 0.1.58 does not contain this patch: `strata_control.cfg_paths.repair([...])` over the 10 saved run configs, then `strata update --force --stop-model --start-again`. Result: `state.json` shows `engine.active` = `0.1.58-windows-x86_64-cuda-cuda13`, `engine.failed` = `{}`, `previous` = `0.1.57-...`. That run shows the workaround, not this fix. **Failed:** - The same new test at 146df3c4, without this change, same command: `AssertionError: Tuples differ: (6, 'failed') != (0, 'updated')`, with the engine result `error: 'The new engine 0.1.46 did not start correctly on this computer, so it was not installed. Your current engine is unchanged. ...'` and `exit_code: 6`. - On the machine, 5 attempts at 0.1.58 failed that way before the configs were repaired (`engine.failed` in `state.json`, and the kept `test-start-0.1.58.log` named the deleted Control path). **Not run:** - An update with `control: true`, which is the step that deletes the older Control folder, on real hardware. The test covers an engine-only update, which is the state that folder deletion leaves behind. - The desktop app's own update path. It drives the same updater, that is inference from reading the code, not observation. - No C++, CUDA, HIP, SYCL or Metal file is touched, so no backend build was run and none is needed. ## Limits One machine and one model shape: a coder pack whose profile file (`--control-vector-scaled`) sits inside the Control version folder. The change points such a path at the active Control, which is what a normal start does; the deleted Control's data is gone either way. A saved config that is never started and never test started keeps its stale path, so a machine that is already blocked still needs one of: start the model once, or `strata_control.cfg_paths.repair([...])` over the configs and then `strata update --force`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 21:43:28 +07:00
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#5466
No description provided.