Repository navigation
Match a version question to the newest release for the product it names - #35
Open
singhharsh1708 wants to merge 1 commit into
Open
singhharsh1708 wants to merge 1 commit into
singhharsh1708 wants to merge 1 commit into
Conversation
bestNote counted every shared word, repeats included, so "What is the latest version of the desktop app?" was matched on words like "the" and "app" and came back with a release twelve builds old. A firmware or phone app question was handed a desktop release, because the last fifteen releases are all desktop builds. It now keeps to notes for the product the question names, ignores the words every version question shares, counts a shared word once and breaks ties by the newest release.
aryanorastar
requested changes
Oct 11, 2026
aryanorastar
left a comment
Collaborator
There was a problem hiding this comment.
Thanks, this fixes a real problem (firmware questions got desktop notes). Three changes before merge:
(1) when the question names no product and no specific change ("what is the latest version?"), return an empty string instead of the newest note; main returns an empty string there today;
(2) skip prereleases: keep prerelease from the API and skip notes whose name says candidate, beta or dev, so customers are not pointed at unreleased builds;
(3) productOf should recognise firmware tags such as Omi_CV1_v3.0.15, Omi_DK2_v2.0.x and omi_firmware_v…. Real tags end in -macos / -desktop-* (desktop), -mobile-cm / -android* / -ios-cm (phone).
Please add tests for each.
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.
Customer problem
Asked "What is the latest version of the desktop app?", the bot is handed release v0.12.452 as the matching release note while v0.12.464 is out.
bestNotecounts every shared word, repeats included, so the pick is decided by words like "the", "what" and "app". Asked "Is there a firmware update for my Omi?" or "What's new in the phone app?", it is handed a desktop release, because the last fifteen releases are all desktop builds. The prompt tells the model to use that note for "which version to get".Change
bestNotekeeps to notes for the product the question names (desktop, firmware or phone), ignores the words every version question shares, counts a shared word once, and breaks ties by the newest release. A plain "latest version" question gets the newest release for that product. A question about one change still needs a note that mentions it. A product with no release in the window gets no note.Evidence
Run against the live
BasedHardware/omirelease feed on 2026-10-10. Before: the desktop questions got v0.12.452, the firmware question v0.12.464 and the phone app questions v0.12.462, all desktop builds. After: the desktop questions get v0.12.464, and the firmware and phone app questions get nothing.Verification
test/releases.test.js, on a feed copied from the real one. All three fail on mainnpm test: 629/629EVAL_NO_MODEL=1 node scripts/customer-eval.js: 8/8.env, orrailway.toml