feat(api): QuickSearchStatus API + spec'd status endpoint (#50) #51

Merged
KofTwentyTwo merged 2 commits from feature/arch-status-api into develop 2026-10-14 12:22:24 +00:00
KofTwentyTwo commented 2026-10-14 00:55:34 +00:00 (Migrated from github.com)

Summary

Closes #50 (architecture review QRun-IO/qqq#1150, finding F10). kof22 reaches into this qbit's internals (QuickSearchOpenSearchClient) and rebuilds its diagnostics view. This PR gives hosts a supported status API instead.

  • Java API in com.kingsrook.qbits.quicksearch.api:
    • QuickSearchStatus, an immutable snapshot: state OK/DEGRADED/DOWN/DISABLED, cluster reachability, per-table index rows with timestamped counts, backlog, last sync, last error and checkedAt.
    • QuickSearchStatusService.get(): bounded cost, respects the diagnostics rate limiter, 5-second cache, reuses DiagnosticsSupport/IndexValidator.
    • QuickSearchApi: the app name and homeHref, so hosts link to the Quick Search home instead of copying it ("one landing, no duplicate dashboards").
  • UI API: GET /qqq/v1/qbit/quick-search/status (getQuickSearchStatus) in a quick-search extension, gated by the qbit's admin/diagnostics permission.
    • It uses the default /qbit/{name} namespace; core rejects a custom /quick-search prefix for new extensions.
    • Fragment openapi/qqq-v1/quick-search.yaml, checked by QuickSearchApiContractTest.
  • Host migration map: docs/STATUS-API-HOST-MIGRATION.md. kof22#164 replaces LiveAdminHomeProbes and QuickSearchHomeWidgets/AdminOperationsWidgets with QuickSearchStatusService.get() plus homeHref links.

Draft until QQQ 4.1.0-RC.6 is released

The pom targets RC.6, which has the extension point (#1128). It was verified locally against core develop as 4.1.0-ARCHRC6-SNAPSHOT:

  • mvn verify: 468 unit tests and 41 Docker/OpenSearch integration tests, 0 failures;
  • JaCoCo passes, and the new files add no checkstyle violations.

🤖 Generated with Claude Code

## Summary Closes #50 (architecture review QRun-IO/qqq#1150, finding F10). kof22 reaches into this qbit's internals (`QuickSearchOpenSearchClient`) and rebuilds its diagnostics view. This PR gives hosts a supported status API instead. - **Java API** in `com.kingsrook.qbits.quicksearch.api`: - `QuickSearchStatus`, an immutable snapshot: state OK/DEGRADED/DOWN/DISABLED, cluster reachability, per-table index rows with timestamped counts, backlog, last sync, last error and `checkedAt`. - `QuickSearchStatusService.get()`: bounded cost, respects the diagnostics rate limiter, 5-second cache, reuses `DiagnosticsSupport`/`IndexValidator`. - `QuickSearchApi`: the app name and `homeHref`, so hosts link to the Quick Search home instead of copying it ("one landing, no duplicate dashboards"). - **UI API**: `GET /qqq/v1/qbit/quick-search/status` (`getQuickSearchStatus`) in a `quick-search` extension, gated by the qbit's admin/diagnostics permission. - It uses the default `/qbit/{name}` namespace; core rejects a custom `/quick-search` prefix for new extensions. - Fragment `openapi/qqq-v1/quick-search.yaml`, checked by `QuickSearchApiContractTest`. - Host migration map: `docs/STATUS-API-HOST-MIGRATION.md`. kof22#164 replaces `LiveAdminHomeProbes` and `QuickSearchHomeWidgets`/`AdminOperationsWidgets` with `QuickSearchStatusService.get()` plus `homeHref` links. ## Draft until QQQ 4.1.0-RC.6 is released The pom targets RC.6, which has the extension point (#1128). It was verified locally against core develop as `4.1.0-ARCHRC6-SNAPSHOT`: - `mvn verify`: 468 unit tests and 41 Docker/OpenSearch integration tests, 0 failures; - JaCoCo passes, and the new files add no checkstyle violations. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
KofTwentyTwo commented 2026-10-14 12:15:26 +00:00 (Migrated from github.com)

QQQ 4.1.0-RC.6 is released. Verified locally against it with ./mvnw -B verify. This PR also adopts qbit-build-parent 2.1.0 with guardrails enforced (qbit.guardrails.enforce=true) and strict raw-route mode; every guardrail passes. Marked ready for review.

QQQ 4.1.0-RC.6 is released. Verified locally against it with `./mvnw -B verify`. This PR also adopts `qbit-build-parent` 2.1.0 with guardrails enforced (`qbit.guardrails.enforce=true`) and strict raw-route mode; every guardrail passes. Marked ready for review.
Sign in to join this conversation.