Skip to content

Commit 2187530

Browse files
tobixenclaude
andcommitted
fix: diff to show the default rather than "unknown"
This (including the rest of the commit message) was AI-generated. In `_compute_diff`, the expected support was derived via a raw dict lookup on `expected_all` with "unknown" as the fallback. Features not explicitly listed in the server profile (e.g. most features absent from the xandikos compatibility hints) were therefore shown as expected="unknown" in the diff output, instead of their actual default ("full" for standard server-features). Fix by replacing the raw lookup with `self.expected_features.is_supported()` which traverses the feature hierarchy and applies FeatureSet defaults. prompt: why does `caldav-server-tester --name xnadikos --diff` report the expectations as "unknown" rather than default "full"? search.recurrences.expanded.exception is now reported to be supported by xandikos, while it's configured in ~/caldav/caldav/compatibility_hints.py to be unsupported. Please check if this is due to code changes on our side (either here or in the caldav library) or xandikos side. Also, why is this visible when doing `cd ~/caldav ; pytest -k 'xandikos and compat' --pdb`, but `pytest -k 'xandikos` passes without problems? Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 46f23f5 commit 2187530

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ This file should adhere to [Keep a Changelog](https://keepachangelog.com/en/1.1.
66

77
This project should adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), though some earlier releases may be incompatible with the SemVer standard.
88

9+
## [Unreleased]
10+
11+
### Fixed
12+
- `--diff` reported expected support as `unknown` for features not explicitly listed in the server profile. `_compute_diff` now uses `is_supported()` to resolve defaults (typically `full`) instead of falling back to a hard-coded `"unknown"`.
13+
914
## [1.1] - 2026-04-24
1015

1116
This release works with caldav 3.2 and higher.

src/caldav_server_tester/checker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def _compute_diff(self) -> dict:
172172
all_keys = set(observed) | set(expected_all)
173173
for key in all_keys:
174174
obs_support = observed.get(key, {}).get("support", "unknown")
175-
exp_support = expected_all.get(key, {}).get("support", "unknown")
175+
exp_support = self.expected_features.is_supported(key, str)
176176
if obs_support != exp_support:
177177
diff[key] = {"expected": exp_support, "observed": obs_support}
178178
return diff

0 commit comments

Comments
 (0)