|
| 1 | +# PR_26158_039 Dev Runtime Boundary Enforcement Report |
| 2 | + |
| 3 | +## Summary |
| 4 | + |
| 5 | +PR_26158_039 moves the remaining active mock repository and guest seed implementation out of `toolbox/**` and into `src/dev-runtime/**`, while preserving the Browser -> Server API -> Data Source boundary. |
| 6 | + |
| 7 | +No active browser/tool surface now imports `src/dev-runtime`, mock repositories, or moved seed files directly. The local API server remains the only runtime bridge to the dev-only implementations. |
| 8 | + |
| 9 | +## Implementation |
| 10 | + |
| 11 | +| Change | Evidence | Status | |
| 12 | +| --- | --- | --- | |
| 13 | +| Moved Asset mock repository into dev-runtime persistence. | `src/dev-runtime/persistence/tool-repositories/assets-mock-repository.js`; `toolbox/assets/assets-mock-repository.js` deleted. | PASS | |
| 14 | +| Moved Palette mock repository into dev-runtime persistence. | `src/dev-runtime/persistence/tool-repositories/palette-workspace-repository.js`; `toolbox/colors/palette-workspace-repository.js` deleted. | PASS | |
| 15 | +| Moved Palette source seed rows into dev-runtime guest seeds. | `src/dev-runtime/guest-seeds/palette-source-mock-db.js`; `toolbox/colors/palette-source-mock-db.js` deleted. | PASS | |
| 16 | +| Moved Game Configuration mock repository into dev-runtime persistence. | `src/dev-runtime/persistence/tool-repositories/game-configuration-mock-repository.js`; old toolbox file deleted. | PASS | |
| 17 | +| Moved Game Design mock repository into dev-runtime persistence. | `src/dev-runtime/persistence/tool-repositories/game-design-mock-repository.js`; old toolbox file deleted. | PASS | |
| 18 | +| Moved Project Journey mock repository into dev-runtime persistence. | `src/dev-runtime/persistence/tool-repositories/project-journey-mock-repository.js`; old toolbox file deleted. | PASS | |
| 19 | +| Moved Project Workspace mock repository into dev-runtime persistence. | `src/dev-runtime/persistence/tool-repositories/project-workspace-mock-repository.js`; old toolbox file deleted. | PASS | |
| 20 | +| Moved Local Mem guest/user tool-state sample construction into dev-runtime guest seeds. | `src/dev-runtime/guest-seeds/tool-state-samples.js`; `src/dev-runtime/server/mock-api-router.mjs` calls `createServerSeedTables()`. | PASS | |
| 21 | +| Updated server router imports to dev-runtime repositories only. | `src/dev-runtime/server/mock-api-router.mjs` imports from `../persistence/tool-repositories/*` and `../guest-seeds/tool-state-samples.js`. | PASS | |
| 22 | +| Updated repository-focused tests to import dev-runtime repositories. | `tests/playwright/tools/*MockRepository.spec.mjs`; `tests/playwright/tools/AdminDbViewer.spec.mjs`; `tests/playwright/tools/ProjectJourneyTool.spec.mjs`. | PASS | |
| 23 | +| Added explicit boundary validation. | `tests/dev-runtime/DevRuntimeBoundary.test.mjs`. | PASS | |
| 24 | + |
| 25 | +## Requirement Checklist |
| 26 | + |
| 27 | +| Requirement | Evidence | Result | |
| 28 | +| --- | --- | --- | |
| 29 | +| Read `docs_build/dev/PROJECT_INSTRUCTIONS.md` first. | Read before implementation. | PASS | |
| 30 | +| Audit mock, seed, test, guest, demo, fixture, dev-only, and local-only runtime code. | Static searches plus `DevRuntimeBoundary.test.mjs`; see `dev-runtime-audit.md`. | PASS | |
| 31 | +| Move remaining dev-only implementation into approved `src/dev-runtime` areas. | Mock repositories moved to `src/dev-runtime/persistence/tool-repositories`; seed data moved to `src/dev-runtime/guest-seeds`. | PASS | |
| 32 | +| Verify UAT/PROD bundles do not import/package `src/dev-runtime`. | Static audit over active browser/UAT/PROD candidate roots returned no matches. | PASS | |
| 33 | +| Verify active tools consume runtime contracts only and do not import dev-runtime directly. | `rg` audit over `account`, `admin`, `assets`, `toolbox`, and active `src` surfaces returned no matches. | PASS | |
| 34 | +| Verify Local Mem, guest seeds, test fixtures, and reseed behavior originate from `src/dev-runtime`. | Server seed creation now lives in `src/dev-runtime/guest-seeds/tool-state-samples.js`; reseed validation passed. | PASS | |
| 35 | +| Preserve SQLite-backed Local DB behind API boundary. | AdminDbViewer Local DB readonly lane passed. | PASS | |
| 36 | +| Preserve independent Local Mem and Local DB reseed behavior. | `DbSeedIntegrity` and LoginSessionMode Playwright passed. | PASS | |
| 37 | +| Update reports with remaining violations. | This report and `dev-runtime-audit.md` list findings. | PASS | |
| 38 | +| Do not add UAT/Prod adapter behavior. | No UAT/Prod adapter files changed. | PASS | |
| 39 | +| Do not modify `start_of_day` folders. | No `start_of_day` files changed. | PASS | |
| 40 | + |
| 41 | +## Validation |
| 42 | + |
| 43 | +| Validation | Result | |
| 44 | +| --- | --- | |
| 45 | +| Changed-file syntax checks | PASS | |
| 46 | +| `node --test tests/dev-runtime/DevRuntimeBoundary.test.mjs` | PASS, 3/3 | |
| 47 | +| `node --test tests/dev-runtime/DbSeedIntegrity.test.mjs` | PASS, 2/2 | |
| 48 | +| `npx playwright test tests/playwright/tools/LoginSessionMode.spec.mjs` | PASS, 6/6 | |
| 49 | +| `npx playwright test tests/playwright/tools/AdminDbViewer.spec.mjs` | PASS, 7/7 | |
| 50 | +| `npx playwright test tests/playwright/tools/PaletteToolMockRepository.spec.mjs` | PASS, 4/4 | |
| 51 | +| `npx playwright test tests/playwright/tools/AssetToolMockRepository.spec.mjs` | PASS, 6/6 | |
| 52 | +| `npx playwright test tests/playwright/tools/ProjectJourneyTool.spec.mjs` | PASS, 13/13 | |
| 53 | +| Static import boundary audit | PASS | |
| 54 | +| `git diff --check` | PASS, line-ending warnings only | |
| 55 | + |
| 56 | +## Remaining Violations |
| 57 | + |
| 58 | +None found in active browser/tool surfaces. |
| 59 | + |
| 60 | +`src/dev-runtime/server/` remains as the local API server boundary created by prior migration work. It is not mock data ownership; it imports the dev-runtime persistence and guest seed modules and exposes them through API routes. |
| 61 | + |
| 62 | +## Notes |
| 63 | + |
| 64 | +- V8 coverage is advisory for this PR because the moved modules are server/dev-runtime JavaScript and are not directly collected by browser V8 coverage. |
| 65 | +- Existing seed-only audit fallback diagnostics still appear during some Local Mem/Local DB initialization tests. They are existing seed diagnostics and did not cause validation failures. |
0 commit comments