Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
181 changes: 181 additions & 0 deletions admin/system-health.html

Large diffs are not rendered by default.

524 changes: 513 additions & 11 deletions assets/theme-v2/js/admin-system-health.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# PR_26175_CHARLIE_012-017 System Health Phase 2 Closeout

## Scope

Team: Charlie

Workstream branch: `pr/26175-CHARLIE-010-system-health-history-and-closeout`

## Completed Phase 2 Slices

- PASS: PR_26175_CHARLIE_012-runtime-health
- PASS: PR_26175_CHARLIE_013-service-health-dashboard
- PASS: PR_26175_CHARLIE_014-configuration-summary
- PASS: PR_26175_CHARLIE_015-manual-health-actions
- PASS: PR_26175_CHARLIE_016-scheduled-health-monitoring
- PASS: PR_26175_CHARLIE_017-health-notifications-foundation

## Architecture Closeout

- PASS: System Health remains one page per deployed environment.
- PASS: Each deployment actively checks only itself.
- PASS: Environment Map remains reference-only.
- PASS: No cross-environment checks were added.
- PASS: Web UI calls API/service contracts.
- PASS: Browser does not own infrastructure health state.
- PASS: Not Configured placeholders do not fake success.

## Validation Closeout

- PASS: Targeted System Health API/unit tests passed for each slice.
- PASS: Targeted System Health Playwright tests passed for each slice.
- PASS: Syntax checks passed for touched JavaScript modules.
- PASS: `git diff --check` passed for each slice with CRLF warnings only.
- NOT RUN: Full samples smoke; not required for System Health Phase 2.

## ZIP Artifacts

- `tmp/PR_26175_CHARLIE_012-runtime-health_delta.zip`
- `tmp/PR_26175_CHARLIE_013-service-health-dashboard_delta.zip`
- `tmp/PR_26175_CHARLIE_014-configuration-summary_delta.zip`
- `tmp/PR_26175_CHARLIE_015-manual-health-actions_delta.zip`
- `tmp/PR_26175_CHARLIE_016-scheduled-health-monitoring_delta.zip`
- `tmp/PR_26175_CHARLIE_017-health-notifications-foundation_delta.zip`
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# PR_26175_CHARLIE_012 Branch Validation

## Start Gate

- PASS: Worktree was clean before Phase 2 implementation started.
- PASS: Current branch was `pr/26175-CHARLIE-010-system-health-history-and-closeout`.
- PASS: Branch history contained Charlie PRs 007 through 011.

## Branch Rules

- PASS: Continued on the existing Charlie workstream branch.
- PASS: No merge was performed.
- PASS: No rebase was performed.
- PASS: No new root branch was created.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# PR_26175_CHARLIE_012 Manual Validation Notes

- Verified the Runtime Health table is present on `admin/system-health.html`.
- Verified Runtime Health values are rendered from `/api/admin/system-health/status`.
- Verified the page still blocks Creator sessions before System Health API calls.
- Verified Runtime Environment remains a masked variable table and was not repurposed as Runtime Health.
- Verified no cross-environment health checks were introduced.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# PR_26175_CHARLIE_012 Requirement Checklist

- PASS: Added Runtime Health section.
- PASS: Shows current environment.
- PASS: Shows app/runtime version when available.
- PASS: Shows API version when available.
- PASS: Shows Node version from the server.
- PASS: Shows server start time from the server.
- PASS: Shows uptime from the server.
- PASS: Shows last checked from the server.
- PASS: Uses API/service contract data.
- PASS: Browser does not own runtime health state.
- PASS: Does not actively check other environments.
- PASS: Tests were updated.
- PASS: Required reports were generated.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# PR_26175_CHARLIE_012 Validation Report

## Commands

- PASS: `node --check src/dev-runtime/server/local-api-router.mjs`
- PASS: `node --check assets/theme-v2/js/admin-system-health.js`
- PASS: `git diff --check`
- Result: no whitespace errors; CRLF conversion warnings only.
- PASS: `node --test tests/dev-runtime/AdminHealthOperations.test.mjs`
- Result: 4 passed.
- PASS: `npx playwright test tests/playwright/tools/AdminHealthOperationsPage.spec.mjs --workers=1 --reporter=line`
- Result: 3 passed.

## Validation Lane

- Targeted System Health API/unit lane: PASS.
- Targeted System Health Playwright lane: PASS.
- Full samples smoke: not run; not required for this System Health-only slice.
26 changes: 26 additions & 0 deletions docs_build/dev/reports/PR_26175_CHARLIE_012-runtime-health.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# PR_26175_CHARLIE_012 Runtime Health

## Scope

Team: Charlie

Purpose: Add current-deployment Runtime Health to Admin System Health Phase 2.

## Changes

- Added server-owned `runtimeHealth` to the Admin System Health status API.
- Added Runtime Health UI table for environment, app/runtime version, API version, Node version, server start time, uptime, and last checked.
- Kept Runtime Environment masking as a separate existing section.
- Updated API and Playwright System Health tests for the Runtime Health contract.

## Architecture Notes

