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
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# PR_26177_CHARLIE_007-runtime-configuration-complete

## Summary

Team Charlie completed the Runtime Configuration closeout slice for System Health.

Runtime configuration now reports explicit server-owned sources for:

- Local API URL
- static/site URL
- Storage/R2 endpoint
- Storage/R2 projects prefix
- startup/runtime configuration source

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.

## Changed Files

- `scripts/start-local-api-server.mjs`
- `src/dev-runtime/server/local-api-router.mjs`
- `src/dev-runtime/storage/storage-config.mjs`
- `tests/dev-runtime/AdminHealthOperations.test.mjs`
- `tests/dev-runtime/LocalApiStartupLogging.test.mjs`
- `tests/dev-runtime/StorageConfig.test.mjs`
- `docs_build/dev/reports/PR_26177_CHARLIE_007-runtime-configuration-complete.md`
- `docs_build/dev/reports/PR_26177_CHARLIE_007-runtime-configuration-complete_branch-validation.md`
- `docs_build/dev/reports/PR_26177_CHARLIE_007-runtime-configuration-complete_manual-validation-notes.md`
- `docs_build/dev/reports/PR_26177_CHARLIE_007-runtime-configuration-complete_requirements-checklist.md`
- `docs_build/dev/reports/PR_26177_CHARLIE_007-runtime-configuration-complete_validation-lane.md`
- `docs_build/dev/reports/codex_changed_files.txt`
- `docs_build/dev/reports/codex_review.diff`

## Implementation Notes

- Added runtime configuration source rows to System Health Local API startup diagnostics.
- Added configuration summary rows for API URL source, site URL source, Storage endpoint, and Storage projects prefix.
- Preserved the Web UI -> API/service contract -> database/runtime flow; browser code does not own infrastructure health state.
- Added `/local/projects/` to approved project asset storage prefixes to match the current Local environment model.
- Preserved safe partial Storage/R2 diagnostics while keeping access key and secret key values hidden.
- Left browser public config fallback behavior unchanged because it already records an explicit diagnostic and changing routing semantics would be outside this PR scope.

## Validation

- PASS: `node --check scripts/start-local-api-server.mjs`
- PASS: `node --check src/dev-runtime/server/local-api-router.mjs`
- PASS: `node --check src/dev-runtime/storage/storage-config.mjs`
- PASS: `node --check tests/dev-runtime/AdminHealthOperations.test.mjs`
- PASS: `node --check tests/dev-runtime/LocalApiStartupLogging.test.mjs`
- PASS: `node --check tests/dev-runtime/StorageConfig.test.mjs`
- 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`
- PASS: `npx playwright test tests/playwright/tools/AdminHealthOperationsPage.spec.mjs --workers=1`
- PASS: `git diff --check`

## ZIP

- `tmp/PR_26177_CHARLIE_007-runtime-configuration-complete_delta.zip`
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# PR_26177_CHARLIE_007 Branch Validation

## Branch

- Branch: `PR_26177_CHARLIE_007-runtime-configuration-complete`
- Start branch: `main`
- Main start commit: `8cdd87bf2eb2b9c0625e80881f1d359e902fa8fc`

## Checks

| Check | Result | Notes |
| --- | --- | --- |
| Started from `main` | PASS | Branch was created after `main` was clean and synchronized. |
| Worktree clean before branch work | PASS | Startup status check returned no changes. |
| One PR purpose only | PASS | Runtime configuration diagnostics and tests only. |
| No `start_of_day` changes | PASS | Changed-file list contains no `start_of_day` paths. |
| No runtime data ownership regression | PASS | Browser remains a consumer of API/service contracts only. |
| No secrets exposed | PASS | Tests confirm URL credentials and storage credentials are not serialized. |
| Repo-structured ZIP created | PASS | `tmp/PR_26177_CHARLIE_007-runtime-configuration-complete_delta.zip`. |

## Result

PASS
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# PR_26177_CHARLIE_007 Manual Validation Notes

## Manual Review

- Confirmed changed files are limited to runtime configuration diagnostics, storage configuration, targeted tests, and required reports.
- Confirmed no `start_of_day` paths were modified.
- Confirmed no inline styles, style blocks, script blocks, page-local CSS, or inline event handlers were introduced.
- Confirmed no browser-owned infrastructure health state was added.
- Confirmed no secret values are printed in startup diagnostics or System Health payloads.

## Operator Behavior

- When `GAMEFOUNDRY_API_URL` is configured, both startup logging and System Health show it as the configured API URL source.
- When `GAMEFOUNDRY_API_URL` is missing, startup logging shows `Configured API URL: (not configured)` and separately shows the derived Local API URL.
- Storage/R2 diagnostics preserve safe non-secret partial values such as bucket, endpoint origin, and projects prefix while keeping credentials hidden.
- `/local/projects/` is accepted as an approved project asset prefix for the Local environment model.

## Result

PASS
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# PR_26177_CHARLIE_007 Requirements Checklist

| Requirement | Result | Evidence |
| --- | --- | --- |
| Complete Runtime Configuration from 80% to 100% | PASS | Runtime source, URL, storage, and startup diagnostics are explicit. |
| Single runtime configuration source where appropriate | PASS | Local API and System Health read server environment configuration through API/runtime contracts. |
| Local API URL configuration | PASS | Startup log and System Health distinguish configured API URL from derived Local API URL. |
| Static/site URL configuration | PASS | Startup log and System Health report `GAMEFOUNDRY_SITE_URL` source/status. |
| Storage/R2 endpoint configuration | PASS | System Health and startup diagnostics report endpoint and projects prefix source/status. |
| Startup/runtime validation | PASS | Startup logging and `/api/admin/system-health/status` expose source and status rows. |
| Duplicated config removal only where safely in scope | PASS | No broad refactor; aligned existing startup and System Health diagnostics. |
| No silent fallback behavior | PASS | Missing `GAMEFOUNDRY_API_URL` remains `not configured`; Local API URL derivation is explicitly labeled. |
| No MEM DB/local-mem/fake-login/browser SSoT | PASS | No product-data ownership changes. |
| No SQLite direction | PASS | No SQLite additions or terminology. |
| Theme V2 rules | PASS | No UI/CSS changes in this PR. |
| Targeted tests | PASS | Node and Playwright targeted lanes passed. |

## Result

PASS
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# PR_26177_CHARLIE_007 Validation Lane

## Commands

| Command | Result |
| --- | --- |
| `node --check scripts/start-local-api-server.mjs` | PASS |
| `node --check src/dev-runtime/server/local-api-router.mjs` | PASS |
| `node --check src/dev-runtime/storage/storage-config.mjs` | PASS |
| `node --check tests/dev-runtime/AdminHealthOperations.test.mjs` | PASS |
| `node --check tests/dev-runtime/LocalApiStartupLogging.test.mjs` | PASS |
| `node --check tests/dev-runtime/StorageConfig.test.mjs` | 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` | PASS, 19 tests |
| `npx playwright test tests/playwright/tools/AdminHealthOperationsPage.spec.mjs --workers=1` | PASS, 3 tests |
| `git diff --check` | PASS |

