The git-storage contract: GitOps, the backend-neutral eleven.
This is the contract written into znippy-plugin-git's store.rs
("The twelve functions. Nothing else is permitted here."), lifted out so it
is no longer owned by one implementation. It defines what a git object+ref
store must be able to do, and names no storage, no index, no durability
mechanism and no codec — so both backends implement the same trait:
| implementer | where | how it stores |
|---|---|---|
znippy-plugin-git |
plugins/native/znippy-plugin-git (this repo) |
Arrow-IPC in a znippy archive (OpenZL) |
storage-git-gix |
edda/crates/storage-git-gix |
gix-odb / gix-ref on a filesystem |
Why this crate is tiny, and must stay that way
It depends on anyhow and nothing else. That is load-bearing: the gix
backend must be able to implement this contract without linking Arrow or
OpenZL's C++ toolchain, and the znippy backend must not have to link gix.
A dependency added here is a dependency forced on both.
"Eleven", not "twelve" — where seal() went
The original GitOps in znippy had a twelfth method, seal() -> Vec<ReservedSection>, that folds the live logs into the reserved Arrow
sections a znippy archive carries. ReservedSection is an Arrow type
(RecordBatch payloads); a gix backend has no such sections and no analog.
So seal() is an implementation detail of the znippy backend, not part of
the neutral contract — it stays an inherent method on GitStore, which is
how gunnar already calls it (on the concrete store, never through this
trait). Keeping it here would have forced Arrow onto the gix backend for a
method it can never implement.