- PASS: Current deployment only.
- PASS: Environment Map remains reference-only.
- PASS: Browser renders API-owned runtime health state.
- PASS: No cross-environment runtime checks were added.
- PASS: No secrets are exposed.

## Artifact

- `tmp/PR_26175_CHARLIE_012-runtime-health_delta.zip`
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# PR_26175_CHARLIE_013 Branch Validation

## Branch Rules

- PASS: Continued on `pr/26175-CHARLIE-010-system-health-history-and-closeout`.
- PASS: Stacked on PR_26175_CHARLIE_012.
- PASS: No merge was performed.
- PASS: No rebase was performed.
- PASS: No new root branch was created.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# PR_26175_CHARLIE_013 Manual Validation Notes

- Verified Service Health cards render on `admin/system-health.html`.
- Verified all seven requested service labels are present.
- Verified visible card statuses are limited to Healthy, Warning, Failed, and Not Configured.
- Verified Email and Background Jobs remain Not Configured placeholders.
- Verified no peer environment health checks were introduced.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# PR_26175_CHARLIE_013 Requirement Checklist

- PASS: Added Service Health summary cards.
- PASS: Added Runtime card.
- PASS: Added API card.
- PASS: Added Database card.
- PASS: Added Storage card.
- PASS: Added Authentication placeholder/status.
- PASS: Added Email placeholder/status.
- PASS: Added Background Jobs placeholder/status.
- PASS: Used statuses Healthy, Warning, Failed, and Not Configured.
- PASS: Current environment only.
- PASS: Browser does not own service health state.
- PASS: Tests were updated.
- PASS: Required reports were generated.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# PR_26175_CHARLIE_013 Validation Report

## Commands

- PASS: `node --check src/dev-runtime/server/local-api-router.mjs`
- PASS: `node --check assets/theme-v2/js/admin-system-health.js`
- PASS: `git diff --check`
- Result: no whitespace errors; CRLF conversion warnings only.
- PASS: `node --test tests/dev-runtime/AdminHealthOperations.test.mjs`
- Result: 4 passed.
- PASS: `npx playwright test tests/playwright/tools/AdminHealthOperationsPage.spec.mjs --workers=1 --reporter=line`
- Result: 3 passed.

## Validation Lane

- Targeted System Health API/unit lane: PASS.
- Targeted System Health Playwright lane: PASS.
- Full samples smoke: not run; not required for this System Health-only slice.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# PR_26175_CHARLIE_013 Service Health Dashboard

## Scope

Team: Charlie

Purpose: Add current-environment Service Health summary cards to Admin System Health Phase 2.

## Changes

- Added server-owned `serviceHealth` payload to the Admin System Health status API.
- Added compact Service Health cards for Runtime, API, Database, Storage, Authentication, Email, and Background Jobs.
- Used the requested visible statuses: Healthy, Warning, Failed, and Not Configured.
- Kept Email and Background Jobs as production-safe Not Configured placeholders.
- Updated API and Playwright System Health tests.

## Architecture Notes

- PASS: Current deployment only.
- PASS: No cross-environment health checks were added.
- PASS: Browser renders API/service contract state only.
- PASS: Placeholder services do not fake successful health.

## Artifact

- `tmp/PR_26175_CHARLIE_013-service-health-dashboard_delta.zip`
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# PR_26175_CHARLIE_014 Branch Validation

## Branch Rules

- PASS: Continued on `pr/26175-CHARLIE-010-system-health-history-and-closeout`.
- PASS: Stacked on PR_26175_CHARLIE_013.
- PASS: No merge was performed.
- PASS: No rebase was performed.
- PASS: No new root branch was created.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# PR_26175_CHARLIE_014 Manual Validation Notes

- Verified Configuration Summary renders on `admin/system-health.html`.
- Verified the summary contains only read-only fields.
- Verified site/API URL credentials are not displayed.
- Verified no raw database or auth secrets are included.
- Verified no peer environment health checks were introduced.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# PR_26175_CHARLIE_014 Requirement Checklist

- PASS: Added read-only Configuration Summary.
- PASS: Shows current environment.
- PASS: Shows hosting model.
- PASS: Shows site URL.
- PASS: Shows API URL.
- PASS: Shows database provider/type.
- PASS: Shows storage provider/folder.
- PASS: Shows auth provider/status.
- PASS: Does not expose secrets.
- PASS: Masks sensitive URL values.
- PASS: Uses API/service contract data.
- PASS: Tests were updated.
- PASS: Required reports were generated.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# PR_26175_CHARLIE_014 Validation Report

## Commands

- PASS: `node --check src/dev-runtime/server/local-api-router.mjs`
- PASS: `node --check assets/theme-v2/js/admin-system-health.js`
- PASS: `git diff --check`
- Result: no whitespace errors; CRLF conversion warnings only.
- PASS: `node --test tests/dev-runtime/AdminHealthOperations.test.mjs`
- Result: 4 passed.
- PASS: `npx playwright test tests/playwright/tools/AdminHealthOperationsPage.spec.mjs --workers=1 --reporter=line`
- Result: 3 passed.

## Validation Lane

