Skip to content
Closed
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,28 @@
# PR_26171_GAMMA_006 Instruction Compliance Checklist

- Read `docs_build/dev/PROJECT_INSTRUCTIONS.md`: PASS.
- Read `docs_build/dev/PROJECT_MULTI_PC.txt`: PASS.
- Checkout `main` before starting: PASS.
- Pull latest `main`: PASS.
- Verify branch is `main`: PASS.
- Verify clean status before branch creation: PASS.
- Verify PR 005 artifacts do not leave unstaged report changes: PASS.
- Verify PR name includes TEAM token: PASS.
- Verify TEAM owner matches Team Gamma governance/diagnostics ownership: PASS.
- Create requested branch `pr/26171-GAMMA-006-sqlite-deprecation-audit`: PASS.
- Audit SQLite references across active repo paths: PASS.
- Classify references as active runtime, local API, test, docs, or archive/reference: PASS.
- Do not remove SQLite code in this PR: PASS.
- Create removal backlog with recommended follow-up PRs: PASS.
- Confirm Postgres remains authoritative: PASS.
- Run `git diff --check`: PASS.
- Run targeted SQLite/Postgres text checks: PASS.
- Do not run Playwright: PASS.
- Do not run samples: PASS.
- Create required PR-specific audit report: PASS.
- Create manual validation notes: PASS.
- Create instruction compliance checklist: PASS.
- Create `codex_review.diff`: PASS.
- Create `codex_changed_files.txt`: PASS.
- Create repo-structured ZIP under `tmp/`: PASS.
- Do not merge before explicit EOD approval: PASS.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# PR_26171_GAMMA_006 Manual Validation Notes

Manual validation status: PASS.

Manual checks performed:
- Confirmed `main` was checked out and pulled before branch creation.
- Confirmed `git status --short docs_build/dev/reports` returned no unstaged PR 005 report changes before branch creation.
- Reviewed the SQLite audit classification for active runtime, Local API, test, docs, and archive/reference categories.
- Confirmed the PR does not remove SQLite code.
- Confirmed the removal backlog assigns follow-up work to the appropriate team ownership areas.
- Confirmed Postgres remains documented as authoritative.
- Confirmed Playwright and samples are skipped because this PR changes audit reports only.

Expected outcome:
- The repo has an explicit SQLite deprecation inventory and follow-up backlog.
- Existing SQLite code remains unchanged until owner-scoped removal/cutover PRs.
- Postgres remains the authoritative direction for new database work.

Out of scope:
- Removing SQLite services.
- Replacing Local API persistence.
- Updating tests to Postgres fixtures.
- Editing archive/reference material.
- Running Playwright.
- Running samples.
156 changes: 156 additions & 0 deletions docs_build/dev/reports/PR_26171_GAMMA_006-sqlite-deprecation-audit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
# PR_26171_GAMMA_006-sqlite-deprecation-audit

## Summary

Team ownership: GAMMA.

Purpose: audit SQLite references across active repo paths, classify the remaining references, create a removal backlog, and confirm Postgres remains authoritative.

No SQLite code was removed in this PR.

## Start Gate

- Checkout `main`: PASS.
- Pull latest `main`: PASS.
- Verify branch is `main`: PASS.
- Verify clean status before branch creation: PASS.
- Verify PR 005 artifacts do not leave unstaged report changes: PASS.
- Created branch: `pr/26171-GAMMA-006-sqlite-deprecation-audit`.
- Base main commit before branch: `eaee83f93`.

## Audit Method

Commands:
- `rg -l -i "sqlite|better-sqlite3|sqlite3|\.sqlite|\.db\b|node:sqlite|DatabaseSync" -g "!tmp/**" -g "!node_modules/**" -g "!.git/**"`
- `rg --count-matches -i "sqlite|better-sqlite3|sqlite3|\.sqlite|\.db\b|node:sqlite|DatabaseSync" -g "!tmp/**" -g "!node_modules/**" -g "!.git/**"`
- `rg -n -i "SQLite is deprecated|Postgres is authoritative|New database work must target Postgres|Local API -> Postgres|Database Direction|Postgres target|GAMEFOUNDRY_DATABASE_URL must use postgres"`

Excluded generated/dependency paths:
- `tmp/**`
- `node_modules/**`
- `.git/**`

## Classification Summary

| Classification | References | Files | Status |
| --- | ---: | ---: | --- |
| active runtime | 43 | 3 | Legacy SQLite runtime debt remains under `src/dev-runtime/`. |
| local API | 6 | 1 | Local API still exposes or reports SQLite-backed legacy paths. |
| test | 42 | 7 | Targeted tests still create temporary SQLite files or guard against SQLite exposure. |
| docs | 298 | 96 | Historical reports, BUILD docs, database docs, and governance text. |
| archive/reference | 5 | 1 | Deprecated V1/V2 reference material only. |

## Active Runtime References

