Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Which data, which code and which settings made this map?

GeoStack · background · bytes → id → history

Abstract

Pictures first. B12_v2_final_fixed.zarr is a name someone chose; it says nothing reliable about what is inside. This page builds the alternative step by step: ids that come from content, snapshots that never overwrite, history with branches and tags, commits that cannot half-happen, and products stamped with what made them. git, DVC, Icechunk and pipekit are all this one idea.

The running example

Identity: a name that comes from the content

A hash: any bytes in, one short fingerprint out

band B1260 280 200 B60\ 280\ 200\ \mathrm{B}

SHA-256

ce51a570eb6e4d0b0b50a4c45e370ab95c4d68f5b8dd87da82a02adf648fb406

one pixel +160 280 200 B60\ 280\ 200\ \mathrm{B}

SHA-256

5d32c793384f3f313e96d34c69e57e4c450a188c36b609647d659307573e5668

63 of 64 digits differ. Hashing the band took 54 ms54\ \mathrm{ms}.

Measured on a synthetic band of the running example’s size. Same bytes always give the same hash; different bytes give a different one, for every practical purpose. A hash is a name the content gives itself.

import hashlib

# id = SHA-256(bytes)
band_id = hashlib.sha256(band.tobytes()).hexdigest()       # (5490, 5490) → 64 hex digits

A hash function maps any number of bytes to a fixed-length value. A good one (SHA-256, or the older SHA-1 and MD5 that git and DVC use) changes completely when one bit of input changes, and two different inputs sharing a hash is not something you will meet. An id made this way is a content address: anyone holding the bytes can recompute it and check.

Snapshots: versions that share what did not change

Version 1: 121 chunks

Version 2: the site window reprocessed

4 chunks changed(38, 39, 49, 50)117 are byte-for-byte the same, so they are stored once.Stored: 125 chunks, not 242

Measured in an Icechunk repository: the first commit wrote 121 chunk objects, the second added 4 (1.8 MB on top of 51.6 MB). A new version costs what changed, not a copy.

A snapshot is a list of pointers

snapshot E76W51X7…B12/c/3/5 →\to chunk aaB12/c/3/6 →\to chunk bb… 119 more

4 old chunks

still there: version 1 reads exactly as before

117 shared chunks

snapshot HDTKHFT9…B12/c/3/5 →\to chunk a′a'B12/c/3/6 →\to chunk b′b'… 119 more

4 new chunks

never overwrote anything

Nothing is edited in place. A change writes new chunks and a new list that points at them and at everything unchanged. Each list gets an id; that id names the whole state of the data.

The rule that makes this work is immutability: a stored piece is never changed after it is written. Old versions cannot break, because nothing they point to is ever touched. The cost is that deleted data lingers until a clean-up (expiry and garbage collection) removes pieces no snapshot points to any more.

History: branches and tags

History: each snapshot remembers its parent

1CECHNKR…repository created

tag v1E76W51X7…ingest 2026-06-12

HDTKHFT9…reprocess site window

branch main6XCPCASN…writer A

A tag never moves. A branch moves to each new snapshot. An id is forever.

The actual history from the test repository. Reading tag v1 returns the pixel as 3449; reading main returns 3450. Both are available at once, which is what “time travel” means.

import icechunk
import zarr

# today (icechunk 2.3)
repo = icechunk.Repository.create(icechunk.local_filesystem_storage(path))

# today (icechunk 2.3)
session = repo.writable_session("main")
array = zarr.create_array(
    session.store, name="B12", shape=(5490, 5490), chunks=(512, 512), dtype="uint16"
)
array[:] = band                                            # 121 chunks, not yet visible
first = session.commit("ingest 2026-06-12")                # → snapshot id

# today (icechunk 2.3)
session = repo.writable_session("main")
array = zarr.open_array(session.store, path="B12")
array[2000:2100, 3050:3150] = reprocessed                  # touches 4 chunks
second = session.commit("reprocess site window")           # → snapshot id

