Skip to content

Commit 17d364b

Browse files
committed
Clarify local API startup logging for site and API URLs - PR_26169_026-local-api-startup-url-logging
1 parent 2e37e5b commit 17d364b

6 files changed

Lines changed: 519 additions & 3924 deletions
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# PR_26169_026-local-api-startup-url-logging Report
2+
3+
## Summary
4+
5+
Fixed misleading local API startup logging in `scripts/start-local-api-server.mjs`. The startup output now reports the API bind URL separately from configured public site/API URLs and no longer appends `/account/sign-in.html` to the API runtime URL.
6+
7+
## Branch Guard
8+
9+
| Check | Expected | Actual | Status |
10+
| --- | --- | --- | --- |
11+
| Current branch | `main` | `main` | PASS |
12+
| Local branches found | includes `main` | `main` | PASS |
13+
14+
## Requirement Checklist
15+
16+
| Requirement | Evidence | Status |
17+
| --- | --- | --- |
18+
| Log API runtime server bind URL separately | `formatStartupLogLines()` first line is `GameFoundry API runtime server running at ${localServer.baseUrl}`. | PASS |
19+
| Log configured site URL from `GAMEFOUNDRY_SITE_URL` | Startup formatting prints `Configured site URL: ...`. | PASS |
20+
| Missing site URL shows `(not configured)` | `tests/dev-runtime/LocalApiStartupLogging.test.mjs` covers missing site URL. | PASS |
21+
| Log configured API URL from `GAMEFOUNDRY_API_URL` | Startup formatting prints `Configured API URL: ...` when env value is present. | PASS |
22+
| Missing API URL derives default from bind URL plus `/api` | Targeted test covers `http://127.0.0.1:5599/api` derived from bind URL. | PASS |
23+
| Preserve `.env` load, auth connection, database connection, SSL mode, stop logs | Targeted test asserts all required log lines and order. | PASS |
24+
| Do not change bind behavior | `startLocalApiServer({ host, port })` remains driven by existing `GAMEFOUNDRY_LOCAL_API_HOST` / `GAMEFOUNDRY_LOCAL_API_PORT` defaults. | PASS |
25+
| Do not expose secrets | Targeted test passes secret-like env values and asserts they do not appear in logs. | PASS |
26+
| Do not touch unrelated app areas | Only startup script, targeted test, and required docs/reports changed. | PASS |
27+
28+
## Validation
29+
30+
| Command | Result |
31+
| --- | --- |
32+
| `git branch --show-current` | PASS, `main` |
33+
| `node --check scripts/start-local-api-server.mjs` | PASS |
34+
| `node --check tests/dev-runtime/LocalApiStartupLogging.test.mjs` | PASS |
35+
| `node --test tests/dev-runtime/LocalApiStartupLogging.test.mjs` | PASS, 2 tests |
36+
37+
## Manual Startup Shape
38+
39+
Expected configured output shape after this PR:
40+
41+
```text
42+
GameFoundry API runtime server running at http://127.0.0.1:5501
43+
Configured site URL: http://127.0.0.1:5500
44+
Configured API URL: http://127.0.0.1:5501/api
45+
.env loaded for API runtime (... key(s) applied).
46+
Configured auth connection: ...
47+
Configured database connection: ...
48+
Database SSL mode: ...
49+
Press Ctrl+C to stop.
50+
```
51+
52+
## Lane Decisions
53+
54+
| Lane | Decision |
55+
| --- | --- |
56+
| Runtime/startup logging | Executed targeted Node syntax and startup-log unit validation. |
57+
| Browser/UI/API behavior | Skipped; no browser, route, auth, membership, marketplace, owner, admin, or banner runtime behavior changed. |
58+
| Samples | Skipped; samples are not in scope and were not touched. |
Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,16 @@
11
# git status --short
2-
M assets/theme-v2/js/account-auth-service.js
3-
M assets/theme-v2/js/gamefoundry-partials.js
42
M docs_build/dev/reports/codex_changed_files.txt
53
M docs_build/dev/reports/codex_review.diff
6-
M docs_build/dev/reports/coverage_changed_js_guardrail.txt
7-
M docs_build/dev/reports/environment_agnostic_browser_gate_report.md
8-
M docs_build/dev/reports/playwright_v8_coverage_report.txt
9-
M scripts/validate-browser-env-agnostic.mjs
10-
M src/api/server-api-client.js
11-
M src/dev-runtime/server/local-api-router.mjs
12-
?? docs_build/dev/reports/PR_26169_025-browser-api-url-config.md
13-
?? docs_build/pr/BUILD_PR_26169_025-browser-api-url-config.md
14-
?? src/api/public-config-client.js
15-
?? tests/dev-runtime/PublicApiUrlClient.test.mjs
16-
?? tests/playwright/tools/BrowserApiUrlConfig.spec.mjs
4+
M scripts/start-local-api-server.mjs
5+
?? docs_build/dev/reports/PR_26169_026-local-api-startup-url-logging.md
6+
?? docs_build/pr/BUILD_PR_26169_026-local-api-startup-url-logging.md
7+
?? tests/dev-runtime/LocalApiStartupLogging.test.mjs
178

189
# git ls-files --others --exclude-standard
19-
docs_build/dev/reports/PR_26169_025-browser-api-url-config.md
20-
docs_build/pr/BUILD_PR_26169_025-browser-api-url-config.md
21-
src/api/public-config-client.js
22-
tests/dev-runtime/PublicApiUrlClient.test.mjs
23-
tests/playwright/tools/BrowserApiUrlConfig.spec.mjs
10+
docs_build/dev/reports/PR_26169_026-local-api-startup-url-logging.md
11+
docs_build/pr/BUILD_PR_26169_026-local-api-startup-url-logging.md
12+
tests/dev-runtime/LocalApiStartupLogging.test.mjs
2413

25-
# git diff --stat
26-
assets/theme-v2/js/account-auth-service.js | 6 +-
27-
assets/theme-v2/js/gamefoundry-partials.js | 219 +-
28-
docs_build/dev/reports/codex_changed_files.txt | 44 +-
29-
docs_build/dev/reports/codex_review.diff | 2349 +++++++++++---------
30-
.../dev/reports/coverage_changed_js_guardrail.txt | 65 +-
31-
.../environment_agnostic_browser_gate_report.md | 2 +-
32-
.../dev/reports/playwright_v8_coverage_report.txt | 126 +-
33-
scripts/validate-browser-env-agnostic.mjs | 4 +-
34-
src/api/server-api-client.js | 13 +-
35-
src/dev-runtime/server/local-api-router.mjs | 7 +
36-
10 files changed, 1537 insertions(+), 1298 deletions(-)
14+
# git diff --stat -- . :!docs_build/dev/reports/codex_review.diff :!docs_build/dev/reports/codex_changed_files.txt
15+
scripts/start-local-api-server.mjs | 109 +++++++++++++++++++++++++------------
16+
1 file changed, 75 insertions(+), 34 deletions(-)

0 commit comments

Comments
 (0)