refactor(mir): Phase 139-P3-B - RoutingDecision を enum 対応 + レガシー削除
- RoutingDecision の missing_caps を Vec<CapabilityTag> に変更(型安全化) - error_tags は to_tag() メソッドで自動生成 - 全 callsite を enum variant に修正 - capability_tags モジュール(文字列定数群)を完全削除 - 全テスト PASS(型安全性向上を確認) - フォーマット適用
This commit is contained in:
@ -13,15 +13,15 @@ use nyash_rust::mir::join_ir::normalized::fixtures::{
|
||||
build_jsonparser_skip_ws_real_structured_for_normalized_dev,
|
||||
build_jsonparser_skip_ws_structured_for_normalized_dev,
|
||||
build_jsonparser_unescape_string_step2_min_structured_for_normalized_dev,
|
||||
build_parse_array_min_structured_for_normalized_dev,
|
||||
build_parse_object_min_structured_for_normalized_dev,
|
||||
build_parse_string_composite_min_structured_for_normalized_dev,
|
||||
build_pattern2_break_fixture_structured, build_pattern2_minimal_structured,
|
||||
build_pattern3_if_sum_min_structured_for_normalized_dev,
|
||||
build_pattern3_if_sum_multi_min_structured_for_normalized_dev,
|
||||
build_pattern3_json_if_sum_min_structured_for_normalized_dev,
|
||||
build_pattern4_continue_min_structured_for_normalized_dev,
|
||||
build_pattern_continue_return_min_structured_for_normalized_dev,
|
||||
build_parse_string_composite_min_structured_for_normalized_dev,
|
||||
build_parse_array_min_structured_for_normalized_dev,
|
||||
build_parse_object_min_structured_for_normalized_dev,
|
||||
build_selfhost_args_parse_p2_structured_for_normalized_dev,
|
||||
build_selfhost_if_sum_p3_ext_structured_for_normalized_dev,
|
||||
build_selfhost_if_sum_p3_structured_for_normalized_dev,
|
||||
|
||||
@ -366,7 +366,8 @@ fn test_phase88_jsonparser_unescape_string_step2_min_rejects_non_const_then_i_up
|
||||
assert!(res.is_err(), "expected fail-fast panic");
|
||||
let msg = panic_message(res.err().unwrap());
|
||||
assert!(
|
||||
msg.contains("then' branch step increment") || msg.contains("then i update of form (i + const)"),
|
||||
msg.contains("then' branch step increment")
|
||||
|| msg.contains("then i update of form (i + const)"),
|
||||
"unexpected panic message: {}",
|
||||
msg
|
||||
);
|
||||
@ -549,7 +550,10 @@ fn test_normalized_pattern_continue_return_min_vm_bridge_direct_matches_structur
|
||||
let base = run_joinir_vm_bridge(&structured, entry, &input, false);
|
||||
let dev = run_joinir_vm_bridge(&structured, entry, &input, true);
|
||||
|
||||
assert_eq!(base, dev, "vm bridge mismatch for pattern continue+return min");
|
||||
assert_eq!(
|
||||
base, dev,
|
||||
"vm bridge mismatch for pattern continue+return min"
|
||||
);
|
||||
}
|
||||
|
||||
/// Phase 89 P1: Pattern Continue + Return minimal - expected output test
|
||||
@ -580,7 +584,10 @@ fn test_parse_string_composite_min_vm_bridge_direct_matches_structured() {
|
||||
let base = run_joinir_vm_bridge(&structured, entry, &input, false);
|
||||
let dev = run_joinir_vm_bridge(&structured, entry, &input, true);
|
||||
|
||||
assert_eq!(base, dev, "vm bridge mismatch for parse_string composite min");
|
||||
assert_eq!(
|
||||
base, dev,
|
||||
"vm bridge mismatch for parse_string composite min"
|
||||
);
|
||||
}
|
||||
|
||||
/// Phase 90 P0: Parse String Composite minimal - expected output test
|
||||
@ -614,7 +621,11 @@ fn test_continue_return_multi_min_returns_null_at_first_match() {
|
||||
// Tests:
|
||||
// - Refactor-A: Null literal support (returns ConstValue::Null → JoinValue::Unit)
|
||||
// - Refactor-B: Multiple return-if with same value (i==3, i==7 both return null)
|
||||
assert_eq!(result, JoinValue::Unit, "Expected Unit (null) from first return-if at i=3");
|
||||
assert_eq!(
|
||||
result,
|
||||
JoinValue::Unit,
|
||||
"Expected Unit (null) from first return-if at i=3"
|
||||
);
|
||||
}
|
||||
|
||||
/// Phase Next: Parse Array minimal - vm_bridge direct vs structured
|
||||
|
||||
@ -73,15 +73,12 @@ fn test_phase72_observe_phi_dst_via_builder() {
|
||||
eprintln!("{}", report.summary());
|
||||
eprintln!();
|
||||
eprintln!("Detailed breakdown:");
|
||||
eprintln!(" - Reserved region (0-99): {} PHI dsts", report.in_reserved);
|
||||
eprintln!(
|
||||
" - Param region (100-999): {} PHI dsts",
|
||||
report.in_param
|
||||
);
|
||||
eprintln!(
|
||||
" - Local region (1000+): {} PHI dsts",
|
||||
report.in_local
|
||||
" - Reserved region (0-99): {} PHI dsts",
|
||||
report.in_reserved
|
||||
);
|
||||
eprintln!(" - Param region (100-999): {} PHI dsts", report.in_param);
|
||||
eprintln!(" - Local region (1000+): {} PHI dsts", report.in_local);
|
||||
eprintln!();
|
||||
|
||||
if report.is_all_reserved() {
|
||||
@ -89,9 +86,7 @@ fn test_phase72_observe_phi_dst_via_builder() {
|
||||
eprintln!(" → Safe to strengthen verifier with reserved region check");
|
||||
} else {
|
||||
eprintln!("⚠️ CONCLUSION: Some PHI dsts are OUTSIDE reserved region");
|
||||
eprintln!(
|
||||
" → PHI dst allocation does NOT respect reserved boundary"
|
||||
);
|
||||
eprintln!(" → PHI dst allocation does NOT respect reserved boundary");
|
||||
eprintln!(" → Document this finding and skip verifier strengthening");
|
||||
|
||||
if let (Some(min), Some(max)) = (report.min_val, report.max_val) {
|
||||
|
||||
Reference in New Issue
Block a user