## Playwright

Impacted: Yes, System Health renders the changed API rows.

Result: PASS.

## Full Samples Smoke

Not run. Not required for this targeted runtime configuration PR.
25 changes: 12 additions & 13 deletions docs_build/dev/reports/codex_changed_files.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
docs_build/dev/BUILD_PR.md
docs_build/dev/PLAN_PR.md
docs_build/dev/ProjectInstructions/team_assignments/ACTIVE_TEAM_REGISTRY.md
docs_build/dev/ProjectInstructions/team_assignments/TEAM_ASSIGNMENTS.md
docs_build/dev/reports/PR_26177_DELTA_056-shared-validation-assertions.md
docs_build/dev/reports/PR_26177_DELTA_056-shared-validation-assertions_branch-validation.md
docs_build/dev/reports/PR_26177_DELTA_056-shared-validation-assertions_instruction-compliance-checklist.md
docs_build/dev/reports/PR_26177_DELTA_056-shared-validation-assertions_manual-validation-notes.md
docs_build/dev/reports/PR_26177_DELTA_056-shared-validation-assertions_requirement-checklist.md
docs_build/dev/reports/PR_26177_DELTA_056-shared-validation-assertions_validation-lane.md
docs_build/dev/reports/codex_changed_files.txt
docs_build/dev/reports/codex_changed_files.txt
docs_build/dev/reports/codex_review.diff
src/shared/math/randomHelpers.js
src/shared/validation/assert.js
docs_build/dev/reports/PR_26177_CHARLIE_007-runtime-configuration-complete.md
docs_build/dev/reports/PR_26177_CHARLIE_007-runtime-configuration-complete_branch-validation.md
docs_build/dev/reports/PR_26177_CHARLIE_007-runtime-configuration-complete_manual-validation-notes.md
docs_build/dev/reports/PR_26177_CHARLIE_007-runtime-configuration-complete_requirements-checklist.md
docs_build/dev/reports/PR_26177_CHARLIE_007-runtime-configuration-complete_validation-lane.md
scripts/start-local-api-server.mjs
src/dev-runtime/server/local-api-router.mjs
src/dev-runtime/storage/storage-config.mjs
tests/dev-runtime/AdminHealthOperations.test.mjs
tests/dev-runtime/LocalApiStartupLogging.test.mjs
tests/dev-runtime/StorageConfig.test.mjs
Loading
Loading