|
| 1 | +# PR_26158_029 API Static Route Recovery Report |
| 2 | + |
| 3 | +## Summary |
| 4 | + |
| 5 | +Recovered login/session API route probes, made 404/405 diagnostics actionable, and filtered named browser-extension noise without adding UAT/Prod adapters or changing `start_of_day`. |
| 6 | + |
| 7 | +## Artifact |
| 8 | + |
| 9 | +- Delta ZIP: `tmp/PR_26158_029-api-static-route-recovery_delta.zip` |
| 10 | + |
| 11 | +## Requirement Checklist |
| 12 | + |
| 13 | +| Requirement | Status | Evidence | |
| 14 | +| --- | --- | --- | |
| 15 | +| Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` first. | PASS | Read before edits. | |
| 16 | +| Fix `ShowOneChild.js` failing because `ActionableCoachmark` is not defined before use. | PASS | No active repo runtime file contains `ShowOneChild` or `ActionableCoachmark`; extension script failures are filtered by `tests/helpers/browserExtensionNoise.mjs` without defining globals or masking bare repo `ActionableCoachmark` errors. | |
| 17 | +| Fix `localDevLoginState` 404 from `gamefoundry-partials.js`. | PASS | `assets/theme-v2/js/gamefoundry-partials.js` now reports actionable local API route diagnostics for 404/405 instead of the generic session failure. | |
| 18 | +| Fix `server-api-client.js` 404/405 for local server API calls used by login/session mode. | PASS | `src/engine/api/server-api-client.js` reports actionable 404/405 diagnostics, and `src/dev-runtime/server/mock-api-router.mjs` supports session `HEAD` probes and API `OPTIONS` probes. `ApiStaticRouteRecovery.spec.mjs` verifies no 404/405 for login/session route calls. | |
| 19 | +| Ignore browser extension errors from `ch-content-script-dend.js` and `content-script-idle.js` unless repo code is causing global pollution. | PASS | `tests/helpers/browserExtensionNoise.mjs` ignores only named extension script files. Bare repo errors without those script names still fail the lanes. | |
| 20 | +| Preserve Local Mem and Local DB clickability. | PASS | `LoginSessionMode.spec.mjs` and `ApiStaticRouteRecovery.spec.mjs` assert both controls are enabled. | |
| 21 | +| Preserve SQLite-backed Local DB behind API boundary. | PASS | LoginSessionMode and AdminDbViewer Local DB tests passed. Browser code still calls API clients/server routes only. | |
| 22 | +| Do not add UAT/Prod API adapter behavior. | PASS | No adapter behavior added; only session route probe handling and diagnostics changed. | |
| 23 | +| Do not expose UAT or Prod as local login choices. | PASS | LoginSessionMode and ApiStaticRouteRecovery assert UAT/Prod buttons are absent. | |
| 24 | +| Do not modify `start_of_day` folders. | PASS | Changed-file list contains no `start_of_day` paths. | |
| 25 | +| Run changed-file syntax checks. | PASS | All changed JS/spec files passed `node --check`. | |
| 26 | +| Run LoginSessionMode Playwright. | PASS | `npx playwright test tests/playwright/tools/LoginSessionMode.spec.mjs` passed 5/5. | |
| 27 | +| Run targeted local API route validation for login/session endpoints. | PASS | `npx playwright test tests/playwright/tools/ApiStaticRouteRecovery.spec.mjs` passed 1/1. | |
| 28 | +| Run ToolboxRoutePages Playwright. | PASS | `npx playwright test tests/playwright/tools/ToolboxRoutePages.spec.mjs` passed 1/1. | |
| 29 | +| Run AdminDbViewer Playwright if DB route behavior is touched. | PASS | `npx playwright test tests/playwright/tools/AdminDbViewer.spec.mjs` passed 7/7 because the API router was touched. | |
| 30 | +| Do not run full samples smoke unless directly impacted. | PASS | Full samples smoke skipped because no samples or shared sample loader/framework changed. | |
| 31 | + |
| 32 | +## Files Changed |
| 33 | + |
| 34 | +- `assets/theme-v2/js/gamefoundry-partials.js` |
| 35 | +- `src/engine/api/server-api-client.js` |
| 36 | +- `src/dev-runtime/server/mock-api-router.mjs` |
| 37 | +- `tests/helpers/browserExtensionNoise.mjs` |
| 38 | +- `tests/playwright/tools/ApiStaticRouteRecovery.spec.mjs` |
| 39 | +- `tests/playwright/tools/LoginSessionMode.spec.mjs` |
| 40 | +- `tests/playwright/tools/ToolboxRoutePages.spec.mjs` |
| 41 | +- `tests/playwright/tools/AdminDbViewer.spec.mjs` |
| 42 | +- `docs_build/dev/reports/testing_lane_execution_report.md` |
| 43 | +- `docs_build/dev/reports/api-static-route-recovery-report.md` |
| 44 | +- `docs_build/dev/reports/playwright_v8_coverage_report.txt` |
| 45 | +- `docs_build/dev/reports/coverage_changed_js_guardrail.txt` |
| 46 | +- `docs_build/dev/reports/codex_review.diff` |
| 47 | +- `docs_build/dev/reports/codex_changed_files.txt` |
| 48 | + |
| 49 | +## Validation Commands |
| 50 | + |
| 51 | +| Command | Result | |
| 52 | +| --- | --- | |
| 53 | +| `node --check assets/theme-v2/js/gamefoundry-partials.js` | PASS | |
| 54 | +| `node --check src/engine/api/server-api-client.js` | PASS | |
| 55 | +| `node --check src/dev-runtime/server/mock-api-router.mjs` | PASS | |
| 56 | +| `node --check tests/helpers/browserExtensionNoise.mjs` | PASS | |
| 57 | +| `node --check tests/playwright/tools/ApiStaticRouteRecovery.spec.mjs` | PASS | |
| 58 | +| `node --check tests/playwright/tools/LoginSessionMode.spec.mjs` | PASS | |
| 59 | +| `node --check tests/playwright/tools/ToolboxRoutePages.spec.mjs` | PASS | |
| 60 | +| `node --check tests/playwright/tools/AdminDbViewer.spec.mjs` | PASS | |
| 61 | +| `npx playwright test tests/playwright/tools/ApiStaticRouteRecovery.spec.mjs` | PASS, 1/1 | |
| 62 | +| `npx playwright test tests/playwright/tools/LoginSessionMode.spec.mjs` | PASS, 5/5 | |
| 63 | +| `npx playwright test tests/playwright/tools/ToolboxRoutePages.spec.mjs` | PASS, 1/1 | |
| 64 | +| `npx playwright test tests/playwright/tools/AdminDbViewer.spec.mjs` | PASS, 7/7 | |
| 65 | +| `git diff --check` | PASS, with Git line-ending warnings only | |
| 66 | + |
| 67 | +## Notes |
| 68 | + |
| 69 | +- `ShowOneChild.js`, `ch-content-script-dend.js`, and `content-script-idle.js` are not repo-owned active runtime files. The recovery is intentionally limited to test noise filtering for those named extension scripts plus evidence that repo code is not defining or depending on `ActionableCoachmark`. |
| 70 | +- Node emitted the standard experimental warning for `node:sqlite` during Playwright lanes; validation passed. |
0 commit comments