feat(health): implement health monitoring API for test_health_monitoring.cpp#356
Merged
Merged
Conversation
…ing.cpp Implement comprehensive health monitoring API as defined in Issue #330: - health_check: Abstract base class for health checks with get_name(), get_type(), check(), get_timeout(), and is_critical() methods - composite_health_check: Aggregates multiple health checks with configurable all-required or any-required semantics - health_dependency_graph: DAG structure for health check dependencies with cycle detection, topological sort, failure impact analysis - health_check_builder: Builder pattern for creating functional health checks with fluent API - health_monitor: Extended with register_check(), unregister_check(), check(), add_dependency(), start()/stop(), get_stats(), get_health_report() - health_monitor_stats: Statistics tracking for health monitoring - global_health_monitor(): Singleton accessor for global health monitor All 22 tests in test_health_monitoring.cpp pass successfully. Closes #330
- Add health monitoring API entry to CHANGELOG.md and CHANGELOG_KO.md - Update KNOWN_ISSUES.md: - Remove test_health_monitoring.cpp from disabled tests - Add test_health_monitoring.cpp to recently enabled tests - Add Health Monitor to API stability table as Stable
- Change shared_lock to lock_guard in check(), check_all(), and refresh() methods since they modify cached_results_ and stats_ - Add missing <condition_variable> header required for cv_ member - Add thread-safe status handling in test_health_check with atomic status and mutex protection for message member - Add <atomic> and <mutex> headers to test file Fixes thread sanitizer and undefined behavior sanitizer failures: - HealthMonitoringTest.HealthMonitorOverallStatus - HealthMonitoringTest.HealthMonitorStats - HealthMonitoringTest.HealthMonitorReport - HealthMonitoringTest.ConcurrentHealthChecks
Document the health_monitor thread safety fixes in both English and Korean CHANGELOG files for PR #356.
kcenon
added a commit
that referenced
this pull request
Apr 13, 2026
…ing.cpp (#356) * feat(health): implement health monitoring API for test_health_monitoring.cpp Implement comprehensive health monitoring API as defined in Issue #330: - health_check: Abstract base class for health checks with get_name(), get_type(), check(), get_timeout(), and is_critical() methods - composite_health_check: Aggregates multiple health checks with configurable all-required or any-required semantics - health_dependency_graph: DAG structure for health check dependencies with cycle detection, topological sort, failure impact analysis - health_check_builder: Builder pattern for creating functional health checks with fluent API - health_monitor: Extended with register_check(), unregister_check(), check(), add_dependency(), start()/stop(), get_stats(), get_health_report() - health_monitor_stats: Statistics tracking for health monitoring - global_health_monitor(): Singleton accessor for global health monitor All 22 tests in test_health_monitoring.cpp pass successfully. Closes #330 * docs: update documentation for health monitoring API - Add health monitoring API entry to CHANGELOG.md and CHANGELOG_KO.md - Update KNOWN_ISSUES.md: - Remove test_health_monitoring.cpp from disabled tests - Add test_health_monitoring.cpp to recently enabled tests - Add Health Monitor to API stability table as Stable * fix(health): resolve thread safety issues in health_monitor - Change shared_lock to lock_guard in check(), check_all(), and refresh() methods since they modify cached_results_ and stats_ - Add missing <condition_variable> header required for cv_ member - Add thread-safe status handling in test_health_check with atomic status and mutex protection for message member - Add <atomic> and <mutex> headers to test file Fixes thread sanitizer and undefined behavior sanitizer failures: - HealthMonitoringTest.HealthMonitorOverallStatus - HealthMonitoringTest.HealthMonitorStats - HealthMonitoringTest.HealthMonitorReport - HealthMonitoringTest.ConcurrentHealthChecks * docs: add thread safety fix to changelog Document the health_monitor thread safety fixes in both English and Korean CHANGELOG files for PR #356.
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.
Summary
test_health_monitoring.cpppass successfullyNew Classes and Components
health_checkget_name(),get_type(),check(),get_timeout(),is_critical()functional_health_checkcomposite_health_checkhealth_dependency_graphhealth_check_builderhealth_monitor_statsExtended
health_monitorMethodsregister_check(name, check) -> result<bool>unregister_check(name) -> result<bool>check(name) -> result<health_check_result>add_dependency(dependent, dependency) -> result<bool>start() -> result_voidstop() -> result_voidis_running() -> boolrefresh()register_recovery_handler(name, handler)get_stats() -> health_monitor_statsget_health_report() -> stringNew Functions
global_health_monitor()- Singleton accessor for global health monitorTest Plan
cmake --build . --parallel 8./tests/monitoring_system_tests --gtest_filter="HealthMonitoringTest.*"Changes
include/kcenon/monitoring/health/health_monitor.h- Implemented full health monitoring APItests/test_health_monitoring.cpp- Enabled include and teststests/CMakeLists.txt- Enabled test_health_monitoring.cppdocs/CHANGELOG.md- Added health monitoring API entrydocs/CHANGELOG_KO.md- Added Korean translationdocs/KNOWN_ISSUES.md- Updated test status and API stabilityCloses #330