[E01-S01-T04] ADR: PostgreSQL #408

Merged
kpcto merged 1 commits from feature/191 into main 2026-08-31 00:34:01 +00:00
Member

What changed

Commits the PostgreSQL decision as ADR-005 for [E01-S01-T04] ADR: PostgreSQL (#191):

  • docs/adr/ADR-005-postgresql-18-sole-canonical-db.md (new) — the ADR, with the six required sections in order:
    • Context — greenfield single-stream platform, no v1 requirement for distributed transactions/independent data stores; the choice is already operationalised (compose.yaml pins postgres:18.6-bookworm, packages/database-postgres is the single pg/Kysely owner, advisory-lock migration runner, extension-owned chains)
    • Decision — EPPP uses PostgreSQL 18 as the sole canonical database: one instance, all core data, extension tables in independent chains in the same instance, driver imports isolated to the adapter package; decision text matches the ADR index entry (§70)
    • Alternatives — SQLite (rejected), MySQL/MariaDB (rejected), MongoDB/document store (rejected), polyglot persistence (rejected), cloud-managed DB (rejected for v1), older major/unpinned minor (rejected)
    • Consequences — positive/negative/neutral trade-offs, including the single consistency boundary and the adapter encapsulation
    • Operational impact — pinned db service with pg_isready health gate and db-data volume, env-only credentials, one core chain + extension chains behind the advisory lock, backup/upgrade policy per Technology-Stack §6
    • Revisit trigger — evidence-based data-model divergence (§68 gates), multi-product/multi-team growth, golden-tuple/support-window change (PostgreSQL 18 EOL 2030-11-14)
  • Documentation-only: no source, manifest, lockfile, workflow or test changes. Rollback is a revert of this commit.

Criterion → test table

Acceptance criterion Test / evidence
A committed ADR records PostgreSQL 18 as the sole canonical database (ADR-005) docs/adr/ADR-005-postgresql-18-sole-canonical-db.md committed on feature/191; the H1 heading reads # ADR-005: PostgreSQL 18 sole canonical DB and the Decision section records the PostgreSQL 18 sole-canonical-database choice. CI gate: the formatting-lint stage scans every git-tracked text file (including the new ADR) — verified locally with the committed policy suite: node --test tests/formatting-policy.test.mjs → 13/13 pass on the branch
The ADR contains Context, Decision, Alternatives, Consequences, Operational impact and Revisit trigger All six ## sections present, in the mandated order, in the committed file (document review per the issue test plan); locally verified against the committed file content
The decision text matches the ADR index entry in section 70 ADR index (§70) lists | ADR-005 | PostgreSQL 18 sole canonical DB |; the ADR's decision text is PostgreSQL 18 sole canonical DB and the Decision section states it matches the ADR index entry (ADR-005, section 70)

Risks / notes

  • Documentation-only change (one new markdown file); no runtime, schema, dependency, lockfile or CI-workflow impact. Rollback = revert the single commit.
  • CI on this PR runs the full seven-stage pipeline; the only stage touching this change is formatting-lint (tracked-file policy), which passes locally; all other stages are unaffected but will run as usual.
  • Out of scope per the brief: the other thirteen E01-S01 ADR subjects are separate task cards.

Closes #191

## What changed Commits the PostgreSQL decision as **ADR-005** for [E01-S01-T04] ADR: PostgreSQL (#191): - **`docs/adr/ADR-005-postgresql-18-sole-canonical-db.md`** (new) — the ADR, with the six required sections in order: - **Context** — greenfield single-stream platform, no v1 requirement for distributed transactions/independent data stores; the choice is already operationalised (`compose.yaml` pins `postgres:18.6-bookworm`, `packages/database-postgres` is the single `pg`/Kysely owner, advisory-lock migration runner, extension-owned chains) - **Decision** — EPPP uses **PostgreSQL 18 as the sole canonical database**: one instance, all core data, extension tables in independent chains in the same instance, driver imports isolated to the adapter package; decision text matches the ADR index entry (§70) - **Alternatives** — SQLite (rejected), MySQL/MariaDB (rejected), MongoDB/document store (rejected), polyglot persistence (rejected), cloud-managed DB (rejected for v1), older major/unpinned minor (rejected) - **Consequences** — positive/negative/neutral trade-offs, including the single consistency boundary and the adapter encapsulation - **Operational impact** — pinned `db` service with `pg_isready` health gate and `db-data` volume, env-only credentials, one core chain + extension chains behind the advisory lock, backup/upgrade policy per Technology-Stack §6 - **Revisit trigger** — evidence-based data-model divergence (§68 gates), multi-product/multi-team growth, golden-tuple/support-window change (PostgreSQL 18 EOL 2030-11-14) - Documentation-only: no source, manifest, lockfile, workflow or test changes. Rollback is a revert of this commit. ## Criterion → test table | Acceptance criterion | Test / evidence | | --- | --- | | A committed ADR records PostgreSQL 18 as the sole canonical database (ADR-005) | `docs/adr/ADR-005-postgresql-18-sole-canonical-db.md` committed on `feature/191`; the H1 heading reads `# ADR-005: PostgreSQL 18 sole canonical DB` and the Decision section records the PostgreSQL 18 sole-canonical-database choice. CI gate: the `formatting-lint` stage scans every git-tracked text file (including the new ADR) — verified locally with the committed policy suite: `node --test tests/formatting-policy.test.mjs` → 13/13 pass on the branch | | The ADR contains Context, Decision, Alternatives, Consequences, Operational impact and Revisit trigger | All six `##` sections present, in the mandated order, in the committed file (document review per the issue test plan); locally verified against the committed file content | | The decision text matches the ADR index entry in section 70 | ADR index (§70) lists `\| ADR-005 \| PostgreSQL 18 sole canonical DB \|`; the ADR's decision text is **PostgreSQL 18 sole canonical DB** and the Decision section states it matches the ADR index entry (ADR-005, section 70) | ## Risks / notes - Documentation-only change (one new markdown file); no runtime, schema, dependency, lockfile or CI-workflow impact. Rollback = revert the single commit. - CI on this PR runs the full seven-stage pipeline; the only stage touching this change is `formatting-lint` (tracked-file policy), which passes locally; all other stages are unaffected but will run as usual. - Out of scope per the brief: the other thirteen E01-S01 ADR subjects are separate task cards. Closes #191
bot-implementer added 1 commit 2026-08-31 00:27:54 +00:00
docs(adr): record PostgreSQL 18 sole canonical DB decision as ADR-005
CI / Stage 6 — PostgreSQL integration tests (E00-S05-T01) (pull_request) Successful in 1m9s
CI / Stage 4 — Unit tests (E00-S05-T01) (pull_request) Successful in 1m42s
CI / Stage 5 — Architecture tests (E00-S05-T01) (pull_request) Successful in 3m13s
CI / Stage 7 — Build the admin and server applications (E00-S05-T01) (pull_request) Successful in 1m2s
CI / Stage 2 — Typecheck (E00-S05-T01) (pull_request) Successful in 1m9s
CI / Stage 3 — Formatting/lint policy (E00-S05-T01) (pull_request) Successful in 46s
CI / Stage 1 — Frozen lockfile install (E00-S05-T01) (pull_request) Successful in 53s
dbd42d394d
bot-implementer force-pushed feature/191 from ec702d6eaf to dbd42d394d 2026-08-31 00:27:54 +00:00 Compare
kpcto merged commit 768f009ee9 into main 2026-08-31 00:34:01 +00:00
kpcto deleted branch feature/191 2026-08-31 00:34:02 +00:00
Sign in to join this conversation.