Files
nyash-codex ce7517dc21 docs(phase-21.7): NamingBox SSOT 統一化チェックリスト作成
Phase 21.7++ の詳細実装計画を文書化

## 作成ファイル
- docs/development/current/main/phase-21.7-naming-ssot-checklist.md
  - Phase 0-4 の詳細タスクリスト(チェックボックス付き)
  - 各タスクの具体的な実装コード例
  - テストケース
  - 工数見積もり・優先順位
  - 完了条件

## CURRENT_TASK.md 更新
- Phase 21.7 セクションにチェックリストへのリンク追加

## 実装優先順位
1. Phase 0: 観測ライン緊急構築(最優先、2-3時間)
2. Phase 1: 基盤整備(4-6時間)
3. Phase 2: VM 統一(3-4時間)
4. Phase 3-4: 全体統一・ドキュメント(Phase 22+)

次のステップ: Phase 0 実装開始
2025-11-22 01:59:27 +09:00

44 lines
2.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Normalization Ownership — Rust vs Hakorune
Goal
- Prevent double-normalization and keep a clear Single Source of Truth (SSOT) for where each rewrite lives.
Ownership
- Hakorune layer (Hako scripts)
- Methodization: Global("Box.m/N") → mir_call(Method) への変換。
- Name/arity canonicalizationBox.method/N
- Function defs scan/injectHAKO_STAGEB_FUNC_SCAN, HAKO_MIR_BUILDER_FUNCS
- Emit JSON v1 + unified mir_callNYASH_JSON_SCHEMA_V1=1, NYASH_MIR_UNIFIED_CALL=1
- 可視化タグ/診断の出力dev のみ)
- Rust layer
- Structural/correctness: SSA/PHI、受信側ローカライズLocalSSA/Copy/pin
- Legacy JSON v0 → minimal bridgingjson_v0_bridge 内での Callee 補完など)。
- 互換/安全弁: 未定義受信の構造的回復同一BB直近 NewBoxなど、dev ガード付きの最小範囲。
- Optimizer は構造・副作用ベースの最適化に限定(意味論の再書換えはしない)。
- Global 呼び出し名の canonical 化(例: `"Box.method"``"Box.method/N"`)は NamingBox を通じて行い、VM/LLVM/Interpreter は arity 付き名を SSOT として扱う。
Guards and Toggles
- Hakodev 推奨セット)
- HAKO_STAGEB_FUNC_SCAN=1
- HAKO_MIR_BUILDER_FUNCS=1
- HAKO_MIR_BUILDER_CALL_RESOLVE=1
- HAKO_MIR_BUILDER_METHODIZE=1methodize が v1+unified 出力へ寄与)
- NYASH_JSON_SCHEMA_V1=1, NYASH_MIR_UNIFIED_CALL=1
- Rustbridge/診断)
- HAKO_BRIDGE_METHODIZE=1 は bring-up 用の補助。Hako 既定化後は OFF撤去予定
- mir_plugin_invoke/plugin_only は A/B 評価・診断用途。既定 OFF。
Rules of Engagement
- v1 + unified を Hako で生成した場合、Rust 側での methodize/再書換えは行わない(構造のみ)。
- json_v0_bridge は v0 入力に対する互換のために限定運用。v1 既定化が進めば縮退する。
- dev の安全弁(未定義受信の構造回復など)は、テストが十分になり次第 OFF/撤去する。
Testing
- Canary
- tools/dev/phase217_methodize_canary.shrc=5
- tools/dev/phase217_methodize_json_canary.shschema_version + mir_call present、Method優先
- tools/dev/phase216_chain_canary_call.shrc=5
- 失敗時は Hako 側methodize→ Rust 側(構造) の順で原因を特定する。