diff --git a/crates/rrt-runtime/src/inspect/engine_types.rs b/crates/rrt-runtime/src/inspect/engine_types.rs index 817e499..4d3156c 100644 --- a/crates/rrt-runtime/src/inspect/engine_types.rs +++ b/crates/rrt-runtime/src/inspect/engine_types.rs @@ -170,10 +170,15 @@ pub struct EngineTypesInspectionReport { pub car_side_view_resource_pk4_missing_counts: BTreeMap, pub car_auxiliary_stem_counts: BTreeMap, pub car_auxiliary_stem_relation_counts: BTreeMap, + pub car_auxiliary_stem_distinct_pair_counts: BTreeMap, pub internal_ne_profile_pk4_match_count: usize, pub internal_ne_profile_pk4_missing_count: usize, pub locomotive_pair_internal_ne_profile_pk4_match_count: usize, pub locomotive_pair_internal_ne_profile_pk4_missing_count: usize, + pub matched_prefix_internal_ne_profile_pk4_match_count: usize, + pub matched_prefix_internal_ne_profile_pk4_missing_count: usize, + pub unmatched_display_internal_ne_profile_pk4_match_count: usize, + pub unmatched_display_internal_ne_profile_pk4_missing_count: usize, pub internal_ne_profile_texture_size_counts: BTreeMap, pub internal_ne_profile_horizontal_scale_modifier_counts: BTreeMap, pub internal_ne_profile_max_percent_of_interface_vram_counts: BTreeMap, @@ -423,6 +428,11 @@ pub fn inspect_engine_types_dir( .iter() .filter_map(classify_car_auxiliary_stem_relation), ); + let car_auxiliary_stem_distinct_pair_counts = count_owned_values( + family_entries + .iter() + .filter_map(distinct_car_auxiliary_stem_pair_label), + ); let lco_companion_stem_counts = count_named_values( family_entries .iter() @@ -450,6 +460,42 @@ pub fn inspect_engine_types_dir( && family.internal_ne_profile_found_in_pk4 == Some(false) }) .count(); + let matched_prefix_internal_ne_profile_pk4_match_count = family_entries + .iter() + .filter(|family| { + family.has_matched_locomotive_pair + && family.internal_ne_profile_found_in_pk4 == Some(true) + && !UNMATCHED_LOCOMOTIVE_DISPLAY_NAMES + .contains(&family.primary_display_name.as_deref().unwrap_or("")) + }) + .count(); + let matched_prefix_internal_ne_profile_pk4_missing_count = family_entries + .iter() + .filter(|family| { + family.has_matched_locomotive_pair + && family.internal_ne_profile_found_in_pk4 == Some(false) + && !UNMATCHED_LOCOMOTIVE_DISPLAY_NAMES + .contains(&family.primary_display_name.as_deref().unwrap_or("")) + }) + .count(); + let unmatched_display_internal_ne_profile_pk4_match_count = family_entries + .iter() + .filter(|family| { + family.has_matched_locomotive_pair + && family.internal_ne_profile_found_in_pk4 == Some(true) + && UNMATCHED_LOCOMOTIVE_DISPLAY_NAMES + .contains(&family.primary_display_name.as_deref().unwrap_or("")) + }) + .count(); + let unmatched_display_internal_ne_profile_pk4_missing_count = family_entries + .iter() + .filter(|family| { + family.has_matched_locomotive_pair + && family.internal_ne_profile_found_in_pk4 == Some(false) + && UNMATCHED_LOCOMOTIVE_DISPLAY_NAMES + .contains(&family.primary_display_name.as_deref().unwrap_or("")) + }) + .count(); let internal_ne_profile_texture_size_counts = side_view_imb_pk4_lookup .as_ref() .map(|lookup| lookup.internal_ne_profile_texture_size_counts.clone()) @@ -549,10 +595,15 @@ pub fn inspect_engine_types_dir( car_side_view_resource_pk4_missing_counts, car_auxiliary_stem_counts, car_auxiliary_stem_relation_counts, + car_auxiliary_stem_distinct_pair_counts, internal_ne_profile_pk4_match_count, internal_ne_profile_pk4_missing_count, locomotive_pair_internal_ne_profile_pk4_match_count, locomotive_pair_internal_ne_profile_pk4_missing_count, + matched_prefix_internal_ne_profile_pk4_match_count, + matched_prefix_internal_ne_profile_pk4_missing_count, + unmatched_display_internal_ne_profile_pk4_match_count, + unmatched_display_internal_ne_profile_pk4_missing_count, internal_ne_profile_texture_size_counts, internal_ne_profile_horizontal_scale_modifier_counts, internal_ne_profile_max_percent_of_interface_vram_counts, @@ -933,6 +984,16 @@ fn classify_car_auxiliary_stem_relation(family: &EngineTypeFamilyEntry) -> Optio Some("distinct_auxiliary_stem".to_string()) } +fn distinct_car_auxiliary_stem_pair_label(family: &EngineTypeFamilyEntry) -> Option { + (classify_car_auxiliary_stem_relation(family)?.as_str() == "distinct_auxiliary_stem") + .then_some(())?; + Some(format!( + "{} -> {}", + family.internal_stem.as_deref()?, + family.auxiliary_stem.as_deref()? + )) +} + fn strip_terminal_role_letter(value: &str) -> Option<&str> { let last = value.chars().last()?; matches!(last, 'L' | 'T' | 'l' | 't').then(|| { diff --git a/docs/rehost-queue.md b/docs/rehost-queue.md index 2088a54..a5c82c8 100644 --- a/docs/rehost-queue.md +++ b/docs/rehost-queue.md @@ -12,11 +12,12 @@ This file is the short active queue for the current runtime and reverse-engineer - The active static parser head is now the `engine_types` semantics frontier. The repo now has structural inspectors for `.car`, `.lco`, `.cgo`, and `.cct`, but the binary side is still only partially semantic: the checked 1.05 corpus grounds `.car` fixed strings at `0x0c / 0x48 / 0x84` plus a second fixed stem slot at `0xa2` and a side-view resource name at `0xc0`, while `.lco` carries a stable primary stem at `0x04` and only conditional companion/body slots at `0x0c` and `0x12` when the leading stem slot is padded. - The checked 1.05 corpus now also splits `.car` auxiliary stems into `126` direct matches, `14` role-neutral roots, and only `5` truly distinct cases, while `.cgo` collapses into five stable scalar ladders instead of arbitrary floats. + The checked 1.05 corpus now also splits `.car` auxiliary stems into `126` direct matches, `14` role-neutral roots, and only `5` truly distinct cases, with those five exact internal-to-auxiliary pairs now preserved directly in the report surface, while `.cgo` collapses into five stable scalar ladders instead of arbitrary floats. The early `.lco` lane block is now partially partitioned too: only offsets `0x20`, `0x34`, `0x38`, `0x3c`, `0x44`, `0x48`, and `0x54` behave like low-cardinality buckets, while the other early lanes still look high-variance. The side-view resource path is now grounded into `Data/2D/rt3_2IMB.PK4`, and the `.imb` parser now decodes shipped comment-suffixed numeric rows plus `_NE` profile fields such as `HorizontalScaleModifier` and `ImageWHScaled`. The checked PK4 linkage split is now explicit too: `132 / 145` side-view resource names resolve directly, but the remaining `13` are the missing `CarSideView_3.imb` cohort and that hole exists in both checked installs, while `43 / 145` derived `{internal_stem}_NE.imb` names resolve and all of those hits belong to matched locomotive pairs. The packaged profile metadata is stable enough to summarize: `CarSideView_1` is `512x512` at `0.04` VRAM, `CarSideView_2` is `512x256` at `0.02`, and every packaged `_NE` profile is `512x128` with `HorizontalScaleModifier = 0.75` and `MaxPercentOfInterfaceVRAM = 0.09`. + The `_NE` split is now aligned with the locomotive display census too: all `43` packaged `_NE` hits live inside the grounded display prefix, and all `5` unmatched display-tail families are still missing packaged `_NE` profiles. The next honest static work is to keep promoting those fixed lanes into stable parser fields, explain the five remaining distinct auxiliary-stem cases, and decide how far the `.cgo` ladders plus the low-cardinality `.lco` lanes can be grounded without overclaiming semantics. Preserved checked parser detail now lives in [EngineTypes parser semantics](rehost-queue/engine-types-parser-semantics-2026-04-21.md). Preserved checked format inventory detail now lives in [RT3 format inventory](rehost-queue/format-inventory-2026-04-21.md). diff --git a/docs/rehost-queue/engine-types-parser-semantics-2026-04-21.md b/docs/rehost-queue/engine-types-parser-semantics-2026-04-21.md index e351748..60818c6 100644 --- a/docs/rehost-queue/engine-types-parser-semantics-2026-04-21.md +++ b/docs/rehost-queue/engine-types-parser-semantics-2026-04-21.md @@ -71,6 +71,12 @@ first `.car` / `.lco` / `.cgo` / `.cct` inspector pass landed. - `CarSideView_2.imb`: `512x256`, `MaxPercentOfInterfaceVRAM = 0.02` - every packaged `_NE.imb` profile: `512x128`, `HorizontalScaleModifier = 0.75`, `MaxPercentOfInterfaceVRAM = 0.09`, and `ImageWHScaled` present +- The `_NE` profile split is now tied back to the locomotive display census: + - `43` matched locomotive display-prefix families resolve `{internal_stem}_NE.imb` + - `18` matched display-prefix families still do not resolve `{internal_stem}_NE.imb` + - `0` unmatched display-tail families resolve `{internal_stem}_NE.imb` + - all `5` unmatched display-tail families (`242 A1`, `Class 460`, `Class A1`, `Class P8`, + `Class QJ`) are missing packaged `_NE` profiles ## What The Current Parser Now Owns @@ -81,6 +87,7 @@ first `.car` / `.lco` / `.cgo` / `.cct` inspector pass landed. - auxiliary stem slot - side-view resource name - auxiliary-stem relation counts across the shipped corpus + - exact distinct auxiliary-stem pair counts - PK4-backed side-view resource resolution status - derived `{internal_stem}_NE.imb` resolution status - `.lco` @@ -102,6 +109,7 @@ first `.car` / `.lco` / `.cgo` / `.cct` inspector pass landed. - `rt3_2IMB.PK4` link surface - packaged side-view profile summaries for `CarSideView_*` - packaged `_NE.imb` texture-size and scalar-family counts + - packaged `_NE.imb` match counts split by grounded display prefix vs unmatched display tail ## Remaining Static Questions