All module dependencies in SENTINEL have been verified and are properly resolved. The module loading system correctly handles dependency resolution, loading required modules before dependent modules.
- config_cache: depends on
logging✓ - module_manager: depends on
config_cache logging✓ - sentinel_markov: depends on
logging config_cache✓ - auto_install: depends on
logging✓ - command_chains: depends on
logging✓
The following modules have no declared dependencies and function independently:
- autocomplete (defines its own logging functions)
- bash_logout
- distcc
- fuzzy_correction (defines its own logging functions)
- fzf
- hashcat
- hmac
- logging (base module)
- obfuscate
- project_suggestions (defines its own logging functions)
- sentinel_chat
- sentinel_context
- sentinel_cybersec_ml
- sentinel_gitstar
- sentinel_ml_enhanced
- sentinel_ml
- sentinel_osint
- sentinel_smallllm
- shell_security
- skeleton
- snippets (defines its own logging functions)
The current module load order in .bash_modules is functional but could be optimized. The critical requirement is that:
loggingloads before modules that depend on itconfig_cacheloads afterloggingbut beforemodule_manager
The module system uses a recursive dependency resolution algorithm:
- When loading a module, it first checks for
SENTINEL_MODULE_DEPENDENCIES - For each dependency, it recursively calls
module_enableto load it - Circular dependencies are prevented by checking if a module is already loaded
- Maximum recursion depth of 5 prevents infinite loops
All dependency tests pass:
- ✓ config_cache correctly loads logging first
- ✓ module_manager correctly loads both config_cache and logging
- ✓ sentinel_markov correctly loads both logging and config_cache
- ✓ auto_install correctly loads logging
- ✓ command_chains correctly loads logging
- The module system is working correctly - no fixes needed
- Some modules define their own logging functions (autocomplete, fuzzy_correction, etc.) which is acceptable
- The load order could be optimized by using topological sort, but the current order works
- Consider documenting module dependencies in a central location for easier maintenance
/opt/github/SENTINEL/bash_modules.d/auto_install.module- AddedSENTINEL_MODULE_DEPENDENCIES="logging"/opt/github/SENTINEL/bash_modules.d/command_chains.module- AddedSENTINEL_MODULE_DEPENDENCIES="logging"/opt/github/SENTINEL/bash_modules.d/module_manager.module- Updated toSENTINEL_MODULE_DEPENDENCIES="config_cache logging"
/opt/github/SENTINEL/check_module_dependencies.sh- Analyzes all modules for missing dependencies/opt/github/SENTINEL/test_module_loading.sh- Tests module loading with dependencies/opt/github/SENTINEL/test_clean_module_loading.sh- Clean test of dependency resolution/opt/github/SENTINEL/fix_module_order.sh- Script to optimize module load order (optional)