feat(phase32): L-2.1 Stage-1 UsingResolver JoinIR integration + cleanup

Phase 32 L-2.1 complete implementation:

1. Stage-1 UsingResolver main line JoinIR connection
   - CFG-based LoopForm construction for resolve_for_source/5
   - LoopToJoinLowerer integration with handwritten fallback
   - JSON snapshot tests 6/6 PASS

2. JoinIR/VM Bridge improvements
   - Simplified join_ir_vm_bridge.rs dispatch logic
   - Enhanced json.rs serialization
   - PHI core boxes cleanup (local_scope_inspector, loop_exit_liveness, loop_var_classifier)

3. Stage-1 CLI enhancements
   - Extended args.rs, groups.rs, mod.rs for new options
   - Improved stage1_bridge module (args, env, mod)
   - Updated stage1_cli.hako

4. MIR builder cleanup
   - Simplified if_form.rs control flow
   - Removed dead code from loop_builder.rs
   - Enhanced phi_merge.rs

5. Runner module updates
   - json_v0_bridge/lowering.rs improvements
   - dispatch.rs, selfhost.rs, modes/vm.rs cleanup

6. Documentation updates
   - CURRENT_TASK.md, AGENTS.md
   - Various docs/ updates

🤖 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-26 10:17:37 +09:00
parent 7d0581c9a4
commit 51ff558904
36 changed files with 474 additions and 361 deletions

View File

@ -146,6 +146,15 @@ PR テンプレ(追加項目)
- [ ] 「スモークを通すためだけのハードコード」を入れていません(根治で解決)
- [ ] 受け入れ基準に記載の検証を実施しましたdev OFF/ログ確認)
### 5.3 環境変数スパロー防止(今回の反省)
- 事件メモ: `NYASH_*` が大量に増殖し、実質未使用のトグルが多数発見された2025-02-XX。環境変数病を防ぐための運用ルールを追加する。
- 追加ルール:
- 目的が明確なときだけ新設する。デフォルトOFFかつ撤去計画どのフェーズで消すか`docs/reference/environment-variables.md` に必ず書く。
- 実装は `src/config/env` に集約し、直読み禁止。棚卸し用に定義の所在を一元化する。
- 期間限定トグルは dev/diagnostic 専用タグを付け、フェーズ完了時に削除するCURRENT_TASK.md に期限を書く)。
- 半期ごとに未使用(定義のみ)の変数を洗い出し、削除または非推奨化する。
- ドキュメントに載せない「隠しトグル」は原則禁止。載せるか削除するかの二択。
### 5.2 Rust Minimal PolicySelfHost First, but not Frozen
目的: 脱Rustを志向しつつも、Stage1 / SelfHost ラインの整備やツールの使いやすさ向上のために、**Rust層で必要な構造的変更やブリッジ強化は積極的に許可する**。分析/ルール/可視化は引き続き .hako 側が主戦場。