Web Console: Read-only system-health API (Phase 1) #634

Open
opened 2026-07-10 14:38:38 -05:00 by jcwalker3 · 1 comment
Owner

Problem statement

/health today returns minimal liveness JSON. Operators need a read-only system-health API covering readiness, version, uptime, dependency status (Gitea, control-plane DB, MCP namespaces), and stale-runtime signals — without mutation or restart controls.

User and operational impact

Cannot automate readiness checks or accurately dashboard control-plane health; stale vs live runtime confusion continues (#610).

Scope

  • Versioned API e.g. GET /api/v1/system/health (and carefully expand /health if needed).
  • Fields: status, readiness, version/git sha, process uptime, dependency checks (fail-soft with reasons), MCP namespace summary, stale-runtime flags, timestamp.
  • No restart/reload in this issue (Phase 2).
  • Redact endpoints/secrets per auth model (#633).

Explicit non-goals

  • No process kill/restart (#630 forbids manual pkill recovery).
  • No write dependencies.
  • No Sentry event ingestion.

Required implementation investigation

webui/runtime_health.py, webui/app.py health route, mcp_namespace_health.py, master parity / stale runtime gates, #430, #610, #631, #632.

Proposed architecture or implementation direction

Compose existing runtime snapshot + dependency probes into a stable DTO; optional expensive checks via query flags; short TTL cache if needed.

Security and workflow-safety requirements

Read-only; redaction; no tokens; dependency failures are status signals, not process crashes.

Acceptance criteria

  1. API returns structured health with readiness and dependency list.
  2. Version/uptime present when knowable.
  3. Stale-runtime reflected without false mutation-safe claims.
  4. Tests cover healthy, degraded dependency, and redaction.
  5. Documented in webui docs.

Required tests

Unit/integration tests for DTO and route; mocked dependency failures.

Observability and audit requirements

Optional probe latency field; no secret logging.

Dependencies and linkage

Canonical issue state

STATE: ready-for-author
WHO_IS_NEXT: author
NEXT_ACTION: Implement read-only system-health API + tests
NEXT_PROMPT: Author implements API only; PR; stop for review

Required final evidence

PR with API, tests, docs sample response.

Required final response and handoff expectations

Brief: endpoint paths + PR; next reviewer.

## Problem statement `/health` today returns minimal liveness JSON. Operators need a **read-only system-health API** covering readiness, version, uptime, dependency status (Gitea, control-plane DB, MCP namespaces), and stale-runtime signals — without mutation or restart controls. ## User and operational impact Cannot automate readiness checks or accurately dashboard control-plane health; stale vs live runtime confusion continues (#610). ## Scope * Versioned API e.g. `GET /api/v1/system/health` (and carefully expand `/health` if needed). * Fields: status, readiness, version/git sha, process uptime, dependency checks (fail-soft with reasons), MCP namespace summary, stale-runtime flags, timestamp. * No restart/reload in this issue (Phase 2). * Redact endpoints/secrets per auth model (#633). ## Explicit non-goals * No process kill/restart (#630 forbids manual pkill recovery). * No write dependencies. * No Sentry event ingestion. ## Required implementation investigation `webui/runtime_health.py`, `webui/app.py` health route, `mcp_namespace_health.py`, master parity / stale runtime gates, #430, #610, #631, #632. ## Proposed architecture or implementation direction Compose existing runtime snapshot + dependency probes into a stable DTO; optional expensive checks via query flags; short TTL cache if needed. ## Security and workflow-safety requirements Read-only; redaction; no tokens; dependency failures are status signals, not process crashes. ## Acceptance criteria 1. API returns structured health with readiness and dependency list. 2. Version/uptime present when knowable. 3. Stale-runtime reflected without false mutation-safe claims. 4. Tests cover healthy, degraded dependency, and redaction. 5. Documented in webui docs. ## Required tests Unit/integration tests for DTO and route; mocked dependency failures. ## Observability and audit requirements Optional probe latency field; no secret logging. ## Dependencies and linkage * Parent: #631 * Extends: #430, #426 health * Related: #610, #632, #633 * Consumed by: system-health dashboard ## Canonical issue state ```text STATE: ready-for-author WHO_IS_NEXT: author NEXT_ACTION: Implement read-only system-health API + tests NEXT_PROMPT: Author implements API only; PR; stop for review ``` ## Required final evidence PR with API, tests, docs sample response. ## Required final response and handoff expectations Brief: endpoint paths + PR; next reviewer.
jcwalker3 added the type:featurestatus:readyworkflow-hardeningdashboardmcp-health labels 2026-07-10 14:38:39 -05:00
Author
Owner

Canonical Issue State

STATE:
ready-for-author

WHO_IS_NEXT:
author

NEXT_ACTION:
Implement read-only system-health API; PR links #652 #653; soft-depends #632 #633

NEXT_PROMPT:

AUTHOR prgs Gitea-Tools. Implement #634. Vision #652 · Roadmap #653 Phase 1 · Umbrella #631. Lock; branches/; PR; stop. Closing ≠ vision complete.

WHAT_HAPPENED:
Linked to #652/#653 Phase 1. Not recreated.

WHY:
Initial batch linkage.

RELATED_ISSUES:
#652 #653 #631 #430 #610 #639

RELATED_PRS:
none

BLOCKERS:
none

VALIDATION:
existing issue retained

LAST_UPDATED_BY:
jcwalker3 / prgs-author / author / 2026-07-10

## Canonical Issue State STATE: ready-for-author WHO_IS_NEXT: author NEXT_ACTION: Implement read-only system-health API; PR links #652 #653; soft-depends #632 #633 NEXT_PROMPT: ```text AUTHOR prgs Gitea-Tools. Implement #634. Vision #652 · Roadmap #653 Phase 1 · Umbrella #631. Lock; branches/; PR; stop. Closing ≠ vision complete. ``` WHAT_HAPPENED: Linked to #652/#653 Phase 1. Not recreated. WHY: Initial batch linkage. RELATED_ISSUES: #652 #653 #631 #430 #610 #639 RELATED_PRS: none BLOCKERS: none VALIDATION: existing issue retained LAST_UPDATED_BY: jcwalker3 / prgs-author / author / 2026-07-10
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Scaled-Tech-Consulting/Gitea-Tools#634