feat(phase112): Ring0 Service Registry統一化実装完了
Ring0 初期化を Ring0Registry::build(profile) に集約し、プロファイル対応を統一化 【実装内容】 - Task 2: Ring0Registry struct + build(profile) メソッド実装 - RuntimeProfile::Default → StdFs を使用 - RuntimeProfile::NoFs → NoFsApi を使用 - build_default()/build_no_fs() の内部メソッド分離 - Task 3: NoFsApi struct 実装(FsApi trait) - すべてのファイルシステム操作を「disabled」として失敗させる - read/write/append/metadata/canonicalize が IoError を返す - exists() は false を返す - 49行の新規実装 - Task 4: initialize_runtime() SSOT パターン確認 - env 読み込み → RuntimeProfile::from_env() - Ring0Context 構築 → Ring0Registry::build(profile) - グローバル登録 → init_global_ring0() - 唯一の責務分離を確立 - Task 5: PluginHost/FileBox/FileHandleBox からの Ring0 統合 - Ring0.fs = NoFsApi の場合、すべての上位層が自動的に disabled - 特別なロジック不要(カスケード disabled パターン) - Task 6: ドキュメント更新 - core_boxes_design.md: Section 17 追加(88行) - ring0-inventory.md: Phase 112 エントリ追加(16行) - CURRENT_TASK.md: Phase 106-112 完了表更新 - phase112_ring0_registry_design.md: 完全設計書(426行) 【統計】 - 8ファイル修正(+261行, -30行) - 3つの新テスト追加(Ring0Registry関連) - test_ring0_registry_default_profile - test_ring0_registry_nofs_profile - test_default_ring0_uses_registry - cargo build --release: SUCCESS - 全テスト PASS 【設計原則確立】 - Ring0Registry factory pattern で profile-aware 実装選択を一本化 - NoFsApi による自動 disabled により、上位層の特別処理を排除 - initialize_runtime() が唯一の env 読み込み入口として SSOT 確立 - 将来の profile 追加(TestMock/Sandbox/ReadOnly/Embedded等)が容易に 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -589,10 +589,18 @@ Phase 106–108 では FileBox provider_lock / Ring0FsFileIo / write/write_all
|
||||
- 実装: `src/boxes/file/handle_box.rs` (7テスト全PASS)
|
||||
- API: open(path, mode) → read/write → close()
|
||||
- プロファイル対応: Default ✅、NoFs ❌
|
||||
- **Phase 111: Fs metadata 拡張 + append mode**
|
||||
- ✅ **Phase 111: Fs metadata 拡張 + append mode** (COMPLETED - 2025-12-03)
|
||||
- FileHandleBox に append mode ("a") を追加
|
||||
- `exists/metadata/canonicalize` を FileIo / FileBox 側にきちんとエクスポート
|
||||
- Ring0.FsApi の stat 情報を Nyash 側から扱えるようにする
|
||||
- 実装: append_all() + metadata() 完全実装
|
||||
- テスト: 4個の新テスト全PASS
|
||||
- ✅ **Phase 112: Ring0 Service Registry 統一化** (COMPLETED - 2025-12-03)
|
||||
- Ring0Context 初期化を Ring0Registry::build(profile) factory パターンに集約
|
||||
- NoFsApi struct 実装(Ring0 レベルで FsApi を無効化)
|
||||
- Profile 応じた実装選択(Default → StdFs、NoFs → NoFsApi)
|
||||
- default_ring0() を Ring0Registry 経由に統一(互換性維持)
|
||||
- 将来の拡張準備(TestMock/Sandbox/ReadOnly/Embedded プロファイル対応可能)
|
||||
|
||||
さらに長期的には、Ring0 全体を「統一サービスレジストリ」として扱うフェーズ(Mem/Io/Time/Log/Fs/Thread の trait 統合)を
|
||||
Phase 11x 以降で検討する予定だよ。
|
||||
さらに長期的には、Ring0 全体を「統一サービスレジストリ」として扱うフェーズ(Mem/Io/Time/Log/Fs/Thread の trait 統合)を
|
||||
Phase 11x 以降で検討する予定だよ。Phase 112 で factory pattern による拡張基盤が整備された!
|
||||
|
||||
Reference in New Issue
Block a user