Repository navigation
[Engine] the picture reader follows an engine update when the old folder is still there (Fix #4658) - #4782
Open
XiaoBinGan wants to merge 1 commit into
Open
[Engine] the picture reader follows an engine update when the old folder is still there (Fix #4658)#4782XiaoBinGan wants to merge 1 commit into
XiaoBinGan wants to merge 1 commit into
Conversation
XiaoBinGan
force-pushed
the
fix/vision-reader-follows-update
branch
from
October 31, 2026 05:07
4f92a44 to
29cde2f
Compare
…he old folder is still there with_current_reader() replaced a run config's vision.exe only when the absolute path was gone. `strata update` keeps the old engine folder, so the old reader still existed and the server kept starting it: the picture reader never followed the engine to 0.1.54, with nothing warning about it. A reader that sits in another engine package folder is now replaced as well, and the same holds for cpu_exe. A reader outside components/engine/ is the person's own file and is left exactly as it is, and the missing-path case behaves as before.
XiaoBinGan
force-pushed
the
fix/vision-reader-follows-update
branch
from
October 31, 2026 10:14
29cde2f to
ecbb1a0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.