|
|
268a56fdfe
|
feat(box_factory): Phase 86 BoxFactory Priority normalization
Phase 86: BoxFactory Priority 正常化プロジェクト完了
目的:
- BoxFactory のデフォルトポリシーを BuiltinFirst から StrictPluginFirst に変更
- プラグイン版 StringBox/ArrayBox/MapBox が正常に使用できるよう正常化
- Phase 85 (Ring0/Ring1-Core 境界設計) の土台準備
実装内容:
1. ドキュメント作成
- docs/development/current/main/factory_priority.md: 完全仕様文書化
2. コード修正 (1行のみ)
- UnifiedBoxRegistry::new() が with_env_policy() を使用
- デフォルトポリシーが StrictPluginFirst に変更
3. テスト追加 (5件, 全パス)
- test_default_policy_is_strict_plugin_first: デフォルトポリシー確認
- test_env_policy_override: 環境変数制御確認
- test_reserved_type_protection: 予約型保護動作確認
- test_plugin_override_with_env: 予約型 override 確認
- test_non_reserved_plugin_priority: 非予約型プラグイン優先確認
効果:
- ✅ プラグイン版 StringBox/ArrayBox/MapBox が正常に使用可能
- ✅ core_required Box の予約名保護維持
- ✅ 環境変数による柔軟な制御が可能
- ✅ テスト改善: 500→506 passed, 34→33 failed (+6 passed, -1 failed)
core_required Box リスト (暫定):
- Core value types: StringBox, IntegerBox, BoolBox, FloatBox, NullBox
- Core containers: ArrayBox, MapBox, ResultBox
- Core method indirection: MethodBox
環境変数:
- NYASH_BOX_FACTORY_POLICY: ポリシー選択 (default: strict_plugin_first)
- NYASH_USE_PLUGIN_BUILTINS: core_required override 許可
- NYASH_PLUGIN_OVERRIDE_TYPES: 個別 Box override 許可
Phase 85 準備:
- Ring0/Ring1-Core 境界設計の土台が整った
- ConsoleBox の扱いは Phase 85 で最終決定
完了条件:
- ✅ factory_priority.md 作成完了
- ✅ UnifiedBoxRegistry::new() 修正完了
- ✅ デフォルトポリシー StrictPluginFirst 確定
- ✅ テスト 5件追加・全パス
- ✅ CURRENT_TASK.md 更新完了
- ✅ Phase 85 README 準備完了
参考:
- 設計文書: docs/development/current/main/factory_priority.md
- Phase 85 計画: docs/private/roadmap2/phases/phase-85-ring0-runtime/README.md
🎉 Phase 86 完了!次は Phase 85 で Ring0/Ring1-Core 境界の文書化へ
|
2025-12-02 21:52:18 +09:00 |
|