fix(schedule): exclude confirmed location reminders from find_schedules - #366
Merged
LUPENGHAN merged 1 commit intoAug 24, 2026
Conversation
The mobile app's map/calendar already hides a location reminder once its disposition is confirmed (getLocationSchedules() in scheduleClientService.ts filters reminder_disposition_state !== 'confirmed'). The voice agent's find_schedules tool had no equivalent filter, so it kept surfacing location reminders the user had already handled. Align find_schedules with the client's display contract: a confirmed location reminder is excluded from search results, same as it's excluded from the map. Time-type schedules are unaffected -- confirmation there doesn't hide them from either surface. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
Reviewed the complete fixed diff for the schedule-search contract. The new predicate correctly excludes confirmed location reminders from find_schedules while leaving confirmed time schedules searchable, and it is applied consistently after broad, time-window, and explicit-ID candidate retrieval. The added regression test covers the primary behavior.
Verification: python3 -m py_compile and git diff --check passed. The advertised pytest command could not be run because uv is not installed in the review environment.
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 #365
Summary
scheduleClientService.ts的getLocationSchedules())本来就会把已确认(reminder_disposition_state === 'confirmed')的地点提醒从展示列表里过滤掉。find_schedules工具没有同样的过滤,导致已经处理完的地点提醒还会被语音搜索反复搜出来、被助手再次提起。find_schedules(business/calendar/service.py的_matches_static_query)跟客户端展示口径对齐:地点型日程一旦确认就不再出现在搜索结果里。schedule_type == 'time')日程不受影响,确认后在两端都照常可见/可搜。Test plan
test_find_schedules_excludes_a_confirmed_location_reminder,验证已确认地点日程被排除、已确认时间日程不受影响。uv run pytest:1073 passed,覆盖率 97.32%。uv run ruff check/uv run mypy:均通过。🤖 Generated with Claude Code