From bac1ae39865e99747a4c55174874c5ad4cb539f1 Mon Sep 17 00:00:00 2001 From: Siavash Sameni Date: Sat, 6 Jun 2026 20:26:15 +0400 Subject: [PATCH] =?UTF-8?q?docs:=20sync=20from=20backend=200835be9=20?= =?UTF-8?q?=E2=80=94=20db=20audit=20marketplace=20batching?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 09 - Audits/Activity Log.md | 10 ++++++++++ 09 - Audits/DB Query & Schema Audit - 2026-06-06.md | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/09 - Audits/Activity Log.md b/09 - Audits/Activity Log.md index 956fac6..d2cf5ed 100644 --- a/09 - Audits/Activity Log.md +++ b/09 - Audits/Activity Log.md @@ -11,6 +11,16 @@ entries on top. Maintained by agents per the rule in `../AGENTS.md`. --- +### 2026-06-06 — backend@0835be9, frontend@f05b056 — DB audit marketplace batching batch + +**Commits:** `0835be9` `f05b056` +**Touched:** backend `src/db/repositories/drizzle/DrizzleMarketplaceRepo.ts`, `src/services/marketplace/categoryStore.ts`, `src/services/payment/paymentCoordinator.ts`, focused Jest tests, `scripts/smoke/db-audit-service-regressions.sh`, version files; frontend `package.json`; docs `09 - Audits/DB Query & Schema Audit - 2026-06-06.md` +**Why:** Continue the 2026-06-06 DB audit: collapse `findAllPayments` buyer/seller N+1 into a joined read, batch template seller/category enrichment, bulk payment-coordinator rejected-seller notifications, and replace category-path ancestor walks with one recursive CTE. +**Verification:** backend `BASE_URL=http://127.0.0.1:5001 scripts/smoke/db-audit-service-regressions.sh` (9 suites / 25 tests), `npm run typecheck`, `git diff --check`; frontend `git diff --check` for package bump. Pushed to Forgejo; `origin` remained unavailable and was intentionally skipped. +**Linked docs updated:** [[09 - Audits/DB Query & Schema Audit - 2026-06-06]] + +--- + ### 2026-06-06 — backend@3ad3bbe, frontend@a78d2a9 — DB audit chat and notification bulk batch **Commits:** `3ad3bbe` `a78d2a9` diff --git a/09 - Audits/DB Query & Schema Audit - 2026-06-06.md b/09 - Audits/DB Query & Schema Audit - 2026-06-06.md index 19c8ec3..7f9f22b 100644 --- a/09 - Audits/DB Query & Schema Audit - 2026-06-06.md +++ b/09 - Audits/DB Query & Schema Audit - 2026-06-06.md @@ -28,6 +28,10 @@ updated: 2026-06-06 | Chat JSONB filters: missing `participants`/`unread_counts` GIN indexes → added schema indexes and migration `0020_chat_jsonb_indexes.sql` | `3ad3bbe` v2.9.16 | | Buyer purchase request list: per-request latest-payment lookup → one `DISTINCT ON (purchase_request_id)` payment query per page | `3ad3bbe` v2.9.16 | | Notification bulk mark/delete: serial per-id writes with no cap → set-based repo operations plus 100-id API cap | `3ad3bbe` v2.9.16 | +| Payments admin list: unbounded `findAllPayments` plus per-row buyer/seller lookups → single joined payment/user query | `0835be9` v2.9.17 | +| Seller template list: per-template seller/category lookups → batched seller/category page lookups | `0835be9` v2.9.17 | +| Payment coordinator rejected-seller notifications: per-seller notification loop → one `createNotificationsBulk` call | `0835be9` v2.9.17 | +| Category path lookup: one query per ancestor level → one recursive CTE returning root-to-leaf path | `0835be9` v2.9.17 | ---