docs: sync from backend 2a56f98 — db audit batch 2

This commit is contained in:
Siavash Sameni
2026-06-06 20:05:53 +04:00
parent 942e8d60a5
commit df8eba1233
2 changed files with 14 additions and 0 deletions

View File

@@ -11,6 +11,16 @@ entries on top. Maintained by agents per the rule in `../AGENTS.md`.
--- ---
### 2026-06-06 — backend@2a56f98, frontend@7b52dcf — DB audit service query batching batch 2
**Commits:** `2a56f98` `7b52dcf`
**Touched:** backend `src/services/notification/NotificationService.ts`, `src/services/marketplace/SellerOfferService.ts`, `src/services/marketplace/RequestTemplateService.ts`, `src/db/repositories/drizzle/DrizzleDisputeRepo.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 addressing the 2026-06-06 DB audit: bulk notification UUID normalization N+1, accepted-offer rejected-seller notification loop, template batch conversion double-fetch, and repeated dispute status count scans.
**Verification:** backend `BASE_URL=http://127.0.0.1:5001 scripts/smoke/db-audit-service-regressions.sh`, `npm run typecheck`, `git diff --check`; frontend package bump diff check. 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@4aa6ccb, frontend@1b86a45 — Auth-store Postgres batching and transaction safety ### 2026-06-06 — backend@4aa6ccb, frontend@1b86a45 — Auth-store Postgres batching and transaction safety
**Commits:** `4aa6ccb` `1b86a45` **Commits:** `4aa6ccb` `1b86a45`

View File

@@ -20,6 +20,10 @@ updated: 2026-06-06
| Auth user hydration: `rowToUser` child lookups per row → batched token/passkey/referrer hydration per result set | `4aa6ccb` v2.9.14 | | Auth user hydration: `rowToUser` child lookups per row → batched token/passkey/referrer hydration per result set | `4aa6ccb` v2.9.14 |
| Auth user save: users/tokens/passkeys independent writes → single `BEGIN`/`COMMIT` transaction with rollback | `4aa6ccb` v2.9.14 | | Auth user save: users/tokens/passkeys independent writes → single `BEGIN`/`COMMIT` transaction with rollback | `4aa6ccb` v2.9.14 |
| Auth token/passkey save loops: one INSERT per child row → bulk token/passkey inserts inside the transaction | `4aa6ccb` v2.9.14 | | Auth token/passkey save loops: one INSERT per child row → bulk token/passkey inserts inside the transaction | `4aa6ccb` v2.9.14 |
| Bulk notification canonicalization: one UUID→legacy lookup per notification → one batched lookup per bulk call | `2a56f98` v2.9.15 |
| Offer acceptance loser notifications: sequential per-offer INSERTs → one `createNotificationsBulk` call | `2a56f98` v2.9.15 |
| Template batch conversion: first-seller templates fetched twice → first-pass template cache reused | `2a56f98` v2.9.15 |
| Dispute statistics: four repeated status count scans → one status `GROUP BY` query | `2a56f98` v2.9.15 |
--- ---