| File | Count | Classification | Notes |
| --- | ---: | --- | --- |
| `src/dev-runtime/messages/messages-sqlite-service.mjs` | 37 | active runtime | Main remaining server-side SQLite service. Uses `node:sqlite`, `DatabaseSync`, `GAMEFOUNDRY_MESSAGES_SQLITE_PATH`, `messages.sqlite`, and reports `SQLite`. |
| `src/dev-runtime/persistence/game-journey-completion-metrics-store.mjs` | 5 | active runtime | Uses `node:sqlite`, `DatabaseSync`, `game-journey-completion-metrics.sqlite`, and reports `SQLite`. |
| `src/dev-runtime/persistence/mock-db-store.js` | 1 | active runtime | Describes Local DB as SQLite-backed server storage. |

## Local API References

| File | Count | Classification | Notes |
| --- | ---: | --- | --- |
| `src/dev-runtime/server/local-api-router.mjs` | 6 | local API | Imports and creates `MessagesSqliteService`, reports `databaseEngine: "SQLite"` for legacy routes, and includes Local DB/SQLite export text. |

## Test References

| File | Count | Classification | Notes |
| --- | ---: | --- | --- |
| `scripts/validate-browser-env-agnostic.mjs` | 10 | test | Static guard rejects browser/provider leakage and documents deprecated SQLite/Local DB technical debt. |
| `tests/dev-runtime/DbSeedIntegrity.test.mjs` | 2 | test | Creates temporary `.sqlite` files under `tmp/local-db`. |
| `tests/playwright/tools/AdminDbViewer.spec.mjs` | 1 | test | Creates temporary Admin DB Viewer `.sqlite` fixture. |
| `tests/playwright/tools/BrowserApiUrlConfig.spec.mjs` | 1 | test | Creates temporary browser API URL config `.sqlite` fixture. |
| `tests/playwright/tools/GameJourneyTool.spec.mjs` | 7 | test | Includes Game Journey Local API SQLite persistence test and direct `node:sqlite` inspection. |
| `tests/playwright/tools/LoginSessionMode.spec.mjs` | 1 | test | Creates temporary login-session `.sqlite` fixture. |
| `tests/playwright/tools/MessagesTool.spec.mjs` | 20 | test | Uses `GAMEFOUNDRY_MESSAGES_SQLITE_PATH` and temporary messages `.sqlite` fixtures for legacy Messages coverage. |

## Docs References

| Group | References | Files | Classification |
| --- | ---: | ---: | --- |
| `docs_build/dev/PROJECT_INSTRUCTIONS.md` | 7 | 1 | docs |
| `docs_build/dev/reports/` | 270 | 83 | docs |
| `docs_build/pr/` | 18 | 9 | docs |
| `docs_build/database/` | 3 | 3 | docs |

Docs references are historical reports, active governance, or prior BUILD/validation records. They should remain as traceability unless a dedicated docs cleanup PR rewrites obsolete guidance.

## Archive/Reference

| Group | References | Files | Classification |
| --- | ---: | ---: | --- |
| `archive/v1-v2/` | 5 | 1 | archive/reference |

Archive references are retained as deprecated V1/V2 reference material and are not active implementation ownership.

## Postgres Authoritative Confirmation

Postgres remains authoritative.

Evidence:
- `docs_build/dev/PROJECT_INSTRUCTIONS.md` states `SQLite is deprecated.` and `Postgres is authoritative.`
- `docs_build/dev/PROJECT_INSTRUCTIONS.md` requires new database work to target Postgres and requires `Local API -> Postgres`.
- `src/dev-runtime/persistence/postgres-connection-client.mjs` rejects non-`postgres://` and non-`postgresql://` database URLs.
- `toolbox/messages/index.html` surfaces `Database Direction: Postgres`.
- `toolbox/messages/messages.js` sets the Messages persistence label to `Postgres target`.

## Removal Backlog

Recommended follow-up PRs:

1. `PR_26171_BETA_0XX-messages-postgres-service-cutover`
- Owner: Team Beta.
- Scope: replace `src/dev-runtime/messages/messages-sqlite-service.mjs` with a Postgres-backed Messages service contract.
- Include migration of Messages categories, emotion profiles, TTS profiles, messages, segments, and playback payload reads.
- Update `src/dev-runtime/server/local-api-router.mjs` to create the Postgres-backed service instead of `createMessagesSqliteService`.

2. `PR_26171_ALPHA_0XX-game-journey-postgres-metrics-cutover`
- Owner: Team Alpha.
- Scope: replace `src/dev-runtime/persistence/game-journey-completion-metrics-store.mjs` SQLite storage with Local API -> Postgres persistence.
- Update Game Journey tests to avoid direct `node:sqlite` inspection.

3. `PR_26171_GAMMA_0XX-local-api-sqlite-diagnostic-cleanup`
- Owner: Team Gamma.
- Scope: after Alpha/Beta cutovers, remove Local API `databaseEngine: "SQLite"` reporting and Local DB/SQLite operator wording that no longer reflects active behavior.

