Skip to content

Phase 24: persist residual in-memory stores — cen/freezone/mojaloop/temporal-query - #72

Merged
munisp merged 1 commit into
mainfrom
phase24/residual-map-stores
Oct 2, 2026
Merged

munisp merged 1 commit into
mainfrom
phase24/residual-map-stores

Conversation

@munisp

@munisp munisp commented Oct 2, 2026

Copy link
Copy Markdown
Owner

Phase 24 — residual in-memory business stores → PostgreSQL (pgx/v5, fail-closed)

Service Before After Migration
cen-service alertStore map cen_alerts table 0077 (new, no inserts)
freezone-service zoneStore/goodsStore maps free_zones + freezone_goods (transactional capacity) 0078 (new, no inserts)
mojaloop-gateway payments map only writer of existing mojaloop_payments; write-through snapshots of full PaymentRecord lifecycle 0079 (additive)
temporal-query-service workflowStore + fabricated init() seed (deleted) reads real temporal_workflow_runs projection 0080 (additive)
  • Fail-closed everywhere: no DATABASE_URL → fatal; no memory fallback.
  • All HTTP routes and JSON response shapes unchanged.
  • mojaloop-gateway: quoteAwaiters/transferAwaiters stay in-memory (documented MEDIUM — callback waiters, not business data).
  • freezone goods: new freezone_goods chosen over reusing free_zone_operations (that table models approval ops, not inventory/duty/transfer state).
  • temporal-query-service: adds the missing go.mod/go.sum (Dockerfile already expected them).
  • pgx v5.9.2; go mod tidy + go build ./... from a clean module cache pass for all four services.
  • phase24-schema-blocks.md (repo root, temporary) contains the pgTable blocks for lead to merge into schema.ts; journal idx 77–80 appended.

…emporal-query

- cen-service: alertStore map -> cen_alerts (0077), fail-closed pgx/v5
- freezone-service: zoneStore/goodsStore maps -> free_zones + freezone_goods (0078), transactional capacity handling
- mojaloop-gateway: becomes writer of existing mojaloop_payments (0079 additive columns); write-through persistence of the full PaymentRecord lifecycle; quote/transfer awaiters documented in-memory (MEDIUM)
- temporal-query-service: deleted fabricated init() seed (demo workflows); reads real temporal_workflow_runs projection via pgx (0080 additive); fail-closed; adds missing go.mod/go.sum
- journal entries idx 77-80; schema blocks in phase24-schema-blocks.md (temporary, for lead merge)
- all four services: go mod tidy + go build ./... from clean module cache, pgx v5.9.2
@munisp
munisp merged commit 72227b2 into main Oct 2, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant