Skip to content

Commit 5a1df79

Browse files
committed
Clean up startup runtime diagnostics
1 parent 7ddd9bf commit 5a1df79

14 files changed

Lines changed: 704 additions & 251 deletions
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# PR_26177_CHARLIE_034-startup-runtime-report-cleanup
2+
3+
Team: Charlie
4+
Branch: pr/26177-CHARLIE-034-startup-runtime-report-cleanup
5+
Base: pr/26177-CHARLIE-032-runtime-health-json-endpoints
6+
Lifecycle: Build / Validation
7+
8+
## Scope
9+
- Polished Local API startup diagnostics with explicit Local API URL, local site URL, local site URL port, database mode, and storage status.
10+
- Kept runtime environment variable output deterministic and alphabetized.
11+
- Confirmed secret-like environment keys containing PASSWORD, SECRET, TOKEN, KEY, SERVICE_ROLE, or JWT remain masked.
12+
- Mirrored the safe diagnostics through the System Health API payload so the browser renders service-owned status.
13+
14+
## Changed Files
15+
- scripts/start-local-api-server.mjs
16+
- src/dev-runtime/server/local-api-router.mjs
17+
- tests/dev-runtime/LocalApiStartupLogging.test.mjs
18+
- tests/dev-runtime/AdminHealthOperations.test.mjs
19+
- tests/api/admin-system-health/contract.test.mjs
20+
- tests/playwright/tools/AdminHealthOperationsPage.spec.mjs
21+
- docs_build/dev/reports/coverage_changed_js_guardrail.txt
22+
- docs_build/dev/reports/playwright_v8_coverage_report.txt
23+
24+
## Validation
25+
- PASS: node --check scripts/start-local-api-server.mjs
26+
- PASS: node --check src/dev-runtime/server/local-api-router.mjs
27+
- PASS: node --test tests/dev-runtime/LocalApiStartupLogging.test.mjs
28+
- PASS: node --test tests/api/admin-system-health/contract.test.mjs
29+
- PASS: node --test tests/dev-runtime/AdminHealthOperations.test.mjs
30+
- PASS: npx playwright test tests/playwright/tools/AdminHealthOperationsPage.spec.mjs --workers=1 --reporter=line
31+
- PASS: git diff --check
32+
33+
## ZIP
34+
- Generated after commit: C:\Users\DavidQ\Documents\GitHub\HTML-JavaScript-Gaming\tmp\PR_26177_CHARLIE_034-startup-runtime-report-cleanup_delta.zip
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# PR_26177_CHARLIE_034 Branch Validation
2+
3+
Branch: pr/26177-CHARLIE-034-startup-runtime-report-cleanup
4+
Base: pr/26177-CHARLIE-032-runtime-health-json-endpoints
5+
6+
## Results
7+
- PASS: Continued the stacked Charlie workstream from PR_26177_CHARLIE_032.
8+
- PASS: Worktree was clean before edits.
9+
- PASS: Runtime changes are limited to Local API startup/runtime diagnostics.
10+
- PASS: No start_of_day files were modified.
11+
- PASS: No direct commit to main was made.
12+
- PASS: PR branch will be pushed for draft PR creation.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# PR_26177_CHARLIE_034 Manual Validation Notes
2+
3+
- Confirmed startup log output now prints Local API URL, local site URL, local site URL port, database mode, and storage status.
4+
- Confirmed `.env` diagnostic lines remain alphabetized by key.
5+
- Confirmed secret-like values are masked, including KEY and SERVICE_ROLE variables.
6+
- Confirmed System Health renders the new Local API startup diagnostics from the Local API payload.
7+
- Confirmed no browser-owned infrastructure health state was introduced.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# PR_26177_CHARLIE_034 Requirement Checklist
2+
3+
- PASS: Polish Local API startup/runtime diagnostics.
4+
- PASS: Keep environment variables alphabetized.
5+
- PASS: Mask secrets containing PASSWORD, SECRET, TOKEN, KEY, SERVICE_ROLE, or JWT.
6+
- PASS: Include clear Local API URL.
7+
- PASS: Include local site URL and port when available.
8+
- PASS: Include database mode without exposing connection credentials.
9+
- PASS: Include storage status without exposing secrets.
10+
- PASS: Preserve existing startup and System Health behavior.
11+
- PASS: Do not modify unrelated files.
12+
- PASS: Do not modify start_of_day folders.
13+
- PASS: Do not introduce MEM DB, fake-login, silent fallbacks, or browser-owned infrastructure state.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# PR_26177_CHARLIE_034 Validation Lane
2+
3+
## Commands
4+
- PASS: node --check scripts/start-local-api-server.mjs
5+
- PASS: node --check src/dev-runtime/server/local-api-router.mjs
6+
- PASS: node --test tests/dev-runtime/LocalApiStartupLogging.test.mjs
7+
- PASS: node --test tests/api/admin-system-health/contract.test.mjs
8+
- PASS: node --test tests/dev-runtime/AdminHealthOperations.test.mjs
9+
- PASS: npx playwright test tests/playwright/tools/AdminHealthOperationsPage.spec.mjs --workers=1 --reporter=line
10+
- PASS: git diff --check
11+
12+
## Notes
13+
- `git diff --check` reported only expected Windows LF-to-CRLF working-copy warnings.
14+
- Full samples smoke was not run because this PR is scoped to Local API startup diagnostics and System Health rendering.
Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
# git status --short
22
M docs_build/dev/reports/coverage_changed_js_guardrail.txt
33
M docs_build/dev/reports/playwright_v8_coverage_report.txt
4+
M scripts/start-local-api-server.mjs
45
M src/dev-runtime/server/local-api-router.mjs
5-
M tests/api/admin-system-health/contract.test.mjs
66
M tests/dev-runtime/AdminHealthOperations.test.mjs
7+
M tests/dev-runtime/LocalApiStartupLogging.test.mjs
78
M tests/playwright/tools/AdminHealthOperationsPage.spec.mjs
8-
?? docs_build/dev/reports/PR_26177_CHARLIE_032-runtime-health-json-endpoints.md
9-
?? docs_build/dev/reports/PR_26177_CHARLIE_032-runtime-health-json-endpoints_branch-validation.md
10-
?? docs_build/dev/reports/PR_26177_CHARLIE_032-runtime-health-json-endpoints_manual-validation-notes.md
11-
?? docs_build/dev/reports/PR_26177_CHARLIE_032-runtime-health-json-endpoints_requirements-checklist.md
12-
?? docs_build/dev/reports/PR_26177_CHARLIE_032-runtime-health-json-endpoints_validation-lane.md
9+
?? docs_build/dev/reports/PR_26177_CHARLIE_034-startup-runtime-report-cleanup.md
10+
?? docs_build/dev/reports/PR_26177_CHARLIE_034-startup-runtime-report-cleanup_branch-validation.md
11+
?? docs_build/dev/reports/PR_26177_CHARLIE_034-startup-runtime-report-cleanup_manual-validation-notes.md
12+
?? docs_build/dev/reports/PR_26177_CHARLIE_034-startup-runtime-report-cleanup_requirements-checklist.md
13+
?? docs_build/dev/reports/PR_26177_CHARLIE_034-startup-runtime-report-cleanup_validation-lane.md
1314

