[kimi-task] [enhancement] Add /api/matrix/health endpoint #685

Closed
opened 2026-03-21 03:12:16 +00:00 by kimi · 1 comment
Collaborator

Epic: Matrix Unification

Task

Add a dedicated health endpoint for the Matrix frontend to check if the backend is alive
and what capabilities are available.

Files

  • src/dashboard/routes/world.py — add /api/matrix/health route
  • tests/timmy/test_world_api.py — add test

Acceptance Criteria

  • GET /api/matrix/health returns JSON with: status (ok/degraded), version, capabilities
  • capabilities is a dict of feature:bool (thinking, memory, bark, familiar, lightning)
  • Each capability checks if the relevant module is actually available
  • Response time must be <100ms (no heavy checks)
  • Returns 200 even if some capabilities are degraded
  • tox -e unit passes
  • tox -e lint passes

Context

The Matrix frontend needs to know what the backend supports so it can show/hide UI elements.
If thinking is disabled, don't show thought bubbles. If memory is empty, skip the crystal ball.

## Epic: Matrix Unification ## Task Add a dedicated health endpoint for the Matrix frontend to check if the backend is alive and what capabilities are available. ## Files - src/dashboard/routes/world.py — add /api/matrix/health route - tests/timmy/test_world_api.py — add test ## Acceptance Criteria - [ ] GET /api/matrix/health returns JSON with: status (ok/degraded), version, capabilities - [ ] capabilities is a dict of feature:bool (thinking, memory, bark, familiar, lightning) - [ ] Each capability checks if the relevant module is actually available - [ ] Response time must be <100ms (no heavy checks) - [ ] Returns 200 even if some capabilities are degraded - [ ] tox -e unit passes - [ ] tox -e lint passes ## Context The Matrix frontend needs to know what the backend supports so it can show/hide UI elements. If thinking is disabled, don't show thought bubbles. If memory is empty, skip the crystal ball.
kimi self-assigned this 2026-03-21 03:12:16 +00:00
Author
Collaborator

PR created: http://143.198.27.163:3000/rockachopa/Timmy-time-dashboard/pulls/745

Summary of Changes

src/dashboard/routes/world.py

Added GET /api/matrix/health endpoint that returns:

  • status: "ok" or "degraded" (based on core capabilities: thinking, memory, bark)
  • version: API version string
  • capabilities: dict with feature availability
    • thinking: true if thinking engine is available
    • memory: true if memory system is available
    • bark: true if bark production is available
    • familiar: true if Pip familiar is available
    • lightning: true if Lightning payments are enabled (currently false)

tests/dashboard/test_world_api.py

Added comprehensive tests for:

  • Endpoint response structure
  • Status field values
  • Version field
  • Capabilities dict structure
  • Individual capability check functions
  • Response time (<100ms)
  • 200 status even when degraded

Testing Results

  • tox -e unit: 2589 passed, 1 skipped ✓
  • tox -e lint: All checks passed ✓
  • tox -e format: Applied ✓
PR created: http://143.198.27.163:3000/rockachopa/Timmy-time-dashboard/pulls/745 ## Summary of Changes ### src/dashboard/routes/world.py Added `GET /api/matrix/health` endpoint that returns: - `status`: "ok" or "degraded" (based on core capabilities: thinking, memory, bark) - `version`: API version string - `capabilities`: dict with feature availability - `thinking`: true if thinking engine is available - `memory`: true if memory system is available - `bark`: true if bark production is available - `familiar`: true if Pip familiar is available - `lightning`: true if Lightning payments are enabled (currently false) ### tests/dashboard/test_world_api.py Added comprehensive tests for: - Endpoint response structure - Status field values - Version field - Capabilities dict structure - Individual capability check functions - Response time (<100ms) - 200 status even when degraded ### Testing Results - `tox -e unit`: 2589 passed, 1 skipped ✓ - `tox -e lint`: All checks passed ✓ - `tox -e format`: Applied ✓
kimi closed this issue 2026-03-21 15:51:30 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Rockachopa/Timmy-time-dashboard#685