[E01-S01-T05] ADR: Kysely containment #411

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

What changed

Commits the Kysely containment decision as ADR-006 for [E01-S01-T05] ADR: Kysely containment (Refs #192) — rebuilt against the reworked issue body (2026-08-31): the former pass was blocked because ADR-006 cited an "ADR index (section 70)" that does not exist in the repository.

  • docs/adr/ADR-006-kysely-contained-inside-db-adapter.md (new, the only file in the PR diff) — the ADR, with the six required sections in order:
    • Context — modular monolith (ADR-001) with PostgreSQL 18 as the sole canonical DB (ADR-005); Kysely is already isolated to packages/database-postgres (E00-S03-T02), enforced by tests/database-postgres-imports.test.mjs and the architecture fitness tests FIT-010/FIT-011; dependency direction database-postgres → core ports → Kysely/pg
    • Decision — EPPP keeps Kysely contained inside DB adapter: Kysely is an implementation detail of the adapter package, and no other workspace package may declare or import kysely/pg; the decision text is stated verbatim in the title and the Decision section
    • Alternatives — direct imports by domain/extension packages (rejected), dedicated shared query-layer package (rejected), full ORM (rejected), raw pg everywhere (rejected), adapter re-exporting Kysely (rejected)
    • Consequences — positive/negative/neutral trade-offs: single owner for the driver/query-builder stack, port API becomes mandatory, containment stays a package-level rule
    • Operational impact — kysely/pg in exactly one manifest and one package's source (CI-scanned), single-manifest upgrades under the workspace's dependency/upgrade lane, no runtime/schema/deployment impact
    • Revisit trigger — evidence-based boundary cost (architecture review gates), additional data stores/engines (shared with ADR-005), dependency-boundary enforcement change
  • Reviewer-finding resolution: the ADR no longer cites any repository-external ADR index — the References line, the Decision section and the Revisit trigger contain no "ADR index (section N)" reference, so every acceptance criterion is verifiable from the committed file alone. No in-repo ADR index file is added: that is explicitly out of scope for this card (parent story #63).
  • 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 that Kysely is contained inside the DB adapter (ADR-006) docs/adr/ADR-006-kysely-contained-inside-db-adapter.md committed on feature/192 (the only file in the PR diff, +118); the H1 heading reads # ADR-006: Kysely contained inside DB adapter and the Decision section records that EPPP keeps Kysely contained inside DB adapter. CI gate: the formatting-lint stage scans every git-tracked text file (including the 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): L9 Context, L40 Decision, L52 Alternatives, L76 Consequences, L94 Operational impact, L107 Revisit trigger — verifiable from the committed file alone
The ADR states the decision verbatim as "Kysely contained inside DB adapter" in its title and in the Decision section L1 # ADR-006: Kysely contained inside DB adapter and L42 "EPPP keeps Kysely contained inside DB adapter." — the verbatim decision text appears in both, verifiable from the committed file alone
The ADR does not cite any repository-external ADR index (in the body, the Decision section or the References section); other informative wiki cross-references are acceptable Grep over the committed file for ADR index / ADR-Index / section 70 / §70 → zero matches, verifiable from the committed file alone; the References line cites only in-repo ADRs (ADR-001, ADR-005) and informative wiki pages (Architecture wiki sections 1/4/9, Engineering-Standards wiki sections 24/25/57)

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.
  • Per the reworked issue body (2026-08-31): no in-repo ADR index file is committed — that belongs to parent story [E01-S01] (#63). The wiki ADR-Index §70 row ("ADR-006 | Kysely contained inside DB adapter") remains consistent with the decision text as an informational cross-check only.
  • Out of scope per the brief: the other thirteen E01-S01 ADR subjects are separate task cards.

Refs #192

## What changed Commits the Kysely containment decision as **ADR-006** for [E01-S01-T05] ADR: Kysely containment (Refs #192) — rebuilt against the reworked issue body (2026-08-31): the former pass was blocked because ADR-006 cited an "ADR index (section 70)" that does not exist in the repository. - **`docs/adr/ADR-006-kysely-contained-inside-db-adapter.md`** (new, the only file in the PR diff) — the ADR, with the six required sections in order: - **Context** — modular monolith (ADR-001) with PostgreSQL 18 as the sole canonical DB (ADR-005); Kysely is already isolated to `packages/database-postgres` (E00-S03-T02), enforced by `tests/database-postgres-imports.test.mjs` and the architecture fitness tests FIT-010/FIT-011; dependency direction `database-postgres → core ports → Kysely/pg` - **Decision** — EPPP keeps **Kysely contained inside DB adapter**: Kysely is an implementation detail of the adapter package, and no other workspace package may declare or import `kysely`/`pg`; the decision text is stated verbatim in the title and the Decision section - **Alternatives** — direct imports by domain/extension packages (rejected), dedicated shared query-layer package (rejected), full ORM (rejected), raw `pg` everywhere (rejected), adapter re-exporting Kysely (rejected) - **Consequences** — positive/negative/neutral trade-offs: single owner for the driver/query-builder stack, port API becomes mandatory, containment stays a package-level rule - **Operational impact** — `kysely`/`pg` in exactly one manifest and one package's source (CI-scanned), single-manifest upgrades under the workspace's dependency/upgrade lane, no runtime/schema/deployment impact - **Revisit trigger** — evidence-based boundary cost (architecture review gates), additional data stores/engines (shared with ADR-005), dependency-boundary enforcement change - Reviewer-finding resolution: the ADR no longer cites any repository-external ADR index — the References line, the Decision section and the Revisit trigger contain no "ADR index (section N)" reference, so every acceptance criterion is verifiable from the committed file alone. No in-repo ADR index file is added: that is explicitly out of scope for this card (parent story #63). - 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 that Kysely is contained inside the DB adapter (ADR-006) | `docs/adr/ADR-006-kysely-contained-inside-db-adapter.md` committed on `feature/192` (the only file in the PR diff, +118); the H1 heading reads `# ADR-006: Kysely contained inside DB adapter` and the Decision section records that EPPP keeps **Kysely contained inside DB adapter**. CI gate: the `formatting-lint` stage scans every git-tracked text file (including the 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): L9 Context, L40 Decision, L52 Alternatives, L76 Consequences, L94 Operational impact, L107 Revisit trigger — verifiable from the committed file alone | | The ADR states the decision verbatim as "Kysely contained inside DB adapter" in its title and in the Decision section | L1 `# ADR-006: Kysely contained inside DB adapter` and L42 "EPPP keeps **Kysely contained inside DB adapter**." — the verbatim decision text appears in both, verifiable from the committed file alone | | The ADR does not cite any repository-external ADR index (in the body, the Decision section or the References section); other informative wiki cross-references are acceptable | Grep over the committed file for `ADR index` / `ADR-Index` / `section 70` / `§70` → zero matches, verifiable from the committed file alone; the References line cites only in-repo ADRs (ADR-001, ADR-005) and informative wiki pages (Architecture wiki sections 1/4/9, Engineering-Standards wiki sections 24/25/57) | ## 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. - Per the reworked issue body (2026-08-31): no in-repo ADR index file is committed — that belongs to parent story [E01-S01] (#63). The wiki ADR-Index §70 row ("ADR-006 | Kysely contained inside DB adapter") remains consistent with the decision text as an informational cross-check only. - Out of scope per the brief: the other thirteen E01-S01 ADR subjects are separate task cards. Refs #192
bot-implementer added 1 commit 2026-08-31 00:55:55 +00:00
docs(adr): record Kysely containment decision as ADR-006
CI / Stage 1 — Frozen lockfile install (E00-S05-T01) (pull_request) Successful in 44s
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 1m34s
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 5 — Architecture tests (E00-S05-T01) (pull_request) Successful in 3m8s
CI / Stage 3 — Formatting/lint policy (E00-S05-T01) (pull_request) Successful in 45s
693976c289
bot-implementer force-pushed feature/192 from e04e99b54c to 693976c289 2026-08-31 00:55:55 +00:00 Compare
kpcto merged commit 2d5c77e21d into main 2026-08-31 01:12:00 +00:00
kpcto deleted branch feature/192 2026-08-31 01:12:01 +00:00
Sign in to join this conversation.