crates/holger-ui-recipe/tests/toolchain_pin.rs
//! **holger-ui pins the image the shared recipe mints, and never moves `:live`** (gate holger,
//! loki 2026-10-25: on nornir-build-thing 0.2.6 `cargo xtask build` minted the recipe's image
//! `86d575e8…` and refused to move `nordisk-cargo-toolchain:live` off `668468e7…`).
//!
//! The pin is the manifest digest of what nornir-build-thing 0.2.6's Containerfile mints (gunnar-ui,
//! dwarves and edda pin the same), and the build reaches it through
//! `ensure_declared_toolchain`: present, nothing is minted; absent, the recipe is minted under its
//! own tag. It never writes `:live` (gunnar's xtask, 2026-10-05: a `:live` re-mint un-named a pin).
use holger_ui_recipe::declared;
#[test]
fn holger_ui_pins_the_image_the_shared_recipe_mints_and_never_moves_live() {
let tc = declared().toolchain.expect("holger-ui declares its [build.toolchain]");
assert_eq!(tc.image_sha256, "86d575e874677da3eb9aff3ba6e38ca600781ee9b7948a9df43ef89a6213c762");
// The container's cargo resolves the whole workspace, xtask too, and xtask's
// nornir-xtask-support 0.1.4 is edda's (the estate sibling patch; crates.io holds 0.1.3):
// without ../edda mounted the build failed "failed to load source for dependency
// `nornir-xtask-support`" (gate holger, loki 2026-10-25).
// And monetize, for the same template's monetize-estate-side patch (ODEN-CI round 1,
// 2026-10-25: rows:MVP could not read ../monetize). `tests/estate_siblings.rs` holds the
// list equal to the template's paths.
assert_eq!(
tc.siblings,
["edda".to_string(), "monetize".to_string()],
"the container mounts edda and monetize for the sibling patches"
);
let build = include_str!("../../../xtask/src/build.rs");
assert!(build.contains("ensure_declared_toolchain("), "the build reaches the pin through ensure_declared_toolchain");
assert!(!build.contains("build_toolchain_image("), "the build never mints into `:live`");
}