fix: version numbers from proto3 messages follow camel case.#1868
Merged
fix: version numbers from proto3 messages follow camel case.#1868
Conversation
Contributor
Reviewer's GuideAligns web server JavaScript with updated proto3/camelCase fields for version and release metadata, and initializes global API version variables from the new version constants. Sequence diagram for API version and release comparison in startServersequenceDiagram
participant WebServer
participant CoreServer
WebServer->>CoreServer: sendVersionCheckRequest()
CoreServer-->>WebServer: reply(apiMajor, apiMinor, apiPatch, releaseYear, releaseMonth, releaseDay, releaseHour, releaseMinute)
alt noReply
WebServer->>WebServer: logger.error(ERROR_NO_REPLY)
else incompatibleApiVersion
WebServer->>WebServer: logger.error(incompatible api version reply.apiMajor.reply.apiMinor.reply.apiPatch)
else compatibleApiVersion
WebServer->>WebServer: buildWarningMessage(reply.releaseYear, reply.releaseMonth, reply.releaseDay, reply.releaseHour, reply.releaseMinute)
WebServer->>WebServer: compareRelease(reply.releaseYear, reply.releaseMonth, reply.releaseDay, reply.releaseHour, reply.releaseMinute, g_ver_release_year, g_ver_release_month, g_ver_release_day, g_ver_release_hour, g_ver_release_minute)
opt newerReleaseDetected
WebServer->>WebServer: logger.warning(warning_msg)
end
end
Flow diagram for release version comparison logicflowchart TD
A[Start release comparison] --> B{reply.releaseYear > g_ver_release_year?}
B -->|Yes| W[Log warning]
B -->|No| C{reply.releaseYear == g_ver_release_year?}
C -->|No| Z[No warning]
C -->|Yes| D{reply.releaseMonth > g_ver_release_month?}
D -->|Yes| W
D -->|No| E{reply.releaseMonth == g_ver_release_month?}
E -->|No| Z
E -->|Yes| F{reply.releaseDay > g_ver_release_day?}
F -->|Yes| W
F -->|No| G{reply.releaseDay == g_ver_release_day?}
G -->|No| Z
G -->|Yes| H{reply.releaseHour > g_ver_release_hour?}
H -->|Yes| W
H -->|No| I{reply.releaseHour == g_ver_release_hour?}
I -->|No| Z
I -->|Yes| J{reply.releaseMinute > g_ver_release_minute?}
J -->|Yes| W
J -->|No| Z
W --> K[End]
Z --> K
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
nedvedba
approved these changes
Feb 23, 2026
Contributor
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- The new
g_ver_api_patchglobal is assigned but not used anywhere in this file; consider either removing it or incorporating it into the compatibility check/logging if patch-level comparison is intended. - The nested release date comparison logic (
releaseYear/Month/Day/Hour/Minute) is quite deep; consider refactoring into a helper that converts the version fields to a comparable timestamp or numeric tuple to simplify readability and reduce branching.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new `g_ver_api_patch` global is assigned but not used anywhere in this file; consider either removing it or incorporating it into the compatibility check/logging if patch-level comparison is intended.
- The nested release date comparison logic (`releaseYear`/`Month`/`Day`/`Hour`/`Minute`) is quite deep; consider refactoring into a helper that converts the version fields to a comparable timestamp or numeric tuple to simplify readability and reduce branching.
## Individual Comments
### Comment 1
<location path="web/datafed-ws.js" line_range="155-159" />
<code_context>
+g_ver_release_hour = version.RELEASE_HOUR;
+g_ver_release_minute = version.RELEASE_MINUTE;
+
+g_ver_api_major = version.MAJOR;
+g_ver_api_minor = version.MINOR;
+g_ver_api_patch = version.PATCH;
g_version =
</code_context>
<issue_to_address>
**suggestion:** g_ver_api_patch is defined but not used in the compatibility logic, which suggests either dead state or incomplete use of patch versions.
Consider either using `g_ver_api_patch` in the compatibility logic (e.g., when major/minor are equal) or removing it to avoid a dead, misleading variable that never affects behavior.
```suggestion
g_ver_api_major = version.MAJOR;
g_ver_api_minor = version.MINOR;
g_version =
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Comment on lines
+155
to
159
| g_ver_api_major = version.MAJOR; | ||
| g_ver_api_minor = version.MINOR; | ||
| g_ver_api_patch = version.PATCH; | ||
|
|
||
| g_version = |
Contributor
There was a problem hiding this comment.
suggestion: g_ver_api_patch is defined but not used in the compatibility logic, which suggests either dead state or incomplete use of patch versions.
Consider either using g_ver_api_patch in the compatibility logic (e.g., when major/minor are equal) or removing it to avoid a dead, misleading variable that never affects behavior.
Suggested change
| g_ver_api_major = version.MAJOR; | |
| g_ver_api_minor = version.MINOR; | |
| g_ver_api_patch = version.PATCH; | |
| g_version = | |
| g_ver_api_major = version.MAJOR; | |
| g_ver_api_minor = version.MINOR; | |
| g_version = |
nedvedba
added a commit
that referenced
this pull request
Feb 23, 2026
* fix: prevent defaults being set to undefined, and interpret numbers a… (#1861) * fix: prevent defaults being set to undefined, and interpret numbers and enums as strings. * chore: Auto-format JavaScript files with Prettier * fix: version numbers from proto3 messages follow camel case. (#1868) --------- Co-authored-by: Joshua S Brown <joshbro42867@yahoo.com>
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.
Ticket
Description
How Has This Been Tested?
Artifacts (if appropriate):
Tasks
Summary by Sourcery
Align web server version handling with updated proto3-generated field names for API and release version checks.
Bug Fixes: