[pitboss/grind] cleanup session-0004 (20260522T163126Z-7d60)

This commit is contained in:
pitboss 2026-05-22 13:17:28 -05:00
parent 0e4e393000
commit 0d4ab22c4c
7 changed files with 119 additions and 45 deletions

View file

@ -788,6 +788,7 @@ impl GlobalSummaries {
.wrapping_mul(0x9E37_79B9)
.wrapping_add(probe);
key.disambig = Some(SYNTHETIC_DISAMBIG_BIT | (synth & !SYNTHETIC_DISAMBIG_BIT));
key.arity = Some(body.param_count);
probe = probe.wrapping_add(1);
if probe >= 1024 {
tracing::warn!(

View file

@ -3272,27 +3272,17 @@ fn insert_body_param_count_mismatch_rekeys() {
assert_eq!(head.param_count, 2);
// Invariant 2: the conflicting body is preserved under a synthetic
// disambig, not dropped. Reconstruct the expected synth disambig
// using the same formula as `reconcile_body_key`.
let mut found_conflicting = false;
// disambig at its own arity, not dropped.
let base = (4u32).wrapping_mul(0x9E37_79B9);
for probe in 0u32..1024 {
let synth = base.wrapping_add(probe);
let synth_key = FuncKey {
disambig: Some(0x8000_0000 | (synth & 0x7FFF_FFFF)),
..key.clone()
};
if let Some(body) = gs.get_body(&synth_key)
&& body.param_count == 4
{
found_conflicting = true;
break;
}
}
assert!(
found_conflicting,
"the 4-param body must be preserved under a synthetic disambig key"
);
let synth_key = FuncKey {
arity: Some(4),
disambig: Some(0x8000_0000 | (base & 0x7FFF_FFFF)),
..key.clone()
};
let conflicting = gs
.get_body(&synth_key)
.expect("the 4-param body must be preserved under a synthetic disambig key");
assert_eq!(conflicting.param_count, 4);
}
#[test]