Skip to content

fix(indexing): audit factual contracts and close validation gaps - #4345

Draft
d-v-b wants to merge 11 commits into
zarr-developers:mainfrom
d-v-b:codex/zarr-indexing-factual-audit
Draft

fix(indexing): audit factual contracts and close validation gaps#4345
d-v-b wants to merge 11 commits into
zarr-developers:mainfrom
d-v-b:codex/zarr-indexing-factual-audit

Conversation

@d-v-b

@d-v-b d-v-b commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

AI-authored PR based on the results of fact-checking factual statements in docstrings and documentation in zarr-indexing. A lot of alleged falsehoods an inaccuracies were found. I haven't confirmed all of these, but I am reasonably confident that this change makes these descriptions more accurate.

🤖 AI text below 🤖

Correct factual claims in zarr-indexing's documentation, source comments, examples, and testing contracts, and fix the correctness defects exposed while checking those claims.

Runtime changes:

  • Reject mixed boolean/integer wire arrays and coordinates outside intp before NumPy can coerce or wrap them.
  • Reject computed canonical bounds outside signed 64-bit range and enforce the existing input-rank limit consistently across message forms, preserving normalization idempotence.
  • Route intersections with shared affine/index-array dependencies to the explicit unsupported path instead of returning extra coordinates. Planning this mixed case now raises NotImplementedError, consistent with its general classification.
  • Group signed chunk-coordinate tuples without collisions; distinct chunks such as (-1, 0) and (0, -1) must remain separate.

Expand regression coverage across integer widths, indexing modes, origins, normalization boundaries, map order, negative chunk IDs, repeated points, and one-/two-axis dependencies. Keep main's existing unsigned-selector fix.

The documentation now distinguishes structural box classification from density/order, actual NumPy compatibility from tested examples, metadata inspection from tokenization reads, and parent partition context from direct part resolution. It also corrects TensorStore wire/partition comparisons, cache and benchmark claims, and source integration descriptions. Finite index_array_bounds remain unenforced during engine loading and are explicitly documented as a limitation.

Validation against ba883a556 (also the upstream main revision at submission):

  • Full package tests and doctests: 1,521 passed, no skips, including TensorStore 0.1.84 and Dask 2026.8.0.
  • Strict documentation build passed.
  • Applicable changed-file repository checks passed, including Ruff, mypy, codespell, and numpydoc.
  • Package Pyright check: 0 errors, 90 warnings with the Hatch interpreter explicitly selected.

Corresponding fork review: d-v-b#333.

Correct mathematical API documentation to match supported coordinate, grid, and chunk projection contracts.

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
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
@read-the-docs-community

read-the-docs-community Bot commented Sep 13, 2026

Copy link
Copy Markdown

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs release notes Automatically applied to PRs which haven't added release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant