INFRA-014: Fix meta_factory dataclass loading error #111

Closed
opened 2026-04-10 00:59:51 +00:00 by Mark · 1 comment
Owner

Problem

The meta_factory capability fails to load with an AttributeError during dataclass decoration, preventing the factory hierarchy from being fully operational.

Error

ERROR runtime.capability_loader:capability_loader.py:305 Failed to load capability meta_factory
AttributeError: NoneType object has no attribute __dict__.

Location

File: capabilities/_muscle/meta_factory/run.py:59

Root Cause

The dataclass decorator is applied in a context where sys.modules.get(cls.module) returns None. This happens during dynamic module loading via CapabilityLoader.

Impact

  • meta_factory unusable - Cannot create or mutate factories
  • Factory hierarchy incomplete - 6/7 factories working, meta_factory broken
  • Self-optimization blocked - Cannot evolve factories themselves

Scope (MINIMAL)

  1. Fix module loading in runtime/capability_loader.py to register module before execution
  2. Or refactor meta_factory dataclass to avoid the issue
  3. Single file change, minimal scope

Files

  • runtime/capability_loader.py - Fix module registration
  • capabilities/_muscle/meta_factory/run.py - Alternative: refactor dataclass

Acceptance Criteria

  • meta_factory loads without errors
  • All 7 factories load successfully
  • Tests pass with meta_factory loaded
  • Blocks factory evolution system
  • Related to Issue #104 (worker_factory bootstrap)
## Problem The meta_factory capability fails to load with an AttributeError during dataclass decoration, preventing the factory hierarchy from being fully operational. ## Error ``` ERROR runtime.capability_loader:capability_loader.py:305 Failed to load capability meta_factory AttributeError: NoneType object has no attribute __dict__. ``` ## Location File: capabilities/_muscle/meta_factory/run.py:59 ## Root Cause The dataclass decorator is applied in a context where sys.modules.get(cls.__module__) returns None. This happens during dynamic module loading via CapabilityLoader. ## Impact - meta_factory unusable - Cannot create or mutate factories - Factory hierarchy incomplete - 6/7 factories working, meta_factory broken - Self-optimization blocked - Cannot evolve factories themselves ## Scope (MINIMAL) 1. Fix module loading in runtime/capability_loader.py to register module before execution 2. Or refactor meta_factory dataclass to avoid the issue 3. Single file change, minimal scope ## Files - runtime/capability_loader.py - Fix module registration - capabilities/_muscle/meta_factory/run.py - Alternative: refactor dataclass ## Acceptance Criteria - [ ] meta_factory loads without errors - [ ] All 7 factories load successfully - [ ] Tests pass with meta_factory loaded ## Related - Blocks factory evolution system - Related to Issue #104 (worker_factory bootstrap)
Author
Owner

RESOLVED - meta_factory deleted

The meta_factory has been removed from the codebase as part of the terminology refactoring in commit a10e79f.

Rationale:

  • meta_factory was an abstract concept for future implementation
  • The factory hierarchy is now cleaner with 5 working factories: worker_factory, skill_factory, tool_factory, prompt_factory, contract_factory
  • capability_factory was also removed (overlapped with worker_factory)

What changed:

  • Deleted primitives/_muscle/meta_factory/
  • Updated AGENTS.md to reflect removal
  • Factories can be re-added when properly designed

This issue can be closed as the problematic code no longer exists.

**RESOLVED - meta_factory deleted** The `meta_factory` has been removed from the codebase as part of the terminology refactoring in commit a10e79f. **Rationale:** - `meta_factory` was an abstract concept for future implementation - The factory hierarchy is now cleaner with 5 working factories: worker_factory, skill_factory, tool_factory, prompt_factory, contract_factory - `capability_factory` was also removed (overlapped with worker_factory) **What changed:** - Deleted `primitives/_muscle/meta_factory/` - Updated AGENTS.md to reflect removal - Factories can be re-added when properly designed This issue can be closed as the problematic code no longer exists.
Mark closed this issue 2026-04-13 01:40:54 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/mesh-seed#111
No description provided.