-
Notifications
You must be signed in to change notification settings - Fork 0
background migration context
Several design choices in CSV Align come from moving behavior out of runtime-specific paths and into shared contracts. Understanding these migrations helps avoid reintroducing drift.
Around Apr 18, 2026, app logic consolidated into src/backend/workflow.rs. Axum handlers in src/api/handlers.rs and Tauri commands in src-tauri/src/commands.rs now call the same functions for load, compare, export, pair-order, and snapshots.
Snapshot loading is deliberately strict. src/backend/comparison_snapshot.rs checks the version first, then src/backend/persistence/v1/mod.rs validates file metadata, virtual headers, mappings, results, and recomputed summary. This protects read-only loaded results from inconsistent persisted files.
Desktop file upload uses load_csv_bytes in src-tauri/src/commands.rs, with raw bytes sent from frontend/src/services/tauri.ts. This replaced JSON number-array transport for large files because raw IPC reduces allocation and parse overhead.
tests/transport_parity_integration.rs exists because browser tests can pass even when desktop invoke registration drifts. Keep it in mind when adding commands or routes.
| File | Purpose |
|---|---|
src/backend/workflow.rs |
Shared workflow layer. |
src/api/handlers.rs |
HTTP adapter. |
src-tauri/src/commands.rs |
Desktop adapter. |
src/backend/persistence/v1/mod.rs |
Snapshot validation. |
tests/transport_parity_integration.rs |
Cross-runtime contract test. |
See transport parity for current rules.