Skip to content

Commit 35b04c0

Browse files
committed
Add local API diagnostics reports
1 parent b61f577 commit 35b04c0

5 files changed

Lines changed: 432 additions & 904 deletions
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# PR_26171_018 Manual Validation Notes
2+
3+
## Startup Diagnostics Review
4+
- Confirmed the old compact `.env loaded for API runtime (...)` line is not present in the captured startup diagnostics.
5+
- Confirmed `.env` runtime variables print under the exact `Environment Variables` divider section.
6+
- Confirmed variables are sorted alphabetically in the startup capture.
7+
- Confirmed the runtime capture printed applied `.env` variables with `+`.
8+
- Confirmed the existing startup logging assertion covers already-set variables with `-`.
9+
10+
## Port Diagnostics Review
11+
- Confirmed startup diagnostics print the exact `All Runtime Ports being used by Service` divider section.
12+
- Confirmed the runtime capture includes readable labels for live server, API server, configured API URL, DB/Postgres, Supabase, and storage ports.
13+
- Confirmed missing optional ports are represented as `not configured` in the formatter test path.
14+
15+
## Secret Handling Review
16+
- Confirmed secret-key values are masked as `********`.
17+
- Confirmed database URL credentials are redacted before the URL is printed.
18+
- Confirmed generated PR reports do not include raw secret values.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# PR_26171_018 Validation Report
2+
3+
## Validation Commands
4+
- PASS: `npm run test:workspace-v2`
5+
- Result: 5 Playwright tests passed in the `workspace-contract` lane.
6+
- PASS: `npm run dev:local-api`
7+
- Startup was run through the repo npm script on an open alternate API port and stopped after `Press Ctrl+C to stop.` printed.
8+
- Captured diagnostics contained `Environment Variables`, `All Runtime Ports being used by Service`, and `API server port:`.
9+
- Capture path: `docs_build/dev/reports/PR_26171_018-local-api-startup-diagnostics-local-api-startup.log` (local ignored log).
10+
11+
## Secret Mask Confirmation
12+
- PASS: startup capture scan checked 4 secret-key values from `.env`; no raw secret-key values were found in the captured log.
13+
- PASS: startup capture scan checked 2 URL credentials from `.env`; no raw URL credentials were found in the captured log.
14+
- PASS: captured startup output used `********` for masked secret keys and redacted database URL credentials.
15+
16+
## Notes
17+
- The validation wrapper intentionally terminated the local API process after startup diagnostics printed.
18+
- No SQLite implementation work was performed.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# PR_26171_018-local-api-startup-diagnostics
2+
3+
## Purpose
4+
Improve `npm run dev:local-api` startup diagnostics without changing server startup behavior.
5+
6+
## Implementation
7+
- Replaced the compact `.env loaded for API runtime (...)` line with an `Environment Variables` section.
8+
- Prints one `.env` runtime variable per line, sorted alphabetically.
9+
- Uses `+` for variables applied from `.env` and `-` for variables already set before `.env`.
10+
- Masks values for keys containing `PASSWORD`, `SECRET`, `TOKEN`, `KEY`, `SERVICE_ROLE`, or `JWT`.
11+
- Redacts URL username/password credentials before printing non-masked URL values.
12+
- Added an `All Runtime Ports being used by Service` section covering live site, API server, configured API URL, DB/Postgres, Supabase, and storage ports, with `not configured` for missing optional ports.
13+
14+
## Changed Files
15+
- `scripts/start-local-api-server.mjs`
16+
- `tests/dev-runtime/LocalApiStartupLogging.test.mjs`
17+
18+
## Reports
19+
- `docs_build/dev/reports/codex_review.diff`
20+
- `docs_build/dev/reports/codex_changed_files.txt`
21+
- `docs_build/dev/reports/PR_26171_018-local-api-startup-diagnostics-validation-report.md`
22+
- `docs_build/dev/reports/PR_26171_018-local-api-startup-diagnostics-manual-validation-notes.md`
23+
24+
## Delta ZIP
25+
- `tmp/PR_26171_018-local-api-startup-diagnostics_delta.zip`
Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1-
docs_build/dev/reports/codex_changed_files.txt
2-
docs_build/dev/reports/codex_review.diff
3-
docs_build/dev/reports/PR_26171_BETA_083-message-tts-polish-and-dead-code-dead-code-cleanup-checklist.md
4-
docs_build/dev/reports/PR_26171_BETA_083-message-tts-polish-and-dead-code-manual-validation-notes.md
5-
docs_build/dev/reports/PR_26171_BETA_083-message-tts-polish-and-dead-code-message-tts-ux-checklist.md
6-
docs_build/dev/reports/PR_26171_BETA_083-message-tts-polish-and-dead-code-validation-report.md
7-
docs_build/dev/reports/PR_26171_BETA_083-message-tts-polish-and-dead-code.md
8-
tests/playwright/tools/MessagesTool.spec.mjs
9-
tests/playwright/tools/TextToSpeechFunctional.spec.mjs
10-
toolbox/messages/index.html
11-
toolbox/messages/messages.js
12-
toolbox/text-to-speech/index.html
13-
toolbox/text-to-speech/text2speech.js
1+
# PR_26171_018-local-api-startup-diagnostics changed files
2+
3+
## Source/test changes
4+
- scripts/start-local-api-server.mjs
5+
- tests/dev-runtime/LocalApiStartupLogging.test.mjs
6+
7+
## Required reports
8+
- docs_build/dev/reports/codex_review.diff
9+
- docs_build/dev/reports/codex_changed_files.txt
10+
- docs_build/dev/reports/PR_26171_018-local-api-startup-diagnostics.md
11+
- docs_build/dev/reports/PR_26171_018-local-api-startup-diagnostics-validation-report.md
12+
- docs_build/dev/reports/PR_26171_018-local-api-startup-diagnostics-manual-validation-notes.md
13+
14+
## Local package artifact
15+
- tmp/PR_26171_018-local-api-startup-diagnostics_delta.zip
16+
17+
## Validation evidence
18+
- npm run test:workspace-v2: PASS
19+
- npm run dev:local-api startup capture: PASS

0 commit comments

Comments
 (0)