5W1H Specification
- Who: Maintainers, consumers of monitoring_system
- What: Align
monitoring_interface.h with common_system to eliminate interface duplication
- Where:
include/kcenon/monitoring/interfaces/monitoring_interface.h
- When: Immediate (high priority - architectural consistency)
- Why: Interface duplication violates Single Source of Truth; risks version drift and inconsistent behavior
- How: Either re-export from common_system or consolidate definitions
Problem Statement
Current State
Two monitoring_interface.h files exist in the ecosystem:
| Location |
Purpose |
common_system/include/kcenon/common/interfaces/monitoring_interface.h |
Canonical IMonitor interface |
monitoring_system/include/kcenon/monitoring/interfaces/monitoring_interface.h |
Extended monitoring interfaces |
Issues
- Naming Collision: Same filename, different content
- Include Path Confusion:
#include <.../monitoring_interface.h> ambiguous
- Interface Divergence Risk: Changes in one may not propagate to the other
- Dependency Graph Complexity: Unclear which is authoritative
Observed in Code Review
unified_system/
├── common_system/.../monitoring_interface.h # IMonitor
├── monitoring_system/.../monitoring_interface.h # extended interfaces
└── thread_system/... (uses one or both?)
Proposed Solution
Option A: Rename monitoring_system Interface (Recommended)
Rename to avoid collision:
monitoring_system/interfaces/monitoring_interface.h
→ monitoring_system/interfaces/metric_interfaces.h
OR
→ monitoring_system/interfaces/monitoring_extensions.h
Option B: Re-export Pattern
monitoring_system/interfaces/monitoring_interface.h:
#pragma once
#include <kcenon/common/interfaces/monitoring_interface.h>
namespace kcenon::monitoring::interfaces {
// Re-export common interface
using ::kcenon::common::interfaces::IMonitor;
// Extended interfaces specific to monitoring_system
class IMetricCollector { ... };
}
Option C: Merge into common_system
If monitoring_system interfaces are universally needed:
- Move extended interfaces to common_system
- monitoring_system becomes pure implementation
Migration Steps
- Audit all usages of
monitoring_interface.h across systems
- Choose consolidation strategy
- Update include paths in dependent systems
- Deprecate old paths with forwarding headers
- Remove deprecated headers in next major version
Acceptance Criteria
Impact
- Priority: High (architectural consistency)
- Effort: Medium (requires cross-repo coordination)
- Breaking Change: Potentially (include path changes)
Related Systems
- common_system (canonical interface location)
- thread_system (consumer)
- logger_system (consumer)
- pacs_system (consumer)
5W1H Specification
monitoring_interface.hwithcommon_systemto eliminate interface duplicationinclude/kcenon/monitoring/interfaces/monitoring_interface.hProblem Statement
Current State
Two
monitoring_interface.hfiles exist in the ecosystem:common_system/include/kcenon/common/interfaces/monitoring_interface.hmonitoring_system/include/kcenon/monitoring/interfaces/monitoring_interface.hIssues
#include <.../monitoring_interface.h>ambiguousObserved in Code Review
Proposed Solution
Option A: Rename monitoring_system Interface (Recommended)
Rename to avoid collision:
Option B: Re-export Pattern
monitoring_system/interfaces/monitoring_interface.h:Option C: Merge into common_system
If monitoring_system interfaces are universally needed:
Migration Steps
monitoring_interface.hacross systemsAcceptance Criteria
monitoring_interface.hOR clearly differentiated namesImpact
Related Systems