Repository navigation
Conversation
Add `zarr.core.metadata.ledger.LEDGER`, one entry per kind of stored metadata that zarr reads or writes although it does not conform to a Zarr specification or uses a name the zarr-extensions registry does not define: which software wrote it (including which zarr releases), whether zarr still writes it, and how zarr reads it now. A new Metadata compatibility docs page is generated from it by the mkdocs hook. Every site that reads or writes such metadata carries a `# NON-CONFORMANT: <key>` or `# UNREGISTERED: <key>` comment. tests/test_ledger.py fails if a repair in `ARRAY_REPAIRS` is in no entry, if a marker names no entry or has the wrong tag, if an entry has no marker, or if a `v3_unstable_dtype_warning` call is unmarked. The repair module no longer claims to be the only lenient reader of stored metadata. Assisted-by: ClaudeCode:claude-opus-5-5
…ntry Add `Entry.other_readers` and `READERS_TESTED` to the metadata ledger, and render both on the Metadata compatibility page. The results come from reading a sample store of every entry with zarrs 0.23.14, tensorstore 0.1.85 and zarr 2.18.7 (Zarr format 2 samples only), with the zarr 3.1.6 and zarr 2.18.7 samples written by those releases. Assisted-by: ClaudeCode:claude-opus-5-5
Assisted-by: ClaudeCode:claude-opus-5-5
This branch has not been deployed
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.
🤖 AI text below 🤖
A new Metadata compatibility page lists every kind of stored metadata that zarr reads or writes although it does not conform to a Zarr specification, or uses a name the zarr-extensions registry does not define. For each kind, the page says which software wrote it, how zarr reads it now, and whether zarrs, tensorstore and zarr 2 read it. The page is generated from
zarr.core.metadata.ledger, which a test checks against the code that reads and writes such metadata.The idea follows zarrs'
doc/correctness_issues.md(zarrs/zarrs#488).What changes
zarr.core.metadata.ledger.LEDGERhas 17 entries. Each entry records:non-conformant(a specification forbids it) orunregistered(a name zarr-extensions does not define);zarr.core.metadata.repairthat read it.src/zarrthat reads or writes such metadata carries a# NON-CONFORMANT: <key>or# UNREGISTERED: <key>comment, as zarrs does.tests/test_ledger.pyfails if any of these hold:ARRAY_REPAIRSis in no entry;v3_unstable_dtype_warningcall is unmarked;docs/metadata-compatibility.mdis filled in bymkdocs_hooks.pyat build time and listed in the nav after the release notes. The contributing guide gains a paragraph on the ledger, under data format compatibility.repairmodule docstring no longer says it is the only place invalid metadata is read leniently. Other lenient readings, such as data type aliases and fill-value spellings, live with the code that reads them, and the ledger now lists them.Warnings describe the metadata only. Release versions appear only in the ledger and on the docs page, and no warning in
src/zarrnames a release.How the entries were checked
NaNtokens by 3.0.0 to 3.0.6, as"NaN"strings by 3.0.7 to 3.0.10, refused by 3.1.0, and bare again from 3.1.1.structured, endian-lessbytesand zarr 2 string-fill samples were written by zarr 3.1.6 and zarr 2.18.7 themselves. Each sample was read with zarrs 0.23.14 (a small Rust program:Array::openand read every element, elseGroup::open), tensorstore 0.1.85 (thezarrandzarr3drivers), and zarr 2.18.7 for the Zarr format 2 samples. Whichnumcodecs.*codecs zarrs reads depends on the crate features the program enabled.Left out on spec grounds
<i1/>b1/<V4spellings: the v2 spec allows</>on any typestr, so reading them is not lenient..zarraykeys: the spec says readers SHOULD ignore them.Open questions for review
zarr.core.metadata.ledger). The docs page is public.Tests:
tests/test_ledger.pyplus the metadata, dtype, codec, group, chunk-grid, v2, JSON, CLI and docs suites pass (4269 passed).mkdocs build --strictpasses. The agent also broke the code three ways to check that the ledger tests catch drift: an unlisted repair, a deleted marker, and a wrong tag.Author attestation
Stack and related work
Independent of draft feat(docs): index every deprecation from a single declaration #4454, the deprecations index. Both add an
on_page_markdownhook tomkdocs_hooks.py, so whichever merges second takes a small conflict there.While building the ledger, the agent found five bugs in reading stored metadata:
bytesdata type with an int-array fill value, which every zarr 3.0bytesarray has, is rejected;.zgroupof{}opens as Zarr format 3;"endian"codec alias cannot be read;"false"is read asTrue;dimension_names: "x"is split into characters.Fixes are being prepared separately. The
variable-length-bytesentry describes the current behavior (the[]fill value is rejected) and should be updated when that fix lands.Rebased on
bd0dc840f.🤖 Generated with Claude Code