mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
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#5177
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/4782
Author: @XiaoBinGan
Created: 10/31/2026
Status: ❌ Closed
Base:
main← Head:fix/vision-reader-follows-update📝 Commits (1)
ecbb1a0Fix #4658: the picture reader follows an engine update when the old folder is still there📊 Changes
2 files changed (+73 additions, -15 deletions)
View changed files
📝
serve/server.py(+30 -15)📝
serve/test_server.py(+43 -0)📄 Description
Problem and result
After
strata updatemoved the engine from 0.1.52 to 0.1.54, the model kept launching the old picture reader,components/engine/0.1.52-.../strata-vision.exe, with no warning (#4658). The run config names the engine as acomponent but the picture reader as an absolute path into one engine folder, and
with_current_reader()only replacedthat path when it was gone — which it is not, because an update keeps the old engine folder.
After the change the reader follows the engine, the way
strata.exedoes:Related discussion
#4658 — the report, with the run config excerpt and the cause. No separate scope agreement was asked for: this is a bug
in the existing "use the reader of the package in use" path, not a new feature.
Approach
with_current_reader(cfg, package)had one condition —not os.path.exists(old). It now also remaps when the path sitsin another engine package folder:
components/engine/<version>/layout counts. A reader the person put somewhere else (the Q8_0 encoderdocs describe pointing at one) is left untouched, so no custom setup is rewritten.
cpu_exegoes through the same loop, so it follows too.Validation
Passed:
python -m pytest serve/test_server.py -qon this checkout (Python 3.11.16, Windows): 358 passed, 3skipped, 516 subtests passed. The four new cases in
CurrentReaderpass: a reader in an old engine package isreplaced even though it still exists; a missing reader is still replaced; a reader outside
components/engine/is leftalone (same object returned); the current package's reader is left alone.
Passed: the A/B — with
serve/server.pyreverted tomain, the new case fails withAssertionError(serve/test_server.py:6308), so the tests pin the change rather than passing by themselves.Failed: none.
Not run: a real
strata updateacross two engine versions on this machine. The report's evidence is the run configit quotes; the change is the path decision it describes, and the tests drive that decision with real directories. I did
not reproduce the full update flow.
Limits
strata-vision, orstrata-vision-hipfromcpu_exe). If afuture engine package ships the reader under a different name, the remap finds no file and leaves the old path, as
today.
exeandcpu_exeare considered, the two keys the run config carries for the reader.strata updateitself still does not rewrite run configs; this fixes the read side, which is where every start goesthrough. A config left stale on disk is corrected in memory each time, not written back.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.