Skip to content

fix(quick-router): route "i've got a meeting/appointment" to memory_store - #902

Open
Yurii214 wants to merge 2 commits into
GeniePod:mainfrom
Yurii214:fix/ive-got-appointment
Open

fix(quick-router): route "i've got a meeting/appointment" to memory_store#902
Yurii214 wants to merge 2 commits into
GeniePod:mainfrom
Yurii214:fix/ive-got-appointment

Conversation

@Yurii214

@Yurii214 Yurii214 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

The appointment/meeting assertion in personal_fact_store_request only accepted "i have a" / "i have an", so the equally common present-perfect contraction "i've got a …" (normalized to "i ve got a") missed both prefixes:

utterance on main expected
I've got a meeting on Saturday 10AM ABSTAIN (LLM) memory_store{reminders, "calendar event: meeting on saturday 10am"}
I've got a dentist appointment on Friday misroutes to memory_recall memory_store{reminders, "calendar event: dentist appointment on friday"}

I have a meeting … / I have a dentist appointment … already route to memory_store today — the dentist form is worse than a plain fall-through, because it gets grabbed by a later memory_recall matcher and reads memory instead of writing the event.

Changes

  • Add "i ve got a " / "i ve got an " to the accept-set, alongside the existing "i have a " / "i have an ". The rest.contains("appointment") || rest.contains("meeting") gate and the calendar event: … content are unchanged, so the output is byte-identical to the "i have a" form.
  • Negatives still abstain: "I've got a cold", "I've got a question for you", "I've got an idea"None (no appointment/meeting).
  • Add routes_ive_got_appointment_to_memory_store (both positive forms + the "i've got a cold" negative).

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

Ran cargo test -p genie-core --no-default-features --lib tools::quick (119 passed); the new routes_ive_got_appointment_to_memory_store test fails on main (the meeting form routes to None → panic) and passes with the change. cargo clippy (0 warnings) and cargo fmt --check are clean. Pure text-classification logic, no hardware dependency, so the laptop run exercises the full affected path.

Summary by CodeRabbit

  • New Features

    • Improved recognition of first-person “I’ve got …” statements describing upcoming appointments and meetings.
    • Supports variations using indefinite articles, such as “a” and “an,” including dentist appointments.
    • Matching statements are saved as reminders formatted as calendar events.
  • Bug Fixes

    • Prevented unrelated “I’ve got …” statements, such as illness-related statements, from being incorrectly saved as calendar reminders.

@github-actions github-actions Bot added the bug Something isn't working label Jul 30, 2026
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 57ea1f14-44c7-4cb6-babb-6dd0cf6b5c1a

📥 Commits

Reviewing files that changed from the base of the PR and between dc998c1 and b452915.

📒 Files selected for processing (1)
  • crates/genie-core/src/tools/quick.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • crates/genie-core/src/tools/quick.rs

📝 Walkthrough

Walkthrough

personal_fact_store_request recognizes normalized “I’ve got” appointment or meeting assertions and routes them to reminder storage. Tests cover valid calendar events and unrelated statements.

Changes

Calendar assertion routing

Layer / File(s) Summary
Contraction detection and validation
crates/genie-core/src/tools/quick.rs
Recognizes normalized “I’ve got a/an” appointment or meeting assertions and routes them to memory_store with calendar event: … content. Tests cover valid events and abstention for unrelated statements.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes routing "I've got a meeting/appointment" to memory_store, which is the main change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
crates/genie-core/src/tools/quick.rs (1)

6451-6468: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add coverage for the newly added an forms.

The implementation adds both i ve got a and i ve got an, but the test exercises only a. Add an “I've got an appointment …” positive case and an “I've got an idea” negative case to protect both branches.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/genie-core/src/tools/quick.rs` around lines 6451 - 6468, Extend
routes_ive_got_appointment_to_memory_store to cover the newly added “i ve got
an” branch: add a positive “I've got an appointment …” assertion expecting
memory_store with the appropriate calendar-event content, and a negative
assertion that “I've got an idea” returns None. Preserve the existing “a” and
non-appointment coverage.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@crates/genie-core/src/tools/quick.rs`:
- Around line 1367-1374: Update the calendar-event detection in the text parsing
block to match “appointment” and “meeting” as whole tokens rather than using
substring checks on rest. Preserve routing valid calendar phrases to “reminders”
while rejecting phrases such as “appointment book” and “meeting notes” before
returning the memory_store tuple.

---

Nitpick comments:
In `@crates/genie-core/src/tools/quick.rs`:
- Around line 6451-6468: Extend routes_ive_got_appointment_to_memory_store to
cover the newly added “i ve got an” branch: add a positive “I've got an
appointment …” assertion expecting memory_store with the appropriate
calendar-event content, and a negative assertion that “I've got an idea” returns
None. Preserve the existing “a” and non-appointment coverage.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1a8bb716-d27a-464d-bcba-c7759f504c90

📥 Commits

Reviewing files that changed from the base of the PR and between 02a577d and b3cf562.

📒 Files selected for processing (1)
  • crates/genie-core/src/tools/quick.rs

Comment thread crates/genie-core/src/tools/quick.rs
…tore

the appointment/meeting assertion in personal_fact_store_request accepted
only "i have a"/"i have an"; the equally common contraction "i've got a"
(normalized to "i ve got a") fell through to the llm, and the dentist form
even misrouted to memory_recall. accept the contraction, same as "i have a".
@Yurii214
Yurii214 force-pushed the fix/ive-got-appointment branch from b3cf562 to dc998c1 Compare July 30, 2026 04:46

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
crates/genie-core/src/tools/quick.rs (1)

6451-6474: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Cover the an branch and stated negative examples.

The test exercises only "I've got a …" and "I've got a cold". Add an "I've got an appointment …" case plus "I've got a question for you" and "I've got an idea" to protect both new prefixes and the documented abstention behavior.

Suggested test extension
+        let call = route("I've got an appointment on Monday").unwrap();
+        assert_eq!(call.name, "memory_store");
+        assert_eq!(call.arguments["category"], "reminders");
+
         // a non-appointment "i've got" is not a calendar event and still abstains.
-        assert!(route("I've got a cold").is_none());
+        for utterance in [
+            "I've got a cold",
+            "I've got a question for you",
+            "I've got an idea",
+        ] {
+            assert!(route(utterance).is_none());
+        }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@crates/genie-core/src/tools/quick.rs` around lines 6451 - 6474, The test
routes_ive_got_appointment_to_memory_store should also cover the “an”
appointment prefix and both documented non-calendar abstentions. Add an “I’ve
got an appointment …” assertion expecting memory_store with the appropriate
reminders category and calendar-event content, plus assertions that route("I've
got a question for you") and route("I've got an idea") return None.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@crates/genie-core/src/tools/quick.rs`:
- Around line 6451-6474: The test routes_ive_got_appointment_to_memory_store
should also cover the “an” appointment prefix and both documented non-calendar
abstentions. Add an “I’ve got an appointment …” assertion expecting memory_store
with the appropriate reminders category and calendar-event content, plus
assertions that route("I've got a question for you") and route("I've got an
idea") return None.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e4493078-b986-41cd-a6c0-d14972e9b3ab

📥 Commits

Reviewing files that changed from the base of the PR and between b3cf562 and dc998c1.

📒 Files selected for processing (1)
  • crates/genie-core/src/tools/quick.rs

adds an "i've got an appointment" case for the new "an" prefix and
extends the abstention check to "i've got a question for you" and
"i've got an idea", per review. behaviour unchanged; test coverage only.
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.

1 participant