feat(health): implement Health Checker module (F03)#26
Merged
leocamello merged 1 commit intomainfrom Feb 1, 2026
Merged
Conversation
Implements periodic health checking for backend monitoring with: - Health check configuration with defaults (30s interval, 5s timeout) - Error classification (timeout, connection, DNS, TLS, HTTP, parse errors) - Backend health state tracking with transition thresholds - Response parsing for Ollama, OpenAI/vLLM, and LlamaCpp endpoints - Status transitions: Unknown→Healthy/Unhealthy, threshold-based recovery - Registry integration for status, models, and latency updates - Background task with graceful shutdown via CancellationToken - Comprehensive test coverage (40 unit + 6 integration tests) Technical details: - Uses reqwest with connection pooling - DashMap for lock-free per-backend state - Tokio async runtime for non-blocking checks - Automatic model discovery from backend responses Quality gates: - Zero clippy warnings - Code formatted with rustfmt - All 104 tests passing (94 unit + 6 integration + 4 doc) Closes #13, #14, #15, #16, #17, #18, #19, #20, #21, #22, #23, #24, #25
leocamello
added a commit
that referenced
this pull request
Feb 17, 2026
Implements periodic health checking for backend monitoring with: - Health check configuration with defaults (30s interval, 5s timeout) - Error classification (timeout, connection, DNS, TLS, HTTP, parse errors) - Backend health state tracking with transition thresholds - Response parsing for Ollama, OpenAI/vLLM, and LlamaCpp endpoints - Status transitions: Unknown→Healthy/Unhealthy, threshold-based recovery - Registry integration for status, models, and latency updates - Background task with graceful shutdown via CancellationToken - Comprehensive test coverage (40 unit + 6 integration tests) Technical details: - Uses reqwest with connection pooling - DashMap for lock-free per-backend state - Tokio async runtime for non-blocking checks - Automatic model discovery from backend responses Quality gates: - Zero clippy warnings - Code formatted with rustfmt - All 104 tests passing (94 unit + 6 integration + 4 doc) Closes #13, #14, #15, #16, #17, #18, #19, #20, #21, #22, #23, #24, #25
leocamello
added a commit
that referenced
this pull request
Feb 17, 2026
Implements periodic health checking for backend monitoring with: - Health check configuration with defaults (30s interval, 5s timeout) - Error classification (timeout, connection, DNS, TLS, HTTP, parse errors) - Backend health state tracking with transition thresholds - Response parsing for Ollama, OpenAI/vLLM, and LlamaCpp endpoints - Status transitions: Unknown→Healthy/Unhealthy, threshold-based recovery - Registry integration for status, models, and latency updates - Background task with graceful shutdown via CancellationToken - Comprehensive test coverage (40 unit + 6 integration tests) Technical details: - Uses reqwest with connection pooling - DashMap for lock-free per-backend state - Tokio async runtime for non-blocking checks - Automatic model discovery from backend responses Quality gates: - Zero clippy warnings - Code formatted with rustfmt - All 104 tests passing (94 unit + 6 integration + 4 doc) Closes #13, #14, #15, #16, #17, #18, #19, #20, #21, #22, #23, #24, #25
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
Implements the Health Checker feature (F03 - 002-health-checker) for the Nexus project.
Changes
New Files
src/health/mod.rs- Main HealthChecker struct and background loopsrc/health/config.rs- HealthCheckConfig with TOML/JSON serializationsrc/health/error.rs- HealthCheckError enum with 6 variantssrc/health/state.rs- BackendHealthState for per-backend trackingsrc/health/parser.rs- Response parsing for Ollama/OpenAI/LlamaCppsrc/health/tests.rs- 40 unit teststests/health_integration.rs- 6 integration tests with mock serversModified Files
src/lib.rs- Added health module exportCargo.toml- Added tokio-util and wiremock dependenciesFeatures
/api/tags), LlamaCpp (/health), vLLM/OpenAI (/v1/models)Configuration
Test Results
Closes
Closes #13, #14, #15, #16, #17, #18, #19, #20, #21, #22, #23, #24, #25
Spec References
specs/002-health-checker/spec.mdspecs/002-health-checker/plan.mdspecs/002-health-checker/tasks.md