Summary
Consolidate commonly duplicated infrastructure components across the ecosystem into common_system, following Kent Beck's Simple Design principles (No Duplication, Fewest Elements).
Background (Why)
Kent Beck's Principles Violations
| Principle |
Issue |
Impact |
| No Duplication |
circuit_breaker exists in 3 systems |
Maintenance burden, inconsistent behavior |
| Fewest Elements |
Each system has its own stats structs |
Unnecessary complexity |
| Reveals Intention |
Placeholder implementations in bootstrapper |
Unclear system boundaries |
Current Problems
- circuit_breaker duplication: Exists in
thread_system, monitoring_system, and network_system
- Result pattern duplication: Each system may have its own error handling
- Stats interface fragmentation: No common interface for statistics collection
- Incomplete bootstrapper:
register_core_services() and register_optional_services() are empty
Scope (What)
Components to Consolidate
common_system/include/kcenon/common/
├── resilience/
│ ├── circuit_breaker.h # Moved from thread/monitoring/network
│ ├── retry_policy.h # Common retry logic
│ └── error_boundary.h # Common error handling
├── patterns/
│ └── stats_interface.h # IStats common interface
└── di/
└── unified_bootstrapper.h # Complete implementation
Migration Strategy
- Extract common interface from existing implementations
- Implement in common_system with configuration options
- Update dependent systems to use common_system version
- Deprecate and remove duplicates
Child Issues
Acceptance Criteria
Summary
Consolidate commonly duplicated infrastructure components across the ecosystem into common_system, following Kent Beck's Simple Design principles (No Duplication, Fewest Elements).
Background (Why)
Kent Beck's Principles Violations
circuit_breakerexists in 3 systemsstatsstructsCurrent Problems
thread_system,monitoring_system, andnetwork_systemregister_core_services()andregister_optional_services()are emptyScope (What)
Components to Consolidate
Migration Strategy
Child Issues
Acceptance Criteria