docs: sync from backend c39b14a — M38 review UUID FKs, M40 decimal.js balances, M41 trezor concurrency

This commit is contained in:
Siavash Sameni
2026-06-07 07:35:34 +04:00
parent beec0c0a59
commit 0b78ad2e74
2 changed files with 13 additions and 3 deletions

View File

@@ -12,6 +12,16 @@ entries on top. Maintained by agents per the rule in `../AGENTS.md`.
---
### 2026-06-07 — backend@c39b14a — DB audit schema/precision batch M38/M40/M41
**Commits:** `c39b14a`
**Touched:** backend `src/services/marketplace/reviewStore.ts`, `src/db/repositories/drizzle/DrizzlePaymentRepo.ts`, `src/db/schema/trezorAccount.ts`, `package.json`; docs `09 - Audits/DB Query & Schema Audit - 2026-06-06.md`, `09 - Audits/Activity Log.md`
**Why:** Close Medium M38 by migrating review queries to UUID FK columns (`reviewer_user_id`) instead of legacy text columns; rebuild unique index on UUID. Close Medium M40 by computing `FundsLedgerBalance` derived fields with `decimal.js` instead of JS float64 to prevent rounding errors on 18-decimal crypto amounts. Close Medium M41 by documenting the concurrency requirement for `trezor_accounts.next_address_index` (SELECT...FOR UPDATE or sequence migration).
**Verification:** backend `npm run typecheck` (clean), `npm test -- --runTestsByPath __tests__/db-audit-critical-fks.test.ts __tests__/drizzle-marketplace-repo-batch.test.ts --runInBand` (2 suites / 8 tests passed). Pushed to Forgejo.
**Linked docs updated:** [[09 - Audits/DB Query & Schema Audit - 2026-06-06]]
---
### 2026-06-07 — backend@4766eba, frontend@fccccbc — DB audit H22/H23/H28/H37 dispute integrity closeout
**Commits:** `8fc2309` `f5e53cb` `4766eba` `fccccbc`