Fix: explicit N/10 ratings silently dropped by SatisfactionCapture#1421
Open
rrittich wants to merge 1 commit into
Open
Fix: explicit N/10 ratings silently dropped by SatisfactionCapture#1421rrittich wants to merge 1 commit into
rrittich wants to merge 1 commit into
Conversation
parseExplicitRating() returned null for '10/10', '9/10', '8 out of 10': the reject-on-slash guard treated the '/' after the number as invalid, so every explicit N/10 rating silently degraded into a sentiment-inferred guess. Add an N/10 (and 'N out of 10') branch before the generic parser, reusing a hoisted SENTENCE_STARTERS guard so a work phrase like '2/10 items done' is still correctly NOT treated as a rating.
Author
|
Discovered that when I wanted to give my DA a 10/10 rating, it didn't seem to elevate that to a preference in later chats. So I asked it to investigate and it discovered this issue in the PAI harness' logic. I'm not a programmer, and I have only a faint idea of what it is talking about here, but hopefully it helps and makes sense. |
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.
Problem
parseExplicitRating()inLifeOS/install/hooks/SatisfactionCapture.hook.tsreturnsnullfor the naturalN/10rating form —10/10,9/10, thanks,8 out of 10. The reject-on-slash guard treats the/right after the leading number as invalid input:So every explicit
N/10rating silently falls through to the sentiment-inference path and is recorded withsource: "implicit"— a guess — instead of the score the user actually gave. Bare-number and word ratings (8,ten) work; the fraction form does not.Fix
Add an
N/10/N out of 10branch before the generic parser (ahead of the reject-on-slash guard), reusing a hoistedSENTENCE_STARTERSguard so a work phrase like2/10 items doneis still correctly not treated as a rating.Behavior
10/10, thank younull(→ implicit guess){rating: 10, comment: "thank you"}9/10null{rating: 9}8 out of 10null{rating: 8}2/10 items donenullnull(guarded, not a rating)8,ten thanksNo change to existing bare-number or word-form ratings. Single-file, no new dependencies.