fix(quick-router): drop a trailing "please" from memory_forget and play_media queries#693
Open
davion-knight wants to merge 1 commit into
Open
Conversation
…ay_media queries A polite trailing "please" leaked into the query argument: "forget my old locker combination please" produced memory_forget query "old locker combination please" (which no longer matches the stored fact), and "play my study playlist please" produced play_media query "my study playlist please". Strip a trailing " please" in both extractors, mirroring the existing clean_control_entity handling for home control. Queries without "please" are unchanged, and a bare "forget it please" still abstains for the LLM.
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.
Fixes #692
Summary
A polite trailing "please" leaked into the query argument of two quick-router
tools, so the argument no longer matched what the user meant:
forget my old locker combination pleaseold locker combination pleaseold locker combinationplay my study playlist pleasemy study playlist pleasemy study playlistmemory_forgetmatches the stored fact by this query, so the trailing "please"made it miss the memory the user asked to forget.
Changes
memory_forget_queryandplay_media_request(
crates/genie-core/src/tools/quick.rs): strip a trailing" please"from theextracted query, mirroring the existing
clean_control_entityhandling forhome control. Queries without "please" are unchanged, and a bare
"forget it please"still abstains for the LLM (the remainder is a barepronoun after stripping).
routes_forget_command_to_memory_forgetandroutes_playlist_requests_to_mediatests with the "please" phrasings.Real Behavior Proof
Tested profile / hardware (check all that apply):
jetsonraspberry_piportable_sbclaptopmacWhat I ran
x86_64 Linux laptop, stable Rust (
cargo 1.96.1). The changed code isplatform-agnostic string routing (
str::trim_end_matches), so an x86_64 buildexercises the exact logic that runs on Jetson. I extended the regression tests
first and ran them against unmodified
mainto confirm the bug, then appliedthe fix:
What I observed
left: "old locker combination please", right: "old locker combination"andleft: "my study playlist please", right: "my study playlist".genie-core --lib848 passed / 0 failed / 4 ignored. Theexisting no-"please" forget/media cases and the
forget itabstain cases passunchanged.
--no-default-features): 0 warnings.