CES-70 — ZIP import (replace mode; spec tests green) - #25
Merged
Conversation
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>
JMNofziger
marked this pull request as ready for review
August 21, 2026 12:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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,
settingsis updated in place (localsettings.idnever 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)).client/lib/app/pages/import_data_section.dartunder Export. Typed keywordREPLACEwhen local history is non-empty.client/lib/export/headers.dart(never copied).client/test/import/covering spec cases 1–17 plus header-constant drift.Test evidence
Local (
db26f36and unchanged by the docs commit):cd client && flutter analyzecd client && flutter test --no-pub test/import/ test/app/settings_page_test.dartcd client && flutter test --no-pubCESTOVNI_E2E=1+ stub on:8787)python3 ci/telemetry-gate.pyGitHub CI on
db26f36— 5/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) andcadence_m(schema 2).