Skip to content

Validate integer-valued floating-point inputs consistently - #97

Merged
quinnj merged 1 commit into
masterfrom
maintenance/jsonschema-integer-floats
Oct 4, 2026
Merged

quinnj merged 1 commit into
masterfrom
maintenance/jsonschema-integer-floats

Conversation

@quinnj

@quinnj quinnj commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Validating Float32(3) against type="integer" returned a type error, although Float64(3) passed. The same mismatch affected Float16 and BigFloat, including values inside arrays and object properties.

Apply the existing isinteger check to AbstractFloat. This follows draft-07 section 6.1.1, which defines integer instances by their fractional part. It avoids converting large values to a machine integer. Fractions, NaN, infinities, and Boolean instances remain rejected by integer schemas.

Validation:

  • All 111 public regression assertions pass on Julia 1.9.4 and 1.13.1. The prior tree passes 77 and fails 34 on both versions.
  • Full package suites pass 5,799 assertions on both versions with bounds checks.
  • Controls cover Float16/32/64/BigFloat, signed zero, nullable unions, nested error locations, existing Float64 behavior, and a BigFloat above machine-integer range.
  • JuliaFormatter 2.14.0, git diff --check, and an independent private review pass. All seven hosted checks pass at 03750bbf34430956460496a8664b93e69e5f87bb. All six native coverage uploads were accepted for the correct repository/head and finished processing; aggregate coverage is 96.46%. The ordinary squash merge is bcaa1be86dee593e917daf200d1208d3d2d49eb7, whose tree equals the locally tested head. Both main workflows and all seven jobs pass; all six main uploads were also accepted and processed at 96.46%.

Co-authored by Codex

AI disclosure: This work was prepared with assistance from OpenAI Codex.

Apply the existing zero-fraction check to AbstractFloat and cover public scalar, nullable, property, and array validation.

AI disclosure: This work was prepared with assistance from OpenAI Codex.
@quinnj
quinnj merged commit bcaa1be into master Oct 4, 2026
7 checks passed
@quinnj

quinnj commented Oct 4, 2026

Copy link
Copy Markdown
Member Author

Merged as bcaa1be86dee593e917daf200d1208d3d2d49eb7 after all seven head checks passed and all six exact-head coverage uploads were accepted and processed. The merged tree equals the reviewed and locally tested head. Both main workflows now pass all seven jobs; all six main uploads were accepted for this repository/commit and processed (96.46%). Local full suites passed 5,799 assertions on Julia 1.9.4 and 1.13.1.

AI disclosure: This work was prepared with assistance from OpenAI Codex.

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