Skip to content

Commit f355afe

Browse files
committed
fix: refresh nix transit vendoring hash
• [MSN] No active missions on the board • [EXC] Board idle, no stories queued or active • [HLT] 2 warnings, no structural errors detected
1 parent c61a549 commit f355afe

2 files changed

Lines changed: 24 additions & 1 deletion

File tree

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@
122122
"candle-kernels-0.9.2" = "sha256-ywjfKjuViDvJEho/IO2jR73ObwbMznWwQgSrAbJS1v0=";
123123
"candle-ug-0.9.2" = "sha256-ywjfKjuViDvJEho/IO2jR73ObwbMznWwQgSrAbJS1v0=";
124124
"sift-0.2.0" = "sha256-mlOVOWZFB0vrWlCy/ntlj3LRcn8HiojN4Wv+K9hnQ5U=";
125-
"transit-core-0.1.0" = "sha256-4VvRHAf+ABRDe1q5giH/VtsJo66JJjsCKbmP/7RlXN0=";
125+
"transit-core-0.1.0" = "sha256-KRsbmHsTZoH9AZTPIiIkozchXBfWZ1XK3rXkXnBsh1U=";
126126
};
127127
};
128128
nativeBuildInputs = [ pkgs.pkg-config ] ++ pkgs.lib.optionals (isLinux && cudaEnabled) [ cudaToolkit ];

src/infrastructure/dev_workflow_contracts.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,29 @@ fn nix_package_tracks_locked_sift_revision_for_vendoring() {
344344
);
345345
}
346346

347+
#[test]
348+
fn nix_package_tracks_locked_transit_revision_for_vendoring() {
349+
let cargo_lock = read_repo_file("Cargo.lock");
350+
let flake = read_repo_file("flake.nix");
351+
let needle = "git+https://github.com/spoke-sh/transit.git?branch=main#";
352+
let revision_start = cargo_lock
353+
.find(needle)
354+
.map(|index| index + needle.len())
355+
.expect("Cargo.lock should pin the transit git dependency by revision");
356+
let revision = &cargo_lock[revision_start..revision_start + 40];
357+
let expected_hash = match revision {
358+
"b5fb008a241bc6abe3bbde570cc9e773a4a7d341" => {
359+
"sha256-KRsbmHsTZoH9AZTPIiIkozchXBfWZ1XK3rXkXnBsh1U="
360+
}
361+
_ => panic!("update the nix transit output hash contract for transit revision {revision}"),
362+
};
363+
364+
assert!(
365+
flake.contains(&format!("\"transit-core-0.1.0\" = \"{expected_hash}\";")),
366+
"flake should pin the transit-core vendored source hash for the locked transit revision:\nCargo.lock rev: {revision}\nExpected hash: {expected_hash}\n{flake}",
367+
);
368+
}
369+
347370
#[test]
348371
fn root_workspace_lockfile_exists_for_clean_ci_installs() {
349372
assert!(

0 commit comments

Comments
 (0)