[Debt] Split CalDAV discovery and sync-source creation orchestration #20

Closed
opened 2026-07-29 13:25:57 +02:00 by zemion · 2 comments
Owner

Problem

Fresh Xenon results identify discover_caldav_calendars (D/26) and create_sync_source (D/22) as the remaining Calendar decision-heavy paths. They combine URL normalization/discovery, credential handling, validation, persistence, and error mapping.

Acceptance criteria

  • Discovery transport, response parsing, validation, and API error translation are independently testable.
  • Sync-source construction separates local validation from credential persistence and remote probing.
  • Secrets never enter logs or response payloads.
  • Existing Nextcloud/general /dav discovery and edit behavior remains covered.
  • Calendar passes the configured Xenon threshold.
## Problem Fresh Xenon results identify `discover_caldav_calendars` (D/26) and `create_sync_source` (D/22) as the remaining Calendar decision-heavy paths. They combine URL normalization/discovery, credential handling, validation, persistence, and error mapping. ## Acceptance criteria - Discovery transport, response parsing, validation, and API error translation are independently testable. - Sync-source construction separates local validation from credential persistence and remote probing. - Secrets never enter logs or response payloads. - Existing Nextcloud/general `/dav` discovery and edit behavior remains covered. - Calendar passes the configured Xenon threshold. <!-- caldav-discovery-source-complexity-20260729 -->
Author
Owner

Codex State: reviewed

Reviewed after the current push. This remains open: fresh Xenon still reports discover_caldav_calendars and create_sync_source at rank D. Discovery transport/parsing and credential/persistence orchestration still need the separation described in the acceptance criteria.

## Codex State: reviewed Reviewed after the current push. This remains open: fresh Xenon still reports `discover_caldav_calendars` and `create_sync_source` at rank D. Discovery transport/parsing and credential/persistence orchestration still need the separation described in the acceptance criteria.
Author
Owner

Implemented and pushed in 4011e61.

CalDAV discovery now separates source lookup, credential-envelope resolution, secret selection, auth validation, client construction, transport/protocol parsing, response projection, and HTTP error translation. Sync-source creation now uses a secret-free local plan followed by independent calendar locking, one-source and URL uniqueness checks, ORM construction, credential persistence, and scheduling. Creation performs no implicit network request; discovery and sync remain explicit probes.

Secrets are excluded from discovery/plan reprs and response dictionaries. Existing Nextcloud/general DAV, reusable/internal credentials, source editing, and all sync backends remain covered.

Verification: 107 Calendar tests, Ruff, Xenon C/B/A, and diff checks pass.

Implemented and pushed in `4011e61`. CalDAV discovery now separates source lookup, credential-envelope resolution, secret selection, auth validation, client construction, transport/protocol parsing, response projection, and HTTP error translation. Sync-source creation now uses a secret-free local plan followed by independent calendar locking, one-source and URL uniqueness checks, ORM construction, credential persistence, and scheduling. Creation performs no implicit network request; discovery and sync remain explicit probes. Secrets are excluded from discovery/plan reprs and response dictionaries. Existing Nextcloud/general DAV, reusable/internal credentials, source editing, and all sync backends remain covered. Verification: 107 Calendar tests, Ruff, Xenon C/B/A, and diff checks pass.
zemion removed the
status
ready
codex/ready
labels 2026-07-29 19:14:22 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GovOPlaN/govoplan-calendar#20