feat: add MCP runtime health dashboard to web UI (Closes #430) #448

Merged
sysadmin merged 2 commits from feat/issue-430-runtime-health into master 2026-07-09 07:25:46 -05:00
Owner

Summary

Closes #430. Child of tracker #425. Retargeted onto current master (ee8e9a) with only #430 runtime-health work — #426–#429 stack already merged.

Adds a read-only runtime health page at /runtime and /api/runtime so operators can see active MCP profile, identity, config model, git sync state, shell health, and workflow/schema hashes without opening MCP tools.

Base / head

  • Base: master
  • Head: 4429113 (rebased --onto master, dropping already-merged #427–#429 stack commits)
  • Commits: exactly one — 4429113 (feat #430)

Changes (only #430 runtime-health)

  • webui/runtime_health.py — profile/identity/config/git sync/shell health snapshot
  • webui/runtime_views.py — HTML tables and stale-runtime warnings
  • webui/app.py/runtime, /api/runtime routes (replaces stub)
  • docs/webui-local-dev.md — runtime health section
  • tests/test_webui_runtime_health.py — 5 tests; skeleton tests updated

No #427/#428/#429 diff — that content is already in master.

Features

  • Active profile, role kind, config model/mode, authenticated identity (when creds available)
  • Local HEAD vs remote master SHA with commits-behind count
  • Stale-runtime warning when checkout is behind merged safety-gate changes (#420 guidance)
  • Workflow and schema SHA-256 hashes from registry paths
  • Shell health circuit-breaker status
  • No tokens exposed; no MCP restart from UI

Validation

pytest tests/test_webui_skeleton.py tests/test_webui_project_registry.py tests/test_webui_prompt_library.py tests/test_webui_queue_dashboard.py tests/test_webui_runtime_health.py -q

40 passed (9 subtests).

Worktree

branches/issue-430-runtime-health @ 4429113

## Summary Closes #430. Child of tracker #425. **Retargeted onto current `master`** (`ee8e9a`) with only #430 runtime-health work — #426–#429 stack already merged. Adds a read-only runtime health page at `/runtime` and `/api/runtime` so operators can see active MCP profile, identity, config model, git sync state, shell health, and workflow/schema hashes without opening MCP tools. ## Base / head - Base: `master` - Head: `4429113` (rebased `--onto master`, dropping already-merged #427–#429 stack commits) - Commits: exactly one — `4429113` (feat #430) ## Changes (only #430 runtime-health) - `webui/runtime_health.py` — profile/identity/config/git sync/shell health snapshot - `webui/runtime_views.py` — HTML tables and stale-runtime warnings - `webui/app.py` — `/runtime`, `/api/runtime` routes (replaces stub) - `docs/webui-local-dev.md` — runtime health section - `tests/test_webui_runtime_health.py` — 5 tests; skeleton tests updated No #427/#428/#429 diff — that content is already in `master`. ## Features - Active profile, role kind, config model/mode, authenticated identity (when creds available) - Local HEAD vs remote master SHA with commits-behind count - Stale-runtime warning when checkout is behind merged safety-gate changes (#420 guidance) - Workflow and schema SHA-256 hashes from registry paths - Shell health circuit-breaker status - No tokens exposed; no MCP restart from UI ## Validation ``` pytest tests/test_webui_skeleton.py tests/test_webui_project_registry.py tests/test_webui_prompt_library.py tests/test_webui_queue_dashboard.py tests/test_webui_runtime_health.py -q ``` **40 passed** (9 subtests). ## Worktree `branches/issue-430-runtime-health` @ `4429113`
jcwalker3 changed target branch from feat/issue-429-queue-dashboard to master 2026-07-07 14:19:11 -05:00
Owner

Review findings at head 6e0f73c — formal REQUEST_CHANGES blocked by author conflict-fix lease

Blocker: active conflict_fix lease (phase: claimed, expires 2026-07-09T04:41:15Z, session_id=unknown). Reviewer mark_ready is fail-closed while that lease is live. Please release the conflict-fix lease (work is already pushed; live head advanced past head_before 4429113).

Defect (conflict-resolution regression)

webui/lease_loader.py on this head re-imports a removed symbol:

from merged_cleanup_reconcile import ISSUE_LOCK_FILE, read_issue_lock  # PR head — broken

Current prgs/master correctly uses:

from merged_cleanup_reconcile import read_issue_lock
from issue_lock_provenance import ISSUE_LOCK_FILE

Proof: from webui.app import create_app fails collection on this head:
ImportError: cannot import name 'ISSUE_LOCK_FILE' from 'merged_cleanup_reconcile'.
Same import succeeds on clean prgs/master (066eec8).

Scope note

Intended #430 work (runtime_health, routes, tests) looks fine in isolation, but the conflict-fix commit 6e0f73c left lease_loader behind master and breaks the whole web UI test import path.

Required fix

  1. Align webui/lease_loader.py with master (ISSUE_LOCK_FILE from issue_lock_provenance).
  2. Release the orphan conflict-fix lease.
  3. Re-run webui tests; re-request review.

Eligibility: NEEDS_AUTHOR_FIX + ACTIVE_CONFLICT_FIX_LEASE
Next actor: author

## Review findings at head `6e0f73c` — formal REQUEST_CHANGES blocked by author conflict-fix lease **Blocker:** active `conflict_fix` lease (`phase: claimed`, expires `2026-07-09T04:41:15Z`, session_id=unknown). Reviewer `mark_ready` is fail-closed while that lease is live. Please release the conflict-fix lease (work is already pushed; live head advanced past `head_before` 4429113). ### Defect (conflict-resolution regression) `webui/lease_loader.py` on this head re-imports a removed symbol: ```python from merged_cleanup_reconcile import ISSUE_LOCK_FILE, read_issue_lock # PR head — broken ``` Current `prgs/master` correctly uses: ```python from merged_cleanup_reconcile import read_issue_lock from issue_lock_provenance import ISSUE_LOCK_FILE ``` Proof: `from webui.app import create_app` fails collection on this head: `ImportError: cannot import name 'ISSUE_LOCK_FILE' from 'merged_cleanup_reconcile'`. Same import succeeds on clean `prgs/master` (`066eec8`). ### Scope note Intended #430 work (runtime_health, routes, tests) looks fine in isolation, but the conflict-fix commit `6e0f73c` left `lease_loader` behind master and breaks the whole web UI test import path. ### Required fix 1. Align `webui/lease_loader.py` with master (`ISSUE_LOCK_FILE` from `issue_lock_provenance`). 2. Release the orphan conflict-fix lease. 3. Re-run webui tests; re-request review. **Eligibility:** `NEEDS_AUTHOR_FIX` + `ACTIVE_CONFLICT_FIX_LEASE` **Next actor:** author
Author
Owner

pr: #448
branch: feat/issue-430-runtime-health
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-430-runtime-health
profile: prgs-author
session_id: conflict-fix-release-batch
phase: released
head_before: 4429113dae
head_after: ebb1512ec9
expires_at: 2026-07-09T04:41:15Z
reviewer_active: no
blocker: post-push-release

<!-- mcp-conflict-fix-lease:v1 --> pr: #448 branch: feat/issue-430-runtime-health worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-430-runtime-health profile: prgs-author session_id: conflict-fix-release-batch phase: released head_before: 4429113dae041aae2a622b994794cba2a257fb79 head_after: ebb1512ec9cdaf959b83ef587c536b5848a59fbd expires_at: 2026-07-09T04:41:15Z reviewer_active: no blocker: post-push-release
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #448
issue: #430
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 15088-e09b18df79dd
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-feat-issue-430-runtime-health
phase: claimed
candidate_head: ebb1512ec9
target_branch: master
target_branch_sha: none
last_activity: 2026-07-09T03:57:52Z
expires_at: 2026-07-09T05:57:52Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #448 issue: #430 reviewer_identity: sysadmin profile: prgs-reviewer session_id: 15088-e09b18df79dd worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-feat-issue-430-runtime-health phase: claimed candidate_head: ebb1512ec9cdaf959b83ef587c536b5848a59fbd target_branch: master target_branch_sha: none last_activity: 2026-07-09T03:57:52Z expires_at: 2026-07-09T05:57:52Z blocker: none
sysadmin approved these changes 2026-07-08 22:58:22 -05:00
Dismissed
sysadmin left a comment
Owner

Approved. Import regression fixed: ISSUE_LOCK_FILE now correctly imported from issue_lock_provenance. webui.app imports cleanly, all 44 webui tests pass at head ebb1512.

Approved. Import regression fixed: ISSUE_LOCK_FILE now correctly imported from issue_lock_provenance. webui.app imports cleanly, all 44 webui tests pass at head ebb1512.
jcwalker3 added 2 commits 2026-07-08 23:04:49 -05:00
Adds read-only /runtime and /api/runtime routes showing active profile,
identity, config model, git sync vs remote master, shell health,
workflow/schema hashes, and stale-runtime warnings with #420 guidance.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The conflict-resolution rebase incorrectly kept ISSUE_LOCK_FILE in the
merged_cleanup_reconcile import, but that symbol was moved to
issue_lock_provenance on master. This broke webui import collection.

Fixes the reviewer-reported regression on PR #448.
jcwalker3 force-pushed feat/issue-430-runtime-health from ebb1512ec9 to ffa1ff95cc 2026-07-08 23:04:49 -05:00 Compare
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #448
issue: #430
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 37476-c12f0bbf07a9
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-430-runtime-health
phase: claimed
candidate_head: ffa1ff95cc
target_branch: master
target_branch_sha: none
last_activity: 2026-07-09T12:21:19Z
expires_at: 2026-07-09T14:21:19Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #448 issue: #430 reviewer_identity: sysadmin profile: prgs-reviewer session_id: 37476-c12f0bbf07a9 worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-430-runtime-health phase: claimed candidate_head: ffa1ff95cc2cf8d77ca2e6c90d903b2407fa7dc4 target_branch: master target_branch_sha: none last_activity: 2026-07-09T12:21:19Z expires_at: 2026-07-09T14:21:19Z blocker: none
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #448
issue: none
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 37476-c12f0bbf07a9
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-430-runtime-health
phase: claimed
candidate_head: ffa1ff95cc
target_branch: master
target_branch_sha: none
last_activity: 2026-07-09T12:22:49Z
expires_at: 2026-07-09T14:22:49Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #448 issue: none reviewer_identity: sysadmin profile: prgs-reviewer session_id: 37476-c12f0bbf07a9 worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-430-runtime-health phase: claimed candidate_head: ffa1ff95cc2cf8d77ca2e6c90d903b2407fa7dc4 target_branch: master target_branch_sha: none last_activity: 2026-07-09T12:22:49Z expires_at: 2026-07-09T14:22:49Z blocker: none
sysadmin approved these changes 2026-07-09 07:23:08 -05:00
sysadmin left a comment
Owner

Review: APPROVED

Pinned head SHA: ffa1ff95cc2cf8d77ca2e6c90d903b2407fa7dc4

Review summary

Clean, well-scoped implementation of the MCP runtime health dashboard (Closes #430). All changes are read-only and confined to the web UI layer.

Files reviewed

File Verdict
webui/runtime_health.py Well-structured dataclass model, dependency injection via Callable params for testability, proper error handling with early-return on missing project/config errors, no token exposure
webui/runtime_views.py Proper HTML escaping throughout via html.escape(), clean table rendering, stale-warning block
webui/app.py Routes correctly wired (/runtime, /api/runtime), follows existing patterns, GET-only
tests/test_webui_runtime_health.py 5 tests with mocked identity/git-sync, covers loader, dict export, HTML route, and JSON API
docs/webui-local-dev.md Route table and runtime section documented

Verdict

Approved for merge. No issues found.

## Review: APPROVED **Pinned head SHA:** `ffa1ff95cc2cf8d77ca2e6c90d903b2407fa7dc4` ### Review summary Clean, well-scoped implementation of the MCP runtime health dashboard (Closes #430). All changes are read-only and confined to the web UI layer. ### Files reviewed | File | Verdict | |------|---------| | `webui/runtime_health.py` | ✅ Well-structured dataclass model, dependency injection via Callable params for testability, proper error handling with early-return on missing project/config errors, no token exposure | | `webui/runtime_views.py` | ✅ Proper HTML escaping throughout via `html.escape()`, clean table rendering, stale-warning block | | `webui/app.py` | ✅ Routes correctly wired (`/runtime`, `/api/runtime`), follows existing patterns, GET-only | | `tests/test_webui_runtime_health.py` | ✅ 5 tests with mocked identity/git-sync, covers loader, dict export, HTML route, and JSON API | | `docs/webui-local-dev.md` | ✅ Route table and runtime section documented | ### Verdict Approved for merge. No issues found.
Owner

adopted_at: 2026-07-09T12:23:53Z
adopted_by_identity: sysadmin
adopted_by_profile: prgs-merger
adopted_from_session_id: 37476-c12f0bbf07a9
adopted_from_profile: prgs-reviewer
adopted_from_reviewer_identity: sysadmin
adopted_from_comment_id: 7840
adoption_reason: merger-handoff-approved-head

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #448
issue: #430
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 37476-0d4ad7a9d29a
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-430-runtime-health
phase: adopted
candidate_head: ffa1ff95cc
target_branch: master
target_branch_sha: none
last_activity: 2026-07-09T12:23:53Z
expires_at: 2026-07-09T14:23:53Z
blocker: none

<!-- mcp-review-lease-adoption:v1 --> adopted_at: 2026-07-09T12:23:53Z adopted_by_identity: sysadmin adopted_by_profile: prgs-merger adopted_from_session_id: 37476-c12f0bbf07a9 adopted_from_profile: prgs-reviewer adopted_from_reviewer_identity: sysadmin adopted_from_comment_id: 7840 adoption_reason: merger-handoff-approved-head <!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #448 issue: #430 reviewer_identity: sysadmin profile: prgs-merger session_id: 37476-0d4ad7a9d29a worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-430-runtime-health phase: adopted candidate_head: ffa1ff95cc2cf8d77ca2e6c90d903b2407fa7dc4 target_branch: master target_branch_sha: none last_activity: 2026-07-09T12:23:53Z expires_at: 2026-07-09T14:23:53Z blocker: none
sysadmin merged commit e2e51290c4 into master 2026-07-09 07:25:46 -05:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

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