[PR #4899] [CLOSED] [Engine] stale run-config component paths follow the component in use (#4891) #5237

Closed
opened 2026-11-07 16:33:42 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/4899
Author: @Amuras-75
Created: 11/1/2026
Status: ❌ Closed

Base: main ← Head: fix/stale-control-paths-4891


📝 Commits (1)

  • 681d286 serve and doctor: a run config's cwd and its control-folder engine arguments follow the component in use, so an update that removes the old folder no longer stops the start (NotADirectoryError, WinError 267) or shows the model as not installed (#4891)

📊 Changes

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

View changed files

📝 serve/server.py (+52 -0)
➕ serve/test_control_paths_follow_control.py (+69 -0)
📝 strata_control/doctor.py (+50 -2)
📝 tests/terminal/test_issues_022.py (+52 -0)

📄 Description

Problem and result

setup.py records absolute paths in the run configs — "cwd", "--expert-profile" and "vision.exe" — into the component folder that was in use when the model was set up. strata update keeps the two newest control and engine folders and removes the rest, so those paths dangle. Before the fix, strata launch died before the engine said anything (Windows: NotADirectoryError, WinError 267, and the launcher showed the vision reader's "no CUDA-capable device is detected" line), and doctor reported every file under the removed folder as missing, which showed the model as not installed. After the fix the run config follows the component in use at load time, and doctor answers a gone path with the same file of the active component; a config keeps working across updates and when copied to another PC.

#4891 (this problem; its comment adds the Windows launch crash) and the reader-side precedent #4658.

Approach

  • serve/server.py: with_current_control_paths() inside with_component_engine() — a cwd or an engine argument (--expert-profile) that points into a control component folder that is not the one in use is answered by the same path of the control in use, printed like the reader's rebases already are.
  • strata_control/doctor.py: _location() answers a component path that is gone with the same file of the control or engine package in use, so strata models list and the Models page keep answering "installed" after the updater pruned the folder.

Limits

A path that still resolves is answered as it is, and a path outside components\control or components\engine is the person's choice and stays untouched. An argument is rebased only when its file exists in the component in use; the doctor rebases only a path that no longer resolves.

Validation

Revision 681d286f (PR head), Python 3.14.4, Linux (WSL2), venv from requirements.txt.

Passed:

  • python -m serve.test_control_paths_follow_control — 5 tests OK (the new load-time rebase)
  • python -m unittest tests.terminal.test_issues_022 — 35 OK, 15 skipped (the new Issue4891StaleComponentPaths; the skips are the Windows-only ACL tests)
  • python -m serve.test_reader_follows_engine — 4 OK (the reader rebase is unchanged)
  • python -m unittest tests.terminal.test_component_start tests.terminal.test_profiles tests.terminal.test_hipblaslt_tuning — all OK (callers of with_component_engine and of doctor.inspect)

Failed: none.

Not run:

  • No C++ build: the change is Python only.
  • The Windows failure was observed on a real PC before the fix (Windows 11, RTX 5080, Control/engine 0.1.55, a run config written for 0.1.47): strata launch died with NotADirectoryError, WinError 267, traceback in runtime\launch-gyro-m-256k.server.log. That PC launches fine again after rebasing the same paths by hand — the same mapping the fix performs at load time (model loaded, ~73 tok/s decode). The submitted code path is validated by the unit tests above, not by running this branch on Windows.

🔄 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/4899 **Author:** [@Amuras-75](https://github.com/Amuras-75) **Created:** 11/1/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/stale-control-paths-4891` --- ### 📝 Commits (1) - [`681d286`](https://github.com/Niko1221/Strata/commit/681d286f5b69a1bc1f6602fda5ec12bd214135b9) serve and doctor: a run config's cwd and its control-folder engine arguments follow the component in use, so an update that removes the old folder no longer stops the start (NotADirectoryError, WinError 267) or shows the model as not installed (#4891) ### 📊 Changes **4 files changed** (+223 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `serve/server.py` (+52 -0) ➕ `serve/test_control_paths_follow_control.py` (+69 -0) 📝 `strata_control/doctor.py` (+50 -2) 📝 `tests/terminal/test_issues_022.py` (+52 -0) </details> ### 📄 Description ### Problem and result setup.py records absolute paths in the run configs — "cwd", "--expert-profile" and "vision.exe" — into the component folder that was in use when the model was set up. `strata update` keeps the two newest control and engine folders and removes the rest, so those paths dangle. Before the fix, `strata launch` died before the engine said anything (Windows: `NotADirectoryError`, WinError 267, and the launcher showed the vision reader's "no CUDA-capable device is detected" line), and doctor reported every file under the removed folder as missing, which showed the model as not installed. After the fix the run config follows the component in use at load time, and doctor answers a gone path with the same file of the active component; a config keeps working across updates and when copied to another PC. ### Related discussion #4891 (this problem; its comment adds the Windows launch crash) and the reader-side precedent #4658. ### Approach - `serve/server.py`: `with_current_control_paths()` inside `with_component_engine()` — a `cwd` or an engine argument (`--expert-profile`) that points into a control component folder that is not the one in use is answered by the same path of the control in use, printed like the reader's rebases already are. - `strata_control/doctor.py`: `_location()` answers a component path that is gone with the same file of the control **or engine** package in use, so `strata models list` and the Models page keep answering "installed" after the updater pruned the folder. ### Limits A path that still resolves is answered as it is, and a path outside `components\control` or `components\engine` is the person's choice and stays untouched. An argument is rebased only when its file exists in the component in use; the doctor rebases only a path that no longer resolves. ### Validation Revision 681d286f (PR head), Python 3.14.4, Linux (WSL2), venv from requirements.txt. Passed: - `python -m serve.test_control_paths_follow_control` — 5 tests OK (the new load-time rebase) - `python -m unittest tests.terminal.test_issues_022` — 35 OK, 15 skipped (the new Issue4891StaleComponentPaths; the skips are the Windows-only ACL tests) - `python -m serve.test_reader_follows_engine` — 4 OK (the reader rebase is unchanged) - `python -m unittest tests.terminal.test_component_start tests.terminal.test_profiles tests.terminal.test_hipblaslt_tuning` — all OK (callers of with_component_engine and of doctor.inspect) Failed: none. Not run: - No C++ build: the change is Python only. - The Windows failure was observed on a real PC before the fix (Windows 11, RTX 5080, Control/engine 0.1.55, a run config written for 0.1.47): `strata launch` died with NotADirectoryError, WinError 267, traceback in runtime\launch-gyro-m-256k.server.log. That PC launches fine again after rebasing the same paths by hand — the same mapping the fix performs at load time (model loaded, ~73 tok/s decode). The submitted code path is validated by the unit tests above, not by running this branch on Windows. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:33:42 +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#5237
No description provided.