diff --git a/src/host/taint/tests.rs b/src/host/taint/tests.rs index 10df0c4..eff5f24 100644 --- a/src/host/taint/tests.rs +++ b/src/host/taint/tests.rs @@ -241,6 +241,17 @@ fn ownership_carriers_match_the_cross_repo_fixture() { .filter(|line| !line.is_empty() && !line.starts_with('#')) .map(|line| line.split_once('=').expect("fixture line is key=value")) .collect(); + + // ⚠️ Refuse a duplicated key rather than resolving it (Codex phase-1 + // review, finding 3). This side takes the first match and peerspeak's + // took the last, so a duplicate in a byte-identical file could leave both + // repos green having selected *different* contracts. + for (index, (key, _)) in pinned.iter().enumerate() { + assert!( + !pinned[..index].iter().any(|(seen, _)| seen == key), + "fixture defines {key:?} twice; the two repos would disagree on which wins" + ); + } let get = |key: &str| -> &str { pinned .iter()