- Session log MOI 2026-06-11-S59-wipe-tree-pmh-uat-batch.md (wipe testing data + tree 4 tang + 71 ma PMH + 6 vong UAT realtime, bundle FINAL B1DtNT9C/D6uF3Mln Run #282). - STATUS/HANDOFF flush S59 (header + table + In Progress + Recently Done + bundle line). - gotchas.md +2: #61 sqlcmd -f 65001 (console mojibake vs data-hong-that) + #62 rename natural-key DB-truoc-code-sau (seed per-code idempotent). CLAUDE.md root cite 62. - Agent-memory 5 file: cicd x9 run entries + UTC-annotate #275 + bundle status-line final, inv-codebase recon S59 + curate S51->archive, H1 x2 + H2 x2 closeout entries. - H2 GATE PASS 5/5 (0 miss, 0 on-behalf can append) + H1 ALL-4-FRESH (cross-count verified: gotcha 62 x3 nguon, bundle 4-source). RAG: 2 chunk S59 stored, rerank 0.875. - Chore monthly 07-01: curate cicd L1 ~56KB + inv 32.9KB + STATUS/HANDOFF re-tier (uu tien).
316 lines
45 KiB
Markdown
316 lines
45 KiB
Markdown
# HANDOFF — Brief 5 phút cho session tiếp theo
|
||
|
||
> **Tiering rule (S40):** giữ **2-3 session gần nhất**. Cũ hơn → `docs/changelog/sessions/`. Full brief history pre-S40 → `docs/_archive/HANDOFF-preS40-fullhistory.md`.
|
||
|
||
**Last updated:** 2026-06-11 tối (Session 59 — **6 đợt ship prod-verified Run #273→#278**: wipe transactional testing data (10 PE + 7 HĐ demo + 64 notif = 0, mã reset → phiếu thật đầu tiên team tạo = **PE/2026/A/001** ✓) `56882ac` #273 · PE tree Panel 1 chốt 4 tầng **Năm > Dự án > Hạng mục > Phiếu** `0eafcd3` #274 · dọn 15 mã hạng mục demo "tự đẻ" (chị Trà Sol) + gỡ seed gốc, WorkItems 86→**71** `bbd1554` #275 · **rename 71 mã đúng format PMH anh Kiệt** (`MAT-n`/`SUB-n`/`MEP-SUB-n`/`MEP-EQU-n` + tên "STT nhóm tên"; **DB-trước-code-sau** gotcha #62 + sqlcmd `-f 65001` gotcha #61) `c869d26` #276 · UAT vòng 1: NEW `ui/SearchableSelect` gõ-lọc bỏ dấu (Hạng mục/Dự án) + auto Địa điểm + điều khoản đa dòng `faed59f` #277 · UAT vòng 2 (anh chốt ×2): ẩn Trả lại/Từ chối khi tự duyệt phiếu mình soạn + quick-add NCC ngay form (POST /suppliers any-auth, authz probe 4/4) + NCC gõ-tìm A-Z + upload multi-file `9c330d2` #278 · UAT vòng 3-6 realtime (#279/#281 cancelled-supersede-benign): bảng NCC table-fixed `f21c55d` + bỏ ô Tên ngân sách `69997da` #280 + GỠ field Điều khoản TT mọi form `80b64dd` + bỏ nút Thêm hạng mục `792c030` **#282 FINAL**. Tổng 10 đợt (8 PASS + 2 cancelled-benign). Bundle FINAL admin **`B1DtNT9C`**/user **`D6uF3Mln`**. Test 240. Gotchas 62. 0/14 spawn truncated. → session log `2026-06-11-S59-wipe-tree-pmh-uat-batch.md`. Prev S58 — **5 đợt prod-verified Run #382/#383/#384/#386** (#385 cancelled-supersede-benign): lock-demo-user fix (việc sếp deadline 15:00 ĐÓNG TRỌN — gotcha #60/E-008/AS-12, root cause password 11<12 từng phát hiện S22 nhưng const không fix) + tạm ẩn HRM/Office/Cá nhân + Danh mục cuối (`6c5fd26` #383) + **fe-user redesign theo UI/UX guide AI_INFRA giữ brand** (`e959f72` #384) + **brand polish ×2 app "thấy rõ"** (`ea793a4`: stripe 4px đỉnh + thead brand) + **PE gộp Tên-gói-thầu = chọn Hạng-mục** (anh Kiệt FDC chốt, `3ebaf84` #386 — bundle final admin `DMm9rtNA`/user `BUkOMn_Y`). Email AI_INFRA processed (guide + ACK H4 ACCEPT). Test **240**. → session log `2026-06-11-S58-lock-fix-hide-modules-redesign-pe-merge.md`. Root cause 2 tầng: lock-list = population Dev-only + `DemoUserPassword` 11 ký tự < prod RequiredLength=12 → CreateAsync silent-fail từ trước tới giờ (= "helpdesk inert" S56). Fix union 20 UAT email + password 12 ký tự → prod 55 user/34 locked, nv.cao+nv.truong sống, 5 real staff tạo. gotcha #59+#60. Commit `5998163`. Prev S57bis — **PE gắn Hạng mục (Mig 49) + Pe all-role + menu Cá nhân + Harness-4 runtime-VERIFIED**. Test 228→**240**. Bundle `CP4CB1ym`/`BmZ3VHnm`. Commit `17b23a4`+`dd117b7` → Run #381 PASS+1PARTIAL (lock NO-OP → RESOLVED S58). Prev S56 — **Pre-golive verify sweep + golive-harden 4 fix — Run #379 PASS, code golive-ready**. WF1 `pre-golive-verify` 7-stream + adversarial → 6 PASS/1 CONCERN/0 blocker = GO (key finds = ops not code). WF2 `golive-harden` fix 4: #3 LeaveBalance lost-update→atomic ExecuteUpdate+Serializable tx (NO mig) · #5 ItTicket authz Forbidden-trước-NotFound · #6 DocxRenderer null-guard · #4 Travel/Vehicle ApproveV2 tests. Test 216→**228**. Bundle FROZEN `4SUwDLD8`/`XdKzt9LL`. `sys.tables` re-ground 92→**93**. gotcha **#58** NEW. reviewer StructuredOutput-fail→em main đỡ. **2 ops VPS pending** (gán user IT + tzutil UTC+7). FE Phase 2 redesign **deferred** (recon ready). Commit `a20cde8`. Prev S55 — **Nạp master data thật từ Excel (62 dự án + 71 hạng mục + 3 NCC) + Project +4 cột (Mig 48) — prod-verified**. HMW-mode ON. Commit `69cb393` → Run #377 PASS ~4m33s. Test 216 (compile-fix only). Bundle admin `B-d6893W`/user `XdKzt9LL`. `SeedRealMasterDataAsync` ungated idempotent → coexist demo. 2 agent return truncated (BE+reviewer) → em main disk/runtime-recover. Prev S54 — IT staff tự reassign ticket (cross-stack authz) — prod-verified. 1 code commit `ca4b602` → Run #376 PASS ~4m18s. Test 203→**216**. Bundle admin `DfCfHUE9`→`DmjI8Cmn`/user `_3S0BPJ2`→`YxL_MljK` (cả 2 rotate). NO migration. Task 1 Phase 9 Ops anh dừng. ⚠️ residual: 3 agent ghi MEMORY nhầm `src/Backend/.claude` → em main reconcile. Prev S53: gotcha #57 EXT Master Mig 47 + P11-D/E + database-agent verified-runtime.)
|
||
|
||
---
|
||
|
||
## S59 (2026-06-11 chiều→tối) — Wipe testing + tree 4 tầng + 71 mã PMH + UAT 6 vòng (10 commit prod-verified #273→#282)
|
||
|
||
**Anh: forward Zalo anh Kiệt (xóa testing + tree theo hạng mục) → chốt tree "Năm chứa Dự án chứa Hạng mục" → forward chị Trà Sol (dọn mã tự chế, "không đẻ thêm mã công ty khác") → anh Kiệt chốt format mã ("MEP-SUB-1 — 1 MEP Sub MEP (Full), đúng kiểu vậy") → 6 vòng screenshot UAT realtime (11 điểm — 4 vòng cuối chen giữa session-end: table-fixed bảng NCC, bỏ Tên ngân sách, GỠ Điều khoản TT mọi form, bỏ nút Thêm hạng mục) → "Chốt làm đi nhé" (session-end).**
|
||
|
||
**Done (10 commit — 8 Run PASS + 2 cancelled-supersede-benign, đều prod-verify):** xem STATUS S59 entry / session log chi tiết. Điểm phải nhớ cho session sau:
|
||
- **Prod baseline SẠCH cho testing thật:** PE/HĐ/Notif từ 0, mã từ `…/001`, WorkItems = ĐÚNG 71 mã PMH format mới (`MAT-1` — "1 Mat Bê tông"…), 7 workflow ghim, master 70 dự án/22 NCC nguyên. Phiếu UAT thật của team ĐÃ tồn tại (PE/2026/A/001+) — **KHÔNG wipe nữa khi chưa hỏi**.
|
||
- **Quy trình rename natural-key (gotcha #62):** UPDATE DB prod+Dev TRƯỚC → push seed mới SAU (per-code idempotent, sai thứ tự = nhân đôi). **sqlcmd file tiếng Việt (gotcha #61):** `-f 65001` + verify qua API JSON, đừng tin console VPS.
|
||
- **SearchableSelect** (`components/ui/SearchableSelect.tsx` ×2 app) = combobox chuẩn mới cho dropdown lớn — fold bỏ dấu, tái dùng cho dropdown users/khác khi cần.
|
||
- **Suppliers authz asymmetric S59:** POST = any-auth (quick-add) · PUT/DELETE = Admin+CatalogManager (giữ S57) — probe live 4/4 OK. WorkItems/Catalogs write vẫn khóa nguyên.
|
||
|
||
**🔴 NEXT SESSION (anh pick):**
|
||
- **Ops của anh (giữ từ S58):** ① `tzutil /g` VPS confirm `SE Asia Standard Time` · ② email anh Chương → dọn typo `chuong.phan@solution.com.vn` · ③ báo 5 real staff password `User@1234567` + đổi · ④ gán người thật CNTT → lock nv.cao/nv.truong.
|
||
- **🟪 test-after guard:** `LockDemoSampleUsersAsync` (S58) + suppliers asymmetric authz (S59) — IdentityFixture sẵn.
|
||
- **PE polish sâu** (PeDetailTabs 111KB session riêng) · **PermissionGuard per-route** khi golive HRM/Office · **Phase 9 Ops** (SMTP/backup/creds/UAT).
|
||
- **Monthly audit 2026-07-01:** **STATUS/HANDOFF re-tier (defer ×2 — ƯU TIÊN)** · curate L1 cicd-monitor ~46KB + investigator-codebase 32.9KB · schema-diagram §16+ ERD Mig 32-49.
|
||
- **Cert** `api.solutions.com.vn` expire ~2026-07-23 (auto-renew ~06-23).
|
||
|
||
---
|
||
|
||
## S58 chiều (2026-06-11) — Ẩn modules + Danh mục cuối (Run #383) + fe-user redesign guide AI_INFRA (Run #384)
|
||
|
||
**Anh (sau lock fix): screenshot eoffice "tạm ẩn các tính năng này + thu hồi phân quyền User" + "Danh mục đưa xuống cuối" → "check email AI_INFRA" → "chỉnh giao diện giống vậy, giữ brand màu SOLUTION".**
|
||
|
||
**Done (2 commit `6c5fd26` Run #383 + `e959f72` Run #384, đều prod-verified):**
|
||
- **Ẩn + thu hồi:** `RevokeTemporarilyHiddenModulesAsync` (4 cờ false non-Admin trên `Hrm*`/`Off*`/`Personal`, giữ row) + grant scope thu hẹp + `Master` Order 20→**80**. Menu-tree đối chứng 2 chiều ✓ (nv.test mất 3 nhóm / admin còn). eoffice user thường còn: Hộp thư · PE · Danh mục (cuối). ⚠️ URL trực tiếp chưa chặn (không PermissionGuard per-route — OK cho "tạm ẩn"; golive flip: gỡ prefix revoke + thêm lại `InReviewScope`).
|
||
- **Email AI_INFRA processed:** UI/UX guide canonical 13 mục (`D:\Dropbox\CONG_VIEC\AI_INFRA\docs\reference\ui-ux-design-guide.md`) + FYI stamp-hash lesson + **ACK H4 ACCEPT** (SE sister đầu tiên trọn vòng H4.7).
|
||
- **fe-user redesign:** 🩷 designer 14 file (mirror fe-admin S55 + rubric guide) — density-first, **BRAND GIỮ** #1F7DC1 + Be Vietnam Pro + slate. Keys/props STABLE. Bundle user `CKjwqnGL` rotate / admin frozen / brand verified prod HTML+CSS. ⚠️ Designer truncated #53 lần 2 cùng điểm (trước FD2 screenshot) → em main recover + self-gate; **authed-pages visual gate cuối = anh mở eoffice xem mắt**.
|
||
|
||
**🔴 NEXT bổ sung:** anh login eoffice xem giao diện mới (visual gate) · khi golive HRM/Office → flip revoke + cân nhắc PermissionGuard per-route · gửi email-back AI_INFRA nếu có pattern hay từ fe-user redesign (2-way welcome, guide §F4).
|
||
|
||
---
|
||
|
||
## S58 (2026-06-11) — Fix lock-demo-user prod NO-OP + password-seed root-cause (1 code commit prod-verified Run #382)
|
||
|
||
**Anh: `/session-start` → bootstrap bắt Run #381 PARTIAL + 2 dirty S57bis → recon → anh chốt 3 quyết định (union+password-fix · giữ chuong.phan-typo · giữ nv.test) → ship 13:00, prod-verified 13:05 (deadline 15:00 dư ~2h).**
|
||
|
||
**Done (commit `5998163` → Run #382 PASS ~3m31s):**
|
||
- **Fix `DbInitializer.cs` 2 chỗ:** lock list union 20 email UAT-matrix prod thật (`{act,equ,fin,hra,pm,qs}.{nv,pp,tp}@` + `bod.{1,2}@` — tạo TAY 05-13, exact-email KHÔNG pattern) + `DemoUserPassword` `User@123456`→`User@1234567` (11→12 ký tự, thỏa prod `RequiredLength=12` — root cause CreateAsync silent-fail mọi user seed trên prod từ trước, luôn cả nv.cao/nv.truong IT pool + 5 real staff).
|
||
- **🟩 cicd Run #382:** prod Users **55/21 active/34 locked** ✓ · nv.cao+nv.truong CREATED+ACTIVE (**ops S56 "gán user IT" RESOLVED** — helpdesk round-robin sống) · 5 real staff created+active · guard 6/6 (admin/catalog.manager/nv.test/chuong.phan-typo/binh.le/binh.lethanh) · nv.test login+authed 200 · bundle FROZEN `CP4CB1ym`/`BmZ3VHnm` · Mig giữ 49 · 93 tables · custom Identity table = `Users` (không phải `AspNetUsers`).
|
||
- **Closeout S57bis residual:** commit 2 dirty (gotcha #59 + cicd Run #381 entry) · gotcha **#60** NEW · 4 spawn-record on-behalf (H2 Coverage 4-MISS đóng) · H1 5-patch (ef-core +Mig 49 row · skills/README · dep-audit · CLAUDE.md root) · STATUS/HANDOFF flush S57bis+S58 · menu keys re-ground **57** · RAG 2420.
|
||
|
||
**🔴 NEXT SESSION (anh pick):**
|
||
- **Ops của anh:** (1) `ssh vietreport-vps "tzutil /g"` → confirm `SE Asia Standard Time` · (2) hỏi anh Chương dùng email nào → dọn `chuong.phan@solution.com.vn` typo (đang active chủ đích) · (3) báo 5 real staff mới (`thanh.lethanh`, `anh.nguyen`, `tring.le`, `truong.le`, `long.nguyen`) password mặc định `User@1234567` + yêu cầu đổi · (4) khi gán người thật vào CNTT → thêm nv.cao/nv.truong vào lock list.
|
||
- **test-specialist guard test** cho `LockDemoSampleUsersAsync` (test-after — deadline trade-off S58, IdentityFixture sẵn).
|
||
- **FE redesign Phase 2** (recon ready) · **Phase 9 Ops** (SMTP/backup/creds/UAT) · **monthly audit 2026-07-01** (kèm schema-diagram §16+ Mig 32-49 ERD debt + L1 cap curate cicd-monitor 32.2KB/investigator-codebase 32.1KB + STATUS/HANDOFF re-tier).
|
||
- **Cert** `api.solutions.com.vn` expire ~2026-07-23 (auto-renew ~06-23).
|
||
|
||
---
|
||
|
||
## S57bis (2026-06-11 sáng) — PE gắn Hạng mục công việc (Mig 49) + Pe all-role + menu "Cá nhân" + Harness-4 runtime-VERIFIED (Run #381 PASS+1PARTIAL)
|
||
|
||
**Sếp Zalo 11:02-11:17 deadline 15:00: mapping master data + phân quyền PE all-user + flow tạo phiếu Dự án→Hạng mục→NCC + clear data cũ. Anh chốt: khóa CHỈ user sample · quyền Xem+Tạo · 1 phiếu 1 hạng mục header. 2 commit `17b23a4` (Harness-4) + `dd117b7` (product 26 file) → Run #381 PASS ~4m25s.**
|
||
|
||
**Done:**
|
||
- **Mig 49 `AddWorkItemToPurchaseEvaluation`** (🔵 database-agent design): PE.WorkItemId `Guid?` loose-Guid KHÔNG FK vật lý (convention PE) + IX + validator NotEmpty create-only + FK-guard `AnyAsync(IsActive)`→Conflict + UpdateDraft null-safe (chống null-hóa S42). WorkItems = catalog GLOBAL → 2 dropdown độc lập, "Dự án (năm) – Hạng mục" = chuỗi ghép. FE ×2 (PeHeaderForm SHA256 IDENTICAL). **Pe_* all-role 130 rows/13 role** (Pe_* leaf KHÔNG trong `MenuKeys.All` → factory; PeWf_* GIỮ Admin). Menu Personal root@30 + re-parent + Master write-lock ×3 controller. Excel (3) = NO-CHANGE vs S55. Test 228→**240** (+12). **Harness-4 runtime-VERIFIED** (spawn-test 2 chiều) + email-back AI_INFRA.
|
||
- ⚠️ **Lessons:** 2 builder truncated #53 + reviewer **die-0-byte ×2** → em main solo vá + self-gate. Đóng VỘI → 2 file dirty trôi S58 (đã commit S58). `LockDemoSampleUsersAsync` 14 email = prod NO-OP (population Dev-only — cicd #381 bắt, → **RESOLVED S58**). → session log `2026-06-11-S57bis-pe-workitem-perm-golive-prep.md`.
|
||
|
||
---
|
||
|
||
## S56 (2026-06-09) — Pre-golive verify sweep + golive-harden 4 fix (HMW 2-workflow · 1 code commit prod-verified)
|
||
|
||
**Anh: `/session-start` → hỏi NAMGROUP UI density-first → "Tiếp Phase 2 redesign" (dismiss scope → defer) → "kiểm tra lại tính năng + master data, sắp golive" + `/ultra-on` → "fix hết workflow luôn" → `/session-end`.**
|
||
|
||
**Done (commit `a20cde8` → Run #379 PASS ~4m20s, prod-verified):**
|
||
- **WF1 `pre-golive-verify`** (7 stream song song → adversarial-per-issue): prod-truth/schema/4×logic/authz-curl. **6/7 PASS · 1 CONCERN · 0 blocker · 8 issue (confirm 6 real)** = **GO**. Insight: phát hiện đáng giá nhất = **ops/data không phải bug code** — prod phòng IT (CNTT) 0 active user → helpdesk inert (chỉ live-curl+sqlcmd thấy) + S43 LeaveBalance lost-update còn nguyên + master-data idempotency PROVEN.
|
||
- **WF2 `golive-harden`** (Design→Build→Test→Review∥): **#3** LeaveBalance lost-update → database-agent design **atomic `ExecuteUpdateAsync`+Serializable tx** (NO migration, exactly-once nguyên) · **#5** ItTicket authz Forbidden-trước-NotFound (fail-closed) · **#6** DocxRenderer null-guard (CS8602 2→0) · **#4** Travel/Vehicle ApproveV2 +4 smoke. Test **216→228**.
|
||
- **🟥 reviewer stage StructuredOutput-FAIL** → em main đỡ cross-stack review (3 diff clean). **🔵 database-agent PASS** + 1 MAJOR (convention) → em main bump `IsolationLevel.Serializable`. **🟩 cicd Run #379 PASS** (228 test · bundle frozen BE-only · Mig 48 · health 200).
|
||
- **Closeout:** gotcha **#58** NEW (EF read-modify-write lost-update) · doc-drift patched (agents/README database-agent verified-runtime · ef-core skill 47→48 · sys.tables 92→93 reconciled · docs/CLAUDE 93/Mig48) · **H2 GATE 4.5/5** (Fidelity: Serializable-correction appended impl/test MEMORY).
|
||
|
||
**🔴 NEXT SESSION (anh pick):**
|
||
- **2 ops VPS — của anh (CHƯA làm):** (1) gán ≥1 user thật vào phòng IT (`UPDATE Users SET DepartmentId='65CC6307-BF3A-4F42-9B83-18FE187F46BB' WHERE Email='<email>@solutions.com.vn'`) — helpdesk inert vì 0 active user · (2) `ssh vietreport-vps "tzutil /g"` → confirm `SE Asia Standard Time` (codegen mã đơn dùng năm giờ-server).
|
||
- **FE redesign Phase 2 (DEFERRED — recon READY):** build `ui/Drawer.tsx` (chưa có) + tách `InlineEditRow` (mẫu `EmployeesListPage:256`) → áp Drawer (Suppliers/Projects/Users ≥8 field) + bậc-thang (Catalogs/MeetingRooms/HrmConfigs Dialog→inline) cho Master/Office/System/HRM. **Scope chờ anh chốt:** Budget (2 trang) + 3 WF-Designer = IN hay OUT (default em đề xuất **OUT**). fe-user mirror = Phase 3. NAMGROUP density-first, giữ brand #1F7DC1 + Be Vietnam Pro. Authed-page visual qua deploy-prod (dev-rig chặn authed screenshot, designer gotcha #3).
|
||
- **Phase 9 Ops** (go-live blockers): SMTP outbound (em code-able greenfield `IEmailSender`) · SQL backup register · rotate creds · UAT.
|
||
- **L1 soft-cap chore (H2):** cicd-monitor 29.2KB + investigator-codebase 28.4KB + reviewer 28KB ≈ 30KB cap → archive L2 next curate.
|
||
- **Monthly audit 2026-07-01:** root CLAUDE.md count-sweep còn (test "203"→228, "92 bảng"→93 ×several, gotcha "57"→58, ASCII tree "128") — defer deliberate (monthly mechanism).
|
||
- **Cert** `api.solutions.com.vn` expire ~2026-07-23 (auto-renew ~06-23).
|
||
|
||
---
|
||
|
||
## S55 (2026-06-09) — Nạp master data thật từ Excel + Project +4 cột (Mig 48 · HMW-mode ON · 1 commit prod-verified)
|
||
|
||
**Anh: `/session-start` → giao file Excel "HẠNG MỤC CÔNG VIỆC DỰ ÁN" → "nạp master data vào đi nhé" → `/ultra-on "workflow làm xong hết đi nhé"`.**
|
||
|
||
**Done (commit `69cb393` → Run #377 PASS ~4m33s, prod-verified):**
|
||
- **Nạp 62 dự án + 71 hạng mục + 3 NCC** vào `Project`/`WorkItem`/`Supplier` (real company data từ Excel 7-sheet). `WorkItem` master ĐÃ tồn tại → no new table.
|
||
- **🟨 BE:** Project +4 cột nullable (Year/Investor/Location/Package) + **Mig 48 `AddProjectMasterFields`** (3-file, no new table) + ProjectFeatures DTO/Create/Update +4 + **`SeedRealMasterDataAsync`** (per-code idempotent, **UNGATED** line 118 → reaches prod, coexist demo).
|
||
- **🟧 FE:** ProjectsPage form +4 input ×2 app SHA256 mirror + bonus cột "Chủ đầu tư".
|
||
- **Verify:** build 0 · test 216 (compile-fix only) · runtime Dev proof · cicd Run #377 (Mig 48 prod · Projects 6/6 · WorkItems 71 · Suppliers 3 · CAL01.Investor exact · bundle `B-d6893W`/`XdKzt9LL` rotate · health 200).
|
||
- **Decisions:** Q1 cột thật+migration · Q2 deploy prod. FLOCK01 collision → skip (demo wins).
|
||
- ⚠️ **Lessons:** 2 agent return truncated (implementer-backend + reviewer, gotcha #53) → em main recover qua disk/runtime (build/test/sqlcmd/git), KHÔNG agent return-message. cicd **verdict-FIRST brief → KHÔNG truncate** (PASS clean) — reinforces emit-verdict-early. Real-data import: extract Excel → generated spec file (chống brief-truncation) → runtime Dev proof TRƯỚC prod.
|
||
|
||
**🔴 NEXT SESSION (anh pick):**
|
||
- **Phase 9 Ops** (go-live blockers — anh main coordinate): SMTP outbound (em code-able greenfield `IEmailSender`) · SQL backup register (`scripts/backup-sql.ps1` READY → schtasks) · rotate creds · UAT real-user.
|
||
- **Doc-drift D1** (H1-flagged, anh dừng S55): `agents/README.md:4` database-agent "🔴 Cần CLI restart → executed-file" → "✅ verified-runtime S53" (1 dòng).
|
||
- **Monthly drift audit 2026-07-01** (cron) — investigator-codebase ground-truth + H1 chốt; re-ground cicd `sys.tables=93` vs 92.
|
||
- **Optional:** master data — nếu cần thêm field Project (StartDate/EndDate/Budget cho dự án thật) hoặc full NCC list (hiện 3 mẫu) · sửa tên demo FLOCK01 nếu chồng real.
|
||
- **Cert** `api.solutions.com.vn` expire ~2026-07-23 (auto-renew ~06-23).
|
||
|
||
## S54 (2026-06-08) — IT staff tự reassign ticket (cross-stack authz · HMW-mode ON · 1 commit prod-verified)
|
||
|
||
**Anh: `/session-start` → "2 xong sau đó là 1" (task 2 reassign trước, task 1 Phase 9 Ops sau) → task 2 done → "/session-end". Task 1 anh dừng (không khởi động).**
|
||
|
||
**Done (commit `ca4b602` → Run #376 PASS ~4m18s, prod-verified):**
|
||
- **Feature:** cho **tổ IT (dept Code=="IT") + Admin** reassign ItTicket trên CẢ 2 app (S53 chỉ Admin/fe-admin). "IT staff" = `User.DepartmentId == IT-dept.Id`. NO migration (DepartmentId reuse).
|
||
- **🟨 BE:** NEW `GetAssignableItStaffQuery`→`{CanReassign,Staff}` capability endpoint (`[Authorize]` any-auth, `{false,[]}` cho người ngoài) + `AssignItTicketHandler` authz Admin-OR-IT (Forbidden) + assignee-must-IT (Conflict) + controller `/assign` hạ Authorize-Roles→Authorize (handler fine-grained).
|
||
- **🟧 FE:** fe-admin+fe-user `ItTicketsPage.tsx` **SHA256-identical** (reverse S53 divergence) — nút gate `canReassign`, dropdown `/assignable-staff`. +2 type.
|
||
- **🟪 Test:** +13 (203→**216**) authz guard test-before-merge. **🟥 reviewer PASS** (role-string "Admin" chain-verified real). **🟩 cicd Run #376** bundle cả 2 rotate, smoke OK, Mig giữ 47.
|
||
- ⚠️ **Residual:** 3 agent ghi MEMORY nhầm `src/Backend/.claude/` (cwd-relative khi cd subdir) → em main bắt qua git-status + reconcile canonical + harvest delta. → memory `feedback_agent_cwd_relative_memory_misland`.
|
||
|
||
**🔴 NEXT SESSION (anh pick):**
|
||
- **Task 1 Phase 9 Ops** (đã scope sẵn — anh dừng S54): **SMTP email outbound** (em code-able — greenfield `IEmailSender`+`SmtpEmailSender` config-driven appsettings `Smtp` section + wire `NotificationService` gửi email cạnh in-app notif tới `User.Email`, no-op an toàn khi chưa creds; built-in `System.Net.Mail.SmtpClient` đủ, không cần MailKit NuGet trừ khi anh muốn; **cần anh quyết: notif nào → email + có SMTP provider/creds chưa**) · **SQL backup register** (`scripts/backup-sql.ps1` READY → em đưa lệnh schtasks daily-2AM retention-30d, anh chạy VPS) · rotate creds + UAT real-user (anh-infra).
|
||
- **Monthly drift audit 2026-07-01** (cron) — flag S54: cicd `sys.tables=93` vs STATUS 92 re-ground.
|
||
- **Cert** `api.solutions.com.vn` expire ~2026-07-23 (auto-renew ~06-23).
|
||
|
||
## S53 (2026-06-08) — gotcha #57 EXT Master (Mig 47) + P11-D reassign-UI + P11-E menu-key + database-agent verified-runtime (HMW-mode ON · "làm hết" full closeout · all prod-verified)
|
||
|
||
**User: `/session-start` → "Workflow làm nhanh" (Task B) → "làm hết luôn đi" (C+D+E+session-end). 2 code commit + docs closeout, all Gitea-verified prod.**
|
||
|
||
**Done:**
|
||
- **Bootstrap (3 governance agents):** database-agent **verified-runtime** spawn-test (first real spawn since S52 adopt — CLI restart confirmed; caught **Mig 46 committed-but-unapplied-local** drift) · H1 tooling-auditor + H2 harvest-curator re-report (S52 closeout debt cleared; H2 0-orphan, S52 proxy-append verified present).
|
||
- **Task B — Mig 47 `FilterMasterCatalogUniqueIndexesByIsDeleted`** (`44b9e54`, Run #260): gotcha #57 EXT to 3 Master (Department/Supplier/Project) filtered-unique Code. Workflow test-specialist→implementer-backend→reviewer (PASS). Test 200→203. Prod: 3 indexes `filter_definition` NULL→`([IsDeleted]=(0))` live. **gotcha #57 EXT backlog CLOSED (6× cumulative: Holiday 43 + 3 HRM 45 + 3 Master 47).** Bonus: Mig 46 local catch-up (Dev+Design).
|
||
- **Task C+D** (`dbf6648`, Run #261): C = ItTicket admin reassign-UI (fe-admin only divergence; per-card dialog reuse `PUT /assign` + `GET /users`). D = `Off_AttendanceReport` menu-key leaf (no migration, DbInitializer idempotent seed, admin-perm auto via `All[]`, 5 mirror points byte-identical). Workflow implementer-backend→implementer-frontend→reviewer (PASS). Prod: menu row seeded + admin bundle `DfCfHUE9` rotated / user unchanged.
|
||
- **Doc-drift E + closeout:** H1 top-5 patched (ef-core 43→47, roster 10→11, CLAUDE.md root 45→47/186→203, docs/CLAUDE.md 56→57/91→92) · database-agent adap-report→verified-runtime · STATUS/HANDOFF/session log.
|
||
|
||
**⚠️ Lessons:** cicd-monitor truncated 2× (gotcha #53/#55) → curl-self-verify recovery (Gitea run + bundle hashes public, no re-spawn). database-agent first spawn earned ROI immediately (caught local-DB drift that SQLite-tests + CI-prod both miss). Menu-key = 5 mirror points (gotcha #50) — reviewer byte-verified all 5.
|
||
|
||
**🔴 NEXT SESSION (anh pick):**
|
||
- **Phase 9 Ops** (go-live blockers — anh main coordinate): SMTP outbound · rotate creds · SQL auto-backup register · UAT 2-3 real user 1 tuần.
|
||
- **Monthly drift audit 2026-07-01** (cron) — investigator-codebase ground-truth + H1 chốt.
|
||
- **Optional minor:** mirror ItTicket reassign to fe-user (nếu employee cần) · RAG re-index S42-S53 (AI_INFRA op, stale 05-29).
|
||
- **Cert** `api.solutions.com.vn` expire ~2026-07-23 (auto-renew ~06-23).
|
||
|
||
---
|
||
|
||
## S52 (2026-06-08) — Phase 11 D+E+F close + database-agent adopt (HMW-mode ON · session-limit recovery · deployed prod)
|
||
|
||
**User: `/session-start` → "Cả 3 (D+E+F)" → pivot "Adopt database-agent" → để em chạy. 3 commit deployed prod.**
|
||
|
||
**Done (3 commit, deploy verified curl độc lập — no cicd-spawn do limit):**
|
||
- **database-agent adopt** (`e9ee97f`) — AI_INFRA broadcast `2026-06-08-Agent-database-codebase-agents`. Floor DB1–DB11 **READ-advisory** (impl-backend vẫn author) · skill `sql-database-assistant`+`ef-core-migration` · color OMIT · `store_memory` strip · DB11 vá S43 lost-update. **codebase-agent SKIP n-a** (investigator + csharp-lsp Windows no-op). Roster 10→**11**. **Nấc executed-file → CHỜ restart.**
|
||
- **Wave 1 (`6a66429`) P11-E+F migration-free:** P11-F MaTicket gen-on-Create (`IT/2026/NNN` Serializable). P11-E AttendanceReport monthly aggregate (OtPolicy multiplier, day-type in-memory) + Excel ClosedXML + fe-admin report page (download authed blob). reviewer PASS (gotcha #44 disarmed: decoy `"QTV"`=display-code). +5 test.
|
||
- **Wave 2 (`dcf76f8`) P11-D Mig 46:** round-robin least-loaded dept-"IT" (seed dept IT + nv.cao/nv.truong, ordering sau SeedDemoUsers) + SlaDueAt-by-Priority (4/8/24/72h) + `ItTicketSlaJob` (breach+warning, **no auto-transition**) + PUT /assign + FE badge 2-app SHA256 mirror. +9 test. em main self-review (limit).
|
||
- **Deploy verified:** admin `DYfjnpY0`/user `_3S0BPJ2` rotate · api 200 (Mig 46 applied) · /it-tickets+/assign+/attendances/report 401 wired. **Test 200 PASS** (58+142).
|
||
|
||
**⚠️ Session-limit recovery lesson:** 3 agent killed mid-Wave-2 (FE/test/cicd, "resets 1:10pm"). Recovery: BE/test verify-on-disk (build 0-err + 200 test) · **em main solo FE redo** (gotcha #53-class fallback) · **curl-self-verify** deploy thay cicd-spawn. → **git/disk/prod = source-of-truth, KHÔNG agent return-message** (`feedback_implementer_truncation_mitigation`).
|
||
|
||
**🔴 NEXT SESSION:**
|
||
- **🔴 RESTART CLI** → activate `database-agent` (registry load, no hot-reload) → spawn-test 1 task DB nhỏ (đọc schema `sys.tables` / introspect ItTicket) → upgrade executed-file → **verified-runtime**. adap-report nấc update.
|
||
- **Memory-proxy debt:** Wave 2 `implementer-backend` + `test-specialist` diaries KHÔNG update (killed trước MEMORY step) → em main proxy-append S52 learnings (round-robin dept-pool · SLA-window-shared-map · seed-ordering-sau-SeedDemoUsers · round-robin/SLA-due test pattern). **Đã proxy S52 closeout** (xem agent-memory).
|
||
- **H1/H2 monitor closeout SKIPPED S52** (session-limit) → next `/session-start` re-report tooling/harvest diff.
|
||
- **Follow-up minor:** ItTicket reassign-UI (endpoint `/assign` sẵn) · P11-E menu-key promote (hiện via button) · **gotcha #57 EXT Master = Mig 47** (Mig 46 đã dùng P11-D) · RAG re-index S42-S52 (AI_INFRA op, stale 05-29).
|
||
- **Product:** Phase 11 = DONE. Next = Phase 9 Ops (SMTP/creds/backup/UAT real-user) — anh main coordinate.
|
||
|
||
---
|
||
|
||
## S51 (2026-06-08) — P11-C Vehicle+Driver catalogs + gotcha #57 ext (HMW-mode ON · product feature · deployed prod)
|
||
|
||
**User: `/session-start` → "P11-C Vehicle+Driver" → "làm đi / chạy luôn cho nhanh". HMW fan-out, ship to prod.**
|
||
|
||
**Done (commit `30a99aa` → Gitea Run #371 PASS ~4m18s, verified prod):**
|
||
- **Mig 44 `AddVehicleAndDriverCatalogs`** — extend HrmConfigs +2 declarative kind (Vehicle/Driver), 2 catalog table filtered-unique day-1. BE Region 5/6 CRUD + Controller +2 route (GET public/write Admin) + MenuKeys +All (auto perm) + DbInitializer idempotent seed. FE KIND_CONFIG +2 ×2 app SHA256 mirror + 4-place (`:kind`-driven, no new route). Tables 91→**92** (sys.tables ground-truth — narrative "93" was +1 drift).
|
||
- **Mig 45 `FilterHrmCatalogUniqueIndexesByIsDeleted`** (bundled gotcha #57) — LeaveType+ShiftPattern+**OtPolicy** filtered (3 HRM catalog; OtPolicy missed in "2 catalog" backlog, caught via grep). +5 test-before (181→**186** RED→GREEN).
|
||
- **reviewer caught 1 MAJOR** → fixed: Driver FE↔BE required-field mismatch (root = inconsistent em-main brief BE-required vs FE-optional).
|
||
- **cicd Run #371:** bundle admin `Cg9mvltU`/user `YgqDvsqr`, 5 idx filtered `([IsDeleted]=(0))` live, smoke 200, /hrm-configs/{vehicles,drivers} wired.
|
||
|
||
**🔴 NEXT SESSION:**
|
||
- **gotcha #57 EXT (worktree session đang chạy):** Department/Supplier/Project (Master) → Mig 46 (3 idx, confirmed-reachable). Merge khi xong — nó tạo Mig 46; main KHÔNG tạo migration nào nữa → no conflict, chỉ cần sequence đúng.
|
||
- **RAG/Qdrant DOWN:** restart `rag-infra.ps1 -Action ensure` (AI_INFRA repo) → verify `list_projects`. RAG re-index S42-S51 stale (AI_INFRA op).
|
||
- **AI_INFRA-side carry-over:** `/check-email se` pull S50 handshake.
|
||
- **🔌 NEW-ALLOC `database-agent`** (AI_INFRA broadcast `2026-06-08-Agent-database-codebase-agents`) — H1 + em main recommend **`/adap-apply`** (STRONG-FIT: DB11 RowVersion fixes S43 lost-update gap; template `AI_INFRA/docs/templates/database-agent.agent.template.md`). 5 caveats: 9th color · EF-pin guard (sql-database-assistant ≠ cover EF Core → pair `ef-core-migration`) · DB7 boundary vs implementer-backend (DB=design/perf/review, impl=author) · executed-file nâc only (runtime PENDING restart+spawn-test) · model:inherit + store_memory-strip. **codebase-agent = SKIP** (investigator covers + csharp-lsp Windows no-op). Needs CLI restart → next session.
|
||
- **Product (anh pick):** P11-D ItTicket SLA / P11-E AttendanceReport+OtPolicy multiplier / P11-F MaTicket / Phase 9 Ops.
|
||
- **Doc-drift backlog → monthly audit 2026-07-01 (H1 exact coords):** `docs/CLAUDE.md:65` (56→57) + `:70` (91→92 + "Mig 27-42"→"32-45") · `.claude/skills/README.md:20` (ef-core 43→45, S45→S51) · `agents/README.md:157` (plugin "18 enabled"→"18 registered/15 enabled/3 disabled") + `:223` S38-snapshot · **schema-diagram §16+ Mig 32-45 = 14-mig debt (dedicated session)** · cicd-monitor MEMORY essentials label S51-work as "S50" (cosmetic) · STATUS/HANDOFF over-tiering re-tier.
|
||
|
||
---
|
||
|
||
## S50 (2026-06-07) — S49 Harness 1·2·3 verified-runtime closeout (HMW-mode ON · infra-finish, no product, CI-skip)
|
||
|
||
**User: `/session-start` → chọn "Finish S49 infra" → `/session-end`. Đóng trọn 3 phần S49 milestone (verified-runtime).**
|
||
|
||
**Done (em main + 4 sub spawn — all background per visibility feedback):**
|
||
- **(a)** `/session-start` spawned 2 monitor sub (tooling-auditor H1 + harvest-curator H2) → **verified-runtime CONFIRMED**. H1 caught + em main patched 3 freshness drifts (plugin 15→18, skill-index 31→43 mig / 49→57 gotcha, verified-runtime markers). H2 harvest 🟢 clean (0-byte/orphan=0). Test **181 PASS**, RAG 2415.
|
||
- **(b)** H2 **wave-mode VERIFIED** — Workflow `hmw.js` wave-run `h2-verify` (Run `wf_b7e4d6ef-787`, 2-agent: investigator-codebase read-only + test-specialist write-direct). **B6 isolation HELD** (git status 6-baseline, sub-MD gitignored, chunk 2415=2415, B4 both-paths). Bonus: gotcha #57 exact coords.
|
||
- **(c)** H3 **email send-path VERIFIED** — `/send-email ai_infra` handshake (body-hash `c9656c19…` self-verified MATCH) → `broadcasts/outbox/ai_infra/` + `_index.md` OUTBOUND.
|
||
- **session-end §L:** H2 GATE **PASS 5/5** + B5 wave-gom (2 sub-MD → agent-memory). H1 freshness CHỐT (0 new-alloc). §L.a scan: no new RCA (E-005 git-add guard held — staged specific files).
|
||
|
||
**🔴 NEXT SESSION:**
|
||
- **AI_INFRA-side (their step):** `/check-email se` → pull SE handshake → confirm **2-way byte-identical**; optional reply `/send-email se` so SE tests receive-path (`ai_infra/outbox/se/` currently empty).
|
||
- **Product (anh pick):** P11-C Vehicle+Driver (Mig 44, recon ready) · **gotcha #57** (coords ready: `LeaveTypeConfiguration.cs:19` + `ShiftPatternConfiguration.cs:19`, template `HrmConfigHolidayTests.cs:180-197`, test-before) · P11-D/E/F · Phase 9 Ops.
|
||
- **Cleanup (optional):** wave-folder `.claude/workflows/wave-h2-verify/` harvested → safe to delete (gitignored transient).
|
||
- **Doc backlog (low):** STATUS Recently Done + HANDOFF over tiering (re-tier next consolidation) · `agents/README.md:13` ASCII 7→10 lanes (cosmetic).
|
||
|
||
---
|
||
|
||
## S49 (2026-06-07) — AI_INFRA Harness 1·2·3 adopt (HMW-mode ON · governance/infra, no product code)
|
||
|
||
**User: `/ultra-on` + `/adap-apply harness 1·2·3` — BẬT HMW-mode rồi adopt 3 broadcast harness của AI_INFRA.**
|
||
|
||
**HMW flow:** marker `.claude/hmw-mode.on` tạo (ON) → P2 recon fan-out **4 read-only agent** (3× investigator-codebase gap H1/H2/H3 + 1× investigator-api plugin audit · return-delta · 367K tok ~4m46s) → P3 harvest → em main single-writer WRITE ~25 file → reviewer P4 **PASS all 3**. **Containment post-P2:** git-diff 1 file-write (inv-api self-MEMORY benign) + chunk-count 2414=2414 (0 RAG-write) = defense-in-depth proven.
|
||
|
||
**Done:**
|
||
- **H1 (Self-observability):** roster **8→10** — NEW 2 sub TÁCH BIỆT (anh-mandate H1≠H2 "hay quên+nhầm") `tooling-auditor` (tooling/docs-freshness 4-mặt) + `harvest-curator` (harvest-integrity 5-trục), INFORM-only (4 RAG-read, NO store_memory/Write) + 2 memory seed. Wire `session-start.md` Phase 2.1.1 RE-REPORT + `session-end.md` §L.b 6→7-step. H3 plugin/skill = gộp-vai doc (0 agent mới).
|
||
- **H2 (wave-folder isolation):** `hmw.js` wave-mode (subMdPath + tool-aware writeGuard) + `.gitignore` `wave-*/`+`agent-teams/` (B6 **git-check-ignore VERIFIED**) + NEW `.claude/workflows/README.md`. ADD-mode (chỉ workflow DÀI). A agent-team n-a (Windows in-process).
|
||
- **H3 (email channel):** NEW `broadcasts/` (outbox/{6 others+all} + inbox/{6 others} + _index + inbox/README + **13 .gitkeep**, committed) + 2 cmd send/check-email (self=`se`, 6 others short-id `{ai_infra,vipix,dyd,namgroup,ashico,bvaau}`) + adap-apply base-path fix `outbox/all/`.
|
||
- **3 adap-report** `docs/governance/adap-reports/2026-06-07-Agent-harness-{1,2,3}.md` + reviewer PASS (no blocker; 1 MINOR pre-existing README diagram → fixed). **Test 181 unchanged** (no .cs).
|
||
|
||
**🔴 S49 NEXT-FIRST — status S50:** restart done. (a) ✅ **DONE S50** — `/session-start` spawned 2 monitor sub, both loaded + ran RE-REPORT clean → verified-runtime CONFIRMED (H1 found 3 freshness drifts → patched; H2 harvest 🟢 clean, 0-byte/orphan none); (b) ✅ **DONE S50** — wave-run `h2-verify` (Run wf_b7e4d6ef-787, 2-agent): B6 isolation HELD (git status 6-baseline, sub-MDs gitignored, chunk 2415 unchanged), B4 both-paths exercised (write-direct + read-only-scribe); B5 harvest → harvest-curator @session-end; (c) ✅ **SE-side DONE S50** — `/send-email ai_infra` handshake written + body-hash self-verified (`c9656c19…`); **AI_INFRA `/check-email se` pull = their step** to complete 2-way byte-identical proof.
|
||
|
||
**Next product (anh pick):** P11-C Vehicle+Driver (Mig 44, recon ready) · gotcha #57 LeaveType/Shift filtered-unique · P11-D/E/F · Phase 9 Ops.
|
||
|
||
---
|
||
|
||
## S48 (2026-06-02) — adap-* verification closure post-restart + FD2 proof + Gov-v2 error-ledger
|
||
|
||
**User: "làm xong hết đi rồi session-end luôn" — đóng cả 3 adap item post-restart, rồi session-end.**
|
||
|
||
**Restart confirmed done** (registry có frontend-designer agent + adap-* commands + 8 subs KHÔNG store_memory) → S47 verified-pending nâng cấp. `/adap-apply all-pending` = 0 mới (cả 3 applied S47). `/adap-report all-applied` re-assess + update 3 report (honest §C5/G-015).
|
||
|
||
**Done (em main solo + 1 FD spawn):**
|
||
- **#1 store_memory strip → VERIFIED-runtime** — grep agents `tools:`=0 · registry 0/8 subs. (Caveat giữ: KHÔNG "read-only" — sub vẫn có Bash/Write; containment = defense-in-depth.)
|
||
- **#2 frontend-designer FD2 → VERIFIED-RAN** — 🩷 first real spawn (background). Full FD2 loop trên fe-user `/login`: read DS → Vite dev → Playwright shot 375+1440 → viewed PNG → FD4 rubric all-PASS → contrast fix `LoginPage.tsx:56` slate-500→600 → re-shot → build PASS. em main mirror fe-admin (parity). **Rig lessons (FD MEMORY):** (1) Vite-dev `networkidle` never fires → `domcontentloaded`+selector; (2) cold-start dep-optimize >15s → warm-up goto 60s. **Fact: SE = Tailwind v4 CSS-first** (`@theme{}` in index.css, **NO tailwind.config.js**).
|
||
- **#3 Gov-v2 delta → CLOSED (executed-file)** — NEW `docs/governance/error-ledger.md` (blameless RCA E-001..E-004 + Active-Guards 2-strike index + §L.a AS-1..AS-9 deterministic-detect + 3-ledger triad map) + §L.b 6-step wired `session-end.md` Phase 1.5 (ran live this session = demo).
|
||
|
||
**Code shipped:** `fe-{admin,user}/src/pages/LoginPage.tsx` subtitle contrast a11y (slate-500→600, ~7.5:1). Build ×2 PASS 0 TS error. **Test 181 unchanged** (FE-only, no .cs). → code commit deploys → 🟩 cicd-monitor verify bundle rotate.
|
||
|
||
**⚠️ NEXT SESSION:** (a) ✅ **DONE** — cicd Run #369 PASS, login fix live (admin `DPPTx2Kw`/user `CjoUEsoV`, Mig 43, health 200); no action; (b) §L.b chạy AUTO từ /session-end kế (session này chạy thủ công — command no hot-reload); (c) wire `reviewer` làm FD4 design-gate (quality-ADD, defer); (d) RAG re-index S42-S48 (AI_INFRA op).
|
||
|
||
**Next product (anh pick):** P11-C Vehicle+Driver (Mig 44, recon ready) · gotcha #57 LeaveType+Shift filtered-unique (test-before) · P11-D/E/F · Phase 9 Ops.
|
||
|
||
---
|
||
|
||
## S47 (2026-06-02) — AI_INFRA adap-* adoption channel + 3 broadcasts (infra/governance, no product code)
|
||
|
||
**Installed federated adoption channel** (AI_INFRA relay): 3 slash-commands `.claude/commands/adap-{apply,report,request}.md` (forked verbatim). Read AI_INFRA `broadcasts/outbox/` read-only (§J2) → apply own repo → `docs/governance/adap-reports/<id>.md`. 3 reports written. 0 agents spawned (em main solo).
|
||
|
||
**Adopted 3 broadcasts (all nấc executed-file / verified-pending — restart needed, agent/cmd `.md` no hot-reload):**
|
||
- **#1 store_memory strip** — removed from ALL 8 subs → **lead (em main) = sole RAG-writer** (em main keeps it). 4 RAG-read retained. Corroborates SE S41 re-bootstrap-loss lesson.
|
||
- **#2 frontend-designer (8th agent, pink)** — adopted (user call), forked canonical FD1–FD10 visual-verify floor, tailored SE stack + use-existing-DS + boundary ⟂ implementer-frontend.
|
||
- **#3 Gov-v2** — already-applied S44, delta report (gap: no formal error-ledger/§L.b checklist).
|
||
|
||
**🔴 NEXT SESSION FIRST (anh restart CLI):** 1 restart activates 3 commands + store_memory strip + frontend-designer. Then **spawn-test frontend-designer** small design task → confirm FD2 Playwright loop runs THẬT (upgrades #2 verified-pending → verified). Optional `/adap-report all-applied` re-confirm.
|
||
|
||
**Follow-ups (non-blocking):** (a) broadcast #3 formal error-ledger/§L.b checklist; (b) wire `reviewer` as FD4 design-gate; (c) RAG re-index S42-S47 (AI_INFRA op).
|
||
|
||
**Next product (anh pick):** P11-C Vehicle+Driver (Mig 44, recon ready) · gotcha #57 LeaveType/Shift filtered-unique · P11-D/E/F · Phase 9 Ops.
|
||
|
||
---
|
||
|
||
## S46 (2026-06-01) — Memory integrity repair (no code, docs-only)
|
||
|
||
**`/session-start` audit phát hiện S45 close-out để lại 2 file user-memory 0 byte** — `MEMORY.md` (index) + `feedback_background_spawn_visibility.md`. Index rỗng = S46 bootstrap chạy KHÔNG có memory auto-inject (degrade thầm lặng).
|
||
|
||
**Done (👤 em main solo, no agent spawn):**
|
||
- Rebuilt `MEMORY.md` index — 14 entry (8 feedback + 3 project + 2 pattern). Repopulate `feedback_background_spawn_visibility` từ HANDOFF/STATUS S45 ref (marked reconstructed). NEW `feedback_session_end_memory_write_verify`.
|
||
- Verified **0 empty `.md`** (`find -size 0` = 0). STATUS count drift "27"→**14** corrected. Test gate re-confirm 181 PASS lúc bootstrap.
|
||
- Memory files NGOÀI repo (`~/.claude/.../memory/`) → no git commit cho memory. Chỉ repo docs (STATUS+HANDOFF) = docs-only commit, CI skip.
|
||
|
||
**Root cause:** S45 session-end flush tạo stub rồi Write body truncate (gotcha #53 — S45 có test-specialist truncate). File 0-byte không báo lỗi + ngoài git-track → trôi tới S46 mới lộ.
|
||
|
||
**Next S47 (anh pick):** P11-C Vehicle+Driver (Mig 44, recon ready) · gotcha #57 fix LeaveType/Shift filtered-unique · P11-D/E/F · Phase 9 Ops · (optional) add verify-byte-count step vào /session-end skill — đề xuất AI_INFRA per charter v2.
|
||
|
||
---
|
||
|
||
## S45 (2026-06-01) — HRM test-gap stabilization + Holiday drift fix (Mig 43)
|
||
|
||
**2 commit `051b62b` (Tests +27) + `0c5a014` (Mig 43) → push → cicd Run #368 PASS, verified prod. 154→181 test.**
|
||
|
||
**Done:**
|
||
- **Đóng 3 test-gap deferred S35-S38** (stabilize before extend): Gap1 Holiday composite UNIQUE (7) + Gap2 EmployeeSatellite FK-invariant/soft-delete/cascade (10) + Gap3 gotcha #44 authz regression HrmConfigs+Employees (10). 🟪 test-specialist viết (return truncated #53 → 👤 em main verify-on-disk + proxy MEMORY).
|
||
- **Mig 43 `FilterHolidayUniqueIndexByIsDeleted`** (👤 em main solo) — Gap1 test lòi bug thật: Holiday DB UNIQUE (Year,Date) unfiltered vs handler `!IsDeleted` → admin xoá + thêm lại ngày lễ cùng date = **500 reachable**. Fix `.HasFilter("[IsDeleted]=0")` (khớp pattern 13×). 🟩 cicd verify filtered index live prod. Table vẫn 91 (index-only), FE bundle unchanged (đúng — BE-only).
|
||
- **🟦 P11-C recon sẵn:** Vehicle+Driver = extend HrmConfigs +2 kind declarative (Mig 44), giữ VehicleBooking free-text.
|
||
|
||
**gotcha #57 NEW:** soft-delete + UNIQUE → MUST `.HasFilter("[IsDeleted]=0")`. ⚠️ **LeaveType.Code + ShiftPattern.Code vẫn unfiltered** (cùng bug, backlog test-before). Process: `feedback_background_spawn_visibility` (foreground spawn im lặng "looks frozen" → đẩy background + report ngay).
|
||
|
||
**Next S46 (anh pick):** P11-C Vehicle+Driver (Mig 44, recon ready) · gotcha #57 fix LeaveType/Shift filtered-unique · P11-D/E/F · Phase 9 Ops.
|
||
|
||
---
|
||
|
||
## S44 (2026-06-01) — Monthly drift audit + AI_INFRA bundle 06-01 (docs-only, 2-way VERIFIED)
|
||
|
||
**4 commit `ae30f8f` → `5b8736d` → `071c25c` → `5dbcad3`, pushed, tree clean. CI-skip (all .md). 154 test unchanged (no code).**
|
||
|
||
**Done:**
|
||
- **Monthly cadence audit** (cron 2026-06-01, next **2026-07-01**): 🟦 investigator-codebase ground-truth-from-disk scan → 👤 patch **42 count-drift fixes** (`40→42 mig · 84/59/55/47→91 tables · 130/111→154 test · 52/49→56 gotcha`) across CLAUDE.md + docs/CLAUDE.md + ef-core/dependency-audit skills + schema-diagram + database-guide. schema-diagram migration table +Mig 17-42; ef-core history +Mig 27-42; detailed-§ ERD gap (Mig 27-42 modules) flag EXPLICIT → deferred backlog.
|
||
- **AI_INFRA bundle 06-01 adopt (full scope):** §A RAG T1/T2 auto · §C 7/7 agent-mem L1 ≤16KB + "25KB"→"~30KB tiered" ×7 · §D **#4 self-report step → /session-end Phase 6.3** (skip #1 have/#3 helper) · §E/§F report+ledger docs/governance. **AI_INFRA RT3 re-verified độc lập → VERIFIED 2-way, ĐÓNG HẲN.**
|
||
- **Carry-over S40 ĐÓNG** (`5b8736d`): BROADCAST-2 infra-feedback committed (governance trail) + `.mcp.json` gitignored (machine-path local, no secret).
|
||
|
||
**Lesson:** "incremented-per-session" counts drift → re-ground từ code monthly (count files). gotchas.md header KHÔNG có self-count → mỗi cite = downstream copy (patch từng chỗ). → memory `feedback_monthly_drift_audit`.
|
||
|
||
**Còn lại (AI_INFRA-owned, non-blocking):** eval baseline cite 11,922 cũ + SE full re-index (last-index 05-29, S42-S44 stopgap) → AI_INFRA op, batch chung web-MCP migration (ping nếu cần cross_project_search SE tươi sớm).
|
||
|
||
**Next S45 (anh pick):** product Phase 11 (P11-C Vehicle+Driver / P11-D ItTicket SLA / P11-E AttendanceReport / P11-F MaTicket) · test-gap backlog (Gap1 Holiday UNIQUE 🔴) · Phase 9 Ops.
|
||
|
||
---
|
||
|
||
## S43-S38 (older) → session logs
|
||
|
||
- **S43** (2026-05-30) Phase 11 P11-B LeaveBalance: Mig 42 `AddLeaveBalances` (90→91 tables, UNIQUE composite + FK LeaveTypes Restrict) + trừ phép exactly-once terminal DaDuyet (auto-create từ DaysPerYear, policy cho phép âm + cảnh báo) + FK invariant guard Create/Update + CQRS GetMy/GetUser/Adjust + FE "Số dư phép". 144→154 test, Gitea #367 prod, agents Max 0 bug. → `docs/changelog/sessions/2026-05-30-S42-S43-phase11-p11a-p11b.md`.
|
||
|
||
- **S42** (2026-05-30) Phase 11 P11-A: Mig 41 WireWorkflowAppsApprovalV2 (4 LevelOpinions + WorkflowAppCodeSequences) + 30 handler 4 module + Max re-review fix 2 FE picker bug. 130→144 test. → `docs/changelog/sessions/2026-05-30-S42-S43-phase11-p11a-p11b.md`.
|
||
|
||
- **S41** (2026-05-29) RAG corpus cleanup w/ AI_INFRA: `.claude/rag.json` exclude `**/`-anchored fix (gotcha #10) + store_memory reconcile 5/5 (anti-data-loss, at-risk rule) + re-bootstrap 3080→2406 (−674 junk, zero-loss verified). Standing infra backlog → AI_INFRA. Concurrency carry-over (BROADCAST-2 + `.mcp.json`) originated here → **resolved S44** (`5b8736d`). → memory `feedback_store_memory_rebootstrap_protection`.
|
||
|
||
- **S40** (2026-05-29) init audit 10-mục + doc consolidation (STATUS/HANDOFF 393KB→9KB zero-loss archive) + AI_INFRA bulletin adopt 4/4 (Tiered Memory v1 + /session-start /session-end slash commands LIVE) + RAG MCP recovery (quit+relaunch FRESH). **Concurrency carry-over** (BROADCAST 2 + `.mcp.json`) bắt nguồn đây — vẫn chưa đụng (xem S43).
|
||
- **S39** (2026-05-29) infra: Opus 4.8 1M + multi-agent split 4→7 (+investigator/implementer split +test-specialist) + budget +50% + gotcha #54/#55.
|
||
- **S38** (2026-05-28) 🎊 Phase 10 COMPLETE 11/11 — Mig 39+40 skeleton combo (Đơn từ/Đặt xe/Ticket/Chấm công/Dashboard NS). ApproveV2+LevelOpinions+LeaveBalance DEFER Phase 11 (→ làm xong S42-S43).
|
||
|
||
Detail đầy đủ → `docs/changelog/sessions/` + `docs/_archive/HANDOFF-preS40-fullhistory.md`.
|