crates/nornir-release-ledger/Cargo.toml
# nornir-release-ledger — the ONE definition of the three RELEASE warehouse
# tables (`release_lineage`, `release_events`, `release_changes`): their Iceberg
# schemas, their table names, and the Arrow writer/reader codecs over the
# backend-neutral `nornir-warehouse-trait` seam.
#
# WHY A LEAF. The warehouse is nornir's (PRE-PROMPT L5a) but the release
# ORCHESTRATION is dwarves', and `dwarves → nornir` may never become a crate
# edge on the nornir umbrella. Both halves therefore need the same table shape,
# and for eight days they had it as two hand-maintained COPIES —
# `nornir/src/warehouse/{iceberg_schema,release_events,release_changes}.rs` vs
# `dwarves/crates/dwarves/src/release_doctor/{schema,release_events,release_changes}.rs`.
# A column added to one and not the other would have made the two halves write
# mutually incompatible tables into the SAME warehouse with nothing failing at
# compile time. So the shape + codec is a primitive, it lives here ONCE, and
# both conductors consume it (L5 / L5a "a genuine primitive a third unrelated
# consumer would want as-is → an edda leaf").
#
# Field IDs are explicit and stable — append a new field with a fresh, unused
# ID; never reuse, never renumber (the Iceberg schema-evolution invariant).
[package]
name = "nornir-release-ledger"
version = "0.2.0"
edition = "2021"
description = "The release warehouse ledger: the canonical Iceberg schemas for release_lineage / release_events / release_changes plus the Arrow writer+reader codecs over the backend-neutral nornir Warehouse seam. One definition, consumed by both the warehouse owner and the release orchestrator."
license = "MIT OR Apache-2.0"
repository = "https://git.gunnar.rs/nordisk/edda"
keywords = ["warehouse", "iceberg", "arrow", "release", "ledger"]
categories = ["development-tools"]
exclude = ["/.nornir/"]
[features]
default = []
# The in-memory `Warehouse` test double (`testkit::MockWarehouse`) + a std-only
# single-future executor (`testkit::block_on`). Off by default so a release
# build never links it; consumers that test against the seam turn it on as a
# dev-dependency feature.
testkit = ["dep:async-trait"]
[dependencies]
anyhow = "1"
arrow = { version = "59", features = ["json", "prettyprint"] }
chrono = { version = "0.4", features = ["serde"] }
serde = { version = "1", features = ["derive"] }
sha2 = "0.11"
uuid = { version = "1", features = ["v4", "serde"] }
# arrow-58 Iceberg via skade's vendored, separately published fork (crates.io
# `iceberg-arrow59`, library name `iceberg`) — the SAME crate + version + path
# nornir and dwarves open, so the `iceberg::spec::Schema` these builders return
# is the identical type on both sides of the seam.
iceberg = { package = "iceberg-arrow59", version = "0.11.0", path = "../../../skade/vendor/iceberg-arrow59" }
# The backend-neutral `Warehouse` trait + its POD types. The codecs here name
# ONLY this seam — never a concrete engine — which is what lets the release
# orchestrator host them without a `nornir` dep.
nornir-warehouse-trait = { version = "0.2.0", path = "../nornir-warehouse-trait" }
# The bench run/result envelope the `Warehouse` trait's bench methods name;
# needed to write the `testkit` impl of the trait.
nornir-bench = { version = "0.2.0", path = "../nornir-bench" }
# `testkit` only — the mock implements the async half of the `Warehouse` trait.
async-trait = { version = "0.1", optional = true }
[dev-dependencies]
serde_json = "1"
# Self dev-dep so this crate's OWN unit tests see `testkit` (feature unification
# turns it on for the test build only) — `cargo test` exercises the round-trips
# without the default build ever linking the mock.
nornir-release-ledger = { path = ".", features = ["testkit"] }