refactor(di): add module registrar support to unified_bootstrapper#370
Merged
kcenon merged 1 commit intoFeb 23, 2026
Merged
Conversation
) Add dynamic module registration to unified_bootstrapper, replacing compile-time #ifdef guards with runtime registration. This enables subsystems to register their DI services programmatically. - Add ModuleRegistrar concept to concepts/service.h - Add register_module(), unregister_module(), registered_modules(), is_module_registered() to unified_bootstrapper - Support both function-based and class-based (concept) registration - Modules registered before initialize() are called during init; modules registered after are called immediately - Add 12 unit tests for module registration functionality
21 tasks
3 tasks
kcenon
added a commit
that referenced
this pull request
Apr 13, 2026
) (#370) Add dynamic module registration to unified_bootstrapper, replacing compile-time #ifdef guards with runtime registration. This enables subsystems to register their DI services programmatically. - Add ModuleRegistrar concept to concepts/service.h - Add register_module(), unregister_module(), registered_modules(), is_module_registered() to unified_bootstrapper - Support both function-based and class-based (concept) registration - Modules registered before initialize() are called during init; modules registered after are called immediately - Add 12 unit tests for module registration functionality
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #366
Part of #363
Summary
ModuleRegistrarC++20 concept for compile-time validation of module registration classesunified_bootstrapper(register_module(),unregister_module(),registered_modules(),is_module_registered())initialize()are deferred and called during init; modules registered after are called immediatelyregister_optional_services()by integrating dynamic module dispatch alongside legacy#ifdefguardsContext
This is Phase 1+2 of the DI container consolidation effort (#363):
Phase 1 (Audit) identified that:
service_containerlightweight_di_container+ bridge adapterdatabase_coordinator+ bridge adapterPhase 2 (Enhancement) adds the module registrar infrastructure that downstream systems will use to register their services with the unified container.
Remaining phases tracked in: #367 (logger), #368 (monitoring), #369 (database)
Test Plan
static_assertverifiesModuleRegistrarconcept