Repository navigation
test: verify counted loss notices for every export - #2231
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
| } else { | ||
| "its geometry has no Z or M values, which were dropped when wells was read".into() | ||
| }; | ||
| assert_eq!(notes, [&format!("{}: {loss}", path.display())], "stream {stream}"); |
There was a problem hiding this comment.
Likely failing for stream == true. The streamed GeoJSON and CSV paths never see the counted reader note, so this exact-match assertion should fail on the first export.
Why: share.exportLayer takes the chunk branch for streamed .geojson (export::streams includes geojson and csv; share.rs:723). That branch calls chunk_export() and write_source_to, neither of which carries info.notes. unreadable stays Unreadable::default(), so zm_noted is false and coalesce_read_zm keeps only the generic zm_export_note. The result is "<path>: its geometry has no Z or M values, which were dropped when wells was read", not the wells: 1 feature had Z or M values… text this test expects. data.convert to .csv has the same shape: its chunk branch (workflows.rs:1903-1928) builds notes from export_notes and never reads info.notes.
The counted note only reaches the export on the load_all_counted path (share.rs:724-725, workflows.rs:1930-1943), which streamed GeoJSON and CSV skip.
The PR body also says the focused test result is still pending, so this probably hasn't been run. Please run cargo test -p rustgis-engine dropped_z_values_are_said_on_import_and_export before merging.
Either the chunk branches need to carry the reader's counted Z/M note (and set zm_noted), or the streamed expectation needs to be the generic wording. The comment at lines 23011-23012 ("A counted reader diagnostic replaces the generic export warning") describes behaviour the chunk path doesn't have.
Code reviewBugs
Security
Performance
Quality
AGENTS.md
Confidence notes
Change sizeCompared: the whole PR against main (merge base 225f9b6 to PR head 43534f5).
|
📖 Docs preview
GitHub Pages takes a minute or two to publish a new commit. |
Summary
The Linux regression in #2196 expected the old generic Z/M warning after a streamed export. Streamed reads now preserve a more precise counted diagnostic, so the assertion failed despite the loss being reported.
Update the regression to require exactly one output-qualified loss notice for each export and conversion: a counted reader notice for streamed data and the prior-loss notice for resident data. Repeating the export also verifies that each output receives its own complete notice without duplicates.
Testing
dropped_z_values_are_said_on_import_and_exporttest is running; its result is pending.UI evidence
No visible UI change. This first commit only changes a regression test.
Surfaces and provenance
The regression exercises the shared engine export and conversion commands used by desktop, browser, CLI, Python, mobile, Assistant/MCP and plugins. No command interface, saved format or undo behavior changes. No external project code was followed.
Related issue
Follow-up to #2196. Mobile picker review fixes will be added to this same PR when ready.
Summary by CodeRabbit