serve: report the engine's own version (INFO engine=) over BUILD.json's (from PR #41, midhatn)

Co-Authored-By: MIDHAT NASHAR <midhatn@users.noreply.github.com>
This commit is contained in:
Niko1221andMIDHAT NASHAR committed 2026-09-28 19:14:23 +02:00
1 parent f086119902
commit 3e1145d2f3
1 file changed
+4
+4
View File
@@ -179,6 +179,10 @@ class StrataEngine:
loading.set()
if self.max_context <= 0:
raise RuntimeError("the engine exited before it was ready" + (f" (see {log})" if log else ""))
# (from PR #41, midhatn) a locally built engine can sit next to another release's BUILD.json: engines that
# report their own version (INFO engine=, 0.1.8+) win, the manifest stays the fallback for older ones
if self.info.get("engine"):
self.info["version"] = str(self.info["engine"])
# the engine's stdout on a thread, so a request can wait with a timeout (heartbeats, cancel checks)
self.lines: queue.Queue = queue.Queue()
threading.Thread(target=self._pump, daemon=True).start()