feat: Implement Phase 9.78e instance_v2 migration with unified registry
Major achievements: - ✅ UserDefinedBoxFactory implementation with unified registry integration - ✅ Constructor execution for user-defined boxes (Person init working) - ✅ Import path fixes across interpreter modules - ✅ unwrap_instance helper function for InstanceBox operator support Technical details: - Modified UnifiedBoxRegistry to handle empty box_types() factories - Implemented constructor execution in execute_new for InstanceBox - Added unwrap_instance helper to handle InstanceBox wrapping in operators - Updated CURRENT_TASK.md with detailed progress tracking Next: Fix 4 operator functions to complete InstanceBox operator support 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@ -90,10 +90,22 @@ impl UnifiedBoxRegistry {
|
||||
}
|
||||
drop(cache);
|
||||
|
||||
// Fallback: linear search through all factories
|
||||
// Linear search through all factories
|
||||
for factory in &self.factories {
|
||||
if factory.box_types().contains(&name) && factory.is_available() {
|
||||
return factory.create_box(name, args);
|
||||
if !factory.is_available() {
|
||||
continue;
|
||||
}
|
||||
|
||||
// For factories that advertise types, check if they support this type
|
||||
let box_types = factory.box_types();
|
||||
if !box_types.is_empty() && !box_types.contains(&name) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Try to create the box (factories with empty box_types() will always be tried)
|
||||
match factory.create_box(name, args) {
|
||||
Ok(boxed) => return Ok(boxed),
|
||||
Err(_) => continue, // Try next factory
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user