Repository navigation
fix(backend): keep task reminders in sync when MCP creates, completes, reschedules or deletes a task - #15029
Conversation
…, reschedules or deletes a task
|
Verified this end to end against #15028 — the fix is correct and the PR description matches the code exactly.
No concerns from my side; leaving for maintainer merge consideration. 🤖 Automated review on behalf of the maintainers. by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with |
|
Verified on current main (1ef3b91). utils/mcp_action_items.py (used by routers/mcp.py and mcp_sse.py) never calls sync_action_item_reminder. REST Tasks API does on create/complete/reschedule/delete. An MCP-created dated task never reminds; a completed or deleted one still does. The four call sites match that REST contract, and a send failure is swallowed so the write still succeeds. New tests in test_mcp_action_item_writes.py fail on main for create/complete/reschedule/delete. I am not merging. |
Fixes #15028
utils/mcp_action_items.py, which bothrouters/mcp.pyandrouters/mcp_sse.pyuse for task writes, never reconciled the phone's local reminders. A task an agent created with a due date never reminded, a task it completed or deleted still reminded, and a due date it moved still fired at the old time.routers/action_items.pycallssync_action_item_reminderfor each of these writes.Each write now calls
sync_action_item_reminderthrough a small_sync_reminderhelper:The helper logs and swallows a send failure, so a notification problem never fails the write.
sync_action_item_reminderis not a transport entry point, and the notification dispatch boundary check still holds.Six tests added to
tests/unit/test_mcp_action_item_writes.py. On main the create, complete, reschedule and delete cases fail becausesync_action_item_reminderis never called. With the fix all 49 tests in the file pass, including a no-due-date create that sends nothing and a send failure that does not fail the delete.Failure-Class: none