Skip to content

fix: return overall health status in health endpoint#671

Merged
param20h merged 1 commit into
param20h:devfrom
sujitha-kotyada:fix/health-overall-status-630
Jun 23, 2026
Merged

fix: return overall health status in health endpoint#671
param20h merged 1 commit into
param20h:devfrom
sujitha-kotyada:fix/health-overall-status-630

Conversation

@sujitha-kotyada

Copy link
Copy Markdown
Contributor

📋 PR Checklist

🔗 Related Issue

Closes #630


📝 What does this PR do?

Fixes an issue where the /health endpoint exposed the database health status as the top-level status field instead of the computed overall system health status.

Previously, when ChromaDB became unavailable while the database remained healthy, the endpoint incorrectly reported the application as healthy, causing monitoring systems to misinterpret the application's actual state.

This PR:

  • Updates the health endpoint to return the computed overall system status.
  • Ensures degraded states are correctly reported when either dependency is unavailable.
  • Adds regression tests covering all database and ChromaDB health-state combinations.
  • Prevents future regressions in health monitoring behavior.

🗂️ Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 🔧 Refactor / code cleanup
  • 📝 Documentation update
  • 🎨 UI / styling change
  • ⚙️ CI / tooling / config change
  • 🧪 Tests

🧪 How was this tested?

  • Ran the backend locally (uvicorn app.main:app --reload)
  • Ran the frontend locally (npm run dev inside frontend/)
  • Tested the affected API endpoints manually
  • Added / updated tests

Additional verification:

  • Added regression tests for:

    • DB healthy + ChromaDB healthy
    • DB healthy + ChromaDB unhealthy
    • DB unhealthy + ChromaDB healthy
    • DB unhealthy + ChromaDB unhealthy
  • Verified tests fail on the previous implementation and pass with the fix.

  • Ran targeted API tests.

  • Ran the full backend test suite.

Test Results:

pytest tests/test_api.py

Passed: 5 tests

pytest

Passed: 236 tests


📸 Screenshots (if UI change)

N/A (Backend-only bug fix)


⚠️ Anything to flag for reviewers?

This is a focused fix for Issue #630.

The change is limited to health status reporting and regression tests. No unrelated functionality, API endpoints, database schema, or application behavior was modified.


✅ Self-Review Checklist

  • My branch is based on dev, not main
  • I have not added any secrets / API keys
  • I have not modified main branch or any HuggingFace deployment config
  • My code follows the existing style (no unnecessary formatting changes)
  • I have updated relevant docs / comments if needed

@param20h param20h merged commit 2f74085 into param20h:dev Jun 23, 2026
8 checks passed
@github-actions github-actions Bot added bug Something isn't working gssoc GirlScript Summer of Code 2026 issue/PR gssoc:approved Approved for GSSoC base points (+50 pts) mentor:param20h Mentor for this PR labels Jun 23, 2026
@param20h param20h added level:intermediate +35 pts type:bug +10 pts and removed bug Something isn't working labels Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved Approved for GSSoC base points (+50 pts) gssoc GirlScript Summer of Code 2026 issue/PR level:intermediate +35 pts mentor:param20h Mentor for this PR type:bug +10 pts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Health Check endpoint exposes incorrect overall system status when ChromaDB is unavailable

2 participants