module.yml: adds a requires: block for a postgresdatabase provision named txt_game_scores, with a full env_map covering host/port/user/password/database; matching empty env keys added so env-sync populates them after provisioning
migrations/package.json: ESM package with pg dep and typescript/@types/node/@types/pg devDeps
migrations/provision/postgres/000-init-scores.ts: creates players and games tables with idempotent IF NOT EXISTS DDL, plus two supporting indexes (scoreboard sort, player history lookup)
Server code, docker-compose.yml, and Dockerfile are unchanged — server integration is deferred to the follow-on child task.
What happens after merge
Pipeline rebuilds the module image
Coordinator dispatches cmd.module.provision → hypothalamus creates txt_game_scores DB on ace's postgres, writes credentials to mesh_provisions + module_env
Env-sync regenerates the txt-game .env
Migration runner executes 000-init-scores.ts, connects with PROVISION_* env, creates players + games tables
txt-game restarts — still serving the existing in-memory game unchanged
Test plan
Review module.yml diff: requires: entry present, version: unchanged at 1.0.0, no hardcoded credentials
Review migrations/package.json: "type": "module", pg in deps, typescript/@types/node/@types/pg in devDeps
Review migrations/provision/postgres/000-init-scores.ts: uses PROVISION_* env vars, all DDL guarded with IF NOT EXISTS
Confirm server.mjs, docker-compose.yml, Dockerfile are untouched in this diff
After merge + pipeline: verify mesh_provisions shows txt-game postgres provision on ace, and txt_game_scores DB contains players + games tables
## Summary
- `module.yml`: adds a `requires:` block for a `postgres` `database` provision named `txt_game_scores`, with a full `env_map` covering host/port/user/password/database; matching empty env keys added so env-sync populates them after provisioning
- `migrations/package.json`: ESM package with `pg` dep and `typescript`/`@types/node`/`@types/pg` devDeps
- `migrations/provision/postgres/000-init-scores.ts`: creates `players` and `games` tables with idempotent `IF NOT EXISTS` DDL, plus two supporting indexes (scoreboard sort, player history lookup)
Server code, `docker-compose.yml`, and `Dockerfile` are **unchanged** — server integration is deferred to the follow-on child task.
## What happens after merge
1. Pipeline rebuilds the module image
2. Coordinator dispatches `cmd.module.provision` → hypothalamus creates `txt_game_scores` DB on ace's postgres, writes credentials to `mesh_provisions` + `module_env`
3. Env-sync regenerates the txt-game `.env`
4. Migration runner executes `000-init-scores.ts`, connects with `PROVISION_*` env, creates `players` + `games` tables
5. txt-game restarts — still serving the existing in-memory game unchanged
## Test plan
- [ ] Review `module.yml` diff: `requires:` entry present, `version:` unchanged at `1.0.0`, no hardcoded credentials
- [ ] Review `migrations/package.json`: `"type": "module"`, `pg` in deps, `typescript`/`@types/node`/`@types/pg` in devDeps
- [ ] Review `migrations/provision/postgres/000-init-scores.ts`: uses `PROVISION_*` env vars, all DDL guarded with `IF NOT EXISTS`
- [ ] Confirm `server.mjs`, `docker-compose.yml`, `Dockerfile` are untouched in this diff
- [ ] After merge + pipeline: verify `mesh_provisions` shows txt-game postgres provision on ace, and `txt_game_scores` DB contains `players` + `games` tables
- [ ] Confirm https://txt.zurag.be still serves the number-guessing game unchanged
Task: 3dab55e3-9792-47a0-a4a6-ba7757517314
Summary
module.yml: adds arequires:block for apostgresdatabaseprovision namedtxt_game_scores, with a fullenv_mapcovering host/port/user/password/database; matching empty env keys added so env-sync populates them after provisioningmigrations/package.json: ESM package withpgdep andtypescript/@types/node/@types/pgdevDepsmigrations/provision/postgres/000-init-scores.ts: createsplayersandgamestables with idempotentIF NOT EXISTSDDL, plus two supporting indexes (scoreboard sort, player history lookup)Server code,
docker-compose.yml, andDockerfileare unchanged — server integration is deferred to the follow-on child task.What happens after merge
cmd.module.provision→ hypothalamus createstxt_game_scoresDB on ace's postgres, writes credentials tomesh_provisions+module_env.env000-init-scores.ts, connects withPROVISION_*env, createsplayers+gamestablesTest plan
module.ymldiff:requires:entry present,version:unchanged at1.0.0, no hardcoded credentialsmigrations/package.json:"type": "module",pgin deps,typescript/@types/node/@types/pgin devDepsmigrations/provision/postgres/000-init-scores.ts: usesPROVISION_*env vars, all DDL guarded withIF NOT EXISTSserver.mjs,docker-compose.yml,Dockerfileare untouched in this diffmesh_provisionsshows txt-game postgres provision on ace, andtxt_game_scoresDB containsplayers+gamestablesTask: 3dab55e3-9792-47a0-a4a6-ba7757517314
4a6ae87ed3.