Skip to content

fix(schedule): exclude confirmed location reminders from find_schedules - #366

Merged
LUPENGHAN merged 1 commit into
1024XEngineer:mainfrom
LUPENGHAN:fix/find-schedules-exclude-confirmed-location
Aug 24, 2026
Merged

fix(schedule): exclude confirmed location reminders from find_schedules#366
LUPENGHAN merged 1 commit into
1024XEngineer:mainfrom
LUPENGHAN:fix/find-schedules-exclude-confirmed-location

Conversation

@LUPENGHAN

Copy link
Copy Markdown
Contributor

Fixes #365

Summary

  • 手机端地图/日历(scheduleClientService.tsgetLocationSchedules())本来就会把已确认(reminder_disposition_state === 'confirmed')的地点提醒从展示列表里过滤掉。
  • 语音助手的 find_schedules 工具没有同样的过滤,导致已经处理完的地点提醒还会被语音搜索反复搜出来、被助手再次提起。
  • 这次改动让 find_schedulesbusiness/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

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

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@yyy-router yyy-router left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ok

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@LUPENGHAN
LUPENGHAN merged commit 21f1cb3 into 1024XEngineer:main Aug 24, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(schedule): find_schedules 未排除已确认的地点提醒,与地图/日历展示口径不一致

2 participants