Fix forward of 59970: the serde round trip takes the identity domains' refusal; the old render key at 2209

Gate m3-max-59970 at 7c2d4e2725 failed two tests the policy arms move (mechanism and the golden
table are development's: the orphan pass's every_fact gap and the table before its bless):

- device::tests::description's serde round trip took the identity domains as its second policy
  and unwrapped Device::from_queries on profiles that refuse them (no bufferDeviceAddress or
  shaderInt64). A refusal now has to be the decoded pair's too, with the same message; a derived
  pair still has to keep its fingerprint.
- pipeline::compile's old render key takes its value under SEMANTICS 2209 (fa7c26605e..., the
  gate's left side).

Verified: nothing yet; the recheck follows.
This commit is contained in:
Anees Iqbal committed 2026-11-20 14:30:50 -08:00
1 parent e8bcb0c317
commit c215085aec
2 files changed
+23 -12

No files matched your search

@@ -793,10 +793,11 @@ fn required_features_are_cumulative() {
assert!(v13.contains(&VkFeature::SubgroupSizeControl));
}
/// With feature `serde`, every committed description and a default and a non-default policy
/// survive a JSON round trip unchanged, and the `Device` rebuilt from the decoded pair has the
/// original's profile fingerprint: what an out-of-process compile worker needs to compile for the
/// consumer's device (worker recipe step 1).
/// With feature `serde`, every committed description and both policies survive a JSON round trip
/// unchanged, and the `Device` rebuilt from the decoded pair has the original's profile
/// fingerprint, or, where the description cannot take the policy (the identity domains without
/// `bufferDeviceAddress` and `shaderInt64`), the same refusal: what an out-of-process compile
/// worker needs to compile for the consumer's device (worker recipe step 1).
#[cfg(feature = "serde")]
#[test]
fn descriptions_and_policies_round_trip_through_serde() {
@@ -814,13 +815,23 @@ fn descriptions_and_policies_round_trip_through_serde() {
let policy_json = serde_json::to_string(&policy).unwrap();
let decoded_policy: DevicePolicy = serde_json::from_str(&policy_json).unwrap();
assert_eq!(decoded_policy, policy, "{stem}");
let original = Device::from_queries(description.clone(), policy).unwrap();
let rebuilt = Device::from_queries(decoded.clone(), decoded_policy).unwrap();
assert_eq!(
rebuilt.profile().fingerprint(),
original.profile().fingerprint(),
"{stem}"
);
let original = Device::from_queries(description.clone(), policy);
let rebuilt = Device::from_queries(decoded.clone(), decoded_policy);
match (original, rebuilt) {
(Ok(original), Ok(rebuilt)) => assert_eq!(
rebuilt.profile().fingerprint(),
original.profile().fingerprint(),
"{stem}"
),
(Err(original), Err(rebuilt)) => {
assert_eq!(rebuilt.to_string(), original.to_string(), "{stem}")
}
(original, rebuilt) => panic!(
"{stem}: the original derives {}, the decoded pair {}",
original.is_ok(),
rebuilt.is_ok()
),
}
}
}
}
@@ -1273,7 +1273,7 @@ fn the_old_render_descriptor_key_keeps_its_value() {
let key = device("moltenvk-m3").render_descriptor_key(&d);
let hex: String = key.digest().iter().map(|b| format!("{b:02x}")).collect();
assert_eq!(
hex, "6f48782e2fd9a06125708d0f3f8f69626c08373af4c088caa6d2a0936957d1ed",
hex, "fa7c26605ebbff9b01716e537d98e0d479a72e0b97afb427dd6e7aafd1788eb5",
"the old runtime's key of the descriptor"
);
}