4. `PR_26171_GAMMA_0XX-sqlite-test-fixture-retirement`
- Owner: Team Gamma with Alpha/Beta follow-through where tool ownership applies.
- Scope: retire temp SQLite fixtures once the owning runtime paths are Postgres-backed.
- Preserve browser boundary guard checks that ensure no browser code imports database implementation details.

5. `PR_26171_GAMMA_0XX-sqlite-docs-traceability-cleanup`
- Owner: Team Gamma.
- Scope: clean obsolete active docs after runtime/test cutovers while preserving historical reports and archive/reference material.

## Validation

Lanes executed:
- docs/static - audit/report-only PR.

Commands run:
- `git diff --check` - PASS.
- Targeted SQLite reference scan - PASS.
- Targeted Postgres authoritative text scan - PASS.

Skipped lanes:
- Playwright: SKIP. Audit/report-only PR with no runtime, UI, toolState, or workspace behavior changes.
- Samples: SKIP. Audit/report-only PR with no sample loader, sample JSON, or sample runtime changes.
- Runtime, integration, and engine: SKIP. No runtime, handoff, shared parser, or engine behavior changed.

## Required Reports

- `docs_build/dev/reports/codex_review.diff`
- `docs_build/dev/reports/codex_changed_files.txt`
- `docs_build/dev/reports/PR_26171_GAMMA_006-sqlite-deprecation-audit.md`
- `docs_build/dev/reports/PR_26171_GAMMA_006-sqlite-deprecation-audit-manual-validation-notes.md`
- `docs_build/dev/reports/PR_26171_GAMMA_006-sqlite-deprecation-audit-instruction-compliance-checklist.md`

## Git Workflow

- Current branch: `pr/26171-GAMMA-006-sqlite-deprecation-audit`.
- Created branch: `pr/26171-GAMMA-006-sqlite-deprecation-audit`.
- Push result: PASS. Pushed `pr/26171-GAMMA-006-sqlite-deprecation-audit` to `origin`.
- PR URL: `https://github.com/ToolboxAid/HTML-JavaScript-Gaming/pull/30`.
- Merge result: not merged; EOD approval required.
41 changes: 6 additions & 35 deletions docs_build/dev/reports/codex_changed_files.txt
Original file line number Diff line number Diff line change
@@ -1,35 +1,6 @@
docs_build/dev/reports/PR_26171_BETA_071-tts-profile-emotion-table-manual-validation-notes.md
docs_build/dev/reports/PR_26171_BETA_071-tts-profile-emotion-table-validation.md
docs_build/dev/reports/PR_26171_BETA_071-tts-profile-emotion-table.md
docs_build/dev/reports/codex_changed_files.txt
docs_build/dev/reports/codex_review.diff
docs_build/dev/reports/coverage_changed_js_guardrail.txt
docs_build/dev/reports/dependency_gating_report.md
docs_build/dev/reports/dependency_hydration_reuse_report.md
docs_build/dev/reports/execution_graph_reuse_report.md
docs_build/dev/reports/failure_fingerprint_report.md
docs_build/dev/reports/filesystem_scan_reduction_report.md
docs_build/dev/reports/incremental_validation_report.md
docs_build/dev/reports/lane_compilation_report.md
docs_build/dev/reports/lane_deduplication_report.md
docs_build/dev/reports/lane_input_validation_report.md
docs_build/dev/reports/lane_runtime_optimization_report.md
docs_build/dev/reports/lane_snapshot_report.md
docs_build/dev/reports/lane_warm_start_report.md
docs_build/dev/reports/monolith_trigger_removal_report.md
docs_build/dev/reports/persistent_lane_manifest_report.md
docs_build/dev/reports/playwright_discovery_ownership_report.md
docs_build/dev/reports/playwright_discovery_scope_report.md
docs_build/dev/reports/playwright_structure_audit.md
docs_build/dev/reports/playwright_v8_coverage_report.txt
docs_build/dev/reports/retry_suppression_report.md
docs_build/dev/reports/slow_path_pruning_report.md
docs_build/dev/reports/static_validation_report.md
docs_build/dev/reports/targeted_file_manifest_report.md
docs_build/dev/reports/test_cleanup_performance_report.md
docs_build/dev/reports/test_cleanup_routing_report.md
docs_build/dev/reports/testing_lane_execution_report.md
docs_build/dev/reports/validation_cache_report.md
docs_build/dev/reports/zero_browser_preflight_report.md
tests/playwright/tools/TextToSpeechFunctional.spec.mjs
toolbox/text-to-speech/text2speech.js
M docs_build/dev/reports/PR_26171_GAMMA_006-sqlite-deprecation-audit.md

...ation-audit-instruction-compliance-checklist.md | 28 ++++
...te-deprecation-audit-manual-validation-notes.md | 25 ++++
.../PR_26171_GAMMA_006-sqlite-deprecation-audit.md | 156 +++++++++++++++++++++
3 files changed, 209 insertions(+)
Loading
Loading