1415
# git ls-files --others --exclude-standard
15-
docs_build/dev/reports/PR_26177_CHARLIE_032-runtime-health-json-endpoints.md
16-
docs_build/dev/reports/PR_26177_CHARLIE_032-runtime-health-json-endpoints_branch-validation.md
17-
docs_build/dev/reports/PR_26177_CHARLIE_032-runtime-health-json-endpoints_manual-validation-notes.md
18-
docs_build/dev/reports/PR_26177_CHARLIE_032-runtime-health-json-endpoints_requirements-checklist.md
19-
docs_build/dev/reports/PR_26177_CHARLIE_032-runtime-health-json-endpoints_validation-lane.md
16+
docs_build/dev/reports/PR_26177_CHARLIE_034-startup-runtime-report-cleanup.md
17+
docs_build/dev/reports/PR_26177_CHARLIE_034-startup-runtime-report-cleanup_branch-validation.md
18+
docs_build/dev/reports/PR_26177_CHARLIE_034-startup-runtime-report-cleanup_manual-validation-notes.md
19+
docs_build/dev/reports/PR_26177_CHARLIE_034-startup-runtime-report-cleanup_requirements-checklist.md
20+
docs_build/dev/reports/PR_26177_CHARLIE_034-startup-runtime-report-cleanup_validation-lane.md
2021

2122
# git diff --stat
22-
.../dev/reports/coverage_changed_js_guardrail.txt | 1 -
23-
.../dev/reports/playwright_v8_coverage_report.txt | 2 -
24-
src/dev-runtime/server/local-api-router.mjs | 48 ++++++++++++++++++++++
25-
tests/api/admin-system-health/contract.test.mjs | 9 ++++
26-
tests/dev-runtime/AdminHealthOperations.test.mjs | 12 ++++++
27-
.../tools/AdminHealthOperationsPage.spec.mjs | 2 +
28-
6 files changed, 71 insertions(+), 3 deletions(-)
23+
.../dev/reports/coverage_changed_js_guardrail.txt | 1 -
24+
.../dev/reports/playwright_v8_coverage_report.txt | 4 +-
25+
scripts/start-local-api-server.mjs | 34 ++++++-
26+
src/dev-runtime/server/local-api-router.mjs | 101 ++++++++++++++++++++-
27+
tests/dev-runtime/AdminHealthOperations.test.mjs | 7 ++
28+
tests/dev-runtime/LocalApiStartupLogging.test.mjs | 32 +++++++
29+
.../tools/AdminHealthOperationsPage.spec.mjs | 6 ++
30+
7 files changed, 179 insertions(+), 6 deletions(-)

0 commit comments

Comments
 (0)