Skip to content

Feature/monitoring health search improvements - #744

Merged
MaryammAli merged 4 commits into
BlockDash-Studios:mainfrom
bilkee:feature/monitoring-health-search-improvements
Aug 29, 2026
Merged

Feature/monitoring health search improvements#744
MaryammAli merged 4 commits into
BlockDash-Studios:mainfrom
bilkee:feature/monitoring-health-search-improvements

Conversation

@bilkee

@bilkee bilkee commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary
This PR implements four interconnected improvements to the monitoring, health, and search subsystems of BackendAcademy.
All four tasks are done and pushed to the feature/monitoring-health-search-improvements branch with 4 clean commits. Here's what was delivered:

Commit 1 — feat(monitoring): 7 Prometheus histograms (HTTP, DB, Redis, AI, grading, payment, notification latency), per-service error counters, queue depth gauges, domain outcome counters, and 18 passing tests.
Closes #681

Commit 2 — feat(health): Readiness probes now timeout independently, sanitize error reasons (no IPs/connection strings leaked), and 11 tests cover healthy, degraded, unavailable, stalled-worker, and timeout states.
Closes #682

Commit 3 — feat(search): Removed hardcoded user/post fixtures from SearchService. Introduced SearchRepository interface + InMemorySearchRepository backed by UserProfileService and SocialService, applying visibility rules (deleted users filtered, only approved posts).
Closes #683

Commit 4 — feat(search): Extracted COURSE_SEARCH_WEIGHTS, added rankCourses() with deterministic course.id tie-breaking, documented refresh behavior, and 13 tests for scoring/reordering/reindex.
Closes #684

bilkee and others added 4 commits August 28, 2026 15:26
… outcome metrics

Add Prometheus histograms for HTTP, database, Redis, AI, grading, payment,
and notification latency. Add per-service error counters, queue depth gauges,
and domain outcome counters so operators get actionable service-level metrics
beyond the existing local counters.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
…s, and degraded state tests

Readiness probes now wrap dependency checks (database, Redis) with configurable
timeouts so stuck probes cannot block the endpoint. Error reasons are sanitized
to strip connection strings, IPs, and ports. Added comprehensive tests covering
healthy, degraded, unavailable, stalled-worker, and timeout scenarios.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
…pattern

SearchService now delegates user and post queries to a SearchRepository
abstraction backed by InMemorySearchRepository. The repository reads from
UserProfileService and SocialService, applying authorization/visibility
rules (deleted users excluded, only approved posts shown) and preserving
response pagination. Fix pre-existing TS return types in course controller.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
… relevance weights

Enhance SearchIndexerService with rankCourses() that applies field-weighted
scoring (title > tags > description > categories) with lexicographic tie-
breaking by course.id for stable, reproducible result ordering. Extract
scoring constants into COURSE_SEARCH_WEIGHTS, document refresh behavior
(write-through + bulk reindex), and add comprehensive tests for scoring,
deterministic ordering, and reindex semantics.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@bilkee 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

@MaryammAli MaryammAli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@MaryammAli
MaryammAli merged commit b97a237 into BlockDash-Studios:main Aug 29, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants