feat: Phase 15.5-A 予約型保護解除完了+StringBox問題調査

🎯 **Phase 15.5 Phase A実装完了**
-  is_reserved_type()修正: 環境変数による条件付きバイパス実装
-  NYASH_USE_PLUGIN_BUILTINS=1 + NYASH_PLUGIN_OVERRIDE_TYPES対応
-  ビルド確認: エラーなしでコンパイル成功
-  プラグインロード確認: 予約型拒否エラーなし

🔍 **StringBox問題完全調査**
- 問題特定: get()/set()が空文字を返す(length=4で内部データあり)
- 全バックエンド影響: VM/プラグイン/コア すべて同じ問題
- MIRレベル正常: newbox/boxcall正しく生成
- 調査資料: /tmp/stringbox_test_results.md完備

📂 **変更ファイル**
- src/box_factory/mod.rs: 予約型保護条件付き解除
- docs/phase-15.5: Phase A完了ドキュメント更新
- nyash.toml: StringBox/IntegerBoxプラグイン設定追加

🚀 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Selfhosting Dev
2025-09-24 05:57:08 +09:00
parent a160c186fd
commit 8bbc30509c
5 changed files with 453 additions and 25 deletions

View File

@ -71,6 +71,15 @@ impl UnifiedBoxRegistry {
let mut cache = self.type_cache.write().unwrap();
// Reserved core types that must remain builtin-owned
fn is_reserved_type(name: &str) -> bool {
// Phase 15.5: 環境変数でプラグイン優先モード時は保護解除
if std::env::var("NYASH_USE_PLUGIN_BUILTINS").is_ok() {
if let Ok(types) = std::env::var("NYASH_PLUGIN_OVERRIDE_TYPES") {
if types.split(',').any(|t| t.trim() == name) {
return false; // 予約型として扱わない
}
}
}
matches!(
name,
// Core value types