fix(indexing): validate index-array bounds during JSON loading - #4347
Merged
Conversation
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Correct mathematical API documentation to match supported coordinate, grid, and chunk projection contracts. Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Retain the existing unsigned selector fix and update the unsupported mixed-dependency error assertion for general intersection routing. Assisted-by: Codex:GPT-6
…oundaries Assisted-by: Codex:GPT-6
Use lexicographic tuple grouping when chunk indices contain negative values. Cover shared one-axis and two-axis array dependencies, repeated points, and extreme signed coordinates. Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Documentation build overview
24 files changed ·
|
Remove implementation history and unsupported historical claims from source and test docstrings. Distinguish immutable coordinate mappings from mutable source values. Assisted-by: Codex:GPT-6
Assisted-by: Codex:GPT-6
Preserve bounds-rejection behavior and documentation while incorporating the merged audit and planner improvements. Assisted-by: Codex:GPT-6
Accept valid finite and one-sided bounds with eager validation shared by both JSON loaders. Validate before affine adjustment and simplification; immutable validated maps need no retained constraint. Assisted-by: Codex:GPT-6
d-v-b
marked this pull request as ready for review
September 14, 2026 11:07
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This AI-authored
zarr-indexingPR ensures that we respect bounded coordinate domains.🤖 AI text below 🤖
JSON loading must enforce
index_array_boundsinstead of ignoring them. BothIndexTransform.from_jsonandoutput_index_map_from_jsonnow validate every supplied raw index value against the inclusive interval before offset, stride, or map simplification.Valid finite and one-sided bounds are accepted. Values outside the interval raise
NdselError("invalid_json", ...)immediately, including for singleton arrays and zero-stride maps. Empty arrays satisfy any well-formed, ordered interval. Both loaders validate the interval's syntax and ordering, sharing the message layer's validator. Omitted or explicitly unbounded intervals avoid an additional value scan.The validation is eager: a map containing an invalid entry is rejected even if a subsequent selection would avoid that position. Once the index coordinates have been validated and stored immutably, bounds need not be carried through later map operations. Serialization emits unconstrained bounds for non-degenerate maps; message normalization preserves the supplied bounds. This does not provide deferred, per-position validation or exact preservation of constraint metadata through engine round trips.
TensorStore's bounds documentation explicitly permits omitting bounds after indices have been validated.
Validation:
Corresponding fork review: d-v-b#335.