Skip to content

fix: sync() ignores removals of unknown objects; ci: no-HTTP-library job - #767

Merged
tobixen merged 3 commits into
masterfrom
fix/sync-unknown-removal
Oct 13, 2026
Merged

tobixen merged 3 commits into
masterfrom
fix/sync-unknown-removal

Conversation

@tobixen

@tobixen tobixen commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Three commits on two unrelated topics, bundled in one PR. The code and this text are AI-generated (Claude Opus 5.5).

  • ci: add a job with no HTTP library installed - the import-time "install caldav[niquests]" error was never exercised.
  • fix: sync() ignores removals of unknown objects - Nextcloud issue
  • test: create/delete a fresh calendar on trashbins - ecloud MKCALENDAR 405

🤖 Generated with Claude Code

Every job had requests, pulled in by Radicale, so the import-time
"install caldav[niquests]" error was never exercised.  The new job
removes all HTTP libraries, checks that both clients name the extra
and their own sync or async mode, and runs test_http_libraries.py,
whose four tests that need a real library now skip when none is
installed.

Prompt: work on the list 1-8. [a list of low-input tasks proposed in the session; this one: the "no HTTP library" CI job from caldav's docs/design/tmp-todo-http-library-tests.md]

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
Nextcloud keeps a deleted object in its trashbin as <uid>-deleted.ics,
and when an object with the same UID is added again it purges the
trashed copy and lists it as removed in the sync-collection report.
sync() returned it as deleted although the collection never held it,
failing testSync on ecloud whenever a previous run had left ev3 in the
trashbin; the same goes for a member that is gone by the time it is
loaded.  testObjectBySyncToken counted the removal, which
get_objects_by_sync_token() rightly lists, and now leaves it out.  Not
a regression: the code before deleted_urls reported it too.

Prompt: FAILED tests/test_caldav.py::TestForServerecloud::testSync - assert 1 == 0 (from ~/caldav-with-passwords [= the local clone holding the external test server credentials]).  (but don't run it just now, I'm having a rerun going at the moment)
Followup-Prompt: It failed again.  Feel free to try a git bisect [= the ecloud testSync rerun failed]
Followup-Prompt: try again, thrashbin (sic) has been deleted
Followup-Prompt: fix [= go ahead with making sync() skip removals of unknown objects, and the sync-token test not count them]

Assisted-By: Claude Opus 5.5 (Claude Code)
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
testCreateDeleteCalendar deleted the shared pythoncaldav-test calendar
and created it again, ignoring delete-calendar.free-namespace.  On
ecloud the delete moves it to the trashbin, so the MKCALENDAR got a
405 on every run, and the tests reusing that calendar lost it.  Its
async twin, with an id of its own, got the 405 from the second run on.
Where deleting does not free the id, both now use a fresh id per run,
which leaves one calendar per run in the trashbin to be emptied by hand.

Prompt: What two ecloud failures? [= the two ecloud failures in a full test run that were not sync-related]
Followup-Prompt: please rerun those tests.  If they are flakey but eventuallypasses (sic), then /calendar-todo.  No github issue needed.  If they fail all the time, it needs to be researched and fixed before 3.5.0 is released. [= ecloud testLoadEvent, which passed 3 of 3, and testCreateDeleteCalendar, which failed 3 of 3]

Assisted-By: Claude Opus 5.5 (Claude Code)
Reviewed-by: Tobias Brox <tobias@redpill-linpro.com>
@tobixen
tobixen merged commit 4a3b21a into master Oct 13, 2026
27 of 28 checks passed
@tobixen
tobixen deleted the fix/sync-unknown-removal branch October 14, 2026 16:06
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.

1 participant