Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1.8 KiB
name, description, metadata
| name | description | metadata | ||||||
|---|---|---|---|---|---|---|---|---|
| feedback_wipe_durability_check_reseed | Sau prod data-wipe phải audit nguồn re-populate (DbInitializer seeder) — ungated per-code seed re-add data đã xóa mỗi restart = wipe không bền |
|
Khi xóa data prod (wipe phiếu/NCC/master), wipe chỉ là triệu chứng — nguồn re-populate (DbInitializer seeder) là gốc. Nếu seeder chạy ungated + idempotent per-code (existingCodes.Contains(x) ? skip : Add), thì sau khi xóa, các code giờ THIẾU → mỗi restart / IIS app-pool recycle seeder TỰ Add lại → wipe undo âm-thầm (vd tối nay recycle là demo NCC sống lại, user mở lên "sao xóa rồi vẫn còn").
Why: S91 go-live wipe 18 NCC demo → phát hiện SeedDemoMasterDataAsync ungated (ngoài if (!demoSeedDisabled)) per-code → resurrect mỗi restart. So sánh: user test (38) AN TOÀN vì S89 đã gỡ KHỎI MẢNG seed (đúng cách). Khác nhau = gated/in-array.
How to apply: TRƯỚC/SAU mọi prod data-delete → grep DbInitializer cho seeder của bảng vừa xóa → check (a) có gated sau cờ env (DemoSeed:Disabled) không, (b) idempotency là per-code (re-add cái thiếu) hay all-or-nothing (skip-nếu-có-bất-kỳ). Nếu ungated per-code → gate nó (mirror seed demo khác đã gated) HOẶC gỡ khỏi mảng, rồi deploy-verify bằng "tạo restart THẬT → count data-đã-xóa = 0" (KHÔNG chỉ "data sạch ngay sau wipe"). Verify-by-creating-the-condition mirror feedback_root_cause_over_symptom. Lưu ý prod-config từ .example template lúc deploy, KHÔNG file gitignored (gotcha #76) — gate-flag phải đúng nguồn config. gotcha #75.