Skip to content

feat:HealthDashboard service checks timeout silently#730

Merged
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
favour-GL:feat/HealthDashboard-service-checks-timeout-silently
Jun 28, 2026
Merged

feat:HealthDashboard service checks timeout silently#730
RUKAYAT-CODER merged 1 commit into
rinafcode:mainfrom
favour-GL:feat/HealthDashboard-service-checks-timeout-silently

Conversation

@favour-GL

Copy link
Copy Markdown
Contributor

Health observability, circuit protection, coverage gates, and dependency scanning
timeout distinction
circuit breaker
coverage gates
dependabot
4 issues
Summary
Four infrastructure issues bundled together — all touch the reliability and observability layer without affecting product features. The health dashboard now distinguishes timeouts from errors, a circuit breaker prevents load amplification during outages, CI enforces a 50% coverage floor, and Dependabot keeps dependencies patched automatically.
Changes by issue
#1
Timeout status distinction in health dashboard
Health checks that exceed their timeout budget now report timeout (orange) instead of unknown. Three consecutive timeouts escalate to degraded (red). unknown is reserved for services whose check has never run.
NEW
src/types/serviceHealth.ts
MOD
src/store/slices/healthDashboardStore.ts
NEW
src/components/mobile/ServiceStatusBadge.tsx
NEW
src/components/mobile/ServiceHealthPanel.tsx
#2
Circuit breaker per API endpoint group
Implements CircuitBreaker and a singleton registry. Five failures within 60 s opens the circuit; subsequent calls fast-fail with CircuitOpenError without a network round-trip. A 30 s recovery window triggers a single probe; success closes the circuit. State is exposed in the dashboard.
NEW
src/services/api/circuitBreaker.ts
NEW
src/services/api/axiosCircuitBreakerInterceptor.ts
MOD
src/store/slices/healthDashboardStore.ts
#3
CI coverage thresholds (50% floor)
Adds coverageThreshold to jest.config.ts at 50% for branches, functions, lines, and statements. CI runs jest --coverage, uploads the report as an artifact, and fails the build if any threshold is missed. Removes --passWithNoTests.
MOD
jest.config.ts
MOD
.github/workflows/test.yml
MOD
.gitignore
#4
Dependabot — automated dependency scanning
Adds .github/dependabot.yml with weekly npm scans, grouped minor/patch updates to reduce PR noise, a limit of 10 open PRs, and auto-labeling with dependencies / security. Security PRs fire within 24 h of CVE disclosure.
NEW
.github/dependabot.yml
MOD
.github/CODEOWNERS
Acceptance criteria
Timed-out health check shows "Timeout" in orange; never shown as "Unknown"
3 consecutive timeouts escalate the service row to "Degraded" in red
"Unknown" only appears for services whose check has not run yet
5 failures in 60 s opens the circuit for that endpoint group — no further network calls during OPEN state
Recovery probe fires after 30 s; success closes the circuit, failure re-opens it
Circuit state is visible per-service in the health dashboard
PR with new code and 0% coverage fails CI
Coverage report uploaded as CI artifact on every PR
Dependabot PRs created weekly; security PRs within 24 h of CVE disclosure
Minor/patch updates batched into a single weekly PR per ecosystem
Test coverage added
src/tests/healthDashboard.test.ts
Status is "unknown" before any check runs
Successful check → "ok"
AbortError → "timeout"; non-abort error → "error"
consecutiveTimeouts increments; resets after success
3 consecutive timeouts → "degraded"
CLOSED → OPEN after 5 failures / 60 s
OPEN state throws CircuitOpenError immediately
OPEN → HALF_OPEN → CLOSED (probe success)
OPEN → HALF_OPEN → OPEN (probe failure)
State-change listeners fire on every transition
Registry returns the same instance per key
Migration notes
axios.config.ts — call installCircuitBreakerInterceptor(apiClient) once at the bottom of the file, after existing interceptors.

HealthDashboard — drop into the component wherever service rows should appear. The ServiceHealthStatus type import moves from healthDashboardStore to src/types/serviceHealth.

No breaking changes to existing store selectors or API surface — all additions are additive.

Closes #644
Closes #645
Closes #646
Closes #647

@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@favour-GL Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Thank you for contributing to the project.

@RUKAYAT-CODER RUKAYAT-CODER merged commit a49bc10 into rinafcode:main Jun 28, 2026
3 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment