feat: Store.head content-version probe + parallel chunk decode (v0.7.2)#10
Merged
Conversation
Add an optional Store.head(key) and its S3Store implementation, returning
{ etag, lastModified, size } | null (null for an absent key; other failures
throw, mirroring has()'s retry/404 handling).
Motivation: the dataset registry keys every tier (handle/L1, metadata +
coordinate caches, on-disk chunk cache) by the open() id and assumes a dataset
is immutable per id. When an upstream pipeline overwrites a dataset in place
(same path), every tier kept serving stale state. head() exposes the object's
ETag as a cheap content-version probe so consumers can fold it into the cache
key and invalidate precisely on overwrite.
Adds s3 integration tests (head ok + 404 -> null) against the local fake S3.
Off-thread Blosc/codec decoding through a worker pool (decode-pool + decode-worker), wired into the chunk loader so the models x variables x chunks fan-out no longer serializes decode on the main thread. Adds a benchmark and unit coverage; CJS/ESM interop tests and README updated for the new export. (Pre-existing working-tree changes, committed together with the Store.head content-version feature per request.)
brandao-andre
approved these changes
Jun 16, 2026
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.
Two changes, two commits.
1.
Store.headfor content-version probing (4edc6e3)Adds an optional
Store.head(key)+S3Store.headreturning{ etag, lastModified, size } | null(nullfor an absent key; other failures throw, mirroringhas()'s retry + 404 handling) and aStoreHeadtype.Why: the
ZarrDatasetRegistrykeys every cache tier (handle/L1, metadata + coordinate Redis caches, on-disk chunk cache) by theopen()id and assumes a dataset is immutable per id. When an upstream pipeline overwrites a dataset in place, every tier kept serving stale state — in nautilus-api this surfaced as a collapsed/constant forecast time axis that survived a Redis flush and only cleared on a pod restart.head()exposes the ETag as a cheap content-version probe so a consumer can fold it into the cache key (id = \${s3Path}@${etag}``) and invalidate all tiers at once on re-ingestion.src/store/store.ts— optionalhead?+StoreHead.src/store/s3.ts—S3Store.head()(retry +AbortSignaltimeout;nullon 404).tests/integration/s3.test.ts— head ok + 404→null (local fake S3).2. Parallel chunk decode via worker pool (
d759100)Off-thread Blosc/codec decoding through a worker pool (
decode-pool+decode-worker), wired into the chunk loader so themodels x variables x chunksfan-out no longer serializes decode on the main thread. Adds a benchmark, unit coverage, and updates the CJS/ESM interop tests + README for the new export.Release
Bumps to 0.7.2 + CHANGELOG (head feature). After merge, tag
v0.7.2to publish.Test
typecheckclean; full suite 344 passing / 17 skipped; lint + format clean.