fix: bump retrieval_count in list_facts() - #35152
Open
angrywudu wants to merge 1 commit into
Open
Conversation
The list_facts() method was missing the retrieval_count increment that search_facts() and all HRR-based retrieval methods (probe, related, reason, contradict) already had. This meant any fact retrieved via the 'list' action would never have its usage counter tracked, breaking the trust score system's ability to surface frequently-used facts.
Collaborator
Contributor
|
Thanks for fixing the verified Problems
Suggested changes
Automated hermes-sweeper review. |
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.
Bug
HolographicStore.list_facts()did not incrementretrieval_counton returned facts. All other retrieval methods (search,probe,related,reason,contradict) correctly call_bump_retrieval_count(), butlist— which is the primary way agents browse the fact store — was silently skipping it.This meant facts frequently accessed via
listnever had their usage tracked, so the trust score system's frequency data was incomplete.Fix
Added the same
UPDATE facts SET retrieval_count = retrieval_count + 1pattern used insearch_facts()tolist_facts(), applied after the SELECT and before returning results.Testing
retrieval_countvalues across consecutivelistcallssearch/probe/related/reason/contradictbump behavior unchanged