[Refactor] Согласовать SQLite driver приложения и SQL/durability checks #67

Closed
opened 2026-10-11 21:47:20 +03:00 by codex-bot · 1 comment
Owner

Problem

Prisma adapter 7.10 использует nested better-sqlite3@12.11.1, smoke/durability — direct13.0.3. Обе production версии остаются после omit-dev. Direct driver нужен; это не unused dependency или доказанная SQLite malfunction.

Expected Behavior

Приложение и SQL consumers используют один официально adapter-supported driver, либо documented proof обосновывает два поколения.

Evidence

Audit date 2026-10-11; 12, DEPS-003. Revision 0ad84ff4f0b4712abc7e69dc299856f14af6eadd; Confidence High; Verification status static (npm graph inspected), native-change runtime-unverified.
Affected: package.json:50–53, :144–148; lock:3762–3784,6284–6294; prisma.service.ts:16–21; test/container-smoke.cjs:34–64; bank-cards-durability.cjs:24,74–81.

Scope

In scope

Exact compatible direct version, normal lock resolution и install permissions/native proof.

Out of scope

Удаление direct SQL consumer, forced incompatible adapter override, storage/migration history rewrite.

Proposed Approach

12.11.1 — минимальный кандидат под adapter range. Если v13 API реально необходима, оставить до официальной поддержки adapter с evidence; не применять --force/legacy-peer-deps.

Acceptance Criteria

  • Normal resolved graph содержит один compatible driver либо explicit current reason KEEP двух; no forced override.
  • Native install policy согласована с фактическими hooks и целевыми OS/architecture.
  • SQLite transactions/integrity/FK, image migrations и historical replay/restore guarantees прежние.

Verification

Clean npm ci/ls/audit, backend verify/isolated e2e, actual image smoke и existing durability с disposable baseline. Manifest/lock/permissions rollback совместно; live DB не использовать.

Dependencies

Нет; compiler cleanup #4 независимо.

Traceability

Campaign WealthLedger/main#23 . Finding DEPS-003. WealthLedger/backend; T15.

<!-- wealthledger-audit:2026-10-11:sqlite-driver-alignment --> ## Problem Prisma adapter 7.10 использует nested better-sqlite3@12.11.1, smoke/durability — direct13.0.3. Обе production версии остаются после omit-dev. Direct driver нужен; это не unused dependency или доказанная SQLite malfunction. ## Expected Behavior Приложение и SQL consumers используют один официально adapter-supported driver, либо documented proof обосновывает два поколения. ## Evidence Audit date `2026-10-11`; [12](https://git.personal.ksv741.ru/WealthLedger/main/src/commit/d07fbfabb1295780952a554185989d2d5b5c8349/audits/2026-10-11/reports/12-dependencies-and-configuration-report.md), DEPS-003. Revision `0ad84ff4f0b4712abc7e69dc299856f14af6eadd`; Confidence High; Verification status static (npm graph inspected), native-change runtime-unverified. Affected: [package.json:50–53](https://git.personal.ksv741.ru/WealthLedger/backend/src/commit/0ad84ff4f0b4712abc7e69dc299856f14af6eadd/package.json#L50-L53), :144–148; lock:3762–3784,6284–6294; prisma.service.ts:16–21; test/container-smoke.cjs:34–64; bank-cards-durability.cjs:24,74–81. ## Scope ### In scope Exact compatible direct version, normal lock resolution и install permissions/native proof. ### Out of scope Удаление direct SQL consumer, forced incompatible adapter override, storage/migration history rewrite. ## Proposed Approach 12.11.1 — минимальный кандидат под adapter range. Если v13 API реально необходима, оставить до официальной поддержки adapter с evidence; не применять --force/legacy-peer-deps. ## Acceptance Criteria - [ ] Normal resolved graph содержит один compatible driver либо explicit current reason KEEP двух; no forced override. - [ ] Native install policy согласована с фактическими hooks и целевыми OS/architecture. - [ ] SQLite transactions/integrity/FK, image migrations и historical replay/restore guarantees прежние. ## Verification Clean npm ci/ls/audit, backend verify/isolated e2e, actual image smoke и existing durability с disposable baseline. Manifest/lock/permissions rollback совместно; live DB не использовать. ## Dependencies Нет; compiler cleanup #4 независимо. ## Traceability Campaign https://git.personal.ksv741.ru/WealthLedger/main/issues/23 . Finding DEPS-003. WealthLedger/backend; T15.
codex-bot added this to the Technical Audit Remediation — 2026-10-11 milestone 2026-10-11 21:47:20 +03:00
codex-bot added the Kind/Enhancement
Priority
Medium
3
audit/2026-10-11
labels 2026-10-11 21:47:20 +03:00
codex-bot was assigned by hermes-agent 2026-10-12 00:04:21 +03:00
hermes-agent added this to the WealthLedger — Delivery Board project 2026-10-12 00:04:21 +03:00
hermes-agent added Kind/Refactor and removed Kind/Enhancement labels 2026-10-12 00:04:22 +03:00
Author
Owner

Implemented and merged via #87 (203cc72).

Verified: clean npm ci, one resolved better-sqlite3@12.11.1 graph, SQLite FK smoke check, and npm run test:sqlite. Container/durability scripts remain parameterized checks requiring an image and historical baseline.

Implemented and merged via #87 (`203cc72`). Verified: clean `npm ci`, one resolved `better-sqlite3@12.11.1` graph, SQLite FK smoke check, and `npm run test:sqlite`. Container/durability scripts remain parameterized checks requiring an image and historical baseline.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: WealthLedger/backend#67