You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(updater): report an installed binary's version - #4001
The scheduled Real Windows install job (sskys18/herdr-web-ui run 43856836824) failed on v0.5.4 with FAIL The app runs , not v0.5.4. The 11/09 run on the same commit passed because it installed v0.5.3.
Cause: install.ps1 now installs the compiled server into %LOCALAPPDATA%\ovis\bin (#3720, #3800). For that layout, Updater.initialize returns on installedBinary before setting current_version, so /api/updates reports null. The e2e script and Settings read that field.
Fix: read the version from the signed ovis-server.json that both installers keep beside the binary.
Tests: server/updater-plugin-binary.test.ts now asserts the version. It fails without the fix (Received: null), and it and server/updater.test.ts pass with it (60 pass). In check fast, typecheck and build pass. Unit tests fail locally only in server/core/agent-input-send.test.ts, with 10 pane.read timeouts that fail the same way without this change.
The Windows e2e goes green only after a release that contains this fix, because the job installs the latest release.
The compiled server install.ps1/install.sh put in place left current_version null, so the Windows install e2e read 'The app runs , not v0.5.4'. Read it from the signed ovis-server.json kept beside the binary.
Auto incremental reviews are disabled on this repository.
Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Summary
Summary by CodeRabbit
Bug Fixes
Fixed installed Ovis binaries not reporting their version. Settings and update information now show the installed version, and scheduled Windows checks can compare it with the latest available release. This restores accurate version reporting for installations managed by the installer.
The updater now reads the version from ovis-server.json when initializing an installed binary. The test checks that it reports version 0.5.4, and the changelog describes the fix.
Changes: Installed Binary Version Reporting
Layer / File(s)
Summary
Read installed binary version server/updater.ts, server/updater-plugin-binary.test.ts, changelog.d/installed-binary-version.md
The updater reads a string version from ovis-server.json and sets it as the installed binary's current version. The test checks that it reports 0.5.4 and remains unmanaged. The changelog describes the fix.
Installed binaries will report their version again in Settings and /api/updates. The change is narrow, falls back safely to null when the manifest is unavailable, and is easy to revert.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "fix(updater): report an installed binary's version" matches the main change. The updater now sets current_version from ovis-server.json for installed binaries, and the test asserts that ver…
Description check
The description explains the failing Windows install job, the root cause (Updater.initialize returns before setting current_version for installedBinary), and the fix (read version from ovis-server.jso…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "fix(updater): report an installed binary's version" matches the main change. The updater now sets current_version from ovis-server.json for installed binaries, and the test asserts that version. The title is specific and concise.
Full details: Description check
Explanation
The description explains the failing Windows install job, the root cause (Updater.initialize returns before setting current_version for installedBinary), and the fix (read version from ovis-server.json). It lists tests and check results. It partly fills the Validation section: it names check fast, typecheck, build, and a local unit-test failure, but does not name the bun run check fast command in the template's exact form or state whether contract tests were covered for the HTTP-visible /api/updates change. The Change section is complete and the Validation section is mostly complete.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Reviewing files that changed from the base of the PR and between 5f5d8b6 and fe7e256.
Files selected for processing: 3
changelog.d/installed-binary-version.md
server/updater-plugin-binary.test.ts
server/updater.ts
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
Thanks for this fix, @sskys18. It reproduces exactly as you describe: on main an installed binary reports no version, and with your change it reads it from the signed ovis-server.json beside it.
Correction to what I asked earlier: no changelog line is needed after all. We checked it on a real Windows 11 machine: with a server installed by install.ps1 and reporting an older version, the Windows app shows no "Outdated" and offers no Update. It treats a linked install as its own and doesn't compare versions there. So this change alters nothing a Windows desktop user sees, and your changelog fragment is right as it is. Sorry for the noise.
We'll push one small maintainer commit on top of yours: it reads ovis-server.json only as a small regular file and keeps the version only when it looks like a release, so an odd file beside the binary can't hang the server's start. Your commit stays untouched.
…ular file naming a release
ovis-server.json beside an installed binary was read whole with readFileSync: a FIFO there held startup
before the server listened, a huge file was read whole, and any string in it became current_version.
Read it as a release's notes are (readNotesFile: one descriptor, regular file, bounded), and take the
version only when it is a release version as another PC's is checked (pc-update.ts releaseVersion,
now exported).
Merged head 6de4da340fa7 as 46e93483795e on GitHub's checks, with no unresolved review threads.
Reviewer
Verdict
Note
claude
CLEAR
codex
CLEAR
Merge pass note for #4001 (fix(updater): report an installed binary's version).
Thank you, @sskys18: the fix is yours.
What it does: a server installed by the install scripts now reports its version (it reported none), read from the manifest file the installers keep beside the binary. Nothing is executed to learn it.
A maintainer commit on top reads that file only if it is a regular file of modest size and keeps the version only if it looks like a release version, so an unusual file at that path cannot delay or break startup.
What a user sees: Settings shows the installed server.s real version. The updater for an installed binary stays as it was (it neither offers nor installs anything). The Windows desktop app shows nothing new: this was run on a real Windows machine with an older and a same-version installed server.
Found while testing, not changed here: the Windows desktop app shows a running installed server as off; that is being handled separately.
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
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.
The scheduled Real Windows install job (sskys18/herdr-web-ui run 43856836824) failed on v0.5.4 with
FAIL The app runs , not v0.5.4. The 11/09 run on the same commit passed because it installed v0.5.3.Cause: install.ps1 now installs the compiled server into %LOCALAPPDATA%\ovis\bin (#3720, #3800). For that layout,
Updater.initializereturns oninstalledBinarybefore settingcurrent_version, so/api/updatesreportsnull. The e2e script and Settings read that field.Fix: read the version from the signed
ovis-server.jsonthat both installers keep beside the binary.Tests:
server/updater-plugin-binary.test.tsnow asserts the version. It fails without the fix (Received: null), and it andserver/updater.test.tspass with it (60 pass). In check fast, typecheck and build pass. Unit tests fail locally only inserver/core/agent-input-send.test.ts, with 10pane.readtimeouts that fail the same way without this change.The Windows e2e goes green only after a release that contains this fix, because the job installs the latest release.