[Feature] Add reusable CSV and XLSX contact import mapping profiles #19

Closed
opened 2026-08-02 07:07:23 +02:00 by zemion · 1 comment
Owner

Goal

Turn recurring tabular contact files into previewable, repeatable one-way imports instead of ad-hoc destructive uploads.

Parent: #8. Related shared diagnostics contract: GovOPlaN/govoplan-connectors#8.

Direction And Boundary

  • Direction is static/one-way import only. A file is never treated as a writable remote address book.
  • Files and Datasources may supply an input reference when present, but direct upload must work without either module.
  • Addresses owns the domain mapping/result; Dataflow remains the place for arbitrary transformations.

Scope

  • Saved, scoped, versioned mapping profiles for CSV delimiter/encoding/header choices and XLSX sheet/header selection.
  • Map columns to names, organizations, contact points, tags, source keys, visibility, and provenance.
  • Required-field validation, duplicate source-key policy, blank-value policy, locale-aware normalization, and explicit create/update/ignore choices.
  • Bounded dry-run with row diagnostics, quality warnings, counts, sample results, and no mutation.
  • Staged commit with idempotency key, immutable input hash, result evidence, and rollback/compensation record.
  • Do not execute spreadsheet formulas or macros; enforce input/row/cell limits and diagnose unsupported content.
  • UI for upload, profile selection/editing, preview, correction download, and confirmed import.
  • Tests for encoding, delimiters, sheets, malformed rows, duplicate keys, limits, unchanged reruns, and partial validation failures.

Acceptance Criteria

  • A power user can save a mapping and reuse it for a later file with the same shape.
  • Preview and commit use the same validated plan and input hash.
  • Import never silently drops malformed rows or destroys the supplied representation.
  • Repeating a committed import is idempotent or produces an explicit update plan.
## Goal Turn recurring tabular contact files into previewable, repeatable one-way imports instead of ad-hoc destructive uploads. Parent: #8. Related shared diagnostics contract: GovOPlaN/govoplan-connectors#8. ## Direction And Boundary - Direction is static/one-way import only. A file is never treated as a writable remote address book. - Files and Datasources may supply an input reference when present, but direct upload must work without either module. - Addresses owns the domain mapping/result; Dataflow remains the place for arbitrary transformations. ## Scope - Saved, scoped, versioned mapping profiles for CSV delimiter/encoding/header choices and XLSX sheet/header selection. - Map columns to names, organizations, contact points, tags, source keys, visibility, and provenance. - Required-field validation, duplicate source-key policy, blank-value policy, locale-aware normalization, and explicit create/update/ignore choices. - Bounded dry-run with row diagnostics, quality warnings, counts, sample results, and no mutation. - Staged commit with idempotency key, immutable input hash, result evidence, and rollback/compensation record. - Do not execute spreadsheet formulas or macros; enforce input/row/cell limits and diagnose unsupported content. - UI for upload, profile selection/editing, preview, correction download, and confirmed import. - Tests for encoding, delimiters, sheets, malformed rows, duplicate keys, limits, unchanged reruns, and partial validation failures. ## Acceptance Criteria - A power user can save a mapping and reuse it for a later file with the same shape. - Preview and commit use the same validated plan and input hash. - Import never silently drops malformed rows or destroys the supplied representation. - Repeating a committed import is idempotent or produces an explicit update plan.
Author
Owner

Implemented in 2c42102 and pushed to main. Added versioned tenant/user/group/system CSV and XLSX mapping profiles, bounded preview with row diagnostics and correction export, deterministic apply plans, optimistic conflict checks, idempotent apply, guarded rollback, and the Address Book import UI. Internal before-images remain private rollback evidence. Verification: all 45 Addresses tests, fresh Alembic migration, Ruff, WebUI production build/bundle budget, and diff checks pass.

Implemented in 2c42102 and pushed to main. Added versioned tenant/user/group/system CSV and XLSX mapping profiles, bounded preview with row diagnostics and correction export, deterministic apply plans, optimistic conflict checks, idempotent apply, guarded rollback, and the Address Book import UI. Internal before-images remain private rollback evidence. Verification: all 45 Addresses tests, fresh Alembic migration, Ruff, WebUI production build/bundle budget, and diff checks pass.
zemion removed the codex/ready
status
ready
labels 2026-08-02 15:40:11 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GovOPlaN/govoplan-addresses#19