Skip to content

Commit d1a7b2d

Browse files
committed
Complete runtime configuration
1 parent 8cdd87b commit d1a7b2d

13 files changed

Lines changed: 900 additions & 439 deletions
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# PR_26177_CHARLIE_007-runtime-configuration-complete
2+
3+
## Summary
4+
5+
Team Charlie completed the Runtime Configuration closeout slice for System Health.
6+
7+
Runtime configuration now reports explicit server-owned sources for:
8+
9+
- Local API URL
10+
- static/site URL
11+
- Storage/R2 endpoint
12+
- Storage/R2 projects prefix
13+
- startup/runtime configuration source
14+
15+
The Local API startup report now distinguishes a configured `GAMEFOUNDRY_API_URL` from the derived Local API URL used for diagnostics. Missing configured values are reported as `not configured` or `WARN`; no silent configured defaults were added.
16+
17+
## Changed Files
18+
19+
- `scripts/start-local-api-server.mjs`
20+
- `src/dev-runtime/server/local-api-router.mjs`
21+
- `src/dev-runtime/storage/storage-config.mjs`
22+
- `tests/dev-runtime/AdminHealthOperations.test.mjs`
23+
- `tests/dev-runtime/LocalApiStartupLogging.test.mjs`
24+
- `tests/dev-runtime/StorageConfig.test.mjs`
25+
- `docs_build/dev/reports/PR_26177_CHARLIE_007-runtime-configuration-complete.md`
26+
- `docs_build/dev/reports/PR_26177_CHARLIE_007-runtime-configuration-complete_branch-validation.md`
27+
- `docs_build/dev/reports/PR_26177_CHARLIE_007-runtime-configuration-complete_manual-validation-notes.md`
28+
- `docs_build/dev/reports/PR_26177_CHARLIE_007-runtime-configuration-complete_requirements-checklist.md`
29+
- `docs_build/dev/reports/PR_26177_CHARLIE_007-runtime-configuration-complete_validation-lane.md`
30+
- `docs_build/dev/reports/codex_changed_files.txt`
31+
- `docs_build/dev/reports/codex_review.diff`
32+
33+
## Implementation Notes
34+
35+
- Added runtime configuration source rows to System Health Local API startup diagnostics.
36+
- Added configuration summary rows for API URL source, site URL source, Storage endpoint, and Storage projects prefix.
37+
- Preserved the Web UI -> API/service contract -> database/runtime flow; browser code does not own infrastructure health state.
38+
- Added `/local/projects/` to approved project asset storage prefixes to match the current Local environment model.
39+
- Preserved safe partial Storage/R2 diagnostics while keeping access key and secret key values hidden.
40+
- Left browser public config fallback behavior unchanged because it already records an explicit diagnostic and changing routing semantics would be outside this PR scope.
41+
42+
## Validation
43+
44+
- PASS: `node --check scripts/start-local-api-server.mjs`
45+
- PASS: `node --check src/dev-runtime/server/local-api-router.mjs`
46+
- PASS: `node --check src/dev-runtime/storage/storage-config.mjs`
47+
- PASS: `node --check tests/dev-runtime/AdminHealthOperations.test.mjs`
48+
- PASS: `node --check tests/dev-runtime/LocalApiStartupLogging.test.mjs`
49+
- PASS: `node --check tests/dev-runtime/StorageConfig.test.mjs`
50+
- PASS: `node --test tests/dev-runtime/LocalApiStartupLogging.test.mjs tests/dev-runtime/StorageConfig.test.mjs tests/dev-runtime/PublicEnvironmentConfig.test.mjs tests/dev-runtime/PublicApiUrlClient.test.mjs tests/dev-runtime/AdminHealthOperations.test.mjs tests/api/admin-system-health/contract.test.mjs`
51+
- PASS: `npx playwright test tests/playwright/tools/AdminHealthOperationsPage.spec.mjs --workers=1`
52+
- PASS: `git diff --check`
53+
54+
## ZIP
55+
56+
- `tmp/PR_26177_CHARLIE_007-runtime-configuration-complete_delta.zip`
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# PR_26177_CHARLIE_007 Branch Validation
2+
3+
## Branch
4+
5+
- Branch: `PR_26177_CHARLIE_007-runtime-configuration-complete`
6+
- Start branch: `main`
7+
- Main start commit: `8cdd87bf2eb2b9c0625e80881f1d359e902fa8fc`
8+
9+
## Checks
10+
11+
| Check | Result | Notes |
12+
| --- | --- | --- |
13+
| Started from `main` | PASS | Branch was created after `main` was clean and synchronized. |
14+
| Worktree clean before branch work | PASS | Startup status check returned no changes. |
15+
| One PR purpose only | PASS | Runtime configuration diagnostics and tests only. |
16+
| No `start_of_day` changes | PASS | Changed-file list contains no `start_of_day` paths. |
17+
| No runtime data ownership regression | PASS | Browser remains a consumer of API/service contracts only. |
18+
| No secrets exposed | PASS | Tests confirm URL credentials and storage credentials are not serialized. |
19+
| Repo-structured ZIP created | PASS | `tmp/PR_26177_CHARLIE_007-runtime-configuration-complete_delta.zip`. |
20+
21+
## Result
22+
23+
PASS
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# PR_26177_CHARLIE_007 Manual Validation Notes
2+
3+
## Manual Review
4+
5+
- Confirmed changed files are limited to runtime configuration diagnostics, storage configuration, targeted tests, and required reports.
6+
- Confirmed no `start_of_day` paths were modified.
7+
- Confirmed no inline styles, style blocks, script blocks, page-local CSS, or inline event handlers were introduced.
8+
- Confirmed no browser-owned infrastructure health state was added.
9+
- Confirmed no secret values are printed in startup diagnostics or System Health payloads.
10+
11+
## Operator Behavior
12+
13+
- When `GAMEFOUNDRY_API_URL` is configured, both startup logging and System Health show it as the configured API URL source.
14+
- When `GAMEFOUNDRY_API_URL` is missing, startup logging shows `Configured API URL: (not configured)` and separately shows the derived Local API URL.
15+
- Storage/R2 diagnostics preserve safe non-secret partial values such as bucket, endpoint origin, and projects prefix while keeping credentials hidden.
16+
- `/local/projects/` is accepted as an approved project asset prefix for the Local environment model.
17+
18+
## Result
19+
20+
PASS
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# PR_26177_CHARLIE_007 Requirements Checklist
2+
3+
| Requirement | Result | Evidence |
4+
| --- | --- | --- |
5+
| Complete Runtime Configuration from 80% to 100% | PASS | Runtime source, URL, storage, and startup diagnostics are explicit. |
6+
| Single runtime configuration source where appropriate | PASS | Local API and System Health read server environment configuration through API/runtime contracts. |
7+
| Local API URL configuration | PASS | Startup log and System Health distinguish configured API URL from derived Local API URL. |
8+
| Static/site URL configuration | PASS | Startup log and System Health report `GAMEFOUNDRY_SITE_URL` source/status. |
9+
| Storage/R2 endpoint configuration | PASS | System Health and startup diagnostics report endpoint and projects prefix source/status. |
10+
| Startup/runtime validation | PASS | Startup logging and `/api/admin/system-health/status` expose source and status rows. |
11+
| Duplicated config removal only where safely in scope | PASS | No broad refactor; aligned existing startup and System Health diagnostics. |
12+
| No silent fallback behavior | PASS | Missing `GAMEFOUNDRY_API_URL` remains `not configured`; Local API URL derivation is explicitly labeled. |
13+
| No MEM DB/local-mem/fake-login/browser SSoT | PASS | No product-data ownership changes. |
14+
| No SQLite direction | PASS | No SQLite additions or terminology. |
15+
| Theme V2 rules | PASS | No UI/CSS changes in this PR. |
16+
| Targeted tests | PASS | Node and Playwright targeted lanes passed. |
17+
18+
## Result
19+
20+
PASS
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# PR_26177_CHARLIE_007 Validation Lane
2+
3+
## Commands
4+
5+
| Command | Result |
6+
| --- | --- |
7+
| `node --check scripts/start-local-api-server.mjs` | PASS |
8+
| `node --check src/dev-runtime/server/local-api-router.mjs` | PASS |
9+
| `node --check src/dev-runtime/storage/storage-config.mjs` | PASS |
10+
| `node --check tests/dev-runtime/AdminHealthOperations.test.mjs` | PASS |
11+
| `node --check tests/dev-runtime/LocalApiStartupLogging.test.mjs` | PASS |
12+
| `node --check tests/dev-runtime/StorageConfig.test.mjs` | PASS |
13+
| `node --test tests/dev-runtime/LocalApiStartupLogging.test.mjs tests/dev-runtime/StorageConfig.test.mjs tests/dev-runtime/PublicEnvironmentConfig.test.mjs tests/dev-runtime/PublicApiUrlClient.test.mjs tests/dev-runtime/AdminHealthOperations.test.mjs tests/api/admin-system-health/contract.test.mjs` | PASS, 19 tests |
14+
| `npx playwright test tests/playwright/tools/AdminHealthOperationsPage.spec.mjs --workers=1` | PASS, 3 tests |
15+
| `git diff --check` | PASS |
16+
17+
## Playwright
18+
19+
Impacted: Yes, System Health renders the changed API rows.
20+
21+
Result: PASS.
22+
23+
## Full Samples Smoke
24+
25+
Not run. Not required for this targeted runtime configuration PR.
Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
docs_build/dev/BUILD_PR.md
2-
docs_build/dev/PLAN_PR.md
3-
docs_build/dev/ProjectInstructions/team_assignments/ACTIVE_TEAM_REGISTRY.md
4-
docs_build/dev/ProjectInstructions/team_assignments/TEAM_ASSIGNMENTS.md
5-
docs_build/dev/reports/PR_26177_DELTA_056-shared-validation-assertions.md
6-
docs_build/dev/reports/PR_26177_DELTA_056-shared-validation-assertions_branch-validation.md
7-
docs_build/dev/reports/PR_26177_DELTA_056-shared-validation-assertions_instruction-compliance-checklist.md
8-
docs_build/dev/reports/PR_26177_DELTA_056-shared-validation-assertions_manual-validation-notes.md
9-
docs_build/dev/reports/PR_26177_DELTA_056-shared-validation-assertions_requirement-checklist.md
10-
docs_build/dev/reports/PR_26177_DELTA_056-shared-validation-assertions_validation-lane.md
11-
docs_build/dev/reports/codex_changed_files.txt
1+
docs_build/dev/reports/codex_changed_files.txt
122
docs_build/dev/reports/codex_review.diff
13-
src/shared/math/randomHelpers.js
14-
src/shared/validation/assert.js
3+
docs_build/dev/reports/PR_26177_CHARLIE_007-runtime-configuration-complete.md
4+
docs_build/dev/reports/PR_26177_CHARLIE_007-runtime-configuration-complete_branch-validation.md
5+
docs_build/dev/reports/PR_26177_CHARLIE_007-runtime-configuration-complete_manual-validation-notes.md
6+
docs_build/dev/reports/PR_26177_CHARLIE_007-runtime-configuration-complete_requirements-checklist.md
7+
docs_build/dev/reports/PR_26177_CHARLIE_007-runtime-configuration-complete_validation-lane.md
8+
scripts/start-local-api-server.mjs
9+
src/dev-runtime/server/local-api-router.mjs
10+
src/dev-runtime/storage/storage-config.mjs
11+
tests/dev-runtime/AdminHealthOperations.test.mjs
12+
tests/dev-runtime/LocalApiStartupLogging.test.mjs
13+
tests/dev-runtime/StorageConfig.test.mjs

0 commit comments

Comments
 (0)