Skip to content

CES-70 — ZIP import (replace mode; spec tests green) - #25

Merged
JMNofziger merged 3 commits into
mainfrom
cursor/ces-70-zip-import-40e4
Aug 21, 2026
Merged

CES-70 — ZIP import (replace mode; spec tests green)#25
JMNofziger merged 3 commits into
mainfrom
cursor/ces-70-zip-import-40e4

Conversation

@JMNofziger

@JMNofziger JMNofziger commented Aug 21, 2026

Copy link
Copy Markdown
Owner

Summary

Settings → Import data restores a ZIP the app produced itself. Mode is replace (locked): the four history tables are hard-deleted and re-inserted, settings is updated in place (local settings.id never overwritten), the outbox is cleared, drafts survive only when their vehicle is in the ZIP, and photo files are deleted after commit.

This is the zero-server device-to-device path specified in docs/specs/export-import.md. Merge is not built.

Spec tests + GitHub CI 5/5 are green on this branch. Remaining work is merge to main. Do not mark CES-70 Done, and do not unblock CES-71, until then. M2 stays 🟨.

What landed

  • client/lib/import/zip_read (central directory; STORE + injected DEFLATE), csv_parse, validate, plan, apply (single Drift txn), import_service (file_picker + ZLibDecoder(raw: true)).
  • Settings UI: client/lib/app/pages/import_data_section.dart under Export. Typed keyword REPLACE when local history is non-empty.
  • Header constants imported from client/lib/export/headers.dart (never copied).
  • client/test/import/ covering spec cases 1–17 plus header-constant drift.
  • Docs + delivery plan match that reality: Current focus remaining work is merge; CES-70 stays In Progress; CES-71 stays blocked.

Test evidence

Local (db26f36 and unchanged by the docs commit):

Command Result
cd client && flutter analyze No issues found
cd client && flutter test --no-pub test/import/ test/app/settings_page_test.dart 41 passed
cd client && flutter test --no-pub 303 passed, 1 skipped (CESTOVNI_E2E=1 + stub on :8787)
python3 ci/telemetry-gate.py PASS

GitHub CI on db26f365/5 SUCCESS (verify-fast telemetry-gate + client-test; verify-full client-test + client-android + client-ios). Docs-only follow-up commit does not change production code.

Spec 1–17 all PASS. Device 10k timing is not a CI gate (CES-68).

Linear hygiene

GitHub automation may flip CES-70 to Done when this PR is touched. Reset to In Progress until merge. CES-71 stays Backlog; after merge, import must still accept cadence_km (schema 1) and cadence_m (schema 2).

Open in Web Open in Cursor 

cursoragent and others added 3 commits August 21, 2026 11:38
Settings → Import data restores a self-produced export ZIP with replace
semantics. Header constants are shared from client/lib/export/. Automated
tests from spec § Test expectations are not written yet — do not mark
CES-70 Done or unblock CES-71 until they land on main.

Co-authored-by: JMNofziger <JMNofziger@users.noreply.github.com>
…rompt

Co-authored-by: JMNofziger <JMNofziger@users.noreply.github.com>
Land client/test/import/ covering the 17 spec cases. flutter analyze
clean; flutter test --no-pub 303 passed / 1 skipped (E2E); telemetry-gate
PASS. CES-70 stays In Progress until this is on main.

Co-authored-by: JMNofziger <JMNofziger@users.noreply.github.com>
@cursor cursor Bot changed the title CES-70 — ZIP import (replace mode; tests outstanding) CES-70 — ZIP import (replace mode; spec tests green) Aug 21, 2026
@JMNofziger
JMNofziger marked this pull request as ready for review August 21, 2026 12:43
@JMNofziger
JMNofziger merged commit 7670226 into main Aug 21, 2026
5 checks passed
@JMNofziger
JMNofziger deleted the cursor/ces-70-zip-import-40e4 branch August 21, 2026 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants