nyash-codex
04f476d6b4
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>
2025-12-03 22:19:24 +09:00
..
2025-09-17 10:58:12 +09:00
2025-12-03 22:19:24 +09:00
2025-11-06 15:41:52 +09:00
2025-11-06 15:41:52 +09:00
2025-08-26 01:42:18 +09:00
2025-09-05 13:29:17 +09:00
2025-08-21 00:41:26 +09:00
2025-09-24 01:05:44 +09:00
2025-08-28 09:26:58 +09:00
2025-11-06 15:41:52 +09:00
2025-08-21 00:41:26 +09:00
2025-09-24 14:13:15 +09:00
2025-08-26 19:13:57 +09:00
2025-08-26 00:48:09 +09:00