Rule out region policy chunk latch candidates

This commit is contained in:
Jan Petykiewicz 2026-04-18 13:22:21 -07:00
commit 90059bb727
2 changed files with 46 additions and 0 deletions

View file

@ -2938,6 +2938,9 @@ pub struct SmpRegionServiceTraceEntry {
pub policy_leading_f32_1_text: String,
pub policy_leading_f32_2_text: String,
#[serde(default)]
pub policy_reserved_dword_hex_words: Vec<String>,
pub policy_trailing_word_hex: String,
#[serde(default)]
pub branches: Vec<SmpServiceTraceBranchStatus>,
}
@ -3756,6 +3759,12 @@ fn build_region_service_trace_report(
policy_leading_f32_0_text: format!("{:.6}", entry.policy_leading_f32_0),
policy_leading_f32_1_text: format!("{:.6}", entry.policy_leading_f32_1),
policy_leading_f32_2_text: format!("{:.6}", entry.policy_leading_f32_2),
policy_reserved_dword_hex_words: entry
.policy_reserved_dwords
.iter()
.map(|word| format!("0x{word:08x}"))
.collect(),
policy_trailing_word_hex: entry.policy_trailing_word_hex.clone(),
branches: vec![
build_service_trace_branch_status(
"pending_bonus_queue_seed",
@ -3798,6 +3807,39 @@ fn build_region_service_trace_report(
notes.push(
"The current region seam is strong enough to prove record-envelope ownership, profile subcollection ownership, and the absence of hidden 0x55f3 tail padding on grounded saves.".to_string(),
);
if let Some(probe) = analysis.region_record_triplets.as_ref() {
let mut trailing_words = probe
.entries
.iter()
.map(|entry| entry.policy_trailing_word_hex.clone())
.collect::<Vec<_>>();
trailing_words.sort();
trailing_words.dedup();
let preview = trailing_words
.iter()
.take(4)
.cloned()
.collect::<Vec<_>>()
.join(", ");
notes.push(format!(
"Region 0x55f2 trailing-word candidates currently collapse to {} distinct value(s): {}.",
trailing_words.len(),
if preview.is_empty() {
"none".to_string()
} else {
preview
}
));
if probe.entries.iter().all(|entry| {
entry.policy_reserved_dwords.iter().all(|word| *word == 0)
&& entry.policy_trailing_word == 1
}) {
notes.push(
"Grounded region 0x55f2 fixed-policy chunks also keep all three reserved dwords at zero while the trailing word stays 0x0001, so that chunk is not currently carrying the missing latch/id discriminator."
.to_string(),
);
}
}
SmpRegionServiceTraceReport {
profile_family: analysis.profile_family.clone(),
region_collection_header_present: analysis.region_collection_header.is_some(),