feat(phase109): RuntimeProfile設計で FileBox を条件付き optional に
Phase 109 完全実装完了: - RuntimeProfile enum (Default, NoFs) で profile 制御 - CoreBoxId.is_required_in(profile) で条件付き required/optional - initialize_runtime() で env 読み込み責務を一元化(修正1) - NoFsFileIo スタブで no-fs プロファイルでの FileBox 無効化(修正2) - Logger/ConsoleService は no-fs でも有効と明示(修正2) - Profile 拡張予定(TestMock/Sandbox/ReadOnly/Embedded)を予約(修正3) 実装ファイル: - src/runtime/runtime_profile.rs (新規) - src/providers/ring1/file/nofs_fileio.rs (新規) - src/runtime/core_box_ids.rs (修正) - src/runtime/plugin_host.rs (修正) - src/runtime/provider_lock.rs (修正) - docs 更新 テスト: Phase 109 11/11 PASS ✅ ビルド: cargo build --release SUCCESS ✅ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -322,4 +322,41 @@ fn test_filebox_double_open() {
|
||||
|
||||
---
|
||||
|
||||
## 9. Phase 109 以降の計画
|
||||
|
||||
### Phase 109: RuntimeProfile 機構の追加
|
||||
|
||||
**Phase 109 完了により、FileBox は conditional required に変更されました**:
|
||||
|
||||
- **RuntimeProfile enum 導入**(Default/NoFs)
|
||||
- **Default profile**: FileBox は required(Phase 107/108 の動作を維持)
|
||||
- **NoFs profile**: FileBox は optional(NoFsFileIo stub で無効化)
|
||||
|
||||
**設計変更**:
|
||||
```rust
|
||||
// Phase 109 以前: FileBox は常に required
|
||||
CoreBoxId::File.is_core_required() // → true
|
||||
|
||||
// Phase 109 以降: profile 依存の判定に
|
||||
CoreBoxId::File.is_required_in(&RuntimeProfile::Default) // → true
|
||||
CoreBoxId::File.is_required_in(&RuntimeProfile::NoFs) // → false
|
||||
```
|
||||
|
||||
**プロファイル別動作**:
|
||||
- **Default**: Ring0FsFileIo(read/write 両対応)自動登録
|
||||
- **NoFs**: NoFsFileIo(全操作で Unsupported エラー)登録
|
||||
|
||||
**将来の拡張計画**(Phase 109 Modification 3):
|
||||
- TestMock: テスト用(全プラグインが mock に)
|
||||
- Sandbox: サンドボックス(外部 I/O 禁止)
|
||||
- ReadOnly: 読み取り専用(FileBox.write 禁止)
|
||||
- Embedded: 組み込み(メモリ制限・GC あり)
|
||||
|
||||
**互換性**:
|
||||
- Phase 107/108 の既存動作は Default profile で完全維持
|
||||
- NoFs profile は完全に新規追加(既存コードに影響なし)
|
||||
|
||||
---
|
||||
|
||||
**Phase 108 指示書作成日**: 2025-12-03(微調整版)
|
||||
**Phase 109 追記**: 2025-12-03(RuntimeProfile 統合完了)
|
||||
|
||||
Reference in New Issue
Block a user