feat(joinir): Phase 35-5 PHI box deletion (430 lines HIGH safety)

Phase 35-5: First wave deletion
- Deleted if_body_local_merge.rs (339 lines, 0 external calls)
  - Inlined logic into PhiBuilderBox::compute_modified_names_if()
  - Absorbed into PhiBuilderBox (isolated box with no external dependencies)
- Deleted phi_invariants.rs (91 lines, moved to JoinIR Verifier)
  - Removed ensure_if_values_exist() call from phi_builder_box.rs
  - Validation responsibility transferred to JoinIR Verifier
- Updated PHI_BOX_INVENTORY.md with deletion records

Phase 35-3/4: Documentation and route unification
- Added frontend_covered column to PHI_BOX_INVENTORY.md
- Documented JoinIR Runner routes (Route A: SSOT, Route B: structure validation)
- Updated join_ir_runner.rs module docstring with clear route guidelines

Build and test status:
 cargo build --release: Clean
 Phase 34 tests: All PASS (no regression)
 JoinIR tests: joinir_frontend_if_select, test_if_merge_simple_pattern PASS

Total reduction: 430 lines (HIGH safety achieved)
Phase 36+ potential: ~3,275 lines (MEDIUM/LOW safety)

Related docs:
- docs/private/roadmap2/phases/phase-35-phi-reduction/README.md
- docs/private/roadmap2/phases/phase-35-phi-reduction-investigation-report.md
- docs/private/roadmap2/phases/phase-30-final-joinir-world/PHI_BOX_INVENTORY.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
nyash-codex
2025-11-28 01:18:57 +09:00
parent 853d80ba74
commit c2fb9dab6b
9 changed files with 131 additions and 477 deletions

View File

@ -1168,7 +1168,8 @@ impl<'a> LoopBuilder<'a> {
let mut ops = Ops(self);
// Phase 26-F-2: BodyLocalPhiBuilder削除、IfBodyLocalMergeBox使用
// Phase 26-F-2: BodyLocalPhiBuilder削除
// Phase 35-5: if_body_local_merge.rs削除、PhiBuilderBoxに吸収
// 理由: 箱理論による責務分離(ループスコープ分析 vs if-merge専用処理
// Phase 26-E: PhiBuilderBox SSOT統合If PHI生成
@ -1189,7 +1190,7 @@ impl<'a> LoopBuilder<'a> {
carrier_names,
);
// Phase 26-F-2: IfBodyLocalMergeBox は phi_builder_box.rs 内で直接使用
// Phase 35-5: if_body_local_merge.rs削除、ロジックはPhiBuilderBox内に統合
let post_snapshots = if let Some(ref else_map) = else_var_map_end_opt {
vec![then_var_map_end.clone(), else_map.clone()]