|
| 1 | +# PR_26168_221-storage-path-error-rule-and-r2-env-ready |
| 2 | + |
| 3 | +## Branch Validation |
| 4 | + |
| 5 | +PASS: current branch is `main`. |
| 6 | + |
| 7 | +- Expected branch: `main` |
| 8 | +- Current branch: `main` |
| 9 | +- Local branches found: `main` |
| 10 | + |
| 11 | +## Scope Summary |
| 12 | + |
| 13 | +PASS: PR221 is scoped to Admin Infrastructure storage path status validation. |
| 14 | + |
| 15 | +- Missing `GAMEFOUNDRY_ASSET_STORAGE_PATH` still renders all lane rows as `ERROR`. |
| 16 | +- Invalid `GAMEFOUNDRY_ASSET_STORAGE_PATH` values now render all lane rows as `ERROR`. |
| 17 | +- Exact `/dev/projects/` and `/ist/projects/` matches were covered by targeted Playwright cases. |
| 18 | +- No R2 credentials or `.env` files were added or modified. |
| 19 | + |
| 20 | +## Requirement Checklist |
| 21 | + |
| 22 | +| Requirement | Status | Evidence | |
| 23 | +| --- | --- | --- | |
| 24 | +| Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` first | PASS | Instructions were read before branch guard or edits. | |
| 25 | +| Hard stop unless current branch is `main` | PASS | `git branch --show-current` returned `main`; `git branch --list` showed `* main`. | |
| 26 | +| Missing `GAMEFOUNDRY_ASSET_STORAGE_PATH` makes all rows `ERROR` | PASS | Existing missing-path logic preserved; Playwright case `Infrastructure storage path status reports missing env path as ERROR` passed. | |
| 27 | +| Invalid `GAMEFOUNDRY_ASSET_STORAGE_PATH` makes all rows `ERROR` | PASS | `projectAssetStoragePathStatus()` now requires an exact match before rendering yes/no; Playwright invalid `/qa/projects/` case passed with all rows `ERROR`. | |
| 28 | +| Exact `/dev/projects/` shows DEV yes and others no | PASS | Playwright case `Infrastructure storage path status reports DEV match only` passed. | |
| 29 | +| Exact `/ist/projects/` shows IST yes and others no | PASS | Playwright case `Infrastructure storage path status reports IST match only` passed. | |
| 30 | +| Non-matching valid-lane rows show no/false/blank | PASS | DEV and IST Playwright cases verify non-matching rows render `no`. | |
| 31 | +| Add clear manual note/report section that R2 `.env` setup is ready only after validation passes | PASS | See `R2 .env Readiness Note` and Manual Validation Notes below. | |
| 32 | +| Do not expose secrets | PASS | Browser rows still render only lane, path, and status value; no credentials, keys, passwords, or connection strings are rendered. | |
| 33 | +| Do not add new R2 credentials in repo | PASS | No `.env` files changed; no credential variables or secret values were added. | |
| 34 | +| Do not add unrelated promotion/package behavior | PASS | Changes are limited to Admin Infrastructure path status logic, targeted tests, coverage reports, and required PR artifacts. | |
| 35 | +| Do not run full samples smoke | PASS | Full samples smoke was skipped because sample JSON and sample runtime behavior were not touched. | |
| 36 | + |
| 37 | +## Validation Lane Report |
| 38 | + |
| 39 | +PASS: `node --check src/dev-runtime/server/local-api-router.mjs` |
| 40 | + |
| 41 | +PASS: `node --check tests/playwright/tools/AdminPlatformToolsWireframes.spec.mjs` |
| 42 | + |
| 43 | +PASS: `node --check assets/theme-v2/js/admin-infrastructure.js` |
| 44 | + |
| 45 | +PASS: Admin Infrastructure static contract check |
| 46 | + |
| 47 | +- Router defines exact lane paths: `/dev/projects/`, `/ist/projects/`, `/uat/projects/`, `/prod/projects/`. |
| 48 | +- Router computes `invalidPath` before rendering rows. |
| 49 | +- Router returns all `ERROR` rows when the path is missing or invalid. |
| 50 | +- Router returns `PASS` only when the path exactly matches one configured lane. |
| 51 | +- Playwright spec contains the missing, invalid, DEV, and IST path cases. |
| 52 | +- Admin Infrastructure HTML still has no inline scripts, style blocks, inline style attributes, or inline event handlers. |
| 53 | + |
| 54 | +PASS: targeted Admin Infrastructure Playwright |
| 55 | + |
| 56 | +Command: |
| 57 | + |
| 58 | +`npx playwright test tests/playwright/tools/AdminPlatformToolsWireframes.spec.mjs -g "Infrastructure Admin wireframe preserves template structure|Infrastructure storage path status reports missing env path as ERROR|Infrastructure storage path status reports invalid env path as ERROR|Infrastructure storage path status reports DEV match only|Infrastructure storage path status reports IST match only"` |
| 59 | + |
| 60 | +Result: |
| 61 | + |
| 62 | +- 5 passed. |
| 63 | +- Covered missing path = all `ERROR`. |
| 64 | +- Covered invalid path `/qa/projects/` = all `ERROR`. |
| 65 | +- Covered `/dev/projects/` = DEV `yes`, IST/UAT/PROD `no`. |
| 66 | +- Covered `/ist/projects/` = IST `yes`, DEV/UAT/PROD `no`. |
| 67 | + |
| 68 | +PASS: `git diff --check` |
| 69 | + |
| 70 | +- Exit code 0. |
| 71 | +- Git reported expected Windows line-ending warnings only. |
| 72 | + |
| 73 | +PASS: Playwright V8 coverage report produced at `docs_build/dev/reports/playwright_v8_coverage_report.txt`. |
| 74 | + |
| 75 | +- `(80%) assets/theme-v2/js/admin-infrastructure.js` |
| 76 | +- `(100%) src/engine/api/admin-infrastructure-api-client.js` |
| 77 | +- `(0%) src/dev-runtime/server/local-api-router.mjs` is an advisory WARN because Playwright browser V8 coverage does not collect Node-side server runtime. |
| 78 | + |
| 79 | +SKIP: Full samples smoke was not run because this PR changes only Admin Infrastructure storage path validation logic and targeted tests. |
| 80 | + |
| 81 | +## R2 .env Readiness Note |
| 82 | + |
| 83 | +R2 `.env` setup is ready only after `GAMEFOUNDRY_ASSET_STORAGE_PATH` validation passes with one exact lane match: |
| 84 | + |
| 85 | +- `/dev/projects/` |
| 86 | +- `/ist/projects/` |
| 87 | +- `/uat/projects/` |
| 88 | +- `/prod/projects/` |
| 89 | + |
| 90 | +If the variable is missing, blank, misspelled, or points to any other path, Admin Infrastructure must show all lane rows as `ERROR` and R2 setup should not be treated as ready. |
| 91 | + |
| 92 | +## Manual Validation Notes |
| 93 | + |
| 94 | +PASS: Static inspection confirmed the stricter invalid path rule lives in the Local API status logic, not in page-local browser data. |
| 95 | + |
| 96 | +PASS: Static inspection confirmed no R2 credentials, access keys, secret keys, passwords, or full connection strings were added to tracked files. |
| 97 | + |
| 98 | +PASS: Static inspection confirmed no `.env`, `.env.dev`, `.env.ist`, `.env.uat`, or `.env.prd` file was modified. |
| 99 | + |
| 100 | +PASS: Required review artifacts were produced: `docs_build/dev/reports/codex_review.diff` and `docs_build/dev/reports/codex_changed_files.txt`. |
0 commit comments