[Feature] Add sync-state model and conflict handling for address books #6

Closed
opened 2026-07-13 00:53:46 +02:00 by zemion · 2 comments
Owner

Goal

Prepare external sync before implementing individual connectors.

Scope

  • connector/source configuration records
  • sync direction: read-only, one-way import, one-way export, two-way
  • external IDs, ETags, revisions, sync tokens, tombstones, and last sync metadata
  • conflict records and explicit conflict status
  • sync diagnostics and audit events
  • dry-run/preview data model

Acceptance Criteria

  • A connector can report planned creates/updates/deletes before applying them.
  • Sync failures are visible in the UI.
  • Conflicts are persisted and never silently overwrite data.

See govoplan-addresses/docs/ADDRESS_MODULE_ARCHITECTURE.md and govoplan-addresses/docs/IMPLEMENTATION_PLAN.md.

## Goal Prepare external sync before implementing individual connectors. ## Scope - connector/source configuration records - sync direction: read-only, one-way import, one-way export, two-way - external IDs, ETags, revisions, sync tokens, tombstones, and last sync metadata - conflict records and explicit conflict status - sync diagnostics and audit events - dry-run/preview data model ## Acceptance Criteria - A connector can report planned creates/updates/deletes before applying them. - Sync failures are visible in the UI. - Conflicts are persisted and never silently overwrite data. See `govoplan-addresses/docs/ADDRESS_MODULE_ARCHITECTURE.md` and `govoplan-addresses/docs/IMPLEMENTATION_PLAN.md`.
zemion added the
type
feature
priority
p1
module/addresses
status
ready
area/db
area/api
labels 2026-07-13 00:53:46 +02:00
Author
Owner

Codex State: progress

Summary

  • Implemented connector-neutral address sync backend substrate: sync sources, attempt transitions, diagnostics, tombstones, conflicts, and read-only propagation.
  • Updated address architecture/implementation docs to mark Milestone 6 as partially implemented and keep CardDAV/UI/dry-run/audit events open.

Changed Files

  • src/govoplan_addresses/backend/db/models.py
  • src/govoplan_addresses/backend/migrations/versions/e1f2a4b5c6d_addresses_sync_infrastructure.py
  • src/govoplan_addresses/backend/service.py
  • src/govoplan_addresses/backend/router.py
  • src/govoplan_addresses/backend/schemas.py
  • tests/test_addresses_service.py
  • docs/ADDRESS_MODULE_ARCHITECTURE.md
  • docs/IMPLEMENTATION_PLAN.md

Verification

  • PYTHONPATH=/mnt/DATA/git/govoplan-addresses/src:/mnt/DATA/git/govoplan-core/src /mnt/DATA/git/govoplan/.venv/bin/python -m unittest tests.test_addresses_service -> OK
  • git diff --check -> OK

Next / Blocked

  • Still open for #6: dry-run/preview, audit events, and UI for sync source diagnostics/conflicts.

Suggested status label: status/in-progress

## Codex State: progress ### Summary - Implemented connector-neutral address sync backend substrate: sync sources, attempt transitions, diagnostics, tombstones, conflicts, and read-only propagation. - Updated address architecture/implementation docs to mark Milestone 6 as partially implemented and keep CardDAV/UI/dry-run/audit events open. ### Changed Files - `src/govoplan_addresses/backend/db/models.py` - `src/govoplan_addresses/backend/migrations/versions/e1f2a4b5c6d_addresses_sync_infrastructure.py` - `src/govoplan_addresses/backend/service.py` - `src/govoplan_addresses/backend/router.py` - `src/govoplan_addresses/backend/schemas.py` - `tests/test_addresses_service.py` - `docs/ADDRESS_MODULE_ARCHITECTURE.md` - `docs/IMPLEMENTATION_PLAN.md` ### Verification - `PYTHONPATH=/mnt/DATA/git/govoplan-addresses/src:/mnt/DATA/git/govoplan-core/src /mnt/DATA/git/govoplan/.venv/bin/python -m unittest tests.test_addresses_service -> OK` - `git diff --check -> OK` ### Next / Blocked - Still open for #6: dry-run/preview, audit events, and UI for sync source diagnostics/conflicts. Suggested status label: `status/in-progress`
Author
Owner

Codex State: done

Summary

  • Completed the address sync infrastructure slice: dry-run preview, audit hooks, source diagnostics/conflicts/tombstones UI, and verified sync state transitions.

Changed Files

  • src/govoplan_addresses/backend/service.py
  • src/govoplan_addresses/backend/router.py
  • src/govoplan_addresses/backend/schemas.py
  • webui/src/features/addressbook/AddressBookPage.tsx
  • webui/src/api/addresses.ts

Verification

  • python -m unittest tests.test_addresses_service -> OK
  • npm run build in govoplan-core/webui -> OK
## Codex State: done ### Summary - Completed the address sync infrastructure slice: dry-run preview, audit hooks, source diagnostics/conflicts/tombstones UI, and verified sync state transitions. ### Changed Files - `src/govoplan_addresses/backend/service.py` - `src/govoplan_addresses/backend/router.py` - `src/govoplan_addresses/backend/schemas.py` - `webui/src/features/addressbook/AddressBookPage.tsx` - `webui/src/api/addresses.ts` ### Verification - `python -m unittest tests.test_addresses_service -> OK` - `npm run build in govoplan-core/webui -> OK`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: add-ideas/govoplan-addresses#6
No description provided.