Repository navigation
fix(whoami): convert retrieval scores to float - #876
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #876 +/- ##
=======================================
Coverage 74.61% 74.61%
=======================================
Files 83 83
Lines 3652 3652
=======================================
Hits 2725 2725
Misses 927 927 ☔ View full report in Codecov by Harness. |
maciejmajek
approved these changes
Oct 12, 2026
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.
Purpose
Fix WhoAmI documentation retrieval failing when FAISS returns NumPy floating-point scores that the generated ROS response rejects.
Proposed Changes
float()at the ROS response boundary, preserving values and document ordering.VectorStoreRetrieval.Responsefor NumPy float32 scores, Python floats, and empty results. Explicitly enable field validation on generators where it is optional.Issues
Addresses the score serialization failure in #565.
Testing
rai_interfacesbuilt from source.python -m pytest tests/rai_whoami/test_vector_store_retrieval_agent.py --timeout=60: before the fix, 1 failed with the reported score assertion and 2 passed; after the fix, all 3 passed.pre-commit run --all-files: all 13 hooks passed, including Ruff and formatting.uv lock --checkandgit diff --checkpassed.