Skip to content

test(engine): cover feature-service PBF dimension losses - #2668

Merged
Mavrick-F merged 1 commit into
opengeos:mainfrom
Mavrick-F:t3/binary-loss-fixtures
Nov 22, 2026
Merged

Mavrick-F merged 1 commit into
opengeos:mainfrom
Mavrick-F:t3/binary-loss-fixtures

Conversation

@Mavrick-F

@Mavrick-F Mavrick-F commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Summary

Add paired feature-service PBF fixtures for dropped point heights and measures, using one clean XY answer and separate XYZ/XYM answers (342 bytes total). The corpus requires exact retained fractional XY, fields, attributes, feature identity, and the native/layer.addData one-feature loss notice; the clean answer must give no notice. This exercises the feature-service parser separately from OSM PBF.

The fixtures were independently wire-encoded and checked with a parser generated from the published schema. They do not certify other geometry/attribute losses or network paging. LAS/LAZ remain a paired-corpus gap: elevations are retained as attributes, and their reported-loss paths require coordinate-conversion cases, oversized sampling or damaged files.

The shared command serves desktop, CLI, Python and the phone; this adds native integration evidence, while browser fixture ingestion is not separately exercised. No production, interface, schema or undo behavior changes.

Testing

  • Focused never_silent_reading corpus, integration Clippy with warnings denied, and formatting.
  • Independent generated-schema decode of all three fixtures.
  • Full fork CI passed on 18394f08faf674ae65554c3d174b9f29fb4977c0, including Linux peak memory, wasm and licences.
  • Local submission preflight and publication guards.

UI evidence

No visible UI change.

Related issue

Part of the ROADMAP reader-loss corpus work.

Summary by CodeRabbit

  • Tests
    • Expanded coverage for Feature-service PBF imports, including checks for preserved point data and notices when height or measure values are lost.
  • Documentation
    • Added guidance on the PBF fixtures and clarified dimension-loss coverage across supported formats.

@coderabbitai

coderabbitai Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The PR documents Feature-service PBF fixtures for clean XY and lossy XYZ and XYM data. Integration tests check retained point data and expected loss notices from native reading and layer.addData.

Changes: Feature-service PBF reading-loss coverage

Layer / File(s) Summary
Document fixture coverage
ATTRIBUTION.md, ROADMAP.md, crates/engine/testdata/reading-losses/README.md
The documentation describes the clean XY and lossy XYZ and XYM fixtures, records separate Z- and M-loss coverage, and identifies the fixture source and license.
Check reader and import behavior
crates/engine/tests/integration/never_silent_reading.rs
Integration tests check retained geometry, coordinates, ID, and attributes. They verify that clean input produces no loss notice and lossy input produces the expected notice from native reading and layer.addData.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related issues

  • opengeos/RustGIS#2639: The PR checks that clean input produces no loss notice and lossy input produces the expected notice.
  • opengeos/RustGIS#748: The PR tests the Feature-service PBF reader path and its Z- and M-loss notices.

Possibly related PRs

  • opengeos/RustGIS#1327: This PR tests the Feature-service PBF reader and loss notices implemented by that PR.

Suggested reviewers: giswqs, ro9er117911

Merge Risk: Minimal · up to 18394

This change adds test fixtures and documentation for feature-service PBF dimension-loss coverage and does not alter production behavior. No actionable merge risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "test(engine): cover feature-service PBF dimension losses" matches the main change. The PR adds paired feature-service PBF fixtures and integration tests for Z and M dimension losses in the …
Description check Passed The description follows the repository template's Summary, Testing, UI evidence, and Related issue sections. The Summary explains the fixtures and their scope, and the Testing section lists focused co…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "test(engine): cover feature-service PBF dimension losses" matches the main change. The PR adds paired feature-service PBF fixtures and integration tests for Z and M dimension losses in the reading-loss corpus. The title is specific and concise, and it follows a conventional commit style.

Full details: Description check

Explanation

The description follows the repository template's Summary, Testing, UI evidence, and Related issue sections. The Summary explains the fixtures and their scope, and the Testing section lists focused corpus tests, Clippy, formatting, independent decoding, and a CI run. UI evidence correctly states no visible UI change, and Related issue references the ROADMAP reader-loss corpus work. The Related issue entry does not use a formal issue reference such as Part of #N, so a reviewer may want to link the tracking issue if one exists.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit checks each point in view,
XY stays crisp; Z and M loss too.
Clean files pass without a sound,
While loss notices mark what’s found.
The burrow’s tests now cover the ground.

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 89b21ac3-a960-41f8-afd1-1e6050906d03
Commits

Reviewing files that changed from the base of the PR and between 0b55b34 and 18394f0.

