Skip to content

fix(quick-router): drop a trailing "please" from memory_forget and play_media queries#693

Open
davion-knight wants to merge 1 commit into
GeniePod:mainfrom
davion-knight:fix/quick-router-strip-trailing-please
Open

fix(quick-router): drop a trailing "please" from memory_forget and play_media queries#693
davion-knight wants to merge 1 commit into
GeniePod:mainfrom
davion-knight:fix/quick-router-strip-trailing-please

Conversation

@davion-knight

Copy link
Copy Markdown
Contributor

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:

Utterance Tool Before Expected
forget my old locker combination please memory_forget old locker combination please old locker combination
play my study playlist please play_media my study playlist please my study playlist

memory_forget matches the stored fact by this query, so the trailing "please"
made it miss the memory the user asked to forget.

Changes

  • memory_forget_query and play_media_request
    (crates/genie-core/src/tools/quick.rs): strip a trailing " please" from the
    extracted query, 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 (the remainder is a bare
    pronoun after stripping).
  • Extend the existing routes_forget_command_to_memory_forget and
    routes_playlist_requests_to_media tests with the "please" phrasings.

Real Behavior Proof

  • I have built and run the affected code locally (or noted why I could not).
  • I have verified the change end-to-end on Jetson hardware.
  • I have NOT verified on Jetson hardware, and I explain the equivalent verification path or validation gap below.

Tested profile / hardware (check all that apply):

  • jetson
  • raspberry_pi
  • portable_sbc
  • laptop
  • mac
  • CI-only / docs-only
  • Not run locally

What I ran

x86_64 Linux laptop, stable Rust (cargo 1.96.1). The changed code is
platform-agnostic string routing (str::trim_end_matches), so an x86_64 build
exercises the exact logic that runs on Jetson. I extended the regression tests
first and ran them against unmodified main to confirm the bug, then applied
the fix:

# Repro (before fix): FAILS
cargo test -p genie-core --lib routes_forget_command_to_memory_forget
cargo test -p genie-core --lib routes_playlist_requests_to_media
# After fix + no regressions:
cargo test -p genie-core --lib
cargo fmt -p genie-core -- --check
cargo clippy -p genie-core --all-targets --locked -- -D warnings
cargo clippy -p genie-core --no-default-features --locked -- -D warnings

What I observed

  • Repro before fix: the two tests failed —
    left: "old locker combination please", right: "old locker combination" and
    left: "my study playlist please", right: "my study playlist".
  • After fix: genie-core --lib 848 passed / 0 failed / 4 ignored. The
    existing no-"please" forget/media cases and the forget it abstain cases pass
    unchanged.
  • fmt: clean. clippy (default and --no-default-features): 0 warnings.

…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.
@github-actions github-actions Bot added the bug Something isn't working label Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

quick-router: a trailing "please" leaks into memory_forget / play_media query args

1 participant