refactor(joinir): Extract legacy binding path to routing_legacy_binding.rs

Phase 179-A Step 2: Separate LoopFrontendBinding JSON construction logic
into dedicated module for better organization.

Changes:
- New file: routing_legacy_binding.rs (223 lines)
- routing.rs: cf_loop_joinir_impl() simplified to 15 lines (delegates to legacy path)
- Routing now clearly separates pattern-based vs. legacy binding paths

Benefits:
- Clear separation of concerns (pattern router vs. legacy whitelist)
- routing.rs reduced from 364 to 146 lines (60% reduction)
- Legacy path isolated for future deprecation
This commit is contained in:
nyash-codex
2025-12-08 18:36:13 +09:00
parent 7a01ffe522
commit 95f3aa429e
25 changed files with 626 additions and 755 deletions

View File

@ -87,11 +87,19 @@
**バグ修正**: Trim pattern の loop_var_name 上書き問題、InstructionRewriter の latch_incoming 設定問題。
- 今後 1〜2 フェーズの TODOJoinIR 周りのサマリ)
- [ ] **Phase 177: JsonParser `_parse_string` 本体の JoinIR 適用**
- Phase 176 の multi-carrier 対応を前提に、実際の `_parse_string` ループを P2+P5 で通す。
- 期待: pos + result の 2 キャリアが正しく更新される。
- エスケープ処理(`\"`)は Phase 178+ で対応。
- [ ] Phase 178+: JsonParser `_parse_array` / `_parse_object` など、残りの複雑ループを順次 P1P5 の組み合わせで吸収していく。
- [x] **Phase 177: Multi-carrier PHI 接続修正** ✅ (2025-12-08)
- Task 177-STRUCT-1: CarrierVar に join_id 追加
- Task 177-STRUCT-2: carrier_order で順序保持LoopHeaderPhiInfo
- **成果**: Int テスト成功sum=3、index mismatch 問題解決
- [x] **Phase 178: LoopUpdateAnalyzer string 検出** ✅ (2025-12-08)
- Task 178-1: UpdateRhs 拡張StringLiteral, Other 追加)
- Task 178-2: analyze_rhs 分岐拡張string/method call 検出)
- Task 178-3: Pattern2/4 can_lower で string 拒否Fail-Fast
- Task 178-4: Legacy fallback コメント修正LoopBuilder 削除済み反映)
- **成果**: String loop は明示的エラー、numeric loop は正常動作維持
- **注意**: グローバルテスト 79 件失敗は Phase 178 以前からの既知問題(別途対応)
- [ ] Phase 179+: JsonParser `_parse_array` / `_parse_object` など、残りの複雑ループを順次 P1P5 の組み合わせで吸収していく。
- String 連結ループは Phase 178 で Fail-Fast 化されたため、JoinIR string emit 対応が先に必要。
---