Files selected for processing: 7

  • ATTRIBUTION.md
  • ROADMAP.md
  • crates/engine/testdata/reading-losses/README.md
  • crates/engine/testdata/reading-losses/feature-xy.pbf
  • crates/engine/testdata/reading-losses/feature-xym.pbf
  • crates/engine/testdata/reading-losses/feature-xyz.pbf
  • crates/engine/tests/integration/never_silent_reading.rs

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

Z/M message for the height variant (none otherwise). Valid lossy fixtures must import.
Dates, error cells, other sheets and broader type/encoding fidelity are not certified.

## Feature-service PBF

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quality, not a blocker: the new feature-service section gives no SHA-256 checksums for the three .pbf files and doesn't commit the generator, while OSM.md records a SHA-256 table for its fixtures. A reviewer can't re-check the byte claims (100 and 121 bytes, WKID 4326, scale 0.5, translation (10, 20), Z 37) against the committed files. Adding a checksum table here, or a short note on where the encoder lives, would match the OSM section.

Category: quality

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The committed files were independently decoded with a parser generated from the linked published schema, checking their flags, transforms, coordinates, fields and attributes. The corpus also checks exact retained data and loss notices on the native and command paths. The one-off encoder stays outside this contribution.

A README checksum table is left for the release quality pass.

@github-actions

Copy link
Copy Markdown
Contributor

Code review

I found no bugs, crash paths, security problems, performance problems, or AGENTS.md breaks. The new feature-service PBF cases check out against the code they exercise. Two quality points remain, and I left the rest of the nits in the summary.

Checked

  • esripbf::read returns (Dataset, ReadReport), and zm_note(Some(1)) produces the "1 feature had Z or M values" text the test expects. The Imported(...) substring match holds.
  • The native and layer.addData assertions are exact on the lossy message list and empty on the clean file, so clean XY gives no notice.
  • Dataset::zm_dropped is set from with_zm > 0, so the XYZ and XYM cases are driven correctly.
  • Fixture sizes match the stats (100, 121, 121 bytes) and the README's coordinate arithmetic is right: 3×0.5+10 = 11.5 and −5×0.5+20 = 17.5.
  • The ATTRIBUTION row and the README anchor (#feature-service-pbf) resolve.
  • The new lines fit max_width = 140.

Quality

  • The README feature-service section has no SHA-256 checksums and doesn't commit the encoder, unlike OSM.md. Reviewers can't re-check the byte claims. Posted inline on crates/engine/testdata/reading-losses/README.md:137. Confidence: high that the gap exists; low that it matters for merge.
  • The ROADMAP edit at lines 22–24 leaves a short, awkward line ("…and WKT" / "height/member losses…"). Reflowing it is a cosmetic fix. Confidence: high.
  • pbf_lossy in the read helper is inferred by comparing bytes to the clean fixture rather than passed from the case. It works, but it is fragile if the fixture path changes. Confidence: medium.

Not verified: I couldn't decode the binary .pbf files or run the tests, since I have no shell here. The byte-level claims rest on the PR's own description and its fork CI run.

Prior concerns: none. prior-reviews.json had no threads, so nothing was left alone.

Change size

Compared with main (merge base 35abb81 to PR head 18394f0).

Measure Value
Files changed 7 (added 3, modified 4, removed 0, renamed 0)
Size before 84.0 KB
Size after 88.9 KB
Total size change +4.8 KB
Path Before After Change
crates/engine/tests/integration/never_silent_reading.rs 40.1 KB 42.9 KB +2.7 KB
crates/engine/testdata/reading-losses/README.md 11.3 KB 12.6 KB +1.3 KB
ATTRIBUTION.md 12.4 KB 12.8 KB +362 B
crates/engine/testdata/reading-losses/feature-xym.pbf 0 B 121 B +121 B
crates/engine/testdata/reading-losses/feature-xyz.pbf 0 B 121 B +121 B
crates/engine/testdata/reading-losses/feature-xy.pbf 0 B 100 B +100 B
ROADMAP.md 20.2 KB 20.3 KB +60 B

@Mavrick-F

Copy link
Copy Markdown
Member Author

The ROADMAP reflow is left for the release quality pass.

pbf_lossy compares bytes deliberately: both cases use the same clean fixture, included at compile time. Renaming its path requires updating that reference or produces a compile error; it does not change the comparison. A broader case-metadata scheme can also wait for the release quality pass.

@github-actions

Copy link
Copy Markdown
Contributor

📖 Docs preview

Item Value
Preview https://preview.rustgis.app/pr-2668/
Web app https://preview.rustgis.app/pr-2668/app/
Commit 18394f0

GitHub Pages takes a minute or two to publish a new commit. Newer commits from the fork aren't published until a maintainer adds the preview label (once per commit).

@Mavrick-F
Mavrick-F added this pull request to the merge queue Nov 22, 2026
Merged via the queue into opengeos:main with commit 8265123 Nov 22, 2026
26 checks passed
@Mavrick-F
Mavrick-F deleted the t3/binary-loss-fixtures branch November 22, 2026 09:34
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.

1 participant