Skip to content

fix(calendar): propagate todo merge failures - #1276

Open
jiahao6635 wants to merge 2 commits into
cbcoutinho:masterfrom
jiahao6635:fix/1252-propagate-todo-merge-errors
Open

fix(calendar): propagate todo merge failures#1276
jiahao6635 wants to merge 2 commits into
cbcoutinho:masterfrom
jiahao6635:fix/1252-propagate-todo-merge-errors

Conversation

@jiahao6635

Copy link
Copy Markdown

Fixes #1252.

Summary

  • Remove the catch-all VTODO merge fallback that rebuilt a todo from the partial update payload.
  • Let unexpected merge failures propagate through update_todo before todo.data is replaced or saved.
  • Add an async regression test that injects a non-ValueError failure and verifies the stored data is unchanged, save is not called, and no rebuild occurs.

Why

Rebuilding from a partial update silently drops every stored property the caller did not resend while still reporting success. Surfacing the original failure preserves the existing VTODO and matches the event merge behavior.

Testing

  • The new synthetic RuntimeError test fails on base 9621ffa because the exception is swallowed.
  • uv run --frozen pytest tests/unit/client/test_calendar.py -q: 70 passed
  • uv run --frozen ruff format --check nextcloud_mcp_server/client/calendar.py tests/unit/client/test_calendar.py
  • uv run --frozen ruff check nextcloud_mcp_server/client/calendar.py tests/unit/client/test_calendar.py
  • uv run --frozen ty check -- nextcloud_mcp_server

@CLAassistant

CLAassistant commented Aug 9, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@sonarqubecloud

sonarqubecloud Bot commented Aug 9, 2026

Copy link
Copy Markdown

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.

_merge_ical_todo_properties still rebuilds a VTODO from the partial update dict on any error

2 participants