Skip to content

Add REST Assured test exercising bounding box precision bug #11559 - #12698

Draft
tuannx wants to merge 1 commit into
IQSS:developfrom
tuannx:11559-bbox-precision-test
Draft

Add REST Assured test exercising bounding box precision bug #11559#12698
tuannx wants to merge 1 commit into
IQSS:developfrom
tuannx:11559-bbox-precision-test

Conversation

@tuannx

@tuannx tuannx commented Sep 11, 2026

Copy link
Copy Markdown

What this PR does / why we need it:
Adds a REST Assured integration test (testGeographicBoundingBoxHighPrecisionValidation in DatasetsIT) reproducing #11559:

  • Submits bounding box coordinates inverted at the 6th decimal place (southLatitude: "42.001001" > northLatitude: "42.001000").
  • On develop, Float.parseFloat() rounds both values to 42.001f, bypassing Bean Validation (south <= north passes) and crashing Solr indexing with InvalidShapeException.

Which issue(s) this PR closes:

Special notes for your reviewer:
This Draft PR contains only the reproduction test in a single commit.

We have the fix ready locally:

  • Switch coordinate validation in DatasetFieldValueValidator to BigDecimal.
  • Switch bounding box union aggregation in IndexServiceBean to BigDecimal.
  • Add unit tests in DatasetFieldValueValidatorTest.

Once this test is reviewed, we will push the fix commit to this PR.

Suggestions on how to test this:
mvn test -Dtest=DatasetsIT#testGeographicBoundingBoxHighPrecisionValidation

Does this PR introduce a user interface change?: No
Is there a release notes update needed for this change?: Yes (will include with the fix commit)

@pdurbin

pdurbin commented Sep 11, 2026

Copy link
Copy Markdown
Member

@tuannx thanks for the PR! We'll discuss it at Triage Tuesday and get back to you! 😄

@tuannx
tuannx force-pushed the 11559-bbox-precision-test branch from 08252d7 to 5152e19 Compare September 11, 2026 18:39
@tuannx

tuannx commented Sep 11, 2026

Copy link
Copy Markdown
Author

[ERROR] Failures:
[ERROR] DatasetsIT.testGeographicBoundingBoxHighPrecisionValidation:7555 1 expectation failed.
Expected status code (<400> or <403>) but was <201>.

Solr index:

Remote error message: ERROR: [doc=dataset_4_draft] Error adding field 'geolocation'='ENVELOPE(-71.0,-70.0,42.001000,42.001001)'
msg=Unable to parse shape given formats "lat,lon", "x y" or as WKT because
org.locationtech.spatial4j.exception.InvalidShapeException: maxY must be >= minY: 42.001001 to 42.001

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready for Triage

Development

Successfully merging this pull request may close these issues.

2 participants