docs: sync from backend 5752f13 — Low-priority DB audit batch L1–L10
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
---
|
||||
|
||||
title: Activity Log
|
||||
tags: [audit, log, append-only]
|
||||
created: 2026-05-28
|
||||
@@ -11,8 +12,17 @@ entries on top. Maintained by agents per the rule in `../AGENTS.md`.
|
||||
|
||||
---
|
||||
|
||||
### 2026-06-07 — backend@b743b5e, frontend@f1e5f3a — DB audit C7 dispute relation FKs
|
||||
### 2026-06-07 — backend@5752f13 — DB audit Low-priority batch (L1–L10)
|
||||
|
||||
**Commits:** `5752f13`
|
||||
**Touched:** backend `src/services/payment/amnScanner/amnScannerPayInService.ts`, `src/db/repositories/drizzle/DrizzlePaymentRepo.ts`, `src/db/repositories/drizzle/DrizzleMarketplaceRepo.ts`, `src/db/repositories/drizzle/DrizzlePointsRepo.ts`, `src/db/schema/idMap.ts`, `src/db/schema/trezorAccount.ts`, `src/db/schema/sellerOffer.ts`, `src/db/schema/users.ts`, `src/db/migrations/0019_stormy_meltdown.sql`, `package.json`, `package-lock.json`; docs `09 - Audits/DB Query & Schema Audit - 2026-06-06.md`, `09 - Audits/Activity Log.md`
|
||||
**Why:** Close the remaining 9 Low-priority findings from the DB Query & Schema Audit in a single batch: consolidate AMN scanner updates (L1), deduplicate getStats aggregate (L2), cap unbounded offer lookups (L3), add missing schema indexes (L5, L6), align seller offer numeric precision with project convention (L7), extract walletAddress for indexed payment matching (L8), remove dead query variable (L9), clamp leaderboard limit (L10). Also includes prior uncommitted audit work (chat SQL pushdown, auth batch hydration, review/level parallelization). Migration `0019_stormy_meltdown.sql` covers the new columns and indexes.
|
||||
**Verification:** backend `npm run typecheck` (clean), `npm test -- --runTestsByPath __tests__/drizzle-payment-repo-export.test.ts __tests__/drizzle-user-repo.test.ts __tests__/drizzle-marketplace-repo-batch.test.ts __tests__/seller-offer-service.test.ts __tests__/db-audit-high-indexes.test.ts --runInBand` (5 suites / 16 tests passed). Push to origin failed due to remote network reset; commit is ready locally.
|
||||
**Linked docs updated:** [[09 - Audits/DB Query & Schema Audit - 2026-06-06]]
|
||||
|
||||
---
|
||||
|
||||
### 2026-06-07 — backend@b743b5e, frontend@f1e5f3a — DB audit C7 dispute relation FKs
|
||||
**Commits:** `b743b5e` `f1e5f3a`
|
||||
**Touched:** backend `src/db/schema/dispute.ts`, `src/db/migrations/0024_disputes_uuid_fks.sql`, `src/db/repositories/drizzle/DrizzleDisputeRepo.ts`, `__tests__/db-audit-critical-fks.test.ts`, `package.json`, `package-lock.json`; frontend `Dockerfile`, `package.json`; docs `09 - Audits/DB Query & Schema Audit - 2026-06-06.md`, `09 - Audits/Activity Log.md`
|
||||
**Why:** Close Critical C7 from the DB Query & Schema Audit by converting dispute purchase-request/user relationship columns from loose text IDs to UUID FKs while keeping legacy Mongo ObjectId callers working through repo-level resolution and legacy display mapping.
|
||||
|
||||
Reference in New Issue
Block a user