Skip to content

Commit 6f3c4d0

Browse files
committed
Merge remote-tracking branch 'origin/main' into team/ALPHA/game-journey
# Conflicts: # 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/playwright_v8_coverage_report.txt # src/dev-runtime/server/local-api-router.mjs # tests/helpers/playwrightRepoServer.mjs
2 parents cb17f22 + ca72ead commit 6f3c4d0

13 files changed

Lines changed: 1358 additions & 1160 deletions

docs_build/database/dml/DML_INDEX.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Direct SQL setup is intentionally narrow. Account DEV users now require server-s
1414
| Game Design | `game-design.sql` | Server-seed-owned | Server-side seed API |
1515
| Game Journey | `game-journey.sql` | Server-seed-owned | Server-side seed API |
1616
| Game Hub | `game-workspace.sql` | Server-seed-owned | Server-side seed API |
17-
| Messages | `messages.sql` | Server-seed-owned | Messages Local API/server-side SQLite service |
17+
| Messages | `messages.sql` | Server-seed-owned | Messages Local API/server-side Postgres service |
1818
| Objects | `objects.sql` | Server-seed-owned | Server-side seed API |
1919
| Palette | `palette.sql` | Server-seed-owned | Server-side seed API |
2020
| Support Tickets | `support-tickets.sql` | Server-seed-owned | Admin Site Setup/server-side seed API |

docs_build/database/dml/messages.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
-- Owned tables: messages_categories, messages_emotion_profiles, messages_tts_profiles, messages_records, messages_segments
77

88
-- DML status: Server-seed-owned.
9-
-- Setup is performed through the Messages Local API / server-side SQLite service for this PR.
9+
-- Setup is performed through the Messages Local API / server-side Postgres service for this PR.
1010
-- Browser pages must not seed authoritative records.
1111
-- The server/API layer generates all keys and audit fields.
1212
-- This SQL file intentionally has no direct INSERT statements because direct SQL would bypass key/audit ownership.

docs_build/database/seed/messages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@
3131
"messages_records": [],
3232
"messages_segments": []
3333
},
34-
"note": "Seed names are applied by the server-side Messages SQLite service. Browser pages must not seed authoritative records."
34+
"note": "Seed names are applied by the server-side Messages Postgres service. Browser pages must not seed authoritative records."
3535
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# PR_26171_BETA_022 Instruction Compliance Checklist
2+
3+
TEAM ownership: BETA.
4+
5+
- PASS: Read `docs_build/dev/PROJECT_INSTRUCTIONS.md`.
6+
- PASS: Read `docs_build/dev/PROJECT_MULTI_PC.txt`.
7+
- PASS: Verified Messages belongs to Team Beta ownership.
8+
- PASS: Started from latest `main` before creating `team/BETA/messages`.
9+
- PASS: Scope stayed within Messages Local API/service/tests and directly affected active database docs.
10+
- PASS: Removed active Messages SQLite runtime dependency without touching unrelated SQLite work.
11+
- PASS: Used targeted validation only.
12+
- PASS: Did not run samples.
13+
- PASS: Did not merge.
14+
- PASS: Required shared reports are generated under `docs_build/dev/reports/`.
15+
- PASS: Manual validation notes are present.
16+
- PASS: Repo-structured ZIP is required under `tmp/`.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# PR_26171_BETA_022 Manual Validation Notes
2+
3+
TEAM ownership: BETA.
4+
5+
Manual validation performed:
6+
- Confirmed the Messages page loads through the repo Playwright server with the injected Postgres client stub.
7+
- Confirmed seeded Messages categories, emotion profiles, and TTS profiles are available from `/api/messages/*`.
8+
- Confirmed creating a message preserves `message`, `persistence`, `categoryName`, and `emotionProfileName` response shape fields.
9+
- Confirmed creating a message segment preserves `segment`, `messageName`, and `emotionProfileName` response shape fields.
10+
- Confirmed playback behavior remains covered by the Messages Playwright spec.
11+
- Confirmed active Messages SQLite runtime dependency strings are absent from scoped active paths.
12+
13+
Expected outcome:
14+
- Messages Local API persists through the Postgres service contract.
15+
- Messages tool behavior remains unchanged from the browser user's perspective.
16+
- No `messages.sqlite` file is created or required by the Messages tool tests.
17+
18+
Out of scope:
19+
- Full samples smoke.
20+
- Broad runtime regression suite.
21+
- Production database connectivity against a live Postgres instance.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# PR_26171_BETA_022-messages-postgres-service-cutover
2+
3+
## Summary
4+
5+
TEAM ownership: BETA.
6+
7+
Branch: `team/BETA/messages`.
8+
9+
Scope completed:
10+
- Replaced the active Messages Local API persistence service with a Postgres-backed implementation.
11+
- Routed `/api/messages/*` through `createMessagesPostgresService`.
12+
- Preserved the existing Local API response envelopes for Messages, categories, emotion profiles, TTS profiles, and segments.
13+
- Removed the active Messages `node:sqlite`, `DatabaseSync`, `messages.sqlite`, and `GAMEFOUNDRY_MESSAGES_SQLITE_PATH` runtime path.
14+
- Updated targeted Messages Playwright coverage to use an injected Postgres client stub.
15+
- Updated active Messages DML/seed documentation from SQLite service wording to Postgres service wording.
16+
17+
Compatibility wrapper:
18+
- No wrapper was kept. Active imports were migrated to `messages-postgres-service.mjs`, and targeted text checks found no remaining active reference to `messages-sqlite-service`.
19+
20+
Postgres authority:
21+
- The runtime service uses the existing `createPostgresConnectionClient` path, which reads `GAMEFOUNDRY_DATABASE_URL` for the server-side database connection.
22+
- Tests inject `createMessagesPostgresClientStub()` to preserve deterministic Local API and Playwright behavior without creating a local SQLite file.
23+
24+
## Validation
25+
26+
Passed:
27+
- `node --test --test-name-pattern "Messages Local API" tests/dev-runtime/DbSeedIntegrity.test.mjs`
28+
- `npx playwright test tests/playwright/tools/MessagesTool.spec.mjs --config=codex_playwright_system_chrome.config.cjs --project=playwright`
29+
- `git diff --check`
30+
- Targeted stale SQLite dependency check across Messages service, Local API router, affected tests, helper stubs, and active Messages docs.
31+
- Targeted Postgres wiring check for `GAMEFOUNDRY_DATABASE_URL`, `createPostgresConnectionClient`, and Postgres service references.
32+
33+
Skipped:
34+
- Full samples smoke: out of scope for this Messages Local API cutover.
35+
- Broad runtime test suite: out of scope; validation was limited to the affected Messages and Local API surfaces.
36+
37+
## Notes
38+
39+
Playwright V8 coverage reports were refreshed by the targeted Messages Playwright run. Server-side runtime files are listed as advisory warnings because browser V8 coverage does not collect Node-side Local API modules.

0 commit comments

Comments
 (0)