Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/dwarves

.nornir/holger-artifact-store-design.md

holger artifact store — design

Class: design · Function axis: f0 the artifact-store seam (the whole) · f1 the ArtifactStore trait · f2 the holger-backed impl · f3 the incremental wiring · f4 configuration / no-op gating Strict: this file states only what the artifact store IS — its parts and why they are shaped this way. Sibling how-to: holger-artifact-store-guide.md; zero-knowledge walkthrough: holger-artifact-store-for-idiots.md.

The artifact store is the byte half of dwarves's action cache. The cache records a step's decision (input_id → result + artifact_id), but an artifact_id is only a sha256: label. The bytes that label points at must live somewhere the forge can retrieve on a fresh workspace or a second machine — so dwarves pushes them into holger, the constellation's artifact registry, whose storage is immutable, content-addressed, and sealed via znippy. dwarves keeps NO blob store of its own: reuse the shared registry (Law L5), never twin a hand-rolled CAS.

The system as one — the function map (f0)

part lives in what it is
f1 ArtifactStore trait crates/dwarves/src/artifact_store.rs the seam: put_bytes/put_file → content id, get/has by content id; put_artifacts + ArtifactManifest/ArtifactRef capture a multi-artifact set behind one id
f2 HolgerArtifactStore crates/dwarves/src/artifact_store.rs in-process holger-backed impl (writable znippy repo); behind the holger feature
f3 incremental wiring crates/dwarves/src/incremental.rs IncrementalOptions::artifact_store + with_artifact_store; a RAN step's every produced file pushes (StepOutcome::artifact_files), its recorded artifact_id becomes the true content id (or, for N>1, the manifest's)
f4 configured() gate crates/dwarves/src/artifact_store.rs resolves the process store from DWARVES_HOLGER_DIR, or None (no-op)

Why it is shaped this way

Place in the nordisk constellation

holger is the SHARED artifact registry (../holger, holger-server-lib). dwarves is one of its in-process consumers (like nornir's embedded registry pane). The seal mechanism is znippy — the same immutable, content-addressed pack format holger uses for every artifact type. This mirrors the backlog's Skidbladnir SKIDCAS1 direction ("replace hand-rolled with real znippy/registry"), applied to the forge.

Deferred