[CLAUDE] Docs: S96 session-end closeout — UAT PE fixes + monthly audit + memory flush
- STATUS/HANDOFF: prepend S96 mega-line (5 commit: monthly-audit881783c+ NCCba4b8e0+ 3 PE fix e657faa/36cbf8b/0c2f9f6) · Tests 434->440 · gotcha 76->77 · bundle COYAX-yQ/0MU-kb4N · prod 21 NCC · In-Progress S95->S96 - gotchas: +#77 SPA deploy bundle cache-lag (verify byte-level cache!=deploy; incognito golden) - session log 2026-07-01-S96-uat-pe-fixes-monthly-audit.md - user-memory (ngoài repo): +2 feedback (verify-deployed-artifact-byte-level · agent-return-garble-recover) - agent-memory: cicd-monitor S-tag drift S97/S98->S96 reconcile (11x; facts correct) · investigator-codebase Supplier-audit diary Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -1298,6 +1298,18 @@ for h in resp.points: # ← .points không phải iterable trực tiếp
|
||||
|
||||
**Fix/Quy tắc:** đổi prod config = sửa `.example` (tracked) HOẶC `appsettings.json`, KHÔNG file local gitignored. `.example` KHÔNG có `DemoSeed` → prod fallback `appsettings.json DemoSeed:Disabled=true` (đúng fallback đã giữ Contracts/PE gated nhiều tháng → gate #75 hiệu-lực ở prod).
|
||||
|
||||
### 77. SPA deploy bundle cache-lag — user thấy UI CŨ dù đã deploy (index.html cache / tab-SPA-mở) (Session 96)
|
||||
|
||||
**Triệu chứng:** Deploy FE xong (bundle rotate verified prod), nhưng user (anh Chương UAT) VẪN thấy UI CŨ dù Ctrl+F5 + logout/login — checkbox opt-out mới không hiện, vẫn "✅ Cấp này KẾT THÚC" static cũ. Team "bó tay rồi".
|
||||
|
||||
**Cơ chế:** Vite đặt hash trong TÊN file (`index-<hash>.js`, `Cache-Control: immutable max-age=1năm` = ĐÚNG). `index.html` = `Cache-Control: no-cache` (ĐÚNG chuẩn — revalidate ETag mỗi load). Nhưng: (a) tab SPA đang-mở chạy JS cũ trong RAM (cần reload thật, không chỉ F5-nửa-vời); (b) browser đôi khi giữ `index.html` cached bất-chấp no-cache → trỏ file JS CŨ (tên hash cũ). KHÔNG có service-worker (fe-user grep `serviceWorker|workbox|VitePWA` = 0) → không phải SW-cache.
|
||||
|
||||
**Chẩn-đoán (phân-biệt cache-vs-deploy — QUAN TRỌNG, đừng đoán):** **verify bundle prod BYTE-LEVEL**: `JS=$(curl -s $BASE/ | grep -oE '/assets/index-[A-Za-z0-9_-]+\.js')` → `curl -s "$BASE$JS" | grep -ao "<string-fix-mới>"` + `grep "<string-cũ>"`. Fix-string PRESENT + old-string GONE = deploy OK → **100% client-cache** (KHÔNG phải deploy-fail). S96: prod `0MU-kb4N` chứa "BỎ tick"/"Đã BỎ tick", "bạn duyệt xong" cũ MẤT → xác nhận cache.
|
||||
|
||||
**Fix (client):** **incognito window (Ctrl+Shift+N) = golden-test** (không dùng cache, chắc-chắn bundle mới → nếu incognito OK = 100% cache). Hoặc F12→Application→Clear site data→reload. **Đừng chỉ Ctrl+F5** (đôi khi không xóa index.html cached). **Server ĐÃ đúng chuẩn** (index.html no-cache + JS hash-immutable) — KHÔNG cần fix infra.
|
||||
|
||||
**Quy tắc:** UAT báo "fix chưa ăn" sau deploy → verify bundle prod byte-level TRƯỚC khi nghi deploy-fail; **incognito = phép-thử vàng** tách cache khỏi bug. Liên-quan #69 (bundle non-determ) · `feedback_verify_deployed_artifact_byte_level`.
|
||||
|
||||
**An toàn prod:** chỉ XEM/scroll/screenshot — KHÔNG bấm nút mutate (Gửi duyệt/Duyệt/Trả lại/Tạo HĐ). Mở `+ Thêm mới` (form `?mode=new`) KHÔNG tạo draft cho tới khi sửa field (auto-save on-edit).
|
||||
|
||||
**References:** `$env:TEMP\guideshots\capture.ps1` (session-scratch) · `docs/Huong-dan-Duyet-NCC.docx`. Pattern reusable → user-memory `pattern_prod_screenshot_to_docx`.
|
||||
|
||||
Reference in New Issue
Block a user