CalDAV: calendar-query ignores component and UID filters #1436

Closed
opened 2026-10-08 03:38:43 +00:00 by kayg · 4 comments
Owner

Severity: major.

Steps:

  1. Create two Journal VEVENTs through a real CalDAV client.
  2. REPORT the untagged calendar with a UID prop-filter and text-match never-existed-uid.
  3. REPORT the same calendar with a VTODO comp-filter.

Expected: no VEVENTs match either query. Unsupported filters must return the RFC 4791 supported-filter error instead of a successful unfiltered result.
Actual: both requests return HTTP 207 and both VEVENTs. The adapter uses the first descendant time-range only and ignores the component and property predicates.

Evidence: artifacts/bash3-interop/protocol-extra.json and protocol-extra.py, job/bash3-interop. Shared local production server source d395b6e25; vdirsyncer/khal created the fixtures. RFC 4791 sections 7.8 and 9.7 define these filters.

Filed separately from #1435. The overlap fix does not implement the filter grammar. A fix must validate the filter tree before reading providers and must cover component selection, property/text predicates, unsupported-filter errors and reminders filters. No core file needs to change.

Severity: major. Steps: 1. Create two Journal VEVENTs through a real CalDAV client. 2. REPORT the untagged calendar with a UID prop-filter and text-match `never-existed-uid`. 3. REPORT the same calendar with a VTODO comp-filter. Expected: no VEVENTs match either query. Unsupported filters must return the RFC 4791 supported-filter error instead of a successful unfiltered result. Actual: both requests return HTTP 207 and both VEVENTs. The adapter uses the first descendant time-range only and ignores the component and property predicates. Evidence: artifacts/bash3-interop/protocol-extra.json and protocol-extra.py, job/bash3-interop. Shared local production server source d395b6e25; vdirsyncer/khal created the fixtures. RFC 4791 sections 7.8 and 9.7 define these filters. Filed separately from #1435. The overlap fix does not implement the filter grammar. A fix must validate the filter tree before reading providers and must cover component selection, property/text predicates, unsupported-filter errors and reminders filters. No core file needs to change.
Author
Owner

Fixed in 321f1bc3a on job/bash3-interop. RFC 4791 section 7.8 permits the supported-filter precondition when the server cannot evaluate a predicate. The adapter now returns that explicit XML error before provider IO for unsupported component/property/parameter predicates and Reminder time predicates, instead of returning unrelated data. Existing simple discovery and Journal time-range queries remain supported. Regression failed with 207 before the fix; final gates and own-binary live checks are underway.

Fixed in 321f1bc3a on job/bash3-interop. RFC 4791 section 7.8 permits the supported-filter precondition when the server cannot evaluate a predicate. The adapter now returns that explicit XML error before provider IO for unsupported component/property/parameter predicates and Reminder time predicates, instead of returning unrelated data. Existing simple discovery and Journal time-range queries remain supported. Regression failed with 207 before the fix; final gates and own-binary live checks are underway.
Author
Owner

Refinement before final gates: recognized VTODO filters on an Event-only collection, and recognized VEVENT filters on Reminders, now return an empty 207. vdirsyncer date-limited listing submits both component queries. Unsupported property/parameter predicates and unsupported Reminder time predicates still return the RFC supported-filter 403. The only status expectations revised are the regression cases introduced by this job for #1436; existing tests are unchanged. Final head will replace the earlier 321f1bc3a after these gates pass.

Refinement before final gates: recognized VTODO filters on an Event-only collection, and recognized VEVENT filters on Reminders, now return an empty 207. vdirsyncer date-limited listing submits both component queries. Unsupported property/parameter predicates and unsupported Reminder time predicates still return the RFC supported-filter 403. The only status expectations revised are the regression cases introduced by this job for #1436; existing tests are unchanged. Final head will replace the earlier 321f1bc3a after these gates pass.
Author
Owner

Fixed on job/bash3-interop at 3aaf87fbef. This replaces the earlier local commit 321f1bc3a. Known VEVENT/VTODO components absent from a collection return empty 207, including date-filtered VTODO queries against a Journal collection. This preserves vdirsyncer date-filter discovery. Unsupported property, parameter, alarm and Reminder time predicates return 403 with the supported-filter precondition before provider IO. No baseline test expectation changed.

Regression output:

test result: ok. 63 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 8.53s
test result: ok. 40 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.12s
Fixed on job/bash3-interop at 3aaf87fbefa0c5b8454e75bef14d567bc6ee8b34. This replaces the earlier local commit 321f1bc3a. Known VEVENT/VTODO components absent from a collection return empty 207, including date-filtered VTODO queries against a Journal collection. This preserves vdirsyncer date-filter discovery. Unsupported property, parameter, alarm and Reminder time predicates return 403 with the supported-filter precondition before provider IO. No baseline test expectation changed. Regression output: ``` test result: ok. 63 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 8.53s test result: ok. 40 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.12s ```
Author
Owner

Deployed to calternal.cloud in merge round 35a (build cc1af3c12, live 2026-10-09 00:12 IST). Closing.

Deployed to calternal.cloud in merge round 35a (build cc1af3c12, live 2026-10-09 00:12 IST). Closing.
kayg closed this issue 2026-10-08 18:41:28 +00:00
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kayg/calternal-v0#1436
No description provided.