- Targeted System Health API/unit lane: PASS.
- Targeted System Health Playwright lane: PASS.
- Full samples smoke: not run; not required for this System Health-only slice.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# PR_26175_CHARLIE_014 Configuration Summary

## Scope

Team: Charlie

Purpose: Add a read-only current-environment Configuration Summary to Admin System Health Phase 2.

## Changes

- Added server-owned `configurationSummary` to the Admin System Health status API.
- Added a Configuration Summary table with current environment, hosting model, site URL, API URL, database provider/type, storage provider/folder, and auth provider/status.
- Reused existing URL redaction so credentials are masked before the browser receives display values.
- Updated API and Playwright System Health tests.

## Architecture Notes

- PASS: Summary is read-only.
- PASS: No secrets are exposed.
- PASS: Current environment only.
- PASS: Browser renders API-owned configuration state only.
- PASS: No cross-environment checks were added.

## Artifact

- `tmp/PR_26175_CHARLIE_014-configuration-summary_delta.zip`
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# PR_26175_CHARLIE_015 Branch Validation

## Branch Rules

- PASS: Continued on `pr/26175-CHARLIE-010-system-health-history-and-closeout`.
- PASS: Stacked on PR_26175_CHARLIE_014.
- PASS: No merge was performed.
- PASS: No rebase was performed.
- PASS: No new root branch was created.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# PR_26175_CHARLIE_015 Manual Validation Notes

- Verified all five requested manual action controls are visible on `admin/system-health.html`.
- Verified Run Runtime Check posts to `/api/admin/system-health/action`.
- Verified manual action results are rendered in the action results table.
- Verified storage health action is server-side and current-environment scoped.
- Verified no peer environment health checks were introduced.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# PR_26175_CHARLIE_015 Requirement Checklist

- PASS: Added Refresh control.
- PASS: Added Run Runtime Check control.
- PASS: Added Run Database Check control.
- PASS: Added Run Storage Check control.
- PASS: Added Run Full Health Check control.
- PASS: Actions call API/service contracts.
- PASS: No browser-owned fake health success.
- PASS: Current environment only.
- PASS: Tests were updated.
- PASS: Required reports were generated.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# PR_26175_CHARLIE_015 Validation Report

## Commands

- PASS: `node --check src/dev-runtime/server/local-api-router.mjs`
- PASS: `node --check assets/theme-v2/js/admin-system-health.js`
- PASS: `node --check src/api/admin-system-health-api-client.js`
- PASS: `git diff --check`
- Result: no whitespace errors; CRLF conversion warnings only.
- PASS: `node --test tests/dev-runtime/AdminHealthOperations.test.mjs`
- Result: 4 passed.
- PASS: `npx playwright test tests/playwright/tools/AdminHealthOperationsPage.spec.mjs --workers=1 --reporter=line`
- Result: 3 passed.

## Validation Lane

- Targeted System Health API/unit lane: PASS.
- Targeted System Health Playwright lane: PASS.
- Full samples smoke: not run; not required for this System Health-only slice.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# PR_26175_CHARLIE_015 Manual Health Actions

## Scope

Team: Charlie

Purpose: Add manual current-environment health action controls to Admin System Health Phase 2.

## Changes

- Added `/api/admin/system-health/action` for Refresh, Run Runtime Check, Run Database Check, Run Storage Check, and Run Full Health Check.
- Added manual action buttons and an action result table to `admin/system-health.html`.
- Added client API support for manual health actions.
- Updated the controller so action results render only from server responses.
- Updated API and Playwright System Health tests.

## Architecture Notes

- PASS: Actions call API/service contracts.
- PASS: Browser does not fake successful health.
- PASS: Storage action runs bucket connectivity, list, upload, read, and delete through the current deployment API.
- PASS: Current environment only.
- PASS: No cross-environment checks were added.

## Artifact

- `tmp/PR_26175_CHARLIE_015-manual-health-actions_delta.zip`
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# PR_26175_CHARLIE_016 Branch Validation

## Branch Rules

- PASS: Continued on `pr/26175-CHARLIE-010-system-health-history-and-closeout`.
- PASS: Stacked on PR_26175_CHARLIE_015.
- PASS: No merge was performed.
- PASS: No rebase was performed.
- PASS: No new root branch was created.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# PR_26175_CHARLIE_016 Manual Validation Notes

- Verified Scheduled Health Monitoring renders on `admin/system-health.html`.
- Verified Not Configured appears instead of fake scheduler success.
- Verified the table includes last run, next run, duration, recent result, and failures/warnings.
- Verified no scheduler side effects or cross-environment checks were introduced.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# PR_26175_CHARLIE_016 Requirement Checklist

- PASS: Added Scheduled Health Monitoring foundation.
- PASS: Shows last scheduled run.
- PASS: Shows next scheduled run if available.
- PASS: Shows duration.
- PASS: Shows recent result.
- PASS: Shows failures/warnings.
- PASS: Shows production-safe Not Configured state when scheduler is not implemented.
- PASS: Current environment only.
- PASS: Tests were updated.
- PASS: Required reports were generated.
Loading
Loading