# today (icechunk 2.3)
repo.create_tag("v1", snapshot_id=first)
old = zarr.open_array(repo.readonly_session(tag="v1").store, path="B12")
new = zarr.open_array(repo.readonly_session("main").store, path="B12")

Commits: all or nothing, one writer at a time

A commit: write everything new, then move one pointer

1

write new chunks under fresh keysinvisible: no snapshot points at them

2

write the new snapshot and its listsinvisible: no branch points at it

3

move the branch, on one condition: it has not moved since I startedone small conditional write: the commit

Crash before step 3: readers never see any of it.Two writers: the first moves the branch; the second’s condition fails ( ConflictError ) and it retries on top.

Both behaviours were checked on the test repository: discarding a session left main where it was, and the second of two concurrent writers got a ConflictError. Step 3 is the conditional PUT from the object storage page.

This is the same promise a database transaction makes (databases and catalogs), built from the only safe multi-object pattern a bucket offers (object storage). It is what lets a catalog row and the chunks it describes appear together, or not at all.

Provenance: ids on the product

What made this product?

datasnapshot id

HDTKHFT9…

codepipeline hash

sha256(operators∥weights)\mathrm{sha256}(\mathrm{operators} \parallel \mathrm{weights})

environmentlock-file hash

sha256(pixi.lock)\mathrm{sha256}(\texttt{pixi.lock})

settingsin the pipeline’s state

ridge=0.5, …= 0.5,\ \dots

plume enhancement mapstamped with all four

Versioning the data is half the answer. A product is reproducible when every input has an id and the product records them. Same four ids in, same product out, provided the code is deterministic (seeded).

import pipekit_ops.hashing

# today (pipekit)
# h = SHA-256(stable_json(state) ‖ 0x00 ‖ weights)
recipe_id = pipekit_ops.hashing.pipeline_hash(pipeline, weights)   # → 64 hex digits

pipekit already computes the code half. What is missing today is writing it, with the data snapshot id, onto each output; that is the recipe stamp in the recipe registries design.

One idea, several tools

Immutable piecesA stateMovable namesIds are
gitblobs (file contents)commit → tree of blobsbranches, tagscontent hashes (SHA-1)
DVCfiles in a cache.dvc pointers and dvc.lock, committed to gitgit’scontent hashes (MD5)
Icechunkchunkssnapshot → manifests → chunksbranches, tagsgenerated, not content hashes
pipekit registryoperator, weights, metadata under <hash>/one registered modeltags (_tags/<name>)content hashes (SHA-256)
Lock files (pixi, uv)exact package buildsthe resolved environment—hashes per package
Container imageslayersan image manifesttags such as latestcontent hashes (digests)

One row differs. Icechunk’s ids are generated, not derived from content: writing the same band into a second repository gave a different snapshot id (measured). Its ids tell you which commit, not which bytes. If you need to prove two arrays are equal, hash them; if you need to say which state you read, the snapshot id is enough.

DVC and Icechunk together

The two overlap in one place only, versioning large arrays, and are otherwise good at different things. DVC versions whole files and the pipeline that made them, and ties both to a git commit. Icechunk versions an array chunk by chunk, lets it be read straight from storage, and gives writers transactions.

DVCIcechunk
Versionswhole files, and the stages that made themchunks of arrays
Tied togit: one commit names code and dataits own history of snapshots
A small change coststhe whole file againthe chunks that changed
Readingpull a copy to disk firsta window, straight from storage
Several writersno coordinationtransactions; conflicts detected
Knows how the data was madeyes: stages, dependencies, dvc.lockno
Storagealmost anything, Google Drive includedan object store with conditional writes (S3, GCS, Azure), or local disk

One git commit names both

git commit (tag v1 )

dvc.lock · *.dvc files

labels.csv.dvca content hash (MD5)

snapshot.jsonsnapshot DYQD9P6W…

DVC remote1 file, 22 kB22\ \mathrm{kB} · Drive is fine

Icechunk repository138 objects, 53 MB53\ \mathrm{MB} · an object store

DVC keeps the pipeline and the ordinary files; Icechunk keeps the array. The join is a pointer file a few lines long: to DVC it is one more output, and inside it is the snapshot id.

stages:
  ingest:
    cmd: python ingest.py $STORE/b12.icechunk
    deps:
      - ingest.py
    params:
      - reprocess_site
    outs:
      - snapshot.json:          # the pointer; small, so git keeps it
          cache: false
  stats:
    cmd: python stats.py
    deps:
      - stats.py
      - snapshot.json           # a new snapshot reruns this stage
    metrics:
      - metrics.json:
          cache: false
# --- ingest.py, the last lines ---
snapshot_id = session.commit(f"B12, reprocess_site={params['reprocess_site']}")
# a tag keeps this snapshot from being expired while git still points at it
repo.create_tag(f"dvc-{snapshot_id}", snapshot_id=snapshot_id)
pointer = {"repo": store_path, "snapshot_id": snapshot_id}
pathlib.Path("snapshot.json").write_text(json.dumps(pointer, indent=2) + "\n")

# --- stats.py: read exactly the snapshot the pointer names, never "latest" ---
pointer = json.loads(pathlib.Path("snapshot.json").read_text())
repo = icechunk.Repository.open(icechunk.local_filesystem_storage(pointer["repo"]))
session = repo.readonly_session(snapshot_id=pointer["snapshot_id"])
window = zarr.open_array(session.store, path="B12")[2000:2100, 3050:3150]   # → (100, 100)

Run with DVC 3.67.1 on the running example: a DVC project with a labels file and the two stages above, a local folder as the DVC remote (standing in for Drive), and the band in a local Icechunk repository. $STORE is the folder that holds it.

StepWhat happened
dvc repro, then git commit and tag v1both stages ran; pointer DYQD9P6WW7ZXXC64SGZG; site pixel 3449
dvc repro againboth stages skipped: nothing changed
set reprocess_site: true, dvc repro, tag v2both stages reran; pointer 981DA6145WQFHJTQE0XG; site pixel 3450
dvc metrics diff v1site mean 2001.2117 → 2002.2117
git checkout v1, run the stats stagepointer back to the first snapshot; site pixel 3449 again, though the repository has moved on
What each store holdsDVC remote: 1 file, 22 kB. Icechunk: 138 objects, 53 MB

In your stack

Checked at geostack 343d60e, pipekit 9e86a56 and icechunk 2.3.1.

WhereWhat it versions, and how
geostack: git + DVCcode and configs in git; data and results as DVC outputs with dvc.lock committed, so a commit names code and data together
pipekit DVCDatasetVersioningtracks a dataset’s content hash through the DVC command line (add, pull, hash); the snapshot-aware dataset of the recipe registries design is its Icechunk counterpart
pipekit_ops.hashing.pipeline_hashSHA-256 over an operator graph’s state and its weights: the id of a recipe
pipekit model registriescontent-addressed entries under <hash>/, with tags as one-line files; written as separate objects, so not yet all-or-nothing
TrainingDataset.content_hasha hash of the dataset’s configuration; it does not change when the data behind the same path does
Design pagesIcechunk snapshots for collections (Level 2 collections, A, B); a transactional registry, recipe stamps and snapshot-aware datasets (recipe registries, G–J)

Where this goes next

Idea hereShows up as
Snapshot id names a stateIcechunkGeoCatalog.open(ref=…) pins rows and chunks together (Level 2 collections, A)
Commit = one pointer moveCatalogTransaction (Level 2 collections, B); IcechunkModelRegistry (recipe registries, H)
Ids on the productRecipeStamp (recipe registries, G), stored in the product catalog record
Config hash is not data identitySnapshotDataset folds the snapshot id into the hash (recipe registries, J)