mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #5492] [CLOSED] [TUI] update: a saved run config naming a deleted Control folder blocked every later engine update #5466
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#5466
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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)
93f0a5fThe 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 updateends with: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:The model itself starts and answers fine, so the setup looks healthy and only the update refuses. After five attempts
state.jsonrecords 0.1.58 as failed, so even a plainstrata updaterefuses 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 runstrata 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_startresolves the run config once, in memory, before it is copied into the sandbox:cfg_paths.resolve_config(cfg)right after the read, beforeexeis rewritten tocomponent:strata-engine. The saved config on disk is never written. Engine paths still land on the staged engine:resolve_configturns them relative andruntime.startre-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_DIRpointed at the staging folder (.s/<hex>/, which holds onlyengine/<new>), socfg_paths.resolve_pathhas no Control folder to point the stale path at,runtime.startraises, 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 namingcontrol\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 withSTRATA_COMPONENTS_DIRmoved 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
93f0a5fcon main146df3c4, one Windows 11 build 26300 desktop, CUDA 13 backend.Passed:
.venv/Scripts/python.exe -m unittest tests.terminal.test_updater tests.terminal.test_cfg_pathsat93f0a5fc: Ran 63 tests, OK (2 skipped).RemovedControlVersioncase at93f0a5fc: the update reports statusupdated, test start modefull, and the new engine selected. It builds a components folder withcontrol/0.1.57inactive.jsonand a run config namingcontrol/0.1.55/data/expert-profile-coder.bin, then callsupdater.run_update(ctx, control=False).strata_control.cfg_paths.repair([...])over the 10 saved run configs, thenstrata update --force --stop-model --start-again. Result:state.jsonshowsengine.active=0.1.58-windows-x86_64-cuda-cuda13,engine.failed={},previous=0.1.57-.... That run shows the workaround, not this fix.Failed:
146df3c4, without this change, same command:AssertionError: Tuples differ: (6, 'failed') != (0, 'updated'), with the engine resulterror: 'The new engine 0.1.46 did not start correctly on this computer, so it was not installed. Your current engine is unchanged. ...'andexit_code: 6.engine.failedinstate.json, and the kepttest-start-0.1.58.lognamed the deleted Control path).Not run:
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.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, orstrata_control.cfg_paths.repair([...])over the configs and thenstrata update --force.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.