Repository navigation
fix(cli): upgrade companion binaries and ORT libs, normalize version compare - #1255
Merged
Merged
Conversation
…compare `uteke upgrade` replaced only the CLI binary: `uteke-serve` and `uteke-mcp` stayed on the old version after a "successful" upgrade, and the freshly downloaded ONNX Runtime libs bundled since #1221 were discarded. - Replace `uteke-serve` and `uteke-mcp` from the same verified archive (warn+skip when absent from older bundles; per-binary run verification and atomic rename preserved) - Refresh bundled `libonnxruntime*` libs from the archive (symlinks preserved on Unix; other platforms keep installed libs) - Compare the latest release tag against CARGO_PKG_VERSION with the `v` prefix normalized - an up-to-date install was re-offered the same release Closes #1245
| .map_err(|e| format!("Failed to stat {fname}: {e}"))?; | ||
| if ft.is_file() { | ||
| fs::copy(entry.path(), &dest).map_err(|e| format!("Failed to install {fname}: {e}"))?; | ||
| refreshed += 1; |
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
Copying bundled libonnxruntime files over the installed ones in place truncates the live lib while a running uteke-serve may still have it mmap'd (SIGBUS), and an interrupted copy leaves a corrupt lib after the binaries were already swapped. Stage to a temp name and rename atomically, matching the replace_binary pattern.
This was referenced Sep 15, 2026
Closed
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.
What
uteke upgradenow keeps every installed artifact in sync with the release bundle:uteke-serveanduteke-mcpare replaced from the same checksum-verified archive as the CLI. Each is run-verified (--version) and atomically renamed; a bundle missing them (pre-0.17-style) is skipped with a warning, not an error.libonnxruntime*files are refreshed into the install dir (install.sh has installed these since fix(install): copy bundled ORT libs on binary install #1221; the upgrade path discarded them). Unix symlinks are recreated; non-Unix platforms keep their installed libs.v0.18.0) is compared againstCARGO_PKG_VERSION(0.18.0) with thevprefix normalized. Previously an up-to-date install was always re-offered the same release.Why
Verified E2E on a clean sandbox (v0.17.0 via install.sh ->
uteke upgrade --yes): the CLI moved 0.17.0 -> 0.18.0 whileuteke-serve,uteke-mcp, and the ORT libs kept their exact pre-upgrade SHAs, and the running server stayed stale until manually restarted with the old binary - a "successful" upgrade that left the server a version behind. The v-prefix mismatch additionally makes an up-to-date 0.18.0 install re-offer v0.18.0. Closes #1245.Testing
replace_binaryinstalls a verified fake binary, skips missing optional artifacts, hard-fails on missing required ones, and refuses a broken artifact without installing it.Already up to date (0.18.0).cargo test -p uteke-cli --bins: 75 passed / 0 failed.cargo fmt --check+cargo clippy --bins -- -D warningsclean.