What
Implement the placeholder register_core_services() and register_optional_services() methods in unified_bootstrapper to actually register system services.
Scope
In Scope:
- Core service registration (always registered)
- Optional service registration based on
bootstrapper_options
- Service dependency ordering
- Error handling for registration failures
Out of Scope:
- Actual service implementations (provided by subsystems)
- Runtime service discovery
Why
Problem
Current implementation at unified_bootstrapper.h:444-485 contains only placeholder code:
inline VoidResult unified_bootstrapper::register_core_services() {
// Core services are minimal and always registered
// The actual service implementations come from subsystems via adapters
return VoidResult::ok({}); // Empty!
}
Business Value
- unified_bootstrapper becomes actually usable
- Systems can properly initialize via single entry point
- Proper dependency injection for all subsystems
Part of #314
Who
When
- Priority: Medium
- Dependencies: Service adapters from each subsystem
Where
File Location
common_system/include/kcenon/common/di/unified_bootstrapper.h
How
Technical Approach
-
Define service registration hooks
// Each subsystem provides a registration function
namespace kcenon::logger::di {
VoidResult register_services(service_container& container);
}
-
Implement register_optional_services
inline VoidResult unified_bootstrapper::register_optional_services(
const bootstrapper_options& opts) {
if (opts.enable_logging) {
// Check if logger adapter is available
#if defined(KCENON_HAS_LOGGER_SYSTEM)
auto result = logger::di::register_services(service_container::global());
if (result.is_err()) return result;
#endif
}
if (opts.enable_monitoring) {
#if defined(KCENON_HAS_MONITORING_SYSTEM)
auto result = monitoring::di::register_services(service_container::global());
if (result.is_err()) return result;
#endif
}
// ... similar for database and network
return VoidResult::ok({});
}
-
Add feature detection macros
- Create
config/feature_system_deps.h with detection macros
- Allow graceful degradation when subsystems not available
Acceptance Criteria
Testing Requirements
- Test initialization with all options enabled
- Test initialization with each option individually
- Test graceful handling when subsystem not available
- Test error rollback on registration failure
What
Implement the placeholder
register_core_services()andregister_optional_services()methods inunified_bootstrapperto actually register system services.Scope
In Scope:
bootstrapper_optionsOut of Scope:
Why
Problem
Current implementation at
unified_bootstrapper.h:444-485contains only placeholder code:Business Value
Part of #314
Who
When
Where
File Location
common_system/include/kcenon/common/di/unified_bootstrapper.hHow
Technical Approach
Define service registration hooks
Implement register_optional_services
Add feature detection macros
config/feature_system_deps.hwith detection macrosAcceptance Criteria